game_client_logic_deb 1.8.71 → 1.8.76

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 (31) hide show
  1. package/Kosi-Kaverit-kaverit.js +75 -75
  2. package/Kosi-Kodein-kodein-di.js +618 -618
  3. package/Kotlin-DateTime-library-kotlinx-datetime.js +143 -143
  4. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
  5. package/Logic_Debertz-core.js +1737 -2678
  6. package/Logic_Debertz-core.js.map +1 -1
  7. package/Logic_Debertz-engine.js +12497 -12201
  8. package/Logic_Debertz-engine.js.map +1 -1
  9. package/Logic_Debertz-game_client.d.ts +137 -54
  10. package/Logic_Debertz-game_client.js +4441 -4437
  11. package/Logic_Debertz-game_client.js.map +1 -1
  12. package/kotlin-kotlin-stdlib.js +2066 -1979
  13. package/kotlin-kotlin-stdlib.js.map +1 -1
  14. package/{88b0986a7186d029-atomicfu-js-ir.js → kotlinx-atomicfu.js} +29 -29
  15. package/kotlinx-atomicfu.js.map +1 -0
  16. package/{kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js → kotlinx-coroutines-core.js} +2713 -2676
  17. package/kotlinx-coroutines-core.js.map +1 -0
  18. package/kotlinx-io-kotlinx-io-core.js +292 -292
  19. package/kotlinx-io-kotlinx-io-core.js.map +1 -1
  20. package/kotlinx-serialization-kotlinx-serialization-core.js +1885 -1885
  21. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
  22. package/kotlinx-serialization-kotlinx-serialization-json.js +1405 -1405
  23. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
  24. package/package.json +1 -1
  25. package/raspberry-cardgame-lib-core.js +1184 -0
  26. package/raspberry-cardgame-lib-core.js.map +1 -0
  27. package/secure-random-secure-random.js +15 -0
  28. package/secure-random-secure-random.js.map +1 -0
  29. package/uuid.js +32 -32
  30. package/88b0986a7186d029-atomicfu-js-ir.js.map +0 -1
  31. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +0 -1
@@ -0,0 +1,1184 @@
1
+ (function (root, factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './kotlinx-serialization-kotlinx-serialization-core.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'));
6
+ else {
7
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'raspberry-cardgame-lib-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'raspberry-cardgame-lib-core'.");
9
+ }
10
+ if (typeof this['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
11
+ throw new Error("Error loading module 'raspberry-cardgame-lib-core'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'raspberry-cardgame-lib-core'.");
12
+ }
13
+ root['raspberry-cardgame-lib-core'] = factory(typeof this['raspberry-cardgame-lib-core'] === 'undefined' ? {} : this['raspberry-cardgame-lib-core'], this['kotlin-kotlin-stdlib'], this['kotlinx-serialization-kotlinx-serialization-core']);
14
+ }
15
+ }(this, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
16
+ 'use strict';
17
+ //region block: imports
18
+ var imul = Math.imul;
19
+ var protoOf = kotlin_kotlin.$_$.za;
20
+ var objectMeta = kotlin_kotlin.$_$.ya;
21
+ var setMetadataFor = kotlin_kotlin.$_$.ab;
22
+ var defineProp = kotlin_kotlin.$_$.y9;
23
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
24
+ var Unit_instance = kotlin_kotlin.$_$.y4;
25
+ var THROW_CCE = kotlin_kotlin.$_$.yd;
26
+ var Comparator = kotlin_kotlin.$_$.kd;
27
+ var VOID = kotlin_kotlin.$_$.f;
28
+ var take = kotlin_kotlin.$_$.i8;
29
+ var toList = kotlin_kotlin.$_$.l8;
30
+ var takeLast = kotlin_kotlin.$_$.h8;
31
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.ve;
32
+ var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.q1;
33
+ var Enum = kotlin_kotlin.$_$.nd;
34
+ var classMeta = kotlin_kotlin.$_$.w9;
35
+ var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c2;
36
+ var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.j;
37
+ var lazy = kotlin_kotlin.$_$.te;
38
+ var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a2;
39
+ var enumEntries = kotlin_kotlin.$_$.m9;
40
+ var interfaceMeta = kotlin_kotlin.$_$.ga;
41
+ var first = kotlin_kotlin.$_$.t6;
42
+ var sorted = kotlin_kotlin.$_$.f8;
43
+ var asReversed = kotlin_kotlin.$_$.q5;
44
+ var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.v1;
45
+ var sortedWith = kotlin_kotlin.$_$.e8;
46
+ var lastOrNull = kotlin_kotlin.$_$.h7;
47
+ var toMutableList = kotlin_kotlin.$_$.o8;
48
+ var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.t1;
49
+ var compareTo = kotlin_kotlin.$_$.x9;
50
+ var dropLast = kotlin_kotlin.$_$.l6;
51
+ var plus = kotlin_kotlin.$_$.w7;
52
+ var minus = kotlin_kotlin.$_$.r7;
53
+ var plus_0 = kotlin_kotlin.$_$.x7;
54
+ var mutableListOf = kotlin_kotlin.$_$.s7;
55
+ var printStackTrace = kotlin_kotlin.$_$.xe;
56
+ var isBlank = kotlin_kotlin.$_$.ec;
57
+ var stackTraceToString = kotlin_kotlin.$_$.ye;
58
+ //endregion
59
+ //region block: pre-declaration
60
+ setMetadataFor(CoreConfig, 'CoreConfig', objectMeta);
61
+ setMetadataFor(CardNumberComparator, 'CardNumberComparator', objectMeta, VOID, [Comparator]);
62
+ setMetadataFor(CardIndexComparator, 'CardIndexComparator', objectMeta, VOID, [Comparator]);
63
+ setMetadataFor(Companion, 'Companion', objectMeta);
64
+ setMetadataFor(CardName, 'CardName', classMeta, Enum);
65
+ setMetadataFor(Companion_0, 'Companion', objectMeta);
66
+ setMetadataFor(GameCard, 'GameCard', classMeta);
67
+ setMetadataFor(Companion_1, 'Companion', objectMeta, VOID, [SerializerFactory]);
68
+ setMetadataFor(Suit, 'Suit', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_1});
69
+ function standardShuffledCards$default(cards, times, $super) {
70
+ times = times === VOID ? 3 : times;
71
+ return $super === VOID ? this.h2l(cards, times) : $super.h2l.call(this, cards, times);
72
+ }
73
+ setMetadataFor(CardsDealerProvider, 'CardsDealerProvider', interfaceMeta);
74
+ function findCardsInRowCombinations$default(cards, supportedCombinations, checkFromIndex, includeCardNames, suit, $super) {
75
+ checkFromIndex = checkFromIndex === VOID ? first(supportedCombinations) : checkFromIndex;
76
+ includeCardNames = includeCardNames === VOID ? null : includeCardNames;
77
+ suit = suit === VOID ? null : suit;
78
+ return $super === VOID ? this.j2l(cards, supportedCombinations, checkFromIndex, includeCardNames, suit) : $super.j2l.call(this, cards, supportedCombinations, checkFromIndex, includeCardNames, suit);
79
+ }
80
+ setMetadataFor(CombinationsCheckerProvider, 'CombinationsCheckerProvider', interfaceMeta);
81
+ setMetadataFor(CombinationsCheckerProviderImpl, 'CombinationsCheckerProviderImpl', classMeta, VOID, [CombinationsCheckerProvider], CombinationsCheckerProviderImpl);
82
+ setMetadataFor(DealerReducer, 'DealerReducer', interfaceMeta);
83
+ setMetadataFor(DealerReducerImpl, 'DealerReducerImpl', classMeta, VOID, [DealerReducer]);
84
+ setMetadataFor(Companion_2, 'Companion', objectMeta);
85
+ setMetadataFor(Companion_3, 'Companion', objectMeta);
86
+ function d(tag, message, payload, $super) {
87
+ tag = tag === VOID ? null : tag;
88
+ payload = payload === VOID ? null : payload;
89
+ return this.v2l(tag, message, payload);
90
+ }
91
+ function e(tag, message, exception, payload, $super) {
92
+ tag = tag === VOID ? null : tag;
93
+ message = message === VOID ? null : message;
94
+ exception = exception === VOID ? null : exception;
95
+ payload = payload === VOID ? null : payload;
96
+ return this.w2l(tag, message, exception, payload);
97
+ }
98
+ function w(tag, message, payload, $super) {
99
+ tag = tag === VOID ? null : tag;
100
+ payload = payload === VOID ? null : payload;
101
+ return this.x2l(tag, message, payload);
102
+ }
103
+ setMetadataFor(LoggerOutput, 'LoggerOutput', interfaceMeta);
104
+ setMetadataFor(RaspberryLogger, 'RaspberryLogger', interfaceMeta, VOID, [LoggerOutput]);
105
+ setMetadataFor(CombinedRaspberryLogger, 'CombinedRaspberryLogger', classMeta, VOID, [RaspberryLogger]);
106
+ setMetadataFor(LoggerEnabledTrigger, 'LoggerEnabledTrigger', interfaceMeta, VOID, [RaspberryLogger]);
107
+ setMetadataFor(LoggerPayload, 'LoggerPayload', interfaceMeta);
108
+ setMetadataFor(PlatformRaspberryLogger, 'PlatformRaspberryLogger', classMeta, VOID, [RaspberryLogger, LoggerEnabledTrigger], PlatformRaspberryLogger);
109
+ setMetadataFor(Category, 'Category', classMeta, Enum);
110
+ setMetadataFor(Logger$loggerSource$1, VOID, classMeta);
111
+ setMetadataFor(Logger, 'Logger', objectMeta);
112
+ setMetadataFor(PlatformLogger, 'PlatformLogger', classMeta, VOID, VOID, PlatformLogger);
113
+ //endregion
114
+ function CoreConfig() {
115
+ this.version = '0.0.14';
116
+ }
117
+ protoOf(CoreConfig).p2k = function () {
118
+ return this.version;
119
+ };
120
+ var CoreConfig_instance;
121
+ function CoreConfig_getInstance() {
122
+ return CoreConfig_instance;
123
+ }
124
+ function filterByCardName(_this__u8e3s4, name) {
125
+ // Inline function 'kotlin.collections.filter' call
126
+ var predicate = byCardNamePredicate(name.slice());
127
+ // Inline function 'kotlin.collections.filterTo' call
128
+ var destination = ArrayList_init_$Create$();
129
+ var tmp0_iterator = _this__u8e3s4.v();
130
+ while (tmp0_iterator.w()) {
131
+ var element = tmp0_iterator.y();
132
+ if (predicate(element)) {
133
+ destination.s(element);
134
+ }
135
+ }
136
+ return destination;
137
+ }
138
+ function CardNumberComparator() {
139
+ }
140
+ protoOf(CardNumberComparator).q2k = function (a, b) {
141
+ return b.s2k() - a.s2k() | 0;
142
+ };
143
+ protoOf(CardNumberComparator).compare = function (a, b) {
144
+ var tmp = a instanceof GameCard ? a : THROW_CCE();
145
+ return this.q2k(tmp, b instanceof GameCard ? b : THROW_CCE());
146
+ };
147
+ var CardNumberComparator_instance;
148
+ function CardNumberComparator_getInstance() {
149
+ return CardNumberComparator_instance;
150
+ }
151
+ function CardIndexComparator() {
152
+ }
153
+ protoOf(CardIndexComparator).q2k = function (a, b) {
154
+ return a.r2k_1 - b.r2k_1 | 0;
155
+ };
156
+ protoOf(CardIndexComparator).compare = function (a, b) {
157
+ var tmp = a instanceof GameCard ? a : THROW_CCE();
158
+ return this.q2k(tmp, b instanceof GameCard ? b : THROW_CCE());
159
+ };
160
+ var CardIndexComparator_instance;
161
+ function CardIndexComparator_getInstance() {
162
+ return CardIndexComparator_instance;
163
+ }
164
+ function byCardNamePredicate(types) {
165
+ return byCardNamePredicate$lambda(types);
166
+ }
167
+ function distributeCardsBottom(_this__u8e3s4, count) {
168
+ var cardsToDeal = toList(take(_this__u8e3s4, count));
169
+ _this__u8e3s4.a1(cardsToDeal);
170
+ return cardsToDeal;
171
+ }
172
+ function distributeCardsTop(_this__u8e3s4, count) {
173
+ var cardsToDeal = toList(takeLast(_this__u8e3s4, count));
174
+ _this__u8e3s4.a1(cardsToDeal);
175
+ return cardsToDeal;
176
+ }
177
+ function byCardNamePredicate$lambda($types) {
178
+ return function (p1) {
179
+ var tmp$ret$1;
180
+ $l$block: {
181
+ // Inline function 'kotlin.collections.any' call
182
+ var indexedObject = $types;
183
+ var inductionVariable = 0;
184
+ var last = indexedObject.length;
185
+ while (inductionVariable < last) {
186
+ var element = indexedObject[inductionVariable];
187
+ inductionVariable = inductionVariable + 1 | 0;
188
+ // Inline function 'io.raspberryapps.card_game.core.data.models.cards.byCardNamePredicate.<anonymous>.<anonymous>' call
189
+ if (p1.i9().equals(element)) {
190
+ tmp$ret$1 = true;
191
+ break $l$block;
192
+ }
193
+ }
194
+ tmp$ret$1 = false;
195
+ }
196
+ return tmp$ret$1;
197
+ };
198
+ }
199
+ var CardName_ACE_instance;
200
+ var CardName_KING_instance;
201
+ var CardName_DAME_instance;
202
+ var CardName_JACK_instance;
203
+ var CardName_TEN_instance;
204
+ var CardName_NINE_instance;
205
+ var CardName_EIGHT_instance;
206
+ var CardName_SEVEN_instance;
207
+ var CardName_SIX_instance;
208
+ var CardName_FIVE_instance;
209
+ var CardName_FOUR_instance;
210
+ var CardName_TREE_instance;
211
+ var CardName_TWO_instance;
212
+ var CardName_STUB_instance;
213
+ function getShortName($this) {
214
+ var tmp;
215
+ switch ($this.i8_1) {
216
+ case 0:
217
+ tmp = 'A';
218
+ break;
219
+ case 1:
220
+ tmp = 'K';
221
+ break;
222
+ case 2:
223
+ tmp = 'D';
224
+ break;
225
+ case 3:
226
+ tmp = 'J';
227
+ break;
228
+ case 4:
229
+ tmp = '10';
230
+ break;
231
+ case 5:
232
+ tmp = '9';
233
+ break;
234
+ case 6:
235
+ tmp = '8';
236
+ break;
237
+ case 7:
238
+ tmp = '7';
239
+ break;
240
+ case 8:
241
+ tmp = '6';
242
+ break;
243
+ case 9:
244
+ tmp = '5';
245
+ break;
246
+ case 10:
247
+ tmp = '4';
248
+ break;
249
+ case 11:
250
+ tmp = '3';
251
+ break;
252
+ case 12:
253
+ tmp = '2';
254
+ break;
255
+ case 13:
256
+ tmp = 'STUB';
257
+ break;
258
+ default:
259
+ noWhenBranchMatchedException();
260
+ break;
261
+ }
262
+ return tmp;
263
+ }
264
+ var CardName_entriesInitialized;
265
+ function CardName_initEntries() {
266
+ if (CardName_entriesInitialized)
267
+ return Unit_instance;
268
+ CardName_entriesInitialized = true;
269
+ CardName_ACE_instance = new CardName('ACE', 0);
270
+ CardName_KING_instance = new CardName('KING', 1);
271
+ CardName_DAME_instance = new CardName('DAME', 2);
272
+ CardName_JACK_instance = new CardName('JACK', 3);
273
+ CardName_TEN_instance = new CardName('TEN', 4);
274
+ CardName_NINE_instance = new CardName('NINE', 5);
275
+ CardName_EIGHT_instance = new CardName('EIGHT', 6);
276
+ CardName_SEVEN_instance = new CardName('SEVEN', 7);
277
+ CardName_SIX_instance = new CardName('SIX', 8);
278
+ CardName_FIVE_instance = new CardName('FIVE', 9);
279
+ CardName_FOUR_instance = new CardName('FOUR', 10);
280
+ CardName_TREE_instance = new CardName('TREE', 11);
281
+ CardName_TWO_instance = new CardName('TWO', 12);
282
+ CardName_STUB_instance = new CardName('STUB', 13);
283
+ }
284
+ function Companion() {
285
+ }
286
+ protoOf(Companion).t2k = function (suit, cardNumber) {
287
+ return new GameCard(getNumber(Companion_instance_0, cardNumber, suit));
288
+ };
289
+ protoOf(Companion).u2k = function (position, playerIndex, previousStubCardWithMaxIndex, reverse) {
290
+ var tmp;
291
+ if (previousStubCardWithMaxIndex == null) {
292
+ tmp = null;
293
+ } else {
294
+ // Inline function 'kotlin.takeIf' call
295
+ // Inline function 'kotlin.contracts.contract' call
296
+ var tmp_0;
297
+ // Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
298
+ if (previousStubCardWithMaxIndex.v2k()) {
299
+ tmp_0 = previousStubCardWithMaxIndex;
300
+ } else {
301
+ tmp_0 = null;
302
+ }
303
+ tmp = tmp_0;
304
+ }
305
+ var tmp1_safe_receiver = tmp;
306
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r2k_1;
307
+ var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : Companion_instance_0.a2l(tmp2_safe_receiver, playerIndex, reverse);
308
+ var tmp_1;
309
+ if (tmp3_safe_receiver == null) {
310
+ tmp_1 = null;
311
+ } else {
312
+ // Inline function 'kotlin.let' call
313
+ // Inline function 'kotlin.contracts.contract' call
314
+ // Inline function 'io.raspberryapps.card_game.core.data.models.cards.Companion.createUniqueStub.<anonymous>' call
315
+ tmp_1 = tmp3_safe_receiver + 1 | 0;
316
+ }
317
+ var tmp4_elvis_lhs = tmp_1;
318
+ var previousGameCardIndex = tmp4_elvis_lhs == null ? 0 : tmp4_elvis_lhs;
319
+ var tmp_2;
320
+ if (reverse) {
321
+ tmp_2 = ((53 + imul(playerIndex, 14) | 0) - position | 0) - previousGameCardIndex | 0;
322
+ } else {
323
+ tmp_2 = ((53 + imul(playerIndex, 13) | 0) + position | 0) + previousGameCardIndex | 0;
324
+ }
325
+ var index = tmp_2;
326
+ return new GameCard(index);
327
+ };
328
+ protoOf(Companion).b2l = function (position, playerIndex, previousStubCardWithMaxIndex, reverse, $super) {
329
+ previousStubCardWithMaxIndex = previousStubCardWithMaxIndex === VOID ? null : previousStubCardWithMaxIndex;
330
+ reverse = reverse === VOID ? false : reverse;
331
+ return $super === VOID ? this.u2k(position, playerIndex, previousStubCardWithMaxIndex, reverse) : $super.u2k.call(this, position, playerIndex, previousStubCardWithMaxIndex, reverse);
332
+ };
333
+ var Companion_instance;
334
+ function Companion_getInstance() {
335
+ return Companion_instance;
336
+ }
337
+ function getNumber($this, cardNumber, suit) {
338
+ return imul(getIndex(suit), 13) + getCardNumber($this, cardNumber) | 0;
339
+ }
340
+ function getCardNumber($this, number) {
341
+ var tmp;
342
+ switch (number.i8_1) {
343
+ case 12:
344
+ tmp = 0;
345
+ break;
346
+ case 11:
347
+ tmp = 1;
348
+ break;
349
+ case 10:
350
+ tmp = 2;
351
+ break;
352
+ case 9:
353
+ tmp = 3;
354
+ break;
355
+ case 8:
356
+ tmp = 4;
357
+ break;
358
+ case 7:
359
+ tmp = 5;
360
+ break;
361
+ case 6:
362
+ tmp = 6;
363
+ break;
364
+ case 5:
365
+ tmp = 7;
366
+ break;
367
+ case 4:
368
+ tmp = 8;
369
+ break;
370
+ case 3:
371
+ tmp = 9;
372
+ break;
373
+ case 2:
374
+ tmp = 10;
375
+ break;
376
+ case 1:
377
+ tmp = 11;
378
+ break;
379
+ case 0:
380
+ tmp = 12;
381
+ break;
382
+ default:
383
+ throw IllegalStateException_init_$Create$('Invalid CardNumber ' + number);
384
+ }
385
+ return tmp;
386
+ }
387
+ function getName($this, number) {
388
+ var tmp;
389
+ switch (number) {
390
+ case 0:
391
+ tmp = CardName_TWO_getInstance();
392
+ break;
393
+ case 1:
394
+ tmp = CardName_TREE_getInstance();
395
+ break;
396
+ case 2:
397
+ tmp = CardName_FOUR_getInstance();
398
+ break;
399
+ case 3:
400
+ tmp = CardName_FIVE_getInstance();
401
+ break;
402
+ case 4:
403
+ tmp = CardName_SIX_getInstance();
404
+ break;
405
+ case 5:
406
+ tmp = CardName_SEVEN_getInstance();
407
+ break;
408
+ case 6:
409
+ tmp = CardName_EIGHT_getInstance();
410
+ break;
411
+ case 7:
412
+ tmp = CardName_NINE_getInstance();
413
+ break;
414
+ case 8:
415
+ tmp = CardName_TEN_getInstance();
416
+ break;
417
+ case 9:
418
+ tmp = CardName_JACK_getInstance();
419
+ break;
420
+ case 10:
421
+ tmp = CardName_DAME_getInstance();
422
+ break;
423
+ case 11:
424
+ tmp = CardName_KING_getInstance();
425
+ break;
426
+ case 12:
427
+ tmp = CardName_ACE_getInstance();
428
+ break;
429
+ default:
430
+ throw IllegalStateException_init_$Create$('Invalid index name in Card.getName() ' + number);
431
+ }
432
+ return tmp;
433
+ }
434
+ function _get_isShirt__vd98rp($this) {
435
+ return $this.r2k_1 === 52;
436
+ }
437
+ function CardName(name, ordinal) {
438
+ Enum.call(this, name, ordinal);
439
+ }
440
+ protoOf(CardName).toString = function () {
441
+ return getShortName(this);
442
+ };
443
+ function Companion_0() {
444
+ this.w2k_1 = -1;
445
+ this.x2k_1 = 13;
446
+ this.y2k_1 = 52;
447
+ this.z2k_1 = 53;
448
+ }
449
+ protoOf(Companion_0).a2l = function (_this__u8e3s4, playerIndex, reverse) {
450
+ var tmp;
451
+ if (reverse) {
452
+ tmp = _this__u8e3s4 + (53 + imul(playerIndex, 14) | 0) | 0;
453
+ } else {
454
+ tmp = _this__u8e3s4 - (53 + imul(playerIndex, 13) | 0) | 0;
455
+ }
456
+ return tmp;
457
+ };
458
+ var Companion_instance_0;
459
+ function Companion_getInstance_0() {
460
+ return Companion_instance_0;
461
+ }
462
+ function CardName_ACE_getInstance() {
463
+ CardName_initEntries();
464
+ return CardName_ACE_instance;
465
+ }
466
+ function CardName_KING_getInstance() {
467
+ CardName_initEntries();
468
+ return CardName_KING_instance;
469
+ }
470
+ function CardName_DAME_getInstance() {
471
+ CardName_initEntries();
472
+ return CardName_DAME_instance;
473
+ }
474
+ function CardName_JACK_getInstance() {
475
+ CardName_initEntries();
476
+ return CardName_JACK_instance;
477
+ }
478
+ function CardName_TEN_getInstance() {
479
+ CardName_initEntries();
480
+ return CardName_TEN_instance;
481
+ }
482
+ function CardName_NINE_getInstance() {
483
+ CardName_initEntries();
484
+ return CardName_NINE_instance;
485
+ }
486
+ function CardName_EIGHT_getInstance() {
487
+ CardName_initEntries();
488
+ return CardName_EIGHT_instance;
489
+ }
490
+ function CardName_SEVEN_getInstance() {
491
+ CardName_initEntries();
492
+ return CardName_SEVEN_instance;
493
+ }
494
+ function CardName_SIX_getInstance() {
495
+ CardName_initEntries();
496
+ return CardName_SIX_instance;
497
+ }
498
+ function CardName_FIVE_getInstance() {
499
+ CardName_initEntries();
500
+ return CardName_FIVE_instance;
501
+ }
502
+ function CardName_FOUR_getInstance() {
503
+ CardName_initEntries();
504
+ return CardName_FOUR_instance;
505
+ }
506
+ function CardName_TREE_getInstance() {
507
+ CardName_initEntries();
508
+ return CardName_TREE_instance;
509
+ }
510
+ function CardName_TWO_getInstance() {
511
+ CardName_initEntries();
512
+ return CardName_TWO_instance;
513
+ }
514
+ function CardName_STUB_getInstance() {
515
+ CardName_initEntries();
516
+ return CardName_STUB_instance;
517
+ }
518
+ function GameCard(index) {
519
+ this.r2k_1 = index;
520
+ }
521
+ protoOf(GameCard).c2l = function () {
522
+ var tmp;
523
+ var containsArg = this.r2k_1;
524
+ if (0 <= containsArg ? containsArg <= 13 : false) {
525
+ tmp = Suit_DIAMOND_getInstance();
526
+ } else {
527
+ if (this.r2k_1 <= 26) {
528
+ tmp = Suit_SPADE_getInstance();
529
+ } else {
530
+ if (this.r2k_1 <= 39) {
531
+ tmp = Suit_HEART_getInstance();
532
+ } else {
533
+ if (this.r2k_1 <= 52) {
534
+ tmp = Suit_CLUB_getInstance();
535
+ } else {
536
+ throw IllegalStateException_init_$Create$('Invalid suitCard in Card.getValue() ' + this.r2k_1);
537
+ }
538
+ }
539
+ }
540
+ }
541
+ return tmp;
542
+ };
543
+ protoOf(GameCard).s2k = function () {
544
+ var tmp;
545
+ if (this.v2k()) {
546
+ tmp = -1;
547
+ } else {
548
+ tmp = this.r2k_1 - imul(13, getIndex(this.c2l())) | 0;
549
+ }
550
+ return tmp;
551
+ };
552
+ protoOf(GameCard).i9 = function () {
553
+ return this.v2k() ? CardName_STUB_getInstance() : getName(Companion_instance_0, this.s2k());
554
+ };
555
+ protoOf(GameCard).d2l = function () {
556
+ return !_get_isShirt__vd98rp(this) ? !this.v2k() : false;
557
+ };
558
+ protoOf(GameCard).v2k = function () {
559
+ return this.r2k_1 >= 53;
560
+ };
561
+ protoOf(GameCard).toString = function () {
562
+ if (_get_isShirt__vd98rp(this)) {
563
+ return 'GameCard(SHIRT)';
564
+ }
565
+ if (this.v2k()) {
566
+ return 'GameCard(STUB, ' + this.r2k_1 + ')';
567
+ }
568
+ return 'GameCard(' + this.c2l() + this.i9() + ', ' + this.r2k_1 + ')';
569
+ };
570
+ protoOf(GameCard).hashCode = function () {
571
+ return this.r2k_1;
572
+ };
573
+ protoOf(GameCard).equals = function (other) {
574
+ if (this === other)
575
+ return true;
576
+ if (!(other instanceof GameCard))
577
+ return false;
578
+ var tmp0_other_with_cast = other instanceof GameCard ? other : THROW_CCE();
579
+ if (!(this.r2k_1 === tmp0_other_with_cast.r2k_1))
580
+ return false;
581
+ return true;
582
+ };
583
+ function _get_$cachedSerializer__te6jhj($this) {
584
+ return $this.e2l_1.o2();
585
+ }
586
+ function Suit$Companion$_anonymous__cbm2iq() {
587
+ return createSimpleEnumSerializer('io.raspberryapps.card_game.core.data.models.cards.Suit', values());
588
+ }
589
+ var Suit_DIAMOND_instance;
590
+ var Suit_SPADE_instance;
591
+ var Suit_HEART_instance;
592
+ var Suit_CLUB_instance;
593
+ function getSuitEmoji($this) {
594
+ var tmp;
595
+ switch ($this.i8_1) {
596
+ case 0:
597
+ tmp = '\u2666\uFE0F';
598
+ break;
599
+ case 1:
600
+ tmp = '\u2660\uFE0F';
601
+ break;
602
+ case 2:
603
+ tmp = '\u2663\uFE0F\uFE0F';
604
+ break;
605
+ case 3:
606
+ tmp = '\u2665\uFE0F';
607
+ break;
608
+ default:
609
+ noWhenBranchMatchedException();
610
+ break;
611
+ }
612
+ return tmp;
613
+ }
614
+ function Companion_1() {
615
+ Companion_instance_1 = this;
616
+ var tmp = this;
617
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
618
+ tmp.e2l_1 = lazy(tmp_0, Suit$Companion$_anonymous__cbm2iq);
619
+ }
620
+ protoOf(Companion_1).i21 = function () {
621
+ return _get_$cachedSerializer__te6jhj(this);
622
+ };
623
+ protoOf(Companion_1).a1q = function (typeParamsSerializers) {
624
+ return this.i21();
625
+ };
626
+ var Companion_instance_1;
627
+ function Companion_getInstance_1() {
628
+ Suit_initEntries();
629
+ if (Companion_instance_1 == null)
630
+ new Companion_1();
631
+ return Companion_instance_1;
632
+ }
633
+ function values() {
634
+ return [Suit_DIAMOND_getInstance(), Suit_SPADE_getInstance(), Suit_HEART_getInstance(), Suit_CLUB_getInstance()];
635
+ }
636
+ function get_entries() {
637
+ if ($ENTRIES == null)
638
+ $ENTRIES = enumEntries(values());
639
+ return $ENTRIES;
640
+ }
641
+ var Suit_entriesInitialized;
642
+ function Suit_initEntries() {
643
+ if (Suit_entriesInitialized)
644
+ return Unit_instance;
645
+ Suit_entriesInitialized = true;
646
+ Suit_DIAMOND_instance = new Suit('DIAMOND', 0);
647
+ Suit_SPADE_instance = new Suit('SPADE', 1);
648
+ Suit_HEART_instance = new Suit('HEART', 2);
649
+ Suit_CLUB_instance = new Suit('CLUB', 3);
650
+ Companion_getInstance_1();
651
+ }
652
+ var $ENTRIES;
653
+ function Suit(name, ordinal) {
654
+ Enum.call(this, name, ordinal);
655
+ }
656
+ protoOf(Suit).toString = function () {
657
+ return getSuitEmoji(this);
658
+ };
659
+ function Suit_DIAMOND_getInstance() {
660
+ Suit_initEntries();
661
+ return Suit_DIAMOND_instance;
662
+ }
663
+ function Suit_SPADE_getInstance() {
664
+ Suit_initEntries();
665
+ return Suit_SPADE_instance;
666
+ }
667
+ function Suit_HEART_getInstance() {
668
+ Suit_initEntries();
669
+ return Suit_HEART_instance;
670
+ }
671
+ function Suit_CLUB_getInstance() {
672
+ Suit_initEntries();
673
+ return Suit_CLUB_instance;
674
+ }
675
+ function getIndex(_this__u8e3s4) {
676
+ var tmp;
677
+ switch (_this__u8e3s4.i8_1) {
678
+ case 0:
679
+ tmp = 0;
680
+ break;
681
+ case 1:
682
+ tmp = 1;
683
+ break;
684
+ case 2:
685
+ tmp = 2;
686
+ break;
687
+ case 3:
688
+ tmp = 3;
689
+ break;
690
+ default:
691
+ noWhenBranchMatchedException();
692
+ break;
693
+ }
694
+ return tmp;
695
+ }
696
+ function CardsDealerProvider() {
697
+ }
698
+ function CombinationsCheckerProvider() {
699
+ }
700
+ function createCombination($this, cards, supportedCombinations) {
701
+ var size = cards.n();
702
+ if (supportedCombinations.r(size)) {
703
+ return cards;
704
+ }
705
+ var fromLongestCombinations = asReversed(sorted(supportedCombinations));
706
+ var tmp$ret$1;
707
+ $l$block: {
708
+ // Inline function 'kotlin.collections.first' call
709
+ var tmp0_iterator = fromLongestCombinations.v();
710
+ while (tmp0_iterator.w()) {
711
+ var element = tmp0_iterator.y();
712
+ // Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombination.<anonymous>' call
713
+ if (element <= size) {
714
+ tmp$ret$1 = element;
715
+ break $l$block;
716
+ }
717
+ }
718
+ throw NoSuchElementException_init_$Create$('Collection contains no element matching the predicate.');
719
+ }
720
+ var longestCombinationSupport = tmp$ret$1;
721
+ return takeLast(cards, longestCombinationSupport);
722
+ }
723
+ function CombinationsCheckerProviderImpl() {
724
+ }
725
+ protoOf(CombinationsCheckerProviderImpl).j2l = function (cards, supportedCombinations, checkFromIndex, includeCardNames, suit) {
726
+ // Inline function 'kotlin.collections.filter' call
727
+ // Inline function 'kotlin.collections.filterTo' call
728
+ var this_0 = sortedWith(cards, CardIndexComparator_instance);
729
+ var destination = ArrayList_init_$Create$();
730
+ var tmp0_iterator = this_0.v();
731
+ while (tmp0_iterator.w()) {
732
+ var element = tmp0_iterator.y();
733
+ // Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.findCardsInRowCombinations.<anonymous>' call
734
+ if (element.d2l()) {
735
+ destination.s(element);
736
+ }
737
+ }
738
+ var sortedCards = toList(destination);
739
+ // Inline function 'kotlin.collections.mutableListOf' call
740
+ var combinations = ArrayList_init_$Create$();
741
+ // Inline function 'kotlin.collections.mutableListOf' call
742
+ var combinationCards = ArrayList_init_$Create$();
743
+ var inductionVariable = 0;
744
+ var last = sortedCards.n() - 1 | 0;
745
+ if (inductionVariable <= last)
746
+ do {
747
+ var i = inductionVariable;
748
+ inductionVariable = inductionVariable + 1 | 0;
749
+ var previousCard = lastOrNull(combinationCards);
750
+ var currentCard = sortedCards.g1(i);
751
+ var isNextInRow = (!(previousCard == null) ? currentCard.r2k_1 === (previousCard.r2k_1 + 1 | 0) : false) ? currentCard.c2l().equals(previousCard.c2l()) : false;
752
+ var passedCardNamesCheck = includeCardNames == null ? true : includeCardNames.r(currentCard.i9());
753
+ var passedSuitCheck = suit == null ? true : currentCard.c2l().equals(suit);
754
+ if ((isNextInRow ? passedSuitCheck : false) ? passedCardNamesCheck : false) {
755
+ combinationCards.s(currentCard);
756
+ } else {
757
+ if (combinationCards.n() > (checkFromIndex - 1 | 0)) {
758
+ combinations.z(this.l2l(toMutableList(combinationCards), supportedCombinations));
759
+ }
760
+ combinationCards.x1();
761
+ if (passedSuitCheck ? passedCardNamesCheck : false) {
762
+ combinationCards.s(currentCard);
763
+ }
764
+ }
765
+ }
766
+ while (inductionVariable <= last);
767
+ if (combinationCards.n() > 2) {
768
+ combinations.z(this.l2l(toMutableList(combinationCards), supportedCombinations));
769
+ }
770
+ return combinations;
771
+ };
772
+ protoOf(CombinationsCheckerProviderImpl).l2l = function (cards, supportedCombinations) {
773
+ // Inline function 'kotlin.collections.minOf' call
774
+ var iterator = supportedCombinations.v();
775
+ if (!iterator.w())
776
+ throw NoSuchElementException_init_$Create$_0();
777
+ // Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
778
+ var minValue = iterator.y();
779
+ while (iterator.w()) {
780
+ // Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
781
+ var v = iterator.y();
782
+ if (compareTo(minValue, v) > 0) {
783
+ minValue = v;
784
+ }
785
+ }
786
+ var shortestCombinationSupport = minValue;
787
+ var cardsToCheck = cards;
788
+ // Inline function 'kotlin.collections.mutableListOf' call
789
+ var combinations = ArrayList_init_$Create$();
790
+ while (cardsToCheck.n() >= shortestCombinationSupport) {
791
+ var combinationCards = createCombination(this, cardsToCheck, supportedCombinations);
792
+ combinations.s(combinationCards);
793
+ // Inline function 'kotlin.apply' call
794
+ var this_0 = toMutableList(cardsToCheck);
795
+ // Inline function 'kotlin.contracts.contract' call
796
+ // Inline function 'io.raspberryapps.card_game.core.data.providers.combinations.CombinationsCheckerProviderImpl.createCombinationsFromCardsInRow.<anonymous>' call
797
+ this_0.a1(combinationCards);
798
+ cardsToCheck = this_0;
799
+ }
800
+ return combinations;
801
+ };
802
+ function DealerReducerImpl(logger, enableLogs) {
803
+ this.m2l_1 = logger;
804
+ this.n2l_1 = enableLogs;
805
+ }
806
+ protoOf(DealerReducerImpl).o2l = function (cards, cardsToRemove) {
807
+ var list = cards;
808
+ var tmp0_iterator = cardsToRemove.v();
809
+ while (tmp0_iterator.w()) {
810
+ var gameCard = tmp0_iterator.y();
811
+ list = this.p2l(list, gameCard);
812
+ }
813
+ return list;
814
+ };
815
+ protoOf(DealerReducerImpl).p2l = function (cards, cardToRemove) {
816
+ var tmp;
817
+ if (!cardToRemove.v2k() ? cards.r(cardToRemove) : false) {
818
+ if (this.n2l_1) {
819
+ this.m2l_1.d('Dealer', 'Card removed: ' + cardToRemove + ', size: ' + (cards.n() - 1 | 0));
820
+ }
821
+ tmp = minus(cards, cardToRemove);
822
+ } else {
823
+ if (this.n2l_1) {
824
+ this.m2l_1.d('Dealer', 'Card removed as stub: ' + cardToRemove + ', size: ' + (cards.n() - 1 | 0));
825
+ }
826
+ // Inline function 'kotlin.collections.filterNot' call
827
+ // Inline function 'kotlin.collections.filterNotTo' call
828
+ var destination = ArrayList_init_$Create$();
829
+ var tmp0_iterator = cards.v();
830
+ while (tmp0_iterator.w()) {
831
+ var element = tmp0_iterator.y();
832
+ // Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
833
+ if (!element.v2k()) {
834
+ destination.s(element);
835
+ }
836
+ }
837
+ var notStubCards = destination;
838
+ // Inline function 'kotlin.collections.filter' call
839
+ // Inline function 'kotlin.collections.filterTo' call
840
+ var destination_0 = ArrayList_init_$Create$();
841
+ var tmp0_iterator_0 = cards.v();
842
+ while (tmp0_iterator_0.w()) {
843
+ var element_0 = tmp0_iterator_0.y();
844
+ // Inline function 'io.raspberryapps.card_game.core.domain.dealer.DealerReducerImpl.removeCard.<anonymous>' call
845
+ if (element_0.v2k()) {
846
+ destination_0.s(element_0);
847
+ }
848
+ }
849
+ var stubCards = destination_0;
850
+ if (stubCards.c1()) {
851
+ this.m2l_1.w('Dealer', "Can't find card to delete for player, " + ('cards:' + cards + ', ') + ('cardToRemove: ' + cardToRemove));
852
+ }
853
+ tmp = plus(notStubCards, dropLast(stubCards, 1));
854
+ }
855
+ return tmp;
856
+ };
857
+ protoOf(DealerReducerImpl).q2l = function (cards, cardToAdd) {
858
+ if (this.n2l_1) {
859
+ this.m2l_1.d('Dealer', 'Card added: ' + cardToAdd + ', size: ' + (cards.n() + 1 | 0));
860
+ }
861
+ if (cards.r(cardToAdd)) {
862
+ this.m2l_1.w('Dealer', 'Card already exists for player, ' + ('cards:' + cards + ', ') + ('cardToAdd: ' + cardToAdd));
863
+ }
864
+ return plus_0(cards, cardToAdd);
865
+ };
866
+ function Companion_2() {
867
+ this.r2l_1 = 'Dealer';
868
+ }
869
+ var Companion_instance_2;
870
+ function Companion_getInstance_2() {
871
+ return Companion_instance_2;
872
+ }
873
+ function DealerReducer() {
874
+ }
875
+ function Companion_3() {
876
+ }
877
+ protoOf(Companion_3).s2l = function () {
878
+ return new CombinedRaspberryLogger(mutableListOf([new PlatformRaspberryLogger()]));
879
+ };
880
+ protoOf(Companion_3).g1n = function () {
881
+ // Inline function 'kotlin.collections.mutableListOf' call
882
+ var tmp$ret$0 = ArrayList_init_$Create$();
883
+ return new CombinedRaspberryLogger(tmp$ret$0);
884
+ };
885
+ var Companion_instance_3;
886
+ function Companion_getInstance_3() {
887
+ return Companion_instance_3;
888
+ }
889
+ function CombinedRaspberryLogger(logOutputs) {
890
+ this.t2l_1 = logOutputs;
891
+ }
892
+ protoOf(CombinedRaspberryLogger).u2l = function (output) {
893
+ this.t2l_1.s(output);
894
+ };
895
+ protoOf(CombinedRaspberryLogger).v2l = function (tag, message, payload) {
896
+ // Inline function 'kotlin.collections.forEach' call
897
+ var tmp0_iterator = this.t2l_1.v();
898
+ while (tmp0_iterator.w()) {
899
+ var element = tmp0_iterator.y();
900
+ // Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.d.<anonymous>' call
901
+ element.d(tag, message, payload);
902
+ }
903
+ };
904
+ protoOf(CombinedRaspberryLogger).w2l = function (tag, message, exception, payload) {
905
+ // Inline function 'kotlin.collections.forEach' call
906
+ var tmp0_iterator = this.t2l_1.v();
907
+ while (tmp0_iterator.w()) {
908
+ var element = tmp0_iterator.y();
909
+ // Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.e.<anonymous>' call
910
+ element.e(tag, message, exception, payload);
911
+ }
912
+ };
913
+ protoOf(CombinedRaspberryLogger).x2l = function (tag, message, payload) {
914
+ // Inline function 'kotlin.collections.forEach' call
915
+ var tmp0_iterator = this.t2l_1.v();
916
+ while (tmp0_iterator.w()) {
917
+ var element = tmp0_iterator.y();
918
+ // Inline function 'io.raspberryapps.card_game.core.utils.logger.CombinedRaspberryLogger.w.<anonymous>' call
919
+ element.w(tag, message, payload);
920
+ }
921
+ };
922
+ function LoggerEnabledTrigger() {
923
+ }
924
+ function LoggerPayload() {
925
+ }
926
+ function PlatformRaspberryLogger(enabled) {
927
+ enabled = enabled === VOID ? true : enabled;
928
+ this.a2m_1 = enabled;
929
+ }
930
+ protoOf(PlatformRaspberryLogger).y2l = function (_set____db54di) {
931
+ this.a2m_1 = _set____db54di;
932
+ };
933
+ protoOf(PlatformRaspberryLogger).z2l = function () {
934
+ return this.a2m_1;
935
+ };
936
+ protoOf(PlatformRaspberryLogger).v2l = function (tag, message, payload) {
937
+ if (!this.a2m_1)
938
+ return Unit_instance;
939
+ Logger_getInstance().e2m(tag, message);
940
+ };
941
+ protoOf(PlatformRaspberryLogger).w2l = function (tag, message, exception, payload) {
942
+ if (!this.a2m_1)
943
+ return Unit_instance;
944
+ Logger_getInstance().f2m(tag, message, exception);
945
+ };
946
+ protoOf(PlatformRaspberryLogger).x2l = function (tag, message, payload) {
947
+ if (!this.a2m_1)
948
+ return Unit_instance;
949
+ Logger_getInstance().g2m(tag, message);
950
+ };
951
+ function RaspberryLogger() {
952
+ }
953
+ function LoggerOutput() {
954
+ }
955
+ var Category_LIFECYCLE_instance;
956
+ var Category_NONE_instance;
957
+ var Category_entriesInitialized;
958
+ function Category_initEntries() {
959
+ if (Category_entriesInitialized)
960
+ return Unit_instance;
961
+ Category_entriesInitialized = true;
962
+ Category_LIFECYCLE_instance = new Category('LIFECYCLE', 0, true);
963
+ Category_NONE_instance = new Category('NONE', 1, true);
964
+ }
965
+ function generateTag($this, tag) {
966
+ return (!($this.d2m_1 == null) ? !(tag == null) : false) ? '' + $this.d2m_1 + ':' + tag : tag;
967
+ }
968
+ function Category(name, ordinal, isEnabled) {
969
+ Enum.call(this, name, ordinal);
970
+ this.j2m_1 = isEnabled;
971
+ }
972
+ function Logger$loggerSource$1() {
973
+ this.k2m_1 = new PlatformLogger();
974
+ }
975
+ protoOf(Logger$loggerSource$1).l2m = function (tag, msg) {
976
+ this.k2m_1.l2m(tag, msg);
977
+ };
978
+ protoOf(Logger$loggerSource$1).m2m = function (tag, msg, exception) {
979
+ this.k2m_1.m2m(tag, msg, exception);
980
+ };
981
+ protoOf(Logger$loggerSource$1).n2m = function (tag, msg) {
982
+ this.k2m_1.n2m(tag, msg);
983
+ };
984
+ function Category_NONE_getInstance() {
985
+ Category_initEntries();
986
+ return Category_NONE_instance;
987
+ }
988
+ function Logger() {
989
+ Logger_instance = this;
990
+ var tmp = this;
991
+ tmp.b2m_1 = new Logger$loggerSource$1();
992
+ this.c2m_1 = true;
993
+ this.d2m_1 = null;
994
+ }
995
+ protoOf(Logger).e2m = function (tag, message) {
996
+ this.o2m(tag, message, Category_NONE_getInstance());
997
+ };
998
+ protoOf(Logger).p2m = function (tag, message, category) {
999
+ if (this.c2m_1 ? category.j2m_1 : false) {
1000
+ this.b2m_1.n2m(generateTag(this, tag), message);
1001
+ }
1002
+ };
1003
+ protoOf(Logger).g2m = function (tag, message, category, $super) {
1004
+ tag = tag === VOID ? null : tag;
1005
+ category = category === VOID ? Category_NONE_getInstance() : category;
1006
+ var tmp;
1007
+ if ($super === VOID) {
1008
+ this.p2m(tag, message, category);
1009
+ tmp = Unit_instance;
1010
+ } else {
1011
+ tmp = $super.p2m.call(this, tag, message, category);
1012
+ }
1013
+ return tmp;
1014
+ };
1015
+ protoOf(Logger).o2m = function (tag, message, category) {
1016
+ if (this.c2m_1 ? category.j2m_1 : false) {
1017
+ this.b2m_1.l2m(generateTag(this, tag), message);
1018
+ }
1019
+ };
1020
+ protoOf(Logger).q2m = function (tag, message, exception, category) {
1021
+ if (this.c2m_1 ? category.j2m_1 : false) {
1022
+ if (exception == null)
1023
+ null;
1024
+ else {
1025
+ printStackTrace(exception);
1026
+ }
1027
+ this.b2m_1.m2m(generateTag(this, tag), generateMsg(message, exception), exception);
1028
+ }
1029
+ };
1030
+ protoOf(Logger).f2m = function (tag, message, exception, category, $super) {
1031
+ tag = tag === VOID ? null : tag;
1032
+ message = message === VOID ? null : message;
1033
+ exception = exception === VOID ? null : exception;
1034
+ category = category === VOID ? Category_NONE_getInstance() : category;
1035
+ var tmp;
1036
+ if ($super === VOID) {
1037
+ this.q2m(tag, message, exception, category);
1038
+ tmp = Unit_instance;
1039
+ } else {
1040
+ tmp = $super.q2m.call(this, tag, message, exception, category);
1041
+ }
1042
+ return tmp;
1043
+ };
1044
+ var Logger_instance;
1045
+ function Logger_getInstance() {
1046
+ if (Logger_instance == null)
1047
+ new Logger();
1048
+ return Logger_instance;
1049
+ }
1050
+ function generateMsg(msg, exception) {
1051
+ var logMessage = '';
1052
+ // Inline function 'kotlin.text.isNullOrBlank' call
1053
+ // Inline function 'kotlin.contracts.contract' call
1054
+ if (!(msg == null ? true : isBlank(msg))) {
1055
+ logMessage = logMessage + msg;
1056
+ }
1057
+ if (!(exception == null)) {
1058
+ var tmp = logMessage;
1059
+ // Inline function 'kotlin.text.orEmpty' call
1060
+ var tmp0_elvis_lhs = exception.message;
1061
+ logMessage = tmp + (' Exception: ' + (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ', stackTrace: ' + stackTraceToString(exception));
1062
+ }
1063
+ if (isBlank(logMessage)) {
1064
+ logMessage = 'Unknown error';
1065
+ }
1066
+ return logMessage;
1067
+ }
1068
+ function getLogTag(tag) {
1069
+ return tag == null ? '' : tag;
1070
+ }
1071
+ function PlatformLogger() {
1072
+ }
1073
+ protoOf(PlatformLogger).l2m = function (tag, msg) {
1074
+ console.log(getLogTag(tag) + ': ' + msg);
1075
+ };
1076
+ protoOf(PlatformLogger).m2m = function (tag, msg, exception) {
1077
+ if (!(exception == null)) {
1078
+ console.error(getLogTag(tag) + ': ' + msg + ', exception: ' + exception);
1079
+ } else {
1080
+ console.error(getLogTag(tag) + ': ' + msg);
1081
+ }
1082
+ };
1083
+ protoOf(PlatformLogger).n2m = function (tag, msg) {
1084
+ console.warn(getLogTag(tag) + ': ' + msg);
1085
+ };
1086
+ //region block: post-declaration
1087
+ protoOf(CombinationsCheckerProviderImpl).k2l = findCardsInRowCombinations$default;
1088
+ protoOf(CombinedRaspberryLogger).d = d;
1089
+ protoOf(CombinedRaspberryLogger).e = e;
1090
+ protoOf(CombinedRaspberryLogger).w = w;
1091
+ protoOf(PlatformRaspberryLogger).d = d;
1092
+ protoOf(PlatformRaspberryLogger).e = e;
1093
+ protoOf(PlatformRaspberryLogger).w = w;
1094
+ defineProp(protoOf(PlatformRaspberryLogger), 'enabled', function () {
1095
+ return this.z2l();
1096
+ }, function (value) {
1097
+ this.y2l(value);
1098
+ });
1099
+ //endregion
1100
+ //region block: init
1101
+ CoreConfig_instance = new CoreConfig();
1102
+ CardNumberComparator_instance = new CardNumberComparator();
1103
+ CardIndexComparator_instance = new CardIndexComparator();
1104
+ Companion_instance = new Companion();
1105
+ Companion_instance_0 = new Companion_0();
1106
+ Companion_instance_2 = new Companion_2();
1107
+ Companion_instance_3 = new Companion_3();
1108
+ //endregion
1109
+ //region block: exports
1110
+ function $jsExportAll$(_) {
1111
+ var $io = _.io || (_.io = {});
1112
+ var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
1113
+ var $io$raspberryapps$cardgame = $io$raspberryapps.cardgame || ($io$raspberryapps.cardgame = {});
1114
+ var $io$raspberryapps$cardgame$core = $io$raspberryapps$cardgame.core || ($io$raspberryapps$cardgame.core = {});
1115
+ defineProp($io$raspberryapps$cardgame$core, 'CoreConfig', CoreConfig_getInstance);
1116
+ var $io = _.io || (_.io = {});
1117
+ var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
1118
+ var $io$raspberryapps$card_game = $io$raspberryapps.card_game || ($io$raspberryapps.card_game = {});
1119
+ var $io$raspberryapps$card_game$core = $io$raspberryapps$card_game.core || ($io$raspberryapps$card_game.core = {});
1120
+ var $io$raspberryapps$card_game$core$utils = $io$raspberryapps$card_game$core.utils || ($io$raspberryapps$card_game$core.utils = {});
1121
+ var $io$raspberryapps$card_game$core$utils$logger = $io$raspberryapps$card_game$core$utils.logger || ($io$raspberryapps$card_game$core$utils.logger = {});
1122
+ var $io = _.io || (_.io = {});
1123
+ var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
1124
+ var $io$raspberryapps$card_game = $io$raspberryapps.card_game || ($io$raspberryapps.card_game = {});
1125
+ var $io$raspberryapps$card_game$core = $io$raspberryapps$card_game.core || ($io$raspberryapps$card_game.core = {});
1126
+ var $io$raspberryapps$card_game$core$utils = $io$raspberryapps$card_game$core.utils || ($io$raspberryapps$card_game$core.utils = {});
1127
+ var $io$raspberryapps$card_game$core$utils$logger = $io$raspberryapps$card_game$core$utils.logger || ($io$raspberryapps$card_game$core$utils.logger = {});
1128
+ var $io = _.io || (_.io = {});
1129
+ var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
1130
+ var $io$raspberryapps$card_game = $io$raspberryapps.card_game || ($io$raspberryapps.card_game = {});
1131
+ var $io$raspberryapps$card_game$core = $io$raspberryapps$card_game.core || ($io$raspberryapps$card_game.core = {});
1132
+ var $io$raspberryapps$card_game$core$utils = $io$raspberryapps$card_game$core.utils || ($io$raspberryapps$card_game$core.utils = {});
1133
+ var $io$raspberryapps$card_game$core$utils$logger = $io$raspberryapps$card_game$core$utils.logger || ($io$raspberryapps$card_game$core$utils.logger = {});
1134
+ var $io = _.io || (_.io = {});
1135
+ var $io$raspberryapps = $io.raspberryapps || ($io.raspberryapps = {});
1136
+ var $io$raspberryapps$card_game = $io$raspberryapps.card_game || ($io$raspberryapps.card_game = {});
1137
+ var $io$raspberryapps$card_game$core = $io$raspberryapps$card_game.core || ($io$raspberryapps$card_game.core = {});
1138
+ var $io$raspberryapps$card_game$core$utils = $io$raspberryapps$card_game$core.utils || ($io$raspberryapps$card_game$core.utils = {});
1139
+ var $io$raspberryapps$card_game$core$utils$logger = $io$raspberryapps$card_game$core$utils.logger || ($io$raspberryapps$card_game$core$utils.logger = {});
1140
+ var $io$raspberryapps$card_game$core$utils$logger$output = $io$raspberryapps$card_game$core$utils$logger.output || ($io$raspberryapps$card_game$core$utils$logger.output = {});
1141
+ }
1142
+ $jsExportAll$(_);
1143
+ _.$jsExportAll$ = $jsExportAll$;
1144
+ _.$_$ = _.$_$ || {};
1145
+ _.$_$.a = CardName_ACE_getInstance;
1146
+ _.$_$.b = CardName_DAME_getInstance;
1147
+ _.$_$.c = CardName_EIGHT_getInstance;
1148
+ _.$_$.d = CardName_JACK_getInstance;
1149
+ _.$_$.e = CardName_KING_getInstance;
1150
+ _.$_$.f = CardName_NINE_getInstance;
1151
+ _.$_$.g = CardName_SEVEN_getInstance;
1152
+ _.$_$.h = CardName_TEN_getInstance;
1153
+ _.$_$.i = d;
1154
+ _.$_$.j = e;
1155
+ _.$_$.k = w;
1156
+ _.$_$.l = CardIndexComparator_instance;
1157
+ _.$_$.m = CardNumberComparator_instance;
1158
+ _.$_$.n = Companion_instance;
1159
+ _.$_$.o = Companion_getInstance_1;
1160
+ _.$_$.p = Companion_instance_2;
1161
+ _.$_$.q = Logger_getInstance;
1162
+ _.$_$.r = Companion_instance_3;
1163
+ _.$_$.s = GameCard;
1164
+ _.$_$.t = get_entries;
1165
+ _.$_$.u = values;
1166
+ _.$_$.v = distributeCardsBottom;
1167
+ _.$_$.w = distributeCardsTop;
1168
+ _.$_$.x = filterByCardName;
1169
+ _.$_$.y = CardsDealerProvider;
1170
+ _.$_$.z = CombinationsCheckerProviderImpl;
1171
+ _.$_$.a1 = CombinationsCheckerProvider;
1172
+ _.$_$.b1 = DealerReducerImpl;
1173
+ _.$_$.c1 = DealerReducer;
1174
+ _.$_$.d1 = LoggerOutput;
1175
+ _.$_$.e1 = generateMsg;
1176
+ _.$_$.f1 = CombinedRaspberryLogger;
1177
+ _.$_$.g1 = LoggerEnabledTrigger;
1178
+ _.$_$.h1 = LoggerPayload;
1179
+ _.$_$.i1 = RaspberryLogger;
1180
+ //endregion
1181
+ return _;
1182
+ }));
1183
+
1184
+ //# sourceMappingURL=raspberry-cardgame-lib-core.js.map