@everymatrix/lottery-ticket-controller 0.1.24 → 1.13.4
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_5.cjs.entry.js +27 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-ticket-controller.cjs.js +1 -1
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.css +182 -0
- package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js +24 -1
- package/dist/components/helper-accordion2.js +2 -2
- package/dist/components/lottery-grid2.js +11 -2
- package/dist/components/lottery-ticket-controller.js +8 -2
- package/dist/components/lottery-ticket2.js +7 -7
- package/dist/esm/helper-accordion_5.entry.js +27 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/lottery-ticket-controller.js +1 -1
- package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -1
- package/dist/lottery-ticket-controller/p-bb0c3c8f.entry.js +1 -0
- package/dist/types/components/lottery-ticket-controller/lottery-ticket-controller.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/lottery-ticket-controller/p-9a5da031.entry.js +0 -1
- /package/dist/types/Users/{dragos.bodea/Documents/everymatrix-prjs → adrian.pripon/Documents/Work}/stencil/widgets-stencil/packages/lottery-ticket-controller/.stencil/packages/lottery-ticket-controller/stencil.config.d.ts +0 -0
|
@@ -25,7 +25,7 @@ const translate$2 = (key, customLang) => {
|
|
|
25
25
|
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const helperAccordionCss = "@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}";
|
|
28
|
+
const helperAccordionCss = "@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;cursor:pointer}.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;cursor:pointer}.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}";
|
|
29
29
|
|
|
30
30
|
const Accordion = class {
|
|
31
31
|
constructor(hostRef) {
|
|
@@ -119,7 +119,7 @@ const Accordion = class {
|
|
|
119
119
|
this.accordionEvent.emit();
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand"
|
|
122
|
+
return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
123
123
|
index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
124
124
|
index.h("div", null, this.deleteTab &&
|
|
125
125
|
index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate$2('deleteTicket', this.language)))))));
|
|
@@ -294,6 +294,15 @@ const LotteryGrid = class {
|
|
|
294
294
|
}
|
|
295
295
|
// end custom styling area
|
|
296
296
|
}
|
|
297
|
+
// wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
|
|
298
|
+
shuffleArray(array) {
|
|
299
|
+
const result = [];
|
|
300
|
+
while (array.length > 0) {
|
|
301
|
+
const randomIndex = Math.floor(Math.random() * (array.length));
|
|
302
|
+
result.push(array.splice(randomIndex, 1)[0]);
|
|
303
|
+
}
|
|
304
|
+
return result;
|
|
305
|
+
}
|
|
297
306
|
lotteryBulletSelectionHandler(event) {
|
|
298
307
|
this.numbers = this.numbers.map((item) => {
|
|
299
308
|
if (item.number == event.detail.value) {
|
|
@@ -365,8 +374,8 @@ const LotteryGrid = class {
|
|
|
365
374
|
if (event.detail && event.detail == this.ticketId) {
|
|
366
375
|
this.resetSelectionHandler(event);
|
|
367
376
|
let array = [...Array(this.totalNumbers).keys()]
|
|
368
|
-
.map(number => number + 1)
|
|
369
|
-
|
|
377
|
+
.map(number => number + 1);
|
|
378
|
+
array = this.shuffleArray(array);
|
|
370
379
|
array = array.slice(0, this.minimumAllowed);
|
|
371
380
|
this.numbers = this.numbers.map((item) => {
|
|
372
381
|
return {
|
|
@@ -520,8 +529,8 @@ const LotteryTicket = class {
|
|
|
520
529
|
.then((data) => {
|
|
521
530
|
this.isLoading = false;
|
|
522
531
|
this.gameData = data;
|
|
523
|
-
this.grids = [...Array(
|
|
524
|
-
this.amountInfo = this.gameData.
|
|
532
|
+
this.grids = [...Array(this.gameData.type.boards.length).keys()];
|
|
533
|
+
this.amountInfo = this.gameData.type.stakes[0]; // initial value for select
|
|
525
534
|
})
|
|
526
535
|
.catch((err) => {
|
|
527
536
|
this.isLoading = false;
|
|
@@ -572,7 +581,7 @@ const LotteryTicket = class {
|
|
|
572
581
|
}
|
|
573
582
|
setDropdownItem(item) {
|
|
574
583
|
this.amountInfo = {
|
|
575
|
-
|
|
584
|
+
value: item.value,
|
|
576
585
|
currency: item.currency
|
|
577
586
|
};
|
|
578
587
|
this.isCustomSelect = false;
|
|
@@ -587,13 +596,13 @@ const LotteryTicket = class {
|
|
|
587
596
|
return (index.h("div", null, index.h("p", null, translate$1('error', this.language))));
|
|
588
597
|
}
|
|
589
598
|
else {
|
|
590
|
-
const {
|
|
599
|
+
const { type } = this.gameData;
|
|
591
600
|
return (index.h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, index.h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
592
601
|
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate$1('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
593
|
-
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate$1('autoButton', this.language))), this.grids.map((
|
|
602
|
+
index.h("div", { class: "ButtonContainer" }, index.h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate$1('autoButton', this.language))), this.grids.map((_, index$1) => index.h("div", { class: "TicketGridBullets" }, index.h("p", { class: "TicketGridTitle" }, translate$1('grid', this.language), " ", index$1 + 1), index.h("lottery-grid", { "grid-index": index$1, "maximum-allowed": type.boards[index$1].maximumAllowed, "minimum-allowed": type.boards[index$1].minimumAllowed, "total-numbers": type.boards[index$1].highNumber - type.boards[index$1].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), type.multiplier &&
|
|
594
603
|
index.h("div", null, index.h("label", { class: "Toggle" }, index.h("label", { class: "Label" }, translate$1('multiplier', this.language), ": "), index.h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), index.h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
595
|
-
index.h("div", { class: "TicketDraws" }, index.h("label", { class: "Label" }, translate$1('numberOfDraws', this.language), ": "), index.h("div", { class: "NumberInput" }, index.h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), index.h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), index.h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), index.h("div", null, index.h("label", { class: "Label" }, translate$1('wagerPerDraw', this.language), ": "), index.h("div", { class: "WagerInput" },
|
|
596
|
-
(index.h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, index.h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, index.h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.
|
|
604
|
+
index.h("div", { class: "TicketDraws" }, index.h("label", { class: "Label" }, translate$1('numberOfDraws', this.language), ": "), index.h("div", { class: "NumberInput" }, index.h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), index.h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), index.h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), index.h("div", null, index.h("label", { class: "Label" }, translate$1('wagerPerDraw', this.language), ": "), index.h("div", { class: "WagerInput" }, type.stakes.length > 1 ?
|
|
605
|
+
(index.h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, index.h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, index.h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.value, " ", this.amountInfo.currency), index.h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), index.h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, index.h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, type.stakes.map((item) => index.h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.value == item.value ? 'SelectedValue' : '', value: item.value, onClick: () => this.setDropdownItem(item) }, item.value, " ", item.currency)))))) : (index.h("div", null, index.h("input", { min: "1", value: type.stakes[0].amount, type: "number", disabled: true }), index.h("p", { class: "WagerInputTitle" }, type.stakes[0].currency)))))));
|
|
597
606
|
}
|
|
598
607
|
}
|
|
599
608
|
}
|
|
@@ -624,7 +633,7 @@ const translate = (key, customLang) => {
|
|
|
624
633
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
625
634
|
};
|
|
626
635
|
|
|
627
|
-
const lotteryTicketControllerCss = ":host{display:block}";
|
|
636
|
+
const lotteryTicketControllerCss = ":host{font-family:\"Roboto\", system-ui, -apple-system, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:#7ac317}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}";
|
|
628
637
|
|
|
629
638
|
const LotteryTicketController = class {
|
|
630
639
|
constructor(hostRef) {
|
|
@@ -670,6 +679,10 @@ const LotteryTicketController = class {
|
|
|
670
679
|
* Shows the reset button
|
|
671
680
|
*/
|
|
672
681
|
this.resetButton = false;
|
|
682
|
+
/**
|
|
683
|
+
* Number of ticket controllers
|
|
684
|
+
*/
|
|
685
|
+
this.totalControllers = 1;
|
|
673
686
|
/**
|
|
674
687
|
* Client custom styling via string
|
|
675
688
|
*/
|
|
@@ -713,7 +726,8 @@ const LotteryTicketController = class {
|
|
|
713
726
|
// end custom styling area
|
|
714
727
|
}
|
|
715
728
|
render() {
|
|
716
|
-
|
|
729
|
+
console.log('ticket id:', this.ticketId);
|
|
730
|
+
return (index.h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { slot: "accordionContent" }, index.h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
717
731
|
}
|
|
718
732
|
};
|
|
719
733
|
LotteryTicketController.style = lotteryTicketControllerCss;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["helper-accordion_5.cjs",[[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"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["helper-accordion_5.cjs",[[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"],"totalControllers":[2,"total-controllers"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["helper-accordion_5.cjs",[[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"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["helper-accordion_5.cjs",[[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"],"totalControllers":[2,"total-controllers"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
19
19
|
});
|
|
@@ -1,3 +1,185 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
3
|
+
font-size: 0.8rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
*,
|
|
7
|
+
*::before,
|
|
8
|
+
*::after {
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
outline: none;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Chrome, Safari, Edge, Opera */
|
|
17
|
+
input::-webkit-outer-spin-button,
|
|
18
|
+
input::-webkit-inner-spin-button {
|
|
19
|
+
-webkit-appearance: none;
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Firefox */
|
|
24
|
+
input[type=number] {
|
|
25
|
+
-moz-appearance: textfield;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.player-account-gaming-limits-popup-2 {
|
|
29
|
+
background: var(--emfe-w-color-black, #000000);
|
|
30
|
+
color: var(--emfe-w-color-white, #000);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.Title {
|
|
34
|
+
font-weight: 800;
|
|
35
|
+
font-size: 18px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button {
|
|
2
39
|
display: block;
|
|
40
|
+
font-size: 0.75rem;
|
|
41
|
+
padding: 12px 0;
|
|
42
|
+
border: 0;
|
|
43
|
+
border-radius: 2px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
button.PrimaryButtonStyle {
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
color: #fff;
|
|
49
|
+
background: #7ac317;
|
|
50
|
+
}
|
|
51
|
+
button.SecondaryButtonStyle {
|
|
52
|
+
border: 1px solid #999;
|
|
53
|
+
color: #666;
|
|
54
|
+
background: #fff;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.LinkButton {
|
|
58
|
+
display: inline;
|
|
59
|
+
padding: 0;
|
|
60
|
+
color: #3366CC;
|
|
61
|
+
text-decoration: underline;
|
|
62
|
+
background-color: rgba(0, 0, 0, 0);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ResultIconWrapper {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
align-items: center;
|
|
69
|
+
margin: 12px 0;
|
|
70
|
+
}
|
|
71
|
+
.ResultIconWrapper svg {
|
|
72
|
+
height: auto;
|
|
73
|
+
width: 60px;
|
|
74
|
+
margin: 12px;
|
|
75
|
+
}
|
|
76
|
+
.ResultIconWrapper p {
|
|
77
|
+
color: #666;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Overlay {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100vw;
|
|
85
|
+
height: 100vh;
|
|
86
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ModalContainer {
|
|
93
|
+
position: fixed;
|
|
94
|
+
top: 30vh;
|
|
95
|
+
width: 320px;
|
|
96
|
+
height: auto;
|
|
97
|
+
padding: 18px 14px;
|
|
98
|
+
background: #fff;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.InitialWrapper {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
gap: 12px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.AdditionalInformation {
|
|
109
|
+
margin: 10px 0;
|
|
110
|
+
font-size: 14px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.TermsConditions {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ExpandButton {
|
|
118
|
+
font-size: 14px;
|
|
119
|
+
background-color: #fff;
|
|
120
|
+
border: 0;
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin-top: -10px;
|
|
123
|
+
color: #999;
|
|
124
|
+
display: flex;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
align-items: center;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
.ExpandButton svg {
|
|
130
|
+
width: 28px;
|
|
131
|
+
height: auto;
|
|
132
|
+
margin-left: -4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.LeftAlign {
|
|
136
|
+
text-align: left;
|
|
137
|
+
font-size: 16px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.CenterAlign {
|
|
141
|
+
text-align: center;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.SetLimitSection {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 6px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.DepositTextSection {
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: space-between;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.DepositInputSection {
|
|
156
|
+
height: 32px;
|
|
157
|
+
display: flex;
|
|
158
|
+
gap: 4px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.DepositInput {
|
|
162
|
+
flex-grow: 1;
|
|
163
|
+
padding: 0 6px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.SubmitDepositButton {
|
|
167
|
+
flex-grow: 1;
|
|
168
|
+
font-size: 0.75rem;
|
|
169
|
+
padding: 0;
|
|
170
|
+
}
|
|
171
|
+
.SubmitDepositButton[disabled] {
|
|
172
|
+
align-items: center;
|
|
173
|
+
color: #ccc;
|
|
174
|
+
cursor: not-allowed;
|
|
175
|
+
background: #fff;
|
|
176
|
+
border: #ccc 1px solid;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.Hidden {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.Extended {
|
|
184
|
+
transform: rotate(180deg);
|
|
3
185
|
}
|
|
@@ -44,6 +44,10 @@ export class LotteryTicketController {
|
|
|
44
44
|
* Shows the reset button
|
|
45
45
|
*/
|
|
46
46
|
this.resetButton = false;
|
|
47
|
+
/**
|
|
48
|
+
* Number of ticket controllers
|
|
49
|
+
*/
|
|
50
|
+
this.totalControllers = 1;
|
|
47
51
|
/**
|
|
48
52
|
* Client custom styling via string
|
|
49
53
|
*/
|
|
@@ -87,8 +91,9 @@ export class LotteryTicketController {
|
|
|
87
91
|
// end custom styling area
|
|
88
92
|
}
|
|
89
93
|
render() {
|
|
94
|
+
console.log('ticket id:', this.ticketId);
|
|
90
95
|
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el },
|
|
91
|
-
h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab":
|
|
96
|
+
h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
|
|
92
97
|
h("div", { slot: "accordionContent" },
|
|
93
98
|
h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
94
99
|
}
|
|
@@ -315,6 +320,24 @@ export class LotteryTicketController {
|
|
|
315
320
|
"reflect": false,
|
|
316
321
|
"defaultValue": "false"
|
|
317
322
|
},
|
|
323
|
+
"totalControllers": {
|
|
324
|
+
"type": "number",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "number",
|
|
328
|
+
"resolved": "number",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Number of ticket controllers"
|
|
336
|
+
},
|
|
337
|
+
"attribute": "total-controllers",
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"defaultValue": "1"
|
|
340
|
+
},
|
|
318
341
|
"clientStyling": {
|
|
319
342
|
"type": "string",
|
|
320
343
|
"mutable": false,
|
|
@@ -21,7 +21,7 @@ const translate = (key, customLang) => {
|
|
|
21
21
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const helperAccordionCss = "@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}";
|
|
24
|
+
const helperAccordionCss = "@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;cursor:pointer}.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;cursor:pointer}.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}";
|
|
25
25
|
|
|
26
26
|
const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
27
27
|
constructor() {
|
|
@@ -117,7 +117,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
117
117
|
this.accordionEvent.emit();
|
|
118
118
|
}
|
|
119
119
|
render() {
|
|
120
|
-
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand"
|
|
120
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
121
121
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
122
122
|
h("div", null, this.deleteTab &&
|
|
123
123
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
|
|
@@ -104,6 +104,15 @@ const LotteryGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
// end custom styling area
|
|
106
106
|
}
|
|
107
|
+
// wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
|
|
108
|
+
shuffleArray(array) {
|
|
109
|
+
const result = [];
|
|
110
|
+
while (array.length > 0) {
|
|
111
|
+
const randomIndex = Math.floor(Math.random() * (array.length));
|
|
112
|
+
result.push(array.splice(randomIndex, 1)[0]);
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
107
116
|
lotteryBulletSelectionHandler(event) {
|
|
108
117
|
this.numbers = this.numbers.map((item) => {
|
|
109
118
|
if (item.number == event.detail.value) {
|
|
@@ -175,8 +184,8 @@ const LotteryGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
175
184
|
if (event.detail && event.detail == this.ticketId) {
|
|
176
185
|
this.resetSelectionHandler(event);
|
|
177
186
|
let array = [...Array(this.totalNumbers).keys()]
|
|
178
|
-
.map(number => number + 1)
|
|
179
|
-
|
|
187
|
+
.map(number => number + 1);
|
|
188
|
+
array = this.shuffleArray(array);
|
|
180
189
|
array = array.slice(0, this.minimumAllowed);
|
|
181
190
|
this.numbers = this.numbers.map((item) => {
|
|
182
191
|
return {
|
|
@@ -25,7 +25,7 @@ const translate = (key, customLang) => {
|
|
|
25
25
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const lotteryTicketControllerCss = ":host{display:block}";
|
|
28
|
+
const lotteryTicketControllerCss = ":host{font-family:\"Roboto\", system-ui, -apple-system, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:#7ac317}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}";
|
|
29
29
|
|
|
30
30
|
const LotteryTicketController$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
31
31
|
constructor() {
|
|
@@ -73,6 +73,10 @@ const LotteryTicketController$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
73
73
|
* Shows the reset button
|
|
74
74
|
*/
|
|
75
75
|
this.resetButton = false;
|
|
76
|
+
/**
|
|
77
|
+
* Number of ticket controllers
|
|
78
|
+
*/
|
|
79
|
+
this.totalControllers = 1;
|
|
76
80
|
/**
|
|
77
81
|
* Client custom styling via string
|
|
78
82
|
*/
|
|
@@ -116,7 +120,8 @@ const LotteryTicketController$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
116
120
|
// end custom styling area
|
|
117
121
|
}
|
|
118
122
|
render() {
|
|
119
|
-
|
|
123
|
+
console.log('ticket id:', this.ticketId);
|
|
124
|
+
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { slot: "accordionContent" }, h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
120
125
|
}
|
|
121
126
|
static get style() { return lotteryTicketControllerCss; }
|
|
122
127
|
}, [1, "lottery-ticket-controller", {
|
|
@@ -132,6 +137,7 @@ const LotteryTicketController$1 = /*@__PURE__*/ proxyCustomElement(class extends
|
|
|
132
137
|
"language": [1],
|
|
133
138
|
"autoPick": [4, "auto-pick"],
|
|
134
139
|
"resetButton": [4, "reset-button"],
|
|
140
|
+
"totalControllers": [2, "total-controllers"],
|
|
135
141
|
"clientStyling": [1, "client-styling"],
|
|
136
142
|
"clientStylingUrlContent": [1, "client-styling-url-content"],
|
|
137
143
|
"limitStylingAppends": [32]
|
|
@@ -135,8 +135,8 @@ const LotteryTicket = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
135
135
|
.then((data) => {
|
|
136
136
|
this.isLoading = false;
|
|
137
137
|
this.gameData = data;
|
|
138
|
-
this.grids = [...Array(
|
|
139
|
-
this.amountInfo = this.gameData.
|
|
138
|
+
this.grids = [...Array(this.gameData.type.boards.length).keys()];
|
|
139
|
+
this.amountInfo = this.gameData.type.stakes[0]; // initial value for select
|
|
140
140
|
})
|
|
141
141
|
.catch((err) => {
|
|
142
142
|
this.isLoading = false;
|
|
@@ -187,7 +187,7 @@ const LotteryTicket = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
187
187
|
}
|
|
188
188
|
setDropdownItem(item) {
|
|
189
189
|
this.amountInfo = {
|
|
190
|
-
|
|
190
|
+
value: item.value,
|
|
191
191
|
currency: item.currency
|
|
192
192
|
};
|
|
193
193
|
this.isCustomSelect = false;
|
|
@@ -202,13 +202,13 @@ const LotteryTicket = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
202
202
|
return (h("div", null, h("p", null, translate('error', this.language))));
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
|
-
const {
|
|
205
|
+
const { type } = this.gameData;
|
|
206
206
|
return (h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
207
207
|
h("div", { class: "ButtonContainer" }, h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
208
|
-
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((
|
|
208
|
+
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate('autoButton', this.language))), this.grids.map((_, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate('grid', this.language), " ", index + 1), h("lottery-grid", { "grid-index": index, "maximum-allowed": type.boards[index].maximumAllowed, "minimum-allowed": type.boards[index].minimumAllowed, "total-numbers": type.boards[index].highNumber - type.boards[index].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), type.multiplier &&
|
|
209
209
|
h("div", null, h("label", { class: "Toggle" }, h("label", { class: "Label" }, translate('multiplier', this.language), ": "), h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
210
|
-
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" },
|
|
211
|
-
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.
|
|
210
|
+
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" }, type.stakes.length > 1 ?
|
|
211
|
+
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.value, " ", this.amountInfo.currency), h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, type.stakes.map((item) => h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.value == item.value ? 'SelectedValue' : '', value: item.value, onClick: () => this.setDropdownItem(item) }, item.value, " ", item.currency)))))) : (h("div", null, h("input", { min: "1", value: type.stakes[0].amount, type: "number", disabled: true }), h("p", { class: "WagerInputTitle" }, type.stakes[0].currency)))))));
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
}
|
|
@@ -21,7 +21,7 @@ const translate$2 = (key, customLang) => {
|
|
|
21
21
|
return TRANSLATIONS$2[lang !== undefined && SUPPORTED_LANGUAGES$2.includes(lang) ? lang : DEFAULT_LANGUAGE$2][key];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const helperAccordionCss = "@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}";
|
|
24
|
+
const helperAccordionCss = "@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;cursor:pointer}.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;cursor:pointer}.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}";
|
|
25
25
|
|
|
26
26
|
const Accordion = class {
|
|
27
27
|
constructor(hostRef) {
|
|
@@ -115,7 +115,7 @@ const Accordion = class {
|
|
|
115
115
|
this.accordionEvent.emit();
|
|
116
116
|
}
|
|
117
117
|
render() {
|
|
118
|
-
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand"
|
|
118
|
+
return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header', onClick: () => this.toggleContent() }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand" }, this.showContent ? '<' : '>')), this.showContent &&
|
|
119
119
|
h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
|
|
120
120
|
h("div", null, this.deleteTab &&
|
|
121
121
|
h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate$2('deleteTicket', this.language)))))));
|
|
@@ -290,6 +290,15 @@ const LotteryGrid = class {
|
|
|
290
290
|
}
|
|
291
291
|
// end custom styling area
|
|
292
292
|
}
|
|
293
|
+
// wrote this because the classic .sort(() => 0.5 - Math.random()) method yielded low entropy shuffles for some reason on certain devices
|
|
294
|
+
shuffleArray(array) {
|
|
295
|
+
const result = [];
|
|
296
|
+
while (array.length > 0) {
|
|
297
|
+
const randomIndex = Math.floor(Math.random() * (array.length));
|
|
298
|
+
result.push(array.splice(randomIndex, 1)[0]);
|
|
299
|
+
}
|
|
300
|
+
return result;
|
|
301
|
+
}
|
|
293
302
|
lotteryBulletSelectionHandler(event) {
|
|
294
303
|
this.numbers = this.numbers.map((item) => {
|
|
295
304
|
if (item.number == event.detail.value) {
|
|
@@ -361,8 +370,8 @@ const LotteryGrid = class {
|
|
|
361
370
|
if (event.detail && event.detail == this.ticketId) {
|
|
362
371
|
this.resetSelectionHandler(event);
|
|
363
372
|
let array = [...Array(this.totalNumbers).keys()]
|
|
364
|
-
.map(number => number + 1)
|
|
365
|
-
|
|
373
|
+
.map(number => number + 1);
|
|
374
|
+
array = this.shuffleArray(array);
|
|
366
375
|
array = array.slice(0, this.minimumAllowed);
|
|
367
376
|
this.numbers = this.numbers.map((item) => {
|
|
368
377
|
return {
|
|
@@ -516,8 +525,8 @@ const LotteryTicket = class {
|
|
|
516
525
|
.then((data) => {
|
|
517
526
|
this.isLoading = false;
|
|
518
527
|
this.gameData = data;
|
|
519
|
-
this.grids = [...Array(
|
|
520
|
-
this.amountInfo = this.gameData.
|
|
528
|
+
this.grids = [...Array(this.gameData.type.boards.length).keys()];
|
|
529
|
+
this.amountInfo = this.gameData.type.stakes[0]; // initial value for select
|
|
521
530
|
})
|
|
522
531
|
.catch((err) => {
|
|
523
532
|
this.isLoading = false;
|
|
@@ -568,7 +577,7 @@ const LotteryTicket = class {
|
|
|
568
577
|
}
|
|
569
578
|
setDropdownItem(item) {
|
|
570
579
|
this.amountInfo = {
|
|
571
|
-
|
|
580
|
+
value: item.value,
|
|
572
581
|
currency: item.currency
|
|
573
582
|
};
|
|
574
583
|
this.isCustomSelect = false;
|
|
@@ -583,13 +592,13 @@ const LotteryTicket = class {
|
|
|
583
592
|
return (h("div", null, h("p", null, translate$1('error', this.language))));
|
|
584
593
|
}
|
|
585
594
|
else {
|
|
586
|
-
const {
|
|
595
|
+
const { type } = this.gameData;
|
|
587
596
|
return (h("div", { class: "TicketContainer", ref: el => this.stylingContainer = el }, h("p", { class: "TicketTitle" }, this.gameData.name), this.resetButton && this.ticketDone &&
|
|
588
597
|
h("div", { class: "ButtonContainer" }, h("a", { class: "ResetButton", onClick: () => this.toggleResetSelection() }, translate$1('resetButton', this.language))), this.autoPick && !this.ticketDone &&
|
|
589
|
-
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate$1('autoButton', this.language))), this.grids.map((
|
|
598
|
+
h("div", { class: "ButtonContainer" }, h("a", { class: "AutoButton", onClick: () => this.toggleAutoSelection() }, translate$1('autoButton', this.language))), this.grids.map((_, index) => h("div", { class: "TicketGridBullets" }, h("p", { class: "TicketGridTitle" }, translate$1('grid', this.language), " ", index + 1), h("lottery-grid", { "grid-index": index, "maximum-allowed": type.boards[index].maximumAllowed, "minimum-allowed": type.boards[index].minimumAllowed, "total-numbers": type.boards[index].highNumber - type.boards[index].lowNumber + 1, selectable: true, "reset-button": true, "auto-pick": true, "game-id": this.gameId, "ticket-id": this.ticketId, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }))), type.multiplier &&
|
|
590
599
|
h("div", null, h("label", { class: "Toggle" }, h("label", { class: "Label" }, translate$1('multiplier', this.language), ": "), h("input", { class: "ToggleCheckbox", type: "checkbox", onInput: (e) => this.multiplierChangeHandler(e) }), h("div", { class: "ToggleSwitch" }))), this.multipleDraws &&
|
|
591
|
-
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate$1('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate$1('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" },
|
|
592
|
-
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.
|
|
600
|
+
h("div", { class: "TicketDraws" }, h("label", { class: "Label" }, translate$1('numberOfDraws', this.language), ": "), h("div", { class: "NumberInput" }, h("button", { onClick: () => this.numberOfDraws > 1 ? this.numberOfDraws-- : this.numberOfDraws = 1, class: "Minus" }, "-"), h("input", { class: "InputDefault", min: "1", value: this.numberOfDraws, type: "number" }), h("button", { onClick: () => this.numberOfDraws++, class: "Plus" }, "+"))), h("div", null, h("label", { class: "Label" }, translate$1('wagerPerDraw', this.language), ": "), h("div", { class: "WagerInput" }, type.stakes.length > 1 ?
|
|
601
|
+
(h("div", { "data-cluster": "SelectComponent", class: this.isCustomSelect ? "SelectWrapper SelectActive" : "SelectWrapper" }, h("div", { "data-cluster": "SelectComponent", class: "SelectButton", onClick: () => this.toggleClass() }, h("span", { "data-cluster": "SelectComponent" }, this.amountInfo.value, " ", this.amountInfo.currency), h("span", { "data-cluster": "SelectComponent", class: "SelectExpand" }, "\u25BC")), h("div", { "data-cluster": "SelectComponent", class: "SelectContent" }, h("ul", { "data-cluster": "SelectComponent", class: "SelectOptions" }, type.stakes.map((item) => h("li", { "data-cluster": "SelectComponent", class: this.amountInfo.value == item.value ? 'SelectedValue' : '', value: item.value, onClick: () => this.setDropdownItem(item) }, item.value, " ", item.currency)))))) : (h("div", null, h("input", { min: "1", value: type.stakes[0].amount, type: "number", disabled: true }), h("p", { class: "WagerInputTitle" }, type.stakes[0].currency)))))));
|
|
593
602
|
}
|
|
594
603
|
}
|
|
595
604
|
}
|
|
@@ -620,7 +629,7 @@ const translate = (key, customLang) => {
|
|
|
620
629
|
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
621
630
|
};
|
|
622
631
|
|
|
623
|
-
const lotteryTicketControllerCss = ":host{display:block}";
|
|
632
|
+
const lotteryTicketControllerCss = ":host{font-family:\"Roboto\", system-ui, -apple-system, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:#7ac317}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}";
|
|
624
633
|
|
|
625
634
|
const LotteryTicketController = class {
|
|
626
635
|
constructor(hostRef) {
|
|
@@ -666,6 +675,10 @@ const LotteryTicketController = class {
|
|
|
666
675
|
* Shows the reset button
|
|
667
676
|
*/
|
|
668
677
|
this.resetButton = false;
|
|
678
|
+
/**
|
|
679
|
+
* Number of ticket controllers
|
|
680
|
+
*/
|
|
681
|
+
this.totalControllers = 1;
|
|
669
682
|
/**
|
|
670
683
|
* Client custom styling via string
|
|
671
684
|
*/
|
|
@@ -709,7 +722,8 @@ const LotteryTicketController = class {
|
|
|
709
722
|
// end custom styling area
|
|
710
723
|
}
|
|
711
724
|
render() {
|
|
712
|
-
|
|
725
|
+
console.log('ticket id:', this.ticketId);
|
|
726
|
+
return (h("div", { class: "LotteryTicketControllerContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": `${translate('ticket', this.language)} ${this.ticketId}`, "header-subtitle": this.ticketDescription, footer: true, "delete-tab": this.totalControllers !== 1, collapsed: !this.last || this.collapsed, language: this.language, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { slot: "accordionContent" }, h("lottery-ticket", { endpoint: this.endpoint, "game-id": this.gameId, "ticket-id": this.ticketId, "number-of-grids": this.numberOfGrids, language: this.language, "reset-button": this.resetButton, "auto-pick": this.autoPick, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
|
|
713
727
|
}
|
|
714
728
|
};
|
|
715
729
|
LotteryTicketController.style = lotteryTicketControllerCss;
|
package/dist/esm/loader.js
CHANGED
|
@@ -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([["helper-accordion_5",[[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"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["helper-accordion_5",[[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"],"totalControllers":[2,"total-controllers"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["helper-accordion_5",[[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"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["helper-accordion_5",[[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"],"totalControllers":[2,"total-controllers"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[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"]]],[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]}],[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]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-72e48800.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-
|
|
1
|
+
import{p as e,b as t}from"./p-72e48800.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-bb0c3c8f",[[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"],totalControllers:[2,"total-controllers"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]},[[0,"helperAccordionAction","helperAccordionActionHandler"]]],[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"]]],[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]}],[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]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-72e48800.js";const s=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}},o=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",onClick:()=>this.toggleContent()},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand"},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 r[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};o.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;cursor:pointer}.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;cursor:pointer}.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}';const n=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},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)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const a=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.totalNumbers=0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,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(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return i("div",{class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=["ro","en"],c={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"}},d=(t,e)=>{const i=e;return c[void 0!==i&&l.includes(i)?i:"en"][t]},h=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.multiplier=!1,this.numberOfDraws=1,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=!1,this.isCustomSelect=!1,this.amountInfo={},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)}}checkForClickOutside(t){"SelectComponent"!==t.composedPath()[0].getAttribute("data-cluster")&&(this.isCustomSelect=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{this.isLoading=!1,this.gameData=t,this.grids=[...Array(this.gameData.type.boards.length).keys()],this.amountInfo=this.gameData.type.stakes[0]})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}multiplierChangeHandler(t){this.multiplier=!!t.target&&t.target.checked,this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t}),this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws}),this.ticketDone=!0,this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=!0,this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=!1,this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading)return i("div",null,i("p",null,d("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,d("error",this.language)));{const{type:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},d("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},d("autoButton",this.language))),this.grids.map(((e,s)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},d("grid",this.language)," ",s+1),i("lottery-grid",{"grid-index":s,"maximum-allowed":t.boards[s].maximumAllowed,"minimum-allowed":t.boards[s].minimumAllowed,"total-numbers":t.boards[s].highNumber-t.boards[s].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},d("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},d("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},d("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.value," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setDropdownItem(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:!0}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const p=["ro","en","fr","ar"],u={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"}},b=(t,e)=>{const i=e;return u[void 0!==i&&p.includes(i)?i:"en"][t]},g=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,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)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return console.log("ticket id:",this.ticketId),i("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{"header-title":`${b("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{slot:"accordionContent"},i("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};g.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:#7ac317}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}';export{o as helper_accordion,n as lottery_bullet,a as lottery_grid,h as lottery_ticket,g as lottery_ticket_controller}
|
|
@@ -63,6 +63,10 @@ export namespace Components {
|
|
|
63
63
|
* Ticket number
|
|
64
64
|
*/
|
|
65
65
|
"ticketId": number;
|
|
66
|
+
/**
|
|
67
|
+
* Number of ticket controllers
|
|
68
|
+
*/
|
|
69
|
+
"totalControllers": number;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
declare global {
|
|
@@ -135,6 +139,10 @@ declare namespace LocalJSX {
|
|
|
135
139
|
* Ticket number
|
|
136
140
|
*/
|
|
137
141
|
"ticketId"?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Number of ticket controllers
|
|
144
|
+
*/
|
|
145
|
+
"totalControllers"?: number;
|
|
138
146
|
}
|
|
139
147
|
interface IntrinsicElements {
|
|
140
148
|
"lottery-ticket-controller": LotteryTicketController;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-72e48800.js";const s=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"}},o=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 r[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};o.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}';const n=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},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)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, white 0%, white 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, white 0%, #f1f1f1 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const a=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.totalNumbers=0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1,this.selectedCounter=0,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(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1)).sort((()=>.5-Math.random()));e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return i("div",{class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const l=["ro","en"],c={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"}},h=(t,e)=>{const i=e;return c[void 0!==i&&l.includes(i)?i:"en"][t]},d=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.numberOfGrids=1,this.multipleDraws=!0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.multiplier=!1,this.numberOfDraws=1,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=!1,this.isCustomSelect=!1,this.amountInfo={},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)}}checkForClickOutside(t){"SelectComponent"!==t.composedPath()[0].getAttribute("data-cluster")&&(this.isCustomSelect=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{this.isLoading=!1,this.gameData=t,this.grids=[...Array(t.rules.boards.length).keys()],this.amountInfo=this.gameData.rules.stakes[0]})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}multiplierChangeHandler(t){this.multiplier=!!t.target&&t.target.checked,this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t}),this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws}),this.ticketDone=!0,this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=!0,this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=!1,this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={amount:t.amount,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading)return i("div",null,i("p",null,h("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,h("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},h("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},h("autoButton",this.language))),this.grids.map(((e,s)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},h("grid",this.language)," ",e),i("lottery-grid",{"grid-index":s,"maximum-allowed":t.boards[s].maximumAllowed,"minimum-allowed":t.boards[s].minimumAllowed,"total-numbers":t.boards[s].totalNumbers,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},h("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},h("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},h("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.amount," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.amount==t.amount?"SelectedValue":"",value:t.amount,onClick:()=>this.setDropdownItem(t)},t.amount," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:!0}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};d.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;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}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const p=["ro","en","fr","ar"],u={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"}},b=(t,e)=>{const i=e;return u[void 0!==i&&p.includes(i)?i:"en"][t]},g=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,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)}}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{"header-title":`${b("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":!0,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{slot:"accordionContent"},i("lottery-ticket",{endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};g.style=":host{display:block}";export{o as helper_accordion,n as lottery_bullet,a as lottery_grid,d as lottery_ticket,g as lottery_ticket_controller}
|