@wral/hsot-data 0.5.0 → 0.5.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.
@@ -1,15 +1,15 @@
1
- const J = globalThis, pe = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, me = /* @__PURE__ */ Symbol(), _e = /* @__PURE__ */ new WeakMap();
1
+ const J = globalThis, me = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ue = /* @__PURE__ */ Symbol(), Te = /* @__PURE__ */ new WeakMap();
2
2
  let qe = class {
3
3
  constructor(e, t, s) {
4
- if (this._$cssResult$ = !0, s !== me) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
4
+ if (this._$cssResult$ = !0, s !== ue) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = e, this.t = t;
6
6
  }
7
7
  get styleSheet() {
8
8
  let e = this.o;
9
9
  const t = this.t;
10
- if (pe && e === void 0) {
10
+ if (me && e === void 0) {
11
11
  const s = t !== void 0 && t.length === 1;
12
- s && (e = _e.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && _e.set(t, e));
12
+ s && (e = Te.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Te.set(t, e));
13
13
  }
14
14
  return e;
15
15
  }
@@ -17,25 +17,25 @@ let qe = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const kt = (a) => new qe(typeof a == "string" ? a : a + "", void 0, me), y = (a, ...e) => {
20
+ const kt = (a) => new qe(typeof a == "string" ? a : a + "", void 0, ue), y = (a, ...e) => {
21
21
  const t = a.length === 1 ? a[0] : e.reduce((s, r, o) => s + ((n) => {
22
22
  if (n._$cssResult$ === !0) return n.cssText;
23
23
  if (typeof n == "number") return n;
24
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
25
  })(r) + a[o + 1], a[0]);
26
- return new qe(t, a, me);
26
+ return new qe(t, a, ue);
27
27
  }, St = (a, e) => {
28
- if (pe) a.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
28
+ if (me) a.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
29
29
  else for (const t of e) {
30
30
  const s = document.createElement("style"), r = J.litNonce;
31
31
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, a.appendChild(s);
32
32
  }
33
- }, Te = pe ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((e) => {
33
+ }, Ae = me ? (a) => a : (a) => a instanceof CSSStyleSheet ? ((e) => {
34
34
  let t = "";
35
35
  for (const s of e.cssRules) t += s.cssText;
36
36
  return kt(t);
37
37
  })(a) : a;
38
- const { is: _t, defineProperty: Tt, getOwnPropertyDescriptor: At, getOwnPropertyNames: It, getOwnPropertySymbols: Ct, getPrototypeOf: Et } = Object, re = globalThis, Ae = re.trustedTypes, Pt = Ae ? Ae.emptyScript : "", Bt = re.reactiveElementPolyfillSupport, G = (a, e) => a, he = { toAttribute(a, e) {
38
+ const { is: _t, defineProperty: Tt, getOwnPropertyDescriptor: At, getOwnPropertyNames: It, getOwnPropertySymbols: Ct, getPrototypeOf: Et } = Object, re = globalThis, Ie = re.trustedTypes, Pt = Ie ? Ie.emptyScript : "", Bt = re.reactiveElementPolyfillSupport, G = (a, e) => a, he = { toAttribute(a, e) {
39
39
  switch (e) {
40
40
  case Boolean:
41
41
  a = a ? Pt : null;
@@ -63,7 +63,7 @@ const { is: _t, defineProperty: Tt, getOwnPropertyDescriptor: At, getOwnProperty
63
63
  }
64
64
  }
65
65
  return t;
66
- } }, We = (a, e) => !_t(a, e), Ie = { attribute: !0, type: String, converter: he, reflect: !1, useDefault: !1, hasChanged: We };
66
+ } }, We = (a, e) => !_t(a, e), Ce = { attribute: !0, type: String, converter: he, reflect: !1, useDefault: !1, hasChanged: We };
67
67
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), re.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
68
  let R = class extends HTMLElement {
69
69
  static addInitializer(e) {
@@ -72,7 +72,7 @@ let R = class extends HTMLElement {
72
72
  static get observedAttributes() {
73
73
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
74
  }
75
- static createProperty(e, t = Ie) {
75
+ static createProperty(e, t = Ce) {
76
76
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
77
77
  const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(e, s, t);
78
78
  r !== void 0 && Tt(this.prototype, e, r);
@@ -90,7 +90,7 @@ let R = class extends HTMLElement {
90
90
  }, configurable: !0, enumerable: !0 };
91
91
  }
92
92
  static getPropertyOptions(e) {
93
- return this.elementProperties.get(e) ?? Ie;
93
+ return this.elementProperties.get(e) ?? Ce;
94
94
  }
95
95
  static _$Ei() {
96
96
  if (this.hasOwnProperty(G("elementProperties"))) return;
@@ -119,8 +119,8 @@ let R = class extends HTMLElement {
119
119
  const t = [];
120
120
  if (Array.isArray(e)) {
121
121
  const s = new Set(e.flat(1 / 0).reverse());
122
- for (const r of s) t.unshift(Te(r));
123
- } else e !== void 0 && t.push(Te(e));
122
+ for (const r of s) t.unshift(Ae(r));
123
+ } else e !== void 0 && t.push(Ae(e));
124
124
  return t;
125
125
  }
126
126
  static _$Eu(e, t) {
@@ -247,12 +247,12 @@ let R = class extends HTMLElement {
247
247
  }
248
248
  };
249
249
  R.elementStyles = [], R.shadowRootOptions = { mode: "open" }, R[G("elementProperties")] = /* @__PURE__ */ new Map(), R[G("finalized")] = /* @__PURE__ */ new Map(), Bt?.({ ReactiveElement: R }), (re.reactiveElementVersions ??= []).push("2.1.2");
250
- const ue = globalThis, Ce = (a) => a, X = ue.trustedTypes, Ee = X ? X.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ve = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Ye = "?" + _, Dt = `<${Ye}>`, C = document, j = () => C.createComment(""), q = (a) => a === null || typeof a != "object" && typeof a != "function", fe = Array.isArray, Rt = (a) => fe(a) || typeof a?.[Symbol.iterator] == "function", ce = `[
251
- \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Pe = /-->/g, Be = />/g, A = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), De = /'/g, Re = /"/g, Ke = /^(?:script|style|textarea|title)$/i, Qe = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), l = Qe(1), ze = Qe(2), F = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Ne = /* @__PURE__ */ new WeakMap(), I = C.createTreeWalker(C, 129);
250
+ const fe = globalThis, Ee = (a) => a, X = fe.trustedTypes, Pe = X ? X.createPolicy("lit-html", { createHTML: (a) => a }) : void 0, Ve = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, Ye = "?" + _, Dt = `<${Ye}>`, C = document, j = () => C.createComment(""), q = (a) => a === null || typeof a != "object" && typeof a != "function", ge = Array.isArray, Rt = (a) => ge(a) || typeof a?.[Symbol.iterator] == "function", ce = `[
251
+ \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Be = /-->/g, De = />/g, A = RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Re = /'/g, ze = /"/g, Ke = /^(?:script|style|textarea|title)$/i, Qe = (a) => (e, ...t) => ({ _$litType$: a, strings: e, values: t }), l = Qe(1), Ne = Qe(2), F = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), Fe = /* @__PURE__ */ new WeakMap(), I = C.createTreeWalker(C, 129);
253
253
  function Ze(a, e) {
254
- if (!fe(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return Ee !== void 0 ? Ee.createHTML(e) : e;
254
+ if (!ge(a) || !a.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return Pe !== void 0 ? Pe.createHTML(e) : e;
256
256
  }
257
257
  const zt = (a, e) => {
258
258
  const t = a.length - 1, s = [];
@@ -260,7 +260,7 @@ const zt = (a, e) => {
260
260
  for (let i = 0; i < t; i++) {
261
261
  const c = a[i];
262
262
  let p, d, h = -1, u = 0;
263
- for (; u < c.length && (n.lastIndex = u, d = n.exec(c), d !== null); ) u = n.lastIndex, n === H ? d[1] === "!--" ? n = Pe : d[1] !== void 0 ? n = Be : d[2] !== void 0 ? (Ke.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = A) : d[3] !== void 0 && (n = A) : n === A ? d[0] === ">" ? (n = r ?? H, h = -1) : d[1] === void 0 ? h = -2 : (h = n.lastIndex - d[2].length, p = d[1], n = d[3] === void 0 ? A : d[3] === '"' ? Re : De) : n === Re || n === De ? n = A : n === Pe || n === Be ? n = H : (n = A, r = void 0);
263
+ for (; u < c.length && (n.lastIndex = u, d = n.exec(c), d !== null); ) u = n.lastIndex, n === H ? d[1] === "!--" ? n = Be : d[1] !== void 0 ? n = De : d[2] !== void 0 ? (Ke.test(d[2]) && (r = RegExp("</" + d[2], "g")), n = A) : d[3] !== void 0 && (n = A) : n === A ? d[0] === ">" ? (n = r ?? H, h = -1) : d[1] === void 0 ? h = -2 : (h = n.lastIndex - d[2].length, p = d[1], n = d[3] === void 0 ? A : d[3] === '"' ? ze : Re) : n === ze || n === Re ? n = A : n === Be || n === De ? n = H : (n = A, r = void 0);
264
264
  const f = n === A && a[i + 1].startsWith("/>") ? " " : "";
265
265
  o += n === H ? c + Dt : h >= 0 ? (s.push(p), c.slice(0, h) + Ve + c.slice(h) + _ + f) : c + _ + (h === -2 ? i : f);
266
266
  }
@@ -279,8 +279,8 @@ class W {
279
279
  for (; (r = I.nextNode()) !== null && c.length < i; ) {
280
280
  if (r.nodeType === 1) {
281
281
  if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(Ve)) {
282
- const u = d[n++], f = r.getAttribute(h).split(_), v = /([.?@])?(.*)/.exec(u);
283
- c.push({ type: 1, index: o, name: v[2], strings: f, ctor: v[1] === "." ? Ft : v[1] === "?" ? Mt : v[1] === "@" ? Ot : oe }), r.removeAttribute(h);
282
+ const u = d[n++], f = r.getAttribute(h).split(_), g = /([.?@])?(.*)/.exec(u);
283
+ c.push({ type: 1, index: o, name: g[2], strings: f, ctor: g[1] === "." ? Ft : g[1] === "?" ? Mt : g[1] === "@" ? Ot : oe }), r.removeAttribute(h);
284
284
  } else h.startsWith(_) && (c.push({ type: 6, index: o }), r.removeAttribute(h));
285
285
  if (Ke.test(r.tagName)) {
286
286
  const h = r.textContent.split(_), u = h.length - 1;
@@ -376,11 +376,11 @@ class Y {
376
376
  }
377
377
  }
378
378
  _$AC(e) {
379
- let t = Ne.get(e.strings);
380
- return t === void 0 && Ne.set(e.strings, t = new W(e)), t;
379
+ let t = Fe.get(e.strings);
380
+ return t === void 0 && Fe.set(e.strings, t = new W(e)), t;
381
381
  }
382
382
  k(e) {
383
- fe(this._$AH) || (this._$AH = [], this._$AR());
383
+ ge(this._$AH) || (this._$AH = [], this._$AR());
384
384
  const t = this._$AH;
385
385
  let s, r = 0;
386
386
  for (const o of e) r === t.length ? t.push(s = new Y(this.O(j()), this.O(j()), this, this.options)) : s = t[r], s._$AI(o), r++;
@@ -388,8 +388,8 @@ class Y {
388
388
  }
389
389
  _$AR(e = this._$AA.nextSibling, t) {
390
390
  for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
391
- const s = Ce(e).nextSibling;
392
- Ce(e).remove(), e = s;
391
+ const s = Ee(e).nextSibling;
392
+ Ee(e).remove(), e = s;
393
393
  }
394
394
  }
395
395
  setConnected(e) {
@@ -461,8 +461,8 @@ class Ut {
461
461
  M(this, e);
462
462
  }
463
463
  }
464
- const Ht = ue.litHtmlPolyfillSupport;
465
- Ht?.(W, Y), (ue.litHtmlVersions ??= []).push("3.3.3");
464
+ const Ht = fe.litHtmlPolyfillSupport;
465
+ Ht?.(W, Y), (fe.litHtmlVersions ??= []).push("3.3.3");
466
466
  const Lt = (a, e, t) => {
467
467
  const s = t?.renderBefore ?? e;
468
468
  let r = s._$litPart$;
@@ -472,7 +472,7 @@ const Lt = (a, e, t) => {
472
472
  }
473
473
  return r._$AI(a), r;
474
474
  };
475
- const ge = globalThis;
475
+ const ve = globalThis;
476
476
  class N extends R {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -495,10 +495,10 @@ class N extends R {
495
495
  return F;
496
496
  }
497
497
  }
498
- N._$litElement$ = !0, N.finalized = !0, ge.litElementHydrateSupport?.({ LitElement: N });
499
- const Gt = ge.litElementPolyfillSupport;
498
+ N._$litElement$ = !0, N.finalized = !0, ve.litElementHydrateSupport?.({ LitElement: N });
499
+ const Gt = ve.litElementPolyfillSupport;
500
500
  Gt?.({ LitElement: N });
501
- (ge.litElementVersions ??= []).push("4.2.2");
501
+ (ve.litElementVersions ??= []).push("4.2.2");
502
502
  const jt = 50;
503
503
  function qt(a = {}) {
504
504
  const e = Object.entries(a).filter(([, s]) => s != null && s !== "");
@@ -553,7 +553,7 @@ const L = {
553
553
  // reportHref() drops the parameter when there is none.
554
554
  report: "/report-a-score/?game={id}"
555
555
  };
556
- function g(a, e) {
556
+ function v(a, e) {
557
557
  return String(a).replace(/\{(\w+)\}/g, (t, s) => e[s] !== void 0 && e[s] !== null ? String(e[s]) : t);
558
558
  }
559
559
  function O(a) {
@@ -565,7 +565,7 @@ function O(a) {
565
565
  };
566
566
  }
567
567
  function Je(a, e = "") {
568
- const t = g(a.report || L.report, { id: e || "" });
568
+ const t = v(a.report || L.report, { id: e || "" });
569
569
  return e ? t : t.replace(/([?&])game=(?=&|$)/, "$1").replace(/[?&]$/, "").replace(/\?&/, "?");
570
570
  }
571
571
  const k = (a) => a ? a.charAt(0).toUpperCase() + a.slice(1) : "";
@@ -574,7 +574,7 @@ function x(a, e) {
574
574
  const [t, s, r] = String(a).split("-").map(Number);
575
575
  return !t || !s || !r ? "TBD" : new Date(t, s - 1, r).toLocaleDateString("en-US", e || { weekday: "short", month: "short", day: "numeric" });
576
576
  }
577
- function ve(a) {
577
+ function $e(a) {
578
578
  if (!a) return "";
579
579
  const [e, t] = String(a).split(":").map(Number);
580
580
  if (Number.isNaN(e)) return "";
@@ -591,17 +591,17 @@ function K(a = /* @__PURE__ */ new Date()) {
591
591
  const e = a.getFullYear();
592
592
  return a.getMonth() >= 6 ? `${e}-${e + 1}` : `${e - 1}-${e}`;
593
593
  }
594
- function $e(a = /* @__PURE__ */ new Date()) {
594
+ function be(a = /* @__PURE__ */ new Date()) {
595
595
  const e = (t) => String(t).padStart(2, "0");
596
596
  return `${a.getFullYear()}-${e(a.getMonth() + 1)}-${e(a.getDate())}`;
597
597
  }
598
- function Kt(a, e = $e()) {
598
+ function Kt(a, e = be()) {
599
599
  const t = [...new Set((a || []).filter(Boolean))].sort();
600
600
  if (!t.length || t.includes(e)) return e;
601
601
  const s = t.filter((r) => r < e);
602
602
  return s.length ? s[s.length - 1] : t[0];
603
603
  }
604
- function be(a) {
604
+ function ye(a) {
605
605
  return a ? (a.abbr || a.name || "?").slice(0, 4).toUpperCase() : "?";
606
606
  }
607
607
  function ee(a) {
@@ -613,7 +613,7 @@ const Qt = (a) => {
613
613
  const e = ["th", "st", "nd", "rd"], t = a % 100;
614
614
  return a + (e[(t - 20) % 10] || e[t] || e[0]);
615
615
  };
616
- function Fe(a, e) {
616
+ function de(a, e) {
617
617
  const t = (o) => {
618
618
  const n = /^\d+/.exec(String(o ?? ""));
619
619
  return n ? Number(n[0]) : null;
@@ -633,7 +633,7 @@ function et(a) {
633
633
  const e = [];
634
634
  return a.finish === "overtime" && e.push("OT"), a.finish === "shootout" && e.push("PK-SO"), a.forfeit && a.forfeit !== "none" && e.push("Forfeit"), { kind: "final", label: `Final${e.length ? ` · ${e.join(" · ")}` : ""}` };
635
635
  }
636
- return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${x(a.date, { month: "short", day: "numeric" })} · ${ve(a.time)}`.replace(/ · $/, "") };
636
+ return a.state === "postponed" ? { kind: "warn", label: "Postponed" } : a.state === "canceled" ? { kind: "warn", label: "Canceled" } : { kind: "sched", label: `${x(a.date, { month: "short", day: "numeric" })} · ${$e(a.time)}`.replace(/ · $/, "") };
637
637
  }
638
638
  const Zt = ["boys", "girls"];
639
639
  function tt(a, e) {
@@ -642,11 +642,11 @@ function tt(a, e) {
642
642
  function st(a, e) {
643
643
  return e ? (a || []).filter((t) => tt(t, e)) : a || [];
644
644
  }
645
- function de(a) {
645
+ function pe(a) {
646
646
  const e = new Set((a || []).map((t) => t && t.gender));
647
647
  return Zt.filter((t) => e.has(t));
648
648
  }
649
- const Jt = (a) => de(a).length === 2, Xt = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
649
+ const Jt = (a) => pe(a).length === 2, Xt = /* @__PURE__ */ new Set(["game", "story", "page", "forum", "video", "gallery"]);
650
650
  function T(a) {
651
651
  let e = String(a || "").replace(/^[a-z][a-z0-9+.-]*:\/\/[^/#?]*/i, "");
652
652
  const t = e.indexOf("#");
@@ -665,16 +665,16 @@ function es(a, e, t) {
665
665
  if (!t) return null;
666
666
  const s = T(a);
667
667
  if (!s) return null;
668
- const r = T(g(e.game, { sport: t, id: "" })), o = T(g(e.school, { id: "" }));
668
+ const r = T(v(e.game, { sport: t, id: "" })), o = T(v(e.school, { id: "" }));
669
669
  if (s === r || s.startsWith(`${r}/`) || s === o || s.startsWith(`${o}/`)) return null;
670
- const n = T(g(e.section, { sport: t, view: "" }));
670
+ const n = T(v(e.section, { sport: t, view: "" }));
671
671
  if (s === n) return "";
672
672
  if (!s.startsWith(`${n}/`)) return null;
673
673
  const i = s.slice(n.length + 1), c = i.split("/");
674
674
  return c.length > 2 || c.some((p) => !/^[a-z][a-z-]*$/.test(p)) || Xt.has(c[0]) ? null : i;
675
675
  }
676
676
  function ts(a, e, t) {
677
- const s = (o) => g(t.section, { sport: a, view: o }).replace(/([^:])\/{2,}/g, "$1/"), r = Jt(e) ? [
677
+ const s = (o) => v(t.section, { sport: a, view: o }).replace(/([^:])\/{2,}/g, "$1/"), r = Jt(e) ? [
678
678
  { label: "Boys Standings", href: s("boys/standings") },
679
679
  { label: "Girls Standings", href: s("girls/standings") }
680
680
  ] : [{ label: "Standings", href: s("standings") }];
@@ -1059,14 +1059,14 @@ function rt(a, e) {
1059
1059
  return { team: t, rec: s, confPct: Me(s.cw, s.cl, s.ct), overallPct: Me(s.w, s.l, s.t) };
1060
1060
  }).sort((t, s) => s.confPct - t.confPct || s.overallPct - t.overallPct || s.rec.pf - s.rec.pa - (t.rec.pf - t.rec.pa));
1061
1061
  }
1062
- function ye(a, e) {
1062
+ function we(a, e) {
1063
1063
  return a.filter((t) => (t.homeTeamId === e || t.awayTeamId === e) && (t.state === "scheduled" || t.state === "live") && t.gameType !== "scrimmage").sort((t, s) => String(t.date).localeCompare(String(s.date)))[0] || null;
1064
1064
  }
1065
1065
  function Ue(a, e) {
1066
1066
  const t = a[e];
1067
1067
  return t && t.results.length ? t.results[t.results.length - 1] : null;
1068
1068
  }
1069
- function we(a, e, t, s, r) {
1069
+ function xe(a, e, t, s, r) {
1070
1070
  const o = e[t];
1071
1071
  if (!o) return null;
1072
1072
  const n = /* @__PURE__ */ new Map();
@@ -1142,24 +1142,24 @@ function P(a, e = 26) {
1142
1142
  const s = a.colorPrimary || "#030711", r = ee(s);
1143
1143
  return l`<span class="swatch" aria-hidden="true"
1144
1144
  style="width:${e}px;height:${e}px;background:${s};color:${r};font-size:${Math.max(8, e * 0.28)}px"
1145
- >${be(a)}</span>`;
1145
+ >${ye(a)}</span>`;
1146
1146
  }
1147
- function xe(a, e, t) {
1148
- const s = we(a.rankings, a.teamsById, e, a.sport, t);
1147
+ function ke(a, e, t) {
1148
+ const s = xe(a.rankings, a.teamsById, e, a.sport, t);
1149
1149
  return s ? l`<span class="rankbadge">#${s}</span>` : m;
1150
1150
  }
1151
1151
  function ae(a, e, t) {
1152
1152
  const s = E(a, e);
1153
- return s ? l`${xe(a, e, t)}<a href=${g(a.hrefs.school, { id: s.id })}>${s.name}</a>` : l`<span class="mut">TBD</span>`;
1153
+ return s ? l`${ke(a, e, t)}<a href=${v(a.hrefs.school, { id: s.id })}>${s.name}</a>` : l`<span class="mut">TBD</span>`;
1154
1154
  }
1155
- function ke(a, e, t = 5) {
1155
+ function Se(a, e, t = 5) {
1156
1156
  const s = a.records[e];
1157
1157
  if (!s || !s.results.length) return l`<span class="mut">·</span>`;
1158
1158
  const r = s.results.slice(-1 * t);
1159
1159
  return l`<span class="dots" role="img" aria-label="last ${r.length} results">
1160
1160
  ${r.map((o) => l`<a class="dot ${o.mark}"
1161
1161
  title="${o.mark} ${o.my}-${o.their} vs ${z(a, o.opp)}"
1162
- href=${g(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1162
+ href=${v(a.hrefs.game, { sport: a.sport, id: o.gameId })}>${o.mark}</a>`)}
1163
1163
  </span>`;
1164
1164
  }
1165
1165
  function B(a, e) {
@@ -1209,14 +1209,18 @@ function $s(a, e) {
1209
1209
  return [...t.keys()].sort((r, o) => s(r) - s(o) || t.get(r) - t.get(o));
1210
1210
  }
1211
1211
  function bs(a, e) {
1212
- return a.gameType === "conference" && a.conferenceId ? e[a.conferenceId]?.name || "Conference" : a.gameType === "playoff" ? "Playoffs" : a.gameType === "scrimmage" ? "Scrimmages" : "Nonconference";
1212
+ if (a.gameType === "conference" && a.conferenceId) {
1213
+ const t = e[a.conferenceId] || null;
1214
+ return { name: t?.name || "Conference", conference: t };
1215
+ }
1216
+ return a.gameType === "playoff" ? { name: "Playoffs", conference: null } : a.gameType === "scrimmage" ? { name: "Scrimmages", conference: null } : { name: "Nonconference", conference: null };
1213
1217
  }
1214
1218
  function ys(a, e) {
1215
1219
  const t = /* @__PURE__ */ new Map();
1216
1220
  return (a || []).forEach((s) => {
1217
- const r = bs(s, e);
1218
- t.has(r) || t.set(r, []), t.get(r).push(s);
1219
- }), t;
1221
+ const { name: r, conference: o } = bs(s, e);
1222
+ t.has(r) || t.set(r, { name: r, conference: o, games: [] }), t.get(r).games.push(s);
1223
+ }), [...t.values()];
1220
1224
  }
1221
1225
  const ws = y`
1222
1226
  .toolbar.filters { gap: 0.5rem 1.1rem; }
@@ -1225,6 +1229,8 @@ const ws = y`
1225
1229
  /* A phone can't fit the label and six chips on one line; the label takes
1226
1230
  its own row so the chips stay together instead of stranding the last. */
1227
1231
  @media (max-width: 480px) { .filters .asof { flex-basis: 100%; } }
1232
+ /* Conference headings carry the standings cards' classification pills. */
1233
+ .section-title .pill { margin-left: 0.3rem; vertical-align: 0.1em; }
1228
1234
  `;
1229
1235
  class ht extends w {
1230
1236
  static styles = [...U, ws];
@@ -1282,9 +1288,13 @@ class ht extends w {
1282
1288
  }
1283
1289
  renderView() {
1284
1290
  const e = this.ctx, t = b(this.data.conferences), s = [...new Set(this.data.games.map((h) => h.date).filter(Boolean))].sort(), r = He(this.view), o = fs(this.data.teams, e.schoolsById), n = o.includes(this.areaCode) ? this.areaCode : "", i = (h) => {
1285
- const u = [h.awayTeamId, h.homeTeamId].map((f) => we(e.rankings, e.teamsById, f, this.sport, h.date)).filter(Boolean);
1291
+ const u = [h.awayTeamId, h.homeTeamId].map((f) => xe(e.rankings, e.teamsById, f, this.sport, h.date)).filter(Boolean);
1286
1292
  return u.length ? Math.min(...u) : null;
1287
- }, c = this.data.games.filter((h) => h.date === this.date), p = c.filter((h) => gs(h, n, e.teamsById, e.schoolsById)), d = r === "conferences" ? ys($s(p, i), t) : new Map(p.length ? [[n ? `All games · ${n}` : "All games", vs(p, i, e.teamsById, e.schoolsById)]] : []);
1293
+ }, c = this.data.games.filter((h) => h.date === this.date), p = c.filter((h) => gs(h, n, e.teamsById, e.schoolsById)), d = r === "conferences" ? ys($s(p, i), t) : p.length ? [{
1294
+ name: n ? `All games · ${n}` : "All games",
1295
+ conference: null,
1296
+ games: vs(p, i, e.teamsById, e.schoolsById)
1297
+ }] : [];
1288
1298
  return l`
1289
1299
  ${le(this, e, {
1290
1300
  title: l`${k(this.sport)} scores &amp; schedules`,
@@ -1299,7 +1309,7 @@ class ht extends w {
1299
1309
  this.date = h.target.value;
1300
1310
  }}>
1301
1311
  ${(s.includes(this.date) ? s : [...s, this.date].sort()).map((h) => l`<option value=${h} ?selected=${h === this.date}>
1302
- ${x(h, { weekday: "short", month: "short", day: "numeric" })}${h === $e() ? " · today" : ""}
1312
+ ${x(h, { weekday: "short", month: "short", day: "numeric" })}${h === be() ? " · today" : ""}
1303
1313
  </option>`)}
1304
1314
  </select>
1305
1315
  <button class="chip" ?disabled=${s.indexOf(this.date) <= 0}
@@ -1331,10 +1341,10 @@ class ht extends w {
1331
1341
  ${c.length ? m : l`<p class="empty">No ${this.sport} games on this date.</p>`}
1332
1342
  ${c.length && !p.length ? l`<p class="empty">No ${this.sport} games in the ${n} area code on this date.
1333
1343
  <button class="chip" @click=${() => this.pick({ area: "" })}>Every area</button></p>` : m}
1334
- ${[...d.entries()].map(([h, u]) => l`
1335
- <div class="section-title">${h}</div>
1344
+ ${d.map(({ name: h, conference: u, games: f }) => l`
1345
+ <div class="section-title">${h}${[...u?.classifications || []].sort(de).map((g) => l`<span class="pill class">${g}</span>`)}</div>
1336
1346
  <div class="card"><ul class="gamelist">
1337
- ${u.map((f) => this.renderGame(e, f))}
1347
+ ${f.map((g) => this.renderGame(e, g))}
1338
1348
  </ul></div>
1339
1349
  `)}
1340
1350
  `)}
@@ -1352,7 +1362,7 @@ class ht extends w {
1352
1362
  ${o ? l`<span class="ff">${z(e, o === "home" ? t.homeTeamId : t.awayTeamId)} forfeited</span>` : m}
1353
1363
  <span class="where">${t.venue || ""}</span>
1354
1364
  ${t.broadcast ? l`<span class="pill class">${t.broadcast}</span>` : m}
1355
- <a class="box" href=${g(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score →</a>
1365
+ <a class="box" href=${v(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score →</a>
1356
1366
  </li>
1357
1367
  `;
1358
1368
  }
@@ -1379,7 +1389,7 @@ class dt extends w {
1379
1389
  */
1380
1390
  get viewGender() {
1381
1391
  if (this.gender) return this.gender;
1382
- const e = de(this.data?.teams);
1392
+ const e = pe(this.data?.teams);
1383
1393
  return e.length < 2 ? "" : e.includes(this.pickedGender) ? this.pickedGender : e[0];
1384
1394
  }
1385
1395
  async fetchData(e) {
@@ -1419,7 +1429,7 @@ class dt extends w {
1419
1429
  }, this._ctxData = this.data, this._ctxGender = this.viewGender), this._ctx;
1420
1430
  }
1421
1431
  renderView() {
1422
- const e = this.ctx, t = this.viewGender, s = this.gender ? [] : de(this.data.teams), r = ["All", ...[...new Set(this.data.conferences.flatMap((n) => n.classifications || []))].sort(Fe)].slice(0, 9), o = this.data.conferences.filter((n) => n.active !== !1).filter((n) => this.classFilter === "All" || (n.classifications || []).includes(this.classFilter)).sort(Xe);
1432
+ const e = this.ctx, t = this.viewGender, s = this.gender ? [] : pe(this.data.teams), r = ["All", ...[...new Set(this.data.conferences.flatMap((n) => n.classifications || []))].sort(de)].slice(0, 9), o = this.data.conferences.filter((n) => n.active !== !1).filter((n) => this.classFilter === "All" || (n.classifications || []).includes(this.classFilter)).sort(Xe);
1423
1433
  return l`
1424
1434
  ${le(this, e, {
1425
1435
  title: l`${t ? `${k(t)} ` : ""}${k(this.sport)} standings`,
@@ -1451,7 +1461,7 @@ class dt extends w {
1451
1461
  this.query = n.target.value;
1452
1462
  }}>
1453
1463
  <span class="spacer"></span>
1454
- <span class="asof">Records through ${x($e(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1464
+ <span class="asof">Records through ${x(be(), { month: "long", day: "numeric" })} · conference games count toward both records · scrimmages toward neither</span>
1455
1465
  </div>
1456
1466
  ${o.map((n) => this.renderConference(e, n))}
1457
1467
  `)}
@@ -1465,7 +1475,7 @@ class dt extends w {
1465
1475
  <div class="card">
1466
1476
  <div class="card-head">
1467
1477
  <h2>${t.name}</h2>
1468
- ${[...t.classifications || []].sort(Fe).map((n) => l`<span class="pill class">${n}</span>`)}
1478
+ ${[...t.classifications || []].sort(de).map((n) => l`<span class="pill class">${n}</span>`)}
1469
1479
  <span class="meta">${o.length} teams · membership derives from teams</span>
1470
1480
  </div>
1471
1481
  <div class="tablewrap"><table class="data">
@@ -1484,8 +1494,8 @@ class dt extends w {
1484
1494
  renderRow(e, t, s, r) {
1485
1495
  const o = e.schoolsById[t.team.schoolId], n = o?.name || t.team.name || "TBD";
1486
1496
  if (r && !n.toLowerCase().includes(r)) return m;
1487
- const i = t.rec.pf - t.rec.pa, c = ye(this.data.games, t.team.id), p = () => {
1488
- location.href = g(e.hrefs.school, { id: t.team.schoolId });
1497
+ const i = t.rec.pf - t.rec.pa, c = we(this.data.games, t.team.id), p = () => {
1498
+ location.href = v(e.hrefs.school, { id: t.team.schoolId });
1489
1499
  };
1490
1500
  return l`
1491
1501
  <tr class="rowlink" @click=${(d) => {
@@ -1493,8 +1503,8 @@ class dt extends w {
1493
1503
  }}>
1494
1504
  <td class="mut">${s + 1}</td>
1495
1505
  <td class="teamcell">
1496
- ${P(o)}${xe(e, t.team.id, null)}
1497
- <a href=${g(e.hrefs.school, { id: t.team.schoolId })}>${n}</a>
1506
+ ${P(o)}${ke(e, t.team.id, null)}
1507
+ <a href=${v(e.hrefs.school, { id: t.team.schoolId })}>${n}</a>
1498
1508
  </td>
1499
1509
  <td class="num">${S(t.rec, !0)}</td>
1500
1510
  <td class="num">${Oe(t.confPct)}</td>
@@ -1504,7 +1514,7 @@ class dt extends w {
1504
1514
  <td class="num">${t.rec.pa}</td>
1505
1515
  <td class="num" style="color:${i >= 0 ? "var(--hsot-win)" : "var(--hsot-loss)"}">${i > 0 ? "+" : ""}${i}</td>
1506
1516
  <td>${ie(t.rec.results) || "·"}</td>
1507
- <td>${ke(e, t.team.id)}</td>
1517
+ <td>${Se(e, t.team.id)}</td>
1508
1518
  <td>${nt(e, c, t.team.id)}</td>
1509
1519
  </tr>
1510
1520
  `;
@@ -1576,8 +1586,8 @@ class pt extends w {
1576
1586
  const i = t.map((h, u) => {
1577
1587
  const f = (h.teamIds || []).indexOf(e);
1578
1588
  if (f === -1) return null;
1579
- const v = t.length === 1 ? 96 / 2 : u / (t.length - 1) * 90 + 3, $ = 3 + f / 24 * 20;
1580
- return { x: v, y: $ };
1589
+ const g = t.length === 1 ? 96 / 2 : u / (t.length - 1) * 90 + 3, $ = 3 + f / 24 * 20;
1590
+ return { x: g, y: $ };
1581
1591
  }), c = [];
1582
1592
  let p = [];
1583
1593
  if (i.forEach((h) => {
@@ -1585,9 +1595,9 @@ class pt extends w {
1585
1595
  }), p.length && c.push(p), !c.length) return m;
1586
1596
  const d = i[s];
1587
1597
  return l`<svg class="sparkline" width=${96} height=${26} viewBox="0 0 ${96} ${26}" role="img" aria-label="rank history">
1588
- ${c.map((h) => ze`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1598
+ ${c.map((h) => Ne`<polyline fill="none" stroke="var(--hsot-red)" stroke-width="2"
1589
1599
  points=${h.map((u) => `${u.x.toFixed(1)},${u.y.toFixed(1)}`).join(" ")}></polyline>`)}
1590
- ${d ? ze`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1600
+ ${d ? Ne`<circle cx=${d.x.toFixed(1)} cy=${d.y.toFixed(1)} r="3" fill="var(--hsot-black)"></circle>` : m}
1591
1601
  </svg>`;
1592
1602
  }
1593
1603
  movement(e, t, s) {
@@ -1647,7 +1657,7 @@ class pt extends w {
1647
1657
  <div class="bigrank">#1</div>
1648
1658
  ${P(o, 64)}
1649
1659
  <div>
1650
- <h2><a href=${g(e.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1660
+ <h2><a href=${v(e.hrefs.school, { id: o.id })}>${o.name} ${o.mascot || ""}</a></h2>
1651
1661
  <div class="facts">
1652
1662
  ${S(i)} overall${p ? l` · ${S(i, !0)} ${p.name}` : m}
1653
1663
  · streak ${ie(i?.results) || "·"}
@@ -1661,20 +1671,20 @@ class pt extends w {
1661
1671
  renderRow(e, t, s, r, o, n, i, c) {
1662
1672
  const p = E(e, i);
1663
1673
  if (!p) return m;
1664
- const d = e.records[i], h = Ue(e.records, i), u = ye(this.data.games, i), f = n[e.teamsById[i]?.conferenceId], v = () => {
1665
- location.href = g(e.hrefs.school, { id: p.id });
1674
+ const d = e.records[i], h = Ue(e.records, i), u = we(this.data.games, i), f = n[e.teamsById[i]?.conferenceId], g = () => {
1675
+ location.href = v(e.hrefs.school, { id: p.id });
1666
1676
  };
1667
1677
  return l`
1668
1678
  <tr class="rowlink" @click=${($) => {
1669
- $.target.closest("a") || v();
1679
+ $.target.closest("a") || g();
1670
1680
  }}>
1671
1681
  <td class="num" style="font-weight:700">${c}</td>
1672
1682
  <td>${this.movement(t, s, i)}</td>
1673
- <td class="teamcell">${P(p)}<a href=${g(e.hrefs.school, { id: p.id })}>${p.name}</a>
1683
+ <td class="teamcell">${P(p)}<a href=${v(e.hrefs.school, { id: p.id })}>${p.name}</a>
1674
1684
  <span class="mut" style="font-size:0.78rem">${p.mascot || ""}</span></td>
1675
1685
  <td class="num">${S(d)}</td>
1676
1686
  <td class="mut">${f?.name || "Independent"}</td>
1677
- <td>${h ? l`<a class="box" style="text-decoration:none" href=${g(e.hrefs.game, { sport: this.sport, id: h.gameId })}>
1687
+ <td>${h ? l`<a class="box" style="text-decoration:none" href=${v(e.hrefs.game, { sport: this.sport, id: h.gameId })}>
1678
1688
  <b style="color:${h.mark === "W" ? "var(--hsot-win)" : h.mark === "L" ? "var(--hsot-loss)" : "var(--hsot-tie)"}">${h.mark}</b>
1679
1689
  ${h.my}-${h.their} vs ${se(e, h.opp)}</a>` : l`<span class="mut">·</span>`}</td>
1680
1690
  <td>${nt(e, u, i)}</td>
@@ -1757,7 +1767,7 @@ class mt extends w {
1757
1767
  t && !this.sport && (this.sport = t), s && !this.gender && (this.gender = s);
1758
1768
  }
1759
1769
  async fetchData(e) {
1760
- const t = this.season || K(), s = await e.getSchool(this.schoolId), o = (await e.listTeams({ schoolId: this.schoolId })).items, n = this.sport || "football", i = o.find(($) => $.id === this.activeTeamId) || o.find(($) => $.sport === n && tt($, this.gender)) || o.find(($) => $.sport === n) || o[0] || null, [c, p, d, h, u, f, v] = await Promise.all([
1770
+ const t = this.season || K(), s = await e.getSchool(this.schoolId), o = (await e.listTeams({ schoolId: this.schoolId })).items, n = this.sport || "football", i = o.find(($) => $.id === this.activeTeamId) || o.find(($) => $.sport === n && tt($, this.gender)) || o.find(($) => $.sport === n) || o[0] || null, [c, p, d, h, u, f, g] = await Promise.all([
1761
1771
  i ? e.listGames({ sport: i.sport, season: t }) : Promise.resolve({ items: [] }),
1762
1772
  i ? e.listTeams({ sport: i.sport }) : Promise.resolve({ items: [] }),
1763
1773
  e.listSchools(),
@@ -1779,7 +1789,7 @@ class mt extends w {
1779
1789
  conferences: h.items,
1780
1790
  rankings: u.items,
1781
1791
  roster: f.items.find(($) => $.season === t) || null,
1782
- players: v.items
1792
+ players: g.items
1783
1793
  };
1784
1794
  }
1785
1795
  get ctx() {
@@ -1807,7 +1817,7 @@ class mt extends w {
1807
1817
  return l`
1808
1818
  <div class="schoolhero" style="background:linear-gradient(115deg, ${e.colorPrimary || "#030711"} 0%, ${e.colorPrimary || "#030711"} 55%, var(--hsot-black) 100%);color:${n}">
1809
1819
  <div class="inner">
1810
- ${te(e, 84) ? l`<img class="crest logo" alt="" loading="lazy" src=${te(e, 84)} />` : l`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${ee(e.colorSecondary || "#7C7C7C")}">${be(e)}</div>`}
1820
+ ${te(e, 84) ? l`<img class="crest logo" alt="" loading="lazy" src=${te(e, 84)} />` : l`<div class="crest" style="background:${e.colorSecondary || "#7C7C7C"};color:${ee(e.colorSecondary || "#7C7C7C")}">${ye(e)}</div>`}
1811
1821
  <div style="min-width:260px">
1812
1822
  <h1>${e.name} <span class="mascot">${e.mascot || ""}</span></h1>
1813
1823
  <div class="facts">
@@ -1835,7 +1845,7 @@ class mt extends w {
1835
1845
  `;
1836
1846
  }
1837
1847
  renderTeam(e, t, s, r) {
1838
- const o = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, n = o.w + o.l + o.t, i = s ? st(this.data.allTeams.filter((h) => h.conferenceId === s.id), t.gender) : [], c = s ? rt(i, e.records).findIndex((h) => h.team.id === t.id) + 1 : 0, p = we(e.rankings, e.teamsById, t.id, t.sport, null), d = this.data.games.filter((h) => h.homeTeamId === t.id || h.awayTeamId === t.id).sort((h, u) => String(h.date).localeCompare(String(u.date)));
1848
+ const o = e.records[t.id] || { w: 0, l: 0, t: 0, cw: 0, cl: 0, ct: 0, pf: 0, pa: 0, results: [] }, n = o.w + o.l + o.t, i = s ? st(this.data.allTeams.filter((h) => h.conferenceId === s.id), t.gender) : [], c = s ? rt(i, e.records).findIndex((h) => h.team.id === t.id) + 1 : 0, p = xe(e.rankings, e.teamsById, t.id, t.sport, null), d = this.data.games.filter((h) => h.homeTeamId === t.id || h.awayTeamId === t.id).sort((h, u) => String(h.date).localeCompare(String(u.date)));
1839
1849
  return l`
1840
1850
  <div class="tiles">
1841
1851
  <div class="tile"><div class="k">Overall</div><div class="v">${S(o)}</div><div class="s">${n} games played</div></div>
@@ -1844,9 +1854,9 @@ class mt extends w {
1844
1854
  <div class="tile"><div class="k">Points</div><div class="v">${n ? (o.pf / n).toFixed(1) : "0.0"}</div>
1845
1855
  <div class="s">scored per game · ${n ? (o.pa / n).toFixed(1) : "0.0"} allowed</div></div>
1846
1856
  <div class="tile"><div class="k">Streak</div><div class="v">${ie(o.results) || "·"}</div>
1847
- <div class="s">last 5: ${ke(e, t.id)}</div></div>
1857
+ <div class="s">last 5: ${Se(e, t.id)}</div></div>
1848
1858
  <div class="tile"><div class="k">HSOT Top 25</div><div class="v">${p ? `#${p}` : "NR"}</div>
1849
- <div class="s"><a href=${g(e.hrefs.section, { sport: t.sport, view: "rankings" })}>full poll</a></div></div>
1859
+ <div class="s"><a href=${v(e.hrefs.section, { sport: t.sport, view: "rankings" })}>full poll</a></div></div>
1850
1860
  </div>
1851
1861
  ${(t.championships || []).length ? l`
1852
1862
  <div style="margin:-0.2rem 0 1rem;display:flex;gap:0.4rem;flex-wrap:wrap">
@@ -1868,7 +1878,7 @@ class mt extends w {
1868
1878
  }
1869
1879
  renderGameRow(e, t, s) {
1870
1880
  const r = s.homeTeamId === t.id, o = r ? s.awayTeamId : s.homeTeamId, n = r ? s.homeScore : s.awayScore, i = r ? s.awayScore : s.homeScore;
1871
- let c = l`<span class="mut">${ve(s.time)}</span>`;
1881
+ let c = l`<span class="mut">${$e(s.time)}</span>`;
1872
1882
  if (s.state === "final") {
1873
1883
  const d = ne(s), h = d === "tie" ? "T" : d === (r ? "home" : "away") ? "W" : "L";
1874
1884
  c = l`<span class=${h}>${h}</span> ${n}-${i}${s.finish === "overtime" ? l` <span class="mut">OT</span>` : m}${s.forfeit && s.forfeit !== "none" ? l` <span class="mut">FF</span>` : m}`;
@@ -1884,7 +1894,7 @@ class mt extends w {
1884
1894
  ${s.broadcast ? l`<span class="pill class">${s.broadcast}</span>` : m}
1885
1895
  </span>
1886
1896
  <span class="where">${s.venue || ""}</span>
1887
- <a class="box" href=${g(e.hrefs.game, { sport: t.sport, id: s.id })}>Box score →</a>
1897
+ <a class="box" href=${v(e.hrefs.game, { sport: t.sport, id: s.id })}>Box score →</a>
1888
1898
  </li>
1889
1899
  `;
1890
1900
  }
@@ -1933,11 +1943,11 @@ const ut = {
1933
1943
  function ft(a) {
1934
1944
  return (ut[a] || ["quarters", 4])[0];
1935
1945
  }
1936
- function Se(a) {
1946
+ function _e(a) {
1937
1947
  return (ut[a] || ["quarters", 4])[1];
1938
1948
  }
1939
1949
  function Ss(a, e) {
1940
- const t = ft(a), s = Se(a);
1950
+ const t = ft(a), s = _e(a);
1941
1951
  if (e <= s || t === "innings" || t === "sets") return String(e);
1942
1952
  const r = e - s;
1943
1953
  return `OT${r > 1 ? r : ""}`;
@@ -1945,7 +1955,7 @@ function Ss(a, e) {
1945
1955
  function _s(a, e) {
1946
1956
  const t = String(a ?? "").trim();
1947
1957
  let s;
1948
- return (s = /^(\d+)Q$/i.exec(t)) || (s = /^(\d+)H$/i.exec(t)) ? Number(s[1]) : /^half$/i.test(t) ? ft(e) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(t)) ? Se(e) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(t)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(t)) || (s = /^set\s*(\d+)$/i.exec(t)) ? Number(s[1]) : null;
1958
+ return (s = /^(\d+)Q$/i.exec(t)) || (s = /^(\d+)H$/i.exec(t)) ? Number(s[1]) : /^half$/i.test(t) ? ft(e) === "halves" ? 1 : 2 : (s = /^(\d*)OT(\d*)$/i.exec(t)) ? _e(e) + Number(s[1] || s[2] || 1) : (s = /^[TB](\d+)$/i.exec(t)) || (s = /^(\d+)(?:st|nd|rd|th)\s*set$/i.exec(t)) || (s = /^set\s*(\d+)$/i.exec(t)) ? Number(s[1]) : null;
1949
1959
  }
1950
1960
  const Z = (a) => Number.isInteger(a) && a >= 0 ? a : null;
1951
1961
  function Ts(a) {
@@ -1953,16 +1963,16 @@ function Ts(a) {
1953
1963
  if (!e.length) return null;
1954
1964
  const t = a.sport, s = /* @__PURE__ */ new Map();
1955
1965
  for (const h of e) {
1956
- const u = _s(h?.period, t), f = Z(h?.homeScore), v = Z(h?.awayScore);
1957
- if (!u || f === null || v === null) return null;
1966
+ const u = _s(h?.period, t), f = Z(h?.homeScore), g = Z(h?.awayScore);
1967
+ if (!u || f === null || g === null) return null;
1958
1968
  const $ = s.get(u) || { home: 0, away: 0 };
1959
- $.home = Math.max($.home, f), $.away = Math.max($.away, v), s.set(u, $);
1969
+ $.home = Math.max($.home, f), $.away = Math.max($.away, g), s.set(u, $);
1960
1970
  }
1961
1971
  const r = Math.max(...s.keys()), o = [];
1962
1972
  let n = !0, i = { home: 0, away: 0 };
1963
1973
  for (let h = 1; h <= r; h += 1) {
1964
- const u = s.get(h) || i, f = u.home - i.home, v = u.away - i.away;
1965
- (f < 0 || v < 0) && (n = !1), o.push({ period: h, home: Math.max(f, 0), away: Math.max(v, 0) }), i = { home: Math.max(u.home, i.home), away: Math.max(u.away, i.away) };
1974
+ const u = s.get(h) || i, f = u.home - i.home, g = u.away - i.away;
1975
+ (f < 0 || g < 0) && (n = !1), o.push({ period: h, home: Math.max(f, 0), away: Math.max(g, 0) }), i = { home: Math.max(u.home, i.home), away: Math.max(u.away, i.away) };
1966
1976
  }
1967
1977
  const c = Z(a.homeScore) ?? 0, p = Z(a.awayScore) ?? 0, d = n && i.home === c && i.away === p;
1968
1978
  return n = n && i.home <= c && i.away <= p, { periods: o, reconciled: d, consistent: n };
@@ -2119,8 +2129,8 @@ class vt extends w {
2119
2129
  ${D(this)}
2120
2130
  ${this.embed ? m : l`
2121
2131
  <p class="breadcrumbs">
2122
- <a href=${g(t.hrefs.section, { sport: e.sport, view: "scores" })}>${k(e.sport)}</a> /
2123
- <a href=${g(t.hrefs.section, { sport: e.sport, view: "scores" })}>Scores/Schedules</a> /
2132
+ <a href=${v(t.hrefs.section, { sport: e.sport, view: "scores" })}>${k(e.sport)}</a> /
2133
+ <a href=${v(t.hrefs.section, { sport: e.sport, view: "scores" })}>Scores/Schedules</a> /
2124
2134
  ${z(t, e.awayTeamId)} at ${z(t, e.homeTeamId)}
2125
2135
  </p>`}
2126
2136
  <div class="card">
@@ -2133,7 +2143,7 @@ class vt extends w {
2133
2143
  <span style=${i("home")}>${e.homeScore}</span>
2134
2144
  </div>
2135
2145
  <div class="status">${V(e)}</div>
2136
- <div class="status">${x(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? l` · ${ve(e.time)}` : m} · ${e.venue || "Venue TBD"}
2146
+ <div class="status">${x(e.date, { weekday: "short", month: "short", day: "numeric", year: "numeric" })}${e.state === "scheduled" && e.time ? l` · ${$e(e.time)}` : m} · ${e.venue || "Venue TBD"}
2137
2147
  ${e.broadcast ? l` · <span class="pill class">${e.broadcast}</span>` : m}</div>
2138
2148
  <div class="status">
2139
2149
  <span class="pill type">${e.gameType === "conference" ? `${c?.name || "Conference"} game` : e.gameType}</span>
@@ -2153,7 +2163,7 @@ class vt extends w {
2153
2163
  </div>
2154
2164
  ${this.embed ? l`
2155
2165
  <p class="fullbox">
2156
- <a href=${g(t.hrefs.game, { sport: e.sport, id: e.id })}>Full box score &rarr;</a>
2166
+ <a href=${v(t.hrefs.game, { sport: e.sport, id: e.id })}>Full box score &rarr;</a>
2157
2167
  </p>` : l`
2158
2168
  ${(this.data.coverage || []).length ? l`
2159
2169
  <div class="section-title">Coverage</div>
@@ -2181,7 +2191,7 @@ class vt extends w {
2181
2191
  ${p.map((d) => l`<li>
2182
2192
  <span class="d">${x(d.date)}</span>${V(d)}
2183
2193
  <span class="opp">${z(t, d.awayTeamId)} ${d.awayScore}, ${z(t, d.homeTeamId)} ${d.homeScore}</span>
2184
- <a class="box" href=${g(t.hrefs.game, { sport: e.sport, id: d.id })}>Box score →</a>
2194
+ <a class="box" href=${v(t.hrefs.game, { sport: e.sport, id: d.id })}>Box score →</a>
2185
2195
  </li>`)}
2186
2196
  </ul></div>` : m}`}
2187
2197
  `)}
@@ -2192,9 +2202,9 @@ class vt extends w {
2192
2202
  const n = e.teamsById[s], i = e.records[s], c = te(r, 58);
2193
2203
  return l`
2194
2204
  <div class="teamblock ${o ? "right" : ""}">
2195
- ${c ? l`<img class="crest logo" alt="" loading="lazy" src=${c} />` : l`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${ee(r.colorPrimary || "#030711")}">${be(r)}</span>`}
2205
+ ${c ? l`<img class="crest logo" alt="" loading="lazy" src=${c} />` : l`<span class="crest" style="background:${r.colorPrimary || "#030711"};color:${ee(r.colorPrimary || "#030711")}">${ye(r)}</span>`}
2196
2206
  <div>
2197
- <div class="tname">${xe(e, s, t.date)}<a href=${g(e.hrefs.school, { id: r.id })}>${r.name}</a></div>
2207
+ <div class="tname">${ke(e, s, t.date)}<a href=${v(e.hrefs.school, { id: r.id })}>${r.name}</a></div>
2198
2208
  <div class="trec">${r.mascot || ""} · ${S(i)}${n?.conferenceId ? l` · ${S(i, !0)} conf` : m}</div>
2199
2209
  </div>
2200
2210
  </div>
@@ -2204,7 +2214,7 @@ class vt extends w {
2204
2214
  const r = As(e);
2205
2215
  if (!r)
2206
2216
  return e.state === "scheduled" ? l`<p class="empty" style="text-align:center">Period scoring will appear once the game starts.</p>` : m;
2207
- const o = Math.max(Se(e.sport), ...r.map((p) => p.period)), n = (p) => Ss(e.sport, p), i = (p, d) => {
2217
+ const o = Math.max(_e(e.sport), ...r.map((p) => p.period)), n = (p) => Ss(e.sport, p), i = (p, d) => {
2208
2218
  const h = r.find((u) => u.period === d);
2209
2219
  return h ? h[p] : e.state === "final" ? 0 : "·";
2210
2220
  }, c = (p, d, h) => l`
@@ -2253,12 +2263,12 @@ class vt extends w {
2253
2263
  }
2254
2264
  renderContext(e, t, s) {
2255
2265
  if (!s) return m;
2256
- const r = e.records[t], o = ye(this.data.games, t);
2266
+ const r = e.records[t], o = we(this.data.games, t);
2257
2267
  return l`
2258
2268
  <div class="card ctxcard">
2259
2269
  <div class="who">${P(s)}${s.name}</div>
2260
2270
  <div class="row">
2261
- <span>Last 5: ${ke(e, t)}</span>
2271
+ <span>Last 5: ${Se(e, t)}</span>
2262
2272
  <span>Streak: <b>${r ? ie(r.results) : "·"}</b></span>
2263
2273
  <span>PF/PA: <b>${r ? `${r.pf} / ${r.pa}` : "·"}</b></span>
2264
2274
  <span>Next: ${o ? l`${x(o.date, { month: "numeric", day: "numeric" })}
@@ -2516,7 +2526,7 @@ function Hs(a, e, t) {
2516
2526
  let d = [...o.get(p)];
2517
2527
  if (c) {
2518
2528
  const h = (u) => {
2519
- const f = (n.get(u.id) || []).map((v) => c.get(v)).filter((v) => v !== void 0);
2529
+ const f = (n.get(u.id) || []).map((g) => c.get(g)).filter((g) => g !== void 0);
2520
2530
  return f.length ? Math.min(...f) : 1 / 0;
2521
2531
  };
2522
2532
  d.sort((u, f) => h(u) - h(f) || Ge(u, f));
@@ -2710,7 +2720,7 @@ class xt extends w {
2710
2720
  ${V(t)}
2711
2721
  ${t.label ? l`<span class="label">${t.label}</span>` : m}
2712
2722
  <span class="spacer"></span>
2713
- ${s ? l`<a class="box" href=${g(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score</a>` : m}
2723
+ ${s ? l`<a class="box" href=${v(e.hrefs.game, { sport: this.sport, id: t.id })}>Box score</a>` : m}
2714
2724
  </footer>
2715
2725
  </article>
2716
2726
  `;