@kalamba/sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/plugins.js CHANGED
@@ -444,14 +444,14 @@ class _i extends $ {
444
444
  });
445
445
  }
446
446
  }
447
- const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
447
+ const he = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
448
  class Di extends $ {
449
449
  constructor(...t) {
450
450
  super(...t);
451
451
  p(this, "VERSION", "1.15.0");
452
452
  const n = document.createElement("script");
453
453
  n.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, n.onload = () => {
454
- ue("loaded"), window.FEIM.configure({
454
+ he("loaded"), window.FEIM.configure({
455
455
  p2pConfig: {
456
456
  currency: this.config.api.currency,
457
457
  launchParams: {
@@ -459,11 +459,11 @@ class Di extends $ {
459
459
  homeurl: "homeUrl"
460
460
  }
461
461
  }
462
- }), ue("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
462
+ }), he("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
463
463
  }, document.body.appendChild(n);
464
464
  }
465
465
  registerToSdkEvents() {
466
- 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(() => {
466
+ 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(() => {
467
467
  this.send("help", {});
468
468
  }), window.FEIM.on.togglePaytable(() => {
469
469
  this.send("paytable", {});
@@ -656,25 +656,25 @@ class Xt {
656
656
  n !== -1 && this.eventListeners[e].splice(n, 1);
657
657
  }
658
658
  }
659
- function Ce(i) {
659
+ function Ie(i) {
660
660
  try {
661
661
  return JSON.parse(i == null ? void 0 : i.data);
662
662
  } catch (e) {
663
663
  return console.error("fakap", e), null;
664
664
  }
665
665
  }
666
- function be(i) {
666
+ function me(i) {
667
667
  var e;
668
668
  return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "GameEvent";
669
669
  }
670
670
  function Kt(i) {
671
- return be(i) && i.body.event === "OPEN_GAME";
671
+ return me(i) && i.body.event === "OPEN_GAME";
672
672
  }
673
673
  function Jt(i) {
674
- return be(i) && i.body.event === "SPIN_ERROR";
674
+ return me(i) && i.body.event === "SPIN_ERROR";
675
675
  }
676
676
  function Yt(i) {
677
- return be(i) && i.body.event.includes("_RESULT");
677
+ return me(i) && i.body.event.includes("_RESULT");
678
678
  }
679
679
  function Zt(i) {
680
680
  var e;
@@ -688,7 +688,7 @@ function dt(i) {
688
688
  var e;
689
689
  return ((e = i == null ? void 0 : i.header) == null ? void 0 : e.name) === "RealityCheck";
690
690
  }
691
- var Z, ye;
691
+ var Z, ve;
692
692
  class ti extends Xt {
693
693
  constructor(t, n) {
694
694
  const a = new URL(t.apiUrl);
@@ -724,12 +724,12 @@ class ti extends Xt {
724
724
  p(this, "seqId", 10);
725
725
  p(this, "gameCode");
726
726
  E(this, Z, void 0);
727
- E(this, ye, void 0);
727
+ E(this, ve, void 0);
728
728
  p(this, "onMessage", (t) => {
729
- const n = Ce(t);
730
- (be(n) || ei(n) || dt(n)) && this.sendAcknowledgement(n), dt(n) && this.handleRealityCheck(n);
729
+ const n = Ie(t);
730
+ (me(n) || ei(n) || dt(n)) && this.sendAcknowledgement(n), dt(n) && this.handleRealityCheck(n);
731
731
  });
732
- this.eventListeners.realityCheck = [], this.gameCode = t.gameCode, v(this, Z, n.requestTimeoutMs), v(this, ye, n.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
732
+ this.eventListeners.realityCheck = [], this.gameCode = t.gameCode, v(this, Z, n.requestTimeoutMs), v(this, ve, n.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
733
733
  }
734
734
  handleRealityCheck(t) {
735
735
  this.eventListeners.realityCheck.forEach((n) => {
@@ -769,7 +769,7 @@ class ti extends Xt {
769
769
  return new Promise((c, s) => {
770
770
  setTimeout(() => s({ request: { body: n, header: t }, type: "timeout" }), y(this, Z));
771
771
  const h = (g) => {
772
- const w = Ce(g);
772
+ const w = Ie(g);
773
773
  try {
774
774
  t.cId === (w == null ? void 0 : w.header.cId) && (this.removeEventListener("message", h), w.header.code === 1 ? c(w) : s({ response: w, type: "response" }));
775
775
  } catch {
@@ -789,7 +789,7 @@ class ti extends Xt {
789
789
  authenticate(t = !1) {
790
790
  const n = this.buildHeader("Authenticate"), a = {
791
791
  clientType: 3,
792
- version: y(this, ye),
792
+ version: y(this, ve),
793
793
  reconnect: t
794
794
  };
795
795
  return this.request(
@@ -803,7 +803,7 @@ class ti extends Xt {
803
803
  };
804
804
  return new Promise((a, c) => {
805
805
  const s = (h) => {
806
- const g = Ce(h);
806
+ const g = Ie(h);
807
807
  Kt(g) && (this.removeEventListener("message", s), a(g.body));
808
808
  };
809
809
  this.addEventListener("message", s), this.request(t, n).catch((h) => {
@@ -822,8 +822,8 @@ class ti extends Xt {
822
822
  };
823
823
  return new Promise((s, h) => {
824
824
  const g = (w) => {
825
- const m = Ce(w);
826
- be(m) && c.seqId === m.body.correlationSeqId && (this.removeEventListener("message", g), Yt(m) ? s(m.body) : Jt(m) && h(m.body));
825
+ const m = Ie(w);
826
+ me(m) && c.seqId === m.body.correlationSeqId && (this.removeEventListener("message", g), Yt(m) ? s(m.body) : Jt(m) && h(m.body));
827
827
  };
828
828
  this.addEventListener("message", g), this.request(a, c).catch(
829
829
  (w) => {
@@ -836,7 +836,7 @@ class ti extends Xt {
836
836
  v(this, Z, t);
837
837
  }
838
838
  }
839
- Z = new WeakMap(), ye = new WeakMap();
839
+ Z = new WeakMap(), ve = new WeakMap();
840
840
  function ii(i) {
841
841
  return i.contract ? {
842
842
  contract: {
@@ -891,6 +891,7 @@ function ni(i, e) {
891
891
  },
892
892
  gameModel: e.contract.gameModelFile,
893
893
  metaData: e.contract.metaData,
894
+ roundId: e.contract.roundId,
894
895
  serverTime: e.contract.serverTime,
895
896
  sessionId: e.contract.sessionId,
896
897
  stateType: {
@@ -928,6 +929,7 @@ function ni(i, e) {
928
929
  },
929
930
  gameModel: e.data.additionalConfigData.gameModelFile,
930
931
  metaData: e.data.gameConfigData.metaData,
932
+ roundId: e.data.gameState.cycleId,
931
933
  serverTime: e.balanceVersion,
932
934
  sessionId: e.data.gameState.sessionId,
933
935
  stateType: {
@@ -1037,14 +1039,14 @@ const si = {
1037
1039
  ukr: "uk",
1038
1040
  vie: "vi"
1039
1041
  }, oi = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
1040
- var ve;
1042
+ var Ee;
1041
1043
  class Ni extends Qt {
1042
1044
  constructor(...t) {
1043
1045
  super(...t);
1044
1046
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1045
1047
  // @ts-ignore
1046
1048
  p(this, "socket");
1047
- E(this, ve, "");
1049
+ E(this, Ee, "");
1048
1050
  this.on("openGame", async () => {
1049
1051
  try {
1050
1052
  const n = await this.openGame();
@@ -1060,14 +1062,14 @@ class Ni extends Qt {
1060
1062
  this.send("playError", a);
1061
1063
  }
1062
1064
  }), this.on("state", ({ version: n }) => {
1063
- v(this, ve, n);
1065
+ v(this, Ee, n);
1064
1066
  }), this.on("configured", (n) => {
1065
1067
  this.socket.setRequestTimeoutMs(n.ui.requestTimeoutMs);
1066
1068
  }), this.registerFromSdkEvents();
1067
1069
  }
1068
1070
  initialize(t) {
1069
1071
  this.socket = new ti(t, {
1070
- gameVersion: y(this, ve),
1072
+ gameVersion: y(this, Ee),
1071
1073
  requestTimeoutMs: this.config.ui.requestTimeoutMs
1072
1074
  }), this.socket.addEventListener("close", (n) => {
1073
1075
  n.code === 1006 && this.reconnect(t);
@@ -1083,7 +1085,7 @@ class Ni extends Qt {
1083
1085
  async openGame() {
1084
1086
  const t = new URLSearchParams(window.location.search), n = t.get("apiUrl"), a = t.get("cageCode"), c = t.get("gameCode"), s = t.get("operatorCode"), h = t.get("playMode"), g = t.get("token"), w = t.get("username"), m = t.get("gameHistoryUrl"), A = t.get("homeUrl") ?? void 0, R = t.get("cashierUrl") ?? void 0;
1085
1087
  this.initialize({ apiUrl: n, cageCode: a, gameCode: c, operatorCode: s, playMode: h, token: g, username: w }), await this.socket.connect();
1086
- const de = await this.socket.authenticate(), le = await this.socket.openGame(), L = ii(de), Se = ni(de, le);
1088
+ const de = await this.socket.authenticate(), le = await this.socket.openGame(), L = ii(de), ue = ni(de, le);
1087
1089
  this.config.api = {
1088
1090
  brand: a,
1089
1091
  game: c,
@@ -1100,10 +1102,11 @@ class Ni extends Qt {
1100
1102
  gameHistoryUrl: m,
1101
1103
  homeUrl: A,
1102
1104
  cashierUrl: R,
1103
- sessionId: Se.contract.sessionId
1105
+ sessionId: ue.contract.sessionId,
1106
+ lastRoundId: ue.contract.roundId
1104
1107
  };
1105
1108
  const x = t.get("languageCode");
1106
- return x && (this.config.ui.language = x.length === 3 ? si[x] ?? x : x), Se;
1109
+ return x && (this.config.ui.language = x.length === 3 ? si[x] ?? x : x), ue;
1107
1110
  }
1108
1111
  async play(t) {
1109
1112
  const {
@@ -1115,8 +1118,8 @@ class Ni extends Qt {
1115
1118
  // TODO: get rid of contractRest - it' a legacy from old RGS
1116
1119
  ...a,
1117
1120
  opaqueUiToGameServer: c
1118
- }), g = ai(h);
1119
- return this.config.api.lastRoundId = g.contract.roundId, g;
1121
+ });
1122
+ return ai(h);
1120
1123
  }
1121
1124
  registerFromSdkEvents() {
1122
1125
  this.on("history", () => {
@@ -1128,8 +1131,8 @@ class Ni extends Qt {
1128
1131
  });
1129
1132
  }
1130
1133
  }
1131
- ve = new WeakMap();
1132
- var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re = "object", Ye = "string", me = "major", d = "model", o = "name", l = "type", u = "vendor", r = "version", S = "architecture", K = "console", b = "mobile", f = "tablet", I = "smarttv", X = "wearable", Ze = "embedded", ut = "user-agent", et = 500, nt = "brands", G = "formFactor", at = "fullVersionList", J = "platform", st = "platformVersion", Re = "bitness", q = "sec-ch-ua", ci = q + "-full-version-list", di = q + "-arch", li = q + "-" + Re, ui = q + "-form-factor", hi = q + "-" + b, gi = q + "-" + d, Bt = q + "-" + J, wi = Bt + "-version", Ft = [nt, at, b, d, J, st, S, G, Re], T = "browser", B = "cpu", U = "device", F = "engine", P = "os", Y = "result", Ie = "Amazon", he = "Apple", ht = "ASUS", gt = "BlackBerry", Te = "Google", wt = "Huawei", pt = "Lenovo", We = "LG", Le = "Microsoft", bt = "Motorola", Ae = "Samsung", mt = "Sharp", Pe = "Sony", $e = "Xiaomi", je = "Zebra", j = "Mobile ", Q = " Browser", xe = "Chrome", pi = "Edge", ge = "Firefox", we = "Opera", ft = "Facebook", yt = "Sogou", tt = "Windows", bi = typeof window !== V, C = bi && window.navigator ? window.navigator : void 0, N = C && C.userAgentData ? C.userAgentData : void 0, mi = function(i, e) {
1134
+ Ee = new WeakMap();
1135
+ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re = "object", Ye = "string", fe = "major", d = "model", o = "name", l = "type", u = "vendor", r = "version", S = "architecture", K = "console", b = "mobile", f = "tablet", C = "smarttv", X = "wearable", Ze = "embedded", ut = "user-agent", et = 500, nt = "brands", G = "formFactor", at = "fullVersionList", J = "platform", st = "platformVersion", Re = "bitness", q = "sec-ch-ua", ci = q + "-full-version-list", di = q + "-arch", li = q + "-" + Re, ui = q + "-form-factor", hi = q + "-" + b, gi = q + "-" + d, Bt = q + "-" + J, wi = Bt + "-version", Ft = [nt, at, b, d, J, st, S, G, Re], T = "browser", B = "cpu", U = "device", F = "engine", P = "os", Y = "result", Ce = "Amazon", ge = "Apple", ht = "ASUS", gt = "BlackBerry", Te = "Google", wt = "Huawei", pt = "Lenovo", We = "LG", Le = "Microsoft", bt = "Motorola", Ae = "Samsung", mt = "Sharp", Pe = "Sony", $e = "Xiaomi", je = "Zebra", j = "Mobile ", Q = " Browser", xe = "Chrome", pi = "Edge", we = "Firefox", pe = "Opera", ft = "Facebook", yt = "Sogou", tt = "Windows", bi = typeof window !== V, I = bi && window.navigator ? window.navigator : void 0, N = I && I.userAgentData ? I.userAgentData : void 0, mi = function(i, e) {
1133
1136
  var t = {};
1134
1137
  for (var n in i)
1135
1138
  t[n] = e[n] && e[n].length % 2 === 0 ? e[n].concat(i[n]) : i[n];
@@ -1155,10 +1158,10 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1155
1158
  if (i) {
1156
1159
  for (var e = [], t = W(/\\?\"/g, i).split(","), n = 0; n < t.length; n++)
1157
1160
  if (t[n].indexOf(";") > -1) {
1158
- var a = fe(t[n]).split(";v=");
1161
+ var a = ye(t[n]).split(";v=");
1159
1162
  e[n] = { brand: a[0], version: a[1] };
1160
1163
  } else
1161
- e[n] = fe(t[n]);
1164
+ e[n] = ye(t[n]);
1162
1165
  return e;
1163
1166
  }
1164
1167
  }, z = function(i) {
@@ -1173,9 +1176,9 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1173
1176
  return this;
1174
1177
  }, W = function(i, e) {
1175
1178
  return ce(e) ? e.replace(i, oe) : e;
1176
- }, pe = function(i) {
1179
+ }, be = function(i) {
1177
1180
  return W(/\\?\"/g, i);
1178
- }, fe = function(i, e) {
1181
+ }, ye = function(i, e) {
1179
1182
  if (ce(i))
1180
1183
  return i = W(/^\s\s*/, i), typeof e === V ? i : i.substring(0, et);
1181
1184
  }, Et = function(i, e) {
@@ -1244,17 +1247,17 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1244
1247
  /opios[\/ ]+([\w\.]+)/i
1245
1248
  // Opera mini on iphone >= 8.0
1246
1249
  ],
1247
- [r, [o, we + " Mini"]],
1250
+ [r, [o, pe + " Mini"]],
1248
1251
  [
1249
1252
  /\bop(?:rg)?x\/([\w\.]+)/i
1250
1253
  // Opera GX
1251
1254
  ],
1252
- [r, [o, we + " GX"]],
1255
+ [r, [o, pe + " GX"]],
1253
1256
  [
1254
1257
  /\bopr\/([\w\.]+)/i
1255
1258
  // Opera Webkit
1256
1259
  ],
1257
- [r, [o, we]],
1260
+ [r, [o, pe]],
1258
1261
  [
1259
1262
  // Mixed
1260
1263
  /\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
@@ -1322,12 +1325,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1322
1325
  /\bfocus\/([\w\.]+)/i
1323
1326
  // Firefox Focus
1324
1327
  ],
1325
- [r, [o, ge + " Focus"]],
1328
+ [r, [o, we + " Focus"]],
1326
1329
  [
1327
1330
  /\bopt\/([\w\.]+)/i
1328
1331
  // Opera Touch
1329
1332
  ],
1330
- [r, [o, we + " Touch"]],
1333
+ [r, [o, pe + " Touch"]],
1331
1334
  [
1332
1335
  /coc_coc\w+\/([\w\.]+)/i
1333
1336
  // Coc Coc Browser
@@ -1342,7 +1345,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1342
1345
  /coast\/([\w\.]+)/i
1343
1346
  // Opera Coast
1344
1347
  ],
1345
- [r, [o, we + " Coast"]],
1348
+ [r, [o, pe + " Coast"]],
1346
1349
  [
1347
1350
  /miuibrowser\/([\w\.]+)/i
1348
1351
  // MIUI Browser
@@ -1352,7 +1355,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1352
1355
  /fxios\/([\w\.-]+)/i
1353
1356
  // Firefox for iOS
1354
1357
  ],
1355
- [r, [o, j + ge]],
1358
+ [r, [o, j + we]],
1356
1359
  [
1357
1360
  /\bqihu|(qi?ho?o?|360)browser/i
1358
1361
  // 360
@@ -1485,7 +1488,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1485
1488
  /(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
1486
1489
  // Firefox Mobile
1487
1490
  ],
1488
- [[o, j + ge], r],
1491
+ [[o, j + we], r],
1489
1492
  [
1490
1493
  /(navigator|netscape\d?)\/([-\w\.]+)/i
1491
1494
  // Netscape
@@ -1495,7 +1498,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1495
1498
  /mobile vr; rv:([\w\.]+)\).+firefox/i
1496
1499
  // Firefox Reality
1497
1500
  ],
1498
- [r, [o, ge + " Reality"]],
1501
+ [r, [o, we + " Reality"]],
1499
1502
  [
1500
1503
  /ekiohf.+(flow)\/([\w\.]+)/i,
1501
1504
  // Flow
@@ -1588,18 +1591,18 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1588
1591
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1589
1592
  // iPod/iPhone
1590
1593
  ],
1591
- [d, [u, he], [l, b]],
1594
+ [d, [u, ge], [l, b]],
1592
1595
  [
1593
1596
  /\((ipad);[-\w\),; ]+apple/i,
1594
1597
  // iPad
1595
1598
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1596
1599
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1597
1600
  ],
1598
- [d, [u, he], [l, f]],
1601
+ [d, [u, ge], [l, f]],
1599
1602
  [
1600
1603
  /(macintosh);/i
1601
1604
  ],
1602
- [d, [u, he]],
1605
+ [d, [u, ge]],
1603
1606
  [
1604
1607
  // Sharp
1605
1608
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
@@ -1724,12 +1727,12 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1724
1727
  /(kf[a-z]+)( bui|\)).+silk\//i
1725
1728
  // Kindle Fire HD
1726
1729
  ],
1727
- [d, [u, Ie], [l, f]],
1730
+ [d, [u, Ce], [l, f]],
1728
1731
  [
1729
1732
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1730
1733
  // Fire Phone
1731
1734
  ],
1732
- [[d, /(.+)/g, "Fire Phone $1"], [u, Ie], [l, b]],
1735
+ [[d, /(.+)/g, "Fire Phone $1"], [u, Ce], [l, b]],
1733
1736
  [
1734
1737
  // BlackBerry
1735
1738
  /(playbook);[-\w\),; ]+(rim)/i
@@ -1852,64 +1855,64 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1852
1855
  /smart-tv.+(samsung)/i
1853
1856
  // Samsung
1854
1857
  ],
1855
- [u, [l, I]],
1858
+ [u, [l, C]],
1856
1859
  [
1857
1860
  /hbbtv.+maple;(\d+)/i
1858
1861
  ],
1859
- [[d, /^/, "SmartTV"], [u, Ae], [l, I]],
1862
+ [[d, /^/, "SmartTV"], [u, Ae], [l, C]],
1860
1863
  [
1861
1864
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1862
1865
  // LG SmartTV
1863
1866
  ],
1864
- [[u, We], [l, I]],
1867
+ [[u, We], [l, C]],
1865
1868
  [
1866
1869
  /(apple) ?tv/i
1867
1870
  // Apple TV
1868
1871
  ],
1869
- [u, [d, he + " TV"], [l, I]],
1872
+ [u, [d, ge + " TV"], [l, C]],
1870
1873
  [
1871
1874
  /crkey/i
1872
1875
  // Google Chromecast
1873
1876
  ],
1874
- [[d, xe + "cast"], [u, Te], [l, I]],
1877
+ [[d, xe + "cast"], [u, Te], [l, C]],
1875
1878
  [
1876
1879
  /droid.+aft(\w+)( bui|\))/i
1877
1880
  // Fire TV
1878
1881
  ],
1879
- [d, [u, Ie], [l, I]],
1882
+ [d, [u, Ce], [l, C]],
1880
1883
  [
1881
1884
  /\(dtv[\);].+(aquos)/i,
1882
1885
  /(aquos-tv[\w ]+)\)/i
1883
1886
  // Sharp
1884
1887
  ],
1885
- [d, [u, mt], [l, I]],
1888
+ [d, [u, mt], [l, C]],
1886
1889
  [
1887
1890
  /(bravia[\w ]+)( bui|\))/i
1888
1891
  // Sony
1889
1892
  ],
1890
- [d, [u, Pe], [l, I]],
1893
+ [d, [u, Pe], [l, C]],
1891
1894
  [
1892
1895
  /(mitv-\w{5}) bui/i
1893
1896
  // Xiaomi
1894
1897
  ],
1895
- [d, [u, $e], [l, I]],
1898
+ [d, [u, $e], [l, C]],
1896
1899
  [
1897
1900
  /Hbbtv.*(technisat) (.*);/i
1898
1901
  // TechniSAT
1899
1902
  ],
1900
- [u, d, [l, I]],
1903
+ [u, d, [l, C]],
1901
1904
  [
1902
1905
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1903
1906
  // Roku
1904
1907
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1905
1908
  // HbbTV devices
1906
1909
  ],
1907
- [[u, fe], [d, fe], [l, I]],
1910
+ [[u, ye], [d, ye], [l, C]],
1908
1911
  [
1909
1912
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1910
1913
  // SmartTV from Unidentified Vendors
1911
1914
  ],
1912
- [[l, I]],
1915
+ [[l, C]],
1913
1916
  [
1914
1917
  ///////////////////
1915
1918
  // CONSOLES
@@ -1947,7 +1950,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1947
1950
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1948
1951
  // Apple Watch
1949
1952
  ],
1950
- [d, [u, he], [l, X]],
1953
+ [d, [u, ge], [l, X]],
1951
1954
  [
1952
1955
  /droid.+; (glass) \d/i
1953
1956
  // Google Glass
@@ -1974,7 +1977,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
1974
1977
  /(aeobc)\b/i
1975
1978
  // Echo Dot
1976
1979
  ],
1977
- [d, [u, Ie], [l, Ze]],
1980
+ [d, [u, Ce], [l, Ze]],
1978
1981
  [
1979
1982
  ////////////////////
1980
1983
  // MIXED (GENERIC)
@@ -2099,7 +2102,7 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2099
2102
  /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
2100
2103
  // Firefox OS
2101
2104
  ],
2102
- [r, [o, ge + " OS"]],
2105
+ [r, [o, we + " OS"]],
2103
2106
  [
2104
2107
  /web0s;.+rt(tv)/i,
2105
2108
  /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
@@ -2174,13 +2177,13 @@ var ri = "2.0.0-beta.2", oe = "", lt = "?", Je = "function", V = "undefined", re
2174
2177
  }, Ue = function() {
2175
2178
  var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
2176
2179
  return _.call(i.init, [
2177
- [T, [o, r, me]],
2180
+ [T, [o, r, fe]],
2178
2181
  [B, [S]],
2179
2182
  [U, [l, d, u]],
2180
2183
  [F, [o, r]],
2181
2184
  [P, [o, r]]
2182
2185
  ]), _.call(i.isIgnore, [
2183
- [T, [r, me]],
2186
+ [T, [r, fe]],
2184
2187
  [F, [r]],
2185
2188
  [P, [r]]
2186
2189
  ]), _.call(i.isIgnoreRgx, [
@@ -2241,18 +2244,18 @@ function _t(i, e) {
2241
2244
  [nt, Qe(i[q])],
2242
2245
  [at, Qe(i[ci])],
2243
2246
  [b, /\?1/.test(i[hi])],
2244
- [d, pe(i[gi])],
2245
- [J, pe(i[Bt])],
2246
- [st, pe(i[wi])],
2247
- [S, pe(i[di])],
2247
+ [d, be(i[gi])],
2248
+ [J, be(i[Bt])],
2249
+ [st, be(i[wi])],
2250
+ [S, be(i[di])],
2248
2251
  [G, Qe(i[ui])],
2249
- [Re, pe(i[li])]
2252
+ [Re, be(i[li])]
2250
2253
  ]);
2251
2254
  else
2252
2255
  for (var t in i)
2253
2256
  this.hasOwnProperty(t) && typeof i[t] !== V && (this[t] = i[t]);
2254
2257
  }
2255
- function Ct(i, e, t, n) {
2258
+ function It(i, e, t, n) {
2256
2259
  return this.get = function(a) {
2257
2260
  return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
2258
2261
  }, this.set = function(a, c) {
@@ -2260,13 +2263,13 @@ function Ct(i, e, t, n) {
2260
2263
  }, this.setCH = function(a) {
2261
2264
  return this.uaCH = a, this;
2262
2265
  }, this.detectFeature = function() {
2263
- if (C && C.userAgent == this.ua)
2266
+ if (I && I.userAgent == this.ua)
2264
2267
  switch (this.itemType) {
2265
2268
  case T:
2266
- C.brave && typeof C.brave.isBrave == Je && this.set(o, "Brave");
2269
+ I.brave && typeof I.brave.isBrave == Je && this.set(o, "Brave");
2267
2270
  break;
2268
2271
  case U:
2269
- !this.get(l) && N && N[b] && this.set(l, b), this.get(d) == "Macintosh" && C && typeof C.standalone !== V && C.maxTouchPoints && C.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
2272
+ !this.get(l) && N && N[b] && this.set(l, b), this.get(d) == "Macintosh" && I && typeof I.standalone !== V && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(d, "iPad").set(l, f);
2270
2273
  break;
2271
2274
  case P:
2272
2275
  !this.get(o) && N && N[J] && this.set(o, N[J]);
@@ -2279,7 +2282,7 @@ function Ct(i, e, t, n) {
2279
2282
  }
2280
2283
  return this;
2281
2284
  }, this.parseUA = function() {
2282
- return this.itemType != Y && Et.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(me, Xe(this.get(r))), this;
2285
+ return this.itemType != Y && Et.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(fe, Xe(this.get(r))), this;
2283
2286
  }, this.parseCH = function() {
2284
2287
  var a = this.uaCH, c = this.rgxMap;
2285
2288
  switch (this.itemType) {
@@ -2288,7 +2291,7 @@ function Ct(i, e, t, n) {
2288
2291
  if (s)
2289
2292
  for (var g in s) {
2290
2293
  var w = W(/(Google|Microsoft) /, s[g].brand || s[g]), m = s[g].version;
2291
- !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(r, m).set(me, Xe(m)), h = w);
2294
+ !/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(o, w).set(r, m).set(fe, Xe(m)), h = w);
2292
2295
  }
2293
2296
  break;
2294
2297
  case B:
@@ -2315,8 +2318,8 @@ function Ct(i, e, t, n) {
2315
2318
  this.get(o) == tt && a[d] == "Xbox" && this.set(o, "Xbox").set(r, void 0);
2316
2319
  break;
2317
2320
  case Y:
2318
- var Se = this.data, x = function(Rt) {
2319
- return Se[Rt].getItem().setCH(a).parseCH().get();
2321
+ var ue = this.data, x = function(Rt) {
2322
+ return ue[Rt].getItem().setCH(a).parseCH().get();
2320
2323
  };
2321
2324
  this.set(T, x(T)).set(B, x(B)).set(U, x(U)).set(F, x(F)).set(P, x(P));
2322
2325
  }
@@ -2334,7 +2337,7 @@ function D(i, e, t) {
2334
2337
  return new D(i, e, t).getResult();
2335
2338
  var n = typeof i === Ye ? i : (
2336
2339
  // Passed user-agent string
2337
- C && C.userAgent ? C.userAgent : (
2340
+ I && I.userAgent ? I.userAgent : (
2338
2341
  // navigator.userAgent
2339
2342
  t && t[ut] ? t[ut] : (
2340
2343
  // User-Agent from passed headers
@@ -2343,9 +2346,9 @@ function D(i, e, t) {
2343
2346
  )
2344
2347
  ), a = new _t(t, !0), c = e ? mi(St, e) : St, s = function(h) {
2345
2348
  return h == Y ? function() {
2346
- return new Ct(h, n, c, a).set("ua", n).set(T, this.getBrowser()).set(B, this.getCPU()).set(U, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
2349
+ return new It(h, n, c, a).set("ua", n).set(T, this.getBrowser()).set(B, this.getCPU()).set(U, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
2347
2350
  } : function() {
2348
- return new Ct(h, n, c[h], a).parseUA().get();
2351
+ return new It(h, n, c[h], a).parseUA().get();
2349
2352
  };
2350
2353
  };
2351
2354
  return _.call(this, [
@@ -2359,14 +2362,14 @@ function D(i, e, t) {
2359
2362
  return n;
2360
2363
  }],
2361
2364
  ["setUA", function(h) {
2362
- return ce(h) && (n = h.length > et ? fe(h, et) : h), this;
2365
+ return ce(h) && (n = h.length > et ? ye(h, et) : h), this;
2363
2366
  }]
2364
2367
  ]).setUA(n), this;
2365
2368
  }
2366
2369
  D.VERSION = ri;
2367
- D.BROWSER = Ne([o, r, me]);
2370
+ D.BROWSER = Ne([o, r, fe]);
2368
2371
  D.CPU = Ne([S]);
2369
- D.DEVICE = Ne([d, u, l, K, b, I, f, X, Ze]);
2372
+ D.DEVICE = Ne([d, u, l, K, b, C, f, X, Ze]);
2370
2373
  D.ENGINE = D.OS = Ne([o, r]);
2371
2374
  class yi {
2372
2375
  constructor(e, t) {
@@ -2384,11 +2387,11 @@ class yi {
2384
2387
  this.trackers.forEach((n) => n.track(e, t));
2385
2388
  }
2386
2389
  }
2387
- function It(i) {
2390
+ function Ct(i) {
2388
2391
  return i.reduce((e, t) => e + t, 0);
2389
2392
  }
2390
2393
  function vi(i) {
2391
- const e = i.length, t = It(i) / e, n = i.map((c) => Math.pow(c - t, 2)), a = It(n) / e;
2394
+ const e = i.length, t = Ct(i) / e, n = i.map((c) => Math.pow(c - t, 2)), a = Ct(n) / e;
2392
2395
  return Math.sqrt(a);
2393
2396
  }
2394
2397
  class Tt {
@@ -2438,7 +2441,7 @@ async function Si() {
2438
2441
  function Ke() {
2439
2442
  return window.innerWidth >= window.innerHeight ? Ei : ki;
2440
2443
  }
2441
- var Fe, ee, te, ie, Ee, _e, ke, De;
2444
+ var Fe, ee, te, ie, ke, _e, Me, De;
2442
2445
  class Hi extends yi {
2443
2446
  constructor(...t) {
2444
2447
  super(...t);
@@ -2448,14 +2451,14 @@ class Hi extends yi {
2448
2451
  E(this, ee, "");
2449
2452
  E(this, te, void 0);
2450
2453
  E(this, ie, void 0);
2451
- E(this, Ee, !1);
2454
+ E(this, ke, !1);
2452
2455
  E(this, _e, !1);
2453
- E(this, ke, "");
2456
+ E(this, Me, "");
2454
2457
  E(this, De, []);
2455
2458
  v(this, te, {}), v(this, ie, this.deviceInfo()), this.on("state", ({ balance: n, version: a }) => {
2456
2459
  v(this, ee, a), v(this, Fe, n);
2457
2460
  }), this.on("autoplay", ({ action: n }) => {
2458
- ["start", "resume"].includes(n) ? v(this, Ee, !0) : v(this, Ee, !1);
2461
+ ["start", "resume"].includes(n) ? v(this, ke, !0) : v(this, ke, !1);
2459
2462
  }), this.on("settings", ({ fastPlay: n }) => {
2460
2463
  n !== void 0 && v(this, _e, n);
2461
2464
  }), this.registerEvents();
@@ -2475,7 +2478,7 @@ class Hi extends yi {
2475
2478
  systemMessageType: t.type
2476
2479
  });
2477
2480
  }), this.on("openGameResponse", async (t) => {
2478
- v(this, ke, t.contract.stateType.nextRound), v(this, te, {
2481
+ v(this, Me, t.contract.stateType.nextRound), v(this, te, {
2479
2482
  balanceInCoins: t.contract.balance.coins,
2480
2483
  clientVersion: y(this, ee),
2481
2484
  coinValueInCents: this.config.api.coinValueInCents,
@@ -2567,7 +2570,7 @@ class Hi extends yi {
2567
2570
  getExtraUiInteractionData() {
2568
2571
  return {
2569
2572
  orientation: Ke(),
2570
- stateType: y(this, ke)
2573
+ stateType: y(this, Me)
2571
2574
  };
2572
2575
  }
2573
2576
  async deviceInfo() {
@@ -2597,13 +2600,13 @@ class Hi extends yi {
2597
2600
  };
2598
2601
  }
2599
2602
  }
2600
- Fe = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), Ee = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), De = new WeakMap();
2603
+ Fe = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), ke = new WeakMap(), _e = new WeakMap(), Me = new WeakMap(), De = new WeakMap();
2601
2604
  let Oe;
2602
- const Ci = new Uint8Array(16);
2603
- function Ii() {
2605
+ const Ii = new Uint8Array(16);
2606
+ function Ci() {
2604
2607
  if (!Oe && (Oe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Oe))
2605
2608
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2606
- return Oe(Ci);
2609
+ return Oe(Ii);
2607
2610
  }
2608
2611
  const M = [];
2609
2612
  for (let i = 0; i < 256; ++i)
@@ -2618,7 +2621,7 @@ function Pt(i, e, t) {
2618
2621
  if (At.randomUUID && !e && !i)
2619
2622
  return At.randomUUID();
2620
2623
  i = i || {};
2621
- const n = i.random || (i.rng || Ii)();
2624
+ const n = i.random || (i.rng || Ci)();
2622
2625
  if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
2623
2626
  t = t || 0;
2624
2627
  for (let a = 0; a < 16; ++a)
@@ -2634,7 +2637,7 @@ class Dt {
2634
2637
  }
2635
2638
  }
2636
2639
  const xt = 25, Ut = 1e4;
2637
- var ne, ae, se, H, Me;
2640
+ var ne, ae, se, H, Se;
2638
2641
  class Vi extends Dt {
2639
2642
  constructor(...t) {
2640
2643
  super(...t);
@@ -2642,9 +2645,9 @@ class Vi extends Dt {
2642
2645
  E(this, ae, void 0);
2643
2646
  E(this, se, void 0);
2644
2647
  E(this, H, []);
2645
- E(this, Me, void 0);
2648
+ E(this, Se, void 0);
2646
2649
  p(this, "processQueueForced");
2647
- v(this, ae, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), v(this, H, []), v(this, Me, Pt()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ne), {
2650
+ v(this, ae, /* @__PURE__ */ (/* @__PURE__ */ new Date()).getTime()), v(this, H, []), v(this, Se, Pt()), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ne), {
2648
2651
  method: "OPTIONS"
2649
2652
  }).catch(rt), this.subscribe();
2650
2653
  }
@@ -2678,7 +2681,7 @@ class Vi extends Dt {
2678
2681
  for (; y(this, H).length; ) {
2679
2682
  const n = y(this, H).splice(0, xt).map((a) => ({
2680
2683
  ...a,
2681
- sessionID: y(this, Me),
2684
+ sessionID: y(this, Se),
2682
2685
  userID: this.config.api.user
2683
2686
  }));
2684
2687
  this.send(n);
@@ -2693,7 +2696,7 @@ class Vi extends Dt {
2693
2696
  });
2694
2697
  }
2695
2698
  }
2696
- ne = new WeakMap(), ae = new WeakMap(), se = new WeakMap(), H = new WeakMap(), Me = new WeakMap();
2699
+ ne = new WeakMap(), ae = new WeakMap(), se = new WeakMap(), H = new WeakMap(), Se = new WeakMap();
2697
2700
  const Pi = O("LoggingTracker", "color:#000000;font-weight:bold;");
2698
2701
  class zi extends Dt {
2699
2702
  track(e, t) {