@banou/stub 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./lib-worker-ZXJfhVkF.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "./lib-worker-ClrG_6Et.js";
2
2
  export { f as exportAnswers, s as exportAsks, u as exportStore, i as graphCounts, e as handleRequest, c as registerRemoteSource, d as remotePicker, t as remotePlayer, a as selectRemoteRelease, p as traceAnswer, n as traceGraph, r as trackerCheck, l as trackerFocused, o as unregisterRemoteSource };
@@ -10717,7 +10717,7 @@ typeof window < "u" && _(() => {
10717
10717
  //#endregion
10718
10718
  //#region src/worker/index.ts?worker
10719
10719
  function Sm(e) {
10720
- return new Worker(new URL("lib-worker-index-BCIwHeuI.js", import.meta.url).href, {
10720
+ return new Worker(new URL("lib-worker-index-CoM3SF4K.js", import.meta.url).href, {
10721
10721
  type: "module",
10722
10722
  name: e?.name
10723
10723
  });
@@ -11097,21 +11097,49 @@ var Cm = (e, t) => yu.fetch(e, t), wm = "banou26/stub", Tm = "season-seed", Em =
11097
11097
  frames: zh,
11098
11098
  connections: Bh
11099
11099
  }), t === "cloud" && (await Qm(Uh[e]), Nh.record(e, "signed-out"));
11100
- }, qh = async (e) => e === "anilist" ? kh(await zh.use(e, (e) => e.graphql({ query: Oh }))) : Ah(await zh.use(e, (e) => e.whoami({}))), Jh = new Sm();
11101
- fm(Jh).catch((e) => console.warn("tracking: FKN relay", e)), i({ fetch: (e, t) => Wm(location.href, e) ? new Response(null, {
11100
+ }, qh = async (e) => e === "anilist" ? kh(await zh.use(e, (e) => e.graphql({ query: Oh }))) : Ah(await zh.use(e, (e) => e.whoami({}))), Jh = "stub.sources.disabled", Yh = /* @__PURE__ */ new Set(), Xh = () => {
11101
+ try {
11102
+ let e = JSON.parse(globalThis.localStorage.getItem("stub.sources.disabled") ?? "[]");
11103
+ return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
11104
+ } catch {
11105
+ return [];
11106
+ }
11107
+ }, Zh = (e, t) => {
11108
+ let n = new Set(Xh());
11109
+ t ? n.delete(e) : n.add(e);
11110
+ try {
11111
+ n.size ? globalThis.localStorage.setItem(Jh, JSON.stringify([...n])) : globalThis.localStorage.removeItem(Jh);
11112
+ } catch {}
11113
+ for (let e of Yh) e();
11114
+ }, Qh = () => {
11115
+ try {
11116
+ globalThis.localStorage.removeItem(Jh);
11117
+ } catch {}
11118
+ for (let e of Yh) e();
11119
+ }, $h = (e) => {
11120
+ let t = (t) => {
11121
+ (t.key === "stub.sources.disabled" || t.key === null) && e();
11122
+ };
11123
+ return Yh.add(e), globalThis.addEventListener?.("storage", t), () => {
11124
+ Yh.delete(e), globalThis.removeEventListener?.("storage", t);
11125
+ };
11126
+ }, eg = new Sm();
11127
+ fm(eg).catch((e) => console.warn("tracking: FKN relay", e)), i({ fetch: (e, t) => Wm(location.href, e) ? new Response(null, {
11102
11128
  status: 404,
11103
11129
  statusText: "the season seed is switched off for this page"
11104
11130
  }) : Cm(e, t) }, {
11105
- transport: Jh,
11131
+ transport: eg,
11106
11132
  key: "fetch"
11107
11133
  }), i(Vh, {
11108
- transport: Jh,
11134
+ transport: eg,
11109
11135
  key: "sessions"
11110
11136
  });
11111
- var { handleRequest: Yh, registerRemoteSource: Xh, unregisterRemoteSource: Zh, remotePicker: Qh, remotePlayer: $h, selectRemoteRelease: eg, exportStore: tg, exportAnswers: ng, exportAsks: rg, graphCounts: ig, traceGraph: ag, traceAnswer: og, setGraphEnabled: sg, setReadStore: cg, trackerCheck: lg, trackerFocused: ug } = await i({}, {
11112
- transport: Jh,
11137
+ var { handleRequest: tg, registerRemoteSource: ng, unregisterRemoteSource: rg, remotePicker: ig, remotePlayer: ag, selectRemoteRelease: og, exportStore: sg, exportAnswers: cg, exportAsks: lg, graphCounts: ug, traceGraph: dg, traceAnswer: fg, setGraphEnabled: pg, setReadStore: mg, setDisabledSources: hg, trackerCheck: gg, trackerFocused: _g } = await i({}, {
11138
+ transport: eg,
11113
11139
  key: "yoga"
11114
- }), dg = new URLSearchParams(location.search);
11115
- Rm(location.href) ? sg(dg.has("graph")) : await cg("graph");
11140
+ }), vg = new URLSearchParams(location.search);
11141
+ Rm(location.href) ? pg(vg.has("graph")) : await mg("graph"), await hg(Xh()), $h(() => {
11142
+ hg(Xh());
11143
+ });
11116
11144
  //#endregion
11117
- export { Mm as A, Ya as B, Nh as C, Qm as D, $m as E, op as F, Eu as I, go as L, Bm as M, lm as N, Zm as O, Jp as P, _o as R, Ph as S, rh as T, ro as V, Kh as _, Yh as a, jh as b, $h as c, ag as d, lg as f, Wh as g, qh as h, ig as i, Fm as j, Nm as k, eg as l, Zh as m, rg as n, Xh as o, ug as p, tg as r, Qh as s, ng as t, og as u, Hh as v, dh as w, Ih as x, Gh as y, io as z };
11145
+ export { rh as A, op as B, Hh as C, Ph as D, Ih as E, Mm as F, Ya as G, go as H, Fm as I, ro as K, Bm as L, Qm as M, Zm as N, Nh as O, Nm as P, lm as R, Kh as S, jh as T, _o as U, Eu as V, io as W, Zh as _, tg as a, qh as b, ag as c, dg as d, gg as f, Xh as g, Jh as h, ug as i, $m as j, dh as k, og as l, rg as m, lg as n, ng as o, _g as p, sg as r, ig as s, cg as t, fg as u, Qh as v, Gh as w, Wh as x, $h as y, Jp as z };