@sjtdev/koishi-plugin-dota2tracker 1.0.3 → 1.1.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.
Files changed (42) hide show
  1. package/lib/index.js +559 -1038
  2. package/package.json +2 -1
  3. package/readme.md +9 -7
  4. package/template/{hero.html → hero/hero_1.ejs} +543 -516
  5. package/template/images/logo_dire.png +0 -0
  6. package/template/images/logo_radiant.png +0 -0
  7. package/template/images/scepter.png +0 -0
  8. package/template/images/scepter_0.png +0 -0
  9. package/template/images/scepter_1.png +0 -0
  10. package/template/images/shard.png +0 -0
  11. package/template/images/shard_0.png +0 -0
  12. package/template/images/shard_1.png +0 -0
  13. package/template/match/match_1.ejs +997 -0
  14. package/template/match/match_2.ejs +440 -0
  15. package/template/player/player_1.ejs +543 -0
  16. package/template/match.html +0 -1027
  17. package/template/player.html +0 -414
  18. /package/{images → template/images}/flag_dire.png +0 -0
  19. /package/{images → template/images}/flag_radiant.png +0 -0
  20. /package/{images → template/images}/hero_badge_1.png +0 -0
  21. /package/{images → template/images}/hero_badge_2.png +0 -0
  22. /package/{images → template/images}/hero_badge_3.png +0 -0
  23. /package/{images → template/images}/hero_badge_4.png +0 -0
  24. /package/{images → template/images}/hero_badge_5.png +0 -0
  25. /package/{images → template/images}/hero_badge_6.png +0 -0
  26. /package/{images → template/images}/medal_0.png +0 -0
  27. /package/{images → template/images}/medal_1.png +0 -0
  28. /package/{images → template/images}/medal_2.png +0 -0
  29. /package/{images → template/images}/medal_3.png +0 -0
  30. /package/{images → template/images}/medal_4.png +0 -0
  31. /package/{images → template/images}/medal_5.png +0 -0
  32. /package/{images → template/images}/medal_6.png +0 -0
  33. /package/{images → template/images}/medal_7.png +0 -0
  34. /package/{images → template/images}/medal_8.png +0 -0
  35. /package/{images → template/images}/medal_8b.png +0 -0
  36. /package/{images → template/images}/medal_8c.png +0 -0
  37. /package/{images → template/images}/star_0.png +0 -0
  38. /package/{images → template/images}/star_1.png +0 -0
  39. /package/{images → template/images}/star_2.png +0 -0
  40. /package/{images → template/images}/star_3.png +0 -0
  41. /package/{images → template/images}/star_4.png +0 -0
  42. /package/{images → template/images}/star_5.png +0 -0
@@ -0,0 +1,997 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Document</title>
7
+ <style>
8
+ html,
9
+ body {
10
+ background-color: black;
11
+ color: white;
12
+ width: 800px;
13
+ }
14
+
15
+ img {
16
+ vertical-align: middle;
17
+ }
18
+
19
+ p {
20
+ margin: 0;
21
+ }
22
+
23
+ .wrapper {
24
+ width: 800px;
25
+ height: auto;
26
+ /* border: 10px solid white; */
27
+ border-radius: 10px;
28
+ overflow: hidden;
29
+ }
30
+
31
+ .wrapper > div:not(.players) {
32
+ border-radius: 5px;
33
+ box-shadow: 0 0 5px #fff;
34
+ /* border: 5px solid #6cf; */
35
+ overflow: auto;
36
+ margin: 5px;
37
+ display: flex;
38
+ }
39
+
40
+ .players > div {
41
+ height: 1646px;
42
+ }
43
+
44
+ .match_info {
45
+ display: flex;
46
+ justify-content: space-around;
47
+ flex-wrap: wrap;
48
+ flex-direction: row;
49
+ position: relative;
50
+ }
51
+
52
+ .match_info .flag {
53
+ width: 100px;
54
+ height: 100px;
55
+ border-radius: 5px;
56
+ /* z-index: -1; */
57
+ }
58
+
59
+ .match_info .flag:not(.won) {
60
+ filter: grayscale(100%);
61
+ }
62
+
63
+ .match_info .rank,
64
+ .match_info .star {
65
+ position: absolute;
66
+ width: 64px;
67
+ bottom: 16px;
68
+ }
69
+
70
+ .match_info > p.won {
71
+ position: absolute;
72
+ width: 100px;
73
+ bottom: 0;
74
+ text-align: center;
75
+ left: 690px;
76
+ z-index: 1;
77
+ }
78
+
79
+ .match_info > p.won.radiant {
80
+ left: 0;
81
+ }
82
+
83
+ .match_info .details {
84
+ width: 590px;
85
+ display: flex;
86
+ flex-wrap: wrap;
87
+ justify-content: space-around;
88
+ align-content: space-between;
89
+ }
90
+
91
+ .match_info div.score {
92
+ display: flex;
93
+ width: 590px;
94
+ flex-direction: row;
95
+ align-items: baseline;
96
+ }
97
+
98
+ .match_info div.score .score {
99
+ /* width: 280px; */
100
+ flex-grow: 1;
101
+ text-align: center;
102
+ vertical-align: bottom;
103
+ font-size: 32px;
104
+ }
105
+
106
+ .match_info div.score .time {
107
+ line-height: 1;
108
+ vertical-align: bottom;
109
+ }
110
+
111
+ .players {
112
+ display: flex;
113
+ /* flex-direction: row; */
114
+ }
115
+
116
+ .players > div {
117
+ width: 400px;
118
+ display: flex;
119
+ flex-direction: column;
120
+ }
121
+
122
+ .player {
123
+ width: 390px;
124
+ border-radius: 5px;
125
+ box-shadow: 0 0 5px #fff;
126
+ /* border: 5px solid #6cf; */
127
+ overflow: hidden;
128
+ margin: 5px;
129
+ /* display: flex; */
130
+ flex-grow: 1;
131
+ }
132
+
133
+ .player > div {
134
+ /* border: 5px solid #6cf; */
135
+ display: flex;
136
+ flex-direction: row;
137
+ line-height: 24px;
138
+ }
139
+
140
+ .hero {
141
+ margin-bottom: 4px;
142
+ }
143
+
144
+ .hero .player_avatar {
145
+ width: 112px;
146
+ height: 63px;
147
+ position: relative;
148
+ border-radius: 4px;
149
+ overflow: hidden;
150
+ flex-grow: 0;
151
+ }
152
+
153
+ .player.giveup .hero .player_avatar::before {
154
+ content: "";
155
+ position: absolute;
156
+ top: 0;
157
+ right: 0;
158
+ bottom: 0;
159
+ left: 0;
160
+ width: 100%;
161
+ height: 100%;
162
+ background-size: contain;
163
+ background-position: center;
164
+ background-repeat: no-repeat;
165
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAAAaCAYAAADcx/BtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAmvSURBVGhD1Zl3jBxFFoeLnDmiCUc0OYOx8cGJeKQl5xwWTM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1o9nZ/boCTZkR0q/AcX4YBQ99g9hAAAAAElFTkSuQmCC");
166
+ }
167
+
168
+ .hero .player_avatar p {
169
+ position: absolute;
170
+ /* width: 86px; */
171
+ /* line-height: 0; */
172
+ line-height: 1.5;
173
+ font-size: 10px;
174
+ margin: 0;
175
+ }
176
+
177
+ .hero .player_avatar .party_line {
178
+ height: 2px;
179
+ top: 0;
180
+ width: 100%;
181
+ }
182
+
183
+ .hero .player_avatar .party_mark {
184
+ line-height: 1.5;
185
+ text-align: center;
186
+ width: 16px;
187
+ font-size: 10px;
188
+ top: 3px;
189
+ left: 2px;
190
+ background-color: rgba(0, 0, 0, 0.8);
191
+ }
192
+
193
+ .hero .player_avatar .party_line.party_I {
194
+ background-color: #caffe5;
195
+ }
196
+
197
+ .hero .player_avatar .party_mark.party_I {
198
+ color: #caffe5;
199
+ }
200
+
201
+ .hero .player_avatar .party_mark.party_I::after {
202
+ content: "I";
203
+ }
204
+
205
+ .hero .player_avatar .party_line.party_II {
206
+ background-color: #ffe484;
207
+ }
208
+
209
+ .hero .player_avatar .party_mark.party_II {
210
+ color: #ffe484;
211
+ }
212
+
213
+ .hero .player_avatar .party_mark.party_II::after {
214
+ content: "II";
215
+ }
216
+
217
+ .hero .player_avatar .party_line.party_III {
218
+ background-color: #e19be2;
219
+ }
220
+
221
+ .hero .player_avatar .party_mark.party_III {
222
+ color: #e19be2;
223
+ }
224
+
225
+ .hero .player_avatar .party_mark.party_III::after {
226
+ content: "III";
227
+ }
228
+
229
+ .hero .player_avatar .party_line.party_IV {
230
+ background-color: #ccdaf4;
231
+ }
232
+
233
+ .hero .player_avatar .party_mark.party_IV {
234
+ color: #ccdaf4;
235
+ }
236
+
237
+ .hero .player_avatar .party_mark.party_IV::after {
238
+ content: "IV";
239
+ }
240
+
241
+ .hero .player_avatar img {
242
+ width: 100%;
243
+ height: 100%;
244
+ flex-grow: 0;
245
+ }
246
+
247
+ .hero .player_avatar .position {
248
+ /* width: auto; */
249
+ text-align: right;
250
+ bottom: 1px;
251
+ right: 0;
252
+ color: #cccccc;
253
+ text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5), 1px -1px 0 rgba(0, 0, 0, 0.5), -1px 1px 0 rgba(0, 0, 0, 0.5), 1px 1px 0 rgba(0, 0, 0, 0.5); /* 描边效果 */
254
+ }
255
+
256
+ .hero .player_avatar .position.p1::first-line {
257
+ color: red;
258
+ }
259
+
260
+ .hero .player_avatar .position.p2::first-line {
261
+ color: yellow;
262
+ }
263
+
264
+ .hero .player_avatar .position.p3::first-line {
265
+ color: green;
266
+ }
267
+
268
+ .hero .player_avatar .level {
269
+ left: 2px;
270
+ bottom: 1px;
271
+ right: auto;
272
+ font-size: 12px;
273
+ color: rgba(255, 255, 255, 1);
274
+ /* color: #cccccc; */
275
+ text-shadow: 0 0 4px black;
276
+ }
277
+
278
+ .hero .player_info {
279
+ /* width: 210px; */
280
+ text-align: center;
281
+ margin: 0 18px;
282
+ flex-grow: 0;
283
+ height: 63px;
284
+ font-size: 15px;
285
+ line-height: 1.5;
286
+ width: 144px;
287
+ }
288
+
289
+ .hero .player_info .player_name {
290
+ max-width: 100%;
291
+ overflow: hidden;
292
+ text-overflow: ellipsis;
293
+ white-space: nowrap;
294
+ }
295
+
296
+ .hero .player_info .player_performance {
297
+ text-wrap: nowrap;
298
+ }
299
+
300
+ .hero .player_info .networth {
301
+ color: rgb(203, 176, 42);
302
+ }
303
+
304
+ .hero .player_lane {
305
+ margin-top: 6px;
306
+ width: 44px;
307
+ height: 100%;
308
+ text-align: center;
309
+ display: flex;
310
+ flex-direction: column;
311
+ }
312
+
313
+ .hero .player_lane svg {
314
+ width: 44px;
315
+ height: 44px;
316
+ }
317
+
318
+ .hero .player_lane svg path {
319
+ /* fill: red; */
320
+ }
321
+
322
+ .hero .player_lane::after {
323
+ width: 100%;
324
+ font-size: 10px;
325
+ line-height: 1;
326
+ }
327
+
328
+ .hero .player_lane.victory::after {
329
+ content: "对线优势";
330
+ }
331
+
332
+ .hero .player_lane.stomp::after {
333
+ content: "对线碾压";
334
+ }
335
+
336
+ .hero .player_lane.tie::after {
337
+ content: "对线平手";
338
+ }
339
+
340
+ .hero .player_lane.fail::after {
341
+ content: "对线劣势";
342
+ }
343
+
344
+ .hero .player_lane.stomped::after {
345
+ content: "对线被碾";
346
+ }
347
+
348
+ .hero .player_lane.victory svg path {
349
+ fill: lightgreen;
350
+ }
351
+
352
+ .hero .player_lane.stomp svg path {
353
+ fill: green;
354
+ }
355
+
356
+ .hero .player_lane.stomped svg path {
357
+ fill: red;
358
+ }
359
+
360
+ .hero .player_rank {
361
+ flex-grow: 1;
362
+ position: relative;
363
+ }
364
+
365
+ .hero .player_rank .rank .medal {
366
+ z-index: 1;
367
+ }
368
+
369
+ .hero .player_rank .rank .star {
370
+ z-index: 2;
371
+ }
372
+
373
+ .hero .player_rank .rank p {
374
+ z-index: 3;
375
+ }
376
+
377
+ .hero .player_rank div {
378
+ height: 36px;
379
+ width: 36px;
380
+ top: 0;
381
+ right: 0;
382
+ position: absolute;
383
+ }
384
+
385
+ .hero .player_rank img {
386
+ top: 0;
387
+ right: 0;
388
+ position: absolute;
389
+ height: 36px;
390
+ }
391
+
392
+ .hero .player_rank .dotaPlusLevel {
393
+ background-size: 100%;
394
+ position: absolute;
395
+ top: auto;
396
+ bottom: 0;
397
+ }
398
+
399
+ .hero .player_rank p {
400
+ font-size: 10px;
401
+ line-height: 1;
402
+ position: absolute;
403
+ text-align: center;
404
+ width: 36px;
405
+ bottom: 0;
406
+ /* background-color: #222; */
407
+ /* border: black 1px solid; */
408
+ box-sizing: border-box;
409
+ text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; /* 描边效果 */
410
+ }
411
+
412
+ .titles {
413
+ display: block;
414
+ margin-bottom: 4px;
415
+ padding-left: 4px;
416
+ height: 24px;
417
+ /* text-shadow: -1px -1px 2px #aaa, 1px -1px 2px #aaa, -1px 1px 2px #aaa, 1px 1px 2px #aaa; */ /*描边效果 */
418
+ }
419
+
420
+ .items {
421
+ margin-bottom: 2px;
422
+ position: relative;
423
+ }
424
+
425
+ .items > * {
426
+ /* margin-bottom: 14px; */
427
+ /* flex-basis: content; */
428
+ width: 0;
429
+ }
430
+
431
+ .items .item {
432
+ position: relative;
433
+ /* margin-bottom: 8px; */
434
+ width: 100%;
435
+ /* width: 54px; */
436
+ flex-grow: 1;
437
+ }
438
+
439
+ .item img {
440
+ width: 100%;
441
+ }
442
+
443
+ .item.recipe {
444
+ background-image: url("https://cdn.cloudflare.steamstatic.com/apps/dota2/images/dota_react/items/recipe.png");
445
+ background-size: 100%;
446
+ }
447
+
448
+ .item.recipe img {
449
+ opacity: 0.75;
450
+ /* width: 50%; */
451
+ transform: scale(0.6);
452
+ transform-origin: top right;
453
+ }
454
+
455
+ .item .time {
456
+ text-align: center;
457
+ width: 100%;
458
+ margin: 0;
459
+ font-size: 12px;
460
+ line-height: 1;
461
+ position: absolute;
462
+ /* bottom: -8px; */
463
+ bottom: 0;
464
+ color: #ccc;
465
+ background-color: rgba(100, 100, 100, 0.75);
466
+ }
467
+
468
+ .items .items_normal {
469
+ flex-grow: 9;
470
+ display: flex;
471
+ flex-wrap: wrap;
472
+ }
473
+
474
+ .items .items_normal .item {
475
+ /* flex-grow: 2; */
476
+ width: 33.33%;
477
+ }
478
+
479
+ .items .items_backpack {
480
+ flex-grow: 2;
481
+ display: flex;
482
+ flex-direction: column;
483
+ }
484
+
485
+ .items .item.back {
486
+ filter: grayscale(100%);
487
+ }
488
+
489
+ .items .item.neutral {
490
+ flex-grow: 3;
491
+ width: 0;
492
+ background-repeat: no-repeat;
493
+ background-size: 100%;
494
+ background-position: center;
495
+ }
496
+
497
+ /* kkk */
498
+ .player.bear .items_buffs {
499
+ height: 73.78px;
500
+ /* margin-bottom: 4px; */
501
+ display: flex;
502
+ flex-direction: row;
503
+ }
504
+
505
+ .player.bear .items_buffs:nth-child(3) {
506
+ margin-bottom: 4.04px;
507
+ }
508
+
509
+ .player.bear .items {
510
+ display: grid;
511
+ height: 100%;
512
+ flex-wrap: wrap;
513
+ width: 250.74px;
514
+ margin-right: 4px;
515
+ grid-template-columns: repeat(6,1fr);
516
+ grid-template-rows: repeat(2,40px);
517
+ }
518
+
519
+ .player.bear .items .item {
520
+ flex-grow: 0;
521
+ width: 41.79px;
522
+ position: relative;
523
+ }
524
+
525
+ .player.bear .ibs .item img {
526
+ width: 100%;
527
+ }
528
+
529
+ .player.bear .items .item.neutral {
530
+ margin-left: auto;
531
+ }
532
+
533
+ .player.bear .buffs,
534
+ .player.bear .support_items {
535
+ display: flex;
536
+ margin-left: auto;
537
+ width: 0;
538
+ flex-grow: 1;
539
+ flex-direction: row;
540
+ justify-content: flex-end;
541
+ }
542
+
543
+ .buffs_supportItems.slave {
544
+ width: 0;
545
+ flex-grow: 1;
546
+ display: flex;
547
+ flex-direction: column;
548
+ justify-content: space-between;
549
+ }
550
+
551
+ .buffs_supportItems.slave > .support_items,
552
+ .buffs_supportItems.slave > .buffs {
553
+ flex-grow: 0;
554
+ width: auto;
555
+ height: 24px;
556
+ display: flex;
557
+ flex-direction: row;
558
+ }
559
+
560
+ .buffs {
561
+ margin-bottom: 4px;
562
+ height: 24px;
563
+ }
564
+
565
+ .buffs section {
566
+ text-align: center;
567
+ }
568
+
569
+ .buff img,
570
+ .support_item img {
571
+ height: 24px;
572
+ }
573
+
574
+ .buffs .buff,
575
+ .support_item {
576
+ /* display: inline; */
577
+ position: relative;
578
+ }
579
+
580
+ .buff p,
581
+ .support_item p {
582
+ text-align: center;
583
+ width: 100%;
584
+ margin: 0;
585
+ font-size: 12px;
586
+ line-height: 1;
587
+ position: absolute;
588
+ bottom: 0;
589
+ color: #aaa;
590
+ background-color: rgba(100, 100, 100, 0.5);
591
+ }
592
+
593
+ .buffs section {
594
+ display: flex;
595
+ }
596
+
597
+ .player .details,
598
+ .buffs {
599
+ font-size: 13px;
600
+ flex-wrap: wrap;
601
+ /* height: 400px; */
602
+ align-content: space-between;
603
+ justify-content: space-between;
604
+ flex-direction: row;
605
+ /* justify-content: space-around; */
606
+ }
607
+
608
+ .player .details {
609
+ margin-bottom: 0;
610
+ }
611
+
612
+ .player .details section {
613
+ flex-grow: 1;
614
+ text-align: center;
615
+ margin: 0 4px;
616
+ }
617
+
618
+ .ban_list {
619
+ flex-wrap: wrap;
620
+ flex-direction: row;
621
+ }
622
+
623
+ .ban_list div {
624
+ width: 79px;
625
+ height: 44px;
626
+ background-repeat: no-repeat;
627
+ background-size: 100%;
628
+ position: relative;
629
+ }
630
+
631
+ .ban_list div img {
632
+ filter: grayscale(100%);
633
+ width: 100%;
634
+ vertical-align: middle;
635
+ }
636
+
637
+ .ban_list div::before {
638
+ filter: none;
639
+ position: absolute;
640
+ display: block;
641
+ /* width: 40px; */
642
+ width: 100%;
643
+ height: 100%;
644
+ /* background-color: red; */
645
+ content: "";
646
+ z-index: 1;
647
+ background: linear-gradient(to bottom left, transparent calc(50% - 1px), red calc(50% - 1px), black calc(50% + 1px), transparent calc(50% + 1px));
648
+ }
649
+ /* --------------------------------------- */
650
+ </style>
651
+ <script>
652
+ window.onload = function () {
653
+ // 查找所有具有指定类名的img元素
654
+ var images = document.querySelectorAll(".item img");
655
+ // 为每个元素添加onerror处理器
656
+ images.forEach(function (image) {
657
+ image.onerror = function () {
658
+ this.onerror = null; // 防止无限循环
659
+ this.classList.add("unload"); // 添加类
660
+ this.src = "backup-image.jpg"; // 设置备用图片
661
+ };
662
+ });
663
+ };
664
+ </script>
665
+ </head>
666
+ <body>
667
+ <% const match = data;
668
+ let kcndcStyle = {
669
+ kc: function (num) {
670
+ let red = (255 - (num * 255) / 100).toFixed(2);
671
+ return `rgb(255,${red},${red})`;
672
+ },
673
+ dc: function (num) {
674
+ let gray = ((50 - Math.min(num, 50)) * (255 / 50)).toFixed(2);
675
+ return `rgb(${gray},${gray},${gray})`;
676
+ },
677
+ };
678
+ // 对线结果的图标(来自免费SVG素材网)
679
+ const laneSVG = {
680
+ stomp: `<svg viewBox="0 0 24 24" class="hitagi__sc-1apuy4g-0 hmhZOG"><path d="M8.05731 22.3674L9.60454 22.8002L11.5974 21.6551L12.043 20.0773L13.5902 20.51L15.583 19.3649L16.0287 17.7871L17.5759 18.2199L19.5687 17.0748L20.0143 15.4969L21.5615 15.9297L23.5544 14.7846L24 13.2068L23.4492 12.2014L7.50651 21.3621L8.05731 22.3674ZM12.1328 3.50265L11.0312 1.49196C10.8798 1.21549 10.5316 1.11811 10.2576 1.27556L0.29345 7.00098C0.0194354 7.15843 -0.0808273 7.51346 0.0706444 7.78993L1.44766 10.3033L11.91 4.29159C12.184 4.13414 12.2843 3.77912 12.1328 3.50265ZM18.3935 8.4063L14.1658 9.60458L12.4221 10.6065C12.2851 10.6853 12.111 10.6366 12.0353 10.4983L11.7599 9.99565C11.6842 9.85742 11.7343 9.6799 11.8713 9.60118L13.615 8.59924L13.0642 7.59389L11.3205 8.59584C11.1835 8.67456 11.0094 8.62587 10.9337 8.48765L10.6583 7.98497C10.5826 7.84673 10.6327 7.66922 10.7697 7.5905L12.5134 6.58855L11.9626 5.58321L1.99846 11.3086L6.9557 20.3567L22.8984 11.196L22.2615 10.0336C21.5024 8.64813 19.9073 7.97847 18.3935 8.4063Z"></path></svg>`,
681
+ victory: `<svg viewBox="0 0 512 512"><path d="M198.844 64.75c-.985 0-1.974.03-2.97.094-15.915 1.015-32.046 11.534-37.78 26.937-34.072 91.532-51.085 128.865-61.5 222.876 14.633 13.49 31.63 26.45 50.25 38.125l66.406-196.467 17.688 5.968L163.28 362.5c19.51 10.877 40.43 20.234 62 27.28l75.407-201.53 17.5 6.53-74.937 200.282c19.454 5.096 39.205 8.2 58.78 8.875L381.345 225.5l17.094 7.594-75.875 170.656c21.82-1.237 43.205-5.768 63.437-14.28 43.317-53.844 72.633-109.784 84.5-172.69 5.092-26.992-14.762-53.124-54.22-54.81l-6.155-.282-2.188-5.75c-8.45-22.388-19.75-30.093-31.5-32.47-11.75-2.376-25.267 1.535-35.468 7.376l-13.064 7.47-.906-15c-.99-16.396-10.343-29.597-24.313-35.626-13.97-6.03-33.064-5.232-54.812 9.906l-10.438 7.25-3.812-12.125c-6.517-20.766-20.007-27.985-34.78-27.97zM103.28 188.344C71.143 233.448 47.728 299.56 51.407 359.656c27.54 21.84 54.61 33.693 80.063 35.438 14.155.97 27.94-1.085 41.405-6.438-35.445-17.235-67.36-39.533-92.594-63.53l-3.343-3.157.5-4.595c5.794-54.638 13.946-91.5 25.844-129.03z"/></svg>`,
682
+ fail: `<svg viewBox="0 0 36 36"><path fill="#ff6961" d="M36 32a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h28a4 4 0 0 1 4 4v28z"></path><circle fill="#FFF" cx="27" cy="7" r="3"></circle><path fill="#FFF" d="M13.06 13.06l2.367-2.366l3.859 1.158l-2.635 2.847a10.018 10.018 0 0 1 4.392 3.379l5.017-5.017a1.5 1.5 0 0 0-.63-2.497l-9.999-3a1.495 1.495 0 0 0-1.492.376l-3 3a1.5 1.5 0 1 0 2.121 2.12zm16.065 4.949a1.496 1.496 0 0 0-1.262-.503l-6.786.617a9.966 9.966 0 0 1 1.464 2.879l3.548-.322l-1.554 6.995a1.499 1.499 0 1 0 2.928.65l2-9a1.5 1.5 0 0 0-.338-1.316zM13 16a8 8 0 1 0 0 16a8 8 0 0 0 0-16zm0 14a6 6 0 1 1 .002-12.002A6 6 0 0 1 13 30z"></path></svg>`,
683
+ stomped: `<svg viewBox="-1 0 19 19"><path d="M16.417 9.579A7.917 7.917 0 1 1 8.5 1.662a7.917 7.917 0 0 1 7.917 7.917zm-2.458 2.96a.396.396 0 0 0-.396-.397h-.667a1.527 1.527 0 0 0-1.249-1.114.777.777 0 0 0 .014-.145V9.378a.794.794 0 0 0-.792-.792H8.201a2.984 2.984 0 0 0-1.682-.516l-.11.002V7.42h2.997a.396.396 0 1 0 0-.792H6.41v-1.3a.396.396 0 0 0-.396-.397H4.891a.396.396 0 0 0 0 .792h.727V8.21a2.997 2.997 0 1 0 3.836 3.466h.71a1.526 1.526 0 1 0 2.732 1.26h.667a.396.396 0 0 0 .396-.397zM8.078 9.507a2.205 2.205 0 1 1-1.559-.646 2.19 2.19 0 0 1 1.559.646zm4.078 3.03a.734.734 0 1 1-.733-.734.735.735 0 0 1 .733.733z"/></svg>`,
684
+ tie: `<svg fill="#fff" viewBox="0 0 512.001 512.001"><g><g><path d="M120.988,239.868c-4.496,10.625-5.122,20.183-5.157,20.811c-0.267,4.607,3.243,8.547,7.849,8.829 c4.618,0.29,8.574-3.228,8.873-7.833c0.265-4.771,2.339-13.092,5.884-19.44C137.421,242.113,141.397,242.649,120.988,239.868z"/></g></g><g><g><path d="M391.178,255.418c-0.211,8.054-2.458,17.62-6.74,28.398c-1.708,4.299,0.393,9.168,4.692,10.875 c4.293,1.708,9.167-0.39,10.875-4.692c5.103-12.842,7.74-24.392,7.943-34.581H391.178z"/></g></g><g><g><path d="M164.769,210.51c1.046,3.339,1.397,6.953,0.893,10.65c-0.293,2.146-0.857,4.188-1.648,6.1c0,0,51.266,3.416,198.065,3.949 c-0.086-6.331,2.19-12.199,6.244-16.732C217.627,214.046,164.769,210.51,164.769,210.51z"/></g></g><g><g><circle cx="37.179" cy="128.669" r="29.491"/></g></g><g><g><path d="M510.146,391.511l-37.916-66.985c14.35-49.173,20.678-68.137,20.678-68.137l8.949-67.014 c1.502-10.977-6.248-21.075-17.235-22.468l-18.183-2.305c-10.984-1.393-20.996,6.445-22.293,17.431l-1.884,15.955l28.718-21.317 l-37.91,42.278h-46.432c-6.571,0-11.898,5.328-11.898,11.898c0,6.57,5.328,11.898,11.898,11.898h51.744 c3.381,0,6.601-1.438,8.859-3.956l41.456-46.234l-32.023,54.694c-5.28,9.018-14.374,8.169-18.293,8.167c-1.959,0-3.31,0-5.295,0 c-0.399,0.898,3.152-7.399-24.44,57.181c-0.548,1.284-0.907,2.642-1.06,4.031l-8.934,80.338 c-0.939,8.447,5.667,15.857,14.208,15.857c7.179,0,13.361-5.401,14.172-12.701l8.702-78.244l21.512-50.353l-14.121,50.463 c-1.158,3.756-0.718,7.823,1.218,11.243l40.949,72.345c3.885,6.864,12.596,9.276,19.459,5.392 C511.615,407.085,514.03,398.373,510.146,391.511z"/></g></g><g><g><circle cx="464.865" cy="128.702" r="29.491"/></g></g><g><g><path d="M142.923,206.051l-59.556-8.118l-39.135-18.451l13.626,2.292c-1.422-10.945-11.411-18.577-22.254-17.202l-18.182,2.305 C6.43,168.271-1.315,178.374,0.186,189.345l9.12,68.689l21.865,70.857l5.829,70.795c0.646,7.848,7.527,13.705,15.401,13.057 c7.859-0.647,13.705-7.542,13.058-15.401l-5.956-72.345c-0.084-1.031-0.281-2.05-0.585-3.039l-14.123-50.463l21.514,50.353 l8.702,78.244c0.873,7.86,7.96,13.486,15.768,12.612c7.838-0.871,13.483-7.931,12.612-15.768l-8.934-80.338 c-0.154-1.388-0.511-2.747-1.06-4.032l-27.336-61.43l-2.945-24.951l-29.029-25.179l40.79,19.231 c1.097,0.517,2.266,0.862,3.468,1.027l61.369,8.365c6.521,0.887,12.509-3.68,13.396-10.183 C153.994,212.936,149.435,206.939,142.923,206.051z"/></g></g></svg>`,
685
+ };
686
+ %>
687
+ <div class="wrapper">
688
+ <%- `
689
+ <div class="match_info">
690
+ <img src="${utils.getImageUrl("flag_radiant")}" alt="" class="flag radiant${match.didRadiantWin ? " won" : ""}" style="order: 1" />
691
+ <img src="${utils.getImageUrl("flag_dire")}" alt="" class="flag dire${match.didRadiantWin ? "" : " won"}" style="order: 3" />
692
+ <p class="won${match.didRadiantWin ? " radiant" : ""}">获胜</p>
693
+ <div class="details" style="order: 2">
694
+ <p>比赛编号:<span class="match_id">${match.id}</span></p>
695
+ <p>模式:<span class="mode">${d2a.lobbyTypes[match.lobbyType] || match.lobbyType}/${d2a.gameMode[match.gameMode] || match.gameMode}</span></p>
696
+ <p>服务器:<span class="server">${d2a.region[match.regionId]}</span></p>
697
+ <p>起始时间:<span class="start_time">${moment(new Date(match.startDateTime * 1000))
698
+ .format("YYYY-MM-DD HH:mm:ss")
699
+ .slice(2)}</span></p>
700
+ <img src="${utils.getImageUrl("star_" + match.rank?.toString().split("")[1])}" alt="" class="star">
701
+ <img src="${utils.getImageUrl("medal_" + match.rank?.toString().split("")[0])}" alt="" class="rank">
702
+ <p>结束时间:<span class="end_time">${moment(new Date(match.endDateTime * 1000))
703
+ .format("YYYY-MM-DD HH:mm:ss")
704
+ .slice(2)}</span></p>
705
+ <div class="score">
706
+ <p class="score radiant">${match.radiant.killsCount}</p>
707
+ <p class="time">${utils.sec2time(match.durationSeconds)}</p>
708
+ <p class="score dire">${match.dire.killsCount}</p>
709
+ </div>
710
+ </div>
711
+ </div>
712
+ ` %>
713
+ <div class="players">
714
+ <%- match.players.map((player) =>`
715
+ <div class="player ${player.team}${player.hero.id == 80 ? " bear" : ""}${player.leaverStatus != "NONE" && player.leaverStatus != "DISCONNECTED" ? " giveup" : ""}" style="order:${player.position?.slice(-1)}">
716
+ <div class="hero">
717
+ <div class="player_avatar">
718
+ <img alt="" src="${utils.getImageUrl(player.hero.shortName, ImageType.Heroes)}" />
719
+ <p class="party_line${player.partyId != null ? " party_" + match.party[player.partyId] : ""}"></p>
720
+ <p class="party_mark${player.partyId != null ? " party_" + match.party[player.partyId] : ""}"></p>
721
+ <p class="position p${Math.floor(player.order / 4) + 1}">${player.isRandom ? "随机" : `第<span>${player.order == null ? "-" : player.order + 1}</span>手`}<br/>${d2a.position[player.position?.slice(-1)]}</p>
722
+ <p class="level">${player.level}</p>
723
+ </div>
724
+ <div class="player_info">
725
+ <summary class="player_name">${player.steamAccount.name}</summary>
726
+ <summary class="player_performance">
727
+ <span class="kda">${player.kills}/${player.deaths}/${player.assists}</span>&nbsp;&nbsp;
728
+ <span class="kc" style="color:${kcndcStyle.kc(player.killContribution * 100)}">${Math.floor(player.killContribution * 100)}%</span>&nbsp;&nbsp;
729
+ <span class="dc" style="color:${kcndcStyle.dc(player.deathContribution * 100)}">${Math.floor(player.deathContribution * 100)}%</span></summary>
730
+ <summary class="player_net"><span class="networth">${player.networth}</span>&emsp;<span class="score">${(player.heroDamage / player.networth)?.toFixed(2)}</span></summary>
731
+ </div>
732
+ <div class="player_lane ${player.laneResult}">
733
+ ${laneSVG[player.laneResult]}
734
+ </div>
735
+ <div class="player_rank">
736
+ <div class="rank">
737
+ <img class="medal" src="${utils.getImageUrl(
738
+ "medal_" +
739
+ ((player.steamAccount.seasonLeaderboardRank
740
+ ? player.steamAccount.seasonLeaderboardRank <= 100
741
+ ? player.steamAccount.seasonLeaderboardRank <= 10
742
+ ? "8c"
743
+ : "8b"
744
+ : player.steamAccount.seasonRank?.toString().split("")[0]
745
+ : player.steamAccount.seasonRank?.toString().split("")[0]) ?? "0")
746
+ )}" alt="" />
747
+ <img class="star" src="${utils.getImageUrl("star_" + (player.steamAccount.seasonRank?.toString().split("")[1] ?? "0"))}" alt="" />
748
+ <p>${player.steamAccount.seasonLeaderboardRank ?? ""}</p>
749
+ </div>
750
+ <div class="dotaPlusLevel"${!player.dotaPlus ? ` style="display:none"` : ""}>
751
+ <img src="${utils.getImageUrl("hero_badge_" + (player.dotaPlus ? Math.ceil((player.dotaPlus?.level + 1) / 6) : 1))}" alt="" class="badge">
752
+ <p class="level">${player.dotaPlus?.level}</p>
753
+ </div>
754
+ </div>
755
+ </div>
756
+ <div class="titles">
757
+ ${player.titles.map((item) => `<span style="color: ${item.color};">${item.name}</span>`).join("&nbsp;")}
758
+ </div>
759
+ ${player.hero.id != 80 ? `
760
+ <div class="items">
761
+ <div class="items_normal">
762
+ ${player.items
763
+ .map((item) =>
764
+ item
765
+ ? `
766
+ <div class="item${item.isRecipe ? " recipe" : ""}">
767
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
768
+ <p class="time">${utils.sec2time(item.time)}</p>
769
+ </div>`
770
+ : `
771
+ <div class="item" style="visibility:hidden"}">
772
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
773
+ <p class="time">--:--</p>
774
+ </div>`
775
+ )
776
+ .join("")}
777
+ </div>
778
+ <div class="items_backpack">
779
+ ${player.backpacks
780
+ .map((item) =>
781
+ item
782
+ ? `
783
+ <div class="item back${item.isRecipe ? " recipe" : ""}">
784
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
785
+ <p class="time">${utils.sec2time(item.time)}</p>
786
+ </div>`
787
+ : `
788
+ <div class="item back" style="visibility:hidden"}">
789
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
790
+ <p class="time">--:--</p>
791
+ </div>`
792
+ )
793
+ .join("")}
794
+ </div>
795
+ <div class="item neutral" style="background-image: url(${utils.getImageUrl(dotaconstants.item_ids[player.neutral0Id], ImageType.Items)})"></div>
796
+ </div>
797
+ <div class="buffs">
798
+ <section>
799
+ ${player.stats?.matchPlayerBuffEvent
800
+ ?.map(
801
+ (buff) => `
802
+ <div class="buff">
803
+ <img src="${utils.getImageUrl(dotaconstants[buff.abilityId ? "ability_ids" : "item_ids"][buff.abilityId ?? buff.itemId], buff.abilityId ? ImageType.Abilities : ImageType.Items)}" alt="" />
804
+ <p>${buff.stackCount ?? ""}</p>
805
+ </div>`
806
+ )
807
+ .join("")}
808
+ </section>
809
+ <section>
810
+ <div class="support_item"${player.supportItemsCount[30] > 0 ? "" : ' style="display:none"'}>
811
+ <img src="${utils.getImageUrl("gem", ImageType.Items)}" alt="" />
812
+ <p>${player.supportItemsCount[30]}</p>
813
+ </div>
814
+ <div class="support_item"${player.supportItemsCount[40] > 0 ? "" : ' style="display:none"'}>
815
+ <img src="${utils.getImageUrl("dust", ImageType.Items)}" alt="" />
816
+ <p>${player.supportItemsCount[40]}</p>
817
+ </div>
818
+ <div class="support_item"${player.supportItemsCount[42] > 0 ? "" : ' style="display:none"'}>
819
+ <img src="${utils.getImageUrl("ward_observer", ImageType.Items)}" alt="" />
820
+ <p>${player.supportItemsCount[42]}</p>
821
+ </div>
822
+ <div class="support_item"${player.supportItemsCount[43] > 0 ? "" : ' style="display:none"'}>
823
+ <img src="${utils.getImageUrl("ward_sentry", ImageType.Items)}" alt="" />
824
+ <p>${player.supportItemsCount[43]}</p>
825
+ </div>
826
+ <div class="support_item"${player.supportItemsCount[188] > 0 ? "" : ' style="display:none"'}>
827
+ <img src="${utils.getImageUrl("smoke_of_deceit", ImageType.Items)}" alt="" />
828
+ <p>${player.supportItemsCount[188]}</p>
829
+ </div>
830
+ </section>
831
+ </div>`
832
+ : `
833
+ <div class="items_buffs master">
834
+ <div class="items master">
835
+ ${player.items
836
+ .map((item) =>
837
+ item
838
+ ? `
839
+ <div class="item${item.isRecipe ? " recipe" : ""}">
840
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
841
+ <p class="time">${utils.sec2time(item.time)}</p>
842
+ </div>`
843
+ : `
844
+ <div class="item" style="visibility:hidden"}">
845
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />>
846
+ <p class="time">--:--</p>
847
+ </div>`
848
+ )
849
+ .join("")}
850
+ ${player.backpacks
851
+ .map((item) =>
852
+ item
853
+ ? `
854
+ <div class="item back${item.isRecipe ? " recipe" : ""}">
855
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
856
+ <p class="time">${utils.sec2time(item.time)}</p>
857
+ </div>`
858
+ : `
859
+ <div class="item back" style="visibility:hidden"}">
860
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
861
+ <p class="time">--:--</p>
862
+ </div>`
863
+ )
864
+ .join("")}
865
+ <div class="item neutral">
866
+ <img src="${utils.getImageUrl(dotaconstants.item_ids[player.neutral0Id], ImageType.Items)}" alt="" />
867
+ </div>
868
+ </div>
869
+ <div class="buffs master">
870
+ ${player.stats?.matchPlayerBuffEvent
871
+ ?.map(
872
+ (buff) => `
873
+ <div class="buff">
874
+ <img src="${utils.getImageUrl(dotaconstants[buff.abilityId ? "ability_ids" : "item_ids"][buff.abilityId ?? buff.itemId], buff.abilityId ? ImageType.Abilities : ImageType.Items)}" alt="" />
875
+ <p>${buff.stackCount ?? ""}</p>
876
+ </div>`
877
+ )
878
+ .join("")}
879
+ </div>
880
+ </div>
881
+ <div class="items_buffs slave">
882
+ <div class="items slave">
883
+ ${player.unitItems
884
+ .map((item) =>
885
+ item
886
+ ? `
887
+ <div class="item${item.isRecipe ? " recipe" : ""}">
888
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
889
+ <p class="time">${utils.sec2time(item.time)}</p>
890
+ </div>`
891
+ : `
892
+ <div class="item" style="visibility:hidden"}">
893
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />>
894
+ <p class="time">--:--</p>
895
+ </div>`
896
+ )
897
+ .join("")}
898
+ ${player.unitBackpacks
899
+ .map((item) =>
900
+ item
901
+ ? `
902
+ <div class="item back${item.isRecipe ? " recipe" : ""}">
903
+ <img src="${utils.getImageUrl(item.name, ImageType.Items)}" alt="" />
904
+ <p class="time">${utils.sec2time(item.time)}</p>
905
+ </div>`
906
+ : `
907
+ <div class="item back" style="visibility:hidden"}">
908
+ <img src="${utils.getImageUrl("blink", ImageType.Items)}" alt="" />
909
+ <p class="time">--:--</p>
910
+ </div>`
911
+ )
912
+ .join("")}
913
+ <div class="item neutral">
914
+ <img src="${utils.getImageUrl(dotaconstants.item_ids[player.additionalUnit.neutral0Id], ImageType.Items)}" alt="" />
915
+ </div>
916
+ </div>
917
+ <div class="buffs_supportItems slave">
918
+ <div class="buffs">
919
+ <!-- 无有效API获取熊灵buff -->
920
+ </div>
921
+ <div class="support_items">
922
+ <div class="support_item"${player.supportItemsCount[30] > 0 ? "" : ' style="display:none"'}>
923
+ <img src="${utils.getImageUrl("gem", ImageType.Items)}" alt="" />
924
+ <p>${player.supportItemsCount[30]}</p>
925
+ </div>
926
+ <div class="support_item"${player.supportItemsCount[40] > 0 ? "" : ' style="display:none"'}>
927
+ <img src="${utils.getImageUrl("dust", ImageType.Items)}" alt="" />
928
+ <p>${player.supportItemsCount[40]}</p>
929
+ </div>
930
+ <div class="support_item"${player.supportItemsCount[42] > 0 ? "" : ' style="display:none"'}>
931
+ <img src="${utils.getImageUrl("ward_observer", ImageType.Items)}" alt="" />
932
+ <p>${player.supportItemsCount[42]}</p>
933
+ </div>
934
+ <div class="support_item"${player.supportItemsCount[43] > 0 ? "" : ' style="display:none"'}>
935
+ <img src="${utils.getImageUrl("ward_sentry", ImageType.Items)}" alt="" />
936
+ <p>${player.supportItemsCount[43]}</p>
937
+ </div>
938
+ <div class="support_item"${player.supportItemsCount[188] > 0 ? "" : ' style="display:none"'}>
939
+ <img src="${utils.getImageUrl("smoke_of_deceit", ImageType.Items)}" alt="" />
940
+ <p>${player.supportItemsCount[188]}</p>
941
+ </div>
942
+ </div>
943
+ </div>
944
+ </div>`}
945
+ <div class="details">
946
+ <section>英雄伤害:<span class="hero_damage">${player.heroDamage}</span></section>
947
+ <section>建筑伤害:<span class="building_damage">${player.towerDamage}</span></section>
948
+ <section>受到伤害(减免后):<span class="tak">${
949
+ player.stats?.heroDamageReport?.receivedTotal.physicalDamage + player.stats?.heroDamageReport?.receivedTotal.magicalDamage + player.stats?.heroDamageReport?.receivedTotal.pureDamage
950
+ }</span></section>
951
+ <section>补刀:<span class="lh">${player.numLastHits}</span>/<span class="dn">${player.numDenies}</span></section>
952
+ <section>GPM/XPM:<span class="gpm">${player.goldPerMinute}</span>/<span class="xpm">${player.experiencePerMinute}</span></section>
953
+ <section>治疗量:<span class="heal">${player.heroHealing}</span></section>
954
+ <section>控制时间:<span class="building_damage">${(player.stats?.heroDamageReport?.dealtTotal.stunDuration / 100).toFixed(2)}/${(player.stats?.heroDamageReport?.dealtTotal.slowDuration / 100).toFixed(2)}/${(
955
+ player.stats?.heroDamageReport?.dealtTotal.disableDuration / 100
956
+ ).toFixed(2)}</span>s</section>
957
+ </div>
958
+ </div>`).join("") %>
959
+ </div>
960
+ <div class="ban_list">
961
+ <%- match.pickBans
962
+ .filter((hero) => !hero.isPick)
963
+ .map((hero) => `<div class="ban_hero"><img src="${utils.getImageUrl(/^npc_dota_hero_(?<name>.+)$/.exec(dotaconstants.heroes[hero.bannedHeroId].name)[1], ImageType.Heroes)}" alt="" /></div>`)
964
+ .join("") %>
965
+ </div>
966
+ </div>
967
+ </body>
968
+ </html>
969
+ <script>
970
+ // 获取原始的玩家容器
971
+ const originalContainer = document.querySelector('.players');
972
+
973
+ // 创建新的容器
974
+ const radiantContainer = document.createElement('div');
975
+ radiantContainer.className = 'radiant_players';
976
+
977
+ const direContainer = document.createElement('div');
978
+ direContainer.className = 'dire_players';
979
+
980
+ // 获取所有玩家元素
981
+ const players = document.querySelectorAll('.player');
982
+
983
+ // 根据玩家类型将玩家移动到新的容器
984
+ players.forEach(player => {
985
+ if (player.classList.contains('radiant')) {
986
+ radiantContainer.appendChild(player);
987
+ } else if (player.classList.contains('dire')) {
988
+ direContainer.appendChild(player);
989
+ }
990
+ });
991
+
992
+ // 清空原始容器并添加新的分组容器
993
+ originalContainer.innerHTML = '';
994
+ originalContainer.appendChild(radiantContainer);
995
+ originalContainer.appendChild(direContainer);
996
+
997
+ </script>