@everymatrix/lottery-tipping-latest-result 1.86.26 → 1.86.28
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/{general-tooltip_6.cjs.entry.js → general-tooltip_7.cjs.entry.js} +428 -254
- package/dist/cjs/{index-2ca263e9.js → index-6a03d840.js} +3 -2
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{lottery-tipping-latest-result-3b809e79.js → lottery-tipping-latest-result-1763f6ca.js} +75 -46
- package/dist/cjs/lottery-tipping-latest-result.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/lottery-tipping-calendar/lottery-tipping-calendar.css +1 -1
- package/dist/collection/components/lottery-tipping-calendar/lottery-tipping-calendar.js +2 -2
- package/dist/collection/components/lottery-tipping-latest-result/lottery-tipping-latest-result.css +6 -0
- package/dist/collection/components/lottery-tipping-latest-result/lottery-tipping-latest-result.js +46 -38
- package/dist/collection/utils/api.js +10 -0
- package/dist/collection/utils/utils.js +22 -25
- package/dist/esm/{general-tooltip_6.entry.js → general-tooltip_7.entry.js} +429 -256
- package/dist/esm/{index-32d8a144.js → index-52961f92.js} +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{lottery-tipping-latest-result-c2b7bf41.js → lottery-tipping-latest-result-59297760.js} +75 -46
- package/dist/esm/lottery-tipping-latest-result.js +3 -3
- package/dist/lottery-tipping-latest-result/{general-tooltip_6.entry.js → general-tooltip_7.entry.js} +239 -239
- package/dist/lottery-tipping-latest-result/{index-32d8a144.js → index-52961f92.js} +2 -2
- package/dist/lottery-tipping-latest-result/index.esm.js +1 -1
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result-59297760.js +1 -0
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result.esm.js +1 -1
- package/dist/types/components/lottery-tipping-latest-result/lottery-tipping-latest-result.d.ts +4 -4
- package/dist/types/components.d.ts +0 -8
- package/dist/types/models/index.d.ts +17 -0
- package/dist/types/utils/api.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +4 -2
- package/package.json +1 -1
- package/dist/lottery-tipping-latest-result/lottery-tipping-latest-result-c2b7bf41.js +0 -1
|
@@ -74,10 +74,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
74
74
|
}
|
|
75
75
|
switch(bundleId) {
|
|
76
76
|
|
|
77
|
-
case 'general-
|
|
77
|
+
case 'general-tooltip_7.cjs':
|
|
78
78
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
79
79
|
/* webpackMode: "lazy" */
|
|
80
|
-
'./general-
|
|
80
|
+
'./general-tooltip_7.cjs.entry.js')); }).then(processMod, consoleError);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
@@ -1357,6 +1357,7 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1357
1357
|
// src/runtime/nonce.ts
|
|
1358
1358
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1359
1359
|
|
|
1360
|
+
exports.Host = Host;
|
|
1360
1361
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1361
1362
|
exports.createEvent = createEvent;
|
|
1362
1363
|
exports.getElement = getElement;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-
|
|
6
|
-
require('./index-
|
|
5
|
+
const lotteryTippingLatestResult = require('./lottery-tipping-latest-result-1763f6ca.js');
|
|
6
|
+
require('./index-6a03d840.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6a03d840.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["general-
|
|
11
|
+
return index.bootstrapLazy([["general-tooltip_7.cjs",[[1,"lottery-tipping-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[1537,"game-id"],"playerId":[1538,"player-id"],"sessionId":[1537,"session-id"],"hasDrawDates":[32],"lastestDate":[32],"drawList":[32],"curDrawItem":[32],"curDrawItemIdx":[32],"curDrawSelection":[32],"curDrawSelectionBettingType":[32],"curDrawSelectionMap":[32],"curPrizes":[32],"curPrizeMap":[32],"curTurnOver":[32],"isLoading":[32],"playTypes":[32],"bettingTypes":[32],"vendorGameId":[32],"isLoadingTurnover":[32]},[[0,"changeDate","handleChangeDate"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-tipping-calendar",{"date":[1],"highLightDates":[16],"language":[513],"translationUrl":[520,"translation-url"],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"date":["handleDateChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-6a03d840.js');
|
|
4
4
|
|
|
5
5
|
// This icon file is generated automatically.
|
|
6
6
|
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
|
@@ -384,32 +384,29 @@ const bulletMap = {
|
|
|
384
384
|
'2': '2'
|
|
385
385
|
};
|
|
386
386
|
function parseBulletNumber(numberArr) {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
value: bulletMap[key]
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
return bulletArr;
|
|
387
|
+
return numberArr.map((v, index) => ({
|
|
388
|
+
isSelected: v === 1,
|
|
389
|
+
value: bulletMap[index]
|
|
390
|
+
}));
|
|
395
391
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
392
|
+
const outcomeIndexMap = {
|
|
393
|
+
H: 0,
|
|
394
|
+
D: 1,
|
|
395
|
+
A: 2
|
|
396
|
+
};
|
|
397
|
+
const parseEachLineNumber = (outcomes) => {
|
|
398
|
+
const res = outcomes.map((matchOutcomes) => {
|
|
399
|
+
const selected = matchOutcomes[0];
|
|
400
|
+
const result = [0, 0, 0];
|
|
401
|
+
selected.forEach((outcome) => {
|
|
402
|
+
const idx = outcomeIndexMap[outcome];
|
|
403
|
+
if (idx !== undefined)
|
|
404
|
+
result[idx] = 1;
|
|
405
|
+
});
|
|
406
|
+
return parseBulletNumber(result);
|
|
410
407
|
});
|
|
411
|
-
return
|
|
412
|
-
}
|
|
408
|
+
return res;
|
|
409
|
+
};
|
|
413
410
|
function thousandSeperator(value) {
|
|
414
411
|
if (value === 0) {
|
|
415
412
|
return '0';
|
|
@@ -439,7 +436,17 @@ async function fetchGameInfo(endpoint, gameId) {
|
|
|
439
436
|
}
|
|
440
437
|
}
|
|
441
438
|
|
|
442
|
-
|
|
439
|
+
async function fetchSaleStatistics({ endpoint, gameId, drawId }) {
|
|
440
|
+
try {
|
|
441
|
+
const res = await fetchRequest(`${endpoint}/games/${gameId}/draws/${drawId}/saleStatistics`);
|
|
442
|
+
return res;
|
|
443
|
+
}
|
|
444
|
+
catch (error) {
|
|
445
|
+
return Promise.reject(error);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const lotteryTippingLatestResultCss = ".lottery-tipping-latest-result {\n padding: 16px;\n container-type: inline-size;\n background-color: var(--emw--color-background, #fff);\n}\n.lottery-tipping-latest-result .date-selection {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 24px;\n width: 400px;\n}\n.lottery-tipping-latest-result .date-selection-leftIcon, .lottery-tipping-latest-result .date-selection-rightIcon {\n cursor: pointer;\n}\n\n.LotteryTippingTicketController__segmented-control {\n height: 2.2rem;\n display: inline-flex;\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n border-radius: 2rem;\n padding: 0.2rem;\n}\n.LotteryTippingTicketController__segment {\n background-color: transparent;\n border: none;\n padding: 0.3rem 0.8rem;\n cursor: pointer;\n font-weight: 500;\n border-radius: 2rem;\n outline: none;\n transition: background-color 0.25s ease, color 0.25s ease;\n white-space: nowrap;\n color: var(--emw--color-typography, #000);\n}\n.LotteryTippingTicketController__segment--active {\n background-color: var(--emw--color-background, #fff);\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n}\n.LotteryTippingTicketController__segment:not(.LotteryTippingTicketController__segment--active):hover {\n background-color: var(--emw--color-background-tertiary, #ccc);\n}\n\n.betting-type {\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 20px;\n}\n.betting-type-title {\n font-weight: 600;\n font-size: 16px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.betting-type-text {\n font-size: 16px;\n}\n\n.result-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 60%;\n margin: 0 auto;\n}\n.result-wrapper .winning-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .loading-wrap {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.result-wrapper .prize-result {\n width: 100%;\n margin-top: 20px;\n}\n.result-wrapper .prize-result-title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 12px;\n color: var(--emw--color-typography-secondary, #333);\n}\n.result-wrapper .prize-result-table {\n width: 100%;\n}\n.result-wrapper .prize-result-table-row {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-evenly;\n}\n.result-wrapper .prize-result-table-column {\n text-align: left;\n padding: 12px 14px;\n width: 160px;\n font-size: 14px;\n width: calc((100% - 2px) / 3);\n color: var(--emw--color-typography, #000);\n}\n.result-wrapper .prize-result-table-header {\n width: 100%;\n background-color: var(--emw--color-background-secondary, #e6e6e6);\n border-radius: 4px;\n}\n.result-wrapper .prize-result-table-body {\n background-color: var(--emw--color-background-tertiary, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-header .prize-result-table-column {\n color: var(--emw--color-typography, #000);\n font-weight: 600;\n border-right: 1px solid var(--emw--color-background, #fff);\n}\n.result-wrapper .prize-result-table .prize-result-table-body .prize-result-table-row:hover {\n color: var(--emw--color-typography, #000);\n background-color: var(--emw--color-background-secondary, #f5f5f5);\n}\n\n@container (max-width: 980px) and (min-width: 780px) {\n .result-wrapper {\n width: 84%;\n }\n}\n@container (max-width: 780px) and (min-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n}\n@container (max-width: 480px) {\n .result-wrapper {\n width: 100%;\n }\n .result-wrapper .winning-result {\n width: 100%;\n margin-top: 14px;\n }\n .result-wrapper .prize-result {\n width: 100%;\n }\n .result-wrapper .prize-result-table-column {\n padding: 6px;\n width: 100px;\n }\n}";
|
|
443
450
|
const LotteryTippingLatestResultStyle0 = lotteryTippingLatestResultCss;
|
|
444
451
|
|
|
445
452
|
const leftArrowIcon = renderIconDefinitionToSVGElement(LeftOutlined$1, {
|
|
@@ -457,7 +464,6 @@ const LotteryTippingLatestResult = class {
|
|
|
457
464
|
this.translationUrl = '';
|
|
458
465
|
this.language = 'en';
|
|
459
466
|
this.endpoint = undefined;
|
|
460
|
-
this.endpointTicket = undefined;
|
|
461
467
|
this.gameId = undefined;
|
|
462
468
|
this.playerId = undefined;
|
|
463
469
|
this.sessionId = undefined;
|
|
@@ -472,10 +478,11 @@ const LotteryTippingLatestResult = class {
|
|
|
472
478
|
this.curPrizes = undefined;
|
|
473
479
|
this.curPrizeMap = {};
|
|
474
480
|
this.curTurnOver = 0;
|
|
475
|
-
this.isLoading =
|
|
481
|
+
this.isLoading = true;
|
|
476
482
|
this.playTypes = null;
|
|
477
483
|
this.bettingTypes = undefined;
|
|
478
484
|
this.vendorGameId = undefined;
|
|
485
|
+
this.isLoadingTurnover = false;
|
|
479
486
|
}
|
|
480
487
|
handleClientStylingChange(newValue, oldValue) {
|
|
481
488
|
if (newValue != oldValue) {
|
|
@@ -496,8 +503,20 @@ const LotteryTippingLatestResult = class {
|
|
|
496
503
|
if (this.translationUrl) {
|
|
497
504
|
getTranslations(JSON.parse(this.translationUrl));
|
|
498
505
|
}
|
|
499
|
-
this.
|
|
500
|
-
|
|
506
|
+
this.initData();
|
|
507
|
+
}
|
|
508
|
+
async initData() {
|
|
509
|
+
try {
|
|
510
|
+
this.isLoading = true;
|
|
511
|
+
await Promise.all([this.getGameById(), this.fetDrawList()]);
|
|
512
|
+
this.getTurnOver();
|
|
513
|
+
}
|
|
514
|
+
catch (e) {
|
|
515
|
+
console.error(e);
|
|
516
|
+
}
|
|
517
|
+
finally {
|
|
518
|
+
this.isLoading = false;
|
|
519
|
+
}
|
|
501
520
|
}
|
|
502
521
|
componentDidLoad() {
|
|
503
522
|
if (this.stylingContainer) {
|
|
@@ -515,7 +534,6 @@ const LotteryTippingLatestResult = class {
|
|
|
515
534
|
async getGameById() {
|
|
516
535
|
var _a, _b, _c, _d;
|
|
517
536
|
try {
|
|
518
|
-
this.isLoading = true;
|
|
519
537
|
const gameInfo = await fetchGameInfo(this.endpoint, this.gameId);
|
|
520
538
|
this.vendorGameId = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.type;
|
|
521
539
|
this.playTypes = (_b = (_a = gameInfo === null || gameInfo === void 0 ? void 0 : gameInfo.rules) === null || _a === void 0 ? void 0 : _a.poolGame) === null || _b === void 0 ? void 0 : _b.playTypes;
|
|
@@ -524,9 +542,6 @@ const LotteryTippingLatestResult = class {
|
|
|
524
542
|
catch (e) {
|
|
525
543
|
console.log(e);
|
|
526
544
|
}
|
|
527
|
-
finally {
|
|
528
|
-
this.isLoading = false;
|
|
529
|
-
}
|
|
530
545
|
}
|
|
531
546
|
findLatestDateIdx(dateArr) {
|
|
532
547
|
const currentDate = new Date();
|
|
@@ -544,7 +559,6 @@ const LotteryTippingLatestResult = class {
|
|
|
544
559
|
}
|
|
545
560
|
async fetDrawList() {
|
|
546
561
|
try {
|
|
547
|
-
this.isLoading = true;
|
|
548
562
|
const GAME_DRAW_LIMIT = 9999;
|
|
549
563
|
const filterData = { status: 'PAYABLE', limit: GAME_DRAW_LIMIT };
|
|
550
564
|
const { items } = await fetchRequest(`${this.endpoint}/games/${this.gameId}/draws${toQueryParams(filterData)}`, 'GET');
|
|
@@ -560,7 +574,7 @@ const LotteryTippingLatestResult = class {
|
|
|
560
574
|
this.curDrawItem = filteredItems[this.curDrawItemIdx];
|
|
561
575
|
this.curDrawSelectionBettingType = filteredItems[this.curDrawItemIdx].winningNumbers[0].winning_type;
|
|
562
576
|
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
563
|
-
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.
|
|
577
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.poolGameOutcomes)];
|
|
564
578
|
});
|
|
565
579
|
this.curDrawItem.prizes.forEach((prize) => {
|
|
566
580
|
const winningType = prize.winningType;
|
|
@@ -574,14 +588,10 @@ const LotteryTippingLatestResult = class {
|
|
|
574
588
|
});
|
|
575
589
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
576
590
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
577
|
-
this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
|
|
578
591
|
}
|
|
579
592
|
catch (e) {
|
|
580
593
|
console.log(e);
|
|
581
594
|
}
|
|
582
|
-
finally {
|
|
583
|
-
this.isLoading = false;
|
|
584
|
-
}
|
|
585
595
|
}
|
|
586
596
|
get displayedPrizes() {
|
|
587
597
|
const correctItems = this.curPrizes
|
|
@@ -600,7 +610,7 @@ const LotteryTippingLatestResult = class {
|
|
|
600
610
|
this.curDrawItem = this.drawList[idx];
|
|
601
611
|
this.curDrawSelectionBettingType = this.curDrawItem.winningNumbers[0].winning_type;
|
|
602
612
|
this.curDrawItem.winningNumbers.forEach((item) => {
|
|
603
|
-
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.
|
|
613
|
+
this.curDrawSelectionMap[item.winning_type] = [parseEachLineNumber(item.poolGameOutcomes)];
|
|
604
614
|
});
|
|
605
615
|
this.curPrizeMap = {};
|
|
606
616
|
this.curDrawItem.prizes.forEach((prize) => {
|
|
@@ -615,7 +625,7 @@ const LotteryTippingLatestResult = class {
|
|
|
615
625
|
});
|
|
616
626
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
617
627
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
618
|
-
this.
|
|
628
|
+
this.getTurnOver();
|
|
619
629
|
}
|
|
620
630
|
handleChangeDate(e) {
|
|
621
631
|
const idx = e.detail;
|
|
@@ -631,12 +641,31 @@ const LotteryTippingLatestResult = class {
|
|
|
631
641
|
this.changeCurDateItem(++this.curDrawItemIdx);
|
|
632
642
|
}
|
|
633
643
|
}
|
|
644
|
+
async getTurnOver() {
|
|
645
|
+
var _a, _b, _c;
|
|
646
|
+
if (!((_a = this.curDrawItem) === null || _a === void 0 ? void 0 : _a.id))
|
|
647
|
+
return;
|
|
648
|
+
try {
|
|
649
|
+
this.isLoadingTurnover = true;
|
|
650
|
+
const res = await fetchSaleStatistics({
|
|
651
|
+
endpoint: this.endpoint,
|
|
652
|
+
gameId: this.vendorGameId,
|
|
653
|
+
drawId: this.curDrawItem.id
|
|
654
|
+
});
|
|
655
|
+
this.curTurnOver = (_c = (_b = res === null || res === void 0 ? void 0 : res.wagerSegment) === null || _b === void 0 ? void 0 : _b.totalSalesCrossDraw) !== null && _c !== void 0 ? _c : 0;
|
|
656
|
+
}
|
|
657
|
+
catch (e) {
|
|
658
|
+
console.error(e);
|
|
659
|
+
}
|
|
660
|
+
finally {
|
|
661
|
+
this.isLoadingTurnover = false;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
634
664
|
handleDrawBettingTypeChange(bettingType) {
|
|
635
665
|
this.curDrawSelectionBettingType = bettingType;
|
|
636
666
|
this.curDrawSelection = this.curDrawSelectionMap[this.curDrawSelectionBettingType];
|
|
637
667
|
this.curPrizes = this.curPrizeMap[this.curDrawSelectionBettingType];
|
|
638
|
-
|
|
639
|
-
this.curTurnOver = this.curPrizes.reduce((acc, cur) => acc + Number(cur.totalAmount.value), 0);
|
|
668
|
+
this.getTurnOver();
|
|
640
669
|
}
|
|
641
670
|
getBettingTypeName(bettingType) {
|
|
642
671
|
var _a, _b;
|
|
@@ -644,10 +673,10 @@ const LotteryTippingLatestResult = class {
|
|
|
644
673
|
return name !== null && name !== void 0 ? name : bettingType;
|
|
645
674
|
}
|
|
646
675
|
render() {
|
|
647
|
-
return (index.h("div", { key: '
|
|
676
|
+
return (index.h("div", { key: 'e104fc35ddcdaad1e461bcc867f779dc90254bc6', class: "lottery-tipping-latest-result", ref: (el) => (this.stylingContainer = el) }, this.curDrawSelection && this.curDrawSelection.length > 0 && (index.h("div", { key: '085e418338a52262e8866f300be8e67f4d3bbfc7', class: "result-wrapper" }, index.h("div", { key: '7cf61f06f845fb6aabe53896163fa402b1e52a26', class: "date-selection" }, index.h("div", { key: 'da4abd68318c454324a665f6e02257dda4f224be', class: "date-selection-leftIcon", innerHTML: leftArrowIcon, onClick: this.preDraw.bind(this) }), index.h("div", { key: '938f8f160c10eae2678dc7a98027a3421409f096', class: "date-selection-calendar" }, index.h("lottery-tipping-calendar", { key: 'c8048c6977b3740b8d2e0e7eff3292c329cdc4be', date: this.lastestDate, highLightDates: this.hasDrawDates, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), index.h("div", { key: 'eb17af80ec1b1c38f9d51b878013477290c824d7', class: "date-selection-rightIcon", innerHTML: rightArrowIcon, onClick: this.nextDraw.bind(this) })), index.h("div", { key: 'ab7ad2efffe5f9437db6a77b0b0c60e3d9454c5e', class: "winning-result" }, index.h("div", { key: 'e6a7ae5ba4c6c967858bb6e4e9a7a75246ec86f2', class: "betting-type" }, index.h("div", { key: '341e5ee07c3e588b154d3a73373bed40a8e51a90', class: "betting-type-title" }, translate('bettingType', this.language)), index.h("div", { key: 'f824ded5140f92aee54748939fecb5aac692cd6f', class: "betting-type-text" }, index.h("div", { key: '85cb8c0a387b378b36f05af6703c023d9b0819f9', class: "LotteryTippingTicketController__segmented-control" }, Object.keys(this.curDrawSelectionMap).map((bettingType) => (index.h("button", { class: {
|
|
648
677
|
LotteryTippingTicketController__segment: true,
|
|
649
678
|
'LotteryTippingTicketController__segment--active': this.curDrawSelectionBettingType === bettingType
|
|
650
|
-
}, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '
|
|
679
|
+
}, onClick: this.handleDrawBettingTypeChange.bind(this, bettingType) }, this.getBettingTypeName(bettingType))))))), index.h("lottery-tipping-ticket-bet", { key: '06293a063a9ac5f0f59ab8ec9033df764eadd511', "session-id": this.sessionId, endpoint: this.endpoint, "game-id": this.vendorGameId, "draw-id": this.curDrawItem.id, "default-bullet-config-line-group": JSON.stringify(this.curDrawSelection), "read-pretty": true, "total-pages": this.curDrawSelection.length, language: this.language, "mb-source": this.mbSource, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl })), this.isLoadingTurnover ? (index.h("div", { class: "loading-wrap" }, index.h("ui-skeleton", { structure: "title", width: "140px", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }), index.h("ui-skeleton", { structure: "rectangle", width: "100%", height: "30px" }))) : (index.h("div", { class: "prize-result" }, index.h("div", { class: "prize-result-title" }, translate('prizeAllocation', this.language, { turnover: formattedTurnover(this.curTurnOver) })), index.h("div", { class: "prize-result-table" }, index.h("div", { class: "prize-result-table-header" }, index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, translate('prizes', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('numberOfWinners', this.language)), index.h("div", { class: "prize-result-table-column" }, translate('prizeMoney', this.language)))), index.h("div", { class: "prize-result-table-body" }, this.displayedPrizes.map((prize) => (index.h("div", { class: "prize-result-table-row" }, index.h("div", { class: "prize-result-table-column" }, prize.divisionDisplayName), index.h("div", { class: "prize-result-table-column" }, prize.players), index.h("div", { class: "prize-result-table-column" }, thousandSeperator(prize.totalAmount.value))))))))))), this.curDrawSelection.length == 0 && !this.isLoading && (index.h("div", { key: '9aa470442a1f2b4600d0f7727210e71cebf934c8' }, translate('noLatestResult', this.language))), this.isLoading && index.h("div", { key: '4568a1cda8eca35552d84075fbc4507d397e3178', class: "loading-wrap" }, translate('loading', this.language))));
|
|
651
680
|
}
|
|
652
681
|
static get watchers() { return {
|
|
653
682
|
"clientStyling": ["handleClientStylingChange"],
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6a03d840.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["general-
|
|
22
|
+
return index.bootstrapLazy([["general-tooltip_7.cjs",[[1,"lottery-tipping-latest-result",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"endpoint":[513],"gameId":[1537,"game-id"],"playerId":[1538,"player-id"],"sessionId":[1537,"session-id"],"hasDrawDates":[32],"lastestDate":[32],"drawList":[32],"curDrawItem":[32],"curDrawItemIdx":[32],"curDrawSelection":[32],"curDrawSelectionBettingType":[32],"curDrawSelectionMap":[32],"curPrizes":[32],"curPrizeMap":[32],"curTurnOver":[32],"isLoading":[32],"playTypes":[32],"bettingTypes":[32],"vendorGameId":[32],"isLoadingTurnover":[32]},[[0,"changeDate","handleChangeDate"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-ticket-bet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"sessionId":[513,"session-id"],"endpoint":[513],"gameId":[513,"game-id"],"drawId":[513,"draw-id"],"totalPages":[1538,"total-pages"],"minTotalPages":[514,"min-total-pages"],"maxTotalPages":[514,"max-total-pages"],"mode":[513],"readPretty":[516,"read-pretty"],"defaultBulletConfigLineGroup":[513,"default-bullet-config-line-group"],"translationData":[32],"clientStylingUrlContent":[32],"bulletConfigLineGroup":[32],"currentPage":[32],"isLoading":[32],"hasErrors":[32],"dialogConfig":[32],"ticketDataSource":[32],"resetBulletConfig":[64],"getData":[64]},[[0,"lotteryTippingBulletGroupToggle","lotteryTippingBulletGroupSelectionHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"gameId":["fetchMatchData"],"sessionId":["fetchMatchData"],"drawId":["fetchMatchData"],"defaultBulletConfigLineGroup":["fetchMatchData"],"currentPage":["handleCurrentPageChange"]}],[1,"lottery-tipping-calendar",{"date":[1],"highLightDates":[16],"language":[513],"translationUrl":[520,"translation-url"],"weeks":[32],"days":[32],"alterDate":[32],"curDate":[32],"recordInfo":[32],"showCalendar":[32]},null,{"date":["handleDateChange"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[8,"border-radius"],"marginBottom":[8,"margin-bottom"],"marginTop":[8,"margin-top"],"marginLeft":[8,"margin-left"],"marginRight":[8,"margin-right"],"animation":[4],"rows":[2],"size":[1]},null,{"structure":["handleStructureChange"]}],[1,"lottery-tipping-bullet-group",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[513,"position-idx"],"theme":[513],"mode":[513],"bulletConfigContent":[513,"bullet-config-content"]},[[0,"lotteryTippingBulletToggle","lotteryTippingBulletSelectionHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"general-tooltip",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"position":[1],"delay":[2],"isVisible":[32],"_tooltipId":[32]},[[1,"mouseenter","handleMouseEnterOrFocus"],[0,"focusin","handleMouseEnterOrFocus"],[1,"mouseleave","handleMouseLeaveOrBlur"],[0,"focusout","handleMouseLeaveOrBlur"],[0,"keydown","handleKeyDown"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}],[1,"lottery-tipping-bullet",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"positionIdx":[514,"position-idx"],"theme":[513],"value":[513],"disabled":[516],"isSelected":[516,"is-selected"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -177,9 +177,9 @@ export class LotteryTippingCalendar {
|
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
179
|
const calendarClass = ['calendar', this.showCalendar ? 'calendar-visible' : 'calendar-leave'];
|
|
180
|
-
return (h("div", { key: '
|
|
180
|
+
return (h("div", { key: 'eda2c6b211647dfd9c26f5dd53dd8f18a2205be2', class: "lottery-tipping-calendar", ref: (el) => (this.calendarRef = el) }, h("div", { key: 'b8a516ae17b8de7aaa4a72284848295546239937', class: "calling-input", onClick: () => {
|
|
181
181
|
this.showCalendar = true;
|
|
182
|
-
} }, h("div", { key: '
|
|
182
|
+
} }, h("div", { key: '4e384c0e1989f76b995bbc3df572eeab8ae120f6', class: "calling-input-text" }, this.showFormatedDate(this.curDate)), h("div", { key: 'a489600f9b90e4ea865606dddd4997ad9cf1558a', class: "calling-input-icon", innerHTML: calendarIcon })), h("div", { key: '7c17232151a8ae775e4a35000e7992695ce1f9dd', class: calendarClass.join(' ') }, h("div", { key: '6951e3aa3fedb236514b57d6cdf830b074deb928', class: "calendar-header" }, h("div", { key: '7d9735ab6d40d9010ac32a2b776ceacd9ee8ebb8', class: "date-controller year-minus", onClick: this.onYearMinus }, "<"), h("div", { key: 'e0f3e6958187120e4441c4c4961fda4a74294cca', class: "date-controller month-minus", onClick: this.onMonthMinus }, "<"), h("div", { key: 'e1840f3d0f9e4860a03467bbc782a6306c591ad4', class: "date-picker" }, h("div", { key: '44d3b63aebcadaa42682e77f9d84c9ae155ec546', class: "date-picker-year" }, h("vaadin-select", { key: 'd462e0c076b1da5cdfa4a2ce47c5c3cb0d6e86bd', items: this.yearOptions, value: this.alterDate.year, style: { '--vaadin-field-default-width': '90px' }, "on-value-changed": this.onYearChange.bind(this) })), h("div", { key: '0a405edb23487297ab91e0a6ce304e907d7cfa62', class: "date-picker-delimiter" }, "-"), h("div", { key: 'cc81efef542d370f4e03a7d7fa138a36b900d801', class: "date-picker-month" }, h("vaadin-select", { key: 'd7a9636262121dd8008588eef61aacd092ec07c8', items: this.monthOptions, value: this.alterDate.month + 1, style: { '--vaadin-field-default-width': '64px' }, "on-value-changed": this.onMonthChange.bind(this) })), h("div", { key: 'f862d5d3d665c97bc74f7eda209822cc5ceb558e', class: "date-picker-delimiter" }, "-"), h("div", { key: '9b2dca353b3708ad561af1bebb24c93dd1194384', class: "date-picker-day" }, this.alterDate.day)), h("div", { key: '4e2d6c599a6c03aa1852b65c86f2db50cea02d6d', class: "date-controller month-plus", onClick: this.onMonthPlus }, ">"), h("div", { key: '18e4e92486507065a5e0771ffde5050f4ffff3f1', class: "date-controller year-plus", onClick: this.onYearPlus }, ">")), h("div", { key: 'ef1115ce79c83cf4689779e55f046a70f733bc6c', class: "calendar-content" }, h("div", { key: '0a6fe5ec8ee10f03a2547f942207f6ceaaa99618', class: "calendar-content-week" }, this.weeks.map((week) => (h("div", { class: "week-item" }, week)))), h("div", { key: '971bc904f76e33c6503be7d223759f2ab7cb0ad6', class: "calendar-content-day" }, this.days.map((item) => (h("div", { class: {
|
|
183
183
|
'day-item': true,
|
|
184
184
|
isCurDay: this.tellIsCurDay(item.date, item.month, item.year),
|
|
185
185
|
isHighLight: this.tellIsHighLight(item.date, item.month, item.year)
|