@everymatrix/mini-games-hub 0.1.11 → 0.1.12

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.
Files changed (38) hide show
  1. package/components/{MiniGamesHub-DhyHje6i.js → MiniGamesHub-4Wuwyw8q.js} +38 -33
  2. package/components/MiniGamesHub-C2510DM7.cjs +94 -0
  3. package/components/{MiniGamesHub-CyrBtxoA.js → MiniGamesHub-C3xyZRdn.js} +2 -2
  4. package/components/MiniGamesHub-CQIi4Jso.js +1399 -0
  5. package/components/{MiniGamesHub-A_QU55Ox.js → MiniGamesHub-CSZ3An74.js} +50 -45
  6. package/components/MiniGamesHub-CuvJDQTm.js +1379 -0
  7. package/components/{MiniGamesHub-Bbot9Iek.js → MiniGamesHub-DFNKphI6.js} +2 -2
  8. package/components/{MiniGamesHub-IU3nBLWZ.cjs → MiniGamesHub-DeVy4J4_.cjs} +2 -2
  9. package/components/MiniGamesHub-Du6B-YVK.cjs +94 -0
  10. package/components/{WheelOfFortune-C3QPcM9_.js → WheelOfFortune-BV0VEpvD.js} +143 -124
  11. package/components/{WheelOfFortune-Dq5uFse9.cjs → WheelOfFortune-BWKtsKH4.cjs} +6 -5
  12. package/components/{WheelOfFortune-DIKqqSN0.js → WheelOfFortune-B_ZNJW34.js} +190 -168
  13. package/components/{WheelOfFortune-DszXhJZX.cjs → WheelOfFortune-DgJ0luD8.cjs} +2 -2
  14. package/components/{WheelOfFortune-DkHRFbuq.js → WheelOfFortune-Dr-yB2xY.js} +89 -78
  15. package/components/{WheelOfFortune-BY3MYTwt.js → WheelOfFortune-p9qTycTU.js} +47 -39
  16. package/es2015/mini-games-hub.cjs +1 -1
  17. package/es2015/mini-games-hub.js +1 -1
  18. package/esnext/mini-games-hub.js +1 -1
  19. package/package.json +1 -1
  20. package/components/GameCard-B5IhlV0M.js +0 -56
  21. package/components/GameCard-Ct6vyiQG.cjs +0 -3
  22. package/components/GameCard-uj5ulL7F.js +0 -56
  23. package/components/MiniGamesHub-D7WWtj1H.cjs +0 -94
  24. package/components/WheelOfFortuneDrawResults-BLYsEy7G.cjs +0 -1
  25. package/components/WheelOfFortuneDrawResults-BOTcT7OI.js +0 -259
  26. package/components/WheelOfFortuneDrawResults-CL3AjYJb.js +0 -284
  27. package/components/WheelOfFortuneHistory-BbRdBjji.js +0 -232
  28. package/components/WheelOfFortuneHistory-CupBnftz.js +0 -232
  29. package/components/WheelOfFortuneHistory-D0a33HzR.cjs +0 -13
  30. package/components/WheelOfFortuneRules-CIeBfSfY.js +0 -128
  31. package/components/WheelOfFortuneRules-CkNKWZhj.js +0 -117
  32. package/components/WheelOfFortuneRules-DHwDQaVu.cjs +0 -5
  33. package/components/WheelOfFortuneWheel-B6_1ieZG.js +0 -1875
  34. package/components/WheelOfFortuneWheel-BHsFZqlw.cjs +0 -3
  35. package/components/WheelOfFortuneWheel-EAdiCZNZ.js +0 -1945
  36. package/components/utils-B7DHb9g0.cjs +0 -3
  37. package/components/utils-B7FniaI2.js +0 -6043
  38. package/components/utils-CSOcFUAz.js +0 -5995
@@ -14,10 +14,10 @@ var K = (n, r, e) => new Promise((t, i) => {
14
14
  }, l = (u) => u.done ? t(u.value) : Promise.resolve(u.value).then(o, a);
15
15
  l((e = e.apply(n, r)).next());
16
16
  });
17
- import { b4 as Je, P as Ye, aK as W, ax as Ke, F as Ze, aP as Xe, aB as k, A as Qe, X as g, ap as p, b5 as $e, aR as C, aL as pe, aU as A, aM as he, ac as ge, aV as fe, aN as er, aO as rr } from "./utils-B7FniaI2.js";
18
- import { a as nr, p as T, v as tr, w as me, x as ve, o as ir, i as be, b as O, f as L, c as or, h as ar, e as sr, g as lr, s as Z } from "./WheelOfFortuneWheel-EAdiCZNZ.js";
19
- import { W as ye } from "./WheelOfFortune-DIKqqSN0.js";
20
- import { G as ur } from "./GameCard-B5IhlV0M.js";
17
+ import { b6 as Je, S as Ye, aM as W, az as Ke, I as Ze, aR as Xe, aD as k, D as Qe, Z as g, ar as p, b7 as $e, aT as C, aN as pe, aW as D, aO as he, ae as ge, aX as fe, aP as er, aQ as rr } from "./utils-C7uxZXaZ.js";
18
+ import { a as nr, p as T, v as tr, w as me, x as ve, o as ir, i as be, b as O, f as L, c as or, h as ar, e as sr, g as lr, s as Z } from "./WheelOfFortuneWheel-D2fKZ64n.js";
19
+ import { W as ye } from "./WheelOfFortune-Dr-yB2xY.js";
20
+ import { G as ur } from "./GameCard-ohf1jOQF.js";
21
21
  const we = {
22
22
  en: {
23
23
  noContent: "You don't have any lottery programs available now.",
@@ -42,7 +42,7 @@ const we = {
42
42
  prizeChallenge: "Challenge",
43
43
  prizeCustom: "Custom Prize",
44
44
  congratulations: "Congratulations!",
45
- success: "You won a <span>{prize}</span>!",
45
+ success: "{form, select, singular {You won a <span>{prize}</span>!} other {You won <span>{prize}</span>!}}",
46
46
  noPrizeTitle: "Not This Time!",
47
47
  noPrize: "Don't Worry! Your turn might come next. Try Again!",
48
48
  noWin: "No Win",
@@ -128,7 +128,7 @@ const we = {
128
128
  prizeChallenge: "Udfordring",
129
129
  prizeCustom: "Specialpræmie",
130
130
  congratulations: "Tillykke!",
131
- success: "Du vandt en <span>{prize}</span>!",
131
+ success: "{form, select, singular {Du vandt en <span>{prize}</span>!} other {Du vandt <span>{prize}</span>!}}",
132
132
  noPrizeTitle: "Ikke Denne Gang!",
133
133
  noPrize: "Bare rolig! Din tur kommer måske næste gang. Prøv igen!",
134
134
  noWin: "Ingen Gevinst",
@@ -214,7 +214,7 @@ const we = {
214
214
  prizeChallenge: "Herausforderung",
215
215
  prizeCustom: "Sonderpreis",
216
216
  congratulations: "Herzlichen Glückwunsch!",
217
- success: "Du hast einen <span>{prize}</span> gewonnen!",
217
+ success: "{form, select, singular {Du hast einen <span>{prize}</span> gewonnen!} other {Du hast <span>{prize}</span> gewonnen!}}",
218
218
  noPrizeTitle: "Diesmal Nicht!",
219
219
  noPrize: "Keine Sorge! Du bist vielleicht beim nächsten Mal dran. Versuch es noch einmal!",
220
220
  noWin: "Kein Gewinn",
@@ -300,7 +300,7 @@ const we = {
300
300
  prizeChallenge: "Uitdaging",
301
301
  prizeCustom: "Aangepaste Prijs",
302
302
  congratulations: "Gefeliciteerd!",
303
- success: "Je hebt een <span>{prize}</span> gewonnen!",
303
+ success: "{form, select, singular {Je hebt een <span>{prize}</span> gewonnen!} other {Je hebt <span>{prize}</span> gewonnen!}}",
304
304
  noPrizeTitle: "Deze Keer Niet!",
305
305
  noPrize: "Geen zorgen! Jouw beurt komt misschien de volgende keer. Probeer het opnieuw!",
306
306
  noWin: "Geen Winst",
@@ -386,7 +386,7 @@ const we = {
386
386
  prizeChallenge: "Défi",
387
387
  prizeCustom: "Prix Personnalisé",
388
388
  congratulations: "Félicitations !",
389
- success: "Vous avez gagné un <span>{prize}</span> !",
389
+ success: "{form, select, singular {Vous avez gagné un <span>{prize}</span> !} other {Vous avez gagné des <span>{prize}</span> !}}",
390
390
  noPrizeTitle: "Pas Cette Fois !",
391
391
  noPrize: "Ne vous inquiétez pas ! Votre tour viendra peut-être la prochaine fois. Réessayez !",
392
392
  noWin: "Aucun Gain",
@@ -472,7 +472,7 @@ const we = {
472
472
  prizeChallenge: "Meydan Okuma",
473
473
  prizeCustom: "Özel Ödül",
474
474
  congratulations: "Tebrikler!",
475
- success: "<span>{prize}</span> kazandınız!",
475
+ success: "{form, select, other {<span>{prize}</span> kazandınız!}}",
476
476
  noPrizeTitle: "Bu Sefer Olmadı!",
477
477
  noPrize: "Endişelenmeyin! Sıra bir dahaki sefere sizde olabilir. Tekrar deneyin!",
478
478
  noWin: "Kazanma Yok",
@@ -557,7 +557,7 @@ var Q = function(n, r) {
557
557
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
558
558
  }, Q(n, r);
559
559
  };
560
- function B(n, r) {
560
+ function M(n, r) {
561
561
  if (typeof r != "function" && r !== null)
562
562
  throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
563
563
  Q(n, r);
@@ -710,8 +710,8 @@ var F = function() {
710
710
  var r = new n();
711
711
  return r.closed = !0, r;
712
712
  }(), n;
713
- }(), Ae = F.EMPTY;
714
- function De(n) {
713
+ }(), De = F.EMPTY;
714
+ function Ae(n) {
715
715
  return n instanceof F || n && "closed" in n && z(n.remove) && z(n.add) && z(n.unsubscribe);
716
716
  }
717
717
  function Se(n) {
@@ -741,10 +741,10 @@ function G(n) {
741
741
  n();
742
742
  }
743
743
  var qe = function(n) {
744
- B(r, n);
744
+ M(r, n);
745
745
  function r(e) {
746
746
  var t = n.call(this) || this;
747
- return t.isStopped = !1, e ? (t.destination = e, De(e) && e.add(t)) : t.destination = fr, t;
747
+ return t.isStopped = !1, e ? (t.destination = e, Ae(e) && e.add(t)) : t.destination = fr, t;
748
748
  }
749
749
  return r.create = function(e, t, i) {
750
750
  return new te(e, t, i);
@@ -803,7 +803,7 @@ var qe = function(n) {
803
803
  }
804
804
  }, n;
805
805
  }(), te = function(n) {
806
- B(r, n);
806
+ M(r, n);
807
807
  function r(e, t, i) {
808
808
  var o = n.call(this) || this, a;
809
809
  return z(e) || !e ? a = {
@@ -906,14 +906,14 @@ function yr(n) {
906
906
  return n && z(n.next) && z(n.error) && z(n.complete);
907
907
  }
908
908
  function wr(n) {
909
- return n && n instanceof qe || yr(n) && De(n);
909
+ return n && n instanceof qe || yr(n) && Ae(n);
910
910
  }
911
911
  var Sr = Pe(function(n) {
912
912
  return function() {
913
913
  n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
914
914
  };
915
915
  }), Re = function(n) {
916
- B(r, n);
916
+ M(r, n);
917
917
  function r() {
918
918
  var e = n.call(this) || this;
919
919
  return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
@@ -979,7 +979,7 @@ var Sr = Pe(function(n) {
979
979
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
980
980
  }, r.prototype._innerSubscribe = function(e) {
981
981
  var t = this, i = this, o = i.hasError, a = i.isStopped, l = i.observers;
982
- return o || a ? Ae : (this.currentObservers = null, l.push(e), new F(function() {
982
+ return o || a ? De : (this.currentObservers = null, l.push(e), new F(function() {
983
983
  t.currentObservers = null, ne(l, e);
984
984
  }));
985
985
  }, r.prototype._checkFinalizedStatuses = function(e) {
@@ -992,7 +992,7 @@ var Sr = Pe(function(n) {
992
992
  return new xe(e, t);
993
993
  }, r;
994
994
  }(Te), xe = function(n) {
995
- B(r, n);
995
+ M(r, n);
996
996
  function r(e, t) {
997
997
  var i = n.call(this) || this;
998
998
  return i.destination = e, i.source = t, i;
@@ -1008,7 +1008,7 @@ var Sr = Pe(function(n) {
1008
1008
  (t = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || t === void 0 || t.call(e);
1009
1009
  }, r.prototype._subscribe = function(e) {
1010
1010
  var t, i;
1011
- return (i = (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e)) !== null && i !== void 0 ? i : Ae;
1011
+ return (i = (t = this.source) === null || t === void 0 ? void 0 : t.subscribe(e)) !== null && i !== void 0 ? i : De;
1012
1012
  }, r;
1013
1013
  }(Re), We = {
1014
1014
  now: function() {
@@ -1016,7 +1016,7 @@ var Sr = Pe(function(n) {
1016
1016
  },
1017
1017
  delegate: void 0
1018
1018
  }, kr = function(n) {
1019
- B(r, n);
1019
+ M(r, n);
1020
1020
  function r(e, t, i) {
1021
1021
  e === void 0 && (e = 1 / 0), t === void 0 && (t = 1 / 0), i === void 0 && (i = We);
1022
1022
  var o = n.call(this) || this;
@@ -1131,7 +1131,7 @@ const Pr = {
1131
1131
  }
1132
1132
  */`
1133
1133
  };
1134
- function Ar(n, r) {
1134
+ function Dr(n, r) {
1135
1135
  var le, ue;
1136
1136
  Qe(r, !0), nr(n, Pr);
1137
1137
  const e = () => er(rr, "$_", t), [t, i] = Xe(), o = T(r, "endpoint", 7), a = T(r, "session", 7), l = T(r, "requiresOptin", 7, !1), u = T(r, "language", 7, "en"), h = T(r, "outerWheelAsset", 7, null), v = T(r, "wheelButtonAsset", 7, null), j = T(r, "backgroundVideoAsset", 7, null), x = T(r, "liteMode", 7, !1), S = T(r, "translationurl", 7), H = /iPhone|iPad|iPod/.test(navigator.userAgent), m = (le = navigator.deviceMemory) != null ? le : 1 / 0, Ce = (ue = navigator.hardwareConcurrency) != null ? ue : 1 / 0;
@@ -1149,7 +1149,7 @@ function Ar(n, r) {
1149
1149
  }
1150
1150
  const Oe = !H && (m <= 4 || Ce <= 4 || Ee()), ie = fe(() => x() || Oe);
1151
1151
  tr({ withLocale: "en", translations: {} });
1152
- const Be = () => {
1152
+ const Me = () => {
1153
1153
  let s = new URL(S());
1154
1154
  fetch(s.href).then((c) => c.json()).then((c) => {
1155
1155
  Object.keys(c).forEach((y) => {
@@ -1162,27 +1162,27 @@ function Ar(n, r) {
1162
1162
  Object.keys(we).forEach((s) => {
1163
1163
  me(s, we[s]);
1164
1164
  }), ve(u());
1165
- const Me = () => {
1165
+ const Be = () => {
1166
1166
  ve(u());
1167
1167
  };
1168
1168
  Je(() => {
1169
- S() && Be();
1169
+ S() && Me();
1170
1170
  }), Ye(() => {
1171
- Me();
1171
+ Be();
1172
1172
  });
1173
- let _ = W(!1), b = W(Ke([])), oe = W(!1), I = W(!1), D = W(null), ae = W(!1);
1173
+ let _ = W(!1), b = W(Ke([])), oe = W(!1), I = W(!1), A = W(null), ae = W(!1);
1174
1174
  const Ne = () => K(this, null, function* () {
1175
1175
  p(_, !0);
1176
1176
  const s = new URL(`${o()}/v1/wof/claimable`), c = new Headers();
1177
1177
  a() && c.append("X-SessionId", a());
1178
1178
  const y = { method: "GET", headers: c, cache: "no-store" };
1179
1179
  s.searchParams.append("filter", "wheelOfFortune"), fetch(s, y).then((d) => d.json()).then((d) => {
1180
- var P, q, M, f;
1180
+ var P, q, B, f;
1181
1181
  if (d && ((P = d.errorMessage) == null ? void 0 : P.trim()) === "InvalidSessionId") {
1182
1182
  p(I, !0), p(_, !1);
1183
1183
  return;
1184
1184
  }
1185
- if ((M = (q = d == null ? void 0 : d.items) == null ? void 0 : q.program) != null && M.canClaim) {
1185
+ if ((B = (q = d == null ? void 0 : d.items) == null ? void 0 : q.program) != null && B.canClaim) {
1186
1186
  p(b, (f = d == null ? void 0 : d.items) == null ? void 0 : f.program, !0), p(_, !1);
1187
1187
  return;
1188
1188
  }
@@ -1201,7 +1201,7 @@ function Ar(n, r) {
1201
1201
  p(I, !0), p(_, !1);
1202
1202
  return;
1203
1203
  }
1204
- p(b, d == null ? void 0 : d.items.map((q) => $e(q, u())), !0), g(b).length === 1 && (p(D, g(b)[0], !0), p(ae, !0)), g(b).length === 0 && window.postMessage({ type: "event_wof_no_programs" }, window.location.href);
1204
+ p(b, d == null ? void 0 : d.items.map((q) => $e(q, u())), !0), g(b).length === 1 && (p(A, g(b)[0], !0), p(ae, !0)), g(b).length === 0 && window.postMessage({ type: "event_wof_no_programs" }, window.location.href);
1205
1205
  }).catch((d) => {
1206
1206
  console.log(d), p(oe, !0);
1207
1207
  }).finally(() => p(_, !1));
@@ -1209,17 +1209,22 @@ function Ar(n, r) {
1209
1209
  if (s.data)
1210
1210
  switch (s.data.type) {
1211
1211
  case "PlayMiniGame":
1212
- p(D, g(b).find((c) => c.id === s.data.programId), !0);
1212
+ p(A, g(b).find((c) => c.id === s.data.programId), !0);
1213
1213
  break;
1214
1214
  case "CloseMiniGame":
1215
- p(D, null);
1215
+ p(A, null);
1216
1216
  break;
1217
1217
  case "PrizeGameRemainingTimesUpdated":
1218
- p(D, s.data.data, !0), p(b, g(b).map((c) => c.id === s.data.data.id ? s.data.data : c), !0);
1218
+ p(A, s.data.data, !0), p(b, g(b).map((c) => c.id === s.data.data.id ? s.data.data : c), !0);
1219
1219
  break;
1220
1220
  }
1221
1221
  };
1222
- ir(() => (a() && (l() ? Ne() : Ge()), window.postMessage({ type: "event_hub_accessed", isLoggedIn: !!a() }, window.location.href), window.addEventListener("message", se), () => {
1222
+ ir(() => (setTimeout(
1223
+ () => {
1224
+ window.postMessage({ type: "event_hub_accessed", isLoggedIn: !!a() }, window.location.href);
1225
+ },
1226
+ 0
1227
+ ), a() && (l() ? Ne() : Ge()), window.addEventListener("message", se), () => {
1223
1228
  window.removeEventListener("message", se);
1224
1229
  }));
1225
1230
  var Le = {
@@ -1308,7 +1313,7 @@ function Ar(n, r) {
1308
1313
  let w = fe(() => !g(ae));
1309
1314
  ye(f, {
1310
1315
  get program() {
1311
- return g(D);
1316
+ return g(A);
1312
1317
  },
1313
1318
  get endpoint() {
1314
1319
  return o();
@@ -1338,9 +1343,9 @@ function Ar(n, r) {
1338
1343
  }
1339
1344
  }, q = (f) => {
1340
1345
  var w = xr(), R = pe(w), E = C(R), U = C(E, !0);
1341
- A(E);
1346
+ D(E);
1342
1347
  var de = he(E, 2), Ue = C(de, !0);
1343
- A(de), A(R);
1348
+ D(de), D(R);
1344
1349
  var ce = he(R, 2);
1345
1350
  sr(ce, 21, () => g(b), lr, (J, Y) => {
1346
1351
  ur(J, {
@@ -1348,19 +1353,19 @@ function Ar(n, r) {
1348
1353
  return g(Y);
1349
1354
  }
1350
1355
  });
1351
- }), A(ce), ge(
1356
+ }), D(ce), ge(
1352
1357
  (J, Y) => {
1353
1358
  Z(U, J), Z(Ue, Y);
1354
1359
  },
1355
1360
  [() => e()("hubTitle"), () => e()("hubSubtitle")]
1356
1361
  ), O(f, w);
1357
- }, M = (f) => {
1362
+ }, B = (f) => {
1358
1363
  var w = _r(), R = C(w), E = C(R, !0);
1359
- A(R), A(w), ge((U) => Z(E, U), [() => e()("noContent")]), O(f, w);
1364
+ D(R), D(w), ge((U) => Z(E, U), [() => e()("noContent")]), O(f, w);
1360
1365
  };
1361
1366
  be(y, (f) => {
1362
1367
  var w;
1363
- !a() || g(I) ? f(d) : g(D) ? f(P, 1) : ((w = g(b)) == null ? void 0 : w.length) > 1 ? f(q, 2) : f(M, -1);
1368
+ !a() || g(I) ? f(d) : g(A) ? f(P, 1) : ((w = g(b)) == null ? void 0 : w.length) > 1 ? f(q, 2) : f(B, -1);
1364
1369
  });
1365
1370
  }
1366
1371
  O(s, c);
@@ -1369,12 +1374,12 @@ function Ar(n, r) {
1369
1374
  g(_) ? s(He) : s(Ie, -1);
1370
1375
  });
1371
1376
  }
1372
- A(V), O(n, V);
1377
+ D(V), O(n, V);
1373
1378
  var Ve = Ze(Le);
1374
1379
  return i(), Ve;
1375
1380
  }
1376
1381
  customElements.define("mini-games-hub", or(
1377
- Ar,
1382
+ Dr,
1378
1383
  {
1379
1384
  endpoint: { attribute: "endpoint", type: "String" },
1380
1385
  session: { attribute: "session", type: "String" },
@@ -1390,5 +1395,5 @@ customElements.define("mini-games-hub", or(
1390
1395
  []
1391
1396
  ));
1392
1397
  export {
1393
- Ar as default
1398
+ Dr as default
1394
1399
  };