@everymatrix/casino-tournament-banner 1.24.3 → 1.24.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.
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$2 } from './casino-tournament-buttons2.js';
2
+ import '@everymatrix/casino-tournament-buttons';
3
3
 
4
4
  const DEFAULT_LANGUAGE = 'en';
5
5
  const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
@@ -6255,18 +6255,13 @@ function defineCustomElement$1() {
6255
6255
  if (typeof customElements === "undefined") {
6256
6256
  return;
6257
6257
  }
6258
- const components = ["casino-tournament-banner", "casino-tournament-buttons"];
6258
+ const components = ["casino-tournament-banner"];
6259
6259
  components.forEach(tagName => { switch (tagName) {
6260
6260
  case "casino-tournament-banner":
6261
6261
  if (!customElements.get(tagName)) {
6262
6262
  customElements.define(tagName, CasinoTournamentBanner$1);
6263
6263
  }
6264
6264
  break;
6265
- case "casino-tournament-buttons":
6266
- if (!customElements.get(tagName)) {
6267
- defineCustomElement$2();
6268
- }
6269
- break;
6270
6265
  } });
6271
6266
  }
6272
6267
 
@@ -1,8 +1,9 @@
1
1
  import { r as registerInstance, h } from './index-c76b1548.js';
2
+ import '@everymatrix/casino-tournament-buttons';
2
3
 
3
- const DEFAULT_LANGUAGE$1 = 'en';
4
- const SUPPORTED_LANGUAGES$1 = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
5
- const TRANSLATIONS$1 = {
4
+ const DEFAULT_LANGUAGE = 'en';
5
+ const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
6
+ const TRANSLATIONS = {
6
7
  en: {
7
8
  joined: 'Joined',
8
9
  join: 'Join',
@@ -347,9 +348,9 @@ const TRANSLATIONS$1 = {
347
348
  days: 'nap',
348
349
  }
349
350
  };
350
- const translate$1 = (key, customLang) => {
351
+ const translate = (key, customLang) => {
351
352
  const lang = customLang;
352
- return TRANSLATIONS$1[lang !== undefined && SUPPORTED_LANGUAGES$1.includes(lang) ? lang : DEFAULT_LANGUAGE$1][key];
353
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
353
354
  };
354
355
 
355
356
  //! moment.js
@@ -6071,7 +6072,7 @@ const CasinoTournamentBanner = class {
6071
6072
  return ((new Date(dateString2)).getTime() - (new Date(dateString1)).getTime()) / (1000 * 60);
6072
6073
  }
6073
6074
  getTextByDiff(diff) {
6074
- const renderText = (amount, type) => ' - ' + amount + ' ' + translate$1(type);
6075
+ const renderText = (amount, type) => ' - ' + amount + ' ' + translate(type);
6075
6076
  const renderTimeColumn = (column) => {
6076
6077
  const columnInt = Math.floor(column);
6077
6078
  if (columnInt < 10) {
@@ -6111,16 +6112,16 @@ const CasinoTournamentBanner = class {
6111
6112
  let text = '';
6112
6113
  switch (state) {
6113
6114
  case 'Upcoming':
6114
- text = translate$1('scheduled', this.language);
6115
+ text = translate('scheduled', this.language);
6115
6116
  break;
6116
6117
  case 'Unstarted':
6117
- text = translate$1('scheduled', this.language);
6118
+ text = translate('scheduled', this.language);
6118
6119
  break;
6119
6120
  case 'Running':
6120
- text = translate$1('ongoing', this.language);
6121
+ text = translate('ongoing', this.language);
6121
6122
  break;
6122
6123
  default:
6123
- text = translate$1('finished', this.language);
6124
+ text = translate('finished', this.language);
6124
6125
  break;
6125
6126
  }
6126
6127
  return text;
@@ -6151,14 +6152,14 @@ const CasinoTournamentBanner = class {
6151
6152
  let currentDate = new Date(this.startTime);
6152
6153
  const setTranslation = () => {
6153
6154
  return (this.state === 'Running' || this.state == 'Closing' || this.state == 'Closed') ?
6154
- translate$1('startedAt', this.language) :
6155
- translate$1('startingAt', this.language);
6155
+ translate('startedAt', this.language) :
6156
+ translate('startingAt', this.language);
6156
6157
  };
6157
6158
  if (this.shortStart) {
6158
6159
  let startTimeAsString = hooks(currentDate).format(this.shortstartformat);
6159
6160
  this.startdate = (this.state === 'Running' || this.state == 'Closing' || this.state == 'Closed') ?
6160
- translate$1('startedAtWithTime', this.language) + startTimeAsString :
6161
- translate$1('startingAtWithTime', this.language) + startTimeAsString;
6161
+ translate('startedAtWithTime', this.language) + startTimeAsString :
6162
+ translate('startingAtWithTime', this.language) + startTimeAsString;
6162
6163
  }
6163
6164
  else {
6164
6165
  let currentMonthKey = new Intl.DateTimeFormat('en', dateOptions).format(currentDate);
@@ -6166,7 +6167,7 @@ const CasinoTournamentBanner = class {
6166
6167
  let currentHour = currentDate.toLocaleString('en-GB', { hour: 'numeric', minute: 'numeric', hour12: false });
6167
6168
  this.startdate =
6168
6169
  `${currentDay}` + ' ' +
6169
- translate$1(`${currentMonthKey}`, this.language) + ', ' +
6170
+ translate(`${currentMonthKey}`, this.language) + ', ' +
6170
6171
  setTranslation() +
6171
6172
  ` ${currentHour}`;
6172
6173
  }
@@ -6202,512 +6203,16 @@ const CasinoTournamentBanner = class {
6202
6203
  h("span", { class: "Tag Date" }, this.showCalendar &&
6203
6204
  h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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)), h("div", { class: "BannerInfo", part: "BannerInfo" }, this.enrolled &&
6204
6205
  h("span", { class: "Tag Enroll" }, this.showCheck &&
6205
- h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, 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 && h("div", { class: "TournamentBannerThumb", part: "TournamentBannerThumb" }, h("div", { class: "ThumbTitle", part: "ThumbTitle" }, translate$1('tournament', this.language)), h("div", { class: "ThumbName", part: "ThumbName" }, this.nameOrTitle), h("div", { class: "ThumbState" }, this.session && this.enrolled ?
6206
- h("span", { class: "Tag Join" }, h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, 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))
6206
+ h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, 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 && h("div", { class: "TournamentBannerThumb", part: "TournamentBannerThumb" }, h("div", { class: "ThumbTitle", part: "ThumbTitle" }, translate('tournament', this.language)), h("div", { class: "ThumbName", part: "ThumbName" }, this.nameOrTitle), h("div", { class: "ThumbState" }, this.session && this.enrolled ?
6207
+ h("span", { class: "Tag Join" }, h("svg", { class: "EnrollCheck", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" }, 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))
6207
6208
  :
6208
6209
  this.session && this.state != 'Closed' &&
6209
- h("span", { class: "Tag Join" }, h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, 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' && h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
6210
- h("span", { class: "TagRemain" }, this.showRemain, " ", translate$1('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
6210
+ h("span", { class: "Tag Join" }, h("svg", { class: "JoinPlus", xmlns: "http://www.w3.org/2000/svg", width: "12", height: "13", viewBox: "0 0 12 13", fill: "none" }, 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' && h("span", { class: `Tag State ${this.state}` }, this.stateText, this.showRunningDate &&
6211
+ h("span", { class: "TagRemain" }, this.showRemain, " ", translate('left', this.language))), (this.state == 'Unstarted' || this.state == 'Upcoming' || this.state == 'Closed') &&
6211
6212
  h("span", { class: `Tag Date ${this.state}` }, this.showCalendar &&
6212
- h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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)), h("div", { class: "ThumbButtons" }, 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 })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate$1('terms', this.language))))));
6213
+ h("svg", { class: "CalendarIcon", width: "9", height: "11", viewBox: "0 0 9 11", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, 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)), h("div", { class: "ThumbButtons" }, 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 })), h("div", { class: "ThumbTC" }, h("span", { onClick: this.termsClick.bind(this, this.tournamentId) }, translate('terms', this.language))))));
6213
6214
  }
6214
6215
  };
6215
6216
  CasinoTournamentBanner.style = casinoTournamentBannerCss;
6216
6217
 
6217
- const getDevice = () => {
6218
- let userAgent = window.navigator.userAgent;
6219
- if (userAgent.toLowerCase().match(/android/i)) {
6220
- return 'Android';
6221
- }
6222
- if (userAgent.toLowerCase().match(/iphone/i)) {
6223
- return 'iPhone';
6224
- }
6225
- if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
6226
- return 'iPad';
6227
- }
6228
- return 'PC';
6229
- };
6230
-
6231
- const DEFAULT_LANGUAGE = 'en';
6232
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'zh-hk', 'fr', 'hu', 'tr', 'el', 'es', 'pt'];
6233
- const TRANSLATIONS = {
6234
- en: {
6235
- joined: 'Joined',
6236
- join: 'Join',
6237
- enrolled: 'Enrolled',
6238
- scoreCriteria: 'Score Criteria',
6239
- minbet: 'min bet count',
6240
- seegames: 'You can see the games',
6241
- here: 'here',
6242
- scheduled: 'Scheduled',
6243
- ongoing: 'Ongoing',
6244
- finished: 'Finished',
6245
- startingAt: 'Starting at:',
6246
- startedAt: 'Started at:',
6247
- startingAtWithTime: `Starts `,
6248
- startedAtWithTime: `Started `,
6249
- mostRounds: 'Most Rounds',
6250
- betCount: 'Number of Bets',
6251
- maxWinStakeRatio: 'Max Win per Stake',
6252
- winStakeRatio: 'Total Win per Stake',
6253
- January: 'January',
6254
- February: 'February',
6255
- March: 'March',
6256
- April: 'April',
6257
- May: 'May',
6258
- June: 'June',
6259
- July: 'July',
6260
- August: 'August',
6261
- September: 'September',
6262
- October: 'October',
6263
- November: 'November',
6264
- December: 'December',
6265
- login: 'Log in',
6266
- register: 'Register',
6267
- details: 'Details',
6268
- joinerror: 'An error occurred while registering in the tournament, please try again.'
6269
- },
6270
- 'zh-hk': {
6271
- enrolled: '已註冊',
6272
- scoreCriteria: '評分標準',
6273
- minbet: '最小投注數:',
6274
- seegames: '你可以看比賽',
6275
- here: '這裡',
6276
- scheduled: '預定的',
6277
- ongoing: '進行中',
6278
- finished: '完成的',
6279
- startingAt: '開始於',
6280
- startedAt: '大多數回合',
6281
- mostRounds: '投注數',
6282
- betCount: '投注计数',
6283
- maxWinStakeRatio: '最大勝率',
6284
- winStakeRatio: '勝率',
6285
- January: '一月',
6286
- February: '二月',
6287
- March: '行进',
6288
- April: '四月',
6289
- May: '可能',
6290
- June: '六月',
6291
- July: '七月',
6292
- August: '八月',
6293
- September: '九月',
6294
- October: '十月',
6295
- November: '十一月',
6296
- December: '十二月',
6297
- login: '登錄',
6298
- register: '登記',
6299
- details: '細節',
6300
- join: '加入',
6301
- joinerror: '加入錦標賽時出錯,請重試'
6302
- },
6303
- fr: {
6304
- enrolled: 'Inscrits',
6305
- scoreCriteria: 'Critères de notation',
6306
- minbet: 'nombre de paris minimum',
6307
- seegames: 'Vous pouvez voir les jeux',
6308
- here: 'ici',
6309
- scheduled: 'Programmé',
6310
- ongoing: 'En cours',
6311
- finished: 'Fini',
6312
- startingAt: 'À partir de:',
6313
- startedAt: 'Commencé à:',
6314
- mostRounds: 'Le plus grand nombre de tours',
6315
- betCount: 'Nombre de paris',
6316
- maxWinStakeRatio: 'Indice maximum du gain d\'une mise',
6317
- winStakeRatio: 'Indice du gain d\'une mise',
6318
- January: 'January',
6319
- February: 'February',
6320
- March: 'March',
6321
- April: 'April',
6322
- May: 'May',
6323
- June: 'June',
6324
- July: 'July',
6325
- August: 'August',
6326
- September: 'September',
6327
- October: 'October',
6328
- November: 'November',
6329
- December: 'December',
6330
- login: 'Connexion',
6331
- register: 'Enregistre',
6332
- details: 'Détails',
6333
- join: 'Rejoignez',
6334
- joinerror: 'Une erreur s\'est produite lors de l\'inscription au tournoi - '
6335
- },
6336
- ro: {
6337
- enrolled: 'Înscris',
6338
- scoreCriteria: 'Criterii de punctaj',
6339
- minbet: 'număr minim de pariuri',
6340
- seegames: 'Vezi jocurile',
6341
- here: 'aici',
6342
- scheduled: 'Programat',
6343
- ongoing: 'În desfășurare',
6344
- finished: 'Finalizat',
6345
- startingAt: 'Începând de la',
6346
- startedAt: 'A inceput la:',
6347
- startingAtWithTime: 'Începând de',
6348
- startedAtWithTime: 'A inceput:',
6349
- mostRounds: 'Cele mai multe runde',
6350
- betCount: 'Număr de pariuri',
6351
- maxWinStakeRatio: 'Pondere maximă a mizei din câștig',
6352
- winStakeRatio: 'Câștig Total per Miză',
6353
- January: 'Ianuarie',
6354
- February: 'Februarie',
6355
- March: 'Martie',
6356
- April: 'Aprilie',
6357
- May: 'Mai',
6358
- June: 'Iunie',
6359
- July: 'Iulie',
6360
- August: 'August',
6361
- September: 'Septembrie',
6362
- October: 'Octombrie',
6363
- November: 'Noiembrie',
6364
- December: 'Decembrie',
6365
- login: 'Autentificare',
6366
- register: 'Înregistrare',
6367
- details: 'Detalii',
6368
- join: 'Participă',
6369
- joinerror: 'A apărut o eroare la înregistrarea în turneu, te rugăm să încerci din nou.'
6370
- },
6371
- tr: {
6372
- enrolled: 'Katıldın',
6373
- scoreCriteria: 'Skor kriteri',
6374
- minbet: 'en düşük bahis sayısı',
6375
- seegames: 'Turnuvadaki oyunları görmek için',
6376
- here: 'tıklayın',
6377
- scheduled: 'Planlanmış',
6378
- ongoing: 'Devam Eden',
6379
- finished: 'Sona Ermiş',
6380
- startingAt: 'Başlangıç saati:',
6381
- startedAt: 'Başlangıç saati:',
6382
- mostRounds: 'ÇoğuRounds',
6383
- betCount: 'Oynanan Tur Sayısı',
6384
- maxWinStakeRatio: 'Maksimum Kazanç / Bahis Oranı',
6385
- winStakeRatio: 'Kazanç / Bahis Oranı',
6386
- January: 'Ocak',
6387
- February: 'Şubat',
6388
- March: 'Mart',
6389
- April: 'Nisan',
6390
- May: 'Mayıs',
6391
- June: 'Haziran',
6392
- July: 'Temmuz',
6393
- August: 'Ağustos',
6394
- September: 'Eylül',
6395
- October: 'Ekim',
6396
- November: 'Kasım',
6397
- December: 'Aralık',
6398
- login: 'Giriş',
6399
- register: 'Kayıt Ol',
6400
- details: 'Detaylar',
6401
- join: 'Katıl',
6402
- joinerror: 'Turnuvaya katılım ile ilgili bir hata oluştu - '
6403
- },
6404
- el: {
6405
- enrolled: 'Εγγεγραμμένος',
6406
- scoreCriteria: 'Κριτήρια Σκορ',
6407
- minbet: 'Ελάχιστος αριθμός πονταρισμάτων',
6408
- seegames: 'Μπορείς να δεις τα παιχνίδια',
6409
- here: 'εδώ',
6410
- all: 'Όλα',
6411
- scheduled: 'Προγραμματισμένα',
6412
- ongoing: 'Τρέχοντα',
6413
- finished: 'Ολοκληρωμένα',
6414
- startingAt: 'Αρχίζει στις:',
6415
- startedAt: 'Άρχισε στις:',
6416
- startingAtWithTime: `Αρχίζει στις `,
6417
- startedAtWithTime: `Άρχισε στις `,
6418
- mostRounds: 'Οι περισσότεροι γύροι',
6419
- betCount: 'Οι περισσότεροι γύροι',
6420
- maxWinStakeRatio: 'Μεγαλύτερο Κέρδος άνα Ποντάρισμα',
6421
- winStakeRatio: 'Συνολική Αναλογία Κερδών άνα Ποντάρισμα',
6422
- January: 'Ιανουαρίου',
6423
- February: 'Φεβρουαρίου',
6424
- March: 'Μαρτίου',
6425
- April: 'Απριλίου',
6426
- May: 'Μαΐου',
6427
- June: 'Ιουνίου',
6428
- July: 'Ιουλίου',
6429
- August: 'Αυγούστου',
6430
- September: 'Σεπτεμβρίου',
6431
- October: 'Οκτωβρίου',
6432
- November: 'Νοεμβρίου',
6433
- December: 'Δεκεμβρίου',
6434
- login: 'Είσοδος',
6435
- register: 'Εγγραφή',
6436
- details: 'Λεπτομέρειες',
6437
- join: 'Συμμετοχή',
6438
- joinerror: 'Παρουσιάστηκε σφάλμα κατά τη διαδικασία εγγραφής στο τουρνουά, παρακαλούμε δοκιμάστε ξανά.'
6439
- },
6440
- es: {
6441
- enrolled: 'Inscrito',
6442
- scoreCriteria: 'Criterios de puntuación',
6443
- minbet: 'la apuesta mínima cuenta',
6444
- seegames: 'Puedes ver los juegos',
6445
- here: 'aquí',
6446
- scheduled: 'Programado',
6447
- ongoing: 'En marcha',
6448
- finished: 'Terminado',
6449
- startingAt: 'Desde',
6450
- startedAt: 'Empezó el:',
6451
- mostRounds: 'LaMayoríaDeLasRondas',
6452
- betCount: 'Recuento De Apuestas',
6453
- maxWinStakeRatio: 'Ratio De Ganancia Máxima',
6454
- winStakeRatio: 'Ratio De Ganancia',
6455
- January: 'de enero',
6456
- February: 'de febrero',
6457
- March: 'de marzo',
6458
- April: 'de abril',
6459
- May: 'de mayo',
6460
- June: 'de junio',
6461
- July: 'de julio',
6462
- August: 'de agosto',
6463
- September: 'de septiembre',
6464
- October: 'de octubre',
6465
- November: 'de noviembre',
6466
- December: 'de diciembre',
6467
- login: 'Iniciar sesión',
6468
- register: 'Regístrate',
6469
- details: 'Detalles',
6470
- join: 'Unirse',
6471
- joinerror: 'Ha ocurrido un error mientras se registra en el Torneo',
6472
- },
6473
- pt: {
6474
- enrolled: 'Inscrito',
6475
- scoreCriteria: 'Critérios de pontuação',
6476
- minbet: 'Contagens de aposta mínima',
6477
- seegames: 'Você pode ver os jogos',
6478
- here: 'Aqui',
6479
- scheduled: 'Agendado',
6480
- ongoing: 'Em progresso',
6481
- finished: 'Finalizado',
6482
- startingAt: 'Começando às:',
6483
- startedAt: 'Começou às:',
6484
- mostRounds: 'Mais rodadas',
6485
- betCount: 'Contagem de Apostas',
6486
- maxWinStakeRatio: 'Rácio máximo de vitórias',
6487
- winStakeRatio: 'Rácio de Vitórias',
6488
- January: 'January',
6489
- February: 'February',
6490
- March: 'March',
6491
- April: 'April',
6492
- May: 'May',
6493
- June: 'June',
6494
- July: 'July',
6495
- August: 'August',
6496
- September: 'September',
6497
- October: 'October',
6498
- November: 'November',
6499
- December: 'December',
6500
- login: 'Entrar',
6501
- register: 'Registro',
6502
- details: 'Detalhes',
6503
- join: 'Junte-se',
6504
- joinerror: 'Ocorreu um erro ao entrar no torneio -'
6505
- },
6506
- hu: {
6507
- enrolled: 'Feliratkozott',
6508
- scoreCriteria: 'Pontozási kritériumok',
6509
- minbet: 'Minimális tét',
6510
- seegames: 'Játékok megnézése',
6511
- here: 'itt',
6512
- scheduled: 'Ütemezés',
6513
- ongoing: 'Folyamatban lévő',
6514
- finished: 'Befejezett',
6515
- startingAt: 'Kezdődik',
6516
- startedAt: 'Started at:',
6517
- mostRounds: 'Legtöbb kör',
6518
- betCount: 'Számított tét',
6519
- maxWinStakeRatio: 'Maximális nyeremény tétenként',
6520
- winStakeRatio: 'Összes nyeremény tétenként',
6521
- January: 'January',
6522
- February: 'February',
6523
- March: 'March',
6524
- April: 'April',
6525
- May: 'May',
6526
- June: 'June',
6527
- July: 'July',
6528
- August: 'August',
6529
- September: 'September',
6530
- October: 'October',
6531
- November: 'November',
6532
- December: 'December',
6533
- login: 'Bejelentkezés',
6534
- register: 'Regisztráció',
6535
- details: 'Adatok',
6536
- join: 'Csatlakozás',
6537
- joinerror: 'Hiba történt a versenyre való regisztráció során, kérjük próbálja újra.',
6538
- }
6539
- };
6540
- const translate = (key, customLang) => {
6541
- const lang = customLang;
6542
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
6543
- };
6544
-
6545
- 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}";
6546
-
6547
- const CasinoTournamentButtons = class {
6548
- constructor(hostRef) {
6549
- registerInstance(this, hostRef);
6550
- /**
6551
- * Player enrolled
6552
- */
6553
- this.enrolled = false;
6554
- /**
6555
- * Show read more button
6556
- */
6557
- this.showReadMore = false;
6558
- /**
6559
- * Client custom styling via inline styles
6560
- */
6561
- this.clientStyling = '';
6562
- /**
6563
- * Client custom styling via url
6564
- */
6565
- this.clientStylingUrl = '';
6566
- this.limitStylingAppends = false;
6567
- this.joinButtonLoading = false;
6568
- this.errorJoin = false;
6569
- this.errorJoinConcurrently = false;
6570
- }
6571
- componentDidRender() {
6572
- if (!this.limitStylingAppends && this.stylingContainer) {
6573
- if (this.clientStyling)
6574
- this.setClientStyling();
6575
- if (this.clientStylingUrl)
6576
- this.setClientStylingURL();
6577
- this.limitStylingAppends = true;
6578
- }
6579
- }
6580
- setClientStyling() {
6581
- let sheet = document.createElement('style');
6582
- sheet.innerHTML = this.clientStyling;
6583
- this.stylingContainer.prepend(sheet);
6584
- }
6585
- setClientStylingURL() {
6586
- let cssFile = document.createElement('style');
6587
- setTimeout(() => {
6588
- cssFile.innerHTML = this.clientStylingUrl;
6589
- this.stylingContainer.prepend(cssFile);
6590
- }, 1);
6591
- }
6592
- loginAction() {
6593
- if (this.loginEvent) {
6594
- window.postMessage({ type: this.loginEvent, transition: 'Login' }, window.location.href);
6595
- // @ts-ignore Analytics event
6596
- if (typeof gtag == 'function') {
6597
- // @ts-ignore
6598
- gtag('event', 'OpenLoginModal', {
6599
- 'context': 'TournamentsThumbnailController'
6600
- });
6601
- }
6602
- }
6603
- if (this.loginUrl) {
6604
- location.href = this.loginUrl;
6605
- }
6606
- }
6607
- registerAction() {
6608
- if (this.registerEvent) {
6609
- window.postMessage({ type: this.registerEvent, transition: 'Register' }, window.location.href);
6610
- //@ts-ignoreAnalytics event
6611
- if (typeof gtag == 'function') {
6612
- //@ts-ignore
6613
- gtag('event', 'OpenRegisterModal', {
6614
- 'context': 'TournamentsThumbnailController'
6615
- });
6616
- }
6617
- }
6618
- if (this.registerUrl) {
6619
- location.href = this.registerUrl;
6620
- }
6621
- }
6622
- async joinAction(tournamentId, bonuscode) {
6623
- var _a;
6624
- this.errorJoin = false;
6625
- this.errorJoinConcurrently = false;
6626
- window.postMessage({ type: 'TournamentJoinRequest', tournamentId }, window.location.href);
6627
- this.joinButtonLoading = true;
6628
- let joinUrl = new URL(`${this.endpoint}/bonus/claim`);
6629
- let reqHeaders = new Headers();
6630
- let body = {};
6631
- joinUrl.searchParams.append('language', this.language);
6632
- joinUrl.searchParams.append('platform', getDevice());
6633
- reqHeaders.append('Content-Type', 'application/json');
6634
- reqHeaders.append("X-SessionID", this.session);
6635
- if (bonuscode) {
6636
- body = {
6637
- language: this.language,
6638
- bonusCode: bonuscode,
6639
- currency: this.currency
6640
- };
6641
- }
6642
- let requestOptions = {
6643
- method: 'PUT',
6644
- headers: reqHeaders,
6645
- body: JSON.stringify(body),
6646
- };
6647
- const handlerOnSuccess = () => {
6648
- this.joinButtonLoading = false;
6649
- this.enrolled = true;
6650
- window.postMessage({ type: 'TournamentUserEnrolled', userenrolled: this.enrolled }, window.location.href);
6651
- };
6652
- const handlerOnFail = () => {
6653
- this.joinButtonLoading = false;
6654
- this.errorJoin = true;
6655
- };
6656
- const fetcher = async () => {
6657
- let result;
6658
- try {
6659
- result = await fetch(`${this.endpoint}/bonus/claim?${joinUrl.searchParams.toString()}`, requestOptions);
6660
- result = await result.json();
6661
- }
6662
- catch (e) {
6663
- handlerOnFail();
6664
- }
6665
- return result;
6666
- };
6667
- const data = await fetcher();
6668
- if (!data)
6669
- return;
6670
- if (data.success == true) {
6671
- handlerOnSuccess();
6672
- }
6673
- else {
6674
- if (data.errorMessage.match("VersionMismatchException")) {
6675
- let resultDoubleCheck;
6676
- resultDoubleCheck = await fetch(`${this.endpoint}/tournaments/${this.tournamentId}`, {
6677
- headers: {
6678
- 'X-SessionID': this.session
6679
- }
6680
- });
6681
- resultDoubleCheck = await resultDoubleCheck.json();
6682
- if ((_a = resultDoubleCheck === null || resultDoubleCheck === void 0 ? void 0 : resultDoubleCheck.item) === null || _a === void 0 ? void 0 : _a.playerEnrolled) {
6683
- handlerOnSuccess();
6684
- }
6685
- else {
6686
- handlerOnFail();
6687
- this.errorJoinConcurrently = true;
6688
- this.errorJoin = false;
6689
- }
6690
- }
6691
- else {
6692
- handlerOnFail();
6693
- }
6694
- }
6695
- }
6696
- detailAction(tournamentId) {
6697
- window.postMessage({ type: 'TournamentDetailsClicked', tournamentId, showLeaderboard: true }, window.location.href);
6698
- }
6699
- moreAction(tournamentId) {
6700
- window.postMessage({ type: 'TournamentReadMoreClicked', tournamentId }, window.location.href);
6701
- }
6702
- render() {
6703
- return h("div", { ref: el => this.stylingContainer = el, class: "TournamentButtons" }, !this.session &&
6704
- h("div", { class: "ButtonGroup" }, h("button", { class: "LoginButton Button", part: "LoginButton", onClick: () => this.loginAction() }, translate('login', this.language)), h("button", { class: "RegisterButton Button", part: "RegisterButton", onClick: () => this.registerAction() }, translate('register', this.language))), this.session &&
6705
- h("div", null, !this.enrolled &&
6706
- h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.joinAction(this.tournamentId, this.bonusCode) }, translate('join', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more")), this.enrolled &&
6707
- h("div", { class: "ButtonGroup" }, h("button", { class: "Button", onClick: () => this.detailAction(this.tournamentId) }, translate('details', this.language)), this.showReadMore && h("button", { class: "Button NoBorder", onClick: () => this.moreAction(this.tournamentId) }, "Read more"))), (this.errorJoin || this.errorJoinConcurrently) &&
6708
- h("span", { class: "ErrorText", part: "ErrorText" }, translate('joinerror', this.language)));
6709
- }
6710
- };
6711
- CasinoTournamentButtons.style = casinoTournamentButtonsCss;
6712
-
6713
- export { CasinoTournamentBanner as casino_tournament_banner, CasinoTournamentButtons as casino_tournament_buttons };
6218
+ export { CasinoTournamentBanner as casino_tournament_banner };
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"stylingContainer":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]],[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"stylingContainer":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
16
+ return bootstrapLazy([["casino-tournament-banner",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"stylingContainer":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]], options);
17
17
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["casino-tournament-banner_2",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"stylingContainer":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]],[1,"casino-tournament-buttons",{"language":[1],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"endpoint":[1],"currency":[1],"bonusCode":[1,"bonus-code"],"enrolled":[4],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"limitStylingAppends":[32],"stylingContainer":[32],"joinButtonLoading":[32],"errorJoin":[32],"errorJoinConcurrently":[32]}]]]], options);
13
+ return bootstrapLazy([["casino-tournament-banner",[[1,"casino-tournament-banner",{"useEvent":[1,"use-event"],"endpoint":[1],"state":[1],"enrolled":[4],"startTime":[1,"start-time"],"endTime":[1,"end-time"],"thumbnail":[1],"language":[1],"showCalendar":[4,"show-calendar"],"shortStart":[4,"short-start"],"shortstartformat":[1],"showDate":[4,"show-date"],"showRunningDate":[4,"show-running-date"],"showCheck":[4,"show-check"],"cardMode":[4,"card-mode"],"nameOrTitle":[1,"name-or-title"],"tournamentId":[1,"tournament-id"],"session":[1],"loginEvent":[1,"login-event"],"loginUrl":[1,"login-url"],"registerEvent":[1,"register-event"],"registerUrl":[1,"register-url"],"currency":[1],"bonusCode":[1,"bonus-code"],"showReadMore":[4,"show-read-more"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"stateText":[32],"limitStylingAppends":[32],"stylingContainer":[32],"startdate":[32],"tournamentLeftDays":[32],"showRemain":[32],"durationInterval":[32]},[[8,"getTournamentInfoCompleted","infoCompletedHandler"]]]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;