@kalamba/sdk 0.13.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/errors-BXO3dlhS.cjs +5 -0
- package/dist/{errors-7cbbda8a.js → errors-NnLrKjTz.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -14
- package/dist/index.js +158 -121
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +9 -15
- package/dist/plugins.js +477 -465
- package/dist/v4-BL_nLifx.js +45 -0
- package/dist/v4-C9_uc0A9.cjs +5 -0
- package/dist/wrapper.cjs +1 -1
- package/dist/wrapper.d.ts +7 -14
- package/dist/wrapper.js +2362 -1360
- package/package.json +3 -3
- package/dist/errors-db453887.cjs +0 -5
- package/dist/v4-58efbfa1.js +0 -48
- package/dist/v4-bada56b0.cjs +0 -5
package/dist/plugins.js
CHANGED
|
@@ -2,28 +2,24 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2025, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
if (!t.has(s))
|
|
9
|
-
throw TypeError("Cannot " + e);
|
|
5
|
+
var jt = Object.defineProperty;
|
|
6
|
+
var ct = (s) => {
|
|
7
|
+
throw TypeError(s);
|
|
10
8
|
};
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import { a as Be } from "./errors-7cbbda8a.js";
|
|
17
|
-
import { a as ot, v as Wt } from "./v4-58efbfa1.js";
|
|
9
|
+
var Kt = (s, t, e) => t in s ? jt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
10
|
+
var m = (s, t, e) => Kt(s, typeof t != "symbol" ? t + "" : t, e), dt = (s, t, e) => t.has(s) || ct("Cannot " + e);
|
|
11
|
+
var y = (s, t, e) => (dt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), C = (s, t, e) => t.has(s) ? ct("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), E = (s, t, e, i) => (dt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
|
12
|
+
import { a as Fe } from "./errors-NnLrKjTz.js";
|
|
13
|
+
import { r as Qt, g as Xt, v as Jt } from "./v4-BL_nLifx.js";
|
|
18
14
|
function O(s, t) {
|
|
19
15
|
return (e, ...i) => {
|
|
20
16
|
console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
|
|
21
17
|
};
|
|
22
18
|
}
|
|
23
|
-
function
|
|
19
|
+
function _t(s, t) {
|
|
24
20
|
return Math.round(s * 100 / t);
|
|
25
21
|
}
|
|
26
|
-
class
|
|
22
|
+
class V {
|
|
27
23
|
constructor(t, e) {
|
|
28
24
|
m(this, "config");
|
|
29
25
|
m(this, "sdkConfig");
|
|
@@ -42,10 +38,10 @@ class z {
|
|
|
42
38
|
});
|
|
43
39
|
}
|
|
44
40
|
}
|
|
45
|
-
const
|
|
46
|
-
class
|
|
41
|
+
const Yt = O("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
42
|
+
class Ni extends V {
|
|
47
43
|
constructor(...t) {
|
|
48
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
44
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Yt("configured");
|
|
49
45
|
}
|
|
50
46
|
registerToSdkEvents() {
|
|
51
47
|
window.addEventListener("message", (t) => {
|
|
@@ -56,8 +52,8 @@ class Oi extends z {
|
|
|
56
52
|
this.send("settings", { music: i == null ? void 0 : i.musicEnabled, sounds: i == null ? void 0 : i.soundEnabled });
|
|
57
53
|
return;
|
|
58
54
|
case "doBalanceUpdate":
|
|
59
|
-
const { currency: a, coinValueInCents:
|
|
60
|
-
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance:
|
|
55
|
+
const { currency: a, coinValueInCents: r } = this.sdkConfig.api;
|
|
56
|
+
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: _t(i.balanceInCurrency, r) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
|
|
61
57
|
return;
|
|
62
58
|
case "doGamePause":
|
|
63
59
|
this.send("freeze");
|
|
@@ -92,8 +88,8 @@ class Oi extends z {
|
|
|
92
88
|
});
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
|
-
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"),
|
|
96
|
-
class
|
|
91
|
+
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Zt = O("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
|
|
92
|
+
class Di extends V {
|
|
97
93
|
constructor(...t) {
|
|
98
94
|
super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
|
|
99
95
|
}
|
|
@@ -117,13 +113,13 @@ class xi extends z {
|
|
|
117
113
|
this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
|
|
118
114
|
}
|
|
119
115
|
_send(...t) {
|
|
120
|
-
|
|
116
|
+
Zt(...t), this.send(...t);
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
|
-
const
|
|
124
|
-
class
|
|
119
|
+
const ei = O("GigPlugin", "color:#000000;font-weight:bold;");
|
|
120
|
+
class Gi extends V {
|
|
125
121
|
constructor(...t) {
|
|
126
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
122
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ei("configured");
|
|
127
123
|
}
|
|
128
124
|
postMessage(t) {
|
|
129
125
|
const e = {
|
|
@@ -171,10 +167,10 @@ class Ri extends z {
|
|
|
171
167
|
});
|
|
172
168
|
}
|
|
173
169
|
}
|
|
174
|
-
const
|
|
175
|
-
class
|
|
170
|
+
const ti = O("OryxPlugin", "color:#000000;font-weight:bold;");
|
|
171
|
+
class Hi extends V {
|
|
176
172
|
constructor(...t) {
|
|
177
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
173
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ti("configured");
|
|
178
174
|
}
|
|
179
175
|
registerToSdkEvents() {
|
|
180
176
|
window.addEventListener("message", (t) => {
|
|
@@ -226,54 +222,54 @@ class Li extends z {
|
|
|
226
222
|
});
|
|
227
223
|
}
|
|
228
224
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
225
|
+
const Ge = O("PariplayPlugin", "color:#000000;font-weight:bold;");
|
|
226
|
+
function He(s) {
|
|
231
227
|
try {
|
|
232
228
|
window.top.location = s;
|
|
233
229
|
} catch {
|
|
234
230
|
window.location = s;
|
|
235
231
|
}
|
|
236
232
|
}
|
|
237
|
-
function
|
|
233
|
+
function Ve(s, t) {
|
|
238
234
|
return new Promise(function(i, a) {
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
235
|
+
const r = new XMLHttpRequest();
|
|
236
|
+
r.onload = function() {
|
|
237
|
+
r.status >= 200 && r.status < 300 ? i(r.responseText) : a(r.responseText);
|
|
238
|
+
}, r.open(s, t), r.send();
|
|
243
239
|
});
|
|
244
240
|
}
|
|
245
|
-
function
|
|
241
|
+
function ze() {
|
|
246
242
|
}
|
|
247
|
-
function
|
|
243
|
+
function ii(s) {
|
|
248
244
|
return s.filter(function(e) {
|
|
249
245
|
return e.messageType.toUpperCase() === "DATA";
|
|
250
246
|
});
|
|
251
247
|
}
|
|
252
|
-
function
|
|
248
|
+
function qe(s) {
|
|
253
249
|
return s.filter(function(e) {
|
|
254
250
|
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
255
251
|
});
|
|
256
252
|
}
|
|
257
|
-
function
|
|
253
|
+
function Bt(s) {
|
|
258
254
|
try {
|
|
259
255
|
return JSON.parse(s.text);
|
|
260
256
|
} catch {
|
|
261
257
|
return {};
|
|
262
258
|
}
|
|
263
259
|
}
|
|
264
|
-
function
|
|
265
|
-
return s.map(
|
|
260
|
+
function si(s) {
|
|
261
|
+
return s.map(Bt).filter(Boolean).find(function(e) {
|
|
266
262
|
return e.betId != null && e.winId != null;
|
|
267
263
|
}) || {};
|
|
268
264
|
}
|
|
269
|
-
function
|
|
270
|
-
return s.map(
|
|
265
|
+
function ai(s) {
|
|
266
|
+
return s.map(Bt).filter(Boolean).find(function(e) {
|
|
271
267
|
return e.TotalBet != null && e.TotalWin != null;
|
|
272
268
|
}) || {};
|
|
273
269
|
}
|
|
274
|
-
class
|
|
270
|
+
class Vi extends V {
|
|
275
271
|
constructor(...t) {
|
|
276
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
272
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ge("configured");
|
|
277
273
|
}
|
|
278
274
|
postMessage(t, e) {
|
|
279
275
|
const i = {
|
|
@@ -281,26 +277,26 @@ class Ui extends z {
|
|
|
281
277
|
sender: this.sdkConfig.api.game,
|
|
282
278
|
type: t
|
|
283
279
|
};
|
|
284
|
-
e != null && (i.data = e),
|
|
280
|
+
e != null && (i.data = e), Ge("postMessage", i), window.parent.postMessage(i, "*");
|
|
285
281
|
}
|
|
286
282
|
coinsToCurrency(t) {
|
|
287
283
|
return t * this.sdkConfig.api.coinValueInCents / 100;
|
|
288
284
|
}
|
|
289
285
|
handleContinueButton(t, e) {
|
|
290
|
-
t.link &&
|
|
286
|
+
t.link && Ve("GET", t.link), e();
|
|
291
287
|
}
|
|
292
288
|
handleLinkButton(t, e) {
|
|
293
289
|
switch (t.linkType.toUpperCase()) {
|
|
294
290
|
case "AJAX":
|
|
295
|
-
|
|
291
|
+
Ve("GET", t.link), e();
|
|
296
292
|
return;
|
|
297
293
|
case "AJAXRESPONSE":
|
|
298
|
-
|
|
294
|
+
Ve("GET", t.link).then(() => {
|
|
299
295
|
e();
|
|
300
296
|
});
|
|
301
297
|
return;
|
|
302
298
|
case "REDIRECT":
|
|
303
|
-
|
|
299
|
+
He(t.link), e();
|
|
304
300
|
return;
|
|
305
301
|
}
|
|
306
302
|
}
|
|
@@ -324,16 +320,17 @@ class Ui extends z {
|
|
|
324
320
|
}
|
|
325
321
|
processInfoUiMessages(t) {
|
|
326
322
|
return t.reduce((e, i) => e.then(() => new Promise((a) => {
|
|
327
|
-
Object.assign({}, i, {
|
|
328
|
-
buttons: i.buttons.filter((
|
|
323
|
+
const r = Object.assign({}, i, {
|
|
324
|
+
buttons: i.buttons.filter((n) => n.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((n) => Object.assign({}, n, {
|
|
329
325
|
onRelease: () => {
|
|
330
|
-
const
|
|
331
|
-
|
|
326
|
+
const h = i.messageType.toUpperCase() === "POPUP" ? ze : a, p = this.buttonActions[n.action.toUpperCase()];
|
|
327
|
+
p ? p(n, h) : h();
|
|
332
328
|
}
|
|
333
329
|
}))
|
|
334
330
|
});
|
|
335
|
-
|
|
336
|
-
}).catch(
|
|
331
|
+
Ge("showMessage", r);
|
|
332
|
+
}).catch(ze)), Promise.resolve()).then(() => {
|
|
333
|
+
}).catch(ze);
|
|
337
334
|
}
|
|
338
335
|
registerToSdkEvents() {
|
|
339
336
|
window.addEventListener("message", (t) => {
|
|
@@ -365,12 +362,12 @@ class Ui extends z {
|
|
|
365
362
|
try {
|
|
366
363
|
const a = JSON.parse(
|
|
367
364
|
JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
|
|
368
|
-
),
|
|
365
|
+
), r = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
|
|
369
366
|
i = {
|
|
370
367
|
ClientToken: a.integrationSpecificAttributes.clientToken,
|
|
371
368
|
CurrencyCode: a.currency,
|
|
372
369
|
PlayerTokenId: a.user,
|
|
373
|
-
SessionData:
|
|
370
|
+
SessionData: r
|
|
374
371
|
};
|
|
375
372
|
} catch {
|
|
376
373
|
i = void 0;
|
|
@@ -380,7 +377,7 @@ class Ui extends z {
|
|
|
380
377
|
success: !0
|
|
381
378
|
});
|
|
382
379
|
try {
|
|
383
|
-
const a =
|
|
380
|
+
const a = qe(e.contract.uiMessages);
|
|
384
381
|
this.processInfoUiMessages(a);
|
|
385
382
|
} catch {
|
|
386
383
|
}
|
|
@@ -396,15 +393,14 @@ class Ui extends z {
|
|
|
396
393
|
} catch {
|
|
397
394
|
window.history.back();
|
|
398
395
|
}
|
|
399
|
-
else
|
|
400
|
-
this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ne(this.sdkConfig.api.homeUrl);
|
|
396
|
+
else this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : He(this.sdkConfig.api.homeUrl);
|
|
401
397
|
}), this.on("playEnd", (e) => {
|
|
402
398
|
this.postMessage("roundEnded", {
|
|
403
399
|
balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
|
|
404
400
|
win: this.coinsToCurrency(e.contract.win.round)
|
|
405
401
|
});
|
|
406
402
|
try {
|
|
407
|
-
const i =
|
|
403
|
+
const i = qe(e.contract.uiMessages);
|
|
408
404
|
this.processInfoUiMessages(i);
|
|
409
405
|
} catch {
|
|
410
406
|
}
|
|
@@ -424,13 +420,13 @@ class Ui extends z {
|
|
|
424
420
|
e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
|
|
425
421
|
)
|
|
426
422
|
});
|
|
427
|
-
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a =
|
|
423
|
+
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = ii(e.contract.uiMessages), r = qe(e.contract.uiMessages), n = si(a), h = ai(a);
|
|
428
424
|
this.postMessage("ticketReceived", {
|
|
429
425
|
Balance: this.coinsToCurrency(e.contract.balance.coins),
|
|
430
426
|
BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
|
|
431
427
|
CreditTransactionId: n.betId,
|
|
432
428
|
DebitTransactionId: n.winId,
|
|
433
|
-
Message:
|
|
429
|
+
Message: r,
|
|
434
430
|
SessionData: h,
|
|
435
431
|
Status: {
|
|
436
432
|
ErrCode: 0
|
|
@@ -446,12 +442,12 @@ class Ui extends z {
|
|
|
446
442
|
}), this.on("loadStart", () => {
|
|
447
443
|
this.postMessage("onAppFrameReady");
|
|
448
444
|
}), this.on("cashier", () => {
|
|
449
|
-
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") : He(this.sdkConfig.api.cashierUrl));
|
|
450
446
|
});
|
|
451
447
|
}
|
|
452
448
|
}
|
|
453
449
|
const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
454
|
-
class
|
|
450
|
+
class zi extends V {
|
|
455
451
|
constructor(...e) {
|
|
456
452
|
super(...e);
|
|
457
453
|
m(this, "VERSION", "1.17.0");
|
|
@@ -525,20 +521,20 @@ class _i extends z {
|
|
|
525
521
|
});
|
|
526
522
|
}
|
|
527
523
|
}
|
|
528
|
-
const
|
|
529
|
-
class
|
|
524
|
+
const We = O("TukoPlugin", "color:#000000;font-weight:bold;");
|
|
525
|
+
class qi extends V {
|
|
530
526
|
constructor(...e) {
|
|
531
527
|
super(...e);
|
|
532
528
|
m(this, "PING_INTERVAL", 1e4);
|
|
533
529
|
const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
|
|
534
530
|
a && window.setInterval(() => {
|
|
535
531
|
this.ping(a);
|
|
536
|
-
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
532
|
+
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), We("configured");
|
|
537
533
|
}
|
|
538
534
|
ping(e) {
|
|
539
535
|
const i = new XMLHttpRequest();
|
|
540
536
|
i.onreadystatechange = function() {
|
|
541
|
-
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ?
|
|
537
|
+
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? We("ping ok", i) : We("ping error", i));
|
|
542
538
|
}, i.open("GET", e), i.send();
|
|
543
539
|
}
|
|
544
540
|
registerToSdkEvents() {
|
|
@@ -550,8 +546,8 @@ class Bi extends z {
|
|
|
550
546
|
this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
|
|
551
547
|
return;
|
|
552
548
|
case "doBalanceUpdate":
|
|
553
|
-
const { currency:
|
|
554
|
-
a.currency ===
|
|
549
|
+
const { currency: r, coinValueInCents: n } = this.sdkConfig.api;
|
|
550
|
+
a.currency === r && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: _t(a.balanceInCurrency, n) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
|
|
555
551
|
return;
|
|
556
552
|
case "doGamePause":
|
|
557
553
|
this.send("freeze");
|
|
@@ -586,14 +582,14 @@ class Bi extends z {
|
|
|
586
582
|
});
|
|
587
583
|
}
|
|
588
584
|
}
|
|
589
|
-
const
|
|
590
|
-
class
|
|
585
|
+
const lt = O("QuantaPlugin", "color:#000000;font-weight:bold;");
|
|
586
|
+
class Wi extends V {
|
|
591
587
|
constructor(...t) {
|
|
592
|
-
super(...t), this.registerFromSdkEvents(),
|
|
588
|
+
super(...t), this.registerFromSdkEvents(), lt("configured");
|
|
593
589
|
}
|
|
594
590
|
postMessage(t) {
|
|
595
591
|
const e = { event: t };
|
|
596
|
-
|
|
592
|
+
lt("QuantaPlugin::postMessage", e), window.parent.postMessage(e, "*");
|
|
597
593
|
}
|
|
598
594
|
registerFromSdkEvents() {
|
|
599
595
|
this.on("close", () => {
|
|
@@ -609,13 +605,13 @@ class Fi extends z {
|
|
|
609
605
|
});
|
|
610
606
|
}
|
|
611
607
|
}
|
|
612
|
-
var
|
|
608
|
+
var ni = "2.0.0-beta.3", re = "", ut = "?", Ye = "function", G = "undefined", ce = "object", Ze = "string", we = "major", l = "model", o = "name", d = "type", u = "vendor", c = "version", M = "architecture", J = "console", b = "mobile", f = "tablet", I = "smarttv", Pe = "wearable", ht = "xr", et = "embedded", pt = "user-agent", tt = 500, at = "brands", W = "formFactors", nt = "fullVersionList", Y = "platform", ot = "platformVersion", Ne = "bitness", z = "sec-ch-ua", oi = z + "-full-version-list", ri = z + "-arch", ci = z + "-" + Ne, di = z + "-form-factors", li = z + "-" + b, ui = z + "-" + l, Ft = z + "-" + Y, hi = Ft + "-version", Nt = [at, nt, b, l, Y, ot, M, W, Ne], T = "browser", L = "cpu", x = "device", _ = "engine", A = "os", Z = "result", ve = "Amazon", he = "Apple", gt = "ASUS", mt = "BlackBerry", Ce = "Google", wt = "Huawei", bt = "Lenovo", $e = "LG", Oe = "Microsoft", ft = "Motorola", Me = "Samsung", yt = "Sharp", Se = "Sony", je = "Xiaomi", Ke = "Zebra", Q = "Mobile ", X = " Browser", Ie = "Chrome", pi = "Edge", pe = "Firefox", ge = "Opera", kt = "Facebook", Et = "Sogou", it = "Windows", gi = typeof window !== G, S = gi && window.navigator ? window.navigator : void 0, N = S && S.userAgentData ? S.userAgentData : void 0, mi = function(s, t) {
|
|
613
609
|
var e = {}, i = t;
|
|
614
|
-
if (!
|
|
610
|
+
if (!xe(t)) {
|
|
615
611
|
i = {};
|
|
616
612
|
for (var a in t)
|
|
617
|
-
for (var
|
|
618
|
-
i[
|
|
613
|
+
for (var r in t[a])
|
|
614
|
+
i[r] = t[a][r].concat(i[r] ? i[r] : []);
|
|
619
615
|
}
|
|
620
616
|
for (var n in s)
|
|
621
617
|
e[n] = i[n] && i[n].length % 2 === 0 ? i[n].concat(s[n]) : s[n];
|
|
@@ -624,20 +620,19 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
624
620
|
for (var t = {}, e = 0; e < s.length; e++)
|
|
625
621
|
t[s[e].toUpperCase()] = s[e];
|
|
626
622
|
return t;
|
|
627
|
-
},
|
|
623
|
+
}, st = function(s, t) {
|
|
628
624
|
if (typeof s === ce && s.length > 0) {
|
|
629
625
|
for (var e in s)
|
|
630
|
-
if (
|
|
631
|
-
return !0;
|
|
626
|
+
if (H(s[e]) == H(t)) return !0;
|
|
632
627
|
return !1;
|
|
633
628
|
}
|
|
634
|
-
return de(s) ?
|
|
635
|
-
},
|
|
629
|
+
return de(s) ? H(t).indexOf(H(s)) !== -1 : !1;
|
|
630
|
+
}, xe = function(s, t) {
|
|
636
631
|
for (var e in s)
|
|
637
|
-
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ?
|
|
632
|
+
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? xe(s[e]) : !1);
|
|
638
633
|
}, de = function(s) {
|
|
639
|
-
return typeof s ===
|
|
640
|
-
},
|
|
634
|
+
return typeof s === Ze;
|
|
635
|
+
}, Qe = function(s) {
|
|
641
636
|
if (s) {
|
|
642
637
|
for (var t = [], e = $(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
|
|
643
638
|
if (e[i].indexOf(";") > -1) {
|
|
@@ -647,11 +642,11 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
647
642
|
t[i] = be(e[i]);
|
|
648
643
|
return t;
|
|
649
644
|
}
|
|
650
|
-
},
|
|
645
|
+
}, H = function(s) {
|
|
651
646
|
return de(s) ? s.toLowerCase() : s;
|
|
652
|
-
},
|
|
647
|
+
}, Xe = function(s) {
|
|
653
648
|
return de(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
|
|
654
|
-
},
|
|
649
|
+
}, B = function(s) {
|
|
655
650
|
for (var t in s) {
|
|
656
651
|
var e = s[t];
|
|
657
652
|
typeof e == ce && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
|
|
@@ -663,27 +658,27 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
663
658
|
return $(/\\?\"/g, s);
|
|
664
659
|
}, be = function(s, t) {
|
|
665
660
|
if (de(s))
|
|
666
|
-
return s = $(/^\s\s*/, s), typeof t ===
|
|
667
|
-
},
|
|
661
|
+
return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0, tt);
|
|
662
|
+
}, vt = function(s, t) {
|
|
668
663
|
if (!(!s || !t))
|
|
669
|
-
for (var e = 0, i, a,
|
|
664
|
+
for (var e = 0, i, a, r, n, h, p; e < t.length && !h; ) {
|
|
670
665
|
var w = t[e], g = t[e + 1];
|
|
671
666
|
for (i = a = 0; i < w.length && !h && w[i]; )
|
|
672
667
|
if (h = w[i++].exec(s), h)
|
|
673
|
-
for (
|
|
674
|
-
p = h[++a], n = g[
|
|
668
|
+
for (r = 0; r < g.length; r++)
|
|
669
|
+
p = h[++a], n = g[r], typeof n === ce && n.length > 0 ? n.length === 2 ? typeof n[1] == Ye ? this[n[0]] = n[1].call(this, p) : this[n[0]] = n[1] : n.length === 3 ? typeof n[1] === Ye && !(n[1].exec && n[1].test) ? this[n[0]] = p ? n[1].call(this, p, n[2]) : void 0 : this[n[0]] = p ? p.replace(n[1], n[2]) : void 0 : n.length === 4 && (this[n[0]] = p ? n[3].call(this, p.replace(n[1], n[2])) : void 0) : this[n] = p || void 0;
|
|
675
670
|
e += 2;
|
|
676
671
|
}
|
|
677
|
-
},
|
|
672
|
+
}, Re = function(s, t) {
|
|
678
673
|
for (var e in t)
|
|
679
674
|
if (typeof t[e] === ce && t[e].length > 0) {
|
|
680
675
|
for (var i = 0; i < t[e].length; i++)
|
|
681
|
-
if (
|
|
682
|
-
return e ===
|
|
683
|
-
} else if (
|
|
684
|
-
return e ===
|
|
676
|
+
if (st(t[e][i], s))
|
|
677
|
+
return e === ut ? void 0 : e;
|
|
678
|
+
} else if (st(t[e], s))
|
|
679
|
+
return e === ut ? void 0 : e;
|
|
685
680
|
return t.hasOwnProperty("*") ? t["*"] : s;
|
|
686
|
-
},
|
|
681
|
+
}, Ct = {
|
|
687
682
|
ME: "4.90",
|
|
688
683
|
"NT 3.11": "NT3.51",
|
|
689
684
|
"NT 4.0": "NT4.0",
|
|
@@ -695,7 +690,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
695
690
|
"8.1": "NT 6.3",
|
|
696
691
|
10: ["NT 6.4", "NT 10.0"],
|
|
697
692
|
RT: "ARM"
|
|
698
|
-
},
|
|
693
|
+
}, Mt = {
|
|
699
694
|
embedded: "Automotive",
|
|
700
695
|
mobile: "Mobile",
|
|
701
696
|
tablet: ["Tablet", "EInk"],
|
|
@@ -704,19 +699,19 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
704
699
|
xr: ["VR", "XR"],
|
|
705
700
|
"?": ["Desktop", "Unknown"],
|
|
706
701
|
"*": void 0
|
|
707
|
-
},
|
|
702
|
+
}, St = {
|
|
708
703
|
browser: [
|
|
709
704
|
[
|
|
710
705
|
// Most common regardless engine
|
|
711
706
|
/\b(?:crmo|crios)\/([\w\.]+)/i
|
|
712
707
|
// Chrome for Android/iOS
|
|
713
708
|
],
|
|
714
|
-
[c, [
|
|
709
|
+
[c, [o, Q + "Chrome"]],
|
|
715
710
|
[
|
|
716
711
|
/edg(?:e|ios|a)?\/([\w\.]+)/i
|
|
717
712
|
// Microsoft Edge
|
|
718
713
|
],
|
|
719
|
-
[c, [
|
|
714
|
+
[c, [o, "Edge"]],
|
|
720
715
|
[
|
|
721
716
|
// Presto based
|
|
722
717
|
/(opera mini)\/([-\w\.]+)/i,
|
|
@@ -726,28 +721,28 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
726
721
|
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
|
727
722
|
// Opera
|
|
728
723
|
],
|
|
729
|
-
[
|
|
724
|
+
[o, c],
|
|
730
725
|
[
|
|
731
726
|
/opios[\/ ]+([\w\.]+)/i
|
|
732
727
|
// Opera mini on iphone >= 8.0
|
|
733
728
|
],
|
|
734
|
-
[c, [
|
|
729
|
+
[c, [o, ge + " Mini"]],
|
|
735
730
|
[
|
|
736
731
|
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
737
732
|
// Opera GX
|
|
738
733
|
],
|
|
739
|
-
[c, [
|
|
734
|
+
[c, [o, ge + " GX"]],
|
|
740
735
|
[
|
|
741
736
|
/\bopr\/([\w\.]+)/i
|
|
742
737
|
// Opera Webkit
|
|
743
738
|
],
|
|
744
|
-
[c, [
|
|
739
|
+
[c, [o, ge]],
|
|
745
740
|
[
|
|
746
741
|
// Mixed
|
|
747
742
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
748
743
|
// Baidu
|
|
749
744
|
],
|
|
750
|
-
[c, [
|
|
745
|
+
[c, [o, "Baidu"]],
|
|
751
746
|
[
|
|
752
747
|
/(kindle)\/([\w\.]+)/i,
|
|
753
748
|
// Kindle
|
|
@@ -766,17 +761,17 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
766
761
|
/(weibo)__([\d\.]+)/i
|
|
767
762
|
// Weibo
|
|
768
763
|
],
|
|
769
|
-
[
|
|
764
|
+
[o, c],
|
|
770
765
|
[
|
|
771
766
|
/\bddg\/([\w\.]+)/i
|
|
772
767
|
// DuckDuckGo
|
|
773
768
|
],
|
|
774
|
-
[c, [
|
|
769
|
+
[c, [o, "DuckDuckGo"]],
|
|
775
770
|
[
|
|
776
771
|
/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i
|
|
777
772
|
// UCBrowser
|
|
778
773
|
],
|
|
779
|
-
[c, [
|
|
774
|
+
[c, [o, "UCBrowser"]],
|
|
780
775
|
[
|
|
781
776
|
/microm.+\bqbcore\/([\w\.]+)/i,
|
|
782
777
|
// WeChat Desktop for Windows Built-in Browser
|
|
@@ -784,102 +779,102 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
784
779
|
/micromessenger\/([\w\.]+)/i
|
|
785
780
|
// WeChat
|
|
786
781
|
],
|
|
787
|
-
[c, [
|
|
782
|
+
[c, [o, "WeChat"]],
|
|
788
783
|
[
|
|
789
784
|
/konqueror\/([\w\.]+)/i
|
|
790
785
|
// Konqueror
|
|
791
786
|
],
|
|
792
|
-
[c, [
|
|
787
|
+
[c, [o, "Konqueror"]],
|
|
793
788
|
[
|
|
794
789
|
/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i
|
|
795
790
|
// IE11
|
|
796
791
|
],
|
|
797
|
-
[c, [
|
|
792
|
+
[c, [o, "IE"]],
|
|
798
793
|
[
|
|
799
794
|
/ya(?:search)?browser\/([\w\.]+)/i
|
|
800
795
|
// Yandex
|
|
801
796
|
],
|
|
802
|
-
[c, [
|
|
797
|
+
[c, [o, "Yandex"]],
|
|
803
798
|
[
|
|
804
799
|
/slbrowser\/([\w\.]+)/i
|
|
805
800
|
// Smart Lenovo Browser
|
|
806
801
|
],
|
|
807
|
-
[c, [
|
|
802
|
+
[c, [o, "Smart " + bt + X]],
|
|
808
803
|
[
|
|
809
804
|
/(avast|avg)\/([\w\.]+)/i
|
|
810
805
|
// Avast/AVG Secure Browser
|
|
811
806
|
],
|
|
812
|
-
[[
|
|
807
|
+
[[o, /(.+)/, "$1 Secure" + X], c],
|
|
813
808
|
[
|
|
814
809
|
/\bfocus\/([\w\.]+)/i
|
|
815
810
|
// Firefox Focus
|
|
816
811
|
],
|
|
817
|
-
[c, [
|
|
812
|
+
[c, [o, pe + " Focus"]],
|
|
818
813
|
[
|
|
819
814
|
/\bopt\/([\w\.]+)/i
|
|
820
815
|
// Opera Touch
|
|
821
816
|
],
|
|
822
|
-
[c, [
|
|
817
|
+
[c, [o, ge + " Touch"]],
|
|
823
818
|
[
|
|
824
819
|
/coc_coc\w+\/([\w\.]+)/i
|
|
825
820
|
// Coc Coc Browser
|
|
826
821
|
],
|
|
827
|
-
[c, [
|
|
822
|
+
[c, [o, "Coc Coc"]],
|
|
828
823
|
[
|
|
829
824
|
/dolfin\/([\w\.]+)/i
|
|
830
825
|
// Dolphin
|
|
831
826
|
],
|
|
832
|
-
[c, [
|
|
827
|
+
[c, [o, "Dolphin"]],
|
|
833
828
|
[
|
|
834
829
|
/coast\/([\w\.]+)/i
|
|
835
830
|
// Opera Coast
|
|
836
831
|
],
|
|
837
|
-
[c, [
|
|
832
|
+
[c, [o, ge + " Coast"]],
|
|
838
833
|
[
|
|
839
834
|
/miuibrowser\/([\w\.]+)/i
|
|
840
835
|
// MIUI Browser
|
|
841
836
|
],
|
|
842
|
-
[c, [
|
|
837
|
+
[c, [o, "MIUI" + X]],
|
|
843
838
|
[
|
|
844
839
|
/fxios\/([\w\.-]+)/i
|
|
845
840
|
// Firefox for iOS
|
|
846
841
|
],
|
|
847
|
-
[c, [
|
|
842
|
+
[c, [o, Q + pe]],
|
|
848
843
|
[
|
|
849
844
|
/\bqihu|(qi?ho?o?|360)browser/i
|
|
850
845
|
// 360
|
|
851
846
|
],
|
|
852
|
-
[[
|
|
847
|
+
[[o, "360" + X]],
|
|
853
848
|
[
|
|
854
849
|
/\b(qq)\/([\w\.]+)/i
|
|
855
850
|
// QQ
|
|
856
851
|
],
|
|
857
|
-
[[
|
|
852
|
+
[[o, /(.+)/, "$1Browser"], c],
|
|
858
853
|
[
|
|
859
854
|
/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
|
|
860
855
|
],
|
|
861
|
-
[[
|
|
856
|
+
[[o, /(.+)/, "$1" + X], c],
|
|
862
857
|
[
|
|
863
858
|
// Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
|
|
864
859
|
/samsungbrowser\/([\w\.]+)/i
|
|
865
860
|
// Samsung Internet
|
|
866
861
|
],
|
|
867
|
-
[c, [
|
|
862
|
+
[c, [o, Me + " Internet"]],
|
|
868
863
|
[
|
|
869
864
|
/(comodo_dragon)\/([\w\.]+)/i
|
|
870
865
|
// Comodo Dragon
|
|
871
866
|
],
|
|
872
|
-
[[
|
|
867
|
+
[[o, /_/g, " "], c],
|
|
873
868
|
[
|
|
874
869
|
/metasr[\/ ]?([\d\.]+)/i
|
|
875
870
|
// Sogou Explorer
|
|
876
871
|
],
|
|
877
|
-
[c, [
|
|
872
|
+
[c, [o, Et + " Explorer"]],
|
|
878
873
|
[
|
|
879
874
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
880
875
|
// Sogou Mobile
|
|
881
876
|
],
|
|
882
|
-
[[
|
|
877
|
+
[[o, Et + " Mobile"], c],
|
|
883
878
|
[
|
|
884
879
|
/(electron)\/([\w\.]+) safari/i,
|
|
885
880
|
// Electron-based App
|
|
@@ -888,20 +883,20 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
888
883
|
/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i
|
|
889
884
|
// QQBrowser/2345 Browser
|
|
890
885
|
],
|
|
891
|
-
[
|
|
886
|
+
[o, c],
|
|
892
887
|
[
|
|
893
888
|
/(lbbrowser|rekonq)/i,
|
|
894
889
|
// LieBao Browser/Rekonq
|
|
895
890
|
/\[(linkedin)app\]/i
|
|
896
891
|
// LinkedIn App for iOS & Android
|
|
897
892
|
],
|
|
898
|
-
[
|
|
893
|
+
[o],
|
|
899
894
|
[
|
|
900
895
|
// WebView
|
|
901
896
|
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
902
897
|
// Facebook App for iOS & Android
|
|
903
898
|
],
|
|
904
|
-
[[
|
|
899
|
+
[[o, kt], c],
|
|
905
900
|
[
|
|
906
901
|
/(Klarna)\/([\w\.]+)/i,
|
|
907
902
|
// Klarna Shopping Browser for iOS & Android
|
|
@@ -920,86 +915,86 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
920
915
|
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i
|
|
921
916
|
// Chromium/Instagram/Snapchat
|
|
922
917
|
],
|
|
923
|
-
[
|
|
918
|
+
[o, c],
|
|
924
919
|
[
|
|
925
920
|
/\bgsa\/([\w\.]+) .*safari\//i
|
|
926
921
|
// Google Search Appliance on iOS
|
|
927
922
|
],
|
|
928
|
-
[c, [
|
|
923
|
+
[c, [o, "GSA"]],
|
|
929
924
|
[
|
|
930
925
|
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
|
931
926
|
// TikTok
|
|
932
927
|
],
|
|
933
|
-
[c, [
|
|
928
|
+
[c, [o, "TikTok"]],
|
|
934
929
|
[
|
|
935
930
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
936
931
|
// Chrome Headless
|
|
937
932
|
],
|
|
938
|
-
[c, [
|
|
933
|
+
[c, [o, Ie + " Headless"]],
|
|
939
934
|
[
|
|
940
935
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
941
936
|
// Chrome WebView
|
|
942
937
|
],
|
|
943
|
-
[[
|
|
938
|
+
[[o, Ie + " WebView"], c],
|
|
944
939
|
[
|
|
945
940
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
946
941
|
// Android Browser
|
|
947
942
|
],
|
|
948
|
-
[c, [
|
|
943
|
+
[c, [o, "Android" + X]],
|
|
949
944
|
[
|
|
950
945
|
/chrome\/([\w\.]+) mobile/i
|
|
951
946
|
// Chrome Mobile
|
|
952
947
|
],
|
|
953
|
-
[c, [
|
|
948
|
+
[c, [o, Q + "Chrome"]],
|
|
954
949
|
[
|
|
955
950
|
/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
|
|
956
951
|
// Chrome/OmniWeb/Arora/Tizen/Nokia
|
|
957
952
|
],
|
|
958
|
-
[
|
|
953
|
+
[o, c],
|
|
959
954
|
[
|
|
960
955
|
/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
|
|
961
956
|
// Safari Mobile
|
|
962
957
|
],
|
|
963
|
-
[c, [
|
|
958
|
+
[c, [o, Q + "Safari"]],
|
|
964
959
|
[
|
|
965
960
|
/iphone .*mobile(?:\/\w+ | ?)safari/i
|
|
966
961
|
],
|
|
967
|
-
[[
|
|
962
|
+
[[o, Q + "Safari"]],
|
|
968
963
|
[
|
|
969
964
|
/version\/([\w\.\,]+) .*(safari)/i
|
|
970
965
|
// Safari
|
|
971
966
|
],
|
|
972
|
-
[c,
|
|
967
|
+
[c, o],
|
|
973
968
|
[
|
|
974
969
|
/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i
|
|
975
970
|
// Safari < 3.0
|
|
976
971
|
],
|
|
977
|
-
[
|
|
972
|
+
[o, [c, "1"]],
|
|
978
973
|
[
|
|
979
974
|
/(webkit|khtml)\/([\w\.]+)/i
|
|
980
975
|
],
|
|
981
|
-
[
|
|
976
|
+
[o, c],
|
|
982
977
|
[
|
|
983
978
|
// Gecko based
|
|
984
979
|
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
|
|
985
980
|
// Firefox Mobile
|
|
986
981
|
],
|
|
987
|
-
[[
|
|
982
|
+
[[o, Q + pe], c],
|
|
988
983
|
[
|
|
989
984
|
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
990
985
|
// Netscape
|
|
991
986
|
],
|
|
992
|
-
[[
|
|
987
|
+
[[o, "Netscape"], c],
|
|
993
988
|
[
|
|
994
989
|
/(wolvic)\/([\w\.]+)/i
|
|
995
990
|
// Wolvic
|
|
996
991
|
],
|
|
997
|
-
[
|
|
992
|
+
[o, c],
|
|
998
993
|
[
|
|
999
994
|
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
|
1000
995
|
// Firefox Reality
|
|
1001
996
|
],
|
|
1002
|
-
[c, [
|
|
997
|
+
[c, [o, pe + " Reality"]],
|
|
1003
998
|
[
|
|
1004
999
|
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1005
1000
|
// Flow
|
|
@@ -1019,12 +1014,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1019
1014
|
/(links) \(([\w\.]+)/i
|
|
1020
1015
|
// Links
|
|
1021
1016
|
],
|
|
1022
|
-
[
|
|
1017
|
+
[o, [c, /_/g, "."]],
|
|
1023
1018
|
[
|
|
1024
1019
|
/(cobalt)\/([\w\.]+)/i
|
|
1025
1020
|
// Cobalt
|
|
1026
1021
|
],
|
|
1027
|
-
[
|
|
1022
|
+
[o, [c, /[^\d\.]+./, re]]
|
|
1028
1023
|
],
|
|
1029
1024
|
cpu: [
|
|
1030
1025
|
[
|
|
@@ -1058,7 +1053,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1058
1053
|
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
|
|
1059
1054
|
// PowerPC
|
|
1060
1055
|
],
|
|
1061
|
-
[[M, /ower/, re,
|
|
1056
|
+
[[M, /ower/, re, H]],
|
|
1062
1057
|
[
|
|
1063
1058
|
/(sun4\w)[;\)]/i
|
|
1064
1059
|
// SPARC
|
|
@@ -1068,7 +1063,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1068
1063
|
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
|
1069
1064
|
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
1070
1065
|
],
|
|
1071
|
-
[[M,
|
|
1066
|
+
[[M, H]]
|
|
1072
1067
|
],
|
|
1073
1068
|
device: [
|
|
1074
1069
|
[
|
|
@@ -1078,13 +1073,13 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1078
1073
|
// Samsung
|
|
1079
1074
|
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
|
|
1080
1075
|
],
|
|
1081
|
-
[l, [u,
|
|
1076
|
+
[l, [u, Me], [d, f]],
|
|
1082
1077
|
[
|
|
1083
1078
|
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
1084
1079
|
/samsung[- ]([-\w]+)/i,
|
|
1085
1080
|
/sec-(sgh\w+)/i
|
|
1086
1081
|
],
|
|
1087
|
-
[l, [u,
|
|
1082
|
+
[l, [u, Me], [d, b]],
|
|
1088
1083
|
[
|
|
1089
1084
|
// Apple
|
|
1090
1085
|
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
|
@@ -1106,17 +1101,17 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1106
1101
|
// Sharp
|
|
1107
1102
|
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
1108
1103
|
],
|
|
1109
|
-
[l, [u,
|
|
1104
|
+
[l, [u, yt], [d, b]],
|
|
1110
1105
|
[
|
|
1111
1106
|
// Huawei
|
|
1112
1107
|
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
|
1113
1108
|
],
|
|
1114
|
-
[l, [u,
|
|
1109
|
+
[l, [u, wt], [d, f]],
|
|
1115
1110
|
[
|
|
1116
1111
|
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
|
1117
1112
|
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
1118
1113
|
],
|
|
1119
|
-
[l, [u,
|
|
1114
|
+
[l, [u, wt], [d, b]],
|
|
1120
1115
|
[
|
|
1121
1116
|
// Xiaomi
|
|
1122
1117
|
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
@@ -1132,14 +1127,14 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1132
1127
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
|
1133
1128
|
// Xiaomi Mi
|
|
1134
1129
|
],
|
|
1135
|
-
[[l, /_/g, " "], [u,
|
|
1130
|
+
[[l, /_/g, " "], [u, je], [d, b]],
|
|
1136
1131
|
[
|
|
1137
1132
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
|
|
1138
1133
|
// Redmi Pad
|
|
1139
1134
|
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
|
|
1140
1135
|
// Mi Pad tablets
|
|
1141
1136
|
],
|
|
1142
|
-
[[l, /_/g, " "], [u,
|
|
1137
|
+
[[l, /_/g, " "], [u, je], [d, f]],
|
|
1143
1138
|
[
|
|
1144
1139
|
// OPPO
|
|
1145
1140
|
/; (\w+) bui.+ oppo/i,
|
|
@@ -1167,28 +1162,28 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1167
1162
|
/\bmot(?:orola)?[- ](\w*)/i,
|
|
1168
1163
|
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
1169
1164
|
],
|
|
1170
|
-
[l, [u,
|
|
1165
|
+
[l, [u, ft], [d, b]],
|
|
1171
1166
|
[
|
|
1172
1167
|
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
|
1173
1168
|
],
|
|
1174
|
-
[l, [u,
|
|
1169
|
+
[l, [u, ft], [d, f]],
|
|
1175
1170
|
[
|
|
1176
1171
|
// LG
|
|
1177
1172
|
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
1178
1173
|
],
|
|
1179
|
-
[l, [u,
|
|
1174
|
+
[l, [u, $e], [d, f]],
|
|
1180
1175
|
[
|
|
1181
1176
|
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1182
1177
|
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
|
1183
1178
|
/\blg-?([\d\w]+) bui/i
|
|
1184
1179
|
],
|
|
1185
|
-
[l, [u,
|
|
1180
|
+
[l, [u, $e], [d, b]],
|
|
1186
1181
|
[
|
|
1187
1182
|
// Lenovo
|
|
1188
1183
|
/(ideatab[-\w ]+)/i,
|
|
1189
1184
|
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
|
|
1190
1185
|
],
|
|
1191
|
-
[l, [u,
|
|
1186
|
+
[l, [u, bt], [d, f]],
|
|
1192
1187
|
[
|
|
1193
1188
|
// Nokia
|
|
1194
1189
|
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
|
@@ -1200,22 +1195,22 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1200
1195
|
/(pixel c)\b/i
|
|
1201
1196
|
// Google Pixel C
|
|
1202
1197
|
],
|
|
1203
|
-
[l, [u,
|
|
1198
|
+
[l, [u, Ce], [d, f]],
|
|
1204
1199
|
[
|
|
1205
1200
|
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
|
1206
1201
|
// Google Pixel
|
|
1207
1202
|
],
|
|
1208
|
-
[l, [u,
|
|
1203
|
+
[l, [u, Ce], [d, b]],
|
|
1209
1204
|
[
|
|
1210
1205
|
// Sony
|
|
1211
1206
|
/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
|
1212
1207
|
],
|
|
1213
|
-
[l, [u,
|
|
1208
|
+
[l, [u, Se], [d, b]],
|
|
1214
1209
|
[
|
|
1215
1210
|
/sony tablet [ps]/i,
|
|
1216
1211
|
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
|
1217
1212
|
],
|
|
1218
|
-
[[l, "Xperia Tablet"], [u,
|
|
1213
|
+
[[l, "Xperia Tablet"], [u, Se], [d, f]],
|
|
1219
1214
|
[
|
|
1220
1215
|
// OnePlus
|
|
1221
1216
|
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
@@ -1230,12 +1225,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1230
1225
|
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
1231
1226
|
// Kindle Fire HD
|
|
1232
1227
|
],
|
|
1233
|
-
[l, [u,
|
|
1228
|
+
[l, [u, ve], [d, f]],
|
|
1234
1229
|
[
|
|
1235
1230
|
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
|
1236
1231
|
// Fire Phone
|
|
1237
1232
|
],
|
|
1238
|
-
[[l, /(.+)/g, "Fire Phone $1"], [u,
|
|
1233
|
+
[[l, /(.+)/g, "Fire Phone $1"], [u, ve], [d, b]],
|
|
1239
1234
|
[
|
|
1240
1235
|
// BlackBerry
|
|
1241
1236
|
/(playbook);[-\w\),; ]+(rim)/i
|
|
@@ -1247,16 +1242,16 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1247
1242
|
/\(bb10; (\w+)/i
|
|
1248
1243
|
// BlackBerry 10
|
|
1249
1244
|
],
|
|
1250
|
-
[l, [u,
|
|
1245
|
+
[l, [u, mt], [d, b]],
|
|
1251
1246
|
[
|
|
1252
1247
|
// Asus
|
|
1253
1248
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
1254
1249
|
],
|
|
1255
|
-
[l, [u,
|
|
1250
|
+
[l, [u, gt], [d, f]],
|
|
1256
1251
|
[
|
|
1257
1252
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
1258
1253
|
],
|
|
1259
|
-
[l, [u,
|
|
1254
|
+
[l, [u, gt], [d, b]],
|
|
1260
1255
|
[
|
|
1261
1256
|
// HTC
|
|
1262
1257
|
/(nexus 9)/i
|
|
@@ -1321,7 +1316,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1321
1316
|
/(surface duo)/i
|
|
1322
1317
|
// Surface Duo
|
|
1323
1318
|
],
|
|
1324
|
-
[l, [u,
|
|
1319
|
+
[l, [u, Oe], [d, f]],
|
|
1325
1320
|
[
|
|
1326
1321
|
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
|
1327
1322
|
// Fairphone
|
|
@@ -1341,16 +1336,16 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1341
1336
|
/(kin\.[onetw]{3})/i
|
|
1342
1337
|
// Microsoft Kin
|
|
1343
1338
|
],
|
|
1344
|
-
[[l, /\./g, " "], [u,
|
|
1339
|
+
[[l, /\./g, " "], [u, Oe], [d, b]],
|
|
1345
1340
|
[
|
|
1346
1341
|
/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
1347
1342
|
// Zebra
|
|
1348
1343
|
],
|
|
1349
|
-
[l, [u,
|
|
1344
|
+
[l, [u, Ke], [d, f]],
|
|
1350
1345
|
[
|
|
1351
1346
|
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
1352
1347
|
],
|
|
1353
|
-
[l, [u,
|
|
1348
|
+
[l, [u, Ke], [d, b]],
|
|
1354
1349
|
[
|
|
1355
1350
|
///////////////////
|
|
1356
1351
|
// SMARTTVS
|
|
@@ -1362,12 +1357,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1362
1357
|
[
|
|
1363
1358
|
/hbbtv.+maple;(\d+)/i
|
|
1364
1359
|
],
|
|
1365
|
-
[[l, /^/, "SmartTV"], [u,
|
|
1360
|
+
[[l, /^/, "SmartTV"], [u, Me], [d, I]],
|
|
1366
1361
|
[
|
|
1367
1362
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
1368
1363
|
// LG SmartTV
|
|
1369
1364
|
],
|
|
1370
|
-
[[u,
|
|
1365
|
+
[[u, $e], [d, I]],
|
|
1371
1366
|
[
|
|
1372
1367
|
/(apple) ?tv/i
|
|
1373
1368
|
// Apple TV
|
|
@@ -1377,28 +1372,28 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1377
1372
|
/crkey/i
|
|
1378
1373
|
// Google Chromecast
|
|
1379
1374
|
],
|
|
1380
|
-
[[l,
|
|
1375
|
+
[[l, Ie + "cast"], [u, Ce], [d, I]],
|
|
1381
1376
|
[
|
|
1382
1377
|
/droid.+aft(\w+)( bui|\))/i
|
|
1383
1378
|
// Fire TV
|
|
1384
1379
|
],
|
|
1385
|
-
[l, [u,
|
|
1380
|
+
[l, [u, ve], [d, I]],
|
|
1386
1381
|
[
|
|
1387
1382
|
/\(dtv[\);].+(aquos)/i,
|
|
1388
1383
|
/(aquos-tv[\w ]+)\)/i
|
|
1389
1384
|
// Sharp
|
|
1390
1385
|
],
|
|
1391
|
-
[l, [u,
|
|
1386
|
+
[l, [u, yt], [d, I]],
|
|
1392
1387
|
[
|
|
1393
1388
|
/(bravia[\w ]+)( bui|\))/i
|
|
1394
1389
|
// Sony
|
|
1395
1390
|
],
|
|
1396
|
-
[l, [u,
|
|
1391
|
+
[l, [u, Se], [d, I]],
|
|
1397
1392
|
[
|
|
1398
1393
|
/(mitv-\w{5}) bui/i
|
|
1399
1394
|
// Xiaomi
|
|
1400
1395
|
],
|
|
1401
|
-
[l, [u,
|
|
1396
|
+
[l, [u, je], [d, I]],
|
|
1402
1397
|
[
|
|
1403
1398
|
/Hbbtv.*(technisat) (.*);/i
|
|
1404
1399
|
// TechniSAT
|
|
@@ -1435,12 +1430,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1435
1430
|
/(playstation \w+)/i
|
|
1436
1431
|
// Playstation
|
|
1437
1432
|
],
|
|
1438
|
-
[l, [u,
|
|
1433
|
+
[l, [u, Se], [d, J]],
|
|
1439
1434
|
[
|
|
1440
1435
|
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
|
1441
1436
|
// Microsoft Xbox
|
|
1442
1437
|
],
|
|
1443
|
-
[l, [u,
|
|
1438
|
+
[l, [u, Oe], [d, J]],
|
|
1444
1439
|
[
|
|
1445
1440
|
///////////////////
|
|
1446
1441
|
// WEARABLES
|
|
@@ -1457,7 +1452,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1457
1452
|
[
|
|
1458
1453
|
/droid.+; (wt63?0{2,3})\)/i
|
|
1459
1454
|
],
|
|
1460
|
-
[l, [u,
|
|
1455
|
+
[l, [u, Ke], [d, Pe]],
|
|
1461
1456
|
[
|
|
1462
1457
|
///////////////////
|
|
1463
1458
|
// XR
|
|
@@ -1465,12 +1460,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1465
1460
|
/droid.+; (glass) \d/i
|
|
1466
1461
|
// Google Glass
|
|
1467
1462
|
],
|
|
1468
|
-
[l, [u,
|
|
1463
|
+
[l, [u, Ce], [d, ht]],
|
|
1469
1464
|
[
|
|
1470
1465
|
/(quest( \d| pro)?)/i
|
|
1471
1466
|
// Oculus Quest
|
|
1472
1467
|
],
|
|
1473
|
-
[l, [u,
|
|
1468
|
+
[l, [u, kt], [d, ht]],
|
|
1474
1469
|
[
|
|
1475
1470
|
///////////////////
|
|
1476
1471
|
// EMBEDDED
|
|
@@ -1478,12 +1473,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1478
1473
|
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
1479
1474
|
// Tesla
|
|
1480
1475
|
],
|
|
1481
|
-
[u, [d,
|
|
1476
|
+
[u, [d, et]],
|
|
1482
1477
|
[
|
|
1483
1478
|
/(aeobc)\b/i
|
|
1484
1479
|
// Echo Dot
|
|
1485
1480
|
],
|
|
1486
|
-
[l, [u,
|
|
1481
|
+
[l, [u, ve], [d, et]],
|
|
1487
1482
|
[
|
|
1488
1483
|
////////////////////
|
|
1489
1484
|
// MIXED (GENERIC)
|
|
@@ -1518,12 +1513,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1518
1513
|
/windows.+ edge\/([\w\.]+)/i
|
|
1519
1514
|
// EdgeHTML
|
|
1520
1515
|
],
|
|
1521
|
-
[c, [
|
|
1516
|
+
[c, [o, pi + "HTML"]],
|
|
1522
1517
|
[
|
|
1523
1518
|
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
|
1524
1519
|
// Blink
|
|
1525
1520
|
],
|
|
1526
|
-
[c, [
|
|
1521
|
+
[c, [o, "Blink"]],
|
|
1527
1522
|
[
|
|
1528
1523
|
/(presto)\/([\w\.]+)/i,
|
|
1529
1524
|
// Presto
|
|
@@ -1537,12 +1532,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1537
1532
|
// iCab
|
|
1538
1533
|
/\b(libweb)/i
|
|
1539
1534
|
],
|
|
1540
|
-
[
|
|
1535
|
+
[o, c],
|
|
1541
1536
|
[
|
|
1542
1537
|
/rv\:([\w\.]{1,9})\b.+(gecko)/i
|
|
1543
1538
|
// Gecko
|
|
1544
1539
|
],
|
|
1545
|
-
[c,
|
|
1540
|
+
[c, o]
|
|
1546
1541
|
],
|
|
1547
1542
|
os: [
|
|
1548
1543
|
[
|
|
@@ -1550,19 +1545,19 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1550
1545
|
/microsoft (windows) (vista|xp)/i
|
|
1551
1546
|
// Windows (iTunes)
|
|
1552
1547
|
],
|
|
1553
|
-
[
|
|
1548
|
+
[o, c],
|
|
1554
1549
|
[
|
|
1555
1550
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
|
|
1556
1551
|
// Windows Phone
|
|
1557
1552
|
],
|
|
1558
|
-
[
|
|
1553
|
+
[o, [c, Re, Ct]],
|
|
1559
1554
|
[
|
|
1560
1555
|
/windows nt 6\.2; (arm)/i,
|
|
1561
1556
|
// Windows RT
|
|
1562
1557
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
1563
1558
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
1564
1559
|
],
|
|
1565
|
-
[[c,
|
|
1560
|
+
[[c, Re, Ct], [o, it]],
|
|
1566
1561
|
[
|
|
1567
1562
|
// iOS/macOS
|
|
1568
1563
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -1570,19 +1565,19 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1570
1565
|
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
|
|
1571
1566
|
/cfnetwork\/.+darwin/i
|
|
1572
1567
|
],
|
|
1573
|
-
[[c, /_/g, "."], [
|
|
1568
|
+
[[c, /_/g, "."], [o, "iOS"]],
|
|
1574
1569
|
[
|
|
1575
1570
|
/(mac os x) ?([\w\. ]*)/i,
|
|
1576
1571
|
/(macintosh|mac_powerpc\b)(?!.+haiku)/i
|
|
1577
1572
|
// Mac OS
|
|
1578
1573
|
],
|
|
1579
|
-
[[
|
|
1574
|
+
[[o, "macOS"], [c, /_/g, "."]],
|
|
1580
1575
|
[
|
|
1581
1576
|
// Mobile OSes
|
|
1582
1577
|
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
|
1583
1578
|
// Android-x86/HarmonyOS
|
|
1584
1579
|
],
|
|
1585
|
-
[c,
|
|
1580
|
+
[c, o],
|
|
1586
1581
|
[
|
|
1587
1582
|
// Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS
|
|
1588
1583
|
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
|
@@ -1593,44 +1588,44 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1593
1588
|
/\((series40);/i
|
|
1594
1589
|
// Series 40
|
|
1595
1590
|
],
|
|
1596
|
-
[
|
|
1591
|
+
[o, c],
|
|
1597
1592
|
[
|
|
1598
1593
|
/\(bb(10);/i
|
|
1599
1594
|
// BlackBerry 10
|
|
1600
1595
|
],
|
|
1601
|
-
[c, [
|
|
1596
|
+
[c, [o, mt]],
|
|
1602
1597
|
[
|
|
1603
1598
|
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
|
1604
1599
|
// Symbian
|
|
1605
1600
|
],
|
|
1606
|
-
[c, [
|
|
1601
|
+
[c, [o, "Symbian"]],
|
|
1607
1602
|
[
|
|
1608
1603
|
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
|
1609
1604
|
// Firefox OS
|
|
1610
1605
|
],
|
|
1611
|
-
[c, [
|
|
1606
|
+
[c, [o, pe + " OS"]],
|
|
1612
1607
|
[
|
|
1613
1608
|
/web0s;.+rt(tv)/i,
|
|
1614
1609
|
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
|
1615
1610
|
// WebOS
|
|
1616
1611
|
],
|
|
1617
|
-
[c, [
|
|
1612
|
+
[c, [o, "webOS"]],
|
|
1618
1613
|
[
|
|
1619
1614
|
/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i
|
|
1620
1615
|
// watchOS
|
|
1621
1616
|
],
|
|
1622
|
-
[c, [
|
|
1617
|
+
[c, [o, "watchOS"]],
|
|
1623
1618
|
[
|
|
1624
1619
|
// Google Chromecast
|
|
1625
1620
|
/crkey\/([\d\.]+)/i
|
|
1626
1621
|
// Google Chromecast
|
|
1627
1622
|
],
|
|
1628
|
-
[c, [
|
|
1623
|
+
[c, [o, Ie + "cast"]],
|
|
1629
1624
|
[
|
|
1630
1625
|
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
|
1631
1626
|
// Chromium OS
|
|
1632
1627
|
],
|
|
1633
|
-
[[
|
|
1628
|
+
[[o, "Chrome OS"], c],
|
|
1634
1629
|
[
|
|
1635
1630
|
// Smart TVs
|
|
1636
1631
|
/panasonic;(viera)/i,
|
|
@@ -1662,12 +1657,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1662
1657
|
/(haiku) (\w+)/i
|
|
1663
1658
|
// Haiku
|
|
1664
1659
|
],
|
|
1665
|
-
[
|
|
1660
|
+
[o, c],
|
|
1666
1661
|
[
|
|
1667
1662
|
/(sunos) ?([\w\.\d]*)/i
|
|
1668
1663
|
// Solaris
|
|
1669
1664
|
],
|
|
1670
|
-
[[
|
|
1665
|
+
[[o, "Solaris"], c],
|
|
1671
1666
|
[
|
|
1672
1667
|
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
|
1673
1668
|
// Solaris
|
|
@@ -1678,59 +1673,58 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1678
1673
|
/(unix) ?([\w\.]*)/i
|
|
1679
1674
|
// UNIX
|
|
1680
1675
|
],
|
|
1681
|
-
[
|
|
1676
|
+
[o, c]
|
|
1682
1677
|
]
|
|
1683
|
-
},
|
|
1678
|
+
}, Te = function() {
|
|
1684
1679
|
var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
1685
|
-
return
|
|
1686
|
-
[T, [
|
|
1687
|
-
[
|
|
1680
|
+
return B.call(s.init, [
|
|
1681
|
+
[T, [o, c, we, d]],
|
|
1682
|
+
[L, [M]],
|
|
1688
1683
|
[x, [d, l, u]],
|
|
1689
|
-
[
|
|
1690
|
-
[
|
|
1691
|
-
]),
|
|
1684
|
+
[_, [o, c]],
|
|
1685
|
+
[A, [o, c]]
|
|
1686
|
+
]), B.call(s.isIgnore, [
|
|
1692
1687
|
[T, [c, we]],
|
|
1693
|
-
[
|
|
1694
|
-
[
|
|
1695
|
-
]),
|
|
1688
|
+
[_, [c]],
|
|
1689
|
+
[A, [c]]
|
|
1690
|
+
]), B.call(s.isIgnoreRgx, [
|
|
1696
1691
|
[T, / ?browser$/i],
|
|
1697
|
-
[
|
|
1698
|
-
]),
|
|
1699
|
-
[T, [
|
|
1700
|
-
[
|
|
1692
|
+
[A, / ?os$/i]
|
|
1693
|
+
]), B.call(s.toString, [
|
|
1694
|
+
[T, [o, c]],
|
|
1695
|
+
[L, [M]],
|
|
1701
1696
|
[x, [u, l]],
|
|
1702
|
-
[
|
|
1703
|
-
[
|
|
1697
|
+
[_, [o, c]],
|
|
1698
|
+
[A, [o, c]]
|
|
1704
1699
|
]), s;
|
|
1705
|
-
}(),
|
|
1706
|
-
var e =
|
|
1700
|
+
}(), wi = function(s, t) {
|
|
1701
|
+
var e = Te.init[t], i = Te.isIgnore[t] || 0, a = Te.isIgnoreRgx[t] || 0, r = Te.toString[t] || 0;
|
|
1707
1702
|
function n() {
|
|
1708
|
-
|
|
1703
|
+
B.call(this, e);
|
|
1709
1704
|
}
|
|
1710
1705
|
return n.prototype.getItem = function() {
|
|
1711
1706
|
return s;
|
|
1712
1707
|
}, n.prototype.withClientHints = function() {
|
|
1713
|
-
return N ? N.getHighEntropyValues(
|
|
1714
|
-
return s.setCH(new
|
|
1708
|
+
return N ? N.getHighEntropyValues(Nt).then(function(h) {
|
|
1709
|
+
return s.setCH(new Dt(h, !1)).parseCH().get();
|
|
1715
1710
|
}) : s.parseCH().get();
|
|
1716
1711
|
}, n.prototype.withFeatureCheck = function() {
|
|
1717
1712
|
return s.detectFeature().get();
|
|
1718
1713
|
}, t != Z && (n.prototype.is = function(h) {
|
|
1719
1714
|
var p = !1;
|
|
1720
1715
|
for (var w in this)
|
|
1721
|
-
if (this.hasOwnProperty(w) && !
|
|
1722
|
-
if (p = !0, h !=
|
|
1723
|
-
|
|
1724
|
-
} else if (h == H && p) {
|
|
1716
|
+
if (this.hasOwnProperty(w) && !st(i, w) && H(a ? $(a, this[w]) : this[w]) == H(a ? $(a, h) : h)) {
|
|
1717
|
+
if (p = !0, h != G) break;
|
|
1718
|
+
} else if (h == G && p) {
|
|
1725
1719
|
p = !p;
|
|
1726
1720
|
break;
|
|
1727
1721
|
}
|
|
1728
1722
|
return p;
|
|
1729
1723
|
}, n.prototype.toString = function() {
|
|
1730
1724
|
var h = re;
|
|
1731
|
-
for (var p in
|
|
1732
|
-
typeof this[
|
|
1733
|
-
return h ||
|
|
1725
|
+
for (var p in r)
|
|
1726
|
+
typeof this[r[p]] !== G && (h += (h ? " " : re) + this[r[p]]);
|
|
1727
|
+
return h || G;
|
|
1734
1728
|
}), N || (n.prototype.then = function(h) {
|
|
1735
1729
|
var p = this, w = function() {
|
|
1736
1730
|
for (var k in p)
|
|
@@ -1744,140 +1738,140 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1744
1738
|
return h(g), g;
|
|
1745
1739
|
}), new n();
|
|
1746
1740
|
};
|
|
1747
|
-
function
|
|
1748
|
-
if (s = s || {},
|
|
1749
|
-
|
|
1750
|
-
[
|
|
1751
|
-
[
|
|
1752
|
-
[b, /\?1/.test(s[
|
|
1753
|
-
[l, me(s[
|
|
1754
|
-
[Y, me(s[
|
|
1755
|
-
[
|
|
1756
|
-
[M, me(s[
|
|
1757
|
-
[W,
|
|
1758
|
-
[
|
|
1741
|
+
function Dt(s, t) {
|
|
1742
|
+
if (s = s || {}, B.call(this, Nt), t)
|
|
1743
|
+
B.call(this, [
|
|
1744
|
+
[at, Qe(s[z])],
|
|
1745
|
+
[nt, Qe(s[oi])],
|
|
1746
|
+
[b, /\?1/.test(s[li])],
|
|
1747
|
+
[l, me(s[ui])],
|
|
1748
|
+
[Y, me(s[Ft])],
|
|
1749
|
+
[ot, me(s[hi])],
|
|
1750
|
+
[M, me(s[ri])],
|
|
1751
|
+
[W, Qe(s[di])],
|
|
1752
|
+
[Ne, me(s[ci])]
|
|
1759
1753
|
]);
|
|
1760
1754
|
else
|
|
1761
1755
|
for (var e in s)
|
|
1762
|
-
this.hasOwnProperty(e) && typeof s[e] !==
|
|
1756
|
+
this.hasOwnProperty(e) && typeof s[e] !== G && (this[e] = s[e]);
|
|
1763
1757
|
}
|
|
1764
|
-
function
|
|
1758
|
+
function It(s, t, e, i) {
|
|
1765
1759
|
return this.get = function(a) {
|
|
1766
1760
|
return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
|
|
1767
|
-
}, this.set = function(a,
|
|
1768
|
-
return this.data[a] =
|
|
1761
|
+
}, this.set = function(a, r) {
|
|
1762
|
+
return this.data[a] = r, this;
|
|
1769
1763
|
}, this.setCH = function(a) {
|
|
1770
1764
|
return this.uaCH = a, this;
|
|
1771
1765
|
}, this.detectFeature = function() {
|
|
1772
1766
|
if (S && S.userAgent == this.ua)
|
|
1773
1767
|
switch (this.itemType) {
|
|
1774
1768
|
case T:
|
|
1775
|
-
S.brave && typeof S.brave.isBrave ==
|
|
1769
|
+
S.brave && typeof S.brave.isBrave == Ye && this.set(o, "Brave");
|
|
1776
1770
|
break;
|
|
1777
1771
|
case x:
|
|
1778
|
-
!this.get(d) && N && N[b] && this.set(d, b), this.get(l) == "Macintosh" && S && typeof S.standalone !==
|
|
1772
|
+
!this.get(d) && N && N[b] && this.set(d, b), this.get(l) == "Macintosh" && S && typeof S.standalone !== G && S.maxTouchPoints && S.maxTouchPoints > 2 && this.set(l, "iPad").set(d, f);
|
|
1779
1773
|
break;
|
|
1780
|
-
case
|
|
1781
|
-
!this.get(
|
|
1774
|
+
case A:
|
|
1775
|
+
!this.get(o) && N && N[Y] && this.set(o, N[Y]);
|
|
1782
1776
|
break;
|
|
1783
1777
|
case Z:
|
|
1784
|
-
var a = this.data,
|
|
1778
|
+
var a = this.data, r = function(n) {
|
|
1785
1779
|
return a[n].getItem().detectFeature().get();
|
|
1786
1780
|
};
|
|
1787
|
-
this.set(T,
|
|
1781
|
+
this.set(T, r(T)).set(L, r(L)).set(x, r(x)).set(_, r(_)).set(A, r(A));
|
|
1788
1782
|
}
|
|
1789
1783
|
return this;
|
|
1790
1784
|
}, this.parseUA = function() {
|
|
1791
|
-
return this.itemType != Z &&
|
|
1785
|
+
return this.itemType != Z && vt.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(we, Xe(this.get(c))), this;
|
|
1792
1786
|
}, this.parseCH = function() {
|
|
1793
|
-
var a = this.uaCH,
|
|
1787
|
+
var a = this.uaCH, r = this.rgxMap;
|
|
1794
1788
|
switch (this.itemType) {
|
|
1795
1789
|
case T:
|
|
1796
|
-
var n = a[
|
|
1790
|
+
var n = a[nt] || a[at], h;
|
|
1797
1791
|
if (n)
|
|
1798
1792
|
for (var p in n) {
|
|
1799
1793
|
var w = $(/(Google|Microsoft) /, n[p].brand || n[p]), g = n[p].version;
|
|
1800
|
-
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(
|
|
1794
|
+
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(c, g).set(we, Xe(g)), h = w);
|
|
1801
1795
|
}
|
|
1802
1796
|
break;
|
|
1803
|
-
case
|
|
1797
|
+
case L:
|
|
1804
1798
|
var k = a[M];
|
|
1805
|
-
k && (k && a[
|
|
1799
|
+
k && (k && a[Ne] == "64" && (k += "64"), vt.call(this.data, k + ";", r));
|
|
1806
1800
|
break;
|
|
1807
1801
|
case x:
|
|
1808
|
-
if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u,
|
|
1809
|
-
var
|
|
1802
|
+
if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u, Oe), a[W]) {
|
|
1803
|
+
var F;
|
|
1810
1804
|
if (typeof a[W] != "string")
|
|
1811
|
-
for (var j = 0; !
|
|
1812
|
-
|
|
1805
|
+
for (var j = 0; !F && j < a[W].length; )
|
|
1806
|
+
F = Re(a[W][j++], Mt);
|
|
1813
1807
|
else
|
|
1814
|
-
|
|
1815
|
-
this.set(d,
|
|
1808
|
+
F = Re(a[W], Mt);
|
|
1809
|
+
this.set(d, F);
|
|
1816
1810
|
}
|
|
1817
1811
|
break;
|
|
1818
|
-
case
|
|
1819
|
-
var
|
|
1820
|
-
if (
|
|
1821
|
-
var
|
|
1822
|
-
|
|
1812
|
+
case A:
|
|
1813
|
+
var K = a[Y];
|
|
1814
|
+
if (K) {
|
|
1815
|
+
var U = a[ot];
|
|
1816
|
+
K == it && (U = parseInt(Xe(U), 10) >= 13 ? "11" : "10"), this.set(o, K).set(c, U);
|
|
1823
1817
|
}
|
|
1824
|
-
this.get(
|
|
1818
|
+
this.get(o) == it && a[l] == "Xbox" && this.set(o, "Xbox").set(c, void 0);
|
|
1825
1819
|
break;
|
|
1826
1820
|
case Z:
|
|
1827
|
-
var le = this.data,
|
|
1828
|
-
return le[
|
|
1821
|
+
var le = this.data, P = function(Ee) {
|
|
1822
|
+
return le[Ee].getItem().setCH(a).parseCH().get();
|
|
1829
1823
|
};
|
|
1830
|
-
this.set(T,
|
|
1824
|
+
this.set(T, P(T)).set(L, P(L)).set(x, P(x)).set(_, P(_)).set(A, P(A));
|
|
1831
1825
|
}
|
|
1832
1826
|
return this;
|
|
1833
|
-
},
|
|
1827
|
+
}, B.call(this, [
|
|
1834
1828
|
["itemType", s],
|
|
1835
1829
|
["ua", t],
|
|
1836
1830
|
["uaCH", i],
|
|
1837
1831
|
["rgxMap", e],
|
|
1838
|
-
["data",
|
|
1832
|
+
["data", wi(this, s)]
|
|
1839
1833
|
]), this;
|
|
1840
1834
|
}
|
|
1841
1835
|
function R(s, t, e) {
|
|
1842
|
-
if (typeof s === ce ? (
|
|
1836
|
+
if (typeof s === ce ? (xe(s, !0) ? (typeof t === ce && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === Ze && !xe(t, !0) && (e = t, t = void 0), !(this instanceof R))
|
|
1843
1837
|
return new R(s, t, e).getResult();
|
|
1844
|
-
var i = typeof s ===
|
|
1838
|
+
var i = typeof s === Ze ? s : (
|
|
1845
1839
|
// Passed user-agent string
|
|
1846
1840
|
S && S.userAgent ? S.userAgent : (
|
|
1847
1841
|
// navigator.userAgent
|
|
1848
|
-
e && e[
|
|
1842
|
+
e && e[pt] ? e[pt] : (
|
|
1849
1843
|
// User-Agent from passed headers
|
|
1850
1844
|
re
|
|
1851
1845
|
)
|
|
1852
1846
|
)
|
|
1853
|
-
), a = new
|
|
1847
|
+
), a = new Dt(e, !0), r = t ? mi(St, t) : St, n = function(h) {
|
|
1854
1848
|
return h == Z ? function() {
|
|
1855
|
-
return new
|
|
1849
|
+
return new It(h, i, r, a).set("ua", i).set(T, this.getBrowser()).set(L, this.getCPU()).set(x, this.getDevice()).set(_, this.getEngine()).set(A, this.getOS()).get();
|
|
1856
1850
|
} : function() {
|
|
1857
|
-
return new
|
|
1851
|
+
return new It(h, i, r[h], a).parseUA().get();
|
|
1858
1852
|
};
|
|
1859
1853
|
};
|
|
1860
|
-
return
|
|
1854
|
+
return B.call(this, [
|
|
1861
1855
|
["getBrowser", n(T)],
|
|
1862
|
-
["getCPU", n(
|
|
1856
|
+
["getCPU", n(L)],
|
|
1863
1857
|
["getDevice", n(x)],
|
|
1864
|
-
["getEngine", n(
|
|
1865
|
-
["getOS", n(
|
|
1858
|
+
["getEngine", n(_)],
|
|
1859
|
+
["getOS", n(A)],
|
|
1866
1860
|
["getResult", n(Z)],
|
|
1867
1861
|
["getUA", function() {
|
|
1868
1862
|
return i;
|
|
1869
1863
|
}],
|
|
1870
1864
|
["setUA", function(h) {
|
|
1871
|
-
return de(h) && (i = h.length >
|
|
1865
|
+
return de(h) && (i = h.length > tt ? be(h, tt) : h), this;
|
|
1872
1866
|
}]
|
|
1873
1867
|
]).setUA(i), this;
|
|
1874
1868
|
}
|
|
1875
|
-
R.VERSION =
|
|
1876
|
-
R.BROWSER = De([
|
|
1869
|
+
R.VERSION = ni;
|
|
1870
|
+
R.BROWSER = De([o, c, we, d]);
|
|
1877
1871
|
R.CPU = De([M]);
|
|
1878
|
-
R.DEVICE = De([l, u, d, J, b, I, f, Pe,
|
|
1879
|
-
R.ENGINE = R.OS = De([
|
|
1880
|
-
class
|
|
1872
|
+
R.DEVICE = De([l, u, d, J, b, I, f, Pe, et]);
|
|
1873
|
+
R.ENGINE = R.OS = De([o, c]);
|
|
1874
|
+
class bi {
|
|
1881
1875
|
constructor(t, e) {
|
|
1882
1876
|
m(this, "config");
|
|
1883
1877
|
m(this, "sdkConfig");
|
|
@@ -1896,7 +1890,7 @@ class ui {
|
|
|
1896
1890
|
});
|
|
1897
1891
|
}
|
|
1898
1892
|
}
|
|
1899
|
-
class
|
|
1893
|
+
class fi {
|
|
1900
1894
|
constructor(t) {
|
|
1901
1895
|
m(this, "socket", null);
|
|
1902
1896
|
m(this, "webSocketUrl");
|
|
@@ -1956,31 +1950,31 @@ class hi {
|
|
|
1956
1950
|
i !== -1 && this.eventListeners[t].splice(i, 1);
|
|
1957
1951
|
}
|
|
1958
1952
|
}
|
|
1959
|
-
function
|
|
1953
|
+
function Ae(s) {
|
|
1960
1954
|
return JSON.parse(s == null ? void 0 : s.data);
|
|
1961
1955
|
}
|
|
1962
|
-
function
|
|
1956
|
+
function yi(s) {
|
|
1963
1957
|
var t;
|
|
1964
1958
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
|
|
1965
1959
|
}
|
|
1966
|
-
function
|
|
1960
|
+
function Tt(s) {
|
|
1967
1961
|
var t;
|
|
1968
1962
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
|
|
1969
1963
|
}
|
|
1970
|
-
function
|
|
1964
|
+
function Ue(s) {
|
|
1971
1965
|
return s.header.name === "GameEvent";
|
|
1972
1966
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1967
|
+
function ki(s) {
|
|
1968
|
+
return Ue(s) && s.body.event === "OPEN_GAME";
|
|
1975
1969
|
}
|
|
1976
|
-
function
|
|
1970
|
+
function At(s) {
|
|
1977
1971
|
return s.header.code !== 1;
|
|
1978
1972
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1973
|
+
function Ei(s) {
|
|
1974
|
+
return Ue(s) && s.body.event.includes("_RESULT");
|
|
1981
1975
|
}
|
|
1982
1976
|
var ee, fe;
|
|
1983
|
-
class
|
|
1977
|
+
class vi extends fi {
|
|
1984
1978
|
constructor(e, i) {
|
|
1985
1979
|
const a = new URL(e.apiUrl);
|
|
1986
1980
|
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);
|
|
@@ -2014,11 +2008,11 @@ class wi extends hi {
|
|
|
2014
2008
|
*/
|
|
2015
2009
|
m(this, "seqId", 0);
|
|
2016
2010
|
m(this, "gameCode");
|
|
2017
|
-
C(this, ee
|
|
2018
|
-
C(this, fe
|
|
2011
|
+
C(this, ee);
|
|
2012
|
+
C(this, fe);
|
|
2019
2013
|
m(this, "onMessage", (e) => {
|
|
2020
|
-
const i =
|
|
2021
|
-
(
|
|
2014
|
+
const i = Ae(e);
|
|
2015
|
+
(Ue(i) || yi(i) || Tt(i)) && this.sendAcknowledgement(i), Tt(i) && this.handleRealityCheck(i);
|
|
2022
2016
|
});
|
|
2023
2017
|
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ee, i.requestTimeoutMs), E(this, fe, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
|
|
2024
2018
|
}
|
|
@@ -2057,12 +2051,12 @@ class wi extends hi {
|
|
|
2057
2051
|
}
|
|
2058
2052
|
request(e, i) {
|
|
2059
2053
|
const a = this.buildPayload(e, i);
|
|
2060
|
-
return new Promise((
|
|
2054
|
+
return new Promise((r, n) => {
|
|
2061
2055
|
setTimeout(() => n({ type: "timeout" }), y(this, ee));
|
|
2062
2056
|
const h = (p) => {
|
|
2063
|
-
const w =
|
|
2057
|
+
const w = Ae(p);
|
|
2064
2058
|
try {
|
|
2065
|
-
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ?
|
|
2059
|
+
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? r(w) : n({ message: w, type: "error" }));
|
|
2066
2060
|
} catch {
|
|
2067
2061
|
n({ message: w, type: "error" });
|
|
2068
2062
|
}
|
|
@@ -2073,8 +2067,8 @@ class wi extends hi {
|
|
|
2073
2067
|
freeRounds(e) {
|
|
2074
2068
|
const i = this.buildHeader("ActivateFreeRound");
|
|
2075
2069
|
return this.request(i, e).then((a) => a.body).catch((a) => {
|
|
2076
|
-
var
|
|
2077
|
-
throw { data: (
|
|
2070
|
+
var r;
|
|
2071
|
+
throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
|
|
2078
2072
|
});
|
|
2079
2073
|
}
|
|
2080
2074
|
async authenticate(e = !1) {
|
|
@@ -2083,43 +2077,43 @@ class wi extends hi {
|
|
|
2083
2077
|
version: y(this, fe),
|
|
2084
2078
|
reconnect: e
|
|
2085
2079
|
};
|
|
2086
|
-
return this.request(i, a).then((
|
|
2080
|
+
return this.request(i, a).then((r) => r.body).catch((r) => {
|
|
2087
2081
|
var n;
|
|
2088
|
-
throw { data: (n =
|
|
2082
|
+
throw { data: (n = r == null ? void 0 : r.message) == null ? void 0 : n.body, type: r.type };
|
|
2089
2083
|
});
|
|
2090
2084
|
}
|
|
2091
2085
|
async openGame() {
|
|
2092
2086
|
const e = this.buildHeader("OpenGame"), i = {
|
|
2093
2087
|
gameCode: this.gameCode
|
|
2094
2088
|
};
|
|
2095
|
-
return new Promise((a,
|
|
2089
|
+
return new Promise((a, r) => {
|
|
2096
2090
|
const n = (h) => {
|
|
2097
|
-
const p =
|
|
2098
|
-
|
|
2091
|
+
const p = Ae(h);
|
|
2092
|
+
ki(p) ? (this.removeEventListener("message", n), a(p.body)) : At(p) && r({ data: p.body, type: "error" });
|
|
2099
2093
|
};
|
|
2100
2094
|
this.addEventListener("message", n), this.request(e, i).catch(
|
|
2101
2095
|
(h) => {
|
|
2102
2096
|
var p;
|
|
2103
|
-
return
|
|
2097
|
+
return r({ data: (p = h == null ? void 0 : h.message) == null ? void 0 : p.body, type: h.type });
|
|
2104
2098
|
}
|
|
2105
2099
|
);
|
|
2106
2100
|
});
|
|
2107
2101
|
}
|
|
2108
2102
|
sendAcknowledgement(e) {
|
|
2109
|
-
const { name: i, cId: a } = e.header,
|
|
2103
|
+
const { name: i, cId: a } = e.header, r = this.buildHeader(i, a), n = this.buildPayload(r, {});
|
|
2110
2104
|
this.send(n);
|
|
2111
2105
|
}
|
|
2112
2106
|
sendAction(e, i) {
|
|
2113
|
-
const a = this.buildHeader("GameAction"),
|
|
2107
|
+
const a = this.buildHeader("GameAction"), r = {
|
|
2114
2108
|
...this.getBodyExtras(e),
|
|
2115
2109
|
data: i
|
|
2116
2110
|
};
|
|
2117
2111
|
return new Promise((n, h) => {
|
|
2118
2112
|
const p = (w) => {
|
|
2119
|
-
const g =
|
|
2120
|
-
|
|
2113
|
+
const g = Ae(w);
|
|
2114
|
+
Ue(g) && r.seqId === g.body.correlationSeqId && (this.removeEventListener("message", p), Ei(g) ? n(g.body) : At(g) && h({ data: g.body, type: "error" }));
|
|
2121
2115
|
};
|
|
2122
|
-
this.addEventListener("message", p), this.request(a,
|
|
2116
|
+
this.addEventListener("message", p), this.request(a, r).catch(
|
|
2123
2117
|
(w) => {
|
|
2124
2118
|
var g;
|
|
2125
2119
|
return h({ data: (g = w == null ? void 0 : w.message) == null ? void 0 : g.body, type: w.type });
|
|
@@ -2132,7 +2126,19 @@ class wi extends hi {
|
|
|
2132
2126
|
}
|
|
2133
2127
|
}
|
|
2134
2128
|
ee = new WeakMap(), fe = new WeakMap();
|
|
2135
|
-
|
|
2129
|
+
const Ci = {
|
|
2130
|
+
CA_BC: "CA",
|
|
2131
|
+
CA_ON: "CA",
|
|
2132
|
+
GER: "DE",
|
|
2133
|
+
US_CT: "US",
|
|
2134
|
+
US_MI: "US",
|
|
2135
|
+
US_NJ: "US",
|
|
2136
|
+
USA: "US"
|
|
2137
|
+
};
|
|
2138
|
+
function Pt(s) {
|
|
2139
|
+
return !s || s === "NOT_APPLICABLE" ? null : Ci[s] ?? s;
|
|
2140
|
+
}
|
|
2141
|
+
function Gt(s) {
|
|
2136
2142
|
const t = s.contract;
|
|
2137
2143
|
return t ? {
|
|
2138
2144
|
contract: {
|
|
@@ -2143,7 +2149,7 @@ function Bt(s) {
|
|
|
2143
2149
|
coinValueInCents: t.coinValueInCents,
|
|
2144
2150
|
country: t.countryCode,
|
|
2145
2151
|
currency: t.currencyCode,
|
|
2146
|
-
jurisdiction: t.jurisdictionCode,
|
|
2152
|
+
jurisdiction: Pt(t.jurisdictionCode),
|
|
2147
2153
|
uiMessages: t.uiMessages,
|
|
2148
2154
|
username: t.username
|
|
2149
2155
|
}
|
|
@@ -2156,21 +2162,21 @@ function Bt(s) {
|
|
|
2156
2162
|
coinValueInCents: s.coinValueInCents,
|
|
2157
2163
|
country: s.countryCode,
|
|
2158
2164
|
currency: s.currencyCode,
|
|
2159
|
-
jurisdiction: s.jurisdictionCode,
|
|
2165
|
+
jurisdiction: Pt(s.jurisdictionCode),
|
|
2160
2166
|
uiMessages: s.uiMessages,
|
|
2161
2167
|
username: s.username
|
|
2162
2168
|
}
|
|
2163
2169
|
};
|
|
2164
2170
|
}
|
|
2165
|
-
function
|
|
2171
|
+
function Ht(s) {
|
|
2166
2172
|
var t, e;
|
|
2167
2173
|
return {
|
|
2168
2174
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2169
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2175
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2170
2176
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2171
2177
|
};
|
|
2172
2178
|
}
|
|
2173
|
-
function
|
|
2179
|
+
function Vt(s, t) {
|
|
2174
2180
|
const e = t.contract;
|
|
2175
2181
|
if (!e) {
|
|
2176
2182
|
const i = t.data;
|
|
@@ -2290,15 +2296,15 @@ function Dt(s, t) {
|
|
|
2290
2296
|
data: t.opaqueGameServerToUi
|
|
2291
2297
|
};
|
|
2292
2298
|
}
|
|
2293
|
-
function
|
|
2299
|
+
function zt(s) {
|
|
2294
2300
|
var t, e;
|
|
2295
2301
|
return {
|
|
2296
2302
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2297
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2303
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2298
2304
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2299
2305
|
};
|
|
2300
2306
|
}
|
|
2301
|
-
function
|
|
2307
|
+
function qt(s) {
|
|
2302
2308
|
const t = s.contract;
|
|
2303
2309
|
if (!t) {
|
|
2304
2310
|
const e = s.data;
|
|
@@ -2398,22 +2404,22 @@ function Gt(s) {
|
|
|
2398
2404
|
data: s.opaqueGameServerToUi
|
|
2399
2405
|
};
|
|
2400
2406
|
}
|
|
2401
|
-
function
|
|
2407
|
+
function Wt(s) {
|
|
2402
2408
|
var t, e;
|
|
2403
2409
|
return {
|
|
2404
2410
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2405
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2411
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2406
2412
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2407
2413
|
};
|
|
2408
2414
|
}
|
|
2409
|
-
const
|
|
2410
|
-
parseAuthenticateResponse:
|
|
2411
|
-
parseAuthenticateError:
|
|
2412
|
-
parseOpenGameResponse:
|
|
2413
|
-
parseOpenGameError:
|
|
2414
|
-
parsePlayResponse:
|
|
2415
|
-
parsePlayError:
|
|
2416
|
-
},
|
|
2415
|
+
const $i = {
|
|
2416
|
+
parseAuthenticateResponse: Gt,
|
|
2417
|
+
parseAuthenticateError: Ht,
|
|
2418
|
+
parseOpenGameResponse: Vt,
|
|
2419
|
+
parseOpenGameError: zt,
|
|
2420
|
+
parsePlayResponse: qt,
|
|
2421
|
+
parsePlayError: Wt
|
|
2422
|
+
}, Mi = {
|
|
2417
2423
|
bul: "bg",
|
|
2418
2424
|
chi: "zh",
|
|
2419
2425
|
zho: "zh",
|
|
@@ -2445,50 +2451,53 @@ const Di = {
|
|
|
2445
2451
|
tur: "tr",
|
|
2446
2452
|
ukr: "uk",
|
|
2447
2453
|
vie: "vi"
|
|
2448
|
-
}, { device:
|
|
2449
|
-
class
|
|
2454
|
+
}, { device: Si } = R(navigator.userAgent), Ii = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
2455
|
+
class ji extends bi {
|
|
2450
2456
|
constructor(...e) {
|
|
2451
2457
|
super(...e);
|
|
2452
2458
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2453
2459
|
// @ts-ignore
|
|
2454
2460
|
m(this, "socket");
|
|
2461
|
+
m(this, "error");
|
|
2455
2462
|
this.on("openGame", async () => {
|
|
2456
2463
|
try {
|
|
2464
|
+
this.error = void 0;
|
|
2457
2465
|
const i = await this.openGame();
|
|
2458
2466
|
this.send("openGameResponse", i);
|
|
2459
2467
|
} catch (i) {
|
|
2460
|
-
this.send("openGameError", i);
|
|
2468
|
+
this.error = i, this.send("openGameError", i);
|
|
2461
2469
|
}
|
|
2462
2470
|
}), this.on("play", async (i) => {
|
|
2463
2471
|
try {
|
|
2472
|
+
this.error = void 0;
|
|
2464
2473
|
const a = await this.play(i);
|
|
2465
2474
|
this.send("playResponse", a);
|
|
2466
2475
|
} catch (a) {
|
|
2467
|
-
this.send("playError", a);
|
|
2476
|
+
this.error = a, this.send("playError", a);
|
|
2468
2477
|
}
|
|
2469
2478
|
}), this.on("freeRounds", async (i) => {
|
|
2470
2479
|
try {
|
|
2471
|
-
await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
|
|
2480
|
+
this.error = void 0, await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
|
|
2472
2481
|
} catch (a) {
|
|
2473
|
-
this.send("freeRoundsError", a);
|
|
2482
|
+
this.error = a, this.send("freeRoundsError", a);
|
|
2474
2483
|
}
|
|
2475
2484
|
}), this.on("configured", (i) => {
|
|
2476
2485
|
this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
|
|
2477
2486
|
}), this.registerFromSdkEvents();
|
|
2478
2487
|
}
|
|
2479
2488
|
initialize(e) {
|
|
2480
|
-
this.socket = new
|
|
2489
|
+
this.socket = new vi(e, {
|
|
2481
2490
|
gameVersion: this.config.gameVersion,
|
|
2482
2491
|
requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
|
|
2483
2492
|
}), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
|
|
2484
|
-
i.code === 1008 ? this.send("error", {
|
|
2493
|
+
i.code === 1008 ? this.error || this.send("error", {
|
|
2485
2494
|
type: "CLOSE",
|
|
2486
2495
|
messageCode: "TOO_MANY_OPEN_GAMES",
|
|
2487
2496
|
messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
|
|
2488
|
-
}) : i.code === 1011 || this.reconnect();
|
|
2489
|
-
}), ["mobile", "tablet"].includes(
|
|
2497
|
+
}) : i.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
|
|
2498
|
+
}), ["mobile", "tablet"].includes(Si.type ?? "") && document.addEventListener("visibilitychange", async () => {
|
|
2490
2499
|
document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
|
|
2491
|
-
})), this.socket.addEventListener("error", (i) =>
|
|
2500
|
+
})), this.socket.addEventListener("error", (i) => Ii("error", i)), this.socket.addEventListener("realityCheck", (i) => {
|
|
2492
2501
|
this.send("realityCheck", i);
|
|
2493
2502
|
});
|
|
2494
2503
|
}
|
|
@@ -2500,54 +2509,55 @@ class Ni extends ui {
|
|
|
2500
2509
|
}
|
|
2501
2510
|
}
|
|
2502
2511
|
async openGame() {
|
|
2503
|
-
|
|
2504
|
-
|
|
2512
|
+
var Ee, rt;
|
|
2513
|
+
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), n = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), w = e.get("username"), g = e.get("gameHistoryUrl"), k = e.get("homeUrl") ?? void 0, F = e.get("cashierUrl") ?? void 0;
|
|
2514
|
+
this.initialize({ apiUrl: i, cageCode: a, gameCode: r, operatorCode: n, playMode: h, token: p, username: w });
|
|
2505
2515
|
try {
|
|
2506
2516
|
await this.socket.connect();
|
|
2507
2517
|
} catch {
|
|
2508
|
-
throw { type: "error", data: { code:
|
|
2518
|
+
throw { type: "error", data: { code: Fe.CONNECTION_ERROR } };
|
|
2509
2519
|
}
|
|
2510
2520
|
let j;
|
|
2511
2521
|
try {
|
|
2512
2522
|
j = await this.socket.authenticate();
|
|
2513
|
-
} catch (
|
|
2514
|
-
throw { type:
|
|
2523
|
+
} catch (q) {
|
|
2524
|
+
throw { type: q.type, data: q.type === "error" ? Ht(q.data) : void 0 };
|
|
2515
2525
|
}
|
|
2516
|
-
let
|
|
2526
|
+
let K;
|
|
2517
2527
|
try {
|
|
2518
|
-
|
|
2519
|
-
} catch (
|
|
2520
|
-
throw { type:
|
|
2528
|
+
K = await this.socket.openGame();
|
|
2529
|
+
} catch (q) {
|
|
2530
|
+
throw { type: q.type, data: q.type === "error" ? zt(q.data) : void 0 };
|
|
2521
2531
|
}
|
|
2522
|
-
const
|
|
2532
|
+
const U = Gt(j), le = Vt(j, K);
|
|
2523
2533
|
this.sdkConfig.api = {
|
|
2524
2534
|
...this.sdkConfig.api,
|
|
2525
2535
|
brand: a,
|
|
2526
|
-
game:
|
|
2536
|
+
game: r,
|
|
2527
2537
|
integration: n,
|
|
2528
|
-
jurisdiction:
|
|
2538
|
+
jurisdiction: U.contract.jurisdiction,
|
|
2529
2539
|
playMode: h,
|
|
2530
|
-
user:
|
|
2540
|
+
user: U.contract.username,
|
|
2531
2541
|
integrationData: {
|
|
2532
2542
|
token: p
|
|
2533
2543
|
},
|
|
2534
|
-
country:
|
|
2535
|
-
currency:
|
|
2536
|
-
coinValueInCents:
|
|
2544
|
+
country: U.contract.country,
|
|
2545
|
+
currency: U.contract.currency,
|
|
2546
|
+
coinValueInCents: U.contract.coinValueInCents,
|
|
2537
2547
|
gameHistoryUrl: g,
|
|
2538
2548
|
homeUrl: k,
|
|
2539
|
-
cashierUrl:
|
|
2549
|
+
cashierUrl: F,
|
|
2540
2550
|
backendSessionId: le.contract.sessionId,
|
|
2541
2551
|
lastRoundId: le.contract.roundId
|
|
2542
2552
|
};
|
|
2543
|
-
const
|
|
2544
|
-
return
|
|
2553
|
+
const P = (rt = (Ee = e.get("languageCode")) == null ? void 0 : Ee.split("_")) == null ? void 0 : rt[0];
|
|
2554
|
+
return P && (this.sdkConfig.ui.language = P.length === 3 ? Mi[P] ?? P : P), le;
|
|
2545
2555
|
}
|
|
2546
2556
|
async play(e) {
|
|
2547
2557
|
for (; !this.socket.socket; )
|
|
2548
2558
|
await new Promise((k) => setTimeout(() => k(), 500));
|
|
2549
2559
|
const {
|
|
2550
|
-
contract: { bet: i, forcedOutcomes: a, ...
|
|
2560
|
+
contract: { bet: i, forcedOutcomes: a, ...r },
|
|
2551
2561
|
extra: n,
|
|
2552
2562
|
payloadToInject: h,
|
|
2553
2563
|
actionType: p
|
|
@@ -2555,7 +2565,7 @@ class Ni extends ui {
|
|
|
2555
2565
|
bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
|
|
2556
2566
|
forcedOutcomes: a,
|
|
2557
2567
|
// TODO: get rid of contractRest - it' a legacy from old RGS
|
|
2558
|
-
...
|
|
2568
|
+
...r,
|
|
2559
2569
|
...h,
|
|
2560
2570
|
opaqueUiToGameServer: n
|
|
2561
2571
|
};
|
|
@@ -2563,21 +2573,21 @@ class Ni extends ui {
|
|
|
2563
2573
|
try {
|
|
2564
2574
|
g = await this.socket.sendAction(p, w);
|
|
2565
2575
|
} catch (k) {
|
|
2566
|
-
throw { type: k.type, data: k.type === "error" ?
|
|
2576
|
+
throw { type: k.type, data: k.type === "error" ? Wt(k.data) : void 0 };
|
|
2567
2577
|
}
|
|
2568
|
-
return
|
|
2578
|
+
return qt(g);
|
|
2569
2579
|
}
|
|
2570
2580
|
registerFromSdkEvents() {
|
|
2571
2581
|
this.on("history", () => {
|
|
2572
2582
|
const {
|
|
2573
|
-
api: { game: e, integration: i, integrationData: a, jurisdiction:
|
|
2583
|
+
api: { game: e, integration: i, integrationData: a, jurisdiction: r, user: n, gameHistoryUrl: h },
|
|
2574
2584
|
ui: { language: p }
|
|
2575
2585
|
} = this.sdkConfig, w = n.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), g = new URL(window.location.href);
|
|
2576
|
-
g.hostname = g.hostname.replace(/^v\./, "").replace(/^play\./, "history."), g.pathname = g.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), g.search = "", g.searchParams.set("apiUrl", new URL(h).origin), g.searchParams.set("gameCode", e), g.searchParams.set("jurisdiction",
|
|
2586
|
+
g.hostname = g.hostname.replace(/^v\./, "").replace(/^play\./, "history."), g.pathname = g.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), g.search = "", g.searchParams.set("apiUrl", new URL(h).origin), g.searchParams.set("gameCode", e), g.searchParams.set("jurisdiction", r), g.searchParams.set("operatorCode", i), g.searchParams.set("token", a.token), g.searchParams.set("username", w), g.searchParams.set("languageCode", p), this.config.gameHistoryUrl && g.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(g.toString(), "_blank");
|
|
2577
2587
|
});
|
|
2578
2588
|
}
|
|
2579
2589
|
}
|
|
2580
|
-
class
|
|
2590
|
+
class Ti {
|
|
2581
2591
|
constructor(t, e, i) {
|
|
2582
2592
|
m(this, "trackers");
|
|
2583
2593
|
m(this, "config");
|
|
@@ -2594,14 +2604,14 @@ class ki {
|
|
|
2594
2604
|
this.trackers.forEach((i) => i.track(t, e));
|
|
2595
2605
|
}
|
|
2596
2606
|
}
|
|
2597
|
-
function
|
|
2607
|
+
function Ot(s) {
|
|
2598
2608
|
return s.reduce((t, e) => t + e, 0);
|
|
2599
2609
|
}
|
|
2600
|
-
function
|
|
2601
|
-
const t = s.length, e =
|
|
2610
|
+
function Ai(s) {
|
|
2611
|
+
const t = s.length, e = Ot(s) / t, i = s.map((r) => Math.pow(r - e, 2)), a = Ot(i) / t;
|
|
2602
2612
|
return Math.sqrt(a);
|
|
2603
2613
|
}
|
|
2604
|
-
class
|
|
2614
|
+
class xt {
|
|
2605
2615
|
constructor() {
|
|
2606
2616
|
m(this, "rafId", -1);
|
|
2607
2617
|
m(this, "startTime", 0);
|
|
@@ -2609,11 +2619,11 @@ class Pt {
|
|
|
2609
2619
|
m(this, "frames", []);
|
|
2610
2620
|
m(this, "calculateFPS", () => {
|
|
2611
2621
|
const t = Math.floor((this.stopTime - this.startTime) / 1e3);
|
|
2612
|
-
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a,
|
|
2622
|
+
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a, r) => (r[a] !== r[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
|
|
2613
2623
|
});
|
|
2614
2624
|
m(this, "getReport", () => {
|
|
2615
|
-
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e,
|
|
2616
|
-
return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev:
|
|
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, r = t.length > 0 ? Ai(t) : 0;
|
|
2626
|
+
return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev: r };
|
|
2617
2627
|
});
|
|
2618
2628
|
m(this, "start", () => {
|
|
2619
2629
|
this.startTime = Date.now(), this.frames = [], this.trackFrames();
|
|
@@ -2626,8 +2636,8 @@ class Pt {
|
|
|
2626
2636
|
});
|
|
2627
2637
|
}
|
|
2628
2638
|
}
|
|
2629
|
-
const
|
|
2630
|
-
function
|
|
2639
|
+
const Pi = "landscape", Oi = "portrait";
|
|
2640
|
+
function xi() {
|
|
2631
2641
|
try {
|
|
2632
2642
|
const s = document.createElement("canvas");
|
|
2633
2643
|
return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
|
|
@@ -2635,7 +2645,7 @@ function Mi() {
|
|
|
2635
2645
|
return !1;
|
|
2636
2646
|
}
|
|
2637
2647
|
}
|
|
2638
|
-
async function
|
|
2648
|
+
async function Ri() {
|
|
2639
2649
|
if (!window.createImageBitmap)
|
|
2640
2650
|
return !1;
|
|
2641
2651
|
const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
|
|
@@ -2645,29 +2655,29 @@ async function Si() {
|
|
|
2645
2655
|
return !1;
|
|
2646
2656
|
}
|
|
2647
2657
|
}
|
|
2648
|
-
function
|
|
2649
|
-
return window.innerWidth >= window.innerHeight ?
|
|
2658
|
+
function Je() {
|
|
2659
|
+
return window.innerWidth >= window.innerHeight ? Pi : Oi;
|
|
2650
2660
|
}
|
|
2651
|
-
var Le, te, ie, se, ye,
|
|
2652
|
-
class
|
|
2661
|
+
var Le, te, ie, se, ye, _e, ke, Be;
|
|
2662
|
+
class Ki extends Ti {
|
|
2653
2663
|
constructor(...e) {
|
|
2654
2664
|
super(...e);
|
|
2655
2665
|
m(this, "FPS_SAMPLE_INTERVAL", 1e4);
|
|
2656
2666
|
// wrapper state
|
|
2657
2667
|
C(this, Le, 0);
|
|
2658
|
-
C(this, te
|
|
2659
|
-
C(this, ie
|
|
2660
|
-
C(this, se
|
|
2668
|
+
C(this, te);
|
|
2669
|
+
C(this, ie);
|
|
2670
|
+
C(this, se);
|
|
2661
2671
|
C(this, ye, !1);
|
|
2662
|
-
C(this,
|
|
2672
|
+
C(this, _e, !1);
|
|
2663
2673
|
C(this, ke, "");
|
|
2664
|
-
C(this,
|
|
2674
|
+
C(this, Be, []);
|
|
2665
2675
|
E(this, ie, {}), E(this, se, this.deviceInfo()), E(this, te, this.config.gameVersion), this.on("state", ({ balance: i }) => {
|
|
2666
2676
|
E(this, Le, i);
|
|
2667
2677
|
}), this.on("autoplay", ({ action: i }) => {
|
|
2668
2678
|
["start", "resume"].includes(i) ? E(this, ye, !0) : E(this, ye, !1);
|
|
2669
2679
|
}), this.on("settings", ({ fastPlay: i }) => {
|
|
2670
|
-
i !== void 0 && E(this,
|
|
2680
|
+
i !== void 0 && E(this, _e, i);
|
|
2671
2681
|
}), this.registerEvents();
|
|
2672
2682
|
}
|
|
2673
2683
|
async registerEvents() {
|
|
@@ -2712,13 +2722,13 @@ class Gi extends ki {
|
|
|
2712
2722
|
// testVariants: '',
|
|
2713
2723
|
}), this.track("Game Open", y(this, ie));
|
|
2714
2724
|
}), this.on("playCycleEnd", async (e) => {
|
|
2715
|
-
const i = await y(this, se), { base: a, multiplier:
|
|
2725
|
+
const i = await y(this, se), { base: a, multiplier: r, specialAction: n } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, g = w - p, k = n || "spin", F = e.contract.roundId;
|
|
2716
2726
|
this.track("Betting Activity", {
|
|
2717
2727
|
balance: h - g,
|
|
2718
2728
|
balanceAfter: h,
|
|
2719
2729
|
baseBet: a,
|
|
2720
2730
|
// baseBetIndex,
|
|
2721
|
-
betMultiplier:
|
|
2731
|
+
betMultiplier: r,
|
|
2722
2732
|
betType: k,
|
|
2723
2733
|
gameVersion: y(this, te),
|
|
2724
2734
|
coinValueInCents: this.sdkConfig.api.coinValueInCents,
|
|
@@ -2730,18 +2740,18 @@ class Gi extends ki {
|
|
|
2730
2740
|
isMobile: i.isMobile,
|
|
2731
2741
|
netResult: g,
|
|
2732
2742
|
operatorName: "kalamba",
|
|
2733
|
-
orientation:
|
|
2743
|
+
orientation: Je(),
|
|
2734
2744
|
partnerId: this.sdkConfig.api.brand,
|
|
2735
2745
|
partnerParentId: this.sdkConfig.api.integration,
|
|
2736
2746
|
platform: "WEB",
|
|
2737
2747
|
playMode: this.sdkConfig.api.playMode,
|
|
2738
|
-
roundId:
|
|
2748
|
+
roundId: F,
|
|
2739
2749
|
// TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
|
|
2740
2750
|
// roundTypes: [...this.#roundTypes],
|
|
2741
2751
|
roundTypes: ["BaseGame"],
|
|
2742
2752
|
totalBet: p,
|
|
2743
2753
|
totalWin: w
|
|
2744
|
-
}), E(this,
|
|
2754
|
+
}), E(this, Be, []);
|
|
2745
2755
|
}), this.on("telemetry.click", (e) => {
|
|
2746
2756
|
this.track("UI Interaction", {
|
|
2747
2757
|
action: "click",
|
|
@@ -2756,17 +2766,17 @@ class Gi extends ki {
|
|
|
2756
2766
|
}), this.reportFpsSample(), this.reportFpsRound();
|
|
2757
2767
|
}
|
|
2758
2768
|
reportFpsSample() {
|
|
2759
|
-
const e = new
|
|
2769
|
+
const e = new xt(), i = () => {
|
|
2760
2770
|
e.stop();
|
|
2761
|
-
const
|
|
2762
|
-
this.track("FPS Performance", { ...
|
|
2771
|
+
const r = e.getReport();
|
|
2772
|
+
this.track("FPS Performance", { ...r, fpsType: "sample" }), a();
|
|
2763
2773
|
}, a = async () => {
|
|
2764
2774
|
e.start(), setTimeout(i, this.FPS_SAMPLE_INTERVAL);
|
|
2765
2775
|
};
|
|
2766
2776
|
a();
|
|
2767
2777
|
}
|
|
2768
2778
|
reportFpsRound() {
|
|
2769
|
-
const e = new
|
|
2779
|
+
const e = new xt();
|
|
2770
2780
|
this.on("playCycleStart", () => {
|
|
2771
2781
|
e.start();
|
|
2772
2782
|
}), this.on("playCycleEnd", () => {
|
|
@@ -2777,13 +2787,13 @@ class Gi extends ki {
|
|
|
2777
2787
|
}
|
|
2778
2788
|
getExtraUiInteractionData() {
|
|
2779
2789
|
return {
|
|
2780
|
-
orientation:
|
|
2790
|
+
orientation: Je(),
|
|
2781
2791
|
stateType: y(this, ke)
|
|
2782
2792
|
};
|
|
2783
2793
|
}
|
|
2784
2794
|
async deviceInfo() {
|
|
2785
2795
|
var h;
|
|
2786
|
-
const { browser: e, device: i, os: a } = R(navigator.userAgent),
|
|
2796
|
+
const { browser: e, device: i, os: a } = R(navigator.userAgent), r = xi(), n = await Ri();
|
|
2787
2797
|
return {
|
|
2788
2798
|
browserName: e.name,
|
|
2789
2799
|
browserVersion: e.version,
|
|
@@ -2791,12 +2801,12 @@ class Gi extends ki {
|
|
|
2791
2801
|
deviceName: i.model,
|
|
2792
2802
|
deviceType: i.type,
|
|
2793
2803
|
isMobile: ["mobile", "tablet"].includes(i.type ?? ""),
|
|
2794
|
-
isWebGLSupported:
|
|
2804
|
+
isWebGLSupported: r,
|
|
2795
2805
|
isWebPSupported: n,
|
|
2796
2806
|
manufacturer: i.vendor,
|
|
2797
2807
|
operatingSystem: a.name,
|
|
2798
2808
|
operatingSystemVersion: a.version,
|
|
2799
|
-
orientation:
|
|
2809
|
+
orientation: Je(),
|
|
2800
2810
|
pixelRatio: window.devicePixelRatio,
|
|
2801
2811
|
screenHeight: window.screen.height,
|
|
2802
2812
|
screenSize: `${window.screen.width}x${window.screen.height}`,
|
|
@@ -2808,33 +2818,35 @@ class Gi extends ki {
|
|
|
2808
2818
|
};
|
|
2809
2819
|
}
|
|
2810
2820
|
}
|
|
2811
|
-
Le = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ye = new WeakMap(),
|
|
2812
|
-
|
|
2821
|
+
Le = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ye = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), Be = new WeakMap();
|
|
2822
|
+
var Ui = Qt();
|
|
2823
|
+
const Rt = /* @__PURE__ */ Xt(Ui);
|
|
2824
|
+
class $t {
|
|
2813
2825
|
constructor(t, e) {
|
|
2814
2826
|
m(this, "config");
|
|
2815
2827
|
m(this, "sdkConfig");
|
|
2816
2828
|
this.config = t, this.sdkConfig = e;
|
|
2817
2829
|
}
|
|
2818
2830
|
}
|
|
2819
|
-
const
|
|
2820
|
-
var ae, ne, oe,
|
|
2821
|
-
class
|
|
2831
|
+
const Ut = 25, Lt = 1e4;
|
|
2832
|
+
var ae, ne, oe, D;
|
|
2833
|
+
class Qi extends $t {
|
|
2822
2834
|
constructor(...e) {
|
|
2823
2835
|
super(...e);
|
|
2824
2836
|
C(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
|
|
2825
|
-
C(this, ne
|
|
2826
|
-
C(this, oe
|
|
2827
|
-
C(this,
|
|
2837
|
+
C(this, ne);
|
|
2838
|
+
C(this, oe);
|
|
2839
|
+
C(this, D, []);
|
|
2828
2840
|
m(this, "processQueueForced");
|
|
2829
|
-
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this,
|
|
2841
|
+
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this, D, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
|
|
2830
2842
|
method: "OPTIONS"
|
|
2831
|
-
}).catch(
|
|
2843
|
+
}).catch(Rt), this.subscribe();
|
|
2832
2844
|
}
|
|
2833
2845
|
subscribe() {
|
|
2834
2846
|
window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
|
|
2835
2847
|
}
|
|
2836
2848
|
schedule() {
|
|
2837
|
-
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(),
|
|
2849
|
+
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(), Lt));
|
|
2838
2850
|
}
|
|
2839
2851
|
send(e) {
|
|
2840
2852
|
E(this, ne, (/* @__PURE__ */ new Date()).getTime());
|
|
@@ -2848,17 +2860,17 @@ class Hi extends Vt {
|
|
|
2848
2860
|
"Content-Type": "application/json"
|
|
2849
2861
|
},
|
|
2850
2862
|
keepalive: !0
|
|
2851
|
-
}).catch(
|
|
2863
|
+
}).catch(Rt);
|
|
2852
2864
|
}
|
|
2853
2865
|
this.schedule();
|
|
2854
2866
|
}
|
|
2855
2867
|
addToQueue(e) {
|
|
2856
|
-
y(this,
|
|
2868
|
+
y(this, D).push(e), this.processQueue();
|
|
2857
2869
|
}
|
|
2858
2870
|
processQueue(e = !1) {
|
|
2859
|
-
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this,
|
|
2860
|
-
for (; y(this,
|
|
2861
|
-
const i = y(this,
|
|
2871
|
+
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, D).length < Ut && (/* @__PURE__ */ new Date()).getTime() - y(this, ne) < Lt))
|
|
2872
|
+
for (; y(this, D).length; ) {
|
|
2873
|
+
const i = y(this, D).splice(0, Ut).map((a) => ({
|
|
2862
2874
|
...a,
|
|
2863
2875
|
sessionID: this.sdkConfig.api.sessionId,
|
|
2864
2876
|
userID: this.sdkConfig.api.user
|
|
@@ -2871,33 +2883,33 @@ class Hi extends Vt {
|
|
|
2871
2883
|
eventName: e,
|
|
2872
2884
|
eventParams: i,
|
|
2873
2885
|
eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2874
|
-
eventUUID:
|
|
2886
|
+
eventUUID: Jt()
|
|
2875
2887
|
});
|
|
2876
2888
|
}
|
|
2877
2889
|
}
|
|
2878
|
-
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(),
|
|
2879
|
-
const
|
|
2880
|
-
class
|
|
2890
|
+
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), D = new WeakMap();
|
|
2891
|
+
const Li = O("LoggingTracker", "color:#000000;font-weight:bold;");
|
|
2892
|
+
class Xi extends $t {
|
|
2881
2893
|
track(t, e) {
|
|
2882
|
-
|
|
2894
|
+
Li(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
|
|
2883
2895
|
}
|
|
2884
2896
|
}
|
|
2885
2897
|
export {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2898
|
+
Ni as BasicPlugin,
|
|
2899
|
+
V as CasinoPlugin,
|
|
2900
|
+
Di as DebuggingPlugin,
|
|
2901
|
+
Gi as GigPlugin,
|
|
2902
|
+
$i as KalambaBullseyeParsers,
|
|
2903
|
+
ji as KalambaBullseyePlugin,
|
|
2904
|
+
Ki as KalambaStargazerPlugin,
|
|
2905
|
+
Qi as KalambaStargazerTracker,
|
|
2906
|
+
Xi as LoggingTracker,
|
|
2907
|
+
Hi as OryxPlugin,
|
|
2908
|
+
Vi as PariplayPlugin,
|
|
2909
|
+
Wi as QuantaPlugin,
|
|
2910
|
+
zi as RelaxFEIMPlugin,
|
|
2911
|
+
bi as RgsPlugin,
|
|
2912
|
+
Ti as TelemetryPlugin,
|
|
2913
|
+
$t as Tracker,
|
|
2914
|
+
qi as TukoPlugin
|
|
2903
2915
|
};
|