@scrabble-solver/scrabble-solver 2.10.7 → 2.10.8

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 (95) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +7 -13
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_8dgz12 +1 -1
  5. package/.next/cache/next-server.js.nft.json +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  9. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  10. package/.next/cache/webpack/server-production/0.pack +0 -0
  11. package/.next/cache/webpack/server-production/index.pack +0 -0
  12. package/.next/next-server.js.nft.json +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/176.js +4273 -214
  16. package/.next/server/middleware-build-manifest.js +1 -1
  17. package/.next/server/pages/404.html +2 -2
  18. package/.next/server/pages/404.js.nft.json +1 -1
  19. package/.next/server/pages/500.html +2 -2
  20. package/.next/server/pages/_app.js +296 -13
  21. package/.next/server/pages/_app.js.nft.json +1 -1
  22. package/.next/server/pages/_document.js.nft.json +1 -1
  23. package/.next/server/pages/api/solve.js +17 -0
  24. package/.next/server/pages/index.html +1 -9
  25. package/.next/server/pages/index.js +23 -16
  26. package/.next/server/pages/index.js.nft.json +1 -1
  27. package/.next/server/pages/index.json +1 -1
  28. package/.next/server/pages-manifest.json +1 -1
  29. package/.next/static/Cs23uxWG6AxS72F2yrjHu/_buildManifest.js +1 -0
  30. package/.next/static/chunks/pages/{404-67383848027ec49b.js → 404-8cab6d62fe4ead73.js} +1 -1
  31. package/.next/static/chunks/pages/_app-dcbbb823dc93a031.js +28 -0
  32. package/.next/static/chunks/pages/index-df1ff01aa82d2d4d.js +1 -0
  33. package/.next/static/css/bf2e969b88c4e3dd.css +2 -0
  34. package/.next/static/css/d1cc6b79b211b7b8.css +1 -0
  35. package/.next/trace +55 -55
  36. package/package.json +10 -9
  37. package/src/components/Badge/Badge.module.scss +1 -1
  38. package/src/components/Board/components/Cell/Cell.module.scss +32 -64
  39. package/src/components/Board/components/Cell/CellPure.tsx +15 -22
  40. package/src/components/Button/Button.module.scss +2 -2
  41. package/src/components/Checkbox/Checkbox.tsx +1 -4
  42. package/src/components/Dictionary/Dictionary.tsx +28 -30
  43. package/src/components/DictionaryInput/DictionaryInput.tsx +3 -0
  44. package/src/components/Key/Key.module.scss +1 -1
  45. package/src/components/LogoSplashScreen/LogoSplashScreen.module.scss +1 -1
  46. package/src/components/Modal/Modal.module.scss +4 -2
  47. package/src/components/Rack/Rack.module.scss +4 -0
  48. package/src/components/Radio/Radio.tsx +1 -4
  49. package/src/components/Results/Results.module.scss +2 -2
  50. package/src/components/SeoMessage/SeoMessage.tsx +19 -0
  51. package/src/components/SeoMessage/index.ts +1 -0
  52. package/src/components/Solver/components/EmptyState/EmptyState.module.scss +1 -1
  53. package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.module.scss +9 -2
  54. package/src/components/Solver/components/ResultCandidatePicker/ResultCandidatePicker.tsx +2 -1
  55. package/src/components/Tile/Tile.module.scss +49 -11
  56. package/src/components/Tile/Tile.tsx +23 -8
  57. package/src/components/Tile/TilePure.tsx +27 -20
  58. package/src/components/Tooltip/Tooltip.module.scss +7 -7
  59. package/src/components/index.ts +1 -0
  60. package/src/i18n/de.json +1 -0
  61. package/src/i18n/en.json +1 -0
  62. package/src/i18n/es.json +1 -0
  63. package/src/i18n/fa.json +1 -0
  64. package/src/i18n/fr.json +1 -0
  65. package/src/i18n/pl.json +1 -0
  66. package/src/icons/Flag.svg +2 -2
  67. package/src/icons/FlagFill.svg +4 -0
  68. package/src/icons/Square.svg +4 -0
  69. package/src/icons/SquareFill.svg +4 -0
  70. package/src/icons/index.ts +3 -0
  71. package/src/modals/RemainingTilesModal/components/Character/Character.module.scss +1 -1
  72. package/src/modals/ResultsModal/ResultsModal.module.scss +1 -1
  73. package/src/modals/SettingsModal/components/AutoGroupTilesSetting/AutoGroupTilesSetting.tsx +1 -2
  74. package/src/modals/SettingsModal/components/ConfigSetting/ConfigSetting.tsx +1 -2
  75. package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.module.scss +14 -24
  76. package/src/modals/SettingsModal/components/LocaleSetting/LocaleSetting.tsx +1 -2
  77. package/src/pages/_app.tsx +9 -5
  78. package/src/pages/index.module.scss +1 -2
  79. package/src/pages/index.tsx +10 -8
  80. package/src/parameters/index.ts +10 -0
  81. package/src/state/slices/boardSlice.ts +5 -5
  82. package/src/styles/mixins.scss +4 -2
  83. package/src/styles/variables.scss +39 -32
  84. package/src/types/index.ts +1 -0
  85. package/.next/server/chunks/579.js +0 -3925
  86. package/.next/static/6RggBFm8kHrh-k1-CG3um/_buildManifest.js +0 -1
  87. package/.next/static/chunks/490-d29992f1c264d70e.js +0 -5
  88. package/.next/static/chunks/509-6ad4482d4351452c.js +0 -1
  89. package/.next/static/chunks/pages/_app-c58cfa832b76cc87.js +0 -24
  90. package/.next/static/chunks/pages/index-146039f501e49c08.js +0 -1
  91. package/.next/static/css/4482c4a0064d3807.css +0 -1
  92. package/.next/static/css/78e42ad01f580f64.css +0 -1
  93. package/.next/static/css/9d1013ec684361b9.css +0 -1
  94. package/src/components/Board/components/Cell/Button.tsx +0 -32
  95. /package/.next/static/{6RggBFm8kHrh-k1-CG3um → Cs23uxWG6AxS72F2yrjHu}/_ssgManifest.js +0 -0
@@ -1,3925 +0,0 @@
1
- "use strict";
2
- exports.id = 579;
3
- exports.ids = [579];
4
- exports.modules = {
5
-
6
- /***/ 57079:
7
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
8
-
9
-
10
- var __importDefault = (this && this.__importDefault) || function (mod) {
11
- return (mod && mod.__esModule) ? mod : { "default": mod };
12
- };
13
- Object.defineProperty(exports, "__esModule", ({ value: true }));
14
- const literaki_1 = __importDefault(__webpack_require__(63432));
15
- const scrabble_1 = __importDefault(__webpack_require__(8964));
16
- const configs = [literaki_1.default, scrabble_1.default];
17
- const getConfig = (configId) => {
18
- const config = configs.find(({ id }) => id === configId);
19
- if (!config) {
20
- throw new Error(`Invalid "configId" parameter: not one of ${configs.map(({ id }) => id).join('/')}`);
21
- }
22
- return config;
23
- };
24
- exports["default"] = getConfig;
25
-
26
-
27
- /***/ }),
28
-
29
- /***/ 53632:
30
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
31
-
32
-
33
- var __importDefault = (this && this.__importDefault) || function (mod) {
34
- return (mod && mod.__esModule) ? mod : { "default": mod };
35
- };
36
- Object.defineProperty(exports, "__esModule", ({ value: true }));
37
- const getConfig_1 = __importDefault(__webpack_require__(57079));
38
- const getLocaleConfig = (configId, locale) => {
39
- return (0, getConfig_1.default)(configId)[locale];
40
- };
41
- exports["default"] = getLocaleConfig;
42
-
43
-
44
- /***/ }),
45
-
46
- /***/ 89418:
47
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
48
-
49
-
50
- var __importDefault = (this && this.__importDefault) || function (mod) {
51
- return (mod && mod.__esModule) ? mod : { "default": mod };
52
- };
53
- Object.defineProperty(exports, "__esModule", ({ value: true }));
54
- exports.scrabble = exports.literaki = exports.isConfigId = exports.getLocaleConfig = exports.getConfig = void 0;
55
- var getConfig_1 = __webpack_require__(57079);
56
- Object.defineProperty(exports, "getConfig", ({ enumerable: true, get: function () { return __importDefault(getConfig_1).default; } }));
57
- var getLocaleConfig_1 = __webpack_require__(53632);
58
- Object.defineProperty(exports, "getLocaleConfig", ({ enumerable: true, get: function () { return __importDefault(getLocaleConfig_1).default; } }));
59
- var isConfigId_1 = __webpack_require__(65582);
60
- Object.defineProperty(exports, "isConfigId", ({ enumerable: true, get: function () { return __importDefault(isConfigId_1).default; } }));
61
- var literaki_1 = __webpack_require__(63432);
62
- Object.defineProperty(exports, "literaki", ({ enumerable: true, get: function () { return __importDefault(literaki_1).default; } }));
63
- var scrabble_1 = __webpack_require__(8964);
64
- Object.defineProperty(exports, "scrabble", ({ enumerable: true, get: function () { return __importDefault(scrabble_1).default; } }));
65
-
66
-
67
- /***/ }),
68
-
69
- /***/ 65582:
70
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
71
-
72
-
73
- var __importDefault = (this && this.__importDefault) || function (mod) {
74
- return (mod && mod.__esModule) ? mod : { "default": mod };
75
- };
76
- Object.defineProperty(exports, "__esModule", ({ value: true }));
77
- const literaki_1 = __importDefault(__webpack_require__(63432));
78
- const scrabble_1 = __importDefault(__webpack_require__(8964));
79
- const configs = [literaki_1.default, scrabble_1.default];
80
- const isConfigId = (configId) => {
81
- return configs.some(({ id }) => id === configId);
82
- };
83
- exports["default"] = isConfigId;
84
-
85
-
86
- /***/ }),
87
-
88
- /***/ 72376:
89
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
90
-
91
-
92
- Object.defineProperty(exports, "__esModule", ({ value: true }));
93
- const constants_1 = __webpack_require__(7618);
94
- const bonuses = [
95
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 0, y: 0 },
96
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 2, y: 0 },
97
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 5, y: 0 },
98
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 7, y: 0 },
99
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 9, y: 0 },
100
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 12, y: 0 },
101
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 14, y: 0 },
102
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 4, y: 1 },
103
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 6, y: 1 },
104
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 8, y: 1 },
105
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 10, y: 1 },
106
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 2 },
107
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 2 },
108
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 5, y: 2 },
109
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 7, y: 2 },
110
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 9, y: 2 },
111
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 2 },
112
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 2 },
113
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 3 },
114
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 3 },
115
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 6, y: 3 },
116
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 8, y: 3 },
117
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 3 },
118
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 3 },
119
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 1, y: 4 },
120
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 4 },
121
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 5, y: 4 },
122
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 9, y: 4 },
123
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 4 },
124
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 13, y: 4 },
125
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 5 },
126
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 5 },
127
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 4, y: 5 },
128
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 7, y: 5 },
129
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 10, y: 5 },
130
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 5 },
131
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 5 },
132
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 1, y: 6 },
133
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 3, y: 6 },
134
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 6, y: 6 },
135
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 8, y: 6 },
136
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 11, y: 6 },
137
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 13, y: 6 },
138
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 0, y: 7 },
139
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 2, y: 7 },
140
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 7 },
141
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 7, y: 7 },
142
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 7 },
143
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 12, y: 7 },
144
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 14, y: 7 },
145
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 1, y: 8 },
146
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 3, y: 8 },
147
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 6, y: 8 },
148
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 8, y: 8 },
149
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 11, y: 8 },
150
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 13, y: 8 },
151
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 9 },
152
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 9 },
153
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 4, y: 9 },
154
- { multiplier: 3, score: 3, type: constants_1.BONUS_CHARACTER, x: 7, y: 9 },
155
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 10, y: 9 },
156
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 9 },
157
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 9 },
158
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 1, y: 10 },
159
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 10 },
160
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 5, y: 10 },
161
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 9, y: 10 },
162
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 10 },
163
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 13, y: 10 },
164
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 11 },
165
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 11 },
166
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 6, y: 11 },
167
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 8, y: 11 },
168
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 11 },
169
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 11 },
170
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 12 },
171
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 12 },
172
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 5, y: 12 },
173
- { multiplier: 3, score: 1, type: constants_1.BONUS_CHARACTER, x: 7, y: 12 },
174
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 9, y: 12 },
175
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 12 },
176
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 12 },
177
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 4, y: 13 },
178
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 6, y: 13 },
179
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 8, y: 13 },
180
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 10, y: 13 },
181
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 0, y: 14 },
182
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 2, y: 14 },
183
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 5, y: 14 },
184
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 7, y: 14 },
185
- { multiplier: 3, score: 2, type: constants_1.BONUS_CHARACTER, x: 9, y: 14 },
186
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 12, y: 14 },
187
- { multiplier: 3, score: 5, type: constants_1.BONUS_CHARACTER, x: 14, y: 14 },
188
- ];
189
- exports["default"] = bonuses;
190
-
191
-
192
- /***/ }),
193
-
194
- /***/ 63432:
195
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
196
-
197
-
198
- var __importDefault = (this && this.__importDefault) || function (mod) {
199
- return (mod && mod.__esModule) ? mod : { "default": mod };
200
- };
201
- Object.defineProperty(exports, "__esModule", ({ value: true }));
202
- exports["default"] = void 0;
203
- var literaki_1 = __webpack_require__(34477);
204
- Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return __importDefault(literaki_1).default; } }));
205
-
206
-
207
- /***/ }),
208
-
209
- /***/ 34477:
210
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
211
-
212
-
213
- var __importDefault = (this && this.__importDefault) || function (mod) {
214
- return (mod && mod.__esModule) ? mod : { "default": mod };
215
- };
216
- Object.defineProperty(exports, "__esModule", ({ value: true }));
217
- const types_1 = __webpack_require__(34046);
218
- const bonuses_1 = __importDefault(__webpack_require__(72376));
219
- const tiles_1 = __webpack_require__(87529);
220
- const base = {
221
- allTilesBonusScore: 50,
222
- blankScore: 0,
223
- blanksCount: 2,
224
- boardHeight: 15,
225
- boardWidth: 15,
226
- bonuses: bonuses_1.default,
227
- id: 'literaki',
228
- maximumCharactersCount: 7,
229
- name: 'Literaki',
230
- };
231
- const literaki = {
232
- id: base.id,
233
- name: base.name,
234
- [types_1.Locale.DE_DE]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesDe }),
235
- [types_1.Locale.EN_GB]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEn }),
236
- [types_1.Locale.EN_US]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEn }),
237
- [types_1.Locale.ES_ES]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEs }),
238
- [types_1.Locale.FA_IR]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesFa }),
239
- [types_1.Locale.FR_FR]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesFr }),
240
- [types_1.Locale.PL_PL]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesPl }),
241
- };
242
- exports["default"] = literaki;
243
-
244
-
245
- /***/ }),
246
-
247
- /***/ 87529:
248
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
249
-
250
-
251
- var __importDefault = (this && this.__importDefault) || function (mod) {
252
- return (mod && mod.__esModule) ? mod : { "default": mod };
253
- };
254
- Object.defineProperty(exports, "__esModule", ({ value: true }));
255
- exports.tilesDe = exports.tilesPl = exports.tilesFr = exports.tilesFa = exports.tilesEs = exports.tilesEn = void 0;
256
- var tilesEn_1 = __webpack_require__(17910);
257
- Object.defineProperty(exports, "tilesEn", ({ enumerable: true, get: function () { return __importDefault(tilesEn_1).default; } }));
258
- var tilesEs_1 = __webpack_require__(63029);
259
- Object.defineProperty(exports, "tilesEs", ({ enumerable: true, get: function () { return __importDefault(tilesEs_1).default; } }));
260
- var tilesFa_1 = __webpack_require__(35366);
261
- Object.defineProperty(exports, "tilesFa", ({ enumerable: true, get: function () { return __importDefault(tilesFa_1).default; } }));
262
- var tilesFr_1 = __webpack_require__(59541);
263
- Object.defineProperty(exports, "tilesFr", ({ enumerable: true, get: function () { return __importDefault(tilesFr_1).default; } }));
264
- var tilesPl_1 = __webpack_require__(2647);
265
- Object.defineProperty(exports, "tilesPl", ({ enumerable: true, get: function () { return __importDefault(tilesPl_1).default; } }));
266
- var tilesDe_1 = __webpack_require__(57911);
267
- Object.defineProperty(exports, "tilesDe", ({ enumerable: true, get: function () { return __importDefault(tilesDe_1).default; } }));
268
-
269
-
270
- /***/ }),
271
-
272
- /***/ 57911:
273
- /***/ ((__unused_webpack_module, exports) => {
274
-
275
-
276
- Object.defineProperty(exports, "__esModule", ({ value: true }));
277
- const tilesDe = [
278
- { character: 'a', count: 5, score: 1 },
279
- { character: 'ä', count: 1, score: 6 },
280
- { character: 'b', count: 2, score: 3 },
281
- { character: 'c', count: 2, score: 4 },
282
- { character: 'd', count: 4, score: 1 },
283
- { character: 'e', count: 15, score: 1 },
284
- { character: 'f', count: 2, score: 4 },
285
- { character: 'g', count: 3, score: 2 },
286
- { character: 'h', count: 4, score: 2 },
287
- { character: 'i', count: 6, score: 1 },
288
- { character: 'j', count: 1, score: 6 },
289
- { character: 'k', count: 2, score: 4 },
290
- { character: 'l', count: 3, score: 2 },
291
- { character: 'm', count: 4, score: 3 },
292
- { character: 'n', count: 9, score: 1 },
293
- { character: 'o', count: 3, score: 2 },
294
- { character: 'ö', count: 1, score: 8 },
295
- { character: 'p', count: 1, score: 4 },
296
- { character: 'q', count: 1, score: 10 },
297
- { character: 'r', count: 6, score: 1 },
298
- { character: 's', count: 7, score: 1 },
299
- { character: 't', count: 6, score: 1 },
300
- { character: 'u', count: 6, score: 1 },
301
- { character: 'ü', count: 1, score: 6 },
302
- { character: 'v', count: 1, score: 6 },
303
- { character: 'w', count: 1, score: 3 },
304
- { character: 'x', count: 1, score: 8 },
305
- { character: 'y', count: 1, score: 10 },
306
- { character: 'z', count: 1, score: 3 },
307
- ];
308
- exports["default"] = tilesDe;
309
-
310
-
311
- /***/ }),
312
-
313
- /***/ 17910:
314
- /***/ ((__unused_webpack_module, exports) => {
315
-
316
-
317
- Object.defineProperty(exports, "__esModule", ({ value: true }));
318
- const tilesEn = [
319
- { character: 'a', count: 9, score: 1 },
320
- { character: 'b', count: 2, score: 3 },
321
- { character: 'c', count: 2, score: 3 },
322
- { character: 'd', count: 4, score: 2 },
323
- { character: 'e', count: 12, score: 1 },
324
- { character: 'f', count: 2, score: 4 },
325
- { character: 'g', count: 3, score: 2 },
326
- { character: 'h', count: 2, score: 4 },
327
- { character: 'i', count: 9, score: 1 },
328
- { character: 'j', count: 1, score: 8 },
329
- { character: 'k', count: 1, score: 5 },
330
- { character: 'l', count: 4, score: 1 },
331
- { character: 'm', count: 2, score: 3 },
332
- { character: 'n', count: 6, score: 1 },
333
- { character: 'o', count: 8, score: 1 },
334
- { character: 'p', count: 2, score: 3 },
335
- { character: 'q', count: 1, score: 10 },
336
- { character: 'r', count: 6, score: 1 },
337
- { character: 's', count: 4, score: 1 },
338
- { character: 't', count: 6, score: 1 },
339
- { character: 'u', count: 4, score: 1 },
340
- { character: 'v', count: 2, score: 4 },
341
- { character: 'w', count: 2, score: 4 },
342
- { character: 'x', count: 1, score: 8 },
343
- { character: 'y', count: 2, score: 4 },
344
- { character: 'z', count: 1, score: 10 },
345
- ];
346
- exports["default"] = tilesEn;
347
-
348
-
349
- /***/ }),
350
-
351
- /***/ 63029:
352
- /***/ ((__unused_webpack_module, exports) => {
353
-
354
-
355
- Object.defineProperty(exports, "__esModule", ({ value: true }));
356
- const tilesEs = [
357
- { character: 'a', count: 12, score: 1 },
358
- { character: 'b', count: 2, score: 3 },
359
- { character: 'c', count: 4, score: 3 },
360
- { character: 'ch', count: 1, score: 5 },
361
- { character: 'd', count: 5, score: 2 },
362
- { character: 'e', count: 12, score: 1 },
363
- { character: 'f', count: 1, score: 4 },
364
- { character: 'g', count: 2, score: 2 },
365
- { character: 'h', count: 2, score: 4 },
366
- { character: 'i', count: 6, score: 1 },
367
- { character: 'j', count: 1, score: 8 },
368
- { character: 'll', count: 1, score: 8 },
369
- { character: 'l', count: 4, score: 1 },
370
- { character: 'm', count: 2, score: 3 },
371
- { character: 'n', count: 5, score: 1 },
372
- { character: 'ñ', count: 1, score: 8 },
373
- { character: 'o', count: 9, score: 1 },
374
- { character: 'p', count: 2, score: 3 },
375
- { character: 'q', count: 1, score: 5 },
376
- { character: 'r', count: 5, score: 1 },
377
- { character: 'rr', count: 1, score: 8 },
378
- { character: 's', count: 6, score: 1 },
379
- { character: 't', count: 4, score: 1 },
380
- { character: 'u', count: 5, score: 1 },
381
- { character: 'v', count: 1, score: 4 },
382
- { character: 'x', count: 1, score: 8 },
383
- { character: 'y', count: 1, score: 4 },
384
- { character: 'z', count: 1, score: 10 },
385
- ];
386
- exports["default"] = tilesEs;
387
-
388
-
389
- /***/ }),
390
-
391
- /***/ 35366:
392
- /***/ ((__unused_webpack_module, exports) => {
393
-
394
-
395
- Object.defineProperty(exports, "__esModule", ({ value: true }));
396
- const tilesFa = [
397
- { character: 'ا', count: 12, score: 1 },
398
- { character: 'ب', count: 4, score: 1 },
399
- { character: 'پ', count: 1, score: 6 },
400
- { character: 'ت', count: 4, score: 1 },
401
- { character: 'ث', count: 1, score: 10 },
402
- { character: 'ج', count: 2, score: 5 },
403
- { character: 'چ', count: 1, score: 6 },
404
- { character: 'ح', count: 1, score: 6 },
405
- { character: 'خ', count: 2, score: 5 },
406
- { character: 'د', count: 6, score: 1 },
407
- { character: 'ذ', count: 1, score: 10 },
408
- { character: 'ر', count: 7, score: 1 },
409
- { character: 'ز', count: 3, score: 4 },
410
- { character: 'ژ', count: 1, score: 10 },
411
- { character: 'س', count: 3, score: 2 },
412
- { character: 'ش', count: 3, score: 3 },
413
- { character: 'ص', count: 1, score: 6 },
414
- { character: 'ض', count: 1, score: 8 },
415
- { character: 'ط', count: 1, score: 8 },
416
- { character: 'ظ', count: 1, score: 10 },
417
- { character: 'ع', count: 2, score: 5 },
418
- { character: 'غ', count: 1, score: 8 },
419
- { character: 'ف', count: 2, score: 4 },
420
- { character: 'ق', count: 2, score: 5 },
421
- { character: 'ک', count: 3, score: 3 },
422
- { character: 'گ', count: 2, score: 4 },
423
- { character: 'ل', count: 3, score: 2 },
424
- { character: 'م', count: 5, score: 1 },
425
- { character: 'ن', count: 6, score: 1 },
426
- { character: 'و', count: 5, score: 1 },
427
- { character: 'ه', count: 5, score: 1 },
428
- { character: 'ی', count: 8, score: 1 },
429
- ];
430
- exports["default"] = tilesFa;
431
-
432
-
433
- /***/ }),
434
-
435
- /***/ 59541:
436
- /***/ ((__unused_webpack_module, exports) => {
437
-
438
-
439
- Object.defineProperty(exports, "__esModule", ({ value: true }));
440
- const tilesFr = [
441
- { character: 'a', count: 9, score: 1 },
442
- { character: 'b', count: 2, score: 3 },
443
- { character: 'c', count: 2, score: 3 },
444
- { character: 'd', count: 3, score: 2 },
445
- { character: 'e', count: 15, score: 1 },
446
- { character: 'f', count: 2, score: 1 },
447
- { character: 'g', count: 2, score: 2 },
448
- { character: 'h', count: 2, score: 4 },
449
- { character: 'i', count: 8, score: 1 },
450
- { character: 'j', count: 1, score: 8 },
451
- { character: 'k', count: 1, score: 10 },
452
- { character: 'l', count: 5, score: 1 },
453
- { character: 'm', count: 3, score: 2 },
454
- { character: 'n', count: 6, score: 1 },
455
- { character: 'o', count: 6, score: 1 },
456
- { character: 'p', count: 2, score: 3 },
457
- { character: 'q', count: 1, score: 8 },
458
- { character: 'r', count: 6, score: 1 },
459
- { character: 's', count: 6, score: 1 },
460
- { character: 't', count: 6, score: 1 },
461
- { character: 'u', count: 6, score: 1 },
462
- { character: 'v', count: 2, score: 4 },
463
- { character: 'w', count: 1, score: 10 },
464
- { character: 'x', count: 1, score: 10 },
465
- { character: 'y', count: 1, score: 10 },
466
- { character: 'z', count: 1, score: 10 },
467
- ];
468
- exports["default"] = tilesFr;
469
-
470
-
471
- /***/ }),
472
-
473
- /***/ 2647:
474
- /***/ ((__unused_webpack_module, exports) => {
475
-
476
-
477
- Object.defineProperty(exports, "__esModule", ({ value: true }));
478
- const tilesPl = [
479
- { character: 'a', count: 9, score: 1 },
480
- { character: 'ą', count: 1, score: 5 },
481
- { character: 'b', count: 2, score: 3 },
482
- { character: 'c', count: 3, score: 2 },
483
- { character: 'ć', count: 1, score: 5 },
484
- { character: 'd', count: 3, score: 2 },
485
- { character: 'e', count: 7, score: 1 },
486
- { character: 'ę', count: 1, score: 5 },
487
- { character: 'f', count: 1, score: 5 },
488
- { character: 'g', count: 2, score: 3 },
489
- { character: 'h', count: 2, score: 3 },
490
- { character: 'i', count: 8, score: 1 },
491
- { character: 'j', count: 2, score: 3 },
492
- { character: 'k', count: 3, score: 2 },
493
- { character: 'l', count: 3, score: 2 },
494
- { character: 'ł', count: 2, score: 3 },
495
- { character: 'm', count: 3, score: 2 },
496
- { character: 'n', count: 5, score: 1 },
497
- { character: 'ń', count: 1, score: 5 },
498
- { character: 'o', count: 6, score: 1 },
499
- { character: 'ó', count: 1, score: 5 },
500
- { character: 'p', count: 3, score: 2 },
501
- { character: 'r', count: 4, score: 1 },
502
- { character: 's', count: 4, score: 1 },
503
- { character: 'ś', count: 1, score: 5 },
504
- { character: 't', count: 3, score: 2 },
505
- { character: 'u', count: 2, score: 3 },
506
- { character: 'w', count: 4, score: 1 },
507
- { character: 'y', count: 4, score: 2 },
508
- { character: 'z', count: 5, score: 1 },
509
- { character: 'ź', count: 1, score: 5 },
510
- { character: 'ż', count: 1, score: 5 },
511
- ];
512
- exports["default"] = tilesPl;
513
-
514
-
515
- /***/ }),
516
-
517
- /***/ 51551:
518
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
519
-
520
-
521
- Object.defineProperty(exports, "__esModule", ({ value: true }));
522
- const constants_1 = __webpack_require__(7618);
523
- const bonuses = [
524
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 0 },
525
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 0 },
526
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 7, y: 0 },
527
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 0 },
528
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 0 },
529
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 1 },
530
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 1 },
531
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 1 },
532
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 1 },
533
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 2 },
534
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 2 },
535
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 2 },
536
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 2 },
537
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 3 },
538
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 3 },
539
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 7, y: 3 },
540
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 3 },
541
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 3 },
542
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 4 },
543
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 4 },
544
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 5 },
545
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 5 },
546
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 5 },
547
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 5 },
548
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 6 },
549
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 6 },
550
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 6 },
551
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 6 },
552
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 7 },
553
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 7 },
554
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 7, y: 7 },
555
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 7 },
556
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 7 },
557
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 2, y: 8 },
558
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 8 },
559
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 8 },
560
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 12, y: 8 },
561
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 1, y: 9 },
562
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 9 },
563
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 9 },
564
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 13, y: 9 },
565
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 4, y: 10 },
566
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 10, y: 10 },
567
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 0, y: 11 },
568
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 3, y: 11 },
569
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 7, y: 11 },
570
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 11, y: 11 },
571
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 14, y: 11 },
572
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 2, y: 12 },
573
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 6, y: 12 },
574
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 8, y: 12 },
575
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 12, y: 12 },
576
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 1, y: 13 },
577
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 5, y: 13 },
578
- { multiplier: 3, type: constants_1.BONUS_CHARACTER, x: 9, y: 13 },
579
- { multiplier: 2, type: constants_1.BONUS_WORD, x: 13, y: 13 },
580
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 0, y: 14 },
581
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 3, y: 14 },
582
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 7, y: 14 },
583
- { multiplier: 2, type: constants_1.BONUS_CHARACTER, x: 11, y: 14 },
584
- { multiplier: 3, type: constants_1.BONUS_WORD, x: 14, y: 14 },
585
- ];
586
- exports["default"] = bonuses;
587
-
588
-
589
- /***/ }),
590
-
591
- /***/ 8964:
592
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
593
-
594
-
595
- var __importDefault = (this && this.__importDefault) || function (mod) {
596
- return (mod && mod.__esModule) ? mod : { "default": mod };
597
- };
598
- Object.defineProperty(exports, "__esModule", ({ value: true }));
599
- exports["default"] = void 0;
600
- var scrabble_1 = __webpack_require__(97192);
601
- Object.defineProperty(exports, "default", ({ enumerable: true, get: function () { return __importDefault(scrabble_1).default; } }));
602
-
603
-
604
- /***/ }),
605
-
606
- /***/ 97192:
607
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
608
-
609
-
610
- var __importDefault = (this && this.__importDefault) || function (mod) {
611
- return (mod && mod.__esModule) ? mod : { "default": mod };
612
- };
613
- Object.defineProperty(exports, "__esModule", ({ value: true }));
614
- const types_1 = __webpack_require__(34046);
615
- const bonuses_1 = __importDefault(__webpack_require__(51551));
616
- const tiles_1 = __webpack_require__(29213);
617
- const base = {
618
- allTilesBonusScore: 50,
619
- blankScore: 0,
620
- blanksCount: 2,
621
- boardHeight: 15,
622
- boardWidth: 15,
623
- bonuses: bonuses_1.default,
624
- id: 'scrabble',
625
- maximumCharactersCount: 7,
626
- name: 'Scrabble',
627
- };
628
- const scrabble = {
629
- id: base.id,
630
- name: base.name,
631
- [types_1.Locale.EN_GB]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEn }),
632
- [types_1.Locale.DE_DE]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesDe }),
633
- [types_1.Locale.EN_US]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEn }),
634
- [types_1.Locale.ES_ES]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesEs }),
635
- [types_1.Locale.FA_IR]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesFa }),
636
- [types_1.Locale.FR_FR]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesFr }),
637
- [types_1.Locale.PL_PL]: types_1.Config.fromJson({ ...base, tiles: tiles_1.tilesPl }),
638
- };
639
- exports["default"] = scrabble;
640
-
641
-
642
- /***/ }),
643
-
644
- /***/ 29213:
645
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
646
-
647
-
648
- var __importDefault = (this && this.__importDefault) || function (mod) {
649
- return (mod && mod.__esModule) ? mod : { "default": mod };
650
- };
651
- Object.defineProperty(exports, "__esModule", ({ value: true }));
652
- exports.tilesDe = exports.tilesPl = exports.tilesFr = exports.tilesFa = exports.tilesEs = exports.tilesEn = void 0;
653
- var tilesEn_1 = __webpack_require__(76149);
654
- Object.defineProperty(exports, "tilesEn", ({ enumerable: true, get: function () { return __importDefault(tilesEn_1).default; } }));
655
- var tilesEs_1 = __webpack_require__(14537);
656
- Object.defineProperty(exports, "tilesEs", ({ enumerable: true, get: function () { return __importDefault(tilesEs_1).default; } }));
657
- var tilesFa_1 = __webpack_require__(22878);
658
- Object.defineProperty(exports, "tilesFa", ({ enumerable: true, get: function () { return __importDefault(tilesFa_1).default; } }));
659
- var tilesFr_1 = __webpack_require__(72866);
660
- Object.defineProperty(exports, "tilesFr", ({ enumerable: true, get: function () { return __importDefault(tilesFr_1).default; } }));
661
- var tilesPl_1 = __webpack_require__(85667);
662
- Object.defineProperty(exports, "tilesPl", ({ enumerable: true, get: function () { return __importDefault(tilesPl_1).default; } }));
663
- var tilesDe_1 = __webpack_require__(17355);
664
- Object.defineProperty(exports, "tilesDe", ({ enumerable: true, get: function () { return __importDefault(tilesDe_1).default; } }));
665
-
666
-
667
- /***/ }),
668
-
669
- /***/ 17355:
670
- /***/ ((__unused_webpack_module, exports) => {
671
-
672
-
673
- Object.defineProperty(exports, "__esModule", ({ value: true }));
674
- const tilesDe = [
675
- { character: 'a', count: 5, score: 1 },
676
- { character: 'ä', count: 1, score: 6 },
677
- { character: 'b', count: 2, score: 3 },
678
- { character: 'c', count: 2, score: 4 },
679
- { character: 'd', count: 4, score: 1 },
680
- { character: 'e', count: 15, score: 1 },
681
- { character: 'f', count: 2, score: 4 },
682
- { character: 'g', count: 3, score: 2 },
683
- { character: 'h', count: 4, score: 2 },
684
- { character: 'i', count: 6, score: 1 },
685
- { character: 'j', count: 1, score: 6 },
686
- { character: 'k', count: 2, score: 4 },
687
- { character: 'l', count: 3, score: 2 },
688
- { character: 'm', count: 4, score: 3 },
689
- { character: 'n', count: 9, score: 1 },
690
- { character: 'o', count: 3, score: 2 },
691
- { character: 'ö', count: 1, score: 8 },
692
- { character: 'p', count: 1, score: 4 },
693
- { character: 'q', count: 1, score: 10 },
694
- { character: 'r', count: 6, score: 1 },
695
- { character: 's', count: 7, score: 1 },
696
- { character: 't', count: 6, score: 1 },
697
- { character: 'u', count: 6, score: 1 },
698
- { character: 'ü', count: 1, score: 6 },
699
- { character: 'v', count: 1, score: 6 },
700
- { character: 'w', count: 1, score: 3 },
701
- { character: 'x', count: 1, score: 8 },
702
- { character: 'y', count: 1, score: 10 },
703
- { character: 'z', count: 1, score: 3 },
704
- ];
705
- exports["default"] = tilesDe;
706
-
707
-
708
- /***/ }),
709
-
710
- /***/ 76149:
711
- /***/ ((__unused_webpack_module, exports) => {
712
-
713
-
714
- Object.defineProperty(exports, "__esModule", ({ value: true }));
715
- const tilesEn = [
716
- { character: 'a', count: 9, score: 1 },
717
- { character: 'b', count: 2, score: 3 },
718
- { character: 'c', count: 2, score: 3 },
719
- { character: 'd', count: 4, score: 2 },
720
- { character: 'e', count: 12, score: 1 },
721
- { character: 'f', count: 2, score: 4 },
722
- { character: 'g', count: 3, score: 2 },
723
- { character: 'h', count: 2, score: 4 },
724
- { character: 'i', count: 9, score: 1 },
725
- { character: 'j', count: 1, score: 8 },
726
- { character: 'k', count: 1, score: 5 },
727
- { character: 'l', count: 4, score: 1 },
728
- { character: 'm', count: 2, score: 3 },
729
- { character: 'n', count: 6, score: 1 },
730
- { character: 'o', count: 8, score: 1 },
731
- { character: 'p', count: 2, score: 3 },
732
- { character: 'q', count: 1, score: 10 },
733
- { character: 'r', count: 6, score: 1 },
734
- { character: 's', count: 4, score: 1 },
735
- { character: 't', count: 6, score: 1 },
736
- { character: 'u', count: 4, score: 1 },
737
- { character: 'v', count: 2, score: 4 },
738
- { character: 'w', count: 2, score: 4 },
739
- { character: 'x', count: 1, score: 8 },
740
- { character: 'y', count: 2, score: 4 },
741
- { character: 'z', count: 1, score: 10 },
742
- ];
743
- exports["default"] = tilesEn;
744
-
745
-
746
- /***/ }),
747
-
748
- /***/ 14537:
749
- /***/ ((__unused_webpack_module, exports) => {
750
-
751
-
752
- Object.defineProperty(exports, "__esModule", ({ value: true }));
753
- const tilesEs = [
754
- { character: 'a', count: 12, score: 1 },
755
- { character: 'b', count: 2, score: 3 },
756
- { character: 'c', count: 4, score: 3 },
757
- { character: 'ch', count: 1, score: 5 },
758
- { character: 'd', count: 5, score: 2 },
759
- { character: 'e', count: 12, score: 1 },
760
- { character: 'f', count: 1, score: 4 },
761
- { character: 'g', count: 2, score: 2 },
762
- { character: 'h', count: 2, score: 4 },
763
- { character: 'i', count: 6, score: 1 },
764
- { character: 'j', count: 1, score: 8 },
765
- { character: 'll', count: 1, score: 8 },
766
- { character: 'l', count: 4, score: 1 },
767
- { character: 'm', count: 2, score: 3 },
768
- { character: 'n', count: 5, score: 1 },
769
- { character: 'ñ', count: 1, score: 8 },
770
- { character: 'o', count: 9, score: 1 },
771
- { character: 'p', count: 2, score: 3 },
772
- { character: 'q', count: 1, score: 5 },
773
- { character: 'r', count: 5, score: 1 },
774
- { character: 'rr', count: 1, score: 8 },
775
- { character: 's', count: 6, score: 1 },
776
- { character: 't', count: 4, score: 1 },
777
- { character: 'u', count: 5, score: 1 },
778
- { character: 'v', count: 1, score: 4 },
779
- { character: 'x', count: 1, score: 8 },
780
- { character: 'y', count: 1, score: 4 },
781
- { character: 'z', count: 1, score: 10 },
782
- ];
783
- exports["default"] = tilesEs;
784
-
785
-
786
- /***/ }),
787
-
788
- /***/ 22878:
789
- /***/ ((__unused_webpack_module, exports) => {
790
-
791
-
792
- Object.defineProperty(exports, "__esModule", ({ value: true }));
793
- const tilesFa = [
794
- { character: 'ا', count: 12, score: 1 },
795
- { character: 'ب', count: 4, score: 1 },
796
- { character: 'پ', count: 1, score: 6 },
797
- { character: 'ت', count: 4, score: 1 },
798
- { character: 'ث', count: 1, score: 10 },
799
- { character: 'ج', count: 2, score: 5 },
800
- { character: 'چ', count: 1, score: 6 },
801
- { character: 'ح', count: 1, score: 6 },
802
- { character: 'خ', count: 2, score: 5 },
803
- { character: 'د', count: 6, score: 1 },
804
- { character: 'ذ', count: 1, score: 10 },
805
- { character: 'ر', count: 7, score: 1 },
806
- { character: 'ز', count: 3, score: 4 },
807
- { character: 'ژ', count: 1, score: 10 },
808
- { character: 'س', count: 3, score: 2 },
809
- { character: 'ش', count: 3, score: 3 },
810
- { character: 'ص', count: 1, score: 6 },
811
- { character: 'ض', count: 1, score: 8 },
812
- { character: 'ط', count: 1, score: 8 },
813
- { character: 'ظ', count: 1, score: 10 },
814
- { character: 'ع', count: 2, score: 5 },
815
- { character: 'غ', count: 1, score: 8 },
816
- { character: 'ف', count: 2, score: 4 },
817
- { character: 'ق', count: 2, score: 5 },
818
- { character: 'ک', count: 3, score: 3 },
819
- { character: 'گ', count: 2, score: 4 },
820
- { character: 'ل', count: 3, score: 2 },
821
- { character: 'م', count: 5, score: 1 },
822
- { character: 'ن', count: 6, score: 1 },
823
- { character: 'و', count: 5, score: 1 },
824
- { character: 'ه', count: 5, score: 1 },
825
- { character: 'ی', count: 8, score: 1 },
826
- ];
827
- exports["default"] = tilesFa;
828
-
829
-
830
- /***/ }),
831
-
832
- /***/ 72866:
833
- /***/ ((__unused_webpack_module, exports) => {
834
-
835
-
836
- Object.defineProperty(exports, "__esModule", ({ value: true }));
837
- const tilesFr = [
838
- { character: 'a', count: 9, score: 1 },
839
- { character: 'b', count: 2, score: 3 },
840
- { character: 'c', count: 2, score: 3 },
841
- { character: 'd', count: 3, score: 2 },
842
- { character: 'e', count: 15, score: 1 },
843
- { character: 'f', count: 2, score: 4 },
844
- { character: 'g', count: 2, score: 2 },
845
- { character: 'h', count: 2, score: 4 },
846
- { character: 'i', count: 8, score: 1 },
847
- { character: 'j', count: 1, score: 8 },
848
- { character: 'k', count: 1, score: 10 },
849
- { character: 'l', count: 5, score: 1 },
850
- { character: 'm', count: 3, score: 2 },
851
- { character: 'n', count: 6, score: 1 },
852
- { character: 'o', count: 6, score: 1 },
853
- { character: 'p', count: 2, score: 3 },
854
- { character: 'q', count: 1, score: 8 },
855
- { character: 'r', count: 6, score: 1 },
856
- { character: 's', count: 6, score: 1 },
857
- { character: 't', count: 6, score: 1 },
858
- { character: 'u', count: 6, score: 1 },
859
- { character: 'v', count: 2, score: 4 },
860
- { character: 'w', count: 1, score: 10 },
861
- { character: 'x', count: 1, score: 10 },
862
- { character: 'y', count: 1, score: 10 },
863
- { character: 'z', count: 1, score: 10 },
864
- ];
865
- exports["default"] = tilesFr;
866
-
867
-
868
- /***/ }),
869
-
870
- /***/ 85667:
871
- /***/ ((__unused_webpack_module, exports) => {
872
-
873
-
874
- Object.defineProperty(exports, "__esModule", ({ value: true }));
875
- const tilesPl = [
876
- { character: 'a', count: 9, score: 1 },
877
- { character: 'ą', count: 1, score: 5 },
878
- { character: 'b', count: 2, score: 3 },
879
- { character: 'c', count: 3, score: 2 },
880
- { character: 'ć', count: 1, score: 6 },
881
- { character: 'd', count: 3, score: 2 },
882
- { character: 'e', count: 7, score: 1 },
883
- { character: 'ę', count: 1, score: 5 },
884
- { character: 'f', count: 1, score: 5 },
885
- { character: 'g', count: 2, score: 3 },
886
- { character: 'h', count: 2, score: 3 },
887
- { character: 'i', count: 8, score: 1 },
888
- { character: 'j', count: 2, score: 3 },
889
- { character: 'k', count: 3, score: 2 },
890
- { character: 'l', count: 3, score: 2 },
891
- { character: 'ł', count: 2, score: 3 },
892
- { character: 'm', count: 3, score: 2 },
893
- { character: 'n', count: 5, score: 1 },
894
- { character: 'ń', count: 1, score: 7 },
895
- { character: 'o', count: 6, score: 1 },
896
- { character: 'ó', count: 1, score: 5 },
897
- { character: 'p', count: 3, score: 2 },
898
- { character: 'r', count: 4, score: 1 },
899
- { character: 's', count: 4, score: 1 },
900
- { character: 'ś', count: 1, score: 5 },
901
- { character: 't', count: 3, score: 2 },
902
- { character: 'u', count: 2, score: 3 },
903
- { character: 'w', count: 4, score: 1 },
904
- { character: 'y', count: 4, score: 2 },
905
- { character: 'z', count: 5, score: 1 },
906
- { character: 'ź', count: 1, score: 9 },
907
- { character: 'ż', count: 1, score: 5 },
908
- ];
909
- exports["default"] = tilesPl;
910
-
911
-
912
- /***/ }),
913
-
914
- /***/ 7618:
915
- /***/ ((__unused_webpack_module, exports) => {
916
-
917
-
918
- Object.defineProperty(exports, "__esModule", ({ value: true }));
919
- exports.VOWELS = exports.CONSONANTS = exports.NO_BONUS = exports.EMPTY_CELL = exports.BONUS_WORD = exports.BONUS_CHARACTER = exports.BLANK = exports.COMMA_LATIN = exports.COMMA_ARABIC = void 0;
920
- exports.COMMA_ARABIC = '،';
921
- exports.COMMA_LATIN = ',';
922
- exports.BLANK = ' ';
923
- exports.BONUS_CHARACTER = 'BONUS_CHARACTER';
924
- exports.BONUS_WORD = 'BONUS_WORD';
925
- exports.EMPTY_CELL = ' ';
926
- exports.NO_BONUS = { characterMultiplier: 1, wordMultiplier: 1 };
927
- exports.CONSONANTS = [
928
- 'b',
929
- 'c',
930
- 'ć',
931
- 'd',
932
- 'f',
933
- 'g',
934
- 'h',
935
- 'j',
936
- 'k',
937
- 'l',
938
- 'ł',
939
- 'm',
940
- 'n',
941
- 'ń',
942
- 'ñ',
943
- 'p',
944
- 'q',
945
- 'r',
946
- 's',
947
- 'ś',
948
- 't',
949
- 'v',
950
- 'w',
951
- 'x',
952
- 'z',
953
- 'ź',
954
- 'ż',
955
- ];
956
- exports.VOWELS = ['a', 'ą', 'ä', 'e', 'ę', 'i', 'o', 'ó', 'ö', 'u', 'ü', 'y'];
957
-
958
-
959
- /***/ }),
960
-
961
- /***/ 77586:
962
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
963
-
964
-
965
- // EXPORTS
966
- __webpack_require__.d(__webpack_exports__, {
967
- "q": () => (/* reexport */ LOCALE_FEATURES),
968
- "Z": () => (/* reexport */ i18n_i18n)
969
- });
970
-
971
- // EXTERNAL MODULE: ../types/build/index.js
972
- var build = __webpack_require__(34046);
973
- ;// CONCATENATED MODULE: ./src/i18n/de.json
974
- const de_namespaceObject = JSON.parse('{"cell.filter-cell":"Zielort - klicken zum Wechseln","cell.set-blank":"Als Blanko markieren","cell.set-not-blank":"Nicht als Blanko markieren","cell.tile.location":"Brett: Stein ({{x}}, {{y}})","cell.toggle-direction":"Schreibrichtung - klicken zum Wechseln","common.blanks":"Blankos","common.clear":"Löschen","common.close":"Schließen","common.consonants":"Konsonanten","common.loading":"Laden","common.next":"Weiter","common.points":"Punkte","common.previous":"Zurück","common.tiles":"Steine","common.two-letter-tiles":"Zwei-Buchstaben","common.vowels":"Vokale","common.word":"Wort","common.words":"Wörter","dictionary.empty-state.no-definitions":"Wort existiert im Wörterbuch aber hat keine Definition.","dictionary.empty-state.no-results":"Wort kann nicht im Wörterbuch gefunden werden.","dictionary.empty-state.not-allowed":"Dieses Wort ist nicht erlaubt.","dictionary.empty-state.uninitialized":"Die Wörterbuchdefinition des letzten markierten Wortes wird hier angezeigt.","dictionary.input.placeholder":"Durchsuche Wörterbuch...","empty-state.error":"Fehler","empty-state.info":"Info","empty-state.success":"Juhuu!","empty-state.warning":"Oje!","github":"Schau dieses Projekt auf GitHub an","keyMap":"Tastaturkürzel","keyMap.board":"Brett","keyMap.board.toggle-blank":"Als Blanko markieren / aufheben","keyMap.board.toggle-direction":"Schreibrichtung umschalten","keyMap.board-and-rack":"Brett & Ablage","keyMap.board-and-rack.insert-two-letter-tile":"Zwei-Buchstaben Stein hinzufügen","keyMap.board-and-rack.navigate":"Navigieren","keyMap.board-and-rack.remove-tile":"Stein entfernen","keyMap.board-and-rack.submit":"Lösen starten","keyMap.rack":"Ablage","keyMap.rack.insert-blank":"Blanko hinzufügen (Leertaste)","menu":"Menü","rack.placeholder":"Steine…","rack.tile.location":"Ablage: Stein ({{index}})","remaining-tiles":"Restliche Steine","results":"Ergebnisse","results.empty-state.no-filtered-results":"Keine Ergebnisse für diese Anfrage.","results.empty-state.no-results":"Keine Ergebnisse - kein Wort konnte generiert werden.","results.empty-state.outdated":"Ergebnisse sind alt. Klicken zum Aktualisieren.","results.empty-state.uninitialized":"Wörter die aus deinen Buchstaben generiert wurden erscheinen hier.","results.input.placeholder":"Suchergebnisse... (RegExp)","results.insert":"Hinzufügen","results.solve":"Lösen","settings":"Einstellungen","settings.autoGroupTiles":"Restliche Steine gruppieren","settings.autoGroupTiles.left":"Linke Seite","settings.autoGroupTiles.right":"Rechte Seite","settings.autoGroupTiles.null":"Nicht gruppieren","settings.game":"Spiel","settings.language":"Sprache","words":"Gebildete Wörter","words.invalid":"Falsch","words.valid":"Korrekt"}');
975
- ;// CONCATENATED MODULE: ./src/i18n/en.json
976
- const en_namespaceObject = JSON.parse('{"cell.filter-cell":"Target destination - click to toggle","cell.set-blank":"Mark it a blank","cell.set-not-blank":"Mark it not a blank","cell.tile.location":"Board: tile ({{x}}, {{y}})","cell.toggle-direction":"Typing direction - click to toggle","common.blanks":"Blanks","common.clear":"Clear","common.close":"Close","common.consonants":"Consonants","common.loading":"Loading","common.next":"Next","common.points":"Points","common.previous":"Previous","common.tiles":"Tiles","common.two-letter-tiles":"Two-letter","common.vowels":"Vowels","common.word":"Word","common.words":"Words","dictionary.empty-state.no-definitions":"Word exists in the dictionary but it does not have a definition.","dictionary.empty-state.no-results":"Unable to find word definition in the dictionary.","dictionary.empty-state.not-allowed":"This word is not allowed.","dictionary.empty-state.uninitialized":"Dictionary definition of the most recently highlighted word will be shown here.","dictionary.input.placeholder":"Search dictionary...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Yeah!","empty-state.warning":"Oops!","github":"See this project on GitHub","keyMap":"Keyboard shortcuts","keyMap.board":"Board","keyMap.board.toggle-blank":"Mark/unmark tile as a blank","keyMap.board.toggle-direction":"Toggle typing direction","keyMap.board-and-rack":"Board & rack","keyMap.board-and-rack.insert-two-letter-tile":"Insert two-letter tile","keyMap.board-and-rack.navigate":"Navigate","keyMap.board-and-rack.remove-tile":"Remove tile","keyMap.board-and-rack.submit":"Start solving","keyMap.rack":"Rack","keyMap.rack.insert-blank":"Insert blank (spacebar)","menu":"Menu","rack.placeholder":"Letters","rack.tile.location":"Rack: tile ({{index}})","remaining-tiles":"Remaining tiles","results":"Results","results.empty-state.no-filtered-results":"No result matches this query.","results.empty-state.no-results":"No results - unable to generate any words.","results.empty-state.outdated":"Results are outdated. Click below to update.","results.empty-state.uninitialized":"Words generated from your letters will be shown here.","results.input.placeholder":"Search results... (RegExp)","results.insert":"Insert","results.solve":"Solve","settings":"Settings","settings.autoGroupTiles":"Group remaining tiles","settings.autoGroupTiles.left":"On the left","settings.autoGroupTiles.right":"On the right","settings.autoGroupTiles.null":"Do not group","settings.game":"Game","settings.language":"Language","words":"Created words","words.invalid":"Invalid","words.valid":"Valid"}');
977
- ;// CONCATENATED MODULE: ./src/i18n/es.json
978
- const es_namespaceObject = JSON.parse('{"cell.filter-cell":"Destino objetivo: haga clic para alternar","cell.set-blank":"Marcar como en blanco","cell.set-not-blank":"Marcar como no en blanco","cell.tile.location":"Tablero: espacio ({{x}}, {{y}})","cell.toggle-direction":"Dirección de escritura: haga clic para alternar","common.blanks":"Blancos","common.clear":"Borrar","common.close":"Cerrar","common.consonants":"Consonantes","common.loading":"Cargando","common.next":"Siguiente","common.points":"Puntos","common.previous":"Anterior","common.tiles":"Longitud","common.two-letter-tiles":"Dos letras","common.vowels":"Vocales","common.word":"Palabra","common.words":"Palabras","dictionary.empty-state.no-definitions":"La palabra existe en el diccionario pero no tiene una definición.","dictionary.empty-state.no-results":"No se puede encontrar la definición de palabra en el diccionario.","dictionary.empty-state.not-allowed":"Esta palabra no es aceptable.","dictionary.empty-state.uninitialized":"Aquí se mostrará la definición del diccionario de la última palabra resaltada.","dictionary.input.placeholder":"Busca el diccionario...","empty-state.error":"Error","empty-state.info":"Info","empty-state.success":"Sí!","empty-state.warning":"Vaya!","github":"Ver este proyecto en GitHub","keyMap":"Atajos de teclado","keyMap.board":"Tablero","keyMap.board.toggle-blank":"Marcar / desmarcar un espacio en blanco","keyMap.board.toggle-direction":"Alternar dirección de escritura","keyMap.board-and-rack":"Tablero y estante","keyMap.board-and-rack.insert-two-letter-tile":"Insertar mosaico de dos letras","keyMap.board-and-rack.navigate":"Navegar","keyMap.board-and-rack.remove-tile":"Quitar Letra","keyMap.board-and-rack.submit":"Empezar a resolver","keyMap.rack":"Estante","keyMap.rack.insert-blank":"Insertar espacio en blanco (barra espaciadora)","menu":"Menú","rack.placeholder":"Letras…","rack.tile.location":"Estante: espacio ({{index}})","remaining-tiles":"Casillas restantes","results":"Resultados","results.empty-state.no-filtered-results":"Ningún resultado coincide con esta consulta.","results.empty-state.no-results":"No hay resultados; no se pueden generar palabras","results.empty-state.outdated":"Los resultados están desactualizados. Haga clic a continuación para actualizar.","results.empty-state.uninitialized":"Aquí se mostrarán las palabras generadas a partir de sus letras.","results.input.placeholder":"Busque una solución... (RegExp)","results.insert":"Insertar","results.solve":"Resolver","settings":"Configuración","settings.autoGroupTiles":"Agrupar casillas restantes","settings.autoGroupTiles.left":"A la izquierda","settings.autoGroupTiles.right":"A la derecha","settings.autoGroupTiles.null":"No agrupar","settings.game":"Juego","settings.language":"Idioma","words":"Palabras creadas","words.invalid":"Incorrecto","words.valid":"Correcto"}');
979
- ;// CONCATENATED MODULE: ./src/i18n/fa.json
980
- const fa_namespaceObject = JSON.parse('{"cell.filter-cell":"مقصد - کلیک برای تغییر","cell.set-blank":"علامت گذاری به عنوان خالی","cell.set-not-blank":"علامت گذاری به عنوان غیر خالی","cell.toggle-direction":"جهت تایپ - کلیک برای تغییر","cell.tile.location":"({{x}}، {{y}}) کاشی: صفحه","common.blanks":"خالی","common.clear":"پاک کردن","common.close":"بستن","common.consonants":"حروف صامت","common.loading":"در حال بارگزاری","common.next":"بعدی","common.points":"امتیازات","common.previous":"قبلی","common.tiles":"کاشی ها","common.two-letter-tiles":"دو حرفی","common.vowels":"حروف مصوت","common.word":"کلمه","common.words":"کلمات","dictionary.empty-state.no-definitions":"کلمه در فرهنگ لغت وجود دارد، ولی معنایی برای آن ثبت نشده است.","dictionary.empty-state.no-results":"کلمه در فرهنگ لغت یافت نشد.","dictionary.empty-state.not-allowed":"این کلمه مجاز نیست.","dictionary.empty-state.uninitialized":"معنی لغت اینجا نمایش داده خواهد شد.","dictionary.input.placeholder":"جستجو در فرهنگ لغت ...","empty-state.error":"خطا","empty-state.info":"اطلاعات","empty-state.success":"حله!","empty-state.warning":"اوووخ!","github":"به این پروژه در گیتهاب سر بزنید","keyMap":"میانبر های کیبورد","keyMap.board":"صفحه","keyMap.board.toggle-blank":"علامت/عدم علامت گذاری کاشی به عنوان خالی","keyMap.board.toggle-direction":"تغییر جهت تایپ","keyMap.board-and-rack":"صفحه و طاقچه","keyMap.board-and-rack.insert-two-letter-tile":"وارد کردن کاشی دو حرفی","keyMap.board-and-rack.navigate":"حرکت","keyMap.board-and-rack.remove-tile":"حذف کاشی","keyMap.board-and-rack.submit":"حل کردن","keyMap.rack":"طاقچه","keyMap.rack.insert-blank":"وارد کردن کاشی خالی (دکمه اسپیس)","menu":"منو","rack.placeholder":"لیستحرف","rack.tile.location":"({{index}}) کاشی: طاقچه","remaining-tiles":"کاشی های باقی مانده","results":"نتایج","results.empty-state.no-filtered-results":"پاسخی یافت نشد.","results.empty-state.no-results":"کلمه قابل استفاده پیدا نشد.","results.empty-state.outdated":"نتایج به روز نیستند، برای بروز رسانی کلیک کنید.","results.empty-state.uninitialized":"کلمات تولید شده از حروف شما اینجا نمایش داده خواهد شد.","results.input.placeholder":"جستجو در نتایج (RegExp)","results.insert":"وارد کردن","results.solve":"حل کن","settings":"تنظیمات","settings.autoGroupTiles":"کاشی های باقی مانده ی طاقچه را کنار هم قرار بده","settings.autoGroupTiles.left":"در سمت چپ","settings.autoGroupTiles.right":"در سمت راست","settings.autoGroupTiles.null":"کنار هم قرار نده","settings.game":"بازی","settings.language":"زبان","words":"کلمات ساخته شده","words.invalid":"نا معتبر","words.valid":"معتبر"}');
981
- ;// CONCATENATED MODULE: ./src/i18n/fr.json
982
- const fr_namespaceObject = JSON.parse('{"cell.filter-cell":"Destination cible - cliquer pour changer","cell.set-blank":"Marquer comme vide","cell.set-not-blank":"Marquer comme non vide","cell.tile.location":"Plateau: la case ({{x}}, {{y}})","cell.toggle-direction":"Direction d\'écriture - cliquer pour changer","common.blanks":"Cases vides","common.clear":"Effacer","common.close":"Fermer","common.consonants":"Consonnes","common.loading":"Chargement","common.next":"Suivant","common.points":"Points","common.previous":"Précédent","common.tiles":"Cases","common.two-letter-tiles":"Deux lettres","common.vowels":"Voyelles","common.word":"Mot","common.words":"Mots","dictionary.empty-state.no-definitions":"Le mot existe dans le dictionary mais n\'a pas de définition.","dictionary.empty-state.no-results":"Impossible de trouver une définition pour ce mot dans le dictionaire.","dictionary.empty-state.not-allowed":"Ce mot n\'est pas pas acceptable.","dictionary.empty-state.uninitialized":"La définition dictionaire du dernier mot surligné sera affichée ici.","dictionary.input.placeholder":"Rechercher dans le dictionnaire...","empty-state.error":"Erreur","empty-state.info":"Info","empty-state.success":"Ouais!","empty-state.warning":"Oups!","github":"Voir ce projet sur GitHub","keyMap":"Raccourcis clavier","keyMap.board":"Plateau","keyMap.board.toggle-blank":"Marqué/Démarqué la case en tant que vide","keyMap.board.toggle-direction":"Faire basculer la direction d\'écriture","keyMap.board-and-rack":"Plateau & chevalet","keyMap.board-and-rack.insert-two-letter-tile":"Insérer une tuile de deux lettres","keyMap.board-and-rack.navigate":"Naviguer","keyMap.board-and-rack.remove-tile":"Supprimer une case","keyMap.board-and-rack.submit":"Commencer la résolution","keyMap.rack":"Chevalet","keyMap.rack.insert-blank":"Inserer une case vide (spacebar)","menu":"Menu","rack.placeholder":"Lettres","rack.tile.location":"Chevalet: la case ({{index}})","remaining-tiles":"Cases restantes","results":"Résultats","results.empty-state.no-filtered-results":"Aucun résultat ne correspond à cette requête","results.empty-state.no-results":"Pas de résultats - impossible de générer des mots.","results.empty-state.outdated":"Les résultats sont dépassé. Cliquer ci-dessous pour mettre à jour.","results.empty-state.uninitialized":"Les mots générés à partir de vos lettres seront affichés ici.","results.input.placeholder":"Rechercher les résultats... (RegExp)","results.insert":"Inserer","results.solve":"Résoudre","settings":"Options","settings.autoGroupTiles":"Grouper les cases restantes","settings.autoGroupTiles.left":"Vers la droite","settings.autoGroupTiles.right":"Vers la gauche","settings.autoGroupTiles.null":"Ne pas grouper","settings.game":"Jeu","settings.language":"Langue","words":"Mots créés","words.invalid":"Incorrect","words.valid":"Corriger"}');
983
- ;// CONCATENATED MODULE: ./src/i18n/pl.json
984
- const pl_namespaceObject = JSON.parse('{"cell.filter-cell":"Miejsce docelowe - kliknij aby zmienić","cell.set-blank":"Oznacz jako blank","cell.set-not-blank":"Oznacz jako nie blank","cell.tile.location":"Plansza: płytka ({{x}}, {{y}})","cell.toggle-direction":"Kierunek wpisywania - kliknij aby zmienić","common.blanks":"Blanki","common.clear":"Wyczyść","common.close":"Zamknij","common.consonants":"Spółgłoski","common.loading":"Ładowanie","common.next":"Następne","common.points":"Punkty","common.previous":"Poprzednie","common.tiles":"Płytki","common.two-letter-tiles":"Dwuliterowe","common.vowels":"Samogłoski","common.word":"Słowo","common.words":"Słowa","dictionary.empty-state.no-definitions":"Słowo istnieje w słowniku ale nie posiada definicji.","dictionary.empty-state.no-results":"Nie udało się znaleźć definicji słowa w słowniku.","dictionary.empty-state.not-allowed":"To słowo nie jest dopuszczalne w grach.","dictionary.empty-state.uninitialized":"Tu zostanie wyświetlona słownikowa definicja ostatnio podświetlonego słowa.","dictionary.input.placeholder":"Szukaj w słowniku...","empty-state.error":"Błąd","empty-state.info":"Info","empty-state.success":"Hurra!","empty-state.warning":"Ups!","github":"Zobacz ten projekt na GitHubie","keyMap":"Skróty klawiszowe","keyMap.board":"Plansza","keyMap.board.toggle-blank":"Oznacz/odznacz płytkę jako blank","keyMap.board.toggle-direction":"Zmień kierunek wpisywania","keyMap.board-and-rack":"Plansza i stojak","keyMap.board-and-rack.insert-two-letter-tile":"Wstaw dwuliterową płytkę","keyMap.board-and-rack.navigate":"Nawigacja","keyMap.board-and-rack.remove-tile":"Zdejmij płytkę","keyMap.board-and-rack.submit":"Rozpocznij wyszukiwanie","keyMap.rack":"Stojak","keyMap.rack.insert-blank":"Wstaw blanka (spacja)","menu":"Menu","rack.placeholder":"Literki","rack.tile.location":"Stojak: płytka ({{index}})","remaining-tiles":"Pozostałe płytki","results":"Wyniki","results.empty-state.no-filtered-results":"Żaden wynik nie pasuje do tej kwerendy.","results.empty-state.no-results":"Brak wyników - nie można wygenerować żadnego słowa.","results.empty-state.outdated":"Wyniki są nieaktualne. Kliknij poniżej, aby zaktualizować.","results.empty-state.uninitialized":"Tu zostaną wyświetlone słowa wygenerowane z Twoich liter.","results.input.placeholder":"Szukaj rozwiązania... (RegExp)","results.insert":"Wstaw","results.solve":"Rozwiąż","settings":"Opcje","settings.autoGroupTiles":"Grupuj pozostałe płytki","settings.autoGroupTiles.left":"Po lewej","settings.autoGroupTiles.right":"Po prawej","settings.autoGroupTiles.null":"Nie grupuj","settings.game":"Gra","settings.language":"Język","words":"Utworzone słowa","words.invalid":"Niepoprawne","words.valid":"Poprawne"}');
985
- ;// CONCATENATED MODULE: ./src/i18n/i18n.ts
986
-
987
-
988
-
989
-
990
-
991
-
992
-
993
- const i18n = {
994
- [build.Locale.DE_DE]: de_namespaceObject,
995
- [build.Locale.EN_GB]: en_namespaceObject,
996
- [build.Locale.EN_US]: en_namespaceObject,
997
- [build.Locale.ES_ES]: es_namespaceObject,
998
- [build.Locale.FA_IR]: fa_namespaceObject,
999
- [build.Locale.FR_FR]: fr_namespaceObject,
1000
- [build.Locale.PL_PL]: pl_namespaceObject
1001
- };
1002
- /* harmony default export */ const i18n_i18n = (i18n);
1003
-
1004
- ;// CONCATENATED MODULE: ./src/i18n/constants.ts
1005
-
1006
- const LOCALE_FEATURES = {
1007
- [build.Locale.DE_DE]: {
1008
- direction: "ltr",
1009
- fontFamily: "Open Sans",
1010
- consonants: true,
1011
- vowels: true
1012
- },
1013
- [build.Locale.EN_GB]: {
1014
- direction: "ltr",
1015
- fontFamily: "Open Sans",
1016
- consonants: true,
1017
- vowels: true
1018
- },
1019
- [build.Locale.EN_US]: {
1020
- direction: "ltr",
1021
- fontFamily: "Open Sans",
1022
- consonants: true,
1023
- vowels: true
1024
- },
1025
- [build.Locale.ES_ES]: {
1026
- direction: "ltr",
1027
- fontFamily: "Open Sans",
1028
- consonants: true,
1029
- vowels: true
1030
- },
1031
- [build.Locale.FA_IR]: {
1032
- direction: "rtl",
1033
- fontFamily: "Vazirmatn",
1034
- consonants: false,
1035
- vowels: false
1036
- },
1037
- [build.Locale.FR_FR]: {
1038
- direction: "ltr",
1039
- fontFamily: "Open Sans",
1040
- consonants: true,
1041
- vowels: true
1042
- },
1043
- [build.Locale.PL_PL]: {
1044
- direction: "ltr",
1045
- fontFamily: "Open Sans",
1046
- consonants: true,
1047
- vowels: true
1048
- }
1049
- };
1050
-
1051
- ;// CONCATENATED MODULE: ./src/i18n/index.ts
1052
-
1053
-
1054
-
1055
-
1056
- /***/ }),
1057
-
1058
- /***/ 95784:
1059
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1060
-
1061
-
1062
- // EXPORTS
1063
- __webpack_require__.d(__webpack_exports__, {
1064
- "J8": () => (/* reexport */ lib_canUseDom),
1065
- "Ri": () => (/* reexport */ lib_createArray),
1066
- "DI": () => (/* reexport */ lib_createGridOf),
1067
- "np": () => (/* reexport */ lib_createKeyboardNavigation),
1068
- "Ml": () => (/* reexport */ lib_createNullMovingComparator),
1069
- "Nj": () => (/* reexport */ lib_detectLocale),
1070
- "nK": () => (/* reexport */ lib_extractCharacters),
1071
- "WM": () => (/* reexport */ lib_extractInputValue),
1072
- "Jp": () => (/* reexport */ lib_findCell),
1073
- "ZM": () => (/* reexport */ lib_getRemainingTiles),
1074
- "op": () => (/* reexport */ lib_getRemainingTilesGroups),
1075
- "vc": () => (/* reexport */ lib_getTileSizes),
1076
- "Mf": () => (/* reexport */ lib_inverseDirection),
1077
- "yl": () => (/* reexport */ lib_isCtrl),
1078
- "V5": () => (/* reexport */ lib_isMac),
1079
- "Kj": () => (/* reexport */ lib_isRegExp),
1080
- "HP": () => (/* reexport */ lib_memoize),
1081
- "ZT": () => (/* reexport */ lib_noop),
1082
- "uj": () => (/* reexport */ lib_sortResults),
1083
- "DR": () => (/* reexport */ lib_unorderedArraysEqual),
1084
- "gV": () => (/* reexport */ lib_zipCharactersAndTiles)
1085
- });
1086
-
1087
- // UNUSED EXPORTS: createComparator, createKeyComparator, createStringComparator, getCellSize, getRemainingTilesCount, getTotalRemainingTilesCount, isStringArray, numberComparator, reverseComparator
1088
-
1089
- ;// CONCATENATED MODULE: ./src/lib/canUseDom.ts
1090
- const canUseDom = Boolean( false && 0);
1091
- /* harmony default export */ const lib_canUseDom = (canUseDom);
1092
-
1093
- ;// CONCATENATED MODULE: ./src/lib/createArray.ts
1094
- const createArray = (length)=>Array.from({
1095
- length
1096
- });
1097
- /* harmony default export */ const lib_createArray = (createArray);
1098
-
1099
- ;// CONCATENATED MODULE: ./src/lib/createGridOf.ts
1100
-
1101
- const createGridOf = (width, height, getInitialValue)=>{
1102
- return lib_createArray(height).map((_row, y)=>{
1103
- return lib_createArray(width).map((_cell, x)=>{
1104
- return getInitialValue(x, y);
1105
- });
1106
- });
1107
- };
1108
- /* harmony default export */ const lib_createGridOf = (createGridOf);
1109
-
1110
- ;// CONCATENATED MODULE: ./src/lib/noop.ts
1111
- const noop = ()=>undefined;
1112
- /* harmony default export */ const lib_noop = (noop);
1113
-
1114
- ;// CONCATENATED MODULE: ./src/lib/createKeyboardNavigation.ts
1115
-
1116
- const createKeyboardNavigation = ({ onArrowDown =lib_noop , onArrowLeft =lib_noop , onArrowRight =lib_noop , onArrowUp =lib_noop , onBackspace =lib_noop , onDelete =lib_noop , onEnter =lib_noop , onKeyDown =lib_noop , onSpace =lib_noop })=>{
1117
- const handlers = {
1118
- ArrowUp: onArrowUp,
1119
- ArrowDown: onArrowDown,
1120
- ArrowLeft: onArrowLeft,
1121
- ArrowRight: onArrowRight,
1122
- Backspace: onBackspace,
1123
- Delete: onDelete,
1124
- Enter: onEnter,
1125
- " ": onSpace
1126
- };
1127
- const handleKeyDown = (event)=>{
1128
- const handler = handlers[event.key] || lib_noop;
1129
- handler(event);
1130
- onKeyDown(event);
1131
- };
1132
- return handleKeyDown;
1133
- };
1134
- /* harmony default export */ const lib_createKeyboardNavigation = (createKeyboardNavigation);
1135
-
1136
- ;// CONCATENATED MODULE: ./src/lib/createNullMovingComparator.ts
1137
- const createNullMovingComparator = (direction)=>{
1138
- return (a, b)=>{
1139
- if (a === b) {
1140
- return 0;
1141
- }
1142
- if (a === null) {
1143
- return direction === "right" ? 1 : -1;
1144
- }
1145
- if (b === null) {
1146
- return direction === "right" ? -1 : 1;
1147
- }
1148
- return 0;
1149
- };
1150
- };
1151
- /* harmony default export */ const lib_createNullMovingComparator = (createNullMovingComparator);
1152
-
1153
- // EXTERNAL MODULE: ../types/build/index.js
1154
- var build = __webpack_require__(34046);
1155
- ;// CONCATENATED MODULE: ./src/lib/detectLocale.ts
1156
-
1157
- const detectLocale = ()=>{
1158
- if (window.navigator.languages.includes("pl") || window.navigator.languages.includes("pl-PL")) {
1159
- return build.Locale.PL_PL;
1160
- }
1161
- if (window.navigator.languages.includes("en-GB")) {
1162
- return build.Locale.EN_GB;
1163
- }
1164
- if (window.navigator.languages.includes("fa") || window.navigator.languages.includes("fa-IR")) {
1165
- return build.Locale.FA_IR;
1166
- }
1167
- if (window.navigator.languages.includes("fr-FR")) {
1168
- return build.Locale.FR_FR;
1169
- }
1170
- return build.Locale.EN_US;
1171
- };
1172
- /* harmony default export */ const lib_detectLocale = (detectLocale);
1173
-
1174
- // EXTERNAL MODULE: ../constants/build/index.js
1175
- var constants_build = __webpack_require__(7618);
1176
- ;// CONCATENATED MODULE: ./src/lib/extractCharacters.ts
1177
-
1178
- const extractCharacters = (config, value)=>{
1179
- let index = 0;
1180
- const characters = [];
1181
- while(index < value.length){
1182
- const character = value[index];
1183
- const nextCharacter = value[index + 1];
1184
- const twoCharacterTileCandidate = `${character}${nextCharacter}`;
1185
- if (config.twoCharacterTiles.includes(twoCharacterTileCandidate)) {
1186
- characters.push(twoCharacterTileCandidate);
1187
- ++index;
1188
- } else if (config.hasCharacter(character) || character === constants_build.BLANK) {
1189
- characters.push(character);
1190
- }
1191
- ++index;
1192
- }
1193
- return characters;
1194
- };
1195
- /* harmony default export */ const lib_extractCharacters = (extractCharacters);
1196
-
1197
- ;// CONCATENATED MODULE: ./src/lib/extractInputValue.ts
1198
- const extractInputValue = (input)=>{
1199
- const value = input.value.toLocaleLowerCase();
1200
- if (input.selectionStart === null || input.selectionEnd === null) {
1201
- return value;
1202
- }
1203
- const index = Math.min(input.selectionStart, input.selectionEnd);
1204
- if (index > 0) {
1205
- return value.substring(index - 1, index);
1206
- }
1207
- return value;
1208
- };
1209
- /* harmony default export */ const lib_extractInputValue = (extractInputValue);
1210
-
1211
- ;// CONCATENATED MODULE: ./src/lib/findCell.ts
1212
- const findCell = (cells, x, y)=>{
1213
- return cells.find((cell)=>cell.x === x && cell.y === y);
1214
- };
1215
- /* harmony default export */ const lib_findCell = (findCell);
1216
-
1217
- // EXTERNAL MODULE: ./src/parameters/index.ts
1218
- var parameters = __webpack_require__(74200);
1219
- ;// CONCATENATED MODULE: ./src/lib/getCellSize.ts
1220
-
1221
- const getCellSize = (config, width, height)=>{
1222
- const maxWidth = (width - BOARD_CELL_BORDER_WIDTH) / config.boardWidth - BOARD_CELL_BORDER_WIDTH;
1223
- const maxHeight = (height - BOARD_CELL_BORDER_WIDTH) / config.boardHeight - BOARD_CELL_BORDER_WIDTH;
1224
- const cellSize = Math.min(maxWidth, maxHeight);
1225
- return Math.floor(Math.min(Math.max(cellSize, BOARD_TILE_SIZE_MIN), BOARD_TILE_SIZE_MAX));
1226
- };
1227
- /* harmony default export */ const lib_getCellSize = ((/* unused pure expression or super */ null && (getCellSize)));
1228
-
1229
- ;// CONCATENATED MODULE: ./src/lib/createStringComparator.ts
1230
- const createStringComparator = (locale)=>(a, b)=>a.localeCompare(b, locale);
1231
- /* harmony default export */ const lib_createStringComparator = (createStringComparator);
1232
-
1233
- ;// CONCATENATED MODULE: ./src/lib/numberComparator.ts
1234
- const numberComparator = (a, b)=>a - b;
1235
- /* harmony default export */ const lib_numberComparator = (numberComparator);
1236
-
1237
- ;// CONCATENATED MODULE: ./src/lib/createKeyComparator.ts
1238
-
1239
-
1240
- const createKeyComparator = (key, locale)=>{
1241
- const stringComparator = lib_createStringComparator(locale);
1242
- return (a, b)=>{
1243
- const aValue = a[key];
1244
- const bValue = b[key];
1245
- if (typeof aValue === "string" && typeof bValue === "string") {
1246
- return stringComparator(aValue, bValue);
1247
- }
1248
- if (typeof aValue === "number" && typeof bValue === "number") {
1249
- return lib_numberComparator(aValue, bValue);
1250
- }
1251
- return 0;
1252
- };
1253
- };
1254
- /* harmony default export */ const lib_createKeyComparator = (createKeyComparator);
1255
-
1256
- ;// CONCATENATED MODULE: ./src/lib/getRemainingTiles.ts
1257
-
1258
-
1259
- const getRemainingTiles = (config, board, characters, locale)=>{
1260
- const nonEmptyCells = board.rows.flat().filter((cell)=>!cell.isEmpty);
1261
- const letterCells = nonEmptyCells.filter((cell)=>!cell.tile.isBlank);
1262
- const remainingTiles = Object.fromEntries(config.tiles.map((tile)=>[
1263
- tile.character,
1264
- {
1265
- ...tile,
1266
- usedCount: 0
1267
- }
1268
- ]));
1269
- const blank = {
1270
- character: constants_build.BLANK,
1271
- count: config.blanksCount,
1272
- score: config.blankScore,
1273
- usedCount: nonEmptyCells.filter((cell)=>cell.tile.isBlank).length + characters.filter((character)=>character === constants_build.BLANK).length
1274
- };
1275
- const letters = [
1276
- ...letterCells.map((cell)=>cell.tile.character),
1277
- ...characters.filter((letter)=>letter !== constants_build.BLANK)
1278
- ];
1279
- const unknownLetters = letters.filter((letter)=>typeof remainingTiles[letter] === "undefined");
1280
- for (const letter of unknownLetters){
1281
- remainingTiles[letter] = {
1282
- character: letter,
1283
- count: 0,
1284
- score: 0,
1285
- usedCount: 0
1286
- };
1287
- }
1288
- for (const letter of letters){
1289
- ++remainingTiles[letter].usedCount;
1290
- }
1291
- const comparator = lib_createKeyComparator("character", locale);
1292
- return [
1293
- ...Object.values(remainingTiles).sort(comparator),
1294
- blank
1295
- ];
1296
- };
1297
- /* harmony default export */ const lib_getRemainingTiles = (getRemainingTiles);
1298
-
1299
- ;// CONCATENATED MODULE: ./src/lib/getRemainingTilesCount.ts
1300
- const getRemainingTilesCount = (remainingTiles)=>{
1301
- return remainingTiles.reduce((sum, { count , usedCount })=>sum + count - usedCount, 0);
1302
- };
1303
- /* harmony default export */ const lib_getRemainingTilesCount = (getRemainingTilesCount);
1304
-
1305
- ;// CONCATENATED MODULE: ./src/lib/getTotalRemainingTilesCount.ts
1306
- const getTotalRemainingTilesCount = (remainingTiles)=>{
1307
- return remainingTiles.reduce((sum, { count })=>sum + count, 0);
1308
- };
1309
- /* harmony default export */ const lib_getTotalRemainingTilesCount = (getTotalRemainingTilesCount);
1310
-
1311
- ;// CONCATENATED MODULE: ./src/lib/getRemainingTilesGroups.ts
1312
-
1313
-
1314
-
1315
- const getRemainingTilesGroups = (remainingTiles)=>{
1316
- const consonants = remainingTiles.filter(isConsonant);
1317
- const vowels = remainingTiles.filter(isVowel);
1318
- const other = remainingTiles.filter(isOther);
1319
- const groups = [];
1320
- groups.push({
1321
- remainingCount: lib_getRemainingTilesCount(vowels),
1322
- tiles: vowels,
1323
- translationKey: "common.vowels",
1324
- totalCount: lib_getTotalRemainingTilesCount(vowels)
1325
- });
1326
- groups.push({
1327
- remainingCount: lib_getRemainingTilesCount(consonants),
1328
- tiles: consonants,
1329
- translationKey: "common.consonants",
1330
- totalCount: lib_getTotalRemainingTilesCount(consonants)
1331
- });
1332
- groups.push({
1333
- remainingCount: lib_getRemainingTilesCount(other),
1334
- tiles: other,
1335
- translationKey: "common.tiles",
1336
- totalCount: lib_getTotalRemainingTilesCount(other)
1337
- });
1338
- const twoCharacterTiles = remainingTiles.filter(isTwoCharacter);
1339
- const blanks = remainingTiles.filter(isBlank);
1340
- groups.push({
1341
- remainingCount: lib_getRemainingTilesCount(twoCharacterTiles),
1342
- tiles: twoCharacterTiles,
1343
- translationKey: "common.two-letter-tiles",
1344
- totalCount: lib_getTotalRemainingTilesCount(twoCharacterTiles)
1345
- });
1346
- groups.push({
1347
- remainingCount: lib_getRemainingTilesCount(blanks),
1348
- tiles: blanks,
1349
- translationKey: "common.blanks",
1350
- totalCount: lib_getTotalRemainingTilesCount(blanks)
1351
- });
1352
- return groups.filter(({ totalCount })=>totalCount > 0);
1353
- };
1354
- const isConsonant = (tile)=>constants_build.CONSONANTS.includes(tile.character);
1355
- const isVowel = (tile)=>constants_build.VOWELS.includes(tile.character);
1356
- const isTwoCharacter = (tile)=>tile.character.length === 2;
1357
- const isBlank = (tile)=>tile.character === constants_build.BLANK;
1358
- const isOther = (tile)=>!isConsonant(tile) && !isVowel(tile) && !isBlank(tile) && !isTwoCharacter(tile);
1359
- /* harmony default export */ const lib_getRemainingTilesGroups = (getRemainingTilesGroups);
1360
-
1361
- ;// CONCATENATED MODULE: ./src/lib/getTileSizes.ts
1362
-
1363
- const getTileSizes = (tileSize)=>({
1364
- pointsFontSize: Math.max(Math.round(tileSize * 0.25), parameters/* BOARD_TILE_FONT_SIZE_POINTS_MIN */.$B),
1365
- tileFontSize: Math.max(Math.round(tileSize * 0.6), parameters/* BOARD_TILE_FONT_SIZE_MIN */.V4),
1366
- tileSize
1367
- });
1368
- /* harmony default export */ const lib_getTileSizes = (getTileSizes);
1369
-
1370
- ;// CONCATENATED MODULE: ./src/lib/inverseDirection.ts
1371
- const inverseDirection = (direction)=>{
1372
- return direction === "left" ? "right" : "left";
1373
- };
1374
- /* harmony default export */ const lib_inverseDirection = (inverseDirection);
1375
-
1376
- ;// CONCATENATED MODULE: ./src/lib/isCtrl.ts
1377
- const isCtrl = (event)=>{
1378
- return event.ctrlKey || event.metaKey;
1379
- };
1380
- /* harmony default export */ const lib_isCtrl = (isCtrl);
1381
-
1382
- ;// CONCATENATED MODULE: ./src/lib/isMac.ts
1383
- const isMac = ()=>{
1384
- if (!globalThis.navigator) {
1385
- return false;
1386
- }
1387
- return globalThis.navigator.platform.toLowerCase().includes("mac");
1388
- };
1389
- /* harmony default export */ const lib_isMac = (isMac);
1390
-
1391
- ;// CONCATENATED MODULE: ./src/lib/isRegExp.ts
1392
- const isRegExp = (value)=>{
1393
- try {
1394
- // eslint-disable-next-line no-new
1395
- new RegExp(value);
1396
- return true;
1397
- } catch {
1398
- return false;
1399
- }
1400
- };
1401
- /* harmony default export */ const lib_isRegExp = (isRegExp);
1402
-
1403
- ;// CONCATENATED MODULE: ./src/lib/memoize.ts
1404
- const memoize = (fn)=>{
1405
- const cache = [];
1406
- const hasCache = (...parameters)=>Boolean(readCache(parameters));
1407
- const readCache = (parameters)=>{
1408
- return cache.find((entry)=>parametersEqual(entry.parameters, parameters))?.result;
1409
- };
1410
- const removeCache = (parameters)=>{
1411
- const index = cache.findIndex((entry)=>parametersEqual(entry.parameters, parameters));
1412
- if (index >= 0) {
1413
- cache.splice(index, 1);
1414
- }
1415
- };
1416
- const writeCache = (parameters, result)=>{
1417
- cache.push({
1418
- parameters,
1419
- result
1420
- });
1421
- };
1422
- const memoized = (...parameters)=>{
1423
- const cached = readCache(parameters);
1424
- if (cached) {
1425
- return cached;
1426
- }
1427
- const result = fn(...parameters);
1428
- if (result instanceof Promise) {
1429
- result.catch(()=>{
1430
- removeCache(parameters);
1431
- });
1432
- }
1433
- writeCache(parameters, result);
1434
- return result;
1435
- };
1436
- return Object.assign(memoized, {
1437
- hasCache
1438
- });
1439
- };
1440
- const parametersEqual = (a, b)=>{
1441
- if (a.length !== b.length) {
1442
- return false;
1443
- }
1444
- return a.every((parameter, index)=>parameter === b[index]);
1445
- };
1446
- /* harmony default export */ const lib_memoize = (memoize);
1447
-
1448
- // EXTERNAL MODULE: ./src/types/index.ts
1449
- var types = __webpack_require__(9033);
1450
- ;// CONCATENATED MODULE: ./src/lib/reverseComparator.ts
1451
- const reverseComparator = (comparator)=>{
1452
- return (a, b)=>-comparator(a, b);
1453
- };
1454
- /* harmony default export */ const lib_reverseComparator = (reverseComparator);
1455
-
1456
- ;// CONCATENATED MODULE: ./src/lib/sortResults.ts
1457
-
1458
-
1459
-
1460
- const comparators = {
1461
- [types/* ResultColumn.BlanksCount */.M.BlanksCount]: (locale)=>lib_createKeyComparator("blanksCount", locale),
1462
- [types/* ResultColumn.ConsonantsCount */.M.ConsonantsCount]: (locale)=>lib_createKeyComparator("consonantsCount", locale),
1463
- [types/* ResultColumn.Points */.M.Points]: (locale)=>lib_createKeyComparator("points", locale),
1464
- [types/* ResultColumn.TilesCount */.M.TilesCount]: (locale)=>lib_createKeyComparator("tilesCount", locale),
1465
- [types/* ResultColumn.VowelsCount */.M.VowelsCount]: (locale)=>lib_createKeyComparator("vowelsCount", locale),
1466
- [types/* ResultColumn.Word */.M.Word]: (locale)=>lib_createKeyComparator("word", locale),
1467
- [types/* ResultColumn.WordsCount */.M.WordsCount]: (locale)=>lib_createKeyComparator("wordsCount", locale)
1468
- };
1469
- const sortResults = (results, column, sortDirection, locale)=>{
1470
- if (typeof results === "undefined") {
1471
- return results;
1472
- }
1473
- const createComparator = comparators[column];
1474
- const comparator = createComparator(locale);
1475
- const finalComparator = sortDirection === types/* SortDirection.Descending */.S.Descending ? lib_reverseComparator(comparator) : comparator;
1476
- return [
1477
- ...results
1478
- ].sort(finalComparator);
1479
- };
1480
- /* harmony default export */ const lib_sortResults = (sortResults);
1481
-
1482
- ;// CONCATENATED MODULE: ./src/lib/createComparator.ts
1483
-
1484
-
1485
- const createComparator = (locale)=>{
1486
- const stringComparator = lib_createStringComparator(locale);
1487
- return (a, b)=>{
1488
- if (typeof a === "string" && typeof b === "string") {
1489
- return stringComparator(a, b);
1490
- }
1491
- if (typeof a === "number" && typeof b === "number") {
1492
- return lib_numberComparator(a, b);
1493
- }
1494
- return 0;
1495
- };
1496
- };
1497
- /* harmony default export */ const lib_createComparator = (createComparator);
1498
-
1499
- ;// CONCATENATED MODULE: ./src/lib/unorderedArraysEqual.ts
1500
-
1501
- const unorderedArraysEqual = (a, b, locale)=>{
1502
- if (a.length !== b.length) {
1503
- return false;
1504
- }
1505
- const comparator = lib_createComparator(locale);
1506
- const aSorted = [
1507
- ...a
1508
- ].sort(comparator);
1509
- const bSorted = [
1510
- ...b
1511
- ].sort(comparator);
1512
- return aSorted.every((character, index)=>character === bSorted[index]);
1513
- };
1514
- /* harmony default export */ const lib_unorderedArraysEqual = (unorderedArraysEqual);
1515
-
1516
- ;// CONCATENATED MODULE: ./src/lib/zipCharactersAndTiles.ts
1517
-
1518
- const zipCharactersAndTiles = (characters, tiles)=>{
1519
- let remainingTiles = [
1520
- ...tiles
1521
- ];
1522
- return characters.map((character)=>{
1523
- const index = remainingTiles.findIndex((tile)=>character === constants_build.BLANK ? tile.isBlank : character === tile.character);
1524
- if (index >= 0) {
1525
- const tile = remainingTiles[index];
1526
- remainingTiles = [
1527
- ...remainingTiles.slice(0, index),
1528
- ...remainingTiles.slice(index + 1)
1529
- ];
1530
- return {
1531
- character,
1532
- tile
1533
- };
1534
- }
1535
- return {
1536
- character,
1537
- tile: null
1538
- };
1539
- });
1540
- };
1541
- /* harmony default export */ const lib_zipCharactersAndTiles = (zipCharactersAndTiles);
1542
-
1543
- ;// CONCATENATED MODULE: ./src/lib/index.ts
1544
-
1545
-
1546
-
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
-
1554
-
1555
-
1556
-
1557
-
1558
-
1559
-
1560
-
1561
-
1562
-
1563
-
1564
-
1565
-
1566
-
1567
-
1568
-
1569
-
1570
-
1571
-
1572
-
1573
-
1574
-
1575
-
1576
- /***/ }),
1577
-
1578
- /***/ 74200:
1579
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1580
-
1581
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1582
- /* harmony export */ "$B": () => (/* binding */ BOARD_TILE_FONT_SIZE_POINTS_MIN),
1583
- /* harmony export */ "$L": () => (/* binding */ RESULTS_HEADER_HEIGHT),
1584
- /* harmony export */ "$M": () => (/* binding */ RACK_TILE_SIZE_MAX),
1585
- /* harmony export */ "BF": () => (/* binding */ PLAIN_TILES_COLOR_DEFAULT),
1586
- /* harmony export */ "D": () => (/* binding */ PLAIN_TILES_TILE_MAX_SCATTER),
1587
- /* harmony export */ "F1": () => (/* binding */ COLOR_GREEN),
1588
- /* harmony export */ "Kw": () => (/* binding */ BOARD_TILE_SIZE_MAX),
1589
- /* harmony export */ "MA": () => (/* binding */ TRANSITION_DURATION_LONG),
1590
- /* harmony export */ "V4": () => (/* binding */ BOARD_TILE_FONT_SIZE_MIN),
1591
- /* harmony export */ "YF": () => (/* binding */ BORDER_WIDTH),
1592
- /* harmony export */ "a_": () => (/* binding */ PLAIN_TILES_TILE_MAX_ROTATE),
1593
- /* harmony export */ "d4": () => (/* binding */ PLAIN_TILES_POINTS_COLORS),
1594
- /* harmony export */ "eU": () => (/* binding */ PROGRESS_COLOR_BACKGROUND),
1595
- /* harmony export */ "fl": () => (/* binding */ PLAIN_TILES_PADDING_HORIZONTAL),
1596
- /* harmony export */ "h4": () => (/* binding */ GITHUB_PROJECT_URL),
1597
- /* harmony export */ "j$": () => (/* binding */ BREAKPOINTS),
1598
- /* harmony export */ "ku": () => (/* binding */ PLAIN_TILES_TILE_MARGIN),
1599
- /* harmony export */ "mM": () => (/* binding */ REMAINING_TILES_TILE_SIZE),
1600
- /* harmony export */ "n6": () => (/* binding */ DICTIONARY_HEIGHT),
1601
- /* harmony export */ "oj": () => (/* binding */ BOARD_TILE_SIZE_MIN),
1602
- /* harmony export */ "op": () => (/* binding */ COMPONENTS_SPACING_SMALL),
1603
- /* harmony export */ "pI": () => (/* binding */ COLOR_BLUE),
1604
- /* harmony export */ "qp": () => (/* binding */ RESULTS_INPUT_HEIGHT),
1605
- /* harmony export */ "rV": () => (/* binding */ PLAIN_TILES_TILE_SIZE),
1606
- /* harmony export */ "rx": () => (/* binding */ RESULTS_ITEM_HEIGHT),
1607
- /* harmony export */ "tr": () => (/* binding */ COMPONENTS_SPACING),
1608
- /* harmony export */ "uX": () => (/* binding */ PLAIN_TILES_PADDING_VERTICAL),
1609
- /* harmony export */ "uk": () => (/* binding */ INITIALIZATION_DURATION),
1610
- /* harmony export */ "xZ": () => (/* binding */ PROGRESS_COLOR_VALUE),
1611
- /* harmony export */ "yg": () => (/* binding */ COLOR_RED),
1612
- /* harmony export */ "yr": () => (/* binding */ COLOR_YELLOW),
1613
- /* harmony export */ "z": () => (/* binding */ COLUMN_MIN_HEIGHT)
1614
- /* harmony export */ });
1615
- /* unused harmony exports TRANSITION_DURATION, BOARD_CELL_BORDER_WIDTH, TILE_SIZE, PLAIN_TILES_VERSION_TILE_COLOR, PLAIN_TILES_VERSION_TILE_SIZE */
1616
- const BREAKPOINTS = {
1617
- xs: 480,
1618
- s: 768,
1619
- m: 992,
1620
- l: 1200,
1621
- xl: 1400
1622
- };
1623
- const GITHUB_PROJECT_URL = "https://github.com/kamilmielnik/scrabble-solver";
1624
- const INITIALIZATION_DURATION = 100;
1625
- const TRANSITION_DURATION = 100;
1626
- const TRANSITION_DURATION_LONG = 250;
1627
- const COLOR_BLUE = "#c7d8f9";
1628
- const COLOR_GREEN = "#bae3ba";
1629
- const COLOR_RED = "#f7c2aa";
1630
- const COLOR_YELLOW = "#efe3ae";
1631
- const COMPONENTS_SPACING = 40;
1632
- const COMPONENTS_SPACING_SMALL = 20;
1633
- const BOARD_CELL_BORDER_WIDTH = 1;
1634
- const BOARD_TILE_FONT_SIZE_MIN = 14;
1635
- const BOARD_TILE_FONT_SIZE_POINTS_MIN = 10;
1636
- const BOARD_TILE_SIZE_MAX = 64;
1637
- /**
1638
- * 20 - fits all board tiles without horizontal scrollbar on 360px viewport width (font-size: 14px)
1639
- * 21 - fits all board tiles without horizontal scrollbar on 375px viewport width (font-size: 14px)
1640
- * 26 - tiles start to look good (font-size: 16px)
1641
- */ const BOARD_TILE_SIZE_MIN = 20;
1642
- const BORDER_WIDTH = 1;
1643
- const COLUMN_MIN_HEIGHT = 588.5;
1644
- const DICTIONARY_HEIGHT = 260;
1645
- const TILE_SIZE = 80;
1646
- const PLAIN_TILES_COLOR_DEFAULT = COLOR_GREEN;
1647
- const PLAIN_TILES_PADDING_HORIZONTAL = 0;
1648
- const PLAIN_TILES_PADDING_VERTICAL = 0;
1649
- const PLAIN_TILES_POINTS_COLORS = {
1650
- 1: COLOR_YELLOW,
1651
- 2: COLOR_GREEN,
1652
- 3: COLOR_BLUE,
1653
- 4: COLOR_RED,
1654
- 5: COLOR_RED,
1655
- 6: COLOR_RED,
1656
- 7: COLOR_RED,
1657
- 8: COLOR_RED,
1658
- 9: COLOR_RED,
1659
- 10: COLOR_RED
1660
- };
1661
- const PLAIN_TILES_TILE_MARGIN = 6;
1662
- const PLAIN_TILES_TILE_MAX_ROTATE = 0;
1663
- const PLAIN_TILES_TILE_MAX_SCATTER = 0;
1664
- const PLAIN_TILES_TILE_SIZE = 80;
1665
- const PLAIN_TILES_VERSION_TILE_COLOR = (/* unused pure expression or super */ null && (COLOR_GREEN));
1666
- const PLAIN_TILES_VERSION_TILE_SIZE = (/* unused pure expression or super */ null && (TILE_SIZE));
1667
- const PROGRESS_COLOR_VALUE = "var(--color--violet--light)";
1668
- const PROGRESS_COLOR_BACKGROUND = "var(--color--inactive)";
1669
- const RACK_TILE_SIZE_MAX = 80;
1670
- const REMAINING_TILES_TILE_SIZE = 50;
1671
- const RESULTS_HEADER_HEIGHT = 34;
1672
- const RESULTS_ITEM_HEIGHT = 40;
1673
- const RESULTS_INPUT_HEIGHT = 40;
1674
-
1675
-
1676
- /***/ }),
1677
-
1678
- /***/ 64594:
1679
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1680
-
1681
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1682
- /* harmony export */ "j": () => (/* binding */ initialize),
1683
- /* harmony export */ "m": () => (/* binding */ reset)
1684
- /* harmony export */ });
1685
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75184);
1686
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
1687
-
1688
- const initialize = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createAction)("initialize");
1689
- const reset = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createAction)("reset");
1690
-
1691
-
1692
- /***/ }),
1693
-
1694
- /***/ 37686:
1695
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
1696
-
1697
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1698
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1699
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
1700
- /* harmony export */ });
1701
- /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86695);
1702
- /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__);
1703
- /* harmony import */ var redux_saga__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75998);
1704
- /* harmony import */ var _rootReducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5428);
1705
- /* harmony import */ var _sagas__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55883);
1706
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([redux_saga__WEBPACK_IMPORTED_MODULE_1__]);
1707
- redux_saga__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
1708
-
1709
-
1710
-
1711
-
1712
- const sagaMiddleware = (0,redux_saga__WEBPACK_IMPORTED_MODULE_1__["default"])();
1713
- const initialState = undefined;
1714
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1715
- // @ts-ignore
1716
- // eslint-disable-next-line no-underscore-dangle
1717
- const composeEnhancers = globalThis.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux__WEBPACK_IMPORTED_MODULE_0__.compose;
1718
- const createAppStore = ()=>{
1719
- const store = (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(_rootReducer__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, initialState, composeEnhancers((0,redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware)(sagaMiddleware)));
1720
- sagaMiddleware.run(_sagas__WEBPACK_IMPORTED_MODULE_3__/* .rootSaga */ .R);
1721
- return store;
1722
- };
1723
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createAppStore);
1724
-
1725
- __webpack_async_result__();
1726
- } catch(e) { __webpack_async_result__(e); } });
1727
-
1728
- /***/ }),
1729
-
1730
- /***/ 64579:
1731
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
1732
-
1733
- __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1734
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1735
- /* harmony export */ "$o": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.$o),
1736
- /* harmony export */ "AN": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.AN),
1737
- /* harmony export */ "En": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.En),
1738
- /* harmony export */ "HM": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.HM),
1739
- /* harmony export */ "I8": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.I8),
1740
- /* harmony export */ "Mj": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Mj),
1741
- /* harmony export */ "O0": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.O0),
1742
- /* harmony export */ "O_": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.O_),
1743
- /* harmony export */ "Or": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Or),
1744
- /* harmony export */ "QB": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.QB),
1745
- /* harmony export */ "QL": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.QL),
1746
- /* harmony export */ "R": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.R),
1747
- /* harmony export */ "Rn": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Rn),
1748
- /* harmony export */ "TP": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.TP),
1749
- /* harmony export */ "Xb": () => (/* reexport safe */ _localStorage__WEBPACK_IMPORTED_MODULE_2__.Z),
1750
- /* harmony export */ "Xk": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Xk),
1751
- /* harmony export */ "Yj": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Yj),
1752
- /* harmony export */ "ZA": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.ZA),
1753
- /* harmony export */ "ZO": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.ZO),
1754
- /* harmony export */ "Zf": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.Zf),
1755
- /* harmony export */ "_C": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__._C),
1756
- /* harmony export */ "bs": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.bs),
1757
- /* harmony export */ "dN": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.dN),
1758
- /* harmony export */ "f2": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.f2),
1759
- /* harmony export */ "fN": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.fN),
1760
- /* harmony export */ "fZ": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.fZ),
1761
- /* harmony export */ "id": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.id),
1762
- /* harmony export */ "ix": () => (/* reexport safe */ _useTypedSelector__WEBPACK_IMPORTED_MODULE_6__.Z),
1763
- /* harmony export */ "j2": () => (/* reexport safe */ _actions__WEBPACK_IMPORTED_MODULE_0__.j),
1764
- /* harmony export */ "lj": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.lj),
1765
- /* harmony export */ "mK": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.mK),
1766
- /* harmony export */ "mO": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.mO),
1767
- /* harmony export */ "mc": () => (/* reexport safe */ _actions__WEBPACK_IMPORTED_MODULE_0__.m),
1768
- /* harmony export */ "md": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.md),
1769
- /* harmony export */ "qM": () => (/* reexport safe */ _useTranslate__WEBPACK_IMPORTED_MODULE_5__.Z),
1770
- /* harmony export */ "sH": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.sH),
1771
- /* harmony export */ "uz": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.uz),
1772
- /* harmony export */ "vY": () => (/* reexport safe */ _createAppStore__WEBPACK_IMPORTED_MODULE_1__.Z),
1773
- /* harmony export */ "w1": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.w1),
1774
- /* harmony export */ "xU": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.xU),
1775
- /* harmony export */ "xj": () => (/* reexport safe */ _slices__WEBPACK_IMPORTED_MODULE_4__.xj),
1776
- /* harmony export */ "z$": () => (/* reexport safe */ _selectors__WEBPACK_IMPORTED_MODULE_3__.z$)
1777
- /* harmony export */ });
1778
- /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64594);
1779
- /* harmony import */ var _createAppStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37686);
1780
- /* harmony import */ var _localStorage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65723);
1781
- /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30391);
1782
- /* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58995);
1783
- /* harmony import */ var _useTranslate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(92645);
1784
- /* harmony import */ var _useTypedSelector__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(20106);
1785
- var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_createAppStore__WEBPACK_IMPORTED_MODULE_1__]);
1786
- _createAppStore__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
1787
-
1788
-
1789
-
1790
-
1791
-
1792
-
1793
-
1794
-
1795
- __webpack_async_result__();
1796
- } catch(e) { __webpack_async_result__(e); } });
1797
-
1798
- /***/ }),
1799
-
1800
- /***/ 65723:
1801
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1802
-
1803
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1804
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
1805
- /* harmony export */ });
1806
- /* harmony import */ var _scrabble_solver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34046);
1807
- /* harmony import */ var _scrabble_solver_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scrabble_solver_types__WEBPACK_IMPORTED_MODULE_0__);
1808
- /* harmony import */ var store2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63453);
1809
- /* harmony import */ var store2__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(store2__WEBPACK_IMPORTED_MODULE_1__);
1810
-
1811
-
1812
- const BOARD = "board";
1813
- const CONFIG_ID = "config-id";
1814
- const HAS_VISITED = "has-visited";
1815
- const LOCALE = "locale";
1816
- const RACK = "rack";
1817
- const store = store2__WEBPACK_IMPORTED_MODULE_1___default().namespace("scrabble-solver");
1818
- const localStorage = {
1819
- getBoard () {
1820
- const serialized = store.get(BOARD);
1821
- return serialized ? _scrabble_solver_types__WEBPACK_IMPORTED_MODULE_0__.Board.fromJson(JSON.parse(serialized)) : serialized;
1822
- },
1823
- setBoard (board) {
1824
- const serialized = board ? JSON.stringify(board.toJson()) : board;
1825
- store.set(BOARD, serialized, true);
1826
- },
1827
- getConfigId () {
1828
- return store.get(CONFIG_ID);
1829
- },
1830
- setConfigId (configId) {
1831
- store.set(CONFIG_ID, configId, true);
1832
- },
1833
- getHasVisited () {
1834
- return Boolean(store.get(HAS_VISITED));
1835
- },
1836
- setHasVisited (hasVisited) {
1837
- store.set(HAS_VISITED, hasVisited, true);
1838
- },
1839
- getLocale () {
1840
- return store.get(LOCALE);
1841
- },
1842
- setLocale (locale) {
1843
- store.set(LOCALE, locale, true);
1844
- },
1845
- getRack () {
1846
- return store.get(RACK);
1847
- },
1848
- setRack (rack) {
1849
- store.set(RACK, rack, true);
1850
- }
1851
- };
1852
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (localStorage);
1853
-
1854
-
1855
- /***/ }),
1856
-
1857
- /***/ 5428:
1858
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1859
-
1860
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1861
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
1862
- /* harmony export */ });
1863
- /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86695);
1864
- /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__);
1865
- /* harmony import */ var _slices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58995);
1866
-
1867
-
1868
- const rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)({
1869
- board: _slices__WEBPACK_IMPORTED_MODULE_1__/* .boardSlice.reducer */ .I8.reducer,
1870
- cellFilter: _slices__WEBPACK_IMPORTED_MODULE_1__/* .cellFilterSlice.reducer */ .mO.reducer,
1871
- dictionary: _slices__WEBPACK_IMPORTED_MODULE_1__/* .dictionarySlice.reducer */ .lj.reducer,
1872
- rack: _slices__WEBPACK_IMPORTED_MODULE_1__/* .rackSlice.reducer */ .O_.reducer,
1873
- results: _slices__WEBPACK_IMPORTED_MODULE_1__/* .resultsSlice.reducer */ ._C.reducer,
1874
- settings: _slices__WEBPACK_IMPORTED_MODULE_1__/* .settingsSlice.reducer */ .xj.reducer,
1875
- solve: _slices__WEBPACK_IMPORTED_MODULE_1__/* .solveSlice.reducer */ .TP.reducer,
1876
- verify: _slices__WEBPACK_IMPORTED_MODULE_1__/* .verifySlice.reducer */ .Gt.reducer
1877
- });
1878
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (rootReducer);
1879
-
1880
-
1881
- /***/ }),
1882
-
1883
- /***/ 55883:
1884
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1885
-
1886
-
1887
- // EXPORTS
1888
- __webpack_require__.d(__webpack_exports__, {
1889
- "R": () => (/* binding */ rootSaga)
1890
- });
1891
-
1892
- // EXTERNAL MODULE: ../constants/build/index.js
1893
- var build = __webpack_require__(7618);
1894
- // EXTERNAL MODULE: ../types/build/index.js
1895
- var types_build = __webpack_require__(34046);
1896
- // EXTERNAL MODULE: external "redux-saga/effects"
1897
- var effects_ = __webpack_require__(56477);
1898
- // EXTERNAL MODULE: ./src/lib/index.ts + 29 modules
1899
- var lib = __webpack_require__(95784);
1900
- ;// CONCATENATED MODULE: ./src/sdk/fetch.ts
1901
-
1902
- const fetch_fetch = async (input, init)=>{
1903
- let response;
1904
- try {
1905
- response = await window.fetch(input, init);
1906
- } catch (error) {
1907
- const message = (0,types_build.isError)(error) ? error.message : "Unknown error";
1908
- throw new Error(`Network error: ${message}`);
1909
- }
1910
- if (response.ok) {
1911
- return response;
1912
- }
1913
- try {
1914
- const json = await response.json();
1915
- if ((0,types_build.isError)(json)) {
1916
- throw new Error(json.message);
1917
- }
1918
- } finally{
1919
- // do nothing
1920
- }
1921
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
1922
- };
1923
- /* harmony default export */ const sdk_fetch = (fetch_fetch);
1924
-
1925
- ;// CONCATENATED MODULE: ./src/sdk/fetchJson.ts
1926
-
1927
- const fetchJson = async (input, init)=>{
1928
- const response = await sdk_fetch(input, {
1929
- ...init,
1930
- headers: {
1931
- "Content-Type": "application/json",
1932
- ...init?.headers
1933
- }
1934
- });
1935
- return response.json();
1936
- };
1937
- /* harmony default export */ const sdk_fetchJson = (fetchJson);
1938
-
1939
- ;// CONCATENATED MODULE: ./src/sdk/findWordDefinitions.ts
1940
-
1941
-
1942
- const findWordDefinitions = async (locale, word)=>{
1943
- const json = await sdk_fetchJson(`/api/dictionary/${locale}/${encodeURIComponent(word)}`);
1944
- return json.map(types_build.WordDefinition.fromJson);
1945
- };
1946
- /* harmony default export */ const sdk_findWordDefinitions = (findWordDefinitions);
1947
-
1948
- ;// CONCATENATED MODULE: ./src/sdk/solve.ts
1949
-
1950
-
1951
- const solve = async ({ board , characters , configId , locale })=>{
1952
- const json = await sdk_fetchJson("/api/solve", {
1953
- method: "POST",
1954
- body: JSON.stringify({
1955
- board,
1956
- characters,
1957
- configId,
1958
- locale
1959
- })
1960
- });
1961
- return json.map(types_build.Result.fromJson);
1962
- };
1963
- /* harmony default export */ const sdk_solve = (solve);
1964
-
1965
- ;// CONCATENATED MODULE: ./src/sdk/verify.ts
1966
-
1967
- const verify = async ({ board , configId , locale })=>{
1968
- return sdk_fetchJson("/api/verify", {
1969
- method: "POST",
1970
- body: JSON.stringify({
1971
- board,
1972
- configId,
1973
- locale
1974
- })
1975
- });
1976
- };
1977
- /* harmony default export */ const sdk_verify = (verify);
1978
-
1979
- ;// CONCATENATED MODULE: ./src/sdk/visit.ts
1980
- const visit = ()=>{
1981
- return fetch("/api/visit", {
1982
- method: "PUT"
1983
- });
1984
- };
1985
- /* harmony default export */ const sdk_visit = (visit);
1986
-
1987
- ;// CONCATENATED MODULE: ./src/sdk/index.ts
1988
-
1989
-
1990
-
1991
-
1992
-
1993
- // EXTERNAL MODULE: ./src/state/actions.ts
1994
- var actions = __webpack_require__(64594);
1995
- // EXTERNAL MODULE: ./src/state/selectors.ts
1996
- var selectors = __webpack_require__(30391);
1997
- // EXTERNAL MODULE: ./src/state/slices/index.ts + 16 modules
1998
- var slices = __webpack_require__(58995);
1999
- ;// CONCATENATED MODULE: ./src/state/sagas.ts
2000
-
2001
-
2002
-
2003
-
2004
-
2005
-
2006
-
2007
-
2008
- const SUBMIT_DELAY = 150;
2009
- const memoizedFindWordDefinitions = (0,lib/* memoize */.HP)(sdk_findWordDefinitions);
2010
- function* rootSaga() {
2011
- yield (0,effects_.takeEvery)(slices/* boardSlice.actions.changeCellValue.type */.I8.actions.changeCellValue.type, onCellValueChange);
2012
- yield (0,effects_.takeEvery)([
2013
- slices/* rackSlice.actions.changeCharacter.type */.O_.actions.changeCharacter.type,
2014
- slices/* rackSlice.actions.changeCharacters.type */.O_.actions.changeCharacters.type
2015
- ], onRackValueChange);
2016
- yield (0,effects_.takeEvery)(slices/* resultsSlice.actions.applyResult.type */._C.actions.applyResult.type, onApplyResult);
2017
- yield (0,effects_.takeEvery)(slices/* resultsSlice.actions.changeResultCandidate.type */._C.actions.changeResultCandidate.type, onResultCandidateChange);
2018
- yield (0,effects_.takeEvery)(slices/* settingsSlice.actions.changeConfigId.type */.xj.actions.changeConfigId.type, onConfigIdChange);
2019
- yield (0,effects_.takeEvery)(slices/* settingsSlice.actions.changeLocale.type */.xj.actions.changeLocale.type, onLocaleChange);
2020
- yield (0,effects_.takeLatest)(slices/* dictionarySlice.actions.submit.type */.lj.actions.submit.type, onDictionarySubmit);
2021
- yield (0,effects_.takeLatest)(actions/* initialize.type */.j.type, onInitialize);
2022
- yield (0,effects_.takeLatest)(actions/* reset.type */.m.type, onReset);
2023
- yield (0,effects_.takeLatest)(slices/* solveSlice.actions.submit.type */.TP.actions.submit.type, onSolve);
2024
- yield (0,effects_.takeLatest)(slices/* verifySlice.actions.submit.type */.Gt.actions.submit.type, onVerify);
2025
- }
2026
- function* onCellValueChange({ payload }) {
2027
- const isFiltered = yield (0,effects_.select)((state)=>(0,selectors/* selectCellIsFiltered */.id)(state, payload));
2028
- if (isFiltered) {
2029
- yield (0,effects_.put)(slices/* cellFilterSlice.actions.toggle */.mO.actions.toggle(payload));
2030
- }
2031
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResultCandidate */._C.actions.changeResultCandidate(null));
2032
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2033
- }
2034
- function* onRackValueChange() {
2035
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResultCandidate */._C.actions.changeResultCandidate(null));
2036
- }
2037
- function* onApplyResult({ payload: result }) {
2038
- const autoGroupTiles = yield (0,effects_.select)(selectors/* selectLocaleAutoGroupTiles */.lP);
2039
- yield (0,effects_.put)(slices/* boardSlice.actions.applyResult */.I8.actions.applyResult(result));
2040
- yield (0,effects_.put)(slices/* cellFilterSlice.actions.reset */.mO.actions.reset());
2041
- yield (0,effects_.put)(slices/* rackSlice.actions.removeTiles */.O_.actions.removeTiles(result.tiles));
2042
- yield (0,effects_.put)(slices/* rackSlice.actions.groupTiles */.O_.actions.groupTiles(autoGroupTiles));
2043
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2044
- }
2045
- function* onConfigIdChange() {
2046
- const characters = yield (0,effects_.select)(selectors/* selectCharacters */.yp);
2047
- if (characters.length > 0) {
2048
- yield (0,effects_.put)(slices/* solveSlice.actions.submit */.TP.actions.submit());
2049
- } else {
2050
- yield (0,effects_.put)(slices/* resultsSlice.actions.reset */._C.actions.reset());
2051
- }
2052
- yield (0,effects_.put)(slices/* resultsSlice.actions.reset */._C.actions.reset());
2053
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2054
- yield* ensureProperTilesCount();
2055
- }
2056
- function* onDictionarySubmit() {
2057
- const { input: word } = yield (0,effects_.select)(selectors/* selectDictionary */.w1);
2058
- const locale = yield (0,effects_.select)(selectors/* selectLocale */.fN);
2059
- if (!memoizedFindWordDefinitions.hasCache(locale, word)) {
2060
- yield (0,effects_.delay)(SUBMIT_DELAY);
2061
- }
2062
- try {
2063
- const wordDefinitions = yield (0,effects_.call)(memoizedFindWordDefinitions, locale, word);
2064
- yield (0,effects_.put)(slices/* dictionarySlice.actions.submitSuccess */.lj.actions.submitSuccess(wordDefinitions));
2065
- } catch (error) {
2066
- yield (0,effects_.put)(slices/* dictionarySlice.actions.submitFailure */.lj.actions.submitFailure(error));
2067
- }
2068
- }
2069
- function* onInitialize() {
2070
- yield (0,effects_.call)(sdk_visit);
2071
- yield* ensureProperTilesCount();
2072
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2073
- }
2074
- function* onReset() {
2075
- yield (0,effects_.put)(slices/* boardSlice.actions.reset */.I8.actions.reset());
2076
- yield (0,effects_.put)(slices/* cellFilterSlice.actions.reset */.mO.actions.reset());
2077
- yield (0,effects_.put)(slices/* dictionarySlice.actions.reset */.lj.actions.reset());
2078
- yield (0,effects_.put)(slices/* rackSlice.actions.reset */.O_.actions.reset());
2079
- yield (0,effects_.put)(slices/* resultsSlice.actions.reset */._C.actions.reset());
2080
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2081
- }
2082
- function* onLocaleChange() {
2083
- const characters = yield (0,effects_.select)(selectors/* selectCharacters */.yp);
2084
- if (characters.length > 0) {
2085
- yield (0,effects_.put)(slices/* solveSlice.actions.submit */.TP.actions.submit());
2086
- } else {
2087
- yield (0,effects_.put)(slices/* resultsSlice.actions.reset */._C.actions.reset());
2088
- }
2089
- yield (0,effects_.put)(slices/* dictionarySlice.actions.reset */.lj.actions.reset());
2090
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResultCandidate */._C.actions.changeResultCandidate(null));
2091
- yield (0,effects_.put)(slices/* verifySlice.actions.submit */.Gt.actions.submit());
2092
- }
2093
- function* onResultCandidateChange({ payload: result }) {
2094
- if (result) {
2095
- const locale = yield (0,effects_.select)(selectors/* selectLocale */.fN);
2096
- const comma = locale === types_build.Locale.FA_IR ? ` ${build.COMMA_ARABIC}` : `${build.COMMA_LATIN} `;
2097
- yield (0,effects_.put)(slices/* dictionarySlice.actions.changeInput */.lj.actions.changeInput(result.words.join(comma)));
2098
- yield (0,effects_.put)(slices/* dictionarySlice.actions.submit */.lj.actions.submit());
2099
- }
2100
- }
2101
- function* onSolve() {
2102
- const board = yield (0,effects_.select)(selectors/* selectBoard */.ZO);
2103
- const { config } = yield (0,effects_.select)(selectors/* selectConfig */.$o);
2104
- const locale = yield (0,effects_.select)(selectors/* selectLocale */.fN);
2105
- const characters = yield (0,effects_.select)(selectors/* selectCharacters */.yp);
2106
- if (characters.length === 0) {
2107
- yield (0,effects_.put)(slices/* solveSlice.actions.submitSuccess */.TP.actions.submitSuccess({
2108
- board,
2109
- characters
2110
- }));
2111
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResults */._C.actions.changeResults([]));
2112
- return;
2113
- }
2114
- try {
2115
- const results = yield (0,effects_.call)(sdk_solve, {
2116
- board: board.toJson(),
2117
- characters,
2118
- configId: config.id,
2119
- locale
2120
- });
2121
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResults */._C.actions.changeResults(results));
2122
- yield (0,effects_.put)(slices/* solveSlice.actions.submitSuccess */.TP.actions.submitSuccess({
2123
- board,
2124
- characters
2125
- }));
2126
- } catch (error) {
2127
- yield (0,effects_.put)(slices/* resultsSlice.actions.changeResults */._C.actions.changeResults([]));
2128
- yield (0,effects_.put)(slices/* solveSlice.actions.submitFailure */.TP.actions.submitFailure(error));
2129
- }
2130
- }
2131
- function* onVerify() {
2132
- yield (0,effects_.delay)(SUBMIT_DELAY);
2133
- const board = yield (0,effects_.select)(selectors/* selectBoard */.ZO);
2134
- const { config } = yield (0,effects_.select)(selectors/* selectConfig */.$o);
2135
- const locale = yield (0,effects_.select)(selectors/* selectLocale */.fN);
2136
- try {
2137
- const { invalidWords , validWords } = yield (0,effects_.call)(sdk_verify, {
2138
- board: board.toJson(),
2139
- configId: config.id,
2140
- locale
2141
- });
2142
- yield (0,effects_.put)(slices/* verifySlice.actions.submitSuccess */.Gt.actions.submitSuccess({
2143
- board,
2144
- invalidWords,
2145
- validWords
2146
- }));
2147
- } catch (error) {
2148
- yield (0,effects_.put)(slices/* verifySlice.actions.submitFailure */.Gt.actions.submitFailure());
2149
- }
2150
- }
2151
- function* ensureProperTilesCount() {
2152
- const { config } = yield (0,effects_.select)(selectors/* selectConfig */.$o);
2153
- const characters = yield (0,effects_.select)(selectors/* selectCharacters */.yp);
2154
- if (config.maximumCharactersCount > characters.length) {
2155
- const differenceCount = Math.abs(config.maximumCharactersCount - characters.length);
2156
- yield (0,effects_.put)(slices/* rackSlice.actions.init */.O_.actions.init([
2157
- ...characters,
2158
- ...Array(differenceCount).fill(null)
2159
- ]));
2160
- } else if (config.maximumCharactersCount < characters.length) {
2161
- const nonNulls = characters.filter(Boolean).slice(0, config.maximumCharactersCount);
2162
- const differenceCount = Math.abs(config.maximumCharactersCount - nonNulls.length);
2163
- const autoGroupTiles = yield (0,effects_.select)(selectors/* selectLocaleAutoGroupTiles */.lP);
2164
- yield (0,effects_.put)(slices/* rackSlice.actions.init */.O_.actions.init([
2165
- ...nonNulls,
2166
- ...Array(differenceCount).fill(null)
2167
- ]));
2168
- yield (0,effects_.put)(slices/* rackSlice.actions.groupTiles */.O_.actions.groupTiles(autoGroupTiles));
2169
- }
2170
- }
2171
-
2172
-
2173
- /***/ }),
2174
-
2175
- /***/ 30391:
2176
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2177
-
2178
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2179
- /* harmony export */ "$o": () => (/* binding */ selectConfig),
2180
- /* harmony export */ "AN": () => (/* binding */ selectCharacterIsValid),
2181
- /* harmony export */ "En": () => (/* binding */ selectHasOverusedTiles),
2182
- /* harmony export */ "HM": () => (/* binding */ selectVerify),
2183
- /* harmony export */ "Mj": () => (/* binding */ selectAreResultsOutdated),
2184
- /* harmony export */ "O0": () => (/* binding */ selectCellBonus),
2185
- /* harmony export */ "Or": () => (/* binding */ selectCharacterPoints),
2186
- /* harmony export */ "QB": () => (/* binding */ selectRack),
2187
- /* harmony export */ "QL": () => (/* binding */ selectResultsQuery),
2188
- /* harmony export */ "R": () => (/* binding */ selectResultsSortColumn),
2189
- /* harmony export */ "Rn": () => (/* binding */ selectSolveError),
2190
- /* harmony export */ "Xk": () => (/* binding */ selectResultCandidate),
2191
- /* harmony export */ "Yj": () => (/* binding */ selectRemainingTilesGroups),
2192
- /* harmony export */ "ZA": () => (/* binding */ selectRowsWithCandidate),
2193
- /* harmony export */ "ZO": () => (/* binding */ selectBoard),
2194
- /* harmony export */ "Zf": () => (/* binding */ selectTilePoints),
2195
- /* harmony export */ "bs": () => (/* binding */ selectHasInvalidWords),
2196
- /* harmony export */ "dN": () => (/* binding */ selectSortedFilteredResults),
2197
- /* harmony export */ "f2": () => (/* binding */ selectSortedResults),
2198
- /* harmony export */ "fN": () => (/* binding */ selectLocale),
2199
- /* harmony export */ "fZ": () => (/* binding */ selectCellIsValid),
2200
- /* harmony export */ "id": () => (/* binding */ selectCellIsFiltered),
2201
- /* harmony export */ "lP": () => (/* binding */ selectLocaleAutoGroupTiles),
2202
- /* harmony export */ "mK": () => (/* binding */ selectDictionaryError),
2203
- /* harmony export */ "md": () => (/* binding */ selectConfigId),
2204
- /* harmony export */ "nb": () => (/* binding */ selectTranslations),
2205
- /* harmony export */ "sH": () => (/* binding */ selectResultsSortDirection),
2206
- /* harmony export */ "uz": () => (/* binding */ selectAutoGroupTiles),
2207
- /* harmony export */ "w1": () => (/* binding */ selectDictionary),
2208
- /* harmony export */ "xU": () => (/* binding */ selectIsLoading),
2209
- /* harmony export */ "yp": () => (/* binding */ selectCharacters),
2210
- /* harmony export */ "z$": () => (/* binding */ selectResultCandidateTiles)
2211
- /* harmony export */ });
2212
- /* unused harmony exports selectCellFilter, selectResults, selectResultCandidateCells, selectTranslation, selectLastSolvedParameters, selectHaveCharactersChanged, selectHasBoardChanged, selectRemainingTiles */
2213
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75184);
2214
- /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
2215
- /* harmony import */ var _scrabble_solver_configs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89418);
2216
- /* harmony import */ var _scrabble_solver_configs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_scrabble_solver_configs__WEBPACK_IMPORTED_MODULE_1__);
2217
- /* harmony import */ var _scrabble_solver_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7618);
2218
- /* harmony import */ var _scrabble_solver_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34046);
2219
- /* harmony import */ var _scrabble_solver_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_scrabble_solver_types__WEBPACK_IMPORTED_MODULE_3__);
2220
- /* harmony import */ var i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77586);
2221
- /* harmony import */ var lib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95784);
2222
-
2223
-
2224
-
2225
-
2226
-
2227
-
2228
- const selectCell = (_, cell)=>cell;
2229
- const selectPoint = (_, point)=>point;
2230
- const selectCharacter = (_, character)=>character;
2231
- const selectTile = (_, tile)=>tile;
2232
- const selectBoardRoot = (state)=>state.board;
2233
- const selectDictionaryRoot = (state)=>state.dictionary;
2234
- const selectCellFilterRoot = (state)=>state.cellFilter;
2235
- const selectRackRoot = (state)=>state.rack;
2236
- const selectResultsRoot = (state)=>state.results;
2237
- const selectSettingsRoot = (state)=>state.settings;
2238
- const selectSolveRoot = (state)=>state.solve;
2239
- const selectVerifyRoot = (state)=>state.verify;
2240
- const selectDictionary = selectDictionaryRoot;
2241
- const selectDictionaryError = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2242
- selectDictionaryRoot
2243
- ], (dictionary)=>{
2244
- return (0,_scrabble_solver_types__WEBPACK_IMPORTED_MODULE_3__.isError)(dictionary.error) ? dictionary.error : undefined;
2245
- });
2246
- const selectLocale = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2247
- selectSettingsRoot
2248
- ], (settings)=>settings.locale);
2249
- const selectAutoGroupTiles = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2250
- selectSettingsRoot
2251
- ], (settings)=>settings.autoGroupTiles);
2252
- const selectLocaleAutoGroupTiles = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2253
- selectLocale,
2254
- selectSettingsRoot
2255
- ], (locale, settings)=>{
2256
- if (i18n__WEBPACK_IMPORTED_MODULE_4__/* .LOCALE_FEATURES */ .q[locale].direction === "ltr" || settings.autoGroupTiles === null) {
2257
- return settings.autoGroupTiles;
2258
- }
2259
- return settings.autoGroupTiles === "left" ? "right" : "left";
2260
- });
2261
- const selectBoard = selectBoardRoot;
2262
- const selectConfigId = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2263
- selectSettingsRoot
2264
- ], (settings)=>settings.configId);
2265
- const selectConfig = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2266
- selectConfigId,
2267
- selectLocale
2268
- ], _scrabble_solver_configs__WEBPACK_IMPORTED_MODULE_1__.getLocaleConfig);
2269
- const selectCellFilter = selectCellFilterRoot;
2270
- const selectCellIsFiltered = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2271
- selectCellFilter,
2272
- selectPoint
2273
- ], (cellFilter, { x , y })=>{
2274
- return cellFilter.some((cell)=>cell.x === x && cell.y === y);
2275
- });
2276
- const selectCellIsValid = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2277
- selectConfig,
2278
- selectCell
2279
- ], (config, cell)=>{
2280
- if (!cell.hasTile()) {
2281
- return true;
2282
- }
2283
- return config.tiles.some((tile)=>tile.character === cell.tile.character);
2284
- });
2285
- const selectResults = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2286
- selectResultsRoot
2287
- ], (results)=>results.results);
2288
- const selectResultsQuery = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2289
- selectResultsRoot
2290
- ], (results)=>results.query);
2291
- const selectResultsSortColumn = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2292
- selectResultsRoot
2293
- ], (results)=>results.sort.column);
2294
- const selectResultsSortDirection = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2295
- selectResultsRoot
2296
- ], (results)=>results.sort.direction);
2297
- const selectSortedResults = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2298
- selectResults,
2299
- selectResultsSortColumn,
2300
- selectResultsSortDirection,
2301
- selectLocale
2302
- ], lib__WEBPACK_IMPORTED_MODULE_5__/* .sortResults */ .uj);
2303
- const filterResultsByQuery = (results, query)=>{
2304
- if (query.trim().length === 0) {
2305
- return results;
2306
- }
2307
- let regExp;
2308
- try {
2309
- regExp = new RegExp(query, "gi");
2310
- } catch {
2311
- return results;
2312
- }
2313
- return results.filter((result)=>{
2314
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2315
- return regExp.test(result.word);
2316
- });
2317
- };
2318
- const selectSortedFilteredResults = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2319
- selectSortedResults,
2320
- selectResultsQuery,
2321
- selectCellFilter
2322
- ], (results, query, cellFilter)=>{
2323
- if (!results) {
2324
- return results;
2325
- }
2326
- const filteredByQuery = filterResultsByQuery(results, query);
2327
- if (!cellFilter) {
2328
- return filteredByQuery;
2329
- }
2330
- return filteredByQuery.filter((result)=>{
2331
- return cellFilter.every(({ x , y })=>result.cells.some((cell)=>cell.x === x && cell.y === y));
2332
- });
2333
- });
2334
- const selectResultCandidate = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2335
- selectResultsRoot
2336
- ], (results)=>results.candidate);
2337
- const selectResultCandidateCells = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2338
- selectResultCandidate
2339
- ], (resultCandidate)=>resultCandidate?.cells || []);
2340
- const selectResultCandidateTiles = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2341
- selectResultCandidate
2342
- ], (resultCandidate)=>resultCandidate?.tiles || []);
2343
- const selectRowsWithCandidate = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2344
- selectBoardRoot,
2345
- selectResultCandidateCells
2346
- ], (board, cells)=>{
2347
- return board.rows.map((row, y)=>row.map((cell, x)=>(0,lib__WEBPACK_IMPORTED_MODULE_5__/* .findCell */ .Jp)(cells, x, y) || cell));
2348
- });
2349
- const selectCellBonus = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2350
- selectConfig,
2351
- selectCell
2352
- ], (config, cell)=>{
2353
- return config.getCellBonus(cell);
2354
- });
2355
- const selectCharacterPoints = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2356
- selectConfig,
2357
- selectCharacter
2358
- ], (config, character)=>{
2359
- return config.getCharacterPoints(character);
2360
- });
2361
- const selectCharacterIsValid = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2362
- selectConfig,
2363
- selectCharacter
2364
- ], (config, character)=>{
2365
- if (character === null || character === _scrabble_solver_constants__WEBPACK_IMPORTED_MODULE_2__.BLANK) {
2366
- return true;
2367
- }
2368
- return config.tiles.some((tile)=>tile.character === character);
2369
- });
2370
- const selectTilePoints = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2371
- selectConfig,
2372
- selectTile
2373
- ], (config, tile)=>{
2374
- return config.getTilePoints(tile);
2375
- });
2376
- const selectTranslations = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2377
- selectLocale
2378
- ], (locale)=>i18n__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z[locale]);
2379
- const selectTranslation = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2380
- selectTranslations,
2381
- selectLocale,
2382
- (_, id)=>id
2383
- ], (translations, locale, id)=>{
2384
- const translation = translations[id];
2385
- if (typeof translation === "undefined") {
2386
- throw new Error(`Untranslated key "${id}" in locale "${locale}"`);
2387
- }
2388
- return translation;
2389
- });
2390
- const selectRack = selectRackRoot;
2391
- const selectCharacters = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)(selectRackRoot, (rack)=>rack.filter((tile)=>tile !== null));
2392
- const selectLastSolvedParameters = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2393
- selectSolveRoot
2394
- ], (solve)=>solve.lastSolvedParameters);
2395
- const selectIsLoading = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2396
- selectSolveRoot
2397
- ], (solve)=>solve.isLoading);
2398
- const selectSolveError = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2399
- selectSolveRoot
2400
- ], (solve)=>{
2401
- return (0,_scrabble_solver_types__WEBPACK_IMPORTED_MODULE_3__.isError)(solve.error) ? solve.error : undefined;
2402
- });
2403
- const selectHaveCharactersChanged = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2404
- selectLastSolvedParameters,
2405
- selectCharacters,
2406
- selectLocale
2407
- ], (lastSolvedParameters, characters, locale)=>{
2408
- return !(0,lib__WEBPACK_IMPORTED_MODULE_5__/* .unorderedArraysEqual */ .DR)(lastSolvedParameters.characters, characters, locale);
2409
- });
2410
- const selectHasBoardChanged = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2411
- selectLastSolvedParameters,
2412
- selectBoardRoot
2413
- ], (lastSolvedParameters, board)=>!lastSolvedParameters.board.equals(board));
2414
- const selectAreResultsOutdated = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2415
- selectHasBoardChanged,
2416
- selectHaveCharactersChanged
2417
- ], (hasBoardChanged, haveCharactersChanged)=>hasBoardChanged || haveCharactersChanged);
2418
- const selectRemainingTiles = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2419
- selectConfig,
2420
- selectBoardRoot,
2421
- selectCharacters,
2422
- selectLocale
2423
- ], lib__WEBPACK_IMPORTED_MODULE_5__/* .getRemainingTiles */ .ZM);
2424
- const selectHasOverusedTiles = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2425
- selectRemainingTiles
2426
- ], (remainingTiles)=>{
2427
- return remainingTiles.some(({ count , usedCount })=>usedCount > count);
2428
- });
2429
- const selectRemainingTilesGroups = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2430
- selectRemainingTiles
2431
- ], lib__WEBPACK_IMPORTED_MODULE_5__/* .getRemainingTilesGroups */ .op);
2432
- const selectVerify = selectVerifyRoot;
2433
- const selectHasInvalidWords = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSelector)([
2434
- selectVerify
2435
- ], ({ invalidWords })=>{
2436
- return invalidWords.length > 0;
2437
- });
2438
-
2439
-
2440
- /***/ }),
2441
-
2442
- /***/ 58995:
2443
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2444
-
2445
-
2446
- // EXPORTS
2447
- __webpack_require__.d(__webpack_exports__, {
2448
- "I8": () => (/* reexport */ slices_boardSlice),
2449
- "mO": () => (/* reexport */ slices_cellFilterSlice),
2450
- "lj": () => (/* reexport */ slices_dictionarySlice),
2451
- "O_": () => (/* reexport */ slices_rackSlice),
2452
- "_C": () => (/* reexport */ slices_resultsSlice),
2453
- "xj": () => (/* reexport */ slices_settingsSlice),
2454
- "TP": () => (/* reexport */ slices_solveSlice),
2455
- "Gt": () => (/* reexport */ slices_verifySlice)
2456
- });
2457
-
2458
- // UNUSED EXPORTS: boardInitialState, cellFilterInitialState, dictionaryInitialState, rackInitialState, resultsInitialState, settingsInitialState, solveInitialState, verifyInitialState
2459
-
2460
- // EXTERNAL MODULE: ../configs/build/index.js
2461
- var build = __webpack_require__(89418);
2462
- // EXTERNAL MODULE: ../types/build/index.js
2463
- var types_build = __webpack_require__(34046);
2464
- ;// CONCATENATED MODULE: ./src/state/slices/settingsInitialState.ts
2465
-
2466
-
2467
- const getInitialLocale = ()=>{
2468
- if (!globalThis.navigator) {
2469
- return types_build.Locale.EN_US;
2470
- }
2471
- const locales = Object.values(types_build.Locale);
2472
- const exactMatch = locales.find((locale)=>globalThis.navigator.language === locale);
2473
- if (exactMatch) {
2474
- return exactMatch;
2475
- }
2476
- const partialMatch = locales.find((locale)=>{
2477
- return globalThis.navigator.language === locale.substring(0, 2);
2478
- });
2479
- return partialMatch || types_build.Locale.EN_US;
2480
- };
2481
- const settingsInitialState = {
2482
- autoGroupTiles: "left",
2483
- configId: build.scrabble.id,
2484
- locale: getInitialLocale()
2485
- };
2486
- /* harmony default export */ const slices_settingsInitialState = (settingsInitialState);
2487
-
2488
- ;// CONCATENATED MODULE: ./src/state/slices/boardInitialState.ts
2489
-
2490
-
2491
-
2492
- const { configId , locale } = slices_settingsInitialState;
2493
- const { boardHeight , boardWidth } = (0,build.getLocaleConfig)(configId, locale);
2494
- const boardInitialState = types_build.Board.create(boardWidth, boardHeight);
2495
- // const createOxyphenbutazone = () => {
2496
- // // Tiles: oypbaze
2497
- // const board = Board.fromStringArray([
2498
- // ' x hen ut on ',
2499
- // 'puer or amas j',
2500
- // 'a led a er a',
2501
- // 'c ki i elf c',
2502
- // 'i snot n is u',
2503
- // 'f t o w do l',
2504
- // 'y e moa er a',
2505
- // 'i r solar t',
2506
- // 'n v h t i',
2507
- // 'g i i bitten',
2508
- // ' e n v g',
2509
- // ' w g e ',
2510
- // ' e ',
2511
- // ' d ',
2512
- // ' ',
2513
- // ]);
2514
- // board.rows[4][3].tile.isBlank = true;
2515
- // board.rows[9][11].tile.isBlank = true;
2516
- // return board;
2517
- // };
2518
- /* harmony default export */ const slices_boardInitialState = (boardInitialState);
2519
-
2520
- // EXTERNAL MODULE: external "@reduxjs/toolkit"
2521
- var toolkit_ = __webpack_require__(75184);
2522
- // EXTERNAL MODULE: ../constants/build/index.js
2523
- var constants_build = __webpack_require__(7618);
2524
- ;// CONCATENATED MODULE: ./src/state/slices/boardSlice.ts
2525
-
2526
-
2527
-
2528
-
2529
- const boardSlice = (0,toolkit_.createSlice)({
2530
- initialState: slices_boardInitialState,
2531
- name: "board",
2532
- reducers: {
2533
- applyResult: (state, action)=>{
2534
- const newBoard = state.clone();
2535
- const result = action.payload;
2536
- result.cells.forEach((cell)=>{
2537
- newBoard.updateCell(cell.x, cell.y, ()=>new types_build.Cell({
2538
- ...cell,
2539
- isEmpty: false
2540
- }));
2541
- });
2542
- return newBoard;
2543
- },
2544
- changeCellValue: (state, action)=>{
2545
- const newBoard = state.clone();
2546
- const { value , x , y } = action.payload;
2547
- const isEmpty = !value || value === constants_build.EMPTY_CELL;
2548
- const tile = isEmpty ? types_build.Tile.Null : new types_build.Tile({
2549
- character: value
2550
- });
2551
- newBoard.updateCell(x, y, (cell)=>{
2552
- return new types_build.Cell({
2553
- ...cell,
2554
- isEmpty,
2555
- tile
2556
- });
2557
- });
2558
- return newBoard;
2559
- },
2560
- change: (_state, action)=>{
2561
- const board = action.payload;
2562
- return board;
2563
- },
2564
- init: (_state, action)=>{
2565
- const board = action.payload;
2566
- return board;
2567
- },
2568
- reset: ()=>{
2569
- return slices_boardInitialState;
2570
- },
2571
- toggleCellIsBlank: (state, action)=>{
2572
- const newBoard = state.clone();
2573
- const { x , y } = action.payload;
2574
- newBoard.updateCell(x, y, (cell)=>{
2575
- const tile = cell.isEmpty ? cell.tile : new types_build.Tile({
2576
- ...cell.tile,
2577
- isBlank: !cell.tile.isBlank
2578
- });
2579
- return new types_build.Cell({
2580
- ...cell,
2581
- tile
2582
- });
2583
- });
2584
- return newBoard;
2585
- }
2586
- }
2587
- });
2588
- /* harmony default export */ const slices_boardSlice = (boardSlice);
2589
-
2590
- ;// CONCATENATED MODULE: ./src/state/slices/cellFilterInitialState.ts
2591
- const cellFilterInitialState = [];
2592
- /* harmony default export */ const slices_cellFilterInitialState = (cellFilterInitialState);
2593
-
2594
- ;// CONCATENATED MODULE: ./src/state/slices/cellFilterSlice.ts
2595
-
2596
-
2597
- const cellFilterSlice = (0,toolkit_.createSlice)({
2598
- initialState: slices_cellFilterInitialState,
2599
- name: "cellFilter",
2600
- reducers: {
2601
- toggle: (state, action)=>{
2602
- const { x , y } = action.payload;
2603
- const has = state.some((point)=>point.x === x && point.y === y);
2604
- if (has) {
2605
- return state.filter((point)=>point.x !== x || point.y !== y);
2606
- }
2607
- return [
2608
- ...state,
2609
- action.payload
2610
- ];
2611
- },
2612
- reset: ()=>slices_cellFilterInitialState
2613
- }
2614
- });
2615
- /* harmony default export */ const slices_cellFilterSlice = (cellFilterSlice);
2616
-
2617
- ;// CONCATENATED MODULE: ./src/state/slices/dictionaryInitialState.ts
2618
- const dictionaryInitialState = {
2619
- error: undefined,
2620
- input: "",
2621
- isLoading: false,
2622
- results: []
2623
- };
2624
- /* harmony default export */ const slices_dictionaryInitialState = (dictionaryInitialState);
2625
-
2626
- ;// CONCATENATED MODULE: ./src/state/slices/dictionarySlice.ts
2627
-
2628
-
2629
- const dictionarySlice = (0,toolkit_.createSlice)({
2630
- initialState: slices_dictionaryInitialState,
2631
- name: "dictionary",
2632
- reducers: {
2633
- changeInput: (state, action)=>{
2634
- return {
2635
- ...state,
2636
- input: action.payload
2637
- };
2638
- },
2639
- reset: ()=>slices_dictionaryInitialState,
2640
- submit: (state)=>{
2641
- const error = slices_dictionaryInitialState.error;
2642
- const results = slices_dictionaryInitialState.results;
2643
- return {
2644
- ...state,
2645
- error,
2646
- isLoading: true,
2647
- results
2648
- };
2649
- },
2650
- submitFailure: (state, action)=>{
2651
- const error = action.payload;
2652
- const results = slices_dictionaryInitialState.results;
2653
- return {
2654
- ...state,
2655
- error,
2656
- isLoading: false,
2657
- results
2658
- };
2659
- },
2660
- submitSuccess: (state, action)=>{
2661
- const error = slices_dictionaryInitialState.error;
2662
- const results = action.payload;
2663
- return {
2664
- ...state,
2665
- error,
2666
- isLoading: false,
2667
- results
2668
- };
2669
- }
2670
- }
2671
- });
2672
- /* harmony default export */ const slices_dictionarySlice = (dictionarySlice);
2673
-
2674
- // EXTERNAL MODULE: ./src/lib/index.ts + 29 modules
2675
- var lib = __webpack_require__(95784);
2676
- ;// CONCATENATED MODULE: ./src/state/slices/rackInitialState.ts
2677
- const rackInitialState = [
2678
- null,
2679
- null,
2680
- null,
2681
- null,
2682
- null,
2683
- null,
2684
- null
2685
- ];
2686
- /* harmony default export */ const slices_rackInitialState = (rackInitialState);
2687
-
2688
- ;// CONCATENATED MODULE: ./src/state/slices/rackSlice.ts
2689
-
2690
-
2691
-
2692
- const rackSlice = (0,toolkit_.createSlice)({
2693
- initialState: slices_rackInitialState,
2694
- name: "rack",
2695
- reducers: {
2696
- changeCharacter: (state, action)=>{
2697
- const { character , index } = action.payload;
2698
- return [
2699
- ...state.slice(0, index),
2700
- character,
2701
- ...state.slice(index + 1)
2702
- ];
2703
- },
2704
- changeCharacters: (state, action)=>{
2705
- const { characters , index } = action.payload;
2706
- const expectedRackLength = state.length;
2707
- const rack = [
2708
- ...state.slice(0, index),
2709
- ...characters,
2710
- ...state.slice(index + characters.length)
2711
- ];
2712
- return rack.slice(0, expectedRackLength);
2713
- },
2714
- groupTiles: (state, action)=>{
2715
- const direction = action.payload;
2716
- if (direction === null) {
2717
- return state;
2718
- }
2719
- const nullMovingComparator = (0,lib/* createNullMovingComparator */.Ml)((0,lib/* inverseDirection */.Mf)(direction));
2720
- const sortedTiles = [
2721
- ...state
2722
- ].sort(nullMovingComparator);
2723
- return sortedTiles;
2724
- },
2725
- init: (_state, action)=>{
2726
- const rack = action.payload;
2727
- return rack;
2728
- },
2729
- removeTiles: (state, action)=>{
2730
- const tilesToRemove = action.payload;
2731
- const charactersAndTiles = (0,lib/* zipCharactersAndTiles */.gV)(state, tilesToRemove);
2732
- const charactersWithoutMatchingTiles = charactersAndTiles.map(({ character , tile })=>tile ? null : character);
2733
- return charactersWithoutMatchingTiles;
2734
- },
2735
- reset: ()=>slices_rackInitialState
2736
- }
2737
- });
2738
- /* harmony default export */ const slices_rackSlice = (rackSlice);
2739
-
2740
- // EXTERNAL MODULE: ./src/types/index.ts
2741
- var types = __webpack_require__(9033);
2742
- ;// CONCATENATED MODULE: ./src/state/slices/resultsInitialState.ts
2743
-
2744
- const resultsInitialState = {
2745
- candidate: null,
2746
- query: "",
2747
- results: undefined,
2748
- sort: {
2749
- column: types/* ResultColumn.Points */.M.Points,
2750
- direction: types/* SortDirection.Descending */.S.Descending
2751
- }
2752
- };
2753
- /* harmony default export */ const slices_resultsInitialState = (resultsInitialState);
2754
-
2755
- ;// CONCATENATED MODULE: ./src/state/slices/resultsSlice.ts
2756
-
2757
-
2758
-
2759
- const toggleDirection = (direction)=>{
2760
- return direction === types/* SortDirection.Ascending */.S.Ascending ? types/* SortDirection.Descending */.S.Descending : types/* SortDirection.Ascending */.S.Ascending;
2761
- };
2762
- const resultsSlice = (0,toolkit_.createSlice)({
2763
- initialState: slices_resultsInitialState,
2764
- name: "results",
2765
- reducers: {
2766
- applyResult: (_state, _action)=>{
2767
- return slices_resultsInitialState;
2768
- },
2769
- changeQuery: (state, action)=>{
2770
- const newQuery = action.payload;
2771
- return {
2772
- ...state,
2773
- query: newQuery
2774
- };
2775
- },
2776
- changeResultCandidate: (state, action)=>{
2777
- const candidate = action.payload;
2778
- return {
2779
- ...state,
2780
- candidate
2781
- };
2782
- },
2783
- changeResults: (state, action)=>{
2784
- const newResults = action.payload;
2785
- return {
2786
- ...state,
2787
- candidate: slices_resultsInitialState.candidate,
2788
- query: slices_resultsInitialState.query,
2789
- results: newResults
2790
- };
2791
- },
2792
- sort: (state, action)=>{
2793
- const columndId = action.payload;
2794
- const { column , direction } = state.sort;
2795
- return {
2796
- ...state,
2797
- sort: {
2798
- column: columndId,
2799
- direction: column === columndId ? toggleDirection(direction) : direction
2800
- }
2801
- };
2802
- },
2803
- reset: ()=>slices_resultsInitialState
2804
- }
2805
- });
2806
- /* harmony default export */ const slices_resultsSlice = (resultsSlice);
2807
-
2808
- ;// CONCATENATED MODULE: ./src/state/slices/settingsSlice.ts
2809
-
2810
-
2811
- const settingsSlice = (0,toolkit_.createSlice)({
2812
- initialState: slices_settingsInitialState,
2813
- name: "settings",
2814
- reducers: {
2815
- changeAutoGroupTiles: (state, action)=>{
2816
- const autoGroupTiles = action.payload;
2817
- return {
2818
- ...state,
2819
- autoGroupTiles
2820
- };
2821
- },
2822
- changeConfigId: (state, action)=>{
2823
- const configId = action.payload;
2824
- return {
2825
- ...state,
2826
- configId
2827
- };
2828
- },
2829
- changeLocale: (state, action)=>{
2830
- const locale = action.payload;
2831
- return {
2832
- ...state,
2833
- locale
2834
- };
2835
- },
2836
- init: (state, action)=>{
2837
- return {
2838
- ...state,
2839
- ...action.payload
2840
- };
2841
- }
2842
- }
2843
- });
2844
- /* harmony default export */ const slices_settingsSlice = (settingsSlice);
2845
-
2846
- ;// CONCATENATED MODULE: ./src/state/slices/solveInitialState.ts
2847
-
2848
- const solveInitialState = {
2849
- error: undefined,
2850
- isLoading: false,
2851
- lastSolvedParameters: {
2852
- board: slices_boardInitialState,
2853
- characters: []
2854
- }
2855
- };
2856
- /* harmony default export */ const slices_solveInitialState = (solveInitialState);
2857
-
2858
- ;// CONCATENATED MODULE: ./src/state/slices/solveSlice.ts
2859
-
2860
-
2861
- const solveSlice = (0,toolkit_.createSlice)({
2862
- initialState: slices_solveInitialState,
2863
- name: "solve",
2864
- reducers: {
2865
- submit: (state)=>{
2866
- const error = slices_solveInitialState.error;
2867
- return {
2868
- ...state,
2869
- error,
2870
- isLoading: true
2871
- };
2872
- },
2873
- submitFailure: (state, action)=>{
2874
- const error = action.payload;
2875
- return {
2876
- ...state,
2877
- error,
2878
- isLoading: false
2879
- };
2880
- },
2881
- submitSuccess: (state, action)=>{
2882
- const error = slices_solveInitialState.error;
2883
- const lastSolvedParameters = action.payload;
2884
- return {
2885
- ...state,
2886
- error,
2887
- isLoading: false,
2888
- lastSolvedParameters
2889
- };
2890
- }
2891
- }
2892
- });
2893
- /* harmony default export */ const slices_solveSlice = (solveSlice);
2894
-
2895
- ;// CONCATENATED MODULE: ./src/state/slices/verifyInitialState.ts
2896
-
2897
- const verifyInitialState = {
2898
- isLoading: false,
2899
- lastSolvedParameters: {
2900
- board: slices_boardInitialState
2901
- },
2902
- invalidWords: [],
2903
- validWords: []
2904
- };
2905
- /* harmony default export */ const slices_verifyInitialState = (verifyInitialState);
2906
-
2907
- ;// CONCATENATED MODULE: ./src/state/slices/verifySlice.ts
2908
-
2909
-
2910
- const verifySlice = (0,toolkit_.createSlice)({
2911
- initialState: slices_verifyInitialState,
2912
- name: "verify",
2913
- reducers: {
2914
- submit: (state)=>{
2915
- return {
2916
- ...state,
2917
- isLoading: true
2918
- };
2919
- },
2920
- submitFailure: (state)=>{
2921
- return {
2922
- ...state,
2923
- isLoading: false
2924
- };
2925
- },
2926
- submitSuccess: (state, action)=>{
2927
- const { board , invalidWords , validWords } = action.payload;
2928
- return {
2929
- ...state,
2930
- isLoading: false,
2931
- lastSolvedParameters: {
2932
- board
2933
- },
2934
- invalidWords,
2935
- validWords
2936
- };
2937
- }
2938
- }
2939
- });
2940
- /* harmony default export */ const slices_verifySlice = (verifySlice);
2941
-
2942
- ;// CONCATENATED MODULE: ./src/state/slices/index.ts
2943
-
2944
-
2945
-
2946
-
2947
-
2948
-
2949
-
2950
-
2951
-
2952
-
2953
-
2954
-
2955
-
2956
-
2957
-
2958
-
2959
-
2960
-
2961
- /***/ }),
2962
-
2963
- /***/ 92645:
2964
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2965
-
2966
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2967
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
2968
- /* harmony export */ });
2969
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
2970
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2971
- /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30391);
2972
- /* harmony import */ var _useTypedSelector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20106);
2973
-
2974
-
2975
-
2976
- const useTranslate = ()=>{
2977
- const translations = (0,_useTypedSelector__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_selectors__WEBPACK_IMPORTED_MODULE_1__/* .selectTranslations */ .nb);
2978
- const locale = (0,_useTypedSelector__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(_selectors__WEBPACK_IMPORTED_MODULE_1__/* .selectLocale */ .fN);
2979
- const translate = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((id, replacements = {})=>{
2980
- const translation = translations[id];
2981
- if (typeof translation === "undefined") {
2982
- throw new Error(`Untranslated key "${id}" in locale "${locale}"`);
2983
- }
2984
- return Object.entries(replacements).reduce((result, [key, value])=>result.replaceAll(`{{${key}}}`, value), translation);
2985
- }, [
2986
- translations,
2987
- locale
2988
- ]);
2989
- return translate;
2990
- };
2991
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useTranslate);
2992
-
2993
-
2994
- /***/ }),
2995
-
2996
- /***/ 20106:
2997
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2998
-
2999
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3000
- /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
3001
- /* harmony export */ });
3002
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6022);
3003
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_0__);
3004
-
3005
- const useTypedSelector = react_redux__WEBPACK_IMPORTED_MODULE_0__.useSelector;
3006
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useTypedSelector);
3007
-
3008
-
3009
- /***/ }),
3010
-
3011
- /***/ 9033:
3012
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3013
-
3014
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3015
- /* harmony export */ "M": () => (/* binding */ ResultColumn),
3016
- /* harmony export */ "S": () => (/* binding */ SortDirection)
3017
- /* harmony export */ });
3018
- var SortDirection;
3019
- (function(SortDirection) {
3020
- SortDirection["Ascending"] = "ascending";
3021
- SortDirection["Descending"] = "descending";
3022
- })(SortDirection || (SortDirection = {}));
3023
- var ResultColumn;
3024
- (function(ResultColumn) {
3025
- ResultColumn["BlanksCount"] = "blanks-count";
3026
- ResultColumn["ConsonantsCount"] = "consonants-count";
3027
- ResultColumn["Points"] = "points";
3028
- ResultColumn["TilesCount"] = "tiles-count";
3029
- ResultColumn["VowelsCount"] = "vowels-count";
3030
- ResultColumn["Word"] = "word";
3031
- ResultColumn["WordsCount"] = "words-count";
3032
- })(ResultColumn || (ResultColumn = {}));
3033
-
3034
-
3035
- /***/ }),
3036
-
3037
- /***/ 80559:
3038
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3039
-
3040
-
3041
- var __importDefault = (this && this.__importDefault) || function (mod) {
3042
- return (mod && mod.__esModule) ? mod : { "default": mod };
3043
- };
3044
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3045
- const constants_1 = __webpack_require__(7618);
3046
- const Cell_1 = __importDefault(__webpack_require__(52251));
3047
- const Tile_1 = __importDefault(__webpack_require__(25275));
3048
- class Board {
3049
- static create(width, height) {
3050
- return Board.fromStringArray(Array(height).fill(Array(width).fill(' ').join('')));
3051
- }
3052
- static fromJson(json) {
3053
- return new Board({
3054
- rows: json.map((row) => row.map(Cell_1.default.fromJson)),
3055
- });
3056
- }
3057
- static fromStringArray(stringArray) {
3058
- return new Board({
3059
- rows: stringArray.map((row, y) => row.split('').map((character, x) => new Cell_1.default({
3060
- isEmpty: !character || character === constants_1.EMPTY_CELL,
3061
- tile: character === constants_1.EMPTY_CELL ? Tile_1.default.Null : new Tile_1.default({ character }),
3062
- x,
3063
- y,
3064
- }))),
3065
- });
3066
- }
3067
- constructor({ rows }) {
3068
- this.rows = rows;
3069
- this.columnsCount = rows[0].length;
3070
- this.rowsCount = rows.length;
3071
- }
3072
- get center() {
3073
- const x = Math.floor(this.columnsCount / 2);
3074
- const y = Math.floor(this.rowsCount / 2);
3075
- return this.rows[y][x];
3076
- }
3077
- clone() {
3078
- const rows = this.rows.map((row) => row.map((cell) => cell.clone()));
3079
- return new Board({ rows });
3080
- }
3081
- collides(cell) {
3082
- return this.collidesUp(cell) || this.collidesDown(cell) || this.collidesLeft(cell) || this.collidesRight(cell);
3083
- }
3084
- collidesDown({ x, y }) {
3085
- return y < this.rowsCount - 1 && !this.rows[y + 1][x].isEmpty;
3086
- }
3087
- collidesLeft({ x, y }) {
3088
- return x > 0 && !this.rows[y][x - 1].isEmpty;
3089
- }
3090
- collidesRight({ x, y }) {
3091
- return x < this.columnsCount - 1 && !this.rows[y][x + 1].isEmpty;
3092
- }
3093
- collidesUp({ x, y }) {
3094
- return y > 0 && !this.rows[y - 1][x].isEmpty;
3095
- }
3096
- equals(other) {
3097
- return (this.columnsCount === other.columnsCount &&
3098
- this.rowsCount === other.rowsCount &&
3099
- this.rows.every((row, rowIndex) => {
3100
- return row.every((cell, cellIndex) => {
3101
- return cell.equals(other.rows[rowIndex][cellIndex]);
3102
- });
3103
- }));
3104
- }
3105
- getBlanksCount() {
3106
- return this.rows.reduce((count, row) => {
3107
- return count + row.reduce((rowCount, cell) => rowCount + (cell.tile.isBlank ? 1 : 0), 0);
3108
- }, 0);
3109
- }
3110
- getColumn(index) {
3111
- return this.rows.map((row) => row[index]);
3112
- }
3113
- getRow(index) {
3114
- return this.rows[index];
3115
- }
3116
- getTilesCount() {
3117
- return this.rows.reduce((count, row) => {
3118
- return count + row.reduce((rowCount, cell) => rowCount + (cell.hasTile() ? 1 : 0), 0);
3119
- }, 0);
3120
- }
3121
- getWords() {
3122
- const columns = [];
3123
- for (let x = 0; x < this.columnsCount; ++x) {
3124
- const column = [];
3125
- for (let y = 0; y < this.rowsCount; ++y) {
3126
- column.push(this.rows[y][x]);
3127
- }
3128
- columns.push(column);
3129
- }
3130
- const columnsBoard = new Board({ rows: columns });
3131
- const lines = this.toString().split('\n').concat(columnsBoard.toString().split('\n'));
3132
- const words = lines
3133
- .flatMap((line) => line.replaceAll(/\s+/g, constants_1.EMPTY_CELL).split(' '))
3134
- .filter((word) => word.length > 1);
3135
- return words;
3136
- }
3137
- isEmpty() {
3138
- return this.rows.every((row) => row.every(({ isEmpty }) => isEmpty));
3139
- }
3140
- toJson() {
3141
- return this.rows.map((row) => row.map((cell) => cell.toJson()));
3142
- }
3143
- toString() {
3144
- return this.rows.map((row) => row.map(String).join('')).join('\n');
3145
- }
3146
- updateCell(x, y, updateCell) {
3147
- this.rows[y][x] = updateCell(this.rows[y][x]);
3148
- }
3149
- updateRow(y, updateRow) {
3150
- this.rows[y] = updateRow(this.rows[y]);
3151
- }
3152
- }
3153
- exports["default"] = Board;
3154
-
3155
-
3156
- /***/ }),
3157
-
3158
- /***/ 46936:
3159
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3160
-
3161
-
3162
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3163
- exports.isBoardJson = void 0;
3164
- const CellJson_1 = __webpack_require__(59819);
3165
- const isBoardJson = (value) => {
3166
- if (!Array.isArray(value)) {
3167
- return false;
3168
- }
3169
- for (const row of value) {
3170
- if (!Array.isArray(value)) {
3171
- return false;
3172
- }
3173
- for (const cell of row) {
3174
- if (!(0, CellJson_1.isCellJson)(cell)) {
3175
- return false;
3176
- }
3177
- }
3178
- }
3179
- return true;
3180
- };
3181
- exports.isBoardJson = isBoardJson;
3182
-
3183
-
3184
- /***/ }),
3185
-
3186
- /***/ 37706:
3187
- /***/ ((__unused_webpack_module, exports) => {
3188
-
3189
-
3190
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3191
- class Bonus {
3192
- constructor({ multiplier, score, x, y }) {
3193
- this.multiplier = multiplier;
3194
- this.score = score;
3195
- this.x = x;
3196
- this.y = y;
3197
- }
3198
- canApply(_config, cell) {
3199
- return cell.isEmpty && this.matchesCellCoordinates(cell);
3200
- }
3201
- matchesCellCoordinates(cell) {
3202
- return this.x === cell.x && this.y === cell.y;
3203
- }
3204
- toJson() {
3205
- return {
3206
- multiplier: this.multiplier,
3207
- score: this.score,
3208
- type: this.type,
3209
- x: this.x,
3210
- y: this.y,
3211
- };
3212
- }
3213
- get value() {
3214
- return {
3215
- characterMultiplier: 1,
3216
- wordMultiplier: 1,
3217
- };
3218
- }
3219
- }
3220
- exports["default"] = Bonus;
3221
-
3222
-
3223
- /***/ }),
3224
-
3225
- /***/ 52251:
3226
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3227
-
3228
-
3229
- var __importDefault = (this && this.__importDefault) || function (mod) {
3230
- return (mod && mod.__esModule) ? mod : { "default": mod };
3231
- };
3232
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3233
- const Tile_1 = __importDefault(__webpack_require__(25275));
3234
- class Cell {
3235
- static fromJson(json) {
3236
- return new Cell({
3237
- isEmpty: json.isEmpty,
3238
- tile: Tile_1.default.fromJson(json.tile),
3239
- x: json.x,
3240
- y: json.y,
3241
- });
3242
- }
3243
- // eslint-disable-next-line no-undef
3244
- constructor({ isEmpty = true, tile = Tile_1.default.Null, x, y }) {
3245
- this.isEmpty = isEmpty;
3246
- this.tile = tile;
3247
- this.x = x;
3248
- this.y = y;
3249
- }
3250
- clone() {
3251
- return new Cell({
3252
- isEmpty: this.isEmpty,
3253
- tile: this.tile.clone(),
3254
- x: this.x,
3255
- y: this.y,
3256
- });
3257
- }
3258
- equals(other) {
3259
- return this.x === other.x && this.y === other.y && this.isEmpty === other.isEmpty && this.tile.equals(other.tile);
3260
- }
3261
- hasTile() {
3262
- return this.tile !== Tile_1.default.Null;
3263
- }
3264
- isCandidate() {
3265
- return this.isEmpty && this.hasTile();
3266
- }
3267
- toJson() {
3268
- return {
3269
- isEmpty: this.isEmpty,
3270
- tile: this.tile.toJson(),
3271
- x: this.x,
3272
- y: this.y,
3273
- };
3274
- }
3275
- toString() {
3276
- return this.tile.toString();
3277
- }
3278
- }
3279
- exports["default"] = Cell;
3280
-
3281
-
3282
- /***/ }),
3283
-
3284
- /***/ 59819:
3285
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3286
-
3287
-
3288
- var __importDefault = (this && this.__importDefault) || function (mod) {
3289
- return (mod && mod.__esModule) ? mod : { "default": mod };
3290
- };
3291
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3292
- exports.isCellJson = void 0;
3293
- const isObject_1 = __importDefault(__webpack_require__(24814));
3294
- const TileJson_1 = __webpack_require__(214);
3295
- const isCellJson = (value) => {
3296
- return ((0, isObject_1.default)(value) &&
3297
- typeof value.isEmpty === 'boolean' &&
3298
- ((0, TileJson_1.isTileJson)(value.tile) || value.tile === null) &&
3299
- typeof value.x === 'number' &&
3300
- typeof value.y === 'number');
3301
- };
3302
- exports.isCellJson = isCellJson;
3303
-
3304
-
3305
- /***/ }),
3306
-
3307
- /***/ 19582:
3308
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3309
-
3310
-
3311
- var __importDefault = (this && this.__importDefault) || function (mod) {
3312
- return (mod && mod.__esModule) ? mod : { "default": mod };
3313
- };
3314
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3315
- const constants_1 = __webpack_require__(7618);
3316
- const Bonus_1 = __importDefault(__webpack_require__(37706));
3317
- class CharacterBonus extends Bonus_1.default {
3318
- constructor() {
3319
- super(...arguments);
3320
- this.type = constants_1.BONUS_CHARACTER;
3321
- }
3322
- canApply(config, cell) {
3323
- return super.canApply(config, cell) && this.matchesCellTileScore(config, cell);
3324
- }
3325
- matchesCellTileScore(config, cell) {
3326
- if (typeof this.score === 'undefined') {
3327
- return true;
3328
- }
3329
- return this.score === config.pointsMap[cell.tile.character];
3330
- }
3331
- get value() {
3332
- return {
3333
- characterMultiplier: this.multiplier,
3334
- wordMultiplier: 1,
3335
- };
3336
- }
3337
- }
3338
- exports["default"] = CharacterBonus;
3339
-
3340
-
3341
- /***/ }),
3342
-
3343
- /***/ 28433:
3344
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3345
-
3346
-
3347
- var __importDefault = (this && this.__importDefault) || function (mod) {
3348
- return (mod && mod.__esModule) ? mod : { "default": mod };
3349
- };
3350
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3351
- const constants_1 = __webpack_require__(7618);
3352
- const CharacterBonus_1 = __importDefault(__webpack_require__(19582));
3353
- const WordBonus_1 = __importDefault(__webpack_require__(58627));
3354
- class Config {
3355
- static fromJson(json) {
3356
- return new Config(json);
3357
- }
3358
- constructor(config) {
3359
- this.bonuses = getBonuses(config);
3360
- this.config = config;
3361
- this.pointsMap = getPointsMap(this.config);
3362
- }
3363
- get allTilesBonusScore() {
3364
- return this.config.allTilesBonusScore;
3365
- }
3366
- get alphabet() {
3367
- return getAlphabet(this.config);
3368
- }
3369
- get blankScore() {
3370
- return this.config.blankScore;
3371
- }
3372
- get blanksCount() {
3373
- return this.config.blanksCount;
3374
- }
3375
- get boardHeight() {
3376
- return this.config.boardHeight;
3377
- }
3378
- get boardWidth() {
3379
- return this.config.boardWidth;
3380
- }
3381
- get twoCharacterTiles() {
3382
- return this.config.tiles.filter((tile) => tile.character.length === 2).map((tile) => tile.character);
3383
- }
3384
- getCellBonus(cell) {
3385
- return this.bonuses.find((bonus) => bonus.matchesCellCoordinates(cell));
3386
- }
3387
- getCellBonusValue(cell) {
3388
- return this.getCellBonus(cell)?.value || constants_1.NO_BONUS;
3389
- }
3390
- getCharacterPoints(character) {
3391
- if (character === null) {
3392
- return undefined;
3393
- }
3394
- if (character === constants_1.BLANK) {
3395
- return this.blankScore;
3396
- }
3397
- return this.pointsMap[character];
3398
- }
3399
- getTwoCharacterTileByPrefix(character) {
3400
- if (character.length !== 1) {
3401
- return undefined;
3402
- }
3403
- return this.twoCharacterTiles.find((characters) => characters.startsWith(character));
3404
- }
3405
- getTilePoints(tile) {
3406
- if (tile === null) {
3407
- return undefined;
3408
- }
3409
- return tile.isBlank ? this.blankScore : this.getCharacterPoints(tile.character);
3410
- }
3411
- hasCharacter(character) {
3412
- return character in this.pointsMap;
3413
- }
3414
- isTwoCharacterTilePrefix(character) {
3415
- return typeof this.getTwoCharacterTileByPrefix(character) !== 'undefined';
3416
- }
3417
- get maximumCharactersCount() {
3418
- return this.config.maximumCharactersCount;
3419
- }
3420
- get tiles() {
3421
- return this.config.tiles;
3422
- }
3423
- toJson() {
3424
- return this.config;
3425
- }
3426
- }
3427
- const getBonuses = (config) => {
3428
- return config.bonuses.map((bonus) => {
3429
- if (bonus.type === constants_1.BONUS_CHARACTER) {
3430
- return new CharacterBonus_1.default(bonus);
3431
- }
3432
- if (bonus.type === constants_1.BONUS_WORD) {
3433
- return new WordBonus_1.default(bonus);
3434
- }
3435
- throw new Error(`Unsupported Bonus type: "${bonus.type}"`);
3436
- });
3437
- };
3438
- const getAlphabet = (config) => config.tiles.map(({ character }) => character);
3439
- const getPointsMap = (config) => config.tiles.reduce((pointsMap, { character, score }) => ({
3440
- ...pointsMap,
3441
- [character]: score,
3442
- }), {});
3443
- exports["default"] = Config;
3444
-
3445
-
3446
- /***/ }),
3447
-
3448
- /***/ 35905:
3449
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3450
-
3451
-
3452
- var __importDefault = (this && this.__importDefault) || function (mod) {
3453
- return (mod && mod.__esModule) ? mod : { "default": mod };
3454
- };
3455
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3456
- const Pattern_1 = __importDefault(__webpack_require__(63207));
3457
- class FinalPattern extends Pattern_1.default {
3458
- constructor(pattern) {
3459
- super(pattern.board, pattern.cells);
3460
- this.collisions = pattern.getCollisions();
3461
- }
3462
- getCollisions() {
3463
- return this.collisions;
3464
- }
3465
- }
3466
- exports["default"] = FinalPattern;
3467
-
3468
-
3469
- /***/ }),
3470
-
3471
- /***/ 49594:
3472
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3473
-
3474
-
3475
- var __importDefault = (this && this.__importDefault) || function (mod) {
3476
- return (mod && mod.__esModule) ? mod : { "default": mod };
3477
- };
3478
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3479
- const Pattern_1 = __importDefault(__webpack_require__(63207));
3480
- class HorizontalPattern extends Pattern_1.default {
3481
- clone() {
3482
- return new HorizontalPattern(this.board, this.cells.map((cell) => cell.clone()));
3483
- }
3484
- getCollisions() {
3485
- const collisions = [];
3486
- this.cells
3487
- .filter((cell) => cell.isEmpty && (this.board.collidesUp(cell) || this.board.collidesDown(cell)))
3488
- .forEach((cell) => {
3489
- const column = this.board.getColumn(cell.x);
3490
- let y = cell.y - 1;
3491
- while (y >= 0 && column[y].hasTile()) {
3492
- --y;
3493
- }
3494
- const previousCells = column.slice(y + 1, cell.y);
3495
- y = cell.y + 1;
3496
- while (y < column.length && column[y].hasTile()) {
3497
- ++y;
3498
- }
3499
- const nextCells = column.slice(cell.y + 1, y);
3500
- const cells = [...previousCells, cell, ...nextCells];
3501
- if (cells.length > 1) {
3502
- const pattern = new Pattern_1.default(this.board, cells);
3503
- collisions.push(pattern);
3504
- }
3505
- });
3506
- return collisions;
3507
- }
3508
- }
3509
- exports["default"] = HorizontalPattern;
3510
-
3511
-
3512
- /***/ }),
3513
-
3514
- /***/ 26634:
3515
- /***/ ((__unused_webpack_module, exports) => {
3516
-
3517
-
3518
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3519
- exports.isLocale = void 0;
3520
- // eslint-disable-next-line no-shadow
3521
- var Locale;
3522
- (function (Locale) {
3523
- Locale["DE_DE"] = "de-DE";
3524
- Locale["EN_GB"] = "en-GB";
3525
- Locale["EN_US"] = "en-US";
3526
- Locale["ES_ES"] = "es-ES";
3527
- Locale["FA_IR"] = "fa-IR";
3528
- Locale["FR_FR"] = "fr-FR";
3529
- Locale["PL_PL"] = "pl-PL";
3530
- })(Locale || (Locale = {}));
3531
- const locales = Object.values(Locale);
3532
- const isLocale = (locale) => locales.includes(locale);
3533
- exports.isLocale = isLocale;
3534
- exports["default"] = Locale;
3535
-
3536
-
3537
- /***/ }),
3538
-
3539
- /***/ 63207:
3540
- /***/ ((__unused_webpack_module, exports) => {
3541
-
3542
-
3543
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3544
- class Pattern {
3545
- constructor(board, cells) {
3546
- this.board = board;
3547
- this.cells = cells;
3548
- }
3549
- canBePlaced(config) {
3550
- const emptyCellsCount = this.getEmptyCellsCount();
3551
- const isUsedCellsCountInRange = emptyCellsCount >= 1 && emptyCellsCount <= config.maximumCharactersCount;
3552
- return (isUsedCellsCountInRange &&
3553
- (this.hasAtLeast1NonEmptyCell() || this.collides() || (this.goesThroughBoardCenter() && this.board.isEmpty())));
3554
- }
3555
- clone() {
3556
- return new Pattern(this.board, this.cells.map((cell) => cell.clone()));
3557
- }
3558
- collides() {
3559
- return this.cells.some((cell) => cell.isEmpty && this.board.collides(cell));
3560
- }
3561
- getIndexOfFirstCellWithoutTile() {
3562
- return this.cells.findIndex((cell) => !cell.hasTile());
3563
- }
3564
- getEmptyCellsCount() {
3565
- return this.cells.filter((cell) => cell.isEmpty).length;
3566
- }
3567
- goesThroughBoardCenter() {
3568
- return this.cells.some((cell) => cell.x === this.board.center.x && cell.y === this.board.center.y && cell.isEmpty);
3569
- }
3570
- hasAtLeast1EmptyCell() {
3571
- return this.cells.some((cell) => cell.isEmpty);
3572
- }
3573
- hasAtLeast1NonEmptyCell() {
3574
- return this.cells.some((cell) => !cell.isEmpty);
3575
- }
3576
- getCollisions() {
3577
- return [];
3578
- }
3579
- toJson() {
3580
- return {
3581
- cells: this.cells.map((cell) => cell.toJson()),
3582
- collisions: this.getCollisions().map((collision) => collision.toJson()),
3583
- word: this.toString(),
3584
- };
3585
- }
3586
- toString() {
3587
- return this.cells.reduce((result, cell) => result + cell.toString(), '');
3588
- }
3589
- }
3590
- exports["default"] = Pattern;
3591
-
3592
-
3593
- /***/ }),
3594
-
3595
- /***/ 30091:
3596
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3597
-
3598
-
3599
- var __importDefault = (this && this.__importDefault) || function (mod) {
3600
- return (mod && mod.__esModule) ? mod : { "default": mod };
3601
- };
3602
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3603
- const constants_1 = __webpack_require__(7618);
3604
- const Cell_1 = __importDefault(__webpack_require__(52251));
3605
- class Result {
3606
- static fromJson(json) {
3607
- return new Result({
3608
- id: json.id,
3609
- cells: json.cells.map(Cell_1.default.fromJson),
3610
- collisions: json.collisions.map((collision) => collision.map(Cell_1.default.fromJson)),
3611
- points: json.points,
3612
- });
3613
- }
3614
- constructor({ cells, id, collisions, points, }) {
3615
- const tiles = getTiles(cells);
3616
- this.blanksCount = getBlanks(tiles).length;
3617
- this.cells = cells;
3618
- this.collisions = collisions;
3619
- this.consonantsCount = getConsonants(tiles).length;
3620
- this.id = id;
3621
- this.length = cells.length;
3622
- this.points = points;
3623
- this.pointsRatio = getPointsRatio(tiles, points);
3624
- this.tiles = tiles;
3625
- this.tilesCount = tiles.length;
3626
- this.vowelsCount = getVowels(tiles).length;
3627
- this.word = getWord(cells);
3628
- this.words = getWords(cells, collisions);
3629
- this.wordsCount = 1 + this.collisions.length;
3630
- }
3631
- toJson() {
3632
- return {
3633
- cells: this.cells.map((cell) => cell.toJson()),
3634
- id: this.id,
3635
- collisions: this.collisions.map((collision) => collision.map((cell) => cell.toJson())),
3636
- points: this.points,
3637
- };
3638
- }
3639
- }
3640
- const getBlanks = (tiles) => tiles.filter(({ isBlank }) => isBlank);
3641
- const getConsonants = (tiles) => tiles.filter(isConsonant);
3642
- const getVowels = (tiles) => tiles.filter(isVowel);
3643
- const getPointsRatio = (tiles, points) => points / tiles.length;
3644
- const getTiles = (cells) => cells.filter(({ isEmpty }) => isEmpty).map(({ tile }) => tile);
3645
- // eslint-disable-next-line prefer-template
3646
- const getWord = (cells) => cells.reduce((word, cell) => word + cell.toString(), '');
3647
- const getWords = (cells, collisions) => [cells, ...collisions].map(getWord);
3648
- const isConsonant = ({ character, isBlank }) => constants_1.CONSONANTS.includes(character) && !isBlank;
3649
- const isVowel = ({ character, isBlank }) => constants_1.VOWELS.includes(character) && !isBlank;
3650
- exports["default"] = Result;
3651
-
3652
-
3653
- /***/ }),
3654
-
3655
- /***/ 25275:
3656
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3657
-
3658
-
3659
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3660
- const constants_1 = __webpack_require__(7618);
3661
- class Tile {
3662
- static fromJson(json) {
3663
- if (!json) {
3664
- return Tile.Null;
3665
- }
3666
- return new Tile({
3667
- character: json.character,
3668
- isBlank: json.isBlank,
3669
- });
3670
- }
3671
- constructor({ character, isBlank = false }) {
3672
- this.character = character;
3673
- this.isBlank = isBlank;
3674
- }
3675
- clone() {
3676
- return new Tile({
3677
- character: this.character,
3678
- isBlank: this.isBlank,
3679
- });
3680
- }
3681
- equals(other) {
3682
- return this.character === other.character && this.isBlank === other.isBlank;
3683
- }
3684
- toJson() {
3685
- return {
3686
- character: this.character,
3687
- isBlank: this.isBlank,
3688
- };
3689
- }
3690
- toString() {
3691
- return this.character;
3692
- }
3693
- }
3694
- Tile.Null = Object.freeze({
3695
- character: constants_1.EMPTY_CELL,
3696
- isBlank: false,
3697
- clone: () => Tile.Null,
3698
- equals: (other) => other === Tile.Null,
3699
- toJson: () => null,
3700
- toString: () => constants_1.EMPTY_CELL,
3701
- });
3702
- exports["default"] = Tile;
3703
-
3704
-
3705
- /***/ }),
3706
-
3707
- /***/ 214:
3708
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3709
-
3710
-
3711
- var __importDefault = (this && this.__importDefault) || function (mod) {
3712
- return (mod && mod.__esModule) ? mod : { "default": mod };
3713
- };
3714
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3715
- exports.isTileJson = void 0;
3716
- const isObject_1 = __importDefault(__webpack_require__(24814));
3717
- const isTileJson = (value) => {
3718
- return (0, isObject_1.default)(value) && typeof value.character === 'string' && typeof value.isBlank === 'boolean';
3719
- };
3720
- exports.isTileJson = isTileJson;
3721
-
3722
-
3723
- /***/ }),
3724
-
3725
- /***/ 65168:
3726
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3727
-
3728
-
3729
- var __importDefault = (this && this.__importDefault) || function (mod) {
3730
- return (mod && mod.__esModule) ? mod : { "default": mod };
3731
- };
3732
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3733
- const Pattern_1 = __importDefault(__webpack_require__(63207));
3734
- class VerticalPattern extends Pattern_1.default {
3735
- clone() {
3736
- return new VerticalPattern(this.board, this.cells.map((cell) => cell.clone()));
3737
- }
3738
- getCollisions() {
3739
- const collisions = [];
3740
- this.cells
3741
- .filter((cell) => cell.isEmpty && (this.board.collidesLeft(cell) || this.board.collidesRight(cell)))
3742
- .forEach((cell) => {
3743
- const row = this.board.getRow(cell.y);
3744
- let x = cell.x - 1;
3745
- while (x >= 0 && row[x].hasTile()) {
3746
- --x;
3747
- }
3748
- const previousCells = row.slice(x + 1, cell.x);
3749
- x = cell.x + 1;
3750
- while (x < row.length && row[x].hasTile()) {
3751
- ++x;
3752
- }
3753
- const nextCells = row.slice(cell.x + 1, x);
3754
- const cells = [...previousCells, cell, ...nextCells];
3755
- if (cells.length > 1) {
3756
- const pattern = new Pattern_1.default(this.board, cells);
3757
- collisions.push(pattern);
3758
- }
3759
- });
3760
- return collisions;
3761
- }
3762
- }
3763
- exports["default"] = VerticalPattern;
3764
-
3765
-
3766
- /***/ }),
3767
-
3768
- /***/ 58627:
3769
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3770
-
3771
-
3772
- var __importDefault = (this && this.__importDefault) || function (mod) {
3773
- return (mod && mod.__esModule) ? mod : { "default": mod };
3774
- };
3775
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3776
- const constants_1 = __webpack_require__(7618);
3777
- const Bonus_1 = __importDefault(__webpack_require__(37706));
3778
- class WordBonus extends Bonus_1.default {
3779
- constructor() {
3780
- super(...arguments);
3781
- this.type = constants_1.BONUS_WORD;
3782
- }
3783
- get value() {
3784
- return {
3785
- characterMultiplier: 1,
3786
- wordMultiplier: this.multiplier,
3787
- };
3788
- }
3789
- }
3790
- exports["default"] = WordBonus;
3791
-
3792
-
3793
- /***/ }),
3794
-
3795
- /***/ 31560:
3796
- /***/ ((__unused_webpack_module, exports) => {
3797
-
3798
-
3799
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3800
- class WordDefinition {
3801
- static fromJson(json) {
3802
- if (!json) {
3803
- return WordDefinition.Null;
3804
- }
3805
- return new WordDefinition({
3806
- definitions: json.definitions,
3807
- exists: json.exists,
3808
- isAllowed: json.isAllowed,
3809
- word: json.word,
3810
- });
3811
- }
3812
- constructor({ definitions, exists, isAllowed, word }) {
3813
- this.definitions = definitions;
3814
- this.exists = exists;
3815
- this.isAllowed = isAllowed;
3816
- this.word = word;
3817
- }
3818
- toJson() {
3819
- return {
3820
- definitions: this.definitions,
3821
- exists: this.exists,
3822
- isAllowed: this.isAllowed,
3823
- word: this.word,
3824
- };
3825
- }
3826
- }
3827
- WordDefinition.Null = Object.freeze({
3828
- definitions: [],
3829
- exists: false,
3830
- isAllowed: false,
3831
- word: '',
3832
- toJson: () => null,
3833
- });
3834
- exports["default"] = WordDefinition;
3835
-
3836
-
3837
- /***/ }),
3838
-
3839
- /***/ 34046:
3840
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3841
-
3842
-
3843
- var __importDefault = (this && this.__importDefault) || function (mod) {
3844
- return (mod && mod.__esModule) ? mod : { "default": mod };
3845
- };
3846
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3847
- exports.WordDefinition = exports.WordBonus = exports.VerticalPattern = exports.isTileJson = exports.Tile = exports.Result = exports.Pattern = exports.isLocale = exports.Locale = exports.isObject = exports.isError = exports.HorizontalPattern = exports.FinalPattern = exports.Config = exports.CharacterBonus = exports.isCellJson = exports.Cell = exports.Bonus = exports.isBoardJson = exports.Board = void 0;
3848
- var Board_1 = __webpack_require__(80559);
3849
- Object.defineProperty(exports, "Board", ({ enumerable: true, get: function () { return __importDefault(Board_1).default; } }));
3850
- var BoardJson_1 = __webpack_require__(46936);
3851
- Object.defineProperty(exports, "isBoardJson", ({ enumerable: true, get: function () { return BoardJson_1.isBoardJson; } }));
3852
- var Bonus_1 = __webpack_require__(37706);
3853
- Object.defineProperty(exports, "Bonus", ({ enumerable: true, get: function () { return __importDefault(Bonus_1).default; } }));
3854
- var Cell_1 = __webpack_require__(52251);
3855
- Object.defineProperty(exports, "Cell", ({ enumerable: true, get: function () { return __importDefault(Cell_1).default; } }));
3856
- var CellJson_1 = __webpack_require__(59819);
3857
- Object.defineProperty(exports, "isCellJson", ({ enumerable: true, get: function () { return CellJson_1.isCellJson; } }));
3858
- var CharacterBonus_1 = __webpack_require__(19582);
3859
- Object.defineProperty(exports, "CharacterBonus", ({ enumerable: true, get: function () { return __importDefault(CharacterBonus_1).default; } }));
3860
- var Config_1 = __webpack_require__(28433);
3861
- Object.defineProperty(exports, "Config", ({ enumerable: true, get: function () { return __importDefault(Config_1).default; } }));
3862
- var FinalPattern_1 = __webpack_require__(35905);
3863
- Object.defineProperty(exports, "FinalPattern", ({ enumerable: true, get: function () { return __importDefault(FinalPattern_1).default; } }));
3864
- var HorizontalPattern_1 = __webpack_require__(49594);
3865
- Object.defineProperty(exports, "HorizontalPattern", ({ enumerable: true, get: function () { return __importDefault(HorizontalPattern_1).default; } }));
3866
- var isError_1 = __webpack_require__(96255);
3867
- Object.defineProperty(exports, "isError", ({ enumerable: true, get: function () { return __importDefault(isError_1).default; } }));
3868
- var isObject_1 = __webpack_require__(24814);
3869
- Object.defineProperty(exports, "isObject", ({ enumerable: true, get: function () { return __importDefault(isObject_1).default; } }));
3870
- var Locale_1 = __webpack_require__(26634);
3871
- Object.defineProperty(exports, "Locale", ({ enumerable: true, get: function () { return __importDefault(Locale_1).default; } }));
3872
- Object.defineProperty(exports, "isLocale", ({ enumerable: true, get: function () { return Locale_1.isLocale; } }));
3873
- var Pattern_1 = __webpack_require__(63207);
3874
- Object.defineProperty(exports, "Pattern", ({ enumerable: true, get: function () { return __importDefault(Pattern_1).default; } }));
3875
- var Result_1 = __webpack_require__(30091);
3876
- Object.defineProperty(exports, "Result", ({ enumerable: true, get: function () { return __importDefault(Result_1).default; } }));
3877
- var Tile_1 = __webpack_require__(25275);
3878
- Object.defineProperty(exports, "Tile", ({ enumerable: true, get: function () { return __importDefault(Tile_1).default; } }));
3879
- var TileJson_1 = __webpack_require__(214);
3880
- Object.defineProperty(exports, "isTileJson", ({ enumerable: true, get: function () { return TileJson_1.isTileJson; } }));
3881
- var VerticalPattern_1 = __webpack_require__(65168);
3882
- Object.defineProperty(exports, "VerticalPattern", ({ enumerable: true, get: function () { return __importDefault(VerticalPattern_1).default; } }));
3883
- var WordBonus_1 = __webpack_require__(58627);
3884
- Object.defineProperty(exports, "WordBonus", ({ enumerable: true, get: function () { return __importDefault(WordBonus_1).default; } }));
3885
- var WordDefinition_1 = __webpack_require__(31560);
3886
- Object.defineProperty(exports, "WordDefinition", ({ enumerable: true, get: function () { return __importDefault(WordDefinition_1).default; } }));
3887
-
3888
-
3889
- /***/ }),
3890
-
3891
- /***/ 96255:
3892
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3893
-
3894
-
3895
- var __importDefault = (this && this.__importDefault) || function (mod) {
3896
- return (mod && mod.__esModule) ? mod : { "default": mod };
3897
- };
3898
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3899
- const isObject_1 = __importDefault(__webpack_require__(24814));
3900
- const isError = (value) => {
3901
- if (!(0, isObject_1.default)(value)) {
3902
- return false;
3903
- }
3904
- return typeof value.message === 'string';
3905
- };
3906
- exports["default"] = isError;
3907
-
3908
-
3909
- /***/ }),
3910
-
3911
- /***/ 24814:
3912
- /***/ ((__unused_webpack_module, exports) => {
3913
-
3914
-
3915
- Object.defineProperty(exports, "__esModule", ({ value: true }));
3916
- const isObject = (value) => {
3917
- return typeof value === 'object' && value !== null;
3918
- };
3919
- exports["default"] = isObject;
3920
-
3921
-
3922
- /***/ })
3923
-
3924
- };
3925
- ;