@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/shell.esm.js
CHANGED
|
@@ -48,6 +48,221 @@ class EventEmitter {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// Bet key detection: bet-up needs Shift for arrow/equal, NumpadAdd is bare; same logic for down.
|
|
52
|
+
// Exported so overlays with their own bet stepper (Buy bonus) honour the SAME keys as the bar.
|
|
53
|
+
function betDir(e) {
|
|
54
|
+
if (e.code === 'ArrowUp' && e.shiftKey)
|
|
55
|
+
return 1;
|
|
56
|
+
if (e.code === 'Equal' && e.shiftKey)
|
|
57
|
+
return 1;
|
|
58
|
+
if (e.code === 'NumpadAdd')
|
|
59
|
+
return 1;
|
|
60
|
+
if (e.code === 'ArrowDown' && e.shiftKey)
|
|
61
|
+
return -1;
|
|
62
|
+
if (e.code === 'Minus' && e.shiftKey)
|
|
63
|
+
return -1;
|
|
64
|
+
if (e.code === 'NumpadSubtract')
|
|
65
|
+
return -1;
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
class KeyboardController {
|
|
69
|
+
host;
|
|
70
|
+
doc;
|
|
71
|
+
spaceHeld = false;
|
|
72
|
+
holdTimer = null;
|
|
73
|
+
// Bet hold-repeat state
|
|
74
|
+
betHeldCode = null;
|
|
75
|
+
betTimer = null;
|
|
76
|
+
constructor(host, doc) {
|
|
77
|
+
this.host = host;
|
|
78
|
+
this.doc = doc ?? (typeof document !== 'undefined' ? document : null);
|
|
79
|
+
}
|
|
80
|
+
isSpinAllowed() {
|
|
81
|
+
const h = this.host;
|
|
82
|
+
const s = h.state;
|
|
83
|
+
return (h.spacebarEnabled &&
|
|
84
|
+
h.hotkeysEnabled &&
|
|
85
|
+
!h.hasOpenLayer() &&
|
|
86
|
+
s.mode === 'base' &&
|
|
87
|
+
!s.autoplay.active);
|
|
88
|
+
}
|
|
89
|
+
isBetAllowed() {
|
|
90
|
+
const h = this.host;
|
|
91
|
+
const s = h.state;
|
|
92
|
+
return (h.hotkeysEnabled &&
|
|
93
|
+
!h.hasOpenLayer() &&
|
|
94
|
+
s.mode === 'base' &&
|
|
95
|
+
!s.busy);
|
|
96
|
+
}
|
|
97
|
+
clearBetTimer() {
|
|
98
|
+
if (this.betTimer !== null) {
|
|
99
|
+
clearTimeout(this.betTimer);
|
|
100
|
+
this.betTimer = null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
startBetRepeat(dir, elapsed) {
|
|
104
|
+
// elapsed is ms already spent holding; use it to accelerate toward 45ms floor.
|
|
105
|
+
// Start at 90ms, decrease ~1ms per 10ms held after the first repeat, floor at 45ms.
|
|
106
|
+
const interval = Math.max(45, 90 - Math.floor(elapsed / 10));
|
|
107
|
+
this.betTimer = setTimeout(() => {
|
|
108
|
+
this.betTimer = null;
|
|
109
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
110
|
+
this.host.stepBet(dir);
|
|
111
|
+
this.startBetRepeat(dir, elapsed + interval);
|
|
112
|
+
}
|
|
113
|
+
}, interval);
|
|
114
|
+
}
|
|
115
|
+
onKeyDown = (e) => {
|
|
116
|
+
const target = e.target;
|
|
117
|
+
// Editable element guard — never intercept keyboard input
|
|
118
|
+
if (target && (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName)))
|
|
119
|
+
return;
|
|
120
|
+
// For Space: claim preventDefault early (before layer/mode/busy bail) so the browser's
|
|
121
|
+
// native "Space activates focused button" can't re-fire a shell control and flicker a modal.
|
|
122
|
+
if (e.code === 'Space' && !e.repeat) {
|
|
123
|
+
if (!this.host.spacebarEnabled || !this.host.hotkeysEnabled)
|
|
124
|
+
return;
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
if (this.host.hasOpenLayer()) {
|
|
127
|
+
this.host.routeToLayer(e);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const s = this.host.state;
|
|
131
|
+
if (s.mode !== 'base' || s.busy || s.autoplay.active)
|
|
132
|
+
return;
|
|
133
|
+
this.spaceHeld = true;
|
|
134
|
+
this.host.spin();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
// Bet step keys (Shift+arrows, Shift+=/-, NumpadAdd/Subtract) — non-repeat only
|
|
138
|
+
if (!e.repeat) {
|
|
139
|
+
const dir = betDir(e);
|
|
140
|
+
if (dir !== null && this.isBetAllowed()) {
|
|
141
|
+
this.betHeldCode = e.code;
|
|
142
|
+
this.host.stepBet(dir);
|
|
143
|
+
// First repeat after 350ms initial delay
|
|
144
|
+
this.clearBetTimer();
|
|
145
|
+
const capturedDir = dir;
|
|
146
|
+
this.betTimer = setTimeout(() => {
|
|
147
|
+
this.betTimer = null;
|
|
148
|
+
if (this.betHeldCode !== null && this.isBetAllowed()) {
|
|
149
|
+
this.host.stepBet(capturedDir);
|
|
150
|
+
this.startBetRepeat(capturedDir, 350);
|
|
151
|
+
}
|
|
152
|
+
}, 350);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Non-Space keys: give the open layer first refusal. If it consumes the key, done; Escape closes
|
|
157
|
+
// it. Anything the layer does NOT consume falls through to the chrome hotkeys below — so the
|
|
158
|
+
// Settings/Info pages still honour Shift+I (Game info), Shift+M (sound), Shift+S, etc.
|
|
159
|
+
if (this.host.hasOpenLayer()) {
|
|
160
|
+
const consumed = this.host.routeToLayer(e);
|
|
161
|
+
if (consumed)
|
|
162
|
+
return;
|
|
163
|
+
if (e.code === 'Escape') {
|
|
164
|
+
this.host.closeLayer();
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
// not consumed → fall through to the Shift+letter chrome hotkeys
|
|
168
|
+
}
|
|
169
|
+
// Shift+letter bar hotkeys — fire when no layer is open, OR when an open layer left the key
|
|
170
|
+
// unconsumed (see fall-through above); gated on hotkeys being enabled.
|
|
171
|
+
if (!e.repeat && e.shiftKey && this.host.hotkeysEnabled) {
|
|
172
|
+
const h = this.host;
|
|
173
|
+
const s = h.state;
|
|
174
|
+
switch (e.code) {
|
|
175
|
+
case 'KeyA':
|
|
176
|
+
if (h.autoplayEnabled && !s.replay) {
|
|
177
|
+
h.toggleAutoplay();
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
case 'KeyT':
|
|
182
|
+
if (h.turboLevels > 0 && !s.replay) {
|
|
183
|
+
h.cycleTurbo();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
case 'KeyB':
|
|
188
|
+
if (h.buyBonusEnabled && s.mode === 'base' && !s.replay) {
|
|
189
|
+
h.openBuyBonus();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case 'KeyI':
|
|
194
|
+
h.openInfo();
|
|
195
|
+
return;
|
|
196
|
+
case 'KeyS':
|
|
197
|
+
h.openMenu();
|
|
198
|
+
return;
|
|
199
|
+
case 'KeyM':
|
|
200
|
+
h.toggleMute();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
onKeyUp = (e) => {
|
|
206
|
+
if (e.code === 'Space') {
|
|
207
|
+
this.spaceHeld = false;
|
|
208
|
+
this.clearHoldTimer();
|
|
209
|
+
}
|
|
210
|
+
// Stop bet repeat on key release
|
|
211
|
+
if (e.code === this.betHeldCode) {
|
|
212
|
+
this.betHeldCode = null;
|
|
213
|
+
this.clearBetTimer();
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
onBlur = () => {
|
|
217
|
+
// Window blur — stop bet repeat AND hold-to-spin (same as releasing both keys)
|
|
218
|
+
this.betHeldCode = null;
|
|
219
|
+
this.clearBetTimer();
|
|
220
|
+
this.spaceHeld = false;
|
|
221
|
+
this.clearHoldTimer();
|
|
222
|
+
};
|
|
223
|
+
clearHoldTimer() {
|
|
224
|
+
if (this.holdTimer !== null) {
|
|
225
|
+
clearTimeout(this.holdTimer);
|
|
226
|
+
this.holdTimer = null;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
attach() {
|
|
230
|
+
this.doc.addEventListener('keydown', this.onKeyDown);
|
|
231
|
+
this.doc.addEventListener('keyup', this.onKeyUp);
|
|
232
|
+
// Use window if available for blur events
|
|
233
|
+
if (typeof window !== 'undefined') {
|
|
234
|
+
window.addEventListener('blur', this.onBlur);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
detach() {
|
|
238
|
+
this.doc.removeEventListener('keydown', this.onKeyDown);
|
|
239
|
+
this.doc.removeEventListener('keyup', this.onKeyUp);
|
|
240
|
+
if (typeof window !== 'undefined') {
|
|
241
|
+
window.removeEventListener('blur', this.onBlur);
|
|
242
|
+
}
|
|
243
|
+
this.spaceHeld = false;
|
|
244
|
+
this.clearHoldTimer();
|
|
245
|
+
this.betHeldCode = null;
|
|
246
|
+
this.clearBetTimer();
|
|
247
|
+
}
|
|
248
|
+
notifyBusyChanged(busy) {
|
|
249
|
+
if (busy)
|
|
250
|
+
return;
|
|
251
|
+
if (!this.spaceHeld)
|
|
252
|
+
return;
|
|
253
|
+
if (!this.isSpinAllowed())
|
|
254
|
+
return;
|
|
255
|
+
// Schedule the next spin after the 120 ms floor (gap between completion and next spin).
|
|
256
|
+
this.clearHoldTimer();
|
|
257
|
+
this.holdTimer = setTimeout(() => {
|
|
258
|
+
this.holdTimer = null;
|
|
259
|
+
if (this.spaceHeld && this.isSpinAllowed()) {
|
|
260
|
+
this.host.spin();
|
|
261
|
+
}
|
|
262
|
+
}, 120);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
51
266
|
function createInitialState(config) {
|
|
52
267
|
return {
|
|
53
268
|
mode: config.mode,
|
|
@@ -317,6 +532,21 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
317
532
|
#${SHELL_ROOT_ID} .ge-gi-version { text-align:center; color:var(--shell-muted); font-size:11px;
|
|
318
533
|
letter-spacing:.08em; opacity:.7; margin:4px 0 2px; }
|
|
319
534
|
|
|
535
|
+
/* hotkeys — keycap chips → localized action label, mirrors controls row layout */
|
|
536
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-block { display:flex; flex-direction:column; }
|
|
537
|
+
#${SHELL_ROOT_ID} .ge-gi-hk { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; }
|
|
538
|
+
#${SHELL_ROOT_ID} .ge-gi-hk + .ge-gi-hk { border-top:1px solid var(--shell-plaque-line); }
|
|
539
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chips { display:flex; align-items:center; flex-wrap:wrap; gap:4px; flex:0 0 auto; }
|
|
540
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-combo { display:inline-flex; align-items:center; gap:4px; }
|
|
541
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-chip { display:inline-flex; align-items:center; justify-content:center;
|
|
542
|
+
padding:2px 7px; border-radius:6px; border:1px solid var(--shell-plaque-line);
|
|
543
|
+
background:var(--shell-plaque-dark); color:#fff;
|
|
544
|
+
font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:12px;
|
|
545
|
+
font-weight:600; line-height:1.5; white-space:nowrap; min-width:1.6em; text-align:center; }
|
|
546
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep { color:var(--shell-plaque-label); font-size:11px; padding:0 1px; }
|
|
547
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-sep2 { color:var(--shell-plaque-label); font-size:11px; padding:0 4px; }
|
|
548
|
+
#${SHELL_ROOT_ID} .ge-gi-hk-tx { color:rgba(255,255,255,.88); font-size:14px; font-weight:600; text-align:right; flex:1; }
|
|
549
|
+
|
|
320
550
|
/* controls — two blocks (gameplay / menu & info), icon/name/description per control */
|
|
321
551
|
#${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); }
|
|
322
552
|
#${SHELL_ROOT_ID} .ge-gi-ctl-block-h { color:var(--shell-plaque-label); font-size:11px; letter-spacing:.12em;
|
|
@@ -411,20 +641,26 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
411
641
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-body { max-width:none; padding:clamp(6px,2.5cqh,16px) clamp(12px,3vw,28px); }
|
|
412
642
|
#${SHELL_ROOT_ID} .ge-bb-grid { display:flex; gap:14px; justify-content:safe center; overflow-x:auto; overflow-y:hidden; padding-bottom:6px;
|
|
413
643
|
scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
|
|
414
|
-
/* the one knob that scales the whole card
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
644
|
+
/* the one knob that scales the whole card (its whole layout is em-relative). It is the SMALLER of two
|
|
645
|
+
fits, so the card is always fully visible:
|
|
646
|
+
• 3.4cqh — height: the card stays inside the band between the header and the bet footer (cqh
|
|
647
|
+
measures the overlay popout frame, not the browser window);
|
|
648
|
+
• 84cqw / (N*18) — width: the N cards (each 18em) fit the frame width side-by-side instead of
|
|
649
|
+
overflowing into an X-scroll. --ge-bb-n is the live card count, set in BuyBonus.ts.
|
|
650
|
+
Floor is deliberately tiny: on a 400×225 popout a fully visible card beats a bigger clipped one. */
|
|
418
651
|
#${SHELL_ROOT_ID} .ge-bb-grid .ge-bonus-card { flex:0 0 18em; scroll-snap-align:start;
|
|
419
|
-
font-size:clamp(4px, 3.4cqh, 12px); }
|
|
420
|
-
/* mobile: vertical stack at a fixed, readable size — scroll the list
|
|
652
|
+
font-size:clamp(4px, min(3.4cqh, calc(84cqw / (var(--ge-bb-n,3) * 18))), 12px); }
|
|
653
|
+
/* mobile: vertical stack at a fixed, readable size — scroll the list; only shrink if the card would
|
|
654
|
+
be wider than the frame (very narrow viewport), so it never overflows horizontally. */
|
|
421
655
|
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid { display:flex; flex-direction:column; gap:14px; overflow:visible; }
|
|
422
|
-
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:12px; }
|
|
656
|
+
#${SHELL_ROOT_ID}.ge-mobile .ge-bb-grid .ge-bonus-card { flex:0 0 auto; font-size:min(12px, calc(92cqw / 18)); }
|
|
423
657
|
#${SHELL_ROOT_ID} .ge-bonus-card { display:flex; flex-direction:column; border-radius:1.4em; overflow:hidden;
|
|
424
658
|
background:var(--shell-plaque-glass); border:1px solid var(--shell-plaque-line); color:#fff; text-align:center;
|
|
425
659
|
pointer-events:auto; cursor:pointer; transition:box-shadow .12s ease, background .12s ease; }
|
|
426
660
|
#${SHELL_ROOT_ID} .ge-bonus-card:hover:not(.ge-bonus-off) {
|
|
427
661
|
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
662
|
+
#${SHELL_ROOT_ID} .ge-bonus-card--kbd-focus:not(.ge-bonus-off) {
|
|
663
|
+
box-shadow:0 0 0 1px var(--card-acc), 0 12px 34px -12px var(--card-acc); }
|
|
428
664
|
/* custom card (BonusOption.custom): keep grid sizing + accent vars, drop the default chrome so the game owns the UI */
|
|
429
665
|
#${SHELL_ROOT_ID} .ge-bonus-card--custom { background:none; border:none; cursor:default; }
|
|
430
666
|
#${SHELL_ROOT_ID} .ge-bonus-body { display:flex; flex-direction:column; align-items:center; flex:1; padding:1.25em 1.1em .9em; }
|
|
@@ -480,13 +716,15 @@ const SHELL_CSS = SHELL_FONT_CSS + `
|
|
|
480
716
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-spacer { width:clamp(24px,7cqh,32px); }
|
|
481
717
|
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-ov-nav { width:clamp(24px,7cqh,32px); height:clamp(24px,7cqh,32px);
|
|
482
718
|
font-size:clamp(14px,4cqh,18px); border-radius:clamp(7px,2cqh,9px); }
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
486
|
-
|
|
487
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-
|
|
488
|
-
|
|
489
|
-
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval
|
|
719
|
+
/* the bet pill read too large next to the shrunk cards — size it ~0.8× across the board (the floors
|
|
720
|
+
stay readable; the maxima are what dominate on Popout L / wide frames). */
|
|
721
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betbar { padding:clamp(2px,.75cqh,3px); }
|
|
722
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betpill { padding:clamp(2px,.55cqh,3px) clamp(3px,.9cqh,4px); }
|
|
723
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betstep { width:clamp(20px,5.7cqh,26px); height:clamp(20px,5.7cqh,26px);
|
|
724
|
+
font-size:clamp(12px,3.5cqh,16px); }
|
|
725
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval { min-width:clamp(50px,14cqh,66px); }
|
|
726
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval b { font-size:clamp(9px,2.5cqh,11px); }
|
|
727
|
+
#${SHELL_ROOT_ID} [data-ge="buybonus-overlay"] .ge-bb-betval span { font-size:clamp(5px,1.25cqh,6px); }
|
|
490
728
|
|
|
491
729
|
/* ═══ base/wide plaque bar — grouped dark + glass panels (reference-style) ═══ */
|
|
492
730
|
#${SHELL_ROOT_ID} .ge-zone-plaques { gap:0; } /* panels connect; buttons overlap */
|
|
@@ -703,7 +941,8 @@ function createCardModal(opts) {
|
|
|
703
941
|
}
|
|
704
942
|
return { root, card, body };
|
|
705
943
|
}
|
|
706
|
-
/** Full-screen overlay. Returns { root, body }; append content to body.
|
|
944
|
+
/** Full-screen overlay. Returns { root, body, scroll }; append content to body.
|
|
945
|
+
* The `scroll` element is the scrollable container (overflow-y: auto). */
|
|
707
946
|
function createOverlay(opts) {
|
|
708
947
|
const root = document.createElement('div');
|
|
709
948
|
root.className = 'ge-shell-overlay';
|
|
@@ -741,7 +980,7 @@ function createOverlay(opts) {
|
|
|
741
980
|
body.className = 'ge-ov-body';
|
|
742
981
|
scroll.appendChild(body);
|
|
743
982
|
root.append(head, scroll);
|
|
744
|
-
return { root, body };
|
|
983
|
+
return { root, body, scroll };
|
|
745
984
|
}
|
|
746
985
|
|
|
747
986
|
/** A floating labelled money readout (balance/win/bet). */
|
|
@@ -993,24 +1232,22 @@ function applyBusy(shell, bar) {
|
|
|
993
1232
|
function openSettingsModal(shell) {
|
|
994
1233
|
const { root, body } = createOverlay({ title: shell.t('Settings'), onClose: () => root.remove() });
|
|
995
1234
|
root.dataset.ge = 'settings-modal';
|
|
996
|
-
// Sound on/off
|
|
1235
|
+
// Sound on/off — backed by the shell's shared `soundOn` state so this toggle and the Shift+M
|
|
1236
|
+
// hotkey stay in sync; `setSound` emits `settingChange({ key: 'sound' })` and refreshes the icon.
|
|
997
1237
|
const sound = (() => {
|
|
998
|
-
let on = true;
|
|
999
1238
|
const btn = document.createElement('button');
|
|
1000
|
-
btn.className = 'ge-snd
|
|
1239
|
+
btn.className = 'ge-snd';
|
|
1001
1240
|
btn.dataset.ge = 'setting-sound';
|
|
1002
|
-
btn.setAttribute('aria-label', 'Sound');
|
|
1003
|
-
const paint = () => {
|
|
1241
|
+
btn.setAttribute('aria-label', shell.t('Sound'));
|
|
1242
|
+
const paint = (on) => {
|
|
1004
1243
|
btn.innerHTML = icon(on ? 'soundOn' : 'soundOff');
|
|
1005
1244
|
btn.classList.toggle('ge-active', on);
|
|
1006
1245
|
btn.setAttribute('aria-pressed', String(on));
|
|
1007
1246
|
};
|
|
1008
|
-
paint();
|
|
1009
|
-
btn.addEventListener('click', () =>
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
shell.emit('settingChange', { key: 'sound', value: on });
|
|
1013
|
-
});
|
|
1247
|
+
paint(shell.soundOn);
|
|
1248
|
+
btn.addEventListener('click', () => shell.setSound(!shell.soundOn));
|
|
1249
|
+
// Live-update the icon when sound changes from here OR via Shift+M (shell clears on close).
|
|
1250
|
+
shell.setSoundRefresh(paint);
|
|
1014
1251
|
const row = document.createElement('div');
|
|
1015
1252
|
row.className = 'ge-ov-row';
|
|
1016
1253
|
row.innerHTML = `<span class="ge-grow">${shell.t('Sound')}</span>`;
|
|
@@ -1060,17 +1297,25 @@ function openSettingsModal(shell) {
|
|
|
1060
1297
|
|
|
1061
1298
|
// AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
|
|
1062
1299
|
/** The @energy8platform/platform-core package version, stamped at build time. */
|
|
1063
|
-
const PACKAGE_VERSION = '0.
|
|
1300
|
+
const PACKAGE_VERSION = '0.26.1';
|
|
1064
1301
|
|
|
1302
|
+
/** Default order key for the auto-injected hotkeys section: just after `controls` (-1). */
|
|
1303
|
+
const HOTKEYS_DEFAULT_ORDER = -0.5;
|
|
1065
1304
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
1066
1305
|
function openGameInfoModal(shell) {
|
|
1067
|
-
const { root, body } = createOverlay({
|
|
1306
|
+
const { root, body, scroll } = createOverlay({
|
|
1068
1307
|
title: shell.t('Game info'),
|
|
1069
1308
|
onClose: () => root.remove(),
|
|
1070
1309
|
onBack: () => { root.remove(); shell.openSettings(); },
|
|
1071
1310
|
});
|
|
1072
1311
|
root.dataset.ge = 'info-modal';
|
|
1073
|
-
const
|
|
1312
|
+
const rawSections = shell.config.gameInfo.sections ?? [];
|
|
1313
|
+
// Auto-inject a hotkeys section unless the game already provides one or features.hotkeys === false.
|
|
1314
|
+
const sectionsWithHotkeys = [...rawSections];
|
|
1315
|
+
if (shell.config.features.hotkeys !== false && !rawSections.some((s) => s.type === 'hotkeys')) {
|
|
1316
|
+
sectionsWithHotkeys.push({ type: 'hotkeys', order: HOTKEYS_DEFAULT_ORDER });
|
|
1317
|
+
}
|
|
1318
|
+
const sections = sectionsWithHotkeys;
|
|
1074
1319
|
// Default placement: modes first, controls second, the rest in declaration order.
|
|
1075
1320
|
// An explicit `order` overrides; ties keep declaration order (stable).
|
|
1076
1321
|
const base = (s, i) => s.order ?? (s.type === 'modes' ? -2 : s.type === 'controls' ? -1 : i);
|
|
@@ -1079,7 +1324,40 @@ function openGameInfoModal(shell) {
|
|
|
1079
1324
|
.sort((a, b) => a.k - b.k || a.i - b.i)
|
|
1080
1325
|
.forEach(({ s }) => body.appendChild(renderSection(shell, s)));
|
|
1081
1326
|
body.appendChild(versionFooter(shell));
|
|
1082
|
-
|
|
1327
|
+
const LINE = 60;
|
|
1328
|
+
const PAGE = () => Math.floor(scroll.clientHeight * 0.9) || Math.floor(540 * 0.9);
|
|
1329
|
+
const onKey = (e) => {
|
|
1330
|
+
switch (e.code) {
|
|
1331
|
+
case 'ArrowDown':
|
|
1332
|
+
scroll.scrollTop += LINE;
|
|
1333
|
+
return true;
|
|
1334
|
+
case 'ArrowUp':
|
|
1335
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - LINE);
|
|
1336
|
+
return true;
|
|
1337
|
+
case 'PageDown':
|
|
1338
|
+
scroll.scrollTop += PAGE();
|
|
1339
|
+
return true;
|
|
1340
|
+
case 'PageUp':
|
|
1341
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
1342
|
+
return true;
|
|
1343
|
+
case 'Space':
|
|
1344
|
+
if (e.shiftKey) {
|
|
1345
|
+
scroll.scrollTop = Math.max(0, scroll.scrollTop - PAGE());
|
|
1346
|
+
}
|
|
1347
|
+
else {
|
|
1348
|
+
scroll.scrollTop += PAGE();
|
|
1349
|
+
}
|
|
1350
|
+
return true;
|
|
1351
|
+
case 'Home':
|
|
1352
|
+
scroll.scrollTop = 0;
|
|
1353
|
+
return true;
|
|
1354
|
+
case 'End':
|
|
1355
|
+
scroll.scrollTop = scroll.scrollHeight - scroll.clientHeight;
|
|
1356
|
+
return true;
|
|
1357
|
+
default: return false;
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1360
|
+
return { root, onKey };
|
|
1083
1361
|
}
|
|
1084
1362
|
/** A muted version stamp pinned to the bottom of the game-info modal:
|
|
1085
1363
|
* `${config.version ?? '1.0.0'}.${engine version without dots}` (e.g. '1.0.0.0246'). */
|
|
@@ -1095,9 +1373,11 @@ function renderSection(shell, s) {
|
|
|
1095
1373
|
switch (s.type) {
|
|
1096
1374
|
case 'modes': return sectionModes(shell, s.modes, sec('info-modes', s.title, shell.t('Modes')));
|
|
1097
1375
|
case 'controls': return sectionControls(shell, sec('info-controls', s.title, shell.t('Controls')));
|
|
1376
|
+
case 'hotkeys': return sectionHotkeys(shell, sec('info-hotkeys', s.title, shell.t('Hotkeys')));
|
|
1098
1377
|
case 'paytable': return sectionPaytable(s.rows, sec('info-paytable', s.title, shell.t('Paytable')));
|
|
1099
1378
|
case 'wins': return sectionWins(s, sec('info-wins', s.title, shell.t(winFallbackTitle(s.kind))));
|
|
1100
|
-
|
|
1379
|
+
// Translate the heading (e.g. the host-built DISCLAIMER title); the body stays verbatim.
|
|
1380
|
+
case 'custom': return sectionCustom(s, sec('info-custom', s.title != null ? shell.t(s.title) : undefined, ''));
|
|
1101
1381
|
}
|
|
1102
1382
|
}
|
|
1103
1383
|
/** A titled glass-plaque section shell. */
|
|
@@ -1179,6 +1459,57 @@ function ctlBlock(shell, label, rows) {
|
|
|
1179
1459
|
}
|
|
1180
1460
|
return block;
|
|
1181
1461
|
}
|
|
1462
|
+
function sectionHotkeys(shell, el) {
|
|
1463
|
+
const { features } = shell.config;
|
|
1464
|
+
/** Render one or more key names as keycap chips joined by " / ". */
|
|
1465
|
+
const chips = (...keys) => keys.map((k) => `<span class="ge-gi-hk-chip">${k}</span>`).join('<span class="ge-gi-hk-sep"> / </span>');
|
|
1466
|
+
const rows = [
|
|
1467
|
+
{ chips: ['Space'], name: 'Spin', on: true },
|
|
1468
|
+
{ chips: ['Shift', '↑', 'Shift', '='], name: 'Raise bet', on: true },
|
|
1469
|
+
{ chips: ['Shift', '↓', 'Shift', '-'], name: 'Lower bet', on: true },
|
|
1470
|
+
{ chips: ['Shift', 'A'], name: 'Autoplay', on: features.autoplay != null },
|
|
1471
|
+
{ chips: ['Shift', 'T'], name: 'Turbo', on: features.turbo > 0 },
|
|
1472
|
+
{ chips: ['Shift', 'B'], name: 'Buy bonus', on: features.buyBonus !== false },
|
|
1473
|
+
{ chips: ['Shift', 'I'], name: 'Game info', on: true },
|
|
1474
|
+
{ chips: ['Shift', 'S'], name: 'Menu', on: true },
|
|
1475
|
+
{ chips: ['Shift', 'M'], name: 'Mute', on: true },
|
|
1476
|
+
{ chips: ['←', '→'], name: 'Navigate', on: true },
|
|
1477
|
+
{ chips: ['Enter'], name: 'Confirm', on: true },
|
|
1478
|
+
{ chips: ['Esc'], name: 'Close', on: true },
|
|
1479
|
+
];
|
|
1480
|
+
const block = document.createElement('div');
|
|
1481
|
+
block.className = 'ge-gi-hk-block';
|
|
1482
|
+
for (const r of rows.filter((x) => x.on)) {
|
|
1483
|
+
const row = document.createElement('div');
|
|
1484
|
+
row.className = 'ge-gi-hk';
|
|
1485
|
+
// Build the chips column
|
|
1486
|
+
const chipsEl = document.createElement('div');
|
|
1487
|
+
chipsEl.className = 'ge-gi-hk-chips';
|
|
1488
|
+
if (r.name === 'Raise bet' || r.name === 'Lower bet') {
|
|
1489
|
+
// Two combos separated by " / ": Shift+↑ / Shift+= and Shift+↓ / Shift+-
|
|
1490
|
+
const [k1, k2, k3, k4] = r.chips;
|
|
1491
|
+
chipsEl.innerHTML =
|
|
1492
|
+
`<span class="ge-gi-hk-combo">${chips(k1, k2)}</span>` +
|
|
1493
|
+
`<span class="ge-gi-hk-sep2"> / </span>` +
|
|
1494
|
+
`<span class="ge-gi-hk-combo">${chips(k3, k4)}</span>`;
|
|
1495
|
+
}
|
|
1496
|
+
else if (r.chips.length > 1) {
|
|
1497
|
+
// Chord: Shift + X
|
|
1498
|
+
chipsEl.innerHTML = `<span class="ge-gi-hk-combo">${chips(...r.chips)}</span>`;
|
|
1499
|
+
}
|
|
1500
|
+
else {
|
|
1501
|
+
chipsEl.innerHTML = chips(...r.chips);
|
|
1502
|
+
}
|
|
1503
|
+
const tx = document.createElement('div');
|
|
1504
|
+
tx.className = 'ge-gi-hk-tx';
|
|
1505
|
+
tx.textContent = shell.t(r.name);
|
|
1506
|
+
row.appendChild(chipsEl);
|
|
1507
|
+
row.appendChild(tx);
|
|
1508
|
+
block.appendChild(row);
|
|
1509
|
+
}
|
|
1510
|
+
el.appendChild(block);
|
|
1511
|
+
return el;
|
|
1512
|
+
}
|
|
1182
1513
|
// ── paytable (cards — image on top, name, then win tiers "<count> x<mult>") ────
|
|
1183
1514
|
function sectionPaytable(rows, el) {
|
|
1184
1515
|
const grid = document.createElement('div');
|
|
@@ -1377,25 +1708,168 @@ function sectionCustom(s, el) {
|
|
|
1377
1708
|
return el;
|
|
1378
1709
|
}
|
|
1379
1710
|
|
|
1380
|
-
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
1711
|
+
/** Buy-bonus overlay — a grid of art-forward cards, one per option.
|
|
1712
|
+
* Returns the overlay element + a keyboard handler for the shell's `showModal`. */
|
|
1381
1713
|
function openBuyBonusOverlay(shell) {
|
|
1382
1714
|
const bonuses = shell.config.features.buyBonus;
|
|
1383
1715
|
if (bonuses === false || bonuses.length === 0)
|
|
1384
1716
|
return null;
|
|
1385
|
-
const
|
|
1717
|
+
const st = { focusIndex: -1, confirmBonus: undefined };
|
|
1718
|
+
const { root, body } = createOverlay({ title: shell.t('Buy bonus'), onClose: () => shell.closeModal() });
|
|
1386
1719
|
root.dataset.ge = 'buybonus-overlay';
|
|
1387
1720
|
// Re-render the grid whenever the bet changes so every card's price stays live.
|
|
1388
1721
|
const renderGrid = () => {
|
|
1389
1722
|
body.innerHTML = '';
|
|
1390
1723
|
const grid = document.createElement('div');
|
|
1391
1724
|
grid.className = 'ge-bb-grid';
|
|
1392
|
-
|
|
1393
|
-
|
|
1725
|
+
// Card count drives the width-fit clamp in CSS (each card is 18em; N cards must fit the frame
|
|
1726
|
+
// width), so the row scales to the available width instead of overflowing into an X-scroll.
|
|
1727
|
+
grid.style.setProperty('--ge-bb-n', String(bonuses.length));
|
|
1728
|
+
const affordable = [];
|
|
1729
|
+
for (const bonus of bonuses) {
|
|
1730
|
+
const card = buildCard(shell, bonus, root, st);
|
|
1731
|
+
grid.appendChild(card);
|
|
1732
|
+
if (isAffordable(shell, bonus))
|
|
1733
|
+
affordable.push(bonus);
|
|
1734
|
+
}
|
|
1394
1735
|
body.appendChild(grid);
|
|
1736
|
+
// Initialize or restore focus index
|
|
1737
|
+
if (affordable.length > 0) {
|
|
1738
|
+
if (st.focusIndex < 0)
|
|
1739
|
+
st.focusIndex = 0;
|
|
1740
|
+
else
|
|
1741
|
+
st.focusIndex = Math.min(st.focusIndex, affordable.length - 1);
|
|
1742
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1743
|
+
}
|
|
1744
|
+
else {
|
|
1745
|
+
st.focusIndex = -1;
|
|
1746
|
+
}
|
|
1395
1747
|
};
|
|
1396
1748
|
renderGrid();
|
|
1397
1749
|
root.appendChild(buildBetBar(shell, renderGrid)); // thin bottom footer, only as tall as the pill
|
|
1398
|
-
|
|
1750
|
+
/** Step the bet by `dir` and re-render the grid (live prices + affordability) when it changed.
|
|
1751
|
+
* Shared by the keyboard bet keys (the footer ± buttons keep their own copy). */
|
|
1752
|
+
const stepBetBy = (dir) => {
|
|
1753
|
+
const next = stepBet(shell.state, dir);
|
|
1754
|
+
if (next === shell.state.bet)
|
|
1755
|
+
return;
|
|
1756
|
+
shell.state.bet = next;
|
|
1757
|
+
shell.emit('betChange', next);
|
|
1758
|
+
shell.render();
|
|
1759
|
+
renderGrid();
|
|
1760
|
+
};
|
|
1761
|
+
/** Keyboard handler for both browse and confirm phases. */
|
|
1762
|
+
const onKey = (e) => {
|
|
1763
|
+
const affordable = bonuses.filter((b) => isAffordable(shell, b));
|
|
1764
|
+
// ── Confirm phase ──
|
|
1765
|
+
if (st.confirmBonus) {
|
|
1766
|
+
switch (e.code) {
|
|
1767
|
+
case 'Enter':
|
|
1768
|
+
case 'Space': {
|
|
1769
|
+
const bonus = st.confirmBonus;
|
|
1770
|
+
if (!isAffordable(shell, bonus))
|
|
1771
|
+
return true;
|
|
1772
|
+
if (bonus.type === 'feature')
|
|
1773
|
+
shell.activateFeature(bonus);
|
|
1774
|
+
else
|
|
1775
|
+
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
1776
|
+
shell.closeModal();
|
|
1777
|
+
return true;
|
|
1778
|
+
}
|
|
1779
|
+
case 'Escape':
|
|
1780
|
+
// Remove the confirm dialog, return to browse
|
|
1781
|
+
closeConfirm(root, st);
|
|
1782
|
+
return true;
|
|
1783
|
+
default:
|
|
1784
|
+
return false;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
// ── Browse phase ──
|
|
1788
|
+
const last = affordable.length - 1;
|
|
1789
|
+
const mobile = shell.layout === 'mobile';
|
|
1790
|
+
// Bet stepping mirrors the bar's keys (Shift+↑/↓, Shift+=/-, Numpad ±). Checked BEFORE arrow
|
|
1791
|
+
// navigation so a bare arrow still moves card focus while a Shift+arrow changes the bet.
|
|
1792
|
+
const bet = betDir(e);
|
|
1793
|
+
if (bet !== null) {
|
|
1794
|
+
stepBetBy(bet);
|
|
1795
|
+
return true;
|
|
1796
|
+
}
|
|
1797
|
+
// Determine navigation direction from key code + layout (mobile uses vertical arrows)
|
|
1798
|
+
const fwdKey = e.code === 'ArrowRight' || (mobile && e.code === 'ArrowDown');
|
|
1799
|
+
const bwdKey = e.code === 'ArrowLeft' || (mobile && e.code === 'ArrowUp');
|
|
1800
|
+
if (fwdKey) {
|
|
1801
|
+
if (last < 0)
|
|
1802
|
+
return true;
|
|
1803
|
+
if (st.focusIndex < last) {
|
|
1804
|
+
st.focusIndex++;
|
|
1805
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1806
|
+
}
|
|
1807
|
+
return true;
|
|
1808
|
+
}
|
|
1809
|
+
if (bwdKey) {
|
|
1810
|
+
if (last < 0)
|
|
1811
|
+
return true;
|
|
1812
|
+
if (st.focusIndex > 0) {
|
|
1813
|
+
st.focusIndex--;
|
|
1814
|
+
applyFocusClass(root, bonuses, affordable, st.focusIndex);
|
|
1815
|
+
}
|
|
1816
|
+
return true;
|
|
1817
|
+
}
|
|
1818
|
+
switch (e.code) {
|
|
1819
|
+
case 'Enter':
|
|
1820
|
+
case 'Space':
|
|
1821
|
+
if (last < 0 || st.focusIndex < 0)
|
|
1822
|
+
return true;
|
|
1823
|
+
{
|
|
1824
|
+
const bonus = affordable[st.focusIndex];
|
|
1825
|
+
openConfirm(shell, bonus, root, st);
|
|
1826
|
+
}
|
|
1827
|
+
return true;
|
|
1828
|
+
// Bare =/- also step the bet (the Shift+=/- and Numpad variants are handled by betDir above).
|
|
1829
|
+
case 'Equal':
|
|
1830
|
+
stepBetBy(1);
|
|
1831
|
+
return true;
|
|
1832
|
+
case 'Minus':
|
|
1833
|
+
stepBetBy(-1);
|
|
1834
|
+
return true;
|
|
1835
|
+
case 'Escape':
|
|
1836
|
+
shell.closeModal();
|
|
1837
|
+
return true;
|
|
1838
|
+
default:
|
|
1839
|
+
return false;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
return { root, onKey };
|
|
1843
|
+
}
|
|
1844
|
+
/** Apply a CSS keyboard-focus class to the currently focused affordable card. */
|
|
1845
|
+
function applyFocusClass(overlay, bonuses, affordable, focusIndex) {
|
|
1846
|
+
for (const b of bonuses) {
|
|
1847
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${b.id}"]`);
|
|
1848
|
+
if (!card)
|
|
1849
|
+
continue;
|
|
1850
|
+
card.classList.remove('ge-bonus-card--kbd-focus');
|
|
1851
|
+
}
|
|
1852
|
+
const focused = affordable[focusIndex];
|
|
1853
|
+
if (!focused)
|
|
1854
|
+
return;
|
|
1855
|
+
const card = overlay.querySelector(`[data-ge="bonus-card-${focused.id}"]`);
|
|
1856
|
+
if (card)
|
|
1857
|
+
card.classList.add('ge-bonus-card--kbd-focus');
|
|
1858
|
+
}
|
|
1859
|
+
/** Open the confirm dialog for the given bonus and track it in overlay state. */
|
|
1860
|
+
function openConfirm(shell, bonus, overlay, st) {
|
|
1861
|
+
closeConfirm(overlay, st); // remove any existing confirm
|
|
1862
|
+
st.confirmBonus = bonus;
|
|
1863
|
+
overlay.appendChild(buildConfirm(shell, bonus, overlay, st));
|
|
1864
|
+
shell.fitModals();
|
|
1865
|
+
}
|
|
1866
|
+
/** Remove the confirm dialog and clear the overlay state. */
|
|
1867
|
+
function closeConfirm(overlay, st) {
|
|
1868
|
+
// The confirm dialog is a .ge-sheet with data-ge="bonus-confirm" appended directly to overlay.
|
|
1869
|
+
const sheet = overlay.querySelector('[data-ge="bonus-confirm"]');
|
|
1870
|
+
if (sheet)
|
|
1871
|
+
sheet.remove();
|
|
1872
|
+
st.confirmBonus = undefined;
|
|
1399
1873
|
}
|
|
1400
1874
|
/** Bet control — a compact −/+ pill around the live stake, in a thin footer at the screen bottom.
|
|
1401
1875
|
* Stepping repaints the value, re-prices the cards, and updates the control bar. */
|
|
@@ -1442,7 +1916,7 @@ function stepButton(ge, name) {
|
|
|
1442
1916
|
}
|
|
1443
1917
|
/** A grid card: title → thumbnail → description → volatility → price → full-bleed CTA.
|
|
1444
1918
|
* Clicking (when affordable) opens the confirmation modal. */
|
|
1445
|
-
function buildCard(shell, bonus, overlay) {
|
|
1919
|
+
function buildCard(shell, bonus, overlay, st) {
|
|
1446
1920
|
const accent = effectiveAccent(bonus);
|
|
1447
1921
|
const card = document.createElement('div');
|
|
1448
1922
|
card.className = 'ge-bonus-card';
|
|
@@ -1455,8 +1929,7 @@ function buildCard(shell, bonus, overlay) {
|
|
|
1455
1929
|
const select = () => {
|
|
1456
1930
|
if (!isAffordable(shell, bonus))
|
|
1457
1931
|
return;
|
|
1458
|
-
|
|
1459
|
-
shell.fitModals();
|
|
1932
|
+
openConfirm(shell, bonus, overlay, st);
|
|
1460
1933
|
};
|
|
1461
1934
|
// Game-supplied card UI: the shell keeps the wrapper (grid sizing + accent vars) and runs the
|
|
1462
1935
|
// buy flow when the game calls ctx.select(); the game owns everything inside.
|
|
@@ -1501,9 +1974,9 @@ function cardBody(shell, bonus) {
|
|
|
1501
1974
|
}
|
|
1502
1975
|
/** Confirmation modal — the shared card chrome (accent title heading, no ✕) with a bonus
|
|
1503
1976
|
* preview body and a full-bleed Cancel + action footer. */
|
|
1504
|
-
function buildConfirm(shell, bonus, overlay) {
|
|
1977
|
+
function buildConfirm(shell, bonus, overlay, st) {
|
|
1505
1978
|
const accent = effectiveAccent(bonus);
|
|
1506
|
-
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () =>
|
|
1979
|
+
const ui = createCardModal({ ge: 'bonus-confirm', title: bonus.title, accent, onClose: () => { closeConfirm(overlay, st); } });
|
|
1507
1980
|
const price = bonus.priceMultiplier * shell.state.bet;
|
|
1508
1981
|
const preview = document.createElement('div');
|
|
1509
1982
|
preview.className = 'ge-confirm-preview';
|
|
@@ -1519,7 +1992,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
1519
1992
|
cancel.className = 'ge-modal-btn ge-modal-btn--ghost';
|
|
1520
1993
|
cancel.dataset.ge = 'bonus-confirm-cancel';
|
|
1521
1994
|
cancel.textContent = shell.t('Cancel');
|
|
1522
|
-
cancel.addEventListener('click', () =>
|
|
1995
|
+
cancel.addEventListener('click', () => closeConfirm(overlay, st));
|
|
1523
1996
|
const buy = document.createElement('button');
|
|
1524
1997
|
buy.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
1525
1998
|
buy.dataset.ge = 'bonus-confirm-buy';
|
|
@@ -1534,8 +2007,7 @@ function buildConfirm(shell, bonus, overlay) {
|
|
|
1534
2007
|
shell.activateFeature(bonus);
|
|
1535
2008
|
else
|
|
1536
2009
|
shell.emit('buyBonusSelect', { id: bonus.id });
|
|
1537
|
-
|
|
1538
|
-
overlay.remove();
|
|
2010
|
+
shell.closeModal();
|
|
1539
2011
|
});
|
|
1540
2012
|
actions.append(cancel, buy);
|
|
1541
2013
|
ui.card.appendChild(actions);
|
|
@@ -1564,36 +2036,79 @@ function isAffordable(shell, bonus) {
|
|
|
1564
2036
|
|
|
1565
2037
|
/** A centred picker (chips grid + accent Confirm) on the shared card modal. */
|
|
1566
2038
|
function buildSheet(opts) {
|
|
1567
|
-
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () =>
|
|
2039
|
+
const ui = createCardModal({ ge: opts.ge, title: opts.title, onClose: () => opts.onClose() });
|
|
1568
2040
|
const grid = document.createElement('div');
|
|
1569
2041
|
grid.className = 'ge-sheet-grid';
|
|
1570
2042
|
const cols = typeof opts.columns === 'number' ? { wide: opts.columns, mobile: opts.columns } : opts.columns;
|
|
1571
2043
|
grid.style.setProperty('--cols', String(cols.wide));
|
|
1572
2044
|
grid.style.setProperty('--cols-m', String(cols.mobile));
|
|
1573
2045
|
let selected = opts.selected;
|
|
2046
|
+
let focusIndex = opts.choices.findIndex((c) => c.id === selected);
|
|
2047
|
+
if (focusIndex < 0)
|
|
2048
|
+
focusIndex = 0;
|
|
1574
2049
|
const chips = [];
|
|
1575
|
-
|
|
2050
|
+
/** Update chip visuals to reflect the current selected/focused index. */
|
|
2051
|
+
function setHighlight(newIndex) {
|
|
2052
|
+
focusIndex = newIndex;
|
|
2053
|
+
selected = opts.choices[focusIndex].id;
|
|
2054
|
+
for (let i = 0; i < chips.length; i++) {
|
|
2055
|
+
chips[i].classList.toggle('ge-on', i === focusIndex);
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
for (let i = 0; i < opts.choices.length; i++) {
|
|
2059
|
+
const c = opts.choices[i];
|
|
1576
2060
|
const chip = document.createElement('button');
|
|
1577
|
-
chip.className = 'ge-chip' + (
|
|
2061
|
+
chip.className = 'ge-chip' + (i === focusIndex ? ' ge-on' : '');
|
|
1578
2062
|
chip.dataset.id = c.id;
|
|
1579
2063
|
chip.textContent = c.label;
|
|
2064
|
+
const idx = i; // capture for closure
|
|
1580
2065
|
chip.addEventListener('click', () => {
|
|
1581
|
-
|
|
1582
|
-
for (const x of chips)
|
|
1583
|
-
x.classList.toggle('ge-on', x.dataset.id === selected);
|
|
2066
|
+
setHighlight(idx);
|
|
1584
2067
|
});
|
|
1585
2068
|
chips.push(chip);
|
|
1586
2069
|
grid.appendChild(chip);
|
|
1587
2070
|
}
|
|
1588
2071
|
ui.body.appendChild(grid);
|
|
2072
|
+
function doConfirm() {
|
|
2073
|
+
opts.onConfirm(selected);
|
|
2074
|
+
opts.onClose();
|
|
2075
|
+
}
|
|
1589
2076
|
// Single full-bleed Confirm; dismissal is the ✕ (top-right). No Cancel button.
|
|
1590
2077
|
const confirm = document.createElement('button');
|
|
1591
2078
|
confirm.className = 'ge-modal-btn ge-modal-btn--accent';
|
|
1592
2079
|
confirm.dataset.ge = 'sheet-confirm';
|
|
1593
2080
|
confirm.textContent = opts.confirmLabel;
|
|
1594
|
-
confirm.addEventListener('click',
|
|
2081
|
+
confirm.addEventListener('click', doConfirm);
|
|
1595
2082
|
ui.card.appendChild(confirm);
|
|
1596
|
-
|
|
2083
|
+
function onKey(e) {
|
|
2084
|
+
const last = opts.choices.length - 1;
|
|
2085
|
+
switch (e.code) {
|
|
2086
|
+
case 'ArrowRight':
|
|
2087
|
+
case 'ArrowDown':
|
|
2088
|
+
case 'Equal': // + on most keyboards
|
|
2089
|
+
case 'NumpadAdd':
|
|
2090
|
+
if (focusIndex < last)
|
|
2091
|
+
setHighlight(focusIndex + 1);
|
|
2092
|
+
return true;
|
|
2093
|
+
case 'ArrowLeft':
|
|
2094
|
+
case 'ArrowUp':
|
|
2095
|
+
case 'Minus':
|
|
2096
|
+
case 'NumpadSubtract':
|
|
2097
|
+
if (focusIndex > 0)
|
|
2098
|
+
setHighlight(focusIndex - 1);
|
|
2099
|
+
return true;
|
|
2100
|
+
case 'Enter':
|
|
2101
|
+
case 'Space':
|
|
2102
|
+
doConfirm();
|
|
2103
|
+
return true;
|
|
2104
|
+
case 'Escape':
|
|
2105
|
+
opts.onClose();
|
|
2106
|
+
return true;
|
|
2107
|
+
default:
|
|
2108
|
+
return false;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
return { root: ui.root, onKey };
|
|
1597
2112
|
}
|
|
1598
2113
|
/** Bet picker — all available bets as chips (6 per row, 3 on mobile), accent Confirm applies it. */
|
|
1599
2114
|
function openBetModal(shell) {
|
|
@@ -1601,6 +2116,7 @@ function openBetModal(shell) {
|
|
|
1601
2116
|
ge: 'bet-modal', title: shell.t('Bet'), columns: { wide: 6, mobile: 3 }, confirmLabel: shell.t('Confirm'),
|
|
1602
2117
|
choices: shell.state.availableBets.map((b) => ({ id: String(b), label: formatCurrency(b, shell.config.currency) })),
|
|
1603
2118
|
selected: String(shell.state.bet),
|
|
2119
|
+
onClose: () => shell.closeModal(),
|
|
1604
2120
|
onConfirm: (id) => {
|
|
1605
2121
|
const v = Number(id);
|
|
1606
2122
|
if (v !== shell.state.bet) {
|
|
@@ -1631,6 +2147,7 @@ function openAutoplayModal(shell) {
|
|
|
1631
2147
|
ge: 'autoplay-modal', title: shell.t('Autoplay'), columns: 3, confirmLabel: shell.t('Start'),
|
|
1632
2148
|
choices: counts.map((n) => ({ id: String(n), label: Number.isFinite(n) ? String(n) : '∞' })),
|
|
1633
2149
|
selected: String(shell.state.autoplay.remaining || counts[0]),
|
|
2150
|
+
onClose: () => shell.closeModal(),
|
|
1634
2151
|
onConfirm: (id) => {
|
|
1635
2152
|
let remaining = Number(id); // "Infinity" → Infinity
|
|
1636
2153
|
if (maxCount != null)
|
|
@@ -1778,6 +2295,868 @@ function countUp(el, from, to, fmt, durationMs = 450) {
|
|
|
1778
2295
|
};
|
|
1779
2296
|
}
|
|
1780
2297
|
|
|
2298
|
+
// MACHINE-TRANSLATED — native QA required before production use.
|
|
2299
|
+
// Keys are the English source strings exactly as they appear at t('…') call sites.
|
|
2300
|
+
// Entries within each language block are sorted alphabetically by key for diff stability.
|
|
2301
|
+
// 'en' is omitted: the resolver returns the source string unchanged for English.
|
|
2302
|
+
const LOCALES = {
|
|
2303
|
+
da: {
|
|
2304
|
+
DISCLAIMER: 'Ansvarsfraskrivelse',
|
|
2305
|
+
Activate: 'Aktivér',
|
|
2306
|
+
Autoplay: 'Autoplay',
|
|
2307
|
+
Balance: 'Saldo',
|
|
2308
|
+
Bet: 'Indsats',
|
|
2309
|
+
'BUY BONUS': 'KØB BONUS',
|
|
2310
|
+
Buy: 'Køb',
|
|
2311
|
+
'Buy bonus': 'Køb bonus',
|
|
2312
|
+
Cancel: 'Annuller',
|
|
2313
|
+
Close: 'Luk',
|
|
2314
|
+
'Cluster pays': 'Klyngeudbetaling',
|
|
2315
|
+
Confirm: 'Bekræft',
|
|
2316
|
+
Controls: 'Kontroller',
|
|
2317
|
+
'Decrease your stake.': 'Reducer din indsats.',
|
|
2318
|
+
DISABLE: 'DEAKTIVER',
|
|
2319
|
+
'Dismiss the current overlay.': 'Luk det aktuelle overlay.',
|
|
2320
|
+
'Free spins': 'Gratisspins',
|
|
2321
|
+
Game: 'Spil',
|
|
2322
|
+
'Game info': 'Spilinfo',
|
|
2323
|
+
Hotkeys: 'Tastaturgenveje',
|
|
2324
|
+
'Increase your stake.': 'Forøg din indsats.',
|
|
2325
|
+
'Lower bet': 'Lavere indsats',
|
|
2326
|
+
'Master volume': 'Hovedvolumen',
|
|
2327
|
+
'Max win': 'Maks gevinst',
|
|
2328
|
+
Menu: 'Menu',
|
|
2329
|
+
'Menu & info': 'Menu og info',
|
|
2330
|
+
Modes: 'Tilstande',
|
|
2331
|
+
Music: 'Musik',
|
|
2332
|
+
Mute: 'Lydløs',
|
|
2333
|
+
'Mute or unmute the game.': 'Slå lyden til/fra.',
|
|
2334
|
+
Navigate: 'Naviger',
|
|
2335
|
+
'Open settings and game info.': 'Åbn indstillinger og spilinfo.',
|
|
2336
|
+
'Open the paytable and rules.': 'Åbn gevinsttabel og regler.',
|
|
2337
|
+
'Pay a fixed cost to enter a bonus feature.': 'Betal en fast pris for at aktivere en bonusfunktion.',
|
|
2338
|
+
Paylines: 'Gevinstlinjer',
|
|
2339
|
+
Paytable: 'Gevinsttabel',
|
|
2340
|
+
'Pays anywhere': 'Udbetaler overalt',
|
|
2341
|
+
Price: 'Pris',
|
|
2342
|
+
'Raise bet': 'Hæv indsats',
|
|
2343
|
+
Replay: 'Genspil',
|
|
2344
|
+
RTP: 'RTP',
|
|
2345
|
+
SFX: 'Lydeffekter',
|
|
2346
|
+
Settings: 'Indstillinger',
|
|
2347
|
+
Sound: 'Lyd',
|
|
2348
|
+
Spin: 'Drej',
|
|
2349
|
+
'Spin automatically a set number of times.': 'Spin automatisk et bestemt antal gange.',
|
|
2350
|
+
'Speed up spin animations.': 'Gør spilanimationer hurtigere.',
|
|
2351
|
+
Start: 'Start',
|
|
2352
|
+
'Start a spin at the current bet.': 'Start et spin med den aktuelle indsats.',
|
|
2353
|
+
'Start replay': 'Start genspil',
|
|
2354
|
+
'Total win': 'Samlet gevinst',
|
|
2355
|
+
Turbo: 'Turbo',
|
|
2356
|
+
'Ways to win': 'Vindermuligheder',
|
|
2357
|
+
Win: 'Gevinst',
|
|
2358
|
+
'Winning shapes': 'Vindende former',
|
|
2359
|
+
},
|
|
2360
|
+
de: {
|
|
2361
|
+
DISCLAIMER: 'Haftungsausschluss',
|
|
2362
|
+
Activate: 'Aktivieren',
|
|
2363
|
+
Autoplay: 'Autoplay',
|
|
2364
|
+
Balance: 'Kontostand',
|
|
2365
|
+
Bet: 'Einsatz',
|
|
2366
|
+
'BUY BONUS': 'BONUS KAUFEN',
|
|
2367
|
+
Buy: 'Kaufen',
|
|
2368
|
+
'Buy bonus': 'Bonus kaufen',
|
|
2369
|
+
Cancel: 'Abbrechen',
|
|
2370
|
+
Close: 'Schließen',
|
|
2371
|
+
'Cluster pays': 'Cluster-Gewinne',
|
|
2372
|
+
Confirm: 'Bestätigen',
|
|
2373
|
+
Controls: 'Steuerung',
|
|
2374
|
+
'Decrease your stake.': 'Einsatz verringern.',
|
|
2375
|
+
DISABLE: 'DEAKTIVIEREN',
|
|
2376
|
+
'Dismiss the current overlay.': 'Aktuelles Overlay schließen.',
|
|
2377
|
+
'Free spins': 'Freispiele',
|
|
2378
|
+
Game: 'Spiel',
|
|
2379
|
+
'Game info': 'Spielinfo',
|
|
2380
|
+
Hotkeys: 'Tastenkürzel',
|
|
2381
|
+
'Increase your stake.': 'Einsatz erhöhen.',
|
|
2382
|
+
'Lower bet': 'Einsatz senken',
|
|
2383
|
+
'Master volume': 'Gesamtlautstärke',
|
|
2384
|
+
'Max win': 'Max. Gewinn',
|
|
2385
|
+
Menu: 'Menü',
|
|
2386
|
+
'Menu & info': 'Menü & Info',
|
|
2387
|
+
Modes: 'Modi',
|
|
2388
|
+
Music: 'Musik',
|
|
2389
|
+
Mute: 'Stummschalten',
|
|
2390
|
+
'Mute or unmute the game.': 'Ton stummschalten oder aktivieren.',
|
|
2391
|
+
Navigate: 'Navigieren',
|
|
2392
|
+
'Open settings and game info.': 'Einstellungen und Spielinfo öffnen.',
|
|
2393
|
+
'Open the paytable and rules.': 'Gewinntabelle und Regeln öffnen.',
|
|
2394
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zahle einen festen Betrag, um ein Bonus-Feature zu aktivieren.',
|
|
2395
|
+
Paylines: 'Gewinnlinien',
|
|
2396
|
+
Paytable: 'Gewinntabelle',
|
|
2397
|
+
'Pays anywhere': 'Zahlt überall',
|
|
2398
|
+
Price: 'Preis',
|
|
2399
|
+
'Raise bet': 'Einsatz erhöhen',
|
|
2400
|
+
Replay: 'Wiederholen',
|
|
2401
|
+
RTP: 'RTP',
|
|
2402
|
+
SFX: 'Soundeffekte',
|
|
2403
|
+
Settings: 'Einstellungen',
|
|
2404
|
+
Sound: 'Ton',
|
|
2405
|
+
Spin: 'Drehen',
|
|
2406
|
+
'Spin automatically a set number of times.': 'Automatisch eine festgelegte Anzahl von Runden spielen.',
|
|
2407
|
+
'Speed up spin animations.': 'Animationen beschleunigen.',
|
|
2408
|
+
Start: 'Start',
|
|
2409
|
+
'Start a spin at the current bet.': 'Mit dem aktuellen Einsatz drehen.',
|
|
2410
|
+
'Start replay': 'Wiederholen',
|
|
2411
|
+
'Total win': 'Gesamtgewinn',
|
|
2412
|
+
Turbo: 'Turbo',
|
|
2413
|
+
'Ways to win': 'Gewinnwege',
|
|
2414
|
+
Win: 'Gewinn',
|
|
2415
|
+
'Winning shapes': 'Gewinnmuster',
|
|
2416
|
+
},
|
|
2417
|
+
es: {
|
|
2418
|
+
DISCLAIMER: 'Aviso legal',
|
|
2419
|
+
Activate: 'Activar',
|
|
2420
|
+
Autoplay: 'Giro automático',
|
|
2421
|
+
Balance: 'Saldo',
|
|
2422
|
+
Bet: 'Apuesta',
|
|
2423
|
+
'BUY BONUS': 'COMPRAR BONO',
|
|
2424
|
+
Buy: 'Comprar',
|
|
2425
|
+
'Buy bonus': 'Comprar bono',
|
|
2426
|
+
Cancel: 'Cancelar',
|
|
2427
|
+
Close: 'Cerrar',
|
|
2428
|
+
'Cluster pays': 'Pago en racimo',
|
|
2429
|
+
Confirm: 'Confirmar',
|
|
2430
|
+
Controls: 'Controles',
|
|
2431
|
+
'Decrease your stake.': 'Reducir apuesta.',
|
|
2432
|
+
DISABLE: 'DESACTIVAR',
|
|
2433
|
+
'Dismiss the current overlay.': 'Cerrar el panel actual.',
|
|
2434
|
+
'Free spins': 'Giros gratis',
|
|
2435
|
+
Game: 'Juego',
|
|
2436
|
+
'Game info': 'Info del juego',
|
|
2437
|
+
Hotkeys: 'Atajos de teclado',
|
|
2438
|
+
'Increase your stake.': 'Aumentar apuesta.',
|
|
2439
|
+
'Lower bet': 'Bajar apuesta',
|
|
2440
|
+
'Master volume': 'Volumen principal',
|
|
2441
|
+
'Max win': 'Ganancia máxima',
|
|
2442
|
+
Menu: 'Menú',
|
|
2443
|
+
'Menu & info': 'Menú e info',
|
|
2444
|
+
Modes: 'Modos',
|
|
2445
|
+
Music: 'Música',
|
|
2446
|
+
Mute: 'Silenciar',
|
|
2447
|
+
'Mute or unmute the game.': 'Activar o silenciar el sonido.',
|
|
2448
|
+
Navigate: 'Navegar',
|
|
2449
|
+
'Open settings and game info.': 'Abrir ajustes e info del juego.',
|
|
2450
|
+
'Open the paytable and rules.': 'Abrir tabla de pagos y reglas.',
|
|
2451
|
+
'Pay a fixed cost to enter a bonus feature.': 'Paga un coste fijo para acceder a una función de bono.',
|
|
2452
|
+
Paylines: 'Líneas de pago',
|
|
2453
|
+
Paytable: 'Tabla de pagos',
|
|
2454
|
+
'Pays anywhere': 'Paga en cualquier lugar',
|
|
2455
|
+
Price: 'Precio',
|
|
2456
|
+
'Raise bet': 'Subir apuesta',
|
|
2457
|
+
Replay: 'Repetir',
|
|
2458
|
+
RTP: 'RTP',
|
|
2459
|
+
SFX: 'Efectos de sonido',
|
|
2460
|
+
Settings: 'Ajustes',
|
|
2461
|
+
Sound: 'Sonido',
|
|
2462
|
+
Spin: 'Girar',
|
|
2463
|
+
'Spin automatically a set number of times.': 'Girar automáticamente un número determinado de veces.',
|
|
2464
|
+
'Speed up spin animations.': 'Acelerar las animaciones de giro.',
|
|
2465
|
+
Start: 'Iniciar',
|
|
2466
|
+
'Start a spin at the current bet.': 'Iniciar un giro con la apuesta actual.',
|
|
2467
|
+
'Start replay': 'Iniciar repetición',
|
|
2468
|
+
'Total win': 'Ganancia total',
|
|
2469
|
+
Turbo: 'Turbo',
|
|
2470
|
+
'Ways to win': 'Formas de ganar',
|
|
2471
|
+
Win: 'Premio',
|
|
2472
|
+
'Winning shapes': 'Figuras ganadoras',
|
|
2473
|
+
},
|
|
2474
|
+
fi: {
|
|
2475
|
+
DISCLAIMER: 'Vastuuvapauslauseke',
|
|
2476
|
+
Activate: 'Aktivoi',
|
|
2477
|
+
Autoplay: 'Automaattipeli',
|
|
2478
|
+
Balance: 'Saldo',
|
|
2479
|
+
Bet: 'Panos',
|
|
2480
|
+
'BUY BONUS': 'OSTA BONUS',
|
|
2481
|
+
Buy: 'Osta',
|
|
2482
|
+
'Buy bonus': 'Osta bonus',
|
|
2483
|
+
Cancel: 'Peruuta',
|
|
2484
|
+
Close: 'Sulje',
|
|
2485
|
+
'Cluster pays': 'Ryhmävoitto',
|
|
2486
|
+
Confirm: 'Vahvista',
|
|
2487
|
+
Controls: 'Ohjaimet',
|
|
2488
|
+
'Decrease your stake.': 'Pienennä panostasi.',
|
|
2489
|
+
DISABLE: 'POISTA KÄYTÖSTÄ',
|
|
2490
|
+
'Dismiss the current overlay.': 'Sulje nykyinen näkymä.',
|
|
2491
|
+
'Free spins': 'Ilmaiskierrokset',
|
|
2492
|
+
Game: 'Peli',
|
|
2493
|
+
'Game info': 'Pelitiedot',
|
|
2494
|
+
Hotkeys: 'Pikanäppäimet',
|
|
2495
|
+
'Increase your stake.': 'Kasvata panostasi.',
|
|
2496
|
+
'Lower bet': 'Pienennä panosta',
|
|
2497
|
+
'Master volume': 'Pääänenvoimakkuus',
|
|
2498
|
+
'Max win': 'Maksimivoitto',
|
|
2499
|
+
Menu: 'Valikko',
|
|
2500
|
+
'Menu & info': 'Valikko ja tiedot',
|
|
2501
|
+
Modes: 'Tilat',
|
|
2502
|
+
Music: 'Musiikki',
|
|
2503
|
+
Mute: 'Mykistä',
|
|
2504
|
+
'Mute or unmute the game.': 'Mykistä tai poista mykistys.',
|
|
2505
|
+
Navigate: 'Navigoi',
|
|
2506
|
+
'Open settings and game info.': 'Avaa asetukset ja pelitiedot.',
|
|
2507
|
+
'Open the paytable and rules.': 'Avaa voittotaulukko ja säännöt.',
|
|
2508
|
+
'Pay a fixed cost to enter a bonus feature.': 'Maksa kiinteä summa päästäksesi bonusominaisuuteen.',
|
|
2509
|
+
Paylines: 'Voittolinjat',
|
|
2510
|
+
Paytable: 'Voittotaulukko',
|
|
2511
|
+
'Pays anywhere': 'Voittaa missä tahansa',
|
|
2512
|
+
Price: 'Hinta',
|
|
2513
|
+
'Raise bet': 'Nosta panosta',
|
|
2514
|
+
Replay: 'Toista uudelleen',
|
|
2515
|
+
RTP: 'RTP',
|
|
2516
|
+
SFX: 'Ääniefektit',
|
|
2517
|
+
Settings: 'Asetukset',
|
|
2518
|
+
Sound: 'Ääni',
|
|
2519
|
+
Spin: 'Pyöräytä',
|
|
2520
|
+
'Spin automatically a set number of times.': 'Pyöräytä automaattisesti määritetty määrä kertoja.',
|
|
2521
|
+
'Speed up spin animations.': 'Nopeuta pyöräytysanimaatioita.',
|
|
2522
|
+
Start: 'Aloita',
|
|
2523
|
+
'Start a spin at the current bet.': 'Aloita pyöräytys nykyisellä panoksella.',
|
|
2524
|
+
'Start replay': 'Aloita uudelleentoisto',
|
|
2525
|
+
'Total win': 'Kokonaisvoitto',
|
|
2526
|
+
Turbo: 'Turbo',
|
|
2527
|
+
'Ways to win': 'Voittotavat',
|
|
2528
|
+
Win: 'Voitto',
|
|
2529
|
+
'Winning shapes': 'Voittokuviot',
|
|
2530
|
+
},
|
|
2531
|
+
fr: {
|
|
2532
|
+
DISCLAIMER: 'Avertissement',
|
|
2533
|
+
Activate: 'Activer',
|
|
2534
|
+
Autoplay: 'Jeu automatique',
|
|
2535
|
+
Balance: 'Solde',
|
|
2536
|
+
Bet: 'Mise',
|
|
2537
|
+
'BUY BONUS': 'ACHETER BONUS',
|
|
2538
|
+
Buy: 'Acheter',
|
|
2539
|
+
'Buy bonus': 'Acheter un bonus',
|
|
2540
|
+
Cancel: 'Annuler',
|
|
2541
|
+
Close: 'Fermer',
|
|
2542
|
+
'Cluster pays': 'Gains en grappe',
|
|
2543
|
+
Confirm: 'Confirmer',
|
|
2544
|
+
Controls: 'Commandes',
|
|
2545
|
+
'Decrease your stake.': 'Diminuer votre mise.',
|
|
2546
|
+
DISABLE: 'DÉSACTIVER',
|
|
2547
|
+
'Dismiss the current overlay.': 'Fermer le panneau actuel.',
|
|
2548
|
+
'Free spins': 'Tours gratuits',
|
|
2549
|
+
Game: 'Jeu',
|
|
2550
|
+
'Game info': 'Infos du jeu',
|
|
2551
|
+
Hotkeys: 'Raccourcis clavier',
|
|
2552
|
+
'Increase your stake.': 'Augmenter votre mise.',
|
|
2553
|
+
'Lower bet': 'Baisser la mise',
|
|
2554
|
+
'Master volume': 'Volume principal',
|
|
2555
|
+
'Max win': 'Gain maximum',
|
|
2556
|
+
Menu: 'Menu',
|
|
2557
|
+
'Menu & info': 'Menu et info',
|
|
2558
|
+
Modes: 'Modes',
|
|
2559
|
+
Music: 'Musique',
|
|
2560
|
+
Mute: 'Couper le son',
|
|
2561
|
+
'Mute or unmute the game.': 'Couper ou rétablir le son.',
|
|
2562
|
+
Navigate: 'Naviguer',
|
|
2563
|
+
'Open settings and game info.': 'Ouvrir les paramètres et infos du jeu.',
|
|
2564
|
+
'Open the paytable and rules.': 'Ouvrir la table des gains et les règles.',
|
|
2565
|
+
'Pay a fixed cost to enter a bonus feature.': 'Payez un coût fixe pour accéder à une fonctionnalité bonus.',
|
|
2566
|
+
Paylines: 'Lignes de paiement',
|
|
2567
|
+
Paytable: 'Table des gains',
|
|
2568
|
+
'Pays anywhere': 'Gains sur toute la grille',
|
|
2569
|
+
Price: 'Prix',
|
|
2570
|
+
'Raise bet': 'Augmenter la mise',
|
|
2571
|
+
Replay: 'Revoir',
|
|
2572
|
+
RTP: 'RTP',
|
|
2573
|
+
SFX: 'Effets sonores',
|
|
2574
|
+
Settings: 'Paramètres',
|
|
2575
|
+
Sound: 'Son',
|
|
2576
|
+
Spin: 'Tourner',
|
|
2577
|
+
'Spin automatically a set number of times.': 'Tourner automatiquement un nombre de fois défini.',
|
|
2578
|
+
'Speed up spin animations.': 'Accélérer les animations de spin.',
|
|
2579
|
+
Start: 'Lancer',
|
|
2580
|
+
'Start a spin at the current bet.': 'Lancer un tour avec la mise actuelle.',
|
|
2581
|
+
'Start replay': 'Lancer le replay',
|
|
2582
|
+
'Total win': 'Gain total',
|
|
2583
|
+
Turbo: 'Turbo',
|
|
2584
|
+
'Ways to win': 'Façons de gagner',
|
|
2585
|
+
Win: 'Gain',
|
|
2586
|
+
'Winning shapes': 'Figures gagnantes',
|
|
2587
|
+
},
|
|
2588
|
+
hi: {
|
|
2589
|
+
DISCLAIMER: 'अस्वीकरण',
|
|
2590
|
+
Activate: 'सक्रिय करें',
|
|
2591
|
+
Autoplay: 'ऑटोप्ले',
|
|
2592
|
+
Balance: 'बैलेंस',
|
|
2593
|
+
Bet: 'दांव',
|
|
2594
|
+
'BUY BONUS': 'बोनस खरीदें',
|
|
2595
|
+
Buy: 'खरीदें',
|
|
2596
|
+
'Buy bonus': 'बोनस खरीदें',
|
|
2597
|
+
Cancel: 'रद्द करें',
|
|
2598
|
+
Close: 'बंद करें',
|
|
2599
|
+
'Cluster pays': 'क्लस्टर भुगतान',
|
|
2600
|
+
Confirm: 'पुष्टि करें',
|
|
2601
|
+
Controls: 'नियंत्रण',
|
|
2602
|
+
'Decrease your stake.': 'अपना दांव कम करें।',
|
|
2603
|
+
DISABLE: 'बंद करें',
|
|
2604
|
+
'Dismiss the current overlay.': 'वर्तमान ओवरले बंद करें।',
|
|
2605
|
+
'Free spins': 'फ्री स्पिन',
|
|
2606
|
+
Game: 'खेल',
|
|
2607
|
+
'Game info': 'गेम जानकारी',
|
|
2608
|
+
Hotkeys: 'कीबोर्ड शॉर्टकट',
|
|
2609
|
+
'Increase your stake.': 'अपना दांव बढ़ाएं।',
|
|
2610
|
+
'Lower bet': 'दांव घटाएं',
|
|
2611
|
+
'Master volume': 'मुख्य वॉल्यूम',
|
|
2612
|
+
'Max win': 'अधिकतम जीत',
|
|
2613
|
+
Menu: 'मेनू',
|
|
2614
|
+
'Menu & info': 'मेनू और जानकारी',
|
|
2615
|
+
Modes: 'मोड',
|
|
2616
|
+
Music: 'संगीत',
|
|
2617
|
+
Mute: 'म्यूट करें',
|
|
2618
|
+
'Mute or unmute the game.': 'गेम को म्यूट या अनम्यूट करें।',
|
|
2619
|
+
Navigate: 'नेविगेट करें',
|
|
2620
|
+
'Open settings and game info.': 'सेटिंग और गेम जानकारी खोलें।',
|
|
2621
|
+
'Open the paytable and rules.': 'पेटेबल और नियम खोलें।',
|
|
2622
|
+
'Pay a fixed cost to enter a bonus feature.': 'बोनस फीचर में प्रवेश के लिए एक निश्चित राशि दें।',
|
|
2623
|
+
Paylines: 'पेलाइन',
|
|
2624
|
+
Paytable: 'पेटेबल',
|
|
2625
|
+
'Pays anywhere': 'कहीं भी जीत',
|
|
2626
|
+
Price: 'मूल्य',
|
|
2627
|
+
'Raise bet': 'दांव बढ़ाएं',
|
|
2628
|
+
Replay: 'दोबारा खेलें',
|
|
2629
|
+
RTP: 'RTP',
|
|
2630
|
+
SFX: 'ध्वनि प्रभाव',
|
|
2631
|
+
Settings: 'सेटिंग',
|
|
2632
|
+
Sound: 'ध्वनि',
|
|
2633
|
+
Spin: 'स्पिन',
|
|
2634
|
+
'Spin automatically a set number of times.': 'एक निश्चित संख्या में स्वचालित रूप से स्पिन करें।',
|
|
2635
|
+
'Speed up spin animations.': 'स्पिन एनिमेशन को तेज़ करें।',
|
|
2636
|
+
Start: 'शुरू करें',
|
|
2637
|
+
'Start a spin at the current bet.': 'वर्तमान दांव पर स्पिन शुरू करें।',
|
|
2638
|
+
'Start replay': 'रीप्ले शुरू करें',
|
|
2639
|
+
'Total win': 'कुल जीत',
|
|
2640
|
+
Turbo: 'टर्बो',
|
|
2641
|
+
'Ways to win': 'जीत के तरीके',
|
|
2642
|
+
Win: 'जीत',
|
|
2643
|
+
'Winning shapes': 'जीत के आकार',
|
|
2644
|
+
},
|
|
2645
|
+
id: {
|
|
2646
|
+
DISCLAIMER: 'Penafian',
|
|
2647
|
+
Activate: 'Aktifkan',
|
|
2648
|
+
Autoplay: 'Putar Otomatis',
|
|
2649
|
+
Balance: 'Saldo',
|
|
2650
|
+
Bet: 'Taruhan',
|
|
2651
|
+
'BUY BONUS': 'BELI BONUS',
|
|
2652
|
+
Buy: 'Beli',
|
|
2653
|
+
'Buy bonus': 'Beli bonus',
|
|
2654
|
+
Cancel: 'Batal',
|
|
2655
|
+
Close: 'Tutup',
|
|
2656
|
+
'Cluster pays': 'Bayar kluster',
|
|
2657
|
+
Confirm: 'Konfirmasi',
|
|
2658
|
+
Controls: 'Kontrol',
|
|
2659
|
+
'Decrease your stake.': 'Kurangi taruhan Anda.',
|
|
2660
|
+
DISABLE: 'NONAKTIFKAN',
|
|
2661
|
+
'Dismiss the current overlay.': 'Tutup overlay saat ini.',
|
|
2662
|
+
'Free spins': 'Putaran gratis',
|
|
2663
|
+
Game: 'Permainan',
|
|
2664
|
+
'Game info': 'Info permainan',
|
|
2665
|
+
Hotkeys: 'Pintasan keyboard',
|
|
2666
|
+
'Increase your stake.': 'Tingkatkan taruhan Anda.',
|
|
2667
|
+
'Lower bet': 'Turunkan taruhan',
|
|
2668
|
+
'Master volume': 'Volume utama',
|
|
2669
|
+
'Max win': 'Kemenangan maks',
|
|
2670
|
+
Menu: 'Menu',
|
|
2671
|
+
'Menu & info': 'Menu & info',
|
|
2672
|
+
Modes: 'Mode',
|
|
2673
|
+
Music: 'Musik',
|
|
2674
|
+
Mute: 'Bisukan',
|
|
2675
|
+
'Mute or unmute the game.': 'Bisukan atau aktifkan suara permainan.',
|
|
2676
|
+
Navigate: 'Navigasi',
|
|
2677
|
+
'Open settings and game info.': 'Buka pengaturan dan info permainan.',
|
|
2678
|
+
'Open the paytable and rules.': 'Buka tabel pembayaran dan aturan.',
|
|
2679
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bayar biaya tetap untuk masuk ke fitur bonus.',
|
|
2680
|
+
Paylines: 'Garis pembayaran',
|
|
2681
|
+
Paytable: 'Tabel pembayaran',
|
|
2682
|
+
'Pays anywhere': 'Menang di mana saja',
|
|
2683
|
+
Price: 'Harga',
|
|
2684
|
+
'Raise bet': 'Naikkan taruhan',
|
|
2685
|
+
Replay: 'Putar ulang',
|
|
2686
|
+
RTP: 'RTP',
|
|
2687
|
+
SFX: 'Efek suara',
|
|
2688
|
+
Settings: 'Pengaturan',
|
|
2689
|
+
Sound: 'Suara',
|
|
2690
|
+
Spin: 'Putar',
|
|
2691
|
+
'Spin automatically a set number of times.': 'Putar otomatis sejumlah kali yang ditentukan.',
|
|
2692
|
+
'Speed up spin animations.': 'Percepat animasi putaran.',
|
|
2693
|
+
Start: 'Mulai',
|
|
2694
|
+
'Start a spin at the current bet.': 'Mulai putaran dengan taruhan saat ini.',
|
|
2695
|
+
'Start replay': 'Mulai putar ulang',
|
|
2696
|
+
'Total win': 'Total kemenangan',
|
|
2697
|
+
Turbo: 'Turbo',
|
|
2698
|
+
'Ways to win': 'Cara menang',
|
|
2699
|
+
Win: 'Menang',
|
|
2700
|
+
'Winning shapes': 'Bentuk kemenangan',
|
|
2701
|
+
},
|
|
2702
|
+
ja: {
|
|
2703
|
+
DISCLAIMER: '免責事項',
|
|
2704
|
+
Activate: '有効化',
|
|
2705
|
+
Autoplay: 'オートプレイ',
|
|
2706
|
+
Balance: '残高',
|
|
2707
|
+
Bet: 'ベット',
|
|
2708
|
+
'BUY BONUS': 'ボーナス購入',
|
|
2709
|
+
Buy: '購入',
|
|
2710
|
+
'Buy bonus': 'ボーナス購入',
|
|
2711
|
+
Cancel: 'キャンセル',
|
|
2712
|
+
Close: '閉じる',
|
|
2713
|
+
'Cluster pays': 'クラスター配当',
|
|
2714
|
+
Confirm: '確認',
|
|
2715
|
+
Controls: '操作方法',
|
|
2716
|
+
'Decrease your stake.': 'ベットを減らす。',
|
|
2717
|
+
DISABLE: '無効',
|
|
2718
|
+
'Dismiss the current overlay.': '現在のオーバーレイを閉じる。',
|
|
2719
|
+
'Free spins': 'フリースピン',
|
|
2720
|
+
Game: 'ゲーム',
|
|
2721
|
+
'Game info': 'ゲーム情報',
|
|
2722
|
+
Hotkeys: 'キーボードショートカット',
|
|
2723
|
+
'Increase your stake.': 'ベットを増やす。',
|
|
2724
|
+
'Lower bet': 'ベットを下げる',
|
|
2725
|
+
'Master volume': 'マスターボリューム',
|
|
2726
|
+
'Max win': '最大当選',
|
|
2727
|
+
Menu: 'メニュー',
|
|
2728
|
+
'Menu & info': 'メニューと情報',
|
|
2729
|
+
Modes: 'モード',
|
|
2730
|
+
Music: 'ミュージック',
|
|
2731
|
+
Mute: 'ミュート',
|
|
2732
|
+
'Mute or unmute the game.': 'ゲームをミュート/ミュート解除する。',
|
|
2733
|
+
Navigate: 'ナビゲート',
|
|
2734
|
+
'Open settings and game info.': '設定とゲーム情報を開く。',
|
|
2735
|
+
'Open the paytable and rules.': '配当表とルールを開く。',
|
|
2736
|
+
'Pay a fixed cost to enter a bonus feature.': 'ボーナス機能に入るために固定料金を支払う。',
|
|
2737
|
+
Paylines: 'ペイライン',
|
|
2738
|
+
Paytable: '配当表',
|
|
2739
|
+
'Pays anywhere': 'どこでも当選',
|
|
2740
|
+
Price: '価格',
|
|
2741
|
+
'Raise bet': 'ベットを上げる',
|
|
2742
|
+
Replay: 'リプレイ',
|
|
2743
|
+
RTP: 'RTP',
|
|
2744
|
+
SFX: '効果音',
|
|
2745
|
+
Settings: '設定',
|
|
2746
|
+
Sound: 'サウンド',
|
|
2747
|
+
Spin: 'スピン',
|
|
2748
|
+
'Spin automatically a set number of times.': '設定した回数だけ自動でスピンする。',
|
|
2749
|
+
'Speed up spin animations.': 'スピンアニメーションを高速化する。',
|
|
2750
|
+
Start: 'スタート',
|
|
2751
|
+
'Start a spin at the current bet.': '現在のベットでスピンを開始する。',
|
|
2752
|
+
'Start replay': 'リプレイ開始',
|
|
2753
|
+
'Total win': '合計当選',
|
|
2754
|
+
Turbo: 'ターボ',
|
|
2755
|
+
'Ways to win': '当選方法',
|
|
2756
|
+
Win: '当選',
|
|
2757
|
+
'Winning shapes': '当選形状',
|
|
2758
|
+
},
|
|
2759
|
+
ko: {
|
|
2760
|
+
DISCLAIMER: '면책 조항',
|
|
2761
|
+
Activate: '활성화',
|
|
2762
|
+
Autoplay: '자동 플레이',
|
|
2763
|
+
Balance: '잔액',
|
|
2764
|
+
Bet: '베팅',
|
|
2765
|
+
'BUY BONUS': '보너스 구매',
|
|
2766
|
+
Buy: '구매',
|
|
2767
|
+
'Buy bonus': '보너스 구매',
|
|
2768
|
+
Cancel: '취소',
|
|
2769
|
+
Close: '닫기',
|
|
2770
|
+
'Cluster pays': '클러스터 페이',
|
|
2771
|
+
Confirm: '확인',
|
|
2772
|
+
Controls: '조작법',
|
|
2773
|
+
'Decrease your stake.': '베팅을 줄이세요.',
|
|
2774
|
+
DISABLE: '비활성화',
|
|
2775
|
+
'Dismiss the current overlay.': '현재 오버레이를 닫습니다.',
|
|
2776
|
+
'Free spins': '무료 스핀',
|
|
2777
|
+
Game: '게임',
|
|
2778
|
+
'Game info': '게임 정보',
|
|
2779
|
+
Hotkeys: '키보드 단축키',
|
|
2780
|
+
'Increase your stake.': '베팅을 늘리세요.',
|
|
2781
|
+
'Lower bet': '베팅 낮추기',
|
|
2782
|
+
'Master volume': '마스터 볼륨',
|
|
2783
|
+
'Max win': '최대 당첨',
|
|
2784
|
+
Menu: '메뉴',
|
|
2785
|
+
'Menu & info': '메뉴 & 정보',
|
|
2786
|
+
Modes: '모드',
|
|
2787
|
+
Music: '음악',
|
|
2788
|
+
Mute: '음소거',
|
|
2789
|
+
'Mute or unmute the game.': '게임 소리를 켜거나 끕니다.',
|
|
2790
|
+
Navigate: '이동',
|
|
2791
|
+
'Open settings and game info.': '설정 및 게임 정보를 엽니다.',
|
|
2792
|
+
'Open the paytable and rules.': '페이테이블 및 규칙을 엽니다.',
|
|
2793
|
+
'Pay a fixed cost to enter a bonus feature.': '고정 비용을 지불하고 보너스 기능에 진입하세요.',
|
|
2794
|
+
Paylines: '페이라인',
|
|
2795
|
+
Paytable: '페이테이블',
|
|
2796
|
+
'Pays anywhere': '어디서나 당첨',
|
|
2797
|
+
Price: '가격',
|
|
2798
|
+
'Raise bet': '베팅 올리기',
|
|
2799
|
+
Replay: '다시보기',
|
|
2800
|
+
RTP: 'RTP',
|
|
2801
|
+
SFX: '효과음',
|
|
2802
|
+
Settings: '설정',
|
|
2803
|
+
Sound: '사운드',
|
|
2804
|
+
Spin: '스핀',
|
|
2805
|
+
'Spin automatically a set number of times.': '정해진 횟수만큼 자동으로 스핀합니다.',
|
|
2806
|
+
'Speed up spin animations.': '스핀 애니메이션을 빠르게 합니다.',
|
|
2807
|
+
Start: '시작',
|
|
2808
|
+
'Start a spin at the current bet.': '현재 베팅으로 스핀을 시작합니다.',
|
|
2809
|
+
'Start replay': '다시보기 시작',
|
|
2810
|
+
'Total win': '총 당첨',
|
|
2811
|
+
Turbo: '터보',
|
|
2812
|
+
'Ways to win': '당첨 방법',
|
|
2813
|
+
Win: '당첨',
|
|
2814
|
+
'Winning shapes': '당첨 패턴',
|
|
2815
|
+
},
|
|
2816
|
+
pl: {
|
|
2817
|
+
DISCLAIMER: 'Zastrzeżenie',
|
|
2818
|
+
Activate: 'Aktywuj',
|
|
2819
|
+
Autoplay: 'Autoplay',
|
|
2820
|
+
Balance: 'Saldo',
|
|
2821
|
+
Bet: 'Zakład',
|
|
2822
|
+
'BUY BONUS': 'KUP BONUS',
|
|
2823
|
+
Buy: 'Kup',
|
|
2824
|
+
'Buy bonus': 'Kup bonus',
|
|
2825
|
+
Cancel: 'Anuluj',
|
|
2826
|
+
Close: 'Zamknij',
|
|
2827
|
+
'Cluster pays': 'Wypłaty klastrowe',
|
|
2828
|
+
Confirm: 'Potwierdź',
|
|
2829
|
+
Controls: 'Sterowanie',
|
|
2830
|
+
'Decrease your stake.': 'Zmniejsz swój zakład.',
|
|
2831
|
+
DISABLE: 'WYŁĄCZ',
|
|
2832
|
+
'Dismiss the current overlay.': 'Zamknij bieżące okno.',
|
|
2833
|
+
'Free spins': 'Darmowe spiny',
|
|
2834
|
+
Game: 'Gra',
|
|
2835
|
+
'Game info': 'Informacje o grze',
|
|
2836
|
+
Hotkeys: 'Skróty klawiaturowe',
|
|
2837
|
+
'Increase your stake.': 'Zwiększ swój zakład.',
|
|
2838
|
+
'Lower bet': 'Obniż zakład',
|
|
2839
|
+
'Master volume': 'Głośność główna',
|
|
2840
|
+
'Max win': 'Maks. wygrana',
|
|
2841
|
+
Menu: 'Menu',
|
|
2842
|
+
'Menu & info': 'Menu i informacje',
|
|
2843
|
+
Modes: 'Tryby',
|
|
2844
|
+
Music: 'Muzyka',
|
|
2845
|
+
Mute: 'Wycisz',
|
|
2846
|
+
'Mute or unmute the game.': 'Wycisz lub odcisz dźwięk gry.',
|
|
2847
|
+
Navigate: 'Nawiguj',
|
|
2848
|
+
'Open settings and game info.': 'Otwórz ustawienia i informacje o grze.',
|
|
2849
|
+
'Open the paytable and rules.': 'Otwórz tabelę wygranych i zasady.',
|
|
2850
|
+
'Pay a fixed cost to enter a bonus feature.': 'Zapłać stałą kwotę, aby wejść do funkcji bonusowej.',
|
|
2851
|
+
Paylines: 'Linie wygrywające',
|
|
2852
|
+
Paytable: 'Tabela wygranych',
|
|
2853
|
+
'Pays anywhere': 'Wypłaca wszędzie',
|
|
2854
|
+
Price: 'Cena',
|
|
2855
|
+
'Raise bet': 'Podnieś zakład',
|
|
2856
|
+
Replay: 'Odtwórz ponownie',
|
|
2857
|
+
RTP: 'RTP',
|
|
2858
|
+
SFX: 'Efekty dźwiękowe',
|
|
2859
|
+
Settings: 'Ustawienia',
|
|
2860
|
+
Sound: 'Dźwięk',
|
|
2861
|
+
Spin: 'Zakręć',
|
|
2862
|
+
'Spin automatically a set number of times.': 'Obracaj automatycznie określoną liczbę razy.',
|
|
2863
|
+
'Speed up spin animations.': 'Przyspiesz animacje obrotów.',
|
|
2864
|
+
Start: 'Start',
|
|
2865
|
+
'Start a spin at the current bet.': 'Rozpocznij obrót przy bieżącym zakładzie.',
|
|
2866
|
+
'Start replay': 'Rozpocznij odtwarzanie',
|
|
2867
|
+
'Total win': 'Łączna wygrana',
|
|
2868
|
+
Turbo: 'Turbo',
|
|
2869
|
+
'Ways to win': 'Sposoby wygrywania',
|
|
2870
|
+
Win: 'Wygrana',
|
|
2871
|
+
'Winning shapes': 'Wzory wygrywające',
|
|
2872
|
+
},
|
|
2873
|
+
pt: {
|
|
2874
|
+
DISCLAIMER: 'Aviso legal',
|
|
2875
|
+
Activate: 'Ativar',
|
|
2876
|
+
Autoplay: 'Giro automático',
|
|
2877
|
+
Balance: 'Saldo',
|
|
2878
|
+
Bet: 'Aposta',
|
|
2879
|
+
'BUY BONUS': 'COMPRAR BÔNUS',
|
|
2880
|
+
Buy: 'Comprar',
|
|
2881
|
+
'Buy bonus': 'Comprar bônus',
|
|
2882
|
+
Cancel: 'Cancelar',
|
|
2883
|
+
Close: 'Fechar',
|
|
2884
|
+
'Cluster pays': 'Pagamento em cluster',
|
|
2885
|
+
Confirm: 'Confirmar',
|
|
2886
|
+
Controls: 'Controles',
|
|
2887
|
+
'Decrease your stake.': 'Diminuir aposta.',
|
|
2888
|
+
DISABLE: 'DESATIVAR',
|
|
2889
|
+
'Dismiss the current overlay.': 'Fechar o painel atual.',
|
|
2890
|
+
'Free spins': 'Giros grátis',
|
|
2891
|
+
Game: 'Jogo',
|
|
2892
|
+
'Game info': 'Info do jogo',
|
|
2893
|
+
Hotkeys: 'Atalhos de teclado',
|
|
2894
|
+
'Increase your stake.': 'Aumentar aposta.',
|
|
2895
|
+
'Lower bet': 'Baixar aposta',
|
|
2896
|
+
'Master volume': 'Volume principal',
|
|
2897
|
+
'Max win': 'Ganho máximo',
|
|
2898
|
+
Menu: 'Menu',
|
|
2899
|
+
'Menu & info': 'Menu e info',
|
|
2900
|
+
Modes: 'Modos',
|
|
2901
|
+
Music: 'Música',
|
|
2902
|
+
Mute: 'Silenciar',
|
|
2903
|
+
'Mute or unmute the game.': 'Ativar ou silenciar o som do jogo.',
|
|
2904
|
+
Navigate: 'Navegar',
|
|
2905
|
+
'Open settings and game info.': 'Abrir configurações e info do jogo.',
|
|
2906
|
+
'Open the paytable and rules.': 'Abrir tabela de pagamentos e regras.',
|
|
2907
|
+
'Pay a fixed cost to enter a bonus feature.': 'Pague um custo fixo para entrar numa funcionalidade de bônus.',
|
|
2908
|
+
Paylines: 'Linhas de pagamento',
|
|
2909
|
+
Paytable: 'Tabela de pagamentos',
|
|
2910
|
+
'Pays anywhere': 'Paga em qualquer posição',
|
|
2911
|
+
Price: 'Preço',
|
|
2912
|
+
'Raise bet': 'Aumentar aposta',
|
|
2913
|
+
Replay: 'Repetir',
|
|
2914
|
+
RTP: 'RTP',
|
|
2915
|
+
SFX: 'Efeitos sonoros',
|
|
2916
|
+
Settings: 'Configurações',
|
|
2917
|
+
Sound: 'Som',
|
|
2918
|
+
Spin: 'Girar',
|
|
2919
|
+
'Spin automatically a set number of times.': 'Girar automaticamente um número definido de vezes.',
|
|
2920
|
+
'Speed up spin animations.': 'Acelerar as animações de giro.',
|
|
2921
|
+
Start: 'Iniciar',
|
|
2922
|
+
'Start a spin at the current bet.': 'Iniciar um giro com a aposta atual.',
|
|
2923
|
+
'Start replay': 'Iniciar repetição',
|
|
2924
|
+
'Total win': 'Ganho total',
|
|
2925
|
+
Turbo: 'Turbo',
|
|
2926
|
+
'Ways to win': 'Formas de ganhar',
|
|
2927
|
+
Win: 'Ganho',
|
|
2928
|
+
'Winning shapes': 'Figuras vencedoras',
|
|
2929
|
+
},
|
|
2930
|
+
ru: {
|
|
2931
|
+
DISCLAIMER: 'Отказ от ответственности',
|
|
2932
|
+
Activate: 'Активировать',
|
|
2933
|
+
Autoplay: 'Автоигра',
|
|
2934
|
+
Balance: 'Баланс',
|
|
2935
|
+
Bet: 'Ставка',
|
|
2936
|
+
'BUY BONUS': 'КУПИТЬ БОНУС',
|
|
2937
|
+
Buy: 'Купить',
|
|
2938
|
+
'Buy bonus': 'Купить бонус',
|
|
2939
|
+
Cancel: 'Отмена',
|
|
2940
|
+
Close: 'Закрыть',
|
|
2941
|
+
'Cluster pays': 'Кластерные выплаты',
|
|
2942
|
+
Confirm: 'Подтвердить',
|
|
2943
|
+
Controls: 'Управление',
|
|
2944
|
+
'Decrease your stake.': 'Уменьшить ставку.',
|
|
2945
|
+
DISABLE: 'ОТКЛЮЧИТЬ',
|
|
2946
|
+
'Dismiss the current overlay.': 'Закрыть текущее окно.',
|
|
2947
|
+
'Free spins': 'Бесплатные вращения',
|
|
2948
|
+
Game: 'Игра',
|
|
2949
|
+
'Game info': 'Информация об игре',
|
|
2950
|
+
Hotkeys: 'Горячие клавиши',
|
|
2951
|
+
'Increase your stake.': 'Увеличить ставку.',
|
|
2952
|
+
'Lower bet': 'Уменьшить ставку',
|
|
2953
|
+
'Master volume': 'Общая громкость',
|
|
2954
|
+
'Max win': 'Макс. выигрыш',
|
|
2955
|
+
Menu: 'Меню',
|
|
2956
|
+
'Menu & info': 'Меню и информация',
|
|
2957
|
+
Modes: 'Режимы',
|
|
2958
|
+
Music: 'Музыка',
|
|
2959
|
+
Mute: 'Отключить звук',
|
|
2960
|
+
'Mute or unmute the game.': 'Включить или отключить звук.',
|
|
2961
|
+
Navigate: 'Навигация',
|
|
2962
|
+
'Open settings and game info.': 'Открыть настройки и информацию об игре.',
|
|
2963
|
+
'Open the paytable and rules.': 'Открыть таблицу выплат и правила.',
|
|
2964
|
+
'Pay a fixed cost to enter a bonus feature.': 'Заплатите фиксированную сумму для входа в бонусный раунд.',
|
|
2965
|
+
Paylines: 'Линии выплат',
|
|
2966
|
+
Paytable: 'Таблица выплат',
|
|
2967
|
+
'Pays anywhere': 'Выплачивает в любом месте',
|
|
2968
|
+
Price: 'Цена',
|
|
2969
|
+
'Raise bet': 'Повысить ставку',
|
|
2970
|
+
Replay: 'Повтор',
|
|
2971
|
+
RTP: 'RTP',
|
|
2972
|
+
SFX: 'Звуковые эффекты',
|
|
2973
|
+
Settings: 'Настройки',
|
|
2974
|
+
Sound: 'Звук',
|
|
2975
|
+
Spin: 'Вращение',
|
|
2976
|
+
'Spin automatically a set number of times.': 'Автоматически вращать заданное количество раз.',
|
|
2977
|
+
'Speed up spin animations.': 'Ускорить анимацию вращений.',
|
|
2978
|
+
Start: 'Начать',
|
|
2979
|
+
'Start a spin at the current bet.': 'Начать вращение с текущей ставкой.',
|
|
2980
|
+
'Start replay': 'Начать повтор',
|
|
2981
|
+
'Total win': 'Общий выигрыш',
|
|
2982
|
+
Turbo: 'Турбо',
|
|
2983
|
+
'Ways to win': 'Способы выигрыша',
|
|
2984
|
+
Win: 'Выигрыш',
|
|
2985
|
+
'Winning shapes': 'Выигрышные комбинации',
|
|
2986
|
+
},
|
|
2987
|
+
tr: {
|
|
2988
|
+
DISCLAIMER: 'Yasal uyarı',
|
|
2989
|
+
Activate: 'Etkinleştir',
|
|
2990
|
+
Autoplay: 'Otomatik Oyun',
|
|
2991
|
+
Balance: 'Bakiye',
|
|
2992
|
+
Bet: 'Bahis',
|
|
2993
|
+
'BUY BONUS': 'BONUS SATIN AL',
|
|
2994
|
+
Buy: 'Satın al',
|
|
2995
|
+
'Buy bonus': 'Bonus satın al',
|
|
2996
|
+
Cancel: 'İptal',
|
|
2997
|
+
Close: 'Kapat',
|
|
2998
|
+
'Cluster pays': 'Küme ödemeleri',
|
|
2999
|
+
Confirm: 'Onayla',
|
|
3000
|
+
Controls: 'Kontroller',
|
|
3001
|
+
'Decrease your stake.': 'Bahsinizi azaltın.',
|
|
3002
|
+
DISABLE: 'DEVRE DIŞI',
|
|
3003
|
+
'Dismiss the current overlay.': 'Mevcut pencereyi kapat.',
|
|
3004
|
+
'Free spins': 'Ücretsiz dönüşler',
|
|
3005
|
+
Game: 'Oyun',
|
|
3006
|
+
'Game info': 'Oyun bilgisi',
|
|
3007
|
+
Hotkeys: 'Klavye kısayolları',
|
|
3008
|
+
'Increase your stake.': 'Bahsinizi artırın.',
|
|
3009
|
+
'Lower bet': 'Bahsi düşür',
|
|
3010
|
+
'Master volume': 'Ana ses',
|
|
3011
|
+
'Max win': 'Maks kazanç',
|
|
3012
|
+
Menu: 'Menü',
|
|
3013
|
+
'Menu & info': 'Menü ve bilgi',
|
|
3014
|
+
Modes: 'Modlar',
|
|
3015
|
+
Music: 'Müzik',
|
|
3016
|
+
Mute: 'Sessiz',
|
|
3017
|
+
'Mute or unmute the game.': 'Oyun sesini aç ya da kapat.',
|
|
3018
|
+
Navigate: 'Gezin',
|
|
3019
|
+
'Open settings and game info.': 'Ayarları ve oyun bilgisini aç.',
|
|
3020
|
+
'Open the paytable and rules.': 'Ödeme tablosunu ve kuralları aç.',
|
|
3021
|
+
'Pay a fixed cost to enter a bonus feature.': 'Bonus özelliğine girmek için sabit bir ücret ödeyin.',
|
|
3022
|
+
Paylines: 'Ödeme çizgileri',
|
|
3023
|
+
Paytable: 'Ödeme tablosu',
|
|
3024
|
+
'Pays anywhere': 'Her yerde kazandırır',
|
|
3025
|
+
Price: 'Fiyat',
|
|
3026
|
+
'Raise bet': 'Bahsi artır',
|
|
3027
|
+
Replay: 'Tekrar oynat',
|
|
3028
|
+
RTP: 'RTP',
|
|
3029
|
+
SFX: 'Ses efektleri',
|
|
3030
|
+
Settings: 'Ayarlar',
|
|
3031
|
+
Sound: 'Ses',
|
|
3032
|
+
Spin: 'Döndür',
|
|
3033
|
+
'Spin automatically a set number of times.': 'Belirlenen sayıda otomatik döndür.',
|
|
3034
|
+
'Speed up spin animations.': 'Döndürme animasyonlarını hızlandır.',
|
|
3035
|
+
Start: 'Başlat',
|
|
3036
|
+
'Start a spin at the current bet.': 'Mevcut bahisle döndürmeyi başlat.',
|
|
3037
|
+
'Start replay': 'Tekrarı başlat',
|
|
3038
|
+
'Total win': 'Toplam kazanç',
|
|
3039
|
+
Turbo: 'Turbo',
|
|
3040
|
+
'Ways to win': 'Kazanma yolları',
|
|
3041
|
+
Win: 'Kazanç',
|
|
3042
|
+
'Winning shapes': 'Kazanan şekiller',
|
|
3043
|
+
},
|
|
3044
|
+
vi: {
|
|
3045
|
+
DISCLAIMER: 'Tuyên bố miễn trừ trách nhiệm',
|
|
3046
|
+
Activate: 'Kích hoạt',
|
|
3047
|
+
Autoplay: 'Tự động quay',
|
|
3048
|
+
Balance: 'Số dư',
|
|
3049
|
+
Bet: 'Cược',
|
|
3050
|
+
'BUY BONUS': 'MUA THƯỞNG',
|
|
3051
|
+
Buy: 'Mua',
|
|
3052
|
+
'Buy bonus': 'Mua thưởng',
|
|
3053
|
+
Cancel: 'Hủy',
|
|
3054
|
+
Close: 'Đóng',
|
|
3055
|
+
'Cluster pays': 'Trả theo cụm',
|
|
3056
|
+
Confirm: 'Xác nhận',
|
|
3057
|
+
Controls: 'Điều khiển',
|
|
3058
|
+
'Decrease your stake.': 'Giảm mức cược.',
|
|
3059
|
+
DISABLE: 'TẮT',
|
|
3060
|
+
'Dismiss the current overlay.': 'Đóng lớp phủ hiện tại.',
|
|
3061
|
+
'Free spins': 'Quay miễn phí',
|
|
3062
|
+
Game: 'Trò chơi',
|
|
3063
|
+
'Game info': 'Thông tin trò chơi',
|
|
3064
|
+
Hotkeys: 'Phím tắt',
|
|
3065
|
+
'Increase your stake.': 'Tăng mức cược.',
|
|
3066
|
+
'Lower bet': 'Giảm cược',
|
|
3067
|
+
'Master volume': 'Âm lượng chính',
|
|
3068
|
+
'Max win': 'Thắng tối đa',
|
|
3069
|
+
Menu: 'Menu',
|
|
3070
|
+
'Menu & info': 'Menu & thông tin',
|
|
3071
|
+
Modes: 'Chế độ',
|
|
3072
|
+
Music: 'Âm nhạc',
|
|
3073
|
+
Mute: 'Tắt âm',
|
|
3074
|
+
'Mute or unmute the game.': 'Tắt hoặc bật âm thanh trò chơi.',
|
|
3075
|
+
Navigate: 'Điều hướng',
|
|
3076
|
+
'Open settings and game info.': 'Mở cài đặt và thông tin trò chơi.',
|
|
3077
|
+
'Open the paytable and rules.': 'Mở bảng trả thưởng và quy tắc.',
|
|
3078
|
+
'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.',
|
|
3079
|
+
Paylines: 'Đường thắng',
|
|
3080
|
+
Paytable: 'Bảng trả thưởng',
|
|
3081
|
+
'Pays anywhere': 'Trả bất cứ đâu',
|
|
3082
|
+
Price: 'Giá',
|
|
3083
|
+
'Raise bet': 'Tăng cược',
|
|
3084
|
+
Replay: 'Xem lại',
|
|
3085
|
+
RTP: 'RTP',
|
|
3086
|
+
SFX: 'Hiệu ứng âm thanh',
|
|
3087
|
+
Settings: 'Cài đặt',
|
|
3088
|
+
Sound: 'Âm thanh',
|
|
3089
|
+
Spin: 'Quay',
|
|
3090
|
+
'Spin automatically a set number of times.': 'Tự động quay một số lần nhất định.',
|
|
3091
|
+
'Speed up spin animations.': 'Tăng tốc độ hoạt ảnh quay.',
|
|
3092
|
+
Start: 'Bắt đầu',
|
|
3093
|
+
'Start a spin at the current bet.': 'Bắt đầu quay với mức cược hiện tại.',
|
|
3094
|
+
'Start replay': 'Bắt đầu xem lại',
|
|
3095
|
+
'Total win': 'Tổng thắng',
|
|
3096
|
+
Turbo: 'Turbo',
|
|
3097
|
+
'Ways to win': 'Cách thắng',
|
|
3098
|
+
Win: 'Thắng',
|
|
3099
|
+
'Winning shapes': 'Hình thắng',
|
|
3100
|
+
},
|
|
3101
|
+
zh: {
|
|
3102
|
+
DISCLAIMER: '免责声明',
|
|
3103
|
+
Activate: '激活',
|
|
3104
|
+
Autoplay: '自动游戏',
|
|
3105
|
+
Balance: '余额',
|
|
3106
|
+
Bet: '投注',
|
|
3107
|
+
'BUY BONUS': '购买奖励',
|
|
3108
|
+
Buy: '购买',
|
|
3109
|
+
'Buy bonus': '购买奖励',
|
|
3110
|
+
Cancel: '取消',
|
|
3111
|
+
Close: '关闭',
|
|
3112
|
+
'Cluster pays': '集群赔付',
|
|
3113
|
+
Confirm: '确认',
|
|
3114
|
+
Controls: '控制',
|
|
3115
|
+
'Decrease your stake.': '降低投注额。',
|
|
3116
|
+
DISABLE: '禁用',
|
|
3117
|
+
'Dismiss the current overlay.': '关闭当前弹窗。',
|
|
3118
|
+
'Free spins': '免费旋转',
|
|
3119
|
+
Game: '游戏',
|
|
3120
|
+
'Game info': '游戏信息',
|
|
3121
|
+
Hotkeys: '快捷键',
|
|
3122
|
+
'Increase your stake.': '提高投注额。',
|
|
3123
|
+
'Lower bet': '降低投注',
|
|
3124
|
+
'Master volume': '主音量',
|
|
3125
|
+
'Max win': '最大奖金',
|
|
3126
|
+
Menu: '菜单',
|
|
3127
|
+
'Menu & info': '菜单与信息',
|
|
3128
|
+
Modes: '模式',
|
|
3129
|
+
Music: '音乐',
|
|
3130
|
+
Mute: '静音',
|
|
3131
|
+
'Mute or unmute the game.': '静音或取消静音。',
|
|
3132
|
+
Navigate: '导航',
|
|
3133
|
+
'Open settings and game info.': '打开设置和游戏信息。',
|
|
3134
|
+
'Open the paytable and rules.': '打开赔付表和规则。',
|
|
3135
|
+
'Pay a fixed cost to enter a bonus feature.': '支付固定费用以进入奖励功能。',
|
|
3136
|
+
Paylines: '赔付线',
|
|
3137
|
+
Paytable: '赔付表',
|
|
3138
|
+
'Pays anywhere': '任意位置赢',
|
|
3139
|
+
Price: '价格',
|
|
3140
|
+
'Raise bet': '提高投注',
|
|
3141
|
+
Replay: '重播',
|
|
3142
|
+
RTP: 'RTP',
|
|
3143
|
+
SFX: '音效',
|
|
3144
|
+
Settings: '设置',
|
|
3145
|
+
Sound: '声音',
|
|
3146
|
+
Spin: '旋转',
|
|
3147
|
+
'Spin automatically a set number of times.': '自动旋转设定次数。',
|
|
3148
|
+
'Speed up spin animations.': '加速旋转动画。',
|
|
3149
|
+
Start: '开始',
|
|
3150
|
+
'Start a spin at the current bet.': '以当前投注额开始旋转。',
|
|
3151
|
+
'Start replay': '开始重播',
|
|
3152
|
+
'Total win': '总奖金',
|
|
3153
|
+
Turbo: '急速',
|
|
3154
|
+
'Ways to win': '赢法',
|
|
3155
|
+
Win: '奖金',
|
|
3156
|
+
'Winning shapes': '赢利图形',
|
|
3157
|
+
},
|
|
3158
|
+
};
|
|
3159
|
+
|
|
1781
3160
|
// Social-casino language. English is the source (and, for now, the only) language; `socialize`
|
|
1782
3161
|
// rewrites the restricted gambling vocabulary into social-safe phrasing while preserving case.
|
|
1783
3162
|
//
|
|
@@ -1850,6 +3229,21 @@ function socialize(text) {
|
|
|
1850
3229
|
return repl == null ? m : applyCase(m, repl);
|
|
1851
3230
|
});
|
|
1852
3231
|
}
|
|
3232
|
+
const LANGS = ['de', 'en', 'es', 'fi', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt', 'ru', 'tr', 'vi', 'zh', 'da'];
|
|
3233
|
+
const LANG_SET = new Set(LANGS);
|
|
3234
|
+
function normalizeLang(code) {
|
|
3235
|
+
const base = (code ?? '').toLowerCase().split(/[-_]/)[0];
|
|
3236
|
+
return (LANG_SET.has(base) ? base : 'en');
|
|
3237
|
+
}
|
|
3238
|
+
function createI18n(opts) {
|
|
3239
|
+
const lang = normalizeLang(opts.language);
|
|
3240
|
+
const t = (src) => {
|
|
3241
|
+
if (lang === 'en')
|
|
3242
|
+
return opts.isSocial ? socialize(src) : src;
|
|
3243
|
+
return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
|
|
3244
|
+
};
|
|
3245
|
+
return { lang, t };
|
|
3246
|
+
}
|
|
1853
3247
|
|
|
1854
3248
|
const REMOVE_FADE_MS = 300;
|
|
1855
3249
|
class GameShell extends EventEmitter {
|
|
@@ -1865,10 +3259,19 @@ class GameShell extends EventEmitter {
|
|
|
1865
3259
|
prevBalance = 0;
|
|
1866
3260
|
prevWin = 0;
|
|
1867
3261
|
moneyAnims = [];
|
|
1868
|
-
|
|
3262
|
+
kbd;
|
|
3263
|
+
i18n;
|
|
3264
|
+
/** onKey handler of the currently open modal/overlay, if any (set in showModal, cleared in closeModal). */
|
|
3265
|
+
modalOnKey = undefined;
|
|
3266
|
+
/** Shared sound on/off state — Settings speaker toggle and the Shift+M hotkey stay in sync. The
|
|
3267
|
+
* game listens to `settingChange({ key: 'sound' })` to (un)mute audio. */
|
|
3268
|
+
soundOn = true;
|
|
3269
|
+
/** Set by the open Settings modal so Shift+M live-updates its speaker icon; cleared on close. */
|
|
3270
|
+
soundRefresh = null;
|
|
1869
3271
|
constructor(config) {
|
|
1870
3272
|
super();
|
|
1871
3273
|
this.config = config;
|
|
3274
|
+
this.i18n = createI18n({ language: config.language, isSocial: config.isSocial });
|
|
1872
3275
|
this.state = createInitialState(config);
|
|
1873
3276
|
this.styleEl = document.createElement('style');
|
|
1874
3277
|
this.styleEl.textContent = SHELL_CSS;
|
|
@@ -1884,12 +3287,54 @@ class GameShell extends EventEmitter {
|
|
|
1884
3287
|
this.prevWin = this.state.win;
|
|
1885
3288
|
this.observeLayout();
|
|
1886
3289
|
if (typeof document !== 'undefined') {
|
|
1887
|
-
|
|
3290
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
3291
|
+
const shell = this;
|
|
3292
|
+
const host = {
|
|
3293
|
+
get state() { return shell.state; },
|
|
3294
|
+
get hotkeysEnabled() { return shell.config.features.hotkeys !== false; },
|
|
3295
|
+
get spacebarEnabled() { return shell.config.features.spacebar !== false; },
|
|
3296
|
+
get turboLevels() { return shell.config.features.turbo; },
|
|
3297
|
+
get autoplayEnabled() { return shell.config.features.autoplay != null; },
|
|
3298
|
+
get buyBonusEnabled() { return shell.config.features.buyBonus !== false; },
|
|
3299
|
+
hasOpenLayer: () => shell.modalHost.childElementCount > 0,
|
|
3300
|
+
routeToLayer: (e) => shell.modalOnKey?.(e) ?? false,
|
|
3301
|
+
spin: () => shell.emit('spin'),
|
|
3302
|
+
stepBet: (dir) => {
|
|
3303
|
+
const next = stepBet(shell.state, dir);
|
|
3304
|
+
if (next === shell.state.bet)
|
|
3305
|
+
return;
|
|
3306
|
+
shell.state.bet = next;
|
|
3307
|
+
shell.emit('betChange', next);
|
|
3308
|
+
shell.render();
|
|
3309
|
+
},
|
|
3310
|
+
toggleAutoplay: () => {
|
|
3311
|
+
if (shell.state.autoplay.active) {
|
|
3312
|
+
shell.state.autoplay = { active: false, remaining: 0 };
|
|
3313
|
+
shell.emit('autoplayStop');
|
|
3314
|
+
shell.render();
|
|
3315
|
+
}
|
|
3316
|
+
else {
|
|
3317
|
+
shell.openAutoplayPicker();
|
|
3318
|
+
}
|
|
3319
|
+
},
|
|
3320
|
+
cycleTurbo: () => {
|
|
3321
|
+
const next = nextTurbo(shell.state.turbo, shell.config.features.turbo);
|
|
3322
|
+
shell.state.turbo = next;
|
|
3323
|
+
shell.emit('turboChange', next);
|
|
3324
|
+
shell.render();
|
|
3325
|
+
},
|
|
3326
|
+
openBuyBonus: () => shell.openBuyBonus(),
|
|
3327
|
+
openInfo: () => shell.openInfo(),
|
|
3328
|
+
openMenu: () => shell.openMenu(),
|
|
3329
|
+
toggleMute: () => shell.setSound(!shell.soundOn),
|
|
3330
|
+
closeLayer: () => shell.closeModal(),
|
|
3331
|
+
};
|
|
3332
|
+
this.kbd = new KeyboardController(host);
|
|
3333
|
+
this.kbd.attach();
|
|
1888
3334
|
// Stake serves the game in an iframe; on first paint focus is on the HOST page, so a `document`
|
|
1889
3335
|
// keydown never fires and Space scrolls the parent. Pull window focus into the iframe on the
|
|
1890
3336
|
// first pointer interaction so the spacebar shortcut works. Harmless on full-page Energy8.
|
|
1891
3337
|
document.addEventListener('pointerdown', this.pullFocus, true);
|
|
1892
|
-
this.keysBound = true;
|
|
1893
3338
|
}
|
|
1894
3339
|
this.render();
|
|
1895
3340
|
// re-fit once the bundled webfont swaps in (text metrics change → row width changes)
|
|
@@ -1992,46 +3437,32 @@ class GameShell extends EventEmitter {
|
|
|
1992
3437
|
zoomBar(s * (bar.clientWidth / bar.scrollWidth));
|
|
1993
3438
|
}
|
|
1994
3439
|
}
|
|
1995
|
-
/** Spacebar starts a spin — same path as the spin disc. Ignored when `features.spacebar` is
|
|
1996
|
-
* false, while a spin is running, while autoplay is active, outside base mode, when an
|
|
1997
|
-
* overlay/modal is open, or when an editable element is focused. `repeat` (held key) is
|
|
1998
|
-
* ignored so it can't spam. */
|
|
1999
3440
|
/** Pull window focus into the iframe on first pointer interaction so `document` keydown (the
|
|
2000
3441
|
* spacebar shortcut) fires. No-op / harmless when already focused or full-page. */
|
|
2001
3442
|
pullFocus = () => { try {
|
|
2002
3443
|
window.focus();
|
|
2003
3444
|
}
|
|
2004
3445
|
catch { /* cross-origin / non-browser */ } };
|
|
2005
|
-
handleKeyDown = (e) => {
|
|
2006
|
-
if (this.destroyed || e.code !== 'Space' || e.repeat)
|
|
2007
|
-
return;
|
|
2008
|
-
if (this.config.features.spacebar === false)
|
|
2009
|
-
return; // shortcut disabled (e.g. jurisdiction)
|
|
2010
|
-
const t = e.target;
|
|
2011
|
-
if (t && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)))
|
|
2012
|
-
return;
|
|
2013
|
-
// Space is ours now — swallow the browser default before any no-op bail. Otherwise the
|
|
2014
|
-
// native "Space activates the focused button" still fires and re-clicks whichever shell
|
|
2015
|
-
// <button> (menu/buy/auto) opened the overlay, tearing down + rebuilding the modal: a
|
|
2016
|
-
// visible flicker. (Also stops the page from scrolling on Space.)
|
|
2017
|
-
e.preventDefault();
|
|
2018
|
-
if (this.modalHost.childElementCount > 0)
|
|
2019
|
-
return; // an overlay/modal is open
|
|
2020
|
-
if (this.state.mode !== 'base' || this.state.busy || this.state.autoplay.active)
|
|
2021
|
-
return;
|
|
2022
|
-
this.emit('spin');
|
|
2023
|
-
};
|
|
2024
3446
|
setLayout(layout) {
|
|
2025
3447
|
if (layout === this.layout)
|
|
2026
3448
|
return;
|
|
2027
3449
|
this.layout = layout;
|
|
2028
3450
|
this.render();
|
|
2029
3451
|
}
|
|
2030
|
-
/** Resolve a built-in shell string
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
3452
|
+
/** Resolve a built-in shell string through the i18n resolver (translation + optional socialize). */
|
|
3453
|
+
t(text) { return this.i18n.t(text); }
|
|
3454
|
+
/** Toggle the social vocabulary at runtime (rebuilds resolver, re-renders bar). */
|
|
3455
|
+
setSocial(isSocial) {
|
|
3456
|
+
this.config.isSocial = isSocial;
|
|
3457
|
+
this.i18n = createI18n({ language: this.config.language, isSocial });
|
|
3458
|
+
this.render();
|
|
3459
|
+
}
|
|
3460
|
+
/** Swap the active language at runtime (rebuilds resolver, re-renders bar). */
|
|
3461
|
+
setLanguage(lang) {
|
|
3462
|
+
this.config.language = lang;
|
|
3463
|
+
this.i18n = createI18n({ language: lang, isSocial: this.config.isSocial });
|
|
3464
|
+
this.render();
|
|
3465
|
+
}
|
|
2035
3466
|
/** Recolour the shell at runtime (e.g. switch dark/light scheme). */
|
|
2036
3467
|
setTheme(theme) {
|
|
2037
3468
|
this.config.theme = theme;
|
|
@@ -2072,7 +3503,7 @@ class GameShell extends EventEmitter {
|
|
|
2072
3503
|
this.state.mode = mode;
|
|
2073
3504
|
this.render();
|
|
2074
3505
|
}
|
|
2075
|
-
setBusy(busy) { this.state.busy = busy; this.render(); }
|
|
3506
|
+
setBusy(busy) { this.state.busy = busy; this.render(); this.kbd?.notifyBusyChanged(busy); }
|
|
2076
3507
|
setAutoplay(a) { this.state.autoplay = a; this.render(); }
|
|
2077
3508
|
setTurbo(level) { this.state.turbo = level; this.render(); }
|
|
2078
3509
|
/** Currency-aware money formatter for WIN amounts (variable decimals: 0.0041 stays 0.0041, not
|
|
@@ -2080,7 +3511,7 @@ class GameShell extends EventEmitter {
|
|
|
2080
3511
|
formatWin(value) { return formatCurrency(value, this.config.currency, true); }
|
|
2081
3512
|
setBuyBonusEnabled(enabled) { this.state.buyBonusEnabled = enabled; this.render(); }
|
|
2082
3513
|
setFreeSpins(fs) { this.state.freeSpins = fs; this.render(); }
|
|
2083
|
-
showModal(el) {
|
|
3514
|
+
showModal(el, onKey) {
|
|
2084
3515
|
// The control that opened this overlay (menu/buy/auto) keeps DOM focus. Drop it, or a
|
|
2085
3516
|
// stray Space/Enter would natively re-activate that <button> and rebuild the modal — a
|
|
2086
3517
|
// visible flicker. Only relinquish focus we own (a shell control), never the host page's.
|
|
@@ -2089,6 +3520,7 @@ class GameShell extends EventEmitter {
|
|
|
2089
3520
|
active.blur();
|
|
2090
3521
|
this.modalHost.innerHTML = '';
|
|
2091
3522
|
this.modalHost.appendChild(el);
|
|
3523
|
+
this.modalOnKey = onKey;
|
|
2092
3524
|
this.fitModals();
|
|
2093
3525
|
}
|
|
2094
3526
|
/** Uniformly scale every open centred card modal (`.ge-sheet`) down so it fits a short/narrow
|
|
@@ -2141,22 +3573,31 @@ class GameShell extends EventEmitter {
|
|
|
2141
3573
|
}
|
|
2142
3574
|
openMenu() { this.emit('menuOpen'); this.openSettings(); }
|
|
2143
3575
|
openSettings() { this.emit('settingsOpen'); this.showModal(openSettingsModal(this)); }
|
|
2144
|
-
openInfo() { this.emit('infoOpen'); this.showModal(
|
|
3576
|
+
openInfo() { this.emit('infoOpen'); const { root, onKey } = openGameInfoModal(this); this.showModal(root, onKey); }
|
|
2145
3577
|
openBuyBonus() {
|
|
2146
3578
|
if (this.config.onBonusBuy) {
|
|
2147
3579
|
this.config.onBonusBuy();
|
|
2148
3580
|
return;
|
|
2149
3581
|
} // game handles it (own UI)
|
|
2150
|
-
const
|
|
2151
|
-
if (
|
|
2152
|
-
this.showModal(
|
|
3582
|
+
const result = openBuyBonusOverlay(this);
|
|
3583
|
+
if (result)
|
|
3584
|
+
this.showModal(result.root, result.onKey);
|
|
2153
3585
|
}
|
|
2154
3586
|
/** Open a generic, externally-driven modal (title + body + optional action buttons).
|
|
2155
3587
|
* Each action runs its `on` then closes; the ✕ shows when `availableClose` is true. */
|
|
2156
|
-
openModal(opts) { this.showModal(buildModal(opts)); }
|
|
3588
|
+
openModal(opts) { this.showModal(buildModal(opts), opts.onKey); }
|
|
2157
3589
|
/** Programmatically dismiss whatever modal/overlay is currently shown (e.g. auto-close the
|
|
2158
3590
|
* reconnect overlay once the link is restored). No-op when nothing is open. */
|
|
2159
|
-
closeModal() { this.modalHost.innerHTML = ''; }
|
|
3591
|
+
closeModal() { this.modalOnKey = undefined; this.soundRefresh = null; this.modalHost.innerHTML = ''; }
|
|
3592
|
+
/** Flip the shared sound state, notify the game (`settingChange({ key: 'sound' })`), and live-update
|
|
3593
|
+
* the Settings speaker icon if that modal is open. Used by both the Settings toggle and Shift+M. */
|
|
3594
|
+
setSound(on) {
|
|
3595
|
+
this.soundOn = on;
|
|
3596
|
+
this.emit('settingChange', { key: 'sound', value: on });
|
|
3597
|
+
this.soundRefresh?.(on);
|
|
3598
|
+
}
|
|
3599
|
+
/** The Settings modal registers an icon-updater while open (cleared on close). */
|
|
3600
|
+
setSoundRefresh(fn) { this.soundRefresh = fn; }
|
|
2160
3601
|
/** Open the non-dismissable replay summary modal (START REPLAY → onReplay → reopen). */
|
|
2161
3602
|
openReplay(opts) {
|
|
2162
3603
|
if (this.destroyed)
|
|
@@ -2164,19 +3605,18 @@ class GameShell extends EventEmitter {
|
|
|
2164
3605
|
this.showModal(buildReplayModal(this, opts));
|
|
2165
3606
|
}
|
|
2166
3607
|
/** Bet picker — list of available bets with an accent Confirm. */
|
|
2167
|
-
openBetPicker() { this.showModal(
|
|
3608
|
+
openBetPicker() { const { root, onKey } = openBetModal(this); this.showModal(root, onKey); }
|
|
2168
3609
|
/** Autoplay picker — spin-count list; Confirm starts autoplay. */
|
|
2169
|
-
openAutoplayPicker() { this.showModal(
|
|
3610
|
+
openAutoplayPicker() { const { root, onKey } = openAutoplayModal(this); this.showModal(root, onKey); }
|
|
2170
3611
|
destroy() {
|
|
2171
3612
|
if (this.destroyed)
|
|
2172
3613
|
return Promise.resolve();
|
|
2173
3614
|
this.destroyed = true;
|
|
2174
3615
|
this.ro?.disconnect();
|
|
2175
3616
|
this.ro = null;
|
|
2176
|
-
if (
|
|
2177
|
-
|
|
3617
|
+
if (typeof document !== 'undefined') {
|
|
3618
|
+
this.kbd?.detach();
|
|
2178
3619
|
document.removeEventListener('pointerdown', this.pullFocus, true);
|
|
2179
|
-
this.keysBound = false;
|
|
2180
3620
|
}
|
|
2181
3621
|
this.cancelMoneyAnims();
|
|
2182
3622
|
this.removeAllListeners();
|
|
@@ -2220,5 +3660,5 @@ function removeGameShell() {
|
|
|
2220
3660
|
return shell.destroy();
|
|
2221
3661
|
}
|
|
2222
3662
|
|
|
2223
|
-
export { GameShell, createGameShell, removeGameShell, socialize };
|
|
3663
|
+
export { GameShell, createGameShell, createI18n, normalizeLang, removeGameShell, socialize };
|
|
2224
3664
|
//# sourceMappingURL=shell.esm.js.map
|