@aparte/n8n-chat 0.1.0 → 0.3.0
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.
- package/README.md +230 -16
- package/dist/cards.d.ts +3 -0
- package/dist/cdn/chunks/chunk-E55C7UF2.js +2 -0
- package/dist/cdn/chunks/chunk-E55C7UF2.js.map +7 -0
- package/dist/cdn/chunks/chunk-F2QIT4NR.js +206 -0
- package/dist/cdn/chunks/chunk-F2QIT4NR.js.map +7 -0
- package/dist/cdn/chunks/chunk-F2TNPBN3.js +2 -0
- package/dist/cdn/chunks/chunk-F2TNPBN3.js.map +7 -0
- package/dist/cdn/chunks/chunk-KY2H3HIJ.js +2 -0
- package/dist/cdn/chunks/chunk-KY2H3HIJ.js.map +7 -0
- package/dist/cdn/chunks/chunk-VLHCX6EH.js +356 -0
- package/dist/cdn/chunks/chunk-VLHCX6EH.js.map +7 -0
- package/dist/cdn/chunks/chunk-XC2SVYFR.js +2 -0
- package/dist/cdn/chunks/chunk-XC2SVYFR.js.map +7 -0
- package/dist/cdn/chunks/de-M5OVUL5F.js +2 -0
- package/dist/cdn/chunks/de-M5OVUL5F.js.map +7 -0
- package/dist/cdn/chunks/es-JUSLSPF7.js +2 -0
- package/dist/cdn/chunks/es-JUSLSPF7.js.map +7 -0
- package/dist/cdn/chunks/fr-Z2Y3375Z.js +2 -0
- package/dist/cdn/chunks/fr-Z2Y3375Z.js.map +7 -0
- package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js → highlight-ADUWBKTT.js} +2 -2
- package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js.map → highlight-ADUWBKTT.js.map} +1 -1
- package/dist/cdn/chunks/it-N53LIIX5.js +2 -0
- package/dist/cdn/chunks/it-N53LIIX5.js.map +7 -0
- package/dist/cdn/chunks/items-GTJKLFZT.js +467 -0
- package/dist/cdn/chunks/items-GTJKLFZT.js.map +7 -0
- package/dist/cdn/chunks/ja-LJHMBKJ4.js +2 -0
- package/dist/cdn/chunks/ja-LJHMBKJ4.js.map +7 -0
- package/dist/cdn/chunks/ko-XAQOC75B.js +2 -0
- package/dist/cdn/chunks/ko-XAQOC75B.js.map +7 -0
- package/dist/cdn/chunks/link-L4C4K5GE.js +493 -0
- package/dist/cdn/chunks/link-L4C4K5GE.js.map +7 -0
- package/dist/cdn/chunks/media-EOQEOMXK.js +797 -0
- package/dist/cdn/chunks/media-EOQEOMXK.js.map +7 -0
- package/dist/cdn/chunks/order-T5L422AO.js +839 -0
- package/dist/cdn/chunks/order-T5L422AO.js.map +7 -0
- package/dist/cdn/chunks/place-UD2C3U5F.js +689 -0
- package/dist/cdn/chunks/place-UD2C3U5F.js.map +7 -0
- package/dist/cdn/chunks/plan-JJ3Z64NU.js +542 -0
- package/dist/cdn/chunks/plan-JJ3Z64NU.js.map +7 -0
- package/dist/cdn/chunks/product-FNGKWEQP.js +676 -0
- package/dist/cdn/chunks/product-FNGKWEQP.js.map +7 -0
- package/dist/cdn/chunks/pt-BR-KMZM3WTU.js +2 -0
- package/dist/cdn/chunks/pt-BR-KMZM3WTU.js.map +7 -0
- package/dist/cdn/chunks/ru-3AG5HYY2.js +2 -0
- package/dist/cdn/chunks/ru-3AG5HYY2.js.map +7 -0
- package/dist/cdn/chunks/score-3CGZEPWP.js +882 -0
- package/dist/cdn/chunks/score-3CGZEPWP.js.map +7 -0
- package/dist/cdn/chunks/stats-FGZCRFFK.js +491 -0
- package/dist/cdn/chunks/stats-FGZCRFFK.js.map +7 -0
- package/dist/cdn/chunks/stock-E72GAUMB.js +707 -0
- package/dist/cdn/chunks/stock-E72GAUMB.js.map +7 -0
- package/dist/cdn/chunks/weather-5ZNWC2WM.js +615 -0
- package/dist/cdn/chunks/weather-5ZNWC2WM.js.map +7 -0
- package/dist/cdn/chunks/zh-CN-DL6ZWLGA.js +2 -0
- package/dist/cdn/chunks/zh-CN-DL6ZWLGA.js.map +7 -0
- package/dist/cdn/n8n-chat.js +57 -51
- package/dist/cdn/n8n-chat.js.map +4 -4
- package/dist/create-chat.d.ts +43 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +87 -41
- package/dist/index.js.map +1 -1
- package/dist/strings.d.ts +1 -1
- package/dist/style.css +9 -1
- package/dist/theme.css +8 -0
- package/package.json +7 -6
- package/dist/cdn/chunks/chunk-MU6PIUJC.js +0 -206
- package/dist/cdn/chunks/chunk-MU6PIUJC.js.map +0 -7
- package/dist/cdn/chunks/de-WJNL5YNK.js +0 -2
- package/dist/cdn/chunks/de-WJNL5YNK.js.map +0 -7
- package/dist/cdn/chunks/es-DV5N3CXP.js +0 -2
- package/dist/cdn/chunks/es-DV5N3CXP.js.map +0 -7
- package/dist/cdn/chunks/fr-YU75PBOR.js +0 -2
- package/dist/cdn/chunks/fr-YU75PBOR.js.map +0 -7
- package/dist/cdn/chunks/it-DZTHWNO3.js +0 -2
- package/dist/cdn/chunks/it-DZTHWNO3.js.map +0 -7
- package/dist/cdn/chunks/ja-QO442LBN.js +0 -2
- package/dist/cdn/chunks/ja-QO442LBN.js.map +0 -7
- package/dist/cdn/chunks/ko-EGFZJCXQ.js +0 -2
- package/dist/cdn/chunks/ko-EGFZJCXQ.js.map +0 -7
- package/dist/cdn/chunks/pt-BR-526LHI67.js +0 -2
- package/dist/cdn/chunks/pt-BR-526LHI67.js.map +0 -7
- package/dist/cdn/chunks/ru-5WNEMKNP.js +0 -2
- package/dist/cdn/chunks/ru-5WNEMKNP.js.map +0 -7
- package/dist/cdn/chunks/zh-CN-ABSHNLG6.js +0 -2
- package/dist/cdn/chunks/zh-CN-ABSHNLG6.js.map +0 -7
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
import{a as n,b as T,d as P,e as k,f as u,h as F,i as w,o as fe,p as Z,q as x,w as _e,x as J}from"./chunk-VLHCX6EH.js";import"./chunk-F2QIT4NR.js";import"./chunk-XAWE4EAK.js";var y=e=>`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">${e}</svg>`,U=y('<circle cx="12" cy="12" r="9"/><path d="M12 7.6l4.2 3-1.6 4.9H9.4L7.8 10.6z"/><path d="M12 7.6V3.2M16.2 10.6l4.3-1.3M14.6 15.5l2.6 3.7M9.4 15.5l-2.6 3.7M7.8 10.6L3.5 9.3"/>'),He=y('<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3v18"/><path d="M5.7 5.6a9 9 0 0 1 0 12.8M18.3 5.6a9 9 0 0 0 0 12.8"/>'),Be=y('<circle cx="12" cy="12" r="9"/><path d="M5.9 5.2c2.5 1.9 3.9 4.2 3.9 6.8s-1.4 4.9-3.9 6.8"/><path d="M18.1 5.2c-2.5 1.9-3.9 4.2-3.9 6.8s1.4 4.9 3.9 6.8"/>'),Fe=y('<ellipse cx="12" cy="12" rx="9.6" ry="5.6" transform="rotate(-45 12 12)"/><path d="M7.2 16.8C10 15.6 15.6 10 16.8 7.2"/>'),Ue=y('<ellipse cx="12" cy="12" rx="9.6" ry="5.6" transform="rotate(-45 12 12)"/><path d="M9.6 14.4l4.8-4.8M10.4 11.6l2 2M11.6 10.4l2 2"/>'),Ve=y('<path d="M6.5 3l6.6 14.2a1.4 1.4 0 0 0 1.3.8H20"/><ellipse cx="7.5" cy="18.4" rx="3.2" ry="1.5"/>'),Ie=y('<circle cx="12" cy="12" r="9"/><path d="M7.3 4.3a11 11 0 0 1 0 15.4M16.7 4.3a11 11 0 0 0 0 15.4"/><path d="M8.6 8.2l1.4-.5M9 12h1.5M8.6 15.8l1.4.5M15.4 8.2l-1.4-.5M15 12h-1.5M15.4 15.8l-1.4.5"/>'),ae=y('<path d="M8 4h8v5.2a4 4 0 0 1-8 0z"/><path d="M8 6H5.2a3 3 0 0 0 3 4.2M16 6h2.8a3 3 0 0 1-3 4.2"/><path d="M12 13.2v3.6M8.5 20h7M9.8 16.8h4.4V20H9.8z"/>'),Me={football:U,basketball:He,tennis:Be,rugby:Fe,hockey:Ve,baseball:Ie,"american-football":Ue,generic:ae},he='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="7" y="3.5" width="10" height="16" rx="1.6" fill="currentColor" transform="rotate(8 12 11.5)"/></svg>',Ye=y('<path d="M7.5 4v13.5M4 14l3.5 3.5L11 14"/><path d="M16.5 20V6.5M13 10l3.5-3.5L20 10"/>'),Ge={goal:U,penalty:U,"own-goal":U,yellow:he,red:he,sub:Ye},Ke=y('<path d="M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z"/><circle cx="12" cy="10" r="2.3"/>'),We=y('<rect x="3" y="6.5" width="18" height="12" rx="2"/><path d="M8.5 21h7M9 3l3 3.5L15 3"/>'),qe=y('<path d="M9.5 6l6 6-6 6"/>'),Xe=`/* =========================================
|
|
2
|
+
The score card \u2014 @aparte/plugin-cards/score
|
|
3
|
+
=========================================
|
|
4
|
+
Three variants of one card, chosen by \`data-variant\` on its root:
|
|
5
|
+
card the scoreboard: competition over it, the two teams facing each other, the
|
|
6
|
+
score big between them, the state of play under it, venue and channel below.
|
|
7
|
+
compact one row per match: the state or the kick-off in a column, the two teams
|
|
8
|
+
stacked with their scores at the end. Several matches are always rows.
|
|
9
|
+
detail the card's board, then the score by period (a table) and the events,
|
|
10
|
+
each on its team's side of a centre line.
|
|
11
|
+
A team's colour is the tool's, validated as a hex and set as \`--aparte-score-team\`
|
|
12
|
+
(its crest), \`--aparte-score-home\` / \`--aparte-score-away\` (the band and the glow).
|
|
13
|
+
Everything else is a theme token or derived from one, so light and dark follow the chat.
|
|
14
|
+
The winner is told by weight and, on a row, by a mark \u2014 never by colour alone; a live
|
|
15
|
+
match says "Live" in a word beside its red dot.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
.aparte-score-card {
|
|
19
|
+
--aparte-score-pad: var(--aparte-space-6);
|
|
20
|
+
--aparte-score-live: var(--aparte-error);
|
|
21
|
+
--aparte-score-live-ink: var(--aparte-error-ink);
|
|
22
|
+
--aparte-score-neutral: color-mix(in oklab, var(--aparte-text) 9%, var(--aparte-surface-1));
|
|
23
|
+
--aparte-score-rule: color-mix(in oklab, var(--aparte-border) 80%, transparent);
|
|
24
|
+
--aparte-score-num-size: calc(2.625rem * var(--aparte-font-scale));
|
|
25
|
+
--aparte-score-crest-lg: 3.25rem;
|
|
26
|
+
--aparte-score-crest-sm: 1.375rem;
|
|
27
|
+
--aparte-score-band-size: 3px;
|
|
28
|
+
/* A football card's colours are the same in daylight and at night: they are the
|
|
29
|
+
referee's, not the theme's. Text on a team's colour is black or white, picked by the
|
|
30
|
+
colour's own luminance \u2014 a theme grey would fail on half the clubs. */
|
|
31
|
+
--aparte-score-yellow: #f4c20d;
|
|
32
|
+
--aparte-score-red: #dc2626;
|
|
33
|
+
--aparte-score-ink-light: #ffffff;
|
|
34
|
+
--aparte-score-ink-dark: #15121a;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* \u2500\u2500 Widths: each variant asks for its own; the bubble's limit caps them all \u2500\u2500 */
|
|
38
|
+
|
|
39
|
+
.aparte-score-card[data-variant="card"] { --aparte-rich-card-max-inline-size: 25rem; }
|
|
40
|
+
.aparte-score-card[data-variant="compact"] { --aparte-rich-card-max-inline-size: 24rem; }
|
|
41
|
+
.aparte-score-card[data-variant="detail"] { --aparte-rich-card-max-inline-size: 28rem; }
|
|
42
|
+
.aparte-score-card:has(.aparte-score__board-list) { --aparte-rich-card-max-inline-size: 26rem; }
|
|
43
|
+
|
|
44
|
+
/* \u2500\u2500 Visually hidden: said to a reader, not drawn \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
45
|
+
|
|
46
|
+
.aparte-score__sr {
|
|
47
|
+
position: absolute;
|
|
48
|
+
inline-size: 1px;
|
|
49
|
+
block-size: 1px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: -1px;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
clip: rect(0 0 0 0);
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
border: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* \u2500\u2500 The match, with its band in the two teams' colours \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
59
|
+
|
|
60
|
+
.aparte-score {
|
|
61
|
+
/* The board, the table and the events read the match's width, not the window's. */
|
|
62
|
+
container: aparte-score / inline-size;
|
|
63
|
+
position: relative;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
min-inline-size: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.aparte-score::before {
|
|
70
|
+
content: "";
|
|
71
|
+
display: block;
|
|
72
|
+
block-size: var(--aparte-score-band-size);
|
|
73
|
+
background: linear-gradient(to right,
|
|
74
|
+
var(--aparte-score-home, var(--aparte-score-rule)) 0 50%,
|
|
75
|
+
var(--aparte-score-away, var(--aparte-score-rule)) 50% 100%);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The home team is at the start of the line, so its colour is too. */
|
|
79
|
+
.aparte-score:dir(rtl)::before {
|
|
80
|
+
background: linear-gradient(to left,
|
|
81
|
+
var(--aparte-score-home, var(--aparte-score-rule)) 0 50%,
|
|
82
|
+
var(--aparte-score-away, var(--aparte-score-rule)) 50% 100%);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* A live match's band is the live red: the state of play, seen from the top of the card. */
|
|
86
|
+
.aparte-score[data-phase="live"]::before {
|
|
87
|
+
background: var(--aparte-score-live);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* \u2500\u2500 The line over the board: sport, competition, round, day \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
91
|
+
|
|
92
|
+
.aparte-score__head,
|
|
93
|
+
.aparte-score__heading {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
gap: var(--aparte-space-3);
|
|
97
|
+
min-inline-size: 0;
|
|
98
|
+
padding: var(--aparte-space-5) var(--aparte-score-pad) 0;
|
|
99
|
+
color: var(--aparte-text-muted);
|
|
100
|
+
font-size: var(--aparte-font-size-sm);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.aparte-score__sport {
|
|
104
|
+
--aparte-rich-card-glyph-size: 1rem;
|
|
105
|
+
color: var(--aparte-text-muted);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.aparte-score__meta {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
align-items: baseline;
|
|
112
|
+
gap: 0 var(--aparte-space-2);
|
|
113
|
+
min-inline-size: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.aparte-score__competition {
|
|
117
|
+
color: var(--aparte-text);
|
|
118
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
119
|
+
overflow-wrap: anywhere;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.aparte-score__round { overflow-wrap: anywhere; }
|
|
123
|
+
.aparte-score__dot { color: color-mix(in oklab, var(--aparte-text-muted) 60%, transparent); }
|
|
124
|
+
|
|
125
|
+
.aparte-score__date {
|
|
126
|
+
margin-inline-start: auto;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
font-variant-numeric: tabular-nums;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* \u2500\u2500 The board \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
132
|
+
|
|
133
|
+
.aparte-score__board {
|
|
134
|
+
display: grid;
|
|
135
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
|
136
|
+
align-items: start;
|
|
137
|
+
gap: var(--aparte-space-4);
|
|
138
|
+
padding: var(--aparte-space-7) var(--aparte-score-pad) var(--aparte-space-8);
|
|
139
|
+
/* Each team's side is lit faintly in its colour, the way a broadcast frames a fixture. */
|
|
140
|
+
background:
|
|
141
|
+
radial-gradient(60% 90% at 0% 40%, color-mix(in oklab, var(--aparte-score-home, transparent) 11%, transparent), transparent 70%),
|
|
142
|
+
radial-gradient(60% 90% at 100% 40%, color-mix(in oklab, var(--aparte-score-away, transparent) 11%, transparent), transparent 70%);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.aparte-score__board:dir(rtl) {
|
|
146
|
+
background:
|
|
147
|
+
radial-gradient(60% 90% at 100% 40%, color-mix(in oklab, var(--aparte-score-home, transparent) 11%, transparent), transparent 70%),
|
|
148
|
+
radial-gradient(60% 90% at 0% 40%, color-mix(in oklab, var(--aparte-score-away, transparent) 11%, transparent), transparent 70%);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.aparte-score__team {
|
|
152
|
+
display: flex;
|
|
153
|
+
flex-direction: column;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: var(--aparte-space-3);
|
|
156
|
+
min-inline-size: 0;
|
|
157
|
+
text-align: center;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.aparte-score__team-name {
|
|
161
|
+
display: -webkit-box;
|
|
162
|
+
-webkit-box-orient: vertical;
|
|
163
|
+
-webkit-line-clamp: 2;
|
|
164
|
+
overflow: hidden;
|
|
165
|
+
max-inline-size: 100%;
|
|
166
|
+
color: var(--aparte-text);
|
|
167
|
+
font-size: var(--aparte-font-size-base);
|
|
168
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
169
|
+
line-height: 1.25;
|
|
170
|
+
overflow-wrap: anywhere;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.aparte-score__team[data-lead="lose"] .aparte-score__team-name { font-weight: var(--aparte-font-weight-medium); }
|
|
174
|
+
|
|
175
|
+
.aparte-score__record {
|
|
176
|
+
margin-block-start: calc(var(--aparte-space-2) * -1);
|
|
177
|
+
color: var(--aparte-text-muted);
|
|
178
|
+
font-size: var(--aparte-font-size-xs);
|
|
179
|
+
font-variant-numeric: tabular-nums;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* \u2500\u2500 The crest: a logo over a monogram disc \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
183
|
+
|
|
184
|
+
.aparte-score__crest {
|
|
185
|
+
position: relative;
|
|
186
|
+
display: inline-grid;
|
|
187
|
+
place-items: center;
|
|
188
|
+
flex: none;
|
|
189
|
+
inline-size: var(--aparte-score-crest-size);
|
|
190
|
+
block-size: var(--aparte-score-crest-size);
|
|
191
|
+
border-radius: var(--aparte-radius-full);
|
|
192
|
+
background: var(--aparte-score-team, var(--aparte-score-neutral));
|
|
193
|
+
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--aparte-text) 10%, transparent);
|
|
194
|
+
color: var(--aparte-text);
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.aparte-score__crest--lg {
|
|
199
|
+
--aparte-score-crest-size: var(--aparte-score-crest-lg);
|
|
200
|
+
font-size: calc(var(--aparte-score-crest-lg) * 0.3);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.aparte-score__crest--sm {
|
|
204
|
+
--aparte-score-crest-size: var(--aparte-score-crest-sm);
|
|
205
|
+
font-size: calc(var(--aparte-score-crest-sm) * 0.36);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.aparte-score__crest[data-ink="light"] { color: var(--aparte-score-ink-light); }
|
|
209
|
+
.aparte-score__crest[data-ink="dark"] { color: var(--aparte-score-ink-dark); }
|
|
210
|
+
|
|
211
|
+
.aparte-score__monogram {
|
|
212
|
+
font-weight: var(--aparte-font-weight-bold);
|
|
213
|
+
letter-spacing: -0.02em;
|
|
214
|
+
line-height: 1;
|
|
215
|
+
white-space: nowrap;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* A logo is drawn on the card's own ground: a crest's shape is its own, not a disc's. */
|
|
219
|
+
.aparte-score__crest[data-logo] {
|
|
220
|
+
background: transparent;
|
|
221
|
+
box-shadow: none;
|
|
222
|
+
border-radius: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.aparte-score__crest[data-logo] .aparte-score__monogram { visibility: hidden; }
|
|
226
|
+
|
|
227
|
+
.aparte-score__logo {
|
|
228
|
+
position: absolute;
|
|
229
|
+
inset: 0;
|
|
230
|
+
inline-size: 100%;
|
|
231
|
+
block-size: 100%;
|
|
232
|
+
object-fit: contain;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* \u2500\u2500 The middle: score, kick-off, status \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
236
|
+
|
|
237
|
+
.aparte-score__centre {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
align-items: center;
|
|
241
|
+
gap: var(--aparte-space-3);
|
|
242
|
+
min-inline-size: 5.5rem;
|
|
243
|
+
/* The numbers sit level with the crests' middles. */
|
|
244
|
+
padding-block-start: calc((var(--aparte-score-crest-lg) - var(--aparte-score-num-size)) / 2);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.aparte-score__result {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
gap: var(--aparte-space-3);
|
|
251
|
+
color: var(--aparte-text);
|
|
252
|
+
font-size: var(--aparte-score-num-size);
|
|
253
|
+
font-weight: var(--aparte-font-weight-bold);
|
|
254
|
+
font-variant-numeric: tabular-nums;
|
|
255
|
+
letter-spacing: -0.03em;
|
|
256
|
+
line-height: 1;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* The loser's number steps back; the winner's keeps its weight. Weight, not colour alone. */
|
|
260
|
+
.aparte-score__num[data-lead="lose"] {
|
|
261
|
+
color: var(--aparte-text-muted);
|
|
262
|
+
font-weight: var(--aparte-font-weight-medium);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.aparte-score__sep {
|
|
266
|
+
color: color-mix(in oklab, var(--aparte-text-muted) 70%, transparent);
|
|
267
|
+
font-weight: var(--aparte-font-weight-normal);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.aparte-score__kickoff {
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
align-items: center;
|
|
274
|
+
gap: var(--aparte-space-1);
|
|
275
|
+
font-variant-numeric: tabular-nums;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.aparte-score__kickoff .aparte-score__day {
|
|
279
|
+
color: var(--aparte-text-muted);
|
|
280
|
+
font-size: var(--aparte-font-size-xs);
|
|
281
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
282
|
+
letter-spacing: 0.04em;
|
|
283
|
+
text-transform: uppercase;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.aparte-score__kickoff .aparte-score__hour {
|
|
287
|
+
color: var(--aparte-text);
|
|
288
|
+
font-size: var(--aparte-font-size-xl);
|
|
289
|
+
font-weight: var(--aparte-font-weight-bold);
|
|
290
|
+
letter-spacing: -0.01em;
|
|
291
|
+
white-space: nowrap;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* A kick-off that will not happen is struck through \u2014 and the pill under it says why. */
|
|
295
|
+
.aparte-score[data-phase="postponed"] .aparte-score__hour,
|
|
296
|
+
.aparte-score[data-phase="cancelled"] .aparte-score__hour,
|
|
297
|
+
.aparte-score__row[data-phase="postponed"] .aparte-score__hour,
|
|
298
|
+
.aparte-score__row[data-phase="cancelled"] .aparte-score__hour {
|
|
299
|
+
color: var(--aparte-text-muted);
|
|
300
|
+
text-decoration: line-through;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.aparte-score__pill {
|
|
304
|
+
display: inline-flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
gap: var(--aparte-space-2);
|
|
307
|
+
padding: var(--aparte-space-1) var(--aparte-space-4);
|
|
308
|
+
border-radius: var(--aparte-radius-full);
|
|
309
|
+
background: var(--aparte-score-neutral);
|
|
310
|
+
color: var(--aparte-text-muted);
|
|
311
|
+
font-size: var(--aparte-font-size-xs);
|
|
312
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
313
|
+
line-height: 1.4;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.aparte-score__pill[data-phase="live"] {
|
|
318
|
+
background: color-mix(in oklab, var(--aparte-score-live) 14%, transparent);
|
|
319
|
+
color: var(--aparte-score-live-ink);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.aparte-score__pill[data-phase="live"] .aparte-score__live-word {
|
|
323
|
+
letter-spacing: 0.05em;
|
|
324
|
+
text-transform: uppercase;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.aparte-score__pill[data-phase="halftime"],
|
|
328
|
+
.aparte-score__pill[data-phase="postponed"] {
|
|
329
|
+
background: color-mix(in oklab, var(--aparte-warning) 16%, transparent);
|
|
330
|
+
color: var(--aparte-warning-ink);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.aparte-score__pill[data-phase="cancelled"] {
|
|
334
|
+
background: color-mix(in oklab, var(--aparte-error) 12%, transparent);
|
|
335
|
+
color: var(--aparte-error-ink);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.aparte-score__clock {
|
|
339
|
+
font-variant-numeric: tabular-nums;
|
|
340
|
+
font-weight: var(--aparte-font-weight-bold);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/* The red dot of a live match, and the ring that leaves it. Still under reduced motion. */
|
|
344
|
+
.aparte-score__live-dot {
|
|
345
|
+
position: relative;
|
|
346
|
+
flex: none;
|
|
347
|
+
inline-size: 0.45rem;
|
|
348
|
+
block-size: 0.45rem;
|
|
349
|
+
border-radius: var(--aparte-radius-full);
|
|
350
|
+
background: var(--aparte-score-live);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.aparte-score__live-dot::after {
|
|
354
|
+
content: "";
|
|
355
|
+
position: absolute;
|
|
356
|
+
inset: 0;
|
|
357
|
+
border-radius: inherit;
|
|
358
|
+
background: var(--aparte-score-live);
|
|
359
|
+
animation: aparte-score-pulse 1.8s ease-out infinite;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
@keyframes aparte-score-pulse {
|
|
363
|
+
0% { opacity: 0.6; transform: scale(1); }
|
|
364
|
+
70%, 100% { opacity: 0; transform: scale(2.8); }
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/* \u2500\u2500 The footer: venue, channel, the match's page \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
368
|
+
|
|
369
|
+
.aparte-score__foot {
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-wrap: wrap;
|
|
372
|
+
align-items: center;
|
|
373
|
+
gap: var(--aparte-space-2) var(--aparte-space-5);
|
|
374
|
+
padding: var(--aparte-space-4) var(--aparte-score-pad);
|
|
375
|
+
border-block-start: var(--aparte-border-width) solid var(--aparte-score-rule);
|
|
376
|
+
color: var(--aparte-text-muted);
|
|
377
|
+
font-size: var(--aparte-font-size-xs);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.aparte-score__facts {
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-wrap: wrap;
|
|
383
|
+
gap: var(--aparte-space-1) var(--aparte-space-5);
|
|
384
|
+
min-inline-size: 0;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.aparte-score__fact {
|
|
388
|
+
display: inline-flex;
|
|
389
|
+
align-items: center;
|
|
390
|
+
gap: var(--aparte-space-2);
|
|
391
|
+
min-inline-size: 0;
|
|
392
|
+
overflow-wrap: anywhere;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.aparte-score__fact-glyph { --aparte-rich-card-glyph-size: 0.95rem; opacity: 0.8; }
|
|
396
|
+
|
|
397
|
+
.aparte-score__more {
|
|
398
|
+
display: inline-flex;
|
|
399
|
+
align-items: center;
|
|
400
|
+
gap: var(--aparte-space-1);
|
|
401
|
+
margin-inline-start: auto;
|
|
402
|
+
border-radius: var(--aparte-radius-sm);
|
|
403
|
+
color: var(--aparte-primary-ink);
|
|
404
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
405
|
+
text-decoration: none;
|
|
406
|
+
white-space: nowrap;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.aparte-score__more:hover {
|
|
410
|
+
text-decoration: underline;
|
|
411
|
+
text-decoration-thickness: 1px;
|
|
412
|
+
text-underline-offset: 0.18em;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.aparte-score__more:focus-visible {
|
|
416
|
+
outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
|
|
417
|
+
outline-offset: var(--aparte-focus-outline-offset);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.aparte-score__chevron {
|
|
421
|
+
--aparte-rich-card-glyph-size: 0.9rem;
|
|
422
|
+
transition: translate var(--aparte-duration-base) ease;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.aparte-score__chevron:dir(rtl) { transform: scaleX(-1); }
|
|
426
|
+
.aparte-score__more:hover .aparte-score__chevron { translate: 2px 0; }
|
|
427
|
+
.aparte-score__more:hover .aparte-score__chevron:dir(rtl) { translate: -2px 0; }
|
|
428
|
+
|
|
429
|
+
/* \u2500\u2500 detail: the score by period \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
430
|
+
|
|
431
|
+
.aparte-score__section {
|
|
432
|
+
padding: var(--aparte-space-5) var(--aparte-score-pad);
|
|
433
|
+
border-block-start: var(--aparte-border-width) solid var(--aparte-score-rule);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.aparte-score__table-wrap { overflow-x: auto; }
|
|
437
|
+
|
|
438
|
+
.aparte-score__periods {
|
|
439
|
+
inline-size: 100%;
|
|
440
|
+
border-collapse: collapse;
|
|
441
|
+
font-size: var(--aparte-font-size-sm);
|
|
442
|
+
font-variant-numeric: tabular-nums;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.aparte-score__periods th,
|
|
446
|
+
.aparte-score__periods td {
|
|
447
|
+
padding: var(--aparte-space-2) var(--aparte-space-3);
|
|
448
|
+
text-align: center;
|
|
449
|
+
white-space: nowrap;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.aparte-score__periods thead th {
|
|
453
|
+
padding-block-start: 0;
|
|
454
|
+
color: var(--aparte-text-muted);
|
|
455
|
+
font-size: var(--aparte-font-size-xs);
|
|
456
|
+
font-weight: var(--aparte-font-weight-medium);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.aparte-score__periods tbody tr + tr { border-block-start: var(--aparte-border-width) solid var(--aparte-score-rule); }
|
|
460
|
+
.aparte-score__periods td { color: var(--aparte-text); }
|
|
461
|
+
|
|
462
|
+
.aparte-score__periods .aparte-score__corner,
|
|
463
|
+
.aparte-score__row-team {
|
|
464
|
+
inline-size: 100%;
|
|
465
|
+
text-align: start;
|
|
466
|
+
padding-inline-start: 0;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.aparte-score__row-team { font-weight: var(--aparte-font-weight-medium); }
|
|
470
|
+
|
|
471
|
+
.aparte-score__row-label {
|
|
472
|
+
display: flex;
|
|
473
|
+
align-items: center;
|
|
474
|
+
gap: var(--aparte-space-3);
|
|
475
|
+
min-inline-size: 0;
|
|
476
|
+
max-inline-size: 10rem;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.aparte-score__row-name {
|
|
480
|
+
min-inline-size: 0;
|
|
481
|
+
overflow: hidden;
|
|
482
|
+
text-overflow: ellipsis;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.aparte-score__periods .aparte-score__total {
|
|
486
|
+
border-radius: var(--aparte-radius-sm);
|
|
487
|
+
background: var(--aparte-score-neutral);
|
|
488
|
+
font-weight: var(--aparte-font-weight-bold);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.aparte-score__periods tbody tr[data-lead="lose"] td,
|
|
492
|
+
.aparte-score__periods tbody tr[data-lead="lose"] .aparte-score__row-team { color: var(--aparte-text-muted); }
|
|
493
|
+
|
|
494
|
+
/* A set won is in bold, as a tennis table writes it. */
|
|
495
|
+
.aparte-score__periods td[data-lead="win"] { font-weight: var(--aparte-font-weight-bold); }
|
|
496
|
+
|
|
497
|
+
/* \u2500\u2500 detail: the events, each on its team's side \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
498
|
+
|
|
499
|
+
.aparte-score__timeline { container: aparte-score-events / inline-size; }
|
|
500
|
+
|
|
501
|
+
.aparte-score__events {
|
|
502
|
+
--aparte-score-minute-col: 3.25rem;
|
|
503
|
+
position: relative;
|
|
504
|
+
display: flex;
|
|
505
|
+
flex-direction: column;
|
|
506
|
+
gap: var(--aparte-space-2);
|
|
507
|
+
margin: 0;
|
|
508
|
+
padding: 0;
|
|
509
|
+
list-style: none;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* The centre line the minutes sit on. */
|
|
513
|
+
.aparte-score__events::before {
|
|
514
|
+
content: "";
|
|
515
|
+
position: absolute;
|
|
516
|
+
inset-block: var(--aparte-space-2);
|
|
517
|
+
inset-inline-start: 50%;
|
|
518
|
+
inline-size: 1px;
|
|
519
|
+
background: var(--aparte-score-rule);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.aparte-score__event {
|
|
523
|
+
position: relative;
|
|
524
|
+
display: grid;
|
|
525
|
+
grid-template-columns: minmax(0, 1fr) var(--aparte-score-minute-col) minmax(0, 1fr);
|
|
526
|
+
align-items: center;
|
|
527
|
+
min-block-size: 1.875rem;
|
|
528
|
+
font-size: var(--aparte-font-size-sm);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.aparte-score__minute {
|
|
532
|
+
grid-column: 2;
|
|
533
|
+
grid-row: 1;
|
|
534
|
+
justify-self: center;
|
|
535
|
+
min-inline-size: 2.5rem;
|
|
536
|
+
padding: 1px var(--aparte-space-2);
|
|
537
|
+
border-radius: var(--aparte-radius-full);
|
|
538
|
+
background: var(--aparte-surface-1);
|
|
539
|
+
box-shadow: inset 0 0 0 1px var(--aparte-score-rule);
|
|
540
|
+
color: var(--aparte-text-muted);
|
|
541
|
+
font-size: var(--aparte-font-size-xs);
|
|
542
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
543
|
+
font-variant-numeric: tabular-nums;
|
|
544
|
+
text-align: center;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.aparte-score__minute:empty { visibility: hidden; }
|
|
548
|
+
|
|
549
|
+
.aparte-score__event-body {
|
|
550
|
+
grid-row: 1;
|
|
551
|
+
display: flex;
|
|
552
|
+
align-items: center;
|
|
553
|
+
gap: var(--aparte-space-3);
|
|
554
|
+
min-inline-size: 0;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/* The home team's events lean on the line from the start side, the glyph nearest it. */
|
|
558
|
+
.aparte-score__event[data-team="home"] .aparte-score__event-body {
|
|
559
|
+
grid-column: 1;
|
|
560
|
+
flex-direction: row-reverse;
|
|
561
|
+
justify-self: end;
|
|
562
|
+
text-align: end;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.aparte-score__event[data-team="away"] .aparte-score__event-body {
|
|
566
|
+
grid-column: 3;
|
|
567
|
+
justify-self: start;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.aparte-score__event-text {
|
|
571
|
+
display: flex;
|
|
572
|
+
flex-wrap: wrap;
|
|
573
|
+
align-items: baseline;
|
|
574
|
+
gap: 0 var(--aparte-space-2);
|
|
575
|
+
min-inline-size: 0;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.aparte-score__event[data-team="home"] .aparte-score__event-text { justify-content: flex-end; }
|
|
579
|
+
|
|
580
|
+
.aparte-score__player {
|
|
581
|
+
color: var(--aparte-text);
|
|
582
|
+
font-weight: var(--aparte-font-weight-medium);
|
|
583
|
+
overflow-wrap: anywhere;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.aparte-score__event-detail {
|
|
587
|
+
color: var(--aparte-text-muted);
|
|
588
|
+
font-size: var(--aparte-font-size-xs);
|
|
589
|
+
overflow-wrap: anywhere;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/* The kind is said by the glyph for a goal, a card, a change; a penalty and an own goal
|
|
593
|
+
look like a goal, so they also write their word. A reader hears it for every kind. */
|
|
594
|
+
.aparte-score__event-type {
|
|
595
|
+
position: absolute;
|
|
596
|
+
inline-size: 1px;
|
|
597
|
+
block-size: 1px;
|
|
598
|
+
overflow: hidden;
|
|
599
|
+
clip: rect(0 0 0 0);
|
|
600
|
+
white-space: nowrap;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.aparte-score__event[data-type="penalty"] .aparte-score__event-type,
|
|
604
|
+
.aparte-score__event[data-type="own-goal"] .aparte-score__event-type {
|
|
605
|
+
position: static;
|
|
606
|
+
inline-size: auto;
|
|
607
|
+
block-size: auto;
|
|
608
|
+
overflow: visible;
|
|
609
|
+
clip: auto;
|
|
610
|
+
color: var(--aparte-text-muted);
|
|
611
|
+
font-size: var(--aparte-font-size-xs);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.aparte-score__event-glyph {
|
|
615
|
+
--aparte-rich-card-glyph-size: 1rem;
|
|
616
|
+
color: var(--aparte-text);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.aparte-score__event[data-type="own-goal"] .aparte-score__event-glyph { color: var(--aparte-error-ink); }
|
|
620
|
+
.aparte-score__event[data-type="yellow"] .aparte-score__event-glyph { color: var(--aparte-score-yellow); }
|
|
621
|
+
.aparte-score__event[data-type="red"] .aparte-score__event-glyph { color: var(--aparte-score-red); }
|
|
622
|
+
.aparte-score__event[data-type="sub"] .aparte-score__event-glyph { color: var(--aparte-text-muted); }
|
|
623
|
+
|
|
624
|
+
.aparte-score__event[data-type="sub"] .aparte-score__player { font-weight: var(--aparte-font-weight-normal); }
|
|
625
|
+
|
|
626
|
+
/* The team's name beside each event, for when the side no longer says it (below). */
|
|
627
|
+
.aparte-score__event-team {
|
|
628
|
+
position: absolute;
|
|
629
|
+
inline-size: 1px;
|
|
630
|
+
block-size: 1px;
|
|
631
|
+
overflow: hidden;
|
|
632
|
+
clip: rect(0 0 0 0);
|
|
633
|
+
white-space: nowrap;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/* A narrow card: one column, the minute first, the team written beside each event. */
|
|
637
|
+
@container aparte-score-events (max-width: 22rem) {
|
|
638
|
+
.aparte-score__events::before { inset-inline-start: calc(var(--aparte-score-minute-col) / 2); }
|
|
639
|
+
|
|
640
|
+
.aparte-score__event { grid-template-columns: var(--aparte-score-minute-col) minmax(0, 1fr); }
|
|
641
|
+
.aparte-score__minute { grid-column: 1; }
|
|
642
|
+
|
|
643
|
+
.aparte-score__event[data-team] .aparte-score__event-body {
|
|
644
|
+
grid-column: 2;
|
|
645
|
+
flex-direction: row;
|
|
646
|
+
justify-self: stretch;
|
|
647
|
+
padding-inline-start: var(--aparte-space-3);
|
|
648
|
+
text-align: start;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.aparte-score__event[data-team="home"] .aparte-score__event-text { justify-content: flex-start; }
|
|
652
|
+
|
|
653
|
+
.aparte-score__event-team {
|
|
654
|
+
position: static;
|
|
655
|
+
inline-size: auto;
|
|
656
|
+
block-size: auto;
|
|
657
|
+
overflow: hidden;
|
|
658
|
+
clip: auto;
|
|
659
|
+
flex: none;
|
|
660
|
+
max-inline-size: 6rem;
|
|
661
|
+
margin-inline-start: auto;
|
|
662
|
+
padding: 0 var(--aparte-space-3);
|
|
663
|
+
border-radius: var(--aparte-radius-full);
|
|
664
|
+
background: var(--aparte-score-team, var(--aparte-score-neutral));
|
|
665
|
+
color: var(--aparte-text);
|
|
666
|
+
font-size: var(--aparte-font-size-2xs);
|
|
667
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
668
|
+
line-height: 1.6;
|
|
669
|
+
text-overflow: ellipsis;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.aparte-score__event-team[data-ink="light"] { color: var(--aparte-score-ink-light); }
|
|
673
|
+
.aparte-score__event-team[data-ink="dark"] { color: var(--aparte-score-ink-dark); }
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/* \u2500\u2500 compact and several matches: rows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
677
|
+
|
|
678
|
+
.aparte-score__single,
|
|
679
|
+
.aparte-score__board-list {
|
|
680
|
+
display: flex;
|
|
681
|
+
flex-direction: column;
|
|
682
|
+
min-inline-size: 0;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.aparte-score__heading {
|
|
686
|
+
padding-block-end: var(--aparte-space-3);
|
|
687
|
+
color: var(--aparte-text);
|
|
688
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.aparte-score__heading-text { min-inline-size: 0; overflow-wrap: anywhere; }
|
|
692
|
+
|
|
693
|
+
.aparte-score__list {
|
|
694
|
+
margin: 0;
|
|
695
|
+
padding: 0;
|
|
696
|
+
list-style: none;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.aparte-score__row {
|
|
700
|
+
position: relative;
|
|
701
|
+
display: grid;
|
|
702
|
+
grid-template-columns: 4.5rem minmax(0, 1fr);
|
|
703
|
+
align-items: center;
|
|
704
|
+
gap: 0 var(--aparte-space-5);
|
|
705
|
+
padding: var(--aparte-space-4) var(--aparte-score-pad);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.aparte-score__list .aparte-score__row + .aparte-score__row,
|
|
709
|
+
.aparte-score__single .aparte-score__head + .aparte-score__row {
|
|
710
|
+
border-block-start: var(--aparte-border-width) solid var(--aparte-score-rule);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.aparte-score__single .aparte-score__head { padding-block-end: var(--aparte-space-3); }
|
|
714
|
+
.aparte-score__single .aparte-score__head + .aparte-score__row { margin-block-start: var(--aparte-space-2); }
|
|
715
|
+
|
|
716
|
+
/* A row's band is a short bar at its start, red while the match is live. */
|
|
717
|
+
.aparte-score__row[data-phase="live"]::before {
|
|
718
|
+
content: "";
|
|
719
|
+
position: absolute;
|
|
720
|
+
inset-block: var(--aparte-space-4);
|
|
721
|
+
inset-inline-start: 0;
|
|
722
|
+
inline-size: var(--aparte-score-band-size);
|
|
723
|
+
border-start-end-radius: var(--aparte-radius-full);
|
|
724
|
+
border-end-end-radius: var(--aparte-radius-full);
|
|
725
|
+
background: var(--aparte-score-live);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.aparte-score__when {
|
|
729
|
+
display: flex;
|
|
730
|
+
flex-direction: column;
|
|
731
|
+
align-items: center;
|
|
732
|
+
justify-content: center;
|
|
733
|
+
gap: var(--aparte-space-1);
|
|
734
|
+
align-self: stretch;
|
|
735
|
+
padding-inline-end: var(--aparte-space-4);
|
|
736
|
+
border-inline-end: var(--aparte-border-width) solid var(--aparte-score-rule);
|
|
737
|
+
color: var(--aparte-text-muted);
|
|
738
|
+
font-size: var(--aparte-font-size-xs);
|
|
739
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
740
|
+
font-variant-numeric: tabular-nums;
|
|
741
|
+
line-height: 1.25;
|
|
742
|
+
text-align: center;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.aparte-score__when[data-phase="live"] {
|
|
746
|
+
flex-direction: row;
|
|
747
|
+
gap: var(--aparte-space-2);
|
|
748
|
+
color: var(--aparte-score-live-ink);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.aparte-score__when[data-phase="live"] .aparte-score__clock { font-size: var(--aparte-font-size-sm); }
|
|
752
|
+
.aparte-score__when[data-phase="halftime"],
|
|
753
|
+
.aparte-score__when[data-phase="postponed"] { color: var(--aparte-warning-ink); }
|
|
754
|
+
.aparte-score__when[data-phase="cancelled"] { color: var(--aparte-error-ink); }
|
|
755
|
+
|
|
756
|
+
.aparte-score__kickoff--row .aparte-score__day { font-weight: var(--aparte-font-weight-medium); }
|
|
757
|
+
|
|
758
|
+
.aparte-score__kickoff--row .aparte-score__hour {
|
|
759
|
+
color: var(--aparte-text);
|
|
760
|
+
font-size: var(--aparte-font-size-sm);
|
|
761
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.aparte-score__lines {
|
|
765
|
+
display: flex;
|
|
766
|
+
flex-direction: column;
|
|
767
|
+
gap: var(--aparte-space-2);
|
|
768
|
+
min-inline-size: 0;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.aparte-score__row-meta {
|
|
772
|
+
color: var(--aparte-text-muted);
|
|
773
|
+
font-size: var(--aparte-font-size-2xs);
|
|
774
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
775
|
+
letter-spacing: 0.03em;
|
|
776
|
+
text-transform: uppercase;
|
|
777
|
+
overflow-wrap: anywhere;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.aparte-score__line {
|
|
781
|
+
display: grid;
|
|
782
|
+
grid-template-columns: auto minmax(0, 1fr) auto 0.75rem;
|
|
783
|
+
align-items: center;
|
|
784
|
+
gap: var(--aparte-space-3);
|
|
785
|
+
color: var(--aparte-text);
|
|
786
|
+
font-size: var(--aparte-font-size-md);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.aparte-score__line-name {
|
|
790
|
+
min-inline-size: 0;
|
|
791
|
+
overflow: hidden;
|
|
792
|
+
text-overflow: ellipsis;
|
|
793
|
+
white-space: nowrap;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.aparte-score__line-score {
|
|
797
|
+
grid-column: 3;
|
|
798
|
+
min-inline-size: 1.5ch;
|
|
799
|
+
font-size: var(--aparte-font-size-base);
|
|
800
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
801
|
+
font-variant-numeric: tabular-nums;
|
|
802
|
+
text-align: end;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.aparte-score__win-mark {
|
|
806
|
+
grid-column: 4;
|
|
807
|
+
color: var(--aparte-text);
|
|
808
|
+
font-size: var(--aparte-font-size-2xs);
|
|
809
|
+
line-height: 1;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.aparte-score__win-mark:dir(rtl) { transform: scaleX(-1); }
|
|
813
|
+
|
|
814
|
+
.aparte-score__line[data-lead="win"] .aparte-score__line-name,
|
|
815
|
+
.aparte-score__line[data-lead="win"] .aparte-score__line-score { font-weight: var(--aparte-font-weight-bold); }
|
|
816
|
+
|
|
817
|
+
.aparte-score__line[data-lead="lose"] { color: var(--aparte-text-muted); }
|
|
818
|
+
|
|
819
|
+
/* A linked row: the whole row is the link; its ring is drawn inside the card's clipped edge. */
|
|
820
|
+
.aparte-score__link::after {
|
|
821
|
+
content: "";
|
|
822
|
+
position: absolute;
|
|
823
|
+
inset: 0;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.aparte-score__link:focus-visible { outline: none; }
|
|
827
|
+
|
|
828
|
+
.aparte-score__row[data-linked] { transition: background var(--aparte-duration-fast) ease; }
|
|
829
|
+
.aparte-score__row[data-linked]:hover { background: var(--aparte-surface-2); }
|
|
830
|
+
|
|
831
|
+
.aparte-score__row:has(.aparte-score__link:focus-visible) {
|
|
832
|
+
outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
|
|
833
|
+
outline-offset: calc(var(--aparte-focus-outline-width) * -1);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* \u2500\u2500 Skeleton: the shapes of what is coming \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
837
|
+
|
|
838
|
+
.aparte-score__sk-meta { inline-size: 9rem; }
|
|
839
|
+
.aparte-score__sk-name { inline-size: 5rem; }
|
|
840
|
+
.aparte-score__team .aparte-score__sk-name { inline-size: 70%; margin-inline: auto; }
|
|
841
|
+
.aparte-score__sk-score { inline-size: 5rem; block-size: var(--aparte-score-num-size); border-radius: var(--aparte-radius-md); }
|
|
842
|
+
.aparte-score__sk-pill { inline-size: 4rem; block-size: 1.25rem; border-radius: var(--aparte-radius-full); }
|
|
843
|
+
.aparte-score__sk-num { inline-size: 1.25rem; block-size: 1rem; border-radius: var(--aparte-radius-sm); grid-column: 3; }
|
|
844
|
+
.aparte-score__sk-when { inline-size: 2.5rem; }
|
|
845
|
+
.aparte-score__sk-lines { display: flex; flex-direction: column; gap: var(--aparte-space-4); }
|
|
846
|
+
.aparte-score__sk-line:nth-child(even) { inline-size: 70%; }
|
|
847
|
+
.aparte-score__crest.aparte-skeleton {
|
|
848
|
+
inline-size: var(--aparte-score-crest-size);
|
|
849
|
+
block-size: var(--aparte-score-crest-size);
|
|
850
|
+
box-shadow: none;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/* \u2500\u2500 Narrow: a smaller board, still the same board \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
854
|
+
|
|
855
|
+
@container aparte-score (max-width: 20rem) {
|
|
856
|
+
.aparte-score__board { gap: var(--aparte-space-3); padding-inline: var(--aparte-space-4); }
|
|
857
|
+
.aparte-score__team-name { font-size: var(--aparte-font-size-md); }
|
|
858
|
+
.aparte-score__centre { min-inline-size: 4.5rem; }
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
@media (max-width: 380px) {
|
|
862
|
+
.aparte-score-card {
|
|
863
|
+
--aparte-score-pad: var(--aparte-space-5);
|
|
864
|
+
--aparte-score-num-size: calc(2.125rem * var(--aparte-font-scale));
|
|
865
|
+
--aparte-score-crest-lg: 2.75rem;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.aparte-score__row { grid-template-columns: 3.75rem minmax(0, 1fr); gap: 0 var(--aparte-space-4); }
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/* The kit stops every animation and transition under reduced motion; the live dot's ring
|
|
872
|
+
and the chevron's nudge are named here too, so the rule reads where they are drawn. */
|
|
873
|
+
@media (prefers-reduced-motion: reduce) {
|
|
874
|
+
.aparte-score__live-dot::after { animation: none; opacity: 0; }
|
|
875
|
+
.aparte-score__more:hover .aparte-score__chevron,
|
|
876
|
+
.aparte-score__more:hover .aparte-score__chevron:dir(rtl) { translate: none; }
|
|
877
|
+
}
|
|
878
|
+
`,_={cardsScoreTitle:{en:"Match",fr:"Match",de:"Spiel",es:"Partido",it:"Partita",ja:"\u8A66\u5408",ko:"\uACBD\uAE30",pt:"Partida",ru:"\u041C\u0430\u0442\u0447",zh:"\u6BD4\u8D5B"},cardsScoreCount:{en:"{n} matches",fr:"{n} matchs",de:"{n} Spiele",es:"{n} partidos",it:"{n} partite",ja:"{n}\u8A66\u5408",ko:"{n}\uACBD\uAE30",pt:"{n} partidas",ru:"\u041C\u0430\u0442\u0447\u0435\u0439: {n}",zh:"{n} \u573A\u6BD4\u8D5B"},cardsScoreVersus:{en:"{home} vs {away}",fr:"{home} \u2013 {away}",de:"{home} gegen {away}",es:"{home} vs. {away}",it:"{home} - {away}",ja:"{home} \u5BFE {away}",ko:"{home} \uB300 {away}",pt:"{home} x {away}",ru:"{home} \u2014 {away}",zh:"{home} \u5BF9 {away}"},cardsScoreLive:{en:"Live",fr:"En direct",de:"Live",es:"En vivo",it:"In diretta",ja:"\u8A66\u5408\u4E2D",ko:"\uC9C4\uD589 \uC911",pt:"Ao vivo",ru:"\u0418\u0434\u0451\u0442",zh:"\u8FDB\u884C\u4E2D"},cardsScoreHalfTime:{en:"Half-time",fr:"Mi-temps",de:"Halbzeit",es:"Descanso",it:"Intervallo",ja:"\u30CF\u30FC\u30D5\u30BF\u30A4\u30E0",ko:"\uD558\uD504\uD0C0\uC784",pt:"Intervalo",ru:"\u041F\u0435\u0440\u0435\u0440\u044B\u0432",zh:"\u4E2D\u573A\u4F11\u606F"},cardsScoreFullTime:{en:"Full time",fr:"Termin\xE9",de:"Spielende",es:"Final",it:"Finale",ja:"\u8A66\u5408\u7D42\u4E86",ko:"\uACBD\uAE30 \uC885\uB8CC",pt:"Encerrado",ru:"\u041C\u0430\u0442\u0447 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D",zh:"\u5B8C\u573A"},cardsScoreFinal:{en:"Final",fr:"Termin\xE9",de:"Beendet",es:"Final",it:"Finale",ja:"\u8A66\u5408\u7D42\u4E86",ko:"\uACBD\uAE30 \uC885\uB8CC",pt:"Final",ru:"\u0417\u0430\u0432\u0435\u0440\u0448\u0451\u043D",zh:"\u5DF2\u7ED3\u675F"},cardsScoreEnded:{en:"Finished",fr:"Termin\xE9",de:"Beendet",es:"Finalizado",it:"Terminato",ja:"\u7D42\u4E86",ko:"\uC885\uB8CC",pt:"Encerrado",ru:"\u0417\u0430\u0432\u0435\u0440\u0448\u0451\u043D",zh:"\u5DF2\u7ED3\u675F"},cardsScorePostponed:{en:"Postponed",fr:"Report\xE9",de:"Verschoben",es:"Aplazado",it:"Rinviato",ja:"\u5EF6\u671F",ko:"\uC5F0\uAE30",pt:"Adiado",ru:"\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0451\u043D",zh:"\u5EF6\u671F"},cardsScoreCancelled:{en:"Cancelled",fr:"Annul\xE9",de:"Abgesagt",es:"Cancelado",it:"Annullato",ja:"\u4E2D\u6B62",ko:"\uCDE8\uC18C",pt:"Cancelado",ru:"\u041E\u0442\u043C\u0435\u043D\u0451\u043D",zh:"\u53D6\u6D88"},cardsScoreUpcoming:{en:"Upcoming",fr:"\xC0 venir",de:"Demn\xE4chst",es:"Pr\xF3ximamente",it:"In programma",ja:"\u958B\u59CB\u524D",ko:"\uC608\uC815",pt:"Em breve",ru:"\u0421\u043A\u043E\u0440\u043E",zh:"\u672A\u5F00\u59CB"},cardsScoreMatchday:{en:"Matchday {n}",fr:"{n}e journ\xE9e",de:"{n}. Spieltag",es:"Jornada {n}",it:"{n}\xAA giornata",ja:"\u7B2C{n}\u7BC0",ko:"{n}\uB77C\uC6B4\uB4DC",pt:"Rodada {n}",ru:"{n}-\u0439 \u0442\u0443\u0440",zh:"\u7B2C{n}\u8F6E"},cardsScoreTeam:{en:"Team",fr:"\xC9quipe",de:"Team",es:"Equipo",it:"Squadra",ja:"\u30C1\u30FC\u30E0",ko:"\uD300",pt:"Time",ru:"\u041A\u043E\u043C\u0430\u043D\u0434\u0430",zh:"\u7403\u961F"},cardsScoreTotal:{en:"Total",fr:"Total",de:"Gesamt",es:"Total",it:"Totale",ja:"\u8A08",ko:"\uD569\uACC4",pt:"Total",ru:"\u0418\u0442\u043E\u0433",zh:"\u603B\u5206"},cardsScoreSets:{en:"Sets",fr:"Sets",de:"S\xE4tze",es:"Sets",it:"Set",ja:"\u30BB\u30C3\u30C8",ko:"\uC138\uD2B8",pt:"Sets",ru:"\u0421\u0435\u0442\u044B",zh:"\u76D8"},cardsScorePeriods:{en:"Score by period",fr:"Score par p\xE9riode",de:"Ergebnis nach Abschnitten",es:"Marcador por periodo",it:"Punteggio per periodo",ja:"\u30D4\u30EA\u30AA\u30C9\u5225\u30B9\u30B3\u30A2",ko:"\uAD6C\uAC04\uBCC4 \uC810\uC218",pt:"Placar por per\xEDodo",ru:"\u0421\u0447\u0451\u0442 \u043F\u043E \u043F\u0435\u0440\u0438\u043E\u0434\u0430\u043C",zh:"\u5206\u8282\u6BD4\u5206"},cardsScoreEvents:{en:"Match events",fr:"Faits du match",de:"Spielereignisse",es:"Incidencias",it:"Eventi della partita",ja:"\u8A66\u5408\u7D4C\u904E",ko:"\uACBD\uAE30 \uAE30\uB85D",pt:"Lances da partida",ru:"\u0421\u043E\u0431\u044B\u0442\u0438\u044F \u043C\u0430\u0442\u0447\u0430",zh:"\u6BD4\u8D5B\u4E8B\u4EF6"},cardsScoreDetails:{en:"Match details",fr:"D\xE9tails du match",de:"Spieldetails",es:"Detalles del partido",it:"Dettagli partita",ja:"\u8A66\u5408\u306E\u8A73\u7D30",ko:"\uACBD\uAE30 \uC0C1\uC138",pt:"Detalhes da partida",ru:"\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435 \u043E \u043C\u0430\u0442\u0447\u0435",zh:"\u6BD4\u8D5B\u8BE6\u60C5"}},Ze={goal:{en:"Goal",fr:"But",de:"Tor",es:"Gol",it:"Gol",ja:"\u30B4\u30FC\u30EB",ko:"\uACE8",pt:"Gol",ru:"\u0413\u043E\u043B",zh:"\u8FDB\u7403"},penalty:{en:"Penalty",fr:"Penalty",de:"Elfmeter",es:"Penalti",it:"Rigore",ja:"PK",ko:"\uD398\uB110\uD2F0\uD0A5",pt:"P\xEAnalti",ru:"\u041F\u0435\u043D\u0430\u043B\u044C\u0442\u0438",zh:"\u70B9\u7403"},"own-goal":{en:"Own goal",fr:"Contre son camp",de:"Eigentor",es:"En propia puerta",it:"Autogol",ja:"\u30AA\u30A6\u30F3\u30B4\u30FC\u30EB",ko:"\uC790\uCC45\uACE8",pt:"Gol contra",ru:"\u0410\u0432\u0442\u043E\u0433\u043E\u043B",zh:"\u4E4C\u9F99\u7403"},yellow:{en:"Yellow card",fr:"Carton jaune",de:"Gelbe Karte",es:"Tarjeta amarilla",it:"Cartellino giallo",ja:"\u30A4\u30A8\u30ED\u30FC\u30AB\u30FC\u30C9",ko:"\uC610\uB85C\uCE74\uB4DC",pt:"Cart\xE3o amarelo",ru:"\u0416\u0451\u043B\u0442\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430",zh:"\u9EC4\u724C"},red:{en:"Red card",fr:"Carton rouge",de:"Rote Karte",es:"Tarjeta roja",it:"Cartellino rosso",ja:"\u30EC\u30C3\u30C9\u30AB\u30FC\u30C9",ko:"\uB808\uB4DC\uCE74\uB4DC",pt:"Cart\xE3o vermelho",ru:"\u041A\u0440\u0430\u0441\u043D\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430",zh:"\u7EA2\u724C"},sub:{en:"Substitution",fr:"Remplacement",de:"Auswechslung",es:"Sustituci\xF3n",it:"Sostituzione",ja:"\u9078\u624B\u4EA4\u4EE3",ko:"\uC120\uC218 \uAD50\uCCB4",pt:"Substitui\xE7\xE3o",ru:"\u0417\u0430\u043C\u0435\u043D\u0430",zh:"\u6362\u4EBA"}},Je={goal:"cardsScoreGoal",penalty:"cardsScorePenalty","own-goal":"cardsScoreOwnGoal",yellow:"cardsScoreYellowCard",red:"cardsScoreRedCard",sub:"cardsScoreSubstitution"},Qe=12,ea=30,aa=12,ra=3,d=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function p(e,a){if(e){for(let r of a)if(e[r]!==void 0&&e[r]!==null&&e[r]!=="")return e[r]}}function g(e){return d(e)?u(p(e,["name","displayName","fullName","title","shortName","abbreviation"])):u(e)}var D=e=>e.trim().toLowerCase().replace(/[_-]+/g," ").replace(/\s+/g," "),ta={scheduled:["scheduled","ns","tbd","timed","not started","pre","upcoming","fixture","status scheduled","pre match","prematch"],live:["live","in play","inplay","in progress","playing","ongoing","started","1h","2h","et","bt","p","in","status in progress","status end period","status first half","status second half","first half","second half","extra time","penalty in progress","end of period"],halftime:["halftime","half time","ht","paused","status halftime","interval"],final:["final","ft","finished","full time","fulltime","ended","aet","pen","awarded","awd","wo","post","complete","completed","closed","match finished","after extra time","after penalties","status final","status full time","status final aet","status final pen","ft pen"],postponed:["postponed","pst","status postponed"],cancelled:["cancelled","canceled","canc","status canceled","status cancelled"]},oa=new Map(Object.entries(ta).flatMap(([e,a])=>a.map(r=>[r,e])));function ve(e){let a=u(e);return a?oa.get(D(a)):void 0}var sa=[["american-football",/^(american[\s_-]?football|nfl|ncaaf|gridiron|football \(american\))$/],["football",/^(football|soccer|futbol|fútbol|calcio|fussball|fußball)$/],["basketball",/^(basketball|basket|nba|wnba|ncaab|euroleague)$/],["tennis",/^(tennis|atp|wta)$/],["rugby",/^rugby/],["hockey",/^((ice|field)[\s_-]?)?hockey$|^nhl$/],["baseball",/^(baseball|mlb|softball)$/]];function I(e){let a=g(e)?.toLowerCase();if(a)return sa.find(([,r])=>r.test(a))?.[0]}var na={1:"baseball",20:"american-football",40:"basketball",70:"hockey",600:"football",850:"tennis"};function Oe(e){let a=typeof e=="string"?/^s:(\d+)(?:~|$)/.exec(e.trim())?.[1]:void 0;return a?na[a]:void 0}function ia(e){return d(e)?Oe(e.uid)??[e.sport,e.abbreviation,e.slug,e.name].map(I).find(a=>a!==void 0):I(e)}function ca(e){if(typeof e!="string")return;let a=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!a)return;let r=a[1].toLowerCase();return`#${r.length===3?[...r].map(t=>t+t).join(""):r}`}function A(e){return d(e)?k(p(e,["value","displayValue","score","total"])):k(e)}function Y(e,a){if(d(e))return Y(p(e,["elapsed","minute","displayValue","value"]),p(e,["extra","added","injuryTime"]));let r=k(e);if(r!==void 0){let t=k(a);return`${Math.round(r)}${t?`+${Math.round(t)}`:""}'`}return u(e)}var ge=["displayName","name","fullName","teamName","team_name","title","shortDisplayName"],la=["shortName","short_name","abbreviation","abbr","tla","code","shortDisplayName"],pa=["logo","crest","logoUrl","logo_url","badge","emblem","image","imageUrl"],da=["score","goals","points","pts","runs"],ua=["color","colour","primaryColor","primary_color","teamColor"];function we(e){if(typeof e=="string"){let b=u(e);return b?{name:b}:null}if(!d(e))return null;let a=d(e.team)?e.team:{},r=b=>p(e,b)??p(a,b),t=u(p(e,ge))??(typeof e.team=="string"?u(e.team):void 0)??u(p(a,ge));if(!t)return null;let o=u(r(la)),s=r(["logos"]),i=P(G(r(pa)))??(Array.isArray(s)?P(G(s[0])):null),c=A(p(e,da)),l=e.records,m=u(p(e,["record","recordSummary","standing"]))??(Array.isArray(l)?u(d(l[0])?l[0].summary:l[0]):void 0),v=ca(r(ua)),h=u(r(["id","teamId","team_id","idTeam"])),z=typeof e.winner=="boolean"?e.winner:void 0,f=Array.isArray(e.linescores)?e.linescores:void 0;return{name:t,...o&&o!==t?{shortName:o}:{},...i?{logo:i}:{},...c!==void 0?{score:c}:{},...m?{record:m}:{},...v?{color:v}:{},...h?{id:h}:{},...z!==void 0?{won:z}:{},...f?{lines:f}:{}}}function G(e){return d(e)?p(e,["href","url","src"]):e}function ye(e){return d(e)?["home","homeTeam","home_team","teams","competitors","competitions","strHomeTeam","participants"].some(a=>e[a]!==void 0):!1}function ma(e){let a=p(e,["home","homeTeam","home_team","hometeam"]),r=p(e,["away","awayTeam","away_team","awayteam","visitor","visitors"]);if(a!==void 0||r!==void 0)return[a,r];let t=e.teams;if(d(t))return[t.home,t.away];let o=[e.competitors,e.participants,t].find(Array.isArray);if(o){let s=i=>o.find(c=>d(c)&&(c.homeAway===i||c.qualifier===i||c.side===i));return[s("home")??o[0],s("away")??o[1]]}return e.strHomeTeam!==void 0?[{name:e.strHomeTeam,score:e.intHomeScore,logo:e.strHomeTeamBadge},{name:e.strAwayTeam,score:e.intAwayScore,logo:e.strAwayTeamBadge}]:[void 0,void 0]}function fa(e){let a=o=>{if(!d(o))return;let s=A(o.home),i=A(o.away);return s!==void 0||i!==void 0?[s,i]:void 0},r=e.score,t=typeof r=="string"?/^\s*(\d+)\s*[-–:]\s*(\d+)\s*$/.exec(r):null;return a(e.goals)??a(r)??a(e.scores)??(d(r)?a(r.fullTime)??a(r.fulltime)??a(r.current):void 0)??(t?[Number(t[1]),Number(t[2])]:void 0)??[A(p(e,["homeScore","home_score","scoreHome"])),A(p(e,["awayScore","away_score","scoreAway"]))]}function _a(e,a){let r=p(e,["status","state","strStatus","matchStatus","match_status"])??a.status,t,o,s=Y(p(e,["clock","minute","elapsed","time_elapsed"]),p(e,["injuryTime","injury_time"])),i=p(e,["period","currentPeriod"]);if(d(r)){let l=d(r.type)?r.type:{};t=[r.short,l.name,l.state,r.long,l.shortDetail,l.description,r.name,r.state,r.description].map(ve).find(v=>v!==void 0),o=u(r.long??l.description??l.detail??r.short??r.description),s??=Y(p(r,["elapsed","minute"]),r.extra)??u(r.displayClock??r.clock),i??=p(r,["period"])}else t=ve(r),o=u(r);let c=k(i);return{...t?{status:t}:o?{statusText:o}:{},...s?{clock:s}:{},...typeof i=="string"&&u(i)?{period:u(i)}:{},...c!==void 0&&typeof i!="string"?{periodNumber:c}:{}}}function ha(e,a){if(e==="basketball"||e==="american-football")return`Q${a}`;if(e==="hockey")return`P${a}`}function va(e,a,r){let t=[],o=[e.periods,e.sets,e.linescores,e.innings].find(Array.isArray);if(o)t=o.map((s,i)=>Array.isArray(s)?{label:String(i+1),...C("home",k(s[0])),...C("away",k(s[1]))}:d(s)?{label:u(p(s,["label","name","period","set","number"]))??String(i+1),...C("home",A(p(s,["home","homeScore","home_score","h"]))),...C("away",A(p(s,["away","awayScore","away_score","a"])))}:null).filter(s=>s!==null);else if(a.lines||r.lines){let s=Math.max(a.lines?.length??0,r.lines?.length??0);for(let i=0;i<s;i++){let c=v=>A(v?.[i]),l=a.lines?.[i]??r.lines?.[i],m=(d(l)?u(p(l,["label","period"])):void 0)??String(i+1);t.push({label:m,...C("home",c(a.lines)),...C("away",c(r.lines))})}}return t=t.filter(s=>s.home!==void 0||s.away!==void 0).slice(0,aa),t.length?t:void 0}var C=(e,a)=>a!==void 0?{[e]:a}:{};function Q(e,a,r){if(r.ownGoal===!0)return"own-goal";if(r.penaltyKick===!0&&r.scoringPlay!==!1)return"penalty";if(r.redCard===!0)return"red";if(r.yellowCard===!0)return"yellow";let t=typeof e=="string"?D(e):d(e)?D(String(e.text??e.type??"")):"";if(/^var\b/.test(t))return null;for(let o of[a,e]){let s=typeof o=="string"?D(o):d(o)?D(String(o.text??o.type??"")):"";if(s){if(/missed|saved|cancel|disallow/.test(s))return null;if(/own goal|^og$|^own$/.test(s))return"own-goal";if(/penalty|^pen$|^pk$/.test(s)&&!/card/.test(s))return"penalty";if(/red|second yellow|yellow red|yellowred/.test(s))return"red";if(/yellow/.test(s))return"yellow";if(/^sub|substitution|^subst|replacement/.test(s))return"sub";if(/goal|^regular$|^normal$|scor/.test(s))return"goal"}}return r.scoringPlay===!0?"goal":null}function ga(e,a,r){let t=p(e,["side","homeAway","team"]);if(t==="home"||t==="away")return t;if(typeof e.isHome=="boolean")return e.isHome?"home":"away";let o=p(e,["team","club"]),s=d(o)?u(o.id):void 0,i=g(o)?.toLowerCase(),c=l=>s!==void 0&&l.id===s||!!i&&(l.name.toLowerCase()===i||l.shortName?.toLowerCase()===i);return c(a)?"home":c(r)?"away":null}function be(e,a,r,t){if(!d(e))return null;let o=e,s=ga(o,a,r);if(!s)return null;let i=t==="sub"?"sub":t==="yellow"?Q(o.card??o.type,void 0,o)??"yellow":Q(o.type??o.kind??o.card,o.detail,o)??(t==="goal"?"goal":null);if(!i)return null;let c=Y(p(o,["minute","time","clock","elapsed","min"]),o.extra??o.injuryTime),l=o.athletesInvolved,m=g(p(o,["player","scorer","playerIn","athlete","playerName","player_name"]))??(Array.isArray(l)?g(l[0]):void 0),h=(typeof o.detail=="string"&&Q(void 0,o.detail,{})!==null?void 0:u(o.detail))??g(p(o,["assist","playerOut","note","description"]));return{...c?{minute:c}:{},team:s,type:i,...m?{player:m}:{},...h&&h!==m?{detail:h}:{}}}function wa(e,a,r){let t=[],o=[e.events,e.incidents,e.timeline,e.details,e.keyEvents].find(Array.isArray);for(let c of o??[])t.push(be(c,a,r));if(!o){let c=[[e.goals,"goal"],[e.bookings,"yellow"],[e.substitutions,"sub"]];for(let[l,m]of c)if(Array.isArray(l))for(let v of l)t.push(be(v,a,r,m))}let s=t.filter(c=>c!==null);!o&&s.length&&s.sort((c,l)=>ke(c.minute)-ke(l.minute));let i=s.slice(0,ea);return i.length?i:void 0}function ke(e){let a=/(\d+)(?:\s*\+\s*(\d+))?/.exec(e??"");return a?Number(a[1])+Number(a[2]??0)/100:1/0}function ya(e,a){let r=e.week,t=k(p(e,["matchday","matchDay","gameweek","intRound"]))??k(d(r)?r.number:r),o=u(p(e,["round","roundName"]))??u(a.round),s=o?/^regular season\s*[-–]\s*(\d+)$/i.exec(o):null;if(s)return{matchday:Number(s[1])};if(o)return{round:o};if(t!==void 0)return{matchday:t};let i=u(e.stage);if(i&&!/^regular[_\s]season$/i.test(i)){let c=i.replace(/_/g," ").toLowerCase();return{round:c.charAt(0).toUpperCase()+c.slice(1)}}return{}}function ba(e){let a=p(e,["broadcast","broadcasts","tv","channel","channels","strTVStation","geoBroadcasts"]),r=(Array.isArray(a)?a:[a]).flatMap(o=>d(o)&&Array.isArray(o.names)?o.names.map(u):d(o)&&d(o.media)?[g(o.media)]:[g(o)]).filter(o=>!!o),t=[...new Set(r)].slice(0,ra);return t.length?t.join(", "):void 0}function ka(e){if(!d(e))return u(e);let a=g(e),r=d(e.address)?e.address:{},t=u(e.city??r.city);return a&&t&&!a.includes(t)?`${a}, ${t}`:a??t}var xa=e=>typeof e=="string"&&/^\d{4}-\d\d-\d\dT\d\d:\d\d(:\d\d)?$/.test(e.trim())?`${e.trim()}Z`:e;function za(e,a){if(!d(e))return null;let r=e.competitions,t=Array.isArray(r)&&d(r[0])?{...e,...r[0],status:r[0].status??e.status}:e,o=d(t.fixture)?t.fixture:{},s=d(t.league)?t.league:{},[i,c]=ma(t),l=we(i),m=we(c);if(!l||!m)return null;let[v,h]=fa(t);l.score===void 0&&v!==void 0&&(l.score=v),m.score===void 0&&h!==void 0&&(m.score=h);let z=I(p(t,["sport","strSport","sportName","discipline"])??s.sport)??Oe(e.uid??t.uid)??(a!==void 0?ia(a):void 0)??(t.fixture!==void 0||t.goals!==void 0||d(t.score)&&d(t.score.fullTime)?"football":"generic"),f=_a(t,o),b=f.period??(f.periodNumber!==void 0?ha(z,f.periodNumber):void 0),L=Z(xa(p(t,["startTime","start_time","start","kickoff","kickOff","kick_off","utcDate","date","datetime","dateTime","startDate","commence_time","strTimestamp"])))??Z(o.date??o.timestamp),$=g(p(t,["competition","tournament","strLeague","leagueName"])??t.league),M=ka(p(t,["venue","stadium","strVenue","arena"])??o.venue),O=va(t,l,m),E=wa(t,l,m),ce=t.links,le=P(G(p(t,["url","link","href","matchUrl","match_url"])))??(Array.isArray(ce)?P(G(ce[0])):null),pe=ba(t);for(let N of["home","away"]){let X=N==="home"?l:m;if(X.score!==void 0||!O||f.status==="scheduled")continue;let me=N==="home"?"away":"home",B=O.map(S=>S[N]);B.some(S=>S===void 0)||(X.score=z==="tennis"?O.filter(S=>Sa(S[N]??0,S[me]??0)).length:B.reduce((S,Re)=>S+(Re??0),0))}let de=Ta(t,l,m,f.status),ue=({id:N,won:X,lines:me,...B})=>B;return{home:ue(l),away:ue(m),...f.status?{status:f.status}:{},...f.statusText?{statusText:f.statusText}:{},...f.clock?{clock:f.clock}:{},...b?{period:b}:{},...L?{startTime:L}:{},...$?{competition:$}:{},...ya(t,s),...M?{venue:M}:{},sport:z,...O?{periods:O}:{},...E?{events:E}:{},...de?{winner:de}:{},...pe?{broadcast:pe}:{},...le?{url:le}:{}}}var Sa=(e,a)=>e>a&&e>=6&&(e-a>=2||e===7);function Ta(e,a,r,t){let o=d(e.score)?e.score:{},s=u(e.winner??o.winner)?.toLowerCase();if(s==="home"||s==="home_team")return"home";if(s==="away"||s==="away_team")return"away";if(s&&s===a.name.toLowerCase())return"home";if(s&&s===r.name.toLowerCase())return"away";if(a.won===!0||r.won===!1&&a.won===void 0)return"home";if(r.won===!0)return"away";if(!(s==="draw"||t!=="final"||a.score===void 0||r.score===void 0||a.score===r.score))return a.score>r.score?"home":"away"}function Aa(e){let a,r,t;if(Array.isArray(e))a=e;else if(d(e)){let s=[e.matches,e.fixtures,e.games,e.results,e.response,e.data,e.scores,e.events].find(i=>Array.isArray(i)&&i.some(ye));if(s&&!ye(e)){a=s;let i=e.leagues;t=Array.isArray(i)?i[0]:e.league,r=u(e.title??e.heading)??g(e.competition??e.league)??(Array.isArray(i)?g(i[0]):void 0)}else a=[e]}else return null;let o=a.map(s=>za(s,t)).filter(s=>s!==null).slice(0,Qe);return o.length?{...r?{title:r}:{},matches:o}:null}function j(e){return e.status?e.status:e.statusText?"other":$e(e)?"none":e.startTime?"scheduled":"none"}var $e=e=>e.home.score!==void 0&&e.away.score!==void 0;function H(e){let a=j(e);return $e(e)&&a!=="scheduled"&&!((a==="postponed"||a==="cancelled")&&e.home.score===0&&e.away.score===0)}function xe(e){return e==="football"||e==="rugby"?"cardsScoreFullTime":e==="tennis"||e==="generic"?"cardsScoreEnded":"cardsScoreFinal"}function re(e){let a=[e.period&&!e.clock?.includes(e.period)?e.period:void 0,e.clock].filter(Boolean);return a.length?a.join(" "):void 0}function K(e,a){switch(j(a)){case"live":{let t=re(a);return`${w(e,"cardsScoreLive",_.cardsScoreLive)}${t?` ${t}`:""}`}case"halftime":return w(e,"cardsScoreHalfTime",_.cardsScoreHalfTime);case"final":return w(e,xe(a.sport),_[xe(a.sport)]);case"postponed":return w(e,"cardsScorePostponed",_.cardsScorePostponed);case"cancelled":return w(e,"cardsScoreCancelled",_.cardsScoreCancelled);case"other":return a.statusText;default:return}}var ze=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function q(e,a,r){let t=Math.round((ze(a)-ze(r))/864e5);if(t===-1){let o=F(e),s=new Intl.RelativeTimeFormat(o,{numeric:"auto"}).format(-1,"day");return s.charAt(0).toLocaleUpperCase(o)+s.slice(1)}return t>=0&&t<=6?_e(e,a,"short",r):new Intl.DateTimeFormat(F(e),{weekday:"short",day:"numeric",month:"short"}).format(a)}var Ma=(e,a,r)=>`${q(e,a,r)} ${J(e,a)}`,V=(e,a)=>w(e,"cardsScoreVersus",_.cardsScoreVersus,{home:a.home.name,away:a.away.name}),Oa=(e,a)=>new Intl.DateTimeFormat(F(e),{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(a);function Ce(e,a,r){let t=K(e,a);if(H(a)){let o=`${a.home.name} ${x(e,a.home.score)}\u2013${x(e,a.away.score)} ${a.away.name}`;return t?`${o} (${t})`:o}return t?`${V(e,a)} (${t})`:a.startTime?`${V(e,a)} \u2014 ${r?Ma(e,a.startTime,r):Oa(e,a.startTime)}`:V(e,a)}var te=e=>e!=null&&e!==!1,$a=()=>n("span",{class:"aparte-score__dot",attrs:{"aria-hidden":"true"},text:"\xB7"});function Ca(e){let a=e.shortName?.replace(/[^\p{L}\p{N}]/gu,"");if(a&&[...a].length<=3)return a.toLocaleUpperCase();let r=e.name;if(/[\u3040-\u30ff\u3400-\u9fff\uac00-\ud7af]/.test(r))return[...r.replace(/\s+/g,"")].slice(0,2).join("");let t=r.split(/[\s\-–.'’/&]+/).map(c=>c.replace(/[^\p{L}\p{N}]/gu,"")).filter(Boolean),o=t.filter(c=>!ja.has(c.toLowerCase())),s=o.length?o:t;return s.length?(s.length===1?[...s[0]].slice(0,3).join(""):s.slice(0,3).map(c=>[...c][0]).join("")).toLocaleUpperCase():"?"}var ja=new Set(["fc","cf","afc","ac","as","sc","sv","cd","rc","ssc","club","de","del","the","of","and","vfb","vfl","tsg","bk","if","fk","sk"]);function je(e){let a=t=>{let o=parseInt(e.slice(1+t*2,3+t*2),16)/255;return o<=.04045?o/12.92:((o+.055)/1.055)**2.4};return .2126*a(0)+.7152*a(1)+.0722*a(2)>.179?"dark":"light"}function W(e,a,r){r&&e.style.setProperty(a,r)}function oe(e,a){let r=n("span",{class:`aparte-score__crest aparte-score__crest--${a}`,attrs:{"aria-hidden":"true","data-ink":e.color?je(e.color):void 0}},n("span",{class:"aparte-score__monogram",text:Ca(e)}));if(W(r,"--aparte-score-team",e.color),e.logo){let t=n("img",{class:"aparte-score__logo",attrs:{src:e.logo,alt:"",loading:"lazy",decoding:"async"}});t.addEventListener("error",()=>{t.remove(),r.removeAttribute("data-logo")},{once:!0}),r.setAttribute("data-logo",""),r.append(t)}return r}var R=(e,a)=>e.winner?e.winner===a?"win":"lose":void 0;function ee(e,a,r,t={}){let o=n("span",{class:r,attrs:t});return e.bind(o,()=>x(e.config,a)),o}function La(e,a){let r=j(a);if(r==="scheduled"||r==="none")return null;let t=n("span",{class:"aparte-score__pill",attrs:{"data-phase":r}});if(r==="live"){let o=n("span",{class:"aparte-score__live-word"});e.word(o,"cardsScoreLive",_.cardsScoreLive);let s=re(a);return t.append(n("span",{class:"aparte-score__live-dot",attrs:{"aria-hidden":"true"}}),o),s&&t.append(n("span",{class:"aparte-score__clock",text:s})),t}return e.bind(t,()=>K(e.config,a)),t}function Le(e,a,r,t){let o=n("time",{class:t,attrs:{datetime:a.toISOString()}}),s=n("span",{class:"aparte-score__day"}),i=n("span",{class:"aparte-score__hour"});return e.bind(s,()=>q(e.config,a,r)),e.bind(i,()=>J(e.config,a)),o.append(s,i),o}function Ea(e,a,r){let t=n("div",{class:"aparte-score__centre"}),o=j(a);if(H(a)){let i=n("div",{class:"aparte-score__result",attrs:{"aria-hidden":"true"}},ee(e,a.home.score,"aparte-score__num",{"data-lead":R(a,"home")}),n("span",{class:"aparte-score__sep",text:"\u2013"}),ee(e,a.away.score,"aparte-score__num",{"data-lead":R(a,"away")})),c=n("span",{class:"aparte-score__sr"});e.bind(c,()=>`${a.home.name} ${x(e.config,a.home.score)}, ${a.away.name} ${x(e.config,a.away.score)}`),t.append(i,c)}else a.startTime?t.append(Le(e,a.startTime,r,"aparte-score__kickoff")):t.append(n("div",{class:"aparte-score__result",attrs:{"aria-hidden":"true"}},n("span",{class:"aparte-score__sep",text:"\u2013"})));let s=La(e,a);if(s)t.append(s);else if(o==="scheduled"&&!a.startTime){let i=n("span",{class:"aparte-score__pill",attrs:{"data-phase":"scheduled"}});e.word(i,"cardsScoreUpcoming",_.cardsScoreUpcoming),t.append(i)}return t}function Se(e,a){let r=e[a];return n("div",{class:`aparte-score__team aparte-score__team--${a}`,attrs:{"data-lead":R(e,a)}},oe(r,"lg"),n("span",{class:"aparte-score__team-name",text:r.name}),r.record?n("span",{class:"aparte-score__record",text:r.record}):null)}function se(e,a,r){let t=[];if(a.competition&&t.push(n("span",{class:"aparte-score__competition",text:a.competition})),a.round)t.push(n("span",{class:"aparte-score__round",text:a.round}));else if(a.matchday!==void 0){let c=a.matchday,l=n("span",{class:"aparte-score__round"});e.bind(l,()=>w(e.config,"cardsScoreMatchday",_.cardsScoreMatchday,{n:x(e.config,c)})),t.push(l)}let o=a.startTime&&H(a)?a.startTime:void 0;if(!t.length&&!o)return null;let s=n("div",{class:"aparte-score__meta"});t.forEach((c,l)=>s.append(...l?[$a(),c]:[c]));let i=null;return o&&(i=n("time",{class:"aparte-score__date",attrs:{datetime:o.toISOString()}}),e.bind(i,()=>q(e.config,o,r))),n("div",{class:"aparte-score__head"},T(Me[a.sport],"aparte-rich-card__glyph aparte-score__sport"),s,i)}function Ee(e,a){let r=[a.venue?n("span",{class:"aparte-score__fact aparte-score__venue"},T(Ke,"aparte-rich-card__glyph aparte-score__fact-glyph"),n("span",{text:a.venue})):null,a.broadcast?n("span",{class:"aparte-score__fact aparte-score__broadcast"},T(We,"aparte-rich-card__glyph aparte-score__fact-glyph"),n("span",{text:a.broadcast})):null].filter(te),t=null;if(a.url){let o=n("span");e.word(o,"cardsScoreDetails",_.cardsScoreDetails),t=n("a",{class:"aparte-score__more",attrs:{href:a.url,target:"_blank",rel:"noopener noreferrer"}},o,T(qe,"aparte-rich-card__glyph aparte-score__chevron"))}return!r.length&&!t?null:n("div",{class:"aparte-score__foot"},r.length?n("div",{class:"aparte-score__facts"},...r):null,t)}function Ne(e,a,r){return n("div",{class:"aparte-score__board",attrs:{"data-winner":a.winner}},Se(a,"home"),Ea(e,a,r),Se(a,"away"))}function ne(e,a,r="article"){let t=n(r,{class:a,attrs:{"data-phase":j(e),"data-sport":e.sport}});return W(t,"--aparte-score-home",e.home.color),W(t,"--aparte-score-away",e.away.color),t}function Na(e,a,r){let t=ne(a,"aparte-score aparte-score--card");return t.append(...[se(e,a,r),Ne(e,a,r),Ee(e,a)].filter(te)),t}function Pa(e,a){let r=a.periods;if(!r)return null;let t=a.sport==="tennis",o=n("caption",{class:"aparte-score__sr"});e.word(o,"cardsScorePeriods",_.cardsScorePeriods);let s=n("span",{class:"aparte-score__sr"});e.word(s,"cardsScoreTeam",_.cardsScoreTeam);let i=n("th",{class:"aparte-score__corner",attrs:{scope:"col"}},s),c=n("th",{class:"aparte-score__total",attrs:{scope:"col"}});e.word(c,t?"cardsScoreSets":"cardsScoreTotal",t?_.cardsScoreSets:_.cardsScoreTotal);let l=n("tr",{},i,...r.map(h=>n("th",{attrs:{scope:"col"},text:h.label})),c),m=h=>{let z=h==="home"?"away":"home",f=a[h],b=r.map($=>{let M=$[h],O=t&&M!==void 0&&$[z]!==void 0&&M>$[z],E=n("td",{attrs:{"data-lead":O?"win":void 0}});return M!==void 0&&e.bind(E,()=>x(e.config,M)),E}),L=n("td",{class:"aparte-score__total"});return f.score!==void 0&&e.bind(L,()=>x(e.config,f.score)),n("tr",{attrs:{"data-lead":R(a,h)}},n("th",{class:"aparte-score__row-team",attrs:{scope:"row"}},n("span",{class:"aparte-score__row-label"},oe(f,"sm"),n("span",{class:"aparte-score__row-name",text:f.shortName??f.name}))),...b,L)},v=n("table",{class:"aparte-score__periods"},o,n("thead",{},l),n("tbody",{},m("home"),m("away")));return n("div",{class:"aparte-score__section aparte-score__table-wrap"},v)}function Da(e,a){let r=a.events;if(!r)return null;let t=n("ol",{class:"aparte-score__events"});e.bind(t,()=>w(e.config,"cardsScoreEvents",_.cardsScoreEvents),"aria-label");for(let o of r){let s=a[o.team],i=n("span",{class:"aparte-score__event-type"});e.word(i,Je[o.type],Ze[o.type]);let c=n("span",{class:"aparte-score__event-team",attrs:{"data-ink":s.color?je(s.color):void 0},text:s.shortName??s.name});W(c,"--aparte-score-team",s.color);let l=n("span",{class:"aparte-score__event-body"},T(Ge[o.type],"aparte-rich-card__glyph aparte-score__event-glyph"),n("span",{class:"aparte-score__event-text"},o.player?n("span",{class:"aparte-score__player",text:o.player}):null,i,o.detail?n("span",{class:"aparte-score__event-detail",text:o.detail}):null),c);t.append(n("li",{class:"aparte-score__event",attrs:{"data-team":o.team,"data-type":o.type}},n("span",{class:"aparte-score__minute",text:o.minute??""}),l))}return n("div",{class:"aparte-score__section aparte-score__timeline"},t)}function Ra(e,a,r){let t=ne(a,"aparte-score aparte-score--detail");return t.append(...[se(e,a,r),Ne(e,a,r),Pa(e,a),Da(e,a),Ee(e,a)].filter(te)),t}function Ha(e,a,r){let t=n("div",{class:"aparte-score__when"}),o=j(a);if(o==="live"){let s=n("span",{class:"aparte-score__live-word"});e.word(s,"cardsScoreLive",_.cardsScoreLive);let i=re(a);t.append(n("span",{class:"aparte-score__live-dot",attrs:{"aria-hidden":"true"}}),i?n("span",{class:"aparte-score__sr"},s):s),i&&t.append(n("span",{class:"aparte-score__clock",text:i}))}else if(o==="scheduled"||o==="none"&&!H(a))a.startTime?t.append(Le(e,a.startTime,r,"aparte-score__kickoff aparte-score__kickoff--row")):e.word(t,"cardsScoreUpcoming",_.cardsScoreUpcoming);else if(K(e.config,a)!==void 0)e.bind(t,()=>K(e.config,a));else if(a.startTime){let i=a.startTime;e.bind(t,()=>q(e.config,i,r))}return t.setAttribute("data-phase",o),t}function Te(e,a,r,t){let o=a[r],s=R(a,r);return n("div",{class:"aparte-score__line",attrs:{"data-lead":s}},oe(o,"sm"),n("span",{class:"aparte-score__line-name",text:o.name}),t&&o.score!==void 0?ee(e,o.score,"aparte-score__line-score"):null,n("span",{class:"aparte-score__win-mark",attrs:{"aria-hidden":"true"},text:s==="win"?"\u25C2":""}))}function Ae(e,a,r,t,o){let s=ne(a,"aparte-score__row",t),i=H(a),c=n("div",{class:"aparte-score__lines"},o&&a.competition?n("span",{class:"aparte-score__row-meta",text:a.competition}):null,Te(e,a,"home",i),Te(e,a,"away",i));if(s.append(Ha(e,a,r),c),a.url){let l=n("a",{class:"aparte-score__link",attrs:{href:a.url,target:"_blank",rel:"noopener noreferrer"}});e.bind(l,()=>Ce(e.config,a,r),"aria-label"),s.setAttribute("data-linked",""),s.append(l)}return s}function ie(e,a){return a.title??Pe(a.matches??[])??w(e.config,"cardsScoreCount",_.cardsScoreCount,{n:x(e.config,a.matches?.length??0)})}function Pe(e){let a=e[0]?.competition;return a&&e.every(r=>r.competition===a)?a:void 0}function Ba(e,a){let r=n("span",{class:"aparte-score__heading-text"});e.bind(r,()=>ie(e,a));let t=new Set(a.matches.map(s=>s.sport)),o=t.size===1?[...t][0]:"generic";return n("div",{class:"aparte-score__heading"},T(Me[o],"aparte-rich-card__glyph aparte-score__sport"),r)}function Fa(e,a,r){let t=r.now(),[o]=e.matches;if(e.matches.length>1){let s=Pe(e.matches)!==void 0||e.title!==void 0&&e.matches.every(c=>!c.competition),i=n("ul",{class:"aparte-score__list",attrs:{role:"list"}},...e.matches.map(c=>Ae(a,c,t,"li",!s)));return a.bind(i,()=>ie(a,e),"aria-label"),[n("div",{class:"aparte-score__board-list"},Ba(a,e),i)]}if(a.variant==="compact"){let s=se(a,o,t);return[n("div",{class:"aparte-score__single"},s,Ae(a,o,t,"div",!1))]}return[a.variant==="detail"?Ra(a,o,t):Na(a,o,t)]}function Ua(e,a){let r=(l,m="rect")=>n("span",{class:`aparte-skeleton aparte-skeleton--${m} ${l}`,attrs:{"aria-hidden":"true"}}),t=e?.matches?.[0],o=(l,m)=>t?.[l].name?n("span",{class:m,text:t[l].name}):r(`${m} aparte-score__sk-name`,"text"),s=e?.title?n("div",{class:"aparte-score__heading"},T(ae,"aparte-rich-card__glyph aparte-score__sport"),n("span",{class:"aparte-score__heading-text",text:e.title})):n("div",{class:"aparte-score__head"},r("aparte-score__sk-meta","text"));if(a.variant==="compact"){let l=m=>n("div",{class:"aparte-score__line"},r("aparte-score__crest aparte-score__crest--sm","circle"),o(m,"aparte-score__line-name"),r("aparte-score__sk-num"));return[n("div",{class:"aparte-score__single"},s,n("div",{class:"aparte-score__row"},n("div",{class:"aparte-score__when"},r("aparte-score__sk-when","text")),n("div",{class:"aparte-score__lines"},l("home"),l("away"))))]}let i=l=>n("div",{class:`aparte-score__team aparte-score__team--${l}`},r("aparte-score__crest aparte-score__crest--lg","circle"),o(l,"aparte-score__team-name")),c=[s,n("div",{class:"aparte-score__board"},i("home"),n("div",{class:"aparte-score__centre"},r("aparte-score__sk-score"),r("aparte-score__sk-pill")),i("away"))];return a.variant==="detail"&&c.push(n("div",{class:"aparte-score__section aparte-score__sk-lines"},...[0,1,2,3].map(()=>r("aparte-score__sk-line","text")))),[n("article",{class:`aparte-score aparte-score--${a.variant}`},...c)]}function Va(e,a){let r=e?.matches??[];if(r.length===1){let[t]=r,o=[t.home.name,t.away.name].filter(Boolean);return o.length===2?V(a.config,t):o[0]??w(a.config,"cardsScoreTitle",_.cardsScoreTitle)}return r.length>1||e?.title?ie(a,e):w(a.config,"cardsScoreTitle",_.cardsScoreTitle)}function Ia(e,a){let r=e.matches.map(t=>Ce(a.config,t));return e.title?`${e.title}:
|
|
879
|
+
${r.join(`
|
|
880
|
+
`)}`:r.join(`
|
|
881
|
+
`)}function Ya(e){let a=g(e.home??e.homeTeam??e.home_team??e.team??e.teamName??e.club),r=g(e.away??e.awayTeam??e.away_team??e.opponent);if(a||r)return{matches:[{home:{name:a??""},away:{name:r??""},sport:I(e.sport)??"generic"}]};let t=u(e.query??e.q??e.search??e.competition??e.league);return t?{title:t}:null}function De(e){return fe({name:"score",variants:["card","compact","detail"],styles:Xe,icon:ae,normalize:Aa,render:(a,r)=>Fa(a,r,e),skeleton:Ua,label:Va,fallback:Ia,partial:Ya})}var Ka=De({now:()=>new Date});function Wa(e={}){let{now:a,...r}=e;return De({now:a??(()=>new Date)}).setup(r)}export{je as inkOn,Ca as monogram,Aa as readMatches,Ka as scoreCard,Wa as setupScoreCard,ca as teamColor};
|
|
882
|
+
//# sourceMappingURL=score-3CGZEPWP.js.map
|