-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
612 lines (499 loc) · 24.2 KB
/
Copy pathindex.html
File metadata and controls
612 lines (499 loc) · 24.2 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>2XKO Team Randomizer</title>
<meta name="og:title" property="og:title" content="2XKO Team Randomizer">
<meta name="author" content="Mycodeko">
<meta property="og:locale" content="en_US">
<meta name="description" content="A small utility which generates random teams for Riot's 2XKO.">
<meta name="og:description" content="A small utility which generates random teams for Riot's 2XKO.">
<link rel="canonical" href="https://mycodeko.github.io/2XKOTeamRandomizer/">
<meta property="og:url" content="https://mycodeko.github.io/2XKOTeamRandomizer/">
<meta property="og:site_name" content="2XKO Team Randomizer">
<meta name="robots" content="index, follow">
<link rel="icon" href="https://wiki.play2xko.com/en-us/images/Favicon.ico">
<!--
The MIT License (MIT)
Copyright (c) 2011-2025 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
crossorigin="anonymous"></script>
<style>
@media (min-width: 768px) {
.character-image {
height: 40vh;
}
.character-image-165 {
zoom: 1;
}
}
@media (max-width: 768px) {
.character-image-165 {
zoom: 1.65;
}
}
.fuse-image {
filter: invert(100%);
}
</style>
<script>
/*
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function arrayShuffle(array) {
if (!Array.isArray(array)) {
throw new TypeError(`Expected an array, got ${typeof array}`);
}
for (let index = array.length - 1; index > 0; index--) {
const newIndex = Math.floor(Math.random() * (index + 1));
[array[index], array[newIndex]] = [array[newIndex], array[index]];
}
return array;
}
function arrayToShuffled(array) {
if (!Array.isArray(array)) {
throw new TypeError(`Expected an array, got ${typeof array}`);
}
if (array.length === 0) {
return [];
}
return arrayShuffle([...array]);
}
const LIGHT_THEME = "light";
const DARK_THEME = "dark";
const AUTO_THEME = "auto";
const BOOTSTRAP_THEME_ATTRIBUTE_KEY = "data-bs-theme";
function prefersDarkMode() {
return window.matchMedia("(prefers-color-scheme: dark)");
}
function resolveTheme(theme) {
if (theme == AUTO_THEME) {
if (prefersDarkMode()) {
return DARK_THEME;
} else {
return LIGHT_THEME;
}
}
return theme;
}
function getStoredTheme() {
return localStorage.getItem(BOOTSTRAP_THEME_ATTRIBUTE_KEY) ?? "auto";
}
function getActiveTheme() {
return resolveTheme(getStoredTheme());
}
function setTheme(theme) {
localStorage.setItem(BOOTSTRAP_THEME_ATTRIBUTE_KEY, theme);
document.documentElement.setAttribute(BOOTSTRAP_THEME_ATTRIBUTE_KEY, resolveTheme(theme));
}
function toggleTheme() {
const currentTheme = getStoredTheme();
let newTheme = AUTO_THEME;
if (prefersDarkMode()) {
if (currentTheme == AUTO_THEME || currentTheme == DARK_THEME) {
newTheme = LIGHT_THEME;
}
} else {
if (currentTheme == AUTO_THEME || currentTheme == LIGHT_THEME) {
newTheme = DARK_THEME;
}
}
setTheme(newTheme);
}
setTheme(getStoredTheme());
function splitMilliseconds(milliseconds) {
const floor = milliseconds < 0 ? Math.ceil : Math.floor
const negative = milliseconds < 0;
const days = floor(milliseconds / (24 * 60 * 60 * 1000));
const hours = floor(milliseconds / (60 * 60 * 1000)) % 24;
const minutes = floor(milliseconds / (60 * 1000)) % 60;
const seconds = floor(milliseconds / (1000)) % 60;
const _milliseconds = milliseconds % 1000;
return { days, hours, minutes, seconds, _milliseconds, negative };
}
function timePad(number) {
return number < 10 ? '0' + number : number;
}
function getUTCDateFromPST(year, monthIndex = 0, date = 0, hours = 0, minutes = 0, seconds = 0, ms = 0) {
return new Date(Date.UTC(year, monthIndex, date, hours + 7, minutes, seconds, ms));
}
let html = window.html;
if (html === undefined) {
html = (strings, ...values) => String.raw({ raw: strings }, ...values);
}
class Character {
constructor(name, imageSrcKey = null, imageSrcOverride = null, releaseDate = null, customZoom = null) {
this.name = name;
this.imageSrcKey = imageSrcKey ?? this.name;
this.imageSrcOverride = imageSrcOverride;
this.releaseDate = releaseDate;
this.customZoom = customZoom;
}
getCharacterImageURL() {
// return `https://wiki.play2xko.com/en-us/images/thumb/${this.imageSrcKey}_cs.png/600px-${this.imageSrcKey}_cs.png`
return this.imageSrcOverride != null ? this.imageSrcOverride : `https://wiki.play2xko.com/en-us/images/thumb/${this.imageSrcKey}_cs.png/600px-${this.imageSrcKey}_cs.png`;
}
}
class Fuse {
constructor(name, soloFuse, imageSrcKey = null, releaseDate = null) {
this.name = name;
this.soloFuse = soloFuse;
this.imageSrcKey = imageSrcKey ?? this.name.replace(' ', '_');
this.releaseDate = releaseDate;
}
getFuseImageURL() {
return `https://wiki.play2xko.com/en-us/images/thumb/${this.imageSrcKey}_fuse.png/128px-${this.name}_fuse.png`
}
}
const characterDataList = [
new Character("Ahri", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/593043e42b15c4826f7e0fc2a0bea85a05cdd994-780x1040.png"),
new Character("Blitzcrank", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/f9c03d5822725c97b83afd3f7ed2da68acfa9199-780x1040.png"),
new Character("Braum", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/96bcb8cdcee7f3fd12b379c8517aa1f33504c371-780x1040.png"),
new Character("Darius", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/67e08591a957c9068e3b146976785fb8308d6cd4-780x1040.png"),
new Character("Ekko", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/f98dcc375555b36de58cc991c381c4fce641b636-780x1040.png"),
new Character("Illaoi", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/12a5e9cea0ea7626b0d89e3740180f13341b5dc8-780x1040.png"),
new Character("Jinx", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/f0e8ed7da57962c1245dfca8c26a8a81ddab017d-780x1040.png"),
new Character("Teemo", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/0933542e8d4fc57628e7fe7dff9cd17d2ff457a4-780x1040.png"),
new Character("Vi", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/d69d95df23f8a7e5c951a1021f4f5b118fadaec3-780x1040.png"),
new Character("Warwick", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/6aa9fb38660c1b63c37716c6f44739ba406b501f-780x1040.png"),
new Character("Yasuo", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/7e9459768d4641533fdbfa1c0e84b6574d8e05ab-780x1040.png"),
new Character("Caitlyn", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/7d7c3713add9fe798cc71ba66217a1a46d6634bc-780x1040.jpg"),
new Character("Akali", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/1705793c7046ee13bb9027b868a91e5b935095b6-472x630.jpg", null, 1.65),
new Character("Senna", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/0606aa0ee6b494a762057c971c7bb642fe607bba-780x1040.jpg", getUTCDateFromPST(2026, 5, 9, 15, 0, 0, 0)),
new Character("Thresh", null, "https://cmsassets.rgpub.io/sanity/images/dsfx7636/game_data_live/2c9af0c83fd43c0a8f5258f75f8f197655971de9-780x1040.jpg", getUTCDateFromPST(2026, 5, 9, 15, 0, 0, 0)),
];
const fuseDataList = [
new Fuse("2X Assist", false),
new Fuse("Double Down", false),
new Fuse("Freestyle", false),
new Fuse("Juggernaut", true),
new Fuse("Sidekick", true),
new Fuse("Teamfight", false),
];
let _characterBag = null;
function getCharacter(includeUnreleased = false) {
while (true) {
if (_characterBag == null || _characterBag.length == 0) {
_characterBag = characterDataList.slice();
arrayShuffle(_characterBag);
}
const character = _characterBag.pop();
if (!includeUnreleased && character.releaseDate != null && character.releaseDate.getTime() > new Date().getTime()) {
continue;
}
return character;
}
}
let _fuseBag = null;
function getFuse(includeUnreleased = false) {
while (true) {
if (_fuseBag == null || _fuseBag.length == 0) {
_fuseBag = fuseDataList.slice();
arrayShuffle(_fuseBag);
}
const fuse = _fuseBag.pop();
if (!includeUnreleased && fuse.releaseDate != null && fuse.releaseDate.getTime() > new Date().getTime()) {
continue;
}
return fuse;
}
}
let _imageId = 0;
function getNextId() {
_imageId += 1;
return _imageId;
}
let lastGeneratedDate = new Date();
let lastTimerIntervalEpoch = null;
let timerRemainingMilliseconds = 0;
let canAnnounceTimerOver = false;
document.addEventListener("DOMContentLoaded", function (event) {
const characterListElement = document.getElementById("character-list");
const characterHistoryListElement = document.getElementById("character-history-list");
const imageCacheElement = document.getElementById("image-cache");
for (const characterData of characterDataList) {
const imageElement = document.createElement("img");
imageElement.src = characterData.getCharacterImageURL();
imageElement.hidden = true;
imageElement.ariaHidden = true;
imageElement.alt = characterData.name;
imageCacheElement.appendChild(imageElement);
}
for (const fuseData of fuseDataList) {
const imageElement = document.createElement("img");
imageElement.src = fuseData.getFuseImageURL();
imageElement.hidden = true;
imageElement.ariaHidden = true;
imageElement.alt = fuseData.name;
imageCacheElement.appendChild(imageElement);
}
const clearHistoryButtonElement = document.getElementById("clear-history-button");
clearHistoryButtonElement.addEventListener("click", () => {
characterHistoryListElement.replaceChildren();
clearHistoryButtonElement.hidden = true;
});
const timerEnabledCheckboxElement = document.getElementById("timer-enabled-checkbox");
function refreshTimer(offsetMS) {
timerRemainingMilliseconds -= offsetMS;
const millisecondsRemaining = timerRemainingMilliseconds;
const millisecondSplit = splitMilliseconds(millisecondsRemaining);
let outputTimerElementText = "";
outputTimerElementText += millisecondSplit.negative ? "-" : "";
outputTimerElementText += (millisecondSplit.days > 0) ? timePad(Math.abs(millisecondSplit.days)) + ":" : "";
outputTimerElementText += (millisecondSplit.days > 0 || millisecondSplit.hours > 0) ? timePad(Math.abs(millisecondSplit.hours)) + ":" : "";
outputTimerElementText += timePad(Math.abs(millisecondSplit.minutes)) + ":";
outputTimerElementText += timePad(Math.abs(millisecondSplit.seconds));
timerElement.innerText = outputTimerElementText;
if (millisecondSplit.negative) {
timerElement.style.color = "red";
if (canAnnounceTimerOver) {
timerElement.role = "alert";
canAnnounceTimerOver = false;
} else {
timerElement.role = "timer";
}
} else {
timerElement.style.color = "";
}
}
const timerElement = document.getElementById("timer");
setInterval(() => {
const now = Date.now();
if (lastTimerIntervalEpoch != null && timerEnabledCheckboxElement.checked && characterListElement.children.length > 0) {
refreshTimer(now - lastTimerIntervalEpoch);
}
lastTimerIntervalEpoch = now;
}, 1000);
const darkmodeToggleSVGElement = document.getElementById("darkmode-toggle-svg");
darkmodeToggleSVGElement.addEventListener("click", () => {
toggleTheme();
handleFuseImages();
});
function handleFuseImages() {
const activeTheme = getActiveTheme();
const addFuseImageClass = activeTheme == LIGHT_THEME;
for (const fuseImageElement of document.querySelectorAll('[data-id="fuse-image"]')) {
if (addFuseImageClass) {
fuseImageElement.classList.add("fuse-image");
} else {
fuseImageElement.classList.remove("fuse-image");
}
}
}
function handleMirror() {
for (const imageElement of characterListElement.querySelectorAll(".character-image")) {
imageElement.style.transform = `scale(${mirrorImagesCheckboxElement.checked ? -1 : 1}, 1)`;
}
}
const mirrorImagesCheckboxElement = document.getElementById("mirror-images-checkbox");
mirrorImagesCheckboxElement.addEventListener("change", () => {
handleMirror();
});
const useFusesCheckboxElement = document.getElementById("use-fuses-checkbox");
const includeSoloCharacterFusesCheckbox = document.getElementById("include-solo-character-fuses-checkbox");
const duosCheckboxElement = document.getElementById("duos-checkbox");
const includeUnreleasedCheckboxElement = document.getElementById("include-unreleased-checkbox");
const timerMinutesInputElement = document.getElementById("timer-minutes-input");
const generateButtonElement = document.getElementById("generate-button");
generateButtonElement.addEventListener("click", () => {
canAnnounceTimerOver = true;
timerRemainingMilliseconds = timerMinutesInputElement.value * 60 * 1000 + 200;
refreshTimer(0);
clearHistoryButtonElement.hidden = characterListElement.children.length == 0;
let characterOne = getCharacter();
let characterTwo = null;
if (duosCheckboxElement.checked) {
characterTwo = getCharacter(includeUnreleasedCheckboxElement.checked);
}
while (characterOne == characterTwo && characterTwo != null) {
characterTwo = getCharacter(includeUnreleasedCheckboxElement.checked);
}
if (characterListElement.children.length > 0) {
const newCharacterHistoryRowElement = document.createElement("div");
const newCharacterHistoryRowLabelElement = document.createElement("h2");
newCharacterHistoryRowLabelElement.innerText = lastGeneratedDate.toLocaleString();
newCharacterHistoryRowElement.appendChild(newCharacterHistoryRowLabelElement);
const characterHistoryRowContainerElement = document.createElement("div");
characterHistoryRowContainerElement.classList.add("row");
characterHistoryRowContainerElement.classList.add("row-cols-2");
characterHistoryRowContainerElement.classList.add("gy-2");
characterHistoryRowContainerElement.classList.add("justify-content-center");
newCharacterHistoryRowElement.appendChild(characterHistoryRowContainerElement);
for (const element of Array.from(characterListElement.children)) {
element.classList.add("h-100");
const newCharacterColumnElement = document.createElement("div");
newCharacterColumnElement.classList.add("col");
newCharacterColumnElement.classList.add("w-100");
newCharacterColumnElement.appendChild(element);
characterHistoryRowContainerElement.appendChild(newCharacterColumnElement);
}
if (characterHistoryListElement.children.length > 0) {
characterHistoryListElement.insertBefore(newCharacterHistoryRowElement, characterHistoryListElement.firstElementChild);
} else {
characterHistoryListElement.appendChild(newCharacterHistoryRowElement);
}
}
characterListElement.replaceChildren();
const characterContainerElement = document.createElement("div");
characterContainerElement.classList.add("d-flex");
characterContainerElement.classList.add("flex-column");
characterContainerElement.classList.add("justify-content-center");
characterContainerElement.classList.add("gap-2");
const charactersRowElement = document.createElement("div");
charactersRowElement.classList.add("d-flex");
charactersRowElement.classList.add("flex-row");
charactersRowElement.classList.add("justify-content-center");
charactersRowElement.classList.add("gap-2");
characterContainerElement.appendChild(charactersRowElement);
for (const character of [characterOne, characterTwo]) {
if (character != null) {
const currentCharacterImageId = "character-img-" + character.name + "-" + getNextId();
const currentCharacterLabelId = "character-label-" + character.name + "-" + getNextId();
let characterAdditionalClasses = [];
if (character.customZoom != null) {
if (character.customZoom == 1.65) {
characterAdditionalClasses.push("character-image-165");
} else {
console.warn(`Unhandled custom zoom value '${character.customZoom}' for character '${character.name}'. This will likely result in incorrect-looking images!`);
}
}
// TODO: Autofit character name text.
// TODO: Once 'data-ssml-sub-alias' is implemented, can have correct pronunciation for character names: https://w3c.github.io/pronunciation/technical-approach/
charactersRowElement.insertAdjacentHTML("beforeend", html`
<div class="card">
<img id="${currentCharacterImageId}" src="${character.getCharacterImageURL()}" class="card-img-top ratio ratop-1x1 mx-auto character-image ${characterAdditionalClasses.join(' ')}" alt="Character Image">
<div class="card-body">
<label id="${currentCharacterLabelId}" for="${currentCharacterImageId}" class="fs-2 card-title text-center">${character.name}</label>
</div>
</div>
`
);
}
}
characterListElement.appendChild(characterContainerElement);
if (useFusesCheckboxElement.checked) {
let fuse = null;
while (true) {
if (fuse == null || (!includeSoloCharacterFusesCheckbox.checked && fuse.soloFuse)) {
fuse = getFuse(includeUnreleasedCheckboxElement.checked);
} else {
break;
}
}
const currentFuseImageId = "fuse-image-" + fuse.name + "-" + getNextId();
const currentFuseLabelId = "fuse-label-" + fuse.name + "-" + getNextId();
characterContainerElement.insertAdjacentHTML("beforeend", html`
<div class="d-flex flex-row justify-content-center gap-2">
<div class="card col-md-3 col-6">
<img id="${currentFuseImageId}" src="${fuse.getFuseImageURL()}" class="card-img-top flex-grow ratio ratop-1x1 mx-auto w-50 h-100" data-id="fuse-image" alt="Fuse Image">
<div class="card-body">
<label id="${currentFuseLabelId}" for="${currentFuseImageId}" class="fs-2 card-title text-center">${fuse.name}</label>
</div>
</div>
</div>
`
);
handleFuseImages();
}
handleMirror();
lastGeneratedDate = new Date();
});
});
</script>
</head>
<body>
<div id="image-cache" style="display: none" hidden aria-hidden="true"></div>
<div class="container d-grid gap-2 text-center">
<h1 hidden aria-hidden="true">2XKO Team Randomizer</h1>
<div class="d-flex p-1 gap-0">
<button id="generate-button" class="btn btn-primary flex-grow-1">Generate</button>
<button id="darkmode-toggle-svg" type="button" style="width: 40px; min-width: 40px;"
class="btn align-items-center">
<svg id="darkmode-toggle-svg" xmlns="http://www.w3.org/2000/svg" width="30" height="30"
viewBox="4 0 120 120" style="height: 100%;" aria-hidden="true" focusable="false">
<path
d="M60 16.005v87.988c-24.258 0-43.994-19.736-43.994-43.995 0-24.254 19.736-43.99 43.994-43.99m0-11c-30.373 0-54.994 24.62-54.994 54.994s24.622 55 54.994 55 55-24.63 55-55-24.628-54.99-55-54.99z"
style="fill: RGBA(var(--bs-emphasis-color-rgb));" />
</svg>
<span class="visually-hidden">
Darkmode Toggle
</span>
</button>
</div>
<div class="d-flex text-center flex-row justify-content-center gap-md-3 gap-1">
<div class="d-flex flex-column gap-1">
<!-- TODO: Switch to non-header element type. -->
<h3 role="timer" id="timer">00:00</h3>
<span class="input-group-text gap-2 flex-md-row">
<input id="timer-minutes-input" class="form-control" style="width: 30vw !important;"
placeholder="..." type="number" value="10" min="0" aria-label="Timer Counterdown Minutes" />
<label for="timer-minutes-input">minutes</label>
</span>
<div class="input-group-text gap-2">
<label for="timer-enabled-checkbox">Enable Timer</label>
<input id="timer-enabled-checkbox" class="form-check-input mt-0" type="checkbox" value=""
aria-label="Enable Timer">
</div>
</div>
<div class="input-group-text d-flex flex-column gap-2">
<div class="d-flex align-items-center gap-1">
<label for="mirror-images-checkbox">Mirror Images</label>
<input id="mirror-images-checkbox" class="form-check-input mt-0" type="checkbox" value=""
aria-label="Mirror Images">
</div>
<div class="d-flex align-items-center gap-1">
<label for="use-fuses-checkbox">Use Fuses</label>
<input id="use-fuses-checkbox" class="form-check-input mt-0" type="checkbox" value="" checked
aria-label="Use Fuses">
</div>
<div class="d-flex align-items-center gap-1">
<label for="include-solo-character-fuses-checkbox" class="text-wrap">Include Solo-Character
Fuses</label>
<input id="include-solo-character-fuses-checkbox" class="form-check-input mt-0" type="checkbox"
value="" checked aria-label="Include Solo-Character Fuses Checkbox">
</div>
<div class="d-flex align-items-center gap-1">
<label for="duos-checkbox">Duos</label>
<input id="duos-checkbox" class="form-check-input mt-0" type="checkbox" value="" checked
aria-label="Enable Duos">
</div>
<div class="d-flex align-items-center gap-1">
<label for="include-unreleased-checkbox" class="text-wrap">Include Unreleased Content</label>
<input id="include-unreleased-checkbox" class="form-check-input mt-0" type="checkbox" value=""
aria-label="Include Unreleased Content">
</div>
</div>
</div>
<div id="character-list" class="d-flex flex-column gap-1 justify-content-center" aria-live="assertive"></div>
<div class="container w-75">
<button id="clear-history-button" class="btn btn-primary" hidden>Clear History</button>
<div id="character-history-list" class="container d-grid gap-2 text-center"></div>
</div>
</div>
</body>
</html>