@everymatrix/casino-tournament-banner 1.37.3 → 1.37.5

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.
@@ -2,10 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-3a4744d8.js');
5
+ const index = require('./index-6fc9425f.js');
6
+ require('@everymatrix/casino-tournament-buttons');
6
7
 
7
- const DEFAULT_LANGUAGE$1 = 'en';
8
- const TRANSLATIONS$1 = {
8
+ const DEFAULT_LANGUAGE = 'en';
9
+ const TRANSLATIONS = {
9
10
  en: {
10
11
  joined: 'Joined',
11
12
  join: 'Join',
@@ -391,15 +392,15 @@ const TRANSLATIONS$1 = {
391
392
  days: 'dani',
392
393
  }
393
394
  };
394
- const translate$1 = (key, customLang) => {
395
+ const translate = (key, customLang) => {
395
396
  var _a, _b;
396
397
  const lang = customLang;
397
- return ((_a = TRANSLATIONS$1[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS$1[DEFAULT_LANGUAGE$1]) === null || _b === void 0 ? void 0 : _b[key]);
398
+ return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
398
399
  };
399
- const getTranslations$1 = (data) => {
400
+ const getTranslations = (data) => {
400
401
  Object.keys(data).forEach((item) => {
401
402
  for (let key in data[item]) {
402
- TRANSLATIONS$1[item][key] = data[item][key];
403
+ TRANSLATIONS[item][key] = data[item][key];
403
404
  }
404
405
  });
405
406
  };
@@ -6146,7 +6147,7 @@ const CasinoTournamentBanner = class {
6146
6147
  return ((new Date(dateString2)).getTime() - (new Date(dateString1)).getTime()) / (1000 * 60);
6147
6148
  }
6148
6149
  getTextByDiff(diff) {
6149
- const renderText = (amount, type) => ' - ' + amount + ' ' + translate$1(type, this.language);
6150
+ const renderText = (amount, type) => ' - ' + amount + ' ' + translate(type, this.language);
6150
6151
  const renderTimeColumn = (column) => {
6151
6152
  const columnInt = Math.floor(column);
6152
6153
  if (columnInt < 10) {
@@ -6173,16 +6174,16 @@ const CasinoTournamentBanner = class {
6173
6174
  let text = '';
6174
6175
  switch (state) {
6175
6176
  case 'Upcoming':
6176
- text = translate$1('scheduled', this.language);
6177
+ text = translate('scheduled', this.language);
6177
6178
  break;
6178
6179
  case 'Unstarted':
6179
- text = translate$1('scheduled', this.language);
6180
+ text = translate('scheduled', this.language);
6180
6181
  break;
6181
6182
  case 'Running':
6182
- text = translate$1('ongoing', this.language);
6183
+ text = translate('ongoing', this.language);
6183
6184
  break;
6184
6185
  default:
6185
- text = translate$1('finished', this.language);
6186
+ text = translate('finished', this.language);
6186
6187
  break;
6187
6188
  }
6188
6189
  return text;
@@ -6220,14 +6221,14 @@ const CasinoTournamentBanner = class {
6220
6221
  let currentDate = new Date(this.startTime);
6221
6222
  const setTranslation = () => {
6222
6223
  return (this.state === 'Running' || this.state == 'Closing' || this.state == 'Closed') ?
6223
- translate$1('startedAt', this.language) :
6224
- translate$1('startingAt', this.language);
6224
+ translate('startedAt', this.language) :
6225
+ translate('startingAt', this.language);
6225
6226
  };
6226
6227
  if (this.shortStart) {
6227
6228
  let startTimeAsString = hooks(currentDate).format(this.shortstartformat);
6228
6229
  this.startdate = (this.state === 'Running' || this.state == 'Closing' || this.state == 'Closed') ?
6229
- translate$1('startedAtWithTime', this.language) + startTimeAsString :
6230
- translate$1('startingAtWithTime', this.language) + startTimeAsString;
6230
+ translate('startedAtWithTime', this.language) + startTimeAsString :
6231
+ translate('startingAtWithTime', this.language) + startTimeAsString;
6231
6232
  }
6232
6233
  else {
6233
6234
  let currentMonthKey = new Intl.DateTimeFormat('en', dateOptions).format(currentDate);
@@ -6235,14 +6236,14 @@ const CasinoTournamentBanner = class {
6235
6236
  let currentHour = currentDate.toLocaleString('en-GB', { hour: 'numeric', minute: 'numeric', hour12: false });
6236
6237
  this.startdate =
6237
6238
  `${currentDay}` + ' ' +
6238
- translate$1(`${currentMonthKey}`, this.language) + ', ' +
6239
+ translate(`${currentMonthKey}`, this.language) + ', ' +
6239
6240
  setTranslation() +
6240
6241
  ` ${currentHour}`;
6241
6242
  }
6242
6243
  }
6243
6244
  componentWillLoad() {
6244
6245
  if (this.translationData) {
6245
- getTranslations$1(JSON.parse(this.translationData));
6246
+ getTranslations(JSON.parse(this.translationData));
6246
6247
  if (this.state) {
6247
6248
  this.stateText = this.getStateText(this.state);
6248
6249
  }
@@ -6277,14 +6278,14 @@ const CasinoTournamentBanner = class {
6277
6278
  index.h("span", { class: "Tag Date" }, this.showCalendar &&
6278
6279
  index.h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), index.h("div", { class: "BannerInfo", part: "BannerInfo" }, this.enrolled &&
6279
6280
  index.h("span", { class: "Tag Enroll" }, this.showCheck &&
6280
- index.h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, index.h("path", { d: "M4.50008 8.08492L2.41508 5.99992L1.70508 6.70492L4.50008 9.49992L10.5001 3.49992L9.79508 2.79492L4.50008 8.08492Z", fill: "white" })), translate$1('enrolled', this.language)))), this.cardMode && index.h("div", { class: "TournamentBannerThumb", part: "TournamentBannerThumb" }, index.h("div", { class: "ThumbTitle", part: "ThumbTitle" }, translate$1('tournament', this.language)), index.h("div", { class: "ThumbName", part: "ThumbName" }, this.nameOrTitle), index.h("div", { class: "ThumbState" }, this.session && this.enrolled ?
6281
- index.h("span", { class: "Tag Join" }, index.h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, index.h("path", { d: "M4.50008 8.08492L2.41508 5.99992L1.70508 6.70492L4.50008 9.49992L10.5001 3.49992L9.79508 2.79492L4.50008 8.08492Z", fill: "white" })), translate$1('joined', this.language))
6281
+ index.h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, index.h("path", { d: "M4.50008 8.08492L2.41508 5.99992L1.70508 6.70492L4.50008 9.49992L10.5001 3.49992L9.79508 2.79492L4.50008 8.08492Z", fill: "white" })), translate('enrolled', this.language)))), this.cardMode && index.h("div", { class: "TournamentBannerThumb", part: "TournamentBannerThumb" }, index.h("div", { class: "ThumbTitle", part: "ThumbTitle" }, translate('tournament', this.language)), index.h("div", { class: "ThumbName", part: "ThumbName" }, this.nameOrTitle), index.h("div", { class: "ThumbState" }, this.session && this.enrolled ?
6282
+ index.h("span", { class: "Tag Join" }, index.h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, index.h("path", { d: "M4.50008 8.08492L2.41508 5.99992L1.70508 6.70492L4.50008 9.49992L10.5001 3.49992L9.79508 2.79492L4.50008 8.08492Z", fill: "white" })), translate('joined', this.language))
6282
6283
  :
6283
6284
  this.session && this.state != 'Closed' &&
6284
- index.h("span", { class: "Tag Join" }, index.h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, index.h("path", { d: "M9.5 6.8335H6.5V9.8335H5.5V6.8335H2.5V5.8335H5.5V2.8335H6.5V5.8335H9.5V6.8335Z", fill: "white" })), translate$1('join', this.language)), this.state == 'Running' && index.h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
6285
- index.h("span", { class: "TagRemain" }, this.showRemain, " ", translate$1('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
6285
+ index.h("span", { class: "Tag Join" }, index.h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, index.h("path", { d: "M9.5 6.8335H6.5V9.8335H5.5V6.8335H2.5V5.8335H5.5V2.8335H6.5V5.8335H9.5V6.8335Z", fill: "white" })), translate('join', this.language)), this.state == 'Running' && index.h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
6286
+ index.h("span", { class: "TagRemain" }, this.showRemain, " ", translate('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
6286
6287
  index.h("span", { class: `Tag Date ${this.state}` }, this.showCalendar &&
6287
- index.h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), index.h("div", { class: "ThumbButtons" }, index.h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-data": this.translationData })), index.h("div", { class: "ThumbTC" }, index.h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate$1('terms', this.language))))));
6288
+ index.h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.1 1.4H7.65V0.5H6.75V1.4H2.25V0.5H1.35V1.4H0.9C0.405 1.4 0 1.805 0 2.3V9.5C0 9.995 0.405 10.4 0.9 10.4H8.1C8.595 10.4 9 9.995 9 9.5V2.3C9 1.805 8.595 1.4 8.1 1.4ZM8.10003 9.5H0.900027V4.55H8.10003V9.5ZM0.900027 3.65005H8.10003V2.30005H0.900027V3.65005Z", fill: "#1E1616" })), this.startdate)), index.h("div", { class: "ThumbButtons" }, index.h("casino-tournament-buttons", { enrolled: this.enrolled, session: this.session, endpoint: this.endpoint, language: this.language, "tournament-id": this.tournamentId, "login-event": this.loginEvent, "login-url": this.loginUrl, "register-event": this.registerEvent, "register-url": this.registerUrl, currency: this.currency, "bonus-code": this.bonusCode, "show-read-more": this.showReadMore, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-data": this.translationData })), index.h("div", { class: "ThumbTC" }, index.h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate('terms', this.language))))));
6288
6289
  }
6289
6290
  get host() { return index.getElement(this); }
6290
6291
  static get watchers() { return {
@@ -6293,563 +6294,4 @@ const CasinoTournamentBanner = class {
6293
6294
  };
6294
6295
  CasinoTournamentBanner.style = casinoTournamentBannerCss;
6295
6296
 
6296
- const getDevice = () => {
6297
- let userAgent = window.navigator.userAgent;
6298
- if (userAgent.toLowerCase().match(/android/i)) {
6299
- return 'Android';
6300
- }
6301
- if (userAgent.toLowerCase().match(/iphone/i)) {
6302
- return 'iPhone';
6303
- }
6304
- if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
6305
- return 'iPad';
6306
- }
6307
- return 'PC';
6308
- };
6309
-
6310
- const DEFAULT_LANGUAGE = 'en';
6311
- const TRANSLATIONS = {
6312
- en: {
6313
- joined: 'Joined',
6314
- join: 'Join',
6315
- enrolled: 'Enrolled',
6316
- scoreCriteria: 'Score Criteria',
6317
- minbet: 'min bet count',
6318
- seegames: 'You can see the games',
6319
- here: 'here',
6320
- scheduled: 'Scheduled',
6321
- ongoing: 'Ongoing',
6322
- finished: 'Finished',
6323
- startingAt: 'Starting at:',
6324
- startedAt: 'Started at:',
6325
- startingAtWithTime: `Starts `,
6326
- startedAtWithTime: `Started `,
6327
- mostRounds: 'Most Rounds',
6328
- betCount: 'Number of Bets',
6329
- maxWinStakeRatio: 'Max Win per Stake',
6330
- winStakeRatio: 'Total Win per Stake',
6331
- January: 'January',
6332
- February: 'February',
6333
- March: 'March',
6334
- April: 'April',
6335
- May: 'May',
6336
- June: 'June',
6337
- July: 'July',
6338
- August: 'August',
6339
- September: 'September',
6340
- October: 'October',
6341
- November: 'November',
6342
- December: 'December',
6343
- login: 'Log in',
6344
- register: 'Register',
6345
- details: 'Details',
6346
- joinerror: 'An error occurred while registering in the tournament, please try again.'
6347
- },
6348
- 'zh-hk': {
6349
- enrolled: '已註冊',
6350
- scoreCriteria: '評分標準',
6351
- minbet: '最小投注數:',
6352
- seegames: '你可以看比賽',
6353
- here: '這裡',
6354
- scheduled: '預定的',
6355
- ongoing: '進行中',
6356
- finished: '完成的',
6357
- startingAt: '開始於',
6358
- startedAt: '大多數回合',
6359
- mostRounds: '投注數',
6360
- betCount: '投注计数',
6361
- maxWinStakeRatio: '最大勝率',
6362
- winStakeRatio: '勝率',
6363
- January: '一月',
6364
- February: '二月',
6365
- March: '行进',
6366
- April: '四月',
6367
- May: '可能',
6368
- June: '六月',
6369
- July: '七月',
6370
- August: '八月',
6371
- September: '九月',
6372
- October: '十月',
6373
- November: '十一月',
6374
- December: '十二月',
6375
- login: '登錄',
6376
- register: '登記',
6377
- details: '細節',
6378
- join: '加入',
6379
- joinerror: '加入錦標賽時出錯,請重試'
6380
- },
6381
- fr: {
6382
- enrolled: 'Inscrits',
6383
- scoreCriteria: 'Critères de notation',
6384
- minbet: 'nombre de paris minimum',
6385
- seegames: 'Vous pouvez voir les jeux',
6386
- here: 'ici',
6387
- scheduled: 'Programmé',
6388
- ongoing: 'En cours',
6389
- finished: 'Fini',
6390
- startingAt: 'À partir de:',
6391
- startedAt: 'Commencé à:',
6392
- mostRounds: 'Le plus grand nombre de tours',
6393
- betCount: 'Nombre de paris',
6394
- maxWinStakeRatio: 'Indice maximum du gain d\'une mise',
6395
- winStakeRatio: 'Indice du gain d\'une mise',
6396
- January: 'January',
6397
- February: 'February',
6398
- March: 'March',
6399
- April: 'April',
6400
- May: 'May',
6401
- June: 'June',
6402
- July: 'July',
6403
- August: 'August',
6404
- September: 'September',
6405
- October: 'October',
6406
- November: 'November',
6407
- December: 'December',
6408
- login: 'Connexion',
6409
- register: 'Enregistre',
6410
- details: 'Détails',
6411
- join: 'Rejoignez',
6412
- joinerror: 'Une erreur s\'est produite lors de l\'inscription au tournoi - '
6413
- },
6414
- ro: {
6415
- enrolled: 'Înscris',
6416
- scoreCriteria: 'Criterii de punctaj',
6417
- minbet: 'număr minim de pariuri',
6418
- seegames: 'Vezi jocurile',
6419
- here: 'aici',
6420
- scheduled: 'Programat',
6421
- ongoing: 'În desfășurare',
6422
- finished: 'Finalizat',
6423
- startingAt: 'Începând de la',
6424
- startedAt: 'A inceput la:',
6425
- startingAtWithTime: 'Începând de',
6426
- startedAtWithTime: 'A inceput:',
6427
- mostRounds: 'Cele mai multe runde',
6428
- betCount: 'Număr de pariuri',
6429
- maxWinStakeRatio: 'Pondere maximă a mizei din câștig',
6430
- winStakeRatio: 'Câștig Total per Miză',
6431
- January: 'Ianuarie',
6432
- February: 'Februarie',
6433
- March: 'Martie',
6434
- April: 'Aprilie',
6435
- May: 'Mai',
6436
- June: 'Iunie',
6437
- July: 'Iulie',
6438
- August: 'August',
6439
- September: 'Septembrie',
6440
- October: 'Octombrie',
6441
- November: 'Noiembrie',
6442
- December: 'Decembrie',
6443
- login: 'Autentificare',
6444
- register: 'Înregistrare',
6445
- details: 'Detalii',
6446
- join: 'Participă',
6447
- joinerror: 'A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou.'
6448
- },
6449
- tr: {
6450
- enrolled: 'Katıldın',
6451
- scoreCriteria: 'Skor kriteri',
6452
- minbet: 'en düşük bahis sayısı',
6453
- seegames: 'Turnuvadaki oyunları görmek için',
6454
- here: 'tıklayın',
6455
- scheduled: 'Planlanmış',
6456
- ongoing: 'Devam Eden',
6457
- finished: 'Sona Ermiş',
6458
- startingAt: 'Başlangıç saati:',
6459
- startedAt: 'Başlangıç saati:',
6460
- mostRounds: 'ÇoğuRounds',
6461
- betCount: 'Oynanan Tur Sayısı',
6462
- maxWinStakeRatio: 'Maksimum Kazanç / Bahis Oranı',
6463
- winStakeRatio: 'Kazanç / Bahis Oranı',
6464
- January: 'Ocak',
6465
- February: 'Şubat',
6466
- March: 'Mart',
6467
- April: 'Nisan',
6468
- May: 'Mayıs',
6469
- June: 'Haziran',
6470
- July: 'Temmuz',
6471
- August: 'Ağustos',
6472
- September: 'Eylül',
6473
- October: 'Ekim',
6474
- November: 'Kasım',
6475
- December: 'Aralık',
6476
- login: 'Giriş',
6477
- register: 'Kayıt Ol',
6478
- details: 'Detaylar',
6479
- join: 'Katıl',
6480
- joinerror: 'Turnuvaya katılım ile ilgili bir hata oluştu - '
6481
- },
6482
- el: {
6483
- enrolled: 'Εγγεγραμμένος',
6484
- scoreCriteria: 'Κριτήρια Σκορ',
6485
- minbet: 'Ελάχιστος αριθμός πονταρισμάτων',
6486
- seegames: 'Μπορείς να δεις τα παιχνίδια',
6487
- here: 'εδώ',
6488
- all: 'Όλα',
6489
- scheduled: 'Προγραμματισμένα',
6490
- ongoing: 'Τρέχοντα',
6491
- finished: 'Ολοκληρωμένα',
6492
- startingAt: 'Αρχίζει στις:',
6493
- startedAt: 'Άρχισε στις:',
6494
- startingAtWithTime: `Αρχίζει στις `,
6495
- startedAtWithTime: `Άρχισε στις `,
6496
- mostRounds: 'Οι περισσότεροι γύροι',
6497
- betCount: 'Οι περισσότεροι γύροι',
6498
- maxWinStakeRatio: 'Μεγαλύτερο Κέρδος άνα Ποντάρισμα',
6499
- winStakeRatio: 'Συνολική Αναλογία Κερδών άνα Ποντάρισμα',
6500
- January: 'Ιανουαρίου',
6501
- February: 'Φεβρουαρίου',
6502
- March: 'Μαρτίου',
6503
- April: 'Απριλίου',
6504
- May: 'Μαΐου',
6505
- June: 'Ιουνίου',
6506
- July: 'Ιουλίου',
6507
- August: 'Αυγούστου',
6508
- September: 'Σεπτεμβρίου',
6509
- October: 'Οκτωβρίου',
6510
- November: 'Νοεμβρίου',
6511
- December: 'Δεκεμβρίου',
6512
- login: 'Είσοδος',
6513
- register: 'Εγγραφή',
6514
- details: 'Λεπτομέρειες',
6515
- join: 'Συμμετοχή',
6516
- joinerror: 'Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά.'
6517
- },
6518
- es: {
6519
- enrolled: 'Inscrito',
6520
- scoreCriteria: 'Criterios de puntuación',
6521
- minbet: 'la apuesta mínima cuenta',
6522
- seegames: 'Puedes ver los juegos',
6523
- here: 'aquí',
6524
- scheduled: 'Programado',
6525
- ongoing: 'En marcha',
6526
- finished: 'Terminado',
6527
- startingAt: 'Desde',
6528
- startedAt: 'Empezó el:',
6529
- mostRounds: 'LaMayoríaDeLasRondas',
6530
- betCount: 'Recuento De Apuestas',
6531
- maxWinStakeRatio: 'Ratio De Ganancia Máxima',
6532
- winStakeRatio: 'Ratio De Ganancia',
6533
- January: 'de enero',
6534
- February: 'de febrero',
6535
- March: 'de marzo',
6536
- April: 'de abril',
6537
- May: 'de mayo',
6538
- June: 'de junio',
6539
- July: 'de julio',
6540
- August: 'de agosto',
6541
- September: 'de septiembre',
6542
- October: 'de octubre',
6543
- November: 'de noviembre',
6544
- December: 'de diciembre',
6545
- login: 'Iniciar sesión',
6546
- register: 'Regístrate',
6547
- details: 'Detalles',
6548
- join: 'Unirse',
6549
- joinerror: 'Ha ocurrido un error mientras se registra en el Torneo',
6550
- },
6551
- pt: {
6552
- enrolled: 'Inscrito',
6553
- scoreCriteria: 'Critérios de pontuação',
6554
- minbet: 'Contagens de aposta mínima',
6555
- seegames: 'Você pode ver os jogos',
6556
- here: 'Aqui',
6557
- scheduled: 'Agendado',
6558
- ongoing: 'Em progresso',
6559
- finished: 'Finalizado',
6560
- startingAt: 'Começando às:',
6561
- startedAt: 'Começou às:',
6562
- mostRounds: 'Mais rodadas',
6563
- betCount: 'Contagem de Apostas',
6564
- maxWinStakeRatio: 'Rácio máximo de vitórias',
6565
- winStakeRatio: 'Rácio de Vitórias',
6566
- January: 'January',
6567
- February: 'February',
6568
- March: 'March',
6569
- April: 'April',
6570
- May: 'May',
6571
- June: 'June',
6572
- July: 'July',
6573
- August: 'August',
6574
- September: 'September',
6575
- October: 'October',
6576
- November: 'November',
6577
- December: 'December',
6578
- login: 'Entrar',
6579
- register: 'Registro',
6580
- details: 'Detalhes',
6581
- join: 'Junte-se',
6582
- joinerror: 'Ocorreu um erro ao entrar no torneio -'
6583
- },
6584
- hu: {
6585
- enrolled: 'Feliratkozott',
6586
- scoreCriteria: 'Pontozási kritériumok',
6587
- minbet: 'Minimális tét',
6588
- seegames: 'Játékok megnézése',
6589
- here: 'itt',
6590
- scheduled: 'Ütemezés',
6591
- ongoing: 'Folyamatban lévő',
6592
- finished: 'Befejezett',
6593
- startingAt: 'Kezdődik',
6594
- startedAt: 'Started at:',
6595
- mostRounds: 'Legtöbb kör',
6596
- betCount: 'Számított tét',
6597
- maxWinStakeRatio: 'Maximális nyeremény tétenként',
6598
- winStakeRatio: 'Összes nyeremény tétenként',
6599
- January: 'January',
6600
- February: 'February',
6601
- March: 'March',
6602
- April: 'April',
6603
- May: 'May',
6604
- June: 'June',
6605
- July: 'July',
6606
- August: 'August',
6607
- September: 'September',
6608
- October: 'October',
6609
- November: 'November',
6610
- December: 'December',
6611
- login: 'Bejelentkezés',
6612
- register: 'Regisztráció',
6613
- details: 'Adatok',
6614
- join: 'Csatlakozás',
6615
- joinerror: 'Hiba történt a versenyre való regisztráció során, kérjük próbálja újra.',
6616
- },
6617
- hr: {
6618
- joined: 'Pridružen',
6619
- enrolled: 'Upisan',
6620
- scoreCriteria: 'Kriteriji bodovanja',
6621
- minbet: 'minimalni broj beta',
6622
- seegames: 'Možete vidjeti igre',
6623
- here: 'Ovdje',
6624
- scheduled: 'Zakazano',
6625
- ongoing: 'U tijeku',
6626
- finished: 'Gotovo',
6627
- startingAt: 'S početkom u',
6628
- startedAt: 'Započelo u',
6629
- startingAtWithTime: `Počinje `,
6630
- startedAtWithTime: `Započelo `,
6631
- mostRounds: 'Najviše rundi',
6632
- betCount: 'Broj betova',
6633
- maxWinStakeRatio: 'Maksimalni dobitak po ulogu',
6634
- winStakeRatio: 'Ukupni dobitak po ulogu',
6635
- January: 'Siječanj',
6636
- February: 'Veljača',
6637
- March: 'Ožujak',
6638
- April: 'Travanj',
6639
- May: 'Svibanj',
6640
- June: 'Lipanj',
6641
- July: 'Srpanj',
6642
- August: 'Kolovoz',
6643
- September: 'Rujan',
6644
- October: 'Listopad',
6645
- November: 'Studeni',
6646
- December: 'Prosinac',
6647
- login: 'Prijaviti se',
6648
- register: 'Registracija',
6649
- details: 'Detalji',
6650
- join: 'join',
6651
- joinerror: 'Došlo je do pogreške prilikom registracije na turnir, pokušajte ponovno.',
6652
- left: 'lijevo',
6653
- minutes: 'minute',
6654
- hours: 'sati',
6655
- days: 'dani',
6656
- }
6657
- };
6658
- const translate = (key, customLang) => {
6659
- var _a, _b;
6660
- const lang = customLang;
6661
- return ((_a = TRANSLATIONS[lang]) === null || _a === void 0 ? void 0 : _a[key]) || ((_b = TRANSLATIONS[DEFAULT_LANGUAGE]) === null || _b === void 0 ? void 0 : _b[key]);
6662
- };
6663
- const getTranslations = (data) => {
6664
- Object.keys(data).forEach((item) => {
6665
- for (let key in data[item]) {
6666
- TRANSLATIONS[item][key] = data[item][key];
6667
- }
6668
- });
6669
- };
6670
-
6671
- const casinoTournamentButtonsCss = ":host{display:block}.ButtonGroup{display:flex;gap:4px}.Button{padding:6px 8px;border-radius:2px;border:1px solid #fff;color:#fff;background:none;position:relative;cursor:pointer}.Button.NoBorder{border:0;padding:7px 8px}.Button::after{content:\"\";display:block;position:absolute;border-radius:2px;left:0;top:0;width:100%;height:100%;opacity:0;transition:all 0.5s;box-shadow:0 0 10px 10px white}.Button:active::after{box-shadow:0 0 0 0 white;position:absolute;border-radius:2px;left:0;top:0;opacity:1;transition:0s}.Button:active{top:1px}";
6672
-
6673
- const CasinoTournamentButtons = class {
6674
- constructor(hostRef) {
6675
- index.registerInstance(this, hostRef);
6676
- this.userEnrolled = index.createEvent(this, "TournamentUserEnrolled", 7);
6677
- /**
6678
- * Player enrolled
6679
- */
6680
- this.enrolled = false;
6681
- /**
6682
- * Show read more button
6683
- */
6684
- this.showReadMore = false;
6685
- /**
6686
- * Client custom styling via inline styles
6687
- */
6688
- this.clientStyling = '';
6689
- /**
6690
- * Client custom styling via url
6691
- */
6692
- this.clientStylingUrl = '';
6693
- this.limitStylingAppends = false;
6694
- this.joinButtonLoading = false;
6695
- this.errorJoin = false;
6696
- this.errorJoinConcurrently = false;
6697
- }
6698
- componentWillLoad() {
6699
- if (this.translationData) {
6700
- getTranslations(JSON.parse(this.translationData));
6701
- }
6702
- }
6703
- componentDidRender() {
6704
- if (!this.limitStylingAppends && this.host) {
6705
- if (this.clientStyling)
6706
- this.setClientStyling();
6707
- if (this.clientStylingUrl)
6708
- this.setClientStylingURL();
6709
- this.limitStylingAppends = true;
6710
- }
6711
- }
6712
- setClientStyling() {
6713
- const sheet = new CSSStyleSheet();
6714
- // @ts-ignore
6715
- sheet.replace(this.clientStyling);
6716
- // @ts-ignore
6717
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
6718
- }
6719
- setClientStylingURL() {
6720
- let url = new URL(this.clientStylingUrl);
6721
- fetch(url.href)
6722
- .then((res) => res.text())
6723
- .then((data) => {
6724
- const sheet = new CSSStyleSheet();
6725
- // @ts-ignore
6726
- sheet.replace(data);
6727
- // @ts-ignore
6728
- this.host.shadowRoot.adoptedStyleSheets = [...this.host.shadowRoot.adoptedStyleSheets, sheet];
6729
- });
6730
- }
6731
- loginAction() {
6732
- if (this.loginEvent) {
6733
- window.postMessage({ type: this.loginEvent, transition: 'Login' }, window.location.href);
6734
- // @ts-ignore Analytics event
6735
- if (typeof gtag == 'function') {
6736
- // @ts-ignore
6737
- gtag('event', 'OpenLoginModal', {
6738
- 'context': 'TournamentsThumbnailController'
6739
- });
6740
- }
6741
- }
6742
- if (this.loginUrl) {
6743
- location.href = this.loginUrl;
6744
- }
6745
- }
6746
- registerAction() {
6747
- if (this.registerEvent) {
6748
- window.postMessage({ type: this.registerEvent, transition: 'Register' }, window.location.href);
6749
- //@ts-ignoreAnalytics event
6750
- if (typeof gtag == 'function') {
6751
- //@ts-ignore
6752
- gtag('event', 'OpenRegisterModal', {
6753
- 'context': 'TournamentsThumbnailController'
6754
- });
6755
- }
6756
- }
6757
- if (this.registerUrl) {
6758
- location.href = this.registerUrl;
6759
- }
6760
- }
6761
- async joinAction(tournamentId, bonuscode) {
6762
- var _a;
6763
- this.errorJoin = false;
6764
- this.errorJoinConcurrently = false;
6765
- window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
6766
- this.joinButtonLoading = true;
6767
- let joinUrl = new URL(`${this.endpoint}/v1/bonus/claim`);
6768
- let reqHeaders = new Headers();
6769
- let body = {};
6770
- joinUrl.searchParams.append('language', this.language);
6771
- joinUrl.searchParams.append('platform', getDevice());
6772
- reqHeaders.append('Content-Type', 'application/json');
6773
- reqHeaders.append("X-SessionID", this.session);
6774
- if (bonuscode) {
6775
- body = {
6776
- language: this.language,
6777
- bonusCode: bonuscode,
6778
- currency: this.currency
6779
- };
6780
- }
6781
- let requestOptions = {
6782
- method: 'PUT',
6783
- headers: reqHeaders,
6784
- body: JSON.stringify(body),
6785
- };
6786
- const handlerOnSuccess = () => {
6787
- this.joinButtonLoading = false;
6788
- this.enrolled = true;
6789
- window.postMessage({ type: 'TournamentUserEnrolled', userenrolled: this.enrolled, tournamentId }, window.location.href);
6790
- this.userEnrolled.emit({ userenrolled: this.enrolled, tournamentId });
6791
- };
6792
- const handlerOnFail = () => {
6793
- this.joinButtonLoading = false;
6794
- this.errorJoin = true;
6795
- };
6796
- const fetcher = async () => {
6797
- let result;
6798
- try {
6799
- result = await fetch(`${this.endpoint}/v1/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
6800
- result = await result.json();
6801
- }
6802
- catch (e) {
6803
- handlerOnFail();
6804
- }
6805
- return result;
6806
- };
6807
- const data = await fetcher();
6808
- if (!data)
6809
- return;
6810
- if (data.success == true) {
6811
- handlerOnSuccess();
6812
- }
6813
- else {
6814
- if (data.errorMessage.match("VersionMismatchException")) {
6815
- let resultDoubleCheck;
6816
- resultDoubleCheck = await fetch(`${this.endpoint}/v1/tournaments/${this.tournamentId}`, {
6817
- headers: {
6818
- 'X-SessionID': this.session
6819
- }
6820
- });
6821
- resultDoubleCheck = await resultDoubleCheck.json();
6822
- if ((_a = resultDoubleCheck === null || resultDoubleCheck === void 0 ? void 0 : resultDoubleCheck.item) === null || _a === void 0 ? void 0 : _a.playerEnrolled) {
6823
- handlerOnSuccess();
6824
- }
6825
- else {
6826
- handlerOnFail();
6827
- this.errorJoinConcurrently = true;
6828
- this.errorJoin = false;
6829
- }
6830
- }
6831
- else {
6832
- handlerOnFail();
6833
- }
6834
- }
6835
- }
6836
- detailAction(tournamentId) {
6837
- window.postMessage({ type: 'TournamentDetailsClicked', tournamentId, showLeaderboard: true }, window.location.href);
6838
- }
6839
- moreAction(tournamentId) {
6840
- window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
6841
- }
6842
- render() {
6843
- return index.h("div", { class: "TournamentButtons" }, !this.session &&
6844
- index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), index.h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
6845
- index.h("div", null, !this.enrolled &&
6846
- index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && index.h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, translate('readmore', this.language))), this.enrolled &&
6847
- index.h("div", { class: "ButtonGroup" }, index.h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && index.h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, translate('readmore', this.language)))), (this.errorJoin || this.errorJoinConcurrently) &&
6848
- index.h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
6849
- }
6850
- get host() { return index.getElement(this); }
6851
- };
6852
- CasinoTournamentButtons.style = casinoTournamentButtonsCss;
6853
-
6854
6297
  exports.casino_tournament_banner = CasinoTournamentBanner;
6855
- exports.casino_tournament_buttons = CasinoTournamentButtons;