@kalamba/sdk 0.10.1 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugins.js CHANGED
@@ -1,39 +1,39 @@
1
1
  /**
2
2
  * BSD 3-Clause License
3
- * Copyright (c) 2024, Kalamba Games Limited
3
+ * Copyright (c) 2025, Kalamba Games Limited
4
4
  */
5
- var Xt = Object.defineProperty;
6
- var Kt = (s, t, e) => t in s ? Xt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
7
- var g = (s, t, e) => (Kt(s, typeof t != "symbol" ? t + "" : t, e), e), dt = (s, t, e) => {
5
+ var Wt = Object.defineProperty;
6
+ var $t = (s, t, e) => t in s ? Wt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
7
+ var m = (s, t, e) => ($t(s, typeof t != "symbol" ? t + "" : t, e), e), rt = (s, t, e) => {
8
8
  if (!t.has(s))
9
9
  throw TypeError("Cannot " + e);
10
10
  };
11
- var y = (s, t, e) => (dt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), M = (s, t, e) => {
11
+ var y = (s, t, e) => (rt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), C = (s, t, e) => {
12
12
  if (t.has(s))
13
13
  throw TypeError("Cannot add the same private member more than once");
14
14
  t instanceof WeakSet ? t.add(s) : t.set(s, e);
15
- }, k = (s, t, e, i) => (dt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
16
- import { a as Ne } from "./errors-afd9f527.js";
17
- import { a as lt } from "./noop-3336849b.js";
18
- function U(s, t) {
15
+ }, E = (s, t, e, i) => (rt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
16
+ import { a as Fe } from "./errors-7cbbda8a.js";
17
+ import { a as ct, v as jt } from "./v4-58efbfa1.js";
18
+ function O(s, t) {
19
19
  return (e, ...i) => {
20
20
  console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
21
21
  };
22
22
  }
23
- function Bt(s, t) {
23
+ function Lt(s, t) {
24
24
  return Math.round(s * 100 / t);
25
25
  }
26
- class j {
26
+ class V {
27
27
  constructor(t, e) {
28
- g(this, "config");
29
- g(this, "sdkConfig");
28
+ m(this, "config");
29
+ m(this, "sdkConfig");
30
30
  this.config = t, this.sdkConfig = e;
31
31
  }
32
32
  on(t, e, i) {
33
- const n = function(a) {
34
- a.data.message !== `kalamba:wrapper-casino:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
33
+ const a = function(n) {
34
+ n.data.message !== `kalamba:wrapper-casino:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
35
35
  };
36
- window.addEventListener("message", n, i);
36
+ window.addEventListener("message", a, i);
37
37
  }
38
38
  send(t, ...[e]) {
39
39
  window.postMessage({
@@ -42,8 +42,8 @@ class j {
42
42
  });
43
43
  }
44
44
  }
45
- const Qt = U("BasicPlugin", "color:#000000;font-weight:bold;");
46
- class Di extends j {
45
+ const Qt = O("BasicPlugin", "color:#000000;font-weight:bold;");
46
+ class Ri extends V {
47
47
  constructor(...t) {
48
48
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qt("configured");
49
49
  }
@@ -56,8 +56,8 @@ class Di extends j {
56
56
  this.send("settings", { music: i == null ? void 0 : i.musicEnabled, sounds: i == null ? void 0 : i.soundEnabled });
57
57
  return;
58
58
  case "doBalanceUpdate":
59
- const { currency: n, coinValueInCents: o } = this.sdkConfig.api;
60
- i.currency === n && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(i.balanceInCurrency, o) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
59
+ const { currency: a, coinValueInCents: o } = this.sdkConfig.api;
60
+ i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: Lt(i.balanceInCurrency, o) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
61
61
  return;
62
62
  case "doGamePause":
63
63
  this.send("freeze");
@@ -92,8 +92,8 @@ class Di extends j {
92
92
  });
93
93
  }
94
94
  }
95
- const E = U("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Jt = U("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
96
- class Ni extends j {
95
+ const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Xt = O("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
96
+ class Li extends V {
97
97
  constructor(...t) {
98
98
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
99
99
  }
@@ -114,16 +114,16 @@ class Ni extends j {
114
114
  };
115
115
  }
116
116
  registerSdkToDebugEvents() {
117
- 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));
117
+ this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
118
118
  }
119
119
  _send(...t) {
120
- Jt(...t), this.send(...t);
120
+ Xt(...t), this.send(...t);
121
121
  }
122
122
  }
123
- const Yt = U("GigPlugin", "color:#000000;font-weight:bold;");
124
- class Gi extends j {
123
+ const Kt = O("GigPlugin", "color:#000000;font-weight:bold;");
124
+ class Ui extends V {
125
125
  constructor(...t) {
126
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Yt("configured");
126
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Kt("configured");
127
127
  }
128
128
  postMessage(t) {
129
129
  const e = {
@@ -171,10 +171,10 @@ class Gi extends j {
171
171
  });
172
172
  }
173
173
  }
174
- const Zt = U("OryxPlugin", "color:#000000;font-weight:bold;");
175
- class Hi extends j {
174
+ const Jt = O("OryxPlugin", "color:#000000;font-weight:bold;");
175
+ class _i extends V {
176
176
  constructor(...t) {
177
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Zt("configured");
177
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Jt("configured");
178
178
  }
179
179
  registerToSdkEvents() {
180
180
  window.addEventListener("message", (t) => {
@@ -226,54 +226,54 @@ class Hi extends j {
226
226
  });
227
227
  }
228
228
  }
229
- const ut = U("PariplayPlugin", "color:#000000;font-weight:bold;");
230
- function Ve(s) {
229
+ const dt = O("PariplayPlugin", "color:#000000;font-weight:bold;");
230
+ function Ge(s) {
231
231
  try {
232
232
  window.top.location = s;
233
233
  } catch {
234
234
  window.location = s;
235
235
  }
236
236
  }
237
- function ze(s, t) {
238
- return new Promise(function(i, n) {
237
+ function He(s, t) {
238
+ return new Promise(function(i, a) {
239
239
  const o = new XMLHttpRequest();
240
240
  o.onload = function() {
241
- o.status >= 200 && o.status < 300 ? i(o.responseText) : n(o.responseText);
241
+ o.status >= 200 && o.status < 300 ? i(o.responseText) : a(o.responseText);
242
242
  }, o.open(s, t), o.send();
243
243
  });
244
244
  }
245
- function qe() {
245
+ function Ve() {
246
246
  }
247
- function ei(s) {
247
+ function Yt(s) {
248
248
  return s.filter(function(e) {
249
249
  return e.messageType.toUpperCase() === "DATA";
250
250
  });
251
251
  }
252
- function We(s) {
252
+ function ze(s) {
253
253
  return s.filter(function(e) {
254
254
  return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
255
255
  });
256
256
  }
257
- function Ft(s) {
257
+ function Ut(s) {
258
258
  try {
259
259
  return JSON.parse(s.text);
260
260
  } catch {
261
261
  return {};
262
262
  }
263
263
  }
264
- function ti(s) {
265
- return s.map(Ft).filter(Boolean).find(function(e) {
264
+ function Zt(s) {
265
+ return s.map(Ut).filter(Boolean).find(function(e) {
266
266
  return e.betId != null && e.winId != null;
267
267
  }) || {};
268
268
  }
269
- function ii(s) {
270
- return s.map(Ft).filter(Boolean).find(function(e) {
269
+ function ei(s) {
270
+ return s.map(Ut).filter(Boolean).find(function(e) {
271
271
  return e.TotalBet != null && e.TotalWin != null;
272
272
  }) || {};
273
273
  }
274
- class Vi extends j {
274
+ class Bi extends V {
275
275
  constructor(...t) {
276
- super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ut("configured");
276
+ super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), dt("configured");
277
277
  }
278
278
  postMessage(t, e) {
279
279
  const i = {
@@ -281,26 +281,26 @@ class Vi extends j {
281
281
  sender: this.sdkConfig.api.game,
282
282
  type: t
283
283
  };
284
- e != null && (i.data = e), ut("postMessage", i), window.parent.postMessage(i, "*");
284
+ e != null && (i.data = e), dt("postMessage", i), window.parent.postMessage(i, "*");
285
285
  }
286
286
  coinsToCurrency(t) {
287
287
  return t * this.sdkConfig.api.coinValueInCents / 100;
288
288
  }
289
289
  handleContinueButton(t, e) {
290
- t.link && ze("GET", t.link), e();
290
+ t.link && He("GET", t.link), e();
291
291
  }
292
292
  handleLinkButton(t, e) {
293
293
  switch (t.linkType.toUpperCase()) {
294
294
  case "AJAX":
295
- ze("GET", t.link), e();
295
+ He("GET", t.link), e();
296
296
  return;
297
297
  case "AJAXRESPONSE":
298
- ze("GET", t.link).then(() => {
298
+ He("GET", t.link).then(() => {
299
299
  e();
300
300
  });
301
301
  return;
302
302
  case "REDIRECT":
303
- Ve(t.link), e();
303
+ Ge(t.link), e();
304
304
  return;
305
305
  }
306
306
  }
@@ -323,17 +323,17 @@ class Vi extends j {
323
323
  };
324
324
  }
325
325
  processInfoUiMessages(t) {
326
- return t.reduce((e, i) => e.then(() => new Promise((n) => {
326
+ return t.reduce((e, i) => e.then(() => new Promise((a) => {
327
327
  Object.assign({}, i, {
328
328
  buttons: i.buttons.filter((o) => o.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((o) => Object.assign({}, o, {
329
329
  onRelease: () => {
330
- const a = i.messageType.toUpperCase() === "POPUP" ? qe : n, h = this.buttonActions[o.action.toUpperCase()];
331
- h ? h(o, a) : a();
330
+ const n = i.messageType.toUpperCase() === "POPUP" ? Ve : a, h = this.buttonActions[o.action.toUpperCase()];
331
+ h ? h(o, n) : n();
332
332
  }
333
333
  }))
334
334
  });
335
- }).catch(qe)), Promise.resolve()).then(() => {
336
- }).catch(qe);
335
+ }).catch(Ve)), Promise.resolve()).then(() => {
336
+ }).catch(Ve);
337
337
  }
338
338
  registerToSdkEvents() {
339
339
  window.addEventListener("message", (t) => {
@@ -363,13 +363,13 @@ class Vi extends j {
363
363
  this.on("openGameResponse", (e) => {
364
364
  let i;
365
365
  try {
366
- const n = JSON.parse(
366
+ const a = JSON.parse(
367
367
  JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
368
- ), o = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
368
+ ), o = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
369
369
  i = {
370
- ClientToken: n.integrationSpecificAttributes.clientToken,
371
- CurrencyCode: n.currency,
372
- PlayerTokenId: n.user,
370
+ ClientToken: a.integrationSpecificAttributes.clientToken,
371
+ CurrencyCode: a.currency,
372
+ PlayerTokenId: a.user,
373
373
  SessionData: o
374
374
  };
375
375
  } catch {
@@ -380,8 +380,8 @@ class Vi extends j {
380
380
  success: !0
381
381
  });
382
382
  try {
383
- const n = We(e.contract.uiMessages);
384
- this.processInfoUiMessages(n);
383
+ const a = ze(e.contract.uiMessages);
384
+ this.processInfoUiMessages(a);
385
385
  } catch {
386
386
  }
387
387
  }), this.on("balance", ({ balance: e }) => {
@@ -397,25 +397,25 @@ class Vi extends j {
397
397
  window.history.back();
398
398
  }
399
399
  else
400
- this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ve(this.sdkConfig.api.homeUrl);
400
+ this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ge(this.sdkConfig.api.homeUrl);
401
401
  }), this.on("playEnd", (e) => {
402
402
  this.postMessage("roundEnded", {
403
403
  balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
404
404
  win: this.coinsToCurrency(e.contract.win.round)
405
405
  });
406
406
  try {
407
- const i = We(e.contract.uiMessages);
407
+ const i = ze(e.contract.uiMessages);
408
408
  this.processInfoUiMessages(i);
409
409
  } catch {
410
410
  }
411
411
  }), this.on("playError", (e) => {
412
- var i, n;
412
+ var i, a;
413
413
  this.postMessage("ticketReceived", {
414
414
  // TODO: Operator specific error code and message
415
415
  ErrorCode: (i = e.data) == null ? void 0 : i.code,
416
416
  ErrorMessage: "ERROR",
417
417
  Status: {
418
- ErrCode: (n = e.data) == null ? void 0 : n.code
418
+ ErrCode: (a = e.data) == null ? void 0 : a.code
419
419
  }
420
420
  });
421
421
  }), this.on("playResponse", (e) => {
@@ -424,12 +424,12 @@ class Vi extends j {
424
424
  e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
425
425
  )
426
426
  });
427
- const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), n = ei(e.contract.uiMessages), o = We(e.contract.uiMessages), a = ti(n), h = ii(n);
427
+ const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = Yt(e.contract.uiMessages), o = ze(e.contract.uiMessages), n = Zt(a), h = ei(a);
428
428
  this.postMessage("ticketReceived", {
429
429
  Balance: this.coinsToCurrency(e.contract.balance.coins),
430
430
  BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
431
- CreditTransactionId: a.betId,
432
- DebitTransactionId: a.winId,
431
+ CreditTransactionId: n.betId,
432
+ DebitTransactionId: n.winId,
433
433
  Message: o,
434
434
  SessionData: h,
435
435
  Status: {
@@ -446,18 +446,18 @@ class Vi extends j {
446
446
  }), this.on("loadStart", () => {
447
447
  this.postMessage("onAppFrameReady");
448
448
  }), this.on("cashier", () => {
449
- this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : Ve(this.sdkConfig.api.cashierUrl));
449
+ this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : Ge(this.sdkConfig.api.cashierUrl));
450
450
  });
451
451
  }
452
452
  }
453
- const he = U("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
454
- class zi extends j {
453
+ const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
454
+ class Fi extends V {
455
455
  constructor(...e) {
456
456
  super(...e);
457
- g(this, "VERSION", "1.17.0");
457
+ m(this, "VERSION", "1.17.0");
458
458
  const i = document.createElement("script");
459
459
  i.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, i.onload = () => {
460
- he("loaded"), window.FEIM.configure({
460
+ ue("loaded"), window.FEIM.configure({
461
461
  p2pConfig: {
462
462
  currency: this.sdkConfig.api.currency,
463
463
  launchParams: {
@@ -465,11 +465,11 @@ class zi extends j {
465
465
  homeurl: "homeUrl"
466
466
  }
467
467
  }
468
- }), he("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
468
+ }), ue("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
469
469
  }, document.body.appendChild(i);
470
470
  }
471
471
  registerToSdkEvents() {
472
- window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => he("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => he("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => he("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
472
+ window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => ue("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => ue("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => ue("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
473
473
  this.send("help", {});
474
474
  }), window.FEIM.on.togglePaytable(() => {
475
475
  this.send("paytable", {});
@@ -525,33 +525,33 @@ class zi extends j {
525
525
  });
526
526
  }
527
527
  }
528
- const $e = U("TukoPlugin", "color:#000000;font-weight:bold;");
529
- class qi extends j {
528
+ const qe = O("TukoPlugin", "color:#000000;font-weight:bold;");
529
+ class Di extends V {
530
530
  constructor(...e) {
531
531
  super(...e);
532
- g(this, "PING_INTERVAL", 1e4);
533
- const n = new URLSearchParams(window.location.search).get("pingCallbackUrl");
534
- n && window.setInterval(() => {
535
- this.ping(n);
536
- }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), $e("configured");
532
+ m(this, "PING_INTERVAL", 1e4);
533
+ const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
534
+ a && window.setInterval(() => {
535
+ this.ping(a);
536
+ }, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), qe("configured");
537
537
  }
538
538
  ping(e) {
539
539
  const i = new XMLHttpRequest();
540
540
  i.onreadystatechange = function() {
541
- i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? $e("ping ok", i) : $e("ping error", i));
541
+ i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? qe("ping ok", i) : qe("ping error", i));
542
542
  }, i.open("GET", e), i.send();
543
543
  }
544
544
  registerToSdkEvents() {
545
545
  window.addEventListener("message", (e) => {
546
546
  try {
547
- const { type: i, payload: n } = e.data;
547
+ const { type: i, payload: a } = e.data;
548
548
  switch (i) {
549
549
  case "doAudioSettings":
550
- this.send("settings", { music: n == null ? void 0 : n.musicEnabled, sounds: n == null ? void 0 : n.soundEnabled });
550
+ this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
551
551
  return;
552
552
  case "doBalanceUpdate":
553
- const { currency: o, coinValueInCents: a } = this.sdkConfig.api;
554
- n.currency === o && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Bt(n.balanceInCurrency, a) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
553
+ const { currency: o, coinValueInCents: n } = this.sdkConfig.api;
554
+ a.currency === o && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: Lt(a.balanceInCurrency, n) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
555
555
  return;
556
556
  case "doGamePause":
557
557
  this.send("freeze");
@@ -586,81 +586,104 @@ class qi extends j {
586
586
  });
587
587
  }
588
588
  }
589
- var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de = "object", tt = "string", be = "major", l = "model", r = "name", d = "type", u = "vendor", c = "version", S = "architecture", Y = "console", b = "mobile", f = "tablet", T = "smarttv", xe = "wearable", pt = "xr", it = "embedded", gt = "user-agent", st = 500, ot = "brands", W = "formFactors", rt = "fullVersionList", Z = "platform", ct = "platformVersion", Ge = "bitness", q = "sec-ch-ua", ni = q + "-full-version-list", ai = q + "-arch", oi = q + "-" + Ge, ri = q + "-form-factors", ci = q + "-" + b, di = q + "-" + l, Dt = q + "-" + Z, li = Dt + "-version", Nt = [ot, rt, b, l, Z, ct, S, W, Ge], A = "browser", B = "cpu", x = "device", F = "engine", P = "os", ee = "result", Ce = "Amazon", pe = "Apple", mt = "ASUS", wt = "BlackBerry", Me = "Google", bt = "Huawei", ft = "Lenovo", je = "LG", Re = "Microsoft", yt = "Motorola", Se = "Samsung", kt = "Sharp", Ie = "Sony", Xe = "Xiaomi", Ke = "Zebra", Q = "Mobile ", J = " Browser", Te = "Chrome", ui = "Edge", ge = "Firefox", me = "Opera", vt = "Facebook", Et = "Sogou", nt = "Windows", hi = typeof window !== V, I = hi && window.navigator ? window.navigator : void 0, G = I && I.userAgentData ? I.userAgentData : void 0, pi = function(s, t) {
589
+ const lt = O("QuantaPlugin", "color:#000000;font-weight:bold;");
590
+ class Ni extends V {
591
+ constructor(...t) {
592
+ super(...t), this.registerFromSdkEvents(), lt("configured");
593
+ }
594
+ postMessage(t) {
595
+ const e = { event: t };
596
+ lt("QuantaPlugin::postMessage", e), window.parent.postMessage(e, "*");
597
+ }
598
+ registerFromSdkEvents() {
599
+ this.on("close", () => {
600
+ this.postMessage("GameClosed");
601
+ }), this.on("loadEnd", () => {
602
+ this.postMessage("GameLoaded");
603
+ }), this.on("playCycleStart", () => {
604
+ this.postMessage("RoundStarted");
605
+ }), this.on("playCycleEnd", () => {
606
+ this.postMessage("RoundEnded");
607
+ }), this.on("playError", () => {
608
+ this.postMessage("RoundEnded");
609
+ });
610
+ }
611
+ }
612
+ var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce = "object", Ye = "string", we = "major", l = "model", r = "name", d = "type", u = "vendor", c = "version", M = "architecture", J = "console", b = "mobile", f = "tablet", I = "smarttv", Ae = "wearable", ht = "xr", Ze = "embedded", pt = "user-agent", et = 500, st = "brands", W = "formFactors", at = "fullVersionList", Y = "platform", nt = "platformVersion", De = "bitness", z = "sec-ch-ua", ii = z + "-full-version-list", si = z + "-arch", ai = z + "-" + De, ni = z + "-form-factors", oi = z + "-" + b, ri = z + "-" + l, _t = z + "-" + Y, ci = _t + "-version", Bt = [st, at, b, l, Y, nt, M, W, De], T = "browser", U = "cpu", x = "device", _ = "engine", P = "os", Z = "result", ve = "Amazon", he = "Apple", gt = "ASUS", mt = "BlackBerry", Ce = "Google", wt = "Huawei", bt = "Lenovo", We = "LG", Oe = "Microsoft", ft = "Motorola", Me = "Samsung", yt = "Sharp", Se = "Sony", $e = "Xiaomi", je = "Zebra", X = "Mobile ", K = " Browser", Ie = "Chrome", di = "Edge", pe = "Firefox", ge = "Opera", kt = "Facebook", Et = "Sogou", tt = "Windows", li = typeof window !== G, S = li && window.navigator ? window.navigator : void 0, D = S && S.userAgentData ? S.userAgentData : void 0, ui = function(s, t) {
590
613
  var e = {}, i = t;
591
- if (!Ue(t)) {
614
+ if (!xe(t)) {
592
615
  i = {};
593
- for (var n in t)
594
- for (var o in t[n])
595
- i[o] = t[n][o].concat(i[o] ? i[o] : []);
616
+ for (var a in t)
617
+ for (var o in t[a])
618
+ i[o] = t[a][o].concat(i[o] ? i[o] : []);
596
619
  }
597
- for (var a in s)
598
- e[a] = i[a] && i[a].length % 2 === 0 ? i[a].concat(s[a]) : s[a];
620
+ for (var n in s)
621
+ e[n] = i[n] && i[n].length % 2 === 0 ? i[n].concat(s[n]) : s[n];
599
622
  return e;
600
- }, He = function(s) {
623
+ }, Ne = function(s) {
601
624
  for (var t = {}, e = 0; e < s.length; e++)
602
625
  t[s[e].toUpperCase()] = s[e];
603
626
  return t;
604
- }, at = function(s, t) {
605
- if (typeof s === de && s.length > 0) {
627
+ }, it = function(s, t) {
628
+ if (typeof s === ce && s.length > 0) {
606
629
  for (var e in s)
607
- if (z(s[e]) == z(t))
630
+ if (H(s[e]) == H(t))
608
631
  return !0;
609
632
  return !1;
610
633
  }
611
- return le(s) ? z(t).indexOf(z(s)) !== -1 : !1;
612
- }, Ue = function(s, t) {
634
+ return de(s) ? H(t).indexOf(H(s)) !== -1 : !1;
635
+ }, xe = function(s, t) {
613
636
  for (var e in s)
614
- return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? Ue(s[e]) : !1);
615
- }, le = function(s) {
616
- return typeof s === tt;
637
+ return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? xe(s[e]) : !1);
638
+ }, de = function(s) {
639
+ return typeof s === Ye;
617
640
  }, Qe = function(s) {
618
641
  if (s) {
619
642
  for (var t = [], e = $(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
620
643
  if (e[i].indexOf(";") > -1) {
621
- var n = fe(e[i]).split(";v=");
622
- t[i] = { brand: n[0], version: n[1] };
644
+ var a = be(e[i]).split(";v=");
645
+ t[i] = { brand: a[0], version: a[1] };
623
646
  } else
624
- t[i] = fe(e[i]);
647
+ t[i] = be(e[i]);
625
648
  return t;
626
649
  }
627
- }, z = function(s) {
628
- return le(s) ? s.toLowerCase() : s;
629
- }, Je = function(s) {
630
- return le(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
631
- }, D = function(s) {
650
+ }, H = function(s) {
651
+ return de(s) ? s.toLowerCase() : s;
652
+ }, Xe = function(s) {
653
+ return de(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
654
+ }, B = function(s) {
632
655
  for (var t in s) {
633
656
  var e = s[t];
634
- typeof e == de && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
657
+ typeof e == ce && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
635
658
  }
636
659
  return this;
637
660
  }, $ = function(s, t) {
638
- return le(t) ? t.replace(s, ce) : t;
639
- }, we = function(s) {
661
+ return de(t) ? t.replace(s, re) : t;
662
+ }, me = function(s) {
640
663
  return $(/\\?\"/g, s);
641
- }, fe = function(s, t) {
642
- if (le(s))
643
- return s = $(/^\s\s*/, s), typeof t === V ? s : s.substring(0, st);
644
- }, Ct = function(s, t) {
664
+ }, be = function(s, t) {
665
+ if (de(s))
666
+ return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0, et);
667
+ }, vt = function(s, t) {
645
668
  if (!(!s || !t))
646
- for (var e = 0, i, n, o, a, h, p; e < t.length && !h; ) {
647
- var m = t[e], w = t[e + 1];
648
- for (i = n = 0; i < m.length && !h && m[i]; )
649
- if (h = m[i++].exec(s), h)
650
- for (o = 0; o < w.length; o++)
651
- p = h[++n], a = w[o], typeof a === de && a.length > 0 ? a.length === 2 ? typeof a[1] == et ? this[a[0]] = a[1].call(this, p) : this[a[0]] = a[1] : a.length === 3 ? typeof a[1] === et && !(a[1].exec && a[1].test) ? this[a[0]] = p ? a[1].call(this, p, a[2]) : void 0 : this[a[0]] = p ? p.replace(a[1], a[2]) : void 0 : a.length === 4 && (this[a[0]] = p ? a[3].call(this, p.replace(a[1], a[2])) : void 0) : this[a] = p || void 0;
669
+ for (var e = 0, i, a, o, n, h, p; e < t.length && !h; ) {
670
+ var w = t[e], g = t[e + 1];
671
+ for (i = a = 0; i < w.length && !h && w[i]; )
672
+ if (h = w[i++].exec(s), h)
673
+ for (o = 0; o < g.length; o++)
674
+ p = h[++a], n = g[o], typeof n === ce && n.length > 0 ? n.length === 2 ? typeof n[1] == Je ? this[n[0]] = n[1].call(this, p) : this[n[0]] = n[1] : n.length === 3 ? typeof n[1] === Je && !(n[1].exec && n[1].test) ? this[n[0]] = p ? n[1].call(this, p, n[2]) : void 0 : this[n[0]] = p ? p.replace(n[1], n[2]) : void 0 : n.length === 4 && (this[n[0]] = p ? n[3].call(this, p.replace(n[1], n[2])) : void 0) : this[n] = p || void 0;
652
675
  e += 2;
653
676
  }
654
- }, Le = function(s, t) {
677
+ }, Re = function(s, t) {
655
678
  for (var e in t)
656
- if (typeof t[e] === de && t[e].length > 0) {
679
+ if (typeof t[e] === ce && t[e].length > 0) {
657
680
  for (var i = 0; i < t[e].length; i++)
658
- if (at(t[e][i], s))
659
- return e === ht ? void 0 : e;
660
- } else if (at(t[e], s))
661
- return e === ht ? void 0 : e;
681
+ if (it(t[e][i], s))
682
+ return e === ut ? void 0 : e;
683
+ } else if (it(t[e], s))
684
+ return e === ut ? void 0 : e;
662
685
  return t.hasOwnProperty("*") ? t["*"] : s;
663
- }, Mt = {
686
+ }, Ct = {
664
687
  ME: "4.90",
665
688
  "NT 3.11": "NT3.51",
666
689
  "NT 4.0": "NT4.0",
@@ -672,7 +695,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
672
695
  "8.1": "NT 6.3",
673
696
  10: ["NT 6.4", "NT 10.0"],
674
697
  RT: "ARM"
675
- }, St = {
698
+ }, Mt = {
676
699
  embedded: "Automotive",
677
700
  mobile: "Mobile",
678
701
  tablet: ["Tablet", "EInk"],
@@ -681,14 +704,14 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
681
704
  xr: ["VR", "XR"],
682
705
  "?": ["Desktop", "Unknown"],
683
706
  "*": void 0
684
- }, It = {
707
+ }, St = {
685
708
  browser: [
686
709
  [
687
710
  // Most common regardless engine
688
711
  /\b(?:crmo|crios)\/([\w\.]+)/i
689
712
  // Chrome for Android/iOS
690
713
  ],
691
- [c, [r, Q + "Chrome"]],
714
+ [c, [r, X + "Chrome"]],
692
715
  [
693
716
  /edg(?:e|ios|a)?\/([\w\.]+)/i
694
717
  // Microsoft Edge
@@ -708,17 +731,17 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
708
731
  /opios[\/ ]+([\w\.]+)/i
709
732
  // Opera mini on iphone >= 8.0
710
733
  ],
711
- [c, [r, me + " Mini"]],
734
+ [c, [r, ge + " Mini"]],
712
735
  [
713
736
  /\bop(?:rg)?x\/([\w\.]+)/i
714
737
  // Opera GX
715
738
  ],
716
- [c, [r, me + " GX"]],
739
+ [c, [r, ge + " GX"]],
717
740
  [
718
741
  /\bopr\/([\w\.]+)/i
719
742
  // Opera Webkit
720
743
  ],
721
- [c, [r, me]],
744
+ [c, [r, ge]],
722
745
  [
723
746
  // Mixed
724
747
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
@@ -781,22 +804,22 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
781
804
  /slbrowser\/([\w\.]+)/i
782
805
  // Smart Lenovo Browser
783
806
  ],
784
- [c, [r, "Smart " + ft + J]],
807
+ [c, [r, "Smart " + bt + K]],
785
808
  [
786
809
  /(avast|avg)\/([\w\.]+)/i
787
810
  // Avast/AVG Secure Browser
788
811
  ],
789
- [[r, /(.+)/, "$1 Secure" + J], c],
812
+ [[r, /(.+)/, "$1 Secure" + K], c],
790
813
  [
791
814
  /\bfocus\/([\w\.]+)/i
792
815
  // Firefox Focus
793
816
  ],
794
- [c, [r, ge + " Focus"]],
817
+ [c, [r, pe + " Focus"]],
795
818
  [
796
819
  /\bopt\/([\w\.]+)/i
797
820
  // Opera Touch
798
821
  ],
799
- [c, [r, me + " Touch"]],
822
+ [c, [r, ge + " Touch"]],
800
823
  [
801
824
  /coc_coc\w+\/([\w\.]+)/i
802
825
  // Coc Coc Browser
@@ -811,22 +834,22 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
811
834
  /coast\/([\w\.]+)/i
812
835
  // Opera Coast
813
836
  ],
814
- [c, [r, me + " Coast"]],
837
+ [c, [r, ge + " Coast"]],
815
838
  [
816
839
  /miuibrowser\/([\w\.]+)/i
817
840
  // MIUI Browser
818
841
  ],
819
- [c, [r, "MIUI" + J]],
842
+ [c, [r, "MIUI" + K]],
820
843
  [
821
844
  /fxios\/([\w\.-]+)/i
822
845
  // Firefox for iOS
823
846
  ],
824
- [c, [r, Q + ge]],
847
+ [c, [r, X + pe]],
825
848
  [
826
849
  /\bqihu|(qi?ho?o?|360)browser/i
827
850
  // 360
828
851
  ],
829
- [[r, "360" + J]],
852
+ [[r, "360" + K]],
830
853
  [
831
854
  /\b(qq)\/([\w\.]+)/i
832
855
  // QQ
@@ -835,13 +858,13 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
835
858
  [
836
859
  /(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i
837
860
  ],
838
- [[r, /(.+)/, "$1" + J], c],
861
+ [[r, /(.+)/, "$1" + K], c],
839
862
  [
840
863
  // Oculus/Sailfish/HuaweiBrowser/VivoBrowser/PicoBrowser
841
864
  /samsungbrowser\/([\w\.]+)/i
842
865
  // Samsung Internet
843
866
  ],
844
- [c, [r, Se + " Internet"]],
867
+ [c, [r, Me + " Internet"]],
845
868
  [
846
869
  /(comodo_dragon)\/([\w\.]+)/i
847
870
  // Comodo Dragon
@@ -878,7 +901,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
878
901
  /((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
879
902
  // Facebook App for iOS & Android
880
903
  ],
881
- [[r, vt], c],
904
+ [[r, kt], c],
882
905
  [
883
906
  /(Klarna)\/([\w\.]+)/i,
884
907
  // Klarna Shopping Browser for iOS & Android
@@ -912,22 +935,22 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
912
935
  /headlesschrome(?:\/([\w\.]+)| )/i
913
936
  // Chrome Headless
914
937
  ],
915
- [c, [r, Te + " Headless"]],
938
+ [c, [r, Ie + " Headless"]],
916
939
  [
917
940
  / wv\).+(chrome)\/([\w\.]+)/i
918
941
  // Chrome WebView
919
942
  ],
920
- [[r, Te + " WebView"], c],
943
+ [[r, Ie + " WebView"], c],
921
944
  [
922
945
  /droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
923
946
  // Android Browser
924
947
  ],
925
- [c, [r, "Android" + J]],
948
+ [c, [r, "Android" + K]],
926
949
  [
927
950
  /chrome\/([\w\.]+) mobile/i
928
951
  // Chrome Mobile
929
952
  ],
930
- [c, [r, Q + "Chrome"]],
953
+ [c, [r, X + "Chrome"]],
931
954
  [
932
955
  /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i
933
956
  // Chrome/OmniWeb/Arora/Tizen/Nokia
@@ -937,11 +960,11 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
937
960
  /version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i
938
961
  // Safari Mobile
939
962
  ],
940
- [c, [r, Q + "Safari"]],
963
+ [c, [r, X + "Safari"]],
941
964
  [
942
965
  /iphone .*mobile(?:\/\w+ | ?)safari/i
943
966
  ],
944
- [[r, Q + "Safari"]],
967
+ [[r, X + "Safari"]],
945
968
  [
946
969
  /version\/([\w\.\,]+) .*(safari)/i
947
970
  // Safari
@@ -961,7 +984,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
961
984
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
962
985
  // Firefox Mobile
963
986
  ],
964
- [[r, Q + ge], c],
987
+ [[r, X + pe], c],
965
988
  [
966
989
  /(navigator|netscape\d?)\/([-\w\.]+)/i
967
990
  // Netscape
@@ -976,7 +999,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
976
999
  /mobile vr; rv:([\w\.]+)\).+firefox/i
977
1000
  // Firefox Reality
978
1001
  ],
979
- [c, [r, ge + " Reality"]],
1002
+ [c, [r, pe + " Reality"]],
980
1003
  [
981
1004
  /ekiohf.+(flow)\/([\w\.]+)/i,
982
1005
  // Flow
@@ -1001,51 +1024,51 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1001
1024
  /(cobalt)\/([\w\.]+)/i
1002
1025
  // Cobalt
1003
1026
  ],
1004
- [r, [c, /[^\d\.]+./, ce]]
1027
+ [r, [c, /[^\d\.]+./, re]]
1005
1028
  ],
1006
1029
  cpu: [
1007
1030
  [
1008
1031
  /\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i
1009
1032
  // AMD64 (x64)
1010
1033
  ],
1011
- [[S, "amd64"]],
1034
+ [[M, "amd64"]],
1012
1035
  [
1013
1036
  /(ia32(?=;))/i,
1014
1037
  // IA32 (quicktime)
1015
1038
  /((?:i[346]|x)86)[;\)]/i
1016
1039
  // IA32 (x86)
1017
1040
  ],
1018
- [[S, "ia32"]],
1041
+ [[M, "ia32"]],
1019
1042
  [
1020
1043
  /\b(aarch64|arm(v?8e?l?|_?64))\b/i
1021
1044
  // ARM64
1022
1045
  ],
1023
- [[S, "arm64"]],
1046
+ [[M, "arm64"]],
1024
1047
  [
1025
1048
  /\b(arm(?:v[67])?ht?n?[fl]p?)\b/i
1026
1049
  // ARMHF
1027
1050
  ],
1028
- [[S, "armhf"]],
1051
+ [[M, "armhf"]],
1029
1052
  [
1030
1053
  // PocketPC mistakenly identified as PowerPC
1031
1054
  /windows (ce|mobile); ppc;/i
1032
1055
  ],
1033
- [[S, "arm"]],
1056
+ [[M, "arm"]],
1034
1057
  [
1035
1058
  /((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
1036
1059
  // PowerPC
1037
1060
  ],
1038
- [[S, /ower/, ce, z]],
1061
+ [[M, /ower/, re, H]],
1039
1062
  [
1040
1063
  /(sun4\w)[;\)]/i
1041
1064
  // SPARC
1042
1065
  ],
1043
- [[S, "sparc"]],
1066
+ [[M, "sparc"]],
1044
1067
  [
1045
1068
  /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
1046
1069
  // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
1047
1070
  ],
1048
- [[S, z]]
1071
+ [[M, H]]
1049
1072
  ],
1050
1073
  device: [
1051
1074
  [
@@ -1055,45 +1078,45 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1055
1078
  // Samsung
1056
1079
  /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
1057
1080
  ],
1058
- [l, [u, Se], [d, f]],
1081
+ [l, [u, Me], [d, f]],
1059
1082
  [
1060
1083
  /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1061
1084
  /samsung[- ]([-\w]+)/i,
1062
1085
  /sec-(sgh\w+)/i
1063
1086
  ],
1064
- [l, [u, Se], [d, b]],
1087
+ [l, [u, Me], [d, b]],
1065
1088
  [
1066
1089
  // Apple
1067
1090
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1068
1091
  // iPod/iPhone
1069
1092
  ],
1070
- [l, [u, pe], [d, b]],
1093
+ [l, [u, he], [d, b]],
1071
1094
  [
1072
1095
  /\((ipad);[-\w\),; ]+apple/i,
1073
1096
  // iPad
1074
1097
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1075
1098
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1076
1099
  ],
1077
- [l, [u, pe], [d, f]],
1100
+ [l, [u, he], [d, f]],
1078
1101
  [
1079
1102
  /(macintosh);/i
1080
1103
  ],
1081
- [l, [u, pe]],
1104
+ [l, [u, he]],
1082
1105
  [
1083
1106
  // Sharp
1084
1107
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1085
1108
  ],
1086
- [l, [u, kt], [d, b]],
1109
+ [l, [u, yt], [d, b]],
1087
1110
  [
1088
1111
  // Huawei
1089
1112
  /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
1090
1113
  ],
1091
- [l, [u, bt], [d, f]],
1114
+ [l, [u, wt], [d, f]],
1092
1115
  [
1093
1116
  /(?:huawei|honor)([-\w ]+)[;\)]/i,
1094
1117
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1095
1118
  ],
1096
- [l, [u, bt], [d, b]],
1119
+ [l, [u, wt], [d, b]],
1097
1120
  [
1098
1121
  // Xiaomi
1099
1122
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
@@ -1109,14 +1132,14 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1109
1132
  /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
1110
1133
  // Xiaomi Mi
1111
1134
  ],
1112
- [[l, /_/g, " "], [u, Xe], [d, b]],
1135
+ [[l, /_/g, " "], [u, $e], [d, b]],
1113
1136
  [
1114
1137
  /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
1115
1138
  // Redmi Pad
1116
1139
  /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
1117
1140
  // Mi Pad tablets
1118
1141
  ],
1119
- [[l, /_/g, " "], [u, Xe], [d, f]],
1142
+ [[l, /_/g, " "], [u, $e], [d, f]],
1120
1143
  [
1121
1144
  // OPPO
1122
1145
  /; (\w+) bui.+ oppo/i,
@@ -1144,28 +1167,28 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1144
1167
  /\bmot(?:orola)?[- ](\w*)/i,
1145
1168
  /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1146
1169
  ],
1147
- [l, [u, yt], [d, b]],
1170
+ [l, [u, ft], [d, b]],
1148
1171
  [
1149
1172
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1150
1173
  ],
1151
- [l, [u, yt], [d, f]],
1174
+ [l, [u, ft], [d, f]],
1152
1175
  [
1153
1176
  // LG
1154
1177
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1155
1178
  ],
1156
- [l, [u, je], [d, f]],
1179
+ [l, [u, We], [d, f]],
1157
1180
  [
1158
1181
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1159
1182
  /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1160
1183
  /\blg-?([\d\w]+) bui/i
1161
1184
  ],
1162
- [l, [u, je], [d, b]],
1185
+ [l, [u, We], [d, b]],
1163
1186
  [
1164
1187
  // Lenovo
1165
1188
  /(ideatab[-\w ]+)/i,
1166
1189
  /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
1167
1190
  ],
1168
- [l, [u, ft], [d, f]],
1191
+ [l, [u, bt], [d, f]],
1169
1192
  [
1170
1193
  // Nokia
1171
1194
  /(?:maemo|nokia).*(n900|lumia \d+)/i,
@@ -1177,22 +1200,22 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1177
1200
  /(pixel c)\b/i
1178
1201
  // Google Pixel C
1179
1202
  ],
1180
- [l, [u, Me], [d, f]],
1203
+ [l, [u, Ce], [d, f]],
1181
1204
  [
1182
1205
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1183
1206
  // Google Pixel
1184
1207
  ],
1185
- [l, [u, Me], [d, b]],
1208
+ [l, [u, Ce], [d, b]],
1186
1209
  [
1187
1210
  // Sony
1188
1211
  /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
1189
1212
  ],
1190
- [l, [u, Ie], [d, b]],
1213
+ [l, [u, Se], [d, b]],
1191
1214
  [
1192
1215
  /sony tablet [ps]/i,
1193
1216
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1194
1217
  ],
1195
- [[l, "Xperia Tablet"], [u, Ie], [d, f]],
1218
+ [[l, "Xperia Tablet"], [u, Se], [d, f]],
1196
1219
  [
1197
1220
  // OnePlus
1198
1221
  / (kb2005|in20[12]5|be20[12][59])\b/i,
@@ -1207,12 +1230,12 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1207
1230
  /(kf[a-z]+)( bui|\)).+silk\//i
1208
1231
  // Kindle Fire HD
1209
1232
  ],
1210
- [l, [u, Ce], [d, f]],
1233
+ [l, [u, ve], [d, f]],
1211
1234
  [
1212
1235
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1213
1236
  // Fire Phone
1214
1237
  ],
1215
- [[l, /(.+)/g, "Fire Phone $1"], [u, Ce], [d, b]],
1238
+ [[l, /(.+)/g, "Fire Phone $1"], [u, ve], [d, b]],
1216
1239
  [
1217
1240
  // BlackBerry
1218
1241
  /(playbook);[-\w\),; ]+(rim)/i
@@ -1224,16 +1247,16 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1224
1247
  /\(bb10; (\w+)/i
1225
1248
  // BlackBerry 10
1226
1249
  ],
1227
- [l, [u, wt], [d, b]],
1250
+ [l, [u, mt], [d, b]],
1228
1251
  [
1229
1252
  // Asus
1230
1253
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1231
1254
  ],
1232
- [l, [u, mt], [d, f]],
1255
+ [l, [u, gt], [d, f]],
1233
1256
  [
1234
1257
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1235
1258
  ],
1236
- [l, [u, mt], [d, b]],
1259
+ [l, [u, gt], [d, b]],
1237
1260
  [
1238
1261
  // HTC
1239
1262
  /(nexus 9)/i
@@ -1298,7 +1321,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1298
1321
  /(surface duo)/i
1299
1322
  // Surface Duo
1300
1323
  ],
1301
- [l, [u, Re], [d, f]],
1324
+ [l, [u, Oe], [d, f]],
1302
1325
  [
1303
1326
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1304
1327
  // Fairphone
@@ -1318,16 +1341,16 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1318
1341
  /(kin\.[onetw]{3})/i
1319
1342
  // Microsoft Kin
1320
1343
  ],
1321
- [[l, /\./g, " "], [u, Re], [d, b]],
1344
+ [[l, /\./g, " "], [u, Oe], [d, b]],
1322
1345
  [
1323
1346
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1324
1347
  // Zebra
1325
1348
  ],
1326
- [l, [u, Ke], [d, f]],
1349
+ [l, [u, je], [d, f]],
1327
1350
  [
1328
1351
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1329
1352
  ],
1330
- [l, [u, Ke], [d, b]],
1353
+ [l, [u, je], [d, b]],
1331
1354
  [
1332
1355
  ///////////////////
1333
1356
  // SMARTTVS
@@ -1335,64 +1358,64 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1335
1358
  /smart-tv.+(samsung)/i
1336
1359
  // Samsung
1337
1360
  ],
1338
- [u, [d, T]],
1361
+ [u, [d, I]],
1339
1362
  [
1340
1363
  /hbbtv.+maple;(\d+)/i
1341
1364
  ],
1342
- [[l, /^/, "SmartTV"], [u, Se], [d, T]],
1365
+ [[l, /^/, "SmartTV"], [u, Me], [d, I]],
1343
1366
  [
1344
1367
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1345
1368
  // LG SmartTV
1346
1369
  ],
1347
- [[u, je], [d, T]],
1370
+ [[u, We], [d, I]],
1348
1371
  [
1349
1372
  /(apple) ?tv/i
1350
1373
  // Apple TV
1351
1374
  ],
1352
- [u, [l, pe + " TV"], [d, T]],
1375
+ [u, [l, he + " TV"], [d, I]],
1353
1376
  [
1354
1377
  /crkey/i
1355
1378
  // Google Chromecast
1356
1379
  ],
1357
- [[l, Te + "cast"], [u, Me], [d, T]],
1380
+ [[l, Ie + "cast"], [u, Ce], [d, I]],
1358
1381
  [
1359
1382
  /droid.+aft(\w+)( bui|\))/i
1360
1383
  // Fire TV
1361
1384
  ],
1362
- [l, [u, Ce], [d, T]],
1385
+ [l, [u, ve], [d, I]],
1363
1386
  [
1364
1387
  /\(dtv[\);].+(aquos)/i,
1365
1388
  /(aquos-tv[\w ]+)\)/i
1366
1389
  // Sharp
1367
1390
  ],
1368
- [l, [u, kt], [d, T]],
1391
+ [l, [u, yt], [d, I]],
1369
1392
  [
1370
1393
  /(bravia[\w ]+)( bui|\))/i
1371
1394
  // Sony
1372
1395
  ],
1373
- [l, [u, Ie], [d, T]],
1396
+ [l, [u, Se], [d, I]],
1374
1397
  [
1375
1398
  /(mitv-\w{5}) bui/i
1376
1399
  // Xiaomi
1377
1400
  ],
1378
- [l, [u, Xe], [d, T]],
1401
+ [l, [u, $e], [d, I]],
1379
1402
  [
1380
1403
  /Hbbtv.*(technisat) (.*);/i
1381
1404
  // TechniSAT
1382
1405
  ],
1383
- [u, l, [d, T]],
1406
+ [u, l, [d, I]],
1384
1407
  [
1385
1408
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1386
1409
  // Roku
1387
1410
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1388
1411
  // HbbTV devices
1389
1412
  ],
1390
- [[u, fe], [l, fe], [d, T]],
1413
+ [[u, be], [l, be], [d, I]],
1391
1414
  [
1392
1415
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1393
1416
  // SmartTV from Unidentified Vendors
1394
1417
  ],
1395
- [[d, T]],
1418
+ [[d, I]],
1396
1419
  [
1397
1420
  ///////////////////
1398
1421
  // CONSOLES
@@ -1402,22 +1425,22 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1402
1425
  /(nintendo) (\w+)/i
1403
1426
  // Nintendo
1404
1427
  ],
1405
- [u, l, [d, Y]],
1428
+ [u, l, [d, J]],
1406
1429
  [
1407
1430
  /droid.+; (shield) bui/i
1408
1431
  // Nvidia
1409
1432
  ],
1410
- [l, [u, "Nvidia"], [d, Y]],
1433
+ [l, [u, "Nvidia"], [d, J]],
1411
1434
  [
1412
1435
  /(playstation \w+)/i
1413
1436
  // Playstation
1414
1437
  ],
1415
- [l, [u, Ie], [d, Y]],
1438
+ [l, [u, Se], [d, J]],
1416
1439
  [
1417
1440
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1418
1441
  // Microsoft Xbox
1419
1442
  ],
1420
- [l, [u, Re], [d, Y]],
1443
+ [l, [u, Oe], [d, J]],
1421
1444
  [
1422
1445
  ///////////////////
1423
1446
  // WEARABLES
@@ -1425,16 +1448,16 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1425
1448
  /((pebble))app/i
1426
1449
  // Pebble
1427
1450
  ],
1428
- [u, l, [d, xe]],
1451
+ [u, l, [d, Ae]],
1429
1452
  [
1430
1453
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1431
1454
  // Apple Watch
1432
1455
  ],
1433
- [l, [u, pe], [d, xe]],
1456
+ [l, [u, he], [d, Ae]],
1434
1457
  [
1435
1458
  /droid.+; (wt63?0{2,3})\)/i
1436
1459
  ],
1437
- [l, [u, Ke], [d, xe]],
1460
+ [l, [u, je], [d, Ae]],
1438
1461
  [
1439
1462
  ///////////////////
1440
1463
  // XR
@@ -1442,12 +1465,12 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1442
1465
  /droid.+; (glass) \d/i
1443
1466
  // Google Glass
1444
1467
  ],
1445
- [l, [u, Me], [d, pt]],
1468
+ [l, [u, Ce], [d, ht]],
1446
1469
  [
1447
1470
  /(quest( \d| pro)?)/i
1448
1471
  // Oculus Quest
1449
1472
  ],
1450
- [l, [u, vt], [d, pt]],
1473
+ [l, [u, kt], [d, ht]],
1451
1474
  [
1452
1475
  ///////////////////
1453
1476
  // EMBEDDED
@@ -1455,12 +1478,12 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1455
1478
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1456
1479
  // Tesla
1457
1480
  ],
1458
- [u, [d, it]],
1481
+ [u, [d, Ze]],
1459
1482
  [
1460
1483
  /(aeobc)\b/i
1461
1484
  // Echo Dot
1462
1485
  ],
1463
- [l, [u, Ce], [d, it]],
1486
+ [l, [u, ve], [d, Ze]],
1464
1487
  [
1465
1488
  ////////////////////
1466
1489
  // MIXED (GENERIC)
@@ -1495,7 +1518,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1495
1518
  /windows.+ edge\/([\w\.]+)/i
1496
1519
  // EdgeHTML
1497
1520
  ],
1498
- [c, [r, ui + "HTML"]],
1521
+ [c, [r, di + "HTML"]],
1499
1522
  [
1500
1523
  /webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
1501
1524
  // Blink
@@ -1532,14 +1555,14 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1532
1555
  /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
1533
1556
  // Windows Phone
1534
1557
  ],
1535
- [r, [c, Le, Mt]],
1558
+ [r, [c, Re, Ct]],
1536
1559
  [
1537
1560
  /windows nt 6\.2; (arm)/i,
1538
1561
  // Windows RT
1539
1562
  /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
1540
1563
  /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
1541
1564
  ],
1542
- [[c, Le, Mt], [r, nt]],
1565
+ [[c, Re, Ct], [r, tt]],
1543
1566
  [
1544
1567
  // iOS/macOS
1545
1568
  /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
@@ -1575,7 +1598,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1575
1598
  /\(bb(10);/i
1576
1599
  // BlackBerry 10
1577
1600
  ],
1578
- [c, [r, wt]],
1601
+ [c, [r, mt]],
1579
1602
  [
1580
1603
  /(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
1581
1604
  // Symbian
@@ -1585,7 +1608,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1585
1608
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
1586
1609
  // Firefox OS
1587
1610
  ],
1588
- [c, [r, ge + " OS"]],
1611
+ [c, [r, pe + " OS"]],
1589
1612
  [
1590
1613
  /web0s;.+rt(tv)/i,
1591
1614
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
@@ -1602,7 +1625,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1602
1625
  /crkey\/([\d\.]+)/i
1603
1626
  // Google Chromecast
1604
1627
  ],
1605
- [c, [r, Te + "cast"]],
1628
+ [c, [r, Ie + "cast"]],
1606
1629
  [
1607
1630
  /(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
1608
1631
  // Chromium OS
@@ -1657,214 +1680,214 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
1657
1680
  ],
1658
1681
  [r, c]
1659
1682
  ]
1660
- }, Ae = function() {
1683
+ }, Te = function() {
1661
1684
  var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
1662
- return D.call(s.init, [
1663
- [A, [r, c, be, d]],
1664
- [B, [S]],
1685
+ return B.call(s.init, [
1686
+ [T, [r, c, we, d]],
1687
+ [U, [M]],
1665
1688
  [x, [d, l, u]],
1666
- [F, [r, c]],
1689
+ [_, [r, c]],
1667
1690
  [P, [r, c]]
1668
- ]), D.call(s.isIgnore, [
1669
- [A, [c, be]],
1670
- [F, [c]],
1691
+ ]), B.call(s.isIgnore, [
1692
+ [T, [c, we]],
1693
+ [_, [c]],
1671
1694
  [P, [c]]
1672
- ]), D.call(s.isIgnoreRgx, [
1673
- [A, / ?browser$/i],
1695
+ ]), B.call(s.isIgnoreRgx, [
1696
+ [T, / ?browser$/i],
1674
1697
  [P, / ?os$/i]
1675
- ]), D.call(s.toString, [
1676
- [A, [r, c]],
1677
- [B, [S]],
1698
+ ]), B.call(s.toString, [
1699
+ [T, [r, c]],
1700
+ [U, [M]],
1678
1701
  [x, [u, l]],
1679
- [F, [r, c]],
1702
+ [_, [r, c]],
1680
1703
  [P, [r, c]]
1681
1704
  ]), s;
1682
- }(), gi = function(s, t) {
1683
- var e = Ae.init[t], i = Ae.isIgnore[t] || 0, n = Ae.isIgnoreRgx[t] || 0, o = Ae.toString[t] || 0;
1684
- function a() {
1685
- D.call(this, e);
1705
+ }(), hi = function(s, t) {
1706
+ var e = Te.init[t], i = Te.isIgnore[t] || 0, a = Te.isIgnoreRgx[t] || 0, o = Te.toString[t] || 0;
1707
+ function n() {
1708
+ B.call(this, e);
1686
1709
  }
1687
- return a.prototype.getItem = function() {
1710
+ return n.prototype.getItem = function() {
1688
1711
  return s;
1689
- }, a.prototype.withClientHints = function() {
1690
- return G ? G.getHighEntropyValues(Nt).then(function(h) {
1691
- return s.setCH(new Gt(h, !1)).parseCH().get();
1712
+ }, n.prototype.withClientHints = function() {
1713
+ return D ? D.getHighEntropyValues(Bt).then(function(h) {
1714
+ return s.setCH(new Ft(h, !1)).parseCH().get();
1692
1715
  }) : s.parseCH().get();
1693
- }, a.prototype.withFeatureCheck = function() {
1716
+ }, n.prototype.withFeatureCheck = function() {
1694
1717
  return s.detectFeature().get();
1695
- }, t != ee && (a.prototype.is = function(h) {
1718
+ }, t != Z && (n.prototype.is = function(h) {
1696
1719
  var p = !1;
1697
- for (var m in this)
1698
- if (this.hasOwnProperty(m) && !at(i, m) && z(n ? $(n, this[m]) : this[m]) == z(n ? $(n, h) : h)) {
1699
- if (p = !0, h != V)
1720
+ for (var w in this)
1721
+ if (this.hasOwnProperty(w) && !it(i, w) && H(a ? $(a, this[w]) : this[w]) == H(a ? $(a, h) : h)) {
1722
+ if (p = !0, h != G)
1700
1723
  break;
1701
- } else if (h == V && p) {
1724
+ } else if (h == G && p) {
1702
1725
  p = !p;
1703
1726
  break;
1704
1727
  }
1705
1728
  return p;
1706
- }, a.prototype.toString = function() {
1707
- var h = ce;
1729
+ }, n.prototype.toString = function() {
1730
+ var h = re;
1708
1731
  for (var p in o)
1709
- typeof this[o[p]] !== V && (h += (h ? " " : ce) + this[o[p]]);
1710
- return h || V;
1711
- }), G || (a.prototype.then = function(h) {
1712
- var p = this, m = function() {
1713
- for (var v in p)
1714
- p.hasOwnProperty(v) && (this[v] = p[v]);
1732
+ typeof this[o[p]] !== G && (h += (h ? " " : re) + this[o[p]]);
1733
+ return h || G;
1734
+ }), D || (n.prototype.then = function(h) {
1735
+ var p = this, w = function() {
1736
+ for (var k in p)
1737
+ p.hasOwnProperty(k) && (this[k] = p[k]);
1715
1738
  };
1716
- m.prototype = {
1717
- is: a.prototype.is,
1718
- toString: a.prototype.toString
1739
+ w.prototype = {
1740
+ is: n.prototype.is,
1741
+ toString: n.prototype.toString
1719
1742
  };
1720
- var w = new m();
1721
- return h(w), w;
1722
- }), new a();
1743
+ var g = new w();
1744
+ return h(g), g;
1745
+ }), new n();
1723
1746
  };
1724
- function Gt(s, t) {
1725
- if (s = s || {}, D.call(this, Nt), t)
1726
- D.call(this, [
1727
- [ot, Qe(s[q])],
1728
- [rt, Qe(s[ni])],
1729
- [b, /\?1/.test(s[ci])],
1730
- [l, we(s[di])],
1731
- [Z, we(s[Dt])],
1732
- [ct, we(s[li])],
1733
- [S, we(s[ai])],
1734
- [W, Qe(s[ri])],
1735
- [Ge, we(s[oi])]
1747
+ function Ft(s, t) {
1748
+ if (s = s || {}, B.call(this, Bt), t)
1749
+ B.call(this, [
1750
+ [st, Qe(s[z])],
1751
+ [at, Qe(s[ii])],
1752
+ [b, /\?1/.test(s[oi])],
1753
+ [l, me(s[ri])],
1754
+ [Y, me(s[_t])],
1755
+ [nt, me(s[ci])],
1756
+ [M, me(s[si])],
1757
+ [W, Qe(s[ni])],
1758
+ [De, me(s[ai])]
1736
1759
  ]);
1737
1760
  else
1738
1761
  for (var e in s)
1739
- this.hasOwnProperty(e) && typeof s[e] !== V && (this[e] = s[e]);
1762
+ this.hasOwnProperty(e) && typeof s[e] !== G && (this[e] = s[e]);
1740
1763
  }
1741
- function Tt(s, t, e, i) {
1742
- return this.get = function(n) {
1743
- return n ? this.data.hasOwnProperty(n) ? this.data[n] : void 0 : this.data;
1744
- }, this.set = function(n, o) {
1745
- return this.data[n] = o, this;
1746
- }, this.setCH = function(n) {
1747
- return this.uaCH = n, this;
1764
+ function It(s, t, e, i) {
1765
+ return this.get = function(a) {
1766
+ return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
1767
+ }, this.set = function(a, o) {
1768
+ return this.data[a] = o, this;
1769
+ }, this.setCH = function(a) {
1770
+ return this.uaCH = a, this;
1748
1771
  }, this.detectFeature = function() {
1749
- if (I && I.userAgent == this.ua)
1772
+ if (S && S.userAgent == this.ua)
1750
1773
  switch (this.itemType) {
1751
- case A:
1752
- I.brave && typeof I.brave.isBrave == et && this.set(r, "Brave");
1774
+ case T:
1775
+ S.brave && typeof S.brave.isBrave == Je && this.set(r, "Brave");
1753
1776
  break;
1754
1777
  case x:
1755
- !this.get(d) && G && G[b] && this.set(d, b), this.get(l) == "Macintosh" && I && typeof I.standalone !== V && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(l, "iPad").set(d, f);
1778
+ !this.get(d) && D && D[b] && this.set(d, b), this.get(l) == "Macintosh" && S && typeof S.standalone !== G && S.maxTouchPoints && S.maxTouchPoints > 2 && this.set(l, "iPad").set(d, f);
1756
1779
  break;
1757
1780
  case P:
1758
- !this.get(r) && G && G[Z] && this.set(r, G[Z]);
1781
+ !this.get(r) && D && D[Y] && this.set(r, D[Y]);
1759
1782
  break;
1760
- case ee:
1761
- var n = this.data, o = function(a) {
1762
- return n[a].getItem().detectFeature().get();
1783
+ case Z:
1784
+ var a = this.data, o = function(n) {
1785
+ return a[n].getItem().detectFeature().get();
1763
1786
  };
1764
- this.set(A, o(A)).set(B, o(B)).set(x, o(x)).set(F, o(F)).set(P, o(P));
1787
+ this.set(T, o(T)).set(U, o(U)).set(x, o(x)).set(_, o(_)).set(P, o(P));
1765
1788
  }
1766
1789
  return this;
1767
1790
  }, this.parseUA = function() {
1768
- return this.itemType != ee && Ct.call(this.data, this.ua, this.rgxMap), this.itemType == A && this.set(be, Je(this.get(c))), this;
1791
+ return this.itemType != Z && vt.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(we, Xe(this.get(c))), this;
1769
1792
  }, this.parseCH = function() {
1770
- var n = this.uaCH, o = this.rgxMap;
1793
+ var a = this.uaCH, o = this.rgxMap;
1771
1794
  switch (this.itemType) {
1772
- case A:
1773
- var a = n[rt] || n[ot], h;
1774
- if (a)
1775
- for (var p in a) {
1776
- var m = $(/(Google|Microsoft) /, a[p].brand || a[p]), w = a[p].version;
1777
- !/not.a.brand/i.test(m) && (!h || /chrom/i.test(h) && !/chromi/i.test(m)) && (this.set(r, m).set(c, w).set(be, Je(w)), h = m);
1795
+ case T:
1796
+ var n = a[at] || a[st], h;
1797
+ if (n)
1798
+ for (var p in n) {
1799
+ var w = $(/(Google|Microsoft) /, n[p].brand || n[p]), g = n[p].version;
1800
+ !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(r, w).set(c, g).set(we, Xe(g)), h = w);
1778
1801
  }
1779
1802
  break;
1780
- case B:
1781
- var v = n[S];
1782
- v && (v && n[Ge] == "64" && (v += "64"), Ct.call(this.data, v + ";", o));
1803
+ case U:
1804
+ var k = a[M];
1805
+ k && (k && a[De] == "64" && (k += "64"), vt.call(this.data, k + ";", o));
1783
1806
  break;
1784
1807
  case x:
1785
- if (n[b] && this.set(d, b), n[l] && this.set(l, n[l]), n[l] == "Xbox" && this.set(d, Y).set(u, Re), n[W]) {
1786
- var N;
1787
- if (typeof n[W] != "string")
1788
- for (var X = 0; !N && X < n[W].length; )
1789
- N = Le(n[W][X++], St);
1808
+ if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u, Oe), a[W]) {
1809
+ var F;
1810
+ if (typeof a[W] != "string")
1811
+ for (var j = 0; !F && j < a[W].length; )
1812
+ F = Re(a[W][j++], Mt);
1790
1813
  else
1791
- N = Le(n[W], St);
1792
- this.set(d, N);
1814
+ F = Re(a[W], Mt);
1815
+ this.set(d, F);
1793
1816
  }
1794
1817
  break;
1795
1818
  case P:
1796
- var K = n[Z];
1797
- if (K) {
1798
- var L = n[ct];
1799
- K == nt && (L = parseInt(Je(L), 10) >= 13 ? "11" : "10"), this.set(r, K).set(c, L);
1819
+ var Q = a[Y];
1820
+ if (Q) {
1821
+ var L = a[nt];
1822
+ Q == tt && (L = parseInt(Xe(L), 10) >= 13 ? "11" : "10"), this.set(r, Q).set(c, L);
1800
1823
  }
1801
- this.get(r) == nt && n[l] == "Xbox" && this.set(r, "Xbox").set(c, void 0);
1824
+ this.get(r) == tt && a[l] == "Xbox" && this.set(r, "Xbox").set(c, void 0);
1802
1825
  break;
1803
- case ee:
1804
- var ue = this.data, O = function(_) {
1805
- return ue[_].getItem().setCH(n).parseCH().get();
1826
+ case Z:
1827
+ var le = this.data, A = function(Ee) {
1828
+ return le[Ee].getItem().setCH(a).parseCH().get();
1806
1829
  };
1807
- this.set(A, O(A)).set(B, O(B)).set(x, O(x)).set(F, O(F)).set(P, O(P));
1830
+ this.set(T, A(T)).set(U, A(U)).set(x, A(x)).set(_, A(_)).set(P, A(P));
1808
1831
  }
1809
1832
  return this;
1810
- }, D.call(this, [
1833
+ }, B.call(this, [
1811
1834
  ["itemType", s],
1812
1835
  ["ua", t],
1813
1836
  ["uaCH", i],
1814
1837
  ["rgxMap", e],
1815
- ["data", gi(this, s)]
1838
+ ["data", hi(this, s)]
1816
1839
  ]), this;
1817
1840
  }
1818
1841
  function R(s, t, e) {
1819
- if (typeof s === de ? (Ue(s, !0) ? (typeof t === de && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === tt && !Ue(t, !0) && (e = t, t = void 0), !(this instanceof R))
1842
+ if (typeof s === ce ? (xe(s, !0) ? (typeof t === ce && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === Ye && !xe(t, !0) && (e = t, t = void 0), !(this instanceof R))
1820
1843
  return new R(s, t, e).getResult();
1821
- var i = typeof s === tt ? s : (
1844
+ var i = typeof s === Ye ? s : (
1822
1845
  // Passed user-agent string
1823
- I && I.userAgent ? I.userAgent : (
1846
+ S && S.userAgent ? S.userAgent : (
1824
1847
  // navigator.userAgent
1825
- e && e[gt] ? e[gt] : (
1848
+ e && e[pt] ? e[pt] : (
1826
1849
  // User-Agent from passed headers
1827
- ce
1850
+ re
1828
1851
  )
1829
1852
  )
1830
- ), n = new Gt(e, !0), o = t ? pi(It, t) : It, a = function(h) {
1831
- return h == ee ? function() {
1832
- return new Tt(h, i, o, n).set("ua", i).set(A, this.getBrowser()).set(B, this.getCPU()).set(x, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
1853
+ ), a = new Ft(e, !0), o = t ? ui(St, t) : St, n = function(h) {
1854
+ return h == Z ? function() {
1855
+ return new It(h, i, o, a).set("ua", i).set(T, this.getBrowser()).set(U, this.getCPU()).set(x, this.getDevice()).set(_, this.getEngine()).set(P, this.getOS()).get();
1833
1856
  } : function() {
1834
- return new Tt(h, i, o[h], n).parseUA().get();
1857
+ return new It(h, i, o[h], a).parseUA().get();
1835
1858
  };
1836
1859
  };
1837
- return D.call(this, [
1838
- ["getBrowser", a(A)],
1839
- ["getCPU", a(B)],
1840
- ["getDevice", a(x)],
1841
- ["getEngine", a(F)],
1842
- ["getOS", a(P)],
1843
- ["getResult", a(ee)],
1860
+ return B.call(this, [
1861
+ ["getBrowser", n(T)],
1862
+ ["getCPU", n(U)],
1863
+ ["getDevice", n(x)],
1864
+ ["getEngine", n(_)],
1865
+ ["getOS", n(P)],
1866
+ ["getResult", n(Z)],
1844
1867
  ["getUA", function() {
1845
1868
  return i;
1846
1869
  }],
1847
1870
  ["setUA", function(h) {
1848
- return le(h) && (i = h.length > st ? fe(h, st) : h), this;
1871
+ return de(h) && (i = h.length > et ? be(h, et) : h), this;
1849
1872
  }]
1850
1873
  ]).setUA(i), this;
1851
1874
  }
1852
- R.VERSION = si;
1853
- R.BROWSER = He([r, c, be, d]);
1854
- R.CPU = He([S]);
1855
- R.DEVICE = He([l, u, d, Y, b, T, f, xe, it]);
1856
- R.ENGINE = R.OS = He([r, c]);
1857
- class mi {
1875
+ R.VERSION = ti;
1876
+ R.BROWSER = Ne([r, c, we, d]);
1877
+ R.CPU = Ne([M]);
1878
+ R.DEVICE = Ne([l, u, d, J, b, I, f, Ae, Ze]);
1879
+ R.ENGINE = R.OS = Ne([r, c]);
1880
+ class pi {
1858
1881
  constructor(t, e) {
1859
- g(this, "config");
1860
- g(this, "sdkConfig");
1882
+ m(this, "config");
1883
+ m(this, "sdkConfig");
1861
1884
  this.config = t, this.sdkConfig = e;
1862
1885
  }
1863
1886
  on(t, e, i) {
1864
- const n = function(a) {
1865
- a.data.message !== `kalamba:wrapper-rgs:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
1887
+ const a = function(n) {
1888
+ n.data.message !== `kalamba:wrapper-rgs:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
1866
1889
  };
1867
- window.addEventListener("message", n, i);
1890
+ window.addEventListener("message", a, i);
1868
1891
  }
1869
1892
  send(t, ...[e]) {
1870
1893
  window.postMessage({
@@ -1873,16 +1896,16 @@ class mi {
1873
1896
  });
1874
1897
  }
1875
1898
  }
1876
- class wi {
1899
+ class gi {
1877
1900
  constructor(t) {
1878
- g(this, "socket", null);
1879
- g(this, "webSocketUrl");
1880
- g(this, "eventListeners", {
1901
+ m(this, "socket", null);
1902
+ m(this, "webSocketUrl");
1903
+ m(this, "eventListeners", {
1881
1904
  close: [],
1882
1905
  error: [],
1883
1906
  message: []
1884
1907
  });
1885
- g(this, "connect", async () => {
1908
+ m(this, "connect", async () => {
1886
1909
  const t = new WebSocket(this.webSocketUrl);
1887
1910
  return t.addEventListener("message", this.handleMessage), new Promise((e) => {
1888
1911
  t.addEventListener(
@@ -1894,32 +1917,32 @@ class wi {
1894
1917
  );
1895
1918
  });
1896
1919
  });
1897
- g(this, "send", (t) => {
1920
+ m(this, "send", (t) => {
1898
1921
  if (this.socket == null)
1899
1922
  throw new Error("Cannot send message, the WebSocket connection is not open");
1900
1923
  this.socket.send(t);
1901
1924
  });
1902
- g(this, "close", () => {
1925
+ m(this, "close", () => {
1903
1926
  if (this.socket == null)
1904
1927
  throw new Error("Cannot close the WebSocket connection that is not open");
1905
1928
  this.socket.close();
1906
1929
  });
1907
- g(this, "handleClose", (t) => {
1930
+ m(this, "handleClose", (t) => {
1908
1931
  this.eventListeners.close.forEach((e) => {
1909
1932
  e(t);
1910
1933
  }), this.socket.removeEventListener("message", this.handleMessage), this.socket.removeEventListener("close", this.handleClose), this.socket.removeEventListener("error", this.handleError), this.socket = null;
1911
1934
  });
1912
- g(this, "handleError", (t) => {
1935
+ m(this, "handleError", (t) => {
1913
1936
  this.eventListeners.error.forEach((e) => {
1914
1937
  e(t);
1915
1938
  });
1916
1939
  });
1917
- g(this, "handleMessage", (t) => {
1940
+ m(this, "handleMessage", (t) => {
1918
1941
  this.eventListeners.message.forEach((e) => {
1919
1942
  e(t);
1920
1943
  });
1921
1944
  });
1922
- g(this, "handleOpen", (t) => {
1945
+ m(this, "handleOpen", (t) => {
1923
1946
  const e = t.target;
1924
1947
  e.addEventListener("close", this.handleClose), e.addEventListener("error", this.handleError), this.socket = e;
1925
1948
  });
@@ -1936,32 +1959,32 @@ class wi {
1936
1959
  function Pe(s) {
1937
1960
  return JSON.parse(s == null ? void 0 : s.data);
1938
1961
  }
1939
- function bi(s) {
1962
+ function mi(s) {
1940
1963
  var t;
1941
1964
  return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
1942
1965
  }
1943
- function At(s) {
1966
+ function Tt(s) {
1944
1967
  var t;
1945
1968
  return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
1946
1969
  }
1947
- function _e(s) {
1970
+ function Le(s) {
1948
1971
  return s.header.name === "GameEvent";
1949
1972
  }
1950
- function fi(s) {
1951
- return _e(s) && s.body.event === "OPEN_GAME";
1973
+ function wi(s) {
1974
+ return Le(s) && s.body.event === "OPEN_GAME";
1952
1975
  }
1953
1976
  function Pt(s) {
1954
1977
  return s.header.code !== 1;
1955
1978
  }
1956
- function yi(s) {
1957
- return _e(s) && s.body.event.includes("_RESULT");
1979
+ function bi(s) {
1980
+ return Le(s) && s.body.event.includes("_RESULT");
1958
1981
  }
1959
- var te, ye;
1960
- class ki extends wi {
1982
+ var ee, fe;
1983
+ class fi extends gi {
1961
1984
  constructor(e, i) {
1962
- const n = new URL(e.apiUrl);
1963
- n.searchParams.set("cageCode", e.cageCode), n.searchParams.set("gameCode", e.gameCode), n.searchParams.set("operatorCode", e.operatorCode), n.searchParams.set("playMode", e.playMode), n.searchParams.set("token", e.token), n.searchParams.set("username", e.username);
1964
- super(n.toString());
1985
+ const a = new URL(e.apiUrl);
1986
+ a.searchParams.set("cageCode", e.cageCode), a.searchParams.set("gameCode", e.gameCode), a.searchParams.set("operatorCode", e.operatorCode), a.searchParams.set("playMode", e.playMode), a.searchParams.set("token", e.token), a.searchParams.set("username", e.username);
1987
+ super(a.toString());
1965
1988
  /*
1966
1989
  * Correlation ID. Used in Request and Response types.
1967
1990
  * ----
@@ -1972,7 +1995,7 @@ class ki extends wi {
1972
1995
  * request sent. Client and server independently maintain their own
1973
1996
  * correlation id counter.
1974
1997
  */
1975
- g(this, "cId", 0);
1998
+ m(this, "cId", 0);
1976
1999
  // Initial values for header
1977
2000
  /*
1978
2001
  * Increasing message ID
@@ -1984,20 +2007,20 @@ class ki extends wi {
1984
2007
  * received out of sync).
1985
2008
  */
1986
2009
  // TODO make sure messages are processed in order
1987
- g(this, "mId", 0);
2010
+ m(this, "mId", 0);
1988
2011
  // Initial values for body
1989
2012
  /*
1990
2013
  * Sequence ID. Action/Event correlation.
1991
2014
  */
1992
- g(this, "seqId", 0);
1993
- g(this, "gameCode");
1994
- M(this, te, void 0);
1995
- M(this, ye, void 0);
1996
- g(this, "onMessage", (e) => {
2015
+ m(this, "seqId", 0);
2016
+ m(this, "gameCode");
2017
+ C(this, ee, void 0);
2018
+ C(this, fe, void 0);
2019
+ m(this, "onMessage", (e) => {
1997
2020
  const i = Pe(e);
1998
- (_e(i) || bi(i) || At(i)) && this.sendAcknowledgement(i), At(i) && this.handleRealityCheck(i);
2021
+ (Le(i) || mi(i) || Tt(i)) && this.sendAcknowledgement(i), Tt(i) && this.handleRealityCheck(i);
1999
2022
  });
2000
- this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, k(this, te, i.requestTimeoutMs), k(this, ye, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2023
+ this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ee, i.requestTimeoutMs), E(this, fe, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
2001
2024
  }
2002
2025
  handleRealityCheck(e) {
2003
2026
  this.eventListeners.realityCheck.forEach((i) => {
@@ -2033,48 +2056,48 @@ class ki extends wi {
2033
2056
  };
2034
2057
  }
2035
2058
  request(e, i) {
2036
- const n = this.buildPayload(e, i);
2037
- return new Promise((o, a) => {
2038
- setTimeout(() => a({ type: "timeout" }), y(this, te));
2059
+ const a = this.buildPayload(e, i);
2060
+ return new Promise((o, n) => {
2061
+ setTimeout(() => n({ type: "timeout" }), y(this, ee));
2039
2062
  const h = (p) => {
2040
- const m = Pe(p);
2063
+ const w = Pe(p);
2041
2064
  try {
2042
- e.cId === m.header.cId && (this.removeEventListener("message", h), m.header.code === 1 ? o(m) : a({ message: m, type: "error" }));
2065
+ e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? o(w) : n({ message: w, type: "error" }));
2043
2066
  } catch {
2044
- a({ message: m, type: "error" });
2067
+ n({ message: w, type: "error" });
2045
2068
  }
2046
2069
  };
2047
- this.addEventListener("message", h), this.send(n);
2070
+ this.addEventListener("message", h), this.send(a);
2048
2071
  });
2049
2072
  }
2050
2073
  freeRounds(e) {
2051
2074
  const i = this.buildHeader("ActivateFreeRound");
2052
- return this.request(i, e).then((n) => n.body).catch((n) => {
2075
+ return this.request(i, e).then((a) => a.body).catch((a) => {
2053
2076
  var o;
2054
- throw { data: (o = n == null ? void 0 : n.message) == null ? void 0 : o.body, type: n.type };
2077
+ throw { data: (o = a == null ? void 0 : a.message) == null ? void 0 : o.body, type: a.type };
2055
2078
  });
2056
2079
  }
2057
2080
  async authenticate(e = !1) {
2058
- const i = this.buildHeader("Authenticate"), n = {
2081
+ const i = this.buildHeader("Authenticate"), a = {
2059
2082
  clientType: 3,
2060
- version: y(this, ye),
2083
+ version: y(this, fe),
2061
2084
  reconnect: e
2062
2085
  };
2063
- return this.request(i, n).then((o) => o.body).catch((o) => {
2064
- var a;
2065
- throw { data: (a = o == null ? void 0 : o.message) == null ? void 0 : a.body, type: o.type };
2086
+ return this.request(i, a).then((o) => o.body).catch((o) => {
2087
+ var n;
2088
+ throw { data: (n = o == null ? void 0 : o.message) == null ? void 0 : n.body, type: o.type };
2066
2089
  });
2067
2090
  }
2068
2091
  async openGame() {
2069
2092
  const e = this.buildHeader("OpenGame"), i = {
2070
2093
  gameCode: this.gameCode
2071
2094
  };
2072
- return new Promise((n, o) => {
2073
- const a = (h) => {
2095
+ return new Promise((a, o) => {
2096
+ const n = (h) => {
2074
2097
  const p = Pe(h);
2075
- fi(p) ? (this.removeEventListener("message", a), n(p.body)) : Pt(p) && o({ data: p.body, type: "error" });
2098
+ wi(p) ? (this.removeEventListener("message", n), a(p.body)) : Pt(p) && o({ data: p.body, type: "error" });
2076
2099
  };
2077
- this.addEventListener("message", a), this.request(e, i).catch(
2100
+ this.addEventListener("message", n), this.request(e, i).catch(
2078
2101
  (h) => {
2079
2102
  var p;
2080
2103
  return o({ data: (p = h == null ? void 0 : h.message) == null ? void 0 : p.body, type: h.type });
@@ -2083,33 +2106,33 @@ class ki extends wi {
2083
2106
  });
2084
2107
  }
2085
2108
  sendAcknowledgement(e) {
2086
- const { name: i, cId: n } = e.header, o = this.buildHeader(i, n), a = this.buildPayload(o, {});
2087
- this.send(a);
2109
+ const { name: i, cId: a } = e.header, o = this.buildHeader(i, a), n = this.buildPayload(o, {});
2110
+ this.send(n);
2088
2111
  }
2089
2112
  sendAction(e, i) {
2090
- const n = this.buildHeader("GameAction"), o = {
2113
+ const a = this.buildHeader("GameAction"), o = {
2091
2114
  ...this.getBodyExtras(e),
2092
2115
  data: i
2093
2116
  };
2094
- return new Promise((a, h) => {
2095
- const p = (m) => {
2096
- const w = Pe(m);
2097
- _e(w) && o.seqId === w.body.correlationSeqId && (this.removeEventListener("message", p), yi(w) ? a(w.body) : Pt(w) && h({ data: w.body, type: "error" }));
2117
+ return new Promise((n, h) => {
2118
+ const p = (w) => {
2119
+ const g = Pe(w);
2120
+ Le(g) && o.seqId === g.body.correlationSeqId && (this.removeEventListener("message", p), bi(g) ? n(g.body) : Pt(g) && h({ data: g.body, type: "error" }));
2098
2121
  };
2099
- this.addEventListener("message", p), this.request(n, o).catch(
2100
- (m) => {
2101
- var w;
2102
- return h({ data: (w = m == null ? void 0 : m.message) == null ? void 0 : w.body, type: m.type });
2122
+ this.addEventListener("message", p), this.request(a, o).catch(
2123
+ (w) => {
2124
+ var g;
2125
+ return h({ data: (g = w == null ? void 0 : w.message) == null ? void 0 : g.body, type: w.type });
2103
2126
  }
2104
2127
  );
2105
2128
  });
2106
2129
  }
2107
2130
  setRequestTimeoutMs(e) {
2108
- k(this, te, e);
2131
+ E(this, ee, e);
2109
2132
  }
2110
2133
  }
2111
- te = new WeakMap(), ye = new WeakMap();
2112
- function Ht(s) {
2134
+ ee = new WeakMap(), fe = new WeakMap();
2135
+ function Dt(s) {
2113
2136
  const t = s.contract;
2114
2137
  return t ? {
2115
2138
  contract: {
@@ -2139,15 +2162,15 @@ function Ht(s) {
2139
2162
  }
2140
2163
  };
2141
2164
  }
2142
- function Vt(s) {
2165
+ function Nt(s) {
2143
2166
  var t, e;
2144
2167
  return {
2145
2168
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2146
- code: ((t = s.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
2169
+ code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2147
2170
  details: (e = s.data) == null ? void 0 : e.details
2148
2171
  };
2149
2172
  }
2150
- function zt(s, t) {
2173
+ function Gt(s, t) {
2151
2174
  const e = t.contract;
2152
2175
  if (!e) {
2153
2176
  const i = t.data;
@@ -2173,22 +2196,22 @@ function zt(s, t) {
2173
2196
  coins: t.balance,
2174
2197
  version: t.balanceVersion
2175
2198
  },
2176
- freeRounds: (i.FREE_ROUNDS ?? []).map((n) => ({
2199
+ freeRounds: (i.FREE_ROUNDS ?? []).map((a) => ({
2177
2200
  conf: {
2178
- base: n.conf.baseBet,
2179
- multiplier: n.conf.betMultiplier,
2180
- numAwarded: n.conf.numAwarded
2201
+ base: a.conf.baseBet,
2202
+ multiplier: a.conf.betMultiplier,
2203
+ numAwarded: a.conf.numAwarded
2181
2204
  },
2182
2205
  data: {
2183
- numPlayed: n.data.numPlayed,
2184
- win: n.data.winAmount,
2185
- numLeft: n.data.numLeft
2206
+ numPlayed: a.data.numPlayed,
2207
+ win: a.data.winAmount,
2208
+ numLeft: a.data.numLeft
2186
2209
  },
2187
- id: n.id,
2188
- rejectable: n.rejectable,
2189
- skippable: n.skippable,
2190
- status: n.status,
2191
- type: n.type
2210
+ id: a.id,
2211
+ rejectable: a.rejectable,
2212
+ skippable: a.skippable,
2213
+ status: a.status,
2214
+ type: a.type
2192
2215
  })),
2193
2216
  gameModel: i.additionalConfigData.gameModelFile,
2194
2217
  metaData: i.gameConfigData.metaData,
@@ -2267,15 +2290,15 @@ function zt(s, t) {
2267
2290
  data: t.opaqueGameServerToUi
2268
2291
  };
2269
2292
  }
2270
- function qt(s) {
2293
+ function Ht(s) {
2271
2294
  var t, e;
2272
2295
  return {
2273
2296
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2274
- code: ((t = s.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
2297
+ code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2275
2298
  details: (e = s.data) == null ? void 0 : e.details
2276
2299
  };
2277
2300
  }
2278
- function Wt(s) {
2301
+ function Vt(s) {
2279
2302
  const t = s.contract;
2280
2303
  if (!t) {
2281
2304
  const e = s.data;
@@ -2375,22 +2398,22 @@ function Wt(s) {
2375
2398
  data: s.opaqueGameServerToUi
2376
2399
  };
2377
2400
  }
2378
- function $t(s) {
2401
+ function zt(s) {
2379
2402
  var t, e;
2380
2403
  return {
2381
2404
  // SDK error codes are the same as RGS error codes so we don't need any mapping here
2382
- code: ((t = s.data) == null ? void 0 : t.code) ?? Ne.UNKNOWN,
2405
+ code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
2383
2406
  details: (e = s.data) == null ? void 0 : e.details
2384
2407
  };
2385
2408
  }
2386
- const Wi = {
2387
- parseAuthenticateResponse: Ht,
2388
- parseAuthenticateError: Vt,
2389
- parseOpenGameResponse: zt,
2390
- parseOpenGameError: qt,
2391
- parsePlayResponse: Wt,
2392
- parsePlayError: $t
2393
- }, vi = {
2409
+ const Gi = {
2410
+ parseAuthenticateResponse: Dt,
2411
+ parseAuthenticateError: Nt,
2412
+ parseOpenGameResponse: Gt,
2413
+ parseOpenGameError: Ht,
2414
+ parsePlayResponse: Vt,
2415
+ parsePlayError: zt
2416
+ }, yi = {
2394
2417
  bul: "bg",
2395
2418
  chi: "zh",
2396
2419
  zho: "zh",
@@ -2422,13 +2445,13 @@ const Wi = {
2422
2445
  tur: "tr",
2423
2446
  ukr: "uk",
2424
2447
  vie: "vi"
2425
- }, { device: Ei } = R(navigator.userAgent), Ci = U("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2426
- class $i extends mi {
2448
+ }, { device: ki } = R(navigator.userAgent), Ei = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
2449
+ class Hi extends pi {
2427
2450
  constructor(...e) {
2428
2451
  super(...e);
2429
2452
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2430
2453
  // @ts-ignore
2431
- g(this, "socket");
2454
+ m(this, "socket");
2432
2455
  this.on("openGame", async () => {
2433
2456
  try {
2434
2457
  const i = await this.openGame();
@@ -2438,34 +2461,34 @@ class $i extends mi {
2438
2461
  }
2439
2462
  }), this.on("play", async (i) => {
2440
2463
  try {
2441
- const n = await this.play(i);
2442
- this.send("playResponse", n);
2443
- } catch (n) {
2444
- this.send("playError", n);
2464
+ const a = await this.play(i);
2465
+ this.send("playResponse", a);
2466
+ } catch (a) {
2467
+ this.send("playError", a);
2445
2468
  }
2446
2469
  }), this.on("freeRounds", async (i) => {
2447
2470
  try {
2448
2471
  await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
2449
- } catch (n) {
2450
- this.send("freeRoundsError", n);
2472
+ } catch (a) {
2473
+ this.send("freeRoundsError", a);
2451
2474
  }
2452
2475
  }), this.on("configured", (i) => {
2453
2476
  this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
2454
2477
  }), this.registerFromSdkEvents();
2455
2478
  }
2456
2479
  initialize(e) {
2457
- this.socket = new ki(e, {
2480
+ this.socket = new fi(e, {
2458
2481
  gameVersion: this.config.gameVersion,
2459
2482
  requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
2460
- }), ["deeprush", "sharkstrike", "fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
2483
+ }), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
2461
2484
  i.code === 1008 ? this.send("error", {
2462
2485
  type: "CLOSE",
2463
2486
  messageCode: "TOO_MANY_OPEN_GAMES",
2464
2487
  messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
2465
2488
  }) : i.code === 1011 || this.reconnect();
2466
- }), ["mobile", "tablet"].includes(Ei.type ?? "") && document.addEventListener("visibilitychange", async () => {
2489
+ }), ["mobile", "tablet"].includes(ki.type ?? "") && document.addEventListener("visibilitychange", async () => {
2467
2490
  document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
2468
- })), this.socket.addEventListener("error", (i) => Ci("error", i)), this.socket.addEventListener("realityCheck", (i) => {
2491
+ })), this.socket.addEventListener("error", (i) => Ei("error", i)), this.socket.addEventListener("realityCheck", (i) => {
2469
2492
  this.send("realityCheck", i);
2470
2493
  });
2471
2494
  }
@@ -2477,30 +2500,32 @@ class $i extends mi {
2477
2500
  }
2478
2501
  }
2479
2502
  async openGame() {
2480
- const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), n = e.get("cageCode"), o = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), m = e.get("username"), w = e.get("gameHistoryUrl"), v = e.get("homeUrl") ?? void 0, N = e.get("cashierUrl") ?? void 0;
2481
- this.initialize({ apiUrl: i, cageCode: n, gameCode: o, operatorCode: a, playMode: h, token: p, username: m });
2503
+ var Ee, ot;
2504
+ const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"), o = e.get("gameCode"), n = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), w = e.get("username"), g = e.get("gameHistoryUrl"), k = e.get("homeUrl") ?? void 0, F = e.get("cashierUrl") ?? void 0;
2505
+ this.initialize({ apiUrl: i, cageCode: a, gameCode: o, operatorCode: n, playMode: h, token: p, username: w });
2482
2506
  try {
2483
2507
  await this.socket.connect();
2484
2508
  } catch {
2485
- throw { type: "error", data: { code: Ne.CONNECTION_ERROR } };
2509
+ throw { type: "error", data: { code: Fe.CONNECTION_ERROR } };
2486
2510
  }
2487
- let X;
2511
+ let j;
2488
2512
  try {
2489
- X = await this.socket.authenticate();
2490
- } catch (_) {
2491
- throw { type: _.type, data: _.type === "error" ? Vt(_.data) : void 0 };
2513
+ j = await this.socket.authenticate();
2514
+ } catch (q) {
2515
+ throw { type: q.type, data: q.type === "error" ? Nt(q.data) : void 0 };
2492
2516
  }
2493
- let K;
2517
+ let Q;
2494
2518
  try {
2495
- K = await this.socket.openGame();
2496
- } catch (_) {
2497
- throw { type: _.type, data: _.type === "error" ? qt(_.data) : void 0 };
2519
+ Q = await this.socket.openGame();
2520
+ } catch (q) {
2521
+ throw { type: q.type, data: q.type === "error" ? Ht(q.data) : void 0 };
2498
2522
  }
2499
- const L = Ht(X), ue = zt(X, K);
2523
+ const L = Dt(j), le = Gt(j, Q);
2500
2524
  this.sdkConfig.api = {
2501
- brand: n,
2525
+ ...this.sdkConfig.api,
2526
+ brand: a,
2502
2527
  game: o,
2503
- integration: a,
2528
+ integration: n,
2504
2529
  jurisdiction: L.contract.jurisdiction,
2505
2530
  playMode: h,
2506
2531
  user: L.contract.username,
@@ -2510,100 +2535,100 @@ class $i extends mi {
2510
2535
  country: L.contract.country,
2511
2536
  currency: L.contract.currency,
2512
2537
  coinValueInCents: L.contract.coinValueInCents,
2513
- gameHistoryUrl: w,
2514
- homeUrl: v,
2515
- cashierUrl: N,
2516
- sessionId: ue.contract.sessionId,
2517
- lastRoundId: ue.contract.roundId
2538
+ gameHistoryUrl: g,
2539
+ homeUrl: k,
2540
+ cashierUrl: F,
2541
+ backendSessionId: le.contract.sessionId,
2542
+ lastRoundId: le.contract.roundId
2518
2543
  };
2519
- const O = e.get("languageCode");
2520
- return O && (this.sdkConfig.ui.language = O.length === 3 ? vi[O] ?? O : O), ue;
2544
+ const A = (ot = (Ee = e.get("languageCode")) == null ? void 0 : Ee.split("_")) == null ? void 0 : ot[0];
2545
+ return A && (this.sdkConfig.ui.language = A.length === 3 ? yi[A] ?? A : A), le;
2521
2546
  }
2522
2547
  async play(e) {
2523
2548
  for (; !this.socket.socket; )
2524
- await new Promise((v) => setTimeout(() => v(), 500));
2549
+ await new Promise((k) => setTimeout(() => k(), 500));
2525
2550
  const {
2526
- contract: { bet: i, forcedOutcomes: n, ...o },
2527
- extra: a,
2551
+ contract: { bet: i, forcedOutcomes: a, ...o },
2552
+ extra: n,
2528
2553
  payloadToInject: h,
2529
2554
  actionType: p
2530
- } = e, m = {
2555
+ } = e, w = {
2531
2556
  bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
2532
- forcedOutcomes: n,
2557
+ forcedOutcomes: a,
2533
2558
  // TODO: get rid of contractRest - it' a legacy from old RGS
2534
2559
  ...o,
2535
2560
  ...h,
2536
- opaqueUiToGameServer: a
2561
+ opaqueUiToGameServer: n
2537
2562
  };
2538
- let w;
2563
+ let g;
2539
2564
  try {
2540
- w = await this.socket.sendAction(p, m);
2541
- } catch (v) {
2542
- throw { type: v.type, data: v.type === "error" ? $t(v.data) : void 0 };
2565
+ g = await this.socket.sendAction(p, w);
2566
+ } catch (k) {
2567
+ throw { type: k.type, data: k.type === "error" ? zt(k.data) : void 0 };
2543
2568
  }
2544
- return Wt(w);
2569
+ return Vt(g);
2545
2570
  }
2546
2571
  registerFromSdkEvents() {
2547
2572
  this.on("history", () => {
2548
2573
  const {
2549
- api: { game: e, integration: i, integrationData: n, jurisdiction: o, user: a, gameHistoryUrl: h },
2574
+ api: { game: e, integration: i, integrationData: a, jurisdiction: o, user: n, gameHistoryUrl: h },
2550
2575
  ui: { language: p }
2551
- } = this.sdkConfig, m = a.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), w = new URL(h);
2552
- w.searchParams.set("gameCode", e), w.searchParams.set("jurisdiction", o), w.searchParams.set("operatorCode", i), w.searchParams.set("token", n.token), w.searchParams.set("username", m), w.searchParams.set("languageCode", p), this.config.gameHistoryUrl && w.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(w.toString(), "_blank");
2576
+ } = this.sdkConfig, w = n.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), g = new URL(window.location.href);
2577
+ 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", o), 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");
2553
2578
  });
2554
2579
  }
2555
2580
  }
2556
- class Mi {
2581
+ class vi {
2557
2582
  constructor(t, e, i) {
2558
- g(this, "trackers");
2559
- g(this, "config");
2560
- g(this, "sdkConfig");
2583
+ m(this, "trackers");
2584
+ m(this, "config");
2585
+ m(this, "sdkConfig");
2561
2586
  this.trackers = t, this.config = e, this.sdkConfig = i;
2562
2587
  }
2563
2588
  on(t, e, i) {
2564
- const n = function(a) {
2565
- a.data.message !== `kalamba:wrapper-telemetry:${t}` && a.data.message !== `kalamba:wrapper:${t}` || e(a.data.payload);
2589
+ const a = function(n) {
2590
+ n.data.message !== `kalamba:wrapper-telemetry:${t}` && n.data.message !== `kalamba:wrapper:${t}` || e(n.data.payload);
2566
2591
  };
2567
- window.addEventListener("message", n, i);
2592
+ window.addEventListener("message", a, i);
2568
2593
  }
2569
2594
  track(t, e) {
2570
2595
  this.trackers.forEach((i) => i.track(t, e));
2571
2596
  }
2572
2597
  }
2573
- function Ot(s) {
2598
+ function At(s) {
2574
2599
  return s.reduce((t, e) => t + e, 0);
2575
2600
  }
2576
- function Si(s) {
2577
- const t = s.length, e = Ot(s) / t, i = s.map((o) => Math.pow(o - e, 2)), n = Ot(i) / t;
2578
- return Math.sqrt(n);
2601
+ function Ci(s) {
2602
+ const t = s.length, e = At(s) / t, i = s.map((o) => Math.pow(o - e, 2)), a = At(i) / t;
2603
+ return Math.sqrt(a);
2579
2604
  }
2580
- class xt {
2605
+ class Ot {
2581
2606
  constructor() {
2582
- g(this, "rafId", -1);
2583
- g(this, "startTime", 0);
2584
- g(this, "stopTime", 0);
2585
- g(this, "frames", []);
2586
- g(this, "calculateFPS", () => {
2607
+ m(this, "rafId", -1);
2608
+ m(this, "startTime", 0);
2609
+ m(this, "stopTime", 0);
2610
+ m(this, "frames", []);
2611
+ m(this, "calculateFPS", () => {
2587
2612
  const t = Math.floor((this.stopTime - this.startTime) / 1e3);
2588
- return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, n, o) => (o[n] !== o[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2613
+ return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a, o) => (o[a] !== o[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2589
2614
  });
2590
- g(this, "getReport", () => {
2591
- const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, o = t.length > 0 ? Si(t) : 0;
2592
- return { fpsAvg: e, fpsMax: i, fpsMin: n, fpsStdDev: o };
2615
+ m(this, "getReport", () => {
2616
+ const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, o = t.length > 0 ? Ci(t) : 0;
2617
+ return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev: o };
2593
2618
  });
2594
- g(this, "start", () => {
2619
+ m(this, "start", () => {
2595
2620
  this.startTime = Date.now(), this.frames = [], this.trackFrames();
2596
2621
  });
2597
- g(this, "stop", () => {
2622
+ m(this, "stop", () => {
2598
2623
  cancelAnimationFrame(this.rafId), this.stopTime = Date.now();
2599
2624
  });
2600
- g(this, "trackFrames", () => {
2625
+ m(this, "trackFrames", () => {
2601
2626
  this.frames.push(Date.now()), this.rafId = requestAnimationFrame(this.trackFrames);
2602
2627
  });
2603
2628
  }
2604
2629
  }
2605
- const Ii = "landscape", Ti = "portrait";
2606
- function Ai() {
2630
+ const Mi = "landscape", Si = "portrait";
2631
+ function Ii() {
2607
2632
  try {
2608
2633
  const s = document.createElement("canvas");
2609
2634
  return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
@@ -2611,7 +2636,7 @@ function Ai() {
2611
2636
  return !1;
2612
2637
  }
2613
2638
  }
2614
- async function Pi() {
2639
+ async function Ti() {
2615
2640
  if (!window.createImageBitmap)
2616
2641
  return !1;
2617
2642
  const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
@@ -2621,33 +2646,33 @@ async function Pi() {
2621
2646
  return !1;
2622
2647
  }
2623
2648
  }
2624
- function Ye() {
2625
- return window.innerWidth >= window.innerHeight ? Ii : Ti;
2649
+ function Ke() {
2650
+ return window.innerWidth >= window.innerHeight ? Mi : Si;
2626
2651
  }
2627
- var Be, ie, se, ne, ke, Fe, ve, De;
2628
- class ji extends Mi {
2652
+ var Ue, te, ie, se, ye, _e, ke, Be;
2653
+ class Vi extends vi {
2629
2654
  constructor(...e) {
2630
2655
  super(...e);
2631
- g(this, "FPS_SAMPLE_INTERVAL", 1e4);
2656
+ m(this, "FPS_SAMPLE_INTERVAL", 1e4);
2632
2657
  // wrapper state
2633
- M(this, Be, 0);
2634
- M(this, ie, void 0);
2635
- M(this, se, void 0);
2636
- M(this, ne, void 0);
2637
- M(this, ke, !1);
2638
- M(this, Fe, !1);
2639
- M(this, ve, "");
2640
- M(this, De, []);
2641
- k(this, se, {}), k(this, ne, this.deviceInfo()), k(this, ie, this.config.gameVersion), this.on("state", ({ balance: i }) => {
2642
- k(this, Be, i);
2658
+ C(this, Ue, 0);
2659
+ C(this, te, void 0);
2660
+ C(this, ie, void 0);
2661
+ C(this, se, void 0);
2662
+ C(this, ye, !1);
2663
+ C(this, _e, !1);
2664
+ C(this, ke, "");
2665
+ C(this, Be, []);
2666
+ E(this, ie, {}), E(this, se, this.deviceInfo()), E(this, te, this.config.gameVersion), this.on("state", ({ balance: i }) => {
2667
+ E(this, Ue, i);
2643
2668
  }), this.on("autoplay", ({ action: i }) => {
2644
- ["start", "resume"].includes(i) ? k(this, ke, !0) : k(this, ke, !1);
2669
+ ["start", "resume"].includes(i) ? E(this, ye, !0) : E(this, ye, !1);
2645
2670
  }), this.on("settings", ({ fastPlay: i }) => {
2646
- i !== void 0 && k(this, Fe, i);
2671
+ i !== void 0 && E(this, _e, i);
2647
2672
  }), this.registerEvents();
2648
2673
  }
2649
2674
  async registerEvents() {
2650
- y(this, ne).then((e) => {
2675
+ y(this, se).then((e) => {
2651
2676
  this.track("Device Information", e);
2652
2677
  }), this.on("loadStart", () => {
2653
2678
  this.track("Game Loading", { progress: 0, step: "initial" });
@@ -2661,9 +2686,9 @@ class ji extends Mi {
2661
2686
  systemMessageType: e.type
2662
2687
  });
2663
2688
  }), this.on("openGameResponse", async (e) => {
2664
- k(this, ve, e.contract.stateType.nextRound), k(this, se, {
2689
+ E(this, ke, e.contract.stateType.nextRound), E(this, ie, {
2665
2690
  balanceInCoins: e.contract.balance.coins,
2666
- clientVersion: y(this, ie),
2691
+ clientVersion: y(this, te),
2667
2692
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2668
2693
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2669
2694
  currency: this.sdkConfig.api.currency,
@@ -2681,21 +2706,22 @@ class ji extends Mi {
2681
2706
  platform: "WEB",
2682
2707
  playMode: this.sdkConfig.api.playMode,
2683
2708
  referrer: window.location.hostname,
2684
- // rootTrackingSessionID: 'unknown',
2709
+ rootTrackingSessionID: this.sdkConfig.api.sessionId,
2710
+ backendSessionID: this.sdkConfig.api.backendSessionId,
2685
2711
  // rtpVariant: 'unknown',
2686
2712
  serverVersion: e.contract.metaData.version
2687
2713
  // testVariants: '',
2688
- }), this.track("Game Open", y(this, se));
2714
+ }), this.track("Game Open", y(this, ie));
2689
2715
  }), this.on("playCycleEnd", async (e) => {
2690
- const i = await y(this, ne), { base: n, multiplier: o, specialAction: a } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, m = e.contract.win.total, w = m - p, v = a || "spin", N = e.contract.roundId;
2716
+ const i = await y(this, se), { base: a, multiplier: o, specialAction: n } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, g = w - p, k = n || "spin", F = e.contract.roundId;
2691
2717
  this.track("Betting Activity", {
2692
- balance: h - w,
2718
+ balance: h - g,
2693
2719
  balanceAfter: h,
2694
- baseBet: n,
2720
+ baseBet: a,
2695
2721
  // baseBetIndex,
2696
2722
  betMultiplier: o,
2697
- betType: v,
2698
- gameVersion: y(this, ie),
2723
+ betType: k,
2724
+ gameVersion: y(this, te),
2699
2725
  coinValueInCents: this.sdkConfig.api.coinValueInCents,
2700
2726
  coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
2701
2727
  currency: this.sdkConfig.api.currency,
@@ -2703,20 +2729,20 @@ class ji extends Mi {
2703
2729
  gameCode: this.sdkConfig.api.game,
2704
2730
  gameCodeServer: this.sdkConfig.api.game,
2705
2731
  isMobile: i.isMobile,
2706
- netResult: w,
2732
+ netResult: g,
2707
2733
  operatorName: "kalamba",
2708
- orientation: Ye(),
2734
+ orientation: Ke(),
2709
2735
  partnerId: this.sdkConfig.api.brand,
2710
2736
  partnerParentId: this.sdkConfig.api.integration,
2711
2737
  platform: "WEB",
2712
2738
  playMode: this.sdkConfig.api.playMode,
2713
- roundId: N,
2739
+ roundId: F,
2714
2740
  // TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
2715
2741
  // roundTypes: [...this.#roundTypes],
2716
2742
  roundTypes: ["BaseGame"],
2717
2743
  totalBet: p,
2718
- totalWin: m
2719
- }), k(this, De, []);
2744
+ totalWin: w
2745
+ }), E(this, Be, []);
2720
2746
  }), this.on("telemetry.click", (e) => {
2721
2747
  this.track("UI Interaction", {
2722
2748
  action: "click",
@@ -2731,17 +2757,17 @@ class ji extends Mi {
2731
2757
  }), this.reportFpsSample(), this.reportFpsRound();
2732
2758
  }
2733
2759
  reportFpsSample() {
2734
- const e = new xt(), i = () => {
2760
+ const e = new Ot(), i = () => {
2735
2761
  e.stop();
2736
2762
  const o = e.getReport();
2737
- this.track("FPS Performance", { ...o, fpsType: "sample" }), n();
2738
- }, n = async () => {
2763
+ this.track("FPS Performance", { ...o, fpsType: "sample" }), a();
2764
+ }, a = async () => {
2739
2765
  e.start(), setTimeout(i, this.FPS_SAMPLE_INTERVAL);
2740
2766
  };
2741
- n();
2767
+ a();
2742
2768
  }
2743
2769
  reportFpsRound() {
2744
- const e = new xt();
2770
+ const e = new Ot();
2745
2771
  this.on("playCycleStart", () => {
2746
2772
  e.start();
2747
2773
  }), this.on("playCycleEnd", () => {
@@ -2752,13 +2778,13 @@ class ji extends Mi {
2752
2778
  }
2753
2779
  getExtraUiInteractionData() {
2754
2780
  return {
2755
- orientation: Ye(),
2756
- stateType: y(this, ve)
2781
+ orientation: Ke(),
2782
+ stateType: y(this, ke)
2757
2783
  };
2758
2784
  }
2759
2785
  async deviceInfo() {
2760
2786
  var h;
2761
- const { browser: e, device: i, os: n } = R(navigator.userAgent), o = Ai(), a = await Pi();
2787
+ const { browser: e, device: i, os: a } = R(navigator.userAgent), o = Ii(), n = await Ti();
2762
2788
  return {
2763
2789
  browserName: e.name,
2764
2790
  browserVersion: e.version,
@@ -2767,11 +2793,11 @@ class ji extends Mi {
2767
2793
  deviceType: i.type,
2768
2794
  isMobile: ["mobile", "tablet"].includes(i.type ?? ""),
2769
2795
  isWebGLSupported: o,
2770
- isWebPSupported: a,
2796
+ isWebPSupported: n,
2771
2797
  manufacturer: i.vendor,
2772
- operatingSystem: n.name,
2773
- operatingSystemVersion: n.version,
2774
- orientation: Ye(),
2798
+ operatingSystem: a.name,
2799
+ operatingSystemVersion: a.version,
2800
+ orientation: Ke(),
2775
2801
  pixelRatio: window.devicePixelRatio,
2776
2802
  screenHeight: window.screen.height,
2777
2803
  screenSize: `${window.screen.width}x${window.screen.height}`,
@@ -2783,66 +2809,36 @@ class ji extends Mi {
2783
2809
  };
2784
2810
  }
2785
2811
  }
2786
- Be = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap(), ve = new WeakMap(), De = new WeakMap();
2787
- var C = [];
2788
- for (var Ze = 0; Ze < 256; ++Ze)
2789
- C.push((Ze + 256).toString(16).slice(1));
2790
- function Oi(s, t = 0) {
2791
- return (C[s[t + 0]] + C[s[t + 1]] + C[s[t + 2]] + C[s[t + 3]] + "-" + C[s[t + 4]] + C[s[t + 5]] + "-" + C[s[t + 6]] + C[s[t + 7]] + "-" + C[s[t + 8]] + C[s[t + 9]] + "-" + C[s[t + 10]] + C[s[t + 11]] + C[s[t + 12]] + C[s[t + 13]] + C[s[t + 14]] + C[s[t + 15]]).toLowerCase();
2792
- }
2793
- var Oe, xi = new Uint8Array(16);
2794
- function Ri() {
2795
- if (!Oe && (Oe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Oe))
2796
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2797
- return Oe(xi);
2798
- }
2799
- var Ui = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2800
- const Rt = {
2801
- randomUUID: Ui
2802
- };
2803
- function Ut(s, t, e) {
2804
- if (Rt.randomUUID && !t && !s)
2805
- return Rt.randomUUID();
2806
- s = s || {};
2807
- var i = s.random || (s.rng || Ri)();
2808
- if (i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, t) {
2809
- e = e || 0;
2810
- for (var n = 0; n < 16; ++n)
2811
- t[e + n] = i[n];
2812
- return t;
2813
- }
2814
- return Oi(i);
2815
- }
2816
- class jt {
2812
+ Ue = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ye = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), Be = new WeakMap();
2813
+ class qt {
2817
2814
  constructor(t, e) {
2818
- g(this, "config");
2819
- g(this, "sdkConfig");
2815
+ m(this, "config");
2816
+ m(this, "sdkConfig");
2820
2817
  this.config = t, this.sdkConfig = e;
2821
2818
  }
2822
2819
  }
2823
- const Lt = 25, _t = 1e4;
2824
- var ae, oe, re, H, Ee;
2825
- class Xi extends jt {
2820
+ const xt = 25, Rt = 1e4;
2821
+ var ae, ne, oe, N;
2822
+ class zi extends qt {
2826
2823
  constructor(...e) {
2827
2824
  super(...e);
2828
- M(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2829
- M(this, oe, void 0);
2830
- M(this, re, void 0);
2831
- M(this, H, []);
2832
- M(this, Ee, void 0);
2833
- g(this, "processQueueForced");
2834
- k(this, oe, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), k(this, H, []), k(this, Ee, Ut()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
2825
+ C(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
2826
+ C(this, ne, void 0);
2827
+ C(this, oe, void 0);
2828
+ C(this, N, []);
2829
+ m(this, "processQueueForced");
2830
+ E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this, N, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
2835
2831
  method: "OPTIONS"
2836
- }).catch(lt), this.subscribe();
2832
+ }).catch(ct), this.subscribe();
2837
2833
  }
2838
2834
  subscribe() {
2839
2835
  window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
2840
2836
  }
2841
2837
  schedule() {
2842
- y(this, re) && clearTimeout(y(this, re)), k(this, re, window.setTimeout(() => this.processQueue(), _t));
2838
+ y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(), Rt));
2843
2839
  }
2844
2840
  send(e) {
2845
- k(this, oe, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime());
2841
+ E(this, ne, (/* @__PURE__ */ new Date()).getTime());
2846
2842
  try {
2847
2843
  navigator.sendBeacon(y(this, ae), JSON.stringify(e));
2848
2844
  } catch {
@@ -2853,19 +2849,19 @@ class Xi extends jt {
2853
2849
  "Content-Type": "application/json"
2854
2850
  },
2855
2851
  keepalive: !0
2856
- }).catch(lt);
2852
+ }).catch(ct);
2857
2853
  }
2858
2854
  this.schedule();
2859
2855
  }
2860
2856
  addToQueue(e) {
2861
- y(this, H).push(e), this.processQueue();
2857
+ y(this, N).push(e), this.processQueue();
2862
2858
  }
2863
2859
  processQueue(e = !1) {
2864
- if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, H).length < Lt && /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime() - y(this, oe) < _t))
2865
- for (; y(this, H).length; ) {
2866
- const i = y(this, H).splice(0, Lt).map((n) => ({
2867
- ...n,
2868
- sessionID: y(this, Ee),
2860
+ if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, N).length < xt && (/* @__PURE__ */ new Date()).getTime() - y(this, ne) < Rt))
2861
+ for (; y(this, N).length; ) {
2862
+ const i = y(this, N).splice(0, xt).map((a) => ({
2863
+ ...a,
2864
+ sessionID: this.sdkConfig.api.sessionId,
2869
2865
  userID: this.sdkConfig.api.user
2870
2866
  }));
2871
2867
  this.send(i);
@@ -2875,33 +2871,34 @@ class Xi extends jt {
2875
2871
  this.addToQueue({
2876
2872
  eventName: e,
2877
2873
  eventParams: i,
2878
- eventTimestamp: /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime(),
2879
- eventUUID: Ut()
2874
+ eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
2875
+ eventUUID: jt()
2880
2876
  });
2881
2877
  }
2882
2878
  }
2883
- ae = new WeakMap(), oe = new WeakMap(), re = new WeakMap(), H = new WeakMap(), Ee = new WeakMap();
2884
- const Li = U("LoggingTracker", "color:#000000;font-weight:bold;");
2885
- class Ki extends jt {
2879
+ ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), N = new WeakMap();
2880
+ const Pi = O("LoggingTracker", "color:#000000;font-weight:bold;");
2881
+ class qi extends qt {
2886
2882
  track(t, e) {
2887
- Li(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
2883
+ Pi(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
2888
2884
  }
2889
2885
  }
2890
2886
  export {
2891
- Di as BasicPlugin,
2892
- j as CasinoPlugin,
2893
- Ni as DebuggingPlugin,
2894
- Gi as GigPlugin,
2895
- Wi as KalambaBullseyeParsers,
2896
- $i as KalambaBullseyePlugin,
2897
- ji as KalambaStargazerPlugin,
2898
- Xi as KalambaStargazerTracker,
2899
- Ki as LoggingTracker,
2900
- Hi as OryxPlugin,
2901
- Vi as PariplayPlugin,
2902
- zi as RelaxFEIMPlugin,
2903
- mi as RgsPlugin,
2904
- Mi as TelemetryPlugin,
2905
- jt as Tracker,
2906
- qi as TukoPlugin
2887
+ Ri as BasicPlugin,
2888
+ V as CasinoPlugin,
2889
+ Li as DebuggingPlugin,
2890
+ Ui as GigPlugin,
2891
+ Gi as KalambaBullseyeParsers,
2892
+ Hi as KalambaBullseyePlugin,
2893
+ Vi as KalambaStargazerPlugin,
2894
+ zi as KalambaStargazerTracker,
2895
+ qi as LoggingTracker,
2896
+ _i as OryxPlugin,
2897
+ Bi as PariplayPlugin,
2898
+ Ni as QuantaPlugin,
2899
+ Fi as RelaxFEIMPlugin,
2900
+ pi as RgsPlugin,
2901
+ vi as TelemetryPlugin,
2902
+ qt as Tracker,
2903
+ Di as TukoPlugin
2907
2904
  };