@banou/stub 0.0.50 → 0.0.52

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/build/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { a as e, i as t, n, r, t as i } from "./assets/lib-rolldown-runtime-Cb76FRpK.js";
3
3
  import { _ as a } from "./assets/lib-api-DIgTslNb-Dy8pDGuW.js";
4
4
  import { r as o } from "./assets/lib-account-D3OycIgO.js";
5
- import { A as s, B as c, C as l, D as u, E as d, F as f, G as p, H as m, I as h, K as g, L as _, M as v, N as y, O as b, P as x, R as S, S as C, T as w, U as T, V as E, W as D, _ as O, a as k, b as A, c as j, f as M, g as ee, h as N, i as te, j as ne, k as re, l as ie, m as P, n as ae, o as oe, p as se, r as ce, s as le, t as ue, v as de, w as fe, x as pe, y as me, z as he } from "./assets/lib-worker-ClrG_6Et.js";
5
+ import { A as s, B as c, C as l, D as u, E as d, F as f, G as p, H as m, I as h, K as g, L as _, M as v, N as y, O as b, P as x, R as S, S as C, T as w, U as T, V as E, W as D, _ as O, a as k, b as A, c as j, f as M, g as ee, h as N, i as te, j as ne, k as re, l as ie, m as P, n as ae, o as oe, p as se, r as ce, s as le, t as ue, v as de, w as fe, x as pe, y as me, z as he } from "./assets/lib-worker-fbrqP6pm.js";
6
6
  //#region node_modules/preact/dist/preact.mjs
7
7
  function ge(e) {
8
8
  e && e.parentNode && e.remove();
@@ -5910,6 +5910,20 @@ var tu = (e, t) => t.toLowerCase().indexOf(e.toLowerCase()) ? "~" + t : t.slice(
5910
5910
  value: "categories"
5911
5911
  }
5912
5912
  },
5913
+ {
5914
+ kind: "Field",
5915
+ name: {
5916
+ kind: "Name",
5917
+ value: "startDate"
5918
+ }
5919
+ },
5920
+ {
5921
+ kind: "Field",
5922
+ name: {
5923
+ kind: "Name",
5924
+ value: "genres"
5925
+ }
5926
+ },
5913
5927
  {
5914
5928
  kind: "Field",
5915
5929
  name: {
@@ -6180,6 +6194,13 @@ var tu = (e, t) => t.toLowerCase().indexOf(e.toLowerCase()) ? "~" + t : t.slice(
6180
6194
  value: "releaseDate"
6181
6195
  }
6182
6196
  },
6197
+ {
6198
+ kind: "Field",
6199
+ name: {
6200
+ kind: "Name",
6201
+ value: "runtime"
6202
+ }
6203
+ },
6183
6204
  {
6184
6205
  kind: "Field",
6185
6206
  name: {
@@ -12773,14 +12794,14 @@ var Xv = H`
12773
12794
  }),
12774
12795
  /* @__PURE__ */ X("span", {
12775
12796
  className: "version",
12776
- title: "stub v0.0.50, commit 9098dbc",
12797
+ title: "stub v0.0.52, commit 4bae3cc",
12777
12798
  children: [
12778
12799
  "v",
12779
- "0.0.50",
12800
+ "0.0.52",
12780
12801
  " ",
12781
12802
  /* @__PURE__ */ Y("span", {
12782
12803
  className: "commit",
12783
- children: "9098dbc"
12804
+ children: "4bae3cc"
12784
12805
  })
12785
12806
  ]
12786
12807
  })
@@ -12970,7 +12991,7 @@ var ey = H`
12970
12991
  "\n subscription StubTrackerStorage {\n stubTrackerStorage {\n location\n signedIn\n locked\n waiting\n held\n error\n }\n }\n": Wu,
12971
12992
  "\n mutation AddHeldStubEntries {\n addHeldStubEntries {\n location\n signedIn\n locked\n waiting\n held\n error\n }\n }\n": Gu,
12972
12993
  "\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n": Ku,
12973
- "\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n": qu,
12994
+ "\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n startDate\n genres\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n runtime\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n": qu,
12974
12995
  "\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n": Ju,
12975
12996
  "\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n": Yu,
12976
12997
  "\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n": Xu,
@@ -14565,7 +14586,7 @@ transition: max-height 0.3s ease-in-out;
14565
14586
  }) : void 0
14566
14587
  ]
14567
14588
  });
14568
- }, db = "this build of the worker exposes no traceGraph, so there is nothing to read a trace from", fb = async () => await import("./assets/lib-worker-B4bhXBRt.js"), pb = async (e) => {
14589
+ }, db = "this build of the worker exposes no traceGraph, so there is nothing to read a trace from", fb = async () => await import("./assets/lib-worker-CvSIFpg3.js"), pb = async (e) => {
14569
14590
  let t = await fb();
14570
14591
  if (typeof t.traceGraph != "function") throw Error(db);
14571
14592
  return t.traceGraph(e);
@@ -23821,6 +23842,10 @@ var fF = {
23821
23842
  /* the width "Plan to watch" gave it, so offering Remove from list never widens it and wraps the row */
23822
23843
  select { width: 14rem; }
23823
23844
 
23845
+ button.watched svg { opacity: 0.35; }
23846
+ button.watched.on { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.12); color: #4ade80; }
23847
+ button.watched.on svg { opacity: 1; }
23848
+
23824
23849
  .progress-field {
23825
23850
  input {
23826
23851
  width: 4.4ch;
@@ -23943,15 +23968,17 @@ var fF = {
23943
23968
  src: e.tracker.icon,
23944
23969
  alt: ""
23945
23970
  }) : e.tracker.name.slice(0, 1)
23946
- }), xF = ({ name: e, shown: t, scale: n, mixed: r, disabled: i, disabledTitle: a, listed: o, removable: s, onChange: c, dots: l = {} }) => {
23947
- let [u, d] = I(), f = R(void 0), p = R(() => {}), m = t.total, h = () => {
23948
- if (clearTimeout(f.current), u === void 0) return;
23949
- let e = Number(u);
23950
- if (d(void 0), u.trim() === "" || !Number.isFinite(e)) return;
23951
- let n = Math.max(0, Math.min(m ?? Infinity, Math.floor(e)));
23971
+ }), xF = ({ name: e, shown: t, scale: n, mixed: r, disabled: i, disabledTitle: a, listed: o, removable: s, onChange: c, dots: l = {}, movie: u = !1 }) => {
23972
+ let [d, f] = I(), p = R(void 0), m = R(() => {}), h = t.total, g = () => {
23973
+ if (clearTimeout(p.current), d === void 0) return;
23974
+ let e = Number(d);
23975
+ if (f(void 0), d.trim() === "" || !Number.isFinite(e)) return;
23976
+ let n = Math.max(0, Math.min(h ?? Infinity, Math.floor(e)));
23952
23977
  n !== t.progress && c({ progress: n }, !0);
23953
23978
  };
23954
- return p.current = h, /* @__PURE__ */ X("div", {
23979
+ m.current = g;
23980
+ let _ = t.status === "COMPLETED" || t.progress >= (h ?? 1);
23981
+ return /* @__PURE__ */ X("div", {
23955
23982
  className: "group edit",
23956
23983
  children: [
23957
23984
  /* @__PURE__ */ Y(dF, {
@@ -23989,7 +24016,23 @@ var fF = {
23989
24016
  ]
23990
24017
  }),
23991
24018
  l.STATUS,
23992
- /* @__PURE__ */ X("span", {
24019
+ u ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("button", {
24020
+ type: "button",
24021
+ className: `watched${_ ? " on" : ""}`,
24022
+ "aria-pressed": _,
24023
+ disabled: i,
24024
+ onClick: () => c(_ ? {
24025
+ progress: 0,
24026
+ ...t.status === "COMPLETED" ? { status: "PLANNING" } : {}
24027
+ } : {
24028
+ progress: h ?? 1,
24029
+ status: "COMPLETED"
24030
+ }, !0),
24031
+ children: [/* @__PURE__ */ Y(cf, {
24032
+ size: 14,
24033
+ "aria-hidden": "true"
24034
+ }), "Watched"]
24035
+ }), l.PROGRESS] }) : /* @__PURE__ */ X("span", {
23993
24036
  className: "progress-field",
23994
24037
  children: [
23995
24038
  /* @__PURE__ */ Y("label", {
@@ -24003,27 +24046,27 @@ var fF = {
24003
24046
  inputMode: "numeric",
24004
24047
  name: `${e}-progress`,
24005
24048
  min: 0,
24006
- max: m ?? void 0,
24049
+ max: h ?? void 0,
24007
24050
  disabled: i,
24008
- value: u ?? t.progress,
24051
+ value: d ?? t.progress,
24009
24052
  onInput: (e) => {
24010
- d(e.currentTarget.value), clearTimeout(f.current), f.current = setTimeout(() => p.current(), 1e3);
24053
+ f(e.currentTarget.value), clearTimeout(p.current), p.current = setTimeout(() => m.current(), 1e3);
24011
24054
  },
24012
- onBlur: h,
24055
+ onBlur: g,
24013
24056
  onKeyDown: (e) => {
24014
- e.key === "Enter" && h(), e.key === "Escape" && (clearTimeout(f.current), d(void 0), e.stopPropagation());
24057
+ e.key === "Enter" && g(), e.key === "Escape" && (clearTimeout(p.current), f(void 0), e.stopPropagation());
24015
24058
  }
24016
24059
  }),
24017
- m ? /* @__PURE__ */ X("span", {
24060
+ h ? /* @__PURE__ */ X("span", {
24018
24061
  className: "of",
24019
- children: ["/ ", m]
24062
+ children: ["/ ", h]
24020
24063
  }) : void 0,
24021
24064
  l.PROGRESS,
24022
24065
  /* @__PURE__ */ Y("button", {
24023
24066
  type: "button",
24024
24067
  className: "more",
24025
24068
  "aria-label": "One episode more",
24026
- disabled: i || m != null && t.progress >= m,
24069
+ disabled: i || h != null && t.progress >= h,
24027
24070
  onClick: () => c({ progress: t.progress + 1 }, !1),
24028
24071
  children: /* @__PURE__ */ Y(Ef, {
24029
24072
  size: 14,
@@ -24032,19 +24075,19 @@ var fF = {
24032
24075
  })
24033
24076
  ]
24034
24077
  }),
24035
- !i && m && t.progress === m && t.status !== "COMPLETED" ? /* @__PURE__ */ Y("button", {
24078
+ !u && !i && h && t.progress === h && t.status !== "COMPLETED" ? /* @__PURE__ */ Y("button", {
24036
24079
  type: "button",
24037
24080
  onClick: () => c({ status: "COMPLETED" }, !0),
24038
24081
  children: "Mark completed"
24039
24082
  }) : void 0,
24040
- !i && m && t.status === "COMPLETED" && t.progress < m ? /* @__PURE__ */ X("button", {
24083
+ !u && !i && h && t.status === "COMPLETED" && t.progress < h ? /* @__PURE__ */ X("button", {
24041
24084
  type: "button",
24042
- onClick: () => c({ progress: m }, !0),
24085
+ onClick: () => c({ progress: h }, !0),
24043
24086
  children: [
24044
24087
  "Set ",
24045
- m,
24088
+ h,
24046
24089
  " / ",
24047
- m
24090
+ h
24048
24091
  ]
24049
24092
  }) : void 0
24050
24093
  ]
@@ -24103,125 +24146,125 @@ var fF = {
24103
24146
  }) : void 0
24104
24147
  ]
24105
24148
  });
24106
- }, CF = ({ tracking: e, episodeCount: t, onSaveFields: n, onRemove: r, signIns: i = {}, prefs: a, onPrefs: o }) => {
24107
- let [, s] = I(0), [c, l] = I({}), [u, d] = I(""), [f, p] = I(/* @__PURE__ */ new Set()), [m, h] = I({}), [g, _] = I(), v = R({
24108
- onSaveFields: n,
24109
- onRemove: r,
24149
+ }, CF = ({ tracking: e, episodeCount: t, movie: n = !1, onSaveFields: r, onRemove: i, signIns: a = {}, prefs: o, onPrefs: s }) => {
24150
+ let [, c] = I(0), [l, u] = I({}), [d, f] = I(""), [p, m] = I(/* @__PURE__ */ new Set()), [h, g] = I({}), [_, v] = I(), y = R({
24151
+ onSaveFields: r,
24152
+ onRemove: i,
24110
24153
  tracking: e
24111
24154
  });
24112
- v.current = {
24113
- onSaveFields: n,
24114
- onRemove: r,
24155
+ y.current = {
24156
+ onSaveFields: r,
24157
+ onRemove: i,
24115
24158
  tracking: e
24116
24159
  };
24117
- let y = z(() => iF({
24160
+ let b = z(() => iF({
24118
24161
  send: async (e, t) => {
24119
- let n = await (t.remove ? v.current.onRemove([e]) : v.current.onSaveFields([e], t));
24162
+ let n = await (t.remove ? y.current.onRemove([e]) : y.current.onSaveFields([e], t));
24120
24163
  return n.find((t) => t.tracker === e) ?? n[0] ?? {
24121
24164
  outcome: "FAILED",
24122
24165
  error: "The write did not reach the trackers"
24123
24166
  };
24124
24167
  },
24125
24168
  onChange: (e) => {
24126
- if (s((e) => e + 1), !e) return;
24127
- let t = v.current.tracking?.answers.find((t) => t.tracker.id === e.tracker)?.tracker.name ?? e.tracker, n = e.outcome === "SAVED" || e.outcome === "QUEUED";
24128
- d(n ? `${e.fields.remove ? "Removed from" : "Saved to"} ${t}` : `${t} did not save: ${e.error ?? e.outcome.toLowerCase()}`), !n && y.idle() && l({});
24169
+ if (c((e) => e + 1), !e) return;
24170
+ let t = y.current.tracking?.answers.find((t) => t.tracker.id === e.tracker)?.tracker.name ?? e.tracker, n = e.outcome === "SAVED" || e.outcome === "QUEUED";
24171
+ f(n ? `${e.fields.remove ? "Removed from" : "Saved to"} ${t}` : `${t} did not save: ${e.error ?? e.outcome.toLowerCase()}`), !n && b.idle() && u({});
24129
24172
  }
24130
24173
  }), []);
24131
24174
  L(() => {
24132
24175
  let e = () => {
24133
- document.visibilityState === "hidden" && y.flush();
24176
+ document.visibilityState === "hidden" && b.flush();
24134
24177
  };
24135
24178
  return document.addEventListener("visibilitychange", e), () => {
24136
- document.removeEventListener("visibilitychange", e), y.flush();
24179
+ document.removeEventListener("visibilitychange", e), b.flush();
24137
24180
  };
24138
24181
  }, []);
24139
- let b = KP(e, t), x = (t) => {
24182
+ let x = KP(e, t), S = (t) => {
24140
24183
  let n = e?.answers.find((e) => e.tracker.id === t);
24141
- return n && JP(n, b.total);
24184
+ return n && JP(n, x.total);
24142
24185
  };
24143
24186
  if (L(() => {
24144
- l((e) => y.idle() ? {} : Object.fromEntries(Object.entries(e).flatMap(([e, t]) => {
24145
- let n = e === vF ? b : x(e);
24187
+ u((e) => b.idle() ? {} : Object.fromEntries(Object.entries(e).flatMap(([e, t]) => {
24188
+ let n = e === vF ? x : S(e);
24146
24189
  return n ? [[e, XP(t, n)]] : [];
24147
24190
  })));
24148
24191
  }, [e]), !e?.answers.length) return null;
24149
- let S = YP(b, c[vF]), C = e.answers, w = C.map((e) => ({
24192
+ let C = YP(x, l[vF]), w = e.answers, T = w.map((e) => ({
24150
24193
  answer: e,
24151
- target: ZP(e, a.targets[e.tracker.id])
24152
- })), T = w.filter(({ target: e }) => e.kind === "check" && e.sendable).map(({ answer: e }) => e), E = !T.length, D = tF(T.map((e) => e.tracker.scoreScale)), O = (e, t) => {
24153
- t.remove || l((n) => ({
24194
+ target: ZP(e, o.targets[e.tracker.id])
24195
+ })), E = T.filter(({ target: e }) => e.kind === "check" && e.sendable).map(({ answer: e }) => e), D = !E.length, O = tF(E.map((e) => e.tracker.scoreScale)), k = (e, t) => {
24196
+ t.remove || u((n) => ({
24154
24197
  ...n,
24155
24198
  [e]: {
24156
24199
  ...n[e],
24157
24200
  ...t
24158
24201
  }
24159
24202
  }));
24160
- }, k = (e, t) => {
24161
- O(vF, e);
24203
+ }, A = (e, t) => {
24204
+ k(vF, e);
24162
24205
  let n = {
24163
- ...S,
24206
+ ...C,
24164
24207
  ...e
24165
24208
  }, r = {};
24166
- for (let { answer: t, target: i } of w) {
24209
+ for (let { answer: t, target: i } of T) {
24167
24210
  if (i.kind !== "check" || !i.checked) continue;
24168
24211
  let a = t.tracker.id;
24169
24212
  if (!GP(t)) {
24170
- y.fail(a, e, gF(t));
24213
+ b.fail(a, e, gF(t));
24171
24214
  continue;
24172
24215
  }
24173
24216
  let o = $P(t, e, n);
24174
24217
  o && (r[a] = o);
24175
24218
  }
24176
- y.stage(r, t);
24177
- }, A = (e, t, n) => {
24178
- let r = e.tracker.id, i = YP(JP(e, b.total), c[r]);
24179
- O(r, t);
24219
+ b.stage(r, t);
24220
+ }, j = (e, t, n) => {
24221
+ let r = e.tracker.id, i = YP(JP(e, x.total), l[r]);
24222
+ k(r, t);
24180
24223
  let a = $P(e, t, {
24181
24224
  ...i,
24182
24225
  ...t
24183
24226
  });
24184
- a && y.stage({ [r]: a }, n, !0);
24185
- }, j = (e) => {
24186
- let t = y.state(e.tracker.id);
24227
+ a && b.stage({ [r]: a }, n, !0);
24228
+ }, M = (e) => {
24229
+ let t = b.state(e.tracker.id);
24187
24230
  return t.failed?.fields.remove && e.state === "NOT_LISTED" ? {
24188
24231
  ...t,
24189
24232
  failed: void 0
24190
24233
  } : t;
24191
- }, M = (e, t) => {
24192
- t || y.drop(e), o({
24193
- ...a,
24234
+ }, ee = (e, t) => {
24235
+ t || b.drop(e), s({
24236
+ ...o,
24194
24237
  targets: {
24195
- ...a.targets,
24238
+ ...o.targets,
24196
24239
  [e]: t
24197
24240
  }
24198
24241
  });
24199
- }, ee = (e) => {
24200
- let t = i[e.tracker.id], n = e.tracker.id;
24201
- if (!t || f.has(n)) return;
24242
+ }, N = (e) => {
24243
+ let t = a[e.tracker.id], n = e.tracker.id;
24244
+ if (!t || p.has(n)) return;
24202
24245
  let r = t();
24203
- p((e) => new Set(e).add(n)), h(({ [n]: e, ...t }) => t), r.then((t) => fF[t]?.(e.tracker.name), (e) => e instanceof Error ? e.message : String(e)).then((e) => {
24204
- e && h((t) => ({
24246
+ m((e) => new Set(e).add(n)), g(({ [n]: e, ...t }) => t), r.then((t) => fF[t]?.(e.tracker.name), (e) => e instanceof Error ? e.message : String(e)).then((e) => {
24247
+ e && g((t) => ({
24205
24248
  ...t,
24206
24249
  [n]: e
24207
- })), p((e) => {
24250
+ })), m((e) => {
24208
24251
  let t = new Set(e);
24209
24252
  return t.delete(n), t;
24210
24253
  });
24211
24254
  });
24212
- }, N = (e, t) => /* @__PURE__ */ Y("button", {
24255
+ }, te = (e, t) => /* @__PURE__ */ Y("button", {
24213
24256
  type: "button",
24214
24257
  className: t,
24215
24258
  "aria-label": `Log in to ${e.tracker.name}`,
24216
- disabled: !i[e.tracker.id] || f.has(e.tracker.id),
24217
- onClick: () => ee(e),
24218
- children: f.has(e.tracker.id) ? "Logging in" : "Log in"
24219
- }), te = (e) => `${e.tracker.name} counts ${JP(e, b.total).total} episodes, so the row leaves its progress alone`, ne = (e, t) => {
24220
- let n = e.tracker.id, r = e.tracker.name, i = /* @__PURE__ */ X("div", {
24259
+ disabled: !a[e.tracker.id] || p.has(e.tracker.id),
24260
+ onClick: () => N(e),
24261
+ children: p.has(e.tracker.id) ? "Logging in" : "Log in"
24262
+ }), ne = (e) => `${e.tracker.name} counts ${JP(e, x.total).total} episodes, so the row leaves its progress alone`, re = (e, t) => {
24263
+ let r = e.tracker.id, i = e.tracker.name, a = /* @__PURE__ */ X("div", {
24221
24264
  className: "head",
24222
24265
  children: [
24223
24266
  /* @__PURE__ */ Y(bF, { answer: e }),
24224
- r,
24267
+ i,
24225
24268
  e.tracker.account ? /* @__PURE__ */ Y("span", {
24226
24269
  className: "account",
24227
24270
  children: e.tracker.account
@@ -24229,36 +24272,37 @@ var fF = {
24229
24272
  ]
24230
24273
  });
24231
24274
  if (t.kind === "login") return /* @__PURE__ */ X(J, { children: [
24232
- i,
24275
+ a,
24233
24276
  /* @__PURE__ */ Y("span", {
24234
24277
  className: "why",
24235
24278
  children: "Signed out"
24236
24279
  }),
24237
- N(e)
24280
+ te(e)
24238
24281
  ] });
24239
- if (t.kind === "cannot") return /* @__PURE__ */ X(J, { children: [i, /* @__PURE__ */ X("span", {
24282
+ if (t.kind === "cannot") return /* @__PURE__ */ X(J, { children: [a, /* @__PURE__ */ X("span", {
24240
24283
  className: "why",
24241
24284
  children: [
24242
- r,
24285
+ i,
24243
24286
  " cannot track this media: ",
24244
24287
  t.reason
24245
24288
  ]
24246
24289
  })] });
24247
- let a = GP(e), o = JP(e, b.total), s = tF([e.tracker.scoreScale]);
24290
+ let o = GP(e), s = JP(e, x.total), c = tF([e.tracker.scoreScale]);
24248
24291
  return /* @__PURE__ */ X(J, { children: [
24249
- i,
24292
+ a,
24250
24293
  /* @__PURE__ */ Y(xF, {
24251
- name: `card-${n}`,
24252
- shown: YP(o, c[n]),
24253
- scale: s.scale,
24294
+ name: `card-${r}`,
24295
+ movie: n,
24296
+ shown: YP(s, l[r]),
24297
+ scale: c.scale,
24254
24298
  mixed: !1,
24255
- disabled: !a,
24299
+ disabled: !o,
24256
24300
  disabledTitle: gF(e),
24257
24301
  listed: e.state === "LISTED",
24258
- removable: a && e.state === "LISTED",
24259
- onChange: (t, n) => A(e, t, n)
24302
+ removable: o && e.state === "LISTED",
24303
+ onChange: (t, n) => j(e, t, n)
24260
24304
  }),
24261
- a ? void 0 : /* @__PURE__ */ Y("span", {
24305
+ o ? void 0 : /* @__PURE__ */ Y("span", {
24262
24306
  className: "why",
24263
24307
  children: gF(e)
24264
24308
  }),
@@ -24266,15 +24310,15 @@ var fF = {
24266
24310
  className: "why",
24267
24311
  children: e.tracker.writeNotice
24268
24312
  }) : void 0,
24269
- QP(e, b.total) ? /* @__PURE__ */ X("span", {
24313
+ QP(e, x.total) ? /* @__PURE__ */ X("span", {
24270
24314
  className: "why",
24271
- children: [te(e), ": set it here."]
24315
+ children: [ne(e), ": set it here."]
24272
24316
  }) : void 0
24273
24317
  ] });
24274
- }, re = (e) => C.filter((e) => e.state === "LISTED").map((t) => `${t.tracker.name} ${e(t) ?? "none"}`).join(", "), ie = (e, t) => b.differs.includes(e) ? /* @__PURE__ */ Y("span", {
24318
+ }, ie = (e) => w.filter((e) => e.state === "LISTED").map((t) => `${t.tracker.name} ${e(t) ?? "none"}`).join(", "), P = (e, t) => x.differs.includes(e) ? /* @__PURE__ */ Y("span", {
24275
24319
  className: "differs",
24276
24320
  "data-differs": e,
24277
- title: re(t)
24321
+ title: ie(t)
24278
24322
  }) : void 0;
24279
24323
  return /* @__PURE__ */ X("section", {
24280
24324
  css: pF,
@@ -24285,32 +24329,33 @@ var fF = {
24285
24329
  className: "row",
24286
24330
  children: [/* @__PURE__ */ Y(xF, {
24287
24331
  name: "compact",
24288
- shown: S,
24289
- scale: D?.scale ?? "POINT_100",
24290
- mixed: D?.mixed ?? !1,
24291
- disabled: E,
24332
+ movie: n,
24333
+ shown: C,
24334
+ scale: O?.scale ?? "POINT_100",
24335
+ mixed: O?.mixed ?? !1,
24336
+ disabled: D,
24292
24337
  disabledTitle: "Check a list to save to",
24293
- listed: C.some((e) => e.state === "LISTED"),
24294
- removable: T.some((e) => e.state === "LISTED"),
24295
- onChange: k,
24338
+ listed: w.some((e) => e.state === "LISTED"),
24339
+ removable: E.some((e) => e.state === "LISTED"),
24340
+ onChange: A,
24296
24341
  dots: {
24297
- SCORE: ie("SCORE", (e) => qo(e.entry?.score) ? hF(e.entry.score, e.tracker.scoreScale) : void 0),
24298
- STATUS: ie("STATUS", (e) => e.entry?.status ? UP[e.entry.status] : void 0),
24299
- PROGRESS: ie("PROGRESS", (e) => e.entry?.progress == null ? void 0 : String(e.entry.progress))
24342
+ SCORE: P("SCORE", (e) => qo(e.entry?.score) ? hF(e.entry.score, e.tracker.scoreScale) : void 0),
24343
+ STATUS: P("STATUS", (e) => e.entry?.status ? UP[e.entry.status] : void 0),
24344
+ PROGRESS: P("PROGRESS", (e) => e.entry?.progress == null ? void 0 : String(e.entry.progress))
24300
24345
  }
24301
24346
  }), /* @__PURE__ */ Y("div", {
24302
24347
  className: "group platforms",
24303
- children: w.map(({ answer: e, target: t }) => {
24348
+ children: T.map(({ answer: e, target: t }) => {
24304
24349
  let n = e.tracker.id, r = e.tracker.name, i = {
24305
24350
  answer: e,
24306
- open: g === n,
24307
- onOpen: (e) => _((t) => e ? n : t === n ? void 0 : t),
24308
- card: () => ne(e, t)
24351
+ open: _ === n,
24352
+ onOpen: (e) => v((t) => e ? n : t === n ? void 0 : t),
24353
+ card: () => re(e, t)
24309
24354
  };
24310
24355
  if (t.kind === "login") return /* @__PURE__ */ Y(SF, {
24311
24356
  ...i,
24312
24357
  className: "chip login",
24313
- children: N(e, "login-button")
24358
+ children: te(e, "login-button")
24314
24359
  }, n);
24315
24360
  if (t.kind === "cannot") return /* @__PURE__ */ Y(SF, {
24316
24361
  ...i,
@@ -24325,7 +24370,7 @@ var fF = {
24325
24370
  })
24326
24371
  })
24327
24372
  }, n);
24328
- let { busy: a, failed: o } = j(e), s = e.state === "PAUSED" || e.state === "ERROR" ? gF(e) : void 0;
24373
+ let { busy: a, failed: o } = M(e), s = e.state === "PAUSED" || e.state === "ERROR" ? gF(e) : void 0;
24329
24374
  return /* @__PURE__ */ X(SF, {
24330
24375
  ...i,
24331
24376
  className: `chip${t.checked ? "" : " off"}`,
@@ -24338,7 +24383,7 @@ var fF = {
24338
24383
  "aria-label": `Save to ${r}`,
24339
24384
  "aria-describedby": s ? `compact-hint-${n}` : void 0,
24340
24385
  checked: t.checked,
24341
- onChange: (e) => M(n, e.currentTarget.checked)
24386
+ onChange: (e) => ee(n, e.currentTarget.checked)
24342
24387
  }), /* @__PURE__ */ Y("span", {
24343
24388
  className: "slot",
24344
24389
  children: a ? /* @__PURE__ */ Y(vf, {
@@ -24372,13 +24417,13 @@ var fF = {
24372
24417
  }),
24373
24418
  /* @__PURE__ */ Y("div", {
24374
24419
  className: "notes",
24375
- children: w.flatMap(({ answer: e, target: t }) => {
24376
- let n = e.tracker.id, r = e.tracker.name, { failed: i, refused: a } = j(e);
24420
+ children: T.flatMap(({ answer: e, target: t }) => {
24421
+ let n = e.tracker.id, r = e.tracker.name, { failed: i, refused: a } = M(e);
24377
24422
  return [
24378
- m[n] && e.state === "SIGNED_OUT" ? /* @__PURE__ */ Y("div", {
24423
+ h[n] && e.state === "SIGNED_OUT" ? /* @__PURE__ */ Y("div", {
24379
24424
  className: "note",
24380
24425
  "data-note": n,
24381
- children: m[n]
24426
+ children: h[n]
24382
24427
  }, `${n}-sign-in`) : void 0,
24383
24428
  i ? /* @__PURE__ */ X("div", {
24384
24429
  className: "note problem",
@@ -24392,7 +24437,7 @@ var fF = {
24392
24437
  /* @__PURE__ */ Y("button", {
24393
24438
  type: "button",
24394
24439
  disabled: !GP(e),
24395
- onClick: () => y.retry(n),
24440
+ onClick: () => b.retry(n),
24396
24441
  children: "Retry"
24397
24442
  })
24398
24443
  ]
@@ -24406,16 +24451,16 @@ var fF = {
24406
24451
  a,
24407
24452
  /* @__PURE__ */ Y("button", {
24408
24453
  type: "button",
24409
- onClick: () => y.dismiss(n),
24454
+ onClick: () => b.dismiss(n),
24410
24455
  children: "Dismiss"
24411
24456
  })
24412
24457
  ]
24413
24458
  }, `${n}-refused`) : void 0,
24414
- t.kind === "check" && t.sendable && QP(e, b.total) ? /* @__PURE__ */ X("div", {
24459
+ t.kind === "check" && t.sendable && QP(e, x.total) ? /* @__PURE__ */ X("div", {
24415
24460
  className: "note",
24416
24461
  "data-note": n,
24417
24462
  children: [
24418
- te(e),
24463
+ ne(e),
24419
24464
  ": set it on ",
24420
24465
  r,
24421
24466
  "'s card, from its logo."
@@ -24427,7 +24472,7 @@ var fF = {
24427
24472
  /* @__PURE__ */ Y("div", {
24428
24473
  className: "sr-only",
24429
24474
  role: "status",
24430
- children: u
24475
+ children: d
24431
24476
  })
24432
24477
  ]
24433
24478
  });
@@ -24439,24 +24484,25 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24439
24484
  tracker: "",
24440
24485
  outcome: "FAILED",
24441
24486
  error: e ?? "The write did not reach the trackers"
24442
- }], jF = ({ uri: e, title: t, cover: n, episodeCount: r, prefsStore: i = kF }) => {
24443
- let [{ data: a }] = Ho({
24487
+ }], jF = ({ uri: e, title: t, cover: n, episodeCount: r, movie: i, prefsStore: a = kF }) => {
24488
+ let [{ data: o }] = Ho({
24444
24489
  query: wF,
24445
24490
  variables: { input: { uri: e } },
24446
24491
  pause: !e
24447
- }), [, o] = Bo(TF), [, s] = Bo(EF), [{ data: c }] = Ho({ query: DF }), [, u] = Bo(OF), [f, p] = I(i.read), m = a?.tracking?.answers;
24492
+ }), [, s] = Bo(TF), [, c] = Bo(EF), [{ data: u }] = Ho({ query: DF }), [, f] = Bo(OF), [p, m] = I(a.read), h = o?.tracking?.answers;
24448
24493
  return L(() => {
24449
- m && d(m, b, pe);
24450
- }, [m]), L(() => {
24494
+ h && d(h, b, pe);
24495
+ }, [h]), L(() => {
24451
24496
  let e = (e) => {
24452
- e.key === "stub.tracking.compact" && p(i.read());
24497
+ e.key === "stub.tracking.compact" && m(a.read());
24453
24498
  };
24454
24499
  return globalThis.addEventListener?.("storage", e), () => globalThis.removeEventListener?.("storage", e);
24455
- }, [i]), /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(CF, {
24456
- tracking: a?.tracking,
24500
+ }, [a]), /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(CF, {
24501
+ tracking: o?.tracking,
24457
24502
  episodeCount: r,
24503
+ movie: i,
24458
24504
  onSaveFields: async (i, a) => {
24459
- let s = await o({ input: {
24505
+ let o = await s({ input: {
24460
24506
  uri: e,
24461
24507
  trackers: i,
24462
24508
  entry: a,
@@ -24464,26 +24510,26 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24464
24510
  cover: n ?? null,
24465
24511
  episodeCount: r ?? null
24466
24512
  } });
24467
- return s.data?.saveListEntry ?? AF(s.error?.message);
24513
+ return o.data?.saveListEntry ?? AF(o.error?.message);
24468
24514
  },
24469
24515
  onRemove: async (t) => {
24470
- let n = await s({ input: {
24516
+ let n = await c({ input: {
24471
24517
  uri: e,
24472
24518
  trackers: t
24473
24519
  } });
24474
24520
  return n.data?.deleteListEntry ?? AF(n.error?.message);
24475
24521
  },
24476
24522
  signIns: l,
24477
- prefs: f,
24523
+ prefs: p,
24478
24524
  onPrefs: (e) => {
24479
- i.write(e), p(e);
24525
+ a.write(e), m(e);
24480
24526
  }
24481
24527
  }), /* @__PURE__ */ Y(HP, {
24482
- storage: c?.stubTrackerStorage,
24528
+ storage: u?.stubTrackerStorage,
24483
24529
  onUnlock: async () => {
24484
24530
  await zP() && await M();
24485
24531
  },
24486
- onAdd: () => u({})
24532
+ onAdd: () => f({})
24487
24533
  })] });
24488
24534
  }, MF = ({ onClose: e, children: t, ...n }) => {
24489
24535
  let { refs: r, context: i } = M_({
@@ -24532,35 +24578,65 @@ var wF = iy("\n subscription MediaTracking($input: TrackingInput!) {\n track
24532
24578
  if (!n.length) return !1;
24533
24579
  let r = new Set(FF(t));
24534
24580
  return n.some((e) => r.has(e));
24535
- }, LF = (e, t) => t?.find((t) => IF(t.uri, e)), RF = (e, t) => e?.find((e) => !t.has(e.url))?.url, zF = /^\d{4}-\d{2}-\d{2}$/, BF = 1900, VF = (e) => {
24581
+ }, LF = (e, t) => t?.find((t) => IF(t.uri, e)), RF = /^\d{4}-\d{2}-\d{2}$/, zF = 1900, BF = (e) => {
24536
24582
  if (!e) return;
24537
24583
  let t = new Date(e);
24538
- if (!Number.isNaN(t.getTime()) && !(t.getUTCFullYear() < BF)) return t;
24539
- }, HF = (e, { locale: t } = {}) => {
24540
- let n = VF(e);
24584
+ if (!Number.isNaN(t.getTime()) && !(t.getUTCFullYear() < zF)) return t;
24585
+ }, VF = (e, { locale: t } = {}) => {
24586
+ let n = BF(e);
24541
24587
  if (n) try {
24542
24588
  return new Intl.DateTimeFormat(t, {
24543
24589
  year: "numeric",
24544
24590
  month: "short",
24545
24591
  day: "numeric",
24546
- ...zF.test(e) ? { timeZone: "UTC" } : {}
24592
+ ...RF.test(e) ? { timeZone: "UTC" } : {}
24547
24593
  }).format(n);
24548
24594
  } catch {
24549
24595
  return;
24550
24596
  }
24551
- }, UF = (e, t) => t ? Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) : Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), WF = 864e5, GF = (e, { locale: t, now: n = /* @__PURE__ */ new Date() } = {}) => {
24552
- let r = VF(e);
24597
+ }, HF = (e, t) => t ? Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) : Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), UF = 864e5, WF = (e, { locale: t, now: n = /* @__PURE__ */ new Date() } = {}) => {
24598
+ let r = BF(e);
24553
24599
  if (!r) return;
24554
- let i = Math.round((UF(n, !1) - UF(r, zF.test(e))) / WF);
24555
- return i === 0 ? "today" : i === 1 ? "yesterday" : i > 1 && i < 30 ? `${i} days ago` : HF(e, { locale: t });
24600
+ let i = Math.round((HF(n, !1) - HF(r, RF.test(e))) / UF);
24601
+ return i === 0 ? "today" : i === 1 ? "yesterday" : i > 1 && i < 30 ? `${i} days ago` : VF(e, { locale: t });
24602
+ }, GF = (e) => {
24603
+ let t = BF(e);
24604
+ if (t) return RF.test(e) ? e : t.toISOString();
24556
24605
  }, KF = (e) => {
24557
- let t = VF(e);
24558
- if (t) return zF.test(e) ? e : t.toISOString();
24559
- }, qF = /* @__PURE__ */ new Set(["cr", "nf"]), JF = (e) => qF.has(e) && !ee().includes(e);
24606
+ if (!e || e <= 0) return;
24607
+ let t = Math.floor(e / 60), n = Math.round(e % 60);
24608
+ return t ? n ? `${t}h ${n}m` : `${t}h` : `${n}m`;
24609
+ }, qF = ({ released: e, runtime: t, genres: n }) => {
24610
+ let r = BF(e)?.getUTCFullYear();
24611
+ return [
24612
+ "Movie",
24613
+ r ? String(r) : void 0,
24614
+ KF(t),
24615
+ n?.length ? n.slice(0, 3).join(", ") : void 0
24616
+ ].filter((e) => !!e);
24617
+ }, JF = (e, t = /* @__PURE__ */ new Date()) => {
24618
+ let n = BF(e);
24619
+ return n ? Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) > Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : !1;
24620
+ }, YF = (e, t) => e?.find((e) => !t.has(e.url))?.url, XF = /* @__PURE__ */ new Set(["cr", "nf"]), ZF = (e) => XF.has(e) && !ee().includes(e);
24621
+ //#endregion
24622
+ //#region src/components/origin-icon.tsx
24623
+ V();
24624
+ var QF = ({ icon: e, name: t }) => {
24625
+ let [n, r] = I(!1);
24626
+ return n ? /* @__PURE__ */ Y("span", {
24627
+ className: "letter",
24628
+ "aria-hidden": "true",
24629
+ children: t.charAt(0)
24630
+ }) : /* @__PURE__ */ Y("img", {
24631
+ src: e,
24632
+ alt: "",
24633
+ onError: () => r(!0)
24634
+ });
24635
+ };
24560
24636
  //#endregion
24561
24637
  //#region src/components/source-popup.tsx
24562
24638
  V();
24563
- var YF = H`
24639
+ var $F = H`
24564
24640
  position: fixed;
24565
24641
  inset: 0;
24566
24642
  z-index: ${$_.sourcePopup};
@@ -24628,7 +24704,7 @@ var YF = H`
24628
24704
  color: rgba(255, 255, 255, 0.55);
24629
24705
  font-size: 1.4rem;
24630
24706
  }
24631
- `, XF = ({ pluginUri: e, origin: t, name: n, uris: r, onPick: i, onClose: a }) => {
24707
+ `, eI = ({ pluginUri: e, origin: t, name: n, uris: r, onPick: i, onClose: a }) => {
24632
24708
  let o = R(null), [s, l] = I("");
24633
24709
  return L(() => {
24634
24710
  let n = o.current;
@@ -24656,7 +24732,7 @@ var YF = H`
24656
24732
  };
24657
24733
  return addEventListener("keydown", e), () => removeEventListener("keydown", e);
24658
24734
  }, [a]), /* @__PURE__ */ Y("div", {
24659
- css: YF,
24735
+ css: $F,
24660
24736
  role: "dialog",
24661
24737
  "aria-modal": "true",
24662
24738
  "aria-label": `Choose a source from ${n}`,
@@ -24689,7 +24765,7 @@ var YF = H`
24689
24765
  //#endregion
24690
24766
  //#region src/components/source-selector.tsx
24691
24767
  V();
24692
- var ZF = {
24768
+ var tI = {
24693
24769
  cr: "#f47521",
24694
24770
  nf: "#e50914",
24695
24771
  jw: "#fcd53f",
@@ -24701,7 +24777,7 @@ var ZF = {
24701
24777
  peacock: "#069de0",
24702
24778
  paramount: "#0064ff",
24703
24779
  fubo: "#fa4616"
24704
- }, QF = "#9aa0a6", $F = (e) => e.color || ZF[e.id] || QF, eI = H`
24780
+ }, nI = "#9aa0a6", rI = (e) => e.color || tI[e.id] || nI, iI = H`
24705
24781
  display: flex;
24706
24782
  flex-direction: column;
24707
24783
  gap: 1.1rem;
@@ -24721,7 +24797,7 @@ var ZF = {
24721
24797
  }
24722
24798
 
24723
24799
  .source {
24724
- --brand: ${QF};
24800
+ --brand: ${nI};
24725
24801
  position: relative;
24726
24802
  display: flex;
24727
24803
  align-items: center;
@@ -24932,13 +25008,13 @@ var ZF = {
24932
25008
  0%, 100% { transform: scaleY(0.35); }
24933
25009
  50% { transform: scaleY(1); }
24934
25010
  }
24935
- `, tI = H`
25011
+ `, aI = H`
24936
25012
  display: flex;
24937
25013
  align-items: center;
24938
25014
  gap: 0.7rem;
24939
25015
 
24940
25016
  .src {
24941
- --brand: ${QF};
25017
+ --brand: ${nI};
24942
25018
  display: flex;
24943
25019
  text-decoration: none;
24944
25020
  border-radius: 0.6rem;
@@ -24978,7 +25054,7 @@ var ZF = {
24978
25054
  background: color-mix(in srgb, var(--brand) 30%, rgba(255, 255, 255, 0.05));
24979
25055
  }
24980
25056
  }
24981
- `, nI = ({ source: e }) => {
25057
+ `, oI = ({ source: e }) => {
24982
25058
  let [t, n] = I(!1);
24983
25059
  return /* @__PURE__ */ Y("span", {
24984
25060
  className: "icon",
@@ -24988,21 +25064,21 @@ var ZF = {
24988
25064
  onError: () => n(!0)
24989
25065
  }) : e.name.charAt(0)
24990
25066
  });
24991
- }, rI = ({ sources: e, compact: t = !1, onPickRelease: n }) => {
25067
+ }, sI = ({ sources: e, compact: t = !1, onPickRelease: n }) => {
24992
25068
  let [r, i] = I(null);
24993
25069
  return e.length ? t ? /* @__PURE__ */ Y("div", {
24994
- css: tI,
25070
+ css: aI,
24995
25071
  children: e.map((e) => /* @__PURE__ */ Y("a", {
24996
25072
  className: "src",
24997
- style: { "--brand": $F(e) },
25073
+ style: { "--brand": rI(e) },
24998
25074
  href: e.href,
24999
25075
  target: e.external ? "_blank" : void 0,
25000
25076
  rel: e.external ? "noreferrer" : void 0,
25001
25077
  title: `Watch on ${e.name}`,
25002
- children: /* @__PURE__ */ Y(nI, { source: e })
25078
+ children: /* @__PURE__ */ Y(oI, { source: e })
25003
25079
  }, e.id))
25004
25080
  }) : /* @__PURE__ */ X("div", {
25005
- css: eI,
25081
+ css: iI,
25006
25082
  children: [
25007
25083
  /* @__PURE__ */ Y("div", {
25008
25084
  className: "label",
@@ -25010,18 +25086,18 @@ var ZF = {
25010
25086
  }),
25011
25087
  /* @__PURE__ */ Y("div", {
25012
25088
  className: "list",
25013
- children: e.map((e) => e.releases && e.releases.length > 1 ? /* @__PURE__ */ Y(iI, {
25089
+ children: e.map((e) => e.releases && e.releases.length > 1 ? /* @__PURE__ */ Y(cI, {
25014
25090
  source: e,
25015
25091
  onOpenPicker: () => i(e)
25016
25092
  }, e.id) : /* @__PURE__ */ X("a", {
25017
25093
  className: `source${e.active ? " active" : ""}`,
25018
- style: { "--brand": $F(e) },
25094
+ style: { "--brand": rI(e) },
25019
25095
  href: e.href,
25020
25096
  target: e.external ? "_blank" : void 0,
25021
25097
  rel: e.external ? "noreferrer" : void 0,
25022
25098
  title: e.name,
25023
25099
  children: [
25024
- /* @__PURE__ */ Y(nI, { source: e }),
25100
+ /* @__PURE__ */ Y(oI, { source: e }),
25025
25101
  /* @__PURE__ */ Y("span", {
25026
25102
  className: "name",
25027
25103
  children: e.name
@@ -25043,7 +25119,7 @@ var ZF = {
25043
25119
  ]
25044
25120
  }, e.id))
25045
25121
  }),
25046
- r?.picker ? /* @__PURE__ */ Y(XF, {
25122
+ r?.picker ? /* @__PURE__ */ Y(eI, {
25047
25123
  pluginUri: r.picker.pluginUri,
25048
25124
  origin: r.id,
25049
25125
  name: r.name,
@@ -25055,21 +25131,21 @@ var ZF = {
25055
25131
  }) : void 0
25056
25132
  ]
25057
25133
  }) : null;
25058
- }, iI = ({ source: e, onOpenPicker: t }) => {
25134
+ }, cI = ({ source: e, onOpenPicker: t }) => {
25059
25135
  let n = e.releases ?? [], [r, i] = I(n.some((e) => e.active)), a = !!e.picker;
25060
25136
  return /* @__PURE__ */ X("div", {
25061
25137
  className: "source-group",
25062
- style: { "--brand": $F(e) },
25138
+ style: { "--brand": rI(e) },
25063
25139
  children: [/* @__PURE__ */ X("button", {
25064
25140
  type: "button",
25065
25141
  className: `source${e.active ? " active" : ""}`,
25066
- style: { "--brand": $F(e) },
25142
+ style: { "--brand": rI(e) },
25067
25143
  onClick: () => a ? t() : i((e) => !e),
25068
25144
  title: `${n.length} releases on ${e.name}`,
25069
25145
  "aria-expanded": a ? void 0 : r,
25070
25146
  "aria-haspopup": a ? "dialog" : void 0,
25071
25147
  children: [
25072
- /* @__PURE__ */ Y(nI, { source: e }),
25148
+ /* @__PURE__ */ Y(oI, { source: e }),
25073
25149
  /* @__PURE__ */ Y("span", {
25074
25150
  className: "name",
25075
25151
  children: e.name
@@ -25111,11 +25187,11 @@ var ZF = {
25111
25187
  }, e.uri))
25112
25188
  }) : void 0]
25113
25189
  });
25114
- }, aI = (e) => [...new Set((e?.handles ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node.origin))];
25190
+ }, lI = (e) => [...new Set((e?.handles ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node.origin))];
25115
25191
  //#endregion
25116
25192
  //#region src/router/home/media-modal.tsx
25117
25193
  V();
25118
- var oI = H`
25194
+ var uI = H`
25119
25195
  z-index: ${$_.mediaModal};
25120
25196
  padding: 5rem 1rem;
25121
25197
  background-color: hsla(0, 0%, 0%, 0.439);
@@ -25216,6 +25292,58 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25216
25292
  height: 4rem;
25217
25293
  width: 4rem;
25218
25294
  }
25295
+ & > .letter {
25296
+ display: flex;
25297
+ align-items: center;
25298
+ justify-content: center;
25299
+ height: 4rem;
25300
+ width: 4rem;
25301
+ border-radius: 0.6rem;
25302
+ background: rgba(255, 255, 255, 0.1);
25303
+ font-size: 1.8rem;
25304
+ font-weight: 700;
25305
+ }
25306
+ }
25307
+ }
25308
+ }
25309
+
25310
+ & > .movie {
25311
+ display: flex;
25312
+ flex-direction: column;
25313
+ gap: 1.4rem;
25314
+ margin: 1rem 0 2rem;
25315
+
25316
+ & > .facts {
25317
+ font-size: 1.5rem;
25318
+ color: rgba(255, 255, 255, 0.65);
25319
+ }
25320
+
25321
+ & > .play-bar {
25322
+ display: flex;
25323
+ flex-wrap: wrap;
25324
+ align-items: center;
25325
+ gap: 1rem 1.6rem;
25326
+
25327
+ & > .play {
25328
+ display: inline-flex;
25329
+ align-items: center;
25330
+ gap: 0.8rem;
25331
+ height: 4.4rem;
25332
+ padding: 0 2.4rem 0 2rem;
25333
+ border-radius: 0.6rem;
25334
+ background: #fff;
25335
+ color: #000;
25336
+ font-size: 1.7rem;
25337
+ font-weight: 700;
25338
+ text-decoration: none;
25339
+ }
25340
+
25341
+ & > .play:hover { background: rgba(255, 255, 255, 0.85); }
25342
+ & > .play:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
25343
+
25344
+ & > .when {
25345
+ font-size: 1.5rem;
25346
+ color: rgba(255, 255, 255, 0.8);
25219
25347
  }
25220
25348
  }
25221
25349
  }
@@ -25397,33 +25525,74 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25397
25525
  }
25398
25526
  }
25399
25527
  }
25400
- `, sI = iy("\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n"), cI = iy("\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n"), lI = ({ episode: e, index: t, mediaUri: n, isMovie: r }) => {
25401
- let [i, a] = I(() => /* @__PURE__ */ new Set()), o = RF(e.thumbnails, i), s = e.releaseDate ?? e.handles?.find((e) => e.node.releaseDate)?.node.releaseDate, c = GF(s), l = aI(e), [{ data: u }] = Ho({
25402
- query: cI,
25528
+ `, dI = iy("\n subscription GetMediaModal($input: MediaInput!, $descriptionInput: MediaDescriptionInput!) {\n media(input: $input) {\n ...MediaFragment\n titles {\n language\n title\n score\n }\n descriptions(input: $descriptionInput) {\n language\n description\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n categories\n startDate\n genres\n franchise {\n nodes {\n uri\n format\n status\n episodeCount\n startDate\n titles {\n title\n }\n }\n edges {\n from\n to\n relation\n }\n }\n relations {\n relation\n format\n node {\n _id\n uri\n origin\n id\n url\n status\n episodeCount\n startDate\n titles {\n title\n }\n covers {\n url\n color\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n runtime\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n ...EpisodeFragment\n episodeNumber\n releaseDate\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n thumbnails {\n url\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodeCount\n }\n }\n"), fI = iy("\n subscription GetMediaModalOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n ...OriginFragment\n }\n }\n }\n"), pI = (e) => e?.releaseDate ?? e?.handles?.find((e) => e.node.releaseDate)?.node.releaseDate, mI = (e, t) => {
25529
+ let n = e ? lI(e) : void 0, [{ data: r }] = Ho({
25530
+ query: fI,
25403
25531
  variables: { input: {
25404
- ids: l,
25532
+ ids: n ?? [],
25405
25533
  filters: [Lu.IsNotApiOnly]
25406
25534
  } },
25407
- pause: !l
25408
- }), d = (u?.originPage?.nodes ?? []).map((t) => {
25409
- let r = (e?.handles ?? []).filter((e) => e.relation === "SAME_AS" && e.node.origin === t.id).map((e) => e.node), i = r.at(0), a = i?.uri, o = !!(JF(t.id) && i?.url), s = e.uri ? r.length > 1 ? Au(K.WATCH, {
25410
- mediaUri: n,
25535
+ pause: !n
25536
+ });
25537
+ return e ? (r?.originPage?.nodes ?? []).map((n) => {
25538
+ let r = (e?.handles ?? []).filter((e) => e.relation === "SAME_AS" && e.node.origin === n.id).map((e) => e.node), i = r.at(0), a = i?.uri, o = !!(ZF(n.id) && i?.url), s = e.uri ? r.length > 1 ? Au(K.WATCH, {
25539
+ mediaUri: t,
25411
25540
  episodeUri: e.uri
25412
25541
  }) : a ? Au(K.WATCH, {
25413
- mediaUri: n,
25542
+ mediaUri: t,
25414
25543
  episodeUri: e.uri,
25415
25544
  sourceUri: a
25416
25545
  }) : void 0 : void 0, c = r.length > 1;
25417
25546
  return {
25418
- id: t.id,
25419
- name: t.name ?? t.id,
25420
- icon: t.icon,
25421
- color: t.color,
25547
+ id: n.id,
25548
+ name: n.name ?? n.id,
25549
+ icon: n.icon,
25550
+ color: n.color,
25422
25551
  href: c || o ? s : i?.url ?? void 0,
25423
25552
  external: !c && !o,
25424
25553
  active: !1
25425
25554
  };
25426
- }).filter((e) => e.href).sort((e, t) => Number(e.external) - Number(t.external)).slice(0, 5);
25555
+ }).filter((e) => e.href).sort((e, t) => Number(e.external) - Number(t.external)).slice(0, 5) : [];
25556
+ }, hI = ({ episode: e, mediaUri: t, startDate: n, genres: r }) => {
25557
+ let i = mI(e, t), a = pI(e) ?? n, o = JF(a), s = o ? void 0 : i.find((e) => !e.external && e.href), c = VF(a);
25558
+ return /* @__PURE__ */ X("div", {
25559
+ className: "movie",
25560
+ children: [/* @__PURE__ */ Y("div", {
25561
+ className: "facts",
25562
+ children: qF({
25563
+ released: a,
25564
+ runtime: e?.runtime,
25565
+ genres: r
25566
+ }).join(" · ")
25567
+ }), /* @__PURE__ */ X("div", {
25568
+ className: "play-bar",
25569
+ children: [
25570
+ s?.href ? /* @__PURE__ */ X(Cu, {
25571
+ className: "play",
25572
+ href: s.href,
25573
+ children: [/* @__PURE__ */ Y(Tf, {
25574
+ size: 20,
25575
+ fill: "currentColor",
25576
+ "aria-hidden": "true"
25577
+ }), "Play"]
25578
+ }) : void 0,
25579
+ i.length ? /* @__PURE__ */ Y(sI, {
25580
+ compact: !0,
25581
+ sources: i
25582
+ }) : void 0,
25583
+ o && c ? /* @__PURE__ */ X("span", {
25584
+ className: "when",
25585
+ children: ["Releases ", c]
25586
+ }) : void 0,
25587
+ !o && !i.length ? /* @__PURE__ */ Y("span", {
25588
+ className: "when",
25589
+ children: "No source stub knows of plays it yet"
25590
+ }) : void 0
25591
+ ]
25592
+ })]
25593
+ });
25594
+ }, gI = ({ episode: e, index: t, mediaUri: n }) => {
25595
+ let [r, i] = I(() => /* @__PURE__ */ new Set()), a = YF(e.thumbnails, r), o = pI(e), s = WF(o), c = mI(e, n);
25427
25596
  return /* @__PURE__ */ X("div", {
25428
25597
  className: "episode",
25429
25598
  children: [
@@ -25434,31 +25603,16 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25434
25603
  episodeUri: e.uri
25435
25604
  })
25436
25605
  }) : void 0,
25437
- r ? void 0 : /* @__PURE__ */ Y("div", {
25606
+ /* @__PURE__ */ Y("div", {
25438
25607
  className: "number",
25439
25608
  children: e.episodeNumber
25440
25609
  }),
25441
- o ? /* @__PURE__ */ Y("img", {
25610
+ a ? /* @__PURE__ */ Y("img", {
25442
25611
  className: "thumbnail",
25443
- src: o,
25444
- onError: () => a((e) => new Set(e).add(o))
25612
+ src: a,
25613
+ onError: () => i((e) => new Set(e).add(a))
25445
25614
  }) : /* @__PURE__ */ Y("div", { className: "thumbnail" }),
25446
- r ? /* @__PURE__ */ Y("div", {
25447
- className: "content",
25448
- children: /* @__PURE__ */ X("div", {
25449
- className: "header",
25450
- children: [/* @__PURE__ */ Y("div", {
25451
- className: "title",
25452
- children: "Play"
25453
- }), /* @__PURE__ */ Y("span", {
25454
- className: "origins",
25455
- children: /* @__PURE__ */ Y(rI, {
25456
- compact: !0,
25457
- sources: d
25458
- })
25459
- })]
25460
- })
25461
- }) : e.titles?.length ? /* @__PURE__ */ X("div", {
25615
+ e.titles?.length ? /* @__PURE__ */ X("div", {
25462
25616
  className: "content",
25463
25617
  children: [/* @__PURE__ */ X("div", {
25464
25618
  className: "header",
@@ -25467,9 +25621,9 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25467
25621
  children: e.titles.at(0)?.title
25468
25622
  }), /* @__PURE__ */ Y("span", {
25469
25623
  className: "origins",
25470
- children: /* @__PURE__ */ Y(rI, {
25624
+ children: /* @__PURE__ */ Y(sI, {
25471
25625
  compact: !0,
25472
- sources: d
25626
+ sources: c
25473
25627
  })
25474
25628
  })]
25475
25629
  }), e.shortDescriptions?.at(0) ? /* @__PURE__ */ Y("div", {
@@ -25491,15 +25645,15 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25491
25645
  }),
25492
25646
  /* @__PURE__ */ Y("div", {
25493
25647
  className: "side",
25494
- children: c ? /* @__PURE__ */ Y("time", {
25648
+ children: s ? /* @__PURE__ */ Y("time", {
25495
25649
  className: "date",
25496
- dateTime: KF(s),
25497
- children: c
25650
+ dateTime: GF(o),
25651
+ children: s
25498
25652
  }) : void 0
25499
25653
  })
25500
25654
  ]
25501
25655
  });
25502
- }, uI = ({ mediaNodes: e }) => {
25656
+ }, _I = ({ mediaNodes: e }) => {
25503
25657
  let t = pu(), n = {
25504
25658
  ...t,
25505
25659
  uri: Ib(t.uri)
@@ -25508,78 +25662,78 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25508
25662
  o((e) => e && Bb(Pb(e), Pb(n.uri ?? "")) ? e : n.uri);
25509
25663
  }, [n.uri]);
25510
25664
  let [{ data: s }] = Ho({
25511
- query: sI,
25665
+ query: dI,
25512
25666
  variables: {
25513
25667
  input: { uri: a },
25514
25668
  descriptionInput: { type: Mu.Html }
25515
25669
  },
25516
25670
  pause: !a
25517
25671
  }), c = s?.media ?? i, l = s?.media?.uri ? zb(s.media.uri)?.handleUrisValues : void 0, u = [.../* @__PURE__ */ new Set([...l?.map((e) => e.origin) ?? [], ...c?.handles?.map((e) => e.node.origin) ?? []])], [{ data: d }] = Ho({
25518
- query: cI,
25672
+ query: fI,
25519
25673
  variables: { input: {
25520
25674
  ids: u,
25521
25675
  filters: [Lu.IsNotApiOnly]
25522
25676
  } },
25523
25677
  pause: !u
25524
- }), f = z(() => c?.titles?.at(0)?.title, [c]), p = z(() => c && "descriptions" in c && c.descriptions.sort((e, t) => t.description.length - e.description.length)?.at(0)?.description, [c]), m = ky(c?.covers), [h, g] = I([]), [_, v] = I(), y = z(() => {
25525
- let e = (c?.trailers ?? []).filter((e) => !h.includes(e.uri));
25526
- return e.find((e) => e.uri === _) ?? e.at(0);
25678
+ }), f = z(() => c?.titles?.at(0)?.title, [c]), p = !!(c && "categories" in c && c.categories?.includes(ju.Movie) && ("episodes" in c ? c.episodes?.length ?? 0 : 0) <= 1), m = z(() => c && "descriptions" in c && c.descriptions.sort((e, t) => t.description.length - e.description.length)?.at(0)?.description, [c]), h = ky(c?.covers), [g, _] = I([]), [v, y] = I(), b = z(() => {
25679
+ let e = (c?.trailers ?? []).filter((e) => !g.includes(e.uri));
25680
+ return e.find((e) => e.uri === v) ?? e.at(0);
25527
25681
  }, [
25528
25682
  c?.trailers,
25529
- h,
25530
- _
25683
+ g,
25684
+ v
25531
25685
  ]);
25532
25686
  L(() => {
25533
- y?.uri && y.uri !== _ && v(y.uri);
25534
- }, [y?.uri, _]);
25535
- let b = B(() => {
25536
- y && g([...h, y.uri]);
25537
- }, [y, h]), [x, S] = I(!0), [C, w] = I(!1), [T, E] = I(!0), [D, O] = I(.25);
25687
+ b?.uri && b.uri !== v && y(b.uri);
25688
+ }, [b?.uri, v]);
25689
+ let x = B(() => {
25690
+ b && _([...g, b.uri]);
25691
+ }, [b, g]), [S, C] = I(!0), [w, T] = I(!1), [E, D] = I(!0), [O, k] = I(.25);
25538
25692
  return L(() => {
25539
25693
  Fb(c?.uri, n.uri) && r(`${Au(K.MEDIA, { uri: c.uri })}${location.search}`, { replace: !0 });
25540
- }, [c?.uri, n.uri]), x ? /* @__PURE__ */ X(MF, {
25694
+ }, [c?.uri, n.uri]), S ? /* @__PURE__ */ X(MF, {
25541
25695
  "data-party-scroll": !0,
25542
- css: oI,
25543
- onClose: () => S(!1),
25696
+ css: uI,
25697
+ onClose: () => C(!1),
25544
25698
  children: [/* @__PURE__ */ X("div", {
25545
25699
  className: "trailer",
25546
- style: !y?.url && m ? { backgroundImage: `url(${m})` } : {},
25547
- children: [y?.url ? /* @__PURE__ */ Y(my, {
25548
- url: y.url,
25700
+ style: !b?.url && h ? { backgroundImage: `url(${h})` } : {},
25701
+ children: [b?.url ? /* @__PURE__ */ Y(my, {
25702
+ url: b.url,
25549
25703
  className: "player",
25550
- onError: b,
25551
- paused: C,
25552
- volume: T ? 0 : D
25553
- }, y.url) : void 0, /* @__PURE__ */ X("div", {
25554
- className: `player-controls ${y?.url ? "" : "hidden"}`,
25704
+ onError: x,
25705
+ paused: w,
25706
+ volume: E ? 0 : O
25707
+ }, b.url) : void 0, /* @__PURE__ */ X("div", {
25708
+ className: `player-controls ${b?.url ? "" : "hidden"}`,
25555
25709
  children: [/* @__PURE__ */ X("span", {
25556
25710
  className: "playback",
25557
- children: [C ? /* @__PURE__ */ Y(Tf, {
25711
+ children: [w ? /* @__PURE__ */ Y(Tf, {
25558
25712
  className: "icon-outline",
25559
25713
  size: 30,
25560
25714
  strokeWidth: 3,
25561
25715
  color: "black",
25562
- onClick: () => w(!1)
25716
+ onClick: () => T(!1)
25563
25717
  }) : /* @__PURE__ */ Y(wf, {
25564
25718
  className: "icon-outline",
25565
25719
  size: 30,
25566
25720
  strokeWidth: 3,
25567
25721
  color: "black",
25568
- onClick: () => w(!0)
25569
- }), C ? /* @__PURE__ */ Y(Tf, {
25722
+ onClick: () => T(!0)
25723
+ }), w ? /* @__PURE__ */ Y(Tf, {
25570
25724
  className: "icon-body",
25571
25725
  size: 30,
25572
- onClick: () => w(!1)
25726
+ onClick: () => T(!1)
25573
25727
  }) : /* @__PURE__ */ Y(wf, {
25574
25728
  className: "icon-body",
25575
25729
  size: 30,
25576
- onClick: () => w(!0)
25730
+ onClick: () => T(!0)
25577
25731
  })]
25578
25732
  }), /* @__PURE__ */ Y(_y, {
25579
- defaultMuted: T,
25580
- onMutedUpdate: E,
25581
- defaultVolume: D,
25582
- onVolumeUpdate: (e) => O(e)
25733
+ defaultMuted: E,
25734
+ onMutedUpdate: D,
25735
+ defaultVolume: O,
25736
+ onVolumeUpdate: (e) => k(e)
25583
25737
  })]
25584
25738
  })]
25585
25739
  }), /* @__PURE__ */ X("div", {
@@ -25603,25 +25757,39 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25603
25757
  target: "_blank",
25604
25758
  rel: "noreferrer",
25605
25759
  title: e.name,
25606
- children: /* @__PURE__ */ Y("img", { src: e.icon })
25760
+ children: /* @__PURE__ */ Y(QF, {
25761
+ icon: e.icon,
25762
+ name: e.name ?? e.id
25763
+ })
25607
25764
  }) : /* @__PURE__ */ Y("div", {
25608
25765
  className: "origin",
25609
- children: /* @__PURE__ */ Y("img", { src: e.icon })
25766
+ title: e.name,
25767
+ children: /* @__PURE__ */ Y(QF, {
25768
+ icon: e.icon,
25769
+ name: e.name ?? e.id
25770
+ })
25610
25771
  });
25611
25772
  }).filter(Boolean)
25612
25773
  })
25613
25774
  ]
25614
25775
  }),
25776
+ p && c ? /* @__PURE__ */ Y(hI, {
25777
+ episode: "episodes" in c ? c.episodes?.at(0) : void 0,
25778
+ mediaUri: c.uri,
25779
+ startDate: "startDate" in c ? c.startDate : void 0,
25780
+ genres: "genres" in c ? c.genres : void 0
25781
+ }) : void 0,
25615
25782
  /* @__PURE__ */ Y(jF, {
25616
25783
  uri: s?.media?.uri,
25617
25784
  title: f,
25618
- cover: m,
25619
- episodeCount: s?.media?.episodeCount
25785
+ cover: h,
25786
+ episodeCount: s?.media?.episodeCount,
25787
+ movie: p
25620
25788
  }),
25621
- p ? /* @__PURE__ */ Y(ub, {
25789
+ m ? /* @__PURE__ */ Y(ub, {
25622
25790
  collapsedHeight: 200,
25623
25791
  className: "description",
25624
- children: /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: p } })
25792
+ children: /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: m } })
25625
25793
  }) : void 0,
25626
25794
  /* @__PURE__ */ Y(dx, {
25627
25795
  relations: c && "relations" in c ? c.relations ?? [] : [],
@@ -25630,19 +25798,18 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25630
25798
  currentUris: c?.handles?.map((e) => e.node.uri) ?? []
25631
25799
  })
25632
25800
  }),
25633
- /* @__PURE__ */ Y("div", {
25801
+ p ? void 0 : /* @__PURE__ */ Y("div", {
25634
25802
  className: "episodes",
25635
- children: c && "episodes" in c && c.episodes?.map((e, t) => /* @__PURE__ */ Y(lI, {
25803
+ children: c && "episodes" in c && c.episodes?.map((e, t) => /* @__PURE__ */ Y(gI, {
25636
25804
  episode: e,
25637
25805
  index: t,
25638
- mediaUri: c.uri,
25639
- isMovie: "categories" in c && c.categories?.includes(ju.Movie)
25806
+ mediaUri: c.uri
25640
25807
  }, e.episodeNumber ?? e.uri ?? t))
25641
25808
  })
25642
25809
  ]
25643
25810
  })]
25644
25811
  }) : /* @__PURE__ */ Y(Eu, { to: "/" });
25645
- }, dI = [
25812
+ }, vI = [
25646
25813
  {
25647
25814
  label: "All",
25648
25815
  value: null
@@ -25659,7 +25826,7 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25659
25826
  label: "Movies",
25660
25827
  value: ju.Movie
25661
25828
  }
25662
- ], fI = H`
25829
+ ], yI = H`
25663
25830
  display: flex;
25664
25831
  gap: 0.6rem;
25665
25832
 
@@ -25681,37 +25848,37 @@ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
25681
25848
  color: #000;
25682
25849
  border-color: #fff;
25683
25850
  }
25684
- `, pI = ({ value: e, onChange: t }) => /* @__PURE__ */ Y("div", {
25685
- css: fI,
25686
- children: dI.map((n) => /* @__PURE__ */ Y("button", {
25851
+ `, bI = ({ value: e, onChange: t }) => /* @__PURE__ */ Y("div", {
25852
+ css: yI,
25853
+ children: vI.map((n) => /* @__PURE__ */ Y("button", {
25687
25854
  className: e === n.value ? "tab active" : "tab",
25688
25855
  onClick: () => t(n.value),
25689
25856
  children: n.label
25690
25857
  }, n.label))
25691
- }), mI = (e) => e._id ?? e.uri ?? "", hI = (e, t) => {
25858
+ }), xI = (e) => e._id ?? e.uri ?? "", SI = (e, t) => {
25692
25859
  let n = new Map(t.map((e, t) => [e, t])), r = [], i = [];
25693
- for (let t of e) (n.has(mI(t)) ? r : i).push(t);
25694
- return r.sort((e, t) => n.get(mI(e)) - n.get(mI(t))), [...r, ...i];
25695
- }, gI = (e) => e.map(mI).filter(Boolean);
25860
+ for (let t of e) (n.has(xI(t)) ? r : i).push(t);
25861
+ return r.sort((e, t) => n.get(xI(e)) - n.get(xI(t))), [...r, ...i];
25862
+ }, CI = (e) => e.map(xI).filter(Boolean);
25696
25863
  //#endregion
25697
25864
  //#region src/router/home/index.tsx
25698
25865
  V();
25699
- var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n"), vI = H`
25866
+ var wI = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n }\n }\n }\n"), TI = H`
25700
25867
  .category-bar {
25701
25868
  position: relative;
25702
25869
  z-index: ${$_.categoryBar};
25703
25870
  padding: 1.5rem 3rem 0.5rem;
25704
25871
  }
25705
- `, yI = kP(), bI = {
25706
- season: cd(yI.season),
25707
- year: yI.year
25708
- }, xI = bd(bI), SI = () => {
25872
+ `, EI = kP(), DI = {
25873
+ season: cd(EI.season),
25874
+ year: EI.year
25875
+ }, OI = bd(DI), kI = () => {
25709
25876
  let [e] = vu(ku(K.MEDIA)), [t, n] = I(null), [{ data: r }] = Ho({
25710
- query: _I,
25877
+ query: wI,
25711
25878
  variables: {
25712
25879
  input: {
25713
- season: bI.season,
25714
- seasonYear: bI.year,
25880
+ season: DI.season,
25881
+ seasonYear: DI.year,
25715
25882
  sorts: [Pu.PopularityDesc],
25716
25883
  ...t ? { categories: [t] } : {}
25717
25884
  },
@@ -25719,52 +25886,52 @@ var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $sh
25719
25886
  }
25720
25887
  }), i = r?.mediaPage?.nodes, a = R([]), o = z(() => {
25721
25888
  if (!i?.length) return i || [];
25722
- let e = hI(i, a.current);
25723
- return a.current = gI(e), e;
25889
+ let e = SI(i, a.current);
25890
+ return a.current = CI(e), e;
25724
25891
  }, [i]);
25725
25892
  return /* @__PURE__ */ X("div", {
25726
- css: vI,
25893
+ css: TI,
25727
25894
  children: [
25728
25895
  /* @__PURE__ */ Y(jy, { mediaNodes: o }),
25729
25896
  /* @__PURE__ */ Y("div", {
25730
25897
  className: "category-bar",
25731
- children: /* @__PURE__ */ Y(pI, {
25898
+ children: /* @__PURE__ */ Y(bI, {
25732
25899
  value: t,
25733
25900
  onChange: n
25734
25901
  })
25735
25902
  }),
25736
25903
  /* @__PURE__ */ Y(cb, {
25737
25904
  title: "Current season",
25738
- titleTo: xI,
25905
+ titleTo: OI,
25739
25906
  mediaNodes: o
25740
25907
  }),
25741
- e && /* @__PURE__ */ Y(uI, { mediaNodes: o })
25908
+ e && /* @__PURE__ */ Y(_I, { mediaNodes: o })
25742
25909
  ]
25743
25910
  });
25744
- }, CI = (e, t) => {
25911
+ }, AI = (e, t) => {
25745
25912
  let n = e.nextAiringEpisode?.airingAt;
25746
25913
  if (!n) return;
25747
25914
  let r = new Date(n).getTime();
25748
25915
  return Number.isFinite(r) ? r - t : void 0;
25749
- }, wI = (e) => e == null ? void 0 : `${e} episode${e === 1 ? "" : "s"}`, TI = (e, t) => {
25916
+ }, jI = (e) => e == null ? void 0 : `${e} episode${e === 1 ? "" : "s"}`, MI = (e, t) => {
25750
25917
  if (!e) return;
25751
25918
  let n = e.trim().replace(/^#/, ""), r = n.length === 3 ? n.split("").map((e) => e + e).join("") : n.length === 6 ? n : void 0;
25752
25919
  if (!r || !/^[0-9a-f]{6}$/i.test(r)) return;
25753
25920
  let i = parseInt(r, 16);
25754
25921
  return `rgba(${i >> 16 & 255}, ${i >> 8 & 255}, ${i & 255}, ${t})`;
25755
- }, EI = (e) => ({
25756
- "--accent": TI(e, 1) ?? "rgba(255, 255, 255, 0.75)",
25757
- "--accent-soft": TI(e, .18) ?? "rgba(255, 255, 255, 0.08)",
25758
- "--accent-wash": TI(e, .07) ?? "rgba(255, 255, 255, 0.03)"
25759
- }), DI = (e, t = 2) => {
25922
+ }, NI = (e) => ({
25923
+ "--accent": MI(e, 1) ?? "rgba(255, 255, 255, 0.75)",
25924
+ "--accent-soft": MI(e, .18) ?? "rgba(255, 255, 255, 0.08)",
25925
+ "--accent-wash": MI(e, .07) ?? "rgba(255, 255, 255, 0.03)"
25926
+ }), PI = (e, t = 2) => {
25760
25927
  if (!Number.isFinite(e) || e <= 0) return;
25761
25928
  let n = [], r = e;
25762
- for (let e of OI) {
25929
+ for (let e of FI) {
25763
25930
  let i = Math.floor(r / e.ms);
25764
25931
  if (r -= i * e.ms, i && (n.push(`${i} ${i === 1 ? e.singular : e.plural}`), n.length >= t)) break;
25765
25932
  }
25766
25933
  return n.length ? n.join(", ") : void 0;
25767
- }, OI = [
25934
+ }, FI = [
25768
25935
  {
25769
25936
  ms: 864e5,
25770
25937
  singular: "day",
@@ -25789,23 +25956,23 @@ var _I = iy("\n subscription GetReleasingMediaPage($input: MediaPageInput!, $sh
25789
25956
  //#endregion
25790
25957
  //#region src/utils/use-now.ts
25791
25958
  V();
25792
- var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25959
+ var II = 3e4, LI = /* @__PURE__ */ new Set(), RI, zI = () => {
25793
25960
  let [e, t] = I(() => Date.now());
25794
- return L(() => (AI.add(t), jI ??= setInterval(() => {
25961
+ return L(() => (LI.add(t), RI ??= setInterval(() => {
25795
25962
  let e = Date.now();
25796
- for (let t of AI) t(e);
25797
- }, kI), () => {
25798
- AI.delete(t), !AI.size && jI && (clearInterval(jI), jI = void 0);
25963
+ for (let t of LI) t(e);
25964
+ }, II), () => {
25965
+ LI.delete(t), !LI.size && RI && (clearInterval(RI), RI = void 0);
25799
25966
  }), []), e;
25800
- }, NI = (e) => e >= 75 ? "good" : e >= 60 ? "mixed" : "poor", PI = {
25967
+ }, BI = (e) => e >= 75 ? "good" : e >= 60 ? "mixed" : "poor", VI = {
25801
25968
  good: jf,
25802
25969
  mixed: bf,
25803
25970
  poor: mf
25804
- }, FI = {
25971
+ }, HI = {
25805
25972
  good: "#4ade80",
25806
25973
  mixed: "#fb923c",
25807
25974
  poor: "#f87171"
25808
- }, II = H`
25975
+ }, UI = H`
25809
25976
  display: inline-flex;
25810
25977
  align-items: center;
25811
25978
  gap: 0.6rem;
@@ -25814,21 +25981,21 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25814
25981
  .face {
25815
25982
  display: flex;
25816
25983
  }
25817
- `, LI = ({ percent: e, size: t = 18 }) => {
25818
- let n = PI[NI(e)];
25984
+ `, WI = ({ percent: e, size: t = 18 }) => {
25985
+ let n = VI[BI(e)];
25819
25986
  return /* @__PURE__ */ X("span", {
25820
- css: II,
25987
+ css: UI,
25821
25988
  "aria-label": `Rated ${e} percent`,
25822
25989
  children: [/* @__PURE__ */ Y("span", {
25823
25990
  className: "face",
25824
- style: { color: FI[NI(e)] },
25991
+ style: { color: HI[BI(e)] },
25825
25992
  children: /* @__PURE__ */ Y(n, { size: t })
25826
25993
  }), /* @__PURE__ */ X("span", {
25827
25994
  className: "value",
25828
25995
  children: [e, "%"]
25829
25996
  })]
25830
25997
  });
25831
- }, RI = H`
25998
+ }, GI = H`
25832
25999
  display: grid;
25833
26000
  grid-template-columns: 15rem minmax(0, 1fr);
25834
26001
  height: 23rem;
@@ -25948,12 +26115,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25948
26115
  .description { -webkit-line-clamp: 3; }
25949
26116
  .chips { display: none; }
25950
26117
  }
25951
- `, zI = ({ media: e, to: t }) => {
25952
- let n = MI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = DI(CI(e, n) ?? 0), o = e.nextAiringEpisode?.episodeNumber, s = Sd(e.type), c = wd(e.season, e.seasonYear), l = [s, wI(e.episodeCount)].filter(Boolean).join(" • ");
26118
+ `, KI = ({ media: e, to: t }) => {
26119
+ let n = zI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = PI(AI(e, n) ?? 0), o = e.nextAiringEpisode?.episodeNumber, s = Sd(e.type), c = wd(e.season, e.seasonYear), l = [s, jI(e.episodeCount)].filter(Boolean).join(" • ");
25953
26120
  return /* @__PURE__ */ X(Cu, {
25954
26121
  to: t,
25955
- css: RI,
25956
- style: EI(i),
26122
+ css: GI,
26123
+ style: NI(i),
25957
26124
  children: [/* @__PURE__ */ Y("div", {
25958
26125
  className: "cover",
25959
26126
  style: r ? { backgroundImage: `url(${r})` } : void 0,
@@ -25985,7 +26152,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
25985
26152
  })] }) : /* @__PURE__ */ Y("div", {
25986
26153
  className: "airing-value",
25987
26154
  children: Cd(e.status) ?? "Unknown status"
25988
- }) }), e.averageScore != null && /* @__PURE__ */ Y(LI, { percent: e.averageScore })]
26155
+ }) }), e.averageScore != null && /* @__PURE__ */ Y(WI, { percent: e.averageScore })]
25989
26156
  }),
25990
26157
  l && /* @__PURE__ */ Y("div", {
25991
26158
  className: "meta",
@@ -26005,7 +26172,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26005
26172
  ]
26006
26173
  })]
26007
26174
  });
26008
- }, BI = H`
26175
+ }, qI = H`
26009
26176
  display: grid;
26010
26177
  grid-template-columns: 5rem minmax(0, 1fr) 11rem 11rem 17rem;
26011
26178
  align-items: center;
@@ -26084,12 +26251,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26084
26251
  .score { display: none; }
26085
26252
  .chips { display: none; }
26086
26253
  }
26087
- `, VI = ({ media: e, to: t }) => {
26088
- let n = MI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = DI(CI(e, n) ?? 0, 1), o = e.nextAiringEpisode?.episodeNumber;
26254
+ `, JI = ({ media: e, to: t }) => {
26255
+ let n = zI(), r = ky(e.covers), i = e.covers?.find((e) => e.color)?.color, a = PI(AI(e, n) ?? 0, 1), o = e.nextAiringEpisode?.episodeNumber;
26089
26256
  return /* @__PURE__ */ X(Cu, {
26090
26257
  to: t,
26091
- css: BI,
26092
- style: EI(i),
26258
+ css: qI,
26259
+ style: NI(i),
26093
26260
  children: [
26094
26261
  /* @__PURE__ */ Y("div", {
26095
26262
  className: "cover",
@@ -26110,7 +26277,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26110
26277
  }),
26111
26278
  /* @__PURE__ */ X("div", {
26112
26279
  className: "column score",
26113
- children: [e.averageScore != null && /* @__PURE__ */ Y(LI, {
26280
+ children: [e.averageScore != null && /* @__PURE__ */ Y(WI, {
26114
26281
  percent: e.averageScore,
26115
26282
  size: 17
26116
26283
  }), e.popularity != null && /* @__PURE__ */ X("span", {
@@ -26122,7 +26289,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26122
26289
  className: "column format",
26123
26290
  children: [/* @__PURE__ */ Y("span", { children: Sd(e.type) }), e.episodeCount != null && /* @__PURE__ */ Y("span", {
26124
26291
  className: "secondary",
26125
- children: wI(e.episodeCount)
26292
+ children: jI(e.episodeCount)
26126
26293
  })]
26127
26294
  }),
26128
26295
  /* @__PURE__ */ X("div", {
@@ -26139,7 +26306,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26139
26306
  })
26140
26307
  ]
26141
26308
  });
26142
- }, HI = [
26309
+ }, YI = [
26143
26310
  {
26144
26311
  value: "grid",
26145
26312
  label: "Covers"
@@ -26152,27 +26319,27 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26152
26319
  value: "list",
26153
26320
  label: "List"
26154
26321
  }
26155
- ], UI = "grid", WI = "stub-search-display-mode", GI = HI.map((e) => e.value), KI = (e) => GI.includes(e) ? e : UI, qI = () => {
26322
+ ], XI = "grid", ZI = "stub-search-display-mode", QI = YI.map((e) => e.value), $I = (e) => QI.includes(e) ? e : XI, eL = () => {
26156
26323
  try {
26157
26324
  return globalThis.localStorage;
26158
26325
  } catch {
26159
26326
  return;
26160
26327
  }
26161
- }, JI = (e = qI()) => {
26328
+ }, tL = (e = eL()) => {
26162
26329
  try {
26163
- return KI(e?.getItem(WI));
26330
+ return $I(e?.getItem(ZI));
26164
26331
  } catch {
26165
- return UI;
26332
+ return XI;
26166
26333
  }
26167
- }, YI = (e, t = qI()) => {
26334
+ }, nL = (e, t = eL()) => {
26168
26335
  try {
26169
- t?.setItem(WI, e);
26336
+ t?.setItem(ZI, e);
26170
26337
  } catch {}
26171
- }, XI = {
26338
+ }, rL = {
26172
26339
  grid: gf,
26173
26340
  card: hf,
26174
26341
  list: _f
26175
- }, ZI = H`
26342
+ }, iL = H`
26176
26343
  display: inline-flex;
26177
26344
  gap: 0.4rem;
26178
26345
  padding: 0.4rem;
@@ -26199,12 +26366,12 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26199
26366
  background: rgba(255, 255, 255, 0.12);
26200
26367
  color: #fff;
26201
26368
  }
26202
- `, QI = ({ mode: e, onChange: t }) => /* @__PURE__ */ Y("div", {
26203
- css: ZI,
26369
+ `, aL = ({ mode: e, onChange: t }) => /* @__PURE__ */ Y("div", {
26370
+ css: iL,
26204
26371
  role: "group",
26205
26372
  "aria-label": "Result layout",
26206
- children: HI.map((n) => {
26207
- let r = XI[n.value];
26373
+ children: YI.map((n) => {
26374
+ let r = rL[n.value];
26208
26375
  return /* @__PURE__ */ Y("button", {
26209
26376
  type: "button",
26210
26377
  title: n.label,
@@ -26218,7 +26385,7 @@ var kI = 3e4, AI = /* @__PURE__ */ new Set(), jI, MI = () => {
26218
26385
  //#endregion
26219
26386
  //#region src/components/filter-select.tsx
26220
26387
  V();
26221
- var $I = H`
26388
+ var oL = H`
26222
26389
  display: flex;
26223
26390
  flex-direction: column;
26224
26391
  gap: 0.7rem;
@@ -26267,7 +26434,7 @@ var $I = H`
26267
26434
  }
26268
26435
 
26269
26436
  .control.open .chevron { transform: rotate(180deg); }
26270
- `, eL = H`
26437
+ `, sL = H`
26271
26438
  z-index: ${$_.filterMenu};
26272
26439
  width: max-content;
26273
26440
  min-width: 22rem;
@@ -26341,7 +26508,7 @@ var $I = H`
26341
26508
  font-size: 1.4rem;
26342
26509
  color: rgba(255, 255, 255, 0.4);
26343
26510
  }
26344
- `, tL = ({ label: e, placeholder: t = "Any", options: n, selected: r, onChange: i, multiple: a = !1, searchable: o = !1, allowCustom: s = !1 }) => {
26511
+ `, cL = ({ label: e, placeholder: t = "Any", options: n, selected: r, onChange: i, multiple: a = !1, searchable: o = !1, allowCustom: s = !1 }) => {
26345
26512
  let [c, l] = I(!1), [u, d] = I(""), f = `filter-${e.toLowerCase().replace(/[^a-z]+/g, "-")}`, { refs: p, floatingStyles: m, context: h } = M_({
26346
26513
  open: c,
26347
26514
  onOpenChange: (e) => {
@@ -26382,7 +26549,7 @@ var $I = H`
26382
26549
  i(r.includes(e) ? r.filter((t) => t !== e) : [...r, e]);
26383
26550
  };
26384
26551
  return /* @__PURE__ */ X("div", {
26385
- css: $I,
26552
+ css: oL,
26386
26553
  children: [
26387
26554
  /* @__PURE__ */ Y("span", {
26388
26555
  className: "label",
@@ -26409,7 +26576,7 @@ var $I = H`
26409
26576
  initialFocus: o ? 0 : -1,
26410
26577
  children: /* @__PURE__ */ X("div", {
26411
26578
  ref: p.setFloating,
26412
- css: eL,
26579
+ css: sL,
26413
26580
  style: m,
26414
26581
  ..._(),
26415
26582
  children: [o && /* @__PURE__ */ X("div", {
@@ -26446,8 +26613,8 @@ var $I = H`
26446
26613
  }) })
26447
26614
  ]
26448
26615
  });
26449
- }, nL = ({ label: e, children: t }) => /* @__PURE__ */ X("div", {
26450
- css: $I,
26616
+ }, lL = ({ label: e, children: t }) => /* @__PURE__ */ X("div", {
26617
+ css: oL,
26451
26618
  children: [/* @__PURE__ */ Y("span", {
26452
26619
  className: "label",
26453
26620
  children: e
@@ -26456,7 +26623,7 @@ var $I = H`
26456
26623
  //#endregion
26457
26624
  //#region src/router/search/index.tsx
26458
26625
  V();
26459
- var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n"), iL = H`
26626
+ var uL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDescriptionInput: MediaShortDescriptionInput!) {\n mediaPage(input: $input) {\n nodes {\n ...MediaFragment\n score\n episodeCount\n titles {\n language\n title\n score\n }\n shortDescriptions(input: $shortDescriptionInput) {\n language\n shortDescription\n }\n covers {\n language\n url\n color\n }\n banners {\n language\n url\n }\n trailers {\n uri\n origin\n id\n url\n thumbnail\n }\n popularity\n genres\n tags\n averageScore\n status\n type\n season\n seasonYear\n nextAiringEpisode {\n episodeNumber\n airingAt\n }\n }\n }\n }\n"), dL = H`
26460
26627
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
26461
26628
  min-height: 100vh;
26462
26629
 
@@ -26593,14 +26760,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26593
26760
  gap: 1.2rem;
26594
26761
  }
26595
26762
  }
26596
- `, aL = (() => {
26763
+ `, fL = (() => {
26597
26764
  let e = [];
26598
26765
  for (let t = md(); t >= pd; t--) e.push({
26599
26766
  value: String(t),
26600
26767
  label: String(t)
26601
26768
  });
26602
26769
  return e;
26603
- })(), oL = (e) => ({
26770
+ })(), pL = (e) => ({
26604
26771
  ...e.query ? { search: e.query } : { sorts: [Pu.PopularityDesc] },
26605
26772
  ...e.category ? { categories: [e.category] } : {},
26606
26773
  ...e.status ? { status: e.status } : {},
@@ -26609,7 +26776,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26609
26776
  ...e.formats.length ? { formats: e.formats } : {},
26610
26777
  ...e.genres.length ? { genres: e.genres } : {},
26611
26778
  ...e.tags.length ? { tags: e.tags } : {}
26612
- }), sL = () => {
26779
+ }), mL = () => {
26613
26780
  let e = gu(), [, t] = hu(), n = z(() => gd(e), [e]), r = Td(n), i = Ed(n), a = (e) => t(bd({
26614
26781
  ...n,
26615
26782
  ...e
@@ -26621,15 +26788,15 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26621
26788
  let e = setTimeout(() => a({ query: o }), 350);
26622
26789
  return () => clearTimeout(e);
26623
26790
  }, [o, e]);
26624
- let l = z(() => oL(n), [n]), [{ data: u }] = Ho({
26625
- query: rL,
26791
+ let l = z(() => pL(n), [n]), [{ data: u }] = Ho({
26792
+ query: uL,
26626
26793
  variables: {
26627
26794
  input: l,
26628
26795
  shortDescriptionInput: { count: 1 }
26629
26796
  },
26630
26797
  pause: !i
26631
- }), [d, f] = I(JI), p = (e) => {
26632
- f(e), YI(e);
26798
+ }), [d, f] = I(tL), p = (e) => {
26799
+ f(e), nL(e);
26633
26800
  }, [m, h] = I(!1);
26634
26801
  L(() => {
26635
26802
  h(!1);
@@ -26676,14 +26843,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26676
26843
  },
26677
26844
  card: {
26678
26845
  className: "cards",
26679
- item: (e) => /* @__PURE__ */ Y(zI, {
26846
+ item: (e) => /* @__PURE__ */ Y(KI, {
26680
26847
  media: e,
26681
26848
  to: Au(K.MEDIA, { uri: e.uri })
26682
26849
  }, e._id)
26683
26850
  },
26684
26851
  list: {
26685
26852
  className: "rows",
26686
- item: (e) => /* @__PURE__ */ Y(VI, {
26853
+ item: (e) => /* @__PURE__ */ Y(JI, {
26687
26854
  media: e,
26688
26855
  to: Au(K.MEDIA, { uri: e.uri })
26689
26856
  }, e._id)
@@ -26726,14 +26893,14 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26726
26893
  }))
26727
26894
  ];
26728
26895
  return /* @__PURE__ */ X("div", {
26729
- css: iL,
26896
+ css: dL,
26730
26897
  children: [
26731
26898
  /* @__PURE__ */ X("div", {
26732
26899
  className: "heading-row",
26733
26900
  children: [/* @__PURE__ */ Y("div", {
26734
26901
  className: "heading",
26735
26902
  children: xd(n)
26736
- }), /* @__PURE__ */ Y(QI, {
26903
+ }), /* @__PURE__ */ Y(aL, {
26737
26904
  mode: d,
26738
26905
  onChange: p
26739
26906
  })]
@@ -26741,7 +26908,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26741
26908
  /* @__PURE__ */ X("div", {
26742
26909
  className: "filters",
26743
26910
  children: [
26744
- /* @__PURE__ */ Y(nL, {
26911
+ /* @__PURE__ */ Y(lL, {
26745
26912
  label: "Search",
26746
26913
  children: /* @__PURE__ */ X("div", {
26747
26914
  className: "text-field",
@@ -26755,7 +26922,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26755
26922
  })]
26756
26923
  })
26757
26924
  }),
26758
- /* @__PURE__ */ Y(tL, {
26925
+ /* @__PURE__ */ Y(cL, {
26759
26926
  label: "Genres & Tags",
26760
26927
  options: [...y, ...b],
26761
26928
  selected: S,
@@ -26764,33 +26931,33 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26764
26931
  searchable: !0,
26765
26932
  allowCustom: !0
26766
26933
  }),
26767
- /* @__PURE__ */ Y(tL, {
26934
+ /* @__PURE__ */ Y(cL, {
26768
26935
  label: "Year",
26769
- options: aL,
26936
+ options: fL,
26770
26937
  selected: n.year ? [String(n.year)] : [],
26771
26938
  onChange: (e) => a({ year: e.length ? Number(e[0]) : null }),
26772
26939
  searchable: !0
26773
26940
  }),
26774
- /* @__PURE__ */ Y(tL, {
26941
+ /* @__PURE__ */ Y(cL, {
26775
26942
  label: "Season",
26776
26943
  options: td,
26777
26944
  selected: n.season ? [n.season] : [],
26778
26945
  onChange: (e) => a({ season: e[0] ?? null })
26779
26946
  }),
26780
- /* @__PURE__ */ Y(tL, {
26947
+ /* @__PURE__ */ Y(cL, {
26781
26948
  label: "Format",
26782
26949
  options: $u,
26783
26950
  selected: n.formats,
26784
26951
  onChange: (e) => a({ formats: e }),
26785
26952
  multiple: !0
26786
26953
  }),
26787
- /* @__PURE__ */ Y(tL, {
26954
+ /* @__PURE__ */ Y(cL, {
26788
26955
  label: "Airing Status",
26789
26956
  options: ed,
26790
26957
  selected: n.status ? [n.status] : [],
26791
26958
  onChange: (e) => a({ status: e[0] ?? null })
26792
26959
  }),
26793
- /* @__PURE__ */ Y(tL, {
26960
+ /* @__PURE__ */ Y(cL, {
26794
26961
  label: "Category",
26795
26962
  options: nd,
26796
26963
  selected: n.category ? [n.category] : [],
@@ -26836,7 +27003,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26836
27003
  })
26837
27004
  ]
26838
27005
  });
26839
- }, cL = H`
27006
+ }, hL = H`
26840
27007
  max-width: 72rem;
26841
27008
  margin: 0 auto;
26842
27009
  padding: calc(var(--stub-header-height) + 3rem) 3rem 6rem;
@@ -26875,10 +27042,10 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26875
27042
  color: #ff8a3d;
26876
27043
  }
26877
27044
  }
26878
- `, lL = ({ children: e }) => /* @__PURE__ */ Y("div", {
26879
- css: cL,
27045
+ `, gL = ({ children: e }) => /* @__PURE__ */ Y("div", {
27046
+ css: hL,
26880
27047
  children: e
26881
- }), uL = () => /* @__PURE__ */ X(lL, { children: [
27048
+ }), _L = () => /* @__PURE__ */ X(gL, { children: [
26882
27049
  /* @__PURE__ */ Y("h1", { children: "Legal & Terms" }),
26883
27050
  /* @__PURE__ */ Y("div", {
26884
27051
  className: "updated",
@@ -26913,12 +27080,12 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26913
27080
  ] }),
26914
27081
  /* @__PURE__ */ Y("h2", { children: "Liability" }),
26915
27082
  /* @__PURE__ */ Y("p", { children: "stub is provided without warranty of any kind. The maintainer is not liable for any damages arising from its use, or for the availability, accuracy, or legality of any third-party service it connects to." })
26916
- ] }), dL = "stub.player.volume", fL = "This browser, in its storage for stub at this address", pL = "This tab, in its storage for stub", mL = [
27083
+ ] }), vL = "stub.player.volume", yL = "This browser, in its storage for stub at this address", bL = "This tab, in its storage for stub", xL = [
26917
27084
  {
26918
27085
  id: "added-sources",
26919
27086
  title: "Added sources",
26920
27087
  what: "The source packages you added from npm, installed for stub through FKN.",
26921
- where: fL,
27088
+ where: yL,
26922
27089
  lasts: "Until you remove them",
26923
27090
  keys: {
26924
27091
  store: "local",
@@ -26929,7 +27096,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26929
27096
  id: "turned-off-sources",
26930
27097
  title: "Sources turned off",
26931
27098
  what: "Which of the sources stub ships with you turned off, so stub does not ask them.",
26932
- where: fL,
27099
+ where: yL,
26933
27100
  lasts: "Until you turn them back on",
26934
27101
  keys: {
26935
27102
  store: "local",
@@ -26940,18 +27107,18 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26940
27107
  id: "search-layout",
26941
27108
  title: "Search layout",
26942
27109
  what: "Whether search shows covers, cards or a list.",
26943
- where: fL,
27110
+ where: yL,
26944
27111
  lasts: "Until you clear this site's data in your browser",
26945
27112
  keys: {
26946
27113
  store: "local",
26947
- names: [WI]
27114
+ names: [ZI]
26948
27115
  }
26949
27116
  },
26950
27117
  {
26951
27118
  id: "quick-tracking",
26952
27119
  title: "Quick tracking choices",
26953
27120
  what: "The trackers you chose not to save to from the tracking row.",
26954
- where: fL,
27121
+ where: yL,
26955
27122
  lasts: "Until you clear this site's data in your browser",
26956
27123
  keys: {
26957
27124
  store: "local",
@@ -26962,7 +27129,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26962
27129
  id: "connected-sites",
26963
27130
  title: "Connected tracking sites",
26964
27131
  what: "Which of AniList and MyAnimeList you signed in to through stub on this device, so stub reaches only those.",
26965
- where: fL,
27132
+ where: yL,
26966
27133
  lasts: "Until you sign out of them",
26967
27134
  keys: {
26968
27135
  store: "local",
@@ -26973,7 +27140,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26973
27140
  id: "site-status",
26974
27141
  title: "Site sign-in states",
26975
27142
  what: "Whether you were signed in to Crunchyroll, AniList and MyAnimeList when stub last learned it, and when. Never your name there.",
26976
- where: fL,
27143
+ where: yL,
26977
27144
  lasts: "Until stub learns it again, or you clear this site's data in your browser",
26978
27145
  keys: {
26979
27146
  store: "local",
@@ -26984,7 +27151,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26984
27151
  id: "party-name",
26985
27152
  title: "Party name",
26986
27153
  what: "The name you gave yourself in a watch party.",
26987
- where: pL,
27154
+ where: bL,
26988
27155
  lasts: "Until you close the tab",
26989
27156
  keys: {
26990
27157
  store: "session",
@@ -26995,7 +27162,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
26995
27162
  id: "party-invite",
26996
27163
  title: "Party you are in",
26997
27164
  what: "The watch party this tab is in, so a reload rejoins it.",
26998
- where: pL,
27165
+ where: bL,
26999
27166
  lasts: "Until you leave the party or close the tab",
27000
27167
  keys: {
27001
27168
  store: "session",
@@ -27027,11 +27194,11 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27027
27194
  id: "player",
27028
27195
  title: "Player volume",
27029
27196
  what: "The volume you last left the episode player at, and whether it was muted, so the next episode starts the same. Speed and captions are not kept.",
27030
- where: fL,
27197
+ where: yL,
27031
27198
  lasts: "Until you clear this site's data in your browser",
27032
27199
  keys: {
27033
27200
  store: "local",
27034
- names: [dL]
27201
+ names: [vL]
27035
27202
  }
27036
27203
  },
27037
27204
  {
@@ -27041,7 +27208,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27041
27208
  where: "Memory, in this tab",
27042
27209
  lasts: "Until you refresh or close the tab"
27043
27210
  }
27044
- ], hL = H`
27211
+ ], SL = H`
27045
27212
  display: flex;
27046
27213
  flex-direction: column;
27047
27214
  gap: 1rem;
@@ -27056,7 +27223,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27056
27223
 
27057
27224
  strong { color: #fff; }
27058
27225
  .facts { color: rgba(255, 255, 255, 0.55); }
27059
- `, gL = (e) => e.endsWith(".") ? e : `${e}.`, _L = () => /* @__PURE__ */ X(lL, { children: [
27226
+ `, CL = (e) => e.endsWith(".") ? e : `${e}.`, wL = () => /* @__PURE__ */ X(gL, { children: [
27060
27227
  /* @__PURE__ */ Y("h1", { children: "Privacy" }),
27061
27228
  /* @__PURE__ */ Y("div", {
27062
27229
  className: "updated",
@@ -27080,8 +27247,8 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27080
27247
  ". Clearing this site's data in your browser removes everything stub keeps in this browser."
27081
27248
  ] }),
27082
27249
  /* @__PURE__ */ Y("ul", {
27083
- css: hL,
27084
- children: mL.map((e) => /* @__PURE__ */ X("li", { children: [
27250
+ css: SL,
27251
+ children: xL.map((e) => /* @__PURE__ */ X("li", { children: [
27085
27252
  /* @__PURE__ */ X("strong", { children: [e.title, "."] }),
27086
27253
  " ",
27087
27254
  e.what,
@@ -27090,9 +27257,9 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27090
27257
  className: "facts",
27091
27258
  children: [
27092
27259
  "Where: ",
27093
- gL(e.where),
27260
+ CL(e.where),
27094
27261
  " How long: ",
27095
- gL(e.lasts)
27262
+ CL(e.lasts)
27096
27263
  ]
27097
27264
  })
27098
27265
  ] }, e.id))
@@ -27140,7 +27307,7 @@ var rL = iy("\n subscription SearchMediaPage($input: MediaPageInput!, $shortDes
27140
27307
  //#endregion
27141
27308
  //#region src/router/settings/confirm.tsx
27142
27309
  V();
27143
- var vL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, onConfirm: a, home: o }) => {
27310
+ var TL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, onConfirm: a, home: o }) => {
27144
27311
  let [s, c] = I(!1), [l, u] = I(!1), d = R(null), f = R(null), p = R(null), m = R(!1), h = R(!0), g = ht(), _ = () => {
27145
27312
  let e = document.activeElement;
27146
27313
  return !e || e === document.body || !!p.current?.contains(e);
@@ -27196,7 +27363,7 @@ var vL = ({ label: e, name: t = e, confirmLabel: n, busyLabel: r, question: i, o
27196
27363
  //#endregion
27197
27364
  //#region src/router/settings/accounts.tsx
27198
27365
  V();
27199
- var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27366
+ var EL = (e) => e instanceof Error ? e.message : String(e), DL = (e, t) => {
27200
27367
  switch (t) {
27201
27368
  case "authed": return { text: `Signed in to ${e}.` };
27202
27369
  case "closed": return { text: "The sign-in window closed. If you finished signing in there, stub reads it from now on." };
@@ -27206,17 +27373,17 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27206
27373
  };
27207
27374
  case "unsupported": return { text: `Connected to your browser's own ${e} session.` };
27208
27375
  }
27209
- }, xL = {
27376
+ }, OL = {
27210
27377
  "signed-in": "Signed in",
27211
27378
  "signed-out": "Signed out"
27212
- }, SL = (e, t) => {
27213
- let n = DI(t - e.checkedAt, 1);
27214
- return `${xL[e.state]}, checked ${n ? `${n} ago` : "just now"}`;
27215
- }, CL = (e, t) => {
27379
+ }, kL = (e, t) => {
27380
+ let n = PI(t - e.checkedAt, 1);
27381
+ return `${OL[e.state]}, checked ${n ? `${n} ago` : "just now"}`;
27382
+ }, AL = (e, t) => {
27216
27383
  let [, n] = I(0);
27217
27384
  return L(() => e.watch(t, () => n((e) => e + 1)), [e, t]), e.read(t);
27218
- }, wL = ({ site: e, name: t, backend: n, status: r, onNote: i }) => {
27219
- let [a, o] = I(!1), s = DL();
27385
+ }, jL = ({ site: e, name: t, backend: n, status: r, onNote: i }) => {
27386
+ let [a, o] = I(!1), s = PL();
27220
27387
  return /* @__PURE__ */ Y("button", {
27221
27388
  type: "button",
27222
27389
  className: "secondary",
@@ -27225,7 +27392,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27225
27392
  onClick: () => {
27226
27393
  o(!0), i(void 0), r.check(e, n).catch((e) => {
27227
27394
  s.current && i({
27228
- text: `stub could not tell whether you are signed in to ${t}: ${yL(e)}`,
27395
+ text: `stub could not tell whether you are signed in to ${t}: ${EL(e)}`,
27229
27396
  error: !0
27230
27397
  });
27231
27398
  }).finally(() => {
@@ -27234,7 +27401,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27234
27401
  },
27235
27402
  children: a ? "Checking..." : "Check now"
27236
27403
  });
27237
- }, TL = ({ id: e, title: t, state: n, on: r, heading: i, children: a }) => /* @__PURE__ */ X("div", {
27404
+ }, ML = ({ id: e, title: t, state: n, on: r, heading: i, children: a }) => /* @__PURE__ */ X("div", {
27238
27405
  className: "row account",
27239
27406
  "data-account": e,
27240
27407
  children: [/* @__PURE__ */ X("div", {
@@ -27248,32 +27415,32 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27248
27415
  children: n
27249
27416
  }) : void 0]
27250
27417
  }), a]
27251
- }), EL = ({ note: e }) => /* @__PURE__ */ Y("p", {
27418
+ }), NL = ({ note: e }) => /* @__PURE__ */ Y("p", {
27252
27419
  className: `note${e?.error ? " error" : ""}`,
27253
27420
  role: "status",
27254
27421
  children: e?.text
27255
- }), DL = () => {
27422
+ }), PL = () => {
27256
27423
  let e = R(!0);
27257
27424
  return L(() => () => {
27258
27425
  e.current = !1;
27259
27426
  }, []), e;
27260
- }, OL = "Without the FKN extension, the session is kept by FKN, in the cookie jar every fkn.app app shares, and not by stub.", kL = (e) => `${e} itself is not told, so the session stays valid there until it expires, held by nobody.`, AL = ({ backend: e, crunchyroll: t, status: n, now: r }) => {
27261
- let [i, a] = I(!1), [o, s] = I(), c = DL(), l = R(null), u = CL(n, "crunchyroll"), d = e ? /* @__PURE__ */ Y(wL, {
27427
+ }, FL = "Without the FKN extension, the session is kept by FKN, in the cookie jar every fkn.app app shares, and not by stub.", IL = (e) => `${e} itself is not told, so the session stays valid there until it expires, held by nobody.`, LL = ({ backend: e, crunchyroll: t, status: n, now: r }) => {
27428
+ let [i, a] = I(!1), [o, s] = I(), c = PL(), l = R(null), u = AL(n, "crunchyroll"), d = e ? /* @__PURE__ */ Y(jL, {
27262
27429
  site: "crunchyroll",
27263
27430
  name: "Crunchyroll",
27264
27431
  backend: e,
27265
27432
  status: n,
27266
27433
  onNote: s
27267
27434
  }) : void 0;
27268
- return /* @__PURE__ */ X(TL, {
27435
+ return /* @__PURE__ */ X(ML, {
27269
27436
  id: "crunchyroll",
27270
27437
  title: "Crunchyroll",
27271
- state: u ? SL(u, r()) : "Not checked yet",
27438
+ state: u ? kL(u, r()) : "Not checked yet",
27272
27439
  on: u?.state === "signed-in",
27273
27440
  heading: l,
27274
27441
  children: [
27275
27442
  /* @__PURE__ */ Y("p", { children: "Plays Crunchyroll episodes on your own Crunchyroll account." }),
27276
- e === "cloud" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("p", { children: [OL, " Check now asks Crunchyroll whether that session is signed in, without loading a Crunchyroll page."] }), /* @__PURE__ */ X("div", {
27443
+ e === "cloud" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("p", { children: [FL, " Check now asks Crunchyroll whether that session is signed in, without loading a Crunchyroll page."] }), /* @__PURE__ */ X("div", {
27277
27444
  className: "actions",
27278
27445
  children: [
27279
27446
  u?.state === "signed-in" ? void 0 : /* @__PURE__ */ Y("button", {
@@ -27282,10 +27449,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27282
27449
  onClick: () => {
27283
27450
  let e = t.signIn();
27284
27451
  a(!0), s(void 0), e.then((e) => {
27285
- c.current && s(bL("Crunchyroll", e));
27452
+ c.current && s(DL("Crunchyroll", e));
27286
27453
  }).catch((e) => {
27287
27454
  c.current && s({
27288
- text: yL(e),
27455
+ text: EL(e),
27289
27456
  error: !0
27290
27457
  });
27291
27458
  }).finally(() => {
@@ -27294,18 +27461,18 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27294
27461
  },
27295
27462
  children: i ? "Signing in..." : "Sign in"
27296
27463
  }),
27297
- u?.state === "signed-out" ? void 0 : /* @__PURE__ */ Y(vL, {
27464
+ u?.state === "signed-out" ? void 0 : /* @__PURE__ */ Y(TL, {
27298
27465
  label: "Sign out",
27299
27466
  name: "Sign out of Crunchyroll",
27300
27467
  home: l,
27301
27468
  confirmLabel: "Yes, sign out",
27302
27469
  busyLabel: "Signing out...",
27303
- question: `Sign out of Crunchyroll? This removes its cookies from FKN's jar, which signs every fkn.app app out of Crunchyroll. ${kL("Crunchyroll")}`,
27470
+ question: `Sign out of Crunchyroll? This removes its cookies from FKN's jar, which signs every fkn.app app out of Crunchyroll. ${IL("Crunchyroll")}`,
27304
27471
  onConfirm: () => t.signOut().then(() => {
27305
27472
  c.current && s({ text: "Signed out. FKN no longer holds a Crunchyroll session for fkn.app apps." });
27306
27473
  }, (e) => {
27307
27474
  c.current && s({
27308
- text: `FKN could not remove the Crunchyroll cookies: ${yL(e)}. Try again.`,
27475
+ text: `FKN could not remove the Crunchyroll cookies: ${EL(e)}. Try again.`,
27309
27476
  error: !0
27310
27477
  });
27311
27478
  })
@@ -27322,10 +27489,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27322
27489
  children: "Open crunchyroll.com"
27323
27490
  }), d]
27324
27491
  })] }) : /* @__PURE__ */ Y("p", { children: "Checking whether the FKN extension runs here..." }),
27325
- /* @__PURE__ */ Y(EL, { note: o })
27492
+ /* @__PURE__ */ Y(NL, { note: o })
27326
27493
  ]
27327
27494
  });
27328
- }, jL = [{
27495
+ }, RL = [{
27329
27496
  site: "anilist",
27330
27497
  name: "AniList",
27331
27498
  host: "anilist.co"
@@ -27333,8 +27500,8 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27333
27500
  site: "mal",
27334
27501
  name: "MyAnimeList",
27335
27502
  host: "myanimelist.net"
27336
- }], ML = ({ site: e, name: t, host: n, backend: r, sites: i, status: a, now: o }) => {
27337
- let [s, c] = I(() => i.isConnected(e)), [l, u] = I(!1), [d, f] = I(), p = DL(), m = R(null), h = CL(a, e);
27503
+ }], zL = ({ site: e, name: t, host: n, backend: r, sites: i, status: a, now: o }) => {
27504
+ let [s, c] = I(() => i.isConnected(e)), [l, u] = I(!1), [d, f] = I(), p = PL(), m = R(null), h = AL(a, e);
27338
27505
  L(() => (c(i.isConnected(e)), i.watch(e, () => {
27339
27506
  p.current && c(i.isConnected(e));
27340
27507
  })), [i, e]);
@@ -27343,10 +27510,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27343
27510
  }, _ = () => {
27344
27511
  let n = i.signIn(e);
27345
27512
  u(!0), f(void 0), n.then((e) => {
27346
- p.current && f(bL(t, e));
27513
+ p.current && f(DL(t, e));
27347
27514
  }).catch((e) => {
27348
27515
  p.current && f({
27349
- text: yL(e),
27516
+ text: EL(e),
27350
27517
  error: !0
27351
27518
  });
27352
27519
  }).finally(() => {
@@ -27356,14 +27523,14 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27356
27523
  p.current && f({ text: r === "cloud" ? `Signed out. stub no longer uses ${t} on this device, and FKN no longer holds its session.` : `Disconnected. To sign out of ${t} itself, sign out on ${n}.` }), g();
27357
27524
  }, (e) => {
27358
27525
  p.current && f({
27359
- text: `Disconnected on this device, but FKN could not remove the ${t} cookies: ${yL(e)}. Sign in and out again to retry.`,
27526
+ text: `Disconnected on this device, but FKN could not remove the ${t} cookies: ${EL(e)}. Sign in and out again to retry.`,
27360
27527
  error: !0
27361
27528
  }), g();
27362
27529
  });
27363
- return /* @__PURE__ */ X(TL, {
27530
+ return /* @__PURE__ */ X(ML, {
27364
27531
  id: e,
27365
27532
  title: t,
27366
- state: s ? h ? SL(h, o()) : "Connected on this device" : "Not connected",
27533
+ state: s ? h ? kL(h, o()) : "Connected on this device" : "Not connected",
27367
27534
  on: s && h?.state !== "signed-out",
27368
27535
  heading: m,
27369
27536
  children: [
@@ -27374,24 +27541,24 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27374
27541
  n,
27375
27542
  " session.",
27376
27543
  " ",
27377
- r === "cloud" ? OL : r === "extension" ? `With the FKN extension, stub uses your browser's own ${n} session.` : ""
27544
+ r === "cloud" ? FL : r === "extension" ? `With the FKN extension, stub uses your browser's own ${n} session.` : ""
27378
27545
  ] }),
27379
27546
  r ? /* @__PURE__ */ X("div", {
27380
27547
  className: "actions",
27381
- children: [s ? /* @__PURE__ */ Y(vL, {
27548
+ children: [s ? /* @__PURE__ */ Y(TL, {
27382
27549
  label: r === "cloud" ? "Sign out" : "Disconnect",
27383
27550
  name: r === "cloud" ? `Sign out of ${t}` : `Disconnect ${t}`,
27384
27551
  home: m,
27385
27552
  confirmLabel: r === "cloud" ? "Yes, sign out" : "Yes, disconnect",
27386
27553
  busyLabel: r === "cloud" ? "Signing out..." : "Disconnecting...",
27387
- question: r === "cloud" ? `Sign out of ${t}? stub stops using it on this device, and its cookies leave FKN's jar, which signs every fkn.app app out of ${t}. ${kL(t)}` : `Disconnect ${t}? stub stops using your ${n} session on this device. You stay signed in on ${n}.`,
27554
+ question: r === "cloud" ? `Sign out of ${t}? stub stops using it on this device, and its cookies leave FKN's jar, which signs every fkn.app app out of ${t}. ${IL(t)}` : `Disconnect ${t}? stub stops using your ${n} session on this device. You stay signed in on ${n}.`,
27388
27555
  onConfirm: () => v(r)
27389
27556
  }) : /* @__PURE__ */ Y("button", {
27390
27557
  type: "button",
27391
27558
  disabled: l,
27392
27559
  onClick: _,
27393
27560
  children: l ? "Signing in..." : r === "cloud" ? "Sign in" : "Connect"
27394
- }), s ? /* @__PURE__ */ Y(wL, {
27561
+ }), s ? /* @__PURE__ */ Y(jL, {
27395
27562
  site: e,
27396
27563
  name: t,
27397
27564
  backend: r,
@@ -27399,10 +27566,10 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27399
27566
  onNote: f
27400
27567
  }) : void 0]
27401
27568
  }) : void 0,
27402
- /* @__PURE__ */ Y(EL, { note: d })
27569
+ /* @__PURE__ */ Y(NL, { note: d })
27403
27570
  ]
27404
27571
  });
27405
- }, NL = ({ backend: e }) => /* @__PURE__ */ Y(TL, {
27572
+ }, BL = ({ backend: e }) => /* @__PURE__ */ Y(ML, {
27406
27573
  id: "netflix",
27407
27574
  title: "Netflix",
27408
27575
  children: e === "extension" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("p", { children: "stub plays Netflix on your browser's own netflix.com session, through the FKN extension, and keeps nothing of it. Sign in and out on netflix.com." }), /* @__PURE__ */ Y("div", {
@@ -27415,25 +27582,25 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27415
27582
  children: "Open netflix.com"
27416
27583
  })
27417
27584
  })] }) : /* @__PURE__ */ Y("p", { children: "Netflix needs the FKN browser extension: stub plays it on your browser's own netflix.com session, and keeps nothing of it." })
27418
- }), PL = ({ backend: e, crunchyroll: t, sites: n, status: r, now: i = Date.now }) => /* @__PURE__ */ X("div", {
27585
+ }), VL = ({ backend: e, crunchyroll: t, sites: n, status: r, now: i = Date.now }) => /* @__PURE__ */ X("div", {
27419
27586
  className: "rows",
27420
27587
  children: [
27421
- /* @__PURE__ */ Y(AL, {
27588
+ /* @__PURE__ */ Y(LL, {
27422
27589
  backend: e,
27423
27590
  crunchyroll: t,
27424
27591
  status: r,
27425
27592
  now: i
27426
27593
  }),
27427
- jL.map((t) => /* @__PURE__ */ Y(ML, {
27594
+ RL.map((t) => /* @__PURE__ */ Y(zL, {
27428
27595
  ...t,
27429
27596
  backend: e,
27430
27597
  sites: n,
27431
27598
  status: r,
27432
27599
  now: i
27433
27600
  }, t.site)),
27434
- /* @__PURE__ */ Y(NL, { backend: e })
27601
+ /* @__PURE__ */ Y(BL, { backend: e })
27435
27602
  ]
27436
- }), FL = [{
27603
+ }), HL = [{
27437
27604
  id: "accounts",
27438
27605
  title: "Accounts",
27439
27606
  intro: "The sites where stub uses your own account, what each one is for, and how to sign out."
@@ -27441,7 +27608,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27441
27608
  id: "sources",
27442
27609
  title: "Sources",
27443
27610
  intro: "Where stub gets titles, artwork and streams: the sources it ships with, and the ones you add."
27444
- }], IL = (e) => FL.find((t) => `#${t.id}` === e)?.id ?? "accounts", LL = [
27611
+ }], UL = (e) => HL.find((t) => `#${t.id}` === e)?.id ?? "accounts", WL = [
27445
27612
  {
27446
27613
  origin: "mal",
27447
27614
  name: "MyAnimeList",
@@ -27527,6 +27694,11 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27527
27694
  name: "Kitsu",
27528
27695
  url: "https://kitsu.io"
27529
27696
  },
27697
+ {
27698
+ origin: "livechart",
27699
+ name: "LiveChart",
27700
+ url: "https://www.livechart.me"
27701
+ },
27530
27702
  {
27531
27703
  origin: "omdb",
27532
27704
  name: "IMDb",
@@ -27561,7 +27733,7 @@ var yL = (e) => e instanceof Error ? e.message : String(e), bL = (e, t) => {
27561
27733
  //#endregion
27562
27734
  //#region src/router/settings/sources.tsx
27563
27735
  V();
27564
- var RL = H`
27736
+ var GL = H`
27565
27737
  h3.part {
27566
27738
  font-size: 1.3rem;
27567
27739
  font-weight: 700;
@@ -27804,11 +27976,11 @@ var RL = H`
27804
27976
 
27805
27977
  .hint { font-size: 1.25rem; color: rgba(255, 255, 255, 0.5); }
27806
27978
  .by-address .note { font-size: 1.35rem; overflow-wrap: anywhere; }
27807
- `, zL = {
27979
+ `, KL = {
27808
27980
  connected: "Connected",
27809
27981
  connecting: "Connecting",
27810
27982
  error: "Error"
27811
- }, BL = (e) => e instanceof Error ? e.message : String(e), VL = ({ plugin: e, onRemove: t }) => {
27983
+ }, qL = (e) => e instanceof Error ? e.message : String(e), JL = ({ plugin: e, onRemove: t }) => {
27812
27984
  let n = e.sources ?? [], r = n.length ? n.map((e) => e.name).join(", ") : e.uri.replace(/^npm:/, "");
27813
27985
  return /* @__PURE__ */ X("li", {
27814
27986
  className: "row plugin",
@@ -27837,7 +28009,7 @@ var RL = H`
27837
28009
  children: [/* @__PURE__ */ Y("span", {
27838
28010
  className: "dot",
27839
28011
  "aria-hidden": "true"
27840
- }), zL[e.state]]
28012
+ }), KL[e.state]]
27841
28013
  }),
27842
28014
  /* @__PURE__ */ Y("button", {
27843
28015
  type: "button",
@@ -27852,13 +28024,13 @@ var RL = H`
27852
28024
  }) : void 0
27853
28025
  ]
27854
28026
  });
27855
- }, HL = (e) => {
28027
+ }, YL = (e) => {
27856
28028
  let { host: t, pathname: n } = new URL(e);
27857
28029
  return t.replace(/^www\./, "") + n.replace(/\/$/, "");
27858
- }, UL = () => {
28030
+ }, XL = () => {
27859
28031
  let [e, t] = I(() => new Set(ee()));
27860
28032
  L(() => me(() => t(new Set(ee()))), []);
27861
- let n = LL.filter((t) => e.has(t.origin)).length;
28033
+ let n = WL.filter((t) => e.has(t.origin)).length;
27862
28034
  return /* @__PURE__ */ X(J, { children: [
27863
28035
  /* @__PURE__ */ X("div", {
27864
28036
  className: "part-head",
@@ -27869,7 +28041,7 @@ var RL = H`
27869
28041
  }),
27870
28042
  /* @__PURE__ */ Y("span", {
27871
28043
  className: "count",
27872
- children: n ? `${LL.length - n} of ${LL.length} on` : `All ${LL.length} on`
28044
+ children: n ? `${WL.length - n} of ${WL.length} on` : `All ${WL.length} on`
27873
28045
  }),
27874
28046
  /* @__PURE__ */ Y("button", {
27875
28047
  type: "button",
@@ -27888,7 +28060,7 @@ var RL = H`
27888
28060
  }),
27889
28061
  /* @__PURE__ */ Y("ul", {
27890
28062
  className: "built-in",
27891
- children: LL.map((t) => {
28063
+ children: WL.map((t) => {
27892
28064
  let n = !e.has(t.origin);
27893
28065
  return /* @__PURE__ */ Y("li", {
27894
28066
  "data-source": t.origin,
@@ -27901,7 +28073,7 @@ var RL = H`
27901
28073
  children: t.name
27902
28074
  }), /* @__PURE__ */ Y("span", {
27903
28075
  className: "host",
27904
- children: HL(t.url)
28076
+ children: YL(t.url)
27905
28077
  })]
27906
28078
  }), /* @__PURE__ */ Y("input", {
27907
28079
  type: "checkbox",
@@ -27915,12 +28087,12 @@ var RL = H`
27915
28087
  })
27916
28088
  })
27917
28089
  ] });
27918
- }, WL = () => {
28090
+ }, ZL = () => {
27919
28091
  let [e, t] = I(ss), [n, r] = I(""), [i, a] = I(!1), [o, s] = I(""), c = ht(), l = () => t(ss());
27920
28092
  return L(() => (l(), os(l)), []), /* @__PURE__ */ X("div", {
27921
- css: RL,
28093
+ css: GL,
27922
28094
  children: [
27923
- /* @__PURE__ */ Y(UL, {}),
28095
+ /* @__PURE__ */ Y(XL, {}),
27924
28096
  /* @__PURE__ */ Y("h3", {
27925
28097
  className: "part",
27926
28098
  children: "Added"
@@ -27931,7 +28103,7 @@ var RL = H`
27931
28103
  }),
27932
28104
  e.length ? /* @__PURE__ */ Y("ul", {
27933
28105
  className: "rows",
27934
- children: e.map((e) => /* @__PURE__ */ Y(VL, {
28106
+ children: e.map((e) => /* @__PURE__ */ Y(JL, {
27935
28107
  plugin: e,
27936
28108
  onRemove: () => {
27937
28109
  xs(e.uri).then(l);
@@ -27959,7 +28131,7 @@ var RL = H`
27959
28131
  let t = n.trim();
27960
28132
  t && !i && (a(!0), s(""), ys(t).then((e) => {
27961
28133
  e && r("");
27962
- }).catch((e) => s(BL(e))).finally(() => {
28134
+ }).catch((e) => s(qL(e))).finally(() => {
27963
28135
  a(!1), l();
27964
28136
  }));
27965
28137
  },
@@ -28002,7 +28174,7 @@ var RL = H`
28002
28174
  })
28003
28175
  ]
28004
28176
  });
28005
- }, GL = H`
28177
+ }, QL = H`
28006
28178
  min-width: 0;
28007
28179
 
28008
28180
  & > h2 {
@@ -28135,21 +28307,21 @@ var RL = H`
28135
28307
  }
28136
28308
 
28137
28309
  .confirm p { color: rgba(255, 255, 255, 0.9); }
28138
- `, KL = [
28310
+ `, $L = [
28139
28311
  "www.crunchyroll.com",
28140
28312
  "crunchyroll.com",
28141
28313
  "sso.crunchyroll.com",
28142
28314
  "static.crunchyroll.com"
28143
- ], qL = "https://www.crunchyroll.com", JL = "noaihdevm_6iyg0a8l0q", YL = `https://sso.crunchyroll.com/authorize?${new URLSearchParams({
28144
- client_id: JL,
28145
- redirect_uri: `${qL}/callback`,
28315
+ ], eR = "https://www.crunchyroll.com", tR = "noaihdevm_6iyg0a8l0q", nR = `https://sso.crunchyroll.com/authorize?${new URLSearchParams({
28316
+ client_id: tR,
28317
+ redirect_uri: `${eR}/callback`,
28146
28318
  response_type: "cookie",
28147
28319
  state: "/"
28148
- })}`, XL = (e) => e.locator("#user-menu-authenticated").exists(), ZL = {
28149
- url: `${qL}/auth/v1/token`,
28150
- authorization: `Basic ${btoa(`${JL}:`)}`,
28320
+ })}`, rR = (e) => e.locator("#user-menu-authenticated").exists(), iR = {
28321
+ url: `${eR}/auth/v1/token`,
28322
+ authorization: `Basic ${btoa(`${tR}:`)}`,
28151
28323
  deviceType: "stub on FKN"
28152
- }, QL = async ({ url: e, authorization: t, deviceType: n }, r = fetch) => {
28324
+ }, aR = async ({ url: e, authorization: t, deviceType: n }, r = fetch) => {
28153
28325
  let i = globalThis.location?.origin === new URL(e).origin ? globalThis.document?.cookie ?? "" : "", a = /(?:^|;\s*)device_id=([^;]+)/.exec(i)?.[1] ?? crypto.randomUUID(), o = await r(`${e}?_=${crypto.randomUUID()}`, {
28154
28326
  method: "POST",
28155
28327
  credentials: "include",
@@ -28167,44 +28339,44 @@ var RL = H`
28167
28339
  status: o.status,
28168
28340
  body: o.ok ? null : s
28169
28341
  };
28170
- }, $L = (e) => (e?.context ?? []).some((e) => e.field === "etp_rt" && e.code === "auth.obtain_access_token.missing_required_field"), eR = ({ status: e, body: t }) => {
28342
+ }, oR = (e) => (e?.context ?? []).some((e) => e.field === "etp_rt" && e.code === "auth.obtain_access_token.missing_required_field"), sR = ({ status: e, body: t }) => {
28171
28343
  if (e === 200) return "signed-in";
28172
- if (e === 400 && $L(t)) return "signed-out";
28344
+ if (e === 400 && oR(t)) return "signed-out";
28173
28345
  throw Error(`Crunchyroll answered ${e}`);
28174
- }, tR = "Ask crunchyroll.com whether you are signed in, without loading any of its pages", nR = async (e, { attach: t, mount: n, fetch: r, settle: i = () => new Promise((e) => setTimeout(e, 2e3)) }) => {
28175
- if (e === "extension") return eR(await QL(ZL, r));
28346
+ }, cR = "Ask crunchyroll.com whether you are signed in, without loading any of its pages", lR = async (e, { attach: t, mount: n, fetch: r, settle: i = () => new Promise((e) => setTimeout(e, 2e3)) }) => {
28347
+ if (e === "extension") return sR(await aR(iR, r));
28176
28348
  let { iframe: a, remove: o } = n();
28177
28349
  try {
28178
28350
  let e = await (await t({
28179
28351
  iframe: a,
28180
- blank: { url: `${qL}/` },
28352
+ blank: { url: `${eR}/` },
28181
28353
  cookies: "persistent",
28182
28354
  permissions: [{
28183
28355
  category: "evaluation",
28184
- reason: tR
28356
+ reason: cR
28185
28357
  }]
28186
- })).evaluate(QL, ZL);
28187
- return e.status === 200 && await i(), eR(e);
28358
+ })).evaluate(aR, iR);
28359
+ return e.status === 200 && await i(), sR(e);
28188
28360
  } finally {
28189
28361
  o();
28190
28362
  }
28191
- }, rR = {
28363
+ }, uR = {
28192
28364
  signIn: () => s({
28193
- url: YL,
28194
- domains: KL,
28195
- isSignedIn: XL
28365
+ url: nR,
28366
+ domains: $L,
28367
+ isSignedIn: rR
28196
28368
  }).then(u(b, "crunchyroll")),
28197
- signOut: () => v(KL).then(() => b.record("crunchyroll", "signed-out"))
28198
- }, iR = {
28369
+ signOut: () => v($L).then(() => b.record("crunchyroll", "signed-out"))
28370
+ }, dR = {
28199
28371
  isConnected: pe,
28200
28372
  watch: fe,
28201
28373
  signIn: (e) => l[e](),
28202
28374
  signOut: C
28203
- }, aR = {
28375
+ }, fR = {
28204
28376
  read: b.read,
28205
28377
  watch: b.watch,
28206
28378
  check: async (e, t) => {
28207
- let n = e === "crunchyroll" ? await nR(t, {
28379
+ let n = e === "crunchyroll" ? await lR(t, {
28208
28380
  attach: S,
28209
28381
  mount: () => y("Sign-in check"),
28210
28382
  fetch: E
@@ -28215,7 +28387,7 @@ var RL = H`
28215
28387
  //#endregion
28216
28388
  //#region src/router/settings/index.tsx
28217
28389
  V();
28218
- var oR = H`
28390
+ var pR = H`
28219
28391
  display: grid;
28220
28392
  grid-template-columns: 17rem minmax(0, 1fr);
28221
28393
  column-gap: 4rem;
@@ -28276,8 +28448,8 @@ var oR = H`
28276
28448
 
28277
28449
  .index a[aria-current='true'] { background: #fff; color: #000; border-color: #fff; }
28278
28450
  }
28279
- `, sR = () => location.hash, cR = () => {
28280
- let [e, t] = I(), n = IL(ql(sR)), r = FL.find((e) => e.id === n);
28451
+ `, mR = () => location.hash, hR = () => {
28452
+ let [e, t] = I(), n = UL(ql(mR)), r = HL.find((e) => e.id === n);
28281
28453
  return L(() => {
28282
28454
  let e = !1;
28283
28455
  return ne().then((n) => {
@@ -28286,13 +28458,13 @@ var oR = H`
28286
28458
  e = !0;
28287
28459
  };
28288
28460
  }, []), /* @__PURE__ */ X("div", {
28289
- css: oR,
28461
+ css: pR,
28290
28462
  children: [
28291
28463
  /* @__PURE__ */ Y("h1", { children: "Settings" }),
28292
28464
  /* @__PURE__ */ Y("nav", {
28293
28465
  className: "index",
28294
28466
  "aria-label": "Settings categories",
28295
- children: FL.map((e) => /* @__PURE__ */ Y("a", {
28467
+ children: HL.map((e) => /* @__PURE__ */ Y("a", {
28296
28468
  href: `#${e.id}`,
28297
28469
  "aria-current": r === e ? "true" : void 0,
28298
28470
  onClick: Hf,
@@ -28300,7 +28472,7 @@ var oR = H`
28300
28472
  }, e.id))
28301
28473
  }),
28302
28474
  /* @__PURE__ */ X("section", {
28303
- css: GL,
28475
+ css: QL,
28304
28476
  "data-section": r.id,
28305
28477
  "aria-labelledby": "settings-section-title",
28306
28478
  children: [
@@ -28312,17 +28484,17 @@ var oR = H`
28312
28484
  className: "intro",
28313
28485
  children: r.intro
28314
28486
  }),
28315
- r.id === "accounts" ? /* @__PURE__ */ Y(PL, {
28487
+ r.id === "accounts" ? /* @__PURE__ */ Y(VL, {
28316
28488
  backend: e,
28317
- crunchyroll: rR,
28318
- sites: iR,
28319
- status: aR
28320
- }) : /* @__PURE__ */ Y(WL, {})
28489
+ crunchyroll: uR,
28490
+ sites: dR,
28491
+ status: fR
28492
+ }) : /* @__PURE__ */ Y(ZL, {})
28321
28493
  ]
28322
28494
  })
28323
28495
  ]
28324
28496
  });
28325
- }, lR = (e) => {
28497
+ }, gR = (e) => {
28326
28498
  let { onPlayback: t, applyPlayback: n } = e;
28327
28499
  if (!t || !n) return;
28328
28500
  let r = /* @__PURE__ */ new Set(), i = !1, a = (e) => {
@@ -28345,7 +28517,7 @@ var oR = H`
28345
28517
  //#endregion
28346
28518
  //#region src/components/plugin-player.tsx
28347
28519
  V();
28348
- var uR = H`
28520
+ var _R = H`
28349
28521
  position: relative;
28350
28522
  width: 100%;
28351
28523
  flex: 1;
@@ -28371,7 +28543,7 @@ var uR = H`
28371
28543
  color: rgba(255, 255, 255, 0.55);
28372
28544
  font-size: 1.4rem;
28373
28545
  }
28374
- `, dR = ({ pluginUri: e, release: t, onUnplayable: n, onPlayback: r }) => {
28546
+ `, vR = ({ pluginUri: e, release: t, onUnplayable: n, onPlayback: r }) => {
28375
28547
  let i = R(null), [a, o] = I(""), s = R({
28376
28548
  onUnplayable: n,
28377
28549
  onPlayback: r
@@ -28403,7 +28575,7 @@ var uR = H`
28403
28575
  i.unmount(), a = void 0, s.current.onUnplayable();
28404
28576
  return;
28405
28577
  }
28406
- l = lR(d), l && s.current.onPlayback?.(l);
28578
+ l = gR(d), l && s.current.onPlayback?.(l);
28407
28579
  } catch (e) {
28408
28580
  if (r) return;
28409
28581
  o(e instanceof Error ? e.message : String(e));
@@ -28416,7 +28588,7 @@ var uR = H`
28416
28588
  t.uri,
28417
28589
  t.url
28418
28590
  ]), /* @__PURE__ */ X("div", {
28419
- css: uR,
28591
+ css: _R,
28420
28592
  children: [/* @__PURE__ */ Y("iframe", {
28421
28593
  ref: i,
28422
28594
  sandbox: "allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",
@@ -28430,7 +28602,7 @@ var uR = H`
28430
28602
  //#endregion
28431
28603
  //#region src/components/party-playback.tsx
28432
28604
  V();
28433
- var fR = ({ link: e }) => {
28605
+ var yR = ({ link: e }) => {
28434
28606
  let t = Uv(), n = t.status === "active" ? t.role : void 0, r = R(void 0);
28435
28607
  return L(() => {
28436
28608
  if (r.current = void 0, !e || !n) return;
@@ -28459,12 +28631,12 @@ var fR = ({ link: e }) => {
28459
28631
  measured: !!o
28460
28632
  }, e?.apply(s, !!o);
28461
28633
  }), null;
28462
- }, pR = [
28634
+ }, bR = [
28463
28635
  "currentTime",
28464
28636
  "volume",
28465
28637
  "muted",
28466
28638
  "playbackRate"
28467
- ], mR = (e) => [
28639
+ ], xR = (e) => [
28468
28640
  "loadstart",
28469
28641
  ...e.readyState >= 1 ? ["loadedmetadata", "durationchange"] : [],
28470
28642
  ...e.readyState >= 2 ? ["loadeddata"] : [],
@@ -28476,7 +28648,7 @@ var fR = ({ link: e }) => {
28476
28648
  e.paused ? "pause" : "playing",
28477
28649
  ...e.ended ? ["ended"] : [],
28478
28650
  ...e.error ? ["error"] : []
28479
- ], hR = {
28651
+ ], SR = {
28480
28652
  currentTime: 0,
28481
28653
  duration: 0,
28482
28654
  paused: !0,
@@ -28493,14 +28665,14 @@ var fR = ({ link: e }) => {
28493
28665
  error: null,
28494
28666
  videoWidth: 0,
28495
28667
  videoHeight: 0
28496
- }, gR = (e) => ({
28668
+ }, CR = (e) => ({
28497
28669
  length: e.length,
28498
28670
  start: (t) => e[t]?.[0] ?? 0,
28499
28671
  end: (t) => e[t]?.[1] ?? 0
28500
- }), _R = 1e4, vR = 1500, yR = () => new DOMException("the far player did not start playing", "NotAllowedError"), bR = /* @__PURE__ */ new WeakMap(), xR = (e, t) => {
28501
- let n = t.channel ?? "banou-media-player", r = `${n}|${t.origin ?? "*"}`, i = bR.get(e) ?? (bR.set(e, /* @__PURE__ */ new Map()), bR.get(e)), o = i.get(r);
28672
+ }), wR = 1e4, TR = 1500, ER = () => new DOMException("the far player did not start playing", "NotAllowedError"), DR = /* @__PURE__ */ new WeakMap(), OR = (e, t) => {
28673
+ let n = t.channel ?? "banou-media-player", r = `${n}|${t.origin ?? "*"}`, i = DR.get(e) ?? (DR.set(e, /* @__PURE__ */ new Map()), DR.get(e)), o = i.get(r);
28502
28674
  if (o) return o;
28503
- let s = DR(e, t.origin), c = /* @__PURE__ */ new Set(), l = new AbortController(), u, d = (e) => {
28675
+ let s = PR(e, t.origin), c = /* @__PURE__ */ new Set(), l = new AbortController(), u, d = (e) => {
28504
28676
  try {
28505
28677
  e.port?.postMessage("close");
28506
28678
  } catch {}
@@ -28513,7 +28685,7 @@ var fR = ({ link: e }) => {
28513
28685
  let { port1: t, port2: n } = new MessageChannel();
28514
28686
  e.port = t, t.onmessage = ({ data: t }) => {
28515
28687
  l.signal.aborted || e.update(t);
28516
- }, await CR(() => u.subscribe(e.id, n)).catch((t) => {
28688
+ }, await AR(() => u.subscribe(e.id, n)).catch((t) => {
28517
28689
  throw d(e), t;
28518
28690
  });
28519
28691
  }, p = () => {
@@ -28550,16 +28722,16 @@ var fR = ({ link: e }) => {
28550
28722
  }
28551
28723
  };
28552
28724
  return i.set(r, m), m;
28553
- }, SR = (e, t = {}) => {
28554
- wR(t.origin);
28555
- let n = new AbortController(), r = t.signal ? AbortSignal.any([t.signal, n.signal]) : n.signal, i = t.id ?? "default", a = { ...hR }, o = new EventTarget(), s = (e) => o.dispatchEvent(new Event(e)), c, l, u = new Promise((e, t) => {
28725
+ }, kR = (e, t = {}) => {
28726
+ jR(t.origin);
28727
+ let n = new AbortController(), r = t.signal ? AbortSignal.any([t.signal, n.signal]) : n.signal, i = t.id ?? "default", a = { ...SR }, o = new EventTarget(), s = (e) => o.dispatchEvent(new Event(e)), c, l, u = new Promise((e, t) => {
28556
28728
  c = e, l = t;
28557
28729
  });
28558
28730
  u.catch(() => {});
28559
28731
  let d = () => new DOMException("the remote player was closed", "AbortError"), f = /* @__PURE__ */ new Set(), p = () => {
28560
28732
  for (let e of [...f]) e(d());
28561
28733
  f.clear();
28562
- }, m = /* @__PURE__ */ new Map(), h = !1, g = xR(e, t).attach({
28734
+ }, m = /* @__PURE__ */ new Map(), h = !1, g = OR(e, t).attach({
28563
28735
  id: i,
28564
28736
  reset: () => {
28565
28737
  h = !1, p();
@@ -28572,7 +28744,7 @@ var fR = ({ link: e }) => {
28572
28744
  s(e);
28573
28745
  return;
28574
28746
  }
28575
- for (let e of mR(a)) s(e);
28747
+ for (let e of xR(a)) s(e);
28576
28748
  c();
28577
28749
  }
28578
28750
  }), _ = () => {
@@ -28595,9 +28767,9 @@ var fR = ({ link: e }) => {
28595
28767
  "videoWidth",
28596
28768
  "videoHeight"
28597
28769
  ]) v(e);
28598
- v("buffered", gR), v("seekable", gR);
28599
- let y = (e) => u.then(() => r.aborted ? void 0 : e()).catch(() => {}), b = xR(e, t);
28600
- for (let e of pR) Object.defineProperty(o, e, {
28770
+ v("buffered", CR), v("seekable", CR);
28771
+ let y = (e) => u.then(() => r.aborted ? void 0 : e()).catch(() => {}), b = OR(e, t);
28772
+ for (let e of bR) Object.defineProperty(o, e, {
28601
28773
  get: () => a[e],
28602
28774
  set: (t) => {
28603
28775
  a[e] = t, m.set(e, t), y(async () => {
@@ -28625,7 +28797,7 @@ var fR = ({ link: e }) => {
28625
28797
  clearTimeout(r), o.removeEventListener("playing", n), o.removeEventListener("play", n), e(t);
28626
28798
  }, n = () => t(!0);
28627
28799
  o.addEventListener("playing", n), o.addEventListener("play", n);
28628
- let r = setTimeout(() => t(!a.paused), vR);
28800
+ let r = setTimeout(() => t(!a.paused), TR);
28629
28801
  }), C = async () => {
28630
28802
  let e = !a.paused, t;
28631
28803
  try {
@@ -28644,11 +28816,11 @@ var fR = ({ link: e }) => {
28644
28816
  return o.autoplay = async () => {
28645
28817
  let e = await C();
28646
28818
  if (e.started) return { muted: o.muted };
28647
- if (o.muted || r.aborted) throw e.refusal ?? yR();
28819
+ if (o.muted || r.aborted) throw e.refusal ?? ER();
28648
28820
  o.muted = !0;
28649
28821
  let t = await C();
28650
28822
  if (t.started) return { muted: !0 };
28651
- throw o.muted = !1, e.refusal ?? t.refusal ?? yR();
28823
+ throw o.muted = !1, e.refusal ?? t.refusal ?? ER();
28652
28824
  }, o.pause = () => {
28653
28825
  a.paused = !0, x("pause").catch(() => {});
28654
28826
  }, o.load = () => {
@@ -28657,16 +28829,16 @@ var fR = ({ link: e }) => {
28657
28829
  value: u,
28658
28830
  enumerable: !1
28659
28831
  }), o.destroy = () => n.abort(), o;
28660
- }, CR = async (e) => {
28832
+ }, AR = async (e) => {
28661
28833
  let t;
28662
28834
  try {
28663
28835
  return await Promise.race([e(), new Promise((e, n) => {
28664
- t = setTimeout(() => n(/* @__PURE__ */ Error("the player did not answer")), _R);
28836
+ t = setTimeout(() => n(/* @__PURE__ */ Error("the player did not answer")), wR);
28665
28837
  })]);
28666
28838
  } finally {
28667
28839
  t && clearTimeout(t);
28668
28840
  }
28669
- }, wR = (e) => {
28841
+ }, jR = (e) => {
28670
28842
  if (e === void 0 || e === "*") return;
28671
28843
  if (e === "null") throw TypeError("an opaque origin (\"null\") cannot be spoken to; leave `origin` unset and the sender check stands alone");
28672
28844
  let t;
@@ -28676,47 +28848,47 @@ var fR = ({ link: e }) => {
28676
28848
  throw TypeError(`\`origin\` must be an origin like https://example.com, not ${e}`);
28677
28849
  }
28678
28850
  if (t.origin !== e) throw TypeError(`\`origin\` must be an origin like ${t.origin}, not ${e}`);
28679
- }, TR = (e) => {
28851
+ }, MR = (e) => {
28680
28852
  try {
28681
28853
  return !!e && typeof e == "object" && e.window === e;
28682
28854
  } catch {
28683
28855
  return !1;
28684
28856
  }
28685
- }, ER = (e) => {
28686
- if (TR(e)) return !1;
28857
+ }, NR = (e) => {
28858
+ if (MR(e)) return !1;
28687
28859
  try {
28688
28860
  return !!e && typeof e == "object" && "contentWindow" in e;
28689
28861
  } catch {
28690
28862
  return !1;
28691
28863
  }
28692
- }, DR = (e, t) => {
28693
- if (TR(e)) {
28694
- let n = OR(t);
28864
+ }, PR = (e, t) => {
28865
+ if (MR(e)) {
28866
+ let n = FR(t);
28695
28867
  return {
28696
28868
  emit: (t, r) => {
28697
28869
  e.postMessage(t, n.target(), r ?? []);
28698
28870
  },
28699
- receive: kR(() => e, t, n)
28871
+ receive: IR(() => e, t, n)
28700
28872
  };
28701
28873
  }
28702
- if (ER(e)) {
28874
+ if (NR(e)) {
28703
28875
  if (!e.contentWindow) throw TypeError("mediaPlayer: the iframe has no window yet; append it to a document first");
28704
- let n = () => e.contentWindow, r = OR(t);
28876
+ let n = () => e.contentWindow, r = FR(t);
28705
28877
  return {
28706
28878
  emit: (e, t) => {
28707
28879
  n()?.postMessage(e, r.target(), t ?? []);
28708
28880
  },
28709
- receive: kR(n, t, r)
28881
+ receive: IR(n, t, r)
28710
28882
  };
28711
28883
  }
28712
28884
  return e;
28713
- }, OR = (e) => {
28885
+ }, FR = (e) => {
28714
28886
  let t = e && e !== "*" ? e : void 0;
28715
28887
  return {
28716
28888
  target: () => t && t !== "null" ? t : "*",
28717
28889
  admits: (e) => t ? e === t : (e && (t = e), !0)
28718
28890
  };
28719
- }, kR = (e, t, n = OR(t)) => (t) => {
28891
+ }, IR = (e, t, n = FR(t)) => (t) => {
28720
28892
  let r = (r) => {
28721
28893
  r.source === e() && n.admits(r.origin) && t(r.data, {
28722
28894
  source: r.source,
@@ -28725,54 +28897,54 @@ var fR = ({ link: e }) => {
28725
28897
  });
28726
28898
  };
28727
28899
  return window.addEventListener("message", r), () => window.removeEventListener("message", r);
28728
- }, AR = [
28900
+ }, LR = [
28729
28901
  "play",
28730
28902
  "pause",
28731
28903
  "seeked",
28732
28904
  "ratechange"
28733
- ], jR = (e) => ({
28905
+ ], RR = (e) => ({
28734
28906
  paused: e.paused,
28735
28907
  time: e.currentTime,
28736
28908
  rate: e.playbackRate ?? 1,
28737
28909
  at: Date.now()
28738
- }), MR = (e, t = () => {}) => {
28910
+ }), zR = (e, t = () => {}) => {
28739
28911
  let n = /* @__PURE__ */ new Set(), r = () => {
28740
- let t = jR(e);
28912
+ let t = RR(e);
28741
28913
  for (let e of n) e(t);
28742
28914
  };
28743
- for (let t of AR) e.addEventListener(t, r);
28915
+ for (let t of LR) e.addEventListener(t, r);
28744
28916
  let i = setInterval(() => {
28745
28917
  e.paused || r();
28746
28918
  }, vv);
28747
28919
  return {
28748
28920
  apply: (t, n) => {
28749
- let r = xv(jR(e), t, Date.now(), n);
28921
+ let r = xv(RR(e), t, Date.now(), n);
28750
28922
  r.seek !== void 0 && (e.currentTime = r.seek), r.rate !== void 0 && (e.playbackRate = r.rate), r.pause && e.pause(), r.play && (e.autoplay ? e.autoplay() : e.play()).catch(() => {});
28751
28923
  },
28752
28924
  onReport: (e) => (n.add(e), queueMicrotask(r), () => {
28753
28925
  n.delete(e);
28754
28926
  }),
28755
28927
  dispose: () => {
28756
- for (let t of AR) e.removeEventListener(t, r);
28928
+ for (let t of LR) e.removeEventListener(t, r);
28757
28929
  clearInterval(i), n.clear(), t();
28758
28930
  }
28759
28931
  };
28760
- }, NR = (e) => {
28761
- let t = SR(e, { origin: location.origin });
28762
- return MR(t, () => t.destroy());
28763
- }, PR = "stub:embed-title", FR = "stub:embed-title?", IR = (e, t, n = window) => {
28932
+ }, BR = (e) => {
28933
+ let t = kR(e, { origin: location.origin });
28934
+ return zR(t, () => t.destroy());
28935
+ }, VR = "stub:embed-title", HR = "stub:embed-title?", UR = (e, t, n = window) => {
28764
28936
  let r = () => e.contentWindow?.postMessage({
28765
- type: PR,
28937
+ type: VR,
28766
28938
  title: t
28767
28939
  }, n.location.origin), i = (t) => {
28768
- t.source === e.contentWindow && t.origin === n.location.origin && t.data?.type === FR && r();
28940
+ t.source === e.contentWindow && t.origin === n.location.origin && t.data?.type === HR && r();
28769
28941
  };
28770
28942
  return n.addEventListener("message", i), r(), () => n.removeEventListener("message", i);
28771
- }, LR = (e, t) => t ? `${e == null ? "" : `E${e} - `}${t}` : e == null ? void 0 : `Episode ${e}`;
28943
+ }, WR = (e, t) => t ? `${e == null ? "" : `E${e} - `}${t}` : e == null ? void 0 : `Episode ${e}`;
28772
28944
  //#endregion
28773
28945
  //#region src/router/watch/index.tsx
28774
28946
  V();
28775
- var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node), zR = iy("\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n"), BR = iy("\n subscription GetWatchOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n }\n }\n"), VR = H`
28947
+ var GR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.node), KR = iy("\n subscription GetWatchMedia($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n titles {\n title\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n titles {\n title\n }\n thumbnails {\n url\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n embedUrl\n mediaUri\n episodeNumber\n titles {\n title\n }\n shortDescriptions {\n language\n shortDescription\n }\n }\n }\n }\n handles {\n relation\n node {\n ...MediaFragment\n handles {\n relation\n node {\n ...MediaFragment\n episodes {\n ...EpisodeFragment\n }\n }\n }\n episodes {\n ...EpisodeFragment\n episodeNumber\n }\n }\n }\n }\n }\n"), qR = iy("\n subscription GetWatchOrigins($input: OriginPageInput!) {\n originPage(input: $input) {\n nodes {\n id\n url\n name\n icon\n color\n isApiOnly\n }\n }\n }\n"), JR = H`
28776
28948
  display: flex;
28777
28949
  flex-direction: column;
28778
28950
  height: 100vh;
@@ -28834,30 +29006,30 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28834
29006
  opacity: 0.6;
28835
29007
  }
28836
29008
  }
28837
- `, HR = () => {
29009
+ `, YR = () => {
28838
29010
  let e = pu(), t = {
28839
29011
  ...e,
28840
29012
  mediaUri: Ib(e.mediaUri),
28841
29013
  episodeUri: Ib(e.episodeUri),
28842
29014
  sourceUri: Ib(e.sourceUri)
28843
29015
  }, [, n] = hu(), r = R(null), [i, a] = I(void 0), [{ data: o }] = Ho({
28844
- query: zR,
29016
+ query: KR,
28845
29017
  variables: { input: { uri: t.mediaUri } },
28846
29018
  pause: !t.mediaUri
28847
29019
  }), s = o?.media, c = z(() => s?.episodes?.find((e) => e.uri && t.episodeUri ? Bb(Pb(e.uri), Pb(t.episodeUri)) : !1), [s?.episodes, t.episodeUri]), l = z(() => c?.uri ? zb(c.uri)?.handleUrisValues : void 0, [c?.uri]), u = z(() => l && [...new Set(l.map((e) => e.origin))], [l]), [{ data: d }] = Ho({
28848
- query: BR,
29020
+ query: qR,
28849
29021
  variables: { input: {
28850
29022
  ids: u,
28851
29023
  filters: [Lu.IsNotApiOnly]
28852
29024
  } },
28853
29025
  pause: !u
28854
- }), f = t.sourceUri, p = s?.titles?.at(0)?.title, m = c?.titles?.at(0)?.title, h = c?.episodeNumber, g = LR(h, m), _ = z(() => {
29026
+ }), f = t.sourceUri, p = s?.titles?.at(0)?.title, m = c?.titles?.at(0)?.title, h = c?.episodeNumber, g = WR(h, m), _ = z(() => {
28855
29027
  if (!f) return;
28856
- let e = RR(c?.handles).find((e) => e.uri === f);
29028
+ let e = GR(c?.handles).find((e) => e.uri === f);
28857
29029
  if (!e) return;
28858
29030
  if (e.embedUrl) return e.embedUrl;
28859
29031
  let { origin: n } = wb(f);
28860
- if (!JF(n) || !e.url) return;
29032
+ if (!ZF(n) || !e.url) return;
28861
29033
  let r = new URLSearchParams({
28862
29034
  mediaUri: t.mediaUri,
28863
29035
  episodeUri: t.episodeUri,
@@ -28883,7 +29055,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28883
29055
  if (!f) return;
28884
29056
  let { origin: e } = wb(f), t = x[e];
28885
29057
  if (!t) return;
28886
- let n = RR(c?.handles).find((e) => e.uri === f);
29058
+ let n = GR(c?.handles).find((e) => e.uri === f);
28887
29059
  return {
28888
29060
  pluginUri: t,
28889
29061
  release: {
@@ -28903,20 +29075,20 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28903
29075
  L(() => {
28904
29076
  let e = r.current;
28905
29077
  if (E || !_ || !e) return;
28906
- let t = NR(e);
29078
+ let t = BR(e);
28907
29079
  return a(t), () => {
28908
29080
  t.dispose(), a(void 0);
28909
29081
  };
28910
29082
  }, [E, _]), L(() => {
28911
29083
  let e = r.current;
28912
- if (!E && _ && e && g) return IR(e, g);
29084
+ if (!E && _ && e && g) return UR(e, g);
28913
29085
  }, [
28914
29086
  E,
28915
29087
  _,
28916
29088
  g
28917
29089
  ]);
28918
29090
  let D = z(() => (d?.originPage?.nodes ?? []).map((e) => {
28919
- let n = RR(c?.handles).filter((t) => t.origin === e.id), r = !!x[e.id], i = (t) => !!(t?.embedUrl || r || JF(e.id) && t?.url), a = (e) => Au(K.WATCH, {
29091
+ let n = GR(c?.handles).filter((t) => t.origin === e.id), r = !!x[e.id], i = (t) => !!(t?.embedUrl || r || ZF(e.id) && t?.url), a = (e) => Au(K.WATCH, {
28920
29092
  mediaUri: t.mediaUri,
28921
29093
  episodeUri: t.episodeUri,
28922
29094
  sourceUri: e
@@ -28948,11 +29120,11 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28948
29120
  x
28949
29121
  ]);
28950
29122
  return /* @__PURE__ */ Y("div", {
28951
- css: VR,
29123
+ css: JR,
28952
29124
  children: /* @__PURE__ */ X("div", {
28953
29125
  className: "watch-container",
28954
29126
  children: [
28955
- E && C ? /* @__PURE__ */ Y(dR, {
29127
+ E && C ? /* @__PURE__ */ Y(vR, {
28956
29128
  pluginUri: C.pluginUri,
28957
29129
  release: C.release,
28958
29130
  onUnplayable: () => T(f),
@@ -28970,7 +29142,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28970
29142
  min-height: 0;
28971
29143
  `
28972
29144
  }) : void 0,
28973
- /* @__PURE__ */ Y(fR, { link: i }),
29145
+ /* @__PURE__ */ Y(yR, { link: i }),
28974
29146
  /* @__PURE__ */ X("div", {
28975
29147
  className: "watch-info",
28976
29148
  children: [/* @__PURE__ */ X("div", {
@@ -28982,7 +29154,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28982
29154
  className: "media-title",
28983
29155
  children: p
28984
29156
  }) : void 0]
28985
- }), /* @__PURE__ */ Y(rI, {
29157
+ }), /* @__PURE__ */ Y(sI, {
28986
29158
  sources: D,
28987
29159
  onPickRelease: (e) => n(Au(K.WATCH, {
28988
29160
  mediaUri: t.mediaUri,
@@ -28998,7 +29170,7 @@ var RR = (e) => (e ?? []).filter((e) => e.relation === "SAME_AS").map((e) => e.n
28998
29170
  //#endregion
28999
29171
  //#region src/router/party/index.tsx
29000
29172
  V();
29001
- var UR = H`
29173
+ var XR = H`
29002
29174
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
29003
29175
  min-height: 100vh;
29004
29176
  max-width: 72rem;
@@ -29112,14 +29284,14 @@ var UR = H`
29112
29284
  }
29113
29285
 
29114
29286
  .field input:focus { border-color: rgba(255, 255, 255, 0.4); }
29115
- `, WR = {
29287
+ `, ZR = {
29116
29288
  "not-found": "That party has ended.",
29117
29289
  "bad-key": "The invite link is not valid.",
29118
29290
  invalid: "The invite link is broken.",
29119
29291
  full: "The party is full.",
29120
29292
  blocked: "You cannot join this party.",
29121
29293
  unavailable: "Parties are not available right now. Is FKN connected?"
29122
- }, GR = () => {
29294
+ }, QR = () => {
29123
29295
  let e = Uv(), [t] = I(() => Lv(location.hash, location.origin)), [n] = I(() => location.hash.length > 1 && !Lv(location.hash, location.origin)), [r, i] = I([]), [a, o] = I(() => Z.name() ?? ""), [s, c] = I(!1), l = e.status === "active";
29124
29296
  L(() => {
29125
29297
  if (!t) return;
@@ -29149,7 +29321,7 @@ var UR = H`
29149
29321
  } catch {}
29150
29322
  };
29151
29323
  return /* @__PURE__ */ X("div", {
29152
- css: UR,
29324
+ css: XR,
29153
29325
  children: [
29154
29326
  /* @__PURE__ */ Y("div", {
29155
29327
  className: "heading",
@@ -29157,7 +29329,7 @@ var UR = H`
29157
29329
  }),
29158
29330
  /* @__PURE__ */ X("div", {
29159
29331
  className: "status",
29160
- children: [n ? /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : !t && !l && e.status !== "joining" ? e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", WR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "You are not in a party. Start one from the header, or open an invite link." }) : !t && e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : t && !l ? e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", WR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : l && e.role === "guest" && t ? /* @__PURE__ */ Y(J, { children: "You are in. Waiting for the host…" }) : l && e.role === "guest" ? /* @__PURE__ */ X(J, { children: [
29332
+ children: [n ? /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : !t && !l && e.status !== "joining" ? e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", ZR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "You are not in a party. Start one from the header, or open an invite link." }) : !t && e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : t && !l ? e.status === "joining" ? /* @__PURE__ */ Y(J, { children: "Joining the party…" }) : e.status === "failed" ? /* @__PURE__ */ X(J, { children: ["Could not join. ", ZR[e.code] ?? "Something went wrong."] }) : e.status === "ended" ? /* @__PURE__ */ Y(J, { children: "The party ended." }) : /* @__PURE__ */ Y(J, { children: "This invite link is broken. Ask the host for a new one." }) : l && e.role === "guest" && t ? /* @__PURE__ */ Y(J, { children: "You are in. Waiting for the host…" }) : l && e.role === "guest" ? /* @__PURE__ */ X(J, { children: [
29161
29333
  "You are following the host. ",
29162
29334
  /* @__PURE__ */ Y(Cu, {
29163
29335
  to: Au(K.HOME),
@@ -29283,11 +29455,11 @@ var UR = H`
29283
29455
  ] })
29284
29456
  ]
29285
29457
  });
29286
- }, KR = (e) => e.owned ? "owned" : "placeholder", qR = (e) => {
29458
+ }, $R = (e) => e.owned ? "owned" : "placeholder", ez = (e) => {
29287
29459
  let t = [], n = /* @__PURE__ */ new Set();
29288
29460
  for (let r of e.members ?? []) r.uri && !n.has(r.uri) && (n.add(r.uri), t.push({
29289
29461
  uri: r.uri,
29290
- kind: KR(r),
29462
+ kind: $R(r),
29291
29463
  origin: r.origin,
29292
29464
  scope: r.scope,
29293
29465
  title: r.title,
@@ -29307,8 +29479,8 @@ var UR = H`
29307
29479
  member: null
29308
29480
  }));
29309
29481
  return t;
29310
- }, JR = (e) => {
29311
- let t = qR(e), n = Qb({
29482
+ }, tz = (e) => {
29483
+ let t = ez(e), n = Qb({
29312
29484
  nodes: t.map((e) => ({
29313
29485
  uri: e.uri,
29314
29486
  titles: [{ title: e.title ?? e.uri }],
@@ -29329,10 +29501,10 @@ var UR = H`
29329
29501
  columns: n.columns,
29330
29502
  rows: n.rows
29331
29503
  };
29332
- }, YR = (e, t) => [e, t].sort().join(" "), XR = (e) => {
29504
+ }, nz = (e, t) => [e, t].sort().join(" "), rz = (e) => {
29333
29505
  let t = /* @__PURE__ */ new Map();
29334
29506
  for (let n of e) {
29335
- let e = YR(n.fromUri, n.toUri), r = t.get(e) ?? [];
29507
+ let e = nz(n.fromUri, n.toUri), r = t.get(e) ?? [];
29336
29508
  r.push(n.key), t.set(e, r);
29337
29509
  }
29338
29510
  let n = /* @__PURE__ */ new Map();
@@ -29341,7 +29513,7 @@ var UR = H`
29341
29513
  lanes: e.length
29342
29514
  }));
29343
29515
  return n;
29344
- }, ZR = (e) => {
29516
+ }, iz = (e) => {
29345
29517
  let t = /* @__PURE__ */ new Map();
29346
29518
  for (let n of e.links ?? []) t.set(n.key, {
29347
29519
  kind: "link",
@@ -29364,14 +29536,14 @@ var UR = H`
29364
29536
  row: n
29365
29537
  });
29366
29538
  return t;
29367
- }, QR = /^[0-9a-f]{64}$/, $R = (e, t) => (t ?? []).map((t) => {
29539
+ }, az = /^[0-9a-f]{64}$/, oz = (e, t) => (t ?? []).map((t) => {
29368
29540
  let n = e.get(t) ?? null;
29369
29541
  return {
29370
29542
  key: t,
29371
29543
  ref: n,
29372
- gap: n ? null : QR.test(t) ? "missing" : "not-an-edge-key"
29544
+ gap: n ? null : az.test(t) ? "missing" : "not-an-edge-key"
29373
29545
  };
29374
- }), ez = (e, t) => (e.answers ?? []).find((e) => e.seq === t) ?? null, tz = (e) => e === null ? null : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : JSON.stringify(e), nz = (e) => {
29546
+ }), sz = (e, t) => (e.answers ?? []).find((e) => e.seq === t) ?? null, cz = (e) => e === null ? null : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : JSON.stringify(e), lz = (e) => {
29375
29547
  if (e == null || e === "") return { kind: "absent" };
29376
29548
  let t;
29377
29549
  try {
@@ -29392,16 +29564,16 @@ var UR = H`
29392
29564
  kind: "fields",
29393
29565
  fields: Object.entries(t).map(([e, t]) => ({
29394
29566
  field: e,
29395
- value: tz(t)
29567
+ value: cz(t)
29396
29568
  }))
29397
29569
  } : {
29398
29570
  kind: "fields",
29399
29571
  fields: [{
29400
29572
  field: Array.isArray(t) ? "values" : "value",
29401
- value: tz(t)
29573
+ value: cz(t)
29402
29574
  }]
29403
29575
  };
29404
- }, rz = (e) => e === "not-enabled" ? "The graph engine is switched off for this page, so there is nothing to read. Reloading with ?graph=1 turns it on, and this page then asks the sources about the uri itself. The only way a page gets here now is ?store=legacy, which pins it to the old store; dropping that flag puts the whole app back on the graph, which is the default." : e === "graph-empty" ? "The engine is on and the graph is empty. A graph is built inside one tab and never outlives it, so a link opened cold always starts here: what fills it is a page asking the sources, which is what this page does with the uri it was given." : e === "no-row" ? "No media row exists for that uri, so there is nothing to cluster. Either no source has answered for it in this tab yet, or the uri is not one any source recognises." : e === "no-cluster" ? "A media row exists for that uri, but no cluster holds it yet: either a pass has not run since it arrived, or it is a placeholder no pass will ever cluster on its own." : "That uri reached no cluster, and the bundle carries no reason for it.", iz = (e) => e === "active", az = async (e, t, n = {}, r = {}) => {
29576
+ }, uz = (e) => e === "not-enabled" ? "The graph engine is switched off for this page, so there is nothing to read. Reloading with ?graph=1 turns it on, and this page then asks the sources about the uri itself. The only way a page gets here now is ?store=legacy, which pins it to the old store; dropping that flag puts the whole app back on the graph, which is the default." : e === "graph-empty" ? "The engine is on and the graph is empty. A graph is built inside one tab and never outlives it, so a link opened cold always starts here: what fills it is a page asking the sources, which is what this page does with the uri it was given." : e === "no-row" ? "No media row exists for that uri, so there is nothing to cluster. Either no source has answered for it in this tab yet, or the uri is not one any source recognises." : e === "no-cluster" ? "A media row exists for that uri, but no cluster holds it yet: either a pass has not run since it arrived, or it is a placeholder no pass will ever cluster on its own." : "That uri reached no cluster, and the bundle carries no reason for it.", dz = (e) => e === "active", fz = async (e, t, n = {}, r = {}) => {
29405
29577
  let i = r.settleMs ?? 2e4, a = await e("http://d/graphql", {
29406
29578
  method: "POST",
29407
29579
  headers: {
@@ -29449,7 +29621,7 @@ var UR = H`
29449
29621
  payloads: u,
29450
29622
  last: d
29451
29623
  };
29452
- }, oz = "\n subscription TraceWarm($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n url\n episodeCount\n startDate\n status\n titles {\n language\n title\n score\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n }\n }\n episodes {\n uri\n origin\n episodeNumber\n releaseDate\n }\n }\n }\n", sz = (e, t) => {
29624
+ }, pz = "\n subscription TraceWarm($input: MediaInput!) {\n media(input: $input) {\n _id\n uri\n origin\n id\n url\n episodeCount\n startDate\n status\n titles {\n language\n title\n score\n }\n handles {\n relation\n node {\n _id\n uri\n origin\n id\n url\n }\n }\n episodes {\n uri\n origin\n episodeNumber\n releaseDate\n }\n }\n }\n", mz = (e, t) => {
29453
29625
  let n = e?.data?.media;
29454
29626
  return {
29455
29627
  payloads: t,
@@ -29457,7 +29629,7 @@ var UR = H`
29457
29629
  handles: Array.isArray(n?.handles) ? n.handles.length : 0,
29458
29630
  episodes: Array.isArray(n?.episodes) ? n.episodes.length : 0
29459
29631
  };
29460
- }, cz = async (e, { onProgress: t, settleMs: n = 25e3 } = {}) => {
29632
+ }, hz = async (e, { onProgress: t, settleMs: n = 25e3 } = {}) => {
29461
29633
  let r = {
29462
29634
  payloads: 0,
29463
29635
  uri: null,
@@ -29466,39 +29638,39 @@ var UR = H`
29466
29638
  };
29467
29639
  if (!e) return r;
29468
29640
  try {
29469
- let i = await import("./assets/lib-worker-B4bhXBRt.js");
29641
+ let i = await import("./assets/lib-worker-CvSIFpg3.js");
29470
29642
  if (typeof i.handleRequest != "function") return r;
29471
- await az(i.handleRequest, oz, { input: { uri: e } }, {
29643
+ await fz(i.handleRequest, pz, { input: { uri: e } }, {
29472
29644
  settleMs: n,
29473
29645
  onPayload: (e, n) => {
29474
- r = sz(e, n), t?.(r);
29646
+ r = mz(e, n), t?.(r);
29475
29647
  }
29476
29648
  });
29477
29649
  } catch (e) {
29478
29650
  console.error(Error("graph trace: the warm could not ask the sources", { cause: e }));
29479
29651
  }
29480
29652
  return r;
29481
- }, lz = H`
29653
+ }, gz = H`
29482
29654
  &.nothing {
29483
29655
  color: rgb(250, 204, 21);
29484
29656
  font-style: italic;
29485
29657
  }
29486
- `, uz = ({ value: e }) => e === null ? /* @__PURE__ */ Y("span", {
29487
- css: lz,
29658
+ `, _z = ({ value: e }) => e === null ? /* @__PURE__ */ Y("span", {
29659
+ css: gz,
29488
29660
  className: "nothing",
29489
29661
  children: "null"
29490
29662
  }) : e === void 0 ? /* @__PURE__ */ Y("span", {
29491
- css: lz,
29663
+ css: gz,
29492
29664
  className: "nothing",
29493
29665
  children: "absent"
29494
29666
  }) : e === "" ? /* @__PURE__ */ Y("span", {
29495
- css: lz,
29667
+ css: gz,
29496
29668
  className: "nothing",
29497
29669
  children: "empty"
29498
29670
  }) : /* @__PURE__ */ Y("span", {
29499
- css: lz,
29671
+ css: gz,
29500
29672
  children: String(e)
29501
- }), dz = H`
29673
+ }), vz = H`
29502
29674
  .fields {
29503
29675
  width: 100%;
29504
29676
  border-collapse: collapse;
@@ -29531,14 +29703,14 @@ var UR = H`
29531
29703
  white-space: pre-wrap;
29532
29704
  overflow-wrap: anywhere;
29533
29705
  }
29534
- `, fz = ({ blob: e, label: t }) => /* @__PURE__ */ X("div", {
29535
- css: dz,
29706
+ `, yz = ({ blob: e, label: t }) => /* @__PURE__ */ X("div", {
29707
+ css: vz,
29536
29708
  className: "blob",
29537
29709
  "data-blob": t,
29538
29710
  children: [
29539
29711
  e.kind === "absent" && /* @__PURE__ */ Y("div", {
29540
29712
  className: "absent",
29541
- children: /* @__PURE__ */ Y(uz, { value: null })
29713
+ children: /* @__PURE__ */ Y(_z, { value: null })
29542
29714
  }),
29543
29715
  e.kind === "raw" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
29544
29716
  className: "note",
@@ -29554,26 +29726,26 @@ var UR = H`
29554
29726
  children: [/* @__PURE__ */ Y("th", {
29555
29727
  scope: "row",
29556
29728
  children: e.field
29557
- }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.value }) })]
29729
+ }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.value }) })]
29558
29730
  }, e.field)) })
29559
29731
  })
29560
29732
  ]
29561
- }), pz = 88, mz = 20, hz = 36, gz = 266, _z = 76, vz = (e) => [
29733
+ }), bz = 88, xz = 20, Sz = 36, Cz = 266, wz = 76, Tz = (e) => [
29562
29734
  e.member ? `${e.kind} ${e.member.via === "member" ? "member" : "claimed"}` : "named by an edge",
29563
29735
  e.origin ?? "no origin",
29564
29736
  e.scope ?? "no scope"
29565
- ].join(" · "), yz = (e, t) => {
29737
+ ].join(" · "), Ez = (e, t) => {
29566
29738
  let n = e.find((e) => e.key === t);
29567
29739
  return new Set(n ? [n.fromUri, n.toUri] : []);
29568
- }, bz = (e, t) => {
29569
- let n = JR(e), r = e.links ?? [], i = XR(r), a = yz(r, t), o = new Set(n.nodes.map((e) => e.uri));
29740
+ }, Dz = (e, t) => {
29741
+ let n = tz(e), r = e.links ?? [], i = rz(r), a = Ez(r, t), o = new Set(n.nodes.map((e) => e.uri));
29570
29742
  return {
29571
29743
  nodes: n.nodes.map((e) => ({
29572
29744
  id: e.uri,
29573
29745
  type: "trace",
29574
29746
  position: {
29575
- x: hz + e.column * gz,
29576
- y: hz + e.row * _z
29747
+ x: Sz + e.column * Cz,
29748
+ y: Sz + e.row * wz
29577
29749
  },
29578
29750
  width: 178,
29579
29751
  height: 56,
@@ -29583,7 +29755,7 @@ var UR = H`
29583
29755
  uri: e.uri,
29584
29756
  kind: e.kind,
29585
29757
  title: e.title,
29586
- meta: vz(e),
29758
+ meta: Tz(e),
29587
29759
  lit: a.has(e.uri)
29588
29760
  }
29589
29761
  })),
@@ -29600,21 +29772,21 @@ var UR = H`
29600
29772
  selected: e.key === t,
29601
29773
  data: {
29602
29774
  spread: (n.lane - (n.lanes - 1) / 2) * 26,
29603
- active: iz(e.status),
29775
+ active: dz(e.status),
29604
29776
  status: e.status,
29605
29777
  label: e.kind,
29606
29778
  tooltip: `${e.kind} ${e.status} by ${e.by}: ${e.reason}`
29607
29779
  }
29608
29780
  };
29609
29781
  }),
29610
- width: Math.max(1, n.columns) * gz - pz + 72,
29611
- height: Math.max(1, n.rows) * _z - mz + 72
29782
+ width: Math.max(1, n.columns) * Cz - bz + 72,
29783
+ height: Math.max(1, n.rows) * wz - xz + 72
29612
29784
  };
29613
29785
  };
29614
29786
  //#endregion
29615
29787
  //#region src/router/debug/graph.tsx
29616
29788
  V();
29617
- var xz = H`
29789
+ var Oz = H`
29618
29790
  position: relative;
29619
29791
  height: 46rem;
29620
29792
  border: 1px solid rgba(255, 255, 255, 0.12);
@@ -29686,7 +29858,7 @@ var xz = H`
29686
29858
  .edge-label.active { fill: rgb(134, 239, 172); }
29687
29859
  .edge-label.refused { fill: rgb(252, 165, 165); }
29688
29860
  .cross { stroke: rgb(248, 113, 113); stroke-width: 1.5; }
29689
- `, Sz = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Cz = ({ data: e }) => /* @__PURE__ */ X("div", {
29861
+ `, kz = (e, t) => e.length > t ? `${e.slice(0, t - 1)}…` : e, Az = ({ data: e }) => /* @__PURE__ */ X("div", {
29690
29862
  className: `trace-node ${e.kind}${e.lit ? " lit" : ""}`,
29691
29863
  "data-node": e.uri,
29692
29864
  "data-kind": e.kind,
@@ -29698,19 +29870,19 @@ var xz = H`
29698
29870
  }),
29699
29871
  /* @__PURE__ */ Y("div", {
29700
29872
  className: "uri",
29701
- children: Sz(e.uri, 26)
29873
+ children: kz(e.uri, 26)
29702
29874
  }),
29703
- /* @__PURE__ */ Y("div", { children: e.title === null ? "no title" : Sz(e.title, 28) }),
29875
+ /* @__PURE__ */ Y("div", { children: e.title === null ? "no title" : kz(e.title, 28) }),
29704
29876
  /* @__PURE__ */ Y("div", {
29705
29877
  className: "meta",
29706
- children: Sz(e.meta, 34)
29878
+ children: kz(e.meta, 34)
29707
29879
  }),
29708
29880
  /* @__PURE__ */ Y(xj, {
29709
29881
  type: "source",
29710
29882
  position: Q.Right
29711
29883
  })
29712
29884
  ]
29713
- }), wz = ({ data: e, selected: t, sourceX: n, sourceY: r, targetX: i, targetY: a }) => {
29885
+ }), jz = ({ data: e, selected: t, sourceX: n, sourceY: r, targetX: i, targetY: a }) => {
29714
29886
  let o = e?.spread ?? 0, s = e?.active ? "active" : "refused", c = i >= n, l = Math.max(20, Math.abs(i - n) / 2) * (c ? 1 : -1), u = `M ${n} ${r} C ${n + l} ${r + o}, ${i - l} ${a + o}, ${i} ${a}`, d = (n + i) / 2, f = (r + a) / 2 + o * .75;
29715
29887
  return /* @__PURE__ */ X(J, { children: [
29716
29888
  /* @__PURE__ */ Y("path", {
@@ -29737,13 +29909,13 @@ var xz = H`
29737
29909
  x: d,
29738
29910
  y: f - 9,
29739
29911
  textAnchor: "middle",
29740
- children: Sz(e?.label ?? "", 22)
29912
+ children: kz(e?.label ?? "", 22)
29741
29913
  })
29742
29914
  ] });
29743
- }, Tz = { trace: Cz }, Ez = { trace: wz }, Dz = ({ bundle: e, selected: t, onSelect: n }) => {
29744
- let { nodes: r, edges: i } = z(() => bz(e, t), [e, t]), a = B((e, t) => n(t.id), [n]);
29915
+ }, Mz = { trace: Az }, Nz = { trace: jz }, Pz = ({ bundle: e, selected: t, onSelect: n }) => {
29916
+ let { nodes: r, edges: i } = z(() => Dz(e, t), [e, t]), a = B((e, t) => n(t.id), [n]);
29745
29917
  return /* @__PURE__ */ X("div", {
29746
- css: xz,
29918
+ css: Oz,
29747
29919
  "data-trace-graph": !0,
29748
29920
  children: [/* @__PURE__ */ X("div", {
29749
29921
  className: "legend",
@@ -29757,8 +29929,8 @@ var xz = H`
29757
29929
  }), /* @__PURE__ */ Y(eN, {
29758
29930
  nodes: r,
29759
29931
  edges: i,
29760
- nodeTypes: Tz,
29761
- edgeTypes: Ez,
29932
+ nodeTypes: Mz,
29933
+ edgeTypes: Nz,
29762
29934
  onEdgeClick: a,
29763
29935
  nodesDraggable: !1,
29764
29936
  nodesConnectable: !1,
@@ -29779,7 +29951,7 @@ var xz = H`
29779
29951
  //#endregion
29780
29952
  //#region src/router/debug/inspector.tsx
29781
29953
  V();
29782
- var Oz = H`
29954
+ var Fz = H`
29783
29955
  border: 1px solid rgba(255, 255, 255, 0.12);
29784
29956
  border-radius: 0.5rem;
29785
29957
  padding: 1rem 1.2rem;
@@ -29879,7 +30051,7 @@ var Oz = H`
29879
30051
  }
29880
30052
 
29881
30053
  .empty { color: rgba(255, 255, 255, 0.5); }
29882
- `, kz = (e) => e.kind === "link" ? `link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "episode-link" ? `episode link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "claim" ? `claim ${e.row.kind} from ${e.row.claimer}` : e.kind === "episode-source" ? `episode list from ${e.row.claimer}` : `episode claim ${e.row.kind} from ${e.row.claimer}`, Az = (e) => e === "not-an-edge-key" ? "not an edge key" : "not in this bundle", jz = (e) => {
30054
+ `, Iz = (e) => e.kind === "link" ? `link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "episode-link" ? `episode link ${e.row.kind} ${e.row.status} by ${e.row.by}` : e.kind === "claim" ? `claim ${e.row.kind} from ${e.row.claimer}` : e.kind === "episode-source" ? `episode list from ${e.row.claimer}` : `episode claim ${e.row.kind} from ${e.row.claimer}`, Lz = (e) => e === "not-an-edge-key" ? "not an edge key" : "not in this bundle", Rz = (e) => {
29883
30055
  if (e == null) return "";
29884
30056
  if (typeof e == "string") return e;
29885
30057
  if (e instanceof Uint8Array) return new TextDecoder().decode(e);
@@ -29890,20 +30062,20 @@ var Oz = H`
29890
30062
  } catch {
29891
30063
  return String(e);
29892
30064
  }
29893
- }, Mz = ({ rows: e }) => /* @__PURE__ */ Y("table", {
30065
+ }, zz = ({ rows: e }) => /* @__PURE__ */ Y("table", {
29894
30066
  className: "facts",
29895
30067
  children: /* @__PURE__ */ Y("tbody", { children: e.map(([e, t]) => /* @__PURE__ */ X("tr", {
29896
30068
  "data-fact": e,
29897
30069
  children: [/* @__PURE__ */ Y("th", {
29898
30070
  scope: "row",
29899
30071
  children: e
29900
- }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: t }) })]
30072
+ }), /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: t }) })]
29901
30073
  }, e)) })
29902
- }), Nz = ({ bundle: e, seq: t, answer: n, onLoad: r }) => {
29903
- let i = ez(e, t);
30074
+ }), Bz = ({ bundle: e, seq: t, answer: n, onLoad: r }) => {
30075
+ let i = sz(e, t);
29904
30076
  return /* @__PURE__ */ X(J, { children: [
29905
30077
  /* @__PURE__ */ X("h4", { children: ["answer ", t] }),
29906
- i ? /* @__PURE__ */ Y(Mz, { rows: [
30078
+ i ? /* @__PURE__ */ Y(zz, { rows: [
29907
30079
  ["uri", i.uri],
29908
30080
  ["origin", i.origin],
29909
30081
  ["operation", i.operation],
@@ -29938,8 +30110,8 @@ var Oz = H`
29938
30110
  ]
29939
30111
  })
29940
30112
  ] });
29941
- }, Pz = ({ bundle: e, index: t, trail: n, onFollow: r, onTrailTo: i, loadAnswerBytes: a }) => {
29942
- let [o, s] = I(void 0), c = n[n.length - 1], l = c === void 0 ? void 0 : t.get(c), u = $R(t, l && (l.kind === "link" || l.kind === "episode-link") ? l.row.supports : []), d = (e) => {
30113
+ }, Vz = ({ bundle: e, index: t, trail: n, onFollow: r, onTrailTo: i, loadAnswerBytes: a }) => {
30114
+ let [o, s] = I(void 0), c = n[n.length - 1], l = c === void 0 ? void 0 : t.get(c), u = oz(t, l && (l.kind === "link" || l.kind === "episode-link") ? l.row.supports : []), d = (e) => {
29943
30115
  s({
29944
30116
  seq: e,
29945
30117
  state: "loading",
@@ -29947,7 +30119,7 @@ var Oz = H`
29947
30119
  }), a(e).then((t) => s({
29948
30120
  seq: e,
29949
30121
  state: "done",
29950
- text: jz(t)
30122
+ text: Rz(t)
29951
30123
  })).catch((t) => s({
29952
30124
  seq: e,
29953
30125
  state: "failed",
@@ -29955,7 +30127,7 @@ var Oz = H`
29955
30127
  }));
29956
30128
  };
29957
30129
  return /* @__PURE__ */ X("div", {
29958
- css: Oz,
30130
+ css: Fz,
29959
30131
  "data-inspector": !0,
29960
30132
  children: [/* @__PURE__ */ Y("h3", { children: "Edge inspector" }), c === void 0 ? /* @__PURE__ */ Y("p", {
29961
30133
  className: "empty",
@@ -29965,10 +30137,10 @@ var Oz = H`
29965
30137
  children: [n.slice(0, -1).map((e, n) => /* @__PURE__ */ Y("button", {
29966
30138
  type: "button",
29967
30139
  onClick: () => i(n),
29968
- children: t.get(e) ? kz(t.get(e)) : e
30140
+ children: t.get(e) ? Iz(t.get(e)) : e
29969
30141
  }, e)), /* @__PURE__ */ Y("span", {
29970
30142
  className: "here",
29971
- children: l ? kz(l) : c
30143
+ children: l ? Iz(l) : c
29972
30144
  })]
29973
30145
  }), l === void 0 ? /* @__PURE__ */ X("p", {
29974
30146
  className: "empty",
@@ -29980,7 +30152,7 @@ var Oz = H`
29980
30152
  ]
29981
30153
  }) : /* @__PURE__ */ X(J, { children: [
29982
30154
  (l.kind === "link" || l.kind === "episode-link") && /* @__PURE__ */ X(J, { children: [
29983
- /* @__PURE__ */ Y(Mz, { rows: [
30155
+ /* @__PURE__ */ Y(zz, { rows: [
29984
30156
  ["from", l.row.fromUri],
29985
30157
  ["to", l.row.toUri],
29986
30158
  ["kind", l.row.kind],
@@ -29991,22 +30163,22 @@ var Oz = H`
29991
30163
  "status",
29992
30164
  " ",
29993
30165
  /* @__PURE__ */ Y("span", {
29994
- className: `status ${iz(l.row.status) ? "active" : "refused"}`,
30166
+ className: `status ${dz(l.row.status) ? "active" : "refused"}`,
29995
30167
  children: l.row.status
29996
30168
  })
29997
30169
  ] }),
29998
- /* @__PURE__ */ Y(Mz, { rows: l.kind === "link" ? [["confidence", l.row.confidence], ["version", l.row.version]] : [["from number", l.row.fromNumber], ["to number", l.row.toNumber]] }),
30170
+ /* @__PURE__ */ Y(zz, { rows: l.kind === "link" ? [["confidence", l.row.confidence], ["version", l.row.version]] : [["from number", l.row.fromNumber], ["to number", l.row.toNumber]] }),
29999
30171
  /* @__PURE__ */ Y("h4", { children: "evidence" }),
30000
- /* @__PURE__ */ Y(fz, {
30001
- blob: nz(l.row.evidence),
30172
+ /* @__PURE__ */ Y(yz, {
30173
+ blob: lz(l.row.evidence),
30002
30174
  label: "evidence"
30003
30175
  }),
30004
- l.kind === "link" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h4", { children: "gates" }), /* @__PURE__ */ Y(fz, {
30005
- blob: nz(l.row.gates),
30176
+ l.kind === "link" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h4", { children: "gates" }), /* @__PURE__ */ Y(yz, {
30177
+ blob: lz(l.row.gates),
30006
30178
  label: "gates"
30007
30179
  })] })
30008
30180
  ] }),
30009
- (l.kind === "claim" || l.kind === "episode-claim") && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Mz, { rows: [
30181
+ (l.kind === "claim" || l.kind === "episode-claim") && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(zz, { rows: [
30010
30182
  ["from", l.row.fromUri],
30011
30183
  ["to", l.row.toUri],
30012
30184
  ["kind", l.row.kind],
@@ -30014,18 +30186,18 @@ var Oz = H`
30014
30186
  ["provenance", l.row.provenance],
30015
30187
  ["answer seq", l.row.answerSeq],
30016
30188
  ...l.kind === "claim" ? [["target scope", l.row.targetScope]] : []
30017
- ] }), /* @__PURE__ */ Y(Nz, {
30189
+ ] }), /* @__PURE__ */ Y(Bz, {
30018
30190
  bundle: e,
30019
30191
  seq: l.row.answerSeq,
30020
30192
  answer: o,
30021
30193
  onLoad: d
30022
30194
  })] }),
30023
- l.kind === "episode-source" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Mz, { rows: [
30195
+ l.kind === "episode-source" && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(zz, { rows: [
30024
30196
  ["media", l.row.fromUri],
30025
30197
  ["episode", l.row.toUri],
30026
30198
  ["listed by", l.row.claimer],
30027
30199
  ["answer seq", l.row.answerSeq]
30028
- ] }), /* @__PURE__ */ Y(Nz, {
30200
+ ] }), /* @__PURE__ */ Y(Bz, {
30029
30201
  bundle: e,
30030
30202
  seq: l.row.answerSeq,
30031
30203
  answer: o,
@@ -30050,11 +30222,11 @@ var Oz = H`
30050
30222
  children: "Follow"
30051
30223
  }) : /* @__PURE__ */ Y("span", {
30052
30224
  className: "unresolved",
30053
- children: Az(e.gap)
30225
+ children: Lz(e.gap)
30054
30226
  }),
30055
30227
  /* @__PURE__ */ Y("span", {
30056
30228
  className: "what",
30057
- children: e.ref ? kz(e.ref) : "unresolved"
30229
+ children: e.ref ? Iz(e.ref) : "unresolved"
30058
30230
  }),
30059
30231
  /* @__PURE__ */ Y("span", {
30060
30232
  className: "key",
@@ -30065,7 +30237,7 @@ var Oz = H`
30065
30237
  })
30066
30238
  ] })] })]
30067
30239
  });
30068
- }, Fz = H`
30240
+ }, Hz = H`
30069
30241
  table {
30070
30242
  width: 100%;
30071
30243
  border-collapse: collapse;
@@ -30118,8 +30290,8 @@ var Oz = H`
30118
30290
  .status.active { color: rgb(74, 222, 128); }
30119
30291
  .status.refused { color: rgb(248, 113, 113); }
30120
30292
  .empty { color: rgba(255, 255, 255, 0.5); font-size: 1.2rem; }
30121
- `, Iz = ({ fill: e, index: t, onSelect: n }) => {
30122
- let r = $R(t, e.supports);
30293
+ `, Uz = ({ fill: e, index: t, onSelect: n }) => {
30294
+ let r = oz(t, e.supports);
30123
30295
  return r.length === 0 ? /* @__PURE__ */ Y("div", {
30124
30296
  className: "proof",
30125
30297
  children: /* @__PURE__ */ Y("span", {
@@ -30142,20 +30314,20 @@ var Oz = H`
30142
30314
  children: `${t.fromUri} #${t.fromNumber ?? "null"} to ${t.toUri} #${t.toNumber ?? "null"}`
30143
30315
  }) : /* @__PURE__ */ Y("span", {
30144
30316
  className: "pair",
30145
- children: e.ref ? `${kz(e.ref)} ${e.key}` : /* @__PURE__ */ Y("span", {
30317
+ children: e.ref ? `${Iz(e.ref)} ${e.key}` : /* @__PURE__ */ Y("span", {
30146
30318
  className: "missing",
30147
- children: `${e.key}: ${Az(e.gap)}`
30319
+ children: `${e.key}: ${Lz(e.gap)}`
30148
30320
  })
30149
30321
  }),
30150
30322
  t && /* @__PURE__ */ Y("span", {
30151
- className: `status ${iz(t.status) ? "active" : "refused"}`,
30323
+ className: `status ${dz(t.status) ? "active" : "refused"}`,
30152
30324
  children: t.status
30153
30325
  })
30154
30326
  ]
30155
30327
  }, e.key);
30156
30328
  }) });
30157
- }, Lz = ({ bundle: e, index: t, selected: n, onSelect: r }) => /* @__PURE__ */ X("div", {
30158
- css: Fz,
30329
+ }, Wz = ({ bundle: e, index: t, selected: n, onSelect: r }) => /* @__PURE__ */ X("div", {
30330
+ css: Hz,
30159
30331
  "data-episodes": !0,
30160
30332
  children: [
30161
30333
  (e.episodes ?? []).length === 0 ? /* @__PURE__ */ Y("p", {
@@ -30175,8 +30347,8 @@ var Oz = H`
30175
30347
  className: "slot",
30176
30348
  children: e.slotId
30177
30349
  }),
30178
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.number }) }),
30179
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.title }) }),
30350
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.number }) }),
30351
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.title }) }),
30180
30352
  /* @__PURE__ */ Y("td", { children: e.fills.length === 0 ? /* @__PURE__ */ Y("span", {
30181
30353
  className: "empty",
30182
30354
  children: "nothing fills this slot"
@@ -30189,7 +30361,7 @@ var Oz = H`
30189
30361
  className: "uri",
30190
30362
  children: e.episodeUri
30191
30363
  }),
30192
- /* @__PURE__ */ X("span", { children: ["#", /* @__PURE__ */ Y(uz, { value: e.number })] }),
30364
+ /* @__PURE__ */ X("span", { children: ["#", /* @__PURE__ */ Y(_z, { value: e.number })] }),
30193
30365
  /* @__PURE__ */ Y("span", { children: e.origin }),
30194
30366
  /* @__PURE__ */ Y("span", {
30195
30367
  className: "via",
@@ -30200,7 +30372,7 @@ var Oz = H`
30200
30372
  children: e.by
30201
30373
  })
30202
30374
  ]
30203
- }), /* @__PURE__ */ Y(Iz, {
30375
+ }), /* @__PURE__ */ Y(Uz, {
30204
30376
  fill: e,
30205
30377
  index: t,
30206
30378
  onSelect: r
@@ -30238,7 +30410,7 @@ var Oz = H`
30238
30410
  }),
30239
30411
  /* @__PURE__ */ Y("td", { children: e.kind }),
30240
30412
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("span", {
30241
- className: `status ${iz(e.status) ? "active" : "refused"}`,
30413
+ className: `status ${dz(e.status) ? "active" : "refused"}`,
30242
30414
  children: e.status
30243
30415
  }) }),
30244
30416
  /* @__PURE__ */ Y("td", { children: e.by }),
@@ -30294,7 +30466,7 @@ var Oz = H`
30294
30466
  //#endregion
30295
30467
  //#region src/router/debug/index.tsx
30296
30468
  V();
30297
- var Rz = H`
30469
+ var Gz = H`
30298
30470
  max-width: 150rem;
30299
30471
  margin: calc(var(--stub-header-height) + 2rem) auto 6rem;
30300
30472
  padding: 0 1.5rem;
@@ -30404,14 +30576,14 @@ var Rz = H`
30404
30576
 
30405
30577
  .columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
30406
30578
  @media (max-width: 900px) { .columns { grid-template-columns: 1fr; } }
30407
- `, zz = 1500, Bz = ({ label: e, value: t }) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("span", {
30579
+ `, Kz = 1500, qz = ({ label: e, value: t }) => /* @__PURE__ */ X("div", { children: [/* @__PURE__ */ Y("span", {
30408
30580
  className: "label",
30409
30581
  children: e
30410
- }), /* @__PURE__ */ Y("code", { children: /* @__PURE__ */ Y(uz, { value: t }) })] }), Vz = ({ reason: e }) => e === "null" ? /* @__PURE__ */ Y("code", {
30582
+ }), /* @__PURE__ */ Y("code", { children: /* @__PURE__ */ Y(_z, { value: t }) })] }), Jz = ({ reason: e }) => e === "null" ? /* @__PURE__ */ Y("code", {
30411
30583
  className: "token",
30412
30584
  "data-token-reason": !0,
30413
30585
  children: "\"null\""
30414
- }) : /* @__PURE__ */ Y(uz, { value: e }), Hz = ({ load: e = pb, loadAnswerBytes: t = mb, warm: n = cz }) => {
30586
+ }) : /* @__PURE__ */ Y(_z, { value: e }), Yz = ({ load: e = pb, loadAnswerBytes: t = mb, warm: n = hz }) => {
30415
30587
  let r = gu(), [, i] = hu(), a = Cb(r), [o, s] = I(a), [c, l] = I({ kind: "idle" }), [u, d] = I(0), [f, p] = I({ kind: "off" }), [m, h] = I([]), g = R(""), _ = R(void 0);
30416
30588
  L(() => {
30417
30589
  s(a), h([]), p({ kind: "off" }), g.current = "", _.current !== void 0 && clearTimeout(_.current), _.current = void 0;
@@ -30435,14 +30607,14 @@ var Rz = H`
30435
30607
  t = !1;
30436
30608
  };
30437
30609
  }, [a, u]);
30438
- let v = c.kind === "done" ? c.bundle : void 0, y = z(() => v ? ZR(v) : /* @__PURE__ */ new Map(), [v]), b = m[m.length - 1], x = !(!v || v.resolved || v.reason === "not-enabled");
30610
+ let v = c.kind === "done" ? c.bundle : void 0, y = z(() => v ? iz(v) : /* @__PURE__ */ new Map(), [v]), b = m[m.length - 1], x = !(!v || v.resolved || v.reason === "not-enabled");
30439
30611
  return L(() => {
30440
30612
  if (!a || !x || g.current === a) return;
30441
30613
  g.current = a;
30442
30614
  let e = a, t = () => g.current === e, r = () => {
30443
30615
  _.current === void 0 && (_.current = setTimeout(() => {
30444
30616
  _.current = void 0, t() && d((e) => e + 1);
30445
- }, zz));
30617
+ }, Kz));
30446
30618
  };
30447
30619
  p({
30448
30620
  kind: "asking",
@@ -30468,7 +30640,7 @@ var Rz = H`
30468
30640
  }, [a, x]), L(() => () => {
30469
30641
  g.current = "", _.current !== void 0 && clearTimeout(_.current);
30470
30642
  }, []), /* @__PURE__ */ X("div", {
30471
- css: Rz,
30643
+ css: Gz,
30472
30644
  "data-debug-trace": !0,
30473
30645
  children: [
30474
30646
  /* @__PURE__ */ Y("h1", { children: "Graph trace" }),
@@ -30503,7 +30675,7 @@ var Rz = H`
30503
30675
  className: f.kind === "asking" ? "warming" : "warming done",
30504
30676
  "data-warming": f.kind,
30505
30677
  "data-answered": f.progress.payloads,
30506
- children: f.kind === "asking" ? `asking the sources about ${a}: ${f.progress.payloads} answer(s) so far, ${f.progress.handles} handle(s), ${f.progress.episodes} episode(s). All 24 sources are asked, so a cold graph takes tens of seconds. The panel fills as they answer and stops waiting on its own.` : f.progress.payloads === 0 ? `nothing answered about ${a}. All 24 sources were asked and none returned a row, so the graph stayed empty: either no source recognises that uri, or every one of them refused it. Nothing is still loading.` : `the sources have stopped answering about ${a}: ${f.progress.payloads} answer(s), ${f.progress.handles} handle(s), ${f.progress.episodes} episode(s). What is below is what that produced.`
30678
+ children: f.kind === "asking" ? `asking the sources about ${a}: ${f.progress.payloads} answer(s) so far, ${f.progress.handles} handle(s), ${f.progress.episodes} episode(s). Every source is asked, so a cold graph takes tens of seconds. The panel fills as they answer and stops waiting on its own.` : f.progress.payloads === 0 ? `nothing answered about ${a}. Every source was asked and none returned a row, so the graph stayed empty: either no source recognises that uri, or every one of them refused it. Nothing is still loading.` : `the sources have stopped answering about ${a}: ${f.progress.payloads} answer(s), ${f.progress.handles} handle(s), ${f.progress.episodes} episode(s). What is below is what that produced.`
30507
30679
  }),
30508
30680
  c.kind === "loading" && /* @__PURE__ */ X("p", {
30509
30681
  className: "empty",
@@ -30526,23 +30698,23 @@ var Rz = H`
30526
30698
  children: [/* @__PURE__ */ X("div", {
30527
30699
  className: "pairs",
30528
30700
  children: [
30529
- /* @__PURE__ */ Y(Bz, {
30701
+ /* @__PURE__ */ Y(qz, {
30530
30702
  label: "asked",
30531
30703
  value: v.asked
30532
30704
  }),
30533
- /* @__PURE__ */ Y(Bz, {
30705
+ /* @__PURE__ */ Y(qz, {
30534
30706
  label: "cluster",
30535
30707
  value: v.resolved.clusterId
30536
30708
  }),
30537
- /* @__PURE__ */ Y(Bz, {
30709
+ /* @__PURE__ */ Y(qz, {
30538
30710
  label: "aggregate",
30539
30711
  value: v.resolved.aggUri
30540
30712
  }),
30541
- /* @__PURE__ */ Y(Bz, {
30713
+ /* @__PURE__ */ Y(qz, {
30542
30714
  label: "scope",
30543
30715
  value: v.resolved.scope
30544
30716
  }),
30545
- /* @__PURE__ */ Y(Bz, {
30717
+ /* @__PURE__ */ Y(qz, {
30546
30718
  label: "kind",
30547
30719
  value: v.resolved.kind
30548
30720
  })
@@ -30572,7 +30744,7 @@ var Rz = H`
30572
30744
  children: [
30573
30745
  /* @__PURE__ */ Y("div", {
30574
30746
  className: "why",
30575
- children: rz(v.reason)
30747
+ children: uz(v.reason)
30576
30748
  }),
30577
30749
  v.reason === "not-enabled" && /* @__PURE__ */ X("div", {
30578
30750
  className: "advice",
@@ -30593,10 +30765,10 @@ var Rz = H`
30593
30765
  }),
30594
30766
  /* @__PURE__ */ X("div", {
30595
30767
  className: "pairs",
30596
- children: [/* @__PURE__ */ Y(Bz, {
30768
+ children: [/* @__PURE__ */ Y(qz, {
30597
30769
  label: "asked",
30598
30770
  value: v.asked
30599
- }), /* @__PURE__ */ Y(Bz, {
30771
+ }), /* @__PURE__ */ Y(qz, {
30600
30772
  label: "reason",
30601
30773
  value: v.reason ?? null
30602
30774
  })]
@@ -30607,19 +30779,19 @@ var Rz = H`
30607
30779
  className: "pairs",
30608
30780
  "data-run-length": !0,
30609
30781
  children: [
30610
- /* @__PURE__ */ Y(Bz, {
30782
+ /* @__PURE__ */ Y(qz, {
30611
30783
  label: "run length",
30612
30784
  value: v.runLength?.value ?? null
30613
30785
  }),
30614
- /* @__PURE__ */ Y(Bz, {
30786
+ /* @__PURE__ */ Y(qz, {
30615
30787
  label: "from",
30616
30788
  value: v.runLength?.from ?? null
30617
30789
  }),
30618
- /* @__PURE__ */ Y(Bz, {
30790
+ /* @__PURE__ */ Y(qz, {
30619
30791
  label: "tier",
30620
30792
  value: v.runLength?.tier ?? null
30621
30793
  }),
30622
- /* @__PURE__ */ Y(Bz, {
30794
+ /* @__PURE__ */ Y(qz, {
30623
30795
  label: "witnesses",
30624
30796
  value: v.runLength?.witnesses ?? null
30625
30797
  })
@@ -30628,10 +30800,10 @@ var Rz = H`
30628
30800
  /* @__PURE__ */ X("div", {
30629
30801
  className: "pairs",
30630
30802
  "data-cost": !0,
30631
- children: [/* @__PURE__ */ Y(Bz, {
30803
+ children: [/* @__PURE__ */ Y(qz, {
30632
30804
  label: "statements",
30633
30805
  value: v.cost?.statements ?? null
30634
- }), /* @__PURE__ */ Y(Bz, {
30806
+ }), /* @__PURE__ */ Y(qz, {
30635
30807
  label: "ms to build",
30636
30808
  value: v.cost?.ms ?? null
30637
30809
  })]
@@ -30669,16 +30841,16 @@ var Rz = H`
30669
30841
  ] }) }), /* @__PURE__ */ Y("tbody", { children: v.asks.map((e, t) => /* @__PURE__ */ X("tr", {
30670
30842
  "data-ask": e.origin,
30671
30843
  children: [
30672
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.seq ?? null }) }),
30844
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.seq ?? null }) }),
30673
30845
  /* @__PURE__ */ Y("td", { children: e.origin }),
30674
30846
  /* @__PURE__ */ Y("td", { children: e.outcome }),
30675
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(Vz, { reason: e.reason }) })
30847
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(Jz, { reason: e.reason }) })
30676
30848
  ]
30677
30849
  }, `${e.origin} ${e.seq ?? t}`)) })]
30678
30850
  })] })]
30679
30851
  }),
30680
30852
  /* @__PURE__ */ Y("h2", { children: "Media graph" }),
30681
- /* @__PURE__ */ Y(Dz, {
30853
+ /* @__PURE__ */ Y(Pz, {
30682
30854
  bundle: v,
30683
30855
  selected: b,
30684
30856
  onSelect: (e) => h([e])
@@ -30713,12 +30885,12 @@ var Rz = H`
30713
30885
  }),
30714
30886
  /* @__PURE__ */ Y("td", { children: e.kind }),
30715
30887
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("span", {
30716
- className: `status ${iz(e.status) ? "active" : "refused"}`,
30888
+ className: `status ${dz(e.status) ? "active" : "refused"}`,
30717
30889
  children: e.status
30718
30890
  }) }),
30719
30891
  /* @__PURE__ */ Y("td", { children: e.by }),
30720
30892
  /* @__PURE__ */ Y("td", { children: e.reason }),
30721
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.confidence }) }),
30893
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.confidence }) }),
30722
30894
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("button", {
30723
30895
  type: "button",
30724
30896
  className: "inspect",
@@ -30759,7 +30931,7 @@ var Rz = H`
30759
30931
  /* @__PURE__ */ Y("td", { children: e.claimer }),
30760
30932
  /* @__PURE__ */ Y("td", { children: e.provenance }),
30761
30933
  /* @__PURE__ */ Y("td", { children: e.answerSeq }),
30762
- /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(uz, { value: e.targetScope }) }),
30934
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(_z, { value: e.targetScope }) }),
30763
30935
  /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("button", {
30764
30936
  type: "button",
30765
30937
  className: "inspect",
@@ -30795,9 +30967,9 @@ var Rz = H`
30795
30967
  /* @__PURE__ */ Y("td", { children: e.by }),
30796
30968
  /* @__PURE__ */ Y("td", {
30797
30969
  className: "uri",
30798
- children: /* @__PURE__ */ Y(uz, { value: e.evidence })
30970
+ children: /* @__PURE__ */ Y(_z, { value: e.evidence })
30799
30971
  }),
30800
- /* @__PURE__ */ Y("td", { children: (e.supports ?? []).length === 0 ? /* @__PURE__ */ Y(uz, { value: null }) : e.supports.map((e) => /* @__PURE__ */ Y("button", {
30972
+ /* @__PURE__ */ Y("td", { children: (e.supports ?? []).length === 0 ? /* @__PURE__ */ Y(_z, { value: null }) : e.supports.map((e) => /* @__PURE__ */ Y("button", {
30801
30973
  type: "button",
30802
30974
  className: "inspect",
30803
30975
  "data-attachment-support": e,
@@ -30807,14 +30979,14 @@ var Rz = H`
30807
30979
  ] }, `${e.runUri} ${e.containerUri} ${e.via} ${e.by}`)) })]
30808
30980
  }),
30809
30981
  /* @__PURE__ */ Y("h2", { children: "Episodes" }),
30810
- /* @__PURE__ */ Y(Lz, {
30982
+ /* @__PURE__ */ Y(Wz, {
30811
30983
  bundle: v,
30812
30984
  index: y,
30813
30985
  selected: b,
30814
30986
  onSelect: (e) => h([e])
30815
30987
  }),
30816
30988
  /* @__PURE__ */ Y("h2", { children: "Inspector" }),
30817
- /* @__PURE__ */ Y(Pz, {
30989
+ /* @__PURE__ */ Y(Vz, {
30818
30990
  bundle: v,
30819
30991
  index: y,
30820
30992
  trail: m,
@@ -30825,52 +30997,52 @@ var Rz = H`
30825
30997
  ] })
30826
30998
  ]
30827
30999
  });
30828
- }, Uz = "[data-party-scroll]", Wz = () => {
30829
- let e = document.querySelectorAll(Uz);
31000
+ }, Xz = "[data-party-scroll]", Zz = () => {
31001
+ let e = document.querySelectorAll(Xz);
30830
31002
  for (let t = e.length - 1; t >= 0; t--) {
30831
31003
  let n = e[t];
30832
31004
  if (n.scrollHeight - n.clientHeight > 0) return n;
30833
31005
  }
30834
- }, Gz = (e, t) => t > 0 ? Math.min(1, Math.max(0, e / t)) : 0, Kz = () => {
30835
- let e = Wz();
31006
+ }, Qz = (e, t) => t > 0 ? Math.min(1, Math.max(0, e / t)) : 0, $z = () => {
31007
+ let e = Zz();
30836
31008
  return e ? Math.max(0, e.scrollHeight - e.clientHeight) : Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
30837
- }, qz = () => {
30838
- let e = Wz();
30839
- return e ? Gz(e.scrollTop, e.scrollHeight - e.clientHeight) : Gz(window.scrollY, document.documentElement.scrollHeight - window.innerHeight);
30840
- }, Jz = () => {
31009
+ }, eB = () => {
31010
+ let e = Zz();
31011
+ return e ? Qz(e.scrollTop, e.scrollHeight - e.clientHeight) : Qz(window.scrollY, document.documentElement.scrollHeight - window.innerHeight);
31012
+ }, tB = () => {
30841
31013
  try {
30842
31014
  return window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches === !0;
30843
31015
  } catch {
30844
31016
  return !1;
30845
31017
  }
30846
- }, Yz = (e, t, n) => !e || Jz() ? "instant" : t <= n * 2 ? "smooth" : "instant", Xz = (e, { smooth: t } = {}) => {
30847
- let n = Wz();
31018
+ }, nB = (e, t, n) => !e || tB() ? "instant" : t <= n * 2 ? "smooth" : "instant", rB = (e, { smooth: t } = {}) => {
31019
+ let n = Zz();
30848
31020
  if (n) {
30849
31021
  let r = n.scrollHeight - n.clientHeight, i = r > 0 ? e * r : 0;
30850
31022
  n.scrollTo({
30851
31023
  top: i,
30852
- behavior: Yz(t, Math.abs(i - n.scrollTop), n.clientHeight)
31024
+ behavior: nB(t, Math.abs(i - n.scrollTop), n.clientHeight)
30853
31025
  });
30854
31026
  return;
30855
31027
  }
30856
31028
  let r = document.documentElement.scrollHeight - window.innerHeight, i = r > 0 ? e * r : 0;
30857
31029
  window.scrollTo({
30858
31030
  top: i,
30859
- behavior: Yz(t, Math.abs(i - window.scrollY), window.innerHeight)
31031
+ behavior: nB(t, Math.abs(i - window.scrollY), window.innerHeight)
30860
31032
  });
30861
31033
  };
30862
31034
  //#endregion
30863
31035
  //#region src/components/party-sync.tsx
30864
31036
  V();
30865
- var Zz = 2, Qz = 8e3, $z = [
31037
+ var iB = 2, aB = 8e3, oB = [
30866
31038
  "wheel",
30867
31039
  "touchstart",
30868
31040
  "keydown",
30869
31041
  "pointerdown"
30870
- ], eB = 60, tB = () => {
31042
+ ], sB = 60, cB = () => {
30871
31043
  let e = Uv(), [t, n] = hu(), r = gu(), i = r ? `${t}?${r}` : t, a = e.status === "active" ? e.role : void 0, o = t === Fv;
30872
31044
  L(() => {
30873
- a !== "host" || o || (Z.setLocation(i, qz()), Z.send({
31045
+ a !== "host" || o || (Z.setLocation(i, eB()), Z.send({
30874
31046
  t: "nav",
30875
31047
  path: i
30876
31048
  }));
@@ -30882,14 +31054,14 @@ var Zz = 2, Qz = 8e3, $z = [
30882
31054
  if (a !== "host" || o) return;
30883
31055
  let e = 0, t, n = () => {
30884
31056
  t = void 0, e = Date.now();
30885
- let n = qz();
31057
+ let n = eB();
30886
31058
  Z.setLocation(i, n), Z.send({
30887
31059
  t: "scroll",
30888
31060
  y: n
30889
31061
  });
30890
31062
  }, r = () => {
30891
31063
  if (t) return;
30892
- let r = Math.max(0, 1e3 / Zz - (Date.now() - e));
31064
+ let r = Math.max(0, 1e3 / iB - (Date.now() - e));
30893
31065
  t = setTimeout(n, r);
30894
31066
  };
30895
31067
  return document.addEventListener("scroll", r, {
@@ -30904,21 +31076,21 @@ var Zz = 2, Qz = 8e3, $z = [
30904
31076
  if (s.current === void 0) return;
30905
31077
  let e = s.current;
30906
31078
  s.current = void 0;
30907
- let t = 0, n = -1, r = 0, i = !1, a = c.current, o = Date.now() + Qz, l = () => {
31079
+ let t = 0, n = -1, r = 0, i = !1, a = c.current, o = Date.now() + aB, l = () => {
30908
31080
  i = !0;
30909
31081
  };
30910
- for (let e of $z) document.addEventListener(e, l, { passive: !0 });
31082
+ for (let e of oB) document.addEventListener(e, l, { passive: !0 });
30911
31083
  let u = () => {
30912
31084
  cancelAnimationFrame(t);
30913
- for (let e of $z) document.removeEventListener(e, l);
31085
+ for (let e of oB) document.removeEventListener(e, l);
30914
31086
  };
30915
- if (Gf(), e === 0) return Xz(0), u;
31087
+ if (Gf(), e === 0) return rB(0), u;
30916
31088
  let d = () => {
30917
- let s = Kz();
31089
+ let s = $z();
30918
31090
  s === n ? r += 1 : (r = 0, n = s);
30919
- let l = s > 0 && r >= eB;
31091
+ let l = s > 0 && r >= sB;
30920
31092
  if (i || c.current !== a || l || Date.now() > o) return u();
30921
- Xz(e), t = requestAnimationFrame(d);
31093
+ rB(e), t = requestAnimationFrame(d);
30922
31094
  };
30923
31095
  return t = requestAnimationFrame(d), u;
30924
31096
  }, [i]);
@@ -30927,7 +31099,7 @@ var Zz = 2, Qz = 8e3, $z = [
30927
31099
  l.current = !1;
30928
31100
  }, [e.status === "active" ? e.invite : void 0]);
30929
31101
  let u = (e, t) => {
30930
- l.current = !0, e === i ? (Gf(), c.current += 1, Xz(t, { smooth: !0 })) : (s.current = t, n(e));
31102
+ l.current = !0, e === i ? (Gf(), c.current += 1, rB(t, { smooth: !0 })) : (s.current = t, n(e));
30931
31103
  };
30932
31104
  return Wv((e, { replayed: t }) => {
30933
31105
  if (a === "guest") switch (e.t) {
@@ -30935,7 +31107,7 @@ var Zz = 2, Qz = 8e3, $z = [
30935
31107
  l.current = !0, e.path !== i && n(e.path);
30936
31108
  return;
30937
31109
  case "scroll":
30938
- Z.hostPath() === i && (Gf(), c.current += 1, Xz(e.y, { smooth: !0 }));
31110
+ Z.hostPath() === i && (Gf(), c.current += 1, rB(e.y, { smooth: !0 }));
30939
31111
  return;
30940
31112
  case "state":
30941
31113
  (!l.current || t) && u(e.path, e.y);
@@ -30946,7 +31118,7 @@ var Zz = 2, Qz = 8e3, $z = [
30946
31118
  //#endregion
30947
31119
  //#region src/components/party-cursor.tsx
30948
31120
  V();
30949
- var nB = 4, rB = 2500, iB = H`
31121
+ var lB = 4, uB = 2500, dB = H`
30950
31122
  position: fixed;
30951
31123
  left: 0;
30952
31124
  top: 0;
@@ -30973,7 +31145,7 @@ var nB = 4, rB = 2500, iB = H`
30973
31145
  font-weight: 600;
30974
31146
  white-space: nowrap;
30975
31147
  }
30976
- `, aB = () => {
31148
+ `, fB = () => {
30977
31149
  let e = Uv(), t = e.status === "active" ? e.role : void 0, [n] = hu(), r = gu(), i = r ? `${n}?${r}` : n;
30978
31150
  L(() => {
30979
31151
  if (t !== "host") return;
@@ -30987,7 +31159,7 @@ var nB = 4, rB = 2500, iB = H`
30987
31159
  r = {
30988
31160
  x: Math.min(1, Math.max(0, t.clientX / window.innerWidth)),
30989
31161
  y: Math.min(1, Math.max(0, t.clientY / window.innerHeight))
30990
- }, !n && (n = setTimeout(i, Math.max(0, 1e3 / nB - (Date.now() - e))));
31162
+ }, !n && (n = setTimeout(i, Math.max(0, 1e3 / lB - (Date.now() - e))));
30991
31163
  };
30992
31164
  return window.addEventListener("pointermove", a, { passive: !0 }), () => {
30993
31165
  window.removeEventListener("pointermove", a), n && clearTimeout(n);
@@ -31011,10 +31183,10 @@ var nB = 4, rB = 2500, iB = H`
31011
31183
  if (!a) return;
31012
31184
  let e = setInterval(() => c(Date.now()), 500);
31013
31185
  return () => clearInterval(e);
31014
- }, [a]), t !== "guest" || !a || s - a.at > rB) return null;
31186
+ }, [a]), t !== "guest" || !a || s - a.at > uB) return null;
31015
31187
  let u = e.status === "active" ? Z.nameOf(e.owner) : void 0;
31016
31188
  return /* @__PURE__ */ X("div", {
31017
- css: iB,
31189
+ css: dB,
31018
31190
  style: {
31019
31191
  "--x": `${a.x * 100}vw`,
31020
31192
  "--y": `${a.y * 100}vh`
@@ -31041,7 +31213,7 @@ var nB = 4, rB = 2500, iB = H`
31041
31213
  //#endregion
31042
31214
  //#region src/components/party-chat.tsx
31043
31215
  V();
31044
- var oB = H`
31216
+ var pB = H`
31045
31217
  position: fixed;
31046
31218
  right: 2rem;
31047
31219
  bottom: 2rem;
@@ -31168,7 +31340,7 @@ var oB = H`
31168
31340
  color: #fff;
31169
31341
  cursor: pointer;
31170
31342
  }
31171
- `, sB = (e, t) => e.self ? "you" : e.name ?? (e.from === t ? "host" : e.from.slice(0, 6)), cB = () => {
31343
+ `, mB = (e, t) => e.self ? "you" : e.name ?? (e.from === t ? "host" : e.from.slice(0, 6)), hB = () => {
31172
31344
  let e = Uv(), t = e.status === "active", [n, r] = I(!1), [i, a] = I(() => Z.chat()), [o, s] = I(0), [c, l] = I(""), u = R(null);
31173
31345
  if (Wv((e, t) => {
31174
31346
  (e.t === "chat" || e.t === "name") && (a(Z.chat()), e.t === "chat" && !n && !t.self && s((e) => e + 1));
@@ -31181,7 +31353,7 @@ var oB = H`
31181
31353
  }, [i, n]), !t) return null;
31182
31354
  let d = e.owner;
31183
31355
  return /* @__PURE__ */ X("div", {
31184
- css: oB,
31356
+ css: pB,
31185
31357
  children: [n && /* @__PURE__ */ X("div", {
31186
31358
  className: "panel",
31187
31359
  role: "dialog",
@@ -31206,7 +31378,7 @@ var oB = H`
31206
31378
  className: `line${e.self ? " self" : ""}`,
31207
31379
  children: [/* @__PURE__ */ Y("span", {
31208
31380
  className: "who",
31209
- children: sB(e, d)
31381
+ children: mB(e, d)
31210
31382
  }), /* @__PURE__ */ Y("span", {
31211
31383
  className: "text",
31212
31384
  children: e.text
@@ -31250,21 +31422,21 @@ var oB = H`
31250
31422
  //#endregion
31251
31423
  //#region src/components/scroll-reset.tsx
31252
31424
  V();
31253
- var lB = () => ({
31425
+ var gB = () => ({
31254
31426
  pathname: location.pathname,
31255
31427
  search: location.search
31256
- }), uB = [
31428
+ }), _B = [
31257
31429
  ["pushState", "push"],
31258
31430
  ["replaceState", "replace"],
31259
31431
  ["popstate", "pop"]
31260
- ], dB = () => {
31261
- let e = R(lB());
31432
+ ], vB = () => {
31433
+ let e = R(gB());
31262
31434
  return L(() => {
31263
- let t = uB.map(([t, n]) => {
31435
+ let t = _B.map(([t, n]) => {
31264
31436
  let r = () => {
31265
31437
  let t = {
31266
31438
  from: e.current,
31267
- to: lB(),
31439
+ to: gB(),
31268
31440
  kind: n,
31269
31441
  asked: Jf()
31270
31442
  };
@@ -31281,15 +31453,15 @@ var lB = () => ({
31281
31453
  //#endregion
31282
31454
  //#region src/router/index.tsx
31283
31455
  V();
31284
- var fB = () => {
31456
+ var yB = () => {
31285
31457
  let { query: e } = pu();
31286
31458
  return /* @__PURE__ */ Y(Eu, {
31287
31459
  to: bd({ query: yd(e) }),
31288
31460
  replace: !0
31289
31461
  });
31290
- }, pB = () => (L(() => {
31462
+ }, bB = () => (L(() => {
31291
31463
  globalThis.close();
31292
- }, []), /* @__PURE__ */ Y("div", { children: "Logging in... this window will close automatically." })), mB = H`
31464
+ }, []), /* @__PURE__ */ Y("div", { children: "Logging in... this window will close automatically." })), xB = H`
31293
31465
  display: flex;
31294
31466
  flex-direction: column;
31295
31467
  min-height: 100vh;
@@ -31297,12 +31469,12 @@ var fB = () => {
31297
31469
  & > .content {
31298
31470
  flex: 1;
31299
31471
  }
31300
- `, hB = H`
31472
+ `, SB = H`
31301
31473
  padding: calc(var(--stub-header-height) + 3rem) 3rem 4rem;
31302
- `, gB = () => /* @__PURE__ */ Y(yu, {
31474
+ `, CB = () => /* @__PURE__ */ Y(yu, {
31303
31475
  hrefs: Yd,
31304
31476
  children: /* @__PURE__ */ X("div", {
31305
- css: mB,
31477
+ css: xB,
31306
31478
  children: [
31307
31479
  /* @__PURE__ */ Y(Zv, {}),
31308
31480
  /* @__PURE__ */ Y("div", {
@@ -31310,65 +31482,65 @@ var fB = () => {
31310
31482
  children: /* @__PURE__ */ X(Tu, { children: [
31311
31483
  /* @__PURE__ */ Y(Su, {
31312
31484
  path: ku(K.HOME),
31313
- component: SI
31485
+ component: kI
31314
31486
  }),
31315
31487
  /* @__PURE__ */ Y(Su, {
31316
31488
  path: ku(K.MEDIA),
31317
- component: SI
31489
+ component: kI
31318
31490
  }),
31319
31491
  /* @__PURE__ */ Y(Su, {
31320
31492
  path: ku(K.SEARCH),
31321
- component: sL
31493
+ component: mL
31322
31494
  }),
31323
31495
  /* @__PURE__ */ Y(Su, {
31324
31496
  path: ku(K.SEARCH_LEGACY),
31325
- component: fB
31497
+ component: yB
31326
31498
  }),
31327
31499
  /* @__PURE__ */ Y(Su, {
31328
31500
  path: ku(K.LEGAL),
31329
- component: uL
31501
+ component: _L
31330
31502
  }),
31331
31503
  /* @__PURE__ */ Y(Su, {
31332
31504
  path: ku(K.PRIVACY),
31333
- component: _L
31505
+ component: wL
31334
31506
  }),
31335
31507
  /* @__PURE__ */ Y(Su, {
31336
31508
  path: ku(K.SETTINGS),
31337
- component: cR
31509
+ component: hR
31338
31510
  }),
31339
31511
  /* @__PURE__ */ Y(Su, {
31340
31512
  path: ku(K.WATCH),
31341
- component: HR
31513
+ component: YR
31342
31514
  }),
31343
31515
  /* @__PURE__ */ Y(Su, {
31344
31516
  path: ku(K.PARTY),
31345
- component: GR
31517
+ component: QR
31346
31518
  }),
31347
31519
  /* @__PURE__ */ Y(Su, {
31348
31520
  path: ku(K.DEBUG_TRACE),
31349
- component: Hz
31521
+ component: Yz
31350
31522
  }),
31351
31523
  /* @__PURE__ */ Y(Su, {
31352
31524
  path: ku(K.LOGIN_CALLBACK),
31353
- component: pB
31525
+ component: bB
31354
31526
  }),
31355
31527
  /* @__PURE__ */ Y(Su, { component: () => /* @__PURE__ */ Y("div", {
31356
- css: hB,
31528
+ css: SB,
31357
31529
  children: "404 No page found"
31358
31530
  }) })
31359
31531
  ] })
31360
31532
  }),
31361
31533
  /* @__PURE__ */ Y($v, {}),
31362
31534
  /* @__PURE__ */ Y(ny, {}),
31363
- /* @__PURE__ */ Y(tB, {}),
31364
- /* @__PURE__ */ Y(aB, {}),
31365
31535
  /* @__PURE__ */ Y(cB, {}),
31366
- /* @__PURE__ */ Y(dB, {})
31536
+ /* @__PURE__ */ Y(fB, {}),
31537
+ /* @__PURE__ */ Y(hB, {}),
31538
+ /* @__PURE__ */ Y(vB, {})
31367
31539
  ]
31368
31540
  })
31369
31541
  });
31370
31542
  st(), V();
31371
- var _B = H`
31543
+ var wB = H`
31372
31544
  display: flex;
31373
31545
  align-items: center;
31374
31546
  justify-content: center;
@@ -31417,10 +31589,10 @@ var _B = H`
31417
31589
  background: rgba(255, 255, 255, 0.08);
31418
31590
  }
31419
31591
  }
31420
- `, vB = (e, t) => `route: ${t}\nmessage: ${e.message}\nstack: ${e.stack ?? "(no stack)"}`, yB = ({ error: e, route: t }) => {
31592
+ `, TB = (e, t) => `route: ${t}\nmessage: ${e.message}\nstack: ${e.stack ?? "(no stack)"}`, EB = ({ error: e, route: t }) => {
31421
31593
  let [n, r] = I(!1);
31422
31594
  return /* @__PURE__ */ Y("div", {
31423
- css: _B,
31595
+ css: wB,
31424
31596
  children: /* @__PURE__ */ X("div", {
31425
31597
  className: "panel",
31426
31598
  children: [
@@ -31438,7 +31610,7 @@ var _B = H`
31438
31610
  }), /* @__PURE__ */ Y("button", {
31439
31611
  type: "button",
31440
31612
  onClick: () => {
31441
- let n = navigator.clipboard?.writeText(vB(e, t));
31613
+ let n = navigator.clipboard?.writeText(TB(e, t));
31442
31614
  n && n.then(() => r(!0)).catch((e) => console.error(Error("the failure details could not be copied", { cause: e })));
31443
31615
  },
31444
31616
  children: n ? "Copied" : "Copy details"
@@ -31447,7 +31619,7 @@ var _B = H`
31447
31619
  ]
31448
31620
  })
31449
31621
  });
31450
- }, bB = class extends xe {
31622
+ }, DB = class extends xe {
31451
31623
  state = {
31452
31624
  error: null,
31453
31625
  route: this.props.route
@@ -31465,14 +31637,14 @@ var _B = H`
31465
31637
  console.error(Error(`the ${this.props.route} route failed to render`, { cause: e }));
31466
31638
  }
31467
31639
  render() {
31468
- return this.state.error ? /* @__PURE__ */ Y(yB, {
31640
+ return this.state.error ? /* @__PURE__ */ Y(EB, {
31469
31641
  error: this.state.error,
31470
31642
  route: this.props.route
31471
31643
  }) : this.props.children;
31472
31644
  }
31473
- }, xB = ({ children: e }) => {
31645
+ }, OB = ({ children: e }) => {
31474
31646
  let [t] = hu();
31475
- return /* @__PURE__ */ Y(bB, {
31647
+ return /* @__PURE__ */ Y(DB, {
31476
31648
  route: t,
31477
31649
  children: e
31478
31650
  });
@@ -31482,14 +31654,14 @@ var _B = H`
31482
31654
  f(location.href) && (window.__stubExportStore = (e) => ce(e ?? { excludeOrigins: [] }));
31483
31655
  //#endregion
31484
31656
  //#region src/answers-export.ts
31485
- var SB = async (e, t = {}, n = {}) => az(k, e, t, { settleMs: n.settleMs });
31486
- x(location.href) && (window.__stubExportAnswers = () => ue(), window.__stubExportAsks = () => ae(), window.__stubGraphCounts = () => te()), h(location.href) && (window.__stubGraphQL = (e, t, n) => SB(e, t, n));
31657
+ var kB = async (e, t = {}, n = {}) => fz(k, e, t, { settleMs: n.settleMs });
31658
+ x(location.href) && (window.__stubExportAnswers = () => ue(), window.__stubExportAsks = () => ae(), window.__stubGraphCounts = () => te()), h(location.href) && (window.__stubGraphQL = (e, t, n) => kB(e, t, n));
31487
31659
  //#endregion
31488
31660
  //#region src/utils/forget-api-keys.ts
31489
- var CB = "stub.apikeys";
31661
+ var AB = "stub.apikeys";
31490
31662
  st(), ((e = () => localStorage) => {
31491
31663
  try {
31492
- e().removeItem(CB);
31664
+ e().removeItem(AB);
31493
31665
  } catch {}
31494
31666
  })(), (({ check: e, focused: t, page: n = globalThis, document: r = globalThis.document, intervalMs: i = 6e4 }) => {
31495
31667
  let a = (e) => () => {
@@ -31506,7 +31678,7 @@ st(), ((e = () => localStorage) => {
31506
31678
  check: M,
31507
31679
  focused: se
31508
31680
  });
31509
- var wB = H`
31681
+ var jB = H`
31510
31682
  @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,500;1,600;1,700;1,800;1,900&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
31511
31683
 
31512
31684
  :root {
@@ -31568,9 +31740,9 @@ var wB = H`
31568
31740
  }
31569
31741
  `;
31570
31742
  Z.resume();
31571
- var TB = document.createElement("div");
31572
- TB.id = "stub-root", He(/* @__PURE__ */ X(No, {
31743
+ var MB = document.createElement("div");
31744
+ MB.id = "stub-root", He(/* @__PURE__ */ X(No, {
31573
31745
  value: Nl,
31574
- children: [/* @__PURE__ */ Y(Mi, { styles: wB }), /* @__PURE__ */ Y(xB, { children: /* @__PURE__ */ Y(gB, {}) })]
31575
- }), document.body.appendChild(TB));
31746
+ children: [/* @__PURE__ */ Y(Mi, { styles: jB }), /* @__PURE__ */ Y(OB, { children: /* @__PURE__ */ Y(CB, {}) })]
31747
+ }), document.body.appendChild(MB));
31576
31748
  //#endregion