@kalamba/sdk 0.6.0 → 0.7.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/errors-867a013a.js +57 -0
- package/dist/errors-c5948a4a.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +76 -69
- package/dist/index.js +78 -84
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +73 -52
- package/dist/plugins.js +978 -1018
- package/dist/wrapper.d.ts +71 -50
- package/package.json +1 -1
- package/dist/errors-66b5612a.cjs +0 -5
- package/dist/errors-96eb18f7.js +0 -52
package/dist/plugins.js
CHANGED
|
@@ -3,60 +3,60 @@
|
|
|
3
3
|
* Copyright (c) 2024, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
5
|
var Vt = Object.defineProperty;
|
|
6
|
-
var zt = (i,
|
|
7
|
-
var
|
|
8
|
-
if (!
|
|
9
|
-
throw TypeError("Cannot " +
|
|
6
|
+
var zt = (i, t, e) => t in i ? Vt(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
7
|
+
var p = (i, t, e) => (zt(i, typeof t != "symbol" ? t + "" : t, e), e), ct = (i, t, e) => {
|
|
8
|
+
if (!t.has(i))
|
|
9
|
+
throw TypeError("Cannot " + e);
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
if (
|
|
11
|
+
var y = (i, t, e) => (ct(i, t, "read from private field"), e ? e.call(i) : t.get(i)), E = (i, t, e) => {
|
|
12
|
+
if (t.has(i))
|
|
13
13
|
throw TypeError("Cannot add the same private member more than once");
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
import { a as
|
|
17
|
-
import { a as
|
|
18
|
-
function
|
|
19
|
-
return (
|
|
20
|
-
console.log(`[%c${i}\x1B[m] %s`,
|
|
14
|
+
t instanceof WeakSet ? t.add(i) : t.set(i, e);
|
|
15
|
+
}, v = (i, t, e, a) => (ct(i, t, "write to private field"), a ? a.call(i, e) : t.set(i, e), e);
|
|
16
|
+
import { a as Re } from "./errors-867a013a.js";
|
|
17
|
+
import { a as dt } from "./noop-3336849b.js";
|
|
18
|
+
function U(i, t) {
|
|
19
|
+
return (e, ...a) => {
|
|
20
|
+
console.log(`[%c${i}\x1B[m] %s`, t, e, ...a);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return Math.round(i * 100 /
|
|
23
|
+
function _t(i, t) {
|
|
24
|
+
return Math.round(i * 100 / t);
|
|
25
25
|
}
|
|
26
|
-
class
|
|
27
|
-
constructor(
|
|
28
|
-
|
|
29
|
-
this.config =
|
|
30
|
-
}
|
|
31
|
-
on(
|
|
32
|
-
const
|
|
33
|
-
s.data.message !== `kalamba:wrapper-casino:${
|
|
26
|
+
class j {
|
|
27
|
+
constructor(t) {
|
|
28
|
+
p(this, "config");
|
|
29
|
+
this.config = t;
|
|
30
|
+
}
|
|
31
|
+
on(t, e, a) {
|
|
32
|
+
const n = function(s) {
|
|
33
|
+
s.data.message !== `kalamba:wrapper-casino:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
|
|
34
34
|
};
|
|
35
|
-
window.addEventListener("message",
|
|
35
|
+
window.addEventListener("message", n, a);
|
|
36
36
|
}
|
|
37
|
-
send(
|
|
37
|
+
send(t, ...[e]) {
|
|
38
38
|
window.postMessage({
|
|
39
|
-
message: `kalamba:casino:${
|
|
40
|
-
payload:
|
|
39
|
+
message: `kalamba:casino:${t}`,
|
|
40
|
+
payload: e
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
class
|
|
46
|
-
constructor(...
|
|
47
|
-
super(...
|
|
44
|
+
const qt = U("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
45
|
+
class Fi extends j {
|
|
46
|
+
constructor(...t) {
|
|
47
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qt("configured");
|
|
48
48
|
}
|
|
49
49
|
registerToSdkEvents() {
|
|
50
|
-
window.addEventListener("message", (
|
|
50
|
+
window.addEventListener("message", (t) => {
|
|
51
51
|
try {
|
|
52
|
-
const { type:
|
|
53
|
-
switch (
|
|
52
|
+
const { type: e, payload: a } = t.data;
|
|
53
|
+
switch (e) {
|
|
54
54
|
case "doAudioSettings":
|
|
55
|
-
this.send("settings", { music:
|
|
55
|
+
this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
|
|
56
56
|
return;
|
|
57
57
|
case "doBalanceUpdate":
|
|
58
|
-
const { currency:
|
|
59
|
-
|
|
58
|
+
const { currency: n, coinValueInCents: r } = this.config.api;
|
|
59
|
+
a.currency === n && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: _t(a.balanceInCurrency, r) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
|
|
60
60
|
return;
|
|
61
61
|
case "doGamePause":
|
|
62
62
|
this.send("freeze");
|
|
@@ -91,50 +91,50 @@ class Bi extends Q {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
class
|
|
96
|
-
constructor(...
|
|
97
|
-
super(...
|
|
94
|
+
const k = U("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Gt = U("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
|
|
95
|
+
class Di extends j {
|
|
96
|
+
constructor(...t) {
|
|
97
|
+
super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
|
|
98
98
|
}
|
|
99
99
|
// TODO add types
|
|
100
100
|
registerDebugToSdkEvents() {
|
|
101
101
|
window.DebuggingPlugin = {
|
|
102
|
-
balance: (
|
|
103
|
-
bet: (
|
|
104
|
-
choice: (
|
|
105
|
-
close: (
|
|
106
|
-
help: (
|
|
107
|
-
history: (
|
|
108
|
-
freeze: (
|
|
109
|
-
paytable: (
|
|
110
|
-
settings: (
|
|
111
|
-
suspend: (
|
|
112
|
-
unfreeze: (
|
|
102
|
+
balance: (t) => this._send("balance", t),
|
|
103
|
+
bet: (t) => this._send("bet", t),
|
|
104
|
+
choice: (t) => this._send("choice", t),
|
|
105
|
+
close: (t) => this._send("close", t),
|
|
106
|
+
help: (t) => this._send("help", t),
|
|
107
|
+
history: (t) => this._send("history", t),
|
|
108
|
+
freeze: (t) => this._send("freeze", t),
|
|
109
|
+
paytable: (t) => this._send("paytable", t),
|
|
110
|
+
settings: (t) => this._send("settings", t),
|
|
111
|
+
suspend: (t) => this._send("suspend", t),
|
|
112
|
+
unfreeze: (t) => this._send("unfreeze", t)
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
registerSdkToDebugEvents() {
|
|
116
|
-
this.on("autoplay", (
|
|
116
|
+
this.on("autoplay", (t) => k("autoplay", t)), this.on("balance", (t) => k("balance", t)), this.on("bet", (t) => k("bet", t)), this.on("cashier", (t) => k("cashier", t)), this.on("choice", (t) => k("choice", t)), this.on("close", (t) => k("close", t)), this.on("error", (t) => k("error", t)), this.on("loadEnd", (t) => k("loadEnd", t)), this.on("loadProgress", (t) => k("loadProgress", t)), this.on("loadStart", (t) => k("loadStart", t)), this.on("playCycleStart", (t) => k("playCycleStart", t)), this.on("playCycleEnd", (t) => k("playCycleEnd", t)), this.on("playEnd", (t) => k("playEnd", t)), this.on("playError", (t) => k("playError", t)), this.on("playReady", (t) => k("playReady", t)), this.on("playStart", (t) => k("playStart", t)), this.on("settings", (t) => k("settings", t));
|
|
117
117
|
}
|
|
118
|
-
_send(...
|
|
119
|
-
|
|
118
|
+
_send(...t) {
|
|
119
|
+
Gt(...t), this.send(...t);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
const Wt =
|
|
123
|
-
class Ni extends
|
|
124
|
-
constructor(...
|
|
125
|
-
super(...
|
|
122
|
+
const Wt = U("GigPlugin", "color:#000000;font-weight:bold;");
|
|
123
|
+
class Ni extends j {
|
|
124
|
+
constructor(...t) {
|
|
125
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Wt("configured");
|
|
126
126
|
}
|
|
127
|
-
postMessage(
|
|
128
|
-
const
|
|
129
|
-
event:
|
|
127
|
+
postMessage(t) {
|
|
128
|
+
const e = {
|
|
129
|
+
event: t
|
|
130
130
|
};
|
|
131
|
-
window.top.postMessage(
|
|
131
|
+
window.top.postMessage(e, "*");
|
|
132
132
|
}
|
|
133
133
|
registerToSdkEvents() {
|
|
134
|
-
window.addEventListener("message", (
|
|
134
|
+
window.addEventListener("message", (t) => {
|
|
135
135
|
try {
|
|
136
|
-
const { data:
|
|
137
|
-
switch (
|
|
136
|
+
const { data: e } = t;
|
|
137
|
+
switch (e) {
|
|
138
138
|
case "STOP_AUTO_PLAY":
|
|
139
139
|
this.send("suspend");
|
|
140
140
|
return;
|
|
@@ -170,18 +170,18 @@ class Ni extends Q {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const $t =
|
|
174
|
-
class
|
|
175
|
-
constructor(...
|
|
176
|
-
super(...
|
|
173
|
+
const $t = U("OryxPlugin", "color:#000000;font-weight:bold;");
|
|
174
|
+
class Ri extends j {
|
|
175
|
+
constructor(...t) {
|
|
176
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), $t("configured");
|
|
177
177
|
}
|
|
178
178
|
registerToSdkEvents() {
|
|
179
|
-
window.addEventListener("message", (
|
|
179
|
+
window.addEventListener("message", (t) => {
|
|
180
180
|
try {
|
|
181
|
-
const { type:
|
|
182
|
-
switch (
|
|
181
|
+
const { type: e, param: a } = t.data;
|
|
182
|
+
switch (e) {
|
|
183
183
|
case "doBalanceUpdate":
|
|
184
|
-
this.send("balance", { balance:
|
|
184
|
+
this.send("balance", { balance: a });
|
|
185
185
|
return;
|
|
186
186
|
case "doGamePause":
|
|
187
187
|
this.send("freeze");
|
|
@@ -200,11 +200,11 @@ class Hi extends Q {
|
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
202
|
registerFromSdkEvents() {
|
|
203
|
-
let
|
|
203
|
+
let t = 0;
|
|
204
204
|
this.on("close", () => {
|
|
205
205
|
window.top.postMessage({ wpgaction: "close" }, "*"), window.parent.postMessage({ wpgaction: "close.parent" }, "*");
|
|
206
|
-
}), this.on("balance", ({ balance:
|
|
207
|
-
|
|
206
|
+
}), this.on("balance", ({ balance: e }) => {
|
|
207
|
+
t !== e && (t = e, window.top.postMessage({ param: {}, wpgaction: "balance" }, "*"), window.parent.postMessage({ param: {}, wpgaction: "balance.parent" }, "*"));
|
|
208
208
|
}), this.on("loadStart", () => {
|
|
209
209
|
window.top.postMessage({ wpgaction: "loadStart" }, "*"), window.parent.postMessage({ wpgaction: "loadStart.parent" }, "*");
|
|
210
210
|
}), this.on("loadEnd", () => {
|
|
@@ -213,8 +213,8 @@ class Hi extends Q {
|
|
|
213
213
|
window.top.postMessage({ wpgaction: "gameSpinStart" }, "*"), window.parent.postMessage({ wpgaction: "gameSpinStart.parent" }, "*");
|
|
214
214
|
}), this.on("playEnd", () => {
|
|
215
215
|
window.top.postMessage({ wpgaction: "gameSpinEnd" }, "*"), window.parent.postMessage({ wpgaction: "gameSpinEnd.parent" }, "*");
|
|
216
|
-
}), this.on("cashier", ({ type:
|
|
217
|
-
switch (
|
|
216
|
+
}), this.on("cashier", ({ type: e }) => {
|
|
217
|
+
switch (e) {
|
|
218
218
|
case "BALANCE_LOW":
|
|
219
219
|
window.top.postMessage({ wpgaction: "cashier" }, "*"), window.parent.postMessage({ wpgaction: "cashier.parent" }, "*");
|
|
220
220
|
break;
|
|
@@ -225,35 +225,35 @@ class Hi extends Q {
|
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
const
|
|
229
|
-
function
|
|
228
|
+
const lt = U("PariplayPlugin", "color:#000000;font-weight:bold;");
|
|
229
|
+
function ze(i) {
|
|
230
230
|
try {
|
|
231
231
|
window.top.location = i;
|
|
232
232
|
} catch {
|
|
233
233
|
window.location = i;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
function qe(i,
|
|
237
|
-
return new Promise(function(
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
},
|
|
236
|
+
function qe(i, t) {
|
|
237
|
+
return new Promise(function(a, n) {
|
|
238
|
+
const r = new XMLHttpRequest();
|
|
239
|
+
r.onload = function() {
|
|
240
|
+
r.status >= 200 && r.status < 300 ? a(r.responseText) : n(r.responseText);
|
|
241
|
+
}, r.open(i, t), r.send();
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Ge() {
|
|
245
245
|
}
|
|
246
246
|
function jt(i) {
|
|
247
|
-
return i.filter(function(
|
|
248
|
-
return
|
|
247
|
+
return i.filter(function(e) {
|
|
248
|
+
return e.messageType.toUpperCase() === "DATA";
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
return i.filter(function(
|
|
253
|
-
return ["NOTIFICATION", "POPUP"].includes(
|
|
251
|
+
function We(i) {
|
|
252
|
+
return i.filter(function(e) {
|
|
253
|
+
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function Ft(i) {
|
|
257
257
|
try {
|
|
258
258
|
return JSON.parse(i.text);
|
|
259
259
|
} catch {
|
|
@@ -261,56 +261,56 @@ function Rt(i) {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
function Qt(i) {
|
|
264
|
-
return i.map(
|
|
265
|
-
return
|
|
264
|
+
return i.map(Ft).filter(Boolean).find(function(e) {
|
|
265
|
+
return e.betId != null && e.winId != null;
|
|
266
266
|
}) || {};
|
|
267
267
|
}
|
|
268
268
|
function Xt(i) {
|
|
269
|
-
return i.map(
|
|
270
|
-
return
|
|
269
|
+
return i.map(Ft).filter(Boolean).find(function(e) {
|
|
270
|
+
return e.TotalBet != null && e.TotalWin != null;
|
|
271
271
|
}) || {};
|
|
272
272
|
}
|
|
273
|
-
class
|
|
274
|
-
constructor(...
|
|
275
|
-
super(...
|
|
273
|
+
class Hi extends j {
|
|
274
|
+
constructor(...t) {
|
|
275
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), lt("configured");
|
|
276
276
|
}
|
|
277
|
-
postMessage(
|
|
278
|
-
const
|
|
277
|
+
postMessage(t, e) {
|
|
278
|
+
const a = {
|
|
279
279
|
lang: this.config.ui.language,
|
|
280
280
|
sender: this.config.api.game,
|
|
281
|
-
type:
|
|
281
|
+
type: t
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
e != null && (a.data = e), lt("postMessage", a), window.parent.postMessage(a, "*");
|
|
284
284
|
}
|
|
285
|
-
coinsToCurrency(
|
|
286
|
-
return
|
|
285
|
+
coinsToCurrency(t) {
|
|
286
|
+
return t * this.config.api.coinValueInCents / 100;
|
|
287
287
|
}
|
|
288
|
-
handleContinueButton(
|
|
289
|
-
|
|
288
|
+
handleContinueButton(t, e) {
|
|
289
|
+
t.link && qe("GET", t.link), e();
|
|
290
290
|
}
|
|
291
|
-
handleLinkButton(
|
|
292
|
-
switch (
|
|
291
|
+
handleLinkButton(t, e) {
|
|
292
|
+
switch (t.linkType.toUpperCase()) {
|
|
293
293
|
case "AJAX":
|
|
294
|
-
qe("GET",
|
|
294
|
+
qe("GET", t.link), e();
|
|
295
295
|
return;
|
|
296
296
|
case "AJAXRESPONSE":
|
|
297
|
-
qe("GET",
|
|
298
|
-
|
|
297
|
+
qe("GET", t.link).then(() => {
|
|
298
|
+
e();
|
|
299
299
|
});
|
|
300
300
|
return;
|
|
301
301
|
case "REDIRECT":
|
|
302
|
-
|
|
302
|
+
ze(t.link), e();
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
handleQuitButton(
|
|
307
|
-
this.send("close"),
|
|
306
|
+
handleQuitButton(t, e) {
|
|
307
|
+
this.send("close"), e();
|
|
308
308
|
}
|
|
309
|
-
handleCashierButton(
|
|
310
|
-
this.send("cashier", { type: "ON_DEMAND" }),
|
|
309
|
+
handleCashierButton(t, e) {
|
|
310
|
+
this.send("cashier", { type: "ON_DEMAND" }), e();
|
|
311
311
|
}
|
|
312
|
-
handleHistoryButton(
|
|
313
|
-
this.send("history", { source: "casino" }),
|
|
312
|
+
handleHistoryButton(t, e) {
|
|
313
|
+
this.send("history", { source: "casino" }), e();
|
|
314
314
|
}
|
|
315
315
|
get buttonActions() {
|
|
316
316
|
return {
|
|
@@ -321,24 +321,24 @@ class Vi extends Q {
|
|
|
321
321
|
QUIT: this.handleQuitButton
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
processInfoUiMessages(
|
|
325
|
-
return
|
|
326
|
-
Object.assign({},
|
|
327
|
-
buttons:
|
|
324
|
+
processInfoUiMessages(t) {
|
|
325
|
+
return t.reduce((e, a) => e.then(() => new Promise((n) => {
|
|
326
|
+
Object.assign({}, a, {
|
|
327
|
+
buttons: a.buttons.filter((r) => r.action.toUpperCase() === "CASHIER" ? !!this.config.api.cashierUrl : !0).map((r) => Object.assign({}, r, {
|
|
328
328
|
onRelease: () => {
|
|
329
|
-
const s =
|
|
330
|
-
h ? h(
|
|
329
|
+
const s = a.messageType.toUpperCase() === "POPUP" ? Ge : n, h = this.buttonActions[r.action.toUpperCase()];
|
|
330
|
+
h ? h(r, s) : s();
|
|
331
331
|
}
|
|
332
332
|
}))
|
|
333
333
|
});
|
|
334
|
-
}).catch(
|
|
335
|
-
}).catch(
|
|
334
|
+
}).catch(Ge)), Promise.resolve()).then(() => {
|
|
335
|
+
}).catch(Ge);
|
|
336
336
|
}
|
|
337
337
|
registerToSdkEvents() {
|
|
338
|
-
window.addEventListener("message", (
|
|
338
|
+
window.addEventListener("message", (t) => {
|
|
339
339
|
try {
|
|
340
|
-
const { type:
|
|
341
|
-
switch (
|
|
340
|
+
const { type: e } = t.data;
|
|
341
|
+
switch (e) {
|
|
342
342
|
case "pause":
|
|
343
343
|
case "disableSpin":
|
|
344
344
|
this.send("freeze");
|
|
@@ -358,34 +358,34 @@ class Vi extends Q {
|
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
360
|
registerFromSdkEvents() {
|
|
361
|
-
let
|
|
362
|
-
this.on("openGameResponse", (
|
|
363
|
-
let
|
|
361
|
+
let t = 0;
|
|
362
|
+
this.on("openGameResponse", (e) => {
|
|
363
|
+
let a;
|
|
364
364
|
try {
|
|
365
|
-
const
|
|
365
|
+
const n = JSON.parse(
|
|
366
366
|
JSON.parse(atob(this.config.api.integrationData.token.split(".")[1])).token
|
|
367
|
-
),
|
|
368
|
-
|
|
369
|
-
ClientToken:
|
|
370
|
-
CurrencyCode:
|
|
371
|
-
PlayerTokenId:
|
|
372
|
-
SessionData:
|
|
367
|
+
), r = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
|
|
368
|
+
a = {
|
|
369
|
+
ClientToken: n.integrationSpecificAttributes.clientToken,
|
|
370
|
+
CurrencyCode: n.currency,
|
|
371
|
+
PlayerTokenId: n.user,
|
|
372
|
+
SessionData: r
|
|
373
373
|
};
|
|
374
374
|
} catch {
|
|
375
|
-
|
|
375
|
+
a = void 0;
|
|
376
376
|
}
|
|
377
377
|
this.postMessage("gameDataLoaded", {
|
|
378
|
-
LoadGameData:
|
|
378
|
+
LoadGameData: a,
|
|
379
379
|
success: !0
|
|
380
380
|
});
|
|
381
381
|
try {
|
|
382
|
-
const
|
|
383
|
-
this.processInfoUiMessages(
|
|
382
|
+
const n = We(e.contract.uiMessages);
|
|
383
|
+
this.processInfoUiMessages(n);
|
|
384
384
|
} catch {
|
|
385
385
|
}
|
|
386
|
-
}), this.on("balance", ({ balance:
|
|
387
|
-
|
|
388
|
-
amount: this.coinsToCurrency(
|
|
386
|
+
}), this.on("balance", ({ balance: e }) => {
|
|
387
|
+
t !== e && (t = e, this.postMessage("balance", {
|
|
388
|
+
amount: this.coinsToCurrency(e)
|
|
389
389
|
}));
|
|
390
390
|
}), this.on("close", () => {
|
|
391
391
|
if (this.config.api.homeUrl)
|
|
@@ -396,67 +396,67 @@ class Vi extends Q {
|
|
|
396
396
|
window.history.back();
|
|
397
397
|
}
|
|
398
398
|
else
|
|
399
|
-
this.config.api.homeUrl === "(api)" ? this.postMessage("quit") :
|
|
400
|
-
}), this.on("playEnd", (
|
|
399
|
+
this.config.api.homeUrl === "(api)" ? this.postMessage("quit") : ze(this.config.api.homeUrl);
|
|
400
|
+
}), this.on("playEnd", (e) => {
|
|
401
401
|
this.postMessage("roundEnded", {
|
|
402
|
-
balanceAfter: this.coinsToCurrency(
|
|
403
|
-
win: this.coinsToCurrency(
|
|
402
|
+
balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
|
|
403
|
+
win: this.coinsToCurrency(e.contract.win.round)
|
|
404
404
|
});
|
|
405
405
|
try {
|
|
406
|
-
const
|
|
407
|
-
this.processInfoUiMessages(
|
|
406
|
+
const a = We(e.contract.uiMessages);
|
|
407
|
+
this.processInfoUiMessages(a);
|
|
408
408
|
} catch {
|
|
409
409
|
}
|
|
410
|
-
}), this.on("playError", (
|
|
411
|
-
var
|
|
410
|
+
}), this.on("playError", (e) => {
|
|
411
|
+
var a, n;
|
|
412
412
|
this.postMessage("ticketReceived", {
|
|
413
413
|
// TODO: Operator specific error code and message
|
|
414
|
-
ErrorCode: (
|
|
414
|
+
ErrorCode: (a = e.data) == null ? void 0 : a.code,
|
|
415
415
|
ErrorMessage: "ERROR",
|
|
416
416
|
Status: {
|
|
417
|
-
ErrCode: (
|
|
417
|
+
ErrCode: (n = e.data) == null ? void 0 : n.code
|
|
418
418
|
}
|
|
419
419
|
});
|
|
420
|
-
}), this.on("playResponse", (
|
|
420
|
+
}), this.on("playResponse", (e) => {
|
|
421
421
|
this.postMessage("roundStarted", {
|
|
422
422
|
balanceBefore: this.coinsToCurrency(
|
|
423
|
-
|
|
423
|
+
e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
|
|
424
424
|
)
|
|
425
425
|
});
|
|
426
|
-
const
|
|
426
|
+
const a = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), n = jt(e.contract.uiMessages), r = We(e.contract.uiMessages), s = Qt(n), h = Xt(n);
|
|
427
427
|
this.postMessage("ticketReceived", {
|
|
428
|
-
Balance: this.coinsToCurrency(
|
|
429
|
-
BetAmount:
|
|
428
|
+
Balance: this.coinsToCurrency(e.contract.balance.coins),
|
|
429
|
+
BetAmount: a ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
|
|
430
430
|
CreditTransactionId: s.betId,
|
|
431
431
|
DebitTransactionId: s.winId,
|
|
432
|
-
Message:
|
|
432
|
+
Message: r,
|
|
433
433
|
SessionData: h,
|
|
434
434
|
Status: {
|
|
435
435
|
ErrCode: 0
|
|
436
436
|
},
|
|
437
|
-
WinAmount: this.coinsToCurrency(
|
|
437
|
+
WinAmount: this.coinsToCurrency(e.contract.win.round)
|
|
438
438
|
});
|
|
439
|
-
}), this.on("playStart", (
|
|
440
|
-
|
|
441
|
-
totalBet: this.coinsToCurrency(
|
|
439
|
+
}), this.on("playStart", (e) => {
|
|
440
|
+
e.bet && this.postMessage("roundStart", {
|
|
441
|
+
totalBet: this.coinsToCurrency(e.bet.base * e.bet.multiplier)
|
|
442
442
|
});
|
|
443
443
|
}), this.on("loadEnd", () => {
|
|
444
444
|
this.postMessage("gameReady");
|
|
445
445
|
}), this.on("loadStart", () => {
|
|
446
446
|
this.postMessage("onAppFrameReady");
|
|
447
447
|
}), this.on("cashier", () => {
|
|
448
|
-
this.config.api.cashierUrl && (this.config.api.cashierUrl === "(api)" ? this.postMessage("cashier") :
|
|
448
|
+
this.config.api.cashierUrl && (this.config.api.cashierUrl === "(api)" ? this.postMessage("cashier") : ze(this.config.api.cashierUrl));
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
const
|
|
453
|
-
class
|
|
454
|
-
constructor(...
|
|
455
|
-
super(...
|
|
456
|
-
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
|
|
452
|
+
const ge = U("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
453
|
+
class Vi extends j {
|
|
454
|
+
constructor(...e) {
|
|
455
|
+
super(...e);
|
|
456
|
+
p(this, "VERSION", "1.15.0");
|
|
457
|
+
const a = document.createElement("script");
|
|
458
|
+
a.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, a.onload = () => {
|
|
459
|
+
ge("loaded"), window.FEIM.configure({
|
|
460
460
|
p2pConfig: {
|
|
461
461
|
currency: this.config.api.currency,
|
|
462
462
|
launchParams: {
|
|
@@ -464,21 +464,21 @@ class zi extends Q {
|
|
|
464
464
|
homeurl: "homeUrl"
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
}),
|
|
468
|
-
}, document.body.appendChild(
|
|
467
|
+
}), ge("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
|
|
468
|
+
}, document.body.appendChild(a);
|
|
469
469
|
}
|
|
470
470
|
registerToSdkEvents() {
|
|
471
|
-
window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() =>
|
|
471
|
+
window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => ge("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => ge("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => ge("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
|
|
472
472
|
this.send("help", {});
|
|
473
473
|
}), window.FEIM.on.togglePaytable(() => {
|
|
474
474
|
this.send("paytable", {});
|
|
475
475
|
}), window.FEIM.on.unfreeze(() => this.send("unfreeze")), window.FEIM.on.updateSettings(
|
|
476
|
-
({ payload: [
|
|
476
|
+
({ payload: [e] }) => this.send("settings", { sounds: e.sounds, fastPlay: e.fastPlay })
|
|
477
477
|
);
|
|
478
478
|
}
|
|
479
479
|
registerFromSdkEvents() {
|
|
480
|
-
this.on("autoplay", ({ action:
|
|
481
|
-
switch (
|
|
480
|
+
this.on("autoplay", ({ action: e }) => {
|
|
481
|
+
switch (e) {
|
|
482
482
|
case "start":
|
|
483
483
|
window.FEIM.send.autoPlayStarted();
|
|
484
484
|
break;
|
|
@@ -486,71 +486,71 @@ class zi extends Q {
|
|
|
486
486
|
window.FEIM.send.autoPlayFinished();
|
|
487
487
|
break;
|
|
488
488
|
}
|
|
489
|
-
}), this.on("balance", ({ balance:
|
|
490
|
-
window.FEIM.send.balanceUpdate(
|
|
491
|
-
}), this.on("bet", ({ base:
|
|
492
|
-
window.FEIM.send.betUpdate(
|
|
493
|
-
}), this.on("error", ({ message:
|
|
494
|
-
window.FEIM.send.errorMessage(
|
|
489
|
+
}), this.on("balance", ({ balance: e }) => {
|
|
490
|
+
window.FEIM.send.balanceUpdate(e);
|
|
491
|
+
}), this.on("bet", ({ base: e, multiplier: a }) => {
|
|
492
|
+
window.FEIM.send.betUpdate(e * a);
|
|
493
|
+
}), this.on("error", ({ message: e }) => {
|
|
494
|
+
window.FEIM.send.errorMessage(e);
|
|
495
495
|
}), this.on("close", () => {
|
|
496
496
|
window.FEIM.send.exitGame();
|
|
497
497
|
}), this.on("loadEnd", () => {
|
|
498
498
|
window.FEIM.send.gameLoadCompleted();
|
|
499
|
-
}), this.on("loadProgress", ({ progress:
|
|
500
|
-
window.FEIM.send.gameLoadProgress(
|
|
499
|
+
}), this.on("loadProgress", ({ progress: e }) => {
|
|
500
|
+
window.FEIM.send.gameLoadProgress(e);
|
|
501
501
|
}), this.on("loadStart", () => {
|
|
502
502
|
window.FEIM.send.gameLoadStarted();
|
|
503
503
|
}), this.on("cashier", () => {
|
|
504
504
|
window.FEIM.send.openQuickDeposit();
|
|
505
|
-
}), this.on("playCycleEnd", (
|
|
506
|
-
const
|
|
507
|
-
balance:
|
|
508
|
-
bet:
|
|
505
|
+
}), this.on("playCycleEnd", (e) => {
|
|
506
|
+
const a = {
|
|
507
|
+
balance: e.contract.balance.coins,
|
|
508
|
+
bet: e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
|
|
509
509
|
win: {
|
|
510
|
-
win:
|
|
510
|
+
win: e.contract.win.total
|
|
511
511
|
}
|
|
512
512
|
};
|
|
513
|
-
window.FEIM.send.roundFinished(
|
|
514
|
-
}), this.on("playResponse", (
|
|
515
|
-
const
|
|
516
|
-
balance:
|
|
517
|
-
playResponse:
|
|
513
|
+
window.FEIM.send.roundFinished(a);
|
|
514
|
+
}), this.on("playResponse", (e) => {
|
|
515
|
+
const a = {
|
|
516
|
+
balance: e.contract.balance.coins,
|
|
517
|
+
playResponse: e.data
|
|
518
518
|
};
|
|
519
|
-
window.FEIM.send.roundStarted(
|
|
519
|
+
window.FEIM.send.roundStarted(a);
|
|
520
520
|
}), this.on("history", () => {
|
|
521
521
|
window.FEIM.send.showHistory();
|
|
522
|
-
}), this.on("settings", (
|
|
523
|
-
window.FEIM.send.updateSettings(
|
|
522
|
+
}), this.on("settings", (e) => {
|
|
523
|
+
window.FEIM.send.updateSettings(e);
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
const
|
|
528
|
-
class
|
|
529
|
-
constructor(...
|
|
530
|
-
super(...
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
|
|
534
|
-
this.ping(
|
|
535
|
-
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
536
|
-
}
|
|
537
|
-
ping(
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
},
|
|
527
|
+
const $e = U("TukoPlugin", "color:#000000;font-weight:bold;");
|
|
528
|
+
class zi extends j {
|
|
529
|
+
constructor(...e) {
|
|
530
|
+
super(...e);
|
|
531
|
+
p(this, "PING_INTERVAL", 1e4);
|
|
532
|
+
const n = new URLSearchParams(window.location.search).get("pingCallbackUrl");
|
|
533
|
+
n && window.setInterval(() => {
|
|
534
|
+
this.ping(n);
|
|
535
|
+
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), $e("configured");
|
|
536
|
+
}
|
|
537
|
+
ping(e) {
|
|
538
|
+
const a = new XMLHttpRequest();
|
|
539
|
+
a.onreadystatechange = function() {
|
|
540
|
+
a.readyState === XMLHttpRequest.DONE && (a.status === 0 || a.status >= 200 && a.status < 400 ? $e("ping ok", a) : $e("ping error", a));
|
|
541
|
+
}, a.open("GET", e), a.send();
|
|
542
542
|
}
|
|
543
543
|
registerToSdkEvents() {
|
|
544
|
-
window.addEventListener("message", (
|
|
544
|
+
window.addEventListener("message", (e) => {
|
|
545
545
|
try {
|
|
546
|
-
const { type:
|
|
547
|
-
switch (
|
|
546
|
+
const { type: a, payload: n } = e.data;
|
|
547
|
+
switch (a) {
|
|
548
548
|
case "doAudioSettings":
|
|
549
|
-
this.send("settings", { music:
|
|
549
|
+
this.send("settings", { music: n == null ? void 0 : n.musicEnabled, sounds: n == null ? void 0 : n.soundEnabled });
|
|
550
550
|
return;
|
|
551
551
|
case "doBalanceUpdate":
|
|
552
|
-
const { currency:
|
|
553
|
-
|
|
552
|
+
const { currency: r, coinValueInCents: s } = this.config.api;
|
|
553
|
+
n.currency === r && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: _t(n.balanceInCurrency, s) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
|
|
554
554
|
return;
|
|
555
555
|
case "doGamePause":
|
|
556
556
|
this.send("freeze");
|
|
@@ -585,116 +585,111 @@ class Gi extends Q {
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
class
|
|
589
|
-
constructor(
|
|
590
|
-
|
|
591
|
-
this.config =
|
|
592
|
-
}
|
|
593
|
-
on(
|
|
594
|
-
const
|
|
595
|
-
s.data.message !== `kalamba:wrapper-rgs:${
|
|
588
|
+
class Kt {
|
|
589
|
+
constructor(t) {
|
|
590
|
+
p(this, "config");
|
|
591
|
+
this.config = t;
|
|
592
|
+
}
|
|
593
|
+
on(t, e, a) {
|
|
594
|
+
const n = function(s) {
|
|
595
|
+
s.data.message !== `kalamba:wrapper-rgs:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
|
|
596
596
|
};
|
|
597
|
-
window.addEventListener("message",
|
|
597
|
+
window.addEventListener("message", n, a);
|
|
598
598
|
}
|
|
599
|
-
send(
|
|
599
|
+
send(t, ...[e]) {
|
|
600
600
|
window.postMessage({
|
|
601
|
-
message: `kalamba:rgs:${
|
|
602
|
-
payload:
|
|
601
|
+
message: `kalamba:rgs:${t}`,
|
|
602
|
+
payload: e
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
class
|
|
607
|
-
constructor(
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
606
|
+
class Jt {
|
|
607
|
+
constructor(t) {
|
|
608
|
+
p(this, "socket", null);
|
|
609
|
+
p(this, "webSocketUrl");
|
|
610
|
+
p(this, "eventListeners", {
|
|
611
611
|
close: [],
|
|
612
612
|
error: [],
|
|
613
613
|
message: []
|
|
614
614
|
});
|
|
615
|
-
|
|
616
|
-
const
|
|
617
|
-
return
|
|
618
|
-
|
|
619
|
-
this.handleOpen(
|
|
615
|
+
p(this, "connect", () => {
|
|
616
|
+
const t = new WebSocket(this.webSocketUrl);
|
|
617
|
+
return t.addEventListener("message", this.handleMessage), new Promise((e) => {
|
|
618
|
+
t.addEventListener("open", (a) => {
|
|
619
|
+
this.handleOpen(a), e(this.socket);
|
|
620
620
|
});
|
|
621
621
|
});
|
|
622
622
|
});
|
|
623
|
-
|
|
623
|
+
p(this, "send", (t) => {
|
|
624
624
|
if (this.socket == null)
|
|
625
625
|
throw new Error("Cannot send message, the WebSocket connection is not open");
|
|
626
|
-
this.socket.send(
|
|
626
|
+
this.socket.send(t);
|
|
627
627
|
});
|
|
628
|
-
|
|
628
|
+
p(this, "close", () => {
|
|
629
629
|
if (this.socket == null)
|
|
630
630
|
throw new Error("Cannot close the WebSocket connection that is not open");
|
|
631
|
-
this.socket.close(), this.addEventListener("error", (
|
|
632
|
-
console.log(
|
|
631
|
+
this.socket.close(), this.addEventListener("error", (t) => {
|
|
632
|
+
console.log(t);
|
|
633
633
|
});
|
|
634
634
|
});
|
|
635
|
-
|
|
636
|
-
this.eventListeners.close.forEach((
|
|
637
|
-
t
|
|
635
|
+
p(this, "handleClose", (t) => {
|
|
636
|
+
this.eventListeners.close.forEach((e) => {
|
|
637
|
+
e(t);
|
|
638
638
|
});
|
|
639
639
|
});
|
|
640
|
-
|
|
641
|
-
this.eventListeners.error.forEach((
|
|
642
|
-
t
|
|
640
|
+
p(this, "handleError", (t) => {
|
|
641
|
+
this.eventListeners.error.forEach((e) => {
|
|
642
|
+
e(t);
|
|
643
643
|
});
|
|
644
644
|
});
|
|
645
|
-
|
|
646
|
-
this.eventListeners.message.forEach((
|
|
647
|
-
t
|
|
645
|
+
p(this, "handleMessage", (t) => {
|
|
646
|
+
this.eventListeners.message.forEach((e) => {
|
|
647
|
+
e(t);
|
|
648
648
|
});
|
|
649
649
|
});
|
|
650
|
-
|
|
651
|
-
const
|
|
652
|
-
|
|
650
|
+
p(this, "handleOpen", (t) => {
|
|
651
|
+
const e = t.target;
|
|
652
|
+
e.addEventListener("close", this.handleClose), e.addEventListener("error", this.handleError), this.socket = e;
|
|
653
653
|
});
|
|
654
|
-
this.webSocketUrl =
|
|
654
|
+
this.webSocketUrl = t;
|
|
655
655
|
}
|
|
656
|
-
addEventListener(
|
|
657
|
-
this.eventListeners[
|
|
656
|
+
addEventListener(t, e) {
|
|
657
|
+
this.eventListeners[t].push(e);
|
|
658
658
|
}
|
|
659
|
-
removeEventListener(
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
function Ae(i) {
|
|
665
|
-
try {
|
|
666
|
-
return JSON.parse(i == null ? void 0 : i.data);
|
|
667
|
-
} catch (e) {
|
|
668
|
-
return console.error("fakap", e), null;
|
|
659
|
+
removeEventListener(t, e) {
|
|
660
|
+
const a = this.eventListeners[t].indexOf(e);
|
|
661
|
+
a !== -1 && this.eventListeners[t].splice(a, 1);
|
|
669
662
|
}
|
|
670
663
|
}
|
|
671
|
-
function
|
|
672
|
-
|
|
673
|
-
return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "GameEvent";
|
|
664
|
+
function Ie(i) {
|
|
665
|
+
return JSON.parse(i == null ? void 0 : i.data);
|
|
674
666
|
}
|
|
675
|
-
function
|
|
676
|
-
|
|
667
|
+
function Yt(i) {
|
|
668
|
+
var t;
|
|
669
|
+
return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "Ping";
|
|
677
670
|
}
|
|
678
|
-
function
|
|
679
|
-
|
|
671
|
+
function ut(i) {
|
|
672
|
+
var t;
|
|
673
|
+
return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "RealityCheck";
|
|
680
674
|
}
|
|
681
|
-
function
|
|
682
|
-
return
|
|
675
|
+
function Be(i) {
|
|
676
|
+
return i.header.name === "GameEvent";
|
|
683
677
|
}
|
|
684
|
-
function
|
|
685
|
-
|
|
686
|
-
return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "Ping";
|
|
678
|
+
function Zt(i) {
|
|
679
|
+
return Be(i) && i.body.event === "OPEN_GAME";
|
|
687
680
|
}
|
|
688
681
|
function ht(i) {
|
|
689
|
-
|
|
690
|
-
return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "RealityCheck";
|
|
682
|
+
return i.header.code !== 1;
|
|
691
683
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
684
|
+
function ei(i) {
|
|
685
|
+
return Be(i) && i.body.event.includes("_RESULT");
|
|
686
|
+
}
|
|
687
|
+
var ie, ve;
|
|
688
|
+
class ti extends Jt {
|
|
689
|
+
constructor(e, a) {
|
|
690
|
+
const n = new URL(e.apiUrl);
|
|
691
|
+
n.searchParams.set("cageCode", e.cageCode), n.searchParams.set("gameCode", e.gameCode), n.searchParams.set("operatorCode", e.operatorCode), n.searchParams.set("playMode", e.playMode), n.searchParams.set("token", e.token), n.searchParams.set("username", e.username);
|
|
692
|
+
super(n.toString());
|
|
698
693
|
/*
|
|
699
694
|
* Correlation ID. Used in Request and Response types.
|
|
700
695
|
* ----
|
|
@@ -705,7 +700,7 @@ class ii extends Kt {
|
|
|
705
700
|
* request sent. Client and server independently maintain their own
|
|
706
701
|
* correlation id counter.
|
|
707
702
|
*/
|
|
708
|
-
|
|
703
|
+
p(this, "cId", 0);
|
|
709
704
|
// Initial values for header
|
|
710
705
|
/*
|
|
711
706
|
* Increasing message ID
|
|
@@ -717,126 +712,132 @@ class ii extends Kt {
|
|
|
717
712
|
* received out of sync).
|
|
718
713
|
*/
|
|
719
714
|
// TODO make sure messages are processed in order
|
|
720
|
-
|
|
715
|
+
p(this, "mId", 0);
|
|
721
716
|
// Initial values for body
|
|
722
717
|
/*
|
|
723
718
|
* Sequence ID. Action/Event correlation.
|
|
724
719
|
*/
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
const
|
|
731
|
-
(
|
|
720
|
+
p(this, "seqId", 10);
|
|
721
|
+
p(this, "gameCode");
|
|
722
|
+
E(this, ie, void 0);
|
|
723
|
+
E(this, ve, void 0);
|
|
724
|
+
p(this, "onMessage", (e) => {
|
|
725
|
+
const a = Ie(e);
|
|
726
|
+
(Be(a) || Yt(a) || ut(a)) && this.sendAcknowledgement(a), ut(a) && this.handleRealityCheck(a);
|
|
732
727
|
});
|
|
733
|
-
this.eventListeners.realityCheck = [], this.gameCode =
|
|
728
|
+
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, v(this, ie, a.requestTimeoutMs), v(this, ve, a.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
|
|
734
729
|
}
|
|
735
|
-
handleRealityCheck(
|
|
736
|
-
this.eventListeners.realityCheck.forEach((
|
|
737
|
-
|
|
730
|
+
handleRealityCheck(e) {
|
|
731
|
+
this.eventListeners.realityCheck.forEach((a) => {
|
|
732
|
+
a(e.body);
|
|
738
733
|
});
|
|
739
734
|
}
|
|
740
|
-
addEventListener(
|
|
741
|
-
super.addEventListener(
|
|
735
|
+
addEventListener(e, a) {
|
|
736
|
+
super.addEventListener(e, a);
|
|
742
737
|
}
|
|
743
|
-
removeEventListener(
|
|
744
|
-
super.removeEventListener(
|
|
738
|
+
removeEventListener(e, a) {
|
|
739
|
+
super.removeEventListener(e, a);
|
|
745
740
|
}
|
|
746
|
-
buildHeader(
|
|
741
|
+
buildHeader(e, a = null) {
|
|
747
742
|
return {
|
|
748
743
|
// Assign new cId if it is not provided
|
|
749
|
-
cId:
|
|
750
|
-
code:
|
|
744
|
+
cId: a ?? ++this.cId,
|
|
745
|
+
code: a !== null ? 1 : void 0,
|
|
751
746
|
mId: ++this.mId,
|
|
752
|
-
name:
|
|
747
|
+
name: e
|
|
753
748
|
};
|
|
754
749
|
}
|
|
755
750
|
// TODO infer body from header
|
|
756
|
-
buildPayload(
|
|
751
|
+
buildPayload(e, a) {
|
|
757
752
|
return JSON.stringify({
|
|
758
|
-
body:
|
|
759
|
-
header:
|
|
753
|
+
body: a,
|
|
754
|
+
header: e
|
|
760
755
|
});
|
|
761
756
|
}
|
|
762
|
-
getBodyExtras(
|
|
757
|
+
getBodyExtras(e) {
|
|
763
758
|
return {
|
|
764
|
-
action:
|
|
759
|
+
action: e,
|
|
765
760
|
seqId: ++this.seqId
|
|
766
761
|
};
|
|
767
762
|
}
|
|
768
|
-
request(
|
|
769
|
-
const
|
|
770
|
-
return new Promise((
|
|
771
|
-
setTimeout(() => s({ type: "timeout" }),
|
|
763
|
+
request(e, a) {
|
|
764
|
+
const n = this.buildPayload(e, a);
|
|
765
|
+
return new Promise((r, s) => {
|
|
766
|
+
setTimeout(() => s({ type: "timeout" }), y(this, ie));
|
|
772
767
|
const h = (g) => {
|
|
773
|
-
const w =
|
|
768
|
+
const w = Ie(g);
|
|
774
769
|
try {
|
|
775
|
-
|
|
770
|
+
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? r(w) : s({ message: w, type: "error" }));
|
|
776
771
|
} catch {
|
|
777
|
-
s({
|
|
772
|
+
s({ message: w, type: "error" });
|
|
778
773
|
}
|
|
779
774
|
};
|
|
780
|
-
this.addEventListener("message", h), this.send(
|
|
775
|
+
this.addEventListener("message", h), this.send(n);
|
|
781
776
|
});
|
|
782
777
|
}
|
|
783
|
-
activateFreeRound(
|
|
784
|
-
const
|
|
778
|
+
activateFreeRound(e) {
|
|
779
|
+
const a = this.buildHeader("ActivateFreeRound");
|
|
785
780
|
return this.request(
|
|
786
|
-
|
|
787
|
-
|
|
781
|
+
a,
|
|
782
|
+
e
|
|
788
783
|
);
|
|
789
784
|
}
|
|
790
|
-
authenticate(
|
|
791
|
-
const
|
|
785
|
+
authenticate(e = !1) {
|
|
786
|
+
const a = this.buildHeader("Authenticate"), n = {
|
|
792
787
|
clientType: 3,
|
|
793
|
-
version:
|
|
794
|
-
reconnect:
|
|
788
|
+
version: y(this, ve),
|
|
789
|
+
reconnect: e
|
|
795
790
|
};
|
|
796
|
-
return this.request(
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
)
|
|
791
|
+
return this.request(a, n).then((r) => r.body).catch((r) => {
|
|
792
|
+
var s;
|
|
793
|
+
throw { data: (s = r == null ? void 0 : r.message) == null ? void 0 : s.body, type: r.type };
|
|
794
|
+
});
|
|
800
795
|
}
|
|
801
796
|
openGame() {
|
|
802
|
-
const
|
|
797
|
+
const e = this.buildHeader("OpenGame"), a = {
|
|
803
798
|
gameCode: this.gameCode
|
|
804
799
|
};
|
|
805
|
-
return new Promise((
|
|
800
|
+
return new Promise((n, r) => {
|
|
806
801
|
const s = (h) => {
|
|
807
|
-
const g =
|
|
808
|
-
|
|
802
|
+
const g = Ie(h);
|
|
803
|
+
Zt(g) ? (this.removeEventListener("message", s), n(g.body)) : ht(g) && r({ data: g.body, type: "error" });
|
|
809
804
|
};
|
|
810
|
-
this.addEventListener("message", s), this.request(
|
|
811
|
-
|
|
812
|
-
|
|
805
|
+
this.addEventListener("message", s), this.request(e, a).catch(
|
|
806
|
+
(h) => {
|
|
807
|
+
var g;
|
|
808
|
+
return r({ data: (g = h == null ? void 0 : h.message) == null ? void 0 : g.body, type: h.type });
|
|
809
|
+
}
|
|
810
|
+
);
|
|
813
811
|
});
|
|
814
812
|
}
|
|
815
|
-
sendAcknowledgement(
|
|
816
|
-
const { name:
|
|
813
|
+
sendAcknowledgement(e) {
|
|
814
|
+
const { name: a, cId: n } = e.header, r = this.buildHeader(a, n), s = this.buildPayload(r, {});
|
|
817
815
|
this.send(s);
|
|
818
816
|
}
|
|
819
|
-
sendAction(
|
|
820
|
-
const
|
|
821
|
-
...this.getBodyExtras(
|
|
822
|
-
data:
|
|
817
|
+
sendAction(e, a) {
|
|
818
|
+
const n = this.buildHeader("GameAction"), r = {
|
|
819
|
+
...this.getBodyExtras(e),
|
|
820
|
+
data: a
|
|
823
821
|
};
|
|
824
822
|
return new Promise((s, h) => {
|
|
825
823
|
const g = (w) => {
|
|
826
|
-
const
|
|
827
|
-
|
|
824
|
+
const b = Ie(w);
|
|
825
|
+
Be(b) && r.seqId === b.body.correlationSeqId && (this.removeEventListener("message", g), ei(b) ? s(b.body) : ht(b) && h({ data: b.body, type: "error" }));
|
|
828
826
|
};
|
|
829
|
-
this.addEventListener("message", g), this.request(
|
|
830
|
-
(w) =>
|
|
827
|
+
this.addEventListener("message", g), this.request(n, r).catch(
|
|
828
|
+
(w) => {
|
|
829
|
+
var b;
|
|
830
|
+
return h({ data: (b = w == null ? void 0 : w.message) == null ? void 0 : b.body, type: w.type });
|
|
831
|
+
}
|
|
831
832
|
);
|
|
832
833
|
});
|
|
833
834
|
}
|
|
834
|
-
setRequestTimeoutMs(
|
|
835
|
-
|
|
835
|
+
setRequestTimeoutMs(e) {
|
|
836
|
+
v(this, ie, e);
|
|
836
837
|
}
|
|
837
838
|
}
|
|
838
|
-
|
|
839
|
-
function
|
|
839
|
+
ie = new WeakMap(), ve = new WeakMap();
|
|
840
|
+
function ii(i) {
|
|
840
841
|
return i.contract ? {
|
|
841
842
|
contract: {
|
|
842
843
|
balance: {
|
|
@@ -866,125 +867,101 @@ function ni(i) {
|
|
|
866
867
|
};
|
|
867
868
|
}
|
|
868
869
|
function ai(i) {
|
|
869
|
-
|
|
870
|
-
switch (t) {
|
|
871
|
-
case 2:
|
|
872
|
-
return { code: U.DENIED };
|
|
873
|
-
case 3:
|
|
874
|
-
return { code: U.NOT_FOUND };
|
|
875
|
-
case 4:
|
|
876
|
-
return { code: U.ALREADY_LOGGED_IN };
|
|
877
|
-
case 5:
|
|
878
|
-
default:
|
|
879
|
-
return { code: U.ERROR };
|
|
880
|
-
}
|
|
881
|
-
};
|
|
870
|
+
var t, e;
|
|
882
871
|
return {
|
|
883
|
-
|
|
884
|
-
|
|
872
|
+
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
873
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? Re.UNKNOWN,
|
|
874
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
885
875
|
};
|
|
886
876
|
}
|
|
887
|
-
function
|
|
888
|
-
return
|
|
877
|
+
function ni(i, t) {
|
|
878
|
+
return t.contract ? {
|
|
889
879
|
contract: {
|
|
890
880
|
bet: {
|
|
891
|
-
available:
|
|
881
|
+
available: t.contract.availableMultipliersPerBaseBet,
|
|
892
882
|
default: {
|
|
893
|
-
base:
|
|
894
|
-
multiplier:
|
|
883
|
+
base: t.contract.defaultBet.baseBet,
|
|
884
|
+
multiplier: t.contract.defaultBet.betMultiplier
|
|
895
885
|
},
|
|
896
|
-
max:
|
|
897
|
-
last:
|
|
898
|
-
base:
|
|
899
|
-
multiplier:
|
|
886
|
+
max: t.contract.maxBetInCoins,
|
|
887
|
+
last: t.contract.lastBet ? {
|
|
888
|
+
base: t.contract.lastBet.baseBet,
|
|
889
|
+
multiplier: t.contract.lastBet.betMultiplier
|
|
900
890
|
} : null,
|
|
901
|
-
lastPaid:
|
|
902
|
-
base:
|
|
903
|
-
multiplier:
|
|
891
|
+
lastPaid: t.contract.lastMainGameBet ? {
|
|
892
|
+
base: t.contract.lastMainGameBet.baseBet,
|
|
893
|
+
multiplier: t.contract.lastMainGameBet.betMultiplier
|
|
904
894
|
} : null
|
|
905
895
|
},
|
|
906
896
|
balance: {
|
|
907
|
-
coins:
|
|
908
|
-
version:
|
|
897
|
+
coins: t.contract.balanceInCoins,
|
|
898
|
+
version: t.contract.balanceVersion
|
|
909
899
|
},
|
|
910
|
-
gameModel:
|
|
911
|
-
metaData:
|
|
912
|
-
roundId:
|
|
913
|
-
serverTime:
|
|
914
|
-
sessionId:
|
|
900
|
+
gameModel: t.contract.gameModelFile,
|
|
901
|
+
metaData: t.contract.metaData,
|
|
902
|
+
roundId: t.contract.roundId,
|
|
903
|
+
serverTime: t.contract.serverTime,
|
|
904
|
+
sessionId: t.contract.sessionId,
|
|
915
905
|
stateType: {
|
|
916
|
-
thisRound:
|
|
917
|
-
nextRound:
|
|
906
|
+
thisRound: t.contract.stateTypeThisRound,
|
|
907
|
+
nextRound: t.contract.stateTypeNextRound
|
|
918
908
|
},
|
|
919
|
-
uiMessages: i.contract.uiMessages.concat(
|
|
909
|
+
uiMessages: i.contract.uiMessages.concat(t.contract.uiMessages),
|
|
920
910
|
win: {
|
|
921
|
-
round:
|
|
922
|
-
total:
|
|
911
|
+
round: t.contract.roundWin,
|
|
912
|
+
total: t.contract.totalWin
|
|
923
913
|
}
|
|
924
914
|
},
|
|
925
|
-
data:
|
|
915
|
+
data: t.opaqueGameServerToUi
|
|
926
916
|
} : {
|
|
927
917
|
contract: {
|
|
928
918
|
bet: {
|
|
929
|
-
available:
|
|
919
|
+
available: t.data.additionalConfigData.availableMultipliersPerBaseBet,
|
|
930
920
|
default: {
|
|
931
|
-
base:
|
|
932
|
-
multiplier:
|
|
921
|
+
base: t.data.additionalConfigData.defaultBet.baseBet,
|
|
922
|
+
multiplier: t.data.additionalConfigData.defaultBet.betMultiplier
|
|
933
923
|
},
|
|
934
|
-
max:
|
|
935
|
-
last:
|
|
936
|
-
base:
|
|
937
|
-
multiplier:
|
|
924
|
+
max: t.data.additionalConfigData.maxAllowedOverallBetInCoins,
|
|
925
|
+
last: t.data.gameState.betFromCurrentRound ? {
|
|
926
|
+
base: t.data.gameState.betFromCurrentRound.baseBet,
|
|
927
|
+
multiplier: t.data.gameState.betFromCurrentRound.betMultiplier
|
|
938
928
|
} : null,
|
|
939
|
-
lastPaid:
|
|
940
|
-
base:
|
|
941
|
-
multiplier:
|
|
929
|
+
lastPaid: t.data.gameState.lastPlacedMainGameBet ? {
|
|
930
|
+
base: t.data.gameState.lastPlacedMainGameBet.baseBet,
|
|
931
|
+
multiplier: t.data.gameState.lastPlacedMainGameBet.betMultiplier
|
|
942
932
|
} : null
|
|
943
933
|
},
|
|
944
934
|
balance: {
|
|
945
|
-
coins:
|
|
946
|
-
version:
|
|
935
|
+
coins: t.balance,
|
|
936
|
+
version: t.balanceVersion
|
|
947
937
|
},
|
|
948
|
-
gameModel:
|
|
949
|
-
metaData:
|
|
950
|
-
roundId:
|
|
951
|
-
serverTime:
|
|
952
|
-
sessionId:
|
|
938
|
+
gameModel: t.data.additionalConfigData.gameModelFile,
|
|
939
|
+
metaData: t.data.gameConfigData.metaData,
|
|
940
|
+
roundId: t.data.gameState.cycleId,
|
|
941
|
+
serverTime: t.balanceVersion,
|
|
942
|
+
sessionId: t.data.gameState.sessionId,
|
|
953
943
|
stateType: {
|
|
954
|
-
thisRound:
|
|
955
|
-
nextRound:
|
|
944
|
+
thisRound: t.data.gameState.stateTypeThisRound,
|
|
945
|
+
nextRound: t.data.gameState.stateTypeNextRound
|
|
956
946
|
},
|
|
957
947
|
uiMessages: i.uiMessages,
|
|
958
948
|
win: {
|
|
959
|
-
round:
|
|
960
|
-
total:
|
|
949
|
+
round: t.data.gameState.totalWinFromCurrentRound,
|
|
950
|
+
total: t.data.gameState.totalWinFromCurrentGameCycle
|
|
961
951
|
}
|
|
962
952
|
},
|
|
963
|
-
data:
|
|
953
|
+
data: t.data
|
|
964
954
|
};
|
|
965
955
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
968
|
-
switch (t) {
|
|
969
|
-
case 2:
|
|
970
|
-
return { code: U.GAME_UNAVAILABLE };
|
|
971
|
-
case 3:
|
|
972
|
-
return { code: U.BONUS_RESTRICTION };
|
|
973
|
-
case 5:
|
|
974
|
-
return { code: U.TOO_MANY_OPEN_GAMES };
|
|
975
|
-
case 6:
|
|
976
|
-
return { code: U.RECONNECT_DATA_MISMATCH };
|
|
977
|
-
case 4:
|
|
978
|
-
default:
|
|
979
|
-
return { code: U.ERROR };
|
|
980
|
-
}
|
|
981
|
-
};
|
|
956
|
+
function si(i) {
|
|
957
|
+
var t, e;
|
|
982
958
|
return {
|
|
983
|
-
|
|
984
|
-
|
|
959
|
+
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
960
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? Re.UNKNOWN,
|
|
961
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
985
962
|
};
|
|
986
963
|
}
|
|
987
|
-
function
|
|
964
|
+
function oi(i) {
|
|
988
965
|
return i.contract ? {
|
|
989
966
|
contract: {
|
|
990
967
|
bet: {
|
|
@@ -1045,32 +1022,15 @@ function ri(i) {
|
|
|
1045
1022
|
data: i.data
|
|
1046
1023
|
};
|
|
1047
1024
|
}
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1050
|
-
switch (t) {
|
|
1051
|
-
case "GAMING_LIMITS_REACHED":
|
|
1052
|
-
return { code: W.GAMING_LIMITS_REACHED };
|
|
1053
|
-
case "INVALID_CURRENCY":
|
|
1054
|
-
return { code: W.INVALID_CURRENCY };
|
|
1055
|
-
case "INVALID_SESSION":
|
|
1056
|
-
return { code: W.INVALID_SESSION };
|
|
1057
|
-
case "OUT_OF_MONEY":
|
|
1058
|
-
return { code: W.OUT_OF_MONEY };
|
|
1059
|
-
case "UNFINISHED_ROUND_IN_PROGRESS":
|
|
1060
|
-
return { code: W.UNFINISHED_ROUND_IN_PROGRESS };
|
|
1061
|
-
case "WALLET_ERROR":
|
|
1062
|
-
return { code: W.WALLET_ERROR };
|
|
1063
|
-
case "ERROR":
|
|
1064
|
-
default:
|
|
1065
|
-
return { code: W.ERROR };
|
|
1066
|
-
}
|
|
1067
|
-
};
|
|
1025
|
+
function ri(i) {
|
|
1026
|
+
var t, e;
|
|
1068
1027
|
return {
|
|
1069
|
-
|
|
1070
|
-
|
|
1028
|
+
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
1029
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? Re.UNKNOWN,
|
|
1030
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
1071
1031
|
};
|
|
1072
1032
|
}
|
|
1073
|
-
const
|
|
1033
|
+
const ci = {
|
|
1074
1034
|
bul: "bg",
|
|
1075
1035
|
chi: "zh",
|
|
1076
1036
|
zho: "zh",
|
|
@@ -1102,74 +1062,74 @@ const di = {
|
|
|
1102
1062
|
tur: "tr",
|
|
1103
1063
|
ukr: "uk",
|
|
1104
1064
|
vie: "vi"
|
|
1105
|
-
},
|
|
1106
|
-
var
|
|
1107
|
-
class qi extends
|
|
1108
|
-
constructor(...
|
|
1109
|
-
super(...
|
|
1065
|
+
}, di = U("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
1066
|
+
var Ee;
|
|
1067
|
+
class qi extends Kt {
|
|
1068
|
+
constructor(...e) {
|
|
1069
|
+
super(...e);
|
|
1110
1070
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1111
1071
|
// @ts-ignore
|
|
1112
|
-
|
|
1113
|
-
|
|
1072
|
+
p(this, "socket");
|
|
1073
|
+
E(this, Ee, "");
|
|
1114
1074
|
this.on("openGame", async () => {
|
|
1115
1075
|
try {
|
|
1116
|
-
const
|
|
1117
|
-
this.send("openGameResponse",
|
|
1118
|
-
} catch (
|
|
1119
|
-
this.send("openGameError",
|
|
1076
|
+
const a = await this.openGame();
|
|
1077
|
+
this.send("openGameResponse", a);
|
|
1078
|
+
} catch (a) {
|
|
1079
|
+
this.send("openGameError", a);
|
|
1120
1080
|
}
|
|
1121
|
-
}), this.on("play", async (
|
|
1081
|
+
}), this.on("play", async (a) => {
|
|
1122
1082
|
try {
|
|
1123
|
-
const
|
|
1124
|
-
this.send("playResponse",
|
|
1125
|
-
} catch (
|
|
1126
|
-
this.send("playError",
|
|
1083
|
+
const n = await this.play(a);
|
|
1084
|
+
this.send("playResponse", n);
|
|
1085
|
+
} catch (n) {
|
|
1086
|
+
this.send("playError", n);
|
|
1127
1087
|
}
|
|
1128
|
-
}), this.on("state", ({ version:
|
|
1129
|
-
|
|
1130
|
-
}), this.on("configured", (
|
|
1131
|
-
this.socket.setRequestTimeoutMs(
|
|
1088
|
+
}), this.on("state", ({ version: a }) => {
|
|
1089
|
+
v(this, Ee, a);
|
|
1090
|
+
}), this.on("configured", (a) => {
|
|
1091
|
+
this.socket.setRequestTimeoutMs(a.ui.requestTimeoutMs);
|
|
1132
1092
|
}), this.registerFromSdkEvents();
|
|
1133
1093
|
}
|
|
1134
|
-
initialize(
|
|
1135
|
-
this.socket = new
|
|
1136
|
-
gameVersion:
|
|
1094
|
+
initialize(e) {
|
|
1095
|
+
this.socket = new ti(e, {
|
|
1096
|
+
gameVersion: y(this, Ee),
|
|
1137
1097
|
requestTimeoutMs: this.config.ui.requestTimeoutMs
|
|
1138
|
-
}), this.socket.addEventListener("close", (
|
|
1139
|
-
|
|
1098
|
+
}), this.socket.addEventListener("close", (a) => {
|
|
1099
|
+
a.code === 1006 && this.reconnect(e);
|
|
1140
1100
|
}), document.addEventListener("visibilitychange", () => {
|
|
1141
|
-
document.visibilityState === "visible" && this.socket.socket && this.socket.socket.readyState !== WebSocket.OPEN && this.reconnect(
|
|
1142
|
-
}), this.socket.addEventListener("error", (
|
|
1143
|
-
this.send("realityCheck",
|
|
1101
|
+
document.visibilityState === "visible" && this.socket.socket && this.socket.socket.readyState !== WebSocket.OPEN && this.reconnect(e);
|
|
1102
|
+
}), this.socket.addEventListener("error", (a) => di("error", a)), this.socket.addEventListener("realityCheck", (a) => {
|
|
1103
|
+
this.send("realityCheck", a);
|
|
1144
1104
|
});
|
|
1145
1105
|
}
|
|
1146
|
-
async reconnect(
|
|
1147
|
-
this.initialize(
|
|
1106
|
+
async reconnect(e) {
|
|
1107
|
+
this.initialize(e), await this.socket.connect(), await this.socket.authenticate(!0), await this.socket.openGame();
|
|
1148
1108
|
}
|
|
1149
1109
|
async openGame() {
|
|
1150
|
-
const
|
|
1151
|
-
this.initialize({ apiUrl:
|
|
1110
|
+
const e = new URLSearchParams(window.location.search), a = e.get("apiUrl"), n = e.get("cageCode"), r = e.get("gameCode"), s = e.get("operatorCode"), h = e.get("playMode"), g = e.get("token"), w = e.get("username"), b = e.get("gameHistoryUrl"), A = e.get("homeUrl") ?? void 0, R = e.get("cashierUrl") ?? void 0;
|
|
1111
|
+
this.initialize({ apiUrl: a, cageCode: n, gameCode: r, operatorCode: s, playMode: h, token: g, username: w });
|
|
1152
1112
|
try {
|
|
1153
1113
|
await this.socket.connect();
|
|
1154
1114
|
} catch {
|
|
1155
|
-
throw { type: "error", data: { code:
|
|
1115
|
+
throw { type: "error", data: { code: Re.CONNECTION_ERROR } };
|
|
1156
1116
|
}
|
|
1157
|
-
let
|
|
1117
|
+
let Q;
|
|
1158
1118
|
try {
|
|
1159
|
-
|
|
1160
|
-
} catch (
|
|
1161
|
-
throw ai(
|
|
1119
|
+
Q = await this.socket.authenticate();
|
|
1120
|
+
} catch (B) {
|
|
1121
|
+
throw { type: B.type, data: B.type === "error" ? ai(B.data) : void 0 };
|
|
1162
1122
|
}
|
|
1163
|
-
let
|
|
1123
|
+
let X;
|
|
1164
1124
|
try {
|
|
1165
|
-
|
|
1166
|
-
} catch (
|
|
1167
|
-
throw
|
|
1125
|
+
X = await this.socket.openGame();
|
|
1126
|
+
} catch (B) {
|
|
1127
|
+
throw { type: B.type, data: B.type === "error" ? si(B.data) : void 0 };
|
|
1168
1128
|
}
|
|
1169
|
-
const L =
|
|
1129
|
+
const L = ii(Q), he = ni(Q, X);
|
|
1170
1130
|
this.config.api = {
|
|
1171
|
-
brand:
|
|
1172
|
-
game:
|
|
1131
|
+
brand: n,
|
|
1132
|
+
game: r,
|
|
1173
1133
|
integration: s,
|
|
1174
1134
|
jurisdiction: L.contract.jurisdiction,
|
|
1175
1135
|
playMode: h,
|
|
@@ -1180,114 +1140,114 @@ class qi extends Yt {
|
|
|
1180
1140
|
country: L.contract.country,
|
|
1181
1141
|
currency: L.contract.currency,
|
|
1182
1142
|
coinValueInCents: L.contract.coinValueInCents,
|
|
1183
|
-
gameHistoryUrl:
|
|
1143
|
+
gameHistoryUrl: b,
|
|
1184
1144
|
homeUrl: A,
|
|
1185
|
-
cashierUrl:
|
|
1186
|
-
sessionId:
|
|
1187
|
-
lastRoundId:
|
|
1145
|
+
cashierUrl: R,
|
|
1146
|
+
sessionId: he.contract.sessionId,
|
|
1147
|
+
lastRoundId: he.contract.roundId
|
|
1188
1148
|
};
|
|
1189
|
-
const
|
|
1190
|
-
return
|
|
1149
|
+
const x = e.get("languageCode");
|
|
1150
|
+
return x && (this.config.ui.language = x.length === 3 ? ci[x] ?? x : x), he;
|
|
1191
1151
|
}
|
|
1192
|
-
async play(
|
|
1152
|
+
async play(e) {
|
|
1193
1153
|
const {
|
|
1194
|
-
contract: { bet:
|
|
1154
|
+
contract: { bet: a, forcedOutcomes: n, ...r },
|
|
1195
1155
|
extra: s,
|
|
1196
1156
|
actionType: h
|
|
1197
|
-
} =
|
|
1198
|
-
bet:
|
|
1199
|
-
|
|
1157
|
+
} = e, g = {
|
|
1158
|
+
bet: a ? { baseBet: a.base, betMultiplier: a.multiplier } : void 0,
|
|
1159
|
+
forcedOutcomes: n,
|
|
1200
1160
|
// TODO: get rid of contractRest - it' a legacy from old RGS
|
|
1201
|
-
...
|
|
1161
|
+
...r,
|
|
1202
1162
|
opaqueUiToGameServer: s
|
|
1203
1163
|
};
|
|
1204
1164
|
let w;
|
|
1205
1165
|
try {
|
|
1206
1166
|
w = await this.socket.sendAction(h, g);
|
|
1207
|
-
} catch (
|
|
1208
|
-
throw
|
|
1167
|
+
} catch (b) {
|
|
1168
|
+
throw { type: b.type, data: b.type === "error" ? ri(b.data) : void 0 };
|
|
1209
1169
|
}
|
|
1210
|
-
return
|
|
1170
|
+
return oi(w);
|
|
1211
1171
|
}
|
|
1212
1172
|
registerFromSdkEvents() {
|
|
1213
1173
|
this.on("history", () => {
|
|
1214
1174
|
const {
|
|
1215
|
-
api: { game:
|
|
1175
|
+
api: { game: e, integration: a, integrationData: n, jurisdiction: r, user: s, gameHistoryUrl: h },
|
|
1216
1176
|
ui: { language: g }
|
|
1217
|
-
} = this.config, w = s.replace(/^user_/, "").replace(new RegExp(`_${
|
|
1218
|
-
|
|
1177
|
+
} = this.config, w = s.replace(/^user_/, "").replace(new RegExp(`_${a}$`), ""), b = new URL(h);
|
|
1178
|
+
b.searchParams.set("gameCode", e), b.searchParams.set("jurisdiction", r), b.searchParams.set("operatorCode", a), b.searchParams.set("token", n.token), b.searchParams.set("username", w), b.searchParams.set("languageCode", g), window.open(b.toString(), "_blank");
|
|
1219
1179
|
});
|
|
1220
1180
|
}
|
|
1221
1181
|
}
|
|
1222
|
-
|
|
1223
|
-
var
|
|
1224
|
-
var
|
|
1225
|
-
for (var
|
|
1226
|
-
|
|
1227
|
-
return t;
|
|
1228
|
-
}, ze = function(i) {
|
|
1229
|
-
for (var e = {}, t = 0; t < i.length; t++)
|
|
1230
|
-
e[i[t].toUpperCase()] = i[t];
|
|
1182
|
+
Ee = new WeakMap();
|
|
1183
|
+
var li = "2.0.0-beta.2", de = "", gt = "?", Ze = "function", z = "undefined", le = "object", et = "string", fe = "major", d = "model", o = "name", l = "type", u = "vendor", c = "version", S = "architecture", Z = "console", m = "mobile", f = "tablet", C = "smarttv", Y = "wearable", tt = "embedded", wt = "user-agent", it = 500, st = "brands", W = "formFactor", ot = "fullVersionList", ee = "platform", rt = "platformVersion", He = "bitness", G = "sec-ch-ua", ui = G + "-full-version-list", hi = G + "-arch", gi = G + "-" + He, wi = G + "-form-factor", bi = G + "-" + m, pi = G + "-" + d, Dt = G + "-" + ee, mi = Dt + "-version", Nt = [st, ot, m, d, ee, rt, S, W, He], T = "browser", _ = "cpu", O = "device", F = "engine", P = "os", te = "result", Ce = "Amazon", we = "Apple", bt = "ASUS", pt = "BlackBerry", Te = "Google", mt = "Huawei", ft = "Lenovo", je = "LG", Le = "Microsoft", yt = "Motorola", Ae = "Samsung", vt = "Sharp", Pe = "Sony", Qe = "Xiaomi", Xe = "Zebra", K = "Mobile ", J = " Browser", xe = "Chrome", fi = "Edge", be = "Firefox", pe = "Opera", Et = "Facebook", kt = "Sogou", at = "Windows", yi = typeof window !== z, I = yi && window.navigator ? window.navigator : void 0, H = I && I.userAgentData ? I.userAgentData : void 0, vi = function(i, t) {
|
|
1184
|
+
var e = {};
|
|
1185
|
+
for (var a in i)
|
|
1186
|
+
e[a] = t[a] && t[a].length % 2 === 0 ? t[a].concat(i[a]) : i[a];
|
|
1231
1187
|
return e;
|
|
1232
|
-
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1188
|
+
}, Ve = function(i) {
|
|
1189
|
+
for (var t = {}, e = 0; e < i.length; e++)
|
|
1190
|
+
t[i[e].toUpperCase()] = i[e];
|
|
1191
|
+
return t;
|
|
1192
|
+
}, nt = function(i, t) {
|
|
1193
|
+
if (typeof i === le && i.length > 0) {
|
|
1194
|
+
for (var e in i)
|
|
1195
|
+
if (q(i[e]) == q(t))
|
|
1236
1196
|
return !0;
|
|
1237
1197
|
return !1;
|
|
1238
1198
|
}
|
|
1239
|
-
return
|
|
1199
|
+
return ue(i) ? q(t).indexOf(q(i)) !== -1 : !1;
|
|
1240
1200
|
}, Mt = function(i) {
|
|
1241
|
-
for (var
|
|
1242
|
-
return /^(browser|cpu|device|engine|os)$/.test(
|
|
1243
|
-
},
|
|
1244
|
-
return typeof i ===
|
|
1201
|
+
for (var t in i)
|
|
1202
|
+
return /^(browser|cpu|device|engine|os)$/.test(t);
|
|
1203
|
+
}, ue = function(i) {
|
|
1204
|
+
return typeof i === et;
|
|
1245
1205
|
}, Ke = function(i) {
|
|
1246
1206
|
if (i) {
|
|
1247
|
-
for (var
|
|
1248
|
-
if (
|
|
1249
|
-
var
|
|
1250
|
-
|
|
1207
|
+
for (var t = [], e = $(/\\?\"/g, i).split(","), a = 0; a < e.length; a++)
|
|
1208
|
+
if (e[a].indexOf(";") > -1) {
|
|
1209
|
+
var n = ye(e[a]).split(";v=");
|
|
1210
|
+
t[a] = { brand: n[0], version: n[1] };
|
|
1251
1211
|
} else
|
|
1252
|
-
|
|
1253
|
-
return
|
|
1212
|
+
t[a] = ye(e[a]);
|
|
1213
|
+
return t;
|
|
1254
1214
|
}
|
|
1255
|
-
},
|
|
1256
|
-
return
|
|
1215
|
+
}, q = function(i) {
|
|
1216
|
+
return ue(i) ? i.toLowerCase() : i;
|
|
1257
1217
|
}, Je = function(i) {
|
|
1258
|
-
return
|
|
1259
|
-
},
|
|
1260
|
-
for (var
|
|
1261
|
-
var
|
|
1262
|
-
typeof
|
|
1218
|
+
return ue(i) ? $(/[^\d\.]/g, i).split(".")[0] : void 0;
|
|
1219
|
+
}, D = function(i) {
|
|
1220
|
+
for (var t in i) {
|
|
1221
|
+
var e = i[t];
|
|
1222
|
+
typeof e == le && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
|
|
1263
1223
|
}
|
|
1264
1224
|
return this;
|
|
1265
|
-
},
|
|
1266
|
-
return
|
|
1267
|
-
},
|
|
1268
|
-
return
|
|
1269
|
-
},
|
|
1270
|
-
if (
|
|
1271
|
-
return i =
|
|
1272
|
-
},
|
|
1273
|
-
if (!(!i || !
|
|
1274
|
-
for (var
|
|
1275
|
-
var w = e
|
|
1276
|
-
for (
|
|
1277
|
-
if (h = w[
|
|
1278
|
-
for (
|
|
1279
|
-
g = h[++
|
|
1280
|
-
|
|
1225
|
+
}, $ = function(i, t) {
|
|
1226
|
+
return ue(t) ? t.replace(i, de) : t;
|
|
1227
|
+
}, me = function(i) {
|
|
1228
|
+
return $(/\\?\"/g, i);
|
|
1229
|
+
}, ye = function(i, t) {
|
|
1230
|
+
if (ue(i))
|
|
1231
|
+
return i = $(/^\s\s*/, i), typeof t === z ? i : i.substring(0, it);
|
|
1232
|
+
}, St = function(i, t) {
|
|
1233
|
+
if (!(!i || !t))
|
|
1234
|
+
for (var e = 0, a, n, r, s, h, g; e < t.length && !h; ) {
|
|
1235
|
+
var w = t[e], b = t[e + 1];
|
|
1236
|
+
for (a = n = 0; a < w.length && !h && w[a]; )
|
|
1237
|
+
if (h = w[a++].exec(i), h)
|
|
1238
|
+
for (r = 0; r < b.length; r++)
|
|
1239
|
+
g = h[++n], s = b[r], typeof s === le && s.length > 0 ? s.length === 2 ? typeof s[1] == Ze ? this[s[0]] = s[1].call(this, g) : this[s[0]] = s[1] : s.length === 3 ? typeof s[1] === Ze && !(s[1].exec && s[1].test) ? this[s[0]] = g ? s[1].call(this, g, s[2]) : void 0 : this[s[0]] = g ? g.replace(s[1], s[2]) : void 0 : s.length === 4 && (this[s[0]] = g ? s[3].call(this, g.replace(s[1], s[2])) : void 0) : this[s] = g || void 0;
|
|
1240
|
+
e += 2;
|
|
1281
1241
|
}
|
|
1282
|
-
},
|
|
1283
|
-
for (var
|
|
1284
|
-
if (typeof e
|
|
1285
|
-
for (var
|
|
1286
|
-
if (
|
|
1287
|
-
return
|
|
1288
|
-
} else if (
|
|
1289
|
-
return
|
|
1290
|
-
return
|
|
1242
|
+
}, _e = function(i, t) {
|
|
1243
|
+
for (var e in t)
|
|
1244
|
+
if (typeof t[e] === le && t[e].length > 0) {
|
|
1245
|
+
for (var a = 0; a < t[e].length; a++)
|
|
1246
|
+
if (nt(t[e][a], i))
|
|
1247
|
+
return e === gt ? void 0 : e;
|
|
1248
|
+
} else if (nt(t[e], i))
|
|
1249
|
+
return e === gt ? void 0 : e;
|
|
1250
|
+
return t.hasOwnProperty("*") ? t["*"] : i;
|
|
1291
1251
|
}, It = {
|
|
1292
1252
|
ME: "4.90",
|
|
1293
1253
|
"NT 3.11": "NT3.51",
|
|
@@ -1300,7 +1260,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1300
1260
|
"8.1": "NT 6.3",
|
|
1301
1261
|
10: ["NT 6.4", "NT 10.0"],
|
|
1302
1262
|
RT: "ARM"
|
|
1303
|
-
},
|
|
1263
|
+
}, Ct = {
|
|
1304
1264
|
embedded: "Automotive",
|
|
1305
1265
|
mobile: "Mobile",
|
|
1306
1266
|
tablet: ["Tablet", "EInk"],
|
|
@@ -1308,19 +1268,19 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1308
1268
|
wearable: ["VR", "XR", "Watch"],
|
|
1309
1269
|
"?": ["Desktop", "Unknown"],
|
|
1310
1270
|
"*": void 0
|
|
1311
|
-
},
|
|
1271
|
+
}, Tt = {
|
|
1312
1272
|
browser: [
|
|
1313
1273
|
[
|
|
1314
1274
|
// Most common regardless engine
|
|
1315
1275
|
/\b(?:crmo|crios)\/([\w\.]+)/i
|
|
1316
1276
|
// Chrome for Android/iOS
|
|
1317
1277
|
],
|
|
1318
|
-
[
|
|
1278
|
+
[c, [o, K + "Chrome"]],
|
|
1319
1279
|
[
|
|
1320
1280
|
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
|
1321
1281
|
// Microsoft Edge
|
|
1322
1282
|
],
|
|
1323
|
-
[
|
|
1283
|
+
[c, [o, "Edge"]],
|
|
1324
1284
|
[
|
|
1325
1285
|
// Presto based
|
|
1326
1286
|
/(opera mini)\/([-\w\.]+)/i,
|
|
@@ -1330,28 +1290,28 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1330
1290
|
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
|
1331
1291
|
// Opera
|
|
1332
1292
|
],
|
|
1333
|
-
[o,
|
|
1293
|
+
[o, c],
|
|
1334
1294
|
[
|
|
1335
1295
|
/opios[\/ ]+([\w\.]+)/i
|
|
1336
1296
|
// Opera mini on iphone >= 8.0
|
|
1337
1297
|
],
|
|
1338
|
-
[
|
|
1298
|
+
[c, [o, pe + " Mini"]],
|
|
1339
1299
|
[
|
|
1340
1300
|
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
1341
1301
|
// Opera GX
|
|
1342
1302
|
],
|
|
1343
|
-
[
|
|
1303
|
+
[c, [o, pe + " GX"]],
|
|
1344
1304
|
[
|
|
1345
1305
|
/\bopr\/([\w\.]+)/i
|
|
1346
1306
|
// Opera Webkit
|
|
1347
1307
|
],
|
|
1348
|
-
[
|
|
1308
|
+
[c, [o, pe]],
|
|
1349
1309
|
[
|
|
1350
1310
|
// Mixed
|
|
1351
1311
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
1352
1312
|
// Baidu
|
|
1353
1313
|
],
|
|
1354
|
-
[
|
|
1314
|
+
[c, [o, "Baidu"]],
|
|
1355
1315
|
[
|
|
1356
1316
|
/(kindle)\/([\w\.]+)/i,
|
|
1357
1317
|
// Kindle
|
|
@@ -1370,12 +1330,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1370
1330
|
/(weibo)__([\d\.]+)/i
|
|
1371
1331
|
// Weibo
|
|
1372
1332
|
],
|
|
1373
|
-
[o,
|
|
1333
|
+
[o, c],
|
|
1374
1334
|
[
|
|
1375
1335
|
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
|
|
1376
1336
|
// UCBrowser
|
|
1377
1337
|
],
|
|
1378
|
-
[
|
|
1338
|
+
[c, [o, "UCBrowser"]],
|
|
1379
1339
|
[
|
|
1380
1340
|
/microm.+\bqbcore\/([\w\.]+)/i,
|
|
1381
1341
|
// WeChat Desktop for Windows Built-in Browser
|
|
@@ -1383,67 +1343,67 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1383
1343
|
/micromessenger\/([\w\.]+)/i
|
|
1384
1344
|
// WeChat
|
|
1385
1345
|
],
|
|
1386
|
-
[
|
|
1346
|
+
[c, [o, "WeChat"]],
|
|
1387
1347
|
[
|
|
1388
1348
|
/konqueror\/([\w\.]+)/i
|
|
1389
1349
|
// Konqueror
|
|
1390
1350
|
],
|
|
1391
|
-
[
|
|
1351
|
+
[c, [o, "Konqueror"]],
|
|
1392
1352
|
[
|
|
1393
1353
|
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
|
|
1394
1354
|
// IE11
|
|
1395
1355
|
],
|
|
1396
|
-
[
|
|
1356
|
+
[c, [o, "IE"]],
|
|
1397
1357
|
[
|
|
1398
1358
|
/ya(?:search)?browser\/([\w\.]+)/i
|
|
1399
1359
|
// Yandex
|
|
1400
1360
|
],
|
|
1401
|
-
[
|
|
1361
|
+
[c, [o, "Yandex"]],
|
|
1402
1362
|
[
|
|
1403
1363
|
/slbrowser\/([\w\.]+)/i
|
|
1404
1364
|
// Smart Lenovo Browser
|
|
1405
1365
|
],
|
|
1406
|
-
[
|
|
1366
|
+
[c, [o, "Smart " + ft + J]],
|
|
1407
1367
|
[
|
|
1408
1368
|
/(avast|avg)\/([\w\.]+)/i
|
|
1409
1369
|
// Avast/AVG Secure Browser
|
|
1410
1370
|
],
|
|
1411
|
-
[[o, /(.+)/, "$1 Secure" + J],
|
|
1371
|
+
[[o, /(.+)/, "$1 Secure" + J], c],
|
|
1412
1372
|
[
|
|
1413
1373
|
/\bfocus\/([\w\.]+)/i
|
|
1414
1374
|
// Firefox Focus
|
|
1415
1375
|
],
|
|
1416
|
-
[
|
|
1376
|
+
[c, [o, be + " Focus"]],
|
|
1417
1377
|
[
|
|
1418
1378
|
/\bopt\/([\w\.]+)/i
|
|
1419
1379
|
// Opera Touch
|
|
1420
1380
|
],
|
|
1421
|
-
[
|
|
1381
|
+
[c, [o, pe + " Touch"]],
|
|
1422
1382
|
[
|
|
1423
1383
|
/coc_coc\w+\/([\w\.]+)/i
|
|
1424
1384
|
// Coc Coc Browser
|
|
1425
1385
|
],
|
|
1426
|
-
[
|
|
1386
|
+
[c, [o, "Coc Coc"]],
|
|
1427
1387
|
[
|
|
1428
1388
|
/dolfin\/([\w\.]+)/i
|
|
1429
1389
|
// Dolphin
|
|
1430
1390
|
],
|
|
1431
|
-
[
|
|
1391
|
+
[c, [o, "Dolphin"]],
|
|
1432
1392
|
[
|
|
1433
1393
|
/coast\/([\w\.]+)/i
|
|
1434
1394
|
// Opera Coast
|
|
1435
1395
|
],
|
|
1436
|
-
[
|
|
1396
|
+
[c, [o, pe + " Coast"]],
|
|
1437
1397
|
[
|
|
1438
1398
|
/miuibrowser\/([\w\.]+)/i
|
|
1439
1399
|
// MIUI Browser
|
|
1440
1400
|
],
|
|
1441
|
-
[
|
|
1401
|
+
[c, [o, "MIUI" + J]],
|
|
1442
1402
|
[
|
|
1443
1403
|
/fxios\/([\w\.-]+)/i
|
|
1444
1404
|
// Firefox for iOS
|
|
1445
1405
|
],
|
|
1446
|
-
[
|
|
1406
|
+
[c, [o, K + be]],
|
|
1447
1407
|
[
|
|
1448
1408
|
/\bqihu|(qi?ho?o?|360)browser/i
|
|
1449
1409
|
// 360
|
|
@@ -1452,28 +1412,28 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1452
1412
|
[
|
|
1453
1413
|
/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i
|
|
1454
1414
|
],
|
|
1455
|
-
[[o, /(.+)/, "$1" + J],
|
|
1415
|
+
[[o, /(.+)/, "$1" + J], c],
|
|
1456
1416
|
[
|
|
1457
1417
|
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser
|
|
1458
1418
|
/samsungbrowser\/([\w\.]+)/i
|
|
1459
1419
|
// Samsung Internet
|
|
1460
1420
|
],
|
|
1461
|
-
[
|
|
1421
|
+
[c, [o, Ae + " Internet"]],
|
|
1462
1422
|
[
|
|
1463
1423
|
/(comodo_dragon)\/([\w\.]+)/i
|
|
1464
1424
|
// Comodo Dragon
|
|
1465
1425
|
],
|
|
1466
|
-
[[o, /_/g, " "],
|
|
1426
|
+
[[o, /_/g, " "], c],
|
|
1467
1427
|
[
|
|
1468
1428
|
/metasr[\/ ]?([\d\.]+)/i
|
|
1469
1429
|
// Sogou Explorer
|
|
1470
1430
|
],
|
|
1471
|
-
[
|
|
1431
|
+
[c, [o, kt + " Explorer"]],
|
|
1472
1432
|
[
|
|
1473
1433
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
1474
1434
|
// Sogou Mobile
|
|
1475
1435
|
],
|
|
1476
|
-
[[o,
|
|
1436
|
+
[[o, kt + " Mobile"], c],
|
|
1477
1437
|
[
|
|
1478
1438
|
/(electron)\/([\w\.]+) safari/i,
|
|
1479
1439
|
// Electron-based App
|
|
@@ -1482,7 +1442,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1482
1442
|
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
|
|
1483
1443
|
// QQBrowser/2345 Browser
|
|
1484
1444
|
],
|
|
1485
|
-
[o,
|
|
1445
|
+
[o, c],
|
|
1486
1446
|
[
|
|
1487
1447
|
/(lbbrowser)/i,
|
|
1488
1448
|
// LieBao Browser
|
|
@@ -1495,7 +1455,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1495
1455
|
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
1496
1456
|
// Facebook App for iOS & Android
|
|
1497
1457
|
],
|
|
1498
|
-
[[o,
|
|
1458
|
+
[[o, Et], c],
|
|
1499
1459
|
[
|
|
1500
1460
|
/(Klarna)\/([\w\.]+)/i,
|
|
1501
1461
|
// Klarna Shopping Browser for iOS & Android
|
|
@@ -1512,47 +1472,47 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1512
1472
|
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
|
|
1513
1473
|
// Chromium/Instagram/Snapchat
|
|
1514
1474
|
],
|
|
1515
|
-
[o,
|
|
1475
|
+
[o, c],
|
|
1516
1476
|
[
|
|
1517
1477
|
/\bgsa\/([\w\.]+) .*safari\//i
|
|
1518
1478
|
// Google Search Appliance on iOS
|
|
1519
1479
|
],
|
|
1520
|
-
[
|
|
1480
|
+
[c, [o, "GSA"]],
|
|
1521
1481
|
[
|
|
1522
1482
|
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
|
1523
1483
|
// TikTok
|
|
1524
1484
|
],
|
|
1525
|
-
[
|
|
1485
|
+
[c, [o, "TikTok"]],
|
|
1526
1486
|
[
|
|
1527
1487
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
1528
1488
|
// Chrome Headless
|
|
1529
1489
|
],
|
|
1530
|
-
[
|
|
1490
|
+
[c, [o, xe + " Headless"]],
|
|
1531
1491
|
[
|
|
1532
1492
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
1533
1493
|
// Chrome WebView
|
|
1534
1494
|
],
|
|
1535
|
-
[[o, xe + " WebView"],
|
|
1495
|
+
[[o, xe + " WebView"], c],
|
|
1536
1496
|
[
|
|
1537
1497
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
1538
1498
|
// Android Browser
|
|
1539
1499
|
],
|
|
1540
|
-
[
|
|
1500
|
+
[c, [o, "Android" + J]],
|
|
1541
1501
|
[
|
|
1542
1502
|
/chrome\/([\w\.]+) mobile/i
|
|
1543
1503
|
// Chrome Mobile
|
|
1544
1504
|
],
|
|
1545
|
-
[
|
|
1505
|
+
[c, [o, K + "Chrome"]],
|
|
1546
1506
|
[
|
|
1547
1507
|
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
|
1548
1508
|
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
|
1549
1509
|
],
|
|
1550
|
-
[o,
|
|
1510
|
+
[o, c],
|
|
1551
1511
|
[
|
|
1552
1512
|
/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
|
|
1553
1513
|
// Safari Mobile
|
|
1554
1514
|
],
|
|
1555
|
-
[
|
|
1515
|
+
[c, [o, K + "Safari"]],
|
|
1556
1516
|
[
|
|
1557
1517
|
/iphone .*mobile(?:\/\w+ | ?)safari/i
|
|
1558
1518
|
],
|
|
@@ -1561,32 +1521,32 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1561
1521
|
/version\/([\w\.\,]+) .*(safari)/i
|
|
1562
1522
|
// Safari
|
|
1563
1523
|
],
|
|
1564
|
-
[
|
|
1524
|
+
[c, o],
|
|
1565
1525
|
[
|
|
1566
1526
|
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
|
|
1567
1527
|
// Safari < 3.0
|
|
1568
1528
|
],
|
|
1569
|
-
[o, [
|
|
1529
|
+
[o, [c, "1"]],
|
|
1570
1530
|
[
|
|
1571
1531
|
/(webkit|khtml)\/([\w\.]+)/i
|
|
1572
1532
|
],
|
|
1573
|
-
[o,
|
|
1533
|
+
[o, c],
|
|
1574
1534
|
[
|
|
1575
1535
|
// Gecko based
|
|
1576
1536
|
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
|
|
1577
1537
|
// Firefox Mobile
|
|
1578
1538
|
],
|
|
1579
|
-
[[o, K +
|
|
1539
|
+
[[o, K + be], c],
|
|
1580
1540
|
[
|
|
1581
1541
|
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
1582
1542
|
// Netscape
|
|
1583
1543
|
],
|
|
1584
|
-
[[o, "Netscape"],
|
|
1544
|
+
[[o, "Netscape"], c],
|
|
1585
1545
|
[
|
|
1586
1546
|
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
|
1587
1547
|
// Firefox Reality
|
|
1588
1548
|
],
|
|
1589
|
-
[
|
|
1549
|
+
[c, [o, be + " Reality"]],
|
|
1590
1550
|
[
|
|
1591
1551
|
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1592
1552
|
// Flow
|
|
@@ -1608,56 +1568,56 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1608
1568
|
/panasonic;(viera)/i
|
|
1609
1569
|
// Panasonic Viera
|
|
1610
1570
|
],
|
|
1611
|
-
[o,
|
|
1571
|
+
[o, c],
|
|
1612
1572
|
[
|
|
1613
1573
|
/(cobalt)\/([\w\.]+)/i
|
|
1614
1574
|
// Cobalt
|
|
1615
1575
|
],
|
|
1616
|
-
[o, [
|
|
1576
|
+
[o, [c, /[^\d\.]+./, de]]
|
|
1617
1577
|
],
|
|
1618
1578
|
cpu: [
|
|
1619
1579
|
[
|
|
1620
1580
|
/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i
|
|
1621
1581
|
// AMD64 (x64)
|
|
1622
1582
|
],
|
|
1623
|
-
[[
|
|
1583
|
+
[[S, "amd64"]],
|
|
1624
1584
|
[
|
|
1625
1585
|
/(ia32(?=;))/i,
|
|
1626
1586
|
// IA32 (quicktime)
|
|
1627
1587
|
/((?:i[346]|x)86)[;\)]/i
|
|
1628
1588
|
// IA32 (x86)
|
|
1629
1589
|
],
|
|
1630
|
-
[[
|
|
1590
|
+
[[S, "ia32"]],
|
|
1631
1591
|
[
|
|
1632
1592
|
/\b(aarch64|arm(v?8e?l?|_?64))\b/i
|
|
1633
1593
|
// ARM64
|
|
1634
1594
|
],
|
|
1635
|
-
[[
|
|
1595
|
+
[[S, "arm64"]],
|
|
1636
1596
|
[
|
|
1637
1597
|
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
|
|
1638
1598
|
// ARMHF
|
|
1639
1599
|
],
|
|
1640
|
-
[[
|
|
1600
|
+
[[S, "armhf"]],
|
|
1641
1601
|
[
|
|
1642
1602
|
// PocketPC mistakenly identified as PowerPC
|
|
1643
1603
|
/windows (ce|mobile); ppc;/i
|
|
1644
1604
|
],
|
|
1645
|
-
[[
|
|
1605
|
+
[[S, "arm"]],
|
|
1646
1606
|
[
|
|
1647
1607
|
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
|
|
1648
1608
|
// PowerPC
|
|
1649
1609
|
],
|
|
1650
|
-
[[
|
|
1610
|
+
[[S, /ower/, de, q]],
|
|
1651
1611
|
[
|
|
1652
1612
|
/(sun4\w)[;\)]/i
|
|
1653
1613
|
// SPARC
|
|
1654
1614
|
],
|
|
1655
|
-
[[
|
|
1615
|
+
[[S, "sparc"]],
|
|
1656
1616
|
[
|
|
1657
1617
|
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
|
1658
1618
|
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
1659
1619
|
],
|
|
1660
|
-
[[
|
|
1620
|
+
[[S, q]]
|
|
1661
1621
|
],
|
|
1662
1622
|
device: [
|
|
1663
1623
|
[
|
|
@@ -1667,35 +1627,35 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1667
1627
|
// Samsung
|
|
1668
1628
|
/\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
|
|
1669
1629
|
],
|
|
1670
|
-
[d, [u,
|
|
1630
|
+
[d, [u, Ae], [l, f]],
|
|
1671
1631
|
[
|
|
1672
1632
|
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
1673
1633
|
/samsung[- ]([-\w]+)/i,
|
|
1674
1634
|
/sec-(sgh\w+)/i
|
|
1675
1635
|
],
|
|
1676
|
-
[d, [u,
|
|
1636
|
+
[d, [u, Ae], [l, m]],
|
|
1677
1637
|
[
|
|
1678
1638
|
// Apple
|
|
1679
1639
|
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
|
1680
1640
|
// iPod/iPhone
|
|
1681
1641
|
],
|
|
1682
|
-
[d, [u,
|
|
1642
|
+
[d, [u, we], [l, m]],
|
|
1683
1643
|
[
|
|
1684
1644
|
/\((ipad);[-\w\),; ]+apple/i,
|
|
1685
1645
|
// iPad
|
|
1686
1646
|
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
|
1687
1647
|
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
|
1688
1648
|
],
|
|
1689
|
-
[d, [u,
|
|
1649
|
+
[d, [u, we], [l, f]],
|
|
1690
1650
|
[
|
|
1691
1651
|
/(macintosh);/i
|
|
1692
1652
|
],
|
|
1693
|
-
[d, [u,
|
|
1653
|
+
[d, [u, we]],
|
|
1694
1654
|
[
|
|
1695
1655
|
// Sharp
|
|
1696
1656
|
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
1697
1657
|
],
|
|
1698
|
-
[d, [u,
|
|
1658
|
+
[d, [u, vt], [l, m]],
|
|
1699
1659
|
[
|
|
1700
1660
|
// Huawei
|
|
1701
1661
|
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
|
@@ -1705,7 +1665,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1705
1665
|
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
|
1706
1666
|
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
1707
1667
|
],
|
|
1708
|
-
[d, [u, mt], [l,
|
|
1668
|
+
[d, [u, mt], [l, m]],
|
|
1709
1669
|
[
|
|
1710
1670
|
// Xiaomi
|
|
1711
1671
|
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
@@ -1721,53 +1681,53 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1721
1681
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
|
1722
1682
|
// Xiaomi Mi
|
|
1723
1683
|
],
|
|
1724
|
-
[[d, /_/g, " "], [u,
|
|
1684
|
+
[[d, /_/g, " "], [u, Qe], [l, m]],
|
|
1725
1685
|
[
|
|
1726
1686
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
|
|
1727
1687
|
// Redmi Pad
|
|
1728
1688
|
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
|
|
1729
1689
|
// Mi Pad tablets
|
|
1730
1690
|
],
|
|
1731
|
-
[[d, /_/g, " "], [u,
|
|
1691
|
+
[[d, /_/g, " "], [u, Qe], [l, f]],
|
|
1732
1692
|
[
|
|
1733
1693
|
// OPPO
|
|
1734
1694
|
/; (\w+) bui.+ oppo/i,
|
|
1735
1695
|
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
|
1736
1696
|
],
|
|
1737
|
-
[d, [u, "OPPO"], [l,
|
|
1697
|
+
[d, [u, "OPPO"], [l, m]],
|
|
1738
1698
|
[
|
|
1739
1699
|
// Vivo
|
|
1740
1700
|
/vivo (\w+)(?: bui|\))/i,
|
|
1741
1701
|
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
|
1742
1702
|
],
|
|
1743
|
-
[d, [u, "Vivo"], [l,
|
|
1703
|
+
[d, [u, "Vivo"], [l, m]],
|
|
1744
1704
|
[
|
|
1745
1705
|
// Realme
|
|
1746
1706
|
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
|
1747
1707
|
],
|
|
1748
|
-
[d, [u, "Realme"], [l,
|
|
1708
|
+
[d, [u, "Realme"], [l, m]],
|
|
1749
1709
|
[
|
|
1750
1710
|
// Motorola
|
|
1751
1711
|
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
|
1752
1712
|
/\bmot(?:orola)?[- ](\w*)/i,
|
|
1753
1713
|
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
1754
1714
|
],
|
|
1755
|
-
[d, [u,
|
|
1715
|
+
[d, [u, yt], [l, m]],
|
|
1756
1716
|
[
|
|
1757
1717
|
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
|
1758
1718
|
],
|
|
1759
|
-
[d, [u,
|
|
1719
|
+
[d, [u, yt], [l, f]],
|
|
1760
1720
|
[
|
|
1761
1721
|
// LG
|
|
1762
1722
|
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
1763
1723
|
],
|
|
1764
|
-
[d, [u,
|
|
1724
|
+
[d, [u, je], [l, f]],
|
|
1765
1725
|
[
|
|
1766
1726
|
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1767
1727
|
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
|
1768
1728
|
/\blg-?([\d\w]+) bui/i
|
|
1769
1729
|
],
|
|
1770
|
-
[d, [u,
|
|
1730
|
+
[d, [u, je], [l, m]],
|
|
1771
1731
|
[
|
|
1772
1732
|
// Lenovo
|
|
1773
1733
|
/(ideatab[-\w ]+)/i,
|
|
@@ -1779,34 +1739,34 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1779
1739
|
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
|
1780
1740
|
/nokia[-_ ]?([-\w\.]*)/i
|
|
1781
1741
|
],
|
|
1782
|
-
[[d, /_/g, " "], [u, "Nokia"], [l,
|
|
1742
|
+
[[d, /_/g, " "], [u, "Nokia"], [l, m]],
|
|
1783
1743
|
[
|
|
1784
1744
|
// Google
|
|
1785
1745
|
/(pixel c)\b/i
|
|
1786
1746
|
// Google Pixel C
|
|
1787
1747
|
],
|
|
1788
|
-
[d, [u,
|
|
1748
|
+
[d, [u, Te], [l, f]],
|
|
1789
1749
|
[
|
|
1790
1750
|
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
|
1791
1751
|
// Google Pixel
|
|
1792
1752
|
],
|
|
1793
|
-
[d, [u,
|
|
1753
|
+
[d, [u, Te], [l, m]],
|
|
1794
1754
|
[
|
|
1795
1755
|
// Sony
|
|
1796
1756
|
/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
|
|
1797
1757
|
],
|
|
1798
|
-
[d, [u,
|
|
1758
|
+
[d, [u, Pe], [l, m]],
|
|
1799
1759
|
[
|
|
1800
1760
|
/sony tablet [ps]/i,
|
|
1801
1761
|
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
|
1802
1762
|
],
|
|
1803
|
-
[[d, "Xperia Tablet"], [u,
|
|
1763
|
+
[[d, "Xperia Tablet"], [u, Pe], [l, f]],
|
|
1804
1764
|
[
|
|
1805
1765
|
// OnePlus
|
|
1806
1766
|
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
1807
1767
|
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
|
1808
1768
|
],
|
|
1809
|
-
[d, [u, "OnePlus"], [l,
|
|
1769
|
+
[d, [u, "OnePlus"], [l, m]],
|
|
1810
1770
|
[
|
|
1811
1771
|
// Amazon
|
|
1812
1772
|
/(alexa)webm/i,
|
|
@@ -1815,12 +1775,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1815
1775
|
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
1816
1776
|
// Kindle Fire HD
|
|
1817
1777
|
],
|
|
1818
|
-
[d, [u,
|
|
1778
|
+
[d, [u, Ce], [l, f]],
|
|
1819
1779
|
[
|
|
1820
1780
|
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
|
1821
1781
|
// Fire Phone
|
|
1822
1782
|
],
|
|
1823
|
-
[[d, /(.+)/g, "Fire Phone $1"], [u,
|
|
1783
|
+
[[d, /(.+)/g, "Fire Phone $1"], [u, Ce], [l, m]],
|
|
1824
1784
|
[
|
|
1825
1785
|
// BlackBerry
|
|
1826
1786
|
/(playbook);[-\w\),; ]+(rim)/i
|
|
@@ -1832,7 +1792,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1832
1792
|
/\(bb10; (\w+)/i
|
|
1833
1793
|
// BlackBerry 10
|
|
1834
1794
|
],
|
|
1835
|
-
[d, [u, pt], [l,
|
|
1795
|
+
[d, [u, pt], [l, m]],
|
|
1836
1796
|
[
|
|
1837
1797
|
// Asus
|
|
1838
1798
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
@@ -1841,7 +1801,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1841
1801
|
[
|
|
1842
1802
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
1843
1803
|
],
|
|
1844
|
-
[d, [u, bt], [l,
|
|
1804
|
+
[d, [u, bt], [l, m]],
|
|
1845
1805
|
[
|
|
1846
1806
|
// HTC
|
|
1847
1807
|
/(nexus 9)/i
|
|
@@ -1856,7 +1816,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1856
1816
|
/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
|
|
1857
1817
|
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
|
|
1858
1818
|
],
|
|
1859
|
-
[u, [d, /_/g, " "], [l,
|
|
1819
|
+
[u, [d, /_/g, " "], [l, m]],
|
|
1860
1820
|
[
|
|
1861
1821
|
// Acer
|
|
1862
1822
|
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
|
|
@@ -1867,12 +1827,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1867
1827
|
/droid.+; (m[1-5] note) bui/i,
|
|
1868
1828
|
/\bmz-([-\w]{2,})/i
|
|
1869
1829
|
],
|
|
1870
|
-
[d, [u, "Meizu"], [l,
|
|
1830
|
+
[d, [u, "Meizu"], [l, m]],
|
|
1871
1831
|
[
|
|
1872
1832
|
// Ulefone
|
|
1873
1833
|
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
|
1874
1834
|
],
|
|
1875
|
-
[d, [u, "Ulefone"], [l,
|
|
1835
|
+
[d, [u, "Ulefone"], [l, m]],
|
|
1876
1836
|
[
|
|
1877
1837
|
// MIXED
|
|
1878
1838
|
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
|
|
@@ -1890,7 +1850,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1890
1850
|
/(oppo) ?([\w ]+) bui/i
|
|
1891
1851
|
// OPPO
|
|
1892
1852
|
],
|
|
1893
|
-
[u, d, [l,
|
|
1853
|
+
[u, d, [l, m]],
|
|
1894
1854
|
[
|
|
1895
1855
|
/(kobo)\s(ereader|touch)/i,
|
|
1896
1856
|
// Kobo
|
|
@@ -1906,12 +1866,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1906
1866
|
/(surface duo)/i
|
|
1907
1867
|
// Surface Duo
|
|
1908
1868
|
],
|
|
1909
|
-
[d, [u,
|
|
1869
|
+
[d, [u, Le], [l, f]],
|
|
1910
1870
|
[
|
|
1911
1871
|
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
|
1912
1872
|
// Fairphone
|
|
1913
1873
|
],
|
|
1914
|
-
[d, [u, "Fairphone"], [l,
|
|
1874
|
+
[d, [u, "Fairphone"], [l, m]],
|
|
1915
1875
|
[
|
|
1916
1876
|
/(shield[\w ]+) b/i
|
|
1917
1877
|
// Nvidia Shield Tablets
|
|
@@ -1921,21 +1881,21 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1921
1881
|
/(sprint) (\w+)/i
|
|
1922
1882
|
// Sprint Phones
|
|
1923
1883
|
],
|
|
1924
|
-
[u, d, [l,
|
|
1884
|
+
[u, d, [l, m]],
|
|
1925
1885
|
[
|
|
1926
1886
|
/(kin\.[onetw]{3})/i
|
|
1927
1887
|
// Microsoft Kin
|
|
1928
1888
|
],
|
|
1929
|
-
[[d, /\./g, " "], [u,
|
|
1889
|
+
[[d, /\./g, " "], [u, Le], [l, m]],
|
|
1930
1890
|
[
|
|
1931
1891
|
/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
1932
1892
|
// Zebra
|
|
1933
1893
|
],
|
|
1934
|
-
[d, [u,
|
|
1894
|
+
[d, [u, Xe], [l, f]],
|
|
1935
1895
|
[
|
|
1936
1896
|
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
1937
1897
|
],
|
|
1938
|
-
[d, [u,
|
|
1898
|
+
[d, [u, Xe], [l, m]],
|
|
1939
1899
|
[
|
|
1940
1900
|
///////////////////
|
|
1941
1901
|
// SMARTTVS
|
|
@@ -1943,64 +1903,64 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
1943
1903
|
/smart-tv.+(samsung)/i
|
|
1944
1904
|
// Samsung
|
|
1945
1905
|
],
|
|
1946
|
-
[u, [l,
|
|
1906
|
+
[u, [l, C]],
|
|
1947
1907
|
[
|
|
1948
1908
|
/hbbtv.+maple;(\d+)/i
|
|
1949
1909
|
],
|
|
1950
|
-
[[d, /^/, "SmartTV"], [u,
|
|
1910
|
+
[[d, /^/, "SmartTV"], [u, Ae], [l, C]],
|
|
1951
1911
|
[
|
|
1952
1912
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
1953
1913
|
// LG SmartTV
|
|
1954
1914
|
],
|
|
1955
|
-
[[u,
|
|
1915
|
+
[[u, je], [l, C]],
|
|
1956
1916
|
[
|
|
1957
1917
|
/(apple) ?tv/i
|
|
1958
1918
|
// Apple TV
|
|
1959
1919
|
],
|
|
1960
|
-
[u, [d,
|
|
1920
|
+
[u, [d, we + " TV"], [l, C]],
|
|
1961
1921
|
[
|
|
1962
1922
|
/crkey/i
|
|
1963
1923
|
// Google Chromecast
|
|
1964
1924
|
],
|
|
1965
|
-
[[d, xe + "cast"], [u,
|
|
1925
|
+
[[d, xe + "cast"], [u, Te], [l, C]],
|
|
1966
1926
|
[
|
|
1967
1927
|
/droid.+aft(\w+)( bui|\))/i
|
|
1968
1928
|
// Fire TV
|
|
1969
1929
|
],
|
|
1970
|
-
[d, [u,
|
|
1930
|
+
[d, [u, Ce], [l, C]],
|
|
1971
1931
|
[
|
|
1972
1932
|
/\(dtv[\);].+(aquos)/i,
|
|
1973
1933
|
/(aquos-tv[\w ]+)\)/i
|
|
1974
1934
|
// Sharp
|
|
1975
1935
|
],
|
|
1976
|
-
[d, [u,
|
|
1936
|
+
[d, [u, vt], [l, C]],
|
|
1977
1937
|
[
|
|
1978
1938
|
/(bravia[\w ]+)( bui|\))/i
|
|
1979
1939
|
// Sony
|
|
1980
1940
|
],
|
|
1981
|
-
[d, [u,
|
|
1941
|
+
[d, [u, Pe], [l, C]],
|
|
1982
1942
|
[
|
|
1983
1943
|
/(mitv-\w{5}) bui/i
|
|
1984
1944
|
// Xiaomi
|
|
1985
1945
|
],
|
|
1986
|
-
[d, [u,
|
|
1946
|
+
[d, [u, Qe], [l, C]],
|
|
1987
1947
|
[
|
|
1988
1948
|
/Hbbtv.*(technisat) (.*);/i
|
|
1989
1949
|
// TechniSAT
|
|
1990
1950
|
],
|
|
1991
|
-
[u, d, [l,
|
|
1951
|
+
[u, d, [l, C]],
|
|
1992
1952
|
[
|
|
1993
1953
|
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
|
|
1994
1954
|
// Roku
|
|
1995
1955
|
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
|
|
1996
1956
|
// HbbTV devices
|
|
1997
1957
|
],
|
|
1998
|
-
[[u,
|
|
1958
|
+
[[u, ye], [d, ye], [l, C]],
|
|
1999
1959
|
[
|
|
2000
1960
|
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
|
|
2001
1961
|
// SmartTV from Unidentified Vendors
|
|
2002
1962
|
],
|
|
2003
|
-
[[l,
|
|
1963
|
+
[[l, C]],
|
|
2004
1964
|
[
|
|
2005
1965
|
///////////////////
|
|
2006
1966
|
// CONSOLES
|
|
@@ -2010,22 +1970,22 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2010
1970
|
/(nintendo) (\w+)/i
|
|
2011
1971
|
// Nintendo
|
|
2012
1972
|
],
|
|
2013
|
-
[u, d, [l,
|
|
1973
|
+
[u, d, [l, Z]],
|
|
2014
1974
|
[
|
|
2015
1975
|
/droid.+; (shield) bui/i
|
|
2016
1976
|
// Nvidia
|
|
2017
1977
|
],
|
|
2018
|
-
[d, [u, "Nvidia"], [l,
|
|
1978
|
+
[d, [u, "Nvidia"], [l, Z]],
|
|
2019
1979
|
[
|
|
2020
1980
|
/(playstation \w+)/i
|
|
2021
1981
|
// Playstation
|
|
2022
1982
|
],
|
|
2023
|
-
[d, [u,
|
|
1983
|
+
[d, [u, Pe], [l, Z]],
|
|
2024
1984
|
[
|
|
2025
1985
|
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
|
2026
1986
|
// Microsoft Xbox
|
|
2027
1987
|
],
|
|
2028
|
-
[d, [u,
|
|
1988
|
+
[d, [u, Le], [l, Z]],
|
|
2029
1989
|
[
|
|
2030
1990
|
///////////////////
|
|
2031
1991
|
// WEARABLES
|
|
@@ -2033,26 +1993,26 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2033
1993
|
/((pebble))app/i
|
|
2034
1994
|
// Pebble
|
|
2035
1995
|
],
|
|
2036
|
-
[u, d, [l,
|
|
1996
|
+
[u, d, [l, Y]],
|
|
2037
1997
|
[
|
|
2038
1998
|
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
2039
1999
|
// Apple Watch
|
|
2040
2000
|
],
|
|
2041
|
-
[d, [u,
|
|
2001
|
+
[d, [u, we], [l, Y]],
|
|
2042
2002
|
[
|
|
2043
2003
|
/droid.+; (glass) \d/i
|
|
2044
2004
|
// Google Glass
|
|
2045
2005
|
],
|
|
2046
|
-
[d, [u,
|
|
2006
|
+
[d, [u, Te], [l, Y]],
|
|
2047
2007
|
[
|
|
2048
2008
|
/droid.+; (wt63?0{2,3})\)/i
|
|
2049
2009
|
],
|
|
2050
|
-
[d, [u,
|
|
2010
|
+
[d, [u, Xe], [l, Y]],
|
|
2051
2011
|
[
|
|
2052
2012
|
/(quest( 2| pro)?)/i
|
|
2053
2013
|
// Oculus Quest
|
|
2054
2014
|
],
|
|
2055
|
-
[d, [u,
|
|
2015
|
+
[d, [u, Et], [l, Y]],
|
|
2056
2016
|
[
|
|
2057
2017
|
///////////////////
|
|
2058
2018
|
// EMBEDDED
|
|
@@ -2060,12 +2020,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2060
2020
|
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
2061
2021
|
// Tesla
|
|
2062
2022
|
],
|
|
2063
|
-
[u, [l,
|
|
2023
|
+
[u, [l, tt]],
|
|
2064
2024
|
[
|
|
2065
2025
|
/(aeobc)\b/i
|
|
2066
2026
|
// Echo Dot
|
|
2067
2027
|
],
|
|
2068
|
-
[d, [u,
|
|
2028
|
+
[d, [u, Ce], [l, tt]],
|
|
2069
2029
|
[
|
|
2070
2030
|
////////////////////
|
|
2071
2031
|
// MIXED (GENERIC)
|
|
@@ -2073,7 +2033,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2073
2033
|
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
|
|
2074
2034
|
// Android Phones from Unidentified Vendors
|
|
2075
2035
|
],
|
|
2076
|
-
[d, [l,
|
|
2036
|
+
[d, [l, m]],
|
|
2077
2037
|
[
|
|
2078
2038
|
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
|
|
2079
2039
|
// Android Tablets from Unidentified Vendors
|
|
@@ -2088,7 +2048,7 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2088
2048
|
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
|
|
2089
2049
|
// Unidentifiable Mobile
|
|
2090
2050
|
],
|
|
2091
|
-
[[l,
|
|
2051
|
+
[[l, m]],
|
|
2092
2052
|
[
|
|
2093
2053
|
/(android[-\w\. ]{0,9});.+buil/i
|
|
2094
2054
|
// Generic Android Device
|
|
@@ -2100,12 +2060,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2100
2060
|
/windows.+ edge\/([\w\.]+)/i
|
|
2101
2061
|
// EdgeHTML
|
|
2102
2062
|
],
|
|
2103
|
-
[
|
|
2063
|
+
[c, [o, fi + "HTML"]],
|
|
2104
2064
|
[
|
|
2105
2065
|
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
|
2106
2066
|
// Blink
|
|
2107
2067
|
],
|
|
2108
|
-
[
|
|
2068
|
+
[c, [o, "Blink"]],
|
|
2109
2069
|
[
|
|
2110
2070
|
/(presto)\/([\w\.]+)/i,
|
|
2111
2071
|
// Presto
|
|
@@ -2119,12 +2079,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2119
2079
|
// iCab
|
|
2120
2080
|
/\b(libweb)/i
|
|
2121
2081
|
],
|
|
2122
|
-
[o,
|
|
2082
|
+
[o, c],
|
|
2123
2083
|
[
|
|
2124
2084
|
/rv\:([\w\.]{1,9})\b.+(gecko)/i
|
|
2125
2085
|
// Gecko
|
|
2126
2086
|
],
|
|
2127
|
-
[
|
|
2087
|
+
[c, o]
|
|
2128
2088
|
],
|
|
2129
2089
|
os: [
|
|
2130
2090
|
[
|
|
@@ -2132,19 +2092,19 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2132
2092
|
/microsoft (windows) (vista|xp)/i
|
|
2133
2093
|
// Windows (iTunes)
|
|
2134
2094
|
],
|
|
2135
|
-
[o,
|
|
2095
|
+
[o, c],
|
|
2136
2096
|
[
|
|
2137
2097
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
|
|
2138
2098
|
// Windows Phone
|
|
2139
2099
|
],
|
|
2140
|
-
[o, [
|
|
2100
|
+
[o, [c, _e, It]],
|
|
2141
2101
|
[
|
|
2142
2102
|
/windows nt 6\.2; (arm)/i,
|
|
2143
2103
|
// Windows RT
|
|
2144
2104
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
2145
2105
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
2146
2106
|
],
|
|
2147
|
-
[[
|
|
2107
|
+
[[c, _e, It], [o, at]],
|
|
2148
2108
|
[
|
|
2149
2109
|
// iOS/macOS
|
|
2150
2110
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -2152,19 +2112,19 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2152
2112
|
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
|
2153
2113
|
/cfnetwork\/.+darwin/i
|
|
2154
2114
|
],
|
|
2155
|
-
[[
|
|
2115
|
+
[[c, /_/g, "."], [o, "iOS"]],
|
|
2156
2116
|
[
|
|
2157
2117
|
/(mac os x) ?([\w\. ]*)/i,
|
|
2158
2118
|
/(macintosh|mac_powerpc\b)(?!.+haiku)/i
|
|
2159
2119
|
// Mac OS
|
|
2160
2120
|
],
|
|
2161
|
-
[[o, "macOS"], [
|
|
2121
|
+
[[o, "macOS"], [c, /_/g, "."]],
|
|
2162
2122
|
[
|
|
2163
2123
|
// Mobile OSes
|
|
2164
2124
|
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
|
2165
2125
|
// Android-x86/HarmonyOS
|
|
2166
2126
|
],
|
|
2167
|
-
[
|
|
2127
|
+
[c, o],
|
|
2168
2128
|
[
|
|
2169
2129
|
// Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
|
|
2170
2130
|
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
|
@@ -2175,44 +2135,44 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2175
2135
|
/\((series40);/i
|
|
2176
2136
|
// Series 40
|
|
2177
2137
|
],
|
|
2178
|
-
[o,
|
|
2138
|
+
[o, c],
|
|
2179
2139
|
[
|
|
2180
2140
|
/\(bb(10);/i
|
|
2181
2141
|
// BlackBerry 10
|
|
2182
2142
|
],
|
|
2183
|
-
[
|
|
2143
|
+
[c, [o, pt]],
|
|
2184
2144
|
[
|
|
2185
2145
|
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
|
2186
2146
|
// Symbian
|
|
2187
2147
|
],
|
|
2188
|
-
[
|
|
2148
|
+
[c, [o, "Symbian"]],
|
|
2189
2149
|
[
|
|
2190
2150
|
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
|
2191
2151
|
// Firefox OS
|
|
2192
2152
|
],
|
|
2193
|
-
[
|
|
2153
|
+
[c, [o, be + " OS"]],
|
|
2194
2154
|
[
|
|
2195
2155
|
/web0s;.+rt(tv)/i,
|
|
2196
2156
|
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
|
2197
2157
|
// WebOS
|
|
2198
2158
|
],
|
|
2199
|
-
[
|
|
2159
|
+
[c, [o, "webOS"]],
|
|
2200
2160
|
[
|
|
2201
2161
|
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
|
|
2202
2162
|
// watchOS
|
|
2203
2163
|
],
|
|
2204
|
-
[
|
|
2164
|
+
[c, [o, "watchOS"]],
|
|
2205
2165
|
[
|
|
2206
2166
|
// Google Chromecast
|
|
2207
2167
|
/crkey\/([\d\.]+)/i
|
|
2208
2168
|
// Google Chromecast
|
|
2209
2169
|
],
|
|
2210
|
-
[
|
|
2170
|
+
[c, [o, xe + "cast"]],
|
|
2211
2171
|
[
|
|
2212
2172
|
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
|
2213
2173
|
// Chromium OS
|
|
2214
2174
|
],
|
|
2215
|
-
[[o, "Chrome OS"],
|
|
2175
|
+
[[o, "Chrome OS"], c],
|
|
2216
2176
|
[
|
|
2217
2177
|
// Smart TVs
|
|
2218
2178
|
/panasonic;(viera)/i,
|
|
@@ -2244,12 +2204,12 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2244
2204
|
/(haiku) (\w+)/i
|
|
2245
2205
|
// Haiku
|
|
2246
2206
|
],
|
|
2247
|
-
[o,
|
|
2207
|
+
[o, c],
|
|
2248
2208
|
[
|
|
2249
2209
|
/(sunos) ?([\w\.\d]*)/i
|
|
2250
2210
|
// Solaris
|
|
2251
2211
|
],
|
|
2252
|
-
[[o, "Solaris"],
|
|
2212
|
+
[[o, "Solaris"], c],
|
|
2253
2213
|
[
|
|
2254
2214
|
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
|
2255
2215
|
// Solaris
|
|
@@ -2260,47 +2220,47 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2260
2220
|
/(unix) ?([\w\.]*)/i
|
|
2261
2221
|
// UNIX
|
|
2262
2222
|
],
|
|
2263
|
-
[o,
|
|
2223
|
+
[o, c]
|
|
2264
2224
|
]
|
|
2265
|
-
},
|
|
2225
|
+
}, Oe = function() {
|
|
2266
2226
|
var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
2267
|
-
return
|
|
2268
|
-
[
|
|
2269
|
-
[
|
|
2270
|
-
[
|
|
2271
|
-
[
|
|
2272
|
-
[P, [o,
|
|
2273
|
-
]),
|
|
2274
|
-
[
|
|
2275
|
-
[
|
|
2276
|
-
[P, [
|
|
2277
|
-
]),
|
|
2278
|
-
[
|
|
2227
|
+
return D.call(i.init, [
|
|
2228
|
+
[T, [o, c, fe]],
|
|
2229
|
+
[_, [S]],
|
|
2230
|
+
[O, [l, d, u]],
|
|
2231
|
+
[F, [o, c]],
|
|
2232
|
+
[P, [o, c]]
|
|
2233
|
+
]), D.call(i.isIgnore, [
|
|
2234
|
+
[T, [c, fe]],
|
|
2235
|
+
[F, [c]],
|
|
2236
|
+
[P, [c]]
|
|
2237
|
+
]), D.call(i.isIgnoreRgx, [
|
|
2238
|
+
[T, / ?browser$/i],
|
|
2279
2239
|
[P, / ?os$/i]
|
|
2280
|
-
]),
|
|
2281
|
-
[
|
|
2282
|
-
[
|
|
2283
|
-
[
|
|
2284
|
-
[
|
|
2285
|
-
[P, [o,
|
|
2240
|
+
]), D.call(i.toString, [
|
|
2241
|
+
[T, [o, c]],
|
|
2242
|
+
[_, [S]],
|
|
2243
|
+
[O, [u, d]],
|
|
2244
|
+
[F, [o, c]],
|
|
2245
|
+
[P, [o, c]]
|
|
2286
2246
|
]), i;
|
|
2287
|
-
}(),
|
|
2288
|
-
var
|
|
2247
|
+
}(), Ei = function(i, t) {
|
|
2248
|
+
var e = Oe.init[t], a = Oe.isIgnore[t] || 0, n = Oe.isIgnoreRgx[t] || 0, r = Oe.toString[t] || 0;
|
|
2289
2249
|
function s() {
|
|
2290
|
-
|
|
2250
|
+
D.call(this, e);
|
|
2291
2251
|
}
|
|
2292
2252
|
return s.prototype.getItem = function() {
|
|
2293
2253
|
return i;
|
|
2294
2254
|
}, s.prototype.withClientHints = function() {
|
|
2295
|
-
return H ? H.getHighEntropyValues(
|
|
2296
|
-
return i.setCH(new
|
|
2255
|
+
return H ? H.getHighEntropyValues(Nt).then(function(h) {
|
|
2256
|
+
return i.setCH(new Rt(h, !1)).parseCH().get();
|
|
2297
2257
|
}) : i.parseCH().get();
|
|
2298
2258
|
}, s.prototype.withFeatureCheck = function() {
|
|
2299
2259
|
return i.detectFeature().get();
|
|
2300
|
-
},
|
|
2260
|
+
}, t != te && (s.prototype.is = function(h) {
|
|
2301
2261
|
var g = !1;
|
|
2302
2262
|
for (var w in this)
|
|
2303
|
-
if (this.hasOwnProperty(w) && !
|
|
2263
|
+
if (this.hasOwnProperty(w) && !nt(a, w) && q(n ? $(n, this[w]) : this[w]) == q(n ? $(n, h) : h)) {
|
|
2304
2264
|
if (g = !0, h != z)
|
|
2305
2265
|
break;
|
|
2306
2266
|
} else if (h == z && g) {
|
|
@@ -2309,9 +2269,9 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2309
2269
|
}
|
|
2310
2270
|
return g;
|
|
2311
2271
|
}, s.prototype.toString = function() {
|
|
2312
|
-
var h =
|
|
2313
|
-
for (var g in
|
|
2314
|
-
typeof this[
|
|
2272
|
+
var h = de;
|
|
2273
|
+
for (var g in r)
|
|
2274
|
+
typeof this[r[g]] !== z && (h += (h ? " " : de) + this[r[g]]);
|
|
2315
2275
|
return h || z;
|
|
2316
2276
|
}), H || (s.prototype.then = function(h) {
|
|
2317
2277
|
var g = this, w = function() {
|
|
@@ -2322,192 +2282,192 @@ var ui = "2.0.0-beta.2", le = "", gt = "?", et = "function", z = "undefined", ue
|
|
|
2322
2282
|
is: s.prototype.is,
|
|
2323
2283
|
toString: s.prototype.toString
|
|
2324
2284
|
};
|
|
2325
|
-
var
|
|
2326
|
-
return h(
|
|
2285
|
+
var b = new w();
|
|
2286
|
+
return h(b), b;
|
|
2327
2287
|
}), new s();
|
|
2328
2288
|
};
|
|
2329
|
-
function
|
|
2330
|
-
if (i = i || {},
|
|
2331
|
-
|
|
2332
|
-
[
|
|
2333
|
-
[
|
|
2334
|
-
[
|
|
2335
|
-
[d,
|
|
2336
|
-
[
|
|
2337
|
-
[
|
|
2338
|
-
[
|
|
2339
|
-
[
|
|
2340
|
-
[
|
|
2289
|
+
function Rt(i, t) {
|
|
2290
|
+
if (i = i || {}, D.call(this, Nt), t)
|
|
2291
|
+
D.call(this, [
|
|
2292
|
+
[st, Ke(i[G])],
|
|
2293
|
+
[ot, Ke(i[ui])],
|
|
2294
|
+
[m, /\?1/.test(i[bi])],
|
|
2295
|
+
[d, me(i[pi])],
|
|
2296
|
+
[ee, me(i[Dt])],
|
|
2297
|
+
[rt, me(i[mi])],
|
|
2298
|
+
[S, me(i[hi])],
|
|
2299
|
+
[W, Ke(i[wi])],
|
|
2300
|
+
[He, me(i[gi])]
|
|
2341
2301
|
]);
|
|
2342
2302
|
else
|
|
2343
|
-
for (var
|
|
2344
|
-
this.hasOwnProperty(
|
|
2303
|
+
for (var e in i)
|
|
2304
|
+
this.hasOwnProperty(e) && typeof i[e] !== z && (this[e] = i[e]);
|
|
2345
2305
|
}
|
|
2346
|
-
function At(i,
|
|
2347
|
-
return this.get = function(
|
|
2348
|
-
return
|
|
2349
|
-
}, this.set = function(
|
|
2350
|
-
return this.data[
|
|
2351
|
-
}, this.setCH = function(
|
|
2352
|
-
return this.uaCH =
|
|
2306
|
+
function At(i, t, e, a) {
|
|
2307
|
+
return this.get = function(n) {
|
|
2308
|
+
return n ? this.data.hasOwnProperty(n) ? this.data[n] : void 0 : this.data;
|
|
2309
|
+
}, this.set = function(n, r) {
|
|
2310
|
+
return this.data[n] = r, this;
|
|
2311
|
+
}, this.setCH = function(n) {
|
|
2312
|
+
return this.uaCH = n, this;
|
|
2353
2313
|
}, this.detectFeature = function() {
|
|
2354
2314
|
if (I && I.userAgent == this.ua)
|
|
2355
2315
|
switch (this.itemType) {
|
|
2356
|
-
case
|
|
2357
|
-
I.brave && typeof I.brave.isBrave ==
|
|
2316
|
+
case T:
|
|
2317
|
+
I.brave && typeof I.brave.isBrave == Ze && this.set(o, "Brave");
|
|
2358
2318
|
break;
|
|
2359
|
-
case
|
|
2360
|
-
!this.get(l) && H && H[
|
|
2319
|
+
case O:
|
|
2320
|
+
!this.get(l) && H && H[m] && this.set(l, m), this.get(d) == "Macintosh" && I && typeof I.standalone !== z && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
|
|
2361
2321
|
break;
|
|
2362
2322
|
case P:
|
|
2363
|
-
!this.get(o) && H && H[
|
|
2323
|
+
!this.get(o) && H && H[ee] && this.set(o, H[ee]);
|
|
2364
2324
|
break;
|
|
2365
|
-
case
|
|
2366
|
-
var
|
|
2367
|
-
return
|
|
2325
|
+
case te:
|
|
2326
|
+
var n = this.data, r = function(s) {
|
|
2327
|
+
return n[s].getItem().detectFeature().get();
|
|
2368
2328
|
};
|
|
2369
|
-
this.set(
|
|
2329
|
+
this.set(T, r(T)).set(_, r(_)).set(O, r(O)).set(F, r(F)).set(P, r(P));
|
|
2370
2330
|
}
|
|
2371
2331
|
return this;
|
|
2372
2332
|
}, this.parseUA = function() {
|
|
2373
|
-
return this.itemType !=
|
|
2333
|
+
return this.itemType != te && St.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(fe, Je(this.get(c))), this;
|
|
2374
2334
|
}, this.parseCH = function() {
|
|
2375
|
-
var
|
|
2335
|
+
var n = this.uaCH, r = this.rgxMap;
|
|
2376
2336
|
switch (this.itemType) {
|
|
2377
|
-
case
|
|
2378
|
-
var s =
|
|
2337
|
+
case T:
|
|
2338
|
+
var s = n[ot] || n[st], h;
|
|
2379
2339
|
if (s)
|
|
2380
2340
|
for (var g in s) {
|
|
2381
|
-
var w =
|
|
2382
|
-
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(
|
|
2341
|
+
var w = $(/(Google|Microsoft) /, s[g].brand || s[g]), b = s[g].version;
|
|
2342
|
+
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(c, b).set(fe, Je(b)), h = w);
|
|
2383
2343
|
}
|
|
2384
2344
|
break;
|
|
2385
|
-
case D:
|
|
2386
|
-
var A = a[k];
|
|
2387
|
-
A && (A && a[Ve] == "64" && (A += "64"), kt.call(this.data, A + ";", c));
|
|
2388
|
-
break;
|
|
2389
2345
|
case _:
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2346
|
+
var A = n[S];
|
|
2347
|
+
A && (A && n[He] == "64" && (A += "64"), St.call(this.data, A + ";", r));
|
|
2348
|
+
break;
|
|
2349
|
+
case O:
|
|
2350
|
+
if (n[m] && this.set(l, m), n[d] && this.set(d, n[d]), n[d] == "Xbox" && this.set(l, Z).set(u, Le), n[W]) {
|
|
2351
|
+
var R;
|
|
2352
|
+
if (typeof n[W] != "string")
|
|
2353
|
+
for (var Q = 0; !R && Q < n[W].length; )
|
|
2354
|
+
R = _e(n[W][Q++], Ct);
|
|
2395
2355
|
else
|
|
2396
|
-
|
|
2397
|
-
this.set(l,
|
|
2356
|
+
R = _e(n[W], Ct);
|
|
2357
|
+
this.set(l, R);
|
|
2398
2358
|
}
|
|
2399
2359
|
break;
|
|
2400
2360
|
case P:
|
|
2401
|
-
var
|
|
2402
|
-
if (
|
|
2403
|
-
var L =
|
|
2404
|
-
|
|
2361
|
+
var X = n[ee];
|
|
2362
|
+
if (X) {
|
|
2363
|
+
var L = n[rt];
|
|
2364
|
+
X == at && (L = parseInt(Je(L), 10) >= 13 ? "11" : "10"), this.set(o, X).set(c, L);
|
|
2405
2365
|
}
|
|
2406
|
-
this.get(o) == at &&
|
|
2366
|
+
this.get(o) == at && n[d] == "Xbox" && this.set(o, "Xbox").set(c, void 0);
|
|
2407
2367
|
break;
|
|
2408
|
-
case
|
|
2409
|
-
var
|
|
2410
|
-
return
|
|
2368
|
+
case te:
|
|
2369
|
+
var he = this.data, x = function(B) {
|
|
2370
|
+
return he[B].getItem().setCH(n).parseCH().get();
|
|
2411
2371
|
};
|
|
2412
|
-
this.set(
|
|
2372
|
+
this.set(T, x(T)).set(_, x(_)).set(O, x(O)).set(F, x(F)).set(P, x(P));
|
|
2413
2373
|
}
|
|
2414
2374
|
return this;
|
|
2415
|
-
},
|
|
2375
|
+
}, D.call(this, [
|
|
2416
2376
|
["itemType", i],
|
|
2417
|
-
["ua",
|
|
2418
|
-
["uaCH",
|
|
2419
|
-
["rgxMap",
|
|
2420
|
-
["data",
|
|
2377
|
+
["ua", t],
|
|
2378
|
+
["uaCH", a],
|
|
2379
|
+
["rgxMap", e],
|
|
2380
|
+
["data", Ei(this, i)]
|
|
2421
2381
|
]), this;
|
|
2422
2382
|
}
|
|
2423
|
-
function
|
|
2424
|
-
if (typeof i ===
|
|
2425
|
-
return new
|
|
2426
|
-
var
|
|
2383
|
+
function N(i, t, e) {
|
|
2384
|
+
if (typeof i === le ? (Mt(i) ? (typeof t === le && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === et && !Mt(t) && (e = t, t = void 0), !(this instanceof N))
|
|
2385
|
+
return new N(i, t, e).getResult();
|
|
2386
|
+
var a = typeof i === et ? i : (
|
|
2427
2387
|
// Passed user-agent string
|
|
2428
2388
|
I && I.userAgent ? I.userAgent : (
|
|
2429
2389
|
// navigator.userAgent
|
|
2430
|
-
|
|
2390
|
+
e && e[wt] ? e[wt] : (
|
|
2431
2391
|
// User-Agent from passed headers
|
|
2432
|
-
|
|
2392
|
+
de
|
|
2433
2393
|
)
|
|
2434
2394
|
)
|
|
2435
|
-
),
|
|
2436
|
-
return h ==
|
|
2437
|
-
return new At(h,
|
|
2395
|
+
), n = new Rt(e, !0), r = t ? vi(Tt, t) : Tt, s = function(h) {
|
|
2396
|
+
return h == te ? function() {
|
|
2397
|
+
return new At(h, a, r, n).set("ua", a).set(T, this.getBrowser()).set(_, this.getCPU()).set(O, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
|
|
2438
2398
|
} : function() {
|
|
2439
|
-
return new At(h,
|
|
2399
|
+
return new At(h, a, r[h], n).parseUA().get();
|
|
2440
2400
|
};
|
|
2441
2401
|
};
|
|
2442
|
-
return
|
|
2443
|
-
["getBrowser", s(
|
|
2444
|
-
["getCPU", s(
|
|
2445
|
-
["getDevice", s(
|
|
2446
|
-
["getEngine", s(
|
|
2402
|
+
return D.call(this, [
|
|
2403
|
+
["getBrowser", s(T)],
|
|
2404
|
+
["getCPU", s(_)],
|
|
2405
|
+
["getDevice", s(O)],
|
|
2406
|
+
["getEngine", s(F)],
|
|
2447
2407
|
["getOS", s(P)],
|
|
2448
|
-
["getResult", s(
|
|
2408
|
+
["getResult", s(te)],
|
|
2449
2409
|
["getUA", function() {
|
|
2450
|
-
return
|
|
2410
|
+
return a;
|
|
2451
2411
|
}],
|
|
2452
2412
|
["setUA", function(h) {
|
|
2453
|
-
return
|
|
2413
|
+
return ue(h) && (a = h.length > it ? ye(h, it) : h), this;
|
|
2454
2414
|
}]
|
|
2455
|
-
]).setUA(
|
|
2415
|
+
]).setUA(a), this;
|
|
2456
2416
|
}
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
class
|
|
2463
|
-
constructor(
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
this.trackers =
|
|
2467
|
-
}
|
|
2468
|
-
on(
|
|
2469
|
-
const
|
|
2470
|
-
s.data.message !== `kalamba:wrapper-telemetry:${
|
|
2417
|
+
N.VERSION = li;
|
|
2418
|
+
N.BROWSER = Ve([o, c, fe]);
|
|
2419
|
+
N.CPU = Ve([S]);
|
|
2420
|
+
N.DEVICE = Ve([d, u, l, Z, m, C, f, Y, tt]);
|
|
2421
|
+
N.ENGINE = N.OS = Ve([o, c]);
|
|
2422
|
+
class ki {
|
|
2423
|
+
constructor(t, e) {
|
|
2424
|
+
p(this, "trackers");
|
|
2425
|
+
p(this, "config");
|
|
2426
|
+
this.trackers = t, this.config = e;
|
|
2427
|
+
}
|
|
2428
|
+
on(t, e, a) {
|
|
2429
|
+
const n = function(s) {
|
|
2430
|
+
s.data.message !== `kalamba:wrapper-telemetry:${t}` && s.data.message !== `kalamba:wrapper:${t}` || e(s.data.payload);
|
|
2471
2431
|
};
|
|
2472
|
-
window.addEventListener("message",
|
|
2432
|
+
window.addEventListener("message", n, a);
|
|
2473
2433
|
}
|
|
2474
|
-
track(
|
|
2475
|
-
this.trackers.forEach((
|
|
2434
|
+
track(t, e) {
|
|
2435
|
+
this.trackers.forEach((a) => a.track(t, e));
|
|
2476
2436
|
}
|
|
2477
2437
|
}
|
|
2478
2438
|
function Pt(i) {
|
|
2479
|
-
return i.reduce((
|
|
2439
|
+
return i.reduce((t, e) => t + e, 0);
|
|
2480
2440
|
}
|
|
2481
|
-
function
|
|
2482
|
-
const
|
|
2483
|
-
return Math.sqrt(
|
|
2441
|
+
function Mi(i) {
|
|
2442
|
+
const t = i.length, e = Pt(i) / t, a = i.map((r) => Math.pow(r - e, 2)), n = Pt(a) / t;
|
|
2443
|
+
return Math.sqrt(n);
|
|
2484
2444
|
}
|
|
2485
|
-
class
|
|
2445
|
+
class xt {
|
|
2486
2446
|
constructor() {
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
const
|
|
2493
|
-
return this.frames.map((
|
|
2447
|
+
p(this, "rafId", -1);
|
|
2448
|
+
p(this, "startTime", 0);
|
|
2449
|
+
p(this, "stopTime", 0);
|
|
2450
|
+
p(this, "frames", []);
|
|
2451
|
+
p(this, "calculateFPS", () => {
|
|
2452
|
+
const t = Math.floor((this.stopTime - this.startTime) / 1e3);
|
|
2453
|
+
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, a, n, r) => (r[n] !== r[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
|
|
2494
2454
|
});
|
|
2495
|
-
|
|
2496
|
-
const
|
|
2497
|
-
return { fpsAvg:
|
|
2455
|
+
p(this, "getReport", () => {
|
|
2456
|
+
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), a = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Mi(t) : 0;
|
|
2457
|
+
return { fpsAvg: e, fpsMax: a, fpsMin: n, fpsStdDev: r };
|
|
2498
2458
|
});
|
|
2499
|
-
|
|
2459
|
+
p(this, "start", () => {
|
|
2500
2460
|
this.startTime = Date.now(), this.frames = [], this.trackFrames();
|
|
2501
2461
|
});
|
|
2502
|
-
|
|
2462
|
+
p(this, "stop", () => {
|
|
2503
2463
|
cancelAnimationFrame(this.rafId), this.stopTime = Date.now();
|
|
2504
2464
|
});
|
|
2505
|
-
|
|
2465
|
+
p(this, "trackFrames", () => {
|
|
2506
2466
|
this.frames.push(Date.now()), this.rafId = requestAnimationFrame(this.trackFrames);
|
|
2507
2467
|
});
|
|
2508
2468
|
}
|
|
2509
2469
|
}
|
|
2510
|
-
const
|
|
2470
|
+
const Si = "landscape", Ii = "portrait";
|
|
2511
2471
|
function Ci() {
|
|
2512
2472
|
try {
|
|
2513
2473
|
const i = document.createElement("canvas");
|
|
@@ -2516,68 +2476,68 @@ function Ci() {
|
|
|
2516
2476
|
return !1;
|
|
2517
2477
|
}
|
|
2518
2478
|
}
|
|
2519
|
-
async function
|
|
2479
|
+
async function Ti() {
|
|
2520
2480
|
if (!window.createImageBitmap)
|
|
2521
2481
|
return !1;
|
|
2522
|
-
const
|
|
2482
|
+
const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
|
|
2523
2483
|
try {
|
|
2524
|
-
return await createImageBitmap(
|
|
2484
|
+
return await createImageBitmap(e), !0;
|
|
2525
2485
|
} catch {
|
|
2526
2486
|
return !1;
|
|
2527
2487
|
}
|
|
2528
2488
|
}
|
|
2529
|
-
function
|
|
2530
|
-
return window.innerWidth >= window.innerHeight ?
|
|
2489
|
+
function Ye() {
|
|
2490
|
+
return window.innerWidth >= window.innerHeight ? Si : Ii;
|
|
2531
2491
|
}
|
|
2532
|
-
var Fe, ae,
|
|
2533
|
-
class
|
|
2534
|
-
constructor(...
|
|
2535
|
-
super(...
|
|
2536
|
-
|
|
2492
|
+
var Fe, ae, ne, se, ke, De, Me, Ne;
|
|
2493
|
+
class Gi extends ki {
|
|
2494
|
+
constructor(...e) {
|
|
2495
|
+
super(...e);
|
|
2496
|
+
p(this, "FPS_SAMPLE_INTERVAL", 1e4);
|
|
2537
2497
|
// wrapper state
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
}), this.on("autoplay", ({ action:
|
|
2549
|
-
["start", "resume"].includes(
|
|
2550
|
-
}), this.on("settings", ({ fastPlay:
|
|
2551
|
-
|
|
2498
|
+
E(this, Fe, 0);
|
|
2499
|
+
E(this, ae, "");
|
|
2500
|
+
E(this, ne, void 0);
|
|
2501
|
+
E(this, se, void 0);
|
|
2502
|
+
E(this, ke, !1);
|
|
2503
|
+
E(this, De, !1);
|
|
2504
|
+
E(this, Me, "");
|
|
2505
|
+
E(this, Ne, []);
|
|
2506
|
+
v(this, ne, {}), v(this, se, this.deviceInfo()), this.on("state", ({ balance: a, version: n }) => {
|
|
2507
|
+
v(this, ae, n), v(this, Fe, a);
|
|
2508
|
+
}), this.on("autoplay", ({ action: a }) => {
|
|
2509
|
+
["start", "resume"].includes(a) ? v(this, ke, !0) : v(this, ke, !1);
|
|
2510
|
+
}), this.on("settings", ({ fastPlay: a }) => {
|
|
2511
|
+
a !== void 0 && v(this, De, a);
|
|
2552
2512
|
}), this.registerEvents();
|
|
2553
2513
|
}
|
|
2554
2514
|
async registerEvents() {
|
|
2555
|
-
|
|
2556
|
-
this.track("Device Information",
|
|
2515
|
+
y(this, se).then((e) => {
|
|
2516
|
+
this.track("Device Information", e);
|
|
2557
2517
|
}), this.on("loadStart", () => {
|
|
2558
2518
|
this.track("Game Loading", { progress: 0, step: "initial" });
|
|
2559
|
-
}), this.on("loadProgress", (
|
|
2560
|
-
this.track("Game Loading", { progress:
|
|
2519
|
+
}), this.on("loadProgress", (e) => {
|
|
2520
|
+
this.track("Game Loading", { progress: e.progress });
|
|
2561
2521
|
}), this.on("loadEnd", () => {
|
|
2562
2522
|
this.track("Game Loading", { progress: 100, step: "complete" });
|
|
2563
|
-
}), this.on("error", (
|
|
2523
|
+
}), this.on("error", (e) => {
|
|
2564
2524
|
this.track("System Message", {
|
|
2565
|
-
systemMessageText:
|
|
2566
|
-
systemMessageType:
|
|
2525
|
+
systemMessageText: e.messageKey,
|
|
2526
|
+
systemMessageType: e.type
|
|
2567
2527
|
});
|
|
2568
|
-
}), this.on("openGameResponse", async (
|
|
2569
|
-
|
|
2570
|
-
balanceInCoins:
|
|
2571
|
-
clientVersion:
|
|
2528
|
+
}), this.on("openGameResponse", async (e) => {
|
|
2529
|
+
v(this, Me, e.contract.stateType.nextRound), v(this, ne, {
|
|
2530
|
+
balanceInCoins: e.contract.balance.coins,
|
|
2531
|
+
clientVersion: y(this, ae),
|
|
2572
2532
|
coinValueInCents: this.config.api.coinValueInCents,
|
|
2573
2533
|
coinValueInCentsFloat: this.config.api.coinValueInCents,
|
|
2574
2534
|
currency: this.config.api.currency,
|
|
2575
|
-
defaultBaseBet:
|
|
2576
|
-
defaultBetMultiplier:
|
|
2535
|
+
defaultBaseBet: e.contract.bet.default.base,
|
|
2536
|
+
defaultBetMultiplier: e.contract.bet.default.multiplier,
|
|
2577
2537
|
environment: "release",
|
|
2578
2538
|
gameCode: this.config.api.game,
|
|
2579
2539
|
gameCodeServer: this.config.api.game,
|
|
2580
|
-
gameModelFile:
|
|
2540
|
+
gameModelFile: e.contract.gameModel,
|
|
2581
2541
|
jurisdiction: this.config.api.jurisdiction,
|
|
2582
2542
|
languageCode: this.config.ui.language,
|
|
2583
2543
|
operatorName: "kalamba",
|
|
@@ -2588,45 +2548,45 @@ class Wi extends Mi {
|
|
|
2588
2548
|
referrer: window.location.hostname,
|
|
2589
2549
|
// rootTrackingSessionID: 'unknown',
|
|
2590
2550
|
// rtpVariant: 'unknown',
|
|
2591
|
-
serverVersion:
|
|
2551
|
+
serverVersion: e.contract.metaData.version
|
|
2592
2552
|
// testVariants: '',
|
|
2593
|
-
}), this.track("Game Open",
|
|
2594
|
-
}), this.on("playCycleEnd", async (
|
|
2595
|
-
const
|
|
2553
|
+
}), this.track("Game Open", y(this, ne));
|
|
2554
|
+
}), this.on("playCycleEnd", async (e) => {
|
|
2555
|
+
const a = await y(this, se), { base: n, multiplier: r, specialAction: s } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, g = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, b = w - g, A = s || "spin", R = e.contract.roundId;
|
|
2596
2556
|
this.track("Betting Activity", {
|
|
2597
|
-
balance: h -
|
|
2557
|
+
balance: h - b,
|
|
2598
2558
|
balanceAfter: h,
|
|
2599
|
-
baseBet:
|
|
2559
|
+
baseBet: n,
|
|
2600
2560
|
// baseBetIndex,
|
|
2601
|
-
betMultiplier:
|
|
2561
|
+
betMultiplier: r,
|
|
2602
2562
|
betType: A,
|
|
2603
|
-
gameVersion:
|
|
2563
|
+
gameVersion: y(this, ae),
|
|
2604
2564
|
coinValueInCents: this.config.api.coinValueInCents,
|
|
2605
2565
|
coinValueInCentsFloat: this.config.api.coinValueInCents,
|
|
2606
2566
|
currency: this.config.api.currency,
|
|
2607
2567
|
environment: "release",
|
|
2608
2568
|
gameCode: this.config.api.game,
|
|
2609
2569
|
gameCodeServer: this.config.api.game,
|
|
2610
|
-
isMobile:
|
|
2611
|
-
netResult:
|
|
2570
|
+
isMobile: a.isMobile,
|
|
2571
|
+
netResult: b,
|
|
2612
2572
|
operatorName: "kalamba",
|
|
2613
|
-
orientation:
|
|
2573
|
+
orientation: Ye(),
|
|
2614
2574
|
partnerId: this.config.api.brand,
|
|
2615
2575
|
partnerParentId: this.config.api.integration,
|
|
2616
2576
|
platform: "WEB",
|
|
2617
2577
|
playMode: this.config.api.playMode,
|
|
2618
|
-
roundId:
|
|
2578
|
+
roundId: R,
|
|
2619
2579
|
// TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
|
|
2620
2580
|
// roundTypes: [...this.#roundTypes],
|
|
2621
2581
|
roundTypes: ["BaseGame"],
|
|
2622
2582
|
totalBet: g,
|
|
2623
2583
|
totalWin: w
|
|
2624
|
-
}),
|
|
2625
|
-
}), this.on("telemetry.click", (
|
|
2584
|
+
}), v(this, Ne, []);
|
|
2585
|
+
}), this.on("telemetry.click", (e) => {
|
|
2626
2586
|
this.track("UI Interaction", {
|
|
2627
2587
|
action: "click",
|
|
2628
2588
|
...this.getExtraUiInteractionData(),
|
|
2629
|
-
...
|
|
2589
|
+
...e
|
|
2630
2590
|
});
|
|
2631
2591
|
}), this.on("telemetry.orientationChange", () => {
|
|
2632
2592
|
this.track("UI Interaction", {
|
|
@@ -2636,47 +2596,47 @@ class Wi extends Mi {
|
|
|
2636
2596
|
}), this.reportFpsSample(), this.reportFpsRound();
|
|
2637
2597
|
}
|
|
2638
2598
|
reportFpsSample() {
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2642
|
-
this.track("FPS Performance", { ...
|
|
2643
|
-
},
|
|
2644
|
-
|
|
2599
|
+
const e = new xt(), a = () => {
|
|
2600
|
+
e.stop();
|
|
2601
|
+
const r = e.getReport();
|
|
2602
|
+
this.track("FPS Performance", { ...r, fpsType: "sample" }), n();
|
|
2603
|
+
}, n = async () => {
|
|
2604
|
+
e.start(), setTimeout(a, this.FPS_SAMPLE_INTERVAL);
|
|
2645
2605
|
};
|
|
2646
|
-
|
|
2606
|
+
n();
|
|
2647
2607
|
}
|
|
2648
2608
|
reportFpsRound() {
|
|
2649
|
-
const
|
|
2609
|
+
const e = new xt();
|
|
2650
2610
|
this.on("playCycleStart", () => {
|
|
2651
|
-
|
|
2611
|
+
e.start();
|
|
2652
2612
|
}), this.on("playCycleEnd", () => {
|
|
2653
|
-
|
|
2654
|
-
const
|
|
2655
|
-
this.track("FPS Performance", { ...
|
|
2613
|
+
e.stop();
|
|
2614
|
+
const a = e.getReport();
|
|
2615
|
+
this.track("FPS Performance", { ...a, fpsType: "playCycleStart->playCycleEnd" });
|
|
2656
2616
|
});
|
|
2657
2617
|
}
|
|
2658
2618
|
getExtraUiInteractionData() {
|
|
2659
2619
|
return {
|
|
2660
|
-
orientation:
|
|
2661
|
-
stateType:
|
|
2620
|
+
orientation: Ye(),
|
|
2621
|
+
stateType: y(this, Me)
|
|
2662
2622
|
};
|
|
2663
2623
|
}
|
|
2664
2624
|
async deviceInfo() {
|
|
2665
2625
|
var g;
|
|
2666
|
-
const
|
|
2626
|
+
const e = new N(navigator.userAgent), a = Ci(), n = await Ti(), r = e.getBrowser(), s = e.getDevice(), h = e.getOS();
|
|
2667
2627
|
return {
|
|
2668
|
-
browserName:
|
|
2669
|
-
browserVersion:
|
|
2628
|
+
browserName: r.name,
|
|
2629
|
+
browserVersion: r.version,
|
|
2670
2630
|
connection: (g = navigator.connection) == null ? void 0 : g.effectiveType,
|
|
2671
2631
|
deviceName: s.model,
|
|
2672
2632
|
deviceType: s.type,
|
|
2673
2633
|
isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
|
|
2674
|
-
isWebGLSupported:
|
|
2675
|
-
isWebPSupported:
|
|
2634
|
+
isWebGLSupported: a,
|
|
2635
|
+
isWebPSupported: n,
|
|
2676
2636
|
manufacturer: s.vendor,
|
|
2677
2637
|
operatingSystem: h.name,
|
|
2678
2638
|
operatingSystemVersion: h.version,
|
|
2679
|
-
orientation:
|
|
2639
|
+
orientation: Ye(),
|
|
2680
2640
|
pixelRatio: window.devicePixelRatio,
|
|
2681
2641
|
screenHeight: window.screen.height,
|
|
2682
2642
|
screenSize: `${window.screen.width}x${window.screen.height}`,
|
|
@@ -2688,123 +2648,123 @@ class Wi extends Mi {
|
|
|
2688
2648
|
};
|
|
2689
2649
|
}
|
|
2690
2650
|
}
|
|
2691
|
-
Fe = new WeakMap(), ae = new WeakMap(),
|
|
2692
|
-
let
|
|
2693
|
-
const
|
|
2694
|
-
function
|
|
2695
|
-
if (!
|
|
2651
|
+
Fe = new WeakMap(), ae = new WeakMap(), ne = new WeakMap(), se = new WeakMap(), ke = new WeakMap(), De = new WeakMap(), Me = new WeakMap(), Ne = new WeakMap();
|
|
2652
|
+
let Ue;
|
|
2653
|
+
const Ai = new Uint8Array(16);
|
|
2654
|
+
function Pi() {
|
|
2655
|
+
if (!Ue && (Ue = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ue))
|
|
2696
2656
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2697
|
-
return
|
|
2657
|
+
return Ue(Ai);
|
|
2698
2658
|
}
|
|
2699
2659
|
const M = [];
|
|
2700
2660
|
for (let i = 0; i < 256; ++i)
|
|
2701
2661
|
M.push((i + 256).toString(16).slice(1));
|
|
2702
|
-
function
|
|
2703
|
-
return M[i[
|
|
2662
|
+
function xi(i, t = 0) {
|
|
2663
|
+
return M[i[t + 0]] + M[i[t + 1]] + M[i[t + 2]] + M[i[t + 3]] + "-" + M[i[t + 4]] + M[i[t + 5]] + "-" + M[i[t + 6]] + M[i[t + 7]] + "-" + M[i[t + 8]] + M[i[t + 9]] + "-" + M[i[t + 10]] + M[i[t + 11]] + M[i[t + 12]] + M[i[t + 13]] + M[i[t + 14]] + M[i[t + 15]];
|
|
2704
2664
|
}
|
|
2705
|
-
const
|
|
2706
|
-
randomUUID:
|
|
2665
|
+
const Oi = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ot = {
|
|
2666
|
+
randomUUID: Oi
|
|
2707
2667
|
};
|
|
2708
|
-
function Ut(i,
|
|
2709
|
-
if (
|
|
2710
|
-
return
|
|
2668
|
+
function Ut(i, t, e) {
|
|
2669
|
+
if (Ot.randomUUID && !t && !i)
|
|
2670
|
+
return Ot.randomUUID();
|
|
2711
2671
|
i = i || {};
|
|
2712
|
-
const
|
|
2713
|
-
if (
|
|
2714
|
-
|
|
2715
|
-
for (let
|
|
2716
|
-
e
|
|
2717
|
-
return
|
|
2718
|
-
}
|
|
2719
|
-
return
|
|
2672
|
+
const a = i.random || (i.rng || Pi)();
|
|
2673
|
+
if (a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, t) {
|
|
2674
|
+
e = e || 0;
|
|
2675
|
+
for (let n = 0; n < 16; ++n)
|
|
2676
|
+
t[e + n] = a[n];
|
|
2677
|
+
return t;
|
|
2678
|
+
}
|
|
2679
|
+
return xi(a);
|
|
2720
2680
|
}
|
|
2721
2681
|
class Ht {
|
|
2722
|
-
constructor(
|
|
2723
|
-
|
|
2724
|
-
this.config =
|
|
2682
|
+
constructor(t) {
|
|
2683
|
+
p(this, "config");
|
|
2684
|
+
this.config = t;
|
|
2725
2685
|
}
|
|
2726
2686
|
}
|
|
2727
|
-
const
|
|
2728
|
-
var re, ce,
|
|
2729
|
-
class
|
|
2730
|
-
constructor(...
|
|
2731
|
-
super(...
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2687
|
+
const Lt = 25, Bt = 1e4;
|
|
2688
|
+
var oe, re, ce, V, Se;
|
|
2689
|
+
class Wi extends Ht {
|
|
2690
|
+
constructor(...e) {
|
|
2691
|
+
super(...e);
|
|
2692
|
+
E(this, oe, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
|
|
2693
|
+
E(this, re, void 0);
|
|
2694
|
+
E(this, ce, void 0);
|
|
2695
|
+
E(this, V, []);
|
|
2696
|
+
E(this, Se, void 0);
|
|
2697
|
+
p(this, "processQueueForced");
|
|
2698
|
+
v(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), v(this, V, []), v(this, Se, Ut()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, oe), {
|
|
2739
2699
|
method: "OPTIONS"
|
|
2740
|
-
}).catch(
|
|
2700
|
+
}).catch(dt), this.subscribe();
|
|
2741
2701
|
}
|
|
2742
2702
|
subscribe() {
|
|
2743
2703
|
window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
|
|
2744
2704
|
}
|
|
2745
2705
|
schedule() {
|
|
2746
|
-
|
|
2706
|
+
y(this, ce) && clearTimeout(y(this, ce)), v(this, ce, window.setTimeout(() => this.processQueue(), Bt));
|
|
2747
2707
|
}
|
|
2748
|
-
send(
|
|
2749
|
-
|
|
2708
|
+
send(e) {
|
|
2709
|
+
v(this, re, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
|
|
2750
2710
|
try {
|
|
2751
|
-
navigator.sendBeacon(
|
|
2711
|
+
navigator.sendBeacon(y(this, oe), JSON.stringify(e));
|
|
2752
2712
|
} catch {
|
|
2753
|
-
fetch(
|
|
2754
|
-
body: JSON.stringify(
|
|
2713
|
+
fetch(y(this, oe), {
|
|
2714
|
+
body: JSON.stringify(e),
|
|
2755
2715
|
method: "POST",
|
|
2756
2716
|
headers: {
|
|
2757
2717
|
"Content-Type": "application/json"
|
|
2758
2718
|
},
|
|
2759
2719
|
keepalive: !0
|
|
2760
|
-
}).catch(
|
|
2720
|
+
}).catch(dt);
|
|
2761
2721
|
}
|
|
2762
2722
|
this.schedule();
|
|
2763
2723
|
}
|
|
2764
|
-
addToQueue(
|
|
2765
|
-
|
|
2724
|
+
addToQueue(e) {
|
|
2725
|
+
y(this, V).push(e), this.processQueue();
|
|
2766
2726
|
}
|
|
2767
|
-
processQueue(
|
|
2768
|
-
if (!(this.config == null || !this.config.ui.feature.allowTelemetry) && !(!
|
|
2769
|
-
for (;
|
|
2770
|
-
const
|
|
2771
|
-
...
|
|
2772
|
-
sessionID:
|
|
2727
|
+
processQueue(e = !1) {
|
|
2728
|
+
if (!(this.config == null || !this.config.ui.feature.allowTelemetry) && !(!e && y(this, V).length < Lt && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - y(this, re) < Bt))
|
|
2729
|
+
for (; y(this, V).length; ) {
|
|
2730
|
+
const a = y(this, V).splice(0, Lt).map((n) => ({
|
|
2731
|
+
...n,
|
|
2732
|
+
sessionID: y(this, Se),
|
|
2773
2733
|
userID: this.config.api.user
|
|
2774
2734
|
}));
|
|
2775
|
-
this.send(
|
|
2735
|
+
this.send(a);
|
|
2776
2736
|
}
|
|
2777
2737
|
}
|
|
2778
|
-
track(
|
|
2738
|
+
track(e, a) {
|
|
2779
2739
|
this.addToQueue({
|
|
2780
|
-
eventName:
|
|
2781
|
-
eventParams:
|
|
2740
|
+
eventName: e,
|
|
2741
|
+
eventParams: a,
|
|
2782
2742
|
eventTimestamp: /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime(),
|
|
2783
2743
|
eventUUID: Ut()
|
|
2784
2744
|
});
|
|
2785
2745
|
}
|
|
2786
2746
|
}
|
|
2787
|
-
|
|
2788
|
-
const
|
|
2789
|
-
class
|
|
2790
|
-
track(
|
|
2791
|
-
|
|
2747
|
+
oe = new WeakMap(), re = new WeakMap(), ce = new WeakMap(), V = new WeakMap(), Se = new WeakMap();
|
|
2748
|
+
const Ui = U("LoggingTracker", "color:#000000;font-weight:bold;");
|
|
2749
|
+
class $i extends Ht {
|
|
2750
|
+
track(t, e) {
|
|
2751
|
+
Ui(`@${this.config.api.user}`, `[${t}]`, e);
|
|
2792
2752
|
}
|
|
2793
2753
|
}
|
|
2794
2754
|
export {
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2755
|
+
Fi as BasicPlugin,
|
|
2756
|
+
j as CasinoPlugin,
|
|
2757
|
+
Di as DebuggingPlugin,
|
|
2798
2758
|
Ni as GigPlugin,
|
|
2799
2759
|
qi as KalambaBullseyePlugin,
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2760
|
+
Gi as KalambaStargazerPlugin,
|
|
2761
|
+
Wi as KalambaStargazerTracker,
|
|
2762
|
+
$i as LoggingTracker,
|
|
2763
|
+
Ri as OryxPlugin,
|
|
2764
|
+
Hi as PariplayPlugin,
|
|
2765
|
+
Vi as RelaxFEIMPlugin,
|
|
2766
|
+
Kt as RgsPlygin,
|
|
2767
|
+
ki as TelemetryPlugin,
|
|
2808
2768
|
Ht as Tracker,
|
|
2809
|
-
|
|
2769
|
+
zi as TukoPlugin
|
|
2810
2770
|
};
|