@adiakys/feeling-lucky 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +227 -2
  3. package/dist/config/resolve.d.ts +4 -0
  4. package/dist/config/types.d.ts +62 -0
  5. package/dist/de-B56NsnDF.js +458 -0
  6. package/dist/developer/panel.d.ts +61 -0
  7. package/dist/developer/rig.d.ts +2 -0
  8. package/dist/developer/settings.d.ts +30 -0
  9. package/dist/engine/awards.d.ts +12 -0
  10. package/dist/engine/cards.d.ts +44 -0
  11. package/dist/engine/cashout.d.ts +32 -0
  12. package/dist/engine/dealer.d.ts +21 -0
  13. package/dist/engine/outcome.d.ts +13 -0
  14. package/dist/engine/pachinko.d.ts +58 -0
  15. package/dist/engine/random.d.ts +6 -0
  16. package/dist/engine/rig.d.ts +28 -0
  17. package/dist/engine/roulette.d.ts +53 -0
  18. package/dist/engine/scratch.d.ts +40 -0
  19. package/dist/engine/slot.d.ts +19 -0
  20. package/dist/engine/themes.d.ts +30 -0
  21. package/dist/engine/tiers.d.ts +64 -0
  22. package/dist/engine/wheel.d.ts +47 -0
  23. package/dist/es-9iWwCe8s.js +458 -0
  24. package/dist/feeling-lucky.iife.js +1494 -0
  25. package/dist/feeling-lucky.js +65 -0
  26. package/dist/fr-Y2BcCS3U.js +458 -0
  27. package/dist/games/blackjack/blackjack.d.ts +48 -0
  28. package/dist/games/cards/card.d.ts +5 -0
  29. package/dist/games/cards/dealer.d.ts +9 -0
  30. package/dist/games/cards/table.d.ts +12 -0
  31. package/dist/games/holdem/holdem.d.ts +29 -0
  32. package/dist/games/index.d.ts +9 -0
  33. package/dist/games/pachinko/pachinko.d.ts +53 -0
  34. package/dist/games/roulette/roulette.d.ts +63 -0
  35. package/dist/games/roulette/table.d.ts +19 -0
  36. package/dist/games/roulette/track.d.ts +18 -0
  37. package/dist/games/roulette/wheel.d.ts +9 -0
  38. package/dist/games/scratch/covers.d.ts +3 -0
  39. package/dist/games/scratch/double.d.ts +3 -0
  40. package/dist/games/scratch/forever.d.ts +3 -0
  41. package/dist/games/scratch/scratch.d.ts +39 -0
  42. package/dist/games/slot/breakaway.d.ts +32 -0
  43. package/dist/games/slot/machine.d.ts +18 -0
  44. package/dist/games/slot/slot.d.ts +32 -0
  45. package/dist/games/slot/takeoff.d.ts +28 -0
  46. package/dist/games/wheel/coin.d.ts +19 -0
  47. package/dist/games/wheel/face.d.ts +18 -0
  48. package/dist/games/wheel/hunt.d.ts +15 -0
  49. package/dist/games/wheel/wheel.d.ts +64 -0
  50. package/dist/i18n-it2FlmVZ.js +490 -0
  51. package/dist/index.d.ts +4 -0
  52. package/dist/it-CNSOLgaT.js +458 -0
  53. package/dist/locales/de/cards.d.ts +68 -0
  54. package/dist/locales/de/developer.d.ts +71 -0
  55. package/dist/locales/de/index.d.ts +2 -0
  56. package/dist/locales/de/pachinko.d.ts +26 -0
  57. package/dist/locales/de/room.d.ts +86 -0
  58. package/dist/locales/de/roulette.d.ts +77 -0
  59. package/dist/locales/de/scratch.d.ts +56 -0
  60. package/dist/locales/de/slot.d.ts +61 -0
  61. package/dist/locales/de/wheel.d.ts +45 -0
  62. package/dist/locales/en/cards.d.ts +68 -0
  63. package/dist/locales/en/developer.d.ts +71 -0
  64. package/dist/locales/en/index.d.ts +2 -0
  65. package/dist/locales/en/pachinko.d.ts +26 -0
  66. package/dist/locales/en/room.d.ts +86 -0
  67. package/dist/locales/en/roulette.d.ts +77 -0
  68. package/dist/locales/en/scratch.d.ts +56 -0
  69. package/dist/locales/en/slot.d.ts +61 -0
  70. package/dist/locales/en/wheel.d.ts +45 -0
  71. package/dist/locales/es/cards.d.ts +68 -0
  72. package/dist/locales/es/developer.d.ts +71 -0
  73. package/dist/locales/es/index.d.ts +2 -0
  74. package/dist/locales/es/pachinko.d.ts +26 -0
  75. package/dist/locales/es/room.d.ts +86 -0
  76. package/dist/locales/es/roulette.d.ts +77 -0
  77. package/dist/locales/es/scratch.d.ts +56 -0
  78. package/dist/locales/es/slot.d.ts +61 -0
  79. package/dist/locales/es/wheel.d.ts +45 -0
  80. package/dist/locales/fr/cards.d.ts +68 -0
  81. package/dist/locales/fr/developer.d.ts +71 -0
  82. package/dist/locales/fr/index.d.ts +2 -0
  83. package/dist/locales/fr/pachinko.d.ts +26 -0
  84. package/dist/locales/fr/room.d.ts +86 -0
  85. package/dist/locales/fr/roulette.d.ts +77 -0
  86. package/dist/locales/fr/scratch.d.ts +56 -0
  87. package/dist/locales/fr/slot.d.ts +61 -0
  88. package/dist/locales/fr/wheel.d.ts +45 -0
  89. package/dist/locales/index.d.ts +7 -0
  90. package/dist/locales/it/cards.d.ts +68 -0
  91. package/dist/locales/it/developer.d.ts +71 -0
  92. package/dist/locales/it/index.d.ts +2 -0
  93. package/dist/locales/it/pachinko.d.ts +26 -0
  94. package/dist/locales/it/room.d.ts +86 -0
  95. package/dist/locales/it/roulette.d.ts +77 -0
  96. package/dist/locales/it/scratch.d.ts +56 -0
  97. package/dist/locales/it/slot.d.ts +61 -0
  98. package/dist/locales/it/wheel.d.ts +45 -0
  99. package/dist/locales/merge.d.ts +2 -0
  100. package/dist/merge-iGSNfZkz.js +10 -0
  101. package/dist/mount-CBUkAcVV.js +7109 -0
  102. package/dist/panel-tWJMt9kl.js +545 -0
  103. package/dist/room/boost.d.ts +2 -0
  104. package/dist/room/certificate.d.ts +22 -0
  105. package/dist/room/chips.d.ts +21 -0
  106. package/dist/room/lobby.d.ts +45 -0
  107. package/dist/room/mount.d.ts +6 -0
  108. package/dist/room/room.d.ts +74 -0
  109. package/dist/room/stage.d.ts +18 -0
  110. package/dist/room/theme.d.ts +15 -0
  111. package/dist/runtime/context.d.ts +34 -0
  112. package/dist/runtime/element.d.ts +15 -0
  113. package/dist/runtime/fx.d.ts +43 -0
  114. package/dist/runtime/i18n.d.ts +8 -0
  115. package/dist/runtime/icons.d.ts +2 -0
  116. package/dist/runtime/motion.d.ts +2 -0
  117. package/dist/runtime/signal.d.ts +6 -0
  118. package/dist/runtime/sound.d.ts +11 -0
  119. package/dist/signal-CAveEGrG.js +19 -0
  120. package/dist/styles/index.d.ts +1 -0
  121. package/package.json +56 -4
@@ -0,0 +1,545 @@
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, I as o, L as s, M as c, N as l, O as u, P as d, R as f, S as p, T as m, _ as h, a as ee, b as te, c as ne, d as g, f as _, g as v, h as y, i as b, j as x, k as S, l as C, m as re, n as ie, o as w, p as ae, r as oe, s as T, u as se, v as E, w as ce, x as D, y as O, z as k } from "./mount-CBUkAcVV.js";
2
+ // node_modules/lit-html/directives/live.js
3
+ var A = x(class extends c {
4
+ constructor(t) {
5
+ if (super(t), t.type !== l.PROPERTY && t.type !== l.ATTRIBUTE && t.type !== l.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
6
+ if (!e(t)) throw Error("`live` bindings can only contain a single expression");
7
+ }
8
+ render(e) {
9
+ return e;
10
+ }
11
+ update(e, [t]) {
12
+ if (t === k || t === f) return t;
13
+ let n = e.element, r = e.name;
14
+ if (e.type === l.PROPERTY) {
15
+ if (t === n[r]) return k;
16
+ } else if (e.type === l.BOOLEAN_ATTRIBUTE) {
17
+ if (!!t === n.hasAttribute(r)) return k;
18
+ } else if (e.type === l.ATTRIBUTE && n.getAttribute(r) === t + "") return k;
19
+ return S(e), t;
20
+ }
21
+ }), j = [
22
+ ["path", { d: "m18 16 4-4-4-4" }],
23
+ ["path", { d: "m6 8-4 4 4 4" }],
24
+ ["path", { d: "m14.5 4-5 16" }]
25
+ ], M = [
26
+ ["circle", {
27
+ cx: "9",
28
+ cy: "12",
29
+ r: "1"
30
+ }],
31
+ ["circle", {
32
+ cx: "9",
33
+ cy: "5",
34
+ r: "1"
35
+ }],
36
+ ["circle", {
37
+ cx: "9",
38
+ cy: "19",
39
+ r: "1"
40
+ }],
41
+ ["circle", {
42
+ cx: "15",
43
+ cy: "12",
44
+ r: "1"
45
+ }],
46
+ ["circle", {
47
+ cx: "15",
48
+ cy: "5",
49
+ r: "1"
50
+ }],
51
+ ["circle", {
52
+ cx: "15",
53
+ cy: "19",
54
+ r: "1"
55
+ }]
56
+ ], N = [["rect", {
57
+ width: "18",
58
+ height: "11",
59
+ x: "3",
60
+ y: "11",
61
+ rx: "2",
62
+ ry: "2"
63
+ }], ["path", { d: "M7 11V7a5 5 0 0 1 9.9-1" }]], P = [["path", { d: "M5 12h14" }]], F = [
64
+ "automatic",
65
+ "loss",
66
+ "win",
67
+ "jackpot"
68
+ ], I = {
69
+ wheel: [
70
+ "segment",
71
+ "booster",
72
+ "prize"
73
+ ],
74
+ slot: ["combination", "prize"],
75
+ roulette: ["number", "storm"],
76
+ pachinko: ["pocket", "violet"],
77
+ scratch: ["award", "prize"],
78
+ blackjack: ["prize"],
79
+ holdem: ["prize"]
80
+ }, L = [
81
+ "segment",
82
+ "combination",
83
+ "number",
84
+ "pocket",
85
+ "award"
86
+ ], R = {}, z = { prizes: [] }, B = () => ({
87
+ multiplier: void 0,
88
+ variant: void 0,
89
+ result: "automatic",
90
+ advanced: {}
91
+ }), V = {
92
+ slot: ae,
93
+ scratch: re
94
+ }, H = (e) => R[e] ?? B();
95
+ function U(e) {
96
+ let t = e.indexOf(":");
97
+ return {
98
+ tier: e.slice(0, t),
99
+ award: e.slice(t + 1) || null
100
+ };
101
+ }
102
+ var W = {
103
+ none: "none",
104
+ pair: "small",
105
+ logos: "big",
106
+ sevens: "big",
107
+ infinities: "jackpot"
108
+ };
109
+ async function le(e, t) {
110
+ let n = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(e));
111
+ return [...new Uint8Array(n)].map((e) => e.toString(16).padStart(2, "0")).join("") === t.toLowerCase();
112
+ }
113
+ // src/developer/rig.ts
114
+ var G = {
115
+ automatic: void 0,
116
+ loss: "none",
117
+ win: "small",
118
+ jackpot: "jackpot"
119
+ }, ue = g.indexOf("jackpot");
120
+ function de(e, t) {
121
+ let { result: n, advanced: r } = H(e);
122
+ if (e === "wheel" && r.segment) {
123
+ let e = r.segment.split(":")[0];
124
+ return e === "coin" || e === "hunt" || e === "pachinko" ? t() === "big" ? "big" : "small" : e;
125
+ }
126
+ return e === "slot" && r.combination ? W[r.combination] : e === "pachinko" && r.pocket ? g[Number(r.pocket) - 1] : e === "scratch" && r.award ? U(r.award).tier : G[n] ?? t();
127
+ }
128
+ var K = () => H("pachinko").result === "jackpot" && !H("pachinko").advanced.pocket;
129
+ function q(e, t) {
130
+ let r = Math.min(...e.map((e) => e.x)) + 16, i = Math.max(...e.map((e) => e.x)) - 16, a = (r + i) / 2;
131
+ return [...new Set(e.map((e) => e.y))].sort((e, t) => e - t).slice(1, 1 + t).flatMap((t) => {
132
+ let o = Math.max(r, Math.min(i, a + n(-25, 25))), s = e.filter((e) => e.y === t).sort((e, t) => Math.abs(e.x - o) - Math.abs(t.x - o))[0];
133
+ return s ? (a = s.x, [s]) : [];
134
+ });
135
+ }
136
+ var J = {
137
+ boost: ({ game: e }, t) => H(e).multiplier ?? t(),
138
+ tier: ({ game: e }, t) => de(e, t),
139
+ prize: ({ game: e, prizeIds: t }, n) => {
140
+ let { prize: r, award: i } = H(e).advanced;
141
+ if (r && t.includes(r)) return r;
142
+ if (e !== "scratch" || !i) return n();
143
+ let { tier: a, award: o } = U(i), s = D(z.prizes.filter(({ id: e }) => t.includes(e)), a, o);
144
+ return s.length ? p(s).id : n();
145
+ },
146
+ "wheel.segment": ({ segments: e }, t) => {
147
+ let n = H("wheel").advanced.segment, r = n ? e.flatMap((e, t) => ne(e) === n ? [t] : []) : [];
148
+ return r.length ? p(r) : t();
149
+ },
150
+ "wheel.booster": ({ segments: e }, t) => {
151
+ let n = H("wheel").advanced.booster;
152
+ return n && T(e).includes(n) ? n : t();
153
+ },
154
+ "slot.line": ({ prizeId: e }, t) => {
155
+ let { combination: n } = H("slot").advanced, r = n === "logos" ? e : n === "sevens" ? "seven" : void 0;
156
+ return r ? [
157
+ r,
158
+ r,
159
+ r
160
+ ] : t();
161
+ },
162
+ "roulette.number": ({ bets: e, storm: t, boost: n }, r) => {
163
+ let { result: i, advanced: a } = H("roulette");
164
+ if (a.number) return Number(a.number);
165
+ let o = G[i];
166
+ if (!o && !a.storm) return r();
167
+ let s = ie.filter((n) => {
168
+ let r = oe(e, n)?.tier ?? "none";
169
+ return (!o || (o === "small" ? r !== "none" : r === o)) && (!a.storm || t.includes(n) === (a.storm === "hit"));
170
+ });
171
+ return s.length ? p(s.flatMap((e) => Array(t.includes(e) ? n : 1).fill(e))) : r();
172
+ },
173
+ "pachinko.board": ({ pegs: e }, t) => {
174
+ let n = t();
175
+ if (!K()) return n;
176
+ let [r, i] = _, a = (e) => e.y >= r && e.y <= i;
177
+ if (H("pachinko").advanced.violet === "hit") {
178
+ let t = q(e, 9), n = p(t.filter(a));
179
+ return {
180
+ violet: n,
181
+ reds: t.filter((e) => e !== n)
182
+ };
183
+ }
184
+ let o = q(e, 8), s = e.filter((e) => !o.includes(e) && a(e));
185
+ return {
186
+ violet: s.includes(n.violet) ? n.violet : p(s),
187
+ reds: o
188
+ };
189
+ },
190
+ "pachinko.route": ({ violet: e, reds: t }, n) => {
191
+ let { violet: r } = H("pachinko").advanced;
192
+ return !K() && !r ? n() : {
193
+ through: [...K() ? t : [], ...r === "hit" ? [e] : []].sort((e, t) => e.y - t.y),
194
+ avoid: r === "miss" ? [e] : []
195
+ };
196
+ },
197
+ "pachinko.wins": (e, t) => {
198
+ let n = G[H("pachinko").result];
199
+ return n ? n !== "none" : t();
200
+ },
201
+ "pachinko.pocket": (e, t) => {
202
+ let { pocket: n } = H("pachinko").advanced;
203
+ return n ? Number(n) - 1 : K() ? ue : t();
204
+ },
205
+ "scratch.ticket": (e, t) => H("scratch").variant ?? t(),
206
+ locale: (e, t) => z.locale ?? t(),
207
+ dealer: ({ count: e }, t) => z.dealer === void 0 ? t() : z.dealer === "none" ? null : z.dealer < e ? z.dealer : t(),
208
+ theme: (e, t) => z.theme === void 0 ? t() : z.theme === "none" ? null : z.theme,
209
+ "slot.machine": (e, t) => H("slot").variant ?? t(),
210
+ "breakaway.tackle": (e, t) => G[H("slot").result] && G[H("slot").result] !== "none" ? null : t(),
211
+ "scratch.award": (e, t) => {
212
+ let { award: n } = H("scratch").advanced;
213
+ return n ? U(n).award : t();
214
+ }
215
+ }, Y = "feeling-lucky.developer", X = 8, Z = [
216
+ "small",
217
+ "big",
218
+ "coin",
219
+ "hunt",
220
+ "pachinko",
221
+ "jackpot"
222
+ ], Q = !1, $ = class extends ee {
223
+ constructor() {
224
+ super(), this.open = !0, this.unlocked = Q, this.password = "", this.wrong = !1, this.minimized = !1, this.position = {
225
+ x: innerWidth - 416 - 16,
226
+ y: 108
227
+ }, this.selected = "wheel", this.draft = B(), this.loads = 0, this.advancedOpen = !1, this.drag = null, this.dragged = !1, this.lastFocus = null, this.grab = (e) => {
228
+ if (e.button !== 0 || !this.minimized && e.target.closest("button")) return;
229
+ let t = this.box.getBoundingClientRect();
230
+ this.drag = {
231
+ offsetX: e.clientX - t.left,
232
+ offsetY: e.clientY - t.top,
233
+ startX: e.clientX,
234
+ startY: e.clientY
235
+ }, this.dragged = !1, e.currentTarget.setPointerCapture(e.pointerId);
236
+ }, this.move = (e) => {
237
+ this.drag && (!this.dragged && Math.hypot(e.clientX - this.drag.startX, e.clientY - this.drag.startY) < 4 || (this.dragged = !0, this.place(e.clientX - this.drag.offsetX, e.clientY - this.drag.offsetY)));
238
+ }, this.release = () => {
239
+ this.drag && this.dragged && this.save(), this.drag = null;
240
+ }, this.restore = () => {
241
+ this.dragged ? this.dragged = !1 : this.minimize(!1);
242
+ }, this.unlock = async (e) => {
243
+ e.preventDefault();
244
+ let t = this.password;
245
+ this.password = "", this.wrong = !await le(t, this.passwordHash ?? ""), !this.wrong && (this.grant(), this.focusFirst());
246
+ }, this.apply = () => {
247
+ let e = Object.fromEntries(Object.entries(this.draft.advanced).filter(([, e]) => e !== void 0));
248
+ this.draft.multiplier !== void 0 || this.draft.variant !== void 0 || this.draft.result !== "automatic" || Object.keys(e).length ? R[this.selected] = {
249
+ ...this.draft,
250
+ advanced: e
251
+ } : delete R[this.selected], h(this.selected);
252
+ }, this.reset = () => {
253
+ for (let e of y) delete R[e];
254
+ this.load(this.selected), h(this.selected);
255
+ }, this.toggle = () => {
256
+ this.open = !this.open, this.open ? (this.lastFocus = this.activeElement, this.focusFirst()) : this.lastFocus instanceof HTMLElement && this.lastFocus.isConnected && this.lastFocus.focus();
257
+ }, this.shortcut = (e) => {
258
+ e.ctrlKey && e.shiftKey && e.code === "KeyL" && (e.preventDefault(), e.stopPropagation(), e.repeat || this.toggle());
259
+ }, this.keydown = (e) => {
260
+ e.stopPropagation(), e.key === "Escape" && this.toggle();
261
+ }, this.fit = () => this.place(this.position.x, this.position.y), this.segmentOption = (e) => {
262
+ if (e === "none") return {
263
+ value: e,
264
+ label: this.t("developer.option.nothing")
265
+ };
266
+ if (e === "jackpot") return {
267
+ value: e,
268
+ label: this.t("developer.jackpot")
269
+ };
270
+ if (e === "coin" || e === "hunt" || e === "pachinko") return {
271
+ value: e,
272
+ label: this.t(`wheel.segment.${e}`)
273
+ };
274
+ let { tier: t, award: n } = U(e);
275
+ return {
276
+ value: e,
277
+ label: this.awardLabel(t, n)
278
+ };
279
+ }, this.selectGame = (e) => {
280
+ this.selected = e.target.value, this.load(this.selected);
281
+ };
282
+ try {
283
+ let e = JSON.parse(localStorage.getItem(Y) ?? "null");
284
+ e && (this.position = {
285
+ x: e.x,
286
+ y: e.y
287
+ }, this.minimized = e.minimized);
288
+ } catch {}
289
+ this.load(this.selected);
290
+ }
291
+ willUpdate() {
292
+ z.prizes = this.room.prizes, !this.unlocked && this.passwordHash === void 0 && this.grant();
293
+ }
294
+ get activeElement() {
295
+ return this.getRootNode().activeElement;
296
+ }
297
+ load(e) {
298
+ this.draft = structuredClone(H(e)), this.loads++;
299
+ }
300
+ save() {
301
+ try {
302
+ localStorage.setItem(Y, JSON.stringify({
303
+ ...this.position,
304
+ minimized: this.minimized
305
+ }));
306
+ } catch {}
307
+ }
308
+ place(e, t) {
309
+ let n = this.box?.offsetWidth ?? 0, r = this.box?.offsetHeight ?? 0;
310
+ this.position = {
311
+ x: Math.max(X, Math.min(innerWidth - n - X, e)),
312
+ y: Math.max(X, Math.min(innerHeight - r - X, t))
313
+ };
314
+ }
315
+ async focusFirst() {
316
+ await this.updateComplete, this.place(this.position.x, this.position.y), (this.minimized && this.unlocked ? this.iconButton : this.first)?.focus();
317
+ }
318
+ minimize(e) {
319
+ this.minimized = e, this.save(), this.focusFirst();
320
+ }
321
+ grant() {
322
+ v(J), this.unlocked = Q = !0;
323
+ }
324
+ setLanguage(e) {
325
+ z.locale = e || void 0, E.value++;
326
+ }
327
+ setDealer(e) {
328
+ z.dealer = e === "" ? void 0 : e === "none" ? "none" : Number(e), E.value++, this.requestUpdate();
329
+ }
330
+ setTheme(e) {
331
+ z.theme = e || void 0, E.value++, this.requestUpdate();
332
+ }
333
+ connectedCallback() {
334
+ super.connectedCallback(), this.lastFocus = this.activeElement, addEventListener("keydown", this.shortcut, !0), addEventListener("resize", this.fit);
335
+ }
336
+ firstUpdated() {
337
+ this.focusFirst();
338
+ }
339
+ disconnectedCallback() {
340
+ super.disconnectedCallback(), removeEventListener("keydown", this.shortcut, !0), removeEventListener("resize", this.fit);
341
+ }
342
+ awardLabel(e, t) {
343
+ return this.t("developer.option.award", {
344
+ tier: this.t(`tier.${e}`),
345
+ award: this.room.award(e, t)
346
+ });
347
+ }
348
+ options(e) {
349
+ let t = (e, t) => [{
350
+ value: "hit",
351
+ label: this.t(`developer.option.${e}`)
352
+ }, {
353
+ value: "miss",
354
+ label: this.t(`developer.option.${t}`)
355
+ }], n = () => T(C(this.room.board)).sort((e, t) => Z.indexOf(e.split(":")[0]) - Z.indexOf(t.split(":")[0]));
356
+ switch (e) {
357
+ case "segment": return ["none", ...n()].map(this.segmentOption);
358
+ case "booster": return n().map(this.segmentOption);
359
+ case "prize": return this.room.prizes.map((e) => ({
360
+ value: e.id,
361
+ label: e.name
362
+ }));
363
+ case "combination": return [
364
+ "none",
365
+ "pair",
366
+ "logos",
367
+ "sevens",
368
+ "infinities"
369
+ ].map((e) => ({
370
+ value: e,
371
+ label: this.t(`developer.option.${e}`)
372
+ }));
373
+ case "number": return Array.from({ length: 37 }, (e, t) => ({
374
+ value: String(t),
375
+ label: String(t)
376
+ }));
377
+ case "storm": return t("lands", "misses");
378
+ case "violet": return t("hit", "miss");
379
+ case "pocket": return g.map((e, t) => ({
380
+ value: String(t + 1),
381
+ label: this.t("developer.option.pocket", { n: t + 1 })
382
+ }));
383
+ case "award": return O.flatMap((e) => this.room.board[e].map((t) => ({
384
+ value: te(e, t),
385
+ label: this.awardLabel(e, t)
386
+ })));
387
+ }
388
+ }
389
+ change(e, t) {
390
+ this.draft = {
391
+ ...this.draft,
392
+ [e]: t
393
+ };
394
+ }
395
+ changeAdvanced(e, t) {
396
+ this.draft = {
397
+ ...this.draft,
398
+ advanced: {
399
+ ...this.draft.advanced,
400
+ [e]: t || void 0
401
+ }
402
+ };
403
+ }
404
+ choices(e, n, r) {
405
+ return t`<option value="" ?selected=${n === void 0}>${r}</option>
406
+ ${e.map((e) => t`<option value=${e.value} ?selected=${e.value === n}>${e.label}</option>`)}`;
407
+ }
408
+ renderBody() {
409
+ if (!this.unlocked) return t`<form class="lk-dev-body" @submit=${this.unlock}>
410
+ <label class="lk-dev-row">${this.t("developer.password")}
411
+ <input
412
+ data-first
413
+ type="password"
414
+ autocomplete="off"
415
+ .value=${A(this.password)}
416
+ aria-invalid=${this.wrong}
417
+ aria-describedby=${this.wrong ? "lk-dev-wrong" : f}
418
+ @input=${(e) => {
419
+ this.password = e.target.value, this.wrong = !1;
420
+ }}
421
+ />
422
+ </label>
423
+ ${this.wrong ? t`<p id="lk-dev-wrong" class="lk-dev-error" role="alert">${this.t("developer.wrongPassword")}</p>` : f}
424
+ <footer>
425
+ <button type="submit" class="is-primary" ?disabled=${!this.password}>${b(N)}${this.t("developer.unlock")}</button>
426
+ </footer>
427
+ </form>`;
428
+ let { selected: e, draft: n } = this, a = I[e].find((e) => L.includes(e) && n.advanced[e] !== void 0), o = V[e], s = (e) => e.target.value;
429
+ return t`<div class="lk-dev-body">
430
+ <p class="lk-dev-hint">${this.t("developer.hint")}</p>
431
+ <label class="lk-dev-row">${this.t("developer.theme")}
432
+ <select data-first @change=${(e) => this.setTheme(s(e))}>
433
+ ${this.choices([{
434
+ value: "none",
435
+ label: this.t("developer.noTheme")
436
+ }, ...se.map((e) => ({
437
+ value: e,
438
+ label: this.t(`themes.${e}.name`)
439
+ }))], z.theme, this.t("developer.calendar"))}
440
+ </select>
441
+ </label>
442
+ <label class="lk-dev-row">${this.t("developer.language")}
443
+ <select @change=${(e) => this.setLanguage(s(e))}>
444
+ ${this.choices(this.room.locales.map((e) => ({
445
+ value: e,
446
+ label: new Intl.DisplayNames([e], { type: "language" }).of(e) ?? e
447
+ })), z.locale, this.t("developer.autoLanguage"))}
448
+ </select>
449
+ </label>
450
+ ${this.room.dealers.length ? t`<label class="lk-dev-row">${this.t("developer.dealer")}
451
+ <select @change=${(e) => this.setDealer(s(e))}>
452
+ ${this.choices([{
453
+ value: "none",
454
+ label: this.t("developer.dealerAbsent")
455
+ }, ...this.room.dealers.map((e, t) => ({
456
+ value: String(t),
457
+ label: e.name ?? this.t("developer.dealerNumber", { n: t + 1 })
458
+ }))], z.dealer === void 0 ? void 0 : String(z.dealer), this.t("developer.dealerShifts"))}
459
+ </select>
460
+ </label>` : f}
461
+ <label class="lk-dev-row">${this.t("developer.game")}
462
+ <select @change=${this.selectGame}>
463
+ ${y.map((n) => t`<option value=${n} ?selected=${n === e}>${this.t(`games.${n}.name`)}</option>`)}
464
+ </select>
465
+ </label>
466
+ ${u(this.loads, t`<label class="lk-dev-row">${this.t("developer.multiplier")}
467
+ <select @change=${(e) => this.change("multiplier", Number(s(e)) || void 0)}>
468
+ ${this.choices([
469
+ 1,
470
+ 2,
471
+ 3,
472
+ 4,
473
+ 5
474
+ ].map((e) => ({
475
+ value: String(e),
476
+ label: `×${e}`
477
+ })), n.multiplier?.toString(), this.t("developer.daily"))}
478
+ </select>
479
+ </label>
480
+ ${o ? t`<label class="lk-dev-row">${this.t(`developer.variant.${e}`)}
481
+ <select @change=${(e) => this.change("variant", s(e) || void 0)}>
482
+ ${this.choices(o.map((t) => ({
483
+ value: t,
484
+ label: this.t(`${e}.names.${t}`)
485
+ })), n.variant, this.t("developer.daily"))}
486
+ </select>
487
+ </label>` : f}
488
+ <label class="lk-dev-row">${this.t("developer.result")}
489
+ <select ?disabled=${!!a} @change=${(e) => this.change("result", s(e))}>
490
+ ${F.map((e) => t`<option value=${e} ?selected=${e === n.result}>${this.t(`developer.${e}`)}</option>`)}
491
+ </select>
492
+ </label>
493
+ ${a ? t`<p class="lk-dev-note">${this.t("developer.decidedBy", { field: this.t(`developer.field.${a}`) })}</p>` : f}
494
+
495
+ <details
496
+ class="lk-dev-advanced"
497
+ ?open=${this.advancedOpen || I[e].some((e) => n.advanced[e] !== void 0)}
498
+ @toggle=${(e) => this.advancedOpen = e.target.open}
499
+ >
500
+ <summary>${b(i)}${this.t("developer.advanced")}</summary>
501
+ ${I[e].map((e) => t`<label class="lk-dev-row">${this.t(`developer.field.${e}`)}
502
+ <select @change=${(t) => this.changeAdvanced(e, s(t))}>
503
+ ${this.choices(this.options(e), n.advanced[e], this.t("developer.automatic"))}
504
+ </select>
505
+ </label>`)}
506
+ <p class="lk-dev-note">${this.t(`developer.about.${e}`)}</p>
507
+ </details>`)}
508
+
509
+ <footer>
510
+ <button type="button" @click=${this.reset}>${b(m)}${this.t("developer.reset")}</button>
511
+ <button type="button" class="is-primary" @click=${this.apply}>${b(r)}${this.t("developer.apply")}</button>
512
+ </footer>
513
+ </div>`;
514
+ }
515
+ render() {
516
+ if (!this.open) return f;
517
+ let e = this.unlocked && this.minimized;
518
+ return t`<div class="lk-dev ${e ? "is-icon" : ""}" style="left: ${this.position.x}px; top: ${this.position.y}px" @keydown=${this.keydown}>
519
+ ${e ? t`<button
520
+ type="button"
521
+ class="lk-dev-icon"
522
+ aria-label=${this.t("developer.restore")}
523
+ title=${this.t("developer.restore")}
524
+ @pointerdown=${this.grab}
525
+ @pointermove=${this.move}
526
+ @pointerup=${this.release}
527
+ @pointercancel=${this.release}
528
+ @click=${this.restore}
529
+ >
530
+ ${b(j)}
531
+ </button>` : t`<section class="lk-dev-panel" aria-label=${this.t("developer.title")}>
532
+ <header @pointerdown=${this.grab} @pointermove=${this.move} @pointerup=${this.release} @pointercancel=${this.release}>
533
+ ${b(M, "lk-dev-grip")}
534
+ <strong>${b(j)}${this.t("developer.title")}</strong>
535
+ ${this.unlocked ? t`<button type="button" aria-label=${this.t("developer.minimize")} title=${this.t("developer.minimize")} @click=${() => this.minimize(!0)}>
536
+ ${b(P)}
537
+ </button>` : f}
538
+ <button type="button" aria-label=${this.t("developer.close")} title=${this.t("developer.close")} @click=${this.toggle}>${b(ce)}</button>
539
+ </header>
540
+ ${this.renderBody()}
541
+ </section>`}
542
+ </div>`;
543
+ }
544
+ };
545
+ w([o({ attribute: !1 })], $.prototype, "passwordHash", void 0), w([a()], $.prototype, "open", void 0), w([a()], $.prototype, "unlocked", void 0), w([a()], $.prototype, "password", void 0), w([a()], $.prototype, "wrong", void 0), w([a()], $.prototype, "minimized", void 0), w([a()], $.prototype, "position", void 0), w([a()], $.prototype, "selected", void 0), w([a()], $.prototype, "draft", void 0), w([a()], $.prototype, "loads", void 0), w([a()], $.prototype, "advancedOpen", void 0), w([d(".lk-dev")], $.prototype, "box", void 0), w([d(".lk-dev [data-first]")], $.prototype, "first", void 0), w([d(".lk-dev-icon")], $.prototype, "iconButton", void 0), $ = w([s("fl-developer")], $);
@@ -0,0 +1,2 @@
1
+ import type { Translate } from '../runtime/i18n';
2
+ export declare const boost: (t: Translate, multiplier: number, dealer?: boolean) => import("lit-html").TemplateResult<1>;
@@ -0,0 +1,22 @@
1
+ import type { Win } from '../config/types';
2
+ import type { Outcome } from '../engine/outcome';
3
+ import { LuckyElement } from '../runtime/element';
4
+ export declare class Certificate extends LuckyElement {
5
+ outcome: Outcome;
6
+ win: Win;
7
+ claim?: (win: Win) => Promise<void>;
8
+ private stage;
9
+ private gift;
10
+ private rising;
11
+ private claiming;
12
+ private claimed;
13
+ private error;
14
+ private seal?;
15
+ private lid?;
16
+ private get jackpot();
17
+ private stamp;
18
+ private unwrap;
19
+ private onClaim;
20
+ firstUpdated(): Promise<void>;
21
+ render(): import("lit-html").TemplateResult<1>;
22
+ }
@@ -0,0 +1,21 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import { LuckyElement } from '../runtime/element';
3
+ export declare class Chips extends LuckyElement {
4
+ chosen: string;
5
+ disabled: boolean;
6
+ locked: string | null;
7
+ count?: {
8
+ used: number;
9
+ max: number;
10
+ };
11
+ private edges;
12
+ private strip?;
13
+ protected willUpdate(changed: PropertyValues<this>): void;
14
+ protected updated(changed: PropertyValues<this>): void;
15
+ private reveal;
16
+ private measure;
17
+ private wheel;
18
+ private choose;
19
+ private message;
20
+ render(): import("lit-html").TemplateResult<1>;
21
+ }
@@ -0,0 +1,45 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import '../games/roulette/wheel';
3
+ import '../games/slot/machine';
4
+ import '../games/wheel/face';
5
+ import { LuckyElement } from '../runtime/element';
6
+ export declare class Lobby extends LuckyElement {
7
+ page: number;
8
+ private takeoffShown;
9
+ private grid?;
10
+ constructor();
11
+ private strips;
12
+ private stripsFor?;
13
+ private struck;
14
+ private flipping;
15
+ private touchY;
16
+ private takeoffRaf;
17
+ private observer?;
18
+ private spins;
19
+ protected willUpdate(changed: PropertyValues<this>): void;
20
+ private turnPage;
21
+ private inRoom;
22
+ private flip;
23
+ private touchStart;
24
+ private touchEnd;
25
+ private pageKeys;
26
+ private climb;
27
+ private accelerate;
28
+ connectedCallback(): void;
29
+ firstUpdated(): Promise<void>;
30
+ disconnectedCallback(): void;
31
+ private play;
32
+ private meta;
33
+ private takeoffArt;
34
+ private breakawayArt;
35
+ private rouletteArt;
36
+ private pachinkoArt;
37
+ private scratchArt;
38
+ private art;
39
+ render(): import("lit-html").TemplateResult<1>;
40
+ }
41
+ declare global {
42
+ interface HTMLElementTagNameMap {
43
+ 'fl-lobby': Lobby;
44
+ }
45
+ }
@@ -0,0 +1,6 @@
1
+ import type { Room, RoomConfig } from './room';
2
+ import './room';
3
+ export declare function mountRoom(host: HTMLElement, config: RoomConfig, origin?: {
4
+ x: number;
5
+ y: number;
6
+ }): Room;