@banou/stub 0.0.40 → 0.0.42
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/assets/account-Dqz2amwB.js +1 -0
- package/build/assets/account-uIgK7-D5.js +1 -0
- package/build/assets/api-Dp-2AT3u-DnXkochq.js +3 -0
- package/build/assets/api-rrvhokeg.js +1 -0
- package/build/assets/build-mcPaLDi_.js +1 -0
- package/build/assets/embed-Dq58Zgjw.js +1609 -0
- package/build/assets/index-C09RPTYO.js +2485 -0
- package/build/assets/lib-account-BsgOxvGV.js +2 -0
- package/build/assets/lib-account-DgN_bHrt.js +51 -0
- package/build/assets/{lib-api-CtiKFcK3-lXOtBAbs.js → lib-api-Dp-2AT3u-5287Hymh.js} +576 -555
- package/build/assets/lib-api-kFj1W6Gv.js +2 -0
- package/build/assets/{lib-worker-CC8a9TDD.js → lib-worker-CWFsPxSd.js} +2720 -1946
- package/build/assets/lib-worker-RTWfVDSm.js +2 -0
- package/build/assets/lib-worker-index-QCwdkNNi.js +2485 -0
- package/build/assets/login-window-BippQvfb.js +71 -0
- package/build/assets/main-Dh0CtXj9.js +4253 -0
- package/build/assets/remote-BwnfCi4M.js +1 -0
- package/build/assets/{remote-CVVOdyaq.js → remote-CAlKhZLk.js} +1 -1
- package/build/assets/worker-BuIMw0JP.js +1 -0
- package/build/assets/worker-DOci0z8U.js +1 -0
- package/build/embed.html +6 -6
- package/build/index.html +7 -7
- package/build/index.js +7739 -5577
- package/fkn.json +1 -1
- package/package.json +2 -2
- package/build/assets/account-BgpTCUUd.js +0 -1
- package/build/assets/account-wP7U-PeH.js +0 -1
- package/build/assets/api-Bh_MpFDA.js +0 -1
- package/build/assets/api-CtiKFcK3-DDpRQueA.js +0 -3
- package/build/assets/build-CQLpK1BK.js +0 -1
- package/build/assets/embed-EZLj05C7.js +0 -1609
- package/build/assets/fetch-DAk81ulb.js +0 -71
- package/build/assets/index-BYXKnZ5C.js +0 -2380
- package/build/assets/lib-account-CF0gclnF.js +0 -2
- package/build/assets/lib-account-CnUKCNw7.js +0 -41
- package/build/assets/lib-api-BdPC6S5P.js +0 -2
- package/build/assets/lib-worker-BijvIwz2.js +0 -2
- package/build/assets/lib-worker-index-DN7VOVxv.js +0 -2380
- package/build/assets/main-DnKOGs5t.js +0 -4005
- package/build/assets/remote-VQoP8ehb.js +0 -1
- package/build/assets/worker-B9WbCrpk.js +0 -1
- package/build/assets/worker-CdIDYmal.js +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { c as e, o as t, t as n, u as r } from "./lib-api-Dp-2AT3u-5287Hymh.js";
|
|
2
|
+
//#region node_modules/@fkn/lib/rolldown-runtime-Dy4uBu1J.js
|
|
3
|
+
var i = Object.defineProperty, a = (e, t) => {
|
|
4
|
+
let n = {};
|
|
5
|
+
for (var r in e) i(n, r, {
|
|
6
|
+
get: e[r],
|
|
7
|
+
enumerable: !0
|
|
8
|
+
});
|
|
9
|
+
return t || i(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
10
|
+
}, o = 0, s = /* @__PURE__ */ new Set(), c = 2e3, l = null, u = (e) => {
|
|
11
|
+
e?.switched !== !1 && (o += 1, l &&= (clearTimeout(l.timer), null));
|
|
12
|
+
for (let e of [...s]) try {
|
|
13
|
+
e();
|
|
14
|
+
} catch {}
|
|
15
|
+
}, d = !1, f = 0, p = () => {
|
|
16
|
+
let e = t();
|
|
17
|
+
e && f !== e.epoch && (f = e.epoch, Promise.resolve(e.remote.account.onChange(u)).catch(() => {
|
|
18
|
+
f === e.epoch && (f = 0);
|
|
19
|
+
}));
|
|
20
|
+
}, m = () => {
|
|
21
|
+
!d && r && (d = !0, n(p));
|
|
22
|
+
}, h = () => o, g = (e) => (s.add(e), m(), () => {
|
|
23
|
+
s.delete(e);
|
|
24
|
+
}), _ = (e) => {
|
|
25
|
+
if (e !== o || l?.generation === e) return;
|
|
26
|
+
let t = setTimeout(() => {
|
|
27
|
+
l?.timer === t && (l = null, o === e && u({ switched: !0 }));
|
|
28
|
+
}, c);
|
|
29
|
+
l = {
|
|
30
|
+
generation: e,
|
|
31
|
+
timer: t
|
|
32
|
+
};
|
|
33
|
+
}, v = /* @__PURE__ */ a({
|
|
34
|
+
info: () => x,
|
|
35
|
+
login: () => y,
|
|
36
|
+
logout: () => b,
|
|
37
|
+
onChange: () => S
|
|
38
|
+
}), y = async () => typeof window > "u" ? !1 : (await e).account.login(location.origin).catch(() => !1), b = async () => {
|
|
39
|
+
typeof window < "u" && await (await e).account.logout().catch(() => {});
|
|
40
|
+
}, x = async () => {
|
|
41
|
+
if (typeof window > "u") return null;
|
|
42
|
+
let t = await e.then((e) => e.account.info()).catch(() => null);
|
|
43
|
+
return t ? {
|
|
44
|
+
name: t.name,
|
|
45
|
+
image: t.image,
|
|
46
|
+
premium: t.premium,
|
|
47
|
+
premiumUntil: t.premiumUntil ? Date.parse(t.premiumUntil) : null
|
|
48
|
+
} : null;
|
|
49
|
+
}, S = async (e) => r ? g(e) : () => {};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { x as a, _ as c, b as i, a as l, S as n, m as o, v as r, h as s, y as t };
|