@everymatrix/lottery-game-page 0.1.23 → 0.1.25
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/cjs/helper-accordion.cjs.entry.js +0 -6
- package/dist/cjs/helper-filters_2.cjs.entry.js +2 -73
- package/dist/cjs/helper-pagination.cjs.entry.js +0 -12
- package/dist/cjs/lottery-draw-results-history.cjs.entry.js +1 -27
- package/dist/cjs/lottery-game-page.cjs.entry.js +19 -12
- package/dist/cjs/lottery-ticket-controller.cjs.entry.js +1 -7
- package/dist/cjs/lottery-ticket.cjs.entry.js +0 -20
- package/dist/collection/components/lottery-game-page/lottery-game-page.js +23 -15
- package/dist/components/helper-accordion2.js +0 -6
- package/dist/components/helper-filters2.js +0 -26
- package/dist/components/helper-pagination.js +0 -12
- package/dist/components/lottery-draw-results-history2.js +1 -27
- package/dist/components/lottery-draw-results2.js +2 -47
- package/dist/components/lottery-game-page.js +19 -12
- package/dist/components/lottery-ticket-controller2.js +1 -7
- package/dist/components/lottery-ticket2.js +0 -20
- package/dist/esm/helper-accordion.entry.js +0 -6
- package/dist/esm/helper-filters_2.entry.js +2 -73
- package/dist/esm/helper-pagination.entry.js +0 -12
- package/dist/esm/lottery-draw-results-history.entry.js +1 -27
- package/dist/esm/lottery-game-page.entry.js +19 -12
- package/dist/esm/lottery-ticket-controller.entry.js +1 -7
- package/dist/esm/lottery-ticket.entry.js +0 -20
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/p-37a88b53.entry.js +1 -0
- package/dist/lottery-game-page/p-87298564.entry.js +1 -0
- package/dist/lottery-game-page/{p-c8162ede.entry.js → p-90003eb8.entry.js} +50 -50
- package/dist/lottery-game-page/p-bbe2e7e8.entry.js +1 -0
- package/dist/lottery-game-page/p-c0d7da97.entry.js +1 -0
- package/dist/lottery-game-page/p-d241f927.entry.js +1 -0
- package/dist/lottery-game-page/p-f1be92a2.entry.js +1 -0
- package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +1 -0
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/lottery-game-page/p-01132729.entry.js +0 -1
- package/dist/lottery-game-page/p-807dda48.entry.js +0 -1
- package/dist/lottery-game-page/p-a21ecd5f.entry.js +0 -1
- package/dist/lottery-game-page/p-b44e49d7.entry.js +0 -1
- package/dist/lottery-game-page/p-d91fc066.entry.js +0 -1
- package/dist/lottery-game-page/p-fc4ea90d.entry.js +0 -1
- package/dist/types/Users/dragos.bodea/Documents/everymatrix-prjs/stencil/widgets-stencil/packages/lottery-game-page/.stencil/packages/lottery-game-page/stencil.config.d.ts +0 -2
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$2 } from './lottery-grid2.js';
|
|
|
5
5
|
import { d as defineCustomElement$1 } from './lottery-ticket2.js';
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
ticket: 'Ticket',
|
|
@@ -13,12 +13,6 @@ const TRANSLATIONS = {
|
|
|
13
13
|
ro: {
|
|
14
14
|
ticket: 'Bilet',
|
|
15
15
|
},
|
|
16
|
-
fr: {
|
|
17
|
-
ticket: 'Billet'
|
|
18
|
-
},
|
|
19
|
-
ar: {
|
|
20
|
-
ticket: 'تذكرة',
|
|
21
|
-
}
|
|
22
16
|
};
|
|
23
17
|
const translate = (key, customLang) => {
|
|
24
18
|
const lang = customLang;
|
|
@@ -25,26 +25,6 @@ const TRANSLATIONS = {
|
|
|
25
25
|
resetButton: 'Reseteaza',
|
|
26
26
|
autoButton: 'Ma simt norocos'
|
|
27
27
|
},
|
|
28
|
-
fr: {
|
|
29
|
-
loading: 'Loading, please wait ...',
|
|
30
|
-
error: 'It was an error while trying to fetch the data',
|
|
31
|
-
grid: 'Grid',
|
|
32
|
-
multiplier: 'Multiplier',
|
|
33
|
-
numberOfDraws: 'Number of draws',
|
|
34
|
-
wagerPerDraw: 'Wager per draw',
|
|
35
|
-
resetButton: 'Reset',
|
|
36
|
-
autoButton: 'I feel lucky'
|
|
37
|
-
},
|
|
38
|
-
ar: {
|
|
39
|
-
loading: 'Loading, please wait ...',
|
|
40
|
-
error: 'It was an error while trying to fetch the data',
|
|
41
|
-
grid: 'Grid',
|
|
42
|
-
multiplier: 'Multiplier',
|
|
43
|
-
numberOfDraws: 'Number of draws',
|
|
44
|
-
wagerPerDraw: 'Wager per draw',
|
|
45
|
-
resetButton: 'Reset',
|
|
46
|
-
autoButton: 'I feel lucky'
|
|
47
|
-
}
|
|
48
28
|
};
|
|
49
29
|
const translate = (key, customLang) => {
|
|
50
30
|
const lang = customLang;
|
|
@@ -27,32 +27,6 @@ const TRANSLATIONS$1 = {
|
|
|
27
27
|
filterModalButton: 'Cauta',
|
|
28
28
|
filterOrDate: 'sau cauta dupa data'
|
|
29
29
|
},
|
|
30
|
-
fr: {
|
|
31
|
-
filterOpen: 'Filter',
|
|
32
|
-
filterClear: 'Clear',
|
|
33
|
-
filterModalTicketTitle: 'Ticket Results',
|
|
34
|
-
filterModalDrawTitle: 'Draws Results History',
|
|
35
|
-
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
36
|
-
filterDrawPlaceholder: 'Search for a draw ID',
|
|
37
|
-
filterDateRangePlaceholder: 'Date Range',
|
|
38
|
-
filterModalButton: 'Search',
|
|
39
|
-
filterFromCalendar: 'From',
|
|
40
|
-
filterToCalendar: 'To',
|
|
41
|
-
filterOrDate: 'or search by date'
|
|
42
|
-
},
|
|
43
|
-
ar: {
|
|
44
|
-
filterOpen: 'Filter',
|
|
45
|
-
filterClear: 'Clear',
|
|
46
|
-
filterModalTicketTitle: 'Ticket Results',
|
|
47
|
-
filterModalDrawTitle: 'Draws Results History',
|
|
48
|
-
filterTicketPlaceholder: 'Search for a ticket ID',
|
|
49
|
-
filterDrawPlaceholder: 'Search for a draw ID',
|
|
50
|
-
filterDateRangePlaceholder: 'Date Range',
|
|
51
|
-
filterModalButton: 'Search',
|
|
52
|
-
filterFromCalendar: 'From',
|
|
53
|
-
filterToCalendar: 'To',
|
|
54
|
-
filterOrDate: 'or search by date'
|
|
55
|
-
}
|
|
56
30
|
};
|
|
57
31
|
const translate$2 = (key, customLang) => {
|
|
58
32
|
const lang = customLang;
|
|
@@ -22416,40 +22390,6 @@ const TRANSLATIONS = {
|
|
|
22416
22390
|
ticketAmount: 'Valoarea biletului',
|
|
22417
22391
|
winUpTo: 'Poti castiga'
|
|
22418
22392
|
},
|
|
22419
|
-
fr: {
|
|
22420
|
-
drawResultsHeader: 'Résultats du dernier tirage',
|
|
22421
|
-
drawId: 'ID de tirage',
|
|
22422
|
-
drawName: 'Nom du jeu',
|
|
22423
|
-
drawDate: 'Date du tirage',
|
|
22424
|
-
drawNumbersGridDraw: 'Tirage des numéros Grille',
|
|
22425
|
-
drawNumbersGridTicket: 'Tirage des numéros Grille',
|
|
22426
|
-
ticketResult: 'Résultat du ticket',
|
|
22427
|
-
amountWon: 'Montant gagné',
|
|
22428
|
-
numberOfDraws: 'Nombre de tirages',
|
|
22429
|
-
multiplier: 'Multiplicateur',
|
|
22430
|
-
ticketPurchaseDate: 'Date d\'achat du billet',
|
|
22431
|
-
ticketStatus: 'Statut du ticket',
|
|
22432
|
-
ticketId: 'ID de billets',
|
|
22433
|
-
ticketAmount: 'Montant du billet',
|
|
22434
|
-
winUpTo: 'Gagnez jusqu\'à'
|
|
22435
|
-
},
|
|
22436
|
-
ar: {
|
|
22437
|
-
drawResultsHeader: 'نتائج آخر سحب',
|
|
22438
|
-
drawId: 'معرّف السحب',
|
|
22439
|
-
drawName: 'اسم اللعبة',
|
|
22440
|
-
drawDate: 'تاريخ السحب',
|
|
22441
|
-
drawNumbersGridDraw: 'شبكة أرقام السحب',
|
|
22442
|
-
drawNumbersGridTicket: 'شبكة أرقام السحب',
|
|
22443
|
-
ticketResult: 'نتيجة التذكرة',
|
|
22444
|
-
amountWon: 'المبلغ الذي تم ربحه',
|
|
22445
|
-
numberOfDraws: 'عدد السحوبات',
|
|
22446
|
-
multiplier: 'مضاعف',
|
|
22447
|
-
ticketPurchaseDate: 'تاريخ شراء التذكرة',
|
|
22448
|
-
ticketStatus: 'حالة التذكرة',
|
|
22449
|
-
ticketId: 'معرّف التذكرة',
|
|
22450
|
-
ticketAmount: 'مبلغ التذكرة',
|
|
22451
|
-
winUpTo: 'ربح يصل إلى'
|
|
22452
|
-
}
|
|
22453
22393
|
};
|
|
22454
22394
|
const translate = (key, customLang) => {
|
|
22455
22395
|
const lang = customLang;
|
|
@@ -22548,8 +22488,7 @@ const LotteryDrawResults = class {
|
|
|
22548
22488
|
this.ticketDataLoaded = true;
|
|
22549
22489
|
}
|
|
22550
22490
|
return this.ticketData;
|
|
22551
|
-
})
|
|
22552
|
-
.then((response) => {
|
|
22491
|
+
}).then((response) => {
|
|
22553
22492
|
response.forEach(ticket => {
|
|
22554
22493
|
if (ticket.drawResults.length) {
|
|
22555
22494
|
ticket.drawResults.forEach(draw => {
|
|
@@ -22562,20 +22501,13 @@ const LotteryDrawResults = class {
|
|
|
22562
22501
|
if (!this.ticketDraws.some(el => el.drawId === draw.drawId)) {
|
|
22563
22502
|
this.ticketDraws.push({ drawId: draw.drawId, drawNumbers: data.winningNumbers });
|
|
22564
22503
|
}
|
|
22565
|
-
})
|
|
22566
|
-
.catch((err) => {
|
|
22567
|
-
console.log('error ', err);
|
|
22568
22504
|
});
|
|
22569
22505
|
});
|
|
22570
22506
|
}
|
|
22571
22507
|
return this.ticketDraws;
|
|
22572
22508
|
});
|
|
22573
|
-
})
|
|
22574
|
-
.then(() => {
|
|
22509
|
+
}).then(() => {
|
|
22575
22510
|
this.hasDrawNumbers = true;
|
|
22576
|
-
})
|
|
22577
|
-
.catch((err) => {
|
|
22578
|
-
console.log('error ', err);
|
|
22579
22511
|
});
|
|
22580
22512
|
};
|
|
22581
22513
|
this.changeBox = (index) => {
|
|
@@ -22614,9 +22546,6 @@ const LotteryDrawResults = class {
|
|
|
22614
22546
|
Promise.all(promises)
|
|
22615
22547
|
.then(() => {
|
|
22616
22548
|
this.isLoading = false;
|
|
22617
|
-
}).catch((err) => {
|
|
22618
|
-
console.log('error ', err);
|
|
22619
|
-
this.isLoading = false;
|
|
22620
22549
|
});
|
|
22621
22550
|
}
|
|
22622
22551
|
componentDidRender() {
|
|
@@ -28,18 +28,6 @@ const TRANSLATIONS = {
|
|
|
28
28
|
nextPage: 'Urmatoarea',
|
|
29
29
|
lastPage: 'Ultima'
|
|
30
30
|
},
|
|
31
|
-
fr: {
|
|
32
|
-
firstPage: 'First',
|
|
33
|
-
previousPage: 'Previous',
|
|
34
|
-
nextPage: 'Next',
|
|
35
|
-
lastPage: 'Last'
|
|
36
|
-
},
|
|
37
|
-
ar: {
|
|
38
|
-
firstPage: 'First',
|
|
39
|
-
previousPage: 'Previous',
|
|
40
|
-
nextPage: 'Next',
|
|
41
|
-
lastPage: 'Last'
|
|
42
|
-
}
|
|
43
31
|
};
|
|
44
32
|
const translate = (key, customLang) => {
|
|
45
33
|
const lang = customLang;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
drawResultsHeader: 'Draw results history',
|
|
@@ -29,32 +29,6 @@ const TRANSLATIONS = {
|
|
|
29
29
|
noResults: 'Niciun rezultat',
|
|
30
30
|
fetchingResults: 'Se obtin rezultatele'
|
|
31
31
|
},
|
|
32
|
-
fr: {
|
|
33
|
-
drawResultsHeader: 'Dessiner l\'historique des résultats',
|
|
34
|
-
drawId: 'ID de tirage',
|
|
35
|
-
drawDate: 'Date du tirage',
|
|
36
|
-
drawNumbersGridA: 'Tirage des numéros Grille',
|
|
37
|
-
viewAllResults: 'Voir tout',
|
|
38
|
-
lastFiveDraws: '5 derniers tirages',
|
|
39
|
-
lastTenDraws: '10 derniers tirages',
|
|
40
|
-
lastFifteenDraws: '15 derniers tirages',
|
|
41
|
-
allDrawResultsHistory: 'Historique des résultats de tous les tirages',
|
|
42
|
-
noResults: 'Aucun résultat',
|
|
43
|
-
fetchingResults: 'Récupération des résultats'
|
|
44
|
-
},
|
|
45
|
-
ar: {
|
|
46
|
-
drawResultsHeader: 'سجل نتائج السحب',
|
|
47
|
-
drawId: 'معرّف السحب',
|
|
48
|
-
drawDate: 'تاريخ السحب',
|
|
49
|
-
drawNumbersGridA: 'شبكة أرقام السحب',
|
|
50
|
-
viewAllResults: 'عرض الكل',
|
|
51
|
-
lastFiveDraws: 'آخر 5 سحوبات',
|
|
52
|
-
lastTenDraws: 'آخر 10 سحوبات',
|
|
53
|
-
lastFifteenDraws: 'آخر 15 سحبًا',
|
|
54
|
-
allDrawResultsHistory: 'سجل نتائج كل السحوبات',
|
|
55
|
-
noResults: 'لا توجد نتائج',
|
|
56
|
-
fetchingResults: 'جلب النتائج'
|
|
57
|
-
}
|
|
58
32
|
};
|
|
59
33
|
const translate = (key, customLang) => {
|
|
60
34
|
const lang = customLang;
|
|
@@ -161,10 +161,12 @@ const LotteryGamePage = class {
|
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
// @TODO fix `any` type later, I'm lazy now
|
|
164
|
+
handleSessionIdValue() {
|
|
165
|
+
this.isLoggedIn = true;
|
|
166
|
+
}
|
|
164
167
|
connectedCallback() {
|
|
165
168
|
this.getGameDetails();
|
|
166
169
|
this.getDraws();
|
|
167
|
-
console.log(this.language);
|
|
168
170
|
if (this.sessionId) {
|
|
169
171
|
this.isLoggedIn = true;
|
|
170
172
|
}
|
|
@@ -181,12 +183,14 @@ const LotteryGamePage = class {
|
|
|
181
183
|
// end custom styling area
|
|
182
184
|
}
|
|
183
185
|
countdownLogic(date) {
|
|
184
|
-
|
|
185
|
-
this.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
if (date) {
|
|
187
|
+
this.interval = setInterval(() => {
|
|
188
|
+
this.daysRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60 * 24));
|
|
189
|
+
this.hoursRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60 * 60) - this.daysRemaining * 24);
|
|
190
|
+
this.minutesRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / (1000 * 60) - this.daysRemaining * 24 * 60 - this.hoursRemaining * 60);
|
|
191
|
+
this.secondsRemaining = Math.floor((Date.parse(date) - new Date().getTime()) / 1000 - this.daysRemaining * 24 * 60 * 60 - this.hoursRemaining * 60 * 60 - this.minutesRemaining * 60);
|
|
192
|
+
}, 1000);
|
|
193
|
+
}
|
|
190
194
|
}
|
|
191
195
|
disconnectedCallback() {
|
|
192
196
|
clearInterval(this.interval);
|
|
@@ -292,20 +296,20 @@ const LotteryGamePage = class {
|
|
|
292
296
|
return response.json();
|
|
293
297
|
})
|
|
294
298
|
.then((data) => {
|
|
295
|
-
var _a;
|
|
299
|
+
var _a, _b;
|
|
296
300
|
let upcoming = data.items.filter((item) => {
|
|
297
301
|
if (Date.parse(item.date) > new Date().getTime()) {
|
|
298
302
|
return !item.winningNumbers;
|
|
299
303
|
}
|
|
300
304
|
});
|
|
301
305
|
let past = data.items.filter((item) => item.winningNumbers);
|
|
302
|
-
this.latestDraw = upcoming[0];
|
|
303
|
-
this.nextDate = this.latestDraw.date;
|
|
304
|
-
this.countdownLogic(this.nextDate);
|
|
306
|
+
this.latestDraw = upcoming[0] || {};
|
|
307
|
+
this.nextDate = (_a = this.latestDraw) === null || _a === void 0 ? void 0 : _a.date;
|
|
308
|
+
this.countdownLogic(this.nextDate || '');
|
|
305
309
|
this.lastDrawId = past[past.length - 1].id;
|
|
306
310
|
// calculate total winnings
|
|
307
311
|
// @TODO fix any type
|
|
308
|
-
(
|
|
312
|
+
(_b = this.latestDraw) === null || _b === void 0 ? void 0 : _b.prizes.forEach((element) => {
|
|
309
313
|
this.totalWinningsAmount += JSON.parse(element.amount);
|
|
310
314
|
});
|
|
311
315
|
})
|
|
@@ -395,6 +399,9 @@ const LotteryGamePage = class {
|
|
|
395
399
|
}
|
|
396
400
|
static get assetsDirs() { return ["static"]; }
|
|
397
401
|
get element() { return getElement(this); }
|
|
402
|
+
static get watchers() { return {
|
|
403
|
+
"sessionId": ["handleSessionIdValue"]
|
|
404
|
+
}; }
|
|
398
405
|
};
|
|
399
406
|
LotteryGamePage.style = lotteryGamePageCss;
|
|
400
407
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-0f8edfd2.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
|
-
const SUPPORTED_LANGUAGES = ['ro', 'en'
|
|
4
|
+
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
5
5
|
const TRANSLATIONS = {
|
|
6
6
|
en: {
|
|
7
7
|
ticket: 'Ticket',
|
|
@@ -9,12 +9,6 @@ const TRANSLATIONS = {
|
|
|
9
9
|
ro: {
|
|
10
10
|
ticket: 'Bilet',
|
|
11
11
|
},
|
|
12
|
-
fr: {
|
|
13
|
-
ticket: 'Billet'
|
|
14
|
-
},
|
|
15
|
-
ar: {
|
|
16
|
-
ticket: 'تذكرة',
|
|
17
|
-
}
|
|
18
12
|
};
|
|
19
13
|
const translate = (key, customLang) => {
|
|
20
14
|
const lang = customLang;
|
|
@@ -23,26 +23,6 @@ const TRANSLATIONS = {
|
|
|
23
23
|
resetButton: 'Reseteaza',
|
|
24
24
|
autoButton: 'Ma simt norocos'
|
|
25
25
|
},
|
|
26
|
-
fr: {
|
|
27
|
-
loading: 'Loading, please wait ...',
|
|
28
|
-
error: 'It was an error while trying to fetch the data',
|
|
29
|
-
grid: 'Grid',
|
|
30
|
-
multiplier: 'Multiplier',
|
|
31
|
-
numberOfDraws: 'Number of draws',
|
|
32
|
-
wagerPerDraw: 'Wager per draw',
|
|
33
|
-
resetButton: 'Reset',
|
|
34
|
-
autoButton: 'I feel lucky'
|
|
35
|
-
},
|
|
36
|
-
ar: {
|
|
37
|
-
loading: 'Loading, please wait ...',
|
|
38
|
-
error: 'It was an error while trying to fetch the data',
|
|
39
|
-
grid: 'Grid',
|
|
40
|
-
multiplier: 'Multiplier',
|
|
41
|
-
numberOfDraws: 'Number of draws',
|
|
42
|
-
wagerPerDraw: 'Wager per draw',
|
|
43
|
-
resetButton: 'Reset',
|
|
44
|
-
autoButton: 'I feel lucky'
|
|
45
|
-
}
|
|
46
26
|
};
|
|
47
27
|
const translate = (key, customLang) => {
|
|
48
28
|
const lang = customLang;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,b as e}from"./p-b4e2988a.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((t=>e([["p-
|
|
1
|
+
import{p as t,b as e}from"./p-b4e2988a.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),t(i)})().then((t=>e([["p-37a88b53",[[1,"lottery-game-page",{endpoint:[1],gameId:[1,"game-id"],playerId:[2,"player-id"],sessionId:[1,"session-id"],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[32],tickets:[32],tabIndex:[32],hasErrors:[32],totalAmount:[32],successVisible:[32],deleteVisible:[32],deleteEventData:[32],daysRemaining:[32],hoursRemaining:[32],minutesRemaining:[32],secondsRemaining:[32],latestDraw:[32],totalWinningsAmount:[32],nextDate:[32],isLoggedIn:[32],loginModalVisible:[32],limitStylingAppends:[32]},[[0,"ticketCompleted","gridFilledHandler"],[0,"gridDirty","gridDirtyHandler"],[0,"deleteTicket","deleteTicketHandler"],[0,"modalCloseEvent","modalCloseEvent"],[0,"stakeChange","stakeChangeHandler"],[0,"multiplierChange","multiplierChangeHandler"]]]]],["p-d241f927",[[1,"helper-pagination",{firstPage:[1540,"first-page"],previousPage:[1540,"previous-page"],offset:[1538],limit:[1538],total:[1538],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],offsetInt:[32],lastPage:[32],limitInt:[32],totalInt:[32],pagesArray:[32],endInt:[32],limitStylingAppends:[32]}]]],["p-97048566",[[1,"lottery-grid",{ticketId:[2,"ticket-id"],totalNumbers:[2,"total-numbers"],gameId:[1,"game-id"],maximumAllowed:[2,"maximum-allowed"],minimumAllowed:[2,"minimum-allowed"],selectable:[4],selectedNumbers:[1,"selected-numbers"],displaySelected:[4,"display-selected"],language:[1],gridIndex:[2,"grid-index"],gridType:[1,"grid-type"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],numbers:[32],limitStylingAppends:[32]},[[0,"lotteryBulletSelection","lotteryBulletSelectionHandler"],[4,"resetSelection","resetSelectionHandler"],[4,"autoSelection","autoSelectionHandler"]]],[1,"lottery-bullet",{value:[1],selectable:[4],isSelected:[4,"is-selected"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-90003eb8",[[1,"lottery-draw-results",{endpoint:[1],gameId:[1,"game-id"],language:[1],playerId:[1,"player-id"],drawMode:[4,"draw-mode"],drawId:[1,"draw-id"],gameName:[1,"game-name"],ticketDate:[1,"ticket-date"],ticketStatus:[1,"ticket-status"],ticketId:[1,"ticket-id"],ticketAmount:[1,"ticket-amount"],ticketMultiplier:[4,"ticket-multiplier"],ticketDrawCount:[2,"ticket-draw-count"],ticketNumbers:[1,"ticket-numbers"],sessionId:[1,"session-id"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],isLoading:[32],rules:[32],toggleDrawer:[32],hasErrors:[32],errorText:[32],ticketData:[32],ticketDataLoaded:[32],ticketDraws:[32],hasDrawNumbers:[32],limitStylingAppends:[32]}],[1,"helper-filters",{showFilterId:[4,"show-filter-id"],activateTicketSearch:[4,"activate-ticket-search"],gameId:[1,"game-id"],playerId:[1,"player-id"],session:[1],postMessage:[4,"post-message"],language:[1],quickFiltersActive:[4,"quick-filters-active"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showFilterModal:[32],showClearButton:[32],filterData:[32],filterDataReset:[32],limitStylingAppends:[32]},[[0,"modalCloseEvent","modalCloseEvent"]]]]],["p-bbe2e7e8",[[1,"lottery-draw-results-history",{endpoint:[1],gameId:[1,"game-id"],numberOfResults:[2,"number-of-results"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],drawData:[32],displayAllDrawsResults:[32],showQuickFilters:[32],winningDataSetsData:[32],dateFiltersFrom:[32],dateFiltersTo:[32],isLoading:[32],noResults:[32],limitStylingAppends:[32]},[[0,"filterSelection","filtersHandler"],[0,"filterSelectionReset","clearFiltersHandler"]]]]],["p-c0d7da97",[[1,"lottery-ticket",{endpoint:[1],gameId:[1,"game-id"],numberOfGrids:[2,"number-of-grids"],multipleDraws:[4,"multiple-draws"],ticketId:[2,"ticket-id"],resetButton:[4,"reset-button"],autoPick:[4,"auto-pick"],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],multiplier:[32],numberOfDraws:[32],isLoading:[32],hasErrors:[32],ticketDone:[32],isCustomSelect:[32],amountInfo:[32],limitStylingAppends:[32]},[[8,"click","checkForClickOutside"],[0,"gridFilled","gridFilledHandler"]]]]],["p-f1be92a2",[[1,"lottery-ticket-controller",{endpoint:[1],ticketId:[2,"ticket-id"],ticketDescription:[1,"ticket-description"],gameId:[1,"game-id"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],numberOfGrids:[2,"number-of-grids"],last:[4],language:[1],autoPick:[4,"auto-pick"],resetButton:[4,"reset-button"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]]]],["p-07f98587",[[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-87298564",[[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}]]],["p-800590f3",[[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]],["p-4098d6d4",[[1,"lottery-game-details",{clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]],["p-e816baee",[[1,"helper-modal",{titleModal:[1,"title-modal"],visible:[1540],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}]]]],t)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-b4e2988a.js";const a=["ro","en","fr","ar"],r={en:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Last Draw Results",modalLogin:"Please login to submit a ticket"},ro:{error:"Eroare",title:"Loto 6/49",backButton:"Inapoi",lobbyButton:"Lobby",prize:"MARELE JACKPOT OMG",winUpTo:"Castiga pana la",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",createTicket:"Creeaza bilet",modalSuccess:"Achizitie efectuata cu succes",deleteTicketModalTitle:"Sterge biletul",deleteTicketModalText:"Esti sigur ca vrei sa stergi acest bilet?",deleteTicketModalCancel:"Anuleaza",deleteTicketModalConfirm:"Sterge",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"Please login to submit a ticket"},fr:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Résultats du dernier tirage",modalLogin:"Please login to submit a ticket"},ar:{error:"خطأ",title:"كرونو",backButton:"خلف",lobbyButton:"ردهة",prize:"جائزة",winUpTo:"الفوز بما يصل الى",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",createTicket:"إنشاء تذكرة",modalSuccess:"!سيتم الشراء بنجاح قريبًا",deleteTicketModalTitle:"حذف التذكرة",deleteTicketModalText:"هل أنت متأكد أنك تريد حذف هذه التذكرة؟",deleteTicketModalCancel:"يلغي",deleteTicketModalConfirm:"حذف",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",lastDrawResultsTitle:"نتائج آخر سحب",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة"}},s=(t,e)=>{const i=e;return r[void 0!==i&&a.includes(i)?i:"en"][t]},n=class{constructor(e){t(this,e),this.language="en",this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.tickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.deleteVisible=!1,this.latestDraw={},this.totalWinningsAmount=0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1,this.multiplier=!1,this.quickPick=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleSessionIdValue(){this.isLoggedIn=!0}connectedCallback(){this.getGameDetails(),this.getDraws(),this.sessionId&&(this.isLoggedIn=!0)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){t&&(this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)}),1e3))}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.gameData=t,this.basicStake=this.gameData.rules.stakes[0].amount;let e=this.gameData.draws.filter((t=>!t.winningNumbers));this.nextDraw=e[0].id,this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.tickets.forEach((t=>{t.completed&&(this.totalAmount+=t.amount*t.stake)})),this.currency=t}gridFilledHandler(t){this.tickets=this.tickets.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];return i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10))),{gameId:e.gameId,ticketId:e.ticketId,completed:!0,amount:t.detail.draws,stake:e.stake,selectedNumbers:i}}return e})),this.calculateTotalAmount()}gridDirtyHandler(t){this.tickets=this.tickets.map((e=>e.gameId==t.detail.id?{gameId:e.gameId,ticketId:e.ticketId,completed:!1,amount:e.amount,stake:e.stake,grids:[]}:e))}deleteTicketHandler(t){this.deleteVisible=!0,this.deleteEventData=t}modalCloseEvent(){this.deleteVisible=!1,this.loginModalVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.tickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){this.multiplier=t.detail}getDraws(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{var e,i;let a=t.items.filter((t=>{if(Date.parse(t.date)>(new Date).getTime())return!t.winningNumbers})),r=t.items.filter((t=>t.winningNumbers));this.latestDraw=a[0]||{},this.nextDate=null===(e=this.latestDraw)||void 0===e?void 0:e.date,this.countdownLogic(this.nextDate||""),this.lastDrawId=r[r.length-1].id,null===(i=this.latestDraw)||void 0===i||i.prizes.forEach((t=>{this.totalWinningsAmount+=JSON.parse(t.amount)}))})).catch((t=>{console.log("error ",t)}))}confirmDeleteTicketHandler(t){this.tickets=this.tickets.filter((e=>e.ticketId!=t.detail.ticketId)),this.calculateTotalAmount(),this.deleteVisible=!1}createNewTicket(){this.tickets=[...this.tickets,{gameId:this.gameId,ticketId:this.tickets.length+1,completed:!1,amount:1,stake:this.basicStake,grids:[]}]}showLoginModal(){this.loginModalVisible=!0}submitTickets(){let t=new URL(`${this.endpoint}/tickets`),e={gameId:this.gameId,tickets:[]};this.tickets.forEach((t=>{e.tickets.push({startingDrawId:this.nextDraw,amount:t.stake,gameId:this.gameId,currency:this.currency,selection:t.selectedNumbers,multiplier:this.multiplier,drawCount:t.amount,quickPick:this.quickPick})}));let i={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`},body:JSON.stringify(e)};fetch(t.href,i).then((t=>{if(t.status>300)throw new Error("err");return t.json()})).then((t=>{console.log("data",t)})).catch((t=>{console.log("error ",t)})),this.successVisible=!0}render(){return this.hasErrors?e("div",{class:"GamePage"},e("div",{class:"Title"},s("error",this.language))):e("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},e("div",{class:"GridBanner"},e("div",{class:"BannerButtonsWrapper"},e("button",{class:"BannerBackButton"},e("span",{class:"BannerBackButtonArrow"},"ᐸ "),s("backButton",this.language)),e("button",{class:"BannerLobbyButton"},s("lobbyButton",this.language))),e("div",{class:"Tabs"},e("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},s("buy",this.language)),e("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},s("viewLatest",this.language)))),e("div",{class:"NextDrawWrapper"},e("div",{class:"TotalWinnings"},s("winUpTo",this.language),": ",e("span",null,"$",this.totalWinningsAmount.toLocaleString("en-US",{maximumFractionDigits:2}))),e("div",{class:"NextDraw"},e("p",{class:"BannerText"},s("nextDraw",this.language)),e("div",{class:"BannerCountdown"},e("span",{class:"CountdownDays"},this.daysRemaining,"D"),e("span",{class:"CountdownHours"},this.hoursRemaining,"H"),e("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),e("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&e("div",{class:"GamePageContent"},e("div",{class:"GameDetails"},e("lottery-game-details",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),e("div",{class:"TicketsWrapper"},this.tickets.map((t=>e("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":this.autoPick,"reset-button":this.resetButton,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),e("div",{class:"CreateNewTicket"},e("button",{onClick:()=>this.createNewTicket()},"+"),e("span",null,s("createTicket",this.language)))),e("div",{class:"OrderSummary"},e("h3",{class:"OrderSummaryTitle"},s("orderSummaryTitle",this.language)),e("div",{class:"Ticket"},s("orderSummaryTickets",this.language),": ",e("span",null,this.tickets.length)),e("div",{class:"Total"},s("orderSummaryTotal",this.language),": ",e("span",null,this.totalAmount," ",this.currency)),e("div",{class:"ButtonWrapper"},this.isLoggedIn&&e("span",{class:"Button",onClick:()=>this.submitTickets()},s("orderSummarySubmit",this.language)),!this.isLoggedIn&&e("div",null,e("span",{class:"Button",onClick:()=>this.showLoginModal()},s("orderSummarySubmit",this.language)),e("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("p",{class:"SubmitModalSuccess"},s("modalLogin",this.language))))))),1==this.tabIndex&&e("div",null,e("h4",{class:"LastDrawResultsTitle"},s("lastDrawResultsTitle",this.language)),e("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"draw-id":this.lastDrawId,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}),e("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),e("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("p",{class:"SubmitModalSuccess"},s("modalSuccess",this.language))),e("helper-modal",{"title-modal":"Delete Ticket",visible:this.deleteVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},e("div",{class:"DeleteTicketModalWrapper"},e("h3",{class:"DeleteTicketModalTitle"},s("deleteTicketModalTitle",this.language)),e("p",{class:"DeleteTicketModalText"},s("deleteTicketModalText",this.language)),e("div",{class:"DeleteTicketModalButtons"},e("button",{class:"DeleteTicketModalCancel",onClick:()=>this.modalCloseEvent()},s("deleteTicketModalCancel",this.language)),e("button",{class:"DeleteTicketModalConfirm",onClick:()=>this.confirmDeleteTicketHandler(this.deleteEventData)},s("deleteTicketModalConfirm",this.language))))))}static get assetsDirs(){return["static"]}get element(){return i(this)}static get watchers(){return{sessionId:["handleSessionIdValue"]}}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, #f1f1f1 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;border-bottom:solid 1px #D4D4D4;line-height:50px}.OrderSummary .Ticket span{text-align:right}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';export{n as lottery_game_page}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-b4e2988a.js";const s=["ro","en"],o={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)}}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return o[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';export{r as helper_accordion}
|