@everymatrix/casino-play-random-game 1.44.0 → 1.45.0
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/casino-play-random-game/casino-play-random-game.esm.js +1 -1
- package/dist/casino-play-random-game/p-b4a84056.entry.js +1 -0
- package/dist/casino-play-random-game/p-d2e799c3.js +2 -0
- package/dist/casino-play-random-game/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-play-random-game.cjs.entry.js +288 -308
- package/dist/cjs/casino-play-random-game.cjs.js +17 -11
- package/dist/cjs/index-4cc20a8d.js +1217 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-play-random-game/casino-play-random-game.css +0 -11
- package/dist/collection/components/casino-play-random-game/casino-play-random-game.js +432 -463
- package/dist/collection/components/casino-play-random-game/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +58 -58
- package/dist/collection/utils/utils.js +22 -22
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-play-random-game.entry.js +288 -308
- package/dist/esm/casino-play-random-game.js +14 -11
- package/dist/esm/index-7666b794.js +1190 -0
- package/dist/esm/loader.js +7 -13
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-play-random-game/.stencil/packages/stencil/casino-play-random-game/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-play-random-game/casino-play-random-game.d.ts +72 -72
- package/dist/types/components/casino-play-random-game/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -1
- package/dist/casino-play-random-game/p-0f38b3f8.js +0 -1
- package/dist/casino-play-random-game/p-1a049c0f.entry.js +0 -1
- package/dist/cjs/index-8944e204.js +0 -1247
- package/dist/components/casino-play-random-game.d.ts +0 -11
- package/dist/components/casino-play-random-game.js +0 -375
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-58563736.js +0 -1221
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-play-random-game/.stencil/packages/casino-play-random-game/stencil.config.d.ts +0 -2
|
@@ -1,339 +1,319 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-7666b794.js';
|
|
2
2
|
|
|
3
3
|
const getDevice = () => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
let userAgent = window.navigator.userAgent;
|
|
5
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
6
|
+
return 'Android';
|
|
7
|
+
}
|
|
8
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
9
|
+
return 'iPhone';
|
|
10
|
+
}
|
|
11
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
12
|
+
return 'iPad';
|
|
13
|
+
}
|
|
14
|
+
return 'PC';
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const DEFAULT_LANGUAGE = 'en';
|
|
18
18
|
const TRANSLATIONS = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
19
|
+
en: {
|
|
20
|
+
error: 'Error',
|
|
21
|
+
randomGameLoading: 'Loading ...',
|
|
22
|
+
playRandomGame: 'Play a random game',
|
|
23
|
+
playNowRandomGame: 'Play now',
|
|
24
|
+
spinRandomGame: 'Spin'
|
|
25
|
+
},
|
|
26
|
+
ro: {
|
|
27
|
+
error: 'Error',
|
|
28
|
+
randomGameLoading: 'Loading ...',
|
|
29
|
+
playRandomGame: 'Play a random game',
|
|
30
|
+
playNowRandomGame: 'Play now',
|
|
31
|
+
spinRandomGame: 'Spin'
|
|
32
|
+
},
|
|
33
|
+
fr: {
|
|
34
|
+
error: 'Error',
|
|
35
|
+
randomGameLoading: 'Loading ...',
|
|
36
|
+
playRandomGame: 'Play a random game',
|
|
37
|
+
playNowRandomGame: 'Play now',
|
|
38
|
+
spinRandomGame: 'Spin'
|
|
39
|
+
},
|
|
40
|
+
hr: {
|
|
41
|
+
error: 'Greška',
|
|
42
|
+
randomGameLoading: 'Učitavanje ...',
|
|
43
|
+
playRandomGame: 'Igraj nasumičnu igru',
|
|
44
|
+
playNowRandomGame: 'Igraj sada',
|
|
45
|
+
spinRandomGame: 'Zavrti'
|
|
46
|
+
},
|
|
47
|
+
hu: {
|
|
48
|
+
error: 'Error',
|
|
49
|
+
randomGameLoading: 'Loading ...',
|
|
50
|
+
playRandomGame: 'Play a random game',
|
|
51
|
+
playNowRandomGame: 'Play now',
|
|
52
|
+
spinRandomGame: 'Spin'
|
|
53
|
+
},
|
|
54
|
+
tr: {
|
|
55
|
+
error: "Hata",
|
|
56
|
+
randomGameLoading: "Yükleniyor...",
|
|
57
|
+
playRandomGame: "Rasgele bir oyun oyna",
|
|
58
|
+
playNowRandomGame: "Şimdi Oyna",
|
|
59
|
+
spinRandomGame: "DEĞİŞTİR"
|
|
60
|
+
}
|
|
61
61
|
};
|
|
62
62
|
const getTranslations = (url) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
return new Promise((resolve) => {
|
|
64
|
+
fetch(url)
|
|
65
|
+
.then((res) => res.json())
|
|
66
|
+
.then((data) => {
|
|
67
|
+
Object.keys(data).forEach((lang) => {
|
|
68
|
+
if (!TRANSLATIONS[lang]) {
|
|
69
|
+
TRANSLATIONS[lang] = {};
|
|
70
|
+
}
|
|
71
|
+
for (let key in data[lang]) {
|
|
72
|
+
TRANSLATIONS[lang][key] = data[lang][key];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
resolve(true);
|
|
76
|
+
});
|
|
76
77
|
});
|
|
77
|
-
});
|
|
78
78
|
};
|
|
79
79
|
const translate = (key, customLang) => {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
const lang = customLang;
|
|
81
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
const casinoPlayRandomGameCss = ":host {\n display: block;\n font-family: inherit;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n:host * {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n.RandomGameWrapper {\n width: 100%;\n height: var(--emw--size-4x-medium, 700px);\n background: transparent;\n position: relative;\n overflow: hidden;\n}\n\n.GameContainerGradient {\n position: absolute;\n top: 10%;\n left: -5px;\n width: 100vw;\n height: 80%;\n background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.5) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.5) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);\n pointer-events: none;\n z-index: 1;\n filter: blur(10px);\n}\n\n.GamesContainer {\n display: flex;\n height: var(--emw--size-4x-medium, 600px);\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n align-content: flex-start;\n gap: var(--emw--spacing-large, 20px);\n}\n\n.RandomGameCard {\n position: relative;\n width: var(--emw--size-3x-medium, 300px);\n height: var(--emw--size-4x-medium, 420px);\n border-radius: var(--emw--border-radius-large, 20px);\n top: 8%;\n filter: blur(5px);\n}\n.RandomGameCard .RandomGameVendor {\n position: absolute;\n font-size: var(--emw--font-size-x-small, 12px);\n bottom: var(--emw--spacing-small-minus, 10px);\n left: var(--emw--spacing-small-minus, 10px);\n color: var(--emw--color-typography, #FFFFFF);\n}\n\n.TheRandomGame {\n animation-name: ZoomFadeIn;\n animation-duration: 0.5s;\n animation-fill-mode: forwards;\n -webkit-animation-name: ZoomFadeIn;\n -webkit-animation-duration: 0.5s;\n -webkit-animation-fill-mode: forwards;\n opacity: 1;\n cursor: pointer;\n filter: blur(0);\n}\n\n.RandomGameImage {\n width: inherit;\n height: inherit;\n object-fit: cover;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n\n.RandomGameDetails {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: var(--emw--color-typography, #FFFFFF);\n font-size: var(--emw--font-size-small, 14px);\n width: 100%;\n}\n.RandomGameDetails .RandomGameTitle {\n line-height: 18px;\n}\n.RandomGameDetails .RandomGameInfo {\n border-radius: 50%;\n width: var(--emw--spacing-medium, 16px);\n height: var(--emw--spacing-medium, 16px);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-normal, 400);\n border: solid 1px var(--emw--color-typography, #FFFFFF);\n text-align: center;\n margin: var(--emw--spacing-2x-small, 4px) 0;\n line-height: 14px;\n cursor: pointer;\n}\n.RandomGameDetails .RandomGamePlay {\n background: var(--emw--color-primary, #4bd004);\n color: var(--emw--color-typography, #FFFFFF);\n border: none;\n border-radius: var(--emw--border-radius-medium, 5px);\n width: 200px;\n height: 40px;\n font-size: var(--emw--font-size-small, 14px);\n cursor: pointer;\n}\n\n.ButtonWrapper {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 20;\n}\n\n.ButtonContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n width: 100%;\n position: relative;\n}\n\n.ButtonIcon {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n}\n\n.QustionMark {\n position: absolute;\n font-family: sans-serif;\n font-size: 120px;\n font-weight: 900;\n color: color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 10%);\n text-shadow: 0px 12px 0px color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 50%);\n left: 50%;\n top: -20%;\n transform: translateX(-50%);\n z-index: 10;\n}\n\n.HexagonMarkShadow {\n width: 100px;\n height: 115px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 70%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.HexagonMark {\n position: absolute;\n width: var(--emw--size-medium, 90px);\n height: 105px;\n background: linear-gradient(to bottom, color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 20%) 0%, var(--emw--categories-color-secondary, var(--emw--color-secondary, #eeac4a)) 100%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.RandomButtons {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n width: 100%;\n position: relative;\n z-index: 10;\n}\n\n.RandomButton {\n font-size: var(--emw--font-size-large, 20px);\n text-transform: uppercase;\n width: max-content;\n border-radius: var(--emw--button-border-radius, 50px);\n padding: var(--emw--spacing-large, 20px) var(--emw--spacing-2x-large, 40px);\n border: solid 3px var(--emw--button-border-color, #063B17);\n color: var(--emw--button-text-color, #FFFFFF);\n opacity: 1;\n animation: ButtonEffect 3s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n cursor: pointer;\n position: relative;\n z-index: 10;\n}\n.RandomButton:hover {\n opacity: 0.8;\n}\n\n.HideAnimation {\n filter: blur(5px);\n animation: AnimateButton 0.2s forwards;\n}\n\n.Flip {\n animation-name: Flip, Blur;\n animation-duration: 0.75s, 3s;\n animation-iteration-count: infinite, 1;\n -webkit-animation-name: Flip, Blur;\n -webkit-animation-duration: 0.75s, 3s;\n -webkit-animation-iteration-count: infinite, 1;\n}\n\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n@keyframes ZoomFadeIn {\n 0% {\n transform: scale(0.2) translateY(0);\n filter: blur(5px);\n opacity: 0.3;\n }\n 50% {\n transform: scale(1.1) translateY(-30px);\n filter: blur(2px);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1) translateY(-30px);\n filter: blur(0px);\n opacity: 1;\n }\n}\n@keyframes AnimateButton {\n 0% {\n opacity: 0.7;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n}\n@keyframes Flip {\n 0% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n 100% {\n transform: rotateY(360deg);\n }\n}\n@keyframes Blur {\n 0% {\n filter: blur(0);\n }\n 50% {\n filter: blur(1px);\n }\n 100% {\n filter: blur(3px);\n }\n}\n@container (max-width: 475px) {\n .GamesContainer {\n height: inherit;\n gap: var(--emw--spacing-2x-small, 5px);\n }\n
|
|
84
|
+
const casinoPlayRandomGameCss = ":host {\n display: block;\n font-family: inherit;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n:host * {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n}\n\n.RandomGameWrapper {\n width: 100%;\n height: var(--emw--size-4x-medium, 700px);\n background: transparent;\n position: relative;\n overflow: hidden;\n}\n\n.GameContainerGradient {\n position: absolute;\n top: 10%;\n left: -5px;\n width: 100vw;\n height: 80%;\n background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.5) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.5) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);\n pointer-events: none;\n z-index: 1;\n filter: blur(10px);\n}\n\n.GamesContainer {\n display: flex;\n height: var(--emw--size-4x-medium, 600px);\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: flex-start;\n align-items: center;\n align-content: flex-start;\n gap: var(--emw--spacing-large, 20px);\n}\n\n.RandomGameCard {\n position: relative;\n width: var(--emw--size-3x-medium, 300px);\n height: var(--emw--size-4x-medium, 420px);\n border-radius: var(--emw--border-radius-large, 20px);\n top: 8%;\n filter: blur(5px);\n}\n.RandomGameCard .RandomGameVendor {\n position: absolute;\n font-size: var(--emw--font-size-x-small, 12px);\n bottom: var(--emw--spacing-small-minus, 10px);\n left: var(--emw--spacing-small-minus, 10px);\n color: var(--emw--color-typography, #FFFFFF);\n}\n\n.TheRandomGame {\n animation-name: ZoomFadeIn;\n animation-duration: 0.5s;\n animation-fill-mode: forwards;\n -webkit-animation-name: ZoomFadeIn;\n -webkit-animation-duration: 0.5s;\n -webkit-animation-fill-mode: forwards;\n opacity: 1;\n cursor: pointer;\n filter: blur(0);\n}\n\n.RandomGameImage {\n width: inherit;\n height: inherit;\n object-fit: cover;\n border-radius: var(--emw--border-radius-large, 20px);\n}\n\n.RandomGameDetails {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n color: var(--emw--color-typography, #FFFFFF);\n font-size: var(--emw--font-size-small, 14px);\n width: 100%;\n}\n.RandomGameDetails .RandomGameTitle {\n line-height: 18px;\n}\n.RandomGameDetails .RandomGameInfo {\n border-radius: 50%;\n width: var(--emw--spacing-medium, 16px);\n height: var(--emw--spacing-medium, 16px);\n font-size: var(--emw--font-size-x-small, 12px);\n font-weight: var(--emw--font-weight-normal, 400);\n border: solid 1px var(--emw--color-typography, #FFFFFF);\n text-align: center;\n margin: var(--emw--spacing-2x-small, 4px) 0;\n line-height: 14px;\n cursor: pointer;\n}\n.RandomGameDetails .RandomGamePlay {\n background: var(--emw--color-primary, #4bd004);\n color: var(--emw--color-typography, #FFFFFF);\n border: none;\n border-radius: var(--emw--border-radius-medium, 5px);\n width: 200px;\n height: 40px;\n font-size: var(--emw--font-size-small, 14px);\n cursor: pointer;\n}\n\n.ButtonWrapper {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 20;\n}\n\n.ButtonContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n width: 100%;\n position: relative;\n}\n\n.ButtonIcon {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n}\n\n.QustionMark {\n position: absolute;\n font-family: sans-serif;\n font-size: 120px;\n font-weight: 900;\n color: color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 10%);\n text-shadow: 0px 12px 0px color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 50%);\n left: 50%;\n top: -20%;\n transform: translateX(-50%);\n z-index: 10;\n}\n\n.HexagonMarkShadow {\n width: 100px;\n height: 115px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 70%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.HexagonMark {\n position: absolute;\n width: var(--emw--size-medium, 90px);\n height: 105px;\n background: linear-gradient(to bottom, color-mix(in srgb, var(--emw--casino-color-secondary, var(--emw--color-secondary, #eeac4a)), black 20%) 0%, var(--emw--categories-color-secondary, var(--emw--color-secondary, #eeac4a)) 100%);\n clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0% 70%, 0% 30%);\n}\n\n.RandomButtons {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--emw--spacing-2x-small, 5px);\n width: 100%;\n position: relative;\n z-index: 10;\n}\n\n.RandomButton {\n font-size: var(--emw--font-size-large, 20px);\n text-transform: uppercase;\n width: max-content;\n border-radius: var(--emw--button-border-radius, 50px);\n padding: var(--emw--spacing-large, 20px) var(--emw--spacing-2x-large, 40px);\n border: solid 3px var(--emw--button-border-color, #063B17);\n color: var(--emw--button-text-color, #FFFFFF);\n opacity: 1;\n animation: ButtonEffect 3s linear infinite;\n background-image: linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E), black 30%), var(--emw--color-primary, #22B04E));\n background-size: 300% 100%;\n cursor: pointer;\n position: relative;\n z-index: 10;\n}\n.RandomButton:hover {\n opacity: 0.8;\n}\n\n.HideAnimation {\n filter: blur(5px);\n animation: AnimateButton 0.2s forwards;\n}\n\n.Flip {\n animation-name: Flip, Blur;\n animation-duration: 0.75s, 3s;\n animation-iteration-count: infinite, 1;\n -webkit-animation-name: Flip, Blur;\n -webkit-animation-duration: 0.75s, 3s;\n -webkit-animation-iteration-count: infinite, 1;\n}\n\n@keyframes ButtonEffect {\n 0% {\n background-position: 0% 50%;\n }\n 33% {\n background-position: 100% 50%;\n }\n 66% {\n background-position: 200% 50%;\n }\n 100% {\n background-position: 300% 50%;\n }\n}\n@keyframes ZoomFadeIn {\n 0% {\n transform: scale(0.2) translateY(0);\n filter: blur(5px);\n opacity: 0.3;\n }\n 50% {\n transform: scale(1.1) translateY(-30px);\n filter: blur(2px);\n opacity: 0.7;\n }\n 100% {\n transform: scale(1) translateY(-30px);\n filter: blur(0px);\n opacity: 1;\n }\n}\n@keyframes AnimateButton {\n 0% {\n opacity: 0.7;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n}\n@keyframes Flip {\n 0% {\n transform: rotateY(0deg);\n }\n 50% {\n transform: rotateY(180deg);\n }\n 100% {\n transform: rotateY(360deg);\n }\n}\n@keyframes Blur {\n 0% {\n filter: blur(0);\n }\n 50% {\n filter: blur(1px);\n }\n 100% {\n filter: blur(3px);\n }\n}\n@container (max-width: 475px) {\n .GamesContainer {\n height: inherit;\n gap: var(--emw--spacing-2x-small, 5px);\n }\n .RandomGameWrapper {\n width: 100%;\n height: 300px;\n overflow: hidden;\n background: transparent;\n position: relative;\n }\n .GameContainerGradient {\n position: absolute;\n top: 10%;\n left: -5px;\n width: 100vw;\n height: 80%;\n background: linear-gradient(90deg, var(--emw--color-background, rgba(0, 0, 0, 0.9)) 0%, rgba(14, 21, 17, 0.2) 25%, rgba(14, 21, 17, 0) 50%, rgba(14, 21, 16, 0.2) 75%, var(--emw--color-background, rgba(10, 0, 0, 0.9)) 100%);\n pointer-events: none;\n z-index: 1;\n filter: blur(5px);\n }\n .RandomGameCard {\n width: 100px;\n height: 150px;\n top: 0%;\n border-radius: var(--emw--border-radius-medium, 4px);\n filter: blur(5px);\n }\n .RandomGameImage {\n width: 102px;\n height: inherit;\n top: 0%;\n }\n .RandomGameDetails {\n font-size: 14px;\n width: 100%;\n }\n .RandomGameDetails .RandomGameTitle {\n line-height: 18px;\n width: 75%;\n }\n .RandomGameDetails .RandomGameInfo {\n border-radius: 50%;\n width: 16px;\n height: 16px;\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 14px;\n }\n .RandomGameDetails .RandomGamePlay {\n background: var(--emw--color-primary, #52d004);\n color: var(--emw--color-typography, #FFFFFF);\n border: none;\n border-radius: 5px;\n width: 200px;\n height: 40px;\n font-size: 14px;\n cursor: pointer;\n }\n .RandomGameCard .RandomGameVendor {\n font-size: var(--emw--font-size-x-small, 12px);\n bottom: 5px;\n right: 5px;\n }\n .RandomButtons {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 5px;\n width: 100%;\n }\n .RandomButton {\n font-size: var(--emw--font-size-x-small, 12px);\n padding: 10px 15px;\n border: solid 1px var(--emw--button-border-color, #063B17);\n }\n .QustionMark {\n font-size: 100px;\n font-weight: 700;\n }\n .HexagonMarkShadow {\n width: 80px;\n height: 95px;\n }\n .HexagonMark {\n width: 70px;\n height: 85px;\n }\n}";
|
|
85
|
+
const CasinoPlayRandomGameStyle0 = casinoPlayRandomGameCss;
|
|
85
86
|
|
|
86
87
|
const CasinoPlayRandomGame = class {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
currentIndex--;
|
|
137
|
-
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
|
|
138
|
-
}
|
|
139
|
-
return array;
|
|
140
|
-
};
|
|
141
|
-
this.setClientStyling = () => {
|
|
142
|
-
let sheet = document.createElement('style');
|
|
143
|
-
sheet.innerHTML = this.clientStyling;
|
|
144
|
-
this.host.shadowRoot.prepend(sheet);
|
|
145
|
-
};
|
|
146
|
-
this.setClientStylingURL = () => {
|
|
147
|
-
let url = new URL(this.clientStylingUrl);
|
|
148
|
-
let cssFile = document.createElement('style');
|
|
149
|
-
fetch(url.href)
|
|
150
|
-
.then((res) => res.text())
|
|
151
|
-
.then((data) => {
|
|
152
|
-
cssFile.innerHTML = data;
|
|
153
|
-
this.clientStyling = data;
|
|
154
|
-
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
watchEndpoint(newValue, oldValue) {
|
|
159
|
-
if (newValue && newValue != oldValue && this.endpoint) {
|
|
160
|
-
this.fetchGameList();
|
|
88
|
+
constructor(hostRef) {
|
|
89
|
+
registerInstance(this, hostRef);
|
|
90
|
+
this.animation = null;
|
|
91
|
+
this.selectedGameIndex = null;
|
|
92
|
+
this.selectedGameEl = null;
|
|
93
|
+
this.iconVisibility = null;
|
|
94
|
+
this.shuffle = (array) => {
|
|
95
|
+
let currentIndex = array.length;
|
|
96
|
+
let randomIndex;
|
|
97
|
+
while (currentIndex !== 0) {
|
|
98
|
+
randomIndex = Math.floor(Math.random() * currentIndex);
|
|
99
|
+
currentIndex--;
|
|
100
|
+
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
|
|
101
|
+
}
|
|
102
|
+
return array;
|
|
103
|
+
};
|
|
104
|
+
this.setClientStyling = () => {
|
|
105
|
+
let sheet = document.createElement('style');
|
|
106
|
+
sheet.innerHTML = this.clientStyling;
|
|
107
|
+
this.host.shadowRoot.prepend(sheet);
|
|
108
|
+
};
|
|
109
|
+
this.setClientStylingURL = () => {
|
|
110
|
+
let url = new URL(this.clientStylingUrl);
|
|
111
|
+
let cssFile = document.createElement('style');
|
|
112
|
+
fetch(url.href)
|
|
113
|
+
.then((res) => res.text())
|
|
114
|
+
.then((data) => {
|
|
115
|
+
cssFile.innerHTML = data;
|
|
116
|
+
this.clientStyling = data;
|
|
117
|
+
setTimeout(() => { this.host.shadowRoot.prepend(cssFile); }, 1);
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
this.endpoint = undefined;
|
|
121
|
+
this.datasource = undefined;
|
|
122
|
+
this.language = 'en';
|
|
123
|
+
this.specificCategory = '';
|
|
124
|
+
this.iconVisible = '';
|
|
125
|
+
this.iconVisibleOnAnim = '';
|
|
126
|
+
this.launchByGameCard = '';
|
|
127
|
+
this.clientStyling = '';
|
|
128
|
+
this.clientStylingUrl = '';
|
|
129
|
+
this.translationUrl = '';
|
|
130
|
+
this.hasErrors = false;
|
|
131
|
+
this.limitStylingAppends = false;
|
|
132
|
+
this.isLoading = true;
|
|
133
|
+
this.gamesToShow = undefined;
|
|
134
|
+
this.selectedGame = null;
|
|
135
|
+
this.animationDone = false;
|
|
136
|
+
this.animationStarted = false;
|
|
161
137
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
this.isLoading = false;
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
handleIsIconVisible() {
|
|
170
|
-
this.iconVisibility = this.iconVisible === 'true' ? true : false;
|
|
171
|
-
}
|
|
172
|
-
connectedCallback() {
|
|
173
|
-
this.handleIsIconVisible();
|
|
174
|
-
}
|
|
175
|
-
componentWillLoad() {
|
|
176
|
-
if (this.translationUrl.length > 2) {
|
|
177
|
-
getTranslations(this.translationUrl);
|
|
138
|
+
watchEndpoint(newValue, oldValue) {
|
|
139
|
+
if (newValue && newValue != oldValue && this.endpoint) {
|
|
140
|
+
this.fetchGameList();
|
|
141
|
+
}
|
|
178
142
|
}
|
|
179
|
-
|
|
180
|
-
|
|
143
|
+
handleNewTranslations() {
|
|
144
|
+
this.isLoading = true;
|
|
145
|
+
getTranslations(this.translationUrl).then(() => {
|
|
146
|
+
this.isLoading = false;
|
|
147
|
+
});
|
|
181
148
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
if (!this.limitStylingAppends && this.host) {
|
|
185
|
-
if (this.clientStyling)
|
|
186
|
-
this.setClientStyling();
|
|
187
|
-
if (this.clientStylingUrl)
|
|
188
|
-
this.setClientStylingURL();
|
|
189
|
-
this.limitStylingAppends = true;
|
|
149
|
+
handleIsIconVisible() {
|
|
150
|
+
this.iconVisibility = this.iconVisible === 'true' ? true : false;
|
|
190
151
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
let url = new URL(`${this.endpoint}/v1/casino/games`);
|
|
194
|
-
url.searchParams.append('platform', getDevice());
|
|
195
|
-
url.searchParams.append('datasource', this.datasource);
|
|
196
|
-
url.searchParams.append('fields', 'gId,id,href,thumbnail,name,vendor,launchUrl,subVendor');
|
|
197
|
-
url.searchParams.append('expand', 'vendor');
|
|
198
|
-
// Number of games chosen
|
|
199
|
-
url.searchParams.append('pagination', 'offset=0,limit=423');
|
|
200
|
-
url.searchParams.append('language', this.language);
|
|
201
|
-
if (this.specificCategory) {
|
|
202
|
-
url.searchParams.append('filter', `categories(id=${this.specificCategory})`);
|
|
152
|
+
connectedCallback() {
|
|
153
|
+
this.handleIsIconVisible();
|
|
203
154
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}).catch((err) => {
|
|
212
|
-
console.error(err);
|
|
213
|
-
this.hasErrors = true;
|
|
214
|
-
reject(err);
|
|
215
|
-
}).finally(() => {
|
|
216
|
-
this.isLoading = false;
|
|
217
|
-
});
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
setUpGames(games) {
|
|
221
|
-
// Only 40 games will be selected at a time; the random game will be selected from these.
|
|
222
|
-
const shuffledGames = this.shuffle(games).slice(0, 40);
|
|
223
|
-
// Clone the games
|
|
224
|
-
return shuffledGames.concat(shuffledGames);
|
|
225
|
-
}
|
|
226
|
-
selectRandomGame() {
|
|
227
|
-
const originalGamesLength = this.gamesToShow.length / 2;
|
|
228
|
-
// Substract 3 to ensure there are always at least 5 cards after the selected one
|
|
229
|
-
this.selectedGameIndex = Math.floor(Math.random() * (originalGamesLength - 3));
|
|
230
|
-
// Offset by the length of the original to select from the cloned part
|
|
231
|
-
this.selectedGameIndex += originalGamesLength;
|
|
232
|
-
this.selectedGameEl = this.gameContainer.children[this.selectedGameIndex];
|
|
233
|
-
}
|
|
234
|
-
playRandomGame() {
|
|
235
|
-
this.animateGames();
|
|
236
|
-
//@ts-ignore
|
|
237
|
-
if (typeof gtag == 'function') {
|
|
238
|
-
//@ts-ignore
|
|
239
|
-
gtag('event', 'PlayRandomGame', {
|
|
240
|
-
'context': 'CasinoPlayRandomGame'
|
|
241
|
-
});
|
|
155
|
+
componentWillLoad() {
|
|
156
|
+
if (this.translationUrl.length > 2) {
|
|
157
|
+
getTranslations(this.translationUrl);
|
|
158
|
+
}
|
|
159
|
+
if (this.endpoint && this.language && this.datasource) {
|
|
160
|
+
return this.fetchGameList();
|
|
161
|
+
}
|
|
242
162
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
});
|
|
163
|
+
componentDidLoad() {
|
|
164
|
+
if (!this.limitStylingAppends && this.host) {
|
|
165
|
+
if (this.clientStyling)
|
|
166
|
+
this.setClientStyling();
|
|
167
|
+
if (this.clientStylingUrl)
|
|
168
|
+
this.setClientStylingURL();
|
|
169
|
+
this.limitStylingAppends = true;
|
|
170
|
+
}
|
|
252
171
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
172
|
+
fetchGameList() {
|
|
173
|
+
let url = new URL(`${this.endpoint}/v1/casino/games`);
|
|
174
|
+
url.searchParams.append('platform', getDevice());
|
|
175
|
+
url.searchParams.append('datasource', this.datasource);
|
|
176
|
+
url.searchParams.append('fields', 'gId,id,href,thumbnail,name,vendor,launchUrl,subVendor');
|
|
177
|
+
url.searchParams.append('expand', 'vendor');
|
|
178
|
+
// Number of games chosen
|
|
179
|
+
url.searchParams.append('pagination', 'offset=0,limit=423');
|
|
180
|
+
url.searchParams.append('language', this.language);
|
|
181
|
+
if (this.specificCategory) {
|
|
182
|
+
url.searchParams.append('filter', `categories(id=${this.specificCategory})`);
|
|
183
|
+
}
|
|
184
|
+
return new Promise((resolve, reject) => {
|
|
185
|
+
this.isLoading = true;
|
|
186
|
+
fetch(url.href)
|
|
187
|
+
.then((res) => res.json())
|
|
188
|
+
.then((data) => {
|
|
189
|
+
this.gamesToShow = this.setUpGames(data === null || data === void 0 ? void 0 : data.items);
|
|
190
|
+
resolve(true);
|
|
191
|
+
}).catch((err) => {
|
|
192
|
+
console.error(err);
|
|
193
|
+
this.hasErrors = true;
|
|
194
|
+
reject(err);
|
|
195
|
+
}).finally(() => {
|
|
196
|
+
this.isLoading = false;
|
|
197
|
+
});
|
|
198
|
+
});
|
|
264
199
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
const translation = ((cardWidth + gap) * this.selectedGameIndex) + // Width of game cards up to the selected
|
|
271
|
-
(cardWidth / 2) - // Additional half card width to center to the selected game
|
|
272
|
-
(gameContainerWidth / 2); // Minus half the container width to center the card
|
|
273
|
-
const containerRolling = [
|
|
274
|
-
{ transform: `translateX(0px)`, scale: 1 },
|
|
275
|
-
{ scale: 0.75 },
|
|
276
|
-
{ transform: `translateX(-${translation}px)`, scale: 1 }
|
|
277
|
-
];
|
|
278
|
-
const containerTiming = {
|
|
279
|
-
duration: 3000,
|
|
280
|
-
easing: 'cubic-bezier(0.5, 0, 0.5, 1.2)',
|
|
281
|
-
fill: 'forwards'
|
|
282
|
-
};
|
|
283
|
-
this.animation = this.gameContainer.animate(containerRolling, containerTiming);
|
|
284
|
-
this.animation.onfinish = () => {
|
|
285
|
-
this.animationDone = true;
|
|
286
|
-
this.selectedGameEl.classList.add('TheRandomGame');
|
|
287
|
-
this.selectedGame = this.gamesToShow[this.selectedGameIndex];
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
playGame() {
|
|
291
|
-
if (!this.selectedGame)
|
|
292
|
-
return;
|
|
293
|
-
window.postMessage({ type: 'PlayRandomGame', gameId: this.selectedGame.id, launchUrl: this.selectedGame.launchUrl, gameName: this.selectedGame.name, subVendor: this.selectedGame.subVendor }, window.location.href);
|
|
294
|
-
//@ts-ignore
|
|
295
|
-
if (typeof gtag == 'function') {
|
|
296
|
-
//@ts-ignore
|
|
297
|
-
gtag('event', 'OpenRandomGame', {
|
|
298
|
-
'context': 'CasinoPlayRandomGame'
|
|
299
|
-
});
|
|
200
|
+
setUpGames(games) {
|
|
201
|
+
// Only 40 games will be selected at a time; the random game will be selected from these.
|
|
202
|
+
const shuffledGames = this.shuffle(games).slice(0, 40);
|
|
203
|
+
// Clone the games
|
|
204
|
+
return shuffledGames.concat(shuffledGames);
|
|
300
205
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
gtag('event', 'OpenRandomGameInfo', {
|
|
309
|
-
'context': 'CasinoPlayRandomGame'
|
|
310
|
-
});
|
|
206
|
+
selectRandomGame() {
|
|
207
|
+
const originalGamesLength = this.gamesToShow.length / 2;
|
|
208
|
+
// Substract 3 to ensure there are always at least 5 cards after the selected one
|
|
209
|
+
this.selectedGameIndex = Math.floor(Math.random() * (originalGamesLength - 3));
|
|
210
|
+
// Offset by the length of the original to select from the cloned part
|
|
211
|
+
this.selectedGameIndex += originalGamesLength;
|
|
212
|
+
this.selectedGameEl = this.gameContainer.children[this.selectedGameIndex];
|
|
311
213
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
214
|
+
playRandomGame() {
|
|
215
|
+
this.animateGames();
|
|
216
|
+
//@ts-ignore
|
|
217
|
+
if (typeof gtag == 'function') {
|
|
218
|
+
//@ts-ignore
|
|
219
|
+
gtag('event', 'PlayRandomGame', {
|
|
220
|
+
'context': 'CasinoPlayRandomGame'
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
respin() {
|
|
225
|
+
this.animateGames();
|
|
226
|
+
//@ts-ignore
|
|
227
|
+
if (typeof gtag == 'function') {
|
|
228
|
+
//@ts-ignore
|
|
229
|
+
gtag('event', 'RespinRandomGame', {
|
|
230
|
+
'context': 'CasinoPlayRandomGame'
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
animateGames() {
|
|
235
|
+
this.iconVisibility = this.iconVisibleOnAnim === 'true' ? true : false;
|
|
236
|
+
this.animationStarted = true;
|
|
237
|
+
this.animationDone = false;
|
|
238
|
+
if (this.animation)
|
|
239
|
+
this.animation.cancel();
|
|
240
|
+
if (this.selectedGameEl) {
|
|
241
|
+
this.selectedGameEl.classList.remove('TheRandomGame');
|
|
242
|
+
this.selectedGame = null;
|
|
243
|
+
this.selectedGameIndex = null;
|
|
244
|
+
}
|
|
245
|
+
this.selectRandomGame();
|
|
246
|
+
const gapStyle = window.getComputedStyle(this.gameContainer).getPropertyValue('gap');
|
|
247
|
+
const gap = parseInt(gapStyle, 10);
|
|
248
|
+
const cardWidth = this.selectedGameEl.offsetWidth;
|
|
249
|
+
const gameContainerWidth = this.gameContainer.offsetWidth;
|
|
250
|
+
const translation = ((cardWidth + gap) * this.selectedGameIndex) + // Width of game cards up to the selected
|
|
251
|
+
(cardWidth / 2) - // Additional half card width to center to the selected game
|
|
252
|
+
(gameContainerWidth / 2); // Minus half the container width to center the card
|
|
253
|
+
const containerRolling = [
|
|
254
|
+
{ transform: `translateX(0px)`, scale: 1 },
|
|
255
|
+
{ scale: 0.75 },
|
|
256
|
+
{ transform: `translateX(-${translation}px)`, scale: 1 }
|
|
257
|
+
];
|
|
258
|
+
const containerTiming = {
|
|
259
|
+
duration: 3000,
|
|
260
|
+
easing: 'cubic-bezier(0.5, 0, 0.5, 1.2)',
|
|
261
|
+
fill: 'forwards'
|
|
262
|
+
};
|
|
263
|
+
this.animation = this.gameContainer.animate(containerRolling, containerTiming);
|
|
264
|
+
this.animation.onfinish = () => {
|
|
265
|
+
this.animationDone = true;
|
|
266
|
+
this.selectedGameEl.classList.add('TheRandomGame');
|
|
267
|
+
this.selectedGame = this.gamesToShow[this.selectedGameIndex];
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
playGame() {
|
|
271
|
+
if (!this.selectedGame)
|
|
272
|
+
return;
|
|
273
|
+
window.postMessage({ type: 'PlayRandomGame', gameId: this.selectedGame.id, launchUrl: this.selectedGame.launchUrl, gameName: this.selectedGame.name, subVendor: this.selectedGame.subVendor }, window.location.href);
|
|
274
|
+
//@ts-ignore
|
|
275
|
+
if (typeof gtag == 'function') {
|
|
276
|
+
//@ts-ignore
|
|
277
|
+
gtag('event', 'OpenRandomGame', {
|
|
278
|
+
'context': 'CasinoPlayRandomGame'
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
;
|
|
283
|
+
showGameInfo() {
|
|
284
|
+
window.postMessage({ type: 'InfoRandomGame', gameId: this.selectedGame.id, launchUrl: this.selectedGame.launchUrl, gameName: this.selectedGame.name, subVendor: this.selectedGame.subVendor }, window.location.href);
|
|
285
|
+
//@ts-ignore
|
|
286
|
+
if (typeof gtag == 'function') {
|
|
287
|
+
//@ts-ignore
|
|
288
|
+
gtag('event', 'OpenRandomGameInfo', {
|
|
289
|
+
'context': 'CasinoPlayRandomGame'
|
|
290
|
+
});
|
|
291
|
+
}
|
|
320
292
|
}
|
|
321
|
-
|
|
322
|
-
|
|
293
|
+
renderGameDetails() {
|
|
294
|
+
return h("div", { class: "RandomButtonsWrapper" }, h("div", { class: "RandomGameDetails" }, h("span", { class: "RandomGameTitle" }, this.selectedGame.name), h("span", { class: "RandomGameInfo", onClick: () => this.showGameInfo() }, "i")), h("div", { class: "RandomButtons" }, h("button", { class: "RandomButton On", onClick: () => this.respin() }, translate('spinRandomGame', this.language)), !this.launchByGameCard &&
|
|
295
|
+
h("button", { class: "RandomButton On", onClick: () => this.playGame() }, translate('playNowRandomGame', this.language))));
|
|
323
296
|
}
|
|
324
|
-
|
|
325
|
-
|
|
297
|
+
render() {
|
|
298
|
+
if (this.hasErrors) {
|
|
299
|
+
return (h("div", { class: "RandomGameError" }, h("div", { class: "Title" }, translate('error', this.language))));
|
|
300
|
+
}
|
|
301
|
+
if (this.isLoading) {
|
|
302
|
+
return (h("div", { class: "RandomGameLoading" }, h("div", { class: "Title" }, translate('randomGameLoading', this.language))));
|
|
303
|
+
}
|
|
304
|
+
if (!this.isLoading) {
|
|
305
|
+
return h("div", { class: "RandomGameWrapper" }, h("div", { class: 'GameContainerGradient' }), h("div", { class: 'GamesContainer', ref: (el) => this.gameContainer = el }, this.gamesToShow && this.gamesToShow.map((game, index) => (h("div", { class: 'RandomGameCard', key: index, onClick: this.launchByGameCard === 'true' ? () => this.playGame() : null }, h("div", { class: "RandomGameVendor" }, game.vendor.name), h("img", { class: 'RandomGameImage', src: game.thumbnail, alt: game.name, title: game.name }), this.selectedGame && this.selectedGameIndex === index && this.renderGameDetails())))), h("div", { class: `ButtonWrapper ${this.animationDone ? 'HideAnimation' : ''}` }, h("div", { class: "ButtonContainer" }, this.iconVisibility && h("div", { class: `ButtonIcon ${this.animationStarted ? 'Flip' : ''}` }, h("div", { class: "QustionMark" }, "?"), h("div", { class: "HexagonMarkShadow" }), h("div", { class: "HexagonMark" })), !this.animationStarted && h("div", { class: `RandomButton ${this.animationStarted ? 'HideAnimation' : ''}`, onClick: () => this.playRandomGame() }, translate('playRandomGame', this.language)))));
|
|
306
|
+
}
|
|
326
307
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}; }
|
|
308
|
+
get host() { return getElement(this); }
|
|
309
|
+
static get watchers() { return {
|
|
310
|
+
"endpoint": ["watchEndpoint"],
|
|
311
|
+
"datasource": ["watchEndpoint"],
|
|
312
|
+
"language": ["watchEndpoint"],
|
|
313
|
+
"translationUrl": ["handleNewTranslations"],
|
|
314
|
+
"iconVisible": ["handleIsIconVisible"]
|
|
315
|
+
}; }
|
|
336
316
|
};
|
|
337
|
-
CasinoPlayRandomGame.style =
|
|
317
|
+
CasinoPlayRandomGame.style = CasinoPlayRandomGameStyle0;
|
|
338
318
|
|
|
339
319
|
export { CasinoPlayRandomGame as casino_play_random_game };
|