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