@energy8platform/platform-core 0.25.4 → 0.26.1
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/game-spec.d.ts +3 -0
- package/dist/index.cjs.js +1772 -187
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +77 -9
- package/dist/index.esm.js +1772 -187
- package/dist/index.esm.js.map +1 -1
- package/dist/loading.cjs.js +237 -90
- package/dist/loading.cjs.js.map +1 -1
- package/dist/loading.d.ts +52 -2
- package/dist/loading.esm.js +235 -90
- package/dist/loading.esm.js.map +1 -1
- package/dist/shell.cjs.js +1539 -97
- package/dist/shell.cjs.js.map +1 -1
- package/dist/shell.d.ts +43 -11
- package/dist/shell.esm.js +1538 -98
- package/dist/shell.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/game-spec/types.ts +3 -0
- package/src/loading/CSSPreloader.ts +21 -115
- package/src/loading/index.ts +6 -0
- package/src/loading/variants/energy8.ts +105 -0
- package/src/loading/variants/index.ts +19 -0
- package/src/loading/variants/types.ts +36 -0
- package/src/loading/variants/voidmoon.ts +134 -0
- package/src/shell/GameShell.ts +87 -41
- package/src/shell/components/BuyBonus.ts +160 -14
- package/src/shell/components/GameInfo.ts +104 -5
- package/src/shell/components/Settings.ts +9 -10
- package/src/shell/components/pickers.ts +66 -10
- package/src/shell/components/primitives.ts +4 -3
- package/src/shell/i18n.ts +23 -0
- package/src/shell/index.ts +2 -1
- package/src/shell/keyboard.ts +229 -0
- package/src/shell/locales.ts +864 -0
- package/src/shell/shell.css.ts +37 -14
- package/src/shell/types.ts +8 -0
- package/src/shell/version.ts +1 -1
- package/src/types.ts +8 -0
package/dist/index.cjs.js
CHANGED
|
@@ -712,7 +712,7 @@ const GRADIENT_DEFS = `
|
|
|
712
712
|
<stop stop-color="#316FB0"/><stop stop-color="#1FCDE6" offset=".5"/><stop stop-color="#29FEE7" offset="1"/>
|
|
713
713
|
</linearGradient>`;
|
|
714
714
|
/** Max width of the loader bar in SVG units */
|
|
715
|
-
const LOADER_BAR_MAX_WIDTH = 174;
|
|
715
|
+
const LOADER_BAR_MAX_WIDTH$1 = 174;
|
|
716
716
|
/**
|
|
717
717
|
* Build the Energy8 SVG logo with a loader bar, using unique IDs.
|
|
718
718
|
*
|
|
@@ -745,61 +745,27 @@ ${defs}
|
|
|
745
745
|
</svg>`;
|
|
746
746
|
}
|
|
747
747
|
|
|
748
|
-
|
|
749
|
-
const RECT_ID = 'ge-pl-loader-rect';
|
|
750
|
-
const TEXT_ID = 'ge-pl-loader-text';
|
|
751
|
-
const
|
|
752
|
-
const LOGO_SVG = buildLogoSVG({
|
|
748
|
+
/** Element ids the lifecycle handle binds to (also asserted by tests). */
|
|
749
|
+
const RECT_ID$1 = 'ge-pl-loader-rect';
|
|
750
|
+
const TEXT_ID$1 = 'ge-pl-loader-text';
|
|
751
|
+
const LOGO_SVG$1 = buildLogoSVG({
|
|
753
752
|
idPrefix: 'pl',
|
|
754
753
|
svgClass: 'ge-logo-svg',
|
|
755
754
|
clipRectClass: 'ge-clip-rect',
|
|
756
|
-
clipRectId: RECT_ID,
|
|
755
|
+
clipRectId: RECT_ID$1,
|
|
757
756
|
textClass: 'ge-preloader-svg-text',
|
|
758
|
-
textId: TEXT_ID,
|
|
757
|
+
textId: TEXT_ID$1,
|
|
759
758
|
});
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
return
|
|
764
|
-
return Math.max(0, Math.min(1, p));
|
|
765
|
-
}
|
|
766
|
-
function createCSSPreloader(container, config) {
|
|
767
|
-
if (document.getElementById(PRELOADER_ID))
|
|
768
|
-
return;
|
|
769
|
-
const bgColor = typeof config?.backgroundColor === 'string'
|
|
770
|
-
? config.backgroundColor
|
|
771
|
-
: typeof config?.backgroundColor === 'number'
|
|
772
|
-
? `#${config.backgroundColor.toString(16).padStart(6, '0')}`
|
|
773
|
-
: '#0a0a1a';
|
|
774
|
-
const bgGradient = config?.backgroundGradient ?? `linear-gradient(135deg, ${bgColor} 0%, #1a1a3e 100%)`;
|
|
775
|
-
const customHTML = config?.cssPreloaderHTML ?? '';
|
|
776
|
-
const overlay = document.createElement('div');
|
|
777
|
-
overlay.id = PRELOADER_ID;
|
|
778
|
-
overlay.innerHTML = customHTML || `
|
|
759
|
+
/** The default Energy8-branded preloader: animated wordmark + shimmering loader bar. */
|
|
760
|
+
const energy8Variant = {
|
|
761
|
+
buildContentHTML() {
|
|
762
|
+
return `
|
|
779
763
|
<div class="ge-preloader-content">
|
|
780
|
-
${LOGO_SVG}
|
|
764
|
+
${LOGO_SVG$1}
|
|
781
765
|
</div>
|
|
782
766
|
`;
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
#${PRELOADER_ID} {
|
|
786
|
-
position: absolute;
|
|
787
|
-
top: 0; left: 0;
|
|
788
|
-
width: 100%; height: 100%;
|
|
789
|
-
background: ${bgGradient};
|
|
790
|
-
display: flex;
|
|
791
|
-
align-items: center;
|
|
792
|
-
justify-content: center;
|
|
793
|
-
z-index: 10000;
|
|
794
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
795
|
-
transition: opacity 0.4s ease-out;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
#${PRELOADER_ID}.ge-preloader-hidden {
|
|
799
|
-
opacity: 0;
|
|
800
|
-
pointer-events: none;
|
|
801
|
-
}
|
|
802
|
-
|
|
767
|
+
},
|
|
768
|
+
css: `
|
|
803
769
|
.ge-preloader-content {
|
|
804
770
|
display: flex;
|
|
805
771
|
flex-direction: column;
|
|
@@ -850,6 +816,219 @@ function createCSSPreloader(container, config) {
|
|
|
850
816
|
0%, 100% { opacity: 0.5; }
|
|
851
817
|
50% { opacity: 1; }
|
|
852
818
|
}
|
|
819
|
+
`,
|
|
820
|
+
mount(overlay) {
|
|
821
|
+
const rectEl = overlay.querySelector(`#${RECT_ID$1}`);
|
|
822
|
+
const textEl = overlay.querySelector(`#${TEXT_ID$1}`);
|
|
823
|
+
// Custom HTML mode (or missing logo) — no progress target; lifecycle inert.
|
|
824
|
+
if (!rectEl || !textEl)
|
|
825
|
+
return null;
|
|
826
|
+
let driven = false;
|
|
827
|
+
return {
|
|
828
|
+
setProgress(p, showPercentage) {
|
|
829
|
+
if (!driven) {
|
|
830
|
+
rectEl.classList.add('driven');
|
|
831
|
+
driven = true;
|
|
832
|
+
}
|
|
833
|
+
rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH$1));
|
|
834
|
+
if (showPercentage) {
|
|
835
|
+
textEl.textContent = `${Math.round(p * 100)}%`;
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
showTapText(text) {
|
|
839
|
+
textEl.textContent = text;
|
|
840
|
+
textEl.classList.add('ge-svg-pulse');
|
|
841
|
+
},
|
|
842
|
+
};
|
|
843
|
+
},
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
/** Element ids the lifecycle handle binds to. */
|
|
847
|
+
const RECT_ID = 'ge-vm-loader-rect';
|
|
848
|
+
const TEXT_ID = 'ge-vm-loader-text';
|
|
849
|
+
/** Max width (SVG units) of the voidmoon loader bar fill. Spans the first 'o' → end of the crescent. */
|
|
850
|
+
const LOADER_BAR_MAX_WIDTH = 751;
|
|
851
|
+
/**
|
|
852
|
+
* "voidmoon" wordmark — the official logo, embedded verbatim as SVG outlines:
|
|
853
|
+
* thin white letters with the final "o" of "moon" rendered as a purple crescent
|
|
854
|
+
* (#9D63FE). The glyphs live in a flipped group (`translate(0,941) scale(1,-1)`)
|
|
855
|
+
* exactly as exported; the loader bar + status text are added beneath it in the
|
|
856
|
+
* outer (un-flipped) viewBox space.
|
|
857
|
+
*/
|
|
858
|
+
const LOGO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="301 339 1075 335" class="ge-vm-logo-svg" style="overflow:visible" role="img">
|
|
859
|
+
<title>voidmoon</title>
|
|
860
|
+
<g transform="translate(0,941) scale(1,-1)">
|
|
861
|
+
<g fill="#ffffff" fill-rule="evenodd">
|
|
862
|
+
<path d="M627 562 c-4 -2 -7 -6 -7 -12 0 -13 14 -18 23 -10 3 3 3 5 4 9 0 7 -2 11 -7 13 -5 2 -9 2 -13 0z"/>
|
|
863
|
+
<path d="M780 531 l0 -31 -6 5 c-14 14 -35 17 -56 10 -24 -8 -40 -28 -42 -53 0 -11 1 -19 6 -30 8 -16 22 -27 40 -32 8 -2 23 -2 31 0 18 4 34 17 42 33 2 5 4 11 5 14 1 3 1 24 1 61 l0 55 -10 0 -11 0 0 -32z m-24 -38 c20 -10 28 -31 20 -50 -3 -6 -13 -16 -19 -19 -21 -10 -45 -2 -56 18 -2 4 -2 7 -3 14 -1 14 4 24 15 33 8 6 15 8 27 8 9 -1 10 -1 16 -4z"/>
|
|
864
|
+
<path d="M520 518 c-26 -6 -45 -25 -50 -51 -1 -9 -1 -11 0 -19 3 -12 7 -21 15 -30 8 -8 16 -13 28 -17 6 -2 9 -2 19 -2 10 0 13 0 20 2 21 8 36 24 41 46 1 8 1 13 0 22 -5 23 -21 40 -44 47 -6 2 -23 3 -29 2z m29 -25 c9 -4 16 -11 20 -19 2 -5 3 -6 3 -15 0 -10 -1 -11 -3 -16 -8 -15 -23 -24 -40 -23 -9 1 -15 3 -22 8 -22 15 -21 48 2 63 7 4 14 6 24 6 8 -1 10 -1 16 -4z"/>
|
|
865
|
+
<path d="M869 518 c-21 -4 -35 -18 -40 -38 -1 -6 -1 -14 -1 -43 l1 -35 10 0 11 0 0 37 c0 33 1 38 2 41 3 7 7 11 13 14 5 2 8 3 13 3 11 0 20 -5 25 -16 l3 -5 0 -37 1 -37 10 0 10 0 0 37 c0 35 1 37 3 42 5 10 14 16 26 16 11 0 21 -7 25 -17 2 -5 2 -7 2 -41 0 -19 0 -36 1 -37 0 -1 3 -1 11 -1 l10 1 0 35 c0 23 0 38 -1 42 -2 9 -8 21 -14 27 -20 17 -51 17 -68 -1 l-5 -5 -5 5 c-9 9 -19 13 -31 14 -5 0 -10 0 -12 -1z"/>
|
|
866
|
+
<path d="M1077 517 c-9 -1 -20 -7 -27 -12 -7 -6 -14 -16 -18 -25 -4 -11 -5 -25 -3 -35 5 -21 21 -37 42 -44 38 -12 78 14 81 53 1 15 -4 31 -14 43 -14 17 -38 25 -61 20z m25 -22 c19 -5 31 -24 28 -42 -4 -26 -34 -41 -59 -29 -20 10 -27 32 -17 52 8 16 29 25 48 19z"/>
|
|
867
|
+
<path d="M1282 516 c-18 -5 -34 -21 -38 -39 -1 -4 -1 -18 -1 -40 l1 -35 10 -1 10 0 0 32 c0 20 0 35 1 38 2 11 8 18 18 23 7 3 18 3 26 0 6 -3 12 -9 15 -16 2 -4 3 -6 3 -40 l1 -36 10 0 11 0 0 33 c0 38 0 43 -6 54 -7 14 -19 24 -34 28 -7 1 -20 1 -27 -1z"/>
|
|
868
|
+
<path d="M329 515 c0 -1 2 -5 4 -9 2 -5 13 -28 24 -53 12 -24 21 -45 22 -46 2 -4 10 -7 15 -7 4 0 11 3 13 6 3 2 50 105 50 108 0 1 -3 1 -11 1 l-11 0 -7 -14 c-3 -8 -12 -28 -20 -45 -7 -17 -13 -31 -14 -31 -1 -1 -3 5 -17 35 -19 43 -23 53 -24 54 -1 1 -5 1 -13 1 -6 0 -11 0 -11 0z"/>
|
|
869
|
+
<path d="M623 514 c0 -1 0 -26 0 -57 l1 -55 10 0 10 0 0 56 0 57 -10 0 c-7 0 -10 0 -11 -1z"/>
|
|
870
|
+
</g>
|
|
871
|
+
<g fill="#9D63FE" fill-rule="evenodd">
|
|
872
|
+
<path d="M1150 515 c-3 0 -6 -1 -6 -1 0 -1 2 -2 5 -2 10 -4 26 -17 31 -27 11 -21 8 -44 -7 -62 -5 -7 -17 -16 -24 -18 -3 -1 -5 -2 -4 -2 0 -2 16 -3 24 -3 35 3 59 40 49 74 -2 8 -7 18 -13 24 -5 6 -15 13 -23 16 -8 3 -24 4 -32 1z"/>
|
|
873
|
+
</g>
|
|
874
|
+
</g>
|
|
875
|
+
|
|
876
|
+
<rect x="469" y="600" width="751" height="9" rx="4.5" fill="rgba(255,255,255,0.12)"/>
|
|
877
|
+
<clipPath id="vm-loader-clip">
|
|
878
|
+
<rect id="${RECT_ID}" x="469" y="600" width="0" height="9" rx="4.5" class="ge-vm-clip-rect"/>
|
|
879
|
+
</clipPath>
|
|
880
|
+
<rect x="469" y="600" width="751" height="9" rx="4.5" fill="#9D63FE" clip-path="url(#vm-loader-clip)"/>
|
|
881
|
+
|
|
882
|
+
<text id="${TEXT_ID}" x="844.5" y="650" text-anchor="middle" class="ge-vm-text">Loading...</text>
|
|
883
|
+
</svg>`;
|
|
884
|
+
const voidmoonVariant = {
|
|
885
|
+
buildContentHTML() {
|
|
886
|
+
return `
|
|
887
|
+
<div class="ge-vm-content">
|
|
888
|
+
${LOGO_SVG}
|
|
889
|
+
</div>
|
|
890
|
+
`;
|
|
891
|
+
},
|
|
892
|
+
css: `
|
|
893
|
+
.ge-vm-content {
|
|
894
|
+
display: flex;
|
|
895
|
+
flex-direction: column;
|
|
896
|
+
align-items: center;
|
|
897
|
+
width: 82%;
|
|
898
|
+
max-width: 680px;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.ge-vm-logo-svg {
|
|
902
|
+
width: 100%;
|
|
903
|
+
height: auto;
|
|
904
|
+
filter: drop-shadow(0 0 26px rgba(157, 99, 254, 0.3));
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
/* Shimmer the loader bar while waiting */
|
|
908
|
+
.ge-vm-clip-rect {
|
|
909
|
+
animation: ge-vm-fill 2s ease-in-out infinite;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
@keyframes ge-vm-fill {
|
|
913
|
+
0% { width: 0; }
|
|
914
|
+
50% { width: 751; }
|
|
915
|
+
100% { width: 0; }
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/* Stop shimmer once JS-driven progress takes over. */
|
|
919
|
+
.ge-vm-clip-rect.driven {
|
|
920
|
+
animation: none;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
.ge-vm-text {
|
|
924
|
+
fill: rgba(255, 255, 255, 0.6);
|
|
925
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
926
|
+
font-size: 20px;
|
|
927
|
+
font-weight: 600;
|
|
928
|
+
letter-spacing: 3px;
|
|
929
|
+
animation: ge-vm-pulse 1.5s ease-in-out infinite;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
@keyframes ge-vm-pulse {
|
|
933
|
+
0%, 100% { opacity: 0.4; }
|
|
934
|
+
50% { opacity: 1; }
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
/* Tap-to-start CTA pulse. Compound selector outweighs the ambient
|
|
938
|
+
.ge-vm-text rule, swapping the animation cleanly. */
|
|
939
|
+
.ge-vm-text.ge-vm-tap-pulse {
|
|
940
|
+
animation: ge-vm-tap 1.2s ease-in-out infinite;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
@keyframes ge-vm-tap {
|
|
944
|
+
0%, 100% { opacity: 0.5; }
|
|
945
|
+
50% { opacity: 1; }
|
|
946
|
+
}
|
|
947
|
+
`,
|
|
948
|
+
mount(overlay) {
|
|
949
|
+
const rectEl = overlay.querySelector(`#${RECT_ID}`);
|
|
950
|
+
const textEl = overlay.querySelector(`#${TEXT_ID}`);
|
|
951
|
+
if (!rectEl || !textEl)
|
|
952
|
+
return null;
|
|
953
|
+
let driven = false;
|
|
954
|
+
return {
|
|
955
|
+
setProgress(p, showPercentage) {
|
|
956
|
+
if (!driven) {
|
|
957
|
+
rectEl.classList.add('driven');
|
|
958
|
+
driven = true;
|
|
959
|
+
}
|
|
960
|
+
rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH));
|
|
961
|
+
if (showPercentage) {
|
|
962
|
+
textEl.textContent = `${Math.round(p * 100)}%`;
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
showTapText(text) {
|
|
966
|
+
textEl.textContent = text;
|
|
967
|
+
textEl.classList.add('ge-vm-tap-pulse');
|
|
968
|
+
},
|
|
969
|
+
};
|
|
970
|
+
},
|
|
971
|
+
};
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Registry of selectable preloader variants. Add a new variant by writing a
|
|
975
|
+
* file in this folder and adding one entry here — `PreloaderVariantName` and
|
|
976
|
+
* `LoadingScreenConfig.preloaderVariant` widen automatically.
|
|
977
|
+
*/
|
|
978
|
+
const VARIANTS = {
|
|
979
|
+
energy8: energy8Variant,
|
|
980
|
+
voidmoon: voidmoonVariant,
|
|
981
|
+
};
|
|
982
|
+
/** Default variant used when `preloaderVariant` is omitted or unknown. */
|
|
983
|
+
const DEFAULT_VARIANT_NAME = 'energy8';
|
|
984
|
+
|
|
985
|
+
const PRELOADER_ID = '__ge-css-preloader__';
|
|
986
|
+
const REMOVE_FADE_TIMEOUT_MS = 600;
|
|
987
|
+
let state = null;
|
|
988
|
+
function clampProgress(p) {
|
|
989
|
+
if (!Number.isFinite(p))
|
|
990
|
+
return 0;
|
|
991
|
+
return Math.max(0, Math.min(1, p));
|
|
992
|
+
}
|
|
993
|
+
function createCSSPreloader(container, config) {
|
|
994
|
+
if (document.getElementById(PRELOADER_ID))
|
|
995
|
+
return;
|
|
996
|
+
const bgColor = typeof config?.backgroundColor === 'string'
|
|
997
|
+
? config.backgroundColor
|
|
998
|
+
: typeof config?.backgroundColor === 'number'
|
|
999
|
+
? `#${config.backgroundColor.toString(16).padStart(6, '0')}`
|
|
1000
|
+
: '#0a0a1a';
|
|
1001
|
+
const bgGradient = config?.backgroundGradient ?? `linear-gradient(135deg, ${bgColor} 0%, #1a1a3e 100%)`;
|
|
1002
|
+
const customHTML = config?.cssPreloaderHTML ?? '';
|
|
1003
|
+
// Pick the visual identity. Unknown names fall back to the default so a bad
|
|
1004
|
+
// config value degrades to a working preloader rather than a blank overlay.
|
|
1005
|
+
const variant = VARIANTS[config?.preloaderVariant ?? DEFAULT_VARIANT_NAME] ??
|
|
1006
|
+
VARIANTS[DEFAULT_VARIANT_NAME];
|
|
1007
|
+
const overlay = document.createElement('div');
|
|
1008
|
+
overlay.id = PRELOADER_ID;
|
|
1009
|
+
overlay.innerHTML = customHTML || variant.buildContentHTML(config);
|
|
1010
|
+
const styleEl = document.createElement('style');
|
|
1011
|
+
// Shared overlay infrastructure (positioning / background / fade) plus the
|
|
1012
|
+
// variant's own content styling and animations.
|
|
1013
|
+
styleEl.textContent = `
|
|
1014
|
+
#${PRELOADER_ID} {
|
|
1015
|
+
position: absolute;
|
|
1016
|
+
top: 0; left: 0;
|
|
1017
|
+
width: 100%; height: 100%;
|
|
1018
|
+
background: ${bgGradient};
|
|
1019
|
+
display: flex;
|
|
1020
|
+
align-items: center;
|
|
1021
|
+
justify-content: center;
|
|
1022
|
+
z-index: 10000;
|
|
1023
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1024
|
+
transition: opacity 0.4s ease-out;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
#${PRELOADER_ID}.ge-preloader-hidden {
|
|
1028
|
+
opacity: 0;
|
|
1029
|
+
pointer-events: none;
|
|
1030
|
+
}
|
|
1031
|
+
${variant.css}
|
|
853
1032
|
`;
|
|
854
1033
|
// The absolute overlay needs a positioned ancestor. Only override a STATIC container, and
|
|
855
1034
|
// remember the prior inline value so removeCSSPreloader can restore it (an inline `relative`
|
|
@@ -858,41 +1037,18 @@ function createCSSPreloader(container, config) {
|
|
|
858
1037
|
container.style.position = container.style.position || 'relative';
|
|
859
1038
|
container.appendChild(styleEl);
|
|
860
1039
|
container.appendChild(overlay);
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
// Custom HTML mode — no logo SVG, lifecycle API becomes mostly inert.
|
|
865
|
-
// We still record state so removeCSSPreloader works.
|
|
866
|
-
state = {
|
|
867
|
-
container,
|
|
868
|
-
prevPosition,
|
|
869
|
-
overlay,
|
|
870
|
-
styleEl,
|
|
871
|
-
rectEl: null,
|
|
872
|
-
textEl: null,
|
|
873
|
-
showPercentage: false,
|
|
874
|
-
tapToStart: config?.tapToStart !== false,
|
|
875
|
-
tapToStartText: config?.tapToStartText ?? 'TAP TO START',
|
|
876
|
-
driven: false,
|
|
877
|
-
tapState: 'idle',
|
|
878
|
-
tapPromise: null,
|
|
879
|
-
tapResolve: null,
|
|
880
|
-
tapHandler: null,
|
|
881
|
-
removed: false,
|
|
882
|
-
};
|
|
883
|
-
return;
|
|
884
|
-
}
|
|
1040
|
+
// Custom HTML bypasses the variant's content, so there is no progress target
|
|
1041
|
+
// to bind to and the handle stays null (lifecycle API becomes inert).
|
|
1042
|
+
const handle = customHTML ? null : variant.mount(overlay, config);
|
|
885
1043
|
state = {
|
|
886
1044
|
container,
|
|
887
1045
|
prevPosition,
|
|
888
1046
|
overlay,
|
|
889
1047
|
styleEl,
|
|
890
|
-
|
|
891
|
-
textEl,
|
|
1048
|
+
handle,
|
|
892
1049
|
showPercentage: config?.showPercentage === true,
|
|
893
1050
|
tapToStart: config?.tapToStart !== false,
|
|
894
1051
|
tapToStartText: config?.tapToStartText ?? 'TAP TO START',
|
|
895
|
-
driven: false,
|
|
896
1052
|
tapState: 'idle',
|
|
897
1053
|
tapPromise: null,
|
|
898
1054
|
tapResolve: null,
|
|
@@ -905,17 +1061,9 @@ function setCSSPreloaderProgress(progress) {
|
|
|
905
1061
|
return;
|
|
906
1062
|
if (state.tapState === 'waiting' || state.tapState === 'resolved')
|
|
907
1063
|
return;
|
|
908
|
-
if (!state.
|
|
1064
|
+
if (!state.handle)
|
|
909
1065
|
return;
|
|
910
|
-
|
|
911
|
-
if (!state.driven) {
|
|
912
|
-
state.rectEl.classList.add('driven');
|
|
913
|
-
state.driven = true;
|
|
914
|
-
}
|
|
915
|
-
state.rectEl.setAttribute('width', String(p * LOADER_BAR_MAX_WIDTH));
|
|
916
|
-
if (state.showPercentage && state.textEl) {
|
|
917
|
-
state.textEl.textContent = `${Math.round(p * 100)}%`;
|
|
918
|
-
}
|
|
1066
|
+
state.handle.setProgress(clampProgress(progress), state.showPercentage);
|
|
919
1067
|
}
|
|
920
1068
|
function waitCSSPreloaderTap() {
|
|
921
1069
|
if (!state) {
|
|
@@ -927,10 +1075,7 @@ function waitCSSPreloaderTap() {
|
|
|
927
1075
|
return Promise.resolve();
|
|
928
1076
|
if (state.tapPromise)
|
|
929
1077
|
return state.tapPromise;
|
|
930
|
-
|
|
931
|
-
state.textEl.textContent = state.tapToStartText;
|
|
932
|
-
state.textEl.classList.add('ge-svg-pulse');
|
|
933
|
-
}
|
|
1078
|
+
state.handle?.showTapText(state.tapToStartText);
|
|
934
1079
|
state.overlay.style.cursor = 'pointer';
|
|
935
1080
|
state.tapState = 'waiting';
|
|
936
1081
|
state.tapPromise = new Promise((resolve) => {
|
|
@@ -984,6 +1129,221 @@ function removeCSSPreloader(_container) {
|
|
|
984
1129
|
});
|
|
985
1130
|
}
|
|
986
1131
|
|
|
1132
|
+
// Bet key detection: bet-up needs Shift for arrow/equal, NumpadAdd is bare; same logic for down.
|
|
1133
|
+
// Exported so overlays with their own bet stepper (Buy bonus) honour the SAME keys as the bar.
|
|
1134
|
+
function betDir(e) {
|
|
1135
|
+
if (e.code === 'ArrowUp' && e.shiftKey)
|
|
1136
|
+
return 1;
|
|
1137
|
+
if (e.code === 'Equal' && e.shiftKey)
|
|
1138
|
+
return 1;
|
|
1139
|
+
if (e.code === 'NumpadAdd')
|
|
1140
|
+
return 1;
|
|
1141
|
+
if (e.code === 'ArrowDown' && e.shiftKey)
|
|
1142
|
+
return -1;
|
|
1143
|
+
if (e.code === 'Minus' && e.shiftKey)
|
|
1144
|
+
return -1;
|
|
1145
|
+
if (e.code === 'NumpadSubtract')
|
|
1146
|
+
return -1;
|
|
1147
|
+
return null;
|
|
1148
|
+
}
|
|
1149
|
+
class KeyboardController {
|
|
1150
|
+
host;
|
|
1151
|
+
doc;
|
|
1152
|
+
spaceHeld = false;
|
|
1153
|
+
holdTimer = null;
|
|
1154
|
+
// Bet hold-repeat state
|
|
1155
|
+
betHeldCode = null;
|
|
1156
|
+
betTimer = null;
|
|
1157
|
+
constructor(host, doc) {
|
|
1158
|
+
this.host = host;
|
|
1159
|
+
this.doc = doc ?? (typeof document !== 'undefined' ? document : null);
|
|
1160
|
+
}
|
|
1161
|
+
isSpinAllowed() {
|
|
1162
|
+
const h = this.host;
|
|
1163
|
+
const s = h.state;
|
|
1164
|
+
return (h.spacebarEnabled &&
|
|
1165
|
+
h.hotkeysEnabled &&
|
|
1166
|
+
!h.hasOpenLayer() &&
|
|
1167
|
+
s.mode === 'base' &&
|
|
1168
|
+
!s.autoplay.active);
|
|
1169
|
+
}
|
|
1170
|
+
isBetAllowed() {
|
|
1171
|
+
const h = this.host;
|
|
1172
|
+
const s = h.state;
|
|
1173
|
+
return (h.hotkeysEnabled &&
|
|
1174
|
+
!h.hasOpenLayer() &&
|
|
1175
|
+
s.mode === 'base' &&
|
|
1176
|
+
!s.busy);
|
|
1177
|
+
}
|
|
1178
|
+
clearBetTimer() {
|
|
1179
|
+
if (this.betTimer !== null) {
|
|
1180
|
+
clearTimeout(this.betTimer);
|
|
1181
|
+
this.betTimer = null;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
startBetRepeat(dir, elapsed) {
|
|
1185
|
+
// elapsed is ms already spent holding; use it to accelerate toward 45ms floor.
|
|
1186
|
+
// Start at 90ms, decrease ~1ms per 10ms held after the first repeat, floor at 45ms.
|
|
1187
|
+
const interval = Math.max(45, 90 - Math.floor(elapsed / 10));
|
|
1188
|
+
this.betTimer = setTimeout(() => {
|
|
1189
|
+
this.betTimer = null;
|
|
1190
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
1191
|
+
this.host.stepBet(dir);
|
|
1192
|
+
this.startBetRepeat(dir, elapsed + interval);
|
|
1193
|
+
}
|
|
1194
|
+
}, interval);
|
|
1195
|
+
}
|
|
1196
|
+
onKeyDown = (e) => {
|
|
1197
|
+
const target = e.target;
|
|
1198
|
+
// Editable element guard — never intercept keyboard input
|
|
1199
|
+
if (target && (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName)))
|
|
1200
|
+
return;
|
|
1201
|
+
// For Space: claim preventDefault early (before layer/mode/busy bail) so the browser's
|
|
1202
|
+
// native "Space activates focused button" can't re-fire a shell control and flicker a modal.
|
|
1203
|
+
if (e.code === 'Space' && !e.repeat) {
|
|
1204
|
+
if (!this.host.spacebarEnabled || !this.host.hotkeysEnabled)
|
|
1205
|
+
return;
|
|
1206
|
+
e.preventDefault();
|
|
1207
|
+
if (this.host.hasOpenLayer()) {
|
|
1208
|
+
this.host.routeToLayer(e);
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
const s = this.host.state;
|
|
1212
|
+
if (s.mode !== 'base' || s.busy || s.autoplay.active)
|
|
1213
|
+
return;
|
|
1214
|
+
this.spaceHeld = true;
|
|
1215
|
+
this.host.spin();
|
|
1216
|
+
return;
|
|
1217
|
+
}
|
|
1218
|
+
// Bet step keys (Shift+arrows, Shift+=/-, NumpadAdd/Subtract) — non-repeat only
|
|
1219
|
+
if (!e.repeat) {
|
|
1220
|
+
const dir = betDir(e);
|
|
1221
|
+
if (dir !== null && this.isBetAllowed()) {
|
|
1222
|
+
this.betHeldCode = e.code;
|
|
1223
|
+
this.host.stepBet(dir);
|
|
1224
|
+
// First repeat after 350ms initial delay
|
|
1225
|
+
this.clearBetTimer();
|
|
1226
|
+
const capturedDir = dir;
|
|
1227
|
+
this.betTimer = setTimeout(() => {
|
|
1228
|
+
this.betTimer = null;
|
|
1229
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
1230
|
+
this.host.stepBet(capturedDir);
|
|
1231
|
+
this.startBetRepeat(capturedDir, 350);
|
|
1232
|
+
}
|
|
1233
|
+
}, 350);
|
|
1234
|
+
return;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
// Non-Space keys: give the open layer first refusal. If it consumes the key, done; Escape closes
|
|
1238
|
+
// it. Anything the layer does NOT consume falls through to the chrome hotkeys below — so the
|
|
1239
|
+
// Settings/Info pages still honour Shift+I (Game info), Shift+M (sound), Shift+S, etc.
|
|
1240
|
+
if (this.host.hasOpenLayer()) {
|
|
1241
|
+
const consumed = this.host.routeToLayer(e);
|
|
1242
|
+
if (consumed)
|
|
1243
|
+
return;
|
|
1244
|
+
if (e.code === 'Escape') {
|
|
1245
|
+
this.host.closeLayer();
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
// not consumed → fall through to the Shift+letter chrome hotkeys
|
|
1249
|
+
}
|
|
1250
|
+
// Shift+letter bar hotkeys — fire when no layer is open, OR when an open layer left the key
|
|
1251
|
+
// unconsumed (see fall-through above); gated on hotkeys being enabled.
|
|
1252
|
+
if (!e.repeat && e.shiftKey && this.host.hotkeysEnabled) {
|
|
1253
|
+
const h = this.host;
|
|
1254
|
+
const s = h.state;
|
|
1255
|
+
switch (e.code) {
|
|
1256
|
+
case 'KeyA':
|
|
1257
|
+
if (h.autoplayEnabled && !s.replay) {
|
|
1258
|
+
h.toggleAutoplay();
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1261
|
+
break;
|
|
1262
|
+
case 'KeyT':
|
|
1263
|
+
if (h.turboLevels > 0 && !s.replay) {
|
|
1264
|
+
h.cycleTurbo();
|
|
1265
|
+
return;
|
|
1266
|
+
}
|
|
1267
|
+
break;
|
|
1268
|
+
case 'KeyB':
|
|
1269
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay) {
|
|
1270
|
+
h.openBuyBonus();
|
|
1271
|
+
return;
|
|
1272
|
+
}
|
|
1273
|
+
break;
|
|
1274
|
+
case 'KeyI':
|
|
1275
|
+
h.openInfo();
|
|
1276
|
+
return;
|
|
1277
|
+
case 'KeyS':
|
|
1278
|
+
h.openMenu();
|
|
1279
|
+
return;
|
|
1280
|
+
case 'KeyM':
|
|
1281
|
+
h.toggleMute();
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
onKeyUp = (e) => {
|
|
1287
|
+
if (e.code === 'Space') {
|
|
1288
|
+
this.spaceHeld = false;
|
|
1289
|
+
this.clearHoldTimer();
|
|
1290
|
+
}
|
|
1291
|
+
// Stop bet repeat on key release
|
|
1292
|
+
if (e.code === this.betHeldCode) {
|
|
1293
|
+
this.betHeldCode = null;
|
|
1294
|
+
this.clearBetTimer();
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
onBlur = () => {
|
|
1298
|
+
// Window blur — stop bet repeat AND hold-to-spin (same as releasing both keys)
|
|
1299
|
+
this.betHeldCode = null;
|
|
1300
|
+
this.clearBetTimer();
|
|
1301
|
+
this.spaceHeld = false;
|
|
1302
|
+
this.clearHoldTimer();
|
|
1303
|
+
};
|
|
1304
|
+
clearHoldTimer() {
|
|
1305
|
+
if (this.holdTimer !== null) {
|
|
1306
|
+
clearTimeout(this.holdTimer);
|
|
1307
|
+
this.holdTimer = null;
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
attach() {
|
|
1311
|
+
this.doc.addEventListener('keydown', this.onKeyDown);
|
|
1312
|
+
this.doc.addEventListener('keyup', this.onKeyUp);
|
|
1313
|
+
// Use window if available for blur events
|
|
1314
|
+
if (typeof window !== 'undefined') {
|
|
1315
|
+
window.addEventListener('blur', this.onBlur);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
detach() {
|
|
1319
|
+
this.doc.removeEventListener('keydown', this.onKeyDown);
|
|
1320
|
+
this.doc.removeEventListener('keyup', this.onKeyUp);
|
|
1321
|
+
if (typeof window !== 'undefined') {
|
|
1322
|
+
window.removeEventListener('blur', this.onBlur);
|
|
1323
|
+
}
|
|
1324
|
+
this.spaceHeld = false;
|
|
1325
|
+
this.clearHoldTimer();
|
|
1326
|
+
this.betHeldCode = null;
|
|
1327
|
+
this.clearBetTimer();
|
|
1328
|
+
}
|
|
1329
|
+
notifyBusyChanged(busy) {
|
|
1330
|
+
if (busy)
|
|
1331
|
+
return;
|
|
1332
|
+
if (!this.spaceHeld)
|
|
1333
|
+
return;
|
|
1334
|
+
if (!this.isSpinAllowed())
|
|
1335
|
+
return;
|
|
1336
|
+
// Schedule the next spin after the 120 ms floor (gap between completion and next spin).
|
|
1337
|
+
this.clearHoldTimer();
|
|
1338
|
+
this.holdTimer = setTimeout(() => {
|
|
1339
|
+
this.holdTimer = null;
|
|
1340
|
+
if (this.spaceHeld && this.isSpinAllowed()) {
|
|
1341
|
+
this.host.spin();
|
|
1342
|
+
}
|
|
1343
|
+
}, 120);
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
987
1347
|
function createInitialState(config) {
|
|
988
1348
|
return {
|
|
989
1349
|
mode: config.mode,
|
|
@@ -1253,6 +1613,21 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
1253
1613
|
#${SHELL_ROOT_ID} .ge-gi-version { text-align:center; color:var(--shell-muted); font-size:11px;
|
|
1254
1614
|
letter-spacing:.08em; opacity:.7; margin:4px 0 2px; }
|
|
1255
1615
|
|
|
1616
|
+
/* hotkeys — keycap chips → localized action label, mirrors controls row layout */
|
|
1617
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-block { display:flex; flex-direction:column; }
|
|
1618
|
+
#${SHELL_ROOT_ID} .ge-gi-hk { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
|
|
1619
|
+
#${SHELL_ROOT_ID} .ge-gi-hk + .ge-gi-hk { border-top:1px solid var(--shell-plaque-line); }
|
|
1620
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chips { display:flex; align-items:center; flex-wrap:wrap; gap:4px; flex:0 0 auto; }
|
|
1621
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-combo { display:inline-flex; align-items:center; gap:4px; }
|
|
1622
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chip { display:inline-flex; align-items:center; justify-content:center;
|
|
1623
|
+
padding:2px 7px; border-radius:6px; border:1px solid var(--shell-plaque-line);
|
|
1624
|
+
background:var(--shell-plaque-dark); color:#fff;
|
|
1625
|
+
font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:12px;
|
|
1626
|
+
font-weight:600; line-height:1.5; white-space:nowrap; min-width:1.6em; text-align:center; }
|
|
1627
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep { color:var(--shell-plaque-label); font-size:11px; padding:0 1px; }
|
|
1628
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep2 { color:var(--shell-plaque-label); font-size:11px; padding:0 4px; }
|
|
1629
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-tx { color:rgba(255,255,255,.88); font-size:14px; font-weight:600; text-align:right; flex:1; }
|
|
1630
|
+
|
|
1256
1631
|
/* controls — two blocks (gameplay / menu & info), icon/name/description per control */
|
|
1257
1632
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block + .ge-gi-ctl-block { margin-top:16px; padding-top:4px; border-top:1px solid var(--shell-plaque-line); }
|
|
1258
1633
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block-h { color:var(--shell-plaque-label); font-size:11px; letter-spacing:.12em;
|
|
@@ -1347,20 +1722,26 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
1347
1722
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-body { max-width:none; padding:clamp(6px,2.5cqh,16px) clamp(12px,3vw,28px); }
|
|
1348
1723
|
#${SHELL_ROOT_ID} .ge-bb-grid { display:flex; gap:14px; justify-content:safe center; overflow-x:auto; overflow-y:hidden; padding-bottom:6px;
|
|
1349
1724
|
scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
|
|
1350
|
-
/* the one knob that scales the whole card
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1725
|
+
/* the one knob that scales the whole card (its whole layout is em-relative). It is the SMALLER of two
|
|
1726
|
+
fits, so the card is always fully visible:
|
|
1727
|
+
• 3.4cqh — height: the card stays inside the band between the header and the bet footer (cqh
|
|
1728
|
+
measures the overlay popout frame, not the browser window);
|
|
1729
|
+
• 84cqw / (N*18) — width: the N cards (each 18em) fit the frame width side-by-side instead of
|
|
1730
|
+
overflowing into an X-scroll. --ge-bb-n is the live card count, set in BuyBonus.ts.
|
|
1731
|
+
Floor is deliberately tiny: on a 400×225 popout a fully visible card beats a bigger clipped one. */
|
|
1354
1732
|
#${SHELL_ROOT_ID} .ge-bb-grid .ge-bonus-card { flex:0 0 18em; scroll-snap-align:start;
|
|
1355
|
-
font-size:clamp(4px, 3.4cqh, 12px); }
|
|
1356
|
-
/* mobile: vertical stack at a fixed, readable size — scroll the list
|
|
1733
|
+
font-size:clamp(4px, min(3.4cqh, calc(84cqw / (var(--ge-bb-n,3) * 18))), 12px); }
|
|
1734
|
+
/* mobile: vertical stack at a fixed, readable size — scroll the list; only shrink if the card would
|
|
1735
|
+
be wider than the frame (very narrow viewport), so it never overflows horizontally. */
|
|
1357
1736
|
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid { display:flex; flex-direction:column; gap:14px; overflow:visible; }
|
|
1358
|
-
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:12px; }
|
|
1737
|
+
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:min(12px, calc(92cqw / 18)); }
|
|
1359
1738
|
#${SHELL_ROOT_ID} .ge-bonus-card { display:flex; flex-direction:column; border-radius:1.4em; overflow:hidden;
|
|
1360
1739
|
background:var(--shell-plaque-glass); border:1px solid var(--shell-plaque-line); color:#fff; text-align:center;
|
|
1361
1740
|
pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
|
|
1362
1741
|
#${SHELL_ROOT_ID} .ge-bonus-card:hover:not(.ge-bonus-off) {
|
|
1363
1742
|
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
1743
|
+
#${SHELL_ROOT_ID} .ge-bonus-card--kbd-focus:not(.ge-bonus-off) {
|
|
1744
|
+
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
1364
1745
|
/* custom card (BonusOption.custom): keep grid sizing + accent vars, drop the default chrome so the game owns the UI */
|
|
1365
1746
|
#${SHELL_ROOT_ID} .ge-bonus-card--custom { background:none; border:none; cursor:default; }
|
|
1366
1747
|
#${SHELL_ROOT_ID} .ge-bonus-body { display:flex; flex-direction:column; align-items:center; flex:1; padding:1.25em 1.1em .9em; }
|
|
@@ -1416,13 +1797,15 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
1416
1797
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-spacer { width:clamp(24px,7cqh,32px); }
|
|
1417
1798
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-nav { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
|
|
1418
1799
|
font-size:clamp(14px,4cqh,18px); border-radius:clamp(7px,2cqh,9px); }
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
1422
|
-
|
|
1423
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
1424
|
-
|
|
1425
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval
|
|
1800
|
+
/* the bet pill read too large next to the shrunk cards — size it ~0.8× across the board (the floors
|
|
1801
|
+
stay readable; the maxima are what dominate on Popout L / wide frames). */
|
|
1802
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.75cqh,3px); }
|
|
1803
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.55cqh,3px) clamp(3px,.9cqh,4px); }
|
|
1804
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(20px,5.7cqh,26px); height:clamp(20px,5.7cqh,26px);
|
|
1805
|
+
font-size:clamp(12px,3.5cqh,16px); }
|
|
1806
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
|
|
1807
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
|
|
1808
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
|
|
1426
1809
|
|
|
1427
1810
|
/* ═══ base/wide plaque bar — grouped dark + glass panels (reference-style) ═══ */
|
|
1428
1811
|
#${SHELL_ROOT_ID} .ge-zone-plaques { gap:0; } /* panels connect; buttons overlap */
|
|
@@ -1639,7 +2022,8 @@ function createCardModal(opts) {
|
|
|
1639
2022
|
}
|
|
1640
2023
|
return { root, card, body };
|
|
1641
2024
|
}
|
|
1642
|
-
/** Full-screen overlay. Returns { root, body }; append content to body.
|
|
2025
|
+
/** Full-screen overlay. Returns { root, body, scroll }; append content to body.
|
|
2026
|
+
* The `scroll` element is the scrollable container (overflow-y: auto). */
|
|
1643
2027
|
function createOverlay(opts) {
|
|
1644
2028
|
const root = document.createElement('div');
|
|
1645
2029
|
root.className = 'ge-shell-overlay';
|
|
@@ -1677,7 +2061,7 @@ function createOverlay(opts) {
|
|
|
1677
2061
|
body.className = 'ge-ov-body';
|
|
1678
2062
|
scroll.appendChild(body);
|
|
1679
2063
|
root.append(head, scroll);
|
|
1680
|
-
return { root, body };
|
|
2064
|
+
return { root, body, scroll };
|
|
1681
2065
|
}
|
|
1682
2066
|
|
|
1683
2067
|
/** A floating labelled money readout (balance/win/bet). */
|
|
@@ -1929,24 +2313,22 @@ function applyBusy(shell, bar) {
|
|
|
1929
2313
|
function openSettingsModal(shell) {
|
|
1930
2314
|
const { root, body } = createOverlay({ title: shell.t('Settings'), onClose: () => root.remove() });
|
|
1931
2315
|
root.dataset.ge = 'settings-modal';
|
|
1932
|
-
// Sound on/off
|
|
2316
|
+
// Sound on/off — backed by the shell's shared `soundOn` state so this toggle and the Shift+M
|
|
2317
|
+
// hotkey stay in sync; `setSound` emits `settingChange({ key: 'sound' })` and refreshes the icon.
|
|
1933
2318
|
const sound = (() => {
|
|
1934
|
-
let on = true;
|
|
1935
2319
|
const btn = document.createElement('button');
|
|
1936
|
-
btn.className = 'ge-snd
|
|
2320
|
+
btn.className = 'ge-snd';
|
|
1937
2321
|
btn.dataset.ge = 'setting-sound';
|
|
1938
|
-
btn.setAttribute('aria-label', 'Sound');
|
|
1939
|
-
const paint = () => {
|
|
2322
|
+
btn.setAttribute('aria-label', shell.t('Sound'));
|
|
2323
|
+
const paint = (on) => {
|
|
1940
2324
|
btn.innerHTML = icon(on ? 'soundOn' : 'soundOff');
|
|
1941
2325
|
btn.classList.toggle('ge-active', on);
|
|
1942
2326
|
btn.setAttribute('aria-pressed', String(on));
|
|
1943
2327
|
};
|
|
1944
|
-
paint();
|
|
1945
|
-
btn.addEventListener('click', () =>
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
shell.emit('settingChange', { key: 'sound', value: on });
|
|
1949
|
-
});
|
|
2328
|
+
paint(shell.soundOn);
|
|
2329
|
+
btn.addEventListener('click', () => shell.setSound(!shell.soundOn));
|
|
2330
|
+
// Live-update the icon when sound changes from here OR via Shift+M (shell clears on close).
|
|
2331
|
+
shell.setSoundRefresh(paint);
|
|
1950
2332
|
const row = document.createElement('div');
|
|
1951
2333
|
row.className = 'ge-ov-row';
|
|
1952
2334
|
row.innerHTML = `<span class="ge-grow">${shell.t('Sound')}</span>`;
|
|
@@ -1996,17 +2378,25 @@ function openSettingsModal(shell) {
|
|
|
1996
2378
|
|
|
1997
2379
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1998
2380
|
/** The @energy8platform/platform-core package version, stamped at build time. */
|
|
1999
|
-
const PACKAGE_VERSION = '0.
|
|
2381
|
+
const PACKAGE_VERSION = '0.26.1';
|
|
2000
2382
|
|
|
2383
|
+
/** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
|
|
2384
|
+
const HOTKEYS_DEFAULT_ORDER = -0.5;
|
|
2001
2385
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
2002
2386
|
function openGameInfoModal(shell) {
|
|
2003
|
-
const { root, body } = createOverlay({
|
|
2387
|
+
const { root, body, scroll } = createOverlay({
|
|
2004
2388
|
title: shell.t('Game info'),
|
|
2005
2389
|
onClose: () => root.remove(),
|
|
2006
2390
|
onBack: () => { root.remove(); shell.openSettings(); },
|
|
2007
2391
|
});
|
|
2008
2392
|
root.dataset.ge = 'info-modal';
|
|
2009
|
-
const
|
|
2393
|
+
const rawSections = shell.config.gameInfo.sections ?? [];
|
|
2394
|
+
// Auto-inject a hotkeys section unless the game already provides one or features.hotkeys === false.
|
|
2395
|
+
const sectionsWithHotkeys = [...rawSections];
|
|
2396
|
+
if (shell.config.features.hotkeys !== false && !rawSections.some((s) => s.type === 'hotkeys')) {
|
|
2397
|
+
sectionsWithHotkeys.push({ type: 'hotkeys', order: HOTKEYS_DEFAULT_ORDER });
|
|
2398
|
+
}
|
|
2399
|
+
const sections = sectionsWithHotkeys;
|
|
2010
2400
|
// Default placement: modes first, controls second, the rest in declaration order.
|
|
2011
2401
|
// An explicit `order` overrides; ties keep declaration order (stable).
|
|
2012
2402
|
const base = (s, i) => s.order ?? (s.type === 'modes' ? -2 : s.type === 'controls' ? -1 : i);
|
|
@@ -2015,7 +2405,40 @@ function openGameInfoModal(shell) {
|
|
|
2015
2405
|
.sort((a, b) => a.k - b.k || a.i - b.i)
|
|
2016
2406
|
.forEach(({ s }) => body.appendChild(renderSection(shell, s)));
|
|
2017
2407
|
body.appendChild(versionFooter(shell));
|
|
2018
|
-
|
|
2408
|
+
const LINE = 60;
|
|
2409
|
+
const PAGE = () => Math.floor(scroll.clientHeight * 0.9) || Math.floor(540 * 0.9);
|
|
2410
|
+
const onKey = (e) => {
|
|
2411
|
+
switch (e.code) {
|
|
2412
|
+
case 'ArrowDown':
|
|
2413
|
+
scroll.scrollTop += LINE;
|
|
2414
|
+
return true;
|
|
2415
|
+
case 'ArrowUp':
|
|
2416
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - LINE);
|
|
2417
|
+
return true;
|
|
2418
|
+
case 'PageDown':
|
|
2419
|
+
scroll.scrollTop += PAGE();
|
|
2420
|
+
return true;
|
|
2421
|
+
case 'PageUp':
|
|
2422
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
2423
|
+
return true;
|
|
2424
|
+
case 'Space':
|
|
2425
|
+
if (e.shiftKey) {
|
|
2426
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
2427
|
+
}
|
|
2428
|
+
else {
|
|
2429
|
+
scroll.scrollTop += PAGE();
|
|
2430
|
+
}
|
|
2431
|
+
return true;
|
|
2432
|
+
case 'Home':
|
|
2433
|
+
scroll.scrollTop = 0;
|
|
2434
|
+
return true;
|
|
2435
|
+
case 'End':
|
|
2436
|
+
scroll.scrollTop = scroll.scrollHeight - scroll.clientHeight;
|
|
2437
|
+
return true;
|
|
2438
|
+
default: return false;
|
|
2439
|
+
}
|
|
2440
|
+
};
|
|
2441
|
+
return { root, onKey };
|
|
2019
2442
|
}
|
|
2020
2443
|
/** A muted version stamp pinned to the bottom of the game-info modal:
|
|
2021
2444
|
* `${config.version ?? '1.0.0'}.${engine version without dots}` (e.g. '1.0.0.0246'). */
|
|
@@ -2031,9 +2454,11 @@ function renderSection(shell, s) {
|
|
|
2031
2454
|
switch (s.type) {
|
|
2032
2455
|
case 'modes': return sectionModes(shell, s.modes, sec('info-modes', s.title, shell.t('Modes')));
|
|
2033
2456
|
case 'controls': return sectionControls(shell, sec('info-controls', s.title, shell.t('Controls')));
|
|
2457
|
+
case 'hotkeys': return sectionHotkeys(shell, sec('info-hotkeys', s.title, shell.t('Hotkeys')));
|
|
2034
2458
|
case 'paytable': return sectionPaytable(s.rows, sec('info-paytable', s.title, shell.t('Paytable')));
|
|
2035
2459
|
case 'wins': return sectionWins(s, sec('info-wins', s.title, shell.t(winFallbackTitle(s.kind))));
|
|
2036
|
-
|
|
2460
|
+
// Translate the heading (e.g. the host-built DISCLAIMER title); the body stays verbatim.
|
|
2461
|
+
case 'custom': return sectionCustom(s, sec('info-custom', s.title != null ? shell.t(s.title) : undefined, ''));
|
|
2037
2462
|
}
|
|
2038
2463
|
}
|
|
2039
2464
|
/** A titled glass-plaque section shell. */
|
|
@@ -2115,6 +2540,57 @@ function ctlBlock(shell, label, rows) {
|
|
|
2115
2540
|
}
|
|
2116
2541
|
return block;
|
|
2117
2542
|
}
|
|
2543
|
+
function sectionHotkeys(shell, el) {
|
|
2544
|
+
const { features } = shell.config;
|
|
2545
|
+
/** Render one or more key names as keycap chips joined by " / ". */
|
|
2546
|
+
const chips = (...keys) => keys.map((k) => `<span class="ge-gi-hk-chip">${k}</span>`).join('<span class="ge-gi-hk-sep"> / </span>');
|
|
2547
|
+
const rows = [
|
|
2548
|
+
{ chips: ['Space'], name: 'Spin', on: true },
|
|
2549
|
+
{ chips: ['Shift', '↑', 'Shift', '='], name: 'Raise bet', on: true },
|
|
2550
|
+
{ chips: ['Shift', '↓', 'Shift', '-'], name: 'Lower bet', on: true },
|
|
2551
|
+
{ chips: ['Shift', 'A'], name: 'Autoplay', on: features.autoplay != null },
|
|
2552
|
+
{ chips: ['Shift', 'T'], name: 'Turbo', on: features.turbo > 0 },
|
|
2553
|
+
{ chips: ['Shift', 'B'], name: 'Buy bonus', on: features.buyBonus !== false },
|
|
2554
|
+
{ chips: ['Shift', 'I'], name: 'Game info', on: true },
|
|
2555
|
+
{ chips: ['Shift', 'S'], name: 'Menu', on: true },
|
|
2556
|
+
{ chips: ['Shift', 'M'], name: 'Mute', on: true },
|
|
2557
|
+
{ chips: ['←', '→'], name: 'Navigate', on: true },
|
|
2558
|
+
{ chips: ['Enter'], name: 'Confirm', on: true },
|
|
2559
|
+
{ chips: ['Esc'], name: 'Close', on: true },
|
|
2560
|
+
];
|
|
2561
|
+
const block = document.createElement('div');
|
|
2562
|
+
block.className = 'ge-gi-hk-block';
|
|
2563
|
+
for (const r of rows.filter((x) => x.on)) {
|
|
2564
|
+
const row = document.createElement('div');
|
|
2565
|
+
row.className = 'ge-gi-hk';
|
|
2566
|
+
// Build the chips column
|
|
2567
|
+
const chipsEl = document.createElement('div');
|
|
2568
|
+
chipsEl.className = 'ge-gi-hk-chips';
|
|
2569
|
+
if (r.name === 'Raise bet' || r.name === 'Lower bet') {
|
|
2570
|
+
// Two combos separated by " / ": Shift+↑ / Shift+= and Shift+↓ / Shift+-
|
|
2571
|
+
const [k1, k2, k3, k4] = r.chips;
|
|
2572
|
+
chipsEl.innerHTML =
|
|
2573
|
+
`<span class="ge-gi-hk-combo">${chips(k1, k2)}</span>` +
|
|
2574
|
+
`<span class="ge-gi-hk-sep2"> / </span>` +
|
|
2575
|
+
`<span class="ge-gi-hk-combo">${chips(k3, k4)}</span>`;
|
|
2576
|
+
}
|
|
2577
|
+
else if (r.chips.length > 1) {
|
|
2578
|
+
// Chord: Shift + X
|
|
2579
|
+
chipsEl.innerHTML = `<span class="ge-gi-hk-combo">${chips(...r.chips)}</span>`;
|
|
2580
|
+
}
|
|
2581
|
+
else {
|
|
2582
|
+
chipsEl.innerHTML = chips(...r.chips);
|
|
2583
|
+
}
|
|
2584
|
+
const tx = document.createElement('div');
|
|
2585
|
+
tx.className = 'ge-gi-hk-tx';
|
|
2586
|
+
tx.textContent = shell.t(r.name);
|
|
2587
|
+
row.appendChild(chipsEl);
|
|
2588
|
+
row.appendChild(tx);
|
|
2589
|
+
block.appendChild(row);
|
|
2590
|
+
}
|
|
2591
|
+
el.appendChild(block);
|
|
2592
|
+
return el;
|
|
2593
|
+
}
|
|
2118
2594
|
// ── paytable (cards — image on top, name, then win tiers "<count> x<mult>") ────
|
|
2119
2595
|
function sectionPaytable(rows, el) {
|
|
2120
2596
|
const grid = document.createElement('div');
|
|
@@ -2313,25 +2789,168 @@ function sectionCustom(s, el) {
|
|
|
2313
2789
|
return el;
|
|
2314
2790
|
}
|
|
2315
2791
|
|
|
2316
|
-
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
2792
|
+
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
2793
|
+
* Returns the overlay element + a keyboard handler for the shell's `showModal`. */
|
|
2317
2794
|
function openBuyBonusOverlay(shell) {
|
|
2318
2795
|
const bonuses = shell.config.features.buyBonus;
|
|
2319
2796
|
if (bonuses === false || bonuses.length === 0)
|
|
2320
2797
|
return null;
|
|
2321
|
-
const
|
|
2798
|
+
const st = { focusIndex: -1, confirmBonus: undefined };
|
|
2799
|
+
const { root, body } = createOverlay({ title: shell.t('Buy bonus'), onClose: () => shell.closeModal() });
|
|
2322
2800
|
root.dataset.ge = 'buybonus-overlay';
|
|
2323
2801
|
// Re-render the grid whenever the bet changes so every card's price stays live.
|
|
2324
2802
|
const renderGrid = () => {
|
|
2325
2803
|
body.innerHTML = '';
|
|
2326
2804
|
const grid = document.createElement('div');
|
|
2327
2805
|
grid.className = 'ge-bb-grid';
|
|
2328
|
-
|
|
2329
|
-
|
|
2806
|
+
// Card count drives the width-fit clamp in CSS (each card is 18em; N cards must fit the frame
|
|
2807
|
+
// width), so the row scales to the available width instead of overflowing into an X-scroll.
|
|
2808
|
+
grid.style.setProperty('--ge-bb-n', String(bonuses.length));
|
|
2809
|
+
const affordable = [];
|
|
2810
|
+
for (const bonus of bonuses) {
|
|
2811
|
+
const card = buildCard(shell, bonus, root, st);
|
|
2812
|
+
grid.appendChild(card);
|
|
2813
|
+
if (isAffordable(shell, bonus))
|
|
2814
|
+
affordable.push(bonus);
|
|
2815
|
+
}
|
|
2330
2816
|
body.appendChild(grid);
|
|
2817
|
+
// Initialize or restore focus index
|
|
2818
|
+
if (affordable.length > 0) {
|
|
2819
|
+
if (st.focusIndex < 0)
|
|
2820
|
+
st.focusIndex = 0;
|
|
2821
|
+
else
|
|
2822
|
+
st.focusIndex = Math.min(st.focusIndex, affordable.length - 1);
|
|
2823
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2824
|
+
}
|
|
2825
|
+
else {
|
|
2826
|
+
st.focusIndex = -1;
|
|
2827
|
+
}
|
|
2331
2828
|
};
|
|
2332
2829
|
renderGrid();
|
|
2333
2830
|
root.appendChild(buildBetBar(shell, renderGrid)); // thin bottom footer, only as tall as the pill
|
|
2334
|
-
|
|
2831
|
+
/** Step the bet by `dir` and re-render the grid (live prices + affordability) when it changed.
|
|
2832
|
+
* Shared by the keyboard bet keys (the footer ± buttons keep their own copy). */
|
|
2833
|
+
const stepBetBy = (dir) => {
|
|
2834
|
+
const next = stepBet(shell.state, dir);
|
|
2835
|
+
if (next === shell.state.bet)
|
|
2836
|
+
return;
|
|
2837
|
+
shell.state.bet = next;
|
|
2838
|
+
shell.emit('betChange', next);
|
|
2839
|
+
shell.render();
|
|
2840
|
+
renderGrid();
|
|
2841
|
+
};
|
|
2842
|
+
/** Keyboard handler for both browse and confirm phases. */
|
|
2843
|
+
const onKey = (e) => {
|
|
2844
|
+
const affordable = bonuses.filter((b) => isAffordable(shell, b));
|
|
2845
|
+
// ── Confirm phase ──
|
|
2846
|
+
if (st.confirmBonus) {
|
|
2847
|
+
switch (e.code) {
|
|
2848
|
+
case 'Enter':
|
|
2849
|
+
case 'Space': {
|
|
2850
|
+
const bonus = st.confirmBonus;
|
|
2851
|
+
if (!isAffordable(shell, bonus))
|
|
2852
|
+
return true;
|
|
2853
|
+
if (bonus.type === 'feature')
|
|
2854
|
+
shell.activateFeature(bonus);
|
|
2855
|
+
else
|
|
2856
|
+
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
2857
|
+
shell.closeModal();
|
|
2858
|
+
return true;
|
|
2859
|
+
}
|
|
2860
|
+
case 'Escape':
|
|
2861
|
+
// Remove the confirm dialog, return to browse
|
|
2862
|
+
closeConfirm(root, st);
|
|
2863
|
+
return true;
|
|
2864
|
+
default:
|
|
2865
|
+
return false;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
// ── Browse phase ──
|
|
2869
|
+
const last = affordable.length - 1;
|
|
2870
|
+
const mobile = shell.layout === 'mobile';
|
|
2871
|
+
// Bet stepping mirrors the bar's keys (Shift+↑/↓, Shift+=/-, Numpad ±). Checked BEFORE arrow
|
|
2872
|
+
// navigation so a bare arrow still moves card focus while a Shift+arrow changes the bet.
|
|
2873
|
+
const bet = betDir(e);
|
|
2874
|
+
if (bet !== null) {
|
|
2875
|
+
stepBetBy(bet);
|
|
2876
|
+
return true;
|
|
2877
|
+
}
|
|
2878
|
+
// Determine navigation direction from key code + layout (mobile uses vertical arrows)
|
|
2879
|
+
const fwdKey = e.code === 'ArrowRight' || (mobile && e.code === 'ArrowDown');
|
|
2880
|
+
const bwdKey = e.code === 'ArrowLeft' || (mobile && e.code === 'ArrowUp');
|
|
2881
|
+
if (fwdKey) {
|
|
2882
|
+
if (last < 0)
|
|
2883
|
+
return true;
|
|
2884
|
+
if (st.focusIndex < last) {
|
|
2885
|
+
st.focusIndex++;
|
|
2886
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2887
|
+
}
|
|
2888
|
+
return true;
|
|
2889
|
+
}
|
|
2890
|
+
if (bwdKey) {
|
|
2891
|
+
if (last < 0)
|
|
2892
|
+
return true;
|
|
2893
|
+
if (st.focusIndex > 0) {
|
|
2894
|
+
st.focusIndex--;
|
|
2895
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
2896
|
+
}
|
|
2897
|
+
return true;
|
|
2898
|
+
}
|
|
2899
|
+
switch (e.code) {
|
|
2900
|
+
case 'Enter':
|
|
2901
|
+
case 'Space':
|
|
2902
|
+
if (last < 0 || st.focusIndex < 0)
|
|
2903
|
+
return true;
|
|
2904
|
+
{
|
|
2905
|
+
const bonus = affordable[st.focusIndex];
|
|
2906
|
+
openConfirm(shell, bonus, root, st);
|
|
2907
|
+
}
|
|
2908
|
+
return true;
|
|
2909
|
+
// Bare =/- also step the bet (the Shift+=/- and Numpad variants are handled by betDir above).
|
|
2910
|
+
case 'Equal':
|
|
2911
|
+
stepBetBy(1);
|
|
2912
|
+
return true;
|
|
2913
|
+
case 'Minus':
|
|
2914
|
+
stepBetBy(-1);
|
|
2915
|
+
return true;
|
|
2916
|
+
case 'Escape':
|
|
2917
|
+
shell.closeModal();
|
|
2918
|
+
return true;
|
|
2919
|
+
default:
|
|
2920
|
+
return false;
|
|
2921
|
+
}
|
|
2922
|
+
};
|
|
2923
|
+
return { root, onKey };
|
|
2924
|
+
}
|
|
2925
|
+
/** Apply a CSS keyboard-focus class to the currently focused affordable card. */
|
|
2926
|
+
function applyFocusClass(overlay, bonuses, affordable, focusIndex) {
|
|
2927
|
+
for (const b of bonuses) {
|
|
2928
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${b.id}"]`);
|
|
2929
|
+
if (!card)
|
|
2930
|
+
continue;
|
|
2931
|
+
card.classList.remove('ge-bonus-card--kbd-focus');
|
|
2932
|
+
}
|
|
2933
|
+
const focused = affordable[focusIndex];
|
|
2934
|
+
if (!focused)
|
|
2935
|
+
return;
|
|
2936
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${focused.id}"]`);
|
|
2937
|
+
if (card)
|
|
2938
|
+
card.classList.add('ge-bonus-card--kbd-focus');
|
|
2939
|
+
}
|
|
2940
|
+
/** Open the confirm dialog for the given bonus and track it in overlay state. */
|
|
2941
|
+
function openConfirm(shell, bonus, overlay, st) {
|
|
2942
|
+
closeConfirm(overlay, st); // remove any existing confirm
|
|
2943
|
+
st.confirmBonus = bonus;
|
|
2944
|
+
overlay.appendChild(buildConfirm(shell, bonus, overlay, st));
|
|
2945
|
+
shell.fitModals();
|
|
2946
|
+
}
|
|
2947
|
+
/** Remove the confirm dialog and clear the overlay state. */
|
|
2948
|
+
function closeConfirm(overlay, st) {
|
|
2949
|
+
// The confirm dialog is a .ge-sheet with data-ge="bonus-confirm" appended directly to overlay.
|
|
2950
|
+
const sheet = overlay.querySelector('[data-ge="bonus-confirm"]');
|
|
2951
|
+
if (sheet)
|
|
2952
|
+
sheet.remove();
|
|
2953
|
+
st.confirmBonus = undefined;
|
|
2335
2954
|
}
|
|
2336
2955
|
/** Bet control — a compact −/+ pill around the live stake, in a thin footer at the screen bottom.
|
|
2337
2956
|
* Stepping repaints the value, re-prices the cards, and updates the control bar. */
|
|
@@ -2378,7 +2997,7 @@ function stepButton(ge, name) {
|
|
|
2378
2997
|
}
|
|
2379
2998
|
/** A grid card: title → thumbnail → description → volatility → price → full-bleed CTA.
|
|
2380
2999
|
* Clicking (when affordable) opens the confirmation modal. */
|
|
2381
|
-
function buildCard(shell, bonus, overlay) {
|
|
3000
|
+
function buildCard(shell, bonus, overlay, st) {
|
|
2382
3001
|
const accent = effectiveAccent(bonus);
|
|
2383
3002
|
const card = document.createElement('div');
|
|
2384
3003
|
card.className = 'ge-bonus-card';
|
|
@@ -2391,8 +3010,7 @@ function buildCard(shell, bonus, overlay) {
|
|
|
2391
3010
|
const select = () => {
|
|
2392
3011
|
if (!isAffordable(shell, bonus))
|
|
2393
3012
|
return;
|
|
2394
|
-
|
|
2395
|
-
shell.fitModals();
|
|
3013
|
+
openConfirm(shell, bonus, overlay, st);
|
|
2396
3014
|
};
|
|
2397
3015
|
// Game-supplied card UI: the shell keeps the wrapper (grid sizing + accent vars) and runs the
|
|
2398
3016
|
// buy flow when the game calls ctx.select(); the game owns everything inside.
|
|
@@ -2437,9 +3055,9 @@ function cardBody(shell, bonus) {
|
|
|
2437
3055
|
}
|
|
2438
3056
|
/** Confirmation modal — the shared card chrome (accent title heading, no ✕) with a bonus
|
|
2439
3057
|
* preview body and a full-bleed Cancel + action footer. */
|
|
2440
|
-
function buildConfirm(shell, bonus, overlay) {
|
|
3058
|
+
function buildConfirm(shell, bonus, overlay, st) {
|
|
2441
3059
|
const accent = effectiveAccent(bonus);
|
|
2442
|
-
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () =>
|
|
3060
|
+
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () => { closeConfirm(overlay, st); } });
|
|
2443
3061
|
const price = bonus.priceMultiplier * shell.state.bet;
|
|
2444
3062
|
const preview = document.createElement('div');
|
|
2445
3063
|
preview.className = 'ge-confirm-preview';
|
|
@@ -2455,7 +3073,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
2455
3073
|
cancel.className = 'ge-modal-btn ge-modal-btn--ghost';
|
|
2456
3074
|
cancel.dataset.ge = 'bonus-confirm-cancel';
|
|
2457
3075
|
cancel.textContent = shell.t('Cancel');
|
|
2458
|
-
cancel.addEventListener('click', () =>
|
|
3076
|
+
cancel.addEventListener('click', () => closeConfirm(overlay, st));
|
|
2459
3077
|
const buy = document.createElement('button');
|
|
2460
3078
|
buy.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
2461
3079
|
buy.dataset.ge = 'bonus-confirm-buy';
|
|
@@ -2470,8 +3088,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
2470
3088
|
shell.activateFeature(bonus);
|
|
2471
3089
|
else
|
|
2472
3090
|
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
2473
|
-
|
|
2474
|
-
overlay.remove();
|
|
3091
|
+
shell.closeModal();
|
|
2475
3092
|
});
|
|
2476
3093
|
actions.append(cancel, buy);
|
|
2477
3094
|
ui.card.appendChild(actions);
|
|
@@ -2500,36 +3117,79 @@ function isAffordable(shell, bonus) {
|
|
|
2500
3117
|
|
|
2501
3118
|
/** A centred picker (chips grid + accent Confirm) on the shared card modal. */
|
|
2502
3119
|
function buildSheet(opts) {
|
|
2503
|
-
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () =>
|
|
3120
|
+
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () => opts.onClose() });
|
|
2504
3121
|
const grid = document.createElement('div');
|
|
2505
3122
|
grid.className = 'ge-sheet-grid';
|
|
2506
3123
|
const cols = typeof opts.columns === 'number' ? { wide: opts.columns, mobile: opts.columns } : opts.columns;
|
|
2507
3124
|
grid.style.setProperty('--cols', String(cols.wide));
|
|
2508
3125
|
grid.style.setProperty('--cols-m', String(cols.mobile));
|
|
2509
3126
|
let selected = opts.selected;
|
|
3127
|
+
let focusIndex = opts.choices.findIndex((c) => c.id === selected);
|
|
3128
|
+
if (focusIndex < 0)
|
|
3129
|
+
focusIndex = 0;
|
|
2510
3130
|
const chips = [];
|
|
2511
|
-
|
|
3131
|
+
/** Update chip visuals to reflect the current selected/focused index. */
|
|
3132
|
+
function setHighlight(newIndex) {
|
|
3133
|
+
focusIndex = newIndex;
|
|
3134
|
+
selected = opts.choices[focusIndex].id;
|
|
3135
|
+
for (let i = 0; i < chips.length; i++) {
|
|
3136
|
+
chips[i].classList.toggle('ge-on', i === focusIndex);
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
for (let i = 0; i < opts.choices.length; i++) {
|
|
3140
|
+
const c = opts.choices[i];
|
|
2512
3141
|
const chip = document.createElement('button');
|
|
2513
|
-
chip.className = 'ge-chip' + (
|
|
3142
|
+
chip.className = 'ge-chip' + (i === focusIndex ? ' ge-on' : '');
|
|
2514
3143
|
chip.dataset.id = c.id;
|
|
2515
3144
|
chip.textContent = c.label;
|
|
3145
|
+
const idx = i; // capture for closure
|
|
2516
3146
|
chip.addEventListener('click', () => {
|
|
2517
|
-
|
|
2518
|
-
for (const x of chips)
|
|
2519
|
-
x.classList.toggle('ge-on', x.dataset.id === selected);
|
|
3147
|
+
setHighlight(idx);
|
|
2520
3148
|
});
|
|
2521
3149
|
chips.push(chip);
|
|
2522
3150
|
grid.appendChild(chip);
|
|
2523
3151
|
}
|
|
2524
3152
|
ui.body.appendChild(grid);
|
|
3153
|
+
function doConfirm() {
|
|
3154
|
+
opts.onConfirm(selected);
|
|
3155
|
+
opts.onClose();
|
|
3156
|
+
}
|
|
2525
3157
|
// Single full-bleed Confirm; dismissal is the ✕ (top-right). No Cancel button.
|
|
2526
3158
|
const confirm = document.createElement('button');
|
|
2527
3159
|
confirm.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
2528
3160
|
confirm.dataset.ge = 'sheet-confirm';
|
|
2529
3161
|
confirm.textContent = opts.confirmLabel;
|
|
2530
|
-
confirm.addEventListener('click',
|
|
3162
|
+
confirm.addEventListener('click', doConfirm);
|
|
2531
3163
|
ui.card.appendChild(confirm);
|
|
2532
|
-
|
|
3164
|
+
function onKey(e) {
|
|
3165
|
+
const last = opts.choices.length - 1;
|
|
3166
|
+
switch (e.code) {
|
|
3167
|
+
case 'ArrowRight':
|
|
3168
|
+
case 'ArrowDown':
|
|
3169
|
+
case 'Equal': // + on most keyboards
|
|
3170
|
+
case 'NumpadAdd':
|
|
3171
|
+
if (focusIndex < last)
|
|
3172
|
+
setHighlight(focusIndex + 1);
|
|
3173
|
+
return true;
|
|
3174
|
+
case 'ArrowLeft':
|
|
3175
|
+
case 'ArrowUp':
|
|
3176
|
+
case 'Minus':
|
|
3177
|
+
case 'NumpadSubtract':
|
|
3178
|
+
if (focusIndex > 0)
|
|
3179
|
+
setHighlight(focusIndex - 1);
|
|
3180
|
+
return true;
|
|
3181
|
+
case 'Enter':
|
|
3182
|
+
case 'Space':
|
|
3183
|
+
doConfirm();
|
|
3184
|
+
return true;
|
|
3185
|
+
case 'Escape':
|
|
3186
|
+
opts.onClose();
|
|
3187
|
+
return true;
|
|
3188
|
+
default:
|
|
3189
|
+
return false;
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
return { root: ui.root, onKey };
|
|
2533
3193
|
}
|
|
2534
3194
|
/** Bet picker — all available bets as chips (6 per row, 3 on mobile), accent Confirm applies it. */
|
|
2535
3195
|
function openBetModal(shell) {
|
|
@@ -2537,6 +3197,7 @@ function openBetModal(shell) {
|
|
|
2537
3197
|
ge: 'bet-modal', title: shell.t('Bet'), columns: { wide: 6, mobile: 3 }, confirmLabel: shell.t('Confirm'),
|
|
2538
3198
|
choices: shell.state.availableBets.map((b) => ({ id: String(b), label: formatCurrency(b, shell.config.currency) })),
|
|
2539
3199
|
selected: String(shell.state.bet),
|
|
3200
|
+
onClose: () => shell.closeModal(),
|
|
2540
3201
|
onConfirm: (id) => {
|
|
2541
3202
|
const v = Number(id);
|
|
2542
3203
|
if (v !== shell.state.bet) {
|
|
@@ -2567,6 +3228,7 @@ function openAutoplayModal(shell) {
|
|
|
2567
3228
|
ge: 'autoplay-modal', title: shell.t('Autoplay'), columns: 3, confirmLabel: shell.t('Start'),
|
|
2568
3229
|
choices: counts.map((n) => ({ id: String(n), label: Number.isFinite(n) ? String(n) : '∞' })),
|
|
2569
3230
|
selected: String(shell.state.autoplay.remaining || counts[0]),
|
|
3231
|
+
onClose: () => shell.closeModal(),
|
|
2570
3232
|
onConfirm: (id) => {
|
|
2571
3233
|
let remaining = Number(id); // "Infinity" → Infinity
|
|
2572
3234
|
if (maxCount != null)
|
|
@@ -2714,6 +3376,868 @@ function countUp(el, from, to, fmt, durationMs = 450) {
|
|
|
2714
3376
|
};
|
|
2715
3377
|
}
|
|
2716
3378
|
|
|
3379
|
+
// MACHINE-TRANSLATED — native QA required before production use.
|
|
3380
|
+
// Keys are the English source strings exactly as they appear at t('…') call sites.
|
|
3381
|
+
// Entries within each language block are sorted alphabetically by key for diff stability.
|
|
3382
|
+
// 'en' is omitted: the resolver returns the source string unchanged for English.
|
|
3383
|
+
const LOCALES = {
|
|
3384
|
+
da: {
|
|
3385
|
+
DISCLAIMER: 'Ansvarsfraskrivelse',
|
|
3386
|
+
Activate: 'Aktivér',
|
|
3387
|
+
Autoplay: 'Autoplay',
|
|
3388
|
+
Balance: 'Saldo',
|
|
3389
|
+
Bet: 'Indsats',
|
|
3390
|
+
'BUY BONUS': 'KØB BONUS',
|
|
3391
|
+
Buy: 'Køb',
|
|
3392
|
+
'Buy bonus': 'Køb bonus',
|
|
3393
|
+
Cancel: 'Annuller',
|
|
3394
|
+
Close: 'Luk',
|
|
3395
|
+
'Cluster pays': 'Klyngeudbetaling',
|
|
3396
|
+
Confirm: 'Bekræft',
|
|
3397
|
+
Controls: 'Kontroller',
|
|
3398
|
+
'Decrease your stake.': 'Reducer din indsats.',
|
|
3399
|
+
DISABLE: 'DEAKTIVER',
|
|
3400
|
+
'Dismiss the current overlay.': 'Luk det aktuelle overlay.',
|
|
3401
|
+
'Free spins': 'Gratisspins',
|
|
3402
|
+
Game: 'Spil',
|
|
3403
|
+
'Game info': 'Spilinfo',
|
|
3404
|
+
Hotkeys: 'Tastaturgenveje',
|
|
3405
|
+
'Increase your stake.': 'Forøg din indsats.',
|
|
3406
|
+
'Lower bet': 'Lavere indsats',
|
|
3407
|
+
'Master volume': 'Hovedvolumen',
|
|
3408
|
+
'Max win': 'Maks gevinst',
|
|
3409
|
+
Menu: 'Menu',
|
|
3410
|
+
'Menu & info': 'Menu og info',
|
|
3411
|
+
Modes: 'Tilstande',
|
|
3412
|
+
Music: 'Musik',
|
|
3413
|
+
Mute: 'Lydløs',
|
|
3414
|
+
'Mute or unmute the game.': 'Slå lyden til/fra.',
|
|
3415
|
+
Navigate: 'Naviger',
|
|
3416
|
+
'Open settings and game info.': 'Åbn indstillinger og spilinfo.',
|
|
3417
|
+
'Open the paytable and rules.': 'Åbn gevinsttabel og regler.',
|
|
3418
|
+
'Pay a fixed cost to enter a bonus feature.': 'Betal en fast pris for at aktivere en bonusfunktion.',
|
|
3419
|
+
Paylines: 'Gevinstlinjer',
|
|
3420
|
+
Paytable: 'Gevinsttabel',
|
|
3421
|
+
'Pays anywhere': 'Udbetaler overalt',
|
|
3422
|
+
Price: 'Pris',
|
|
3423
|
+
'Raise bet': 'Hæv indsats',
|
|
3424
|
+
Replay: 'Genspil',
|
|
3425
|
+
RTP: 'RTP',
|
|
3426
|
+
SFX: 'Lydeffekter',
|
|
3427
|
+
Settings: 'Indstillinger',
|
|
3428
|
+
Sound: 'Lyd',
|
|
3429
|
+
Spin: 'Drej',
|
|
3430
|
+
'Spin automatically a set number of times.': 'Spin automatisk et bestemt antal gange.',
|
|
3431
|
+
'Speed up spin animations.': 'Gør spilanimationer hurtigere.',
|
|
3432
|
+
Start: 'Start',
|
|
3433
|
+
'Start a spin at the current bet.': 'Start et spin med den aktuelle indsats.',
|
|
3434
|
+
'Start replay': 'Start genspil',
|
|
3435
|
+
'Total win': 'Samlet gevinst',
|
|
3436
|
+
Turbo: 'Turbo',
|
|
3437
|
+
'Ways to win': 'Vindermuligheder',
|
|
3438
|
+
Win: 'Gevinst',
|
|
3439
|
+
'Winning shapes': 'Vindende former',
|
|
3440
|
+
},
|
|
3441
|
+
de: {
|
|
3442
|
+
DISCLAIMER: 'Haftungsausschluss',
|
|
3443
|
+
Activate: 'Aktivieren',
|
|
3444
|
+
Autoplay: 'Autoplay',
|
|
3445
|
+
Balance: 'Kontostand',
|
|
3446
|
+
Bet: 'Einsatz',
|
|
3447
|
+
'BUY BONUS': 'BONUS KAUFEN',
|
|
3448
|
+
Buy: 'Kaufen',
|
|
3449
|
+
'Buy bonus': 'Bonus kaufen',
|
|
3450
|
+
Cancel: 'Abbrechen',
|
|
3451
|
+
Close: 'Schließen',
|
|
3452
|
+
'Cluster pays': 'Cluster-Gewinne',
|
|
3453
|
+
Confirm: 'Bestätigen',
|
|
3454
|
+
Controls: 'Steuerung',
|
|
3455
|
+
'Decrease your stake.': 'Einsatz verringern.',
|
|
3456
|
+
DISABLE: 'DEAKTIVIEREN',
|
|
3457
|
+
'Dismiss the current overlay.': 'Aktuelles Overlay schließen.',
|
|
3458
|
+
'Free spins': 'Freispiele',
|
|
3459
|
+
Game: 'Spiel',
|
|
3460
|
+
'Game info': 'Spielinfo',
|
|
3461
|
+
Hotkeys: 'Tastenkürzel',
|
|
3462
|
+
'Increase your stake.': 'Einsatz erhöhen.',
|
|
3463
|
+
'Lower bet': 'Einsatz senken',
|
|
3464
|
+
'Master volume': 'Gesamtlautstärke',
|
|
3465
|
+
'Max win': 'Max. Gewinn',
|
|
3466
|
+
Menu: 'Menü',
|
|
3467
|
+
'Menu & info': 'Menü & Info',
|
|
3468
|
+
Modes: 'Modi',
|
|
3469
|
+
Music: 'Musik',
|
|
3470
|
+
Mute: 'Stummschalten',
|
|
3471
|
+
'Mute or unmute the game.': 'Ton stummschalten oder aktivieren.',
|
|
3472
|
+
Navigate: 'Navigieren',
|
|
3473
|
+
'Open settings and game info.': 'Einstellungen und Spielinfo öffnen.',
|
|
3474
|
+
'Open the paytable and rules.': 'Gewinntabelle und Regeln öffnen.',
|
|
3475
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zahle einen festen Betrag, um ein Bonus-Feature zu aktivieren.',
|
|
3476
|
+
Paylines: 'Gewinnlinien',
|
|
3477
|
+
Paytable: 'Gewinntabelle',
|
|
3478
|
+
'Pays anywhere': 'Zahlt überall',
|
|
3479
|
+
Price: 'Preis',
|
|
3480
|
+
'Raise bet': 'Einsatz erhöhen',
|
|
3481
|
+
Replay: 'Wiederholen',
|
|
3482
|
+
RTP: 'RTP',
|
|
3483
|
+
SFX: 'Soundeffekte',
|
|
3484
|
+
Settings: 'Einstellungen',
|
|
3485
|
+
Sound: 'Ton',
|
|
3486
|
+
Spin: 'Drehen',
|
|
3487
|
+
'Spin automatically a set number of times.': 'Automatisch eine festgelegte Anzahl von Runden spielen.',
|
|
3488
|
+
'Speed up spin animations.': 'Animationen beschleunigen.',
|
|
3489
|
+
Start: 'Start',
|
|
3490
|
+
'Start a spin at the current bet.': 'Mit dem aktuellen Einsatz drehen.',
|
|
3491
|
+
'Start replay': 'Wiederholen',
|
|
3492
|
+
'Total win': 'Gesamtgewinn',
|
|
3493
|
+
Turbo: 'Turbo',
|
|
3494
|
+
'Ways to win': 'Gewinnwege',
|
|
3495
|
+
Win: 'Gewinn',
|
|
3496
|
+
'Winning shapes': 'Gewinnmuster',
|
|
3497
|
+
},
|
|
3498
|
+
es: {
|
|
3499
|
+
DISCLAIMER: 'Aviso legal',
|
|
3500
|
+
Activate: 'Activar',
|
|
3501
|
+
Autoplay: 'Giro automático',
|
|
3502
|
+
Balance: 'Saldo',
|
|
3503
|
+
Bet: 'Apuesta',
|
|
3504
|
+
'BUY BONUS': 'COMPRAR BONO',
|
|
3505
|
+
Buy: 'Comprar',
|
|
3506
|
+
'Buy bonus': 'Comprar bono',
|
|
3507
|
+
Cancel: 'Cancelar',
|
|
3508
|
+
Close: 'Cerrar',
|
|
3509
|
+
'Cluster pays': 'Pago en racimo',
|
|
3510
|
+
Confirm: 'Confirmar',
|
|
3511
|
+
Controls: 'Controles',
|
|
3512
|
+
'Decrease your stake.': 'Reducir apuesta.',
|
|
3513
|
+
DISABLE: 'DESACTIVAR',
|
|
3514
|
+
'Dismiss the current overlay.': 'Cerrar el panel actual.',
|
|
3515
|
+
'Free spins': 'Giros gratis',
|
|
3516
|
+
Game: 'Juego',
|
|
3517
|
+
'Game info': 'Info del juego',
|
|
3518
|
+
Hotkeys: 'Atajos de teclado',
|
|
3519
|
+
'Increase your stake.': 'Aumentar apuesta.',
|
|
3520
|
+
'Lower bet': 'Bajar apuesta',
|
|
3521
|
+
'Master volume': 'Volumen principal',
|
|
3522
|
+
'Max win': 'Ganancia máxima',
|
|
3523
|
+
Menu: 'Menú',
|
|
3524
|
+
'Menu & info': 'Menú e info',
|
|
3525
|
+
Modes: 'Modos',
|
|
3526
|
+
Music: 'Música',
|
|
3527
|
+
Mute: 'Silenciar',
|
|
3528
|
+
'Mute or unmute the game.': 'Activar o silenciar el sonido.',
|
|
3529
|
+
Navigate: 'Navegar',
|
|
3530
|
+
'Open settings and game info.': 'Abrir ajustes e info del juego.',
|
|
3531
|
+
'Open the paytable and rules.': 'Abrir tabla de pagos y reglas.',
|
|
3532
|
+
'Pay a fixed cost to enter a bonus feature.': 'Paga un coste fijo para acceder a una función de bono.',
|
|
3533
|
+
Paylines: 'Líneas de pago',
|
|
3534
|
+
Paytable: 'Tabla de pagos',
|
|
3535
|
+
'Pays anywhere': 'Paga en cualquier lugar',
|
|
3536
|
+
Price: 'Precio',
|
|
3537
|
+
'Raise bet': 'Subir apuesta',
|
|
3538
|
+
Replay: 'Repetir',
|
|
3539
|
+
RTP: 'RTP',
|
|
3540
|
+
SFX: 'Efectos de sonido',
|
|
3541
|
+
Settings: 'Ajustes',
|
|
3542
|
+
Sound: 'Sonido',
|
|
3543
|
+
Spin: 'Girar',
|
|
3544
|
+
'Spin automatically a set number of times.': 'Girar automáticamente un número determinado de veces.',
|
|
3545
|
+
'Speed up spin animations.': 'Acelerar las animaciones de giro.',
|
|
3546
|
+
Start: 'Iniciar',
|
|
3547
|
+
'Start a spin at the current bet.': 'Iniciar un giro con la apuesta actual.',
|
|
3548
|
+
'Start replay': 'Iniciar repetición',
|
|
3549
|
+
'Total win': 'Ganancia total',
|
|
3550
|
+
Turbo: 'Turbo',
|
|
3551
|
+
'Ways to win': 'Formas de ganar',
|
|
3552
|
+
Win: 'Premio',
|
|
3553
|
+
'Winning shapes': 'Figuras ganadoras',
|
|
3554
|
+
},
|
|
3555
|
+
fi: {
|
|
3556
|
+
DISCLAIMER: 'Vastuuvapauslauseke',
|
|
3557
|
+
Activate: 'Aktivoi',
|
|
3558
|
+
Autoplay: 'Automaattipeli',
|
|
3559
|
+
Balance: 'Saldo',
|
|
3560
|
+
Bet: 'Panos',
|
|
3561
|
+
'BUY BONUS': 'OSTA BONUS',
|
|
3562
|
+
Buy: 'Osta',
|
|
3563
|
+
'Buy bonus': 'Osta bonus',
|
|
3564
|
+
Cancel: 'Peruuta',
|
|
3565
|
+
Close: 'Sulje',
|
|
3566
|
+
'Cluster pays': 'Ryhmävoitto',
|
|
3567
|
+
Confirm: 'Vahvista',
|
|
3568
|
+
Controls: 'Ohjaimet',
|
|
3569
|
+
'Decrease your stake.': 'Pienennä panostasi.',
|
|
3570
|
+
DISABLE: 'POISTA KÄYTÖSTÄ',
|
|
3571
|
+
'Dismiss the current overlay.': 'Sulje nykyinen näkymä.',
|
|
3572
|
+
'Free spins': 'Ilmaiskierrokset',
|
|
3573
|
+
Game: 'Peli',
|
|
3574
|
+
'Game info': 'Pelitiedot',
|
|
3575
|
+
Hotkeys: 'Pikanäppäimet',
|
|
3576
|
+
'Increase your stake.': 'Kasvata panostasi.',
|
|
3577
|
+
'Lower bet': 'Pienennä panosta',
|
|
3578
|
+
'Master volume': 'Pääänenvoimakkuus',
|
|
3579
|
+
'Max win': 'Maksimivoitto',
|
|
3580
|
+
Menu: 'Valikko',
|
|
3581
|
+
'Menu & info': 'Valikko ja tiedot',
|
|
3582
|
+
Modes: 'Tilat',
|
|
3583
|
+
Music: 'Musiikki',
|
|
3584
|
+
Mute: 'Mykistä',
|
|
3585
|
+
'Mute or unmute the game.': 'Mykistä tai poista mykistys.',
|
|
3586
|
+
Navigate: 'Navigoi',
|
|
3587
|
+
'Open settings and game info.': 'Avaa asetukset ja pelitiedot.',
|
|
3588
|
+
'Open the paytable and rules.': 'Avaa voittotaulukko ja säännöt.',
|
|
3589
|
+
'Pay a fixed cost to enter a bonus feature.': 'Maksa kiinteä summa päästäksesi bonusominaisuuteen.',
|
|
3590
|
+
Paylines: 'Voittolinjat',
|
|
3591
|
+
Paytable: 'Voittotaulukko',
|
|
3592
|
+
'Pays anywhere': 'Voittaa missä tahansa',
|
|
3593
|
+
Price: 'Hinta',
|
|
3594
|
+
'Raise bet': 'Nosta panosta',
|
|
3595
|
+
Replay: 'Toista uudelleen',
|
|
3596
|
+
RTP: 'RTP',
|
|
3597
|
+
SFX: 'Ääniefektit',
|
|
3598
|
+
Settings: 'Asetukset',
|
|
3599
|
+
Sound: 'Ääni',
|
|
3600
|
+
Spin: 'Pyöräytä',
|
|
3601
|
+
'Spin automatically a set number of times.': 'Pyöräytä automaattisesti määritetty määrä kertoja.',
|
|
3602
|
+
'Speed up spin animations.': 'Nopeuta pyöräytysanimaatioita.',
|
|
3603
|
+
Start: 'Aloita',
|
|
3604
|
+
'Start a spin at the current bet.': 'Aloita pyöräytys nykyisellä panoksella.',
|
|
3605
|
+
'Start replay': 'Aloita uudelleentoisto',
|
|
3606
|
+
'Total win': 'Kokonaisvoitto',
|
|
3607
|
+
Turbo: 'Turbo',
|
|
3608
|
+
'Ways to win': 'Voittotavat',
|
|
3609
|
+
Win: 'Voitto',
|
|
3610
|
+
'Winning shapes': 'Voittokuviot',
|
|
3611
|
+
},
|
|
3612
|
+
fr: {
|
|
3613
|
+
DISCLAIMER: 'Avertissement',
|
|
3614
|
+
Activate: 'Activer',
|
|
3615
|
+
Autoplay: 'Jeu automatique',
|
|
3616
|
+
Balance: 'Solde',
|
|
3617
|
+
Bet: 'Mise',
|
|
3618
|
+
'BUY BONUS': 'ACHETER BONUS',
|
|
3619
|
+
Buy: 'Acheter',
|
|
3620
|
+
'Buy bonus': 'Acheter un bonus',
|
|
3621
|
+
Cancel: 'Annuler',
|
|
3622
|
+
Close: 'Fermer',
|
|
3623
|
+
'Cluster pays': 'Gains en grappe',
|
|
3624
|
+
Confirm: 'Confirmer',
|
|
3625
|
+
Controls: 'Commandes',
|
|
3626
|
+
'Decrease your stake.': 'Diminuer votre mise.',
|
|
3627
|
+
DISABLE: 'DÉSACTIVER',
|
|
3628
|
+
'Dismiss the current overlay.': 'Fermer le panneau actuel.',
|
|
3629
|
+
'Free spins': 'Tours gratuits',
|
|
3630
|
+
Game: 'Jeu',
|
|
3631
|
+
'Game info': 'Infos du jeu',
|
|
3632
|
+
Hotkeys: 'Raccourcis clavier',
|
|
3633
|
+
'Increase your stake.': 'Augmenter votre mise.',
|
|
3634
|
+
'Lower bet': 'Baisser la mise',
|
|
3635
|
+
'Master volume': 'Volume principal',
|
|
3636
|
+
'Max win': 'Gain maximum',
|
|
3637
|
+
Menu: 'Menu',
|
|
3638
|
+
'Menu & info': 'Menu et info',
|
|
3639
|
+
Modes: 'Modes',
|
|
3640
|
+
Music: 'Musique',
|
|
3641
|
+
Mute: 'Couper le son',
|
|
3642
|
+
'Mute or unmute the game.': 'Couper ou rétablir le son.',
|
|
3643
|
+
Navigate: 'Naviguer',
|
|
3644
|
+
'Open settings and game info.': 'Ouvrir les paramètres et infos du jeu.',
|
|
3645
|
+
'Open the paytable and rules.': 'Ouvrir la table des gains et les règles.',
|
|
3646
|
+
'Pay a fixed cost to enter a bonus feature.': 'Payez un coût fixe pour accéder à une fonctionnalité bonus.',
|
|
3647
|
+
Paylines: 'Lignes de paiement',
|
|
3648
|
+
Paytable: 'Table des gains',
|
|
3649
|
+
'Pays anywhere': 'Gains sur toute la grille',
|
|
3650
|
+
Price: 'Prix',
|
|
3651
|
+
'Raise bet': 'Augmenter la mise',
|
|
3652
|
+
Replay: 'Revoir',
|
|
3653
|
+
RTP: 'RTP',
|
|
3654
|
+
SFX: 'Effets sonores',
|
|
3655
|
+
Settings: 'Paramètres',
|
|
3656
|
+
Sound: 'Son',
|
|
3657
|
+
Spin: 'Tourner',
|
|
3658
|
+
'Spin automatically a set number of times.': 'Tourner automatiquement un nombre de fois défini.',
|
|
3659
|
+
'Speed up spin animations.': 'Accélérer les animations de spin.',
|
|
3660
|
+
Start: 'Lancer',
|
|
3661
|
+
'Start a spin at the current bet.': 'Lancer un tour avec la mise actuelle.',
|
|
3662
|
+
'Start replay': 'Lancer le replay',
|
|
3663
|
+
'Total win': 'Gain total',
|
|
3664
|
+
Turbo: 'Turbo',
|
|
3665
|
+
'Ways to win': 'Façons de gagner',
|
|
3666
|
+
Win: 'Gain',
|
|
3667
|
+
'Winning shapes': 'Figures gagnantes',
|
|
3668
|
+
},
|
|
3669
|
+
hi: {
|
|
3670
|
+
DISCLAIMER: 'अस्वीकरण',
|
|
3671
|
+
Activate: 'सक्रिय करें',
|
|
3672
|
+
Autoplay: 'ऑटोप्ले',
|
|
3673
|
+
Balance: 'बैलेंस',
|
|
3674
|
+
Bet: 'दांव',
|
|
3675
|
+
'BUY BONUS': 'बोनस खरीदें',
|
|
3676
|
+
Buy: 'खरीदें',
|
|
3677
|
+
'Buy bonus': 'बोनस खरीदें',
|
|
3678
|
+
Cancel: 'रद्द करें',
|
|
3679
|
+
Close: 'बंद करें',
|
|
3680
|
+
'Cluster pays': 'क्लस्टर भुगतान',
|
|
3681
|
+
Confirm: 'पुष्टि करें',
|
|
3682
|
+
Controls: 'नियंत्रण',
|
|
3683
|
+
'Decrease your stake.': 'अपना दांव कम करें।',
|
|
3684
|
+
DISABLE: 'बंद करें',
|
|
3685
|
+
'Dismiss the current overlay.': 'वर्तमान ओवरले बंद करें।',
|
|
3686
|
+
'Free spins': 'फ्री स्पिन',
|
|
3687
|
+
Game: 'खेल',
|
|
3688
|
+
'Game info': 'गेम जानकारी',
|
|
3689
|
+
Hotkeys: 'कीबोर्ड शॉर्टकट',
|
|
3690
|
+
'Increase your stake.': 'अपना दांव बढ़ाएं।',
|
|
3691
|
+
'Lower bet': 'दांव घटाएं',
|
|
3692
|
+
'Master volume': 'मुख्य वॉल्यूम',
|
|
3693
|
+
'Max win': 'अधिकतम जीत',
|
|
3694
|
+
Menu: 'मेनू',
|
|
3695
|
+
'Menu & info': 'मेनू और जानकारी',
|
|
3696
|
+
Modes: 'मोड',
|
|
3697
|
+
Music: 'संगीत',
|
|
3698
|
+
Mute: 'म्यूट करें',
|
|
3699
|
+
'Mute or unmute the game.': 'गेम को म्यूट या अनम्यूट करें।',
|
|
3700
|
+
Navigate: 'नेविगेट करें',
|
|
3701
|
+
'Open settings and game info.': 'सेटिंग और गेम जानकारी खोलें।',
|
|
3702
|
+
'Open the paytable and rules.': 'पेटेबल और नियम खोलें।',
|
|
3703
|
+
'Pay a fixed cost to enter a bonus feature.': 'बोनस फीचर में प्रवेश के लिए एक निश्चित राशि दें।',
|
|
3704
|
+
Paylines: 'पेलाइन',
|
|
3705
|
+
Paytable: 'पेटेबल',
|
|
3706
|
+
'Pays anywhere': 'कहीं भी जीत',
|
|
3707
|
+
Price: 'मूल्य',
|
|
3708
|
+
'Raise bet': 'दांव बढ़ाएं',
|
|
3709
|
+
Replay: 'दोबारा खेलें',
|
|
3710
|
+
RTP: 'RTP',
|
|
3711
|
+
SFX: 'ध्वनि प्रभाव',
|
|
3712
|
+
Settings: 'सेटिंग',
|
|
3713
|
+
Sound: 'ध्वनि',
|
|
3714
|
+
Spin: 'स्पिन',
|
|
3715
|
+
'Spin automatically a set number of times.': 'एक निश्चित संख्या में स्वचालित रूप से स्पिन करें।',
|
|
3716
|
+
'Speed up spin animations.': 'स्पिन एनिमेशन को तेज़ करें।',
|
|
3717
|
+
Start: 'शुरू करें',
|
|
3718
|
+
'Start a spin at the current bet.': 'वर्तमान दांव पर स्पिन शुरू करें।',
|
|
3719
|
+
'Start replay': 'रीप्ले शुरू करें',
|
|
3720
|
+
'Total win': 'कुल जीत',
|
|
3721
|
+
Turbo: 'टर्बो',
|
|
3722
|
+
'Ways to win': 'जीत के तरीके',
|
|
3723
|
+
Win: 'जीत',
|
|
3724
|
+
'Winning shapes': 'जीत के आकार',
|
|
3725
|
+
},
|
|
3726
|
+
id: {
|
|
3727
|
+
DISCLAIMER: 'Penafian',
|
|
3728
|
+
Activate: 'Aktifkan',
|
|
3729
|
+
Autoplay: 'Putar Otomatis',
|
|
3730
|
+
Balance: 'Saldo',
|
|
3731
|
+
Bet: 'Taruhan',
|
|
3732
|
+
'BUY BONUS': 'BELI BONUS',
|
|
3733
|
+
Buy: 'Beli',
|
|
3734
|
+
'Buy bonus': 'Beli bonus',
|
|
3735
|
+
Cancel: 'Batal',
|
|
3736
|
+
Close: 'Tutup',
|
|
3737
|
+
'Cluster pays': 'Bayar kluster',
|
|
3738
|
+
Confirm: 'Konfirmasi',
|
|
3739
|
+
Controls: 'Kontrol',
|
|
3740
|
+
'Decrease your stake.': 'Kurangi taruhan Anda.',
|
|
3741
|
+
DISABLE: 'NONAKTIFKAN',
|
|
3742
|
+
'Dismiss the current overlay.': 'Tutup overlay saat ini.',
|
|
3743
|
+
'Free spins': 'Putaran gratis',
|
|
3744
|
+
Game: 'Permainan',
|
|
3745
|
+
'Game info': 'Info permainan',
|
|
3746
|
+
Hotkeys: 'Pintasan keyboard',
|
|
3747
|
+
'Increase your stake.': 'Tingkatkan taruhan Anda.',
|
|
3748
|
+
'Lower bet': 'Turunkan taruhan',
|
|
3749
|
+
'Master volume': 'Volume utama',
|
|
3750
|
+
'Max win': 'Kemenangan maks',
|
|
3751
|
+
Menu: 'Menu',
|
|
3752
|
+
'Menu & info': 'Menu & info',
|
|
3753
|
+
Modes: 'Mode',
|
|
3754
|
+
Music: 'Musik',
|
|
3755
|
+
Mute: 'Bisukan',
|
|
3756
|
+
'Mute or unmute the game.': 'Bisukan atau aktifkan suara permainan.',
|
|
3757
|
+
Navigate: 'Navigasi',
|
|
3758
|
+
'Open settings and game info.': 'Buka pengaturan dan info permainan.',
|
|
3759
|
+
'Open the paytable and rules.': 'Buka tabel pembayaran dan aturan.',
|
|
3760
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bayar biaya tetap untuk masuk ke fitur bonus.',
|
|
3761
|
+
Paylines: 'Garis pembayaran',
|
|
3762
|
+
Paytable: 'Tabel pembayaran',
|
|
3763
|
+
'Pays anywhere': 'Menang di mana saja',
|
|
3764
|
+
Price: 'Harga',
|
|
3765
|
+
'Raise bet': 'Naikkan taruhan',
|
|
3766
|
+
Replay: 'Putar ulang',
|
|
3767
|
+
RTP: 'RTP',
|
|
3768
|
+
SFX: 'Efek suara',
|
|
3769
|
+
Settings: 'Pengaturan',
|
|
3770
|
+
Sound: 'Suara',
|
|
3771
|
+
Spin: 'Putar',
|
|
3772
|
+
'Spin automatically a set number of times.': 'Putar otomatis sejumlah kali yang ditentukan.',
|
|
3773
|
+
'Speed up spin animations.': 'Percepat animasi putaran.',
|
|
3774
|
+
Start: 'Mulai',
|
|
3775
|
+
'Start a spin at the current bet.': 'Mulai putaran dengan taruhan saat ini.',
|
|
3776
|
+
'Start replay': 'Mulai putar ulang',
|
|
3777
|
+
'Total win': 'Total kemenangan',
|
|
3778
|
+
Turbo: 'Turbo',
|
|
3779
|
+
'Ways to win': 'Cara menang',
|
|
3780
|
+
Win: 'Menang',
|
|
3781
|
+
'Winning shapes': 'Bentuk kemenangan',
|
|
3782
|
+
},
|
|
3783
|
+
ja: {
|
|
3784
|
+
DISCLAIMER: '免責事項',
|
|
3785
|
+
Activate: '有効化',
|
|
3786
|
+
Autoplay: 'オートプレイ',
|
|
3787
|
+
Balance: '残高',
|
|
3788
|
+
Bet: 'ベット',
|
|
3789
|
+
'BUY BONUS': 'ボーナス購入',
|
|
3790
|
+
Buy: '購入',
|
|
3791
|
+
'Buy bonus': 'ボーナス購入',
|
|
3792
|
+
Cancel: 'キャンセル',
|
|
3793
|
+
Close: '閉じる',
|
|
3794
|
+
'Cluster pays': 'クラスター配当',
|
|
3795
|
+
Confirm: '確認',
|
|
3796
|
+
Controls: '操作方法',
|
|
3797
|
+
'Decrease your stake.': 'ベットを減らす。',
|
|
3798
|
+
DISABLE: '無効',
|
|
3799
|
+
'Dismiss the current overlay.': '現在のオーバーレイを閉じる。',
|
|
3800
|
+
'Free spins': 'フリースピン',
|
|
3801
|
+
Game: 'ゲーム',
|
|
3802
|
+
'Game info': 'ゲーム情報',
|
|
3803
|
+
Hotkeys: 'キーボードショートカット',
|
|
3804
|
+
'Increase your stake.': 'ベットを増やす。',
|
|
3805
|
+
'Lower bet': 'ベットを下げる',
|
|
3806
|
+
'Master volume': 'マスターボリューム',
|
|
3807
|
+
'Max win': '最大当選',
|
|
3808
|
+
Menu: 'メニュー',
|
|
3809
|
+
'Menu & info': 'メニューと情報',
|
|
3810
|
+
Modes: 'モード',
|
|
3811
|
+
Music: 'ミュージック',
|
|
3812
|
+
Mute: 'ミュート',
|
|
3813
|
+
'Mute or unmute the game.': 'ゲームをミュート/ミュート解除する。',
|
|
3814
|
+
Navigate: 'ナビゲート',
|
|
3815
|
+
'Open settings and game info.': '設定とゲーム情報を開く。',
|
|
3816
|
+
'Open the paytable and rules.': '配当表とルールを開く。',
|
|
3817
|
+
'Pay a fixed cost to enter a bonus feature.': 'ボーナス機能に入るために固定料金を支払う。',
|
|
3818
|
+
Paylines: 'ペイライン',
|
|
3819
|
+
Paytable: '配当表',
|
|
3820
|
+
'Pays anywhere': 'どこでも当選',
|
|
3821
|
+
Price: '価格',
|
|
3822
|
+
'Raise bet': 'ベットを上げる',
|
|
3823
|
+
Replay: 'リプレイ',
|
|
3824
|
+
RTP: 'RTP',
|
|
3825
|
+
SFX: '効果音',
|
|
3826
|
+
Settings: '設定',
|
|
3827
|
+
Sound: 'サウンド',
|
|
3828
|
+
Spin: 'スピン',
|
|
3829
|
+
'Spin automatically a set number of times.': '設定した回数だけ自動でスピンする。',
|
|
3830
|
+
'Speed up spin animations.': 'スピンアニメーションを高速化する。',
|
|
3831
|
+
Start: 'スタート',
|
|
3832
|
+
'Start a spin at the current bet.': '現在のベットでスピンを開始する。',
|
|
3833
|
+
'Start replay': 'リプレイ開始',
|
|
3834
|
+
'Total win': '合計当選',
|
|
3835
|
+
Turbo: 'ターボ',
|
|
3836
|
+
'Ways to win': '当選方法',
|
|
3837
|
+
Win: '当選',
|
|
3838
|
+
'Winning shapes': '当選形状',
|
|
3839
|
+
},
|
|
3840
|
+
ko: {
|
|
3841
|
+
DISCLAIMER: '면책 조항',
|
|
3842
|
+
Activate: '활성화',
|
|
3843
|
+
Autoplay: '자동 플레이',
|
|
3844
|
+
Balance: '잔액',
|
|
3845
|
+
Bet: '베팅',
|
|
3846
|
+
'BUY BONUS': '보너스 구매',
|
|
3847
|
+
Buy: '구매',
|
|
3848
|
+
'Buy bonus': '보너스 구매',
|
|
3849
|
+
Cancel: '취소',
|
|
3850
|
+
Close: '닫기',
|
|
3851
|
+
'Cluster pays': '클러스터 페이',
|
|
3852
|
+
Confirm: '확인',
|
|
3853
|
+
Controls: '조작법',
|
|
3854
|
+
'Decrease your stake.': '베팅을 줄이세요.',
|
|
3855
|
+
DISABLE: '비활성화',
|
|
3856
|
+
'Dismiss the current overlay.': '현재 오버레이를 닫습니다.',
|
|
3857
|
+
'Free spins': '무료 스핀',
|
|
3858
|
+
Game: '게임',
|
|
3859
|
+
'Game info': '게임 정보',
|
|
3860
|
+
Hotkeys: '키보드 단축키',
|
|
3861
|
+
'Increase your stake.': '베팅을 늘리세요.',
|
|
3862
|
+
'Lower bet': '베팅 낮추기',
|
|
3863
|
+
'Master volume': '마스터 볼륨',
|
|
3864
|
+
'Max win': '최대 당첨',
|
|
3865
|
+
Menu: '메뉴',
|
|
3866
|
+
'Menu & info': '메뉴 & 정보',
|
|
3867
|
+
Modes: '모드',
|
|
3868
|
+
Music: '음악',
|
|
3869
|
+
Mute: '음소거',
|
|
3870
|
+
'Mute or unmute the game.': '게임 소리를 켜거나 끕니다.',
|
|
3871
|
+
Navigate: '이동',
|
|
3872
|
+
'Open settings and game info.': '설정 및 게임 정보를 엽니다.',
|
|
3873
|
+
'Open the paytable and rules.': '페이테이블 및 규칙을 엽니다.',
|
|
3874
|
+
'Pay a fixed cost to enter a bonus feature.': '고정 비용을 지불하고 보너스 기능에 진입하세요.',
|
|
3875
|
+
Paylines: '페이라인',
|
|
3876
|
+
Paytable: '페이테이블',
|
|
3877
|
+
'Pays anywhere': '어디서나 당첨',
|
|
3878
|
+
Price: '가격',
|
|
3879
|
+
'Raise bet': '베팅 올리기',
|
|
3880
|
+
Replay: '다시보기',
|
|
3881
|
+
RTP: 'RTP',
|
|
3882
|
+
SFX: '효과음',
|
|
3883
|
+
Settings: '설정',
|
|
3884
|
+
Sound: '사운드',
|
|
3885
|
+
Spin: '스핀',
|
|
3886
|
+
'Spin automatically a set number of times.': '정해진 횟수만큼 자동으로 스핀합니다.',
|
|
3887
|
+
'Speed up spin animations.': '스핀 애니메이션을 빠르게 합니다.',
|
|
3888
|
+
Start: '시작',
|
|
3889
|
+
'Start a spin at the current bet.': '현재 베팅으로 스핀을 시작합니다.',
|
|
3890
|
+
'Start replay': '다시보기 시작',
|
|
3891
|
+
'Total win': '총 당첨',
|
|
3892
|
+
Turbo: '터보',
|
|
3893
|
+
'Ways to win': '당첨 방법',
|
|
3894
|
+
Win: '당첨',
|
|
3895
|
+
'Winning shapes': '당첨 패턴',
|
|
3896
|
+
},
|
|
3897
|
+
pl: {
|
|
3898
|
+
DISCLAIMER: 'Zastrzeżenie',
|
|
3899
|
+
Activate: 'Aktywuj',
|
|
3900
|
+
Autoplay: 'Autoplay',
|
|
3901
|
+
Balance: 'Saldo',
|
|
3902
|
+
Bet: 'Zakład',
|
|
3903
|
+
'BUY BONUS': 'KUP BONUS',
|
|
3904
|
+
Buy: 'Kup',
|
|
3905
|
+
'Buy bonus': 'Kup bonus',
|
|
3906
|
+
Cancel: 'Anuluj',
|
|
3907
|
+
Close: 'Zamknij',
|
|
3908
|
+
'Cluster pays': 'Wypłaty klastrowe',
|
|
3909
|
+
Confirm: 'Potwierdź',
|
|
3910
|
+
Controls: 'Sterowanie',
|
|
3911
|
+
'Decrease your stake.': 'Zmniejsz swój zakład.',
|
|
3912
|
+
DISABLE: 'WYŁĄCZ',
|
|
3913
|
+
'Dismiss the current overlay.': 'Zamknij bieżące okno.',
|
|
3914
|
+
'Free spins': 'Darmowe spiny',
|
|
3915
|
+
Game: 'Gra',
|
|
3916
|
+
'Game info': 'Informacje o grze',
|
|
3917
|
+
Hotkeys: 'Skróty klawiaturowe',
|
|
3918
|
+
'Increase your stake.': 'Zwiększ swój zakład.',
|
|
3919
|
+
'Lower bet': 'Obniż zakład',
|
|
3920
|
+
'Master volume': 'Głośność główna',
|
|
3921
|
+
'Max win': 'Maks. wygrana',
|
|
3922
|
+
Menu: 'Menu',
|
|
3923
|
+
'Menu & info': 'Menu i informacje',
|
|
3924
|
+
Modes: 'Tryby',
|
|
3925
|
+
Music: 'Muzyka',
|
|
3926
|
+
Mute: 'Wycisz',
|
|
3927
|
+
'Mute or unmute the game.': 'Wycisz lub odcisz dźwięk gry.',
|
|
3928
|
+
Navigate: 'Nawiguj',
|
|
3929
|
+
'Open settings and game info.': 'Otwórz ustawienia i informacje o grze.',
|
|
3930
|
+
'Open the paytable and rules.': 'Otwórz tabelę wygranych i zasady.',
|
|
3931
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zapłać stałą kwotę, aby wejść do funkcji bonusowej.',
|
|
3932
|
+
Paylines: 'Linie wygrywające',
|
|
3933
|
+
Paytable: 'Tabela wygranych',
|
|
3934
|
+
'Pays anywhere': 'Wypłaca wszędzie',
|
|
3935
|
+
Price: 'Cena',
|
|
3936
|
+
'Raise bet': 'Podnieś zakład',
|
|
3937
|
+
Replay: 'Odtwórz ponownie',
|
|
3938
|
+
RTP: 'RTP',
|
|
3939
|
+
SFX: 'Efekty dźwiękowe',
|
|
3940
|
+
Settings: 'Ustawienia',
|
|
3941
|
+
Sound: 'Dźwięk',
|
|
3942
|
+
Spin: 'Zakręć',
|
|
3943
|
+
'Spin automatically a set number of times.': 'Obracaj automatycznie określoną liczbę razy.',
|
|
3944
|
+
'Speed up spin animations.': 'Przyspiesz animacje obrotów.',
|
|
3945
|
+
Start: 'Start',
|
|
3946
|
+
'Start a spin at the current bet.': 'Rozpocznij obrót przy bieżącym zakładzie.',
|
|
3947
|
+
'Start replay': 'Rozpocznij odtwarzanie',
|
|
3948
|
+
'Total win': 'Łączna wygrana',
|
|
3949
|
+
Turbo: 'Turbo',
|
|
3950
|
+
'Ways to win': 'Sposoby wygrywania',
|
|
3951
|
+
Win: 'Wygrana',
|
|
3952
|
+
'Winning shapes': 'Wzory wygrywające',
|
|
3953
|
+
},
|
|
3954
|
+
pt: {
|
|
3955
|
+
DISCLAIMER: 'Aviso legal',
|
|
3956
|
+
Activate: 'Ativar',
|
|
3957
|
+
Autoplay: 'Giro automático',
|
|
3958
|
+
Balance: 'Saldo',
|
|
3959
|
+
Bet: 'Aposta',
|
|
3960
|
+
'BUY BONUS': 'COMPRAR BÔNUS',
|
|
3961
|
+
Buy: 'Comprar',
|
|
3962
|
+
'Buy bonus': 'Comprar bônus',
|
|
3963
|
+
Cancel: 'Cancelar',
|
|
3964
|
+
Close: 'Fechar',
|
|
3965
|
+
'Cluster pays': 'Pagamento em cluster',
|
|
3966
|
+
Confirm: 'Confirmar',
|
|
3967
|
+
Controls: 'Controles',
|
|
3968
|
+
'Decrease your stake.': 'Diminuir aposta.',
|
|
3969
|
+
DISABLE: 'DESATIVAR',
|
|
3970
|
+
'Dismiss the current overlay.': 'Fechar o painel atual.',
|
|
3971
|
+
'Free spins': 'Giros grátis',
|
|
3972
|
+
Game: 'Jogo',
|
|
3973
|
+
'Game info': 'Info do jogo',
|
|
3974
|
+
Hotkeys: 'Atalhos de teclado',
|
|
3975
|
+
'Increase your stake.': 'Aumentar aposta.',
|
|
3976
|
+
'Lower bet': 'Baixar aposta',
|
|
3977
|
+
'Master volume': 'Volume principal',
|
|
3978
|
+
'Max win': 'Ganho máximo',
|
|
3979
|
+
Menu: 'Menu',
|
|
3980
|
+
'Menu & info': 'Menu e info',
|
|
3981
|
+
Modes: 'Modos',
|
|
3982
|
+
Music: 'Música',
|
|
3983
|
+
Mute: 'Silenciar',
|
|
3984
|
+
'Mute or unmute the game.': 'Ativar ou silenciar o som do jogo.',
|
|
3985
|
+
Navigate: 'Navegar',
|
|
3986
|
+
'Open settings and game info.': 'Abrir configurações e info do jogo.',
|
|
3987
|
+
'Open the paytable and rules.': 'Abrir tabela de pagamentos e regras.',
|
|
3988
|
+
'Pay a fixed cost to enter a bonus feature.': 'Pague um custo fixo para entrar numa funcionalidade de bônus.',
|
|
3989
|
+
Paylines: 'Linhas de pagamento',
|
|
3990
|
+
Paytable: 'Tabela de pagamentos',
|
|
3991
|
+
'Pays anywhere': 'Paga em qualquer posição',
|
|
3992
|
+
Price: 'Preço',
|
|
3993
|
+
'Raise bet': 'Aumentar aposta',
|
|
3994
|
+
Replay: 'Repetir',
|
|
3995
|
+
RTP: 'RTP',
|
|
3996
|
+
SFX: 'Efeitos sonoros',
|
|
3997
|
+
Settings: 'Configurações',
|
|
3998
|
+
Sound: 'Som',
|
|
3999
|
+
Spin: 'Girar',
|
|
4000
|
+
'Spin automatically a set number of times.': 'Girar automaticamente um número definido de vezes.',
|
|
4001
|
+
'Speed up spin animations.': 'Acelerar as animações de giro.',
|
|
4002
|
+
Start: 'Iniciar',
|
|
4003
|
+
'Start a spin at the current bet.': 'Iniciar um giro com a aposta atual.',
|
|
4004
|
+
'Start replay': 'Iniciar repetição',
|
|
4005
|
+
'Total win': 'Ganho total',
|
|
4006
|
+
Turbo: 'Turbo',
|
|
4007
|
+
'Ways to win': 'Formas de ganhar',
|
|
4008
|
+
Win: 'Ganho',
|
|
4009
|
+
'Winning shapes': 'Figuras vencedoras',
|
|
4010
|
+
},
|
|
4011
|
+
ru: {
|
|
4012
|
+
DISCLAIMER: 'Отказ от ответственности',
|
|
4013
|
+
Activate: 'Активировать',
|
|
4014
|
+
Autoplay: 'Автоигра',
|
|
4015
|
+
Balance: 'Баланс',
|
|
4016
|
+
Bet: 'Ставка',
|
|
4017
|
+
'BUY BONUS': 'КУПИТЬ БОНУС',
|
|
4018
|
+
Buy: 'Купить',
|
|
4019
|
+
'Buy bonus': 'Купить бонус',
|
|
4020
|
+
Cancel: 'Отмена',
|
|
4021
|
+
Close: 'Закрыть',
|
|
4022
|
+
'Cluster pays': 'Кластерные выплаты',
|
|
4023
|
+
Confirm: 'Подтвердить',
|
|
4024
|
+
Controls: 'Управление',
|
|
4025
|
+
'Decrease your stake.': 'Уменьшить ставку.',
|
|
4026
|
+
DISABLE: 'ОТКЛЮЧИТЬ',
|
|
4027
|
+
'Dismiss the current overlay.': 'Закрыть текущее окно.',
|
|
4028
|
+
'Free spins': 'Бесплатные вращения',
|
|
4029
|
+
Game: 'Игра',
|
|
4030
|
+
'Game info': 'Информация об игре',
|
|
4031
|
+
Hotkeys: 'Горячие клавиши',
|
|
4032
|
+
'Increase your stake.': 'Увеличить ставку.',
|
|
4033
|
+
'Lower bet': 'Уменьшить ставку',
|
|
4034
|
+
'Master volume': 'Общая громкость',
|
|
4035
|
+
'Max win': 'Макс. выигрыш',
|
|
4036
|
+
Menu: 'Меню',
|
|
4037
|
+
'Menu & info': 'Меню и информация',
|
|
4038
|
+
Modes: 'Режимы',
|
|
4039
|
+
Music: 'Музыка',
|
|
4040
|
+
Mute: 'Отключить звук',
|
|
4041
|
+
'Mute or unmute the game.': 'Включить или отключить звук.',
|
|
4042
|
+
Navigate: 'Навигация',
|
|
4043
|
+
'Open settings and game info.': 'Открыть настройки и информацию об игре.',
|
|
4044
|
+
'Open the paytable and rules.': 'Открыть таблицу выплат и правила.',
|
|
4045
|
+
'Pay a fixed cost to enter a bonus feature.': 'Заплатите фиксированную сумму для входа в бонусный раунд.',
|
|
4046
|
+
Paylines: 'Линии выплат',
|
|
4047
|
+
Paytable: 'Таблица выплат',
|
|
4048
|
+
'Pays anywhere': 'Выплачивает в любом месте',
|
|
4049
|
+
Price: 'Цена',
|
|
4050
|
+
'Raise bet': 'Повысить ставку',
|
|
4051
|
+
Replay: 'Повтор',
|
|
4052
|
+
RTP: 'RTP',
|
|
4053
|
+
SFX: 'Звуковые эффекты',
|
|
4054
|
+
Settings: 'Настройки',
|
|
4055
|
+
Sound: 'Звук',
|
|
4056
|
+
Spin: 'Вращение',
|
|
4057
|
+
'Spin automatically a set number of times.': 'Автоматически вращать заданное количество раз.',
|
|
4058
|
+
'Speed up spin animations.': 'Ускорить анимацию вращений.',
|
|
4059
|
+
Start: 'Начать',
|
|
4060
|
+
'Start a spin at the current bet.': 'Начать вращение с текущей ставкой.',
|
|
4061
|
+
'Start replay': 'Начать повтор',
|
|
4062
|
+
'Total win': 'Общий выигрыш',
|
|
4063
|
+
Turbo: 'Турбо',
|
|
4064
|
+
'Ways to win': 'Способы выигрыша',
|
|
4065
|
+
Win: 'Выигрыш',
|
|
4066
|
+
'Winning shapes': 'Выигрышные комбинации',
|
|
4067
|
+
},
|
|
4068
|
+
tr: {
|
|
4069
|
+
DISCLAIMER: 'Yasal uyarı',
|
|
4070
|
+
Activate: 'Etkinleştir',
|
|
4071
|
+
Autoplay: 'Otomatik Oyun',
|
|
4072
|
+
Balance: 'Bakiye',
|
|
4073
|
+
Bet: 'Bahis',
|
|
4074
|
+
'BUY BONUS': 'BONUS SATIN AL',
|
|
4075
|
+
Buy: 'Satın al',
|
|
4076
|
+
'Buy bonus': 'Bonus satın al',
|
|
4077
|
+
Cancel: 'İptal',
|
|
4078
|
+
Close: 'Kapat',
|
|
4079
|
+
'Cluster pays': 'Küme ödemeleri',
|
|
4080
|
+
Confirm: 'Onayla',
|
|
4081
|
+
Controls: 'Kontroller',
|
|
4082
|
+
'Decrease your stake.': 'Bahsinizi azaltın.',
|
|
4083
|
+
DISABLE: 'DEVRE DIŞI',
|
|
4084
|
+
'Dismiss the current overlay.': 'Mevcut pencereyi kapat.',
|
|
4085
|
+
'Free spins': 'Ücretsiz dönüşler',
|
|
4086
|
+
Game: 'Oyun',
|
|
4087
|
+
'Game info': 'Oyun bilgisi',
|
|
4088
|
+
Hotkeys: 'Klavye kısayolları',
|
|
4089
|
+
'Increase your stake.': 'Bahsinizi artırın.',
|
|
4090
|
+
'Lower bet': 'Bahsi düşür',
|
|
4091
|
+
'Master volume': 'Ana ses',
|
|
4092
|
+
'Max win': 'Maks kazanç',
|
|
4093
|
+
Menu: 'Menü',
|
|
4094
|
+
'Menu & info': 'Menü ve bilgi',
|
|
4095
|
+
Modes: 'Modlar',
|
|
4096
|
+
Music: 'Müzik',
|
|
4097
|
+
Mute: 'Sessiz',
|
|
4098
|
+
'Mute or unmute the game.': 'Oyun sesini aç ya da kapat.',
|
|
4099
|
+
Navigate: 'Gezin',
|
|
4100
|
+
'Open settings and game info.': 'Ayarları ve oyun bilgisini aç.',
|
|
4101
|
+
'Open the paytable and rules.': 'Ödeme tablosunu ve kuralları aç.',
|
|
4102
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bonus özelliğine girmek için sabit bir ücret ödeyin.',
|
|
4103
|
+
Paylines: 'Ödeme çizgileri',
|
|
4104
|
+
Paytable: 'Ödeme tablosu',
|
|
4105
|
+
'Pays anywhere': 'Her yerde kazandırır',
|
|
4106
|
+
Price: 'Fiyat',
|
|
4107
|
+
'Raise bet': 'Bahsi artır',
|
|
4108
|
+
Replay: 'Tekrar oynat',
|
|
4109
|
+
RTP: 'RTP',
|
|
4110
|
+
SFX: 'Ses efektleri',
|
|
4111
|
+
Settings: 'Ayarlar',
|
|
4112
|
+
Sound: 'Ses',
|
|
4113
|
+
Spin: 'Döndür',
|
|
4114
|
+
'Spin automatically a set number of times.': 'Belirlenen sayıda otomatik döndür.',
|
|
4115
|
+
'Speed up spin animations.': 'Döndürme animasyonlarını hızlandır.',
|
|
4116
|
+
Start: 'Başlat',
|
|
4117
|
+
'Start a spin at the current bet.': 'Mevcut bahisle döndürmeyi başlat.',
|
|
4118
|
+
'Start replay': 'Tekrarı başlat',
|
|
4119
|
+
'Total win': 'Toplam kazanç',
|
|
4120
|
+
Turbo: 'Turbo',
|
|
4121
|
+
'Ways to win': 'Kazanma yolları',
|
|
4122
|
+
Win: 'Kazanç',
|
|
4123
|
+
'Winning shapes': 'Kazanan şekiller',
|
|
4124
|
+
},
|
|
4125
|
+
vi: {
|
|
4126
|
+
DISCLAIMER: 'Tuyên bố miễn trừ trách nhiệm',
|
|
4127
|
+
Activate: 'Kích hoạt',
|
|
4128
|
+
Autoplay: 'Tự động quay',
|
|
4129
|
+
Balance: 'Số dư',
|
|
4130
|
+
Bet: 'Cược',
|
|
4131
|
+
'BUY BONUS': 'MUA THƯỞNG',
|
|
4132
|
+
Buy: 'Mua',
|
|
4133
|
+
'Buy bonus': 'Mua thưởng',
|
|
4134
|
+
Cancel: 'Hủy',
|
|
4135
|
+
Close: 'Đóng',
|
|
4136
|
+
'Cluster pays': 'Trả theo cụm',
|
|
4137
|
+
Confirm: 'Xác nhận',
|
|
4138
|
+
Controls: 'Điều khiển',
|
|
4139
|
+
'Decrease your stake.': 'Giảm mức cược.',
|
|
4140
|
+
DISABLE: 'TẮT',
|
|
4141
|
+
'Dismiss the current overlay.': 'Đóng lớp phủ hiện tại.',
|
|
4142
|
+
'Free spins': 'Quay miễn phí',
|
|
4143
|
+
Game: 'Trò chơi',
|
|
4144
|
+
'Game info': 'Thông tin trò chơi',
|
|
4145
|
+
Hotkeys: 'Phím tắt',
|
|
4146
|
+
'Increase your stake.': 'Tăng mức cược.',
|
|
4147
|
+
'Lower bet': 'Giảm cược',
|
|
4148
|
+
'Master volume': 'Âm lượng chính',
|
|
4149
|
+
'Max win': 'Thắng tối đa',
|
|
4150
|
+
Menu: 'Menu',
|
|
4151
|
+
'Menu & info': 'Menu & thông tin',
|
|
4152
|
+
Modes: 'Chế độ',
|
|
4153
|
+
Music: 'Âm nhạc',
|
|
4154
|
+
Mute: 'Tắt âm',
|
|
4155
|
+
'Mute or unmute the game.': 'Tắt hoặc bật âm thanh trò chơi.',
|
|
4156
|
+
Navigate: 'Điều hướng',
|
|
4157
|
+
'Open settings and game info.': 'Mở cài đặt và thông tin trò chơi.',
|
|
4158
|
+
'Open the paytable and rules.': 'Mở bảng trả thưởng và quy tắc.',
|
|
4159
|
+
'Pay a fixed cost to enter a bonus feature.': 'Trả một khoản phí cố định để tham gia tính năng thưởng.',
|
|
4160
|
+
Paylines: 'Đường thắng',
|
|
4161
|
+
Paytable: 'Bảng trả thưởng',
|
|
4162
|
+
'Pays anywhere': 'Trả bất cứ đâu',
|
|
4163
|
+
Price: 'Giá',
|
|
4164
|
+
'Raise bet': 'Tăng cược',
|
|
4165
|
+
Replay: 'Xem lại',
|
|
4166
|
+
RTP: 'RTP',
|
|
4167
|
+
SFX: 'Hiệu ứng âm thanh',
|
|
4168
|
+
Settings: 'Cài đặt',
|
|
4169
|
+
Sound: 'Âm thanh',
|
|
4170
|
+
Spin: 'Quay',
|
|
4171
|
+
'Spin automatically a set number of times.': 'Tự động quay một số lần nhất định.',
|
|
4172
|
+
'Speed up spin animations.': 'Tăng tốc độ hoạt ảnh quay.',
|
|
4173
|
+
Start: 'Bắt đầu',
|
|
4174
|
+
'Start a spin at the current bet.': 'Bắt đầu quay với mức cược hiện tại.',
|
|
4175
|
+
'Start replay': 'Bắt đầu xem lại',
|
|
4176
|
+
'Total win': 'Tổng thắng',
|
|
4177
|
+
Turbo: 'Turbo',
|
|
4178
|
+
'Ways to win': 'Cách thắng',
|
|
4179
|
+
Win: 'Thắng',
|
|
4180
|
+
'Winning shapes': 'Hình thắng',
|
|
4181
|
+
},
|
|
4182
|
+
zh: {
|
|
4183
|
+
DISCLAIMER: '免责声明',
|
|
4184
|
+
Activate: '激活',
|
|
4185
|
+
Autoplay: '自动游戏',
|
|
4186
|
+
Balance: '余额',
|
|
4187
|
+
Bet: '投注',
|
|
4188
|
+
'BUY BONUS': '购买奖励',
|
|
4189
|
+
Buy: '购买',
|
|
4190
|
+
'Buy bonus': '购买奖励',
|
|
4191
|
+
Cancel: '取消',
|
|
4192
|
+
Close: '关闭',
|
|
4193
|
+
'Cluster pays': '集群赔付',
|
|
4194
|
+
Confirm: '确认',
|
|
4195
|
+
Controls: '控制',
|
|
4196
|
+
'Decrease your stake.': '降低投注额。',
|
|
4197
|
+
DISABLE: '禁用',
|
|
4198
|
+
'Dismiss the current overlay.': '关闭当前弹窗。',
|
|
4199
|
+
'Free spins': '免费旋转',
|
|
4200
|
+
Game: '游戏',
|
|
4201
|
+
'Game info': '游戏信息',
|
|
4202
|
+
Hotkeys: '快捷键',
|
|
4203
|
+
'Increase your stake.': '提高投注额。',
|
|
4204
|
+
'Lower bet': '降低投注',
|
|
4205
|
+
'Master volume': '主音量',
|
|
4206
|
+
'Max win': '最大奖金',
|
|
4207
|
+
Menu: '菜单',
|
|
4208
|
+
'Menu & info': '菜单与信息',
|
|
4209
|
+
Modes: '模式',
|
|
4210
|
+
Music: '音乐',
|
|
4211
|
+
Mute: '静音',
|
|
4212
|
+
'Mute or unmute the game.': '静音或取消静音。',
|
|
4213
|
+
Navigate: '导航',
|
|
4214
|
+
'Open settings and game info.': '打开设置和游戏信息。',
|
|
4215
|
+
'Open the paytable and rules.': '打开赔付表和规则。',
|
|
4216
|
+
'Pay a fixed cost to enter a bonus feature.': '支付固定费用以进入奖励功能。',
|
|
4217
|
+
Paylines: '赔付线',
|
|
4218
|
+
Paytable: '赔付表',
|
|
4219
|
+
'Pays anywhere': '任意位置赢',
|
|
4220
|
+
Price: '价格',
|
|
4221
|
+
'Raise bet': '提高投注',
|
|
4222
|
+
Replay: '重播',
|
|
4223
|
+
RTP: 'RTP',
|
|
4224
|
+
SFX: '音效',
|
|
4225
|
+
Settings: '设置',
|
|
4226
|
+
Sound: '声音',
|
|
4227
|
+
Spin: '旋转',
|
|
4228
|
+
'Spin automatically a set number of times.': '自动旋转设定次数。',
|
|
4229
|
+
'Speed up spin animations.': '加速旋转动画。',
|
|
4230
|
+
Start: '开始',
|
|
4231
|
+
'Start a spin at the current bet.': '以当前投注额开始旋转。',
|
|
4232
|
+
'Start replay': '开始重播',
|
|
4233
|
+
'Total win': '总奖金',
|
|
4234
|
+
Turbo: '急速',
|
|
4235
|
+
'Ways to win': '赢法',
|
|
4236
|
+
Win: '奖金',
|
|
4237
|
+
'Winning shapes': '赢利图形',
|
|
4238
|
+
},
|
|
4239
|
+
};
|
|
4240
|
+
|
|
2717
4241
|
// Social-casino language. English is the source (and, for now, the only) language; `socialize`
|
|
2718
4242
|
// rewrites the restricted gambling vocabulary into social-safe phrasing while preserving case.
|
|
2719
4243
|
//
|
|
@@ -2786,6 +4310,21 @@ function socialize(text) {
|
|
|
2786
4310
|
return repl == null ? m : applyCase(m, repl);
|
|
2787
4311
|
});
|
|
2788
4312
|
}
|
|
4313
|
+
const LANGS = ['de', 'en', 'es', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt', 'ru', 'tr', 'vi', 'zh', 'da'];
|
|
4314
|
+
const LANG_SET = new Set(LANGS);
|
|
4315
|
+
function normalizeLang(code) {
|
|
4316
|
+
const base = (code ?? '').toLowerCase().split(/[-_]/)[0];
|
|
4317
|
+
return (LANG_SET.has(base) ? base : 'en');
|
|
4318
|
+
}
|
|
4319
|
+
function createI18n(opts) {
|
|
4320
|
+
const lang = normalizeLang(opts.language);
|
|
4321
|
+
const t = (src) => {
|
|
4322
|
+
if (lang === 'en')
|
|
4323
|
+
return opts.isSocial ? socialize(src) : src;
|
|
4324
|
+
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
4325
|
+
};
|
|
4326
|
+
return { lang, t };
|
|
4327
|
+
}
|
|
2789
4328
|
|
|
2790
4329
|
const REMOVE_FADE_MS = 300;
|
|
2791
4330
|
class GameShell extends EventEmitter {
|
|
@@ -2801,10 +4340,19 @@ class GameShell extends EventEmitter {
|
|
|
2801
4340
|
prevBalance = 0;
|
|
2802
4341
|
prevWin = 0;
|
|
2803
4342
|
moneyAnims = [];
|
|
2804
|
-
|
|
4343
|
+
kbd;
|
|
4344
|
+
i18n;
|
|
4345
|
+
/** onKey handler of the currently open modal/overlay, if any (set in showModal, cleared in closeModal). */
|
|
4346
|
+
modalOnKey = undefined;
|
|
4347
|
+
/** Shared sound on/off state — Settings speaker toggle and the Shift+M hotkey stay in sync. The
|
|
4348
|
+
* game listens to `settingChange({ key: 'sound' })` to (un)mute audio. */
|
|
4349
|
+
soundOn = true;
|
|
4350
|
+
/** Set by the open Settings modal so Shift+M live-updates its speaker icon; cleared on close. */
|
|
4351
|
+
soundRefresh = null;
|
|
2805
4352
|
constructor(config) {
|
|
2806
4353
|
super();
|
|
2807
4354
|
this.config = config;
|
|
4355
|
+
this.i18n = createI18n({ language: config.language, isSocial: config.isSocial });
|
|
2808
4356
|
this.state = createInitialState(config);
|
|
2809
4357
|
this.styleEl = document.createElement('style');
|
|
2810
4358
|
this.styleEl.textContent = SHELL_CSS;
|
|
@@ -2820,12 +4368,54 @@ class GameShell extends EventEmitter {
|
|
|
2820
4368
|
this.prevWin = this.state.win;
|
|
2821
4369
|
this.observeLayout();
|
|
2822
4370
|
if (typeof document !== 'undefined') {
|
|
2823
|
-
|
|
4371
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4372
|
+
const shell = this;
|
|
4373
|
+
const host = {
|
|
4374
|
+
get state() { return shell.state; },
|
|
4375
|
+
get hotkeysEnabled() { return shell.config.features.hotkeys !== false; },
|
|
4376
|
+
get spacebarEnabled() { return shell.config.features.spacebar !== false; },
|
|
4377
|
+
get turboLevels() { return shell.config.features.turbo; },
|
|
4378
|
+
get autoplayEnabled() { return shell.config.features.autoplay != null; },
|
|
4379
|
+
get buyBonusEnabled() { return shell.config.features.buyBonus !== false; },
|
|
4380
|
+
hasOpenLayer: () => shell.modalHost.childElementCount > 0,
|
|
4381
|
+
routeToLayer: (e) => shell.modalOnKey?.(e) ?? false,
|
|
4382
|
+
spin: () => shell.emit('spin'),
|
|
4383
|
+
stepBet: (dir) => {
|
|
4384
|
+
const next = stepBet(shell.state, dir);
|
|
4385
|
+
if (next === shell.state.bet)
|
|
4386
|
+
return;
|
|
4387
|
+
shell.state.bet = next;
|
|
4388
|
+
shell.emit('betChange', next);
|
|
4389
|
+
shell.render();
|
|
4390
|
+
},
|
|
4391
|
+
toggleAutoplay: () => {
|
|
4392
|
+
if (shell.state.autoplay.active) {
|
|
4393
|
+
shell.state.autoplay = { active: false, remaining: 0 };
|
|
4394
|
+
shell.emit('autoplayStop');
|
|
4395
|
+
shell.render();
|
|
4396
|
+
}
|
|
4397
|
+
else {
|
|
4398
|
+
shell.openAutoplayPicker();
|
|
4399
|
+
}
|
|
4400
|
+
},
|
|
4401
|
+
cycleTurbo: () => {
|
|
4402
|
+
const next = nextTurbo(shell.state.turbo, shell.config.features.turbo);
|
|
4403
|
+
shell.state.turbo = next;
|
|
4404
|
+
shell.emit('turboChange', next);
|
|
4405
|
+
shell.render();
|
|
4406
|
+
},
|
|
4407
|
+
openBuyBonus: () => shell.openBuyBonus(),
|
|
4408
|
+
openInfo: () => shell.openInfo(),
|
|
4409
|
+
openMenu: () => shell.openMenu(),
|
|
4410
|
+
toggleMute: () => shell.setSound(!shell.soundOn),
|
|
4411
|
+
closeLayer: () => shell.closeModal(),
|
|
4412
|
+
};
|
|
4413
|
+
this.kbd = new KeyboardController(host);
|
|
4414
|
+
this.kbd.attach();
|
|
2824
4415
|
// Stake serves the game in an iframe; on first paint focus is on the HOST page, so a `document`
|
|
2825
4416
|
// keydown never fires and Space scrolls the parent. Pull window focus into the iframe on the
|
|
2826
4417
|
// first pointer interaction so the spacebar shortcut works. Harmless on full-page Energy8.
|
|
2827
4418
|
document.addEventListener('pointerdown', this.pullFocus, true);
|
|
2828
|
-
this.keysBound = true;
|
|
2829
4419
|
}
|
|
2830
4420
|
this.render();
|
|
2831
4421
|
// re-fit once the bundled webfont swaps in (text metrics change → row width changes)
|
|
@@ -2928,46 +4518,32 @@ class GameShell extends EventEmitter {
|
|
|
2928
4518
|
zoomBar(s * (bar.clientWidth / bar.scrollWidth));
|
|
2929
4519
|
}
|
|
2930
4520
|
}
|
|
2931
|
-
/** Spacebar starts a spin — same path as the spin disc. Ignored when `features.spacebar` is
|
|
2932
|
-
* false, while a spin is running, while autoplay is active, outside base mode, when an
|
|
2933
|
-
* overlay/modal is open, or when an editable element is focused. `repeat` (held key) is
|
|
2934
|
-
* ignored so it can't spam. */
|
|
2935
4521
|
/** Pull window focus into the iframe on first pointer interaction so `document` keydown (the
|
|
2936
4522
|
* spacebar shortcut) fires. No-op / harmless when already focused or full-page. */
|
|
2937
4523
|
pullFocus = () => { try {
|
|
2938
4524
|
window.focus();
|
|
2939
4525
|
}
|
|
2940
4526
|
catch { /* cross-origin / non-browser */ } };
|
|
2941
|
-
handleKeyDown = (e) => {
|
|
2942
|
-
if (this.destroyed || e.code !== 'Space' || e.repeat)
|
|
2943
|
-
return;
|
|
2944
|
-
if (this.config.features.spacebar === false)
|
|
2945
|
-
return; // shortcut disabled (e.g. jurisdiction)
|
|
2946
|
-
const t = e.target;
|
|
2947
|
-
if (t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))
|
|
2948
|
-
return;
|
|
2949
|
-
// Space is ours now — swallow the browser default before any no-op bail. Otherwise the
|
|
2950
|
-
// native "Space activates the focused button" still fires and re-clicks whichever shell
|
|
2951
|
-
// <button> (menu/buy/auto) opened the overlay, tearing down + rebuilding the modal: a
|
|
2952
|
-
// visible flicker. (Also stops the page from scrolling on Space.)
|
|
2953
|
-
e.preventDefault();
|
|
2954
|
-
if (this.modalHost.childElementCount > 0)
|
|
2955
|
-
return; // an overlay/modal is open
|
|
2956
|
-
if (this.state.mode !== 'base' || this.state.busy || this.state.autoplay.active)
|
|
2957
|
-
return;
|
|
2958
|
-
this.emit('spin');
|
|
2959
|
-
};
|
|
2960
4527
|
setLayout(layout) {
|
|
2961
4528
|
if (layout === this.layout)
|
|
2962
4529
|
return;
|
|
2963
4530
|
this.layout = layout;
|
|
2964
4531
|
this.render();
|
|
2965
4532
|
}
|
|
2966
|
-
/** Resolve a built-in shell string
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
4533
|
+
/** Resolve a built-in shell string through the i18n resolver (translation + optional socialize). */
|
|
4534
|
+
t(text) { return this.i18n.t(text); }
|
|
4535
|
+
/** Toggle the social vocabulary at runtime (rebuilds resolver, re-renders bar). */
|
|
4536
|
+
setSocial(isSocial) {
|
|
4537
|
+
this.config.isSocial = isSocial;
|
|
4538
|
+
this.i18n = createI18n({ language: this.config.language, isSocial });
|
|
4539
|
+
this.render();
|
|
4540
|
+
}
|
|
4541
|
+
/** Swap the active language at runtime (rebuilds resolver, re-renders bar). */
|
|
4542
|
+
setLanguage(lang) {
|
|
4543
|
+
this.config.language = lang;
|
|
4544
|
+
this.i18n = createI18n({ language: lang, isSocial: this.config.isSocial });
|
|
4545
|
+
this.render();
|
|
4546
|
+
}
|
|
2971
4547
|
/** Recolour the shell at runtime (e.g. switch dark/light scheme). */
|
|
2972
4548
|
setTheme(theme) {
|
|
2973
4549
|
this.config.theme = theme;
|
|
@@ -3008,7 +4584,7 @@ class GameShell extends EventEmitter {
|
|
|
3008
4584
|
this.state.mode = mode;
|
|
3009
4585
|
this.render();
|
|
3010
4586
|
}
|
|
3011
|
-
setBusy(busy) { this.state.busy = busy; this.render(); }
|
|
4587
|
+
setBusy(busy) { this.state.busy = busy; this.render(); this.kbd?.notifyBusyChanged(busy); }
|
|
3012
4588
|
setAutoplay(a) { this.state.autoplay = a; this.render(); }
|
|
3013
4589
|
setTurbo(level) { this.state.turbo = level; this.render(); }
|
|
3014
4590
|
/** Currency-aware money formatter for WIN amounts (variable decimals: 0.0041 stays 0.0041, not
|
|
@@ -3016,7 +4592,7 @@ class GameShell extends EventEmitter {
|
|
|
3016
4592
|
formatWin(value) { return formatCurrency(value, this.config.currency, true); }
|
|
3017
4593
|
setBuyBonusEnabled(enabled) { this.state.buyBonusEnabled = enabled; this.render(); }
|
|
3018
4594
|
setFreeSpins(fs) { this.state.freeSpins = fs; this.render(); }
|
|
3019
|
-
showModal(el) {
|
|
4595
|
+
showModal(el, onKey) {
|
|
3020
4596
|
// The control that opened this overlay (menu/buy/auto) keeps DOM focus. Drop it, or a
|
|
3021
4597
|
// stray Space/Enter would natively re-activate that <button> and rebuild the modal — a
|
|
3022
4598
|
// visible flicker. Only relinquish focus we own (a shell control), never the host page's.
|
|
@@ -3025,6 +4601,7 @@ class GameShell extends EventEmitter {
|
|
|
3025
4601
|
active.blur();
|
|
3026
4602
|
this.modalHost.innerHTML = '';
|
|
3027
4603
|
this.modalHost.appendChild(el);
|
|
4604
|
+
this.modalOnKey = onKey;
|
|
3028
4605
|
this.fitModals();
|
|
3029
4606
|
}
|
|
3030
4607
|
/** Uniformly scale every open centred card modal (`.ge-sheet`) down so it fits a short/narrow
|
|
@@ -3077,22 +4654,31 @@ class GameShell extends EventEmitter {
|
|
|
3077
4654
|
}
|
|
3078
4655
|
openMenu() { this.emit('menuOpen'); this.openSettings(); }
|
|
3079
4656
|
openSettings() { this.emit('settingsOpen'); this.showModal(openSettingsModal(this)); }
|
|
3080
|
-
openInfo() { this.emit('infoOpen'); this.showModal(
|
|
4657
|
+
openInfo() { this.emit('infoOpen'); const { root, onKey } = openGameInfoModal(this); this.showModal(root, onKey); }
|
|
3081
4658
|
openBuyBonus() {
|
|
3082
4659
|
if (this.config.onBonusBuy) {
|
|
3083
4660
|
this.config.onBonusBuy();
|
|
3084
4661
|
return;
|
|
3085
4662
|
} // game handles it (own UI)
|
|
3086
|
-
const
|
|
3087
|
-
if (
|
|
3088
|
-
this.showModal(
|
|
4663
|
+
const result = openBuyBonusOverlay(this);
|
|
4664
|
+
if (result)
|
|
4665
|
+
this.showModal(result.root, result.onKey);
|
|
3089
4666
|
}
|
|
3090
4667
|
/** Open a generic, externally-driven modal (title + body + optional action buttons).
|
|
3091
4668
|
* Each action runs its `on` then closes; the ✕ shows when `availableClose` is true. */
|
|
3092
|
-
openModal(opts) { this.showModal(buildModal(opts)); }
|
|
4669
|
+
openModal(opts) { this.showModal(buildModal(opts), opts.onKey); }
|
|
3093
4670
|
/** Programmatically dismiss whatever modal/overlay is currently shown (e.g. auto-close the
|
|
3094
4671
|
* reconnect overlay once the link is restored). No-op when nothing is open. */
|
|
3095
|
-
closeModal() { this.modalHost.innerHTML = ''; }
|
|
4672
|
+
closeModal() { this.modalOnKey = undefined; this.soundRefresh = null; this.modalHost.innerHTML = ''; }
|
|
4673
|
+
/** Flip the shared sound state, notify the game (`settingChange({ key: 'sound' })`), and live-update
|
|
4674
|
+
* the Settings speaker icon if that modal is open. Used by both the Settings toggle and Shift+M. */
|
|
4675
|
+
setSound(on) {
|
|
4676
|
+
this.soundOn = on;
|
|
4677
|
+
this.emit('settingChange', { key: 'sound', value: on });
|
|
4678
|
+
this.soundRefresh?.(on);
|
|
4679
|
+
}
|
|
4680
|
+
/** The Settings modal registers an icon-updater while open (cleared on close). */
|
|
4681
|
+
setSoundRefresh(fn) { this.soundRefresh = fn; }
|
|
3096
4682
|
/** Open the non-dismissable replay summary modal (START REPLAY → onReplay → reopen). */
|
|
3097
4683
|
openReplay(opts) {
|
|
3098
4684
|
if (this.destroyed)
|
|
@@ -3100,19 +4686,18 @@ class GameShell extends EventEmitter {
|
|
|
3100
4686
|
this.showModal(buildReplayModal(this, opts));
|
|
3101
4687
|
}
|
|
3102
4688
|
/** Bet picker — list of available bets with an accent Confirm. */
|
|
3103
|
-
openBetPicker() { this.showModal(
|
|
4689
|
+
openBetPicker() { const { root, onKey } = openBetModal(this); this.showModal(root, onKey); }
|
|
3104
4690
|
/** Autoplay picker — spin-count list; Confirm starts autoplay. */
|
|
3105
|
-
openAutoplayPicker() { this.showModal(
|
|
4691
|
+
openAutoplayPicker() { const { root, onKey } = openAutoplayModal(this); this.showModal(root, onKey); }
|
|
3106
4692
|
destroy() {
|
|
3107
4693
|
if (this.destroyed)
|
|
3108
4694
|
return Promise.resolve();
|
|
3109
4695
|
this.destroyed = true;
|
|
3110
4696
|
this.ro?.disconnect();
|
|
3111
4697
|
this.ro = null;
|
|
3112
|
-
if (
|
|
3113
|
-
|
|
4698
|
+
if (typeof document !== 'undefined') {
|
|
4699
|
+
this.kbd?.detach();
|
|
3114
4700
|
document.removeEventListener('pointerdown', this.pullFocus, true);
|
|
3115
|
-
this.keysBound = false;
|
|
3116
4701
|
}
|
|
3117
4702
|
this.cancelMoneyAnims();
|
|
3118
4703
|
this.removeAllListeners();
|
|
@@ -3159,7 +4744,7 @@ function removeGameShell() {
|
|
|
3159
4744
|
exports.DevBridge = DevBridge;
|
|
3160
4745
|
exports.EventEmitter = EventEmitter;
|
|
3161
4746
|
exports.GameShell = GameShell;
|
|
3162
|
-
exports.LOADER_BAR_MAX_WIDTH = LOADER_BAR_MAX_WIDTH;
|
|
4747
|
+
exports.LOADER_BAR_MAX_WIDTH = LOADER_BAR_MAX_WIDTH$1;
|
|
3163
4748
|
exports.PlatformSession = PlatformSession;
|
|
3164
4749
|
exports.buildLogoSVG = buildLogoSVG;
|
|
3165
4750
|
exports.createCSSPreloader = createCSSPreloader;
|