@kalamba/sdk 0.1.1 → 0.2.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
@@ -14,12 +14,12 @@ var y = (i, t, e) => (at(i, t, "read from private field"), e ? e.call(i) : t.get
14
14
  t instanceof WeakSet ? t.add(i) : t.set(i, e);
15
15
  }, E = (i, t, e, s) => (at(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
16
16
  import { a as ot } from "./noop-3336849b.js";
17
- function U(i, t) {
17
+ function x(i, t) {
18
18
  return (e, ...s) => {
19
19
  console.log(`[%c${i}\x1B[m] %s`, t, e, ...s);
20
20
  };
21
21
  }
22
- function Ut(i, t) {
22
+ function xt(i, t) {
23
23
  return Math.round(i * 100 / t);
24
24
  }
25
25
  class $ {
@@ -40,7 +40,7 @@ class $ {
40
40
  });
41
41
  }
42
42
  }
43
- const Ht = U("BasicPlugin", "color:#000000;font-weight:bold;");
43
+ const Ht = x("BasicPlugin", "color:#000000;font-weight:bold;");
44
44
  class Pi extends $ {
45
45
  constructor(...t) {
46
46
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Ht("configured");
@@ -54,8 +54,8 @@ class Pi extends $ {
54
54
  this.send("settings", { music: s == null ? void 0 : s.musicEnabled, sounds: s == null ? void 0 : s.soundEnabled });
55
55
  return;
56
56
  case "doBalanceUpdate":
57
- const { currency: n, coinValueInCents: l } = this.config.api;
58
- s.currency === n && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: Ut(s.balanceInCurrency, l) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
57
+ const { currency: n, coinValueInCents: c } = this.config.api;
58
+ s.currency === n && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: xt(s.balanceInCurrency, c) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
59
59
  return;
60
60
  case "doGamePause":
61
61
  this.send("freeze");
@@ -90,8 +90,8 @@ class Pi extends $ {
90
90
  });
91
91
  }
92
92
  }
93
- const k = U("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), zt = U("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
94
- class Ui extends $ {
93
+ const k = x("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), zt = x("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
94
+ class xi extends $ {
95
95
  constructor(...t) {
96
96
  super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
97
97
  }
@@ -118,8 +118,8 @@ class Ui extends $ {
118
118
  zt(...t), this.send(...t);
119
119
  }
120
120
  }
121
- const Vt = U("GigPlugin", "color:#000000;font-weight:bold;");
122
- class xi extends $ {
121
+ const Vt = x("GigPlugin", "color:#000000;font-weight:bold;");
122
+ class Ui extends $ {
123
123
  constructor(...t) {
124
124
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Vt("configured");
125
125
  }
@@ -169,7 +169,7 @@ class xi extends $ {
169
169
  });
170
170
  }
171
171
  }
172
- const qt = U("OryxPlugin", "color:#000000;font-weight:bold;");
172
+ const qt = x("OryxPlugin", "color:#000000;font-weight:bold;");
173
173
  class Oi extends $ {
174
174
  constructor(...t) {
175
175
  super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qt("configured");
@@ -224,7 +224,7 @@ class Oi extends $ {
224
224
  });
225
225
  }
226
226
  }
227
- const rt = U("PariplayPlugin", "color:#000000;font-weight:bold;");
227
+ const rt = x("PariplayPlugin", "color:#000000;font-weight:bold;");
228
228
  function Ge(i) {
229
229
  try {
230
230
  window.top.location = i;
@@ -234,10 +234,10 @@ function Ge(i) {
234
234
  }
235
235
  function Ne(i, t) {
236
236
  return new Promise(function(s, n) {
237
- const l = new XMLHttpRequest();
238
- l.onload = function() {
239
- l.status >= 200 && l.status < 300 ? s(l.responseText) : n(l.responseText);
240
- }, l.open(i, t), l.send();
237
+ const c = new XMLHttpRequest();
238
+ c.onload = function() {
239
+ c.status >= 200 && c.status < 300 ? s(c.responseText) : n(c.responseText);
240
+ }, c.open(i, t), c.send();
241
241
  });
242
242
  }
243
243
  function He() {
@@ -252,7 +252,7 @@ function ze(i) {
252
252
  return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
253
253
  });
254
254
  }
255
- function xt(i) {
255
+ function Ut(i) {
256
256
  try {
257
257
  return JSON.parse(i.text);
258
258
  } catch {
@@ -260,12 +260,12 @@ function xt(i) {
260
260
  }
261
261
  }
262
262
  function $t(i) {
263
- return i.map(xt).filter(Boolean).find(function(e) {
263
+ return i.map(Ut).filter(Boolean).find(function(e) {
264
264
  return e.betId != null && e.winId != null;
265
265
  }) || {};
266
266
  }
267
267
  function jt(i) {
268
- return i.map(xt).filter(Boolean).find(function(e) {
268
+ return i.map(Ut).filter(Boolean).find(function(e) {
269
269
  return e.TotalBet != null && e.TotalWin != null;
270
270
  }) || {};
271
271
  }
@@ -323,10 +323,10 @@ class Li extends $ {
323
323
  processInfoUiMessages(t) {
324
324
  return t.reduce((e, s) => e.then(() => new Promise((n) => {
325
325
  Object.assign({}, s, {
326
- buttons: s.buttons.filter((l) => l.action.toUpperCase() === "CASHIER" ? !!this.config.api.cashierUrl : !0).map((l) => Object.assign({}, l, {
326
+ buttons: s.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.config.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
327
327
  onRelease: () => {
328
- const a = s.messageType.toUpperCase() === "POPUP" ? He : n, h = this.buttonActions[l.action.toUpperCase()];
329
- h ? h(l, a) : a();
328
+ const a = s.messageType.toUpperCase() === "POPUP" ? He : n, h = this.buttonActions[c.action.toUpperCase()];
329
+ h ? h(c, a) : a();
330
330
  }
331
331
  }))
332
332
  });
@@ -363,12 +363,12 @@ class Li extends $ {
363
363
  try {
364
364
  const n = JSON.parse(
365
365
  JSON.parse(atob(this.config.api.integrationData.token.split(".")[1])).token
366
- ), l = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
366
+ ), c = JSON.parse(n.integrationSpecificAttributes.sessionData || "{}");
367
367
  s = {
368
368
  ClientToken: n.integrationSpecificAttributes.clientToken,
369
369
  CurrencyCode: n.currency,
370
370
  PlayerTokenId: n.user,
371
- SessionData: l
371
+ SessionData: c
372
372
  };
373
373
  } catch {
374
374
  s = void 0;
@@ -418,13 +418,13 @@ class Li extends $ {
418
418
  this.postMessage("roundStarted", {
419
419
  balanceBefore: this.coinsToCurrency(e.balance + e.data.gameState.totalBetFromCurrentGameCycle)
420
420
  });
421
- const s = e.data.gameState.stateTypeThisRound === "BaseGame", n = Wt(e.data.uiMessages), l = ze(e.data.uiMessages), a = $t(n), h = jt(n);
421
+ const s = e.data.gameState.stateTypeThisRound === "BaseGame", n = Wt(e.data.uiMessages), c = ze(e.data.uiMessages), a = $t(n), h = jt(n);
422
422
  this.postMessage("ticketReceived", {
423
423
  Balance: this.coinsToCurrency(e.balance),
424
424
  BetAmount: s ? this.coinsToCurrency(e.data.gameState.totalBetFromCurrentGameCycle) : 0,
425
425
  CreditTransactionId: a.betId,
426
426
  DebitTransactionId: a.winId,
427
- Message: l,
427
+ Message: c,
428
428
  SessionData: h,
429
429
  Status: {
430
430
  ErrCode: 0
@@ -432,7 +432,7 @@ class Li extends $ {
432
432
  WinAmount: this.coinsToCurrency(e.data.gameRoundResult.win)
433
433
  });
434
434
  }), this.on("playStart", (e) => {
435
- "bet" in e && this.postMessage("roundStart", {
435
+ e.bet && this.postMessage("roundStart", {
436
436
  totalBet: this.coinsToCurrency(e.bet.base * e.bet.multiplier)
437
437
  });
438
438
  }), this.on("loadEnd", () => {
@@ -444,7 +444,7 @@ class Li extends $ {
444
444
  });
445
445
  }
446
446
  }
447
- const he = U("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
447
+ const he = x("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
448
448
  class _i extends $ {
449
449
  constructor(...e) {
450
450
  super(...e);
@@ -521,7 +521,7 @@ class _i extends $ {
521
521
  });
522
522
  }
523
523
  }
524
- const Ve = U("TukoPlugin", "color:#000000;font-weight:bold;");
524
+ const Ve = x("TukoPlugin", "color:#000000;font-weight:bold;");
525
525
  class Fi extends $ {
526
526
  constructor(...e) {
527
527
  super(...e);
@@ -546,8 +546,8 @@ class Fi extends $ {
546
546
  this.send("settings", { music: n == null ? void 0 : n.musicEnabled, sounds: n == null ? void 0 : n.soundEnabled });
547
547
  return;
548
548
  case "doBalanceUpdate":
549
- const { currency: l, coinValueInCents: a } = this.config.api;
550
- n.currency === l && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: Ut(n.balanceInCurrency, a) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
549
+ const { currency: c, coinValueInCents: a } = this.config.api;
550
+ n.currency === c && typeof n.balanceInCurrency == "number" ? this.send("balance", { balance: xt(n.balanceInCurrency, a) }) : (n.balanceInCoins, this.send("balance", { balance: n.balanceInCoins }));
551
551
  return;
552
552
  case "doGamePause":
553
553
  this.send("freeze");
@@ -753,12 +753,12 @@ class ti extends Qt {
753
753
  }
754
754
  request(e, s) {
755
755
  const n = this.buildPayload(e, s);
756
- return new Promise((l, a) => {
756
+ return new Promise((c, a) => {
757
757
  setTimeout(() => a({ request: { body: s, header: e }, type: "timeout" }), y(this, Z));
758
758
  const h = (p) => {
759
759
  const g = Me(p);
760
760
  try {
761
- e.cId === (g == null ? void 0 : g.header.cId) && (this.removeEventListener("message", h), g.header.code === 1 ? l(g) : a({ response: g, type: "response" }));
761
+ e.cId === (g == null ? void 0 : g.header.cId) && (this.removeEventListener("message", h), g.header.code === 1 ? c(g) : a({ response: g, type: "response" }));
762
762
  } catch {
763
763
  a({ response: g, type: "error" });
764
764
  }
@@ -782,49 +782,43 @@ class ti extends Qt {
782
782
  return this.request(
783
783
  s,
784
784
  n
785
- ).then((l) => l.body);
785
+ ).then((c) => c.body);
786
786
  }
787
787
  openGame() {
788
788
  const e = this.buildHeader("OpenGame"), s = {
789
789
  gameCode: this.gameCode
790
790
  };
791
- return new Promise((n, l) => {
791
+ return new Promise((n, c) => {
792
792
  const a = (h) => {
793
793
  const p = Me(h);
794
794
  Xt(p) && (this.removeEventListener("message", a), n(p.body));
795
795
  };
796
796
  this.addEventListener("message", a), this.request(e, s).catch((h) => {
797
- Zt(h.response) && l(h), l(h);
797
+ Zt(h.response) && c(h), c(h);
798
798
  });
799
799
  });
800
800
  }
801
801
  sendAcknowledgement(e) {
802
- const { name: s, cId: n } = e.header, l = this.buildHeader(s, n), a = this.buildPayload(l, {});
802
+ const { name: s, cId: n } = e.header, c = this.buildHeader(s, n), a = this.buildPayload(c, {});
803
803
  this.send(a);
804
804
  }
805
805
  sendAction(e, s) {
806
- const n = this.buildHeader("GameAction"), l = {
806
+ const n = this.buildHeader("GameAction"), c = {
807
807
  ...this.getBodyExtras(e),
808
808
  data: s
809
809
  };
810
810
  return new Promise((a, h) => {
811
811
  const p = (g) => {
812
812
  const f = Me(g);
813
- oe(f) && l.seqId === f.body.correlationSeqId && (this.removeEventListener("message", p), Jt(f) || Yt(f) ? a(f.body) : Kt(f) && h(f.body));
813
+ oe(f) && c.seqId === f.body.correlationSeqId && (this.removeEventListener("message", p), Jt(f) || Yt(f) ? a(f.body) : Kt(f) && h(f.body));
814
814
  };
815
- this.addEventListener("message", p), this.request(n, l).catch(
815
+ this.addEventListener("message", p), this.request(n, c).catch(
816
816
  (g) => {
817
817
  h(g);
818
818
  }
819
819
  );
820
820
  });
821
821
  }
822
- spin(e) {
823
- return this.sendAction("SPIN", e);
824
- }
825
- bgAction(e) {
826
- return this.sendAction("BG_ACTION", e);
827
- }
828
822
  setRequestTimeoutMs(e) {
829
823
  E(this, Z, e);
830
824
  }
@@ -880,7 +874,7 @@ const si = {
880
874
  tur: "tr",
881
875
  ukr: "uk",
882
876
  vie: "vi"
883
- }, ni = U("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
877
+ }, ni = x("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
884
878
  var Ee;
885
879
  class Di extends ii {
886
880
  constructor(...e) {
@@ -925,12 +919,12 @@ class Di extends ii {
925
919
  this.initialize(e), await this.socket.connect(), await this.socket.authenticate(!0), await this.socket.openGame();
926
920
  }
927
921
  async openGame() {
928
- const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), n = e.get("cageCode"), l = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), g = e.get("username"), f = e.get("gameHistoryUrl"), A = e.get("homeUrl") ?? void 0, D = e.get("cashierUrl") ?? void 0;
929
- this.initialize({ apiUrl: s, cageCode: n, gameCode: l, operatorCode: a, playMode: h, token: p, username: g }), await this.socket.connect();
922
+ const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), n = e.get("cageCode"), c = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), g = e.get("username"), f = e.get("gameHistoryUrl"), A = e.get("homeUrl") ?? void 0, D = e.get("cashierUrl") ?? void 0;
923
+ this.initialize({ apiUrl: s, cageCode: n, gameCode: c, operatorCode: a, playMode: h, token: p, username: g }), await this.socket.connect();
930
924
  const B = await this.socket.authenticate(), le = await this.socket.openGame();
931
925
  this.config.api = {
932
926
  brand: n,
933
- game: l,
927
+ game: c,
934
928
  integration: a,
935
929
  jurisdiction: B.jurisdictionCode,
936
930
  playMode: h,
@@ -945,35 +939,34 @@ class Di extends ii {
945
939
  homeUrl: A,
946
940
  cashierUrl: D
947
941
  };
948
- const x = e.get("languageCode");
949
- return x && (this.config.ui.language = x.length === 3 ? si[x] ?? x : x), le;
942
+ const U = e.get("languageCode");
943
+ return U && (this.config.ui.language = U.length === 3 ? si[U] ?? U : U), le;
950
944
  }
951
945
  // TODO: redefine PlayResponse type
952
946
  play(e) {
953
- if ("userInput" in e && e.userInput != null)
954
- return this.socket.bgAction(e);
955
- if ("opaqueGameAttributes" in e && e.opaqueGameAttributes)
956
- return this.socket.spin(e);
957
- if ("bet" in e && e.bet) {
958
- const { bet: s, ...n } = e;
959
- return this.socket.spin({
960
- bet: { baseBet: s.base, betMultiplier: s.multiplier },
961
- ...n
962
- });
963
- }
947
+ const {
948
+ contract: { bet: s, ...n },
949
+ extra: c,
950
+ actionType: a
951
+ } = e;
952
+ return this.socket.sendAction(a, {
953
+ bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
954
+ ...n,
955
+ ...c
956
+ });
964
957
  }
965
958
  registerFromSdkEvents() {
966
959
  this.on("history", () => {
967
960
  const {
968
- api: { game: e, integration: s, integrationData: n, jurisdiction: l, user: a, gameHistoryUrl: h },
961
+ api: { game: e, integration: s, integrationData: n, jurisdiction: c, user: a, gameHistoryUrl: h },
969
962
  ui: { language: p }
970
963
  } = this.config, g = a.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), f = new URL(h);
971
- f.searchParams.set("gameCode", e), f.searchParams.set("jurisdiction", l), f.searchParams.set("operatorCode", s), f.searchParams.set("token", n.token), f.searchParams.set("username", g), f.searchParams.set("languageCode", p), window.open(f.toString(), "_blank");
964
+ f.searchParams.set("gameCode", e), f.searchParams.set("jurisdiction", c), f.searchParams.set("operatorCode", s), f.searchParams.set("token", n.token), f.searchParams.set("username", g), f.searchParams.set("languageCode", p), window.open(f.toString(), "_blank");
972
965
  });
973
966
  }
974
967
  }
975
968
  Ee = new WeakMap();
976
- var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce = "object", Je = "string", fe = "major", c = "model", o = "name", d = "type", u = "vendor", r = "version", M = "architecture", K = "console", m = "mobile", b = "tablet", I = "smarttv", X = "wearable", Ye = "embedded", lt = "user-agent", Ze = 500, it = "brands", q = "formFactor", st = "fullVersionList", J = "platform", nt = "platformVersion", De = "bitness", V = "sec-ch-ua", oi = V + "-full-version-list", ri = V + "-arch", ci = V + "-" + De, di = V + "-form-factor", li = V + "-" + m, ui = V + "-" + c, Ot = V + "-" + J, hi = Ot + "-version", Lt = [it, st, m, c, J, nt, M, q, De], T = "browser", O = "cpu", P = "device", L = "engine", R = "os", Y = "result", Ce = "Amazon", pe = "Apple", ut = "ASUS", ht = "BlackBerry", Ie = "Google", pt = "Huawei", gt = "Lenovo", qe = "LG", xe = "Microsoft", wt = "Motorola", Te = "Samsung", mt = "Sharp", Ae = "Sony", We = "Xiaomi", $e = "Zebra", j = "Mobile ", Q = " Browser", Re = "Chrome", pi = "Edge", ge = "Firefox", we = "Opera", ft = "Facebook", bt = "Sogou", et = "Windows", gi = typeof window !== H, C = gi && window.navigator ? window.navigator : void 0, G = C && C.userAgentData ? C.userAgentData : void 0, wi = function(i, t) {
969
+ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce = "object", Je = "string", fe = "major", d = "model", o = "name", l = "type", u = "vendor", r = "version", M = "architecture", K = "console", m = "mobile", b = "tablet", I = "smarttv", X = "wearable", Ye = "embedded", lt = "user-agent", Ze = 500, it = "brands", q = "formFactor", st = "fullVersionList", J = "platform", nt = "platformVersion", De = "bitness", V = "sec-ch-ua", oi = V + "-full-version-list", ri = V + "-arch", ci = V + "-" + De, di = V + "-form-factor", li = V + "-" + m, ui = V + "-" + d, Ot = V + "-" + J, hi = Ot + "-version", Lt = [it, st, m, d, J, nt, M, q, De], T = "browser", O = "cpu", P = "device", L = "engine", R = "os", Y = "result", Ce = "Amazon", pe = "Apple", ut = "ASUS", ht = "BlackBerry", Ie = "Google", pt = "Huawei", gt = "Lenovo", qe = "LG", Ue = "Microsoft", wt = "Motorola", Te = "Samsung", mt = "Sharp", Ae = "Sony", We = "Xiaomi", $e = "Zebra", j = "Mobile ", Q = " Browser", Re = "Chrome", pi = "Edge", ge = "Firefox", we = "Opera", ft = "Facebook", bt = "Sogou", et = "Windows", gi = typeof window !== H, C = gi && window.navigator ? window.navigator : void 0, G = C && C.userAgentData ? C.userAgentData : void 0, wi = function(i, t) {
977
970
  var e = {};
978
971
  for (var s in i)
979
972
  e[s] = t[s] && t[s].length % 2 === 0 ? t[s].concat(i[s]) : i[s];
@@ -1024,12 +1017,12 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1024
1017
  return i = W(/^\s\s*/, i), typeof t === H ? i : i.substring(0, Ze);
1025
1018
  }, Et = function(i, t) {
1026
1019
  if (!(!i || !t))
1027
- for (var e = 0, s, n, l, a, h, p; e < t.length && !h; ) {
1020
+ for (var e = 0, s, n, c, a, h, p; e < t.length && !h; ) {
1028
1021
  var g = t[e], f = t[e + 1];
1029
1022
  for (s = n = 0; s < g.length && !h && g[s]; )
1030
1023
  if (h = g[s++].exec(i), h)
1031
- for (l = 0; l < f.length; l++)
1032
- p = h[++n], a = f[l], typeof a === ce && a.length > 0 ? a.length === 2 ? typeof a[1] == Ke ? this[a[0]] = a[1].call(this, p) : this[a[0]] = a[1] : a.length === 3 ? typeof a[1] === Ke && !(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;
1024
+ for (c = 0; c < f.length; c++)
1025
+ p = h[++n], a = f[c], typeof a === ce && a.length > 0 ? a.length === 2 ? typeof a[1] == Ke ? this[a[0]] = a[1].call(this, p) : this[a[0]] = a[1] : a.length === 3 ? typeof a[1] === Ke && !(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;
1033
1026
  e += 2;
1034
1027
  }
1035
1028
  }, Oe = function(i, t) {
@@ -1420,45 +1413,45 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1420
1413
  // Samsung
1421
1414
  /\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
1422
1415
  ],
1423
- [c, [u, Te], [d, b]],
1416
+ [d, [u, Te], [l, b]],
1424
1417
  [
1425
1418
  /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
1426
1419
  /samsung[- ]([-\w]+)/i,
1427
1420
  /sec-(sgh\w+)/i
1428
1421
  ],
1429
- [c, [u, Te], [d, m]],
1422
+ [d, [u, Te], [l, m]],
1430
1423
  [
1431
1424
  // Apple
1432
1425
  /(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
1433
1426
  // iPod/iPhone
1434
1427
  ],
1435
- [c, [u, pe], [d, m]],
1428
+ [d, [u, pe], [l, m]],
1436
1429
  [
1437
1430
  /\((ipad);[-\w\),; ]+apple/i,
1438
1431
  // iPad
1439
1432
  /applecoremedia\/[\w\.]+ \((ipad)/i,
1440
1433
  /\b(ipad)\d\d?,\d\d?[;\]].+ios/i
1441
1434
  ],
1442
- [c, [u, pe], [d, b]],
1435
+ [d, [u, pe], [l, b]],
1443
1436
  [
1444
1437
  /(macintosh);/i
1445
1438
  ],
1446
- [c, [u, pe]],
1439
+ [d, [u, pe]],
1447
1440
  [
1448
1441
  // Sharp
1449
1442
  /\b(sh-?[altvz]?\d\d[a-ekm]?)/i
1450
1443
  ],
1451
- [c, [u, mt], [d, m]],
1444
+ [d, [u, mt], [l, m]],
1452
1445
  [
1453
1446
  // Huawei
1454
1447
  /\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
1455
1448
  ],
1456
- [c, [u, pt], [d, b]],
1449
+ [d, [u, pt], [l, b]],
1457
1450
  [
1458
1451
  /(?:huawei|honor)([-\w ]+)[;\)]/i,
1459
1452
  /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
1460
1453
  ],
1461
- [c, [u, pt], [d, m]],
1454
+ [d, [u, pt], [l, m]],
1462
1455
  [
1463
1456
  // Xiaomi
1464
1457
  /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
@@ -1474,92 +1467,92 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1474
1467
  /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
1475
1468
  // Xiaomi Mi
1476
1469
  ],
1477
- [[c, /_/g, " "], [u, We], [d, m]],
1470
+ [[d, /_/g, " "], [u, We], [l, m]],
1478
1471
  [
1479
1472
  /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
1480
1473
  // Redmi Pad
1481
1474
  /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
1482
1475
  // Mi Pad tablets
1483
1476
  ],
1484
- [[c, /_/g, " "], [u, We], [d, b]],
1477
+ [[d, /_/g, " "], [u, We], [l, b]],
1485
1478
  [
1486
1479
  // OPPO
1487
1480
  /; (\w+) bui.+ oppo/i,
1488
1481
  /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
1489
1482
  ],
1490
- [c, [u, "OPPO"], [d, m]],
1483
+ [d, [u, "OPPO"], [l, m]],
1491
1484
  [
1492
1485
  // Vivo
1493
1486
  /vivo (\w+)(?: bui|\))/i,
1494
1487
  /\b(v[12]\d{3}\w?[at])(?: bui|;)/i
1495
1488
  ],
1496
- [c, [u, "Vivo"], [d, m]],
1489
+ [d, [u, "Vivo"], [l, m]],
1497
1490
  [
1498
1491
  // Realme
1499
1492
  /\b(rmx[1-3]\d{3})(?: bui|;|\))/i
1500
1493
  ],
1501
- [c, [u, "Realme"], [d, m]],
1494
+ [d, [u, "Realme"], [l, m]],
1502
1495
  [
1503
1496
  // Motorola
1504
1497
  /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
1505
1498
  /\bmot(?:orola)?[- ](\w*)/i,
1506
1499
  /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
1507
1500
  ],
1508
- [c, [u, wt], [d, m]],
1501
+ [d, [u, wt], [l, m]],
1509
1502
  [
1510
1503
  /\b(mz60\d|xoom[2 ]{0,2}) build\//i
1511
1504
  ],
1512
- [c, [u, wt], [d, b]],
1505
+ [d, [u, wt], [l, b]],
1513
1506
  [
1514
1507
  // LG
1515
1508
  /((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
1516
1509
  ],
1517
- [c, [u, qe], [d, b]],
1510
+ [d, [u, qe], [l, b]],
1518
1511
  [
1519
1512
  /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
1520
1513
  /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
1521
1514
  /\blg-?([\d\w]+) bui/i
1522
1515
  ],
1523
- [c, [u, qe], [d, m]],
1516
+ [d, [u, qe], [l, m]],
1524
1517
  [
1525
1518
  // Lenovo
1526
1519
  /(ideatab[-\w ]+)/i,
1527
1520
  /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
1528
1521
  ],
1529
- [c, [u, gt], [d, b]],
1522
+ [d, [u, gt], [l, b]],
1530
1523
  [
1531
1524
  // Nokia
1532
1525
  /(?:maemo|nokia).*(n900|lumia \d+)/i,
1533
1526
  /nokia[-_ ]?([-\w\.]*)/i
1534
1527
  ],
1535
- [[c, /_/g, " "], [u, "Nokia"], [d, m]],
1528
+ [[d, /_/g, " "], [u, "Nokia"], [l, m]],
1536
1529
  [
1537
1530
  // Google
1538
1531
  /(pixel c)\b/i
1539
1532
  // Google Pixel C
1540
1533
  ],
1541
- [c, [u, Ie], [d, b]],
1534
+ [d, [u, Ie], [l, b]],
1542
1535
  [
1543
1536
  /droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
1544
1537
  // Google Pixel
1545
1538
  ],
1546
- [c, [u, Ie], [d, m]],
1539
+ [d, [u, Ie], [l, m]],
1547
1540
  [
1548
1541
  // Sony
1549
1542
  /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
1550
1543
  ],
1551
- [c, [u, Ae], [d, m]],
1544
+ [d, [u, Ae], [l, m]],
1552
1545
  [
1553
1546
  /sony tablet [ps]/i,
1554
1547
  /\b(?:sony)?sgp\w+(?: bui|\))/i
1555
1548
  ],
1556
- [[c, "Xperia Tablet"], [u, Ae], [d, b]],
1549
+ [[d, "Xperia Tablet"], [u, Ae], [l, b]],
1557
1550
  [
1558
1551
  // OnePlus
1559
1552
  / (kb2005|in20[12]5|be20[12][59])\b/i,
1560
1553
  /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
1561
1554
  ],
1562
- [c, [u, "OnePlus"], [d, m]],
1555
+ [d, [u, "OnePlus"], [l, m]],
1563
1556
  [
1564
1557
  // Amazon
1565
1558
  /(alexa)webm/i,
@@ -1568,39 +1561,39 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1568
1561
  /(kf[a-z]+)( bui|\)).+silk\//i
1569
1562
  // Kindle Fire HD
1570
1563
  ],
1571
- [c, [u, Ce], [d, b]],
1564
+ [d, [u, Ce], [l, b]],
1572
1565
  [
1573
1566
  /((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
1574
1567
  // Fire Phone
1575
1568
  ],
1576
- [[c, /(.+)/g, "Fire Phone $1"], [u, Ce], [d, m]],
1569
+ [[d, /(.+)/g, "Fire Phone $1"], [u, Ce], [l, m]],
1577
1570
  [
1578
1571
  // BlackBerry
1579
1572
  /(playbook);[-\w\),; ]+(rim)/i
1580
1573
  // BlackBerry PlayBook
1581
1574
  ],
1582
- [c, u, [d, b]],
1575
+ [d, u, [l, b]],
1583
1576
  [
1584
1577
  /\b((?:bb[a-f]|st[hv])100-\d)/i,
1585
1578
  /\(bb10; (\w+)/i
1586
1579
  // BlackBerry 10
1587
1580
  ],
1588
- [c, [u, ht], [d, m]],
1581
+ [d, [u, ht], [l, m]],
1589
1582
  [
1590
1583
  // Asus
1591
1584
  /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
1592
1585
  ],
1593
- [c, [u, ut], [d, b]],
1586
+ [d, [u, ut], [l, b]],
1594
1587
  [
1595
1588
  / (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
1596
1589
  ],
1597
- [c, [u, ut], [d, m]],
1590
+ [d, [u, ut], [l, m]],
1598
1591
  [
1599
1592
  // HTC
1600
1593
  /(nexus 9)/i
1601
1594
  // HTC Nexus 9
1602
1595
  ],
1603
- [c, [u, "HTC"], [d, b]],
1596
+ [d, [u, "HTC"], [l, b]],
1604
1597
  [
1605
1598
  /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
1606
1599
  // HTC
@@ -1609,23 +1602,23 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1609
1602
  /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
1610
1603
  // Alcatel/GeeksPhone/Nexian/Panasonic/Sony
1611
1604
  ],
1612
- [u, [c, /_/g, " "], [d, m]],
1605
+ [u, [d, /_/g, " "], [l, m]],
1613
1606
  [
1614
1607
  // Acer
1615
1608
  /droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
1616
1609
  ],
1617
- [c, [u, "Acer"], [d, b]],
1610
+ [d, [u, "Acer"], [l, b]],
1618
1611
  [
1619
1612
  // Meizu
1620
1613
  /droid.+; (m[1-5] note) bui/i,
1621
1614
  /\bmz-([-\w]{2,})/i
1622
1615
  ],
1623
- [c, [u, "Meizu"], [d, m]],
1616
+ [d, [u, "Meizu"], [l, m]],
1624
1617
  [
1625
1618
  // Ulefone
1626
1619
  /; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
1627
1620
  ],
1628
- [c, [u, "Ulefone"], [d, m]],
1621
+ [d, [u, "Ulefone"], [l, m]],
1629
1622
  [
1630
1623
  // MIXED
1631
1624
  /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
@@ -1643,7 +1636,7 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1643
1636
  /(oppo) ?([\w ]+) bui/i
1644
1637
  // OPPO
1645
1638
  ],
1646
- [u, c, [d, m]],
1639
+ [u, d, [l, m]],
1647
1640
  [
1648
1641
  /(kobo)\s(ereader|touch)/i,
1649
1642
  // Kobo
@@ -1654,41 +1647,41 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1654
1647
  /(kindle)\/([\w\.]+)/i
1655
1648
  // Kindle
1656
1649
  ],
1657
- [u, c, [d, b]],
1650
+ [u, d, [l, b]],
1658
1651
  [
1659
1652
  /(surface duo)/i
1660
1653
  // Surface Duo
1661
1654
  ],
1662
- [c, [u, xe], [d, b]],
1655
+ [d, [u, Ue], [l, b]],
1663
1656
  [
1664
1657
  /droid [\d\.]+; (fp\du?)(?: b|\))/i
1665
1658
  // Fairphone
1666
1659
  ],
1667
- [c, [u, "Fairphone"], [d, m]],
1660
+ [d, [u, "Fairphone"], [l, m]],
1668
1661
  [
1669
1662
  /(shield[\w ]+) b/i
1670
1663
  // Nvidia Shield Tablets
1671
1664
  ],
1672
- [c, [u, "Nvidia"], [d, b]],
1665
+ [d, [u, "Nvidia"], [l, b]],
1673
1666
  [
1674
1667
  /(sprint) (\w+)/i
1675
1668
  // Sprint Phones
1676
1669
  ],
1677
- [u, c, [d, m]],
1670
+ [u, d, [l, m]],
1678
1671
  [
1679
1672
  /(kin\.[onetw]{3})/i
1680
1673
  // Microsoft Kin
1681
1674
  ],
1682
- [[c, /\./g, " "], [u, xe], [d, m]],
1675
+ [[d, /\./g, " "], [u, Ue], [l, m]],
1683
1676
  [
1684
1677
  /droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
1685
1678
  // Zebra
1686
1679
  ],
1687
- [c, [u, $e], [d, b]],
1680
+ [d, [u, $e], [l, b]],
1688
1681
  [
1689
1682
  /droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
1690
1683
  ],
1691
- [c, [u, $e], [d, m]],
1684
+ [d, [u, $e], [l, m]],
1692
1685
  [
1693
1686
  ///////////////////
1694
1687
  // SMARTTVS
@@ -1696,64 +1689,64 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1696
1689
  /smart-tv.+(samsung)/i
1697
1690
  // Samsung
1698
1691
  ],
1699
- [u, [d, I]],
1692
+ [u, [l, I]],
1700
1693
  [
1701
1694
  /hbbtv.+maple;(\d+)/i
1702
1695
  ],
1703
- [[c, /^/, "SmartTV"], [u, Te], [d, I]],
1696
+ [[d, /^/, "SmartTV"], [u, Te], [l, I]],
1704
1697
  [
1705
1698
  /(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
1706
1699
  // LG SmartTV
1707
1700
  ],
1708
- [[u, qe], [d, I]],
1701
+ [[u, qe], [l, I]],
1709
1702
  [
1710
1703
  /(apple) ?tv/i
1711
1704
  // Apple TV
1712
1705
  ],
1713
- [u, [c, pe + " TV"], [d, I]],
1706
+ [u, [d, pe + " TV"], [l, I]],
1714
1707
  [
1715
1708
  /crkey/i
1716
1709
  // Google Chromecast
1717
1710
  ],
1718
- [[c, Re + "cast"], [u, Ie], [d, I]],
1711
+ [[d, Re + "cast"], [u, Ie], [l, I]],
1719
1712
  [
1720
1713
  /droid.+aft(\w+)( bui|\))/i
1721
1714
  // Fire TV
1722
1715
  ],
1723
- [c, [u, Ce], [d, I]],
1716
+ [d, [u, Ce], [l, I]],
1724
1717
  [
1725
1718
  /\(dtv[\);].+(aquos)/i,
1726
1719
  /(aquos-tv[\w ]+)\)/i
1727
1720
  // Sharp
1728
1721
  ],
1729
- [c, [u, mt], [d, I]],
1722
+ [d, [u, mt], [l, I]],
1730
1723
  [
1731
1724
  /(bravia[\w ]+)( bui|\))/i
1732
1725
  // Sony
1733
1726
  ],
1734
- [c, [u, Ae], [d, I]],
1727
+ [d, [u, Ae], [l, I]],
1735
1728
  [
1736
1729
  /(mitv-\w{5}) bui/i
1737
1730
  // Xiaomi
1738
1731
  ],
1739
- [c, [u, We], [d, I]],
1732
+ [d, [u, We], [l, I]],
1740
1733
  [
1741
1734
  /Hbbtv.*(technisat) (.*);/i
1742
1735
  // TechniSAT
1743
1736
  ],
1744
- [u, c, [d, I]],
1737
+ [u, d, [l, I]],
1745
1738
  [
1746
1739
  /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
1747
1740
  // Roku
1748
1741
  /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
1749
1742
  // HbbTV devices
1750
1743
  ],
1751
- [[u, be], [c, be], [d, I]],
1744
+ [[u, be], [d, be], [l, I]],
1752
1745
  [
1753
1746
  /\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
1754
1747
  // SmartTV from Unidentified Vendors
1755
1748
  ],
1756
- [[d, I]],
1749
+ [[l, I]],
1757
1750
  [
1758
1751
  ///////////////////
1759
1752
  // CONSOLES
@@ -1763,22 +1756,22 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1763
1756
  /(nintendo) (\w+)/i
1764
1757
  // Nintendo
1765
1758
  ],
1766
- [u, c, [d, K]],
1759
+ [u, d, [l, K]],
1767
1760
  [
1768
1761
  /droid.+; (shield) bui/i
1769
1762
  // Nvidia
1770
1763
  ],
1771
- [c, [u, "Nvidia"], [d, K]],
1764
+ [d, [u, "Nvidia"], [l, K]],
1772
1765
  [
1773
1766
  /(playstation \w+)/i
1774
1767
  // Playstation
1775
1768
  ],
1776
- [c, [u, Ae], [d, K]],
1769
+ [d, [u, Ae], [l, K]],
1777
1770
  [
1778
1771
  /\b(xbox(?: one)?(?!; xbox))[\); ]/i
1779
1772
  // Microsoft Xbox
1780
1773
  ],
1781
- [c, [u, xe], [d, K]],
1774
+ [d, [u, Ue], [l, K]],
1782
1775
  [
1783
1776
  ///////////////////
1784
1777
  // WEARABLES
@@ -1786,26 +1779,26 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1786
1779
  /((pebble))app/i
1787
1780
  // Pebble
1788
1781
  ],
1789
- [u, c, [d, X]],
1782
+ [u, d, [l, X]],
1790
1783
  [
1791
1784
  /(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
1792
1785
  // Apple Watch
1793
1786
  ],
1794
- [c, [u, pe], [d, X]],
1787
+ [d, [u, pe], [l, X]],
1795
1788
  [
1796
1789
  /droid.+; (glass) \d/i
1797
1790
  // Google Glass
1798
1791
  ],
1799
- [c, [u, Ie], [d, X]],
1792
+ [d, [u, Ie], [l, X]],
1800
1793
  [
1801
1794
  /droid.+; (wt63?0{2,3})\)/i
1802
1795
  ],
1803
- [c, [u, $e], [d, X]],
1796
+ [d, [u, $e], [l, X]],
1804
1797
  [
1805
1798
  /(quest( 2| pro)?)/i
1806
1799
  // Oculus Quest
1807
1800
  ],
1808
- [c, [u, ft], [d, X]],
1801
+ [d, [u, ft], [l, X]],
1809
1802
  [
1810
1803
  ///////////////////
1811
1804
  // EMBEDDED
@@ -1813,12 +1806,12 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1813
1806
  /(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
1814
1807
  // Tesla
1815
1808
  ],
1816
- [u, [d, Ye]],
1809
+ [u, [l, Ye]],
1817
1810
  [
1818
1811
  /(aeobc)\b/i
1819
1812
  // Echo Dot
1820
1813
  ],
1821
- [c, [u, Ce], [d, Ye]],
1814
+ [d, [u, Ce], [l, Ye]],
1822
1815
  [
1823
1816
  ////////////////////
1824
1817
  // MIXED (GENERIC)
@@ -1826,27 +1819,27 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
1826
1819
  /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i
1827
1820
  // Android Phones from Unidentified Vendors
1828
1821
  ],
1829
- [c, [d, m]],
1822
+ [d, [l, m]],
1830
1823
  [
1831
1824
  /droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i
1832
1825
  // Android Tablets from Unidentified Vendors
1833
1826
  ],
1834
- [c, [d, b]],
1827
+ [d, [l, b]],
1835
1828
  [
1836
1829
  /\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
1837
1830
  // Unidentifiable Tablet
1838
1831
  ],
1839
- [[d, b]],
1832
+ [[l, b]],
1840
1833
  [
1841
1834
  /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i
1842
1835
  // Unidentifiable Mobile
1843
1836
  ],
1844
- [[d, m]],
1837
+ [[l, m]],
1845
1838
  [
1846
1839
  /(android[-\w\. ]{0,9});.+buil/i
1847
1840
  // Generic Android Device
1848
1841
  ],
1849
- [c, [u, "Generic"]]
1842
+ [d, [u, "Generic"]]
1850
1843
  ],
1851
1844
  engine: [
1852
1845
  [
@@ -2020,7 +2013,7 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
2020
2013
  return _.call(i.init, [
2021
2014
  [T, [o, r, fe]],
2022
2015
  [O, [M]],
2023
- [P, [d, c, u]],
2016
+ [P, [l, d, u]],
2024
2017
  [L, [o, r]],
2025
2018
  [R, [o, r]]
2026
2019
  ]), _.call(i.isIgnore, [
@@ -2033,12 +2026,12 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
2033
2026
  ]), _.call(i.toString, [
2034
2027
  [T, [o, r]],
2035
2028
  [O, [M]],
2036
- [P, [u, c]],
2029
+ [P, [u, d]],
2037
2030
  [L, [o, r]],
2038
2031
  [R, [o, r]]
2039
2032
  ]), i;
2040
2033
  }(), mi = function(i, t) {
2041
- var e = Pe.init[t], s = Pe.isIgnore[t] || 0, n = Pe.isIgnoreRgx[t] || 0, l = Pe.toString[t] || 0;
2034
+ var e = Pe.init[t], s = Pe.isIgnore[t] || 0, n = Pe.isIgnoreRgx[t] || 0, c = Pe.toString[t] || 0;
2042
2035
  function a() {
2043
2036
  _.call(this, e);
2044
2037
  }
@@ -2063,8 +2056,8 @@ var ai = "2.0.0-beta.2", re = "", dt = "?", Ke = "function", H = "undefined", ce
2063
2056
  return p;
2064
2057
  }, a.prototype.toString = function() {
2065
2058
  var h = re;
2066
- for (var p in l)
2067
- typeof this[l[p]] !== H && (h += (h ? " " : re) + this[l[p]]);
2059
+ for (var p in c)
2060
+ typeof this[c[p]] !== H && (h += (h ? " " : re) + this[c[p]]);
2068
2061
  return h || H;
2069
2062
  }), G || (a.prototype.then = function(h) {
2070
2063
  var p = this, g = function() {
@@ -2085,7 +2078,7 @@ function _t(i, t) {
2085
2078
  [it, je(i[V])],
2086
2079
  [st, je(i[oi])],
2087
2080
  [m, /\?1/.test(i[li])],
2088
- [c, me(i[ui])],
2081
+ [d, me(i[ui])],
2089
2082
  [J, me(i[Ot])],
2090
2083
  [nt, me(i[hi])],
2091
2084
  [M, me(i[ri])],
@@ -2099,8 +2092,8 @@ function _t(i, t) {
2099
2092
  function Mt(i, t, e, s) {
2100
2093
  return this.get = function(n) {
2101
2094
  return n ? this.data.hasOwnProperty(n) ? this.data[n] : void 0 : this.data;
2102
- }, this.set = function(n, l) {
2103
- return this.data[n] = l, this;
2095
+ }, this.set = function(n, c) {
2096
+ return this.data[n] = c, this;
2104
2097
  }, this.setCH = function(n) {
2105
2098
  return this.uaCH = n, this;
2106
2099
  }, this.detectFeature = function() {
@@ -2110,22 +2103,22 @@ function Mt(i, t, e, s) {
2110
2103
  C.brave && typeof C.brave.isBrave == Ke && this.set(o, "Brave");
2111
2104
  break;
2112
2105
  case P:
2113
- !this.get(d) && G && G[m] && this.set(d, m), this.get(c) == "Macintosh" && C && typeof C.standalone !== H && C.maxTouchPoints && C.maxTouchPoints > 2 && this.set(c, "iPad").set(d, b);
2106
+ !this.get(l) && G && G[m] && this.set(l, m), this.get(d) == "Macintosh" && C && typeof C.standalone !== H && C.maxTouchPoints && C.maxTouchPoints > 2 && this.set(d, "iPad").set(l, b);
2114
2107
  break;
2115
2108
  case R:
2116
2109
  !this.get(o) && G && G[J] && this.set(o, G[J]);
2117
2110
  break;
2118
2111
  case Y:
2119
- var n = this.data, l = function(a) {
2112
+ var n = this.data, c = function(a) {
2120
2113
  return n[a].getItem().detectFeature().get();
2121
2114
  };
2122
- this.set(T, l(T)).set(O, l(O)).set(P, l(P)).set(L, l(L)).set(R, l(R));
2115
+ this.set(T, c(T)).set(O, c(O)).set(P, c(P)).set(L, c(L)).set(R, c(R));
2123
2116
  }
2124
2117
  return this;
2125
2118
  }, this.parseUA = function() {
2126
2119
  return this.itemType != Y && Et.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(fe, Qe(this.get(r))), this;
2127
2120
  }, this.parseCH = function() {
2128
- var n = this.uaCH, l = this.rgxMap;
2121
+ var n = this.uaCH, c = this.rgxMap;
2129
2122
  switch (this.itemType) {
2130
2123
  case T:
2131
2124
  var a = n[st] || n[it], h;
@@ -2137,26 +2130,26 @@ function Mt(i, t, e, s) {
2137
2130
  break;
2138
2131
  case O:
2139
2132
  var A = n[M];
2140
- A && (A && n[De] == "64" && (A += "64"), Et.call(this.data, A + ";", l));
2133
+ A && (A && n[De] == "64" && (A += "64"), Et.call(this.data, A + ";", c));
2141
2134
  break;
2142
2135
  case P:
2143
- if (n[m] && this.set(d, m), n[c] && this.set(c, n[c]), n[c] == "Xbox" && this.set(d, K).set(u, xe), n[q]) {
2136
+ if (n[m] && this.set(l, m), n[d] && this.set(d, n[d]), n[d] == "Xbox" && this.set(l, K).set(u, Ue), n[q]) {
2144
2137
  var D;
2145
2138
  if (typeof n[q] != "string")
2146
2139
  for (var B = 0; !D && B < n[q].length; )
2147
2140
  D = Oe(n[q][B++], kt);
2148
2141
  else
2149
2142
  D = Oe(n[q], kt);
2150
- this.set(d, D);
2143
+ this.set(l, D);
2151
2144
  }
2152
2145
  break;
2153
2146
  case R:
2154
2147
  var le = n[J];
2155
2148
  if (le) {
2156
- var x = n[nt];
2157
- le == et && (x = parseInt(Qe(x), 10) >= 13 ? "11" : "10"), this.set(o, le).set(r, x);
2149
+ var U = n[nt];
2150
+ le == et && (U = parseInt(Qe(U), 10) >= 13 ? "11" : "10"), this.set(o, le).set(r, U);
2158
2151
  }
2159
- this.get(o) == et && n[c] == "Xbox" && this.set(o, "Xbox").set(r, void 0);
2152
+ this.get(o) == et && n[d] == "Xbox" && this.set(o, "Xbox").set(r, void 0);
2160
2153
  break;
2161
2154
  case Y:
2162
2155
  var Dt = this.data, ue = function(Bt) {
@@ -2185,11 +2178,11 @@ function F(i, t, e) {
2185
2178
  re
2186
2179
  )
2187
2180
  )
2188
- ), n = new _t(e, !0), l = t ? wi(St, t) : St, a = function(h) {
2181
+ ), n = new _t(e, !0), c = t ? wi(St, t) : St, a = function(h) {
2189
2182
  return h == Y ? function() {
2190
- return new Mt(h, s, l, n).set("ua", s).set(T, this.getBrowser()).set(O, this.getCPU()).set(P, this.getDevice()).set(L, this.getEngine()).set(R, this.getOS()).get();
2183
+ return new Mt(h, s, c, n).set("ua", s).set(T, this.getBrowser()).set(O, this.getCPU()).set(P, this.getDevice()).set(L, this.getEngine()).set(R, this.getOS()).get();
2191
2184
  } : function() {
2192
- return new Mt(h, s, l[h], n).parseUA().get();
2185
+ return new Mt(h, s, c[h], n).parseUA().get();
2193
2186
  };
2194
2187
  };
2195
2188
  return _.call(this, [
@@ -2210,7 +2203,7 @@ function F(i, t, e) {
2210
2203
  F.VERSION = ai;
2211
2204
  F.BROWSER = Be([o, r, fe]);
2212
2205
  F.CPU = Be([M]);
2213
- F.DEVICE = Be([c, u, d, K, m, I, b, X, Ye]);
2206
+ F.DEVICE = Be([d, u, l, K, m, I, b, X, Ye]);
2214
2207
  F.ENGINE = F.OS = Be([o, r]);
2215
2208
  class fi {
2216
2209
  constructor(t, e) {
@@ -2232,7 +2225,7 @@ function Ct(i) {
2232
2225
  return i.reduce((t, e) => t + e, 0);
2233
2226
  }
2234
2227
  function bi(i) {
2235
- const t = i.length, e = Ct(i) / t, s = i.map((l) => Math.pow(l - e, 2)), n = Ct(s) / t;
2228
+ const t = i.length, e = Ct(i) / t, s = i.map((c) => Math.pow(c - e, 2)), n = Ct(s) / t;
2236
2229
  return Math.sqrt(n);
2237
2230
  }
2238
2231
  class It {
@@ -2243,11 +2236,11 @@ class It {
2243
2236
  w(this, "frames", []);
2244
2237
  w(this, "calculateFPS", () => {
2245
2238
  const t = Math.floor((this.stopTime - this.startTime) / 1e3);
2246
- return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, n, l) => (l[n] !== l[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2239
+ return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, n, c) => (c[n] !== c[n - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
2247
2240
  });
2248
2241
  w(this, "getReport", () => {
2249
- const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, l = t.length > 0 ? bi(t) : 0;
2250
- return { fpsAvg: e, fpsMax: s, fpsMin: n, fpsStdDev: l };
2242
+ const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, n = t.length > 0 ? Math.min(...t) : e, c = t.length > 0 ? bi(t) : 0;
2243
+ return { fpsAvg: e, fpsMax: s, fpsMin: n, fpsStdDev: c };
2251
2244
  });
2252
2245
  w(this, "start", () => {
2253
2246
  this.startTime = Date.now(), this.trackFrames();
@@ -2345,13 +2338,13 @@ class Bi extends fi {
2345
2338
  // testVariants: '',
2346
2339
  }), this.track("Game Open", y(this, te));
2347
2340
  }), this.on("playCycleEnd", async (e) => {
2348
- const s = await y(this, ie), { baseBet: n, betMultiplier: l, specialAction: a } = e.data.gameState.lastPlacedMainGameBet ?? {}, h = e.balance, p = e.data.gameState.totalBetFromCurrentGameCycle, g = e.data.gameState.totalWinFromCurrentGameCycle, f = g - p, A = a || "spin", D = e.data.gameState.cycleId;
2341
+ const s = await y(this, ie), { baseBet: n, betMultiplier: c, specialAction: a } = e.data.gameState.lastPlacedMainGameBet ?? {}, h = e.balance, p = e.data.gameState.totalBetFromCurrentGameCycle, g = e.data.gameState.totalWinFromCurrentGameCycle, f = g - p, A = a || "spin", D = e.data.gameState.cycleId;
2349
2342
  this.track("Betting Activity", {
2350
2343
  balance: h - f,
2351
2344
  balanceAfter: h,
2352
2345
  baseBet: n,
2353
2346
  // baseBetIndex,
2354
- betMultiplier: l,
2347
+ betMultiplier: c,
2355
2348
  betType: A,
2356
2349
  gameVersion: y(this, ee),
2357
2350
  coinValueInCents: this.config.api.coinValueInCents,
@@ -2391,8 +2384,8 @@ class Bi extends fi {
2391
2384
  reportFpsSample() {
2392
2385
  const e = new It(), s = () => {
2393
2386
  e.stop();
2394
- const l = e.getReport();
2395
- this.track("FPS Performance", { ...l, fpsType: "sample" }), n();
2387
+ const c = e.getReport();
2388
+ this.track("FPS Performance", { ...c, fpsType: "sample" }), n();
2396
2389
  }, n = async () => {
2397
2390
  e.start(), setTimeout(s, this.FPS_SAMPLE_INTERVAL);
2398
2391
  };
@@ -2416,10 +2409,10 @@ class Bi extends fi {
2416
2409
  }
2417
2410
  async deviceInfo() {
2418
2411
  var p;
2419
- const e = new F(navigator.userAgent), s = vi(), n = await ki(), l = e.getBrowser(), a = e.getDevice(), h = e.getOS();
2412
+ const e = new F(navigator.userAgent), s = vi(), n = await ki(), c = e.getBrowser(), a = e.getDevice(), h = e.getOS();
2420
2413
  return {
2421
- browserName: l.name,
2422
- browserVersion: l.version,
2414
+ browserName: c.name,
2415
+ browserVersion: c.version,
2423
2416
  connection: (p = navigator.connection) == null ? void 0 : p.effectiveType,
2424
2417
  deviceName: a.model,
2425
2418
  deviceType: a.type,
@@ -2442,12 +2435,12 @@ class Bi extends fi {
2442
2435
  }
2443
2436
  }
2444
2437
  Le = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), ve = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap();
2445
- let Ue;
2438
+ let xe;
2446
2439
  const Si = new Uint8Array(16);
2447
2440
  function Mi() {
2448
- if (!Ue && (Ue = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ue))
2441
+ if (!xe && (xe = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !xe))
2449
2442
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2450
- return Ue(Si);
2443
+ return xe(Si);
2451
2444
  }
2452
2445
  const S = [];
2453
2446
  for (let i = 0; i < 256; ++i)
@@ -2538,7 +2531,7 @@ class Gi extends Ft {
2538
2531
  }
2539
2532
  }
2540
2533
  se = new WeakMap(), ne = new WeakMap(), ae = new WeakMap(), N = new WeakMap(), Se = new WeakMap();
2541
- const Ti = U("LoggingTracker", "color:#000000;font-weight:bold;");
2534
+ const Ti = x("LoggingTracker", "color:#000000;font-weight:bold;");
2542
2535
  class Ni extends Ft {
2543
2536
  track(t, e) {
2544
2537
  Ti(`@${this.config.api.user}`, `[${t}]`, e);
@@ -2547,8 +2540,8 @@ class Ni extends Ft {
2547
2540
  export {
2548
2541
  Pi as BasicPlugin,
2549
2542
  $ as CasinoPlugin,
2550
- Ui as DebuggingPlugin,
2551
- xi as GigPlugin,
2543
+ xi as DebuggingPlugin,
2544
+ Ui as GigPlugin,
2552
2545
  Di as KalambaBullseyePlugin,
2553
2546
  Bi as KalambaStargazerPlugin,
2554
2547
  Gi as KalambaStargazerTracker,