@everymatrix/casino-search 1.1.6 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15180,11 +15180,11 @@
15180
15180
 
15181
15181
  function get_each_context(ctx, list, i) {
15182
15182
  const child_ctx = ctx.slice();
15183
- child_ctx[37] = list[i];
15183
+ child_ctx[45] = list[i];
15184
15184
  return child_ctx;
15185
15185
  }
15186
15186
 
15187
- // (223:4) {:else}
15187
+ // (267:4) {:else}
15188
15188
  function create_else_block(ctx) {
15189
15189
  let t0;
15190
15190
  let div;
@@ -15192,14 +15192,14 @@
15192
15192
  let div_class_value;
15193
15193
 
15194
15194
  function select_block_type_1(ctx, dirty) {
15195
- if (/*searchActive*/ ctx[11] == true && /*searchValue*/ ctx[6].length < 2) return create_if_block_3;
15196
- if (/*searchArray*/ ctx[9].length != 0) return create_if_block_5;
15195
+ if (/*searchActive*/ ctx[13] == true && /*searchValue*/ ctx[8].length < 2) return create_if_block_3;
15196
+ if (/*searchArray*/ ctx[11].length != 0) return create_if_block_5;
15197
15197
  }
15198
15198
 
15199
15199
  let current_block_type = select_block_type_1(ctx);
15200
15200
  let if_block0 = current_block_type && current_block_type(ctx);
15201
- let if_block1 = /*searchCancelled*/ ctx[7] === false && create_if_block_2(ctx);
15202
- let if_block2 = /*searchValue*/ ctx[6].length >= 2 && /*searchArray*/ ctx[9].length == 0 && create_if_block_1(ctx);
15201
+ let if_block1 = /*searchCancelled*/ ctx[9] === false && create_if_block_2(ctx);
15202
+ let if_block2 = /*searchValue*/ ctx[8].length >= 2 && /*searchArray*/ ctx[11].length == 0 && create_if_block_1(ctx);
15203
15203
 
15204
15204
  const block = {
15205
15205
  c: function create() {
@@ -15209,8 +15209,8 @@
15209
15209
  if (if_block1) if_block1.c();
15210
15210
  t1 = space();
15211
15211
  if (if_block2) if_block2.c();
15212
- attr_dev(div, "class", div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[11] == true ? '' : 'NotVisible'));
15213
- add_location(div, file, 233, 6, 8214);
15212
+ attr_dev(div, "class", div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[13] == true ? '' : 'NotVisible'));
15213
+ add_location(div, file, 277, 6, 9538);
15214
15214
  },
15215
15215
  m: function mount(target, anchor) {
15216
15216
  if (if_block0) if_block0.m(target, anchor);
@@ -15233,7 +15233,7 @@
15233
15233
  }
15234
15234
  }
15235
15235
 
15236
- if (/*searchCancelled*/ ctx[7] === false) {
15236
+ if (/*searchCancelled*/ ctx[9] === false) {
15237
15237
  if (if_block1) {
15238
15238
  if_block1.p(ctx, dirty);
15239
15239
  } else {
@@ -15246,7 +15246,7 @@
15246
15246
  if_block1 = null;
15247
15247
  }
15248
15248
 
15249
- if (/*searchValue*/ ctx[6].length >= 2 && /*searchArray*/ ctx[9].length == 0) {
15249
+ if (/*searchValue*/ ctx[8].length >= 2 && /*searchArray*/ ctx[11].length == 0) {
15250
15250
  if (if_block2) {
15251
15251
  if_block2.p(ctx, dirty);
15252
15252
  } else {
@@ -15259,7 +15259,7 @@
15259
15259
  if_block2 = null;
15260
15260
  }
15261
15261
 
15262
- if (dirty[0] & /*searchActive*/ 2048 && div_class_value !== (div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[11] == true ? '' : 'NotVisible'))) {
15262
+ if (dirty[0] & /*searchActive*/ 8192 && div_class_value !== (div_class_value = "SearchResultsContainer " + (/*searchActive*/ ctx[13] == true ? '' : 'NotVisible'))) {
15263
15263
  attr_dev(div, "class", div_class_value);
15264
15264
  }
15265
15265
  },
@@ -15279,31 +15279,31 @@
15279
15279
  block,
15280
15280
  id: create_else_block.name,
15281
15281
  type: "else",
15282
- source: "(223:4) {:else}",
15282
+ source: "(267:4) {:else}",
15283
15283
  ctx
15284
15284
  });
15285
15285
 
15286
15286
  return block;
15287
15287
  }
15288
15288
 
15289
- // (221:4) {#if isLoading}
15289
+ // (265:4) {#if isLoading}
15290
15290
  function create_if_block(ctx) {
15291
15291
  let p;
15292
- let t_value = /*$_*/ ctx[13]('Translations.loading') + "";
15292
+ let t_value = /*$_*/ ctx[15]('Translations.loading') + "";
15293
15293
  let t;
15294
15294
 
15295
15295
  const block = {
15296
15296
  c: function create() {
15297
15297
  p = element("p");
15298
15298
  t = text(t_value);
15299
- add_location(p, file, 221, 6, 7706);
15299
+ add_location(p, file, 265, 6, 9030);
15300
15300
  },
15301
15301
  m: function mount(target, anchor) {
15302
15302
  insert_dev(target, p, anchor);
15303
15303
  append_dev(p, t);
15304
15304
  },
15305
15305
  p: function update(ctx, dirty) {
15306
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.loading') + "")) set_data_dev(t, t_value);
15306
+ if (dirty[0] & /*$_*/ 32768 && t_value !== (t_value = /*$_*/ ctx[15]('Translations.loading') + "")) set_data_dev(t, t_value);
15307
15307
  },
15308
15308
  d: function destroy(detaching) {
15309
15309
  if (detaching) detach_dev(p);
@@ -15314,17 +15314,17 @@
15314
15314
  block,
15315
15315
  id: create_if_block.name,
15316
15316
  type: "if",
15317
- source: "(221:4) {#if isLoading}",
15317
+ source: "(265:4) {#if isLoading}",
15318
15318
  ctx
15319
15319
  });
15320
15320
 
15321
15321
  return block;
15322
15322
  }
15323
15323
 
15324
- // (231:40)
15324
+ // (275:40)
15325
15325
  function create_if_block_5(ctx) {
15326
15326
  let p;
15327
- let t_value = /*$_*/ ctx[13]('Translations.searchResult') + "";
15327
+ let t_value = /*$_*/ ctx[15]('Translations.searchResult') + "";
15328
15328
  let t;
15329
15329
 
15330
15330
  const block = {
@@ -15332,14 +15332,14 @@
15332
15332
  p = element("p");
15333
15333
  t = text(t_value);
15334
15334
  attr_dev(p, "class", "SearchMessage");
15335
- add_location(p, file, 231, 8, 8132);
15335
+ add_location(p, file, 275, 8, 9456);
15336
15336
  },
15337
15337
  m: function mount(target, anchor) {
15338
15338
  insert_dev(target, p, anchor);
15339
15339
  append_dev(p, t);
15340
15340
  },
15341
15341
  p: function update(ctx, dirty) {
15342
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.searchResult') + "")) set_data_dev(t, t_value);
15342
+ if (dirty[0] & /*$_*/ 32768 && t_value !== (t_value = /*$_*/ ctx[15]('Translations.searchResult') + "")) set_data_dev(t, t_value);
15343
15343
  },
15344
15344
  d: function destroy(detaching) {
15345
15345
  if (detaching) detach_dev(p);
@@ -15350,21 +15350,21 @@
15350
15350
  block,
15351
15351
  id: create_if_block_5.name,
15352
15352
  type: "if",
15353
- source: "(231:40) ",
15353
+ source: "(275:40) ",
15354
15354
  ctx
15355
15355
  });
15356
15356
 
15357
15357
  return block;
15358
15358
  }
15359
15359
 
15360
- // (224:6) {#if searchActive == true && searchValue.length < 2}
15360
+ // (268:6) {#if searchActive == true && searchValue.length < 2}
15361
15361
  function create_if_block_3(ctx) {
15362
15362
  let p;
15363
- let t0_value = /*$_*/ ctx[13]('Translations.recentSearch') + "";
15363
+ let t0_value = /*$_*/ ctx[15]('Translations.recentSearch') + "";
15364
15364
  let t0;
15365
15365
  let t1;
15366
15366
  let if_block_anchor;
15367
- let if_block = /*searchArray*/ ctx[9].length == 0 && create_if_block_4(ctx);
15367
+ let if_block = /*searchArray*/ ctx[11].length == 0 && create_if_block_4(ctx);
15368
15368
 
15369
15369
  const block = {
15370
15370
  c: function create() {
@@ -15374,7 +15374,7 @@
15374
15374
  if (if_block) if_block.c();
15375
15375
  if_block_anchor = empty();
15376
15376
  attr_dev(p, "class", "SearchMessage");
15377
- add_location(p, file, 224, 8, 7821);
15377
+ add_location(p, file, 268, 8, 9145);
15378
15378
  },
15379
15379
  m: function mount(target, anchor) {
15380
15380
  insert_dev(target, p, anchor);
@@ -15384,9 +15384,9 @@
15384
15384
  insert_dev(target, if_block_anchor, anchor);
15385
15385
  },
15386
15386
  p: function update(ctx, dirty) {
15387
- if (dirty[0] & /*$_*/ 8192 && t0_value !== (t0_value = /*$_*/ ctx[13]('Translations.recentSearch') + "")) set_data_dev(t0, t0_value);
15387
+ if (dirty[0] & /*$_*/ 32768 && t0_value !== (t0_value = /*$_*/ ctx[15]('Translations.recentSearch') + "")) set_data_dev(t0, t0_value);
15388
15388
 
15389
- if (/*searchArray*/ ctx[9].length == 0) {
15389
+ if (/*searchArray*/ ctx[11].length == 0) {
15390
15390
  if (if_block) {
15391
15391
  if_block.p(ctx, dirty);
15392
15392
  } else {
@@ -15411,18 +15411,18 @@
15411
15411
  block,
15412
15412
  id: create_if_block_3.name,
15413
15413
  type: "if",
15414
- source: "(224:6) {#if searchActive == true && searchValue.length < 2}",
15414
+ source: "(268:6) {#if searchActive == true && searchValue.length < 2}",
15415
15415
  ctx
15416
15416
  });
15417
15417
 
15418
15418
  return block;
15419
15419
  }
15420
15420
 
15421
- // (226:10) {#if searchArray.length == 0}
15421
+ // (270:10) {#if searchArray.length == 0}
15422
15422
  function create_if_block_4(ctx) {
15423
15423
  let div;
15424
15424
  let p;
15425
- let t_value = /*$_*/ ctx[13]('Translations.noRecentSearches') + "";
15425
+ let t_value = /*$_*/ ctx[15]('Translations.noRecentSearches') + "";
15426
15426
  let t;
15427
15427
 
15428
15428
  const block = {
@@ -15431,9 +15431,9 @@
15431
15431
  p = element("p");
15432
15432
  t = text(t_value);
15433
15433
  attr_dev(p, "class", "SearchMessage");
15434
- add_location(p, file, 227, 12, 7982);
15434
+ add_location(p, file, 271, 12, 9306);
15435
15435
  attr_dev(div, "class", "ResultsContainerError");
15436
- add_location(div, file, 226, 10, 7934);
15436
+ add_location(div, file, 270, 10, 9258);
15437
15437
  },
15438
15438
  m: function mount(target, anchor) {
15439
15439
  insert_dev(target, div, anchor);
@@ -15441,7 +15441,7 @@
15441
15441
  append_dev(p, t);
15442
15442
  },
15443
15443
  p: function update(ctx, dirty) {
15444
- if (dirty[0] & /*$_*/ 8192 && t_value !== (t_value = /*$_*/ ctx[13]('Translations.noRecentSearches') + "")) set_data_dev(t, t_value);
15444
+ if (dirty[0] & /*$_*/ 32768 && t_value !== (t_value = /*$_*/ ctx[15]('Translations.noRecentSearches') + "")) set_data_dev(t, t_value);
15445
15445
  },
15446
15446
  d: function destroy(detaching) {
15447
15447
  if (detaching) detach_dev(div);
@@ -15452,17 +15452,17 @@
15452
15452
  block,
15453
15453
  id: create_if_block_4.name,
15454
15454
  type: "if",
15455
- source: "(226:10) {#if searchArray.length == 0}",
15455
+ source: "(270:10) {#if searchArray.length == 0}",
15456
15456
  ctx
15457
15457
  });
15458
15458
 
15459
15459
  return block;
15460
15460
  }
15461
15461
 
15462
- // (235:8) {#if searchCancelled === false}
15462
+ // (279:8) {#if searchCancelled === false}
15463
15463
  function create_if_block_2(ctx) {
15464
15464
  let each_1_anchor;
15465
- let each_value = /*searchArray*/ ctx[9];
15465
+ let each_value = /*searchArray*/ ctx[11];
15466
15466
  validate_each_argument(each_value);
15467
15467
  let each_blocks = [];
15468
15468
 
@@ -15486,8 +15486,8 @@
15486
15486
  insert_dev(target, each_1_anchor, anchor);
15487
15487
  },
15488
15488
  p: function update(ctx, dirty) {
15489
- if (dirty[0] & /*lang, searchArray, endpoint, integratedgameframedesktop, integratedgameframemobile, clientstyling, clientstylingurl*/ 575) {
15490
- each_value = /*searchArray*/ ctx[9];
15489
+ if (dirty[0] & /*endpoint, showfavorites, lang, searchArray, integratedgameframedesktop, integratedgameframemobile, clientstyling, clientstylingurl, gamepagemodalurl*/ 2303) {
15490
+ each_value = /*searchArray*/ ctx[11];
15491
15491
  validate_each_argument(each_value);
15492
15492
  let i;
15493
15493
 
@@ -15520,14 +15520,14 @@
15520
15520
  block,
15521
15521
  id: create_if_block_2.name,
15522
15522
  type: "if",
15523
- source: "(235:8) {#if searchCancelled === false}",
15523
+ source: "(279:8) {#if searchCancelled === false}",
15524
15524
  ctx
15525
15525
  });
15526
15526
 
15527
15527
  return block;
15528
15528
  }
15529
15529
 
15530
- // (236:10) {#each searchArray as game}
15530
+ // (280:10) {#each searchArray as game}
15531
15531
  function create_each_block(ctx) {
15532
15532
  let casino_game_thumbnail;
15533
15533
  let casino_game_thumbnail_gamethumbnail_value;
@@ -15544,82 +15544,88 @@
15544
15544
  const block = {
15545
15545
  c: function create() {
15546
15546
  casino_game_thumbnail = element("casino-game-thumbnail");
15547
+ set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15548
+ set_custom_element_data(casino_game_thumbnail, "favorites", /*showfavorites*/ ctx[7]);
15547
15549
  set_custom_element_data(casino_game_thumbnail, "lang", /*lang*/ ctx[1]);
15548
- set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[37].thumbnail);
15549
- set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value = /*game*/ ctx[37].name);
15550
- set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value = /*game*/ ctx[37].vendor.name);
15551
- set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value = /*game*/ ctx[37].isNew);
15552
- set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[37].popularity);
15553
- set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[37].cellSize);
15554
- set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value = /*game*/ ctx[37].id);
15555
- set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[37].hasFunMode);
15556
- set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[37].isFavorite);
15557
-
15558
- set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[37].details
15559
- ? /*game*/ ctx[37].launchUrl
15550
+ set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[45].thumbnail);
15551
+ set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value = /*game*/ ctx[45].name);
15552
+ set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value = /*game*/ ctx[45].vendor.name);
15553
+ set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value = /*game*/ ctx[45].isNew);
15554
+ set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[45].popularity);
15555
+ set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[45].cellSize);
15556
+ set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value = /*game*/ ctx[45].id);
15557
+ set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[45].hasFunMode);
15558
+ set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[45].isFavorite);
15559
+
15560
+ set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[45].details
15561
+ ? /*game*/ ctx[45].launchUrl
15560
15562
  : '');
15561
15563
 
15562
- set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15563
15564
  set_custom_element_data(casino_game_thumbnail, "integratedgameframedesktop", /*integratedgameframedesktop*/ ctx[4]);
15564
15565
  set_custom_element_data(casino_game_thumbnail, "integratedgameframemobile", /*integratedgameframemobile*/ ctx[5]);
15565
15566
  set_custom_element_data(casino_game_thumbnail, "clientstyling", /*clientstyling*/ ctx[2]);
15566
15567
  set_custom_element_data(casino_game_thumbnail, "clientstylingurl", /*clientstylingurl*/ ctx[3]);
15567
- add_location(casino_game_thumbnail, file, 236, 12, 8383);
15568
+ set_custom_element_data(casino_game_thumbnail, "gamepagemodalurl", /*gamepagemodalurl*/ ctx[6]);
15569
+ add_location(casino_game_thumbnail, file, 280, 12, 9707);
15568
15570
  },
15569
15571
  m: function mount(target, anchor) {
15570
15572
  insert_dev(target, casino_game_thumbnail, anchor);
15571
15573
  },
15572
15574
  p: function update(ctx, dirty) {
15575
+ if (dirty[0] & /*endpoint*/ 1) {
15576
+ set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15577
+ }
15578
+
15579
+ if (dirty[0] & /*showfavorites*/ 128) {
15580
+ set_custom_element_data(casino_game_thumbnail, "favorites", /*showfavorites*/ ctx[7]);
15581
+ }
15582
+
15573
15583
  if (dirty[0] & /*lang*/ 2) {
15574
15584
  set_custom_element_data(casino_game_thumbnail, "lang", /*lang*/ ctx[1]);
15575
15585
  }
15576
15586
 
15577
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamethumbnail_value !== (casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[37].thumbnail)) {
15587
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamethumbnail_value !== (casino_game_thumbnail_gamethumbnail_value = /*game*/ ctx[45].thumbnail)) {
15578
15588
  set_custom_element_data(casino_game_thumbnail, "gamethumbnail", casino_game_thumbnail_gamethumbnail_value);
15579
15589
  }
15580
15590
 
15581
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamename_value !== (casino_game_thumbnail_gamename_value = /*game*/ ctx[37].name)) {
15591
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamename_value !== (casino_game_thumbnail_gamename_value = /*game*/ ctx[45].name)) {
15582
15592
  set_custom_element_data(casino_game_thumbnail, "gamename", casino_game_thumbnail_gamename_value);
15583
15593
  }
15584
15594
 
15585
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamevendor_value !== (casino_game_thumbnail_gamevendor_value = /*game*/ ctx[37].vendor.name)) {
15595
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamevendor_value !== (casino_game_thumbnail_gamevendor_value = /*game*/ ctx[45].vendor.name)) {
15586
15596
  set_custom_element_data(casino_game_thumbnail, "gamevendor", casino_game_thumbnail_gamevendor_value);
15587
15597
  }
15588
15598
 
15589
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gameisnew_value !== (casino_game_thumbnail_gameisnew_value = /*game*/ ctx[37].isNew)) {
15599
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gameisnew_value !== (casino_game_thumbnail_gameisnew_value = /*game*/ ctx[45].isNew)) {
15590
15600
  set_custom_element_data(casino_game_thumbnail, "gameisnew", casino_game_thumbnail_gameisnew_value);
15591
15601
  }
15592
15602
 
15593
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamepopularity_value !== (casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[37].popularity)) {
15603
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamepopularity_value !== (casino_game_thumbnail_gamepopularity_value = /*game*/ ctx[45].popularity)) {
15594
15604
  set_custom_element_data(casino_game_thumbnail, "gamepopularity", casino_game_thumbnail_gamepopularity_value);
15595
15605
  }
15596
15606
 
15597
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamecellsize_value !== (casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[37].cellSize)) {
15607
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamecellsize_value !== (casino_game_thumbnail_gamecellsize_value = /*game*/ ctx[45].cellSize)) {
15598
15608
  set_custom_element_data(casino_game_thumbnail, "gamecellsize", casino_game_thumbnail_gamecellsize_value);
15599
15609
  }
15600
15610
 
15601
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gameid_value !== (casino_game_thumbnail_gameid_value = /*game*/ ctx[37].id)) {
15611
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gameid_value !== (casino_game_thumbnail_gameid_value = /*game*/ ctx[45].id)) {
15602
15612
  set_custom_element_data(casino_game_thumbnail, "gameid", casino_game_thumbnail_gameid_value);
15603
15613
  }
15604
15614
 
15605
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamefunmode_value !== (casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[37].hasFunMode)) {
15615
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamefunmode_value !== (casino_game_thumbnail_gamefunmode_value = /*game*/ ctx[45].hasFunMode)) {
15606
15616
  set_custom_element_data(casino_game_thumbnail, "gamefunmode", casino_game_thumbnail_gamefunmode_value);
15607
15617
  }
15608
15618
 
15609
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_gamefavorite_value !== (casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[37].isFavorite)) {
15619
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_gamefavorite_value !== (casino_game_thumbnail_gamefavorite_value = /*game*/ ctx[45].isFavorite)) {
15610
15620
  set_custom_element_data(casino_game_thumbnail, "gamefavorite", casino_game_thumbnail_gamefavorite_value);
15611
15621
  }
15612
15622
 
15613
- if (dirty[0] & /*searchArray*/ 512 && casino_game_thumbnail_livelobbyendpoint_value !== (casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[37].details
15614
- ? /*game*/ ctx[37].launchUrl
15623
+ if (dirty[0] & /*searchArray*/ 2048 && casino_game_thumbnail_livelobbyendpoint_value !== (casino_game_thumbnail_livelobbyendpoint_value = /*game*/ ctx[45].details
15624
+ ? /*game*/ ctx[45].launchUrl
15615
15625
  : '')) {
15616
15626
  set_custom_element_data(casino_game_thumbnail, "livelobbyendpoint", casino_game_thumbnail_livelobbyendpoint_value);
15617
15627
  }
15618
15628
 
15619
- if (dirty[0] & /*endpoint*/ 1) {
15620
- set_custom_element_data(casino_game_thumbnail, "endpoint", /*endpoint*/ ctx[0]);
15621
- }
15622
-
15623
15629
  if (dirty[0] & /*integratedgameframedesktop*/ 16) {
15624
15630
  set_custom_element_data(casino_game_thumbnail, "integratedgameframedesktop", /*integratedgameframedesktop*/ ctx[4]);
15625
15631
  }
@@ -15635,6 +15641,10 @@
15635
15641
  if (dirty[0] & /*clientstylingurl*/ 8) {
15636
15642
  set_custom_element_data(casino_game_thumbnail, "clientstylingurl", /*clientstylingurl*/ ctx[3]);
15637
15643
  }
15644
+
15645
+ if (dirty[0] & /*gamepagemodalurl*/ 64) {
15646
+ set_custom_element_data(casino_game_thumbnail, "gamepagemodalurl", /*gamepagemodalurl*/ ctx[6]);
15647
+ }
15638
15648
  },
15639
15649
  d: function destroy(detaching) {
15640
15650
  if (detaching) detach_dev(casino_game_thumbnail);
@@ -15645,22 +15655,22 @@
15645
15655
  block,
15646
15656
  id: create_each_block.name,
15647
15657
  type: "each",
15648
- source: "(236:10) {#each searchArray as game}",
15658
+ source: "(280:10) {#each searchArray as game}",
15649
15659
  ctx
15650
15660
  });
15651
15661
 
15652
15662
  return block;
15653
15663
  }
15654
15664
 
15655
- // (257:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15665
+ // (303:8) {#if searchValue.length >= 2 && searchArray.length == 0}
15656
15666
  function create_if_block_1(ctx) {
15657
15667
  let div;
15658
15668
  let p0;
15659
- let t0_value = /*$_*/ ctx[13]('Translations.notFound') + "";
15669
+ let t0_value = /*$_*/ ctx[15]('Translations.notFound') + "";
15660
15670
  let t0;
15661
15671
  let t1;
15662
15672
  let p1;
15663
- let t2_value = /*$_*/ ctx[13]('Translations.notFoundText') + "";
15673
+ let t2_value = /*$_*/ ctx[15]('Translations.notFoundText') + "";
15664
15674
  let t2;
15665
15675
 
15666
15676
  const block = {
@@ -15672,10 +15682,10 @@
15672
15682
  p1 = element("p");
15673
15683
  t2 = text(t2_value);
15674
15684
  attr_dev(p0, "class", "SearchMessage");
15675
- add_location(p0, file, 258, 12, 9247);
15676
- add_location(p1, file, 259, 12, 9318);
15685
+ add_location(p0, file, 304, 12, 10646);
15686
+ add_location(p1, file, 305, 12, 10717);
15677
15687
  attr_dev(div, "class", "ResultsContainerError");
15678
- add_location(div, file, 257, 10, 9199);
15688
+ add_location(div, file, 303, 10, 10598);
15679
15689
  },
15680
15690
  m: function mount(target, anchor) {
15681
15691
  insert_dev(target, div, anchor);
@@ -15686,8 +15696,8 @@
15686
15696
  append_dev(p1, t2);
15687
15697
  },
15688
15698
  p: function update(ctx, dirty) {
15689
- if (dirty[0] & /*$_*/ 8192 && t0_value !== (t0_value = /*$_*/ ctx[13]('Translations.notFound') + "")) set_data_dev(t0, t0_value);
15690
- if (dirty[0] & /*$_*/ 8192 && t2_value !== (t2_value = /*$_*/ ctx[13]('Translations.notFoundText') + "")) set_data_dev(t2, t2_value);
15699
+ if (dirty[0] & /*$_*/ 32768 && t0_value !== (t0_value = /*$_*/ ctx[15]('Translations.notFound') + "")) set_data_dev(t0, t0_value);
15700
+ if (dirty[0] & /*$_*/ 32768 && t2_value !== (t2_value = /*$_*/ ctx[15]('Translations.notFoundText') + "")) set_data_dev(t2, t2_value);
15691
15701
  },
15692
15702
  d: function destroy(detaching) {
15693
15703
  if (detaching) detach_dev(div);
@@ -15698,7 +15708,7 @@
15698
15708
  block,
15699
15709
  id: create_if_block_1.name,
15700
15710
  type: "if",
15701
- source: "(257:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15711
+ source: "(303:8) {#if searchValue.length >= 2 && searchArray.length == 0}",
15702
15712
  ctx
15703
15713
  });
15704
15714
 
@@ -15723,7 +15733,7 @@
15723
15733
  let span_class_value;
15724
15734
  let t2;
15725
15735
  let small;
15726
- let t3_value = /*$_*/ ctx[13]('Translations.cancel') + "";
15736
+ let t3_value = /*$_*/ ctx[15]('Translations.cancel') + "";
15727
15737
  let t3;
15728
15738
  let small_class_value;
15729
15739
  let t4;
@@ -15731,7 +15741,7 @@
15731
15741
  let dispose;
15732
15742
 
15733
15743
  function select_block_type(ctx, dirty) {
15734
- if (/*isLoading*/ ctx[12]) return create_if_block;
15744
+ if (/*isLoading*/ ctx[14]) return create_if_block;
15735
15745
  return create_else_block;
15736
15746
  }
15737
15747
 
@@ -15764,45 +15774,45 @@
15764
15774
  attr_dev(path0, "stroke-linecap", "round");
15765
15775
  attr_dev(path0, "stroke-linejoin", "round");
15766
15776
  attr_dev(path0, "d", "m10.48 10.985 2.21 2.373");
15767
- add_location(path0, file, 204, 10, 6677);
15777
+ add_location(path0, file, 248, 10, 8001);
15768
15778
  attr_dev(circle, "cx", "6.5");
15769
15779
  attr_dev(circle, "cy", "6.5");
15770
15780
  attr_dev(circle, "r", "5.75");
15771
15781
  attr_dev(circle, "stroke", "#212121");
15772
15782
  attr_dev(circle, "stroke-width", "1.5");
15773
- add_location(circle, file, 205, 10, 6805);
15783
+ add_location(circle, file, 249, 10, 8129);
15774
15784
  attr_dev(svg0, "width", "14");
15775
15785
  attr_dev(svg0, "height", "15");
15776
15786
  attr_dev(svg0, "fill", "none");
15777
15787
  attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg");
15778
- add_location(svg0, file, 203, 8, 6591);
15788
+ add_location(svg0, file, 247, 8, 7915);
15779
15789
  attr_dev(div0, "class", "SearchIcon");
15780
- add_location(div0, file, 202, 6, 6558);
15790
+ add_location(div0, file, 246, 6, 7882);
15781
15791
  attr_dev(input, "class", "SearchInput");
15782
15792
  attr_dev(input, "type", "search");
15783
- attr_dev(input, "placeholder", input_placeholder_value = /*$_*/ ctx[13]('Translations.placeHolderSearchGames'));
15784
- add_location(input, file, 209, 8, 6950);
15793
+ attr_dev(input, "placeholder", input_placeholder_value = /*$_*/ ctx[15]('Translations.placeHolderSearchGames'));
15794
+ add_location(input, file, 253, 8, 8274);
15785
15795
  attr_dev(path1, "d", "m1.45 1.5 8.1 8M1.45 9.5l8.1-8");
15786
15796
  attr_dev(path1, "stroke", "#717171");
15787
15797
  attr_dev(path1, "stroke-width", "2");
15788
15798
  attr_dev(path1, "stroke-linecap", "round");
15789
15799
  attr_dev(path1, "stroke-linejoin", "round");
15790
- add_location(path1, file, 212, 12, 7337);
15800
+ add_location(path1, file, 256, 12, 8661);
15791
15801
  attr_dev(svg1, "width", "11");
15792
15802
  attr_dev(svg1, "height", "11");
15793
15803
  attr_dev(svg1, "fill", "none");
15794
15804
  attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg");
15795
- add_location(svg1, file, 211, 10, 7249);
15796
- attr_dev(span, "class", span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[6].length != 0 ? '' : 'NotVisible'));
15797
- add_location(span, file, 210, 8, 7128);
15805
+ add_location(svg1, file, 255, 10, 8573);
15806
+ attr_dev(span, "class", span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[8].length != 0 ? '' : 'NotVisible'));
15807
+ add_location(span, file, 254, 8, 8452);
15798
15808
  attr_dev(div1, "class", "SearchContainer");
15799
- add_location(div1, file, 208, 6, 6912);
15800
- attr_dev(small, "class", small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[7] ? 'NotVisible' : ''));
15801
- add_location(small, file, 216, 6, 7513);
15809
+ add_location(div1, file, 252, 6, 8236);
15810
+ attr_dev(small, "class", small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[9] ? 'NotVisible' : ''));
15811
+ add_location(small, file, 260, 6, 8837);
15802
15812
  attr_dev(div2, "class", "Search");
15803
- add_location(div2, file, 201, 4, 6531);
15813
+ add_location(div2, file, 245, 4, 7855);
15804
15814
  attr_dev(div3, "class", "CasinoSearch");
15805
- add_location(div3, file, 200, 2, 6465);
15815
+ add_location(div3, file, 244, 2, 7789);
15806
15816
  },
15807
15817
  l: function claim(nodes) {
15808
15818
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -15817,8 +15827,8 @@
15817
15827
  append_dev(div2, t0);
15818
15828
  append_dev(div2, div1);
15819
15829
  append_dev(div1, input);
15820
- set_input_value(input, /*searchValue*/ ctx[6]);
15821
- /*input_binding*/ ctx[20](input);
15830
+ set_input_value(input, /*searchValue*/ ctx[8]);
15831
+ /*input_binding*/ ctx[23](input);
15822
15832
  append_dev(div1, t1);
15823
15833
  append_dev(div1, span);
15824
15834
  append_dev(span, svg1);
@@ -15828,35 +15838,35 @@
15828
15838
  append_dev(small, t3);
15829
15839
  append_dev(div3, t4);
15830
15840
  if_block.m(div3, null);
15831
- /*div3_binding*/ ctx[23](div3);
15841
+ /*div3_binding*/ ctx[26](div3);
15832
15842
 
15833
15843
  if (!mounted) {
15834
15844
  dispose = [
15835
- listen_dev(input, "input", /*input_input_handler*/ ctx[19]),
15836
- listen_dev(input, "focus", /*onFocus*/ ctx[14], false, false, false),
15837
- listen_dev(span, "click", /*click_handler*/ ctx[21], false, false, false),
15838
- listen_dev(small, "click", /*click_handler_1*/ ctx[22], false, false, false)
15845
+ listen_dev(input, "input", /*input_input_handler*/ ctx[22]),
15846
+ listen_dev(input, "focus", /*onFocus*/ ctx[16], false, false, false),
15847
+ listen_dev(span, "click", /*click_handler*/ ctx[24], false, false, false),
15848
+ listen_dev(small, "click", /*click_handler_1*/ ctx[25], false, false, false)
15839
15849
  ];
15840
15850
 
15841
15851
  mounted = true;
15842
15852
  }
15843
15853
  },
15844
15854
  p: function update(ctx, dirty) {
15845
- if (dirty[0] & /*$_*/ 8192 && input_placeholder_value !== (input_placeholder_value = /*$_*/ ctx[13]('Translations.placeHolderSearchGames'))) {
15855
+ if (dirty[0] & /*$_*/ 32768 && input_placeholder_value !== (input_placeholder_value = /*$_*/ ctx[15]('Translations.placeHolderSearchGames'))) {
15846
15856
  attr_dev(input, "placeholder", input_placeholder_value);
15847
15857
  }
15848
15858
 
15849
- if (dirty[0] & /*searchValue*/ 64) {
15850
- set_input_value(input, /*searchValue*/ ctx[6]);
15859
+ if (dirty[0] & /*searchValue*/ 256) {
15860
+ set_input_value(input, /*searchValue*/ ctx[8]);
15851
15861
  }
15852
15862
 
15853
- if (dirty[0] & /*searchValue*/ 64 && span_class_value !== (span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[6].length != 0 ? '' : 'NotVisible'))) {
15863
+ if (dirty[0] & /*searchValue*/ 256 && span_class_value !== (span_class_value = "SearchClearButton " + (/*searchValue*/ ctx[8].length != 0 ? '' : 'NotVisible'))) {
15854
15864
  attr_dev(span, "class", span_class_value);
15855
15865
  }
15856
15866
 
15857
- if (dirty[0] & /*$_*/ 8192 && t3_value !== (t3_value = /*$_*/ ctx[13]('Translations.cancel') + "")) set_data_dev(t3, t3_value);
15867
+ if (dirty[0] & /*$_*/ 32768 && t3_value !== (t3_value = /*$_*/ ctx[15]('Translations.cancel') + "")) set_data_dev(t3, t3_value);
15858
15868
 
15859
- if (dirty[0] & /*searchCancelled*/ 128 && small_class_value !== (small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[7] ? 'NotVisible' : ''))) {
15869
+ if (dirty[0] & /*searchCancelled*/ 512 && small_class_value !== (small_class_value = "SearchCancelButton " + (/*searchCancelled*/ ctx[9] ? 'NotVisible' : ''))) {
15860
15870
  attr_dev(small, "class", small_class_value);
15861
15871
  }
15862
15872
 
@@ -15876,9 +15886,9 @@
15876
15886
  o: noop$1,
15877
15887
  d: function destroy(detaching) {
15878
15888
  if (detaching) detach_dev(div3);
15879
- /*input_binding*/ ctx[20](null);
15889
+ /*input_binding*/ ctx[23](null);
15880
15890
  if_block.d();
15881
- /*div3_binding*/ ctx[23](null);
15891
+ /*div3_binding*/ ctx[26](null);
15882
15892
  mounted = false;
15883
15893
  run_all(dispose);
15884
15894
  }
@@ -15898,7 +15908,7 @@
15898
15908
  function instance($$self, $$props, $$invalidate) {
15899
15909
  let $_;
15900
15910
  validate_store(Y, '_');
15901
- component_subscribe($$self, Y, $$value => $$invalidate(13, $_ = $$value));
15911
+ component_subscribe($$self, Y, $$value => $$invalidate(15, $_ = $$value));
15902
15912
  let { $$slots: slots = {}, $$scope } = $$props;
15903
15913
  validate_slots('undefined', slots, []);
15904
15914
  let { endpoint = '' } = $$props;
@@ -15908,7 +15918,9 @@
15908
15918
  let { clientstylingurl = '' } = $$props;
15909
15919
  let { integratedgameframedesktop = 'false' } = $$props;
15910
15920
  let { integratedgameframemobile = 'false' } = $$props;
15921
+ let { gamepagemodalurl = 'true' } = $$props;
15911
15922
  let { translationUrl = '' } = $$props;
15923
+ let { showfavorites = '' } = $$props;
15912
15924
  let userAgent = window.navigator.userAgent;
15913
15925
  let searchArray = [];
15914
15926
  let searchedValues = [];
@@ -15919,6 +15931,10 @@
15919
15931
  let searchActive = false;
15920
15932
  let isLoading = false;
15921
15933
  let customStylingContainer;
15934
+ let isLoggedIn = false;
15935
+ let sessionID;
15936
+ let playerID;
15937
+ let favoriteGamesIds = [];
15922
15938
 
15923
15939
  const setTranslationUrl = () => {
15924
15940
  let url = translationUrl;
@@ -15940,11 +15956,21 @@
15940
15956
  if (e.data && e.data.type == 'OpenGameFrame') {
15941
15957
  addSearchedItem(e.data.gameId);
15942
15958
  }
15959
+
15960
+ if (e.data && e.data.type == 'ShowGameModal') {
15961
+ addSearchedItem(e.data.gameId);
15962
+ }
15963
+
15964
+ if (e.data.type === 'UserSessionID') {
15965
+ sessionID = e.data.session;
15966
+ playerID = e.data.userid;
15967
+ $$invalidate(21, isLoggedIn = true);
15968
+ }
15943
15969
  };
15944
15970
 
15945
15971
  const onFocus = () => {
15946
- $$invalidate(7, searchCancelled = false);
15947
- $$invalidate(11, searchActive = true);
15972
+ $$invalidate(9, searchCancelled = false);
15973
+ $$invalidate(13, searchActive = true);
15948
15974
 
15949
15975
  if (endpoint && datasource && lang) {
15950
15976
  if (searchValue.length < 2) {
@@ -15969,7 +15995,10 @@
15969
15995
  }
15970
15996
 
15971
15997
  Promise.all(promises).then(res => {
15972
- $$invalidate(9, searchArray = res);
15998
+ $$invalidate(11, searchArray = res.map(item => {
15999
+ item.isFavorite = checkFavorite(item.id);
16000
+ return item;
16001
+ }));
15973
16002
  });
15974
16003
  }
15975
16004
  }
@@ -15985,13 +16014,13 @@
15985
16014
 
15986
16015
  const getGames = url => {
15987
16016
  return new Promise((resolve, reject) => {
15988
- $$invalidate(12, isLoading = true);
16017
+ $$invalidate(14, isLoading = true);
15989
16018
 
15990
16019
  fetch(url.href).then(res => res.json()).then(games => {
15991
- $$invalidate(12, isLoading = false);
16020
+ $$invalidate(14, isLoading = false);
15992
16021
  resolve(games);
15993
16022
  }).catch(err => {
15994
- $$invalidate(12, isLoading = false);
16023
+ $$invalidate(14, isLoading = false);
15995
16024
  console.error(err);
15996
16025
  reject(err);
15997
16026
  });
@@ -16000,18 +16029,18 @@
16000
16029
 
16001
16030
  const getGame = (url, gameId) => {
16002
16031
  return new Promise((resolve, reject) => {
16003
- $$invalidate(12, isLoading = true);
16032
+ $$invalidate(14, isLoading = true);
16004
16033
 
16005
16034
  if (gameId && Object.keys(gamesCache).indexOf(gameId) >= 0) {
16006
- $$invalidate(12, isLoading = false);
16035
+ $$invalidate(14, isLoading = false);
16007
16036
  resolve(gamesCache[gameId]);
16008
16037
  } else {
16009
16038
  fetch(url).then(fetchRes => fetchRes.json()).then(gameData => {
16010
- $$invalidate(12, isLoading = false);
16039
+ $$invalidate(14, isLoading = false);
16011
16040
  gamesCache[gameData[0].gameId] = gameData[0];
16012
16041
  resolve(gameData[0]);
16013
16042
  }).catch(err => {
16014
- $$invalidate(12, isLoading = false);
16043
+ $$invalidate(14, isLoading = false);
16015
16044
  console.error(err);
16016
16045
  reject(err);
16017
16046
  });
@@ -16019,6 +16048,29 @@
16019
16048
  });
16020
16049
  };
16021
16050
 
16051
+ const getFavoriteGames = () => {
16052
+ const url = new URL(`${endpoint}/player/${playerID}/favorites/`);
16053
+ $$invalidate(14, isLoading = true);
16054
+
16055
+ let options = {
16056
+ method: "GET",
16057
+ headers: { 'X-SessionID': sessionID }
16058
+ };
16059
+
16060
+ fetch(url.href, options).then(res => res.json()).then(favoriteGames => {
16061
+ $$invalidate(14, isLoading = false);
16062
+ favoriteGamesIds = favoriteGames.items.map(favoriteGame => favoriteGame.id);
16063
+ });
16064
+ };
16065
+
16066
+ const checkFavorite = gameId => {
16067
+ if (favoriteGamesIds.findIndex(favGameId => favGameId == gameId) !== -1) {
16068
+ return true;
16069
+ } else {
16070
+ return false;
16071
+ }
16072
+ };
16073
+
16022
16074
  const addSearchedItem = gameID => {
16023
16075
  searchedValues = getCookieValue(`searchedGamesWds_casino`);
16024
16076
 
@@ -16045,16 +16097,16 @@
16045
16097
  };
16046
16098
 
16047
16099
  const cancelSearch = () => {
16048
- $$invalidate(6, searchValue = '');
16049
- $$invalidate(7, searchCancelled = true);
16050
- $$invalidate(12, isLoading = false);
16051
- $$invalidate(9, searchArray = []);
16052
- $$invalidate(11, searchActive = false);
16100
+ $$invalidate(8, searchValue = '');
16101
+ $$invalidate(9, searchCancelled = true);
16102
+ $$invalidate(14, isLoading = false);
16103
+ $$invalidate(11, searchArray = []);
16104
+ $$invalidate(13, searchActive = false);
16053
16105
  sendSearchStatus(searchActive);
16054
16106
  };
16055
16107
 
16056
16108
  const clearSearch = () => {
16057
- $$invalidate(6, searchValue = '');
16109
+ $$invalidate(8, searchValue = '');
16058
16110
  searchElement.focus();
16059
16111
  };
16060
16112
 
@@ -16110,7 +16162,9 @@
16110
16162
  'clientstylingurl',
16111
16163
  'integratedgameframedesktop',
16112
16164
  'integratedgameframemobile',
16113
- 'translationUrl'
16165
+ 'gamepagemodalurl',
16166
+ 'translationUrl',
16167
+ 'showfavorites'
16114
16168
  ];
16115
16169
 
16116
16170
  Object_1.keys($$props).forEach(key => {
@@ -16119,13 +16173,13 @@
16119
16173
 
16120
16174
  function input_input_handler() {
16121
16175
  searchValue = this.value;
16122
- $$invalidate(6, searchValue);
16176
+ $$invalidate(8, searchValue);
16123
16177
  }
16124
16178
 
16125
16179
  function input_binding($$value) {
16126
16180
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
16127
16181
  searchElement = $$value;
16128
- $$invalidate(10, searchElement);
16182
+ $$invalidate(12, searchElement);
16129
16183
  });
16130
16184
  }
16131
16185
 
@@ -16135,19 +16189,21 @@
16135
16189
  function div3_binding($$value) {
16136
16190
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
16137
16191
  customStylingContainer = $$value;
16138
- $$invalidate(8, customStylingContainer);
16192
+ $$invalidate(10, customStylingContainer);
16139
16193
  });
16140
16194
  }
16141
16195
 
16142
16196
  $$self.$$set = $$props => {
16143
16197
  if ('endpoint' in $$props) $$invalidate(0, endpoint = $$props.endpoint);
16144
- if ('datasource' in $$props) $$invalidate(17, datasource = $$props.datasource);
16198
+ if ('datasource' in $$props) $$invalidate(19, datasource = $$props.datasource);
16145
16199
  if ('lang' in $$props) $$invalidate(1, lang = $$props.lang);
16146
16200
  if ('clientstyling' in $$props) $$invalidate(2, clientstyling = $$props.clientstyling);
16147
16201
  if ('clientstylingurl' in $$props) $$invalidate(3, clientstylingurl = $$props.clientstylingurl);
16148
16202
  if ('integratedgameframedesktop' in $$props) $$invalidate(4, integratedgameframedesktop = $$props.integratedgameframedesktop);
16149
16203
  if ('integratedgameframemobile' in $$props) $$invalidate(5, integratedgameframemobile = $$props.integratedgameframemobile);
16150
- if ('translationUrl' in $$props) $$invalidate(18, translationUrl = $$props.translationUrl);
16204
+ if ('gamepagemodalurl' in $$props) $$invalidate(6, gamepagemodalurl = $$props.gamepagemodalurl);
16205
+ if ('translationUrl' in $$props) $$invalidate(20, translationUrl = $$props.translationUrl);
16206
+ if ('showfavorites' in $$props) $$invalidate(7, showfavorites = $$props.showfavorites);
16151
16207
  };
16152
16208
 
16153
16209
  $$self.$capture_state = () => ({
@@ -16164,7 +16220,9 @@
16164
16220
  clientstylingurl,
16165
16221
  integratedgameframedesktop,
16166
16222
  integratedgameframemobile,
16223
+ gamepagemodalurl,
16167
16224
  translationUrl,
16225
+ showfavorites,
16168
16226
  userAgent,
16169
16227
  searchArray,
16170
16228
  searchedValues,
@@ -16175,11 +16233,17 @@
16175
16233
  searchActive,
16176
16234
  isLoading,
16177
16235
  customStylingContainer,
16236
+ isLoggedIn,
16237
+ sessionID,
16238
+ playerID,
16239
+ favoriteGamesIds,
16178
16240
  setTranslationUrl,
16179
16241
  messageHandler,
16180
16242
  onFocus,
16181
16243
  getGames,
16182
16244
  getGame,
16245
+ getFavoriteGames,
16246
+ checkFavorite,
16183
16247
  addSearchedItem,
16184
16248
  getCookieValue,
16185
16249
  cancelSearch,
@@ -16193,23 +16257,29 @@
16193
16257
 
16194
16258
  $$self.$inject_state = $$props => {
16195
16259
  if ('endpoint' in $$props) $$invalidate(0, endpoint = $$props.endpoint);
16196
- if ('datasource' in $$props) $$invalidate(17, datasource = $$props.datasource);
16260
+ if ('datasource' in $$props) $$invalidate(19, datasource = $$props.datasource);
16197
16261
  if ('lang' in $$props) $$invalidate(1, lang = $$props.lang);
16198
16262
  if ('clientstyling' in $$props) $$invalidate(2, clientstyling = $$props.clientstyling);
16199
16263
  if ('clientstylingurl' in $$props) $$invalidate(3, clientstylingurl = $$props.clientstylingurl);
16200
16264
  if ('integratedgameframedesktop' in $$props) $$invalidate(4, integratedgameframedesktop = $$props.integratedgameframedesktop);
16201
16265
  if ('integratedgameframemobile' in $$props) $$invalidate(5, integratedgameframemobile = $$props.integratedgameframemobile);
16202
- if ('translationUrl' in $$props) $$invalidate(18, translationUrl = $$props.translationUrl);
16203
- if ('userAgent' in $$props) $$invalidate(26, userAgent = $$props.userAgent);
16204
- if ('searchArray' in $$props) $$invalidate(9, searchArray = $$props.searchArray);
16266
+ if ('gamepagemodalurl' in $$props) $$invalidate(6, gamepagemodalurl = $$props.gamepagemodalurl);
16267
+ if ('translationUrl' in $$props) $$invalidate(20, translationUrl = $$props.translationUrl);
16268
+ if ('showfavorites' in $$props) $$invalidate(7, showfavorites = $$props.showfavorites);
16269
+ if ('userAgent' in $$props) $$invalidate(32, userAgent = $$props.userAgent);
16270
+ if ('searchArray' in $$props) $$invalidate(11, searchArray = $$props.searchArray);
16205
16271
  if ('searchedValues' in $$props) searchedValues = $$props.searchedValues;
16206
16272
  if ('gamesCache' in $$props) gamesCache = $$props.gamesCache;
16207
- if ('searchValue' in $$props) $$invalidate(6, searchValue = $$props.searchValue);
16208
- if ('searchElement' in $$props) $$invalidate(10, searchElement = $$props.searchElement);
16209
- if ('searchCancelled' in $$props) $$invalidate(7, searchCancelled = $$props.searchCancelled);
16210
- if ('searchActive' in $$props) $$invalidate(11, searchActive = $$props.searchActive);
16211
- if ('isLoading' in $$props) $$invalidate(12, isLoading = $$props.isLoading);
16212
- if ('customStylingContainer' in $$props) $$invalidate(8, customStylingContainer = $$props.customStylingContainer);
16273
+ if ('searchValue' in $$props) $$invalidate(8, searchValue = $$props.searchValue);
16274
+ if ('searchElement' in $$props) $$invalidate(12, searchElement = $$props.searchElement);
16275
+ if ('searchCancelled' in $$props) $$invalidate(9, searchCancelled = $$props.searchCancelled);
16276
+ if ('searchActive' in $$props) $$invalidate(13, searchActive = $$props.searchActive);
16277
+ if ('isLoading' in $$props) $$invalidate(14, isLoading = $$props.isLoading);
16278
+ if ('customStylingContainer' in $$props) $$invalidate(10, customStylingContainer = $$props.customStylingContainer);
16279
+ if ('isLoggedIn' in $$props) $$invalidate(21, isLoggedIn = $$props.isLoggedIn);
16280
+ if ('sessionID' in $$props) sessionID = $$props.sessionID;
16281
+ if ('playerID' in $$props) playerID = $$props.playerID;
16282
+ if ('favoriteGamesIds' in $$props) favoriteGamesIds = $$props.favoriteGamesIds;
16213
16283
  };
16214
16284
 
16215
16285
  if ($$props && "$$inject" in $$props) {
@@ -16217,7 +16287,7 @@
16217
16287
  }
16218
16288
 
16219
16289
  $$self.$$.update = () => {
16220
- if ($$self.$$.dirty[0] & /*searchValue, endpoint, datasource, lang, searchCancelled*/ 131267) {
16290
+ if ($$self.$$.dirty[0] & /*searchValue, endpoint, datasource, lang, searchCancelled*/ 525059) {
16221
16291
  if (searchValue.length >= 2) {
16222
16292
  const searchUrl = new URL(`${endpoint}/casino/games`);
16223
16293
  searchUrl.searchParams.append("datasource", datasource);
@@ -16228,7 +16298,10 @@
16228
16298
  searchUrl.searchParams.append("filter", `name=${searchValue}`);
16229
16299
 
16230
16300
  getGames(searchUrl).then(searchData => {
16231
- $$invalidate(9, searchArray = searchData.items.map(item => item));
16301
+ $$invalidate(11, searchArray = searchData.items.map(item => {
16302
+ item.isFavorite = checkFavorite(item.id);
16303
+ return item;
16304
+ }));
16232
16305
  });
16233
16306
  } else {
16234
16307
  if (!searchCancelled) {
@@ -16241,15 +16314,19 @@
16241
16314
  lang && setActiveLanguage();
16242
16315
  }
16243
16316
 
16244
- if ($$self.$$.dirty[0] & /*translationUrl*/ 262144) {
16317
+ if ($$self.$$.dirty[0] & /*translationUrl*/ 1048576) {
16245
16318
  translationUrl && setTranslationUrl();
16246
16319
  }
16247
16320
 
16248
- if ($$self.$$.dirty[0] & /*clientstyling, customStylingContainer*/ 260) {
16321
+ if ($$self.$$.dirty[0] & /*showfavorites, isLoggedIn*/ 2097280) {
16322
+ showfavorites && isLoggedIn && getFavoriteGames();
16323
+ }
16324
+
16325
+ if ($$self.$$.dirty[0] & /*clientstyling, customStylingContainer*/ 1028) {
16249
16326
  clientstyling && customStylingContainer && setClientStyling();
16250
16327
  }
16251
16328
 
16252
- if ($$self.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/ 264) {
16329
+ if ($$self.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/ 1032) {
16253
16330
  clientstylingurl && customStylingContainer && setClientStylingURL();
16254
16331
  }
16255
16332
  };
@@ -16261,6 +16338,8 @@
16261
16338
  clientstylingurl,
16262
16339
  integratedgameframedesktop,
16263
16340
  integratedgameframemobile,
16341
+ gamepagemodalurl,
16342
+ showfavorites,
16264
16343
  searchValue,
16265
16344
  searchCancelled,
16266
16345
  customStylingContainer,
@@ -16274,6 +16353,7 @@
16274
16353
  clearSearch,
16275
16354
  datasource,
16276
16355
  translationUrl,
16356
+ isLoggedIn,
16277
16357
  input_input_handler,
16278
16358
  input_binding,
16279
16359
  click_handler,
@@ -16299,13 +16379,15 @@
16299
16379
  safe_not_equal,
16300
16380
  {
16301
16381
  endpoint: 0,
16302
- datasource: 17,
16382
+ datasource: 19,
16303
16383
  lang: 1,
16304
16384
  clientstyling: 2,
16305
16385
  clientstylingurl: 3,
16306
16386
  integratedgameframedesktop: 4,
16307
16387
  integratedgameframemobile: 5,
16308
- translationUrl: 18
16388
+ gamepagemodalurl: 6,
16389
+ translationUrl: 20,
16390
+ showfavorites: 7
16309
16391
  },
16310
16392
  null,
16311
16393
  [-1, -1]
@@ -16332,7 +16414,9 @@
16332
16414
  "clientstylingurl",
16333
16415
  "integratedgameframedesktop",
16334
16416
  "integratedgameframemobile",
16335
- "translationUrl"
16417
+ "gamepagemodalurl",
16418
+ "translationUrl",
16419
+ "showfavorites"
16336
16420
  ];
16337
16421
  }
16338
16422
 
@@ -16346,7 +16430,7 @@
16346
16430
  }
16347
16431
 
16348
16432
  get datasource() {
16349
- return this.$$.ctx[17];
16433
+ return this.$$.ctx[19];
16350
16434
  }
16351
16435
 
16352
16436
  set datasource(datasource) {
@@ -16399,14 +16483,32 @@
16399
16483
  flush();
16400
16484
  }
16401
16485
 
16486
+ get gamepagemodalurl() {
16487
+ return this.$$.ctx[6];
16488
+ }
16489
+
16490
+ set gamepagemodalurl(gamepagemodalurl) {
16491
+ this.$$set({ gamepagemodalurl });
16492
+ flush();
16493
+ }
16494
+
16402
16495
  get translationUrl() {
16403
- return this.$$.ctx[18];
16496
+ return this.$$.ctx[20];
16404
16497
  }
16405
16498
 
16406
16499
  set translationUrl(translationUrl) {
16407
16500
  this.$$set({ translationUrl });
16408
16501
  flush();
16409
16502
  }
16503
+
16504
+ get showfavorites() {
16505
+ return this.$$.ctx[7];
16506
+ }
16507
+
16508
+ set showfavorites(showfavorites) {
16509
+ this.$$set({ showfavorites });
16510
+ flush();
16511
+ }
16410
16512
  }
16411
16513
 
16412
16514
  !customElements.get('casino-search') && customElements.define('casino-search', CasinoSearch);