-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
1563 lines (1482 loc) · 87.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>BESTBASTARDGANPUNKS</title>
<link type="text/css" rel="stylesheet" href="css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="css/bootstrap-vue.min.css"/>
<link type="text/css" rel="stylesheet" href="css/bootstrap-vue-icons.min.css"/>
<!-- Load polyfills to support older browsers -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver"></script>
<script src="js/vue.js"></script>
<script src="js/bootstrap-vue.min.js"></script>
<script src="js/bootstrap-vue-icons.min.js"></script>
<script src="js/dexie.js"></script>
<script src="js/libgif.js"></script>
<script src="js/ethers-5.4.6.umd.min.js"></script>
<script src="js/bignumber.min.js"></script>
<!-- <script src="js/apexcharts.js"></script> -->
<!-- ENS stuff -->
<script src="js/punycode.js"></script>
<script src="js/idna-map.js"></script>
<script src="js/idna-uts46-hx.js"></script>
<script src="js/js-sha3.js"></script>
<script src="js/eth-ens-namehash.js"></script>
<script src="bastardData.min.js"></script>
<script src="categories.js"></script>
<script src="showcase.js"></script>
<script src="deploymentData.js"></script>
<script src="ensMapSnapshot.js"></script>
<script src="ownersSnapshot.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="manifest" href="images/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="images/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div id="app">
<b-container fluid class="m-0 p-1">
<div>
<b-navbar variant="light">
<b-navbar-brand to="./" variant="primary" v-b-popover.hover.bottom="'Best Bastard GAN Punks'">
BESTBASTARDGANPUNKS
</b-navbar-brand>
<div v-for="item in getHeaderBastards">
<b-link @click="displayToken(item)">
<b-avatar rounded="sm" variant="light" size="3.0rem" :src="data[item] ? data[item].images[0] : null" v-b-popover.hover.bottom="'#' + item" class="ml-2"></b-avatar>
</b-link>
</div>
<b-navbar-nav class="ml-auto">
<b-button size="sm" variant="outline-primary" class="ml-4" v-b-popover.hover="'CONNECT TO SEE YOUR BASTARDS'" @click="connect();" v-if="!connected">CONNECT WALLET</b-button>
<b-button size="sm" variant="outline-primary" class="ml-4" v-b-popover.hover="'DISCONNECT TO SEE BOKKY\'S BASTARDS'" @click="disconnect();" v-if="connected">{{ ensOrShortName(account) }}</b-button>
</b-navbar-nav>
</b-navbar>
</div>
<div>
<b-card no-body class="mt-1">
<div>
<b-modal ref="gif-frame-extraction-modal" hide-footer @shown="onGIFFrameSelectionModalOpened" dialog-class="mw-100">
<template #modal-title>
{{ selected.tokenId == null ? null : data[selected.tokenId].name }}
<span v-if="selected.isGIF"> - Frame {{ selected.frame == null ? '(loading)' : selected.frame }}</span>
</template>
<div class="d-block text-center">
<img id="thegif1" :src="selected.tokenId != null && data[selected.tokenId] ? data[selected.tokenId].images[0] : null" :rel:animated_src="selected.tokenId && data[selected.tokenId] ? data[selected.tokenId].images[0] : null" rel:auto_play="0" rel:rubbable="1" class="pr-3" />
</div>
<b-input-group v-if="selected.isGIF">
<template #prepend>
<b-form-spinbutton wrap @change="setFrame()" v-model.trim="selected.frame" min="0" :max="selected.frames == null ? 0 : (selected.frames - 1)" class="mr-2"></b-form-spinbutton>
<b-input-group-text>0</b-input-group-text>
</template>
<b-form-input @change="setFrame()" v-model.trim="selected.frame" type="range" min="0" :max="selected.frames == null ? 0 : (selected.frames - 1)" class="w-25"></b-form-input>
<template #append>
<b-input-group-text>{{ selected.frames == null ? 0 : (selected.frames - 1) }}</b-input-group-text>
</template>
</b-input-group>
</b-modal>
</div>
<template>
<div>
<b-sidebar right id="sidebar-border" sidebar-class="border-right border-danger">
<div v-for="(categoryKey, categoryIndex) in Object.keys(categories).sort()" v-bind:key="categoryIndex">
<b-card body-class="p-0" header-class="m-0 p-0 pl-2" footer-class="p-1" class="m-3 p-0">
<template #header>
<span variant="secondary" class="small truncate">
{{ categoryKey }}
</span>
</template>
<font size="-2">
<b-table small fixed striped sticky-header="200px" :fields="categoryFields" :items="getSortedValuesForCategory(categoryKey)" head-variant="light">
<template #cell(select)="data">
<b-form-checkbox @change="filterChange(categoryKey, data.item.categoryOption)"></b-form-checkbox>
</template>
</b-table>
</font>
</b-card>
</div>
</b-sidebar>
</div>
</template>
<div v-if="processing == null && settings.searchAccount != null && settings.searchAccount.length > 0 && collatedOwners.length == 0">
<b-jumbotron header="WEB3 CONNECTION REQUIRED" bg-variant="info" text-variant="white" border-variant="dark" class="m-5 p-5">
TO RETRIEVE ERC-721 TOKEN OWNERSHIP AND ENS INFOMRATION. YOU CAN CONTINUE USING THIS TOOL WITHOUT A CONNECTION BUT OWNER INFORMATION AND SEARCH WILL NOT WORK. CLICK ON THE BUTTON ON THE TOP RIGHT TO CONNECT. CLEAR THE OWNER SEARCH FIELD TO REMOVE THIS MESSAGE.
</b-jumbotron>
</div>
<div v-if="processing != null">
<b-jumbotron header="PROCESSING" bg-variant="info" text-variant="white" border-variant="dark" class="m-5 p-5">
{{ processing }}
</b-jumbotron>
</div>
<b-tabs card v-model="tabIndex" align="right">
<b-tab title="SEXY BASTARDS">
<b-card-text>
<div class="d-flex m-0 p-0" style="height: 37px;">
<div>
<b-form-input type="text" size="sm" @change="recalculate('searchTokenId')" v-model.trim="settings.searchTokenId" debounce="600" placeholder="🔍 ID1, ID2-ID3, ..."></b-form-input>
</div>
<div class="pl-1">
<b-form-input type="text" size="sm" @change="recalculate('searchAccount')" v-model.trim="settings.searchAccount" debounce="600" placeholder="🔍 ENS1, ADDY2, ..."></b-form-input>
</div>
<div class="pl-1">
<b-button size="sm" :pressed.sync="settings.mySexyBastards" @click="recalculate('searchAccount')" variant="outline-primary" v-b-popover.hover="'VIEW ONLY MY SEXY BASTARDS'">MY SEXY BASTARDS</b-button>
</div>
<div class="pl-1">
<b-button size="sm" :pressed.sync="settings.advancedSearch" @click="saveSettings('advancedSearch')" variant="outline-primary" v-b-popover.hover="'ADVANCED SEARCH'"><span v-if="settings.advancedSearch"><b-icon-chevron-double-up shift-v="+1" font-scale="1.0"></b-icon-chevron-double-up></span><span v-else><b-icon-chevron-double-down shift-v="+1" font-scale="1.0"></b-icon-chevron-double-down></span></b-button>
</div>
<div class="pr-1 flex-grow-1">
</div>
<div class="pl-1">
<font size="-2">{{ tokensSearchResults.length }}/{{ getTotalSupply }}</font>
</div>
<div class="pl-1">
<b-pagination size="sm" v-model="tokensCurrentPage" :total-rows="tokensSearchResults.length" :per-page="tokensPageSize"></b-pagination>
</div>
<div class="pl-1">
<b-form-input type="text" size="sm" v-model.trim="tokensCurrentPage" debounce="600" class="w-25"></b-form-input>
</div>
<div class="pl-1">
<b-form-select size="sm" v-model="tokensPageSize" :options="pageSizes"></b-form-select>
</div>
<div class="pl-1" v-if="settings.cardView">
<b-form-select size="sm" v-model="cardImageSizeCurrent" :options="cardImageSizeOptions"></b-form-select>
</div>
<div class="pl-1">
<b-button size="sm" :pressed.sync="settings.cardView" @click="saveSettings('cardView')" variant="link" v-b-popover.hover="'LIST OR CARD VIEW'"><span v-if="settings.cardView"><b-icon-list-ol shift-v="+1" font-scale="1.0"></b-icon-list-ol></span><span v-else><b-icon-grid3x3-gap shift-v="+1" font-scale="1.0"></b-icon-grid3x3-gap></span></b-button>
<b-button size="sm" v-b-toggle.sidebar-border variant="link" v-b-popover.hover="'ADVANCED SERACH'" class="m-0 p-0"><b-icon-search shift-v="+.5" font-scale="1.2"></b-icon-search></b-button>
</div>
</div>
<div>
<!-- visible -->
<b-collapse v-model="settings.advancedSearch" class="m-2">
<b-card>
<b-card-group deck>
<b-card header="QUICK FILTER" style="min-width: 18rem; max-width: 18rem;" class="mb-2">
<b-card-text>
<b-form-input type="text" size="sm" @change="recalculate('searchTokenId')" v-model.trim="settings.searchTokenId" debounce="600" placeholder="🔍 ID1, ID2-ID3, ..." class="mb-2"></b-form-input>
<b-form-input type="text" size="sm" @change="recalculate('searchAccount')" v-model.trim="settings.searchAccount" debounce="600" placeholder="🔍 ENS1, ADDY2, ..." class="mb-2"></b-form-input>
<b-form-input type="text" size="sm" @change="recalculate('searchLyrics')" v-model.trim="settings.searchLyrics" debounce="600" placeholder="🔍 LYRICS" class="mb-2"></b-form-input>
<b-form-checkbox @change="recalculate('searchForSaleOnly')" v-model.trim="settings.searchForSaleOnly" debounce="600">For Sale Only (coming)</b-form-checkbox>
</b-card-text>
</b-card>
<b-card header="FILTER BY TAGS" style="min-width: 18rem; max-width: 18rem;" class="mb-2">
<b-card-text>
<b-form-select size="sm" @change="recalculate('selectedTags')" v-model="selectedTags" :options="getTags" multiple :select-size="10" variant="outline-primary"></b-form-select>
</b-card-text>
</b-card>
<b-card header="FILTER BY CATEGORIES" style="min-width: 18rem; max-width: 18rem;" class="mb-2">
<b-card-text>
<b-form-select size="sm" @change="recalculate('selectedCategories')" v-model="selectedCategories" :options="getCategories" multiple :select-size="10" variant="outline-primary"></b-form-select>
</b-card-text>
</b-card>
<b-card header="SELECTION TOOLS" style="min-width: 18rem; max-width: 18rem;" class="mb-2">
<b-card-text>
{{ getSelectedTokenIds }}<br />
<b-button size="sm" @click="copyCurrentFilteredResultsIntoSelection" variant="outline-primary" v-b-popover.hover="'COPY CURRENT FILTERED RESULTS INTO SELECTION'"><b-icon-caret-right-square shift-v="+1" font-scale="1.0"></b-icon-caret-right-square></b-button>
<b-button size="sm" @click="settings.selection = {}; saveSettings('resetSelection')" variant="outline-primary" v-b-popover.hover="'RESET SELECTION'"><b-icon-trash shift-v="+1" font-scale="1.0"></b-icon-trash></b-button>
</b-card-text>
</b-card>
</b-card-group>
</b-card>
</b-collapse>
</div>
<div v-if="settings.cardView">
<b-card-group deck>
<div v-for="record in pagedTokensResults">
<b-card body-class="p-1" header-class="p-1" footer-class="p-1" img-top class="m-1 p-0 border-0">
<b-link @click="displayToken(record.tokenId)" v-b-popover.hover="'CLICK FOR DETAILS'">
<b-img-lazy :width="cardImageSizeCurrent + '%'" :src="record.images[0]" />
</b-link>
<b-card-text>
<b-form-checkbox @input="saveSettings('cardViewSelection')" inline v-model="settings.selection[record.tokenId]">
<b-link :href="'https://www.bastardganpunks.club/v2/' + record.tokenId" v-b-popover.hover="'VIEW NFT IN ORIGNIAL WEBSHITE'" target="_blank">
{{ '#' + record.tokenId }}
</b-link>
</b-form-checkbox>
<b-link v-if="cardImageSizeCurrent >= 300" :href="'https://opensea.io/accounts/' + owners[record.tokenId]" v-b-popover.hover="'VIEW OWNER ACCOUNT IN OPENSEA'" target="_blank">
{{ ensOrShortName(owners[record.tokenId], 14) }}
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" size="sm" @click="settings.searchAccount = owners[record.tokenId]; tabIndex = 0; recalculate('tokenSearch'); " v-b-popover.hover="'FILTER BY OWNER ACCOUNT'" variant="link">
<b-icon-search shift-v="+1" font-scale="0.8"></b-icon-search>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="record.images[1]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON IPFS'" target="_blank">
<b-icon-image shift-v="+1" font-scale="0.8"></b-icon-image>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="record.images[2]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON ARWEAVE'" target="_blank">
<b-icon-image-fill shift-v="+1" font-scale="0.8"></b-icon-image-fill>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="'./arweaveimages/' + record.tokenId + '_' + record.images[2].replace('https://arweave.net/', '') + (record.imageMosaic != null ? '.gif' : '.png')" v-b-popover.hover="'VIEW SAVED COPY OF ORIGINAL ARWEAVE IMAGE'" target="_blank">
<b-icon-card-image shift-v="+1" font-scale="0.8"></b-icon-card-image>
</b-link>
<span v-if="record.mosaicurl != null && cardImageSizeCurrent >= 300">
<b-link :href="record.mosaicurl" v-b-popover.hover="'VIEW HYPED AF (ANIMATED) MOSAIC'" target="_blank">
<b-icon-grid3x3-gap shift-v="+1" font-scale="0.8"></b-icon-grid3x3-gap>
</b-link>
</span>
<b-link v-if="cardImageSizeCurrent >= 300" :href="record.permalink" target="_blank">
<span v-if="osData[record.tokenId] && osData[record.tokenId].sellOrder"><b-icon-cart-fill shift-v="+1" font-scale="0.8" v-b-popover.hover="'FOR SALE IN OPENSEA'"></b-icon-cart-fill></span><span v-else><b-icon-cart4 shift-v="+1" font-scale="0.8" v-b-popover.hover="'NOT FOR SALE IN OPENSEA'"></span>
</b-link>
<span v-if="cardImageSizeCurrent >= 300">
<font size="-2">
<b-form-tags size="sm" @input="saveTags" v-model="tags[record.tokenId]" tag-variant="primary" tag-pills separator=" " v-b-popover.hover="'ENTER NEW TAGS'" placeholder="" class="ml-0 mt-1 mw-100"></b-form-tags>
</font>
</span>
</b-card-text>
</b-card>
</div>
</b-card-group>
</div>
<div v-if="!settings.cardView">
<b-table small :fields="fields" :items="pagedTokensResults" responsive="sm">
<template #cell(image)="data">
<b-link @click="displayToken(data.item.tokenId)" v-b-popover.hover="'Click for details'">
<b-img-lazy width="300%" :src="data.item.images[0]" />
</b-link>
<hr />
<b-img-lazy width="60%" :src="'https://ipfs.io/ipfs/QmV7vA888YVzmhL2epitCobSZxSFSAjTaa1r5CWqe5YM2k/gactans/' + data.item.tokenId + '_first.jpg'" /></b-img-lazy>
<b-img-lazy width="120%" :src="'https://ipfs.io/ipfs/QmV7vA888YVzmhL2epitCobSZxSFSAjTaa1r5CWqe5YM2k/gactans/' + data.item.tokenId + '_double.jpg'" /></b-img-lazy>
<b-img-lazy width="60%" :src="'https://ipfs.io/ipfs/QmV7vA888YVzmhL2epitCobSZxSFSAjTaa1r5CWqe5YM2k/gactans/' + data.item.tokenId + '.jpg'" /></b-img-lazy>
</template>
<template #cell(tokenId)="data">
<b-form-checkbox @input="saveSettings('listViewSelection')" inline v-model="settings.selection[data.item.tokenId]">
<b-link :href="'https://www.bastardganpunks.club/v2/' + data.item.tokenId" v-b-popover.hover="'VIEW NFT IN ORIGNIAL WEBSHITE'" target="_blank">
{{ '#' + data.item.tokenId }}
</b-link>
</b-form-checkbox>
<br />
<span v-if="owners.length > 0">
<b-link :href="'https://opensea.io/accounts/' + owners[data.item.tokenId]" v-b-popover.hover="'VIEW OWNER ACCOUNT IN OPENSEA'" target="_blank">
<font size="-2">{{ ensOrShortName(owners[data.item.tokenId]) }}</font>
</b-link>
</span>
<b-link size="sm" @click="settings.searchAccount = owners[data.item.tokenId]; tabIndex = 0; recalculate('tokenSearch'); " v-b-popover.hover="'FILTER BY OWNER ACCOUNT'" variant="link">
<b-icon-search shift-v="+1" font-scale="0.8"></b-icon-search>
</b-link>
<b-link :href="data.item.images[1]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON IPFS'" target="_blank">
<b-icon-image shift-v="+1" font-scale="0.8"></b-icon-image>
</b-link>
<b-link :href="data.item.images[2]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON ARWEAVE'" target="_blank">
<b-icon-image-fill shift-v="+1" font-scale="0.8"></b-icon-image-fill>
</b-link>
<b-link :href="'./arweaveimages/' + data.item.tokenId + '_' + data.item.images[2].replace('https://arweave.net/', '') + (data.item.imageMosaic != null ? '.gif' : '.png')" v-b-popover.hover="'VIEW SAVED COPY OF ORIGINAL ARWEAVE IMAGE'" target="_blank">
<b-icon-card-image shift-v="+1" font-scale="0.8"></b-icon-card-image>
</b-link>
<span v-if="data.item.imageMosaic != null">
<b-link :href="'hypedafmosaic/' + data.item.tokenId + '.png'" v-b-popover.hover="'VIEW HYPED AF (ANIMATED) MOSAIC'" target="_blank">
<b-icon-grid3x3-gap shift-v="+1" font-scale="0.8"></b-icon-grid3x3-gap>
</b-link>
</span>
<b-link :href="data.item.permalink" target="_blank">
<span v-if="osData[data.item.tokenId] && osData[data.item.tokenId].sellOrder"><b-icon-cart-fill shift-v="+1" font-scale="0.8" v-b-popover.hover="'FOR SALE IN OPENSEA'"></b-icon-cart-fill></span><span v-else><b-icon-cart4 shift-v="+1" font-scale="0.8" v-b-popover.hover="'NOT FOR SALE IN OPENSEA'"></b-icon-cart4></span>
</b-link>
<div v-if="owners[data.item.tokenId] && metadataDirtyFlag[data.item.tokenId]">
<b-button v-if="owners[data.item.tokenId].toLowerCase() == account.toLowerCase()" size="sm" @click="setMetaData(data.item.tokenId)" variant="link" v-b-popover.hover="'SET YOURBASTARDYOURCALL METADATA (LICENSE)'" class="m-0 p-0"><b-icon-pencil-square shift-v="+5" font-scale="0.9" variant="danger"></b-icon-pencil-square></b-button>
</div>
<div v-if="owners[data.item.tokenId] && metadataDirtyFlag[data.item.tokenId]">
<b-form-textarea size="sm" @change="metadataDirtyFlag[data.item.tokenId] = true;" :disabled="owners[data.item.tokenId].toLowerCase() != account.toLowerCase()" v-model.trim="metadatas[data.item.tokenId]" placeholder="NO METADATA ..." rows="3" max-rows="10" class="ml-0 mt-1 mb-1"></b-form-textarea>
</div>
<b-form-textarea size="sm" @change="saveNotes('listView')" v-model.trim="notes[data.item.tokenId]" placeholder="NOTES ..." rows="3" max-rows="10" class="ml-0 mt-1 mb-1"></b-form-textarea>
<b-form-tags size="sm" @input="saveTags" v-model="tags[data.item.tokenId]" tag-variant="primary" tag-pills size="sm" separator=" " v-b-popover.hover="'ENTER NEW TAGS'" placeholder="TAGS ..." class="ml-0 mt-1 mb-1"></b-form-tags>
<div v-if="osData[data.item.tokenId] && osData[data.item.tokenId].sellOrder">
<b-button size="sm" variant="warning" :href="data.item.permalink" v-b-popover.hover="'PURCHASE IN OPENSEA'" target="_blank" class="m-1 p-1">
<b-badge size="sm" variant="light">{{ formatETH(osData[data.item.tokenId].sellOrder.currentPrice) }}</b-badge>
{{ osData[data.item.tokenId].sellOrder.symbol }} <font size="-2">{{ formatDate(osData[data.item.tokenId].sellOrder.listingTime) }}</font>
</b-button>
</div>
<div v-if="osData[data.item.tokenId] && osData[data.item.tokenId].lastSale">
<b-button size="sm" variant="success" :href="'https://etherscan.io/tx/' + osData[data.item.tokenId].lastSale.tx" v-b-popover.hover="'VIEW PURCHASE IN BLOCK EXLPORER'" target="_blank" class="m-1 p-1">
<b-badge size="sm" variant="light">{{ formatETH(osData[data.item.tokenId].lastSale.totalPrice) }}</b-badge>
{{ osData[data.item.tokenId].lastSale.symbol }} <font size="-2">{{ formatDate(osData[data.item.tokenId].lastSale.eventTimestamp) }}</font>
</b-button>
</div>
</template>
<template #cell(description)="data">
<span v-for="line in data.item.description.split('\n')">
<b>{{ line }}</b><br />
</span>
</template>
<template #cell(attributes)="data">
<b-row v-for="(attribute, i) in data.item.attributes" v-bind:key="i" class="m-0 p-0">
<b-col class="m-0 p-0"><font size="-3">{{ attribute.trait_type }}</font></b-col><b-col class="m-0 p-0"><b><font size="-2">{{ attribute.value }}</font></b></font></b-col>
</b-row>
</template>
</b-table>
</div>
</b-card-text>
</b-tab>
<b-tab lazy>
<template #title>
<b-spinner type="grow" variant="warning" small></b-spinner> SHOWCASE
</template>
<b-card-text>
<div class="d-flex m-0 p-0" style="height: 37px;">
<div>
<b-form-select v-model="selectedShowcaseBastardsEvents" :options="getShowcaseBastardsEvents"></b-form-select>
</div>
<div class="pr-1 flex-grow-1">
</div>
<div class="pl-2">
<input v-model="colour" type="color" id="colourPicker" name="colourPicker" debounce="600">
<label for="colourPicker">{{ colour }}</label>
</div>
<div v-if="settings.sortOption == 'random'" class="pl-2">
<b-button size="sm" :pressed.sync="randomise" variant="link" v-b-popover.hover="'RANDOMISE'"><b-icon-arrow-clockwise shift-v="-1" font-scale="1.4"></b-icon-arrow-clockwise></b-button>
</div>
<div class="pl-2">
<b-form-select size="sm" @input="saveSettings('sortOption')" v-model="settings.sortOption" :options="sortOptions"></b-form-select>
</div>
<div class="pl-2">
<b-form-select size="sm" v-model="cardImageSizeCurrent" :options="cardImageSizeOptions"></b-form-select>
</div>
</div>
</b-card-text>
<b-card-text>
<b-card-group deck>
<div v-for="record in getShowcaseBastards(selectedShowcaseBastardsEvents).tokenIds">
<b-card v-if="data[record]" body-class="p-1" header-class="p-1" footer-class="p-1" img-top class="m-1 p-0 border-0">
<b-card-text>
<b-link @click="displayToken(data[record].tokenId)" v-b-popover.hover="'CLICK FOR DETAILS'">
<b-img-lazy :width="cardImageSizeCurrent + '%'" :src="data[record].images[0]" />
</b-link>
</b-card-text>
<b-card-text>
<b-form-checkbox @input="saveSettings('cardViewSelection')" inline v-model="settings.selection[record]">
<b-link :href="'https://www.bastardganpunks.club/v2/' + record" v-b-popover.hover="'VIEW NFT IN ORIGNIAL WEBSHITE'" target="_blank">
{{ '#' + record }}
</b-link>
</b-form-checkbox>
<b-link v-if="cardImageSizeCurrent >= 300" :href="'https://opensea.io/accounts/' + owners[record]" v-b-popover.hover="'VIEW OWNER ACCOUNT IN OPENSEA'" target="_blank">
{{ ensOrShortName(owners[record], 15) }}
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" size="sm" @click="settings.searchAccount = owners[record]; tabIndex = 0; recalculate('tokenSearch'); " v-b-popover.hover="'FILTER BY OWNER ACCOUNT'" variant="link">
<b-icon-search shift-v="+1" font-scale="0.8"></b-icon-search>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="data[record].images[1]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON IPFS'" target="_blank">
<b-icon-image shift-v="+1" font-scale="0.8"></b-icon-image>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="data[record].images[2]" v-b-popover.hover="'VIEW ORIGINAL IMAGE ON ARWEAVE'" target="_blank">
<b-icon-image-fill shift-v="+1" font-scale="0.8"></b-icon-image-fill>
</b-link>
<b-link v-if="cardImageSizeCurrent >= 300" :href="'./arweaveimages/' + record + '_' + data[record].images[2].replace('https://arweave.net/', '') + (data[record].imageMosaic != null ? '.gif' : '.png')" v-b-popover.hover="'VIEW SAVED COPY OF ORIGINAL ARWEAVE IMAGE'" target="_blank">
<b-icon-card-image shift-v="+1" font-scale="0.8"></b-icon-card-image>
</b-link>
<span v-if="data[record].mosaicurl != null && cardImageSizeCurrent >= 300">
<b-link :href="data[record].mosaicurl" v-b-popover.hover="'VIEW HYPED AF (ANIMATED) MOSAIC'" target="_blank">
<b-icon-grid3x3-gap shift-v="+1" font-scale="0.8"></b-icon-grid3x3-gap>
</b-link>
</span>
<b-link v-if="cardImageSizeCurrent >= 300" :href="data[record].permalink" target="_blank">
<span v-if="osData[record] && osData[record].sellOrder"><b-icon-cart-fill shift-v="+1" font-scale="0.8" v-b-popover.hover="'FOR SALE IN OPENSEA'"></b-icon-cart-fill></span><span v-else><b-icon-cart4 shift-v="+1" font-scale="0.8" v-b-popover.hover="'NOT FOR SALE IN OPENSEA'"></span>
</b-link>
<span v-if="cardImageSizeCurrent >= 300">
<font size="-2">
<b-form-tags size="sm" @input="saveTags" v-model="tags[record]" tag-variant="primary" tag-pills separator=" " v-b-popover.hover="'ENTER NEW TAGS'" placeholder="" class="ml-0 mt-1 mw-100"></b-form-tags>
</font>
</span>
</b-card-text>
</b-card>
</div>
</b-card-group>
</b-card-text>
</b-tab>
<b-tab title="SYNC DATA">
<b-card-text>
<b-button size="sm" @click="loadOSData()" variant="outline-primary">
SYNC OPENSEA SALES AND LISTINGS DATA
</b-button>
</b-card-text>
<b-card-text>
TAKES ~ 6 MINUTES. YOU CAN CONTINUE BROWSING THE BEAUTIFUL BASTARDS WHILE THIS PROCESS RUNS IN THE BACKGROUND.
</b-card-text>
</b-tab>
<b-tab lazy title="OWNERS">
<b-card-text>
<div class="d-flex m-0 p-0" style="height: 37px;">
<div class="pr-1 flex-grow-1">
</div>
<div class="pl-2">
<font size="-2">Unique Owners: {{ collatedOwners.length }} ({{ ((collatedOwners.length*100)/getTotalSupply).toFixed(2) + '%' }}); Total Supply: {{ getTotalSupply }}. Connect your wallet to retrieve up-to-date owner data</font>
</div>
<div class="pl-2">
<b-pagination size="sm" v-model="ownersCurrentPage" :total-rows="collatedOwners.length" :per-page="ownersPageSize"></b-pagination>
</div>
<div class="pl-2">
<b-form-select size="sm" v-model="ownersPageSize" :options="pageSizes"></b-form-select>
</div>
</div>
<b-table small :fields="ownersFields" :items="pagedCollatedOwnersResults" responsive="sm">
<template #cell(index)="data">
{{ data.item.index }}
</template>
<template #cell(owner)="data">
{{ ensOrShortName(data.item.owner) }}<br />
{{ data.item.tokens.length + ' (' + (data.item.tokens.length*100/getTotalSupply).toFixed(2) + '%)'}}<br />
<b-link :href="'https://opensea.io/accounts/' + data.item.owner + '?search[sortAscending]=false&search[sortBy]=LAST_TRANSFER_DATE'" v-b-popover.hover="'VIEW OWNER ACCOUNT IN OPENSEA'" target="_blank">
<b-icon-link shift-v="+1" font-scale="1.0"></b-icon-link>
</b-link>
<b-link size="sm" @click="settings.searchAccount = data.item.owner; tabIndex = 0; recalculate('ownerSearch'); " variant="outline-primary" v-b-popover.hover="'FILTER BY OWNER ACCOUNT'" >
<b-icon-search shift-v="+1" font-scale="1.0"></b-icon-search>
</b-link>
</template>
<template #cell(tokens)="data">
<span v-for="tokenId in data.item.tokens">
<b-link :href="'https://opensea.io/assets/0x31385d3520bced94f77aae104b406994d8f2168c/' + tokenId" v-b-popover.hover="'VIEW #' + tokenId + ' IN OPENSEA'" target="_blank">
<b-img-lazy :width="'60%'" :src="getImagePreview(tokenId)" />
</b-link>
</span>
</template>
</b-table>
</b-card-text>
</b-tab>
<b-tab lazy title="CATEGORIES">
<b-card-text>
<b-table small striped :items="getTokenIdsByCategories" head-variant="light">
<template #cell(tokenIds)="data">
<span v-for="tokenId in data.item.tokenIds">
<b-link :href="'https://opensea.io/assets/0x31385d3520bced94f77aae104b406994d8f2168c/' + tokenId" v-b-popover.hover="'VIEW #' + tokenId + ' IN OPENSEA'" target="_blank">
<b-img-lazy :width="'60%'" :src="getImagePreview(tokenId)" />
</b-link>
</span>
</template>
</b-table>
</b-card-text>
<b-card-text>
Maintained in <a href="https://github.com/bokkypoobah/BestBastardGANPunks/blob/main/docs/categories.js" target="_blank">https://github.com/bokkypoobah/BestBastardGANPunks/blob/main/docs/categories.js</a>. Submit PR or ping changes to <a href="https://twitter.com/BokkyPooBah" target="_blank">@BokkyPooBah</a>.
</b-card-text>
</b-tab>
<b-tab title="SETTINGS">
<b-card-text>
<div class="d-flex m-0 p-0" style="height: 15px;">
<div class="pr-1 flex-grow-1">
</div>
<div class="pl-2">
<b-button size="sm" @click="newGroup('action')" variant="link" v-b-popover.hover="'ADD NEW GROUP'" class="m-0 p-0"><b-icon-plus shift-v="-1" font-scale="1.0"></b-icon-plus></b-button>
</div>
</div>
</b-card-text>
<b-card-text v-if="groups.length == 0">
<h6>CLICK + TO ADD A NEW GROUP</h6>
</b-card-text>
<div v-for="(group, groupIndex) in groups">
<b-card body-class="p-1" header-class="p-1" footer-class="p-1" class="m-1 mb-3 p-0">
<template #header>
<h6 class="mb-0"><b-button size="sm" :pressed.sync="group.active" @click="saveGroups('active')" variant="link" v-b-popover.hover="'ENABLE OR DISABLE IN FILTERS'"><span v-if="group.active"><b-icon-check-square-fill shift-v="+1" font-scale="1.0"></b-icon-check-square-fill></span><span v-else><b-icon-x-square shift-v="+1" font-scale="1.0"></b-icon-x-square></span></b-button>{{ groupIndex+1 }}. {{ group.name }} <b-button size="sm" class="float-right m-0 p-0" @click="deleteGroup(data.index)" variant="link" v-b-popover.hover="'DELETE GROUP'"><b-icon-trash shift-v="+1" font-scale="1.0"></b-icon-trash></b-button></h6>
</template>
<b-card-text>
<b-form-group label-cols="3" content-cols="9" label="GROUP NAME" class="m-0 p-0">
<b-form-input type="text" size="sm" @change="saveGroups('group.name')" v-model.trim="group.name" debounce="600" placeholder="GROUP NAME"></b-form-input>
</b-form-group>
<b-form-group label-cols="3" content-cols="9" label="NOTES" class="m-0 p-0">
<b-form-textarea size="sm" @change="saveGroups('group.notes')" v-model.trim="group.notes" placeholder="NOTES..." rows="3" max-rows="6"></b-form-textarea>
</b-form-group>
</b-card-text>
<b-card-text>
<b-table small striped hover :fields="accountsFields" :items="group.accounts" responsive="sm" show-empty>
<template #cell(active)="data">
<b-button size="sm" :pressed.sync="data.item.active" @click="saveGroups('active')" variant="link" v-b-popover.hover="'ENABLE OR DISABLE IN FILTERS'"><span v-if="data.item.active"><b-icon-check-square-fill shift-v="+1" font-scale="1.0"></b-icon-check-square-fill></span><span v-else><b-icon-x-square shift-v="+1" font-scale="1.0"></b-icon-x-square></span></b-button>
</template>
<template #cell(name)="data">
<b-form-input type="text" size="sm" @change="saveGroups('accountName')" v-model.trim="data.item.name" debounce="600" placeholder="NAME"></b-form-input>
</template>
<template #cell(account)="data">
<b-input-group>
<b-form-input type="text" size="sm" @change="saveGroups('account')" v-model.trim="data.item.account" debounce="600" placeholder="0x12AbC..."></b-form-input>
<template #append>
<b-button size="sm" @click="data.item.account = account; saveGroups('filleWithAccount')" v-b-popover.hover="'FILL WITH CURRENT WEB3 ACCOUNT ' + account"><b-icon-chevron-double-left shift-v="+1" font-scale="1.0"></b-icon-chevron-double-left></b-button>
</template>
</b-input-group>
</template>
<template #cell(filterInOut)="data">
<b-form-select size="sm" v-model="data.item.filterInOut" :options="filterOptions"></b-form-select>
</template>
<template #cell(filter)="data">
<b-form-input type="text" size="sm" :disabled="data.item.filterInOut == null" @change="saveGroups('account')" v-model.trim="data.item.filter" debounce="600" placeholder="ID1, ID2-ID3, ..."></b-form-input>
</template>
<template #cell(action)="data">
<b-button size="sm" @click="deleteAccount(group, data.index)" variant="link" v-b-popover.hover="'DELETE ROW'"><b-icon-trash shift-v="+1" font-scale="1.0"></b-icon-trash></b-button>
</template>
<template #head(action)="data">
<b-button size="sm" @click="newAccount(group)" variant="link" v-b-popover.hover="'ADD NEW LINE'"><b-icon-plus shift-v="-1" font-scale="1.0"></b-icon-plus></b-button>
</template>
<template #empty="scope">
<h6>CLICK + TO ADD A NEW ACCOUNT</h6>
</template>
</b-table>
</b-card-text>
</b-card>
</div>
</b-tab>
<b-tab title="INFO">
<h6 class="mb-1">WHAT IS THIS WEBSHITE ABOUT?</h6>
<b-card-text>
A SMOL WEB3 APP TO VIEW YOUR BASTARD GAN PUNKS FROM <a href="https://www.bastardganpunks.club/" target="_blank">https://www.bastardganpunks.club/</a>. OPEN SAUCED CODE IS AVAILBLE FOR YOUR TO IMPROVE ON - SEE BELOW.
THIS SITE CURRENTLY LISTS BGANPUNKV2 (VERSION 2) NFTS, NOT BGANPUNKV1 (VERSION 1) <a href="https://bganpunks.eth.link/" target="_blank">https://bganpunks.eth.link/</a>.
READ MORE ABOUT BGANPUNKS AT <a href="https://mooncat888.medium.com/introduction-to-bastard-gan-punk-v2-nft-art-collection-c5bb0750432c" target="_blank">Introduction to Bastard Gan Punk V2 NFT art collection</a> and <a href="https://everipedia.org/wiki/lang_en/bastard-gan-punks" target="_blank">Bastard Gan Punks</a>.
</b-card-text>
<b-card-text>
WER ARE NOT AFFILIATED WITH <a href="https://twitter.com/bganpunks" target="_blank">THESE BASTARDS</a> WITH A SANDWICH LOGO. IF YOU HAVE QUESTIONS, HEAD OVER TO THEIR DISCORD, LINEKD FROM THE URLS ABOVE.
<b-card no-body img-src="images/Twitter_bganpunks.png" style="max-width: 20rem;" class="mt-1 ml-5"></b-card>
</b-card-text>
<b-card-text>
NFT AND IMAGE COPYRIGHT INFO SEE <a href="https://www.bastardganpunks.club/#nftownership" target="_blank">https://www.bastardganpunks.club/#nftownership</a>.
A COPY OF THE <a href="https://drive.google.com/drive/folders/1dLnTSUhDlgfdUlzwm1pamiAWUyGVOGj-" target="_blank">HYPED AF MOSAICS</a> HAS BEEN INCLUDED WITH THIS WEBSHITE TO ORGANISE FOR EASIER ACCESS. ONLY THE HYPED AF (ANIMATED) MOSAICS IN THE FIRST 9,000 (#0 to #8,999) TOKENS HAVE BEEN ORGANISED AND THIS REPOSITORY WILL HAVE TO BE UPDATED WHEN THE ORGANISED MOSAICS ARE FINALLY PUBLISHED.
</b-card-text>
<h6 class="mt-4 mb-1">HOW DO I ADOPT SOME BASTARDS?</h6>
<b-card-text>
THE LAST BASTARD WAS MINTED (SEE BELOW) AT <a href="https://etherscan.io/tx/0x8540f856b6db0eab792fda749730865a10178260da06541c84cf585d8dc60592" target="_blank">Jun-25-2021 04:53:13 PM +UTC</a> THROUGH A PROXY CONTRACT AND THERE ARE NO MORE BASTARDS TO ADOPT.
BGANPUNKV2 NFTS CAN BE PURCHASED FROM SECONDARY ERC-721 MARKETS SUCH AS <a href="https://opensea.io/collection/bastard-gan-punks-v2" target="_blank">https://opensea.io/collection/bastard-gan-punks-v2</a>.
SEE ALSO <a href="https://allbastards.com/" target="_blank">https://allbastards.com/</a> and <a href="https://nftexp.io/explore/bastard-gan-punks-v2" target="_blank">https://nftexp.io/explore/bastard-gan-punks-v2</a> FOR MORE INFROMATION.
THIS IS NOT FINANCIAL ADVICE. DO YOUR OWN FUCKING RESEARCH. DISCLOSURE - I HAVE SOME BGANPUNKS.
</b-card-text>
<h6 class="mt-4 mb-1">CONTRACT DETAILS</h6>
<b-card-text>
THE BGANPUNV2 NFT SMART CONTRACT AT <a href="https://etherscan.io/address/0x31385d3520bCED94f77AaE104b406994D8F2168C#code" target="_blank">0x31385d3520bCED94f77AaE104b406994D8F2168C</a>:
<ul>
<li>WAS DEPLOYED AT <a href="https://etherscan.io/tx/0xd875fb294bf841eaf7bffae94bd5488d78f227e9b4a3017105bae31b296419ce" target="_blank">Mar-07-2021 12:03:56 PM +UTC</a> WHERE TOKENS #0 TO 33 WERE MINTED</li>
<li>MINTED THE FINAL TOKEN #11,304 AT <a href="https://etherscan.io/tx/0x8540f856b6db0eab792fda749730865a10178260da06541c84cf585d8dc60592" target="_blank">Jun-25-2021 04:53:13 PM +UTC</a> THROUGH A PROXY CONTRACT WITH A DECLINING PRICE</li>
</ul>
<b-card img-src="images/EtherScan_BGANPUNKSV2_20210703_2211.png" style="max-width: 40rem;" class="ml-5">
<b-card-text>
ETHERSCAN'S <a href="https://etherscan.io/token/tokenholderchart/0x31385d3520bced94f77aae104b406994d8f2168c" target="_blank">BASTARD GAN PUNKS V2 TOKEN HOLDERS @ Jul 3 2021</a>
</b-card-text>
</b-card>
</b-card-text>
<h6 class="mt-4 mb-1">ABOUT THIS APP</h6>
<b-card-text>
<ul>
<li>SOURCE CODE AVAILABLE AT <a href="https://github.com/bokkypoobah/BestBastardGANPunks" target="_blank">https://github.com/bokkypoobah/BestBastardGANPunks</a>. CLONE IT, FORK IT. CONTRIBUTE ANY USEFUL CHANGES BACK TO THIS MAIN REPOSITORY.</li>
<li>THE MAIN BIT OF CODE IS IN <a href="https://github.com/bokkypoobah/BestBastardGANPunks/blob/main/docs/index.html#L416" target="_blank">https://github.com/bokkypoobah/BestBastardGANPunks/blob/main/docs/index.html</a>.</li>
<li>TO SEE HOW IT WORKS, SWITCH TO YOUR WEB BEOWSER DEVELOPER CONSOLE AND TRY STRPPING THROUGH THE SOURCE CODE.</li>
<li>WRITTEN USING THE <a href="https://bootstrap-vue.org/" target="_blank">https://bootstrap-vue.org/</a> FRAMEWWORK</li>
<li>GENERATES "STATIC" DATA BY COLLATING INFOTMSTION FROM THE TOKEN CONTACT'S <em>tokenURI(...)</em> INFORMATION WITH THE INFOTRMATION FROM OPENSEA.IO.</li>
<li>USES <a href="https://github.com/ethers-io/ethers.js/" target="_blank">ETHERS.JS</a> TO CONNECT TO ETHERUEM VIA WEB3 TO RETRIEVE NFT TOKENS OWNED</li>
<li>HAS NO TRACKIING TECHNOLOGY. HOWEVER CONNECTIONS FROM THIS APP TO OPENSEA AND YOUR WEB3 PROVIDER WILL LEAK SOME INFORMATION.</li>
<li>CAN BE RUN ON YOUR OWN COMPUTER BY CLONING THE GITHUB REPOSITORY AND SERVING THE PAGES USING A WEBSERVER, OR THE "ANYWHERE" SERVER.</li>
<li>CAN BE RUN FROM GITHUB PAGES, SO YOU CAN EASILY CLONE, CUSTOMISE AND SERVE YOUR OWN VERSION</li>
<!-- <li>HAS SOME CODE FROM THE IS IT CLEAN TOOL BY <a href="https://twitter.com/yungwknd" target="_blank">@yungwknd</a></li> -->
</ul>
</b-card-text>
<h6 class="mt-4 mb-1">SUPPORT A POOR DEVLOPER BASTARD</h6>
<b-card-text>
<ul>
<li>SEND YOUR FUCKING DONATIONS TO BokkyPooBah.eth. FLOOR BGANPUNKV2S, NFTS, ETH AND ERC20S ALL APPRECIATED. DON'T BE A FUCKING STINGY BASTARD!!!</li>
</ul>
</b-card-text>
<b-card-text class="ml-5 mt-5">
ENJOY!
<b-card no-body img-src="images/DoomedDegen.png" style="max-width: 20rem;" class="mt-1 ml-2"></b-card>
(C) BOKKYPOOBAH / BOK CONSULTING PTY LTD 2021. THE MIT LICENCE.
</b-card-text>
</b-tab>
</b-tabs>
</b-card>
</div>
</b-container>
</div>
<script>
window.app = new Vue({
el: '#app',
data: {
processing: null,
connected: false,
account: null,
groups: [ ],
tokensOwned: [],
owners: [],
metadatas: [],
metadataDirtyFlag: [],
ensMap: {},
osData: {},
notes: {},
tags: {},
selectedTags: [],
selectedCategories: [],
collatedOwners: [],
tabIndex: 0,
selectedShowcaseBastardsEvents: 0,
colour: '#000000',
randomise: false,
data: [],
categories: {},
settings: {
mySexyBastards: false,
advancedSearch: false,
cardView: false,
searchTokenId: '',
searchLyrics: '',
searchAccount: '',
searchForSaleOnly: false,
selection: {},
sortOption: 'tokenIdAscending',
display: {
owner: true,
// record.images = [osData.image_url, record.image, record.imageArweave, osData.image_preview_url, osData.image_thumbnail_url];
imageSource: null, // 0 = OSImages, IPFSImage, ArweaveImage, OSPreview, OSThumbnail, GH
imagesLinks: true,
notes: true,
tags: true,
osLink: true,
}
},
tokensSearchResults: [],
tokensCurrentPage: 1,
tokensPageSize: 100,
ownersCurrentPage: 1,
ownersPageSize: 10,
pageSizes: [
{ value: 10, text: '10/P' },
{ value: 100, text: '100/P' },
{ value: 500, text: '500/P' },
{ value: 1000, text: '1,000/P' },
{ value: 2145, text: '2,145/P' },
{ value: 66666, text: 'ALL' },
],
selected: {
tokenId: null,
frame: 0,
frames: null,
isGIF: false,
gif: null,
},
cardImageSizeCurrent: '300',
cardImageSizeOptions: [
{ value: '93', text: '93%' },
{ value: '115', text: '115%' },
{ value: '240', text: '240%' },
{ value: '300', text: '300%' },
{ value: '500', text: '500%' },
{ value: '750', text: '750%' },
{ value: '1000', text: '1,000%' },
{ value: '1500', text: '1,500%' },
{ value: '3000', text: '3,000%' },
{ value: '6000', text: '6,000%' },
{ value: '12000', text: '12,000%' },
],
filterOptions: [
{ value: null, text: 'Inactive' },
{ value: 'in', text: 'Include' },
{ value: 'out', text: 'Exclude' },
],
accountsFields: [
{ key: 'active', label: 'ACTIVE?', thStyle: 'width: 5%;', sortable: true },
{ key: 'name', label: 'NAME', thStyle: 'width: 20%;' },
{ key: 'account', label: 'ACCOUNT', thStyle: 'width: 35%;', sortable: true },
{ key: 'filterInOut', label: 'FILTER?', thStyle: 'width: 10%;', sortable: true },
{ key: 'filter', label: 'FILTER', thStyle: 'width: 25%;', sortable: true },
{ key: 'action', label: '' },
],
categoryFields: [
{ key: 'select', label: '', thStyle: 'width: 10%;' },
{ key: 'categoryOption', label: 'TYPE', sortable: true },
{ key: 'categoryTotal', label: 'COUNT', sortable: true, thStyle: 'width: 30%;', thClass: 'text-right', tdClass: 'text-right' },
],
categoryFilter: {},
fields: [
{ key: 'image', label: 'BASTARD', thStyle: 'width: 25%;' },
{ key: 'tokenId', label: 'INFO', thStyle: 'width: 25%;' },
{ key: 'attributes', label: 'ATTRIBUTES', thStyle: 'width: 25%;' },
{ key: 'description', label: 'LYRICS', thStyle: 'width: 25%;' },
],
sellOrdersFields: [
{ key: 'eth', label: 'ETH' },
{ key: 'created', label: 'LISTED' },
],
ownersFields: [
{ key: 'index', label: '#' },
{ key: 'owner', label: 'OWNER' },
{ key: 'tokens', label: 'BASTARDS' },
],
sortOptions: [
{ value: 'tokenIdAscending', text: 'TOKENID ASCENDING' },
{ value: 'tokenIdDescending', text: 'TOKENID DESCENDING' },
{ value: 'random', text: 'RANDOM' },
],
bokkysBastards: [471, 1133, 1147, 1197, 1322, 1406, 1822, 1835, 2289, 2893, 3053, 3291, 3316, 3569, 3852, 3905, 3906, 4046, 4087, 4113, 4158, 4209, 4272, 4618, 4777, 4793, 4994, 5288, 5601, 5654, 5710, 5775, 5903, 6225, 6285, 6626, 6632, 7008, 7214, 7222, 7266, 7432, 7492, 7567, 7721, 7731, 7776, 7831, 7850, 8621, 8645, 8854, 8895, 9040, 9158, 9260, 9362, 9374, 9401, 9490, 9594, 9595, 9740, 9759, 9783, 9792, 9881, 10050, 10093, 10178, 10192, 10193, 10252, 10341, 10375, 10449, 10456, 10564, 10583, 10592, 10661, 10724, 10727, 10729, 10734, 10735, 10736, 10737, 10834, 11100, 11105, 11140, 11258],
},
computed: {
getSelectedTokenIds() {
const results = [];
for (const key of Object.keys(this.settings.selection)) {
const value = this.settings.selection[key];
if (value) {
results.push(parseInt(key));
}
}
results.sort(function(a, b) {
return a - b;
});
return results;
},
getTotalSupply() {
return this.data.length;
},
pagedTokensResults() {
return this.tokensSearchResults.slice((this.tokensCurrentPage - 1) * this.tokensPageSize, this.tokensCurrentPage * this.tokensPageSize);
},
pagedCollatedOwnersResults() {
return this.collatedOwners.slice((this.ownersCurrentPage - 1) * this.ownersPageSize, this.ownersCurrentPage * this.ownersPageSize);
},
getHeaderBastards() {
const MAXBASTARDSTODISPLAY = 14;
let tokenIdsOwned = this.tokensOwned.slice(0);
if (tokenIdsOwned.length == 0) {
tokenIdsOwned = this.bokkysBastards.slice(0);
}
tokenIdsOwned.sort(() => {
return Math.random() - 0.5;
});
return tokenIdsOwned.slice(0, MAXBASTARDSTODISPLAY);
},
getShowcaseBastardsEvents() {
const results = [];
for (let i in SHOWCASE) {
results.push({ value: i, text: SHOWCASE[i].event });
}
return results;
},
getTags() {
const collator = {};
for (const [key, value] of Object.entries(this.tags)) {
for (let i = 0; i < value.length; i++) {
const tag = value[i];
if (!collator[tag]) {
collator[tag] = 1;
} else {
collator[tag] = parseInt(collator[tag]) + 1;
}
}
}
let results = [];
for (const [key, value] of Object.entries(collator)) {
results.push({ value: key, text: key + ' (' + value + ')' });
}
results.sort(function(a, b) {
return a.value.localeCompare(b.value);
});
results.unshift({ value: null, text: '(All)' });
return results;
},
getCategories() {
let results = [];
for (const record of CATEGORIES) {
results.push({ value: record.category, text: record.category + ' (' + record.tokenIds.length + ')' });
}
results.sort(function(a, b) {
return a.value.localeCompare(b.value);
});
results.unshift({ value: null, text: '(All)' });
return results;
},
getTokenIdsByCategories() {
let results = [];
for (const record of CATEGORIES) {
results.push({ category: record.category, tokenIds: record.tokenIds });
}
results.sort(function(a, b) {
return a.category.localeCompare(b.category);
});
return results;
},
},
methods: {
setMetaData(tokenId) {
console.log("setMetaData: " + tokenId + this.metadatas[tokenId]);
if (!this.connected) {
this.$bvModal.msgBoxOk("CLICK [CONNECT WALLET] ON THE TOP RIGHT")
.then(value1 => {
event.preventDefault();
})
.catch(err => {
// An error occurred
});
} else {
this.$bvModal.msgBoxConfirm('SET METADATA/LICENSE FOR TOKENID ' + tokenId + ' to "' + this.metadatas[tokenId] + '"? (SEE JAVASCRIPT CONSOLE FOR TX HASH IF YOU WANT IT)', {
title: 'Please Confirm',
size: 'sm',
buttonSize: 'sm',
okVariant: 'danger',
okTitle: 'Yes',
cancelTitle: 'No',
footerClass: 'p-2',
hideHeaderClose: false,
centered: true
})
.then(async value1 => {
if (value1) {
event.preventDefault();
console.log("EXEC setMetaData: " + tokenId + this.metadatas[tokenId]);
const provider = new ethers.providers.Web3Provider(window.ethereum);
const yourBastardYourCall = new ethers.Contract(YOURBASTARDYOURCALLADDRESS, YOURBASTARDYOURCALLABI, provider);
const yourBastardYourCallWithSigner = yourBastardYourCall.connect(provider.getSigner());
const tx = await yourBastardYourCallWithSigner.setLicenseForBASTARD(2, tokenId, this.metadatas[tokenId]);
console.log("EXEC setMetaData - yourBastardYourCall - tx: " + JSON.stringify(tx));
// this.$bvModal.msgBoxOk("TRANSACTION HASH: " + tx)
// .then(value1 => {
// event.preventDefault();
// })
// .catch(err => {
// // An error occurred
// });
// function setLicenseForBASTARD(uint8 _version, uint _id, string memory _text) external {
// console.log("EXEC setMetaData - yourBastardYourCall: " + JSON.stringify(yourBastardYourCall));
}
})
.catch(err => {
// An error occurred
});
}
},
getShowcaseBastards(index) {
let record = this.randomise ? SHOWCASE[index] : SHOWCASE[index];
if (this.settings.sortOption == 'tokenIdAscending') {
record.tokenIds.sort((a, b) => {
return a - b;
});
} else if (this.settings.sortOption == 'tokenIdDescending') {
record.tokenIds.sort((a, b) => {
return b - a;
});
} else {
record.tokenIds.sort(() => {
return Math.random() - 0.5;
});
}
return record;
},
copyCurrentFilteredResultsIntoSelection() {
const results = {};
for (const item of this.tokensSearchResults) {
results[item.tokenId] = true;
}
this.settings.selection = results;
},
getImagePreview(tokenId) {
return this.data[tokenId].images[4];
},
<!-- Recalculation -->
async recalculate(from) {
console.log(new Date().toUTCString() + " recalculate(from: " + from + ") start");
if (from != 'selectedTags') {
this.data = BASTARDDATA;
this.calculateTokensOwned();
this.calculateCategories();
}
this.tokensSearchResults = this.calculateSearchResults();
this.collatedOwners = this.calculateCollatedOwners();
console.log(new Date().toUTCString() + " recalculate(from: " + from + ") processOSData() begin");
await this.processOSData();
this.saveSettings();
console.log(new Date().toUTCString() + " recalculate(from: " + from + ") processOSData() completed");
},
calculateTokensOwned() {
const results = [];
if (this.owners.length > 0 && this.account) {
const account = this.account.toLowerCase();
for (let i in BASTARDDATA) {
const item = BASTARDDATA[i];
const owner = this.owners[i];
if (owner && owner.toLowerCase() == account) {
results.push(item.tokenId);
}
}
}
console.log(new Date().toUTCString() + " - calculateTokensOwned() completed: " + JSON.stringify(results));
this.tokensOwned = results;
},
calculateCategories() {
const collator = {};
for (let i in this.data) {
const item = this.data[i];
for (let k in item.attributes) {
const attribute = item.attributes[k];
const traitType = attribute.trait_type;
const value = attribute.value;
if (!collator[traitType]) {
collator[traitType] = {};
}
if (!collator[traitType][value]) {
collator[traitType][value] = 1;
} else {
collator[traitType][value] = collator[traitType][value] + 1;
}
}
}
console.log(new Date().toUTCString() + " - calculateCategories() completed");
this.categories = collator;
},
calculateSearchResults() {
const accountLowerCase = this.account == null ? null : this.account.toLowerCase();
const selectedTags = this.selectedTags == null || (this.selectedTags.length == 1 && this.selectedTags[0] == null) ? null : this.selectedTags;
function getAttribute(data1, category) {
for (let attributeIndex in data1.attributes) {
const attribute = data1.attributes[attributeIndex];
if (attribute.trait_type == category) {
return attribute.value;
}
}
return null;
}
console.log("this.tokensOwned: " + JSON.stringify(this.tokensOwned));
let data = this.data.slice(0);
let stage1Data = data;
if (this.settings.searchTokenId != null && this.settings.searchTokenId.length > 0) {
const searchTokenIds = this.settings.searchTokenId.split(",").map(function(item) { return item.trim(); });
stage1Data = [];