@banou/stub 0.0.25 → 0.0.27
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-BENsgVNM.js → account-BgpTCUUd.js} +1 -1
- package/build/assets/account-wP7U-PeH.js +1 -0
- package/build/assets/api-Bh_MpFDA.js +1 -0
- package/build/assets/{api-BdTgLphT-N3l6mbjo.js → api-CtiKFcK3-DDpRQueA.js} +1 -1
- package/build/assets/embed-BrQNuOFi.js +1460 -0
- package/build/assets/{index-js0hDSG0.js → index-Ncv6yuZR.js} +1 -1
- package/build/assets/lib-account-CF0gclnF.js +2 -0
- package/build/assets/{lib-account-BUymp__o.js → lib-account-CnUKCNw7.js} +3 -3
- package/build/assets/lib-api-BdPC6S5P.js +2 -0
- package/build/assets/{lib-api-BdTgLphT-DSr8Qbeb.js → lib-api-CtiKFcK3-lXOtBAbs.js} +1 -1
- package/build/assets/lib-c2lhVmO4.js +71 -0
- package/build/assets/{lib-worker-BGozEgr9.js → lib-worker-B0U91WaG.js} +1119 -919
- package/build/assets/{lib-worker-GYQJyD7j.js → lib-worker-DcW0whIQ.js} +1 -1
- package/build/assets/{lib-worker-index-B4F7kvUH.js → lib-worker-index-Bs3gK32M.js} +1 -1
- package/build/assets/{main-CzEKJyQ-.js → main-DvSo_fP8.js} +5 -5
- package/build/assets/{worker-CT1T8vTt.js → worker-BADY-zeU.js} +1 -1
- package/build/assets/{worker-BwFHZ688.js → worker-DWbnsC8L.js} +1 -1
- package/build/embed.html +4 -4
- package/build/index.html +5 -5
- package/build/index.js +8 -8
- package/fkn.json +1 -0
- package/package.json +6 -4
- package/build/assets/account-DlIk6xHa.js +0 -1
- package/build/assets/api-D1AUDaGk.js +0 -1
- package/build/assets/embed-BiH-YCjQ.js +0 -1461
- package/build/assets/lib-Co-0V6DV.js +0 -71
- package/build/assets/lib-account-zcRp2Stn.js +0 -2
- package/build/assets/lib-api-MaBk5T3E.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as e, n as t, r as n, t as r } from "./lib-rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { a as i, c as a, d as o, f as s, i as c, l, n as u, o as d, p as f, s as p, t as m, u as h } from "./lib-api-
|
|
3
|
-
import { o as g } from "./lib-account-
|
|
2
|
+
import { a as i, c as a, d as o, f as s, i as c, l, n as u, o as d, p as f, s as p, t as m, u as h } from "./lib-api-CtiKFcK3-lXOtBAbs.js";
|
|
3
|
+
import { o as g } from "./lib-account-CnUKCNw7.js";
|
|
4
4
|
//#region src/worker/index.ts?worker
|
|
5
5
|
function _(e) {
|
|
6
|
-
return new Worker(new URL("lib-worker-index-
|
|
6
|
+
return new Worker(new URL("lib-worker-index-Bs3gK32M.js", import.meta.url).href, {
|
|
7
7
|
type: "module",
|
|
8
8
|
name: e?.name
|
|
9
9
|
});
|
|
@@ -1754,7 +1754,23 @@ var st = class {
|
|
|
1754
1754
|
severity: 0,
|
|
1755
1755
|
title: "Open a website inside this app",
|
|
1756
1756
|
description: "Lets the app navigate to another site without leaving its window."
|
|
1757
|
-
}, Tn =
|
|
1757
|
+
}, Tn = class extends Error {
|
|
1758
|
+
name = "FrameWindowBlockedError";
|
|
1759
|
+
constructor() {
|
|
1760
|
+
super("attachFrame: the browser did not open the window. Call attachFrame directly in a click or key handler, and allow popups for this page");
|
|
1761
|
+
}
|
|
1762
|
+
}, En = /* @__PURE__ */ new Set([
|
|
1763
|
+
"jar-unreachable",
|
|
1764
|
+
"bad-url",
|
|
1765
|
+
"opaque-opener"
|
|
1766
|
+
]), Dn = class extends Error {
|
|
1767
|
+
name = "FrameWindowRefusedError";
|
|
1768
|
+
reason;
|
|
1769
|
+
constructor(e) {
|
|
1770
|
+
let t = En.has(e) ? e : "unknown";
|
|
1771
|
+
super(t === "opaque-opener" ? "attachFrame: this page has an opaque origin, which a window can never answer, so no window was opened" : `attachFrame: the window refused to attach (${t}), and loaded nothing`), this.reason = t;
|
|
1772
|
+
}
|
|
1773
|
+
}, On = (e) => {
|
|
1758
1774
|
let t = yn({
|
|
1759
1775
|
executor: e.executor,
|
|
1760
1776
|
modules: bn,
|
|
@@ -1770,7 +1786,7 @@ var st = class {
|
|
|
1770
1786
|
url: r,
|
|
1771
1787
|
request: i
|
|
1772
1788
|
};
|
|
1773
|
-
},
|
|
1789
|
+
}, kn = [
|
|
1774
1790
|
v,
|
|
1775
1791
|
y,
|
|
1776
1792
|
b,
|
|
@@ -1791,33 +1807,63 @@ var st = class {
|
|
|
1791
1807
|
Ye,
|
|
1792
1808
|
Xe,
|
|
1793
1809
|
Ze
|
|
1794
|
-
],
|
|
1810
|
+
], An = et.map((e) => e.id), jn = (e) => e === 0 ? "auto" : e === 4 ? "critical" : "bundled", Mn = kn, Nn = /* @__PURE__ */ new Map();
|
|
1795
1811
|
(() => {
|
|
1796
|
-
|
|
1797
|
-
let e = (e) =>
|
|
1798
|
-
Object.fromEntries(
|
|
1812
|
+
Nn = new Map(Mn.map((e) => [e.scope, e])), Object.fromEntries(Nn), Mn.filter((e) => e.severity === 4).map((e) => e.scope);
|
|
1813
|
+
let e = (e) => Mn.filter((t) => t.category === e && jn(t.severity) === "bundled");
|
|
1814
|
+
Object.fromEntries(An.map((t) => [t, Math.max(0, ...e(t).map((e) => e.severity))])), Object.fromEntries(An.map((t) => [t, e(t).some((e) => e.unsafe === !0)]));
|
|
1799
1815
|
})();
|
|
1800
|
-
var
|
|
1801
|
-
let t =
|
|
1802
|
-
return t &&
|
|
1803
|
-
},
|
|
1804
|
-
let t =
|
|
1805
|
-
if (t) return
|
|
1806
|
-
},
|
|
1807
|
-
|
|
1816
|
+
var Pn = (e) => Nn.get(e)?.category, Fn = (e) => {
|
|
1817
|
+
let t = Nn.get(e);
|
|
1818
|
+
return t && jn(t.severity);
|
|
1819
|
+
}, In = (e) => {
|
|
1820
|
+
let t = Nn.get(e);
|
|
1821
|
+
if (t) return jn(t.severity) === "critical" ? t.scope : t.category;
|
|
1822
|
+
}, Ln = (e) => {
|
|
1823
|
+
let t = e;
|
|
1824
|
+
if (t.window === void 0) return "iframe";
|
|
1825
|
+
if (t.iframe !== void 0) throw TypeError("attachFrame: pass either iframe or window, not both");
|
|
1826
|
+
if (t.lockdown) throw TypeError("attachFrame: lockdown applies to an iframe, never to a window");
|
|
1827
|
+
if (typeof t.window != "object" || t.window === null) throw TypeError("attachFrame: window must be an object");
|
|
1828
|
+
return "window";
|
|
1829
|
+
}, Rn = (e, t, n) => {
|
|
1830
|
+
if (e === void 0) return t;
|
|
1831
|
+
if (typeof e != "number" || !Number.isFinite(e) || e <= 0) throw TypeError(`attachFrame: window.${n} must be a positive number of CSS pixels`);
|
|
1832
|
+
return Math.round(e);
|
|
1833
|
+
}, zn = ({ url: e, width: t, height: n }) => {
|
|
1834
|
+
let r = (() => {
|
|
1835
|
+
if (e === void 0 || e === "" || e === "about:blank") return "";
|
|
1836
|
+
if (typeof e != "string") throw TypeError("attachFrame: window.url must be a string");
|
|
1837
|
+
let t = (() => {
|
|
1838
|
+
try {
|
|
1839
|
+
return new URL(e, location.href);
|
|
1840
|
+
} catch {
|
|
1841
|
+
throw TypeError(`attachFrame: window.url is not a valid URL: ${e}`);
|
|
1842
|
+
}
|
|
1843
|
+
})();
|
|
1844
|
+
if (t.protocol !== "http:" && t.protocol !== "https:") throw TypeError("attachFrame: window.url must be an http or https address");
|
|
1845
|
+
return t.href;
|
|
1846
|
+
})();
|
|
1847
|
+
return r && Sn(r), {
|
|
1848
|
+
url: r,
|
|
1849
|
+
width: Rn(t, 500, "width"),
|
|
1850
|
+
height: Rn(n, 700, "height")
|
|
1851
|
+
};
|
|
1852
|
+
}, Bn = /* @__PURE__ */ new Map(), Vn = /* @__PURE__ */ new Set(), Hn = (e) => {
|
|
1853
|
+
Bn.set(e, (Bn.get(e) ?? 0) + 1);
|
|
1808
1854
|
let t = !1;
|
|
1809
1855
|
return () => {
|
|
1810
|
-
t || (t = !0,
|
|
1856
|
+
t || (t = !0, Bn.set(e, Math.max(0, (Bn.get(e) ?? 1) - 1)));
|
|
1811
1857
|
};
|
|
1812
|
-
},
|
|
1813
|
-
|
|
1858
|
+
}, Un = (e, t) => {
|
|
1859
|
+
Vn.add({
|
|
1814
1860
|
kind: e,
|
|
1815
1861
|
probe: t
|
|
1816
1862
|
});
|
|
1817
|
-
},
|
|
1863
|
+
}, Wn = typeof FinalizationRegistry > "u" ? void 0 : new FinalizationRegistry((e) => e()), Gn = (e) => {
|
|
1818
1864
|
let t = e.body;
|
|
1819
1865
|
if (!t) return e;
|
|
1820
|
-
let n =
|
|
1866
|
+
let n = Hn("streamed response"), r = t.getReader(), i = new ReadableStream({
|
|
1821
1867
|
pull: async (e) => {
|
|
1822
1868
|
try {
|
|
1823
1869
|
let { done: t, value: i } = await r.read();
|
|
@@ -1838,37 +1884,37 @@ var jn = (e) => An.get(e)?.category, Mn = (e) => {
|
|
|
1838
1884
|
statusText: e.statusText,
|
|
1839
1885
|
headers: e.headers
|
|
1840
1886
|
});
|
|
1841
|
-
return
|
|
1842
|
-
},
|
|
1887
|
+
return Wn?.register(a, n), a;
|
|
1888
|
+
}, Kn = async (e) => {
|
|
1843
1889
|
if (e != null) return typeof e == "string" || e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? e : new Request("https://body.invalid/", {
|
|
1844
1890
|
method: "POST",
|
|
1845
1891
|
body: e,
|
|
1846
1892
|
duplex: "half"
|
|
1847
1893
|
}).arrayBuffer();
|
|
1848
|
-
},
|
|
1894
|
+
}, qn = async (e) => {
|
|
1849
1895
|
if (e.method === "GET" || e.method === "HEAD") return;
|
|
1850
1896
|
let t = await e.clone().arrayBuffer();
|
|
1851
1897
|
return t.byteLength ? t : void 0;
|
|
1852
|
-
},
|
|
1898
|
+
}, Jn = async (e, t) => {
|
|
1853
1899
|
if (a(e), typeof e == "object" && e && !(e instanceof URL) && typeof e.url == "string") {
|
|
1854
1900
|
let n = e, r = {};
|
|
1855
1901
|
n.headers.forEach((e, t) => {
|
|
1856
1902
|
r[t] = e;
|
|
1857
1903
|
});
|
|
1858
|
-
let i = await
|
|
1904
|
+
let i = await Kn(t?.body === void 0 ? await qn(n) : t.body);
|
|
1859
1905
|
return c.then((e) => e.cloud.fetch(n.url, {
|
|
1860
1906
|
...t,
|
|
1861
1907
|
method: t?.method ?? n.method,
|
|
1862
1908
|
headers: t?.headers ?? r,
|
|
1863
1909
|
body: i
|
|
1864
|
-
})).then(
|
|
1910
|
+
})).then(Gn);
|
|
1865
1911
|
}
|
|
1866
|
-
let n = e instanceof URL ? e.href : e, r = await
|
|
1912
|
+
let n = e instanceof URL ? e.href : e, r = await Kn(t?.body);
|
|
1867
1913
|
return c.then((e) => e.cloud.fetch(n, t?.body === void 0 ? t : {
|
|
1868
1914
|
...t,
|
|
1869
1915
|
body: r
|
|
1870
|
-
})).then(
|
|
1871
|
-
},
|
|
1916
|
+
})).then(Gn);
|
|
1917
|
+
}, Yn = (e, t, { classifier: n = "no-base" } = {}) => {
|
|
1872
1918
|
if (!e.session) return {
|
|
1873
1919
|
kind: "refuse",
|
|
1874
1920
|
reason: "frame.fetch on the cloud backend needs its own session: attach with syncCookies: false"
|
|
@@ -1904,27 +1950,32 @@ var jn = (e) => An.get(e)?.category, Mn = (e) => {
|
|
|
1904
1950
|
targetHost: r.hostname,
|
|
1905
1951
|
promptHosts: i
|
|
1906
1952
|
};
|
|
1907
|
-
},
|
|
1908
|
-
|
|
1909
|
-
|
|
1953
|
+
}, Xn = "fkn-attach-frame", Zn = "fkn-attach-window", Qn = {
|
|
1954
|
+
hello: "fkn-attach-window",
|
|
1955
|
+
refused: "fkn-attach-window-refused",
|
|
1956
|
+
gone: "fkn-attach-window-gone",
|
|
1957
|
+
detach: "fkn-attach-window-detach"
|
|
1958
|
+
}, $n = 6e4, er = /* @__PURE__ */ g({ lookup: () => tr }), tr = (e, t) => c.then((n) => n.cloud.dns.lookup(e, t)), nr = /* @__PURE__ */ n({
|
|
1959
|
+
Blob: () => vr,
|
|
1960
|
+
BlobOptions: () => yr,
|
|
1910
1961
|
Buffer: () => G,
|
|
1911
|
-
File: () =>
|
|
1912
|
-
FileOptions: () =>
|
|
1913
|
-
INSPECT_MAX_BYTES: () =>
|
|
1914
|
-
SlowBuffer: () =>
|
|
1915
|
-
TranscodeEncoding: () =>
|
|
1916
|
-
atob: () =>
|
|
1917
|
-
btoa: () =>
|
|
1918
|
-
constants: () =>
|
|
1919
|
-
default: () =>
|
|
1920
|
-
isAscii: () =>
|
|
1921
|
-
isUtf8: () =>
|
|
1922
|
-
kMaxLength: () =>
|
|
1923
|
-
kStringMaxLength: () =>
|
|
1924
|
-
resolveObjectURL: () =>
|
|
1925
|
-
transcode: () =>
|
|
1962
|
+
File: () => br,
|
|
1963
|
+
FileOptions: () => xr,
|
|
1964
|
+
INSPECT_MAX_BYTES: () => Sr,
|
|
1965
|
+
SlowBuffer: () => Cr,
|
|
1966
|
+
TranscodeEncoding: () => wr,
|
|
1967
|
+
atob: () => Tr,
|
|
1968
|
+
btoa: () => Er,
|
|
1969
|
+
constants: () => Dr,
|
|
1970
|
+
default: () => _r,
|
|
1971
|
+
isAscii: () => Or,
|
|
1972
|
+
isUtf8: () => kr,
|
|
1973
|
+
kMaxLength: () => Ar,
|
|
1974
|
+
kStringMaxLength: () => jr,
|
|
1975
|
+
resolveObjectURL: () => Mr,
|
|
1976
|
+
transcode: () => Nr
|
|
1926
1977
|
});
|
|
1927
|
-
function
|
|
1978
|
+
function rr(e) {
|
|
1928
1979
|
var t = e.length;
|
|
1929
1980
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
1930
1981
|
var n = e.indexOf("=");
|
|
@@ -1932,31 +1983,31 @@ function qn(e) {
|
|
|
1932
1983
|
var r = n === t ? 0 : 4 - n % 4;
|
|
1933
1984
|
return [n, r];
|
|
1934
1985
|
}
|
|
1935
|
-
function
|
|
1936
|
-
var t =
|
|
1986
|
+
function ir(e) {
|
|
1987
|
+
var t = rr(e), n = t[0], r = t[1];
|
|
1937
1988
|
return (n + r) * 3 / 4 - r;
|
|
1938
1989
|
}
|
|
1939
|
-
function
|
|
1990
|
+
function ar(e, t, n) {
|
|
1940
1991
|
return (t + n) * 3 / 4 - n;
|
|
1941
1992
|
}
|
|
1942
|
-
function
|
|
1943
|
-
for (var t, n =
|
|
1993
|
+
function or(e) {
|
|
1994
|
+
for (var t, n = rr(e), r = n[0], i = n[1], a = new fr(ar(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
1944
1995
|
return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
1945
1996
|
}
|
|
1946
|
-
function
|
|
1947
|
-
return
|
|
1997
|
+
function sr(e) {
|
|
1998
|
+
return dr[e >> 18 & 63] + dr[e >> 12 & 63] + dr[e >> 6 & 63] + dr[e & 63];
|
|
1948
1999
|
}
|
|
1949
|
-
function
|
|
1950
|
-
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(
|
|
2000
|
+
function cr(e, t, n) {
|
|
2001
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(sr(r));
|
|
1951
2002
|
return i.join("");
|
|
1952
2003
|
}
|
|
1953
|
-
function
|
|
1954
|
-
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(
|
|
1955
|
-
return r === 1 ? (t = e[n - 1], i.push(
|
|
2004
|
+
function lr(e) {
|
|
2005
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(cr(e, o, o + a > s ? s : o + a));
|
|
2006
|
+
return r === 1 ? (t = e[n - 1], i.push(dr[t >> 2] + dr[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(dr[t >> 10] + dr[t >> 4 & 63] + dr[t << 2 & 63] + "=")), i.join("");
|
|
1956
2007
|
}
|
|
1957
|
-
var U,
|
|
1958
|
-
for (U = {},
|
|
1959
|
-
W[45] = 62, W[95] = 63,
|
|
2008
|
+
var U, ur, dr, W, fr, pr, mr, hr, gr, _r, vr, yr, G, br, xr, Sr, Cr, wr, Tr, Er, Dr, Or, kr, Ar, jr, Mr, Nr, Pr = t((() => {
|
|
2009
|
+
for (U = {}, ur = {}, ur.byteLength = ir, ur.toByteArray = or, ur.fromByteArray = lr, dr = [], W = [], fr = typeof Uint8Array < "u" ? Uint8Array : Array, pr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", mr = 0, hr = pr.length; mr < hr; ++mr) dr[mr] = pr[mr], W[pr.charCodeAt(mr)] = mr;
|
|
2010
|
+
W[45] = 62, W[95] = 63, gr = {}, gr.read = function(e, t, n, r, i) {
|
|
1960
2011
|
var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
|
|
1961
2012
|
for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
|
|
1962
2013
|
for (o = a & (1 << -u) - 1, a >>= -u, u += r; u > 0; o = o * 256 + e[t + d], d += f, u -= 8);
|
|
@@ -1964,13 +2015,13 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
|
|
|
1964
2015
|
else if (a === c) return o ? NaN : (p ? -1 : 1) * Infinity;
|
|
1965
2016
|
else o += 2 ** r, a -= l;
|
|
1966
2017
|
return (p ? -1 : 1) * o * 2 ** (a - r);
|
|
1967
|
-
},
|
|
2018
|
+
}, gr.write = function(e, t, n, r, i, a) {
|
|
1968
2019
|
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
|
|
1969
2020
|
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
|
|
1970
2021
|
for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
|
|
1971
2022
|
e[n + p - m] |= h * 128;
|
|
1972
2023
|
}, (function(e) {
|
|
1973
|
-
let t =
|
|
2024
|
+
let t = ur, n = gr, r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1974
2025
|
e.Buffer = u, e.SlowBuffer = x, e.INSPECT_MAX_BYTES = 50;
|
|
1975
2026
|
let i = 2147483647;
|
|
1976
2027
|
e.kMaxLength = i;
|
|
@@ -2726,12 +2777,12 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
|
|
|
2726
2777
|
function we() {
|
|
2727
2778
|
throw Error("BigInt not supported");
|
|
2728
2779
|
}
|
|
2729
|
-
})(U),
|
|
2780
|
+
})(U), _r = U.Buffer, vr = U.Blob, yr = U.BlobOptions, G = U.Buffer, br = U.File, xr = U.FileOptions, Sr = U.INSPECT_MAX_BYTES, Cr = U.SlowBuffer, wr = U.TranscodeEncoding, Tr = U.atob, Er = U.btoa, Dr = U.constants, Or = U.isAscii, kr = U.isUtf8, Ar = U.kMaxLength, jr = U.kStringMaxLength, Mr = U.resolveObjectURL, Nr = U.transcode;
|
|
2730
2781
|
}));
|
|
2731
2782
|
//#endregion
|
|
2732
|
-
//#region node_modules/@fkn/lib/node-fs-
|
|
2733
|
-
|
|
2734
|
-
var
|
|
2783
|
+
//#region node_modules/@fkn/lib/node-fs-BZy9bzKd.js
|
|
2784
|
+
Pr();
|
|
2785
|
+
var Fr = {
|
|
2735
2786
|
json: "application/json",
|
|
2736
2787
|
txt: "text/plain",
|
|
2737
2788
|
html: "text/html",
|
|
@@ -2750,11 +2801,11 @@ var Tr = {
|
|
|
2750
2801
|
webp: "image/webp",
|
|
2751
2802
|
pdf: "application/pdf",
|
|
2752
2803
|
wasm: "application/wasm"
|
|
2753
|
-
},
|
|
2804
|
+
}, Ir = (e, t) => {
|
|
2754
2805
|
if (t) return t;
|
|
2755
2806
|
let n = e.split("/").pop() ?? "", r = n.lastIndexOf(".");
|
|
2756
|
-
if (!(r <= 0)) return
|
|
2757
|
-
},
|
|
2807
|
+
if (!(r <= 0)) return Fr[n.slice(r + 1).toLowerCase()];
|
|
2808
|
+
}, Lr = (e, t) => ({
|
|
2758
2809
|
size: e,
|
|
2759
2810
|
mtimeMs: t,
|
|
2760
2811
|
mtime: new Date(t),
|
|
@@ -2764,7 +2815,7 @@ var Tr = {
|
|
|
2764
2815
|
isFile: () => !0,
|
|
2765
2816
|
isDirectory: () => !1,
|
|
2766
2817
|
isSymbolicLink: () => !1
|
|
2767
|
-
}),
|
|
2818
|
+
}), Rr = (e = 0) => ({
|
|
2768
2819
|
size: 0,
|
|
2769
2820
|
mtimeMs: e,
|
|
2770
2821
|
mtime: new Date(e),
|
|
@@ -2794,21 +2845,21 @@ var Tr = {
|
|
|
2794
2845
|
t.push(n);
|
|
2795
2846
|
}
|
|
2796
2847
|
return t.join("/");
|
|
2797
|
-
},
|
|
2798
|
-
let n =
|
|
2848
|
+
}, zr = (e) => e.split("/").slice(0, -1).join("/"), J = (e) => typeof e == "string" ? e : e instanceof URL ? decodeURIComponent(e.pathname) : e.toString(), Br = (e) => typeof e == "string" ? e : e?.encoding ?? void 0, Vr = (e) => typeof e == "object" ? e?.contentType : void 0, Hr = (e) => typeof e == "object" && !!e?.recursive, Ur = (e, t) => {
|
|
2849
|
+
let n = Br(t);
|
|
2799
2850
|
return n ? G.from(e).toString(n) : G.from(e);
|
|
2800
|
-
},
|
|
2801
|
-
if (typeof e == "string") return new Uint8Array(G.from(e,
|
|
2851
|
+
}, Wr = (e, t) => {
|
|
2852
|
+
if (typeof e == "string") return new Uint8Array(G.from(e, Br(t) ?? "utf8"));
|
|
2802
2853
|
if (e instanceof Uint8Array) return e.slice();
|
|
2803
2854
|
if (e instanceof ArrayBuffer) return new Uint8Array(e).slice();
|
|
2804
2855
|
if (ArrayBuffer.isView(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength).slice();
|
|
2805
2856
|
throw TypeError("The \"data\" argument must be of type string, Buffer, TypedArray, or DataView");
|
|
2806
|
-
},
|
|
2857
|
+
}, Gr = (e) => {
|
|
2807
2858
|
let t = /* @__PURE__ */ new Map([["", {
|
|
2808
2859
|
kind: "dir",
|
|
2809
2860
|
mtimeMs: 0
|
|
2810
2861
|
}]]), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
2811
|
-
|
|
2862
|
+
Un("unsaved files", () => n.size > 0 || r.size > 0);
|
|
2812
2863
|
let i = /* @__PURE__ */ new Set(), a = () => Date.now(), o = (e) => {
|
|
2813
2864
|
if (!e) return;
|
|
2814
2865
|
let n = e.split("/"), r = "";
|
|
@@ -2828,7 +2879,7 @@ var Tr = {
|
|
|
2828
2879
|
if (l.add(s), !r.has(s) && (!n.has(s) || i.has(s))) try {
|
|
2829
2880
|
let l = await (await e.readFile(c.path)).arrayBuffer();
|
|
2830
2881
|
if (r.has(s) || n.has(s) && !i.has(s)) continue;
|
|
2831
|
-
o(
|
|
2882
|
+
o(zr(s));
|
|
2832
2883
|
let u = Date.parse(c.updatedAt ?? "");
|
|
2833
2884
|
t.set(s, {
|
|
2834
2885
|
kind: "file",
|
|
@@ -2852,7 +2903,7 @@ var Tr = {
|
|
|
2852
2903
|
n.delete(r);
|
|
2853
2904
|
return;
|
|
2854
2905
|
}
|
|
2855
|
-
let o = a.data, s =
|
|
2906
|
+
let o = a.data, s = Ir(r, a.contentType);
|
|
2856
2907
|
try {
|
|
2857
2908
|
await e.writeFile(r, o, s ? { contentType: s } : void 0);
|
|
2858
2909
|
let i = t.get(r);
|
|
@@ -2874,7 +2925,7 @@ var Tr = {
|
|
|
2874
2925
|
}), addEventListener("visibilitychange", () => {
|
|
2875
2926
|
typeof document < "u" && document.visibilityState === "hidden" && f().catch(() => {});
|
|
2876
2927
|
}));
|
|
2877
|
-
let h = (e) => e.kind === "file" ?
|
|
2928
|
+
let h = (e) => e.kind === "file" ? Lr(e.data.byteLength, e.mtimeMs) : Rr(e.mtimeMs), g = (e) => Object.assign(/* @__PURE__ */ Error(`storage: ${e} exists but could not be read, retry once its scope is available`), { code: "FKN_E2E_LOCKED" }), _ = (e) => {
|
|
2878
2929
|
let n = q(e);
|
|
2879
2930
|
return t.has(n) || i.has(n);
|
|
2880
2931
|
}, v = (e) => {
|
|
@@ -2895,7 +2946,7 @@ var Tr = {
|
|
|
2895
2946
|
if (i.has(u)) throw g(e);
|
|
2896
2947
|
let d = t.get(u);
|
|
2897
2948
|
if (d?.kind === "dir") throw K("EISDIR", e, "open");
|
|
2898
|
-
o(
|
|
2949
|
+
o(zr(u));
|
|
2899
2950
|
let f = c && d?.kind === "file" ? b(d.data, s) : s;
|
|
2900
2951
|
t.set(u, {
|
|
2901
2952
|
kind: "file",
|
|
@@ -2910,7 +2961,7 @@ var Tr = {
|
|
|
2910
2961
|
if (n) return;
|
|
2911
2962
|
throw K("EEXIST", e, "mkdir");
|
|
2912
2963
|
}
|
|
2913
|
-
if (!n && !t.has(
|
|
2964
|
+
if (!n && !t.has(zr(r))) throw K("ENOENT", e, "mkdir");
|
|
2914
2965
|
o(r);
|
|
2915
2966
|
}
|
|
2916
2967
|
}, C = (e) => {
|
|
@@ -2974,7 +3025,7 @@ var Tr = {
|
|
|
2974
3025
|
force: !0
|
|
2975
3026
|
});
|
|
2976
3027
|
}
|
|
2977
|
-
o(
|
|
3028
|
+
o(zr(c));
|
|
2978
3029
|
let d = `${s}/`, f = [s, ...[...t.keys()].filter((e) => e.startsWith(d))];
|
|
2979
3030
|
for (let e of f) {
|
|
2980
3031
|
let i = c + e.slice(s.length), a = t.get(e);
|
|
@@ -2983,10 +3034,10 @@ var Tr = {
|
|
|
2983
3034
|
m();
|
|
2984
3035
|
}
|
|
2985
3036
|
};
|
|
2986
|
-
},
|
|
3037
|
+
}, Kr = (e, t) => typeof e == "function" ? e : t, qr = (e) => typeof e == "function" ? void 0 : e, Jr = (e, t) => {
|
|
2987
3038
|
e.then((e) => t(null, e), (e) => t(e));
|
|
2988
|
-
},
|
|
2989
|
-
let t =
|
|
3039
|
+
}, Yr = (e) => {
|
|
3040
|
+
let t = Gr(e), n = (e, n) => Ur(t.readFile(J(e)), n), r = (e, n, r) => t.writeFile(J(e), Wr(n, r), !1, Vr(r)), i = (e, n, r) => t.writeFile(J(e), Wr(n, r), !0, Vr(r)), a = (e) => t.exists(J(e)), o = (e) => t.stat(J(e)), s = (e) => t.readdir(J(e)), c = (e, n) => t.mkdir(J(e), Hr(n)), l = (e, n) => t.remove(J(e), {
|
|
2990
3041
|
op: "rm",
|
|
2991
3042
|
...n
|
|
2992
3043
|
}), u = (e, n) => t.remove(J(e), {
|
|
@@ -3018,29 +3069,29 @@ var Tr = {
|
|
|
3018
3069
|
rmdirSync: u,
|
|
3019
3070
|
unlinkSync: d,
|
|
3020
3071
|
renameSync: f,
|
|
3021
|
-
readFile: (e, n, r) => p(() =>
|
|
3022
|
-
writeFile: (e, n, r, i) => p(() => t.writeFile(J(e),
|
|
3023
|
-
appendFile: (e, n, r, i) => p(() => t.writeFile(J(e),
|
|
3072
|
+
readFile: (e, n, r) => p(() => Ur(t.readFile(J(e)), qr(n)), Kr(n, r)),
|
|
3073
|
+
writeFile: (e, n, r, i) => p(() => t.writeFile(J(e), Wr(n, qr(r)), !1, Vr(qr(r))), Kr(r, i)),
|
|
3074
|
+
appendFile: (e, n, r, i) => p(() => t.writeFile(J(e), Wr(n, qr(r)), !0, Vr(qr(r))), Kr(r, i)),
|
|
3024
3075
|
stat: (e, n) => p(() => t.stat(J(e)), n),
|
|
3025
|
-
readdir: (e, n, r) => p(() => t.readdir(J(e)),
|
|
3026
|
-
mkdir: (e, n, r) => p(() => t.mkdir(J(e),
|
|
3076
|
+
readdir: (e, n, r) => p(() => t.readdir(J(e)), Kr(n, r)),
|
|
3077
|
+
mkdir: (e, n, r) => p(() => t.mkdir(J(e), Hr(qr(n))), Kr(n, r)),
|
|
3027
3078
|
rm: (e, n, r) => p(() => t.remove(J(e), {
|
|
3028
3079
|
op: "rm",
|
|
3029
|
-
...
|
|
3030
|
-
}),
|
|
3080
|
+
...qr(n)
|
|
3081
|
+
}), Kr(n, r)),
|
|
3031
3082
|
unlink: (e, n) => p(() => t.remove(J(e), { op: "unlink" }), n),
|
|
3032
3083
|
rename: (e, n, r) => p(() => t.rename(J(e), J(n)), r),
|
|
3033
3084
|
exists: (e, n) => {
|
|
3034
3085
|
t.mount().finally(() => n(t.exists(J(e))));
|
|
3035
3086
|
},
|
|
3036
3087
|
promises: {
|
|
3037
|
-
readFile: (e, n) => m(() =>
|
|
3038
|
-
writeFile: (e, n, r) => m(() => t.writeFile(J(e),
|
|
3039
|
-
appendFile: (e, n, r) => m(() => t.writeFile(J(e),
|
|
3088
|
+
readFile: (e, n) => m(() => Ur(t.readFile(J(e)), n)),
|
|
3089
|
+
writeFile: (e, n, r) => m(() => t.writeFile(J(e), Wr(n, r), !1, Vr(r))),
|
|
3090
|
+
appendFile: (e, n, r) => m(() => t.writeFile(J(e), Wr(n, r), !0, Vr(r))),
|
|
3040
3091
|
stat: (e) => m(() => t.stat(J(e))),
|
|
3041
3092
|
lstat: (e) => m(() => t.stat(J(e))),
|
|
3042
3093
|
readdir: (e) => m(() => t.readdir(J(e))),
|
|
3043
|
-
mkdir: (e, n) => m(() => t.mkdir(J(e),
|
|
3094
|
+
mkdir: (e, n) => m(() => t.mkdir(J(e), Hr(n))),
|
|
3044
3095
|
rm: (e, n) => m(() => t.remove(J(e), {
|
|
3045
3096
|
op: "rm",
|
|
3046
3097
|
...n
|
|
@@ -3059,13 +3110,13 @@ var Tr = {
|
|
|
3059
3110
|
flush: t.flush,
|
|
3060
3111
|
remount: t.remount
|
|
3061
3112
|
};
|
|
3062
|
-
},
|
|
3113
|
+
}, Xr = (e) => {
|
|
3063
3114
|
let t = async (t, n) => {
|
|
3064
3115
|
let r = await e.readFile(J(t));
|
|
3065
|
-
return
|
|
3116
|
+
return Ur(new Uint8Array(await r.arrayBuffer()), n);
|
|
3066
3117
|
}, n = async (t, n, r) => {
|
|
3067
|
-
let i = J(t), a =
|
|
3068
|
-
await e.writeFile(i,
|
|
3118
|
+
let i = J(t), a = Ir(i, Vr(r));
|
|
3119
|
+
await e.writeFile(i, Wr(n, r), a ? { contentType: a } : void 0);
|
|
3069
3120
|
}, r = (t) => e.remove(J(t)), i = async (t, n) => {
|
|
3070
3121
|
let r = q(J(t)), i = q(J(n));
|
|
3071
3122
|
if (r === i) return;
|
|
@@ -3095,9 +3146,9 @@ var Tr = {
|
|
|
3095
3146
|
let n = q(J(t)), r = await e.list(), i = r.find((e) => q(e.path) === n);
|
|
3096
3147
|
if (i) {
|
|
3097
3148
|
let e = Date.parse(i.updatedAt ?? "");
|
|
3098
|
-
return
|
|
3149
|
+
return Lr(i.size, Number.isFinite(e) ? e : 0);
|
|
3099
3150
|
}
|
|
3100
|
-
if (r.some((e) => q(e.path).startsWith(`${n}/`))) return
|
|
3151
|
+
if (r.some((e) => q(e.path).startsWith(`${n}/`))) return Rr();
|
|
3101
3152
|
throw K("ENOENT", J(t), "stat");
|
|
3102
3153
|
}, l = {
|
|
3103
3154
|
readFile: t,
|
|
@@ -3117,109 +3168,109 @@ var Tr = {
|
|
|
3117
3168
|
return {
|
|
3118
3169
|
available: e.available,
|
|
3119
3170
|
promises: l,
|
|
3120
|
-
readFile: (e, n, r) =>
|
|
3121
|
-
writeFile: (e, t, r, i) =>
|
|
3122
|
-
unlink: (e, t) =>
|
|
3123
|
-
rename: (e, t, n) =>
|
|
3124
|
-
readdir: (e, t, n) =>
|
|
3125
|
-
mkdir: (e, t, n) =>
|
|
3126
|
-
rm: (e, t, n) =>
|
|
3127
|
-
stat: (e, t) =>
|
|
3171
|
+
readFile: (e, n, r) => Jr(t(e, qr(n)), Kr(n, r)),
|
|
3172
|
+
writeFile: (e, t, r, i) => Jr(n(e, t, qr(r)), Kr(r, i)),
|
|
3173
|
+
unlink: (e, t) => Jr(r(e), t),
|
|
3174
|
+
rename: (e, t, n) => Jr(i(e, t), n),
|
|
3175
|
+
readdir: (e, t, n) => Jr(a(e), Kr(t, n)),
|
|
3176
|
+
mkdir: (e, t, n) => Jr(o(), Kr(t, n)),
|
|
3177
|
+
rm: (e, t, n) => Jr(s(e, qr(t)), Kr(t, n)),
|
|
3178
|
+
stat: (e, t) => Jr(c(e), t)
|
|
3128
3179
|
};
|
|
3129
3180
|
};
|
|
3130
|
-
function
|
|
3131
|
-
return t.memfs ?
|
|
3181
|
+
function Zr(e, t) {
|
|
3182
|
+
return t.memfs ? Yr(e) : Xr(e);
|
|
3132
3183
|
}
|
|
3133
3184
|
//#endregion
|
|
3134
3185
|
//#region node_modules/@fkn/lib/messages.js
|
|
3135
|
-
var
|
|
3136
|
-
StorageLockedError: () =>
|
|
3137
|
-
StorageNotFoundError: () =>
|
|
3138
|
-
availability: () =>
|
|
3139
|
-
available: () =>
|
|
3140
|
-
encryption: () =>
|
|
3141
|
-
isNotFound: () =>
|
|
3142
|
-
list: () =>
|
|
3143
|
-
quota: () =>
|
|
3144
|
-
readFile: () =>
|
|
3145
|
-
readFileSealed: () =>
|
|
3146
|
-
remove: () =>
|
|
3147
|
-
unlock: () =>
|
|
3148
|
-
writeFile: () =>
|
|
3149
|
-
}),
|
|
3186
|
+
var Qr = "FKN_STORAGE_NOT_FOUND", $r = /* @__PURE__ */ g({
|
|
3187
|
+
StorageLockedError: () => ei,
|
|
3188
|
+
StorageNotFoundError: () => ti,
|
|
3189
|
+
availability: () => li,
|
|
3190
|
+
available: () => ii,
|
|
3191
|
+
encryption: () => _i,
|
|
3192
|
+
isNotFound: () => ni,
|
|
3193
|
+
list: () => ui,
|
|
3194
|
+
quota: () => di,
|
|
3195
|
+
readFile: () => fi,
|
|
3196
|
+
readFileSealed: () => mi,
|
|
3197
|
+
remove: () => gi,
|
|
3198
|
+
unlock: () => vi,
|
|
3199
|
+
writeFile: () => hi
|
|
3200
|
+
}), ei = class extends Error {
|
|
3150
3201
|
code = "FKN_E2E_LOCKED";
|
|
3151
3202
|
constructor() {
|
|
3152
3203
|
super("storage locked: connect the app again to open encrypted data");
|
|
3153
3204
|
}
|
|
3154
|
-
},
|
|
3155
|
-
code =
|
|
3205
|
+
}, ti = class extends Error {
|
|
3206
|
+
code = Qr;
|
|
3156
3207
|
constructor(e = "storage: no object at that path") {
|
|
3157
3208
|
super(e);
|
|
3158
3209
|
}
|
|
3159
|
-
},
|
|
3160
|
-
throw e instanceof Error && e.message.startsWith("fkn:e2e-locked") ? new
|
|
3161
|
-
},
|
|
3210
|
+
}, ni = (e) => e?.code === Qr, ri = (e) => {
|
|
3211
|
+
throw e instanceof Error && e.message.startsWith("fkn:e2e-locked") ? new ei() : ni(e) || e instanceof Error && (/^not found$/i.test(e.message) || /\(404\)$/.test(e.message)) ? new ti(e.message) : e;
|
|
3212
|
+
}, ii = () => c.then((e) => e.cloud.fs.available()).catch(() => !1), ai = 8e3, oi = 1e3, si = !1, ci = async () => {
|
|
3162
3213
|
let e = (await c).cloud.fs;
|
|
3163
3214
|
return typeof e.availability == "function" ? e.availability() : await e.available() ? "connected" : "disconnected";
|
|
3164
|
-
},
|
|
3165
|
-
let e =
|
|
3215
|
+
}, li = async () => {
|
|
3216
|
+
let e = si ? oi : ai, t = await new Promise((t) => {
|
|
3166
3217
|
let n = setTimeout(() => t("timeout"), e);
|
|
3167
|
-
|
|
3218
|
+
ci().then((e) => {
|
|
3168
3219
|
clearTimeout(n), t(e);
|
|
3169
3220
|
}, () => {
|
|
3170
3221
|
clearTimeout(n), t("unknown");
|
|
3171
3222
|
});
|
|
3172
3223
|
});
|
|
3173
|
-
return t === "timeout" ? (
|
|
3174
|
-
},
|
|
3175
|
-
let t = await (await c).cloud.fs.readFile(e).catch(
|
|
3224
|
+
return t === "timeout" ? (si = !0, "unknown") : (si = !1, t);
|
|
3225
|
+
}, ui = () => c.then((e) => e.cloud.fs.list()), di = () => c.then((e) => e.cloud.fs.quota()), fi = async (e) => {
|
|
3226
|
+
let t = await (await c).cloud.fs.readFile(e).catch(ri);
|
|
3176
3227
|
return new Blob([t]);
|
|
3177
|
-
},
|
|
3228
|
+
}, pi = (e) => {
|
|
3178
3229
|
if (e === null || !Number.isFinite(e)) return null;
|
|
3179
3230
|
let t = new Date(e);
|
|
3180
3231
|
return Number.isNaN(t.getTime()) ? null : t.toISOString();
|
|
3181
|
-
},
|
|
3232
|
+
}, mi = async (e) => {
|
|
3182
3233
|
let t = (await c).cloud.fs;
|
|
3183
3234
|
if (typeof t.readFileSealed != "function") return {
|
|
3184
|
-
data: await t.readFile(e).catch(
|
|
3235
|
+
data: await t.readFile(e).catch(ri),
|
|
3185
3236
|
sealedAt: null
|
|
3186
3237
|
};
|
|
3187
|
-
let n = await t.readFileSealed(e).catch(
|
|
3238
|
+
let n = await t.readFileSealed(e).catch(ri);
|
|
3188
3239
|
return {
|
|
3189
3240
|
data: n.bytes,
|
|
3190
|
-
sealedAt:
|
|
3241
|
+
sealedAt: pi(n.sealedAt)
|
|
3191
3242
|
};
|
|
3192
|
-
},
|
|
3243
|
+
}, hi = async (e, t, n) => {
|
|
3193
3244
|
let r = await c, i = t instanceof Blob ? new Uint8Array(await t.arrayBuffer()) : t;
|
|
3194
|
-
await r.cloud.fs.writeFile(e, i, n?.contentType ?? null).catch(
|
|
3195
|
-
},
|
|
3196
|
-
STORAGE_NOT_FOUND: () =>
|
|
3197
|
-
StorageLockedError: () =>
|
|
3198
|
-
StorageNotFoundError: () =>
|
|
3199
|
-
available: () =>
|
|
3200
|
-
encryption: () =>
|
|
3201
|
-
isNotFound: () =>
|
|
3202
|
-
mkdir: () =>
|
|
3203
|
-
promises: () =>
|
|
3204
|
-
quota: () =>
|
|
3205
|
-
readFile: () =>
|
|
3206
|
-
readFileSealed: () =>
|
|
3207
|
-
readdir: () =>
|
|
3208
|
-
rename: () =>
|
|
3209
|
-
rm: () =>
|
|
3210
|
-
stat: () =>
|
|
3211
|
-
unlink: () =>
|
|
3212
|
-
unlock: () =>
|
|
3213
|
-
writeFile: () =>
|
|
3214
|
-
}), { available:
|
|
3245
|
+
await r.cloud.fs.writeFile(e, i, n?.contentType ?? null).catch(ri);
|
|
3246
|
+
}, gi = (e) => c.then((t) => t.cloud.fs.remove(e)).then(() => void 0), _i = () => c.then((e) => e.cloud.fs.encryption()), vi = () => c.then((e) => e.cloud.fs.unlock()), yi = /* @__PURE__ */ g({
|
|
3247
|
+
STORAGE_NOT_FOUND: () => Qr,
|
|
3248
|
+
StorageLockedError: () => ei,
|
|
3249
|
+
StorageNotFoundError: () => ti,
|
|
3250
|
+
available: () => bi,
|
|
3251
|
+
encryption: () => _i,
|
|
3252
|
+
isNotFound: () => ni,
|
|
3253
|
+
mkdir: () => Ei,
|
|
3254
|
+
promises: () => ki,
|
|
3255
|
+
quota: () => di,
|
|
3256
|
+
readFile: () => xi,
|
|
3257
|
+
readFileSealed: () => mi,
|
|
3258
|
+
readdir: () => Ti,
|
|
3259
|
+
rename: () => wi,
|
|
3260
|
+
rm: () => Di,
|
|
3261
|
+
stat: () => Oi,
|
|
3262
|
+
unlink: () => Ci,
|
|
3263
|
+
unlock: () => vi,
|
|
3264
|
+
writeFile: () => Si
|
|
3265
|
+
}), { available: bi, readFile: xi, writeFile: Si, unlink: Ci, rename: wi, readdir: Ti, mkdir: Ei, rm: Di, stat: Oi, promises: ki } = Zr($r, { memfs: !1 }), Ai = /* @__PURE__ */ r(((e) => {
|
|
3215
3266
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.AddressError = void 0, e.AddressError = class extends Error {
|
|
3216
3267
|
constructor(e, t) {
|
|
3217
3268
|
super(e), this.name = "AddressError", this.parseMessage = t;
|
|
3218
3269
|
}
|
|
3219
3270
|
};
|
|
3220
|
-
})),
|
|
3271
|
+
})), ji = /* @__PURE__ */ r(((e) => {
|
|
3221
3272
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isInSubnet = n, e.isHostInSubnet = r, e.isCorrect = i, e.prefixLengthFromMask = a, e.assertByteArray = o, e.numberToPaddedHex = s, e.stringToPaddedHex = c, e.testBit = l;
|
|
3222
|
-
var t =
|
|
3273
|
+
var t = Ai();
|
|
3223
3274
|
function n(e) {
|
|
3224
3275
|
return this.subnetMask < e.subnetMask ? !1 : r.call(this, e);
|
|
3225
3276
|
}
|
|
@@ -3255,9 +3306,9 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3255
3306
|
let r = n - t;
|
|
3256
3307
|
return e.substring(r, r + 1) === "1";
|
|
3257
3308
|
}
|
|
3258
|
-
})),
|
|
3309
|
+
})), Mi = /* @__PURE__ */ r(((e) => {
|
|
3259
3310
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.RE_SUBNET_STRING = e.RE_ADDRESS = e.GROUPS = e.BITS = void 0, e.BITS = 32, e.GROUPS = 4, e.RE_ADDRESS = /^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$/g, e.RE_SUBNET_STRING = /\/\d{1,2}$/;
|
|
3260
|
-
})),
|
|
3311
|
+
})), Ni = /* @__PURE__ */ r(((e) => {
|
|
3261
3312
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
3262
3313
|
r === void 0 && (r = n);
|
|
3263
3314
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -3283,7 +3334,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3283
3334
|
return n(r, e), r;
|
|
3284
3335
|
};
|
|
3285
3336
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Address4 = void 0;
|
|
3286
|
-
var i = r(
|
|
3337
|
+
var i = r(ji()), a = r(Mi()), o = Ai(), s = i.isCorrect(a.BITS), c = class e {
|
|
3287
3338
|
constructor(e) {
|
|
3288
3339
|
this.addressMinusSuffix = "", this.groups = a.GROUPS, this.parsedAddress = [], this.parsedSubnet = "", this.subnet = "/32", this.subnetMask = 32, this.v4 = !0, this.isCorrect = s, this.isInSubnet = i.isInSubnet, this.isHostInSubnet = i.isHostInSubnet, this.address = e;
|
|
3289
3340
|
let t = a.RE_SUBNET_STRING.exec(e);
|
|
@@ -3442,7 +3493,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3442
3493
|
new c("172.16.0.0/12"),
|
|
3443
3494
|
new c("192.168.0.0/16")
|
|
3444
3495
|
], d = new c("127.0.0.0/8"), f = new c("169.254.0.0/16"), p = new c("0.0.0.0/32"), m = new c("255.255.255.255/32"), h = new c("100.64.0.0/10");
|
|
3445
|
-
})),
|
|
3496
|
+
})), Pi = /* @__PURE__ */ r(((e) => {
|
|
3446
3497
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.RE_URL_WITH_PORT = e.RE_URL = e.RE_ZONE_STRING = e.RE_SUBNET_STRING = e.RE_BAD_ADDRESS = e.RE_BAD_CHARACTERS = e.TYPES = e.SCOPES = e.GROUPS = e.BITS = void 0, e.BITS = 128, e.GROUPS = 8, e.SCOPES = {
|
|
3447
3498
|
0: "Reserved",
|
|
3448
3499
|
1: "Interface local",
|
|
@@ -3482,7 +3533,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3482
3533
|
"64:ff9b::/96": "NAT64 (well-known)",
|
|
3483
3534
|
"64:ff9b:1::/48": "NAT64 (local-use)"
|
|
3484
3535
|
}, e.RE_BAD_CHARACTERS = /([^0-9a-f:/%])/gi, e.RE_BAD_ADDRESS = /([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi, e.RE_SUBNET_STRING = /\/\d{1,3}(?=%|$)/, e.RE_ZONE_STRING = /%.*$/, e.RE_URL = /^(?:\[([0-9a-f:.]+)\]|([0-9a-f:.]+))(?:[/?#].*)?$/i, e.RE_URL_WITH_PORT = /^\[([0-9a-f:.]+)\]:([0-9]{1,5})(?:[/?#].*)?$/i;
|
|
3485
|
-
})),
|
|
3536
|
+
})), Fi = /* @__PURE__ */ r(((e) => {
|
|
3486
3537
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.escapeHtml = t, e.spanAllZeroes = n, e.spanAll = r, e.spanLeadingZeroes = a, e.simpleGroup = o;
|
|
3487
3538
|
function t(e) {
|
|
3488
3539
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
@@ -3502,7 +3553,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3502
3553
|
function o(e, t = 0) {
|
|
3503
3554
|
return e.split(":").map((e, n) => /group-v4/.test(e) ? e : `<span class="hover-group group-${n + t}">${i(e)}</span>`);
|
|
3504
3555
|
}
|
|
3505
|
-
})),
|
|
3556
|
+
})), Ii = /* @__PURE__ */ r(((e) => {
|
|
3506
3557
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
3507
3558
|
r === void 0 && (r = n);
|
|
3508
3559
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -3528,7 +3579,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3528
3579
|
return n(r, e), r;
|
|
3529
3580
|
};
|
|
3530
3581
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ADDRESS_BOUNDARY = void 0, e.groupPossibilities = a, e.padGroup = o, e.simpleRegularExpression = s, e.possibleElisions = c;
|
|
3531
|
-
var i = r(
|
|
3582
|
+
var i = r(Pi());
|
|
3532
3583
|
function a(e) {
|
|
3533
3584
|
return `(${e.join("|")})`;
|
|
3534
3585
|
}
|
|
@@ -3556,7 +3607,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3556
3607
|
for (let t = 1; t < e - 1; t++) for (let n = 1; n < e - t; n++) o.push(`(0{1,4}:){${n}}:(0{1,4}:){${e - n - t - 1}}0{1,4}`);
|
|
3557
3608
|
return a(o);
|
|
3558
3609
|
}
|
|
3559
|
-
})),
|
|
3610
|
+
})), Li = /* @__PURE__ */ r(((e) => {
|
|
3560
3611
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
3561
3612
|
r === void 0 && (r = n);
|
|
3562
3613
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -3582,7 +3633,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
3582
3633
|
return n(r, e), r;
|
|
3583
3634
|
};
|
|
3584
3635
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Address6 = void 0;
|
|
3585
|
-
var i = r(
|
|
3636
|
+
var i = r(ji()), a = r(Mi()), o = r(Pi()), s = r(Fi()), c = Ni(), l = Ii(), u = Ai(), d = ji(), f = i.isCorrect(o.BITS);
|
|
3586
3637
|
function p(e) {
|
|
3587
3638
|
if (!e) throw Error("Assertion failed.");
|
|
3588
3639
|
}
|
|
@@ -4059,30 +4110,30 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
|
|
|
4059
4110
|
return n(r, e), r;
|
|
4060
4111
|
};
|
|
4061
4112
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.v6 = e.AddressError = e.Address6 = e.Address4 = void 0;
|
|
4062
|
-
var i =
|
|
4113
|
+
var i = Ni();
|
|
4063
4114
|
Object.defineProperty(e, "Address4", {
|
|
4064
4115
|
enumerable: !0,
|
|
4065
4116
|
get: function() {
|
|
4066
4117
|
return i.Address4;
|
|
4067
4118
|
}
|
|
4068
4119
|
});
|
|
4069
|
-
var a =
|
|
4120
|
+
var a = Li();
|
|
4070
4121
|
Object.defineProperty(e, "Address6", {
|
|
4071
4122
|
enumerable: !0,
|
|
4072
4123
|
get: function() {
|
|
4073
4124
|
return a.Address6;
|
|
4074
4125
|
}
|
|
4075
4126
|
});
|
|
4076
|
-
var o =
|
|
4127
|
+
var o = Ai();
|
|
4077
4128
|
Object.defineProperty(e, "AddressError", {
|
|
4078
4129
|
enumerable: !0,
|
|
4079
4130
|
get: function() {
|
|
4080
4131
|
return o.AddressError;
|
|
4081
4132
|
}
|
|
4082
|
-
}), e.v6 = { helpers: r(
|
|
4083
|
-
})))(),
|
|
4133
|
+
}), e.v6 = { helpers: r(Fi()) };
|
|
4134
|
+
})))(), Ri = new TextEncoder();
|
|
4084
4135
|
new TextDecoder();
|
|
4085
|
-
var
|
|
4136
|
+
var zi = "webvpn-udp-port-ack", Bi = (e) => Y.Address4.isValid(e), Vi = (e) => Y.Address6.isValid(e), Hi = (e) => Bi(e) ? 4 : Vi(e) ? 6 : 0, Ui = (...e) => {
|
|
4086
4137
|
if (typeof e[0] == "string") throw Error("FKN WebVPN does not support IPC connections");
|
|
4087
4138
|
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0;
|
|
4088
4139
|
return e[0] && typeof e[0] == "object" ? {
|
|
@@ -4093,7 +4144,7 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
|
|
|
4093
4144
|
host: typeof e[1] == "string" ? e[1] : void 0,
|
|
4094
4145
|
callback: t
|
|
4095
4146
|
};
|
|
4096
|
-
},
|
|
4147
|
+
}, Wi = (...e) => {
|
|
4097
4148
|
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0, n = e[0] ?? 0, r = typeof e[1] == "string" ? e[1] : void 0;
|
|
4098
4149
|
return typeof e[0] == "object" ? {
|
|
4099
4150
|
...e[0],
|
|
@@ -4105,7 +4156,7 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
|
|
|
4105
4156
|
port: n,
|
|
4106
4157
|
callback: t
|
|
4107
4158
|
};
|
|
4108
|
-
},
|
|
4159
|
+
}, Gi = (...e) => {
|
|
4109
4160
|
let t = typeof e.at(-1) == "function" ? e.at(-1) : void 0, n = e[0];
|
|
4110
4161
|
if (typeof e[2] == "number") return {
|
|
4111
4162
|
message: n,
|
|
@@ -4128,7 +4179,7 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
|
|
|
4128
4179
|
callback: t
|
|
4129
4180
|
};
|
|
4130
4181
|
}
|
|
4131
|
-
},
|
|
4182
|
+
}, Ki = /* @__PURE__ */ r(((e, t) => {
|
|
4132
4183
|
var n = typeof Reflect == "object" ? Reflect : null, r = n && typeof n.apply == "function" ? n.apply : function(e, t, n) {
|
|
4133
4184
|
return Function.prototype.apply.call(e, t, n);
|
|
4134
4185
|
}, i = n && typeof n.ownKeys == "function" ? n.ownKeys : Object.getOwnPropertySymbols ? function(e) {
|
|
@@ -4303,7 +4354,7 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
|
|
|
4303
4354
|
});
|
|
4304
4355
|
else throw TypeError("The \"emitter\" argument must be of type EventEmitter. Received type " + typeof e);
|
|
4305
4356
|
}
|
|
4306
|
-
})),
|
|
4357
|
+
})), qi = /* @__PURE__ */ r(((e, t) => {
|
|
4307
4358
|
t.exports = typeof Object.create == "function" ? function(e, t) {
|
|
4308
4359
|
t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: {
|
|
4309
4360
|
value: e,
|
|
@@ -4318,83 +4369,83 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
|
|
|
4318
4369
|
n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
4319
4370
|
}
|
|
4320
4371
|
};
|
|
4321
|
-
})),
|
|
4322
|
-
|
|
4372
|
+
})), Ji, Yi = t((() => {
|
|
4373
|
+
Ji = globalThis || self;
|
|
4323
4374
|
}));
|
|
4324
4375
|
//#endregion
|
|
4325
4376
|
//#region node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js
|
|
4326
|
-
function
|
|
4377
|
+
function Xi(e) {
|
|
4327
4378
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4328
4379
|
}
|
|
4329
|
-
function
|
|
4380
|
+
function Zi() {
|
|
4330
4381
|
throw Error("setTimeout has not been defined");
|
|
4331
4382
|
}
|
|
4332
|
-
function
|
|
4383
|
+
function Qi() {
|
|
4333
4384
|
throw Error("clearTimeout has not been defined");
|
|
4334
4385
|
}
|
|
4335
|
-
function
|
|
4336
|
-
if (
|
|
4337
|
-
if ((
|
|
4386
|
+
function $i(e) {
|
|
4387
|
+
if (oa === setTimeout) return setTimeout(e, 0);
|
|
4388
|
+
if ((oa === Zi || !oa) && setTimeout) return oa = setTimeout, setTimeout(e, 0);
|
|
4338
4389
|
try {
|
|
4339
|
-
return
|
|
4390
|
+
return oa(e, 0);
|
|
4340
4391
|
} catch {
|
|
4341
4392
|
try {
|
|
4342
|
-
return
|
|
4393
|
+
return oa.call(null, e, 0);
|
|
4343
4394
|
} catch {
|
|
4344
|
-
return
|
|
4395
|
+
return oa.call(this, e, 0);
|
|
4345
4396
|
}
|
|
4346
4397
|
}
|
|
4347
4398
|
}
|
|
4348
|
-
function
|
|
4349
|
-
if (
|
|
4350
|
-
if ((
|
|
4399
|
+
function ea(e) {
|
|
4400
|
+
if (sa === clearTimeout) return clearTimeout(e);
|
|
4401
|
+
if ((sa === Qi || !sa) && clearTimeout) return sa = clearTimeout, clearTimeout(e);
|
|
4351
4402
|
try {
|
|
4352
|
-
return
|
|
4403
|
+
return sa(e);
|
|
4353
4404
|
} catch {
|
|
4354
4405
|
try {
|
|
4355
|
-
return
|
|
4406
|
+
return sa.call(null, e);
|
|
4356
4407
|
} catch {
|
|
4357
|
-
return
|
|
4408
|
+
return sa.call(this, e);
|
|
4358
4409
|
}
|
|
4359
4410
|
}
|
|
4360
4411
|
}
|
|
4361
|
-
function
|
|
4362
|
-
|
|
4412
|
+
function ta() {
|
|
4413
|
+
la && ua && (la = !1, ua.length ? ca = ua.concat(ca) : da = -1, ca.length && na());
|
|
4363
4414
|
}
|
|
4364
|
-
function
|
|
4365
|
-
if (
|
|
4366
|
-
var e =
|
|
4367
|
-
|
|
4368
|
-
for (var t =
|
|
4369
|
-
for (
|
|
4370
|
-
|
|
4415
|
+
function na() {
|
|
4416
|
+
if (!la) {
|
|
4417
|
+
var e = $i(ta);
|
|
4418
|
+
la = !0;
|
|
4419
|
+
for (var t = ca.length; t;) {
|
|
4420
|
+
for (ua = ca, ca = []; ++da < t;) ua && ua[da].run();
|
|
4421
|
+
da = -1, t = ca.length;
|
|
4371
4422
|
}
|
|
4372
|
-
|
|
4423
|
+
ua = null, la = !1, ea(e);
|
|
4373
4424
|
}
|
|
4374
4425
|
}
|
|
4375
|
-
function
|
|
4426
|
+
function ra(e, t) {
|
|
4376
4427
|
this.fun = e, this.array = t;
|
|
4377
4428
|
}
|
|
4378
|
-
function
|
|
4379
|
-
var
|
|
4380
|
-
|
|
4429
|
+
function ia() {}
|
|
4430
|
+
var aa, X, oa, sa, ca, la, ua, da, fa, Z, pa = t((() => {
|
|
4431
|
+
aa = { exports: {} }, X = aa.exports = {}, (function() {
|
|
4381
4432
|
try {
|
|
4382
|
-
|
|
4433
|
+
oa = typeof setTimeout == "function" ? setTimeout : Zi;
|
|
4383
4434
|
} catch {
|
|
4384
|
-
|
|
4435
|
+
oa = Zi;
|
|
4385
4436
|
}
|
|
4386
4437
|
try {
|
|
4387
|
-
|
|
4438
|
+
sa = typeof clearTimeout == "function" ? clearTimeout : Qi;
|
|
4388
4439
|
} catch {
|
|
4389
|
-
|
|
4440
|
+
sa = Qi;
|
|
4390
4441
|
}
|
|
4391
|
-
})(),
|
|
4442
|
+
})(), ca = [], la = !1, da = -1, X.nextTick = function(e) {
|
|
4392
4443
|
var t = Array(arguments.length - 1);
|
|
4393
4444
|
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
4394
|
-
|
|
4395
|
-
},
|
|
4445
|
+
ca.push(new ra(e, t)), ca.length === 1 && !la && $i(na);
|
|
4446
|
+
}, ra.prototype.run = function() {
|
|
4396
4447
|
this.fun.apply(null, this.array);
|
|
4397
|
-
}, X.title = "browser", X.browser = !0, X.env = {}, X.argv = [], X.version = "", X.versions = {}, X.on =
|
|
4448
|
+
}, X.title = "browser", X.browser = !0, X.env = {}, X.argv = [], X.version = "", X.versions = {}, X.on = ia, X.addListener = ia, X.once = ia, X.off = ia, X.removeListener = ia, X.removeAllListeners = ia, X.emit = ia, X.prependListener = ia, X.prependOnceListener = ia, X.listeners = function(e) {
|
|
4398
4449
|
return [];
|
|
4399
4450
|
}, X.binding = function(e) {
|
|
4400
4451
|
throw Error("process.binding is not supported");
|
|
@@ -4404,10 +4455,10 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4404
4455
|
throw Error("process.chdir is not supported");
|
|
4405
4456
|
}, X.umask = function() {
|
|
4406
4457
|
return 0;
|
|
4407
|
-
},
|
|
4408
|
-
})),
|
|
4409
|
-
t.exports =
|
|
4410
|
-
})),
|
|
4458
|
+
}, fa = aa.exports, Z = /*@__PURE__*/ Xi(fa);
|
|
4459
|
+
})), ma = /* @__PURE__ */ r(((e, t) => {
|
|
4460
|
+
t.exports = Ki().EventEmitter;
|
|
4461
|
+
})), ha = /* @__PURE__ */ r(((e, t) => {
|
|
4411
4462
|
t.exports = function() {
|
|
4412
4463
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
4413
4464
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
@@ -4424,59 +4475,59 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4424
4475
|
}
|
|
4425
4476
|
return !0;
|
|
4426
4477
|
};
|
|
4427
|
-
})),
|
|
4428
|
-
var n =
|
|
4478
|
+
})), ga = /* @__PURE__ */ r(((e, t) => {
|
|
4479
|
+
var n = ha();
|
|
4429
4480
|
t.exports = function() {
|
|
4430
4481
|
return n() && !!Symbol.toStringTag;
|
|
4431
4482
|
};
|
|
4432
|
-
})),
|
|
4483
|
+
})), _a = /* @__PURE__ */ r(((e, t) => {
|
|
4433
4484
|
t.exports = Object;
|
|
4434
|
-
})),
|
|
4485
|
+
})), va = /* @__PURE__ */ r(((e, t) => {
|
|
4435
4486
|
t.exports = Error;
|
|
4436
|
-
})),
|
|
4487
|
+
})), ya = /* @__PURE__ */ r(((e, t) => {
|
|
4437
4488
|
t.exports = EvalError;
|
|
4438
|
-
})),
|
|
4489
|
+
})), ba = /* @__PURE__ */ r(((e, t) => {
|
|
4439
4490
|
t.exports = RangeError;
|
|
4440
|
-
})),
|
|
4491
|
+
})), xa = /* @__PURE__ */ r(((e, t) => {
|
|
4441
4492
|
t.exports = ReferenceError;
|
|
4442
|
-
})),
|
|
4493
|
+
})), Sa = /* @__PURE__ */ r(((e, t) => {
|
|
4443
4494
|
t.exports = SyntaxError;
|
|
4444
|
-
})),
|
|
4495
|
+
})), Ca = /* @__PURE__ */ r(((e, t) => {
|
|
4445
4496
|
t.exports = TypeError;
|
|
4446
|
-
})),
|
|
4497
|
+
})), wa = /* @__PURE__ */ r(((e, t) => {
|
|
4447
4498
|
t.exports = URIError;
|
|
4448
|
-
})),
|
|
4499
|
+
})), Ta = /* @__PURE__ */ r(((e, t) => {
|
|
4449
4500
|
t.exports = Math.abs;
|
|
4450
|
-
})),
|
|
4501
|
+
})), Ea = /* @__PURE__ */ r(((e, t) => {
|
|
4451
4502
|
t.exports = Math.floor;
|
|
4452
|
-
})),
|
|
4503
|
+
})), Da = /* @__PURE__ */ r(((e, t) => {
|
|
4453
4504
|
t.exports = Math.max;
|
|
4454
|
-
})),
|
|
4505
|
+
})), Oa = /* @__PURE__ */ r(((e, t) => {
|
|
4455
4506
|
t.exports = Math.min;
|
|
4456
|
-
})),
|
|
4507
|
+
})), ka = /* @__PURE__ */ r(((e, t) => {
|
|
4457
4508
|
t.exports = Math.pow;
|
|
4458
|
-
})),
|
|
4509
|
+
})), Aa = /* @__PURE__ */ r(((e, t) => {
|
|
4459
4510
|
t.exports = Math.round;
|
|
4460
|
-
})),
|
|
4511
|
+
})), ja = /* @__PURE__ */ r(((e, t) => {
|
|
4461
4512
|
t.exports = Number.isNaN || function(e) {
|
|
4462
4513
|
return e !== e;
|
|
4463
4514
|
};
|
|
4464
|
-
})),
|
|
4465
|
-
var n =
|
|
4515
|
+
})), Ma = /* @__PURE__ */ r(((e, t) => {
|
|
4516
|
+
var n = ja();
|
|
4466
4517
|
t.exports = function(e) {
|
|
4467
4518
|
return n(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
4468
4519
|
};
|
|
4469
|
-
})),
|
|
4520
|
+
})), Na = /* @__PURE__ */ r(((e, t) => {
|
|
4470
4521
|
t.exports = Object.getOwnPropertyDescriptor;
|
|
4471
|
-
})),
|
|
4472
|
-
var n =
|
|
4522
|
+
})), Pa = /* @__PURE__ */ r(((e, t) => {
|
|
4523
|
+
var n = Na();
|
|
4473
4524
|
if (n) try {
|
|
4474
4525
|
n([], "length");
|
|
4475
4526
|
} catch {
|
|
4476
4527
|
n = null;
|
|
4477
4528
|
}
|
|
4478
4529
|
t.exports = n;
|
|
4479
|
-
})),
|
|
4530
|
+
})), Fa = /* @__PURE__ */ r(((e, t) => {
|
|
4480
4531
|
var n = Object.defineProperty || !1;
|
|
4481
4532
|
if (n) try {
|
|
4482
4533
|
n({}, "a", { value: 1 });
|
|
@@ -4484,16 +4535,16 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4484
4535
|
n = !1;
|
|
4485
4536
|
}
|
|
4486
4537
|
t.exports = n;
|
|
4487
|
-
})),
|
|
4488
|
-
var n = typeof Symbol < "u" && Symbol, r =
|
|
4538
|
+
})), Ia = /* @__PURE__ */ r(((e, t) => {
|
|
4539
|
+
var n = typeof Symbol < "u" && Symbol, r = ha();
|
|
4489
4540
|
t.exports = function() {
|
|
4490
4541
|
return typeof n != "function" || typeof Symbol != "function" || typeof n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
4491
4542
|
};
|
|
4492
|
-
})),
|
|
4543
|
+
})), La = /* @__PURE__ */ r(((e, t) => {
|
|
4493
4544
|
t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
4494
|
-
})),
|
|
4495
|
-
t.exports =
|
|
4496
|
-
})),
|
|
4545
|
+
})), Ra = /* @__PURE__ */ r(((e, t) => {
|
|
4546
|
+
t.exports = _a().getPrototypeOf || null;
|
|
4547
|
+
})), za = /* @__PURE__ */ r(((e, t) => {
|
|
4497
4548
|
var n = Object.prototype.toString, r = Math.max, i = "[object Function]", a = function(e, t) {
|
|
4498
4549
|
for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
|
|
4499
4550
|
for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
|
|
@@ -4521,26 +4572,26 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4521
4572
|
}
|
|
4522
4573
|
return l;
|
|
4523
4574
|
};
|
|
4524
|
-
})),
|
|
4525
|
-
var n =
|
|
4575
|
+
})), Ba = /* @__PURE__ */ r(((e, t) => {
|
|
4576
|
+
var n = za();
|
|
4526
4577
|
t.exports = Function.prototype.bind || n;
|
|
4527
|
-
})),
|
|
4578
|
+
})), Va = /* @__PURE__ */ r(((e, t) => {
|
|
4528
4579
|
t.exports = Function.prototype.call;
|
|
4529
|
-
})),
|
|
4580
|
+
})), Ha = /* @__PURE__ */ r(((e, t) => {
|
|
4530
4581
|
t.exports = Function.prototype.apply;
|
|
4531
|
-
})),
|
|
4582
|
+
})), Ua = /* @__PURE__ */ r(((e, t) => {
|
|
4532
4583
|
t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
4533
|
-
})),
|
|
4534
|
-
var n =
|
|
4535
|
-
t.exports =
|
|
4536
|
-
})),
|
|
4537
|
-
var n =
|
|
4584
|
+
})), Wa = /* @__PURE__ */ r(((e, t) => {
|
|
4585
|
+
var n = Ba(), r = Ha(), i = Va();
|
|
4586
|
+
t.exports = Ua() || n.call(i, r);
|
|
4587
|
+
})), Ga = /* @__PURE__ */ r(((e, t) => {
|
|
4588
|
+
var n = Ba(), r = Ca(), i = Va(), a = Wa();
|
|
4538
4589
|
t.exports = function(e) {
|
|
4539
4590
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
4540
4591
|
return a(n, i, e);
|
|
4541
4592
|
};
|
|
4542
|
-
})),
|
|
4543
|
-
var n =
|
|
4593
|
+
})), Ka = /* @__PURE__ */ r(((e, t) => {
|
|
4594
|
+
var n = Ga(), r = Pa(), i;
|
|
4544
4595
|
try {
|
|
4545
4596
|
i = [].__proto__ === Array.prototype;
|
|
4546
4597
|
} catch (e) {
|
|
@@ -4550,8 +4601,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4550
4601
|
t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" && function(e) {
|
|
4551
4602
|
return s(e == null ? e : o(e));
|
|
4552
4603
|
};
|
|
4553
|
-
})),
|
|
4554
|
-
var n =
|
|
4604
|
+
})), qa = /* @__PURE__ */ r(((e, t) => {
|
|
4605
|
+
var n = La(), r = Ra(), i = Ka();
|
|
4555
4606
|
t.exports = n ? function(e) {
|
|
4556
4607
|
return n(e);
|
|
4557
4608
|
} : r ? function(e) {
|
|
@@ -4560,15 +4611,15 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4560
4611
|
} : i ? function(e) {
|
|
4561
4612
|
return i(e);
|
|
4562
4613
|
} : null;
|
|
4563
|
-
})),
|
|
4614
|
+
})), Ja = /* @__PURE__ */ r(((e, t) => {
|
|
4564
4615
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
4565
|
-
t.exports =
|
|
4566
|
-
})),
|
|
4567
|
-
var n, r =
|
|
4616
|
+
t.exports = Ba().call(n, r);
|
|
4617
|
+
})), Ya = /* @__PURE__ */ r(((e, t) => {
|
|
4618
|
+
var n, r = _a(), i = va(), a = ya(), o = ba(), s = xa(), c = Sa(), l = Ca(), u = wa(), d = Ta(), f = Ea(), p = Da(), m = Oa(), h = ka(), g = Aa(), _ = Ma(), v = Function, y = function(e) {
|
|
4568
4619
|
try {
|
|
4569
4620
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
4570
4621
|
} catch {}
|
|
4571
|
-
}, b =
|
|
4622
|
+
}, b = Pa(), x = Fa(), S = function() {
|
|
4572
4623
|
throw new l();
|
|
4573
4624
|
}, C = b ? function() {
|
|
4574
4625
|
try {
|
|
@@ -4580,7 +4631,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4580
4631
|
return S;
|
|
4581
4632
|
}
|
|
4582
4633
|
}
|
|
4583
|
-
}() : S, w =
|
|
4634
|
+
}() : S, w = Ia()(), T = qa(), E = Ra(), D = La(), O = Ha(), k = Va(), A = {}, j = typeof Uint8Array > "u" || !T ? n : T(Uint8Array), M = {
|
|
4584
4635
|
__proto__: null,
|
|
4585
4636
|
"%AggregateError%": typeof AggregateError > "u" ? n : AggregateError,
|
|
4586
4637
|
"%Array%": Array,
|
|
@@ -4770,7 +4821,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4770
4821
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4771
4822
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4772
4823
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4773
|
-
}, P =
|
|
4824
|
+
}, P = Ba(), F = Ja(), I = P.call(k, Array.prototype.concat), te = P.call(O, Array.prototype.splice), ne = P.call(k, String.prototype.replace), L = P.call(k, String.prototype.slice), R = P.call(k, RegExp.prototype.exec), z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, re = /\\(\\)?/g, ie = function(e) {
|
|
4774
4825
|
var t = L(e, 0, 1), n = L(e, -1);
|
|
4775
4826
|
if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
|
|
4776
4827
|
if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
|
|
@@ -4815,14 +4866,14 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4815
4866
|
}
|
|
4816
4867
|
return o;
|
|
4817
4868
|
};
|
|
4818
|
-
})),
|
|
4819
|
-
var n =
|
|
4869
|
+
})), Xa = /* @__PURE__ */ r(((e, t) => {
|
|
4870
|
+
var n = Ya(), r = Ga(), i = r([n("%String.prototype.indexOf%")]);
|
|
4820
4871
|
t.exports = function(e, t) {
|
|
4821
4872
|
var a = n(e, !!t);
|
|
4822
4873
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
4823
4874
|
};
|
|
4824
|
-
})),
|
|
4825
|
-
var n =
|
|
4875
|
+
})), Za = /* @__PURE__ */ r(((e, t) => {
|
|
4876
|
+
var n = ga()(), r = Xa()("Object.prototype.toString"), i = function(e) {
|
|
4826
4877
|
return n && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : r(e) === "[object Arguments]";
|
|
4827
4878
|
}, a = function(e) {
|
|
4828
4879
|
return i(e) ? !0 : typeof e == "object" && !!e && "length" in e && typeof e.length == "number" && e.length >= 0 && r(e) !== "[object Array]" && "callee" in e && r(e.callee) === "[object Function]";
|
|
@@ -4830,8 +4881,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4830
4881
|
return i(arguments);
|
|
4831
4882
|
}();
|
|
4832
4883
|
i.isLegacyArguments = a, t.exports = o ? i : a;
|
|
4833
|
-
})),
|
|
4834
|
-
var n =
|
|
4884
|
+
})), Qa = /* @__PURE__ */ r(((e, t) => {
|
|
4885
|
+
var n = Xa(), r = ga()(), i = Ja(), a = Pa(), o;
|
|
4835
4886
|
if (r) {
|
|
4836
4887
|
var s = n("RegExp.prototype.exec"), c = {}, l = function() {
|
|
4837
4888
|
throw c;
|
|
@@ -4856,16 +4907,16 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4856
4907
|
};
|
|
4857
4908
|
}
|
|
4858
4909
|
t.exports = o;
|
|
4859
|
-
})),
|
|
4860
|
-
var n =
|
|
4910
|
+
})), $a = /* @__PURE__ */ r(((e, t) => {
|
|
4911
|
+
var n = Xa(), r = Qa(), i = n("RegExp.prototype.exec"), a = Ca();
|
|
4861
4912
|
t.exports = function(e) {
|
|
4862
4913
|
if (!r(e)) throw new a("`regex` must be a RegExp");
|
|
4863
4914
|
return function(t) {
|
|
4864
4915
|
return i(e, t) !== null;
|
|
4865
4916
|
};
|
|
4866
4917
|
};
|
|
4867
|
-
})),
|
|
4868
|
-
var n =
|
|
4918
|
+
})), eo = /* @__PURE__ */ r(((e, t) => {
|
|
4919
|
+
var n = Xa(), r = $a()(/^\s*(?:function)?\*/), i = ga()(), a = qa(), o = n("Object.prototype.toString"), s = n("Function.prototype.toString"), c = function() {
|
|
4869
4920
|
if (!i) return !1;
|
|
4870
4921
|
try {
|
|
4871
4922
|
return Function("return function*() {}")();
|
|
@@ -4882,7 +4933,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4882
4933
|
}
|
|
4883
4934
|
return a(e) === l;
|
|
4884
4935
|
};
|
|
4885
|
-
})),
|
|
4936
|
+
})), to = /* @__PURE__ */ r(((e, t) => {
|
|
4886
4937
|
var n = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, i, a;
|
|
4887
4938
|
if (typeof r == "function" && typeof Object.defineProperty == "function") try {
|
|
4888
4939
|
i = Object.defineProperty({}, "length", { get: function() {
|
|
@@ -4937,8 +4988,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4937
4988
|
var t = l.call(e);
|
|
4938
4989
|
return t !== d && t !== f && !/^\[object HTML/.test(t) ? !1 : c(e);
|
|
4939
4990
|
};
|
|
4940
|
-
})),
|
|
4941
|
-
var n =
|
|
4991
|
+
})), no = /* @__PURE__ */ r(((e, t) => {
|
|
4992
|
+
var n = to(), r = Object.prototype.toString, i = Object.prototype.hasOwnProperty, a = function(e, t, n) {
|
|
4942
4993
|
for (var r = 0, a = e.length; r < a; r++) i.call(e, r) && (n == null ? t(e[r], r, e) : t.call(n, e[r], r, e));
|
|
4943
4994
|
}, o = function(e, t, n) {
|
|
4944
4995
|
for (var r = 0, i = e.length; r < i; r++) n == null ? t(e.charAt(r), r, e) : t.call(n, e.charAt(r), r, e);
|
|
@@ -4953,7 +5004,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4953
5004
|
var i;
|
|
4954
5005
|
arguments.length >= 3 && (i = r), c(e) ? a(e, t, i) : typeof e == "string" ? o(e, t, i) : s(e, t, i);
|
|
4955
5006
|
};
|
|
4956
|
-
})),
|
|
5007
|
+
})), ro = /* @__PURE__ */ r(((e, t) => {
|
|
4957
5008
|
t.exports = [
|
|
4958
5009
|
"Float16Array",
|
|
4959
5010
|
"Float32Array",
|
|
@@ -4968,15 +5019,15 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4968
5019
|
"BigInt64Array",
|
|
4969
5020
|
"BigUint64Array"
|
|
4970
5021
|
];
|
|
4971
|
-
})),
|
|
4972
|
-
|
|
4973
|
-
var n =
|
|
5022
|
+
})), io = /* @__PURE__ */ r(((e, t) => {
|
|
5023
|
+
Yi();
|
|
5024
|
+
var n = ro(), r = typeof globalThis > "u" ? Ji : globalThis;
|
|
4974
5025
|
t.exports = function() {
|
|
4975
5026
|
for (var e = [], t = 0; t < n.length; t++) typeof r[n[t]] == "function" && (e[e.length] = n[t]);
|
|
4976
5027
|
return e;
|
|
4977
5028
|
};
|
|
4978
|
-
})),
|
|
4979
|
-
var n =
|
|
5029
|
+
})), ao = /* @__PURE__ */ r(((e, t) => {
|
|
5030
|
+
var n = Fa(), r = Sa(), i = Ca(), a = Pa();
|
|
4980
5031
|
t.exports = function(e, t, o) {
|
|
4981
5032
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`obj` must be an object or a function`");
|
|
4982
5033
|
if (typeof t != "string" && typeof t != "symbol") throw new i("`property` must be a string or a symbol`");
|
|
@@ -4994,8 +5045,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
4994
5045
|
else if (u || !s && !c && !l) e[t] = o;
|
|
4995
5046
|
else throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4996
5047
|
};
|
|
4997
|
-
})),
|
|
4998
|
-
var n =
|
|
5048
|
+
})), oo = /* @__PURE__ */ r(((e, t) => {
|
|
5049
|
+
var n = Fa(), r = function() {
|
|
4999
5050
|
return !!n;
|
|
5000
5051
|
};
|
|
5001
5052
|
r.hasArrayLengthDefineBug = function() {
|
|
@@ -5006,8 +5057,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5006
5057
|
return !0;
|
|
5007
5058
|
}
|
|
5008
5059
|
}, t.exports = r;
|
|
5009
|
-
})),
|
|
5010
|
-
var n =
|
|
5060
|
+
})), so = /* @__PURE__ */ r(((e, t) => {
|
|
5061
|
+
var n = Ya(), r = ao(), i = oo()(), a = Pa(), o = Ca(), s = n("%Math.floor%");
|
|
5011
5062
|
t.exports = function(e, t) {
|
|
5012
5063
|
if (typeof e != "function") throw new o("`fn` is not a function");
|
|
5013
5064
|
if (typeof t != "number" || t < 0 || t > 4294967295 || s(t) !== t) throw new o("`length` must be a positive 32-bit integer");
|
|
@@ -5018,20 +5069,20 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5018
5069
|
}
|
|
5019
5070
|
return (c || l || !n) && (i ? r(e, "length", t, !0, !0) : r(e, "length", t)), e;
|
|
5020
5071
|
};
|
|
5021
|
-
})),
|
|
5022
|
-
var n =
|
|
5072
|
+
})), co = /* @__PURE__ */ r(((e, t) => {
|
|
5073
|
+
var n = Ba(), r = Ha(), i = Wa();
|
|
5023
5074
|
t.exports = function() {
|
|
5024
5075
|
return i(n, r, arguments);
|
|
5025
5076
|
};
|
|
5026
|
-
})),
|
|
5027
|
-
var n =
|
|
5077
|
+
})), lo = /* @__PURE__ */ r(((e, t) => {
|
|
5078
|
+
var n = so(), r = Fa(), i = Ga(), a = co();
|
|
5028
5079
|
t.exports = function(e) {
|
|
5029
5080
|
var t = i(arguments), r = e.length - (arguments.length - 1);
|
|
5030
5081
|
return n(t, 1 + (r > 0 ? r : 0), !0);
|
|
5031
5082
|
}, r ? r(t.exports, "apply", { value: a }) : t.exports.apply = a;
|
|
5032
|
-
})),
|
|
5033
|
-
|
|
5034
|
-
var n =
|
|
5083
|
+
})), uo = /* @__PURE__ */ r(((e, t) => {
|
|
5084
|
+
Yi();
|
|
5085
|
+
var n = no(), r = io(), i = lo(), a = Xa(), o = Pa(), s = qa(), c = a("Object.prototype.toString"), l = ga()(), u = typeof globalThis > "u" ? Ji : globalThis, d = r(), f = a("String.prototype.slice"), p = a("Array.prototype.indexOf", !0) || function(e, t) {
|
|
5035
5086
|
for (var n = 0; n < e.length; n += 1) if (e[n] === t) return n;
|
|
5036
5087
|
return -1;
|
|
5037
5088
|
}, m = { __proto__: null };
|
|
@@ -5068,13 +5119,13 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5068
5119
|
}
|
|
5069
5120
|
return o ? h(e) : null;
|
|
5070
5121
|
};
|
|
5071
|
-
})),
|
|
5072
|
-
var n =
|
|
5122
|
+
})), fo = /* @__PURE__ */ r(((e, t) => {
|
|
5123
|
+
var n = uo();
|
|
5073
5124
|
t.exports = function(e) {
|
|
5074
5125
|
return !!n(e);
|
|
5075
5126
|
};
|
|
5076
|
-
})),
|
|
5077
|
-
var t =
|
|
5127
|
+
})), po = /* @__PURE__ */ r(((e) => {
|
|
5128
|
+
var t = Za(), n = eo(), r = uo(), i = fo();
|
|
5078
5129
|
function a(e) {
|
|
5079
5130
|
return e.call.bind(e);
|
|
5080
5131
|
}
|
|
@@ -5257,12 +5308,12 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5257
5308
|
}
|
|
5258
5309
|
});
|
|
5259
5310
|
});
|
|
5260
|
-
})),
|
|
5311
|
+
})), mo = /* @__PURE__ */ r(((e, t) => {
|
|
5261
5312
|
t.exports = function(e) {
|
|
5262
5313
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
5263
5314
|
};
|
|
5264
|
-
})),
|
|
5265
|
-
|
|
5315
|
+
})), ho = /* @__PURE__ */ r(((e) => {
|
|
5316
|
+
pa();
|
|
5266
5317
|
var t = Object.getOwnPropertyDescriptors || function(e) {
|
|
5267
5318
|
for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) n[t[r]] = Object.getOwnPropertyDescriptor(e, t[r]);
|
|
5268
5319
|
return n;
|
|
@@ -5427,7 +5478,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5427
5478
|
return r++, t.indexOf("\n") >= 0 && r++, e + t.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
5428
5479
|
}, 0) > 60 ? n[0] + (t === "" ? "" : t + "\n ") + " " + e.join(",\n ") + " " + n[1] : n[0] + t + " " + e.join(", ") + " " + n[1];
|
|
5429
5480
|
}
|
|
5430
|
-
e.types =
|
|
5481
|
+
e.types = po();
|
|
5431
5482
|
function g(e) {
|
|
5432
5483
|
return Array.isArray(e);
|
|
5433
5484
|
}
|
|
@@ -5483,7 +5534,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5483
5534
|
function k(e) {
|
|
5484
5535
|
return e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || typeof e == "symbol" || e === void 0;
|
|
5485
5536
|
}
|
|
5486
|
-
e.isPrimitive = k, e.isBuffer =
|
|
5537
|
+
e.isPrimitive = k, e.isBuffer = mo();
|
|
5487
5538
|
function A(e) {
|
|
5488
5539
|
return Object.prototype.toString.call(e);
|
|
5489
5540
|
}
|
|
@@ -5518,7 +5569,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5518
5569
|
}
|
|
5519
5570
|
e.log = function() {
|
|
5520
5571
|
console.log("%s - %s", ee(), e.format.apply(e, arguments));
|
|
5521
|
-
}, e.inherits =
|
|
5572
|
+
}, e.inherits = qi(), e._extend = function(e, t) {
|
|
5522
5573
|
if (!t || !T(t)) return e;
|
|
5523
5574
|
for (var n = Object.keys(t), r = n.length; r--;) e[n[r]] = t[n[r]];
|
|
5524
5575
|
return e;
|
|
@@ -5585,7 +5636,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5585
5636
|
return Object.setPrototypeOf(n, Object.getPrototypeOf(e)), Object.defineProperties(n, t(e)), n;
|
|
5586
5637
|
}
|
|
5587
5638
|
e.callbackify = I;
|
|
5588
|
-
})),
|
|
5639
|
+
})), go = /* @__PURE__ */ r(((t, n) => {
|
|
5589
5640
|
function r(e, t) {
|
|
5590
5641
|
var n = Object.keys(e);
|
|
5591
5642
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -5641,7 +5692,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5641
5692
|
}
|
|
5642
5693
|
return (t === "string" ? String : Number)(e);
|
|
5643
5694
|
}
|
|
5644
|
-
var d = (
|
|
5695
|
+
var d = (Pr(), e(nr)).Buffer, f = ho().inspect, p = f && f.custom || "inspect";
|
|
5645
5696
|
function m(e, t, n) {
|
|
5646
5697
|
d.prototype.copy.call(e, t, n);
|
|
5647
5698
|
}
|
|
@@ -5755,8 +5806,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5755
5806
|
}
|
|
5756
5807
|
]), e;
|
|
5757
5808
|
}();
|
|
5758
|
-
})),
|
|
5759
|
-
|
|
5809
|
+
})), _o = /* @__PURE__ */ r(((e, t) => {
|
|
5810
|
+
pa();
|
|
5760
5811
|
function n(e, t) {
|
|
5761
5812
|
var n = this, a = this._readableState && this._readableState.destroyed, s = this._writableState && this._writableState.destroyed;
|
|
5762
5813
|
return a || s ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, Z.nextTick(o, this, e)) : Z.nextTick(o, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(e) {
|
|
@@ -5784,7 +5835,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5784
5835
|
undestroy: a,
|
|
5785
5836
|
errorOrDestroy: s
|
|
5786
5837
|
};
|
|
5787
|
-
})),
|
|
5838
|
+
})), vo = /* @__PURE__ */ r(((e, t) => {
|
|
5788
5839
|
function n(e, t) {
|
|
5789
5840
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
|
|
5790
5841
|
}
|
|
@@ -5835,8 +5886,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5835
5886
|
}), i("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"), i("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"), i("ERR_STREAM_WRITE_AFTER_END", "write after end"), i("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError), i("ERR_UNKNOWN_ENCODING", function(e) {
|
|
5836
5887
|
return "Unknown encoding: " + e;
|
|
5837
5888
|
}, TypeError), i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"), t.exports.codes = r;
|
|
5838
|
-
})),
|
|
5839
|
-
var n =
|
|
5889
|
+
})), yo = /* @__PURE__ */ r(((e, t) => {
|
|
5890
|
+
var n = vo().codes.ERR_INVALID_OPT_VALUE;
|
|
5840
5891
|
function r(e, t, n) {
|
|
5841
5892
|
return e.highWaterMark == null ? t ? e[n] : null : e.highWaterMark;
|
|
5842
5893
|
}
|
|
@@ -5849,8 +5900,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5849
5900
|
return e.objectMode ? 16 : 16384;
|
|
5850
5901
|
}
|
|
5851
5902
|
t.exports = { getHighWaterMark: i };
|
|
5852
|
-
})),
|
|
5853
|
-
|
|
5903
|
+
})), bo = /* @__PURE__ */ r(((e, t) => {
|
|
5904
|
+
Yi(), t.exports = n;
|
|
5854
5905
|
function n(e, t) {
|
|
5855
5906
|
if (r("noDeprecation")) return e;
|
|
5856
5907
|
var n = !1;
|
|
@@ -5865,15 +5916,15 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5865
5916
|
}
|
|
5866
5917
|
function r(e) {
|
|
5867
5918
|
try {
|
|
5868
|
-
if (!
|
|
5919
|
+
if (!Ji.localStorage) return !1;
|
|
5869
5920
|
} catch {
|
|
5870
5921
|
return !1;
|
|
5871
5922
|
}
|
|
5872
|
-
var t =
|
|
5923
|
+
var t = Ji.localStorage[e];
|
|
5873
5924
|
return t != null && String(t).toLowerCase() === "true";
|
|
5874
5925
|
}
|
|
5875
|
-
})),
|
|
5876
|
-
|
|
5926
|
+
})), xo = /* @__PURE__ */ r(((t, n) => {
|
|
5927
|
+
Yi(), pa(), n.exports = E;
|
|
5877
5928
|
function r(e) {
|
|
5878
5929
|
var t = this;
|
|
5879
5930
|
this.next = null, this.entry = null, this.finish = function() {
|
|
@@ -5882,18 +5933,18 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5882
5933
|
}
|
|
5883
5934
|
var i;
|
|
5884
5935
|
E.WritableState = w;
|
|
5885
|
-
var a = { deprecate:
|
|
5936
|
+
var a = { deprecate: bo() }, o = ma(), s = (Pr(), e(nr)).Buffer, c = (Ji === void 0 ? typeof window < "u" ? window : typeof self < "u" ? self : {} : Ji).Uint8Array || function() {};
|
|
5886
5937
|
function l(e) {
|
|
5887
5938
|
return s.from(e);
|
|
5888
5939
|
}
|
|
5889
5940
|
function u(e) {
|
|
5890
5941
|
return s.isBuffer(e) || e instanceof c;
|
|
5891
5942
|
}
|
|
5892
|
-
var d =
|
|
5893
|
-
|
|
5943
|
+
var d = _o(), f = yo().getHighWaterMark, p = vo().codes, m = p.ERR_INVALID_ARG_TYPE, h = p.ERR_METHOD_NOT_IMPLEMENTED, g = p.ERR_MULTIPLE_CALLBACK, _ = p.ERR_STREAM_CANNOT_PIPE, v = p.ERR_STREAM_DESTROYED, y = p.ERR_STREAM_NULL_VALUES, b = p.ERR_STREAM_WRITE_AFTER_END, x = p.ERR_UNKNOWN_ENCODING, S = d.errorOrDestroy;
|
|
5944
|
+
qi()(E, o);
|
|
5894
5945
|
function C() {}
|
|
5895
5946
|
function w(e, t, n) {
|
|
5896
|
-
i ||=
|
|
5947
|
+
i ||= So(), e ||= {}, typeof n != "boolean" && (n = t instanceof i), this.objectMode = !!e.objectMode, n && (this.objectMode = this.objectMode || !!e.writableObjectMode), this.highWaterMark = f(this, e, "writableHighWaterMark", n), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
|
|
5897
5948
|
var a = e.decodeStrings === !1;
|
|
5898
5949
|
this.decodeStrings = !a, this.defaultEncoding = e.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(e) {
|
|
5899
5950
|
N(t, e);
|
|
@@ -5916,7 +5967,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
5916
5967
|
return e instanceof this;
|
|
5917
5968
|
};
|
|
5918
5969
|
function E(e) {
|
|
5919
|
-
i ||=
|
|
5970
|
+
i ||= So();
|
|
5920
5971
|
var t = this instanceof i;
|
|
5921
5972
|
if (!t && !T.call(E, this)) return new E(e);
|
|
5922
5973
|
this._writableState = new w(e, this, t), this.writable = !0, e && (typeof e.write == "function" && (this._write = e.write), typeof e.writev == "function" && (this._writev = e.writev), typeof e.destroy == "function" && (this._destroy = e.destroy), typeof e.final == "function" && (this._final = e.final)), o.call(this);
|
|
@@ -6083,16 +6134,16 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6083
6134
|
}), E.prototype.destroy = d.destroy, E.prototype._undestroy = d.undestroy, E.prototype._destroy = function(e, t) {
|
|
6084
6135
|
t(e);
|
|
6085
6136
|
};
|
|
6086
|
-
})),
|
|
6087
|
-
|
|
6137
|
+
})), So = /* @__PURE__ */ r(((e, t) => {
|
|
6138
|
+
pa();
|
|
6088
6139
|
var n = Object.keys || function(e) {
|
|
6089
6140
|
var t = [];
|
|
6090
6141
|
for (var n in e) t.push(n);
|
|
6091
6142
|
return t;
|
|
6092
6143
|
};
|
|
6093
6144
|
t.exports = c;
|
|
6094
|
-
var r =
|
|
6095
|
-
|
|
6145
|
+
var r = Oo(), i = xo();
|
|
6146
|
+
qi()(c, r);
|
|
6096
6147
|
for (var a = n(i.prototype), o = 0; o < a.length; o++) {
|
|
6097
6148
|
var s = a[o];
|
|
6098
6149
|
c.prototype[s] || (c.prototype[s] = i.prototype[s]);
|
|
@@ -6132,8 +6183,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6132
6183
|
this._readableState !== void 0 && this._writableState !== void 0 && (this._readableState.destroyed = e, this._writableState.destroyed = e);
|
|
6133
6184
|
}
|
|
6134
6185
|
});
|
|
6135
|
-
})),
|
|
6136
|
-
var r = (
|
|
6186
|
+
})), Co = /* @__PURE__ */ r(((t, n) => {
|
|
6187
|
+
var r = (Pr(), e(nr)), i = r.Buffer;
|
|
6137
6188
|
function a(e, t) {
|
|
6138
6189
|
for (var n in e) t[n] = e[n];
|
|
6139
6190
|
}
|
|
@@ -6155,8 +6206,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6155
6206
|
if (typeof e != "number") throw TypeError("Argument must be a number");
|
|
6156
6207
|
return r.SlowBuffer(e);
|
|
6157
6208
|
};
|
|
6158
|
-
})),
|
|
6159
|
-
var t =
|
|
6209
|
+
})), wo = /* @__PURE__ */ r(((e) => {
|
|
6210
|
+
var t = Co().Buffer, n = t.isEncoding || function(e) {
|
|
6160
6211
|
switch (e = "" + e, e && e.toLowerCase()) {
|
|
6161
6212
|
case "hex":
|
|
6162
6213
|
case "utf8":
|
|
@@ -6294,8 +6345,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6294
6345
|
function _(e) {
|
|
6295
6346
|
return e && e.length ? this.write(e) : "";
|
|
6296
6347
|
}
|
|
6297
|
-
})),
|
|
6298
|
-
var n =
|
|
6348
|
+
})), To = /* @__PURE__ */ r(((e, t) => {
|
|
6349
|
+
var n = vo().codes.ERR_STREAM_PREMATURE_CLOSE;
|
|
6299
6350
|
function r(e) {
|
|
6300
6351
|
var t = !1;
|
|
6301
6352
|
return function() {
|
|
@@ -6333,8 +6384,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6333
6384
|
};
|
|
6334
6385
|
}
|
|
6335
6386
|
t.exports = o;
|
|
6336
|
-
})),
|
|
6337
|
-
|
|
6387
|
+
})), Eo = /* @__PURE__ */ r(((e, t) => {
|
|
6388
|
+
pa();
|
|
6338
6389
|
var n;
|
|
6339
6390
|
function r(e, t, n) {
|
|
6340
6391
|
return t = i(t), t in e ? Object.defineProperty(e, t, {
|
|
@@ -6358,7 +6409,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6358
6409
|
}
|
|
6359
6410
|
return (t === "string" ? String : Number)(e);
|
|
6360
6411
|
}
|
|
6361
|
-
var o =
|
|
6412
|
+
var o = To(), s = Symbol("lastResolve"), c = Symbol("lastReject"), l = Symbol("error"), u = Symbol("ended"), d = Symbol("lastPromise"), f = Symbol("handlePromise"), p = Symbol("stream");
|
|
6362
6413
|
function m(e, t) {
|
|
6363
6414
|
return {
|
|
6364
6415
|
value: e,
|
|
@@ -6455,25 +6506,25 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6455
6506
|
r !== null && (n[d] = null, n[s] = null, n[c] = null, r(m(void 0, !0))), n[u] = !0;
|
|
6456
6507
|
}), e.on("readable", g.bind(null, n)), n;
|
|
6457
6508
|
};
|
|
6458
|
-
})),
|
|
6509
|
+
})), Do = /* @__PURE__ */ r(((e, t) => {
|
|
6459
6510
|
t.exports = function() {
|
|
6460
6511
|
throw Error("Readable.from is not available in the browser");
|
|
6461
6512
|
};
|
|
6462
|
-
})),
|
|
6463
|
-
|
|
6513
|
+
})), Oo = /* @__PURE__ */ r(((t, n) => {
|
|
6514
|
+
Yi(), pa(), n.exports = D;
|
|
6464
6515
|
var r;
|
|
6465
|
-
D.ReadableState = E,
|
|
6516
|
+
D.ReadableState = E, Ki().EventEmitter;
|
|
6466
6517
|
var i = function(e, t) {
|
|
6467
6518
|
return e.listeners(t).length;
|
|
6468
|
-
}, a =
|
|
6519
|
+
}, a = ma(), o = (Pr(), e(nr)).Buffer, s = (Ji === void 0 ? typeof window < "u" ? window : typeof self < "u" ? self : {} : Ji).Uint8Array || function() {};
|
|
6469
6520
|
function c(e) {
|
|
6470
6521
|
return o.from(e);
|
|
6471
6522
|
}
|
|
6472
6523
|
function l(e) {
|
|
6473
6524
|
return o.isBuffer(e) || e instanceof s;
|
|
6474
6525
|
}
|
|
6475
|
-
var u =
|
|
6476
|
-
|
|
6526
|
+
var u = ho(), d = u && u.debuglog ? u.debuglog("stream") : function() {}, f = go(), p = _o(), m = yo().getHighWaterMark, h = vo().codes, g = h.ERR_INVALID_ARG_TYPE, _ = h.ERR_STREAM_PUSH_AFTER_EOF, v = h.ERR_METHOD_NOT_IMPLEMENTED, y = h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, b, x, S;
|
|
6527
|
+
qi()(D, a);
|
|
6477
6528
|
var C = p.errorOrDestroy, w = [
|
|
6478
6529
|
"error",
|
|
6479
6530
|
"close",
|
|
@@ -6486,10 +6537,10 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6486
6537
|
!e._events || !e._events[t] ? e.on(t, n) : Array.isArray(e._events[t]) ? e._events[t].unshift(n) : e._events[t] = [n, e._events[t]];
|
|
6487
6538
|
}
|
|
6488
6539
|
function E(e, t, n) {
|
|
6489
|
-
r ||=
|
|
6540
|
+
r ||= So(), e ||= {}, typeof n != "boolean" && (n = t instanceof r), this.objectMode = !!e.objectMode, n && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = m(this, e, "readableHighWaterMark", n), this.buffer = new f(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = e.emitClose !== !1, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (b ||= wo().StringDecoder, this.decoder = new b(e.encoding), this.encoding = e.encoding);
|
|
6490
6541
|
}
|
|
6491
6542
|
function D(e) {
|
|
6492
|
-
if (r ||=
|
|
6543
|
+
if (r ||= So(), !(this instanceof D)) return new D(e);
|
|
6493
6544
|
var t = this instanceof r;
|
|
6494
6545
|
this._readableState = new E(e, this, t), this.readable = !0, e && (typeof e.read == "function" && (this._read = e.read), typeof e.destroy == "function" && (this._destroy = e.destroy)), a.call(this);
|
|
6495
6546
|
}
|
|
@@ -6539,7 +6590,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6539
6590
|
D.prototype.isPaused = function() {
|
|
6540
6591
|
return this._readableState.flowing === !1;
|
|
6541
6592
|
}, D.prototype.setEncoding = function(e) {
|
|
6542
|
-
b ||=
|
|
6593
|
+
b ||= wo().StringDecoder;
|
|
6543
6594
|
var t = new b(e);
|
|
6544
6595
|
this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding;
|
|
6545
6596
|
for (var n = this._readableState.buffer.head, r = ""; n !== null;) r += t.write(n.data), n = n.next;
|
|
@@ -6712,7 +6763,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6712
6763
|
d("wrapped _read", t), r && (r = !1, e.resume());
|
|
6713
6764
|
}, this;
|
|
6714
6765
|
}, typeof Symbol == "function" && (D.prototype[Symbol.asyncIterator] = function() {
|
|
6715
|
-
return x === void 0 && (x =
|
|
6766
|
+
return x === void 0 && (x = Eo()), x(this);
|
|
6716
6767
|
}), Object.defineProperty(D.prototype, "readableHighWaterMark", {
|
|
6717
6768
|
enumerable: !1,
|
|
6718
6769
|
get: function() {
|
|
@@ -6753,16 +6804,16 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6753
6804
|
}
|
|
6754
6805
|
}
|
|
6755
6806
|
typeof Symbol == "function" && (D.from = function(e, t) {
|
|
6756
|
-
return S === void 0 && (S =
|
|
6807
|
+
return S === void 0 && (S = Do()), S(D, e, t);
|
|
6757
6808
|
});
|
|
6758
6809
|
function ce(e, t) {
|
|
6759
6810
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
6760
6811
|
return -1;
|
|
6761
6812
|
}
|
|
6762
|
-
})),
|
|
6813
|
+
})), ko = /* @__PURE__ */ r(((e, t) => {
|
|
6763
6814
|
t.exports = l;
|
|
6764
|
-
var n =
|
|
6765
|
-
|
|
6815
|
+
var n = vo().codes, r = n.ERR_METHOD_NOT_IMPLEMENTED, i = n.ERR_MULTIPLE_CALLBACK, a = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, o = n.ERR_TRANSFORM_WITH_LENGTH_0, s = So();
|
|
6816
|
+
qi()(l, s);
|
|
6766
6817
|
function c(e, t) {
|
|
6767
6818
|
var n = this._transformState;
|
|
6768
6819
|
n.transforming = !1;
|
|
@@ -6813,10 +6864,10 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6813
6864
|
if (e._transformState.transforming) throw new a();
|
|
6814
6865
|
return e.push(null);
|
|
6815
6866
|
}
|
|
6816
|
-
})),
|
|
6867
|
+
})), Ao = /* @__PURE__ */ r(((e, t) => {
|
|
6817
6868
|
t.exports = r;
|
|
6818
|
-
var n =
|
|
6819
|
-
|
|
6869
|
+
var n = ko();
|
|
6870
|
+
qi()(r, n);
|
|
6820
6871
|
function r(e) {
|
|
6821
6872
|
if (!(this instanceof r)) return new r(e);
|
|
6822
6873
|
n.call(this, e);
|
|
@@ -6824,7 +6875,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6824
6875
|
r.prototype._transform = function(e, t, n) {
|
|
6825
6876
|
n(null, e);
|
|
6826
6877
|
};
|
|
6827
|
-
})),
|
|
6878
|
+
})), jo = /* @__PURE__ */ r(((e, t) => {
|
|
6828
6879
|
var n;
|
|
6829
6880
|
function r(e) {
|
|
6830
6881
|
var t = !1;
|
|
@@ -6832,7 +6883,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6832
6883
|
t || (t = !0, e.apply(void 0, arguments));
|
|
6833
6884
|
};
|
|
6834
6885
|
}
|
|
6835
|
-
var i =
|
|
6886
|
+
var i = vo().codes, a = i.ERR_MISSING_ARGS, o = i.ERR_STREAM_DESTROYED;
|
|
6836
6887
|
function s(e) {
|
|
6837
6888
|
if (e) throw e;
|
|
6838
6889
|
}
|
|
@@ -6844,7 +6895,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6844
6895
|
var s = !1;
|
|
6845
6896
|
e.on("close", function() {
|
|
6846
6897
|
s = !0;
|
|
6847
|
-
}), n === void 0 && (n =
|
|
6898
|
+
}), n === void 0 && (n = To()), n(e, {
|
|
6848
6899
|
readable: t,
|
|
6849
6900
|
writable: i
|
|
6850
6901
|
}, function(e) {
|
|
@@ -6881,10 +6932,10 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6881
6932
|
return e.reduce(d);
|
|
6882
6933
|
}
|
|
6883
6934
|
t.exports = p;
|
|
6884
|
-
})),
|
|
6935
|
+
})), Mo = (/* @__PURE__ */ r(((e, t) => {
|
|
6885
6936
|
t.exports = r;
|
|
6886
|
-
var n =
|
|
6887
|
-
|
|
6937
|
+
var n = Ki().EventEmitter;
|
|
6938
|
+
qi()(r, n), r.Readable = Oo(), r.Writable = xo(), r.Duplex = So(), r.Transform = ko(), r.PassThrough = Ao(), r.finished = To(), r.pipeline = jo(), r.Stream = r;
|
|
6888
6939
|
function r() {
|
|
6889
6940
|
n.call(this);
|
|
6890
6941
|
}
|
|
@@ -6914,18 +6965,18 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6914
6965
|
}
|
|
6915
6966
|
return r.on("end", u), r.on("close", u), e.on("close", u), e.emit("pipe", r), e;
|
|
6916
6967
|
};
|
|
6917
|
-
})))(),
|
|
6918
|
-
Server: () =>
|
|
6919
|
-
Socket: () =>
|
|
6920
|
-
_default: () =>
|
|
6921
|
-
connect: () =>
|
|
6922
|
-
createConnection: () =>
|
|
6923
|
-
createServer: () =>
|
|
6924
|
-
default: () =>
|
|
6925
|
-
isIP: () =>
|
|
6926
|
-
isIPv4: () =>
|
|
6927
|
-
isIPv6: () =>
|
|
6928
|
-
}),
|
|
6968
|
+
})))(), No = Ki(), Po = /* @__PURE__ */ g({
|
|
6969
|
+
Server: () => Io,
|
|
6970
|
+
Socket: () => Fo,
|
|
6971
|
+
_default: () => Bo,
|
|
6972
|
+
connect: () => Lo,
|
|
6973
|
+
createConnection: () => Ro,
|
|
6974
|
+
createServer: () => zo,
|
|
6975
|
+
default: () => Bo,
|
|
6976
|
+
isIP: () => Hi,
|
|
6977
|
+
isIPv4: () => Bi,
|
|
6978
|
+
isIPv6: () => Vi
|
|
6979
|
+
}), Fo = class extends Mo.Stream.Duplex {
|
|
6929
6980
|
_localAddress;
|
|
6930
6981
|
_remoteAddress;
|
|
6931
6982
|
_webVPNTcpSocketPromise;
|
|
@@ -6935,7 +6986,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6935
6986
|
}
|
|
6936
6987
|
_busyRelease;
|
|
6937
6988
|
__webvpn_tcp_socket_init__(e, t) {
|
|
6938
|
-
if (this._busyRelease ??=
|
|
6989
|
+
if (this._busyRelease ??= Hn("tcp socket"), t && (this._localAddress = {
|
|
6939
6990
|
address: t.localAddress,
|
|
6940
6991
|
family: t.localFamily,
|
|
6941
6992
|
port: t.localPort
|
|
@@ -6998,7 +7049,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
6998
7049
|
}).catch(n);
|
|
6999
7050
|
}
|
|
7000
7051
|
connect(...e) {
|
|
7001
|
-
let t =
|
|
7052
|
+
let t = Ui(...e), n = this.__webvpn_tcp_socket_init__(d("an outbound tcp socket").then((e) => e.cloud.webvpn.tcpSocket({
|
|
7002
7053
|
remoteAddress: t.host ?? "localhost",
|
|
7003
7054
|
remotePort: t.port
|
|
7004
7055
|
})));
|
|
@@ -7134,7 +7185,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
7134
7185
|
return this._remoteAddress.family;
|
|
7135
7186
|
}
|
|
7136
7187
|
timeout;
|
|
7137
|
-
},
|
|
7188
|
+
}, Io = class extends No.EventEmitter {
|
|
7138
7189
|
_localAddress;
|
|
7139
7190
|
_webVPNTcpSocketListenerPromise;
|
|
7140
7191
|
constructor(e, t) {
|
|
@@ -7142,7 +7193,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
7142
7193
|
}
|
|
7143
7194
|
_busyRelease;
|
|
7144
7195
|
__webvpn_tcp_socket_listener_init__(e) {
|
|
7145
|
-
return this._busyRelease ??=
|
|
7196
|
+
return this._busyRelease ??= Hn("tcp server"), this._webVPNTcpSocketListenerPromise = e.then((e) => (this._localAddress = {
|
|
7146
7197
|
address: e.localAddress,
|
|
7147
7198
|
family: e.localFamily,
|
|
7148
7199
|
port: e.localPort
|
|
@@ -7157,10 +7208,10 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
7157
7208
|
}), this._webVPNTcpSocketListenerPromise;
|
|
7158
7209
|
}
|
|
7159
7210
|
listen(...e) {
|
|
7160
|
-
let t =
|
|
7211
|
+
let t = Ui(...e);
|
|
7161
7212
|
this._closeEmitted = !1;
|
|
7162
7213
|
let n = (e) => {
|
|
7163
|
-
let t = new
|
|
7214
|
+
let t = new Fo();
|
|
7164
7215
|
t.__webvpn_tcp_socket_init__(Promise.resolve(e), e), this.emit("connection", t);
|
|
7165
7216
|
}, r = (e) => {
|
|
7166
7217
|
this._localAddress = void 0;
|
|
@@ -7208,28 +7259,28 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
|
|
|
7208
7259
|
connections;
|
|
7209
7260
|
listening;
|
|
7210
7261
|
async [Symbol.asyncDispose]() {}
|
|
7211
|
-
},
|
|
7262
|
+
}, Lo = (e, t) => new Fo().connect(e, t), Ro = (e, t) => new Fo().connect(e, t), zo = (e, t) => {
|
|
7212
7263
|
typeof e == "function" && (t = e, e = void 0);
|
|
7213
|
-
let n = new
|
|
7264
|
+
let n = new Io(e);
|
|
7214
7265
|
return t && n.on("connection", t), n;
|
|
7215
|
-
},
|
|
7216
|
-
Socket:
|
|
7217
|
-
Server:
|
|
7218
|
-
connect:
|
|
7219
|
-
createConnection:
|
|
7220
|
-
createServer:
|
|
7221
|
-
isIP:
|
|
7222
|
-
isIPv4:
|
|
7223
|
-
isIPv6:
|
|
7266
|
+
}, Bo = {
|
|
7267
|
+
Socket: Fo,
|
|
7268
|
+
Server: Io,
|
|
7269
|
+
connect: Lo,
|
|
7270
|
+
createConnection: Ro,
|
|
7271
|
+
createServer: zo,
|
|
7272
|
+
isIP: Hi,
|
|
7273
|
+
isIPv4: Bi,
|
|
7274
|
+
isIPv6: Vi
|
|
7224
7275
|
};
|
|
7225
7276
|
//#endregion
|
|
7226
7277
|
//#region node_modules/@fkn/lib/dgram.js
|
|
7227
|
-
|
|
7228
|
-
var
|
|
7229
|
-
Socket: () =>
|
|
7230
|
-
createSocket: () =>
|
|
7231
|
-
default: () =>
|
|
7232
|
-
}),
|
|
7278
|
+
Pr();
|
|
7279
|
+
var Vo = /* @__PURE__ */ g({
|
|
7280
|
+
Socket: () => Ho,
|
|
7281
|
+
createSocket: () => Jo,
|
|
7282
|
+
default: () => Yo
|
|
7283
|
+
}), Ho = class extends No.EventEmitter {
|
|
7233
7284
|
_type;
|
|
7234
7285
|
_localAddress;
|
|
7235
7286
|
_remoteAddress;
|
|
@@ -7273,7 +7324,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7273
7324
|
if (!this._dataPortAcks || !this._dataPort || (this._dataPortConsumedBytes += e, this._dataPortAckedBytes !== 0 && this._dataPortConsumedBytes - this._dataPortAckedBytes < 524288)) return;
|
|
7274
7325
|
this._dataPortAckedBytes = this._dataPortConsumedBytes;
|
|
7275
7326
|
let t = {
|
|
7276
|
-
type:
|
|
7327
|
+
type: zi,
|
|
7277
7328
|
consumedBytes: this._dataPortConsumedBytes
|
|
7278
7329
|
};
|
|
7279
7330
|
this._dataPort.postMessage(t);
|
|
@@ -7299,7 +7350,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7299
7350
|
l = this._remoteAddress.address, u = this._remoteAddress.family, d = this._remoteAddress.port;
|
|
7300
7351
|
} else {
|
|
7301
7352
|
let n = new Uint8Array(e, s, c === 0 ? 4 : 16);
|
|
7302
|
-
c === 0 ? (u = "IPv4", l = `${n[0]}.${n[1]}.${n[2]}.${n[3]}`) : (u = "IPv6", l =
|
|
7353
|
+
c === 0 ? (u = "IPv4", l = `${n[0]}.${n[1]}.${n[2]}.${n[3]}`) : (u = "IPv6", l = Ko(n)), s += n.byteLength, d = t.getUint16(s), s += 2;
|
|
7303
7354
|
}
|
|
7304
7355
|
let f = t.getUint32(s);
|
|
7305
7356
|
s += 4;
|
|
@@ -7318,10 +7369,10 @@ var jo = /* @__PURE__ */ g({
|
|
|
7318
7369
|
if (n) throw r;
|
|
7319
7370
|
}
|
|
7320
7371
|
_peerTail(e, t) {
|
|
7321
|
-
if (e === void 0 || t === void 0) return
|
|
7372
|
+
if (e === void 0 || t === void 0) return Uo;
|
|
7322
7373
|
let n = `${e}|${t}`, r = this._peerTailCache.get(n);
|
|
7323
7374
|
if (r) return r;
|
|
7324
|
-
let i = Y.Address4.isValid(e) ?
|
|
7375
|
+
let i = Y.Address4.isValid(e) ? Go(e) : qo(e), a = new Uint8Array(1 + i.byteLength + 2);
|
|
7325
7376
|
return a[0] = i.byteLength === 4 ? 0 : 1, a.set(i, 1), new DataView(a.buffer).setUint16(1 + i.byteLength, t), this._peerTailCache.size >= 4096 && this._peerTailCache.clear(), this._peerTailCache.set(n, a), a;
|
|
7326
7377
|
}
|
|
7327
7378
|
_portSend(e, t, n) {
|
|
@@ -7337,7 +7388,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7337
7388
|
}
|
|
7338
7389
|
addMembership(e, t) {
|
|
7339
7390
|
if (Y.Address4.isValid(e)) {
|
|
7340
|
-
let n =
|
|
7391
|
+
let n = Go(e), r = t && Y.Address4.isValid(t) ? Go(t) : new Uint8Array([
|
|
7341
7392
|
0,
|
|
7342
7393
|
0,
|
|
7343
7394
|
0,
|
|
@@ -7349,7 +7400,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7349
7400
|
interface: r
|
|
7350
7401
|
});
|
|
7351
7402
|
} else if (Y.Address6.isValid(e)) {
|
|
7352
|
-
let t =
|
|
7403
|
+
let t = qo(e);
|
|
7353
7404
|
this._setUdpOption({
|
|
7354
7405
|
type: 7,
|
|
7355
7406
|
group: t,
|
|
@@ -7362,7 +7413,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7362
7413
|
return this._localAddress;
|
|
7363
7414
|
}
|
|
7364
7415
|
bind(...e) {
|
|
7365
|
-
let t =
|
|
7416
|
+
let t = Wi(...e), n = this._type === "udp6" ? "::" : "0.0.0.0", r = this.__webvpn_udp_socket_init__(d("a udp socket").then((e) => e.cloud.webvpn.udpSocket({
|
|
7366
7417
|
type: this._type,
|
|
7367
7418
|
address: t.address ?? n,
|
|
7368
7419
|
port: t.port,
|
|
@@ -7377,7 +7428,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7377
7428
|
address: t.localAddress,
|
|
7378
7429
|
family: t.localFamily,
|
|
7379
7430
|
port: t.localPort
|
|
7380
|
-
}), this._busyRelease ??=
|
|
7431
|
+
}), this._busyRelease ??= Hn("udp socket"), this._webVPNUdpSocketPromise = e.then((e) => {
|
|
7381
7432
|
if (e.dataPort) this._socketId = e.socketId, this._dataPort = e.dataPort, this._dataPortAcks = e.dataPortAcks === !0, this._dataPort.onmessage = (e) => {
|
|
7382
7433
|
try {
|
|
7383
7434
|
this._onDataPortBatch(e.data);
|
|
@@ -7463,7 +7514,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7463
7514
|
}
|
|
7464
7515
|
dropMembership(e, t) {
|
|
7465
7516
|
if (Y.Address4.isValid(e)) {
|
|
7466
|
-
let n =
|
|
7517
|
+
let n = Go(e), r = t && Y.Address4.isValid(t) ? Go(t) : new Uint8Array([
|
|
7467
7518
|
0,
|
|
7468
7519
|
0,
|
|
7469
7520
|
0,
|
|
@@ -7475,7 +7526,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7475
7526
|
interface: r
|
|
7476
7527
|
});
|
|
7477
7528
|
} else if (Y.Address6.isValid(e)) {
|
|
7478
|
-
let t =
|
|
7529
|
+
let t = qo(e);
|
|
7479
7530
|
this._setUdpOption({
|
|
7480
7531
|
type: 8,
|
|
7481
7532
|
group: t,
|
|
@@ -7508,7 +7559,7 @@ var jo = /* @__PURE__ */ g({
|
|
|
7508
7559
|
}
|
|
7509
7560
|
send(...e) {
|
|
7510
7561
|
this._webVPNUdpSocketPromise || this.bind();
|
|
7511
|
-
let t =
|
|
7562
|
+
let t = Gi(...e), n = Wo(t.message), r = n;
|
|
7512
7563
|
if (t.hasRange) {
|
|
7513
7564
|
let { offset: e, length: i } = t;
|
|
7514
7565
|
if (!Number.isInteger(e) || e < 0 || e > n.byteLength) throw Object.assign(/* @__PURE__ */ RangeError("\"offset\" is outside of buffer bounds"), { code: "ERR_BUFFER_OUT_OF_BOUNDS" });
|
|
@@ -7581,21 +7632,21 @@ var jo = /* @__PURE__ */ g({
|
|
|
7581
7632
|
this.close(e);
|
|
7582
7633
|
});
|
|
7583
7634
|
}
|
|
7584
|
-
},
|
|
7585
|
-
if (typeof e == "string") return
|
|
7635
|
+
}, Uo = new Uint8Array([2]), Wo = (e) => {
|
|
7636
|
+
if (typeof e == "string") return Ri.encode(e);
|
|
7586
7637
|
if (e instanceof Uint8Array) return e;
|
|
7587
7638
|
if (ArrayBuffer.isView(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
7588
7639
|
if (Array.isArray(e)) {
|
|
7589
|
-
let t = e.map(
|
|
7640
|
+
let t = e.map(Wo), n = new Uint8Array(t.reduce((e, t) => e + t.byteLength, 0)), r = 0;
|
|
7590
7641
|
for (let e of t) n.set(e, r), r += e.byteLength;
|
|
7591
7642
|
return n;
|
|
7592
7643
|
}
|
|
7593
7644
|
return new Uint8Array(e);
|
|
7594
|
-
},
|
|
7645
|
+
}, Go = (e) => {
|
|
7595
7646
|
let t = e.split(".").map((e) => parseInt(e, 10));
|
|
7596
7647
|
if (t.length !== 4 || t.some((e) => Number.isNaN(e) || e < 0 || e > 255)) throw Error(`Invalid IPv4 address: ${e}`);
|
|
7597
7648
|
return new Uint8Array(t);
|
|
7598
|
-
},
|
|
7649
|
+
}, Ko = (e) => {
|
|
7599
7650
|
let t = [];
|
|
7600
7651
|
for (let n = 0; n < 16; n += 2) t.push(e[n] << 8 | e[n + 1]);
|
|
7601
7652
|
let n = -1, r = 1;
|
|
@@ -7609,36 +7660,36 @@ var jo = /* @__PURE__ */ g({
|
|
|
7609
7660
|
i - e > r && (n = e, r = i - e), e = i;
|
|
7610
7661
|
}
|
|
7611
7662
|
return n === -1 ? t.map((e) => e.toString(16)).join(":") : `${t.slice(0, n).map((e) => e.toString(16)).join(":")}::${t.slice(n + r).map((e) => e.toString(16)).join(":")}`;
|
|
7612
|
-
},
|
|
7663
|
+
}, qo = (e) => {
|
|
7613
7664
|
let t = new Y.Address6(e).getBitsBase16(0, 128).match(/.{2}/g);
|
|
7614
7665
|
if (!t || t.length !== 16) throw Error(`Invalid IPv6 address: ${e}`);
|
|
7615
7666
|
return new Uint8Array(t.map((e) => parseInt(e, 16)));
|
|
7616
|
-
},
|
|
7617
|
-
let n = new
|
|
7667
|
+
}, Jo = (e, t) => {
|
|
7668
|
+
let n = new Ho(typeof e == "string" ? { type: e } : e);
|
|
7618
7669
|
return t && n.on("message", t), n;
|
|
7619
|
-
},
|
|
7620
|
-
Socket:
|
|
7621
|
-
createSocket:
|
|
7670
|
+
}, Yo = {
|
|
7671
|
+
Socket: Ho,
|
|
7672
|
+
createSocket: Jo
|
|
7622
7673
|
};
|
|
7623
7674
|
//#endregion
|
|
7624
7675
|
//#region node_modules/@fkn/lib/http.js
|
|
7625
|
-
|
|
7626
|
-
var
|
|
7627
|
-
Agent: () =>
|
|
7628
|
-
ClientRequest: () =>
|
|
7629
|
-
HTTPParser: () =>
|
|
7630
|
-
IncomingMessage: () =>
|
|
7631
|
-
METHODS: () =>
|
|
7632
|
-
STATUS_CODES: () =>
|
|
7633
|
-
Server: () =>
|
|
7634
|
-
ServerResponse: () =>
|
|
7635
|
-
_default: () =>
|
|
7636
|
-
createServer: () =>
|
|
7637
|
-
default: () =>
|
|
7638
|
-
get: () =>
|
|
7639
|
-
globalAgent: () =>
|
|
7640
|
-
request: () =>
|
|
7641
|
-
}),
|
|
7676
|
+
Pr();
|
|
7677
|
+
var Xo = /* @__PURE__ */ g({
|
|
7678
|
+
Agent: () => gs,
|
|
7679
|
+
ClientRequest: () => ms,
|
|
7680
|
+
HTTPParser: () => cs,
|
|
7681
|
+
IncomingMessage: () => us,
|
|
7682
|
+
METHODS: () => Qo,
|
|
7683
|
+
STATUS_CODES: () => $o,
|
|
7684
|
+
Server: () => hs,
|
|
7685
|
+
ServerResponse: () => fs,
|
|
7686
|
+
_default: () => xs,
|
|
7687
|
+
createServer: () => bs,
|
|
7688
|
+
default: () => xs,
|
|
7689
|
+
get: () => ys,
|
|
7690
|
+
globalAgent: () => _s,
|
|
7691
|
+
request: () => vs
|
|
7692
|
+
}), Zo = new TextDecoder("latin1"), Qo = /* @__PURE__ */ "ACL.BIND.CHECKOUT.CONNECT.COPY.DELETE.GET.HEAD.LINK.LOCK.M-SEARCH.MERGE.MKACTIVITY.MKCALENDAR.MKCOL.MOVE.NOTIFY.OPTIONS.PATCH.POST.PROPFIND.PROPPATCH.PURGE.PUT.REBIND.REPORT.SEARCH.SOURCE.SUBSCRIBE.TRACE.UNBIND.UNLINK.UNLOCK.UNSUBSCRIBE".split("."), $o = {
|
|
7642
7693
|
100: "Continue",
|
|
7643
7694
|
101: "Switching Protocols",
|
|
7644
7695
|
102: "Processing",
|
|
@@ -7702,7 +7753,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7702
7753
|
509: "Bandwidth Limit Exceeded",
|
|
7703
7754
|
510: "Not Extended",
|
|
7704
7755
|
511: "Network Authentication Required"
|
|
7705
|
-
},
|
|
7756
|
+
}, es = /* @__PURE__ */ new Set([
|
|
7706
7757
|
"content-type",
|
|
7707
7758
|
"content-length",
|
|
7708
7759
|
"user-agent",
|
|
@@ -7721,18 +7772,18 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7721
7772
|
"server",
|
|
7722
7773
|
"age",
|
|
7723
7774
|
"expires"
|
|
7724
|
-
]),
|
|
7775
|
+
]), ts = 13, ns = 10, rs = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/, is = (e, t) => (e.code = t, e), as = (e, t) => {
|
|
7725
7776
|
if (e.length === 0) return t;
|
|
7726
7777
|
if (t.length === 0) return e;
|
|
7727
7778
|
let n = new Uint8Array(e.length + t.length);
|
|
7728
7779
|
return n.set(e, 0), n.set(t, e.length), n;
|
|
7729
|
-
},
|
|
7730
|
-
for (let n = t; n + 1 < e.length; n++) if (e[n] ===
|
|
7780
|
+
}, os = (e, t) => {
|
|
7781
|
+
for (let n = t; n + 1 < e.length; n++) if (e[n] === ts && e[n + 1] === ns) return n;
|
|
7731
7782
|
return -1;
|
|
7732
|
-
},
|
|
7733
|
-
for (let t = 0; t + 3 < e.length; t++) if (e[t] ===
|
|
7783
|
+
}, ss = (e) => {
|
|
7784
|
+
for (let t = 0; t + 3 < e.length; t++) if (e[t] === ts && e[t + 1] === ns && e[t + 2] === ts && e[t + 3] === ns) return t;
|
|
7734
7785
|
return -1;
|
|
7735
|
-
},
|
|
7786
|
+
}, cs = class {
|
|
7736
7787
|
mode;
|
|
7737
7788
|
handlers;
|
|
7738
7789
|
buf = /* @__PURE__ */ new Uint8Array();
|
|
@@ -7745,10 +7796,10 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7745
7796
|
this.mode = e, this.handlers = t;
|
|
7746
7797
|
}
|
|
7747
7798
|
execute(e) {
|
|
7748
|
-
this.buf =
|
|
7799
|
+
this.buf = as(this.buf, e);
|
|
7749
7800
|
let t = !0;
|
|
7750
7801
|
for (; t;) if (t = !1, this.state === "HEAD") {
|
|
7751
|
-
let e =
|
|
7802
|
+
let e = ss(this.buf);
|
|
7752
7803
|
if (e === -1) return;
|
|
7753
7804
|
let n = this.buf.subarray(0, e);
|
|
7754
7805
|
this.buf = this.buf.subarray(e + 4);
|
|
@@ -7763,7 +7814,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7763
7814
|
this.state = "HEAD", this.framing = "none", this.bodyRemaining = 0, this.chunkState = "size", this.skipBody = !1;
|
|
7764
7815
|
}
|
|
7765
7816
|
parseHead(e) {
|
|
7766
|
-
let t =
|
|
7817
|
+
let t = Zo.decode(e).split("\r\n"), n = t.shift() ?? "", r = [];
|
|
7767
7818
|
for (let e of t) (e.startsWith(" ") || e.startsWith(" ")) && r.length > 0 ? r[r.length - 1] += " " + e.trim() : r.push(e);
|
|
7768
7819
|
let i = [], a = {};
|
|
7769
7820
|
for (let e of r) {
|
|
@@ -7801,7 +7852,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7801
7852
|
return;
|
|
7802
7853
|
}
|
|
7803
7854
|
let i = e[r];
|
|
7804
|
-
i === void 0 ? e[r] = n :
|
|
7855
|
+
i === void 0 ? e[r] = n : es.has(r) || (e[r] = `${i}, ${n}`);
|
|
7805
7856
|
}
|
|
7806
7857
|
setupBody(e) {
|
|
7807
7858
|
if (this.skipBody) {
|
|
@@ -7834,9 +7885,9 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7834
7885
|
}
|
|
7835
7886
|
consumeChunked() {
|
|
7836
7887
|
for (;;) if (this.chunkState === "size") {
|
|
7837
|
-
let e =
|
|
7888
|
+
let e = os(this.buf, 0);
|
|
7838
7889
|
if (e === -1) return !1;
|
|
7839
|
-
let t =
|
|
7890
|
+
let t = Zo.decode(this.buf.subarray(0, e)), n = parseInt(t.split(";")[0].trim(), 16);
|
|
7840
7891
|
if (this.buf = this.buf.subarray(e + 2), Number.isNaN(n)) return !0;
|
|
7841
7892
|
n === 0 ? this.chunkState = "trailer" : (this.bodyRemaining = n, this.chunkState = "data");
|
|
7842
7893
|
} else if (this.chunkState === "data") {
|
|
@@ -7847,13 +7898,13 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7847
7898
|
if (this.buf.length < 2) return !1;
|
|
7848
7899
|
this.buf = this.buf.subarray(2), this.chunkState = "size";
|
|
7849
7900
|
} else {
|
|
7850
|
-
let e =
|
|
7901
|
+
let e = os(this.buf, 0);
|
|
7851
7902
|
if (e === -1) return !1;
|
|
7852
7903
|
let t = e === 0;
|
|
7853
7904
|
if (this.buf = this.buf.subarray(e + 2), t) return !0;
|
|
7854
7905
|
}
|
|
7855
7906
|
}
|
|
7856
|
-
},
|
|
7907
|
+
}, ls = (e, t) => G.isBuffer(e) ? e : typeof e == "string" ? G.from(e, t ?? "utf8") : e instanceof Uint8Array ? G.from(e) : e instanceof ArrayBuffer ? G.from(new Uint8Array(e)) : G.from(String(e)), us = class extends Mo.Stream.Readable {
|
|
7857
7908
|
httpVersion = "1.1";
|
|
7858
7909
|
httpVersionMajor = 1;
|
|
7859
7910
|
httpVersionMinor = 1;
|
|
@@ -7880,16 +7931,16 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7880
7931
|
setTimeout(e, t) {
|
|
7881
7932
|
return this.socket.setTimeout(e, t), this;
|
|
7882
7933
|
}
|
|
7883
|
-
},
|
|
7934
|
+
}, ds = class extends Mo.Stream.Writable {
|
|
7884
7935
|
_headerStore = /* @__PURE__ */ new Map();
|
|
7885
7936
|
headersSent = !1;
|
|
7886
7937
|
chunkedEncoding = !1;
|
|
7887
7938
|
finished = !1;
|
|
7888
7939
|
_bodyWritten = !1;
|
|
7889
7940
|
setHeader(e, t) {
|
|
7890
|
-
if (this.headersSent) throw
|
|
7891
|
-
if (typeof e != "string" || !
|
|
7892
|
-
if (t === void 0) throw
|
|
7941
|
+
if (this.headersSent) throw is(/* @__PURE__ */ Error("Cannot set headers after they are sent to the client"), "ERR_HTTP_HEADERS_SENT");
|
|
7942
|
+
if (typeof e != "string" || !rs.test(e)) throw is(/* @__PURE__ */ TypeError(`Header name must be a valid HTTP token [${JSON.stringify(String(e))}]`), "ERR_INVALID_HTTP_TOKEN");
|
|
7943
|
+
if (t === void 0) throw is(/* @__PURE__ */ TypeError(`Invalid value "undefined" for header "${e}"`), "ERR_HTTP_INVALID_HEADER_VALUE");
|
|
7893
7944
|
return this._headerStore.set(e.toLowerCase(), [e, Array.isArray(t) ? [...t] : t]), this;
|
|
7894
7945
|
}
|
|
7895
7946
|
getHeader(e) {
|
|
@@ -7929,7 +7980,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7929
7980
|
return this._bodyWritten = !0, super.write(e, t, n);
|
|
7930
7981
|
}
|
|
7931
7982
|
_write(e, t, n) {
|
|
7932
|
-
let r =
|
|
7983
|
+
let r = ls(e), i = [];
|
|
7933
7984
|
if (this.headersSent ||= (this._implicitHeader(), i.push(G.from(this._headBlock, "latin1")), !0), this.chunkedEncoding ? r.length > 0 && (i.push(G.from(`${r.length.toString(16)}\r\n`, "latin1")), i.push(r), i.push(G.from("\r\n", "latin1"))) : i.push(r), i.length === 0) {
|
|
7934
7985
|
n();
|
|
7935
7986
|
return;
|
|
@@ -7947,12 +7998,12 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7947
7998
|
end(e, t, n) {
|
|
7948
7999
|
if (e != null && typeof e != "function" && !this._bodyWritten && !this.headersSent && !this.chunkedEncoding && !this.hasHeader("content-length")) {
|
|
7949
8000
|
let n = typeof t == "string" ? t : void 0;
|
|
7950
|
-
this.setHeader("Content-Length",
|
|
8001
|
+
this.setHeader("Content-Length", ls(e, n).length);
|
|
7951
8002
|
}
|
|
7952
8003
|
return super.end(e, t, n);
|
|
7953
8004
|
}
|
|
7954
8005
|
_headBlock;
|
|
7955
|
-
},
|
|
8006
|
+
}, fs = class extends ds {
|
|
7956
8007
|
statusCode = 200;
|
|
7957
8008
|
statusMessage;
|
|
7958
8009
|
_writeHeadCalled = !1;
|
|
@@ -7969,7 +8020,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7969
8020
|
return !(e >= 100 && e < 200 || e === 204 || e === 304);
|
|
7970
8021
|
}
|
|
7971
8022
|
writeHead(e, t, n) {
|
|
7972
|
-
if (this._writeHeadCalled || this.headersSent) throw
|
|
8023
|
+
if (this._writeHeadCalled || this.headersSent) throw is(/* @__PURE__ */ Error("Cannot render headers after they are sent to the client"), "ERR_HTTP_HEADERS_SENT");
|
|
7973
8024
|
this._writeHeadCalled = !0, this.statusCode = e;
|
|
7974
8025
|
let r = n;
|
|
7975
8026
|
if (typeof t == "string" ? this.statusMessage = t : t != null && (r = t), Array.isArray(r)) {
|
|
@@ -7987,7 +8038,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7987
8038
|
}
|
|
7988
8039
|
}
|
|
7989
8040
|
_implicitHeader() {
|
|
7990
|
-
let e = this.statusMessage ??
|
|
8041
|
+
let e = this.statusMessage ?? $o[this.statusCode] ?? "unknown";
|
|
7991
8042
|
this.sendDate && !this.hasHeader("date") && this.setHeader("Date", (/* @__PURE__ */ new Date()).toUTCString()), this.hasHeader("connection") || this.setHeader("Connection", this._keepAlive ? "keep-alive" : "close"), this._headBlock = this._storeHeader(`HTTP/1.1 ${this.statusCode} ${e}`);
|
|
7992
8043
|
}
|
|
7993
8044
|
writeContinue() {
|
|
@@ -7996,7 +8047,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
7996
8047
|
setTimeout(e, t) {
|
|
7997
8048
|
return this.socket?.setTimeout(e, t), this;
|
|
7998
8049
|
}
|
|
7999
|
-
},
|
|
8050
|
+
}, ps = (...e) => {
|
|
8000
8051
|
let t = {}, n = {}, r, i = [...e], a = i.shift();
|
|
8001
8052
|
if (typeof a == "string" || a instanceof URL) {
|
|
8002
8053
|
let e = typeof a == "string" ? new URL(a) : a;
|
|
@@ -8018,7 +8069,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8018
8069
|
},
|
|
8019
8070
|
callback: r
|
|
8020
8071
|
};
|
|
8021
|
-
},
|
|
8072
|
+
}, ms = class extends ds {
|
|
8022
8073
|
method;
|
|
8023
8074
|
path;
|
|
8024
8075
|
host;
|
|
@@ -8040,7 +8091,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8040
8091
|
let e = this.protocol === "https:" && r === 443 || this.protocol !== "https:" && r === 80;
|
|
8041
8092
|
this.setHeader("Host", e ? n : `${n}:${r}`);
|
|
8042
8093
|
}
|
|
8043
|
-
e.auth && !this.hasHeader("authorization") && this.setHeader("Authorization", `Basic ${G.from(e.auth).toString("base64")}`), this.socket = new
|
|
8094
|
+
e.auth && !this.hasHeader("authorization") && this.setHeader("Authorization", `Basic ${G.from(e.auth).toString("base64")}`), this.socket = new Fo(), this.emit("socket", this.socket), this.socket.on("error", (e) => {
|
|
8044
8095
|
this._aborted || this.emit("error", e);
|
|
8045
8096
|
}), this._attachResponseParser(), this.socket.connect({
|
|
8046
8097
|
host: n,
|
|
@@ -8056,7 +8107,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8056
8107
|
this._headBlock = this._storeHeader(`${this.method} ${this.path} HTTP/1.1`);
|
|
8057
8108
|
}
|
|
8058
8109
|
_attachResponseParser() {
|
|
8059
|
-
let e = new
|
|
8110
|
+
let e = new us(this.socket), t = new cs("response", {
|
|
8060
8111
|
onHeaders: (n) => {
|
|
8061
8112
|
e._applyHead(n), this.method === "HEAD" && (t.skipBody = !0), this.res = e, this.emit("response", e);
|
|
8062
8113
|
},
|
|
@@ -8100,16 +8151,16 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8100
8151
|
setSocketKeepAlive(e, t) {
|
|
8101
8152
|
this.socket.setKeepAlive(e, t);
|
|
8102
8153
|
}
|
|
8103
|
-
},
|
|
8154
|
+
}, hs = new Proxy(class extends Io {
|
|
8104
8155
|
constructor(e, t) {
|
|
8105
8156
|
let n = {}, r = t;
|
|
8106
8157
|
typeof e == "function" ? r = e : e && (n = e), super(n), r && this.on("request", r), this.on("connection", (e) => this._handleConnection(e));
|
|
8107
8158
|
}
|
|
8108
8159
|
_handleConnection(e) {
|
|
8109
|
-
let t = null, n = new
|
|
8160
|
+
let t = null, n = new cs("request", {
|
|
8110
8161
|
onHeaders: (r) => {
|
|
8111
|
-
t = new
|
|
8112
|
-
let i = new
|
|
8162
|
+
t = new us(e), t._applyHead(r), r.method === "HEAD" && (n.skipBody = !0);
|
|
8163
|
+
let i = new fs(t), a = String(r.headers.connection ?? "").toLowerCase();
|
|
8113
8164
|
i._keepAlive = r.httpVersionMinor >= 1 ? a !== "close" : a === "keep-alive", i.on("finish", () => {
|
|
8114
8165
|
i._keepAlive || e.end();
|
|
8115
8166
|
}), this.emit("request", t, i);
|
|
@@ -8125,7 +8176,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8125
8176
|
n.finish(), t && t.push(null);
|
|
8126
8177
|
}), e.on("error", (t) => this.emit("clientError", t, e));
|
|
8127
8178
|
}
|
|
8128
|
-
}, { apply: (e, t, n) => new e(...n) }),
|
|
8179
|
+
}, { apply: (e, t, n) => new e(...n) }), gs = class {
|
|
8129
8180
|
maxSockets;
|
|
8130
8181
|
maxFreeSockets;
|
|
8131
8182
|
keepAlive;
|
|
@@ -8137,26 +8188,26 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8137
8188
|
return `${e.host ?? "localhost"}:${e.port ?? ""}:${e.localAddress ?? ""}`;
|
|
8138
8189
|
}
|
|
8139
8190
|
destroy() {}
|
|
8140
|
-
},
|
|
8141
|
-
let { options: t, callback: n } =
|
|
8142
|
-
return new
|
|
8143
|
-
},
|
|
8144
|
-
let t =
|
|
8191
|
+
}, _s = new gs(), vs = (...e) => {
|
|
8192
|
+
let { options: t, callback: n } = ps(...e);
|
|
8193
|
+
return new ms(t, n);
|
|
8194
|
+
}, ys = (...e) => {
|
|
8195
|
+
let t = vs(...e);
|
|
8145
8196
|
return t.end(), t;
|
|
8146
|
-
},
|
|
8147
|
-
METHODS:
|
|
8148
|
-
STATUS_CODES:
|
|
8149
|
-
Agent:
|
|
8150
|
-
globalAgent:
|
|
8151
|
-
Server:
|
|
8152
|
-
ServerResponse:
|
|
8153
|
-
IncomingMessage:
|
|
8154
|
-
ClientRequest:
|
|
8155
|
-
OutgoingMessage:
|
|
8156
|
-
createServer:
|
|
8157
|
-
request:
|
|
8158
|
-
get:
|
|
8159
|
-
},
|
|
8197
|
+
}, bs = (e, t) => new hs(e, t), xs = {
|
|
8198
|
+
METHODS: Qo,
|
|
8199
|
+
STATUS_CODES: $o,
|
|
8200
|
+
Agent: gs,
|
|
8201
|
+
globalAgent: _s,
|
|
8202
|
+
Server: hs,
|
|
8203
|
+
ServerResponse: fs,
|
|
8204
|
+
IncomingMessage: us,
|
|
8205
|
+
ClientRequest: ms,
|
|
8206
|
+
OutgoingMessage: ds,
|
|
8207
|
+
createServer: bs,
|
|
8208
|
+
request: vs,
|
|
8209
|
+
get: ys
|
|
8210
|
+
}, Ss = async () => {
|
|
8160
8211
|
let e = () => d("frame consent");
|
|
8161
8212
|
try {
|
|
8162
8213
|
let t = await e();
|
|
@@ -8171,31 +8222,31 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8171
8222
|
ensure: (t) => e().then((e) => e.frameConsent.ensure(t))
|
|
8172
8223
|
};
|
|
8173
8224
|
}
|
|
8174
|
-
},
|
|
8175
|
-
|
|
8176
|
-
},
|
|
8225
|
+
}, Cs = "frame: this frame no longer holds the document the app attached it to", ws = !1, Ts = () => {
|
|
8226
|
+
ws || (ws = !0, console.warn("[fkn-frame] this FKN broker is too old to ask for permission categories, so nothing was asked for upfront and each capability is asked for as it is first used. Reloading the page picks up the current broker."));
|
|
8227
|
+
}, Es = (e) => [...e].flatMap((e) => {
|
|
8177
8228
|
try {
|
|
8178
8229
|
return [new URL(e).hostname];
|
|
8179
8230
|
} catch {
|
|
8180
8231
|
return [];
|
|
8181
8232
|
}
|
|
8182
|
-
}),
|
|
8233
|
+
}), Ds = (e, t, n) => n === null ? `frame.${e}: the user did not grant ${t} here` : `frame.${e}: the user did not grant ${t} on ${n}`, Os = (e) => {
|
|
8183
8234
|
let { assertLive: t, attach: n, current: r, declaredHosts: i, documentHost: a, ensure: o, request: s, session: c, approvedOrigins: l } = e, u = /* @__PURE__ */ new Set(), d = async () => a ? await a() : (() => {
|
|
8184
8235
|
try {
|
|
8185
8236
|
return new URL(r()).hostname;
|
|
8186
8237
|
} catch {
|
|
8187
8238
|
return "";
|
|
8188
8239
|
}
|
|
8189
|
-
})(), f = () => z([...i, ...
|
|
8240
|
+
})(), f = () => z([...i, ...Es(l)]), p = async (e) => (await s([e]))[0] ?? !1;
|
|
8190
8241
|
return {
|
|
8191
8242
|
gate: async ({ operation: e, args: r, phase: a }) => {
|
|
8192
8243
|
t();
|
|
8193
8244
|
let m = F(e, r);
|
|
8194
8245
|
if (m === null) return;
|
|
8195
|
-
let h =
|
|
8246
|
+
let h = Fn(m);
|
|
8196
8247
|
if (h === void 0 || h === "auto") return;
|
|
8197
8248
|
if (e === "fetch") {
|
|
8198
|
-
let e =
|
|
8249
|
+
let e = Yn({
|
|
8199
8250
|
session: c,
|
|
8200
8251
|
declaredHosts: i,
|
|
8201
8252
|
approvedOrigins: l
|
|
@@ -8215,14 +8266,14 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8215
8266
|
if (await p({
|
|
8216
8267
|
category: "network",
|
|
8217
8268
|
hosts: n
|
|
8218
|
-
}) === !1) throw bt(
|
|
8269
|
+
}) === !1) throw bt(Ds("fetch", "network", t || null), "fetch");
|
|
8219
8270
|
return;
|
|
8220
8271
|
}
|
|
8221
8272
|
let g = await d();
|
|
8222
8273
|
if (!g) throw bt(`frame: navigate the frame before ${e}`, e);
|
|
8223
|
-
if (!f().includes(g)) throw bt(
|
|
8274
|
+
if (!f().includes(g)) throw bt(Cs, e);
|
|
8224
8275
|
if (!s) return;
|
|
8225
|
-
let _ =
|
|
8276
|
+
let _ = In(m);
|
|
8226
8277
|
if (_ === void 0 || h === "critical" && u.has(`${m} ${g}`)) return;
|
|
8227
8278
|
let v = z([g, ...i]), y = await p(h === "critical" ? {
|
|
8228
8279
|
key: m,
|
|
@@ -8232,7 +8283,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8232
8283
|
category: _,
|
|
8233
8284
|
hosts: v
|
|
8234
8285
|
});
|
|
8235
|
-
if (y === !1) throw bt(
|
|
8286
|
+
if (y === !1) throw bt(Ds(e, _, null), e);
|
|
8236
8287
|
if (y === "once" && a !== "ensure") for (let e of v) u.add(`${m} ${e}`);
|
|
8237
8288
|
},
|
|
8238
8289
|
requestCategories: async (e) => {
|
|
@@ -8243,8 +8294,8 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8243
8294
|
let t = e.key;
|
|
8244
8295
|
return {
|
|
8245
8296
|
named: t,
|
|
8246
|
-
critical: t !== void 0 &&
|
|
8247
|
-
category: e.category ?? (t === void 0 ? void 0 :
|
|
8297
|
+
critical: t !== void 0 && Fn(t) === "critical",
|
|
8298
|
+
category: e.category ?? (t === void 0 ? void 0 : Pn(t)) ?? "interaction"
|
|
8248
8299
|
};
|
|
8249
8300
|
}), c = ({ named: e, critical: t, category: n }, r) => ({
|
|
8250
8301
|
category: n,
|
|
@@ -8252,7 +8303,7 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8252
8303
|
hosts: a,
|
|
8253
8304
|
allow: r
|
|
8254
8305
|
});
|
|
8255
|
-
if (!s) return
|
|
8306
|
+
if (!s) return Ts(), o.map((e) => c(e, !1));
|
|
8256
8307
|
let l = await s(o.map(({ named: e, critical: t, category: r }) => t ? {
|
|
8257
8308
|
key: e,
|
|
8258
8309
|
hosts: a,
|
|
@@ -8264,15 +8315,188 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8264
8315
|
return o.map((e, t) => c(e, l[t] !== void 0 && l[t] !== !1));
|
|
8265
8316
|
}
|
|
8266
8317
|
};
|
|
8267
|
-
},
|
|
8268
|
-
let i = new URL("/attach-frame", Es());
|
|
8269
|
-
return e && i.searchParams.set("url", e), t && i.searchParams.set("session", t), n.length && i.searchParams.set("domains", n.join(",")), i.searchParams.set("attach", r), i.href;
|
|
8270
|
-
}, As = (e, t, n) => {
|
|
8318
|
+
}, ks = (e) => e, As = 5e3, js = /* @__PURE__ */ new Set([]), Ms = () => "https://fkn.app", Ns = (e) => e ? "" : `incognito-${crypto.randomUUID()}`, Ps = (e, t, n) => {
|
|
8271
8319
|
let r, i = new Promise((e, i) => {
|
|
8272
8320
|
r = setTimeout(() => i(Error(n)), t);
|
|
8273
8321
|
});
|
|
8274
8322
|
return Promise.race([e, i]).finally(() => clearTimeout(r));
|
|
8275
|
-
},
|
|
8323
|
+
}, Fs = (e) => Object.assign(Error(e), { name: pt }), Is = ({ control: e, target: t, session: n, declaredHosts: r, approvedOrigins: i, attach: a, assertLive: o, guard: s, consent: c, onNavigated: l }) => {
|
|
8324
|
+
let u = t, { gate: d, requestCategories: f } = Os({
|
|
8325
|
+
session: n,
|
|
8326
|
+
declaredHosts: r,
|
|
8327
|
+
approvedOrigins: i,
|
|
8328
|
+
attach: a,
|
|
8329
|
+
assertLive: o,
|
|
8330
|
+
documentHost: typeof e.documentHost == "function" ? () => s(() => e.documentHost()) : void 0,
|
|
8331
|
+
current: () => u,
|
|
8332
|
+
...c
|
|
8333
|
+
});
|
|
8334
|
+
return On({
|
|
8335
|
+
executor: {
|
|
8336
|
+
execute: (t, n, r) => js.has(n) ? Promise.reject(yt(n, "cloud")) : (o(), s(() => e.executeLocator(t, n, r))),
|
|
8337
|
+
highlight: async () => {}
|
|
8338
|
+
},
|
|
8339
|
+
gate: d,
|
|
8340
|
+
request: f,
|
|
8341
|
+
goto: async (t, n = {}) => {
|
|
8342
|
+
let r = new URL(t, location.href).href;
|
|
8343
|
+
o();
|
|
8344
|
+
let { timeoutMs: a } = n, c = (() => {
|
|
8345
|
+
try {
|
|
8346
|
+
return new URL(r).origin;
|
|
8347
|
+
} catch {
|
|
8348
|
+
return "";
|
|
8349
|
+
}
|
|
8350
|
+
})(), d = c !== "" && !i.has(c);
|
|
8351
|
+
d && i.add(c);
|
|
8352
|
+
try {
|
|
8353
|
+
await Ps(s(() => e.goto(r, n)), (a ?? 3e4) + As, "cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded");
|
|
8354
|
+
} catch (e) {
|
|
8355
|
+
throw d && i.delete(c), e;
|
|
8356
|
+
}
|
|
8357
|
+
u = r, l();
|
|
8358
|
+
},
|
|
8359
|
+
url: () => u
|
|
8360
|
+
});
|
|
8361
|
+
}, Ls = 250, Rs = 500, zs = 65e3, Bs = 2e3, Vs = 2e3, Hs = 2, Us = 2e3, Ws = 2e3, Gs = ({ origin: e, target: t, session: n, domains: r, attach: i }) => {
|
|
8362
|
+
let a = new URL("/attach-window", e);
|
|
8363
|
+
return a.searchParams.set("attach", i), t && a.searchParams.set("url", t), n && a.searchParams.set("session", n), r.length && a.searchParams.set("domains", r.join(",")), a.href;
|
|
8364
|
+
}, Ks = (e, t) => {
|
|
8365
|
+
let n = document.createElement("iframe"), r = new URL("/attach-jar", e);
|
|
8366
|
+
return r.searchParams.set("attach", t), n.src = r.href, n.tabIndex = -1, n.setAttribute("aria-hidden", "true"), n.setAttribute("style", "display:none"), (document.body ?? document.documentElement).appendChild(n), n;
|
|
8367
|
+
}, qs = (e, t) => {
|
|
8368
|
+
let n = new MutationObserver(() => {
|
|
8369
|
+
e.isConnected || t.aborted || (n.disconnect(), console.warn("cloud.attachFrame: the window's jar anchor was removed from this page, so a sign-in in the window no longer reaches this app's cookie jar"));
|
|
8370
|
+
});
|
|
8371
|
+
e.parentNode && n.observe(e.parentNode, { childList: !0 }), n.observe(document.documentElement, { childList: !0 }), t.addEventListener("abort", () => n.disconnect(), { once: !0 });
|
|
8372
|
+
}, Js = () => Fs("cloud.attachFrame: the attached window closed, reloaded or left the page FKN attached; attach a fresh window"), Ys = () => Fs("cloud.attachFrame: the attached window stopped answering; attach a fresh window"), Xs = () => Fs("cloud.attachFrame: the window went away before it connected; attach a fresh window"), Zs = () => Fs("cloud.attachFrame: the window closed before it connected. Either the user closed it, or this page's Cross-Origin-Opener-Policy cut its link to the window"), Qs = async (e) => {
|
|
8373
|
+
if (typeof window > "u") throw Error("cloud.attachFrame needs a window realm");
|
|
8374
|
+
let { domains: t = [], syncCookies: n = !0, permissions: r } = e, { url: i, width: a, height: o } = zn(e.window);
|
|
8375
|
+
if (window.origin === "null") throw new Dn("opaque-opener");
|
|
8376
|
+
let s = Ms(), c = crypto.randomUUID(), l = Ns(n), u = z(t), d = /* @__PURE__ */ new Set();
|
|
8377
|
+
i && d.add(new URL(i).origin);
|
|
8378
|
+
let p = n ? Ks(s, c) : null, m = window.open(Gs({
|
|
8379
|
+
origin: s,
|
|
8380
|
+
target: i,
|
|
8381
|
+
session: l,
|
|
8382
|
+
domains: u,
|
|
8383
|
+
attach: c
|
|
8384
|
+
}), "_blank", `popup,width=${a},height=${o}`);
|
|
8385
|
+
if (!m) throw p?.remove(), new Tn();
|
|
8386
|
+
let h = new AbortController(), g = !1, _ = null, v = (e, t = !1) => {
|
|
8387
|
+
if (_ === null) {
|
|
8388
|
+
_ = e, h.abort(t ? Ys() : Js());
|
|
8389
|
+
try {
|
|
8390
|
+
m.closed || m.postMessage({
|
|
8391
|
+
type: Qn.detach,
|
|
8392
|
+
attach: c,
|
|
8393
|
+
...t ? { unanswered: t } : {}
|
|
8394
|
+
}, s);
|
|
8395
|
+
} catch {}
|
|
8396
|
+
p && setTimeout(() => p.remove(), Ws);
|
|
8397
|
+
}
|
|
8398
|
+
};
|
|
8399
|
+
p && qs(p, h.signal);
|
|
8400
|
+
let y = new Promise((e, t) => {
|
|
8401
|
+
h.signal.addEventListener("abort", () => t(h.signal.reason), { once: !0 });
|
|
8402
|
+
});
|
|
8403
|
+
y.catch(() => {});
|
|
8404
|
+
let b = y.then(() => {}, () => {}), x = () => {
|
|
8405
|
+
if (h.signal.aborted) throw h.signal.reason;
|
|
8406
|
+
}, S = (e) => h.signal.aborted ? Promise.reject(h.signal.reason) : Promise.race([e(), y]), C = (e) => e.source === m && e.origin === s;
|
|
8407
|
+
window.addEventListener("message", (e) => {
|
|
8408
|
+
if (!C(e)) return;
|
|
8409
|
+
let t = e.data;
|
|
8410
|
+
typeof t == "object" && t && t.attach === c && (t.type === Qn.refused ? v(new Dn(t.reason)) : t.type === Qn.gone && v(g ? Js() : Xs()));
|
|
8411
|
+
}, { signal: h.signal }), window.addEventListener("pagehide", () => v(Js()), { signal: h.signal });
|
|
8412
|
+
let w = () => {
|
|
8413
|
+
try {
|
|
8414
|
+
m.postMessage({
|
|
8415
|
+
type: Qn.hello,
|
|
8416
|
+
attach: c
|
|
8417
|
+
}, s);
|
|
8418
|
+
} catch {}
|
|
8419
|
+
};
|
|
8420
|
+
w();
|
|
8421
|
+
let T = setInterval(w, Ls), E = setInterval(() => {
|
|
8422
|
+
m.closed && v(g ? Js() : Zs());
|
|
8423
|
+
}, Rs);
|
|
8424
|
+
h.signal.addEventListener("abort", () => {
|
|
8425
|
+
clearInterval(T), clearInterval(E);
|
|
8426
|
+
}, { once: !0 });
|
|
8427
|
+
let D = async (e) => {
|
|
8428
|
+
try {
|
|
8429
|
+
return await Promise.race([e, y]);
|
|
8430
|
+
} catch (e) {
|
|
8431
|
+
throw _ ?? e;
|
|
8432
|
+
}
|
|
8433
|
+
};
|
|
8434
|
+
try {
|
|
8435
|
+
let e = await D(Ps(f({}, {
|
|
8436
|
+
key: Zn,
|
|
8437
|
+
transport: {
|
|
8438
|
+
emit: (e, t) => m.postMessage(e, s, t ?? []),
|
|
8439
|
+
receive: (e) => {
|
|
8440
|
+
let t = (t) => {
|
|
8441
|
+
C(t) && e(t.data, {
|
|
8442
|
+
source: t.source,
|
|
8443
|
+
origin: t.origin
|
|
8444
|
+
});
|
|
8445
|
+
};
|
|
8446
|
+
return window.addEventListener("message", t), () => window.removeEventListener("message", t);
|
|
8447
|
+
}
|
|
8448
|
+
},
|
|
8449
|
+
unregisterSignal: h.signal,
|
|
8450
|
+
revivableModules: ks(Te)
|
|
8451
|
+
}), $n, "cloud.attachFrame: timed out connecting to the window"));
|
|
8452
|
+
g = !0, clearInterval(T);
|
|
8453
|
+
let t = 0, n = setInterval(() => {
|
|
8454
|
+
Ps(S(() => e.ping()), Vs, "ping").then(() => {
|
|
8455
|
+
t = 0;
|
|
8456
|
+
}, () => {
|
|
8457
|
+
h.signal.aborted || (document.visibilityState === "hidden" ? t = 0 : ++t >= Hs && v(Ys(), !0));
|
|
8458
|
+
});
|
|
8459
|
+
}, Bs);
|
|
8460
|
+
h.signal.addEventListener("abort", () => clearInterval(n), { once: !0 }), await D(Ps(e.ready(), zs, "cloud.attachFrame: the window never became ready"));
|
|
8461
|
+
let a = Hn("attached frame");
|
|
8462
|
+
h.signal.aborted ? a() : h.signal.addEventListener("abort", a, { once: !0 });
|
|
8463
|
+
let o = Is({
|
|
8464
|
+
control: e,
|
|
8465
|
+
target: i,
|
|
8466
|
+
session: l,
|
|
8467
|
+
declaredHosts: u,
|
|
8468
|
+
approvedOrigins: d,
|
|
8469
|
+
attach: c,
|
|
8470
|
+
assertLive: x,
|
|
8471
|
+
guard: S,
|
|
8472
|
+
consent: {
|
|
8473
|
+
request: (t) => S(() => e.requestConsent(t)),
|
|
8474
|
+
ensure: (t) => S(() => e.requestConsent([t])).then(([e]) => e !== void 0 && e !== !1)
|
|
8475
|
+
},
|
|
8476
|
+
onNavigated: () => {}
|
|
8477
|
+
}), p = null, _ = () => p ??= (async () => {
|
|
8478
|
+
h.signal.aborted || await Ps(Promise.allSettled([S(() => e.flushCookies()), S(() => e.sweepStorage())]), Us, "close").catch(() => {});
|
|
8479
|
+
try {
|
|
8480
|
+
m.close();
|
|
8481
|
+
} catch {}
|
|
8482
|
+
v(Js());
|
|
8483
|
+
})(), y = {
|
|
8484
|
+
...o,
|
|
8485
|
+
close: _,
|
|
8486
|
+
closed: b
|
|
8487
|
+
};
|
|
8488
|
+
return r?.length && await D(y.request(r)), y;
|
|
8489
|
+
} catch (e) {
|
|
8490
|
+
let t = _ ?? e;
|
|
8491
|
+
if (!(t instanceof Dn)) try {
|
|
8492
|
+
m.close();
|
|
8493
|
+
} catch {}
|
|
8494
|
+
throw v(t), t;
|
|
8495
|
+
}
|
|
8496
|
+
}, $s = "autoplay; fullscreen; encrypted-media; picture-in-picture; clipboard-read; clipboard-write", ec = 2e4, tc = 65e3, nc = (e) => !e || e === "about:blank", rc = ({ target: e, session: t, domains: n, attach: r }) => {
|
|
8497
|
+
let i = new URL("/attach-frame", Ms());
|
|
8498
|
+
return e && i.searchParams.set("url", e), t && i.searchParams.set("session", t), n.length && i.searchParams.set("domains", n.join(",")), i.searchParams.set("attach", r), i.href;
|
|
8499
|
+
}, ic = (e, t) => {
|
|
8276
8500
|
let n = () => {
|
|
8277
8501
|
a(), t();
|
|
8278
8502
|
}, r = e.parentNode, i = new MutationObserver(() => {
|
|
@@ -8281,14 +8505,14 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8281
8505
|
window.removeEventListener("pagehide", n), i.disconnect();
|
|
8282
8506
|
};
|
|
8283
8507
|
window.addEventListener("pagehide", n, { once: !0 }), r && i.observe(r, { childList: !0 }), e.isConnected || (a(), t());
|
|
8284
|
-
},
|
|
8508
|
+
}, ac = () => Fs("cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe"), oc = (e, t) => {
|
|
8285
8509
|
let n = [...e.split(";"), ...t.split(";")].map((e) => e.trim()).filter(Boolean);
|
|
8286
8510
|
return [...new Set(n)].join("; ");
|
|
8287
|
-
},
|
|
8511
|
+
}, sc = [
|
|
8288
8512
|
300,
|
|
8289
8513
|
1200,
|
|
8290
8514
|
4e3
|
|
8291
|
-
],
|
|
8515
|
+
], cc = (e) => {
|
|
8292
8516
|
let t = () => {
|
|
8293
8517
|
if (!e.isConnected) return;
|
|
8294
8518
|
let t = e.style.height, n = e.getBoundingClientRect();
|
|
@@ -8297,19 +8521,19 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8297
8521
|
}, 50));
|
|
8298
8522
|
};
|
|
8299
8523
|
t();
|
|
8300
|
-
for (let e of
|
|
8301
|
-
},
|
|
8524
|
+
for (let e of sc) setTimeout(t, e);
|
|
8525
|
+
}, lc = (e) => {
|
|
8302
8526
|
let t = e.getAttribute("sandbox");
|
|
8303
8527
|
if (t === null) return;
|
|
8304
8528
|
let n = new Set(t.toLowerCase().split(/\s+/).filter(Boolean)), r = ["allow-scripts", "allow-same-origin"].filter((e) => !n.has(e));
|
|
8305
8529
|
if (r.length) throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(" and ")} for the render proxy to load`);
|
|
8306
|
-
},
|
|
8530
|
+
}, uc = async ({ iframe: e, domains: t = [], syncCookies: n = !0, lockdown: r = !1, permissions: i }) => {
|
|
8307
8531
|
if (typeof window > "u") throw Error("cloud.attachFrame needs a window realm");
|
|
8308
8532
|
if (r) throw Error("cloud.attachFrame does not support lockdown; use the extension backend for a sealed frame");
|
|
8309
8533
|
if (!e.isConnected) throw Error("cloud.attachFrame: the iframe must be connected to the document before attaching");
|
|
8310
|
-
|
|
8534
|
+
lc(e);
|
|
8311
8535
|
let a = e.getAttribute("src") ?? "", o = (() => {
|
|
8312
|
-
if (
|
|
8536
|
+
if (nc(a)) return null;
|
|
8313
8537
|
try {
|
|
8314
8538
|
return new URL(e.src || a, location.href);
|
|
8315
8539
|
} catch {
|
|
@@ -8317,79 +8541,55 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8317
8541
|
}
|
|
8318
8542
|
})();
|
|
8319
8543
|
if (o) {
|
|
8320
|
-
let e = new URL("/attach-frame",
|
|
8544
|
+
let e = new URL("/attach-frame", Ms());
|
|
8321
8545
|
if (o.origin === e.origin && o.pathname === e.pathname) throw Error("cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe");
|
|
8322
8546
|
}
|
|
8323
8547
|
let s = o?.href ?? "";
|
|
8324
8548
|
s && Sn(s);
|
|
8325
|
-
let c =
|
|
8549
|
+
let c = Ns(n), l = z(t), u = /* @__PURE__ */ new Set();
|
|
8326
8550
|
try {
|
|
8327
|
-
|
|
8551
|
+
u.add(new URL(s).origin);
|
|
8328
8552
|
} catch {}
|
|
8329
|
-
let
|
|
8330
|
-
if (e.referrerPolicy = "origin", e.allow =
|
|
8553
|
+
let d = new AbortController(), p = e.referrerPolicy, m = e.allow, h = crypto.randomUUID();
|
|
8554
|
+
if (e.referrerPolicy = "origin", e.allow = oc($s, e.allow), e.src = rc({
|
|
8331
8555
|
target: s,
|
|
8332
|
-
session:
|
|
8333
|
-
domains:
|
|
8334
|
-
attach:
|
|
8556
|
+
session: c,
|
|
8557
|
+
domains: l,
|
|
8558
|
+
attach: h
|
|
8335
8559
|
}), !e.contentWindow) throw Error("cloud.attachFrame: the iframe window is not available");
|
|
8336
8560
|
try {
|
|
8337
|
-
let t = await
|
|
8338
|
-
key:
|
|
8339
|
-
origin:
|
|
8561
|
+
let t = await Ps(f({}, {
|
|
8562
|
+
key: Xn,
|
|
8563
|
+
origin: Ms(),
|
|
8340
8564
|
transport: {
|
|
8341
8565
|
receive: window,
|
|
8342
8566
|
emit: e.contentWindow
|
|
8343
8567
|
},
|
|
8344
|
-
unregisterSignal:
|
|
8345
|
-
revivableModules:
|
|
8346
|
-
}),
|
|
8347
|
-
await
|
|
8348
|
-
let n =
|
|
8349
|
-
|
|
8350
|
-
let r = e.contentWindow, a = (
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
session:
|
|
8354
|
-
declaredHosts:
|
|
8355
|
-
approvedOrigins:
|
|
8356
|
-
attach:
|
|
8357
|
-
assertLive:
|
|
8358
|
-
|
|
8359
|
-
current: () => c,
|
|
8360
|
-
...await fs()
|
|
8361
|
-
}), h = Tn({
|
|
8362
|
-
executor: {
|
|
8363
|
-
execute: (e, n, r) => Ts.has(n) ? Promise.reject(yt(n, "cloud")) : (a(), t.executeLocator(e, n, r)),
|
|
8364
|
-
highlight: async () => {}
|
|
8365
|
-
},
|
|
8366
|
-
gate: o,
|
|
8367
|
-
request: m,
|
|
8368
|
-
goto: async (n, r = {}) => {
|
|
8369
|
-
let i = new URL(n, location.href).href;
|
|
8370
|
-
a();
|
|
8371
|
-
let { timeoutMs: o } = r, s = (() => {
|
|
8372
|
-
try {
|
|
8373
|
-
return new URL(i).origin;
|
|
8374
|
-
} catch {
|
|
8375
|
-
return "";
|
|
8376
|
-
}
|
|
8377
|
-
})(), l = s !== "" && !d.has(s);
|
|
8378
|
-
l && d.add(s);
|
|
8379
|
-
try {
|
|
8380
|
-
await As(t.goto(i, r), (o ?? Cs) + ws, "cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded");
|
|
8381
|
-
} catch (e) {
|
|
8382
|
-
throw l && d.delete(s), e;
|
|
8383
|
-
}
|
|
8384
|
-
c = i, Fs(e);
|
|
8568
|
+
unregisterSignal: d.signal,
|
|
8569
|
+
revivableModules: ks(Te)
|
|
8570
|
+
}), ec, "cloud.attachFrame: timed out connecting to the render proxy page");
|
|
8571
|
+
await Ps(t.ready(), tc, "cloud.attachFrame: the render proxy never became ready"), s && cc(e), ic(e, () => d.abort());
|
|
8572
|
+
let n = Hn("attached frame");
|
|
8573
|
+
d.signal.aborted ? n() : d.signal.addEventListener("abort", n, { once: !0 });
|
|
8574
|
+
let r = e.contentWindow, a = Is({
|
|
8575
|
+
control: t,
|
|
8576
|
+
target: s,
|
|
8577
|
+
session: c,
|
|
8578
|
+
declaredHosts: l,
|
|
8579
|
+
approvedOrigins: u,
|
|
8580
|
+
attach: h,
|
|
8581
|
+
assertLive: () => {
|
|
8582
|
+
if (d.signal.aborted || !e.isConnected || e.contentWindow !== r) throw d.abort(), ac();
|
|
8385
8583
|
},
|
|
8386
|
-
|
|
8584
|
+
guard: (e) => e(),
|
|
8585
|
+
consent: await Ss(),
|
|
8586
|
+
onNavigated: () => cc(e)
|
|
8387
8587
|
});
|
|
8388
|
-
return i?.length && await
|
|
8588
|
+
return i?.length && await a.request(i), a;
|
|
8389
8589
|
} catch (t) {
|
|
8390
|
-
throw
|
|
8590
|
+
throw d.abort(), e.referrerPolicy = p, e.allow = m, e.src = s || "about:blank", t;
|
|
8391
8591
|
}
|
|
8392
|
-
},
|
|
8592
|
+
}, dc = (async (e) => Ln(e) === "window" ? Qs(e) : uc(e)), fc = async () => {
|
|
8393
8593
|
let e = await c.then((e) => e.cloud.quota());
|
|
8394
8594
|
return {
|
|
8395
8595
|
premium: e.premium,
|
|
@@ -8401,17 +8601,17 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8401
8601
|
bytesPerSecond: e.bytesPerSecond,
|
|
8402
8602
|
bitsPerSecond: e.bytesPerSecond * 8
|
|
8403
8603
|
};
|
|
8404
|
-
},
|
|
8405
|
-
attachFrame: () =>
|
|
8406
|
-
available: () =>
|
|
8407
|
-
dgram: () =>
|
|
8408
|
-
dns: () =>
|
|
8409
|
-
fetch: () =>
|
|
8410
|
-
fs: () =>
|
|
8411
|
-
http: () =>
|
|
8412
|
-
net: () =>
|
|
8413
|
-
quota: () =>
|
|
8414
|
-
}),
|
|
8604
|
+
}, pc = /* @__PURE__ */ g({
|
|
8605
|
+
attachFrame: () => dc,
|
|
8606
|
+
available: () => mc,
|
|
8607
|
+
dgram: () => Vo,
|
|
8608
|
+
dns: () => er,
|
|
8609
|
+
fetch: () => Jn,
|
|
8610
|
+
fs: () => yi,
|
|
8611
|
+
http: () => Xo,
|
|
8612
|
+
net: () => Po,
|
|
8613
|
+
quota: () => fc
|
|
8614
|
+
}), mc = () => i, hc = async (e) => {
|
|
8415
8615
|
if (typeof window > "u") return !1;
|
|
8416
8616
|
if (Le()) return !0;
|
|
8417
8617
|
let t = await c, n = null, r = new Promise((e) => {
|
|
@@ -8420,47 +8620,47 @@ var Bo = /* @__PURE__ */ g({
|
|
|
8420
8620
|
}, Ie.addEventListener("statuschange", n);
|
|
8421
8621
|
}), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
|
|
8422
8622
|
return n && Ie.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
|
|
8423
|
-
},
|
|
8424
|
-
Be(() => (
|
|
8425
|
-
|
|
8426
|
-
}),
|
|
8623
|
+
}, gc = null;
|
|
8624
|
+
Be(() => (gc ||= hc().then(() => void 0).finally(() => {
|
|
8625
|
+
gc = null;
|
|
8626
|
+
}), gc));
|
|
8427
8627
|
//#endregion
|
|
8428
8628
|
//#region node_modules/@fkn/lib/opfs-D0goLAQW.js
|
|
8429
|
-
var
|
|
8430
|
-
available: () =>
|
|
8431
|
-
list: () =>
|
|
8432
|
-
readFile: () =>
|
|
8433
|
-
remove: () =>
|
|
8434
|
-
writeFile: () =>
|
|
8435
|
-
}),
|
|
8629
|
+
var _c = /* @__PURE__ */ g({
|
|
8630
|
+
available: () => xc,
|
|
8631
|
+
list: () => Tc,
|
|
8632
|
+
readFile: () => Cc,
|
|
8633
|
+
remove: () => wc,
|
|
8634
|
+
writeFile: () => Sc
|
|
8635
|
+
}), vc = () => navigator.storage.getDirectory(), yc = (e) => {
|
|
8436
8636
|
let t = e.split("/").filter((e) => e && e !== ".");
|
|
8437
8637
|
if (t.some((e) => e === "..") || !t.length) throw Error("opfs: invalid path");
|
|
8438
8638
|
return t;
|
|
8439
|
-
},
|
|
8440
|
-
let n = await
|
|
8639
|
+
}, bc = async (e, t) => {
|
|
8640
|
+
let n = await vc();
|
|
8441
8641
|
for (let r of e) n = await n.getDirectoryHandle(r, { create: t });
|
|
8442
8642
|
return n;
|
|
8443
|
-
},
|
|
8643
|
+
}, xc = async () => {
|
|
8444
8644
|
try {
|
|
8445
|
-
return typeof navigator < "u" && !!navigator.storage?.getDirectory && !!await
|
|
8645
|
+
return typeof navigator < "u" && !!navigator.storage?.getDirectory && !!await vc();
|
|
8446
8646
|
} catch {
|
|
8447
8647
|
return !1;
|
|
8448
8648
|
}
|
|
8449
|
-
},
|
|
8450
|
-
let r =
|
|
8649
|
+
}, Sc = async (e, t, n) => {
|
|
8650
|
+
let r = yc(e), i = r.pop(), a = await (await (await bc(r, !0)).getFileHandle(i, { create: !0 })).createWritable({ keepExistingData: !1 });
|
|
8451
8651
|
try {
|
|
8452
8652
|
let e = t instanceof Blob ? t : new Blob([t], n?.contentType ? { type: n.contentType } : void 0);
|
|
8453
8653
|
await a.write(e);
|
|
8454
8654
|
} finally {
|
|
8455
8655
|
await a.close();
|
|
8456
8656
|
}
|
|
8457
|
-
},
|
|
8458
|
-
let t =
|
|
8459
|
-
return (await (await
|
|
8460
|
-
},
|
|
8461
|
-
let t =
|
|
8462
|
-
await (await
|
|
8463
|
-
},
|
|
8657
|
+
}, Cc = async (e) => {
|
|
8658
|
+
let t = yc(e), n = t.pop();
|
|
8659
|
+
return (await (await bc(t, !1)).getFileHandle(n)).getFile();
|
|
8660
|
+
}, wc = async (e) => {
|
|
8661
|
+
let t = yc(e), n = t.pop();
|
|
8662
|
+
await (await bc(t, !1)).removeEntry(n, { recursive: !0 });
|
|
8663
|
+
}, Tc = async () => {
|
|
8464
8664
|
let e = [], t = async (n, r) => {
|
|
8465
8665
|
for await (let [i, a] of n.entries()) {
|
|
8466
8666
|
let n = r ? `${r}/${i}` : i;
|
|
@@ -8475,22 +8675,22 @@ var Us = /* @__PURE__ */ g({
|
|
|
8475
8675
|
} else await t(a, n);
|
|
8476
8676
|
}
|
|
8477
8677
|
};
|
|
8478
|
-
return await t(await
|
|
8479
|
-
},
|
|
8480
|
-
adopt: () =>
|
|
8481
|
-
adoptable: () =>
|
|
8482
|
-
available: () =>
|
|
8483
|
-
list: () =>
|
|
8484
|
-
onConflict: () =>
|
|
8485
|
-
pending: () =>
|
|
8486
|
-
pendingDeletes: () =>
|
|
8487
|
-
pull: () =>
|
|
8488
|
-
readFile: () =>
|
|
8489
|
-
readFileSealed: () =>
|
|
8490
|
-
remove: () =>
|
|
8491
|
-
replicating: () =>
|
|
8492
|
-
writeFile: () =>
|
|
8493
|
-
}),
|
|
8678
|
+
return await t(await vc(), ""), e;
|
|
8679
|
+
}, Ec = /* @__PURE__ */ g({
|
|
8680
|
+
adopt: () => hl,
|
|
8681
|
+
adoptable: () => gl,
|
|
8682
|
+
available: () => jc,
|
|
8683
|
+
list: () => il,
|
|
8684
|
+
onConflict: () => dl,
|
|
8685
|
+
pending: () => Gc,
|
|
8686
|
+
pendingDeletes: () => Kc,
|
|
8687
|
+
pull: () => ll,
|
|
8688
|
+
readFile: () => al,
|
|
8689
|
+
readFileSealed: () => ol,
|
|
8690
|
+
remove: () => cl,
|
|
8691
|
+
replicating: () => qc,
|
|
8692
|
+
writeFile: () => sl
|
|
8693
|
+
}), Dc, Oc = async () => await (Dc ??= xc().catch(() => !1)) ? !0 : (Dc = void 0, !1), kc = () => li().catch(() => "unknown"), Ac = async () => await kc() === "connected", jc = async () => await Oc() || await Ac(), Mc = "fkn:fs:pending", Nc = "fkn:fs:pending-delete", Pc = "fkn:fs:adopt-declined", Fc = !0, Ic = /* @__PURE__ */ new Map(), Lc = (e) => {
|
|
8494
8694
|
try {
|
|
8495
8695
|
let t = localStorage.getItem(e);
|
|
8496
8696
|
if (!t) return {};
|
|
@@ -8499,43 +8699,43 @@ var Us = /* @__PURE__ */ g({
|
|
|
8499
8699
|
} catch {
|
|
8500
8700
|
return {};
|
|
8501
8701
|
}
|
|
8502
|
-
},
|
|
8702
|
+
}, Rc = (e, t) => {
|
|
8503
8703
|
try {
|
|
8504
8704
|
Object.keys(t).length ? localStorage.setItem(e, JSON.stringify(t)) : localStorage.removeItem(e);
|
|
8505
8705
|
} catch {}
|
|
8506
|
-
},
|
|
8507
|
-
let n =
|
|
8508
|
-
e in n || (n[e] = t === void 0 ?
|
|
8509
|
-
},
|
|
8510
|
-
let t =
|
|
8511
|
-
e in t && (delete t[e],
|
|
8512
|
-
},
|
|
8513
|
-
let t =
|
|
8514
|
-
e in t || (t[e] =
|
|
8515
|
-
},
|
|
8516
|
-
let t =
|
|
8517
|
-
e in t && (delete t[e],
|
|
8518
|
-
},
|
|
8519
|
-
|
|
8520
|
-
var
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
},
|
|
8524
|
-
},
|
|
8525
|
-
|
|
8526
|
-
if (!
|
|
8527
|
-
|
|
8706
|
+
}, zc = () => Lc(Mc), Bc = (e, t) => {
|
|
8707
|
+
let n = zc();
|
|
8708
|
+
e in n || (n[e] = t === void 0 ? Ic.get(e) ?? null : t, Rc(Mc, n));
|
|
8709
|
+
}, Vc = (e) => {
|
|
8710
|
+
let t = zc();
|
|
8711
|
+
e in t && (delete t[e], Rc(Mc, t), Yc() || (Qc = Xc));
|
|
8712
|
+
}, Hc = () => Lc(Nc), Uc = (e) => {
|
|
8713
|
+
let t = Hc();
|
|
8714
|
+
e in t || (t[e] = Ic.get(e) ?? null, Rc(Nc, t));
|
|
8715
|
+
}, Wc = (e) => {
|
|
8716
|
+
let t = Hc();
|
|
8717
|
+
e in t && (delete t[e], Rc(Nc, t), Yc() || (Qc = Xc));
|
|
8718
|
+
}, Gc = () => Object.keys(zc()), Kc = () => Object.keys(Hc()), qc = () => Fc, Jc = null;
|
|
8719
|
+
Un("storage replication", () => Jc !== null || yl !== null);
|
|
8720
|
+
var Yc = () => Object.keys(zc()).length > 0 || Object.keys(Hc()).length > 0, Xc = 6e4, Zc = 6e5, Qc = Xc, $c = null, el = () => {
|
|
8721
|
+
!$c && typeof window < "u" && Yc() && ($c = setTimeout(() => {
|
|
8722
|
+
$c = null, tl();
|
|
8723
|
+
}, Qc), Qc = Math.min(Qc * 2, Zc));
|
|
8724
|
+
}, tl = () => {
|
|
8725
|
+
!Jc && Yc() && (Jc = ml(!1).then((e) => {
|
|
8726
|
+
if (!Yc()) {
|
|
8727
|
+
Qc = Xc;
|
|
8528
8728
|
return;
|
|
8529
8729
|
}
|
|
8530
|
-
e.failed.length &&
|
|
8730
|
+
e.failed.length && el();
|
|
8531
8731
|
}).catch(() => {
|
|
8532
|
-
|
|
8732
|
+
el();
|
|
8533
8733
|
}).finally(() => {
|
|
8534
|
-
|
|
8734
|
+
Jc = null;
|
|
8535
8735
|
}));
|
|
8536
|
-
},
|
|
8537
|
-
|
|
8538
|
-
let e = await
|
|
8736
|
+
}, nl = null, rl = () => nl ??= import("./lib-api-BdPC6S5P.js").then((e) => e.apiPromise), il = async () => {
|
|
8737
|
+
Tl();
|
|
8738
|
+
let e = await kc(), t = e === "connected", [n, r] = await Promise.all([Oc().then((e) => e ? Tc() : []).catch(() => []), t ? ui().then((e) => ({
|
|
8539
8739
|
ok: !0,
|
|
8540
8740
|
entries: e
|
|
8541
8741
|
})).catch(() => ({
|
|
@@ -8545,7 +8745,7 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8545
8745
|
ok: e === "disconnected",
|
|
8546
8746
|
entries: []
|
|
8547
8747
|
})]);
|
|
8548
|
-
e !== "unknown" && (
|
|
8748
|
+
e !== "unknown" && (Fc = r.ok), r.ok && e !== "unknown" && (Ic = new Map(r.entries.map((e) => [e.path, e.updatedAt])));
|
|
8549
8749
|
let i = /* @__PURE__ */ new Map(), a = (e) => {
|
|
8550
8750
|
let t = Date.parse(e.updatedAt ?? "");
|
|
8551
8751
|
return Number.isFinite(t) ? t : 0;
|
|
@@ -8555,21 +8755,21 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8555
8755
|
};
|
|
8556
8756
|
for (let e of n) o(e);
|
|
8557
8757
|
for (let e of r.entries) o(e);
|
|
8558
|
-
return r.ok && t && (
|
|
8758
|
+
return r.ok && t && (Cl(n, r.entries).catch(() => {}), Yc() ? tl() : bl({
|
|
8559
8759
|
local: n,
|
|
8560
8760
|
remote: r.entries
|
|
8561
8761
|
}).catch(() => {})), [...i.values()];
|
|
8562
|
-
},
|
|
8563
|
-
if (await
|
|
8564
|
-
return await
|
|
8762
|
+
}, al = async (e) => {
|
|
8763
|
+
if (await Oc()) try {
|
|
8764
|
+
return await Cc(e);
|
|
8565
8765
|
} catch (e) {
|
|
8566
8766
|
if (e?.name !== "NotFoundError") throw e;
|
|
8567
8767
|
}
|
|
8568
|
-
let t = await
|
|
8569
|
-
return await
|
|
8570
|
-
},
|
|
8571
|
-
if (await
|
|
8572
|
-
let t = await
|
|
8768
|
+
let t = await fi(e);
|
|
8769
|
+
return await Oc() && Sc(e, t).catch(() => {}), t;
|
|
8770
|
+
}, ol = async (e) => {
|
|
8771
|
+
if (await Oc()) try {
|
|
8772
|
+
let t = await Cc(e);
|
|
8573
8773
|
return {
|
|
8574
8774
|
data: new Uint8Array(await t.arrayBuffer()),
|
|
8575
8775
|
sealedAt: null
|
|
@@ -8577,54 +8777,54 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8577
8777
|
} catch (e) {
|
|
8578
8778
|
if (e?.name !== "NotFoundError") throw e;
|
|
8579
8779
|
}
|
|
8580
|
-
return
|
|
8581
|
-
},
|
|
8780
|
+
return mi(e);
|
|
8781
|
+
}, sl = async (e, t, n) => {
|
|
8582
8782
|
let r = t instanceof Blob ? t : new Blob([t], n?.contentType ? { type: n.contentType } : void 0);
|
|
8583
|
-
if (await
|
|
8584
|
-
await
|
|
8585
|
-
let t =
|
|
8783
|
+
if (await Oc()) {
|
|
8784
|
+
await Sc(e, r, n), Tl();
|
|
8785
|
+
let t = Ic.get(e) ?? null, i = await kc();
|
|
8586
8786
|
if (i === "disconnected") return;
|
|
8587
|
-
if (i === "unknown" || !
|
|
8588
|
-
|
|
8787
|
+
if (i === "unknown" || !Fc) {
|
|
8788
|
+
Bc(e, t), el();
|
|
8589
8789
|
return;
|
|
8590
8790
|
}
|
|
8591
|
-
|
|
8592
|
-
|
|
8791
|
+
hi(e, r, n).then(() => Vc(e)).catch((n) => {
|
|
8792
|
+
Bc(e, t), el(), console.warn("fs: cloud replicate failed, queued for adopt()", n);
|
|
8593
8793
|
});
|
|
8594
8794
|
return;
|
|
8595
8795
|
}
|
|
8596
|
-
let i = await
|
|
8597
|
-
if (i === "connected") return
|
|
8796
|
+
let i = await kc();
|
|
8797
|
+
if (i === "connected") return hi(e, r, n);
|
|
8598
8798
|
throw Error(i === "unknown" ? "fs: cloud unreachable" : "fs: no storage backend available");
|
|
8599
|
-
},
|
|
8600
|
-
|
|
8799
|
+
}, cl = async (e) => {
|
|
8800
|
+
Tl();
|
|
8601
8801
|
let t = [];
|
|
8602
|
-
await
|
|
8603
|
-
let n = await
|
|
8604
|
-
if (n === "connected" ? t.push(
|
|
8605
|
-
|
|
8606
|
-
})) : n === "unknown" && t.length &&
|
|
8607
|
-
|
|
8608
|
-
},
|
|
8609
|
-
let t = await
|
|
8610
|
-
return await
|
|
8611
|
-
},
|
|
8612
|
-
|
|
8613
|
-
}),
|
|
8614
|
-
let t = await (await
|
|
8802
|
+
await Oc() && t.push(wc(e).catch(() => {}));
|
|
8803
|
+
let n = await kc();
|
|
8804
|
+
if (n === "connected" ? t.push(gi(e).then(() => Wc(e)).catch((t) => {
|
|
8805
|
+
Uc(e), el(), console.warn("fs: cloud delete failed, queued for retry", t);
|
|
8806
|
+
})) : n === "unknown" && t.length && Ic.has(e) && (Uc(e), el()), !t.length) throw Error(n === "unknown" ? "fs: cloud unreachable" : "fs: no storage backend available");
|
|
8807
|
+
Vc(e), await Promise.all(t);
|
|
8808
|
+
}, ll = async (e) => {
|
|
8809
|
+
let t = await fi(e);
|
|
8810
|
+
return await Oc() && await Sc(e, t), t;
|
|
8811
|
+
}, ul = null, dl = (e) => (ul = e, () => {
|
|
8812
|
+
ul === e && (ul = null);
|
|
8813
|
+
}), fl = async (e) => {
|
|
8814
|
+
let t = await (await rl()).cloud.fs.promptConflict({
|
|
8615
8815
|
path: e.path,
|
|
8616
8816
|
local: e.local,
|
|
8617
8817
|
cloud: e.cloud
|
|
8618
8818
|
}).catch(() => null);
|
|
8619
8819
|
return t === "local" ? e.readLocal() : t === "cloud" ? e.readCloud() : null;
|
|
8620
|
-
},
|
|
8621
|
-
if (
|
|
8622
|
-
return await
|
|
8820
|
+
}, pl = async (e) => {
|
|
8821
|
+
if (ul) try {
|
|
8822
|
+
return await ul(e);
|
|
8623
8823
|
} catch {
|
|
8624
8824
|
return null;
|
|
8625
8825
|
}
|
|
8626
|
-
return
|
|
8627
|
-
},
|
|
8826
|
+
return fl(e);
|
|
8827
|
+
}, ml = async (e) => {
|
|
8628
8828
|
let t = {
|
|
8629
8829
|
uploaded: [],
|
|
8630
8830
|
kept: [],
|
|
@@ -8632,27 +8832,27 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8632
8832
|
unresolved: [],
|
|
8633
8833
|
deleted: [],
|
|
8634
8834
|
failed: []
|
|
8635
|
-
}, n = await
|
|
8835
|
+
}, n = await kc();
|
|
8636
8836
|
if (n === "unknown") throw Error("fs: cloud unreachable");
|
|
8637
8837
|
if (n !== "connected") throw Error("fs: this needs a signed-in account");
|
|
8638
|
-
let r = await
|
|
8639
|
-
if (r) for (let e of Object.keys(s)) i.some((t) => t.path === e) ||
|
|
8640
|
-
for (let [e, n] of Object.entries(
|
|
8838
|
+
let r = await Oc(), [i, a] = await Promise.all([r ? Tc() : Promise.resolve([]), ui()]), o = new Map(a.map((e) => [e.path, e])), s = zc();
|
|
8839
|
+
if (r) for (let e of Object.keys(s)) i.some((t) => t.path === e) || Vc(e);
|
|
8840
|
+
for (let [e, n] of Object.entries(Hc())) {
|
|
8641
8841
|
let r = o.get(e);
|
|
8642
8842
|
if (!r) {
|
|
8643
|
-
|
|
8843
|
+
Wc(e);
|
|
8644
8844
|
continue;
|
|
8645
8845
|
}
|
|
8646
8846
|
if (i.some((t) => t.path === e)) {
|
|
8647
|
-
|
|
8847
|
+
Wc(e);
|
|
8648
8848
|
continue;
|
|
8649
8849
|
}
|
|
8650
8850
|
if (r.updatedAt !== n) {
|
|
8651
|
-
|
|
8851
|
+
Wc(e);
|
|
8652
8852
|
continue;
|
|
8653
8853
|
}
|
|
8654
8854
|
try {
|
|
8655
|
-
await
|
|
8855
|
+
await gi(e), Wc(e), t.deleted.push(e);
|
|
8656
8856
|
} catch (n) {
|
|
8657
8857
|
t.failed.push({
|
|
8658
8858
|
path: e,
|
|
@@ -8667,7 +8867,7 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8667
8867
|
continue;
|
|
8668
8868
|
}
|
|
8669
8869
|
if (i && r && r.updatedAt !== s[n.path]) {
|
|
8670
|
-
let e = null, i = null, a = await
|
|
8870
|
+
let e = null, i = null, a = await pl({
|
|
8671
8871
|
path: n.path,
|
|
8672
8872
|
local: {
|
|
8673
8873
|
size: n.size,
|
|
@@ -8677,8 +8877,8 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8677
8877
|
size: r.size,
|
|
8678
8878
|
updatedAt: r.updatedAt
|
|
8679
8879
|
},
|
|
8680
|
-
readLocal: () => e ??=
|
|
8681
|
-
readCloud: () => i ??=
|
|
8880
|
+
readLocal: () => e ??= Cc(n.path),
|
|
8881
|
+
readCloud: () => i ??= fi(n.path)
|
|
8682
8882
|
});
|
|
8683
8883
|
if (a == null) {
|
|
8684
8884
|
t.unresolved.push(n.path);
|
|
@@ -8686,7 +8886,7 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8686
8886
|
}
|
|
8687
8887
|
try {
|
|
8688
8888
|
let r = e !== null && a === await e, o = i !== null && a === await i;
|
|
8689
|
-
o || await
|
|
8889
|
+
o || await hi(n.path, a, n.contentType ? { contentType: n.contentType } : void 0), r || await Sc(n.path, a), Vc(n.path), t.resolved.push({
|
|
8690
8890
|
path: n.path,
|
|
8691
8891
|
choice: r ? "local" : o ? "cloud" : "merged"
|
|
8692
8892
|
});
|
|
@@ -8700,10 +8900,10 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8700
8900
|
continue;
|
|
8701
8901
|
}
|
|
8702
8902
|
try {
|
|
8703
|
-
let e = await
|
|
8704
|
-
await
|
|
8903
|
+
let e = await Cc(n.path);
|
|
8904
|
+
await hi(n.path, e, n.contentType ? { contentType: n.contentType } : void 0), Vc(n.path), t.uploaded.push(n.path);
|
|
8705
8905
|
} catch (e) {
|
|
8706
|
-
if (
|
|
8906
|
+
if (Bc(n.path), e?.code === "FKN_E2E_LOCKED") throw e;
|
|
8707
8907
|
t.failed.push({
|
|
8708
8908
|
path: n.path,
|
|
8709
8909
|
error: e instanceof Error ? e.message : String(e)
|
|
@@ -8711,53 +8911,53 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8711
8911
|
}
|
|
8712
8912
|
}
|
|
8713
8913
|
return t;
|
|
8714
|
-
},
|
|
8715
|
-
for (;
|
|
8716
|
-
let e =
|
|
8717
|
-
|
|
8914
|
+
}, hl = async () => {
|
|
8915
|
+
for (; Jc;) await Jc;
|
|
8916
|
+
let e = ml(!0);
|
|
8917
|
+
Jc = e.then(() => {}, () => {});
|
|
8718
8918
|
try {
|
|
8719
8919
|
return await e;
|
|
8720
8920
|
} finally {
|
|
8721
|
-
|
|
8921
|
+
Jc = null;
|
|
8722
8922
|
}
|
|
8723
|
-
},
|
|
8724
|
-
if (!await
|
|
8923
|
+
}, gl = async () => {
|
|
8924
|
+
if (!await Ac() || !await Oc()) return {
|
|
8725
8925
|
paths: [],
|
|
8726
8926
|
bytes: 0
|
|
8727
8927
|
};
|
|
8728
|
-
let [e, t] = await Promise.all([
|
|
8928
|
+
let [e, t] = await Promise.all([Tc(), ui()]), n = new Set(t.map((e) => e.path)), r = e.filter((e) => !n.has(e.path));
|
|
8729
8929
|
return {
|
|
8730
8930
|
paths: r.map((e) => e.path),
|
|
8731
8931
|
bytes: r.reduce((e, t) => e + t.size, 0)
|
|
8732
8932
|
};
|
|
8733
|
-
},
|
|
8734
|
-
let t =
|
|
8933
|
+
}, _l = () => new Set(Object.keys(Lc(Pc))), vl = (e) => {
|
|
8934
|
+
let t = Lc(Pc);
|
|
8735
8935
|
for (let n of e) t[n] = null;
|
|
8736
|
-
|
|
8737
|
-
},
|
|
8738
|
-
if (!await
|
|
8739
|
-
let t = e ?? (await
|
|
8740
|
-
local: await
|
|
8741
|
-
remote: await
|
|
8936
|
+
Rc(Pc, t);
|
|
8937
|
+
}, yl = null, bl = (e) => yl || (yl = (async () => {
|
|
8938
|
+
if (!await Ac()) return;
|
|
8939
|
+
let t = e ?? (await Oc() ? {
|
|
8940
|
+
local: await Tc(),
|
|
8941
|
+
remote: await ui()
|
|
8742
8942
|
} : null);
|
|
8743
8943
|
if (!t) return;
|
|
8744
|
-
let n = new Set(t.remote.map((e) => e.path)), r =
|
|
8944
|
+
let n = new Set(t.remote.map((e) => e.path)), r = _l(), i = t.local.filter((e) => !n.has(e.path) && !r.has(e.path));
|
|
8745
8945
|
if (!i.length) return;
|
|
8746
|
-
let a = await
|
|
8946
|
+
let a = await rl(), o = i.reduce((e, t) => e + t.size, 0);
|
|
8747
8947
|
if (!await a.cloud.fs.promptAdopt({
|
|
8748
8948
|
files: i.length,
|
|
8749
8949
|
bytes: o
|
|
8750
8950
|
}).catch(() => !1)) {
|
|
8751
|
-
|
|
8951
|
+
vl(i.map((e) => e.path));
|
|
8752
8952
|
return;
|
|
8753
8953
|
}
|
|
8754
|
-
await
|
|
8954
|
+
await hl();
|
|
8755
8955
|
})().catch(() => {}).finally(() => {
|
|
8756
|
-
|
|
8757
|
-
}),
|
|
8758
|
-
let n = new Set(t.map((e) => e.path)), r = e.filter((e) => !n.has(e.path)), i = await
|
|
8759
|
-
await
|
|
8760
|
-
let e = await
|
|
8956
|
+
yl = null;
|
|
8957
|
+
}), yl), xl = null, Sl = !1, Cl = async (e, t) => {
|
|
8958
|
+
let n = new Set(t.map((e) => e.path)), r = e.filter((e) => !n.has(e.path)), i = await rl(), a = async () => {
|
|
8959
|
+
await hl().catch(() => {});
|
|
8960
|
+
let e = await gl().catch(() => ({
|
|
8761
8961
|
paths: [],
|
|
8762
8962
|
bytes: 0
|
|
8763
8963
|
}));
|
|
@@ -8769,47 +8969,47 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
|
|
|
8769
8969
|
files: r.length,
|
|
8770
8970
|
bytes: r.reduce((e, t) => e + t.size, 0)
|
|
8771
8971
|
};
|
|
8772
|
-
|
|
8972
|
+
xl = () => {
|
|
8773
8973
|
i.cloud.fs.setAdoptSource(o, a).catch(() => {});
|
|
8774
|
-
},
|
|
8775
|
-
t > 1 &&
|
|
8974
|
+
}, Sl || (Sl = !0, import("./lib-api-BdPC6S5P.js").then((e) => e.onApiEpoch((e, t) => {
|
|
8975
|
+
t > 1 && xl?.();
|
|
8776
8976
|
})).catch(() => {})), await i.cloud.fs.setAdoptSource(o, a);
|
|
8777
|
-
},
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
}), import("./lib-account-
|
|
8781
|
-
|
|
8977
|
+
}, wl = !1, Tl = () => {
|
|
8978
|
+
wl || typeof window > "u" || (wl = !0, window.addEventListener("online", () => {
|
|
8979
|
+
tl();
|
|
8980
|
+
}), import("./lib-account-CF0gclnF.js").then((e) => e.onChange(() => {
|
|
8981
|
+
bl().catch(() => {}), tl();
|
|
8782
8982
|
})).catch(() => {}));
|
|
8783
|
-
},
|
|
8784
|
-
({ ...
|
|
8785
|
-
var { available:
|
|
8786
|
-
attach: () =>
|
|
8787
|
-
connect: () =>
|
|
8788
|
-
hide: () =>
|
|
8789
|
-
install: () =>
|
|
8790
|
-
isVisible: () =>
|
|
8791
|
-
list: () =>
|
|
8792
|
-
mount: () =>
|
|
8793
|
-
onConnect: () =>
|
|
8794
|
-
onVisibilityChange: () =>
|
|
8795
|
-
pick: () =>
|
|
8796
|
-
search: () =>
|
|
8797
|
-
show: () =>
|
|
8798
|
-
uninstall: () =>
|
|
8799
|
-
}),
|
|
8983
|
+
}, El = Zr(Ec, { memfs: !0 }), { available: Dl, readFileSync: Ol, writeFileSync: kl, appendFileSync: Al, existsSync: jl, statSync: Ml, lstatSync: Nl, readdirSync: Pl, mkdirSync: Fl, rmSync: Il, rmdirSync: Ll, unlinkSync: Rl, renameSync: zl, readFile: Bl, writeFile: Vl, appendFile: Hl, stat: Ul, readdir: Wl, mkdir: Gl, rm: Kl, unlink: ql, rename: Jl, exists: Yl, promises: Xl, mount: Zl, flush: Ql, remount: $l } = El;
|
|
8984
|
+
({ ...El });
|
|
8985
|
+
var { available: eu, readFileSync: tu, writeFileSync: nu, appendFileSync: ru, existsSync: iu, statSync: au, lstatSync: ou, readdirSync: su, mkdirSync: cu, rmSync: lu, rmdirSync: uu, unlinkSync: du, renameSync: fu, readFile: pu, writeFile: mu, appendFile: hu, stat: gu, readdir: _u, mkdir: vu, rm: yu, unlink: bu, rename: xu, exists: Su, promises: Cu, mount: wu, flush: Tu, remount: Eu } = Zr(_c, { memfs: !0 }), Du = /* @__PURE__ */ g({
|
|
8986
|
+
attach: () => $u,
|
|
8987
|
+
connect: () => qu,
|
|
8988
|
+
hide: () => Ku,
|
|
8989
|
+
install: () => Fu,
|
|
8990
|
+
isVisible: () => pd,
|
|
8991
|
+
list: () => Iu,
|
|
8992
|
+
mount: () => Qu,
|
|
8993
|
+
onConnect: () => fd,
|
|
8994
|
+
onVisibilityChange: () => md,
|
|
8995
|
+
pick: () => Pu,
|
|
8996
|
+
search: () => Nu,
|
|
8997
|
+
show: () => Gu,
|
|
8998
|
+
uninstall: () => Lu
|
|
8999
|
+
}), Ou = "fkn-packages-connection", ku = 3e4, Q = (e, t) => Object.assign(Error(t), { code: e }), Au = async () => {
|
|
8800
9000
|
if (!i) throw Q("unavailable", "packages: no FKN transport in this realm - use relayWorker to bridge workers");
|
|
8801
9001
|
return c;
|
|
8802
|
-
},
|
|
9002
|
+
}, ju = (e, t, n) => f(e ?? {}, {
|
|
8803
9003
|
transport: t,
|
|
8804
|
-
key:
|
|
9004
|
+
key: Ou,
|
|
8805
9005
|
unregisterSignal: n
|
|
8806
|
-
}),
|
|
9006
|
+
}), Mu = async (e, t, n = {}) => {
|
|
8807
9007
|
let { signal: r, closed: i } = n;
|
|
8808
9008
|
if (r?.aborted) throw Q("unavailable", "packages.connect: aborted before connecting");
|
|
8809
9009
|
let a = new AbortController();
|
|
8810
9010
|
r && r.addEventListener("abort", () => a.abort(r.reason), { once: !0 });
|
|
8811
9011
|
let o = new AbortController(), s = new Promise((e, n) => {
|
|
8812
|
-
let a = setTimeout(() => n(Q("timeout", "packages.connect: the package did not complete the connection")),
|
|
9012
|
+
let a = setTimeout(() => n(Q("timeout", "packages.connect: the package did not complete the connection")), ku);
|
|
8813
9013
|
o.signal.addEventListener("abort", () => clearTimeout(a), { once: !0 }), t.addEventListener("message", (e) => {
|
|
8814
9014
|
if (e.data?.type === "fkn-packages-nack") {
|
|
8815
9015
|
let t = e.data.message;
|
|
@@ -8821,7 +9021,7 @@ var { available: El, readFileSync: Dl, writeFileSync: Ol, appendFileSync: kl, ex
|
|
|
8821
9021
|
}), i?.then(() => n(Q("unavailable", "packages.connect: the package closed before connecting")));
|
|
8822
9022
|
});
|
|
8823
9023
|
try {
|
|
8824
|
-
return await Promise.race([
|
|
9024
|
+
return await Promise.race([ju(e, t, a.signal), s]);
|
|
8825
9025
|
} catch (e) {
|
|
8826
9026
|
a.abort(e);
|
|
8827
9027
|
try {
|
|
@@ -8831,27 +9031,27 @@ var { available: El, readFileSync: Dl, writeFileSync: Ol, appendFileSync: kl, ex
|
|
|
8831
9031
|
} finally {
|
|
8832
9032
|
o.abort();
|
|
8833
9033
|
}
|
|
8834
|
-
},
|
|
8835
|
-
let t = await (await
|
|
9034
|
+
}, Nu = async (e) => {
|
|
9035
|
+
let t = await (await Au()).packages.search(e);
|
|
8836
9036
|
if ("error" in t) throw Q(t.error, t.message);
|
|
8837
9037
|
return t.results;
|
|
8838
|
-
},
|
|
8839
|
-
let n = await (await
|
|
9038
|
+
}, Pu = async (e, t) => {
|
|
9039
|
+
let n = await (await Au()).packages.pick(e, t);
|
|
8840
9040
|
if ("error" in n) throw Q(n.error, n.message);
|
|
8841
9041
|
return "declined" in n ? [] : n.results;
|
|
8842
|
-
},
|
|
8843
|
-
let n = await (await
|
|
9042
|
+
}, Fu = async (e, t) => {
|
|
9043
|
+
let n = await (await Au()).packages.install(e, t);
|
|
8844
9044
|
if ("error" in n) throw Q(n.error, n.message);
|
|
8845
9045
|
return "declined" in n ? null : n.installed;
|
|
8846
|
-
},
|
|
8847
|
-
let t = await (await
|
|
9046
|
+
}, Iu = async () => (await (await Au()).packages.list()).results, Lu = async (e) => {
|
|
9047
|
+
let t = await (await Au()).packages.uninstall(e);
|
|
8848
9048
|
if ("error" in t) throw Q(t.error, t.message);
|
|
8849
|
-
},
|
|
9049
|
+
}, Ru = ({ x: e, y: t, width: n, height: r }) => ({
|
|
8850
9050
|
x: Math.round(e),
|
|
8851
9051
|
y: Math.round(t),
|
|
8852
9052
|
width: Math.round(n),
|
|
8853
9053
|
height: Math.round(r)
|
|
8854
|
-
}),
|
|
9054
|
+
}), zu = (e, t) => {
|
|
8855
9055
|
let n = Math.max(e.x, t.x), r = Math.max(e.y, t.y);
|
|
8856
9056
|
return {
|
|
8857
9057
|
x: n,
|
|
@@ -8859,14 +9059,14 @@ var { available: El, readFileSync: Dl, writeFileSync: Ol, appendFileSync: kl, ex
|
|
|
8859
9059
|
width: Math.max(0, Math.min(e.x + e.width, t.x + t.width) - n),
|
|
8860
9060
|
height: Math.max(0, Math.min(e.y + e.height, t.y + t.height) - r)
|
|
8861
9061
|
};
|
|
8862
|
-
},
|
|
9062
|
+
}, Bu = (e, t) => {
|
|
8863
9063
|
let n = t;
|
|
8864
9064
|
for (let t = e.parentElement; t; t = t.parentElement) {
|
|
8865
9065
|
let e = getComputedStyle(t);
|
|
8866
|
-
if ((e.overflowX !== "visible" || e.overflowY !== "visible") && (n =
|
|
9066
|
+
if ((e.overflowX !== "visible" || e.overflowY !== "visible") && (n = zu(n, Ru(t.getBoundingClientRect())), n.width === 0 || n.height === 0)) break;
|
|
8867
9067
|
}
|
|
8868
9068
|
return n;
|
|
8869
|
-
},
|
|
9069
|
+
}, Vu = (e) => {
|
|
8870
9070
|
let t = getComputedStyle(e), n = [
|
|
8871
9071
|
t.borderTopLeftRadius,
|
|
8872
9072
|
t.borderTopRightRadius,
|
|
@@ -8879,31 +9079,31 @@ var { available: El, readFileSync: Dl, writeFileSync: Ol, appendFileSync: kl, ex
|
|
|
8879
9079
|
return Number.isFinite(t) && t > 0 ? t : 0;
|
|
8880
9080
|
});
|
|
8881
9081
|
return r.some((e) => e > 0) ? r : void 0;
|
|
8882
|
-
},
|
|
9082
|
+
}, Hu = (e, t) => {
|
|
8883
9083
|
if (!e) return !1;
|
|
8884
9084
|
let n = (e, t) => e === t || !!e && !!t && e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
8885
9085
|
return n(e.rect, t.rect) && n(e.clip, t.clip) && ((e, t) => e === t || !!e && !!t && e.every((e, n) => e === t[n]))(e.radius, t.radius);
|
|
8886
|
-
},
|
|
8887
|
-
|
|
8888
|
-
var
|
|
8889
|
-
let n =
|
|
9086
|
+
}, Uu = /* @__PURE__ */ new Map();
|
|
9087
|
+
Un("package view", () => Uu.size > 0);
|
|
9088
|
+
var Wu = async (e, t) => {
|
|
9089
|
+
let n = Uu.get(e);
|
|
8890
9090
|
if (n) {
|
|
8891
9091
|
for (let e of n) t && e.element !== t || (e.stop(), n.delete(e));
|
|
8892
9092
|
if (n.size > 0) return;
|
|
8893
|
-
|
|
9093
|
+
Uu.delete(e);
|
|
8894
9094
|
}
|
|
8895
|
-
let r = await (await
|
|
9095
|
+
let r = await (await Au()).packages.hide(e);
|
|
8896
9096
|
if ("error" in r) throw Q(r.error, r.message);
|
|
8897
|
-
},
|
|
9097
|
+
}, Gu = async (e, t) => {
|
|
8898
9098
|
let { element: n, rect: r } = t;
|
|
8899
9099
|
if (!n && !r) throw Q("invalid", "packages.show: pass an element or a rect");
|
|
8900
|
-
let i = (await
|
|
8901
|
-
if (!n) return { rect:
|
|
8902
|
-
let e =
|
|
9100
|
+
let i = (await Au()).packages, a = () => {
|
|
9101
|
+
if (!n) return { rect: Ru(r) };
|
|
9102
|
+
let e = Ru(n.getBoundingClientRect());
|
|
8903
9103
|
return {
|
|
8904
9104
|
rect: e,
|
|
8905
|
-
clip:
|
|
8906
|
-
radius:
|
|
9105
|
+
clip: Bu(n, e),
|
|
9106
|
+
radius: Vu(n)
|
|
8907
9107
|
};
|
|
8908
9108
|
}, o = !0, s, c = 0, l = async (t) => {
|
|
8909
9109
|
s = t;
|
|
@@ -8914,7 +9114,7 @@ var gu = async (e, t) => {
|
|
|
8914
9114
|
let u = () => {
|
|
8915
9115
|
if (!o) return;
|
|
8916
9116
|
let e = a();
|
|
8917
|
-
|
|
9117
|
+
Hu(s, e) || l(e).catch(() => {}), c = requestAnimationFrame(u);
|
|
8918
9118
|
};
|
|
8919
9119
|
n && (c = requestAnimationFrame(u));
|
|
8920
9120
|
let d = {
|
|
@@ -8922,24 +9122,24 @@ var gu = async (e, t) => {
|
|
|
8922
9122
|
stop: () => {
|
|
8923
9123
|
o = !1, cancelAnimationFrame(c);
|
|
8924
9124
|
}
|
|
8925
|
-
}, f =
|
|
8926
|
-
return f.add(d),
|
|
9125
|
+
}, f = Uu.get(e) ?? /* @__PURE__ */ new Set();
|
|
9126
|
+
return f.add(d), Uu.set(e, f), {
|
|
8927
9127
|
hide: () => {
|
|
8928
|
-
|
|
9128
|
+
Wu(e, n).catch(() => {});
|
|
8929
9129
|
},
|
|
8930
9130
|
refresh: () => {
|
|
8931
9131
|
if (!o) return;
|
|
8932
9132
|
let e = a();
|
|
8933
|
-
|
|
9133
|
+
Hu(s, e) || l(e).catch(() => {});
|
|
8934
9134
|
}
|
|
8935
9135
|
};
|
|
8936
|
-
},
|
|
8937
|
-
let n = await (await
|
|
9136
|
+
}, Ku = async (e, t = {}) => Wu(e, t.element), qu = (async (e, t = {}) => {
|
|
9137
|
+
let n = await (await Au()).packages.connect(e, {
|
|
8938
9138
|
protocol: t.protocol,
|
|
8939
9139
|
...t.path === void 0 ? {} : { path: t.path }
|
|
8940
9140
|
});
|
|
8941
9141
|
if ("error" in n) throw Q(n.error, n.message);
|
|
8942
|
-
let r =
|
|
9142
|
+
let r = Hn("package connection"), i = p()?.epoch ?? 0, a = m((e, t) => {
|
|
8943
9143
|
t !== i && (r(), a());
|
|
8944
9144
|
});
|
|
8945
9145
|
Promise.resolve(n.closed).then(() => {
|
|
@@ -8952,7 +9152,7 @@ var gu = async (e, t) => {
|
|
|
8952
9152
|
closed: s,
|
|
8953
9153
|
port: o
|
|
8954
9154
|
};
|
|
8955
|
-
let c = await
|
|
9155
|
+
let c = await Mu(t.payload, o, {
|
|
8956
9156
|
signal: t.signal,
|
|
8957
9157
|
closed: s
|
|
8958
9158
|
});
|
|
@@ -8965,14 +9165,14 @@ var gu = async (e, t) => {
|
|
|
8965
9165
|
closed: s,
|
|
8966
9166
|
port: o
|
|
8967
9167
|
};
|
|
8968
|
-
}),
|
|
9168
|
+
}), Ju = ["allow-scripts", "allow-same-origin"], Yu = (e) => {
|
|
8969
9169
|
let t = e.getAttribute("sandbox");
|
|
8970
9170
|
if (t !== null) {
|
|
8971
|
-
let e = new Set(t.toLowerCase().split(/\s+/).filter(Boolean)), n =
|
|
9171
|
+
let e = new Set(t.toLowerCase().split(/\s+/).filter(Boolean)), n = Ju.filter((t) => !e.has(t));
|
|
8972
9172
|
if (n.length) throw Q("invalid", `packages.mount: the iframe's sandbox attribute must include ${n.join(" and ")}, or the package cannot start`);
|
|
8973
9173
|
}
|
|
8974
9174
|
if (globalThis.crossOriginIsolated && !new Set((e.getAttribute("allow") ?? "").toLowerCase().split(";").map((e) => e.trim().split(/\s+/)[0]).filter(Boolean)).has("cross-origin-isolated")) throw Q("invalid", "packages.mount: this page is cross-origin isolated, so the iframe's allow attribute must include 'cross-origin-isolated' to hand that down to the package");
|
|
8975
|
-
},
|
|
9175
|
+
}, Xu = 3e4, Zu = (e, t) => new Promise((n, r) => {
|
|
8976
9176
|
let i = (e) => {
|
|
8977
9177
|
clearTimeout(o), window.removeEventListener("message", a), e ? r(e) : n();
|
|
8978
9178
|
}, a = (n) => {
|
|
@@ -8980,19 +9180,19 @@ var gu = async (e, t) => {
|
|
|
8980
9180
|
let r = n.data;
|
|
8981
9181
|
if (r?.type === "fkn-packages-ready") return i();
|
|
8982
9182
|
r?.type === "fkn-packages-failed" && i(Q("unavailable", typeof r.message == "string" && r.message ? r.message : "packages.mount: the package failed to boot"));
|
|
8983
|
-
}, o = setTimeout(() => i(Q("timeout", "packages.mount: the package did not register a connection handler")),
|
|
9183
|
+
}, o = setTimeout(() => i(Q("timeout", "packages.mount: the package did not register a connection handler")), Xu);
|
|
8984
9184
|
window.addEventListener("message", a);
|
|
8985
|
-
}),
|
|
9185
|
+
}), Qu = async (e, t) => {
|
|
8986
9186
|
let { iframe: n } = t;
|
|
8987
9187
|
if (!(n instanceof HTMLIFrameElement)) throw Q("invalid", "packages.mount: pass the iframe to load the package into");
|
|
8988
9188
|
if (!n.isConnected) throw Q("invalid", "packages.mount: the iframe must be in the document before mounting into it");
|
|
8989
|
-
|
|
8990
|
-
let r = await (await
|
|
9189
|
+
Yu(n);
|
|
9190
|
+
let r = await (await Au()).packages.frame(e);
|
|
8991
9191
|
if ("error" in r) throw Q(r.error, r.message);
|
|
8992
9192
|
n.src = r.url;
|
|
8993
9193
|
let i = { done: !1 }, a = () => {}, o = new Promise((e) => {
|
|
8994
9194
|
a = e;
|
|
8995
|
-
}), s =
|
|
9195
|
+
}), s = Hn("mounted package"), c = () => {
|
|
8996
9196
|
if (!i.done) {
|
|
8997
9197
|
i.done = !0, s();
|
|
8998
9198
|
try {
|
|
@@ -9002,7 +9202,7 @@ var gu = async (e, t) => {
|
|
|
9002
9202
|
}
|
|
9003
9203
|
};
|
|
9004
9204
|
try {
|
|
9005
|
-
await
|
|
9205
|
+
await Zu(n, r.origin);
|
|
9006
9206
|
} catch (e) {
|
|
9007
9207
|
throw c(), e;
|
|
9008
9208
|
}
|
|
@@ -9030,7 +9230,7 @@ var gu = async (e, t) => {
|
|
|
9030
9230
|
};
|
|
9031
9231
|
try {
|
|
9032
9232
|
return {
|
|
9033
|
-
remote: await
|
|
9233
|
+
remote: await Mu(t.payload, l.port1, {
|
|
9034
9234
|
signal: t.signal,
|
|
9035
9235
|
closed: o
|
|
9036
9236
|
}),
|
|
@@ -9042,10 +9242,10 @@ var gu = async (e, t) => {
|
|
|
9042
9242
|
} catch (e) {
|
|
9043
9243
|
throw c(), e;
|
|
9044
9244
|
}
|
|
9045
|
-
},
|
|
9046
|
-
let t =
|
|
9047
|
-
t && (
|
|
9048
|
-
},
|
|
9245
|
+
}, $u = (e, t, n) => Mu(t, e, { signal: n?.signal }), ed = null, td = !1, nd = /* @__PURE__ */ new Set(), rd = [], id = /* @__PURE__ */ new Map(), ad = !1, od = !1, sd = (e) => {
|
|
9246
|
+
let t = id.get(e);
|
|
9247
|
+
t && (id.delete(e), t());
|
|
9248
|
+
}, cd = (e, t) => {
|
|
9049
9249
|
try {
|
|
9050
9250
|
e.postMessage({
|
|
9051
9251
|
type: "fkn-packages-nack",
|
|
@@ -9055,26 +9255,26 @@ var gu = async (e, t) => {
|
|
|
9055
9255
|
try {
|
|
9056
9256
|
e.close();
|
|
9057
9257
|
} catch {}
|
|
9058
|
-
},
|
|
9258
|
+
}, ld = async (e, t) => {
|
|
9059
9259
|
let { port: n, ...r } = e;
|
|
9060
9260
|
e.port.addEventListener("message", (t) => {
|
|
9061
|
-
t.data?.type === "fkn-packages-disconnect" &&
|
|
9261
|
+
t.data?.type === "fkn-packages-disconnect" && sd(e.port);
|
|
9062
9262
|
});
|
|
9063
9263
|
let i;
|
|
9064
9264
|
try {
|
|
9065
9265
|
i = await t.createPayload(r);
|
|
9066
9266
|
} catch (t) {
|
|
9067
|
-
throw
|
|
9267
|
+
throw cd(e.port, t instanceof Error ? t.message : "the package failed to produce a connection"), t;
|
|
9068
9268
|
}
|
|
9069
|
-
let a = new Promise((t) =>
|
|
9269
|
+
let a = new Promise((t) => id.set(e.port, t)), o = await ju(i, e.port);
|
|
9070
9270
|
t.handler?.({
|
|
9071
9271
|
...r,
|
|
9072
9272
|
remote: o,
|
|
9073
9273
|
closed: a,
|
|
9074
9274
|
port: e.port
|
|
9075
9275
|
});
|
|
9076
|
-
},
|
|
9077
|
-
|
|
9276
|
+
}, ud = () => {
|
|
9277
|
+
ad || typeof window > "u" || window.parent === window || (ad = !0, window.addEventListener("message", (e) => {
|
|
9078
9278
|
if (e.source !== window.parent) return;
|
|
9079
9279
|
let t = e.data;
|
|
9080
9280
|
if (t?.type === "fkn-packages-port") {
|
|
@@ -9088,44 +9288,44 @@ var gu = async (e, t) => {
|
|
|
9088
9288
|
name: typeof t.name == "string" ? t.name : "",
|
|
9089
9289
|
version: typeof t.version == "string" ? t.version : ""
|
|
9090
9290
|
};
|
|
9091
|
-
|
|
9291
|
+
ed ? ld(r, ed).catch((e) => console.warn("packages.onConnect:", e)) : rd.push(r);
|
|
9092
9292
|
}
|
|
9093
|
-
if (t?.type === "fkn-packages-close") for (let e of [...
|
|
9293
|
+
if (t?.type === "fkn-packages-close") for (let e of [...id.keys()]) sd(e);
|
|
9094
9294
|
if (t?.type === "fkn-packages-visibility") {
|
|
9095
|
-
|
|
9096
|
-
for (let e of
|
|
9097
|
-
e(
|
|
9295
|
+
td = t.visible === !0;
|
|
9296
|
+
for (let e of nd) try {
|
|
9297
|
+
e(td);
|
|
9098
9298
|
} catch {}
|
|
9099
9299
|
}
|
|
9100
9300
|
}));
|
|
9101
|
-
},
|
|
9102
|
-
|
|
9103
|
-
},
|
|
9301
|
+
}, dd = () => {
|
|
9302
|
+
od || typeof window > "u" || window.parent === window || (od = !0, window.parent.postMessage({ type: "fkn-packages-ready" }, "*"));
|
|
9303
|
+
}, fd = (e, t) => {
|
|
9104
9304
|
if (typeof window > "u") return { unsubscribe: () => {} };
|
|
9105
|
-
|
|
9305
|
+
ud();
|
|
9106
9306
|
let n = {
|
|
9107
9307
|
createPayload: e,
|
|
9108
9308
|
handler: t
|
|
9109
9309
|
};
|
|
9110
|
-
for (
|
|
9310
|
+
for (ed = n, dd(); rd.length && ed === n;) ld(rd.shift(), n).catch((e) => console.warn("packages.onConnect:", e));
|
|
9111
9311
|
return { unsubscribe: () => {
|
|
9112
|
-
|
|
9312
|
+
ed === n && (ed = null);
|
|
9113
9313
|
} };
|
|
9114
|
-
},
|
|
9314
|
+
}, pd = () => td, md = (e) => {
|
|
9115
9315
|
if (typeof window > "u") return { unsubscribe: () => {} };
|
|
9116
|
-
|
|
9316
|
+
ud(), nd.add(e);
|
|
9117
9317
|
try {
|
|
9118
|
-
e(
|
|
9318
|
+
e(td);
|
|
9119
9319
|
} catch {}
|
|
9120
9320
|
return { unsubscribe: () => {
|
|
9121
|
-
|
|
9321
|
+
nd.delete(e);
|
|
9122
9322
|
} };
|
|
9123
|
-
},
|
|
9124
|
-
available: () =>
|
|
9125
|
-
create: () =>
|
|
9126
|
-
join: () =>
|
|
9127
|
-
open: () =>
|
|
9128
|
-
}),
|
|
9323
|
+
}, hd = /* @__PURE__ */ g({
|
|
9324
|
+
available: () => Cd,
|
|
9325
|
+
create: () => Td,
|
|
9326
|
+
join: () => Ed,
|
|
9327
|
+
open: () => wd
|
|
9328
|
+
}), gd = {
|
|
9129
9329
|
wrongKey: "rooms: wrong room key",
|
|
9130
9330
|
inviteNoKey: "rooms: the invite carries no key",
|
|
9131
9331
|
badName: "rooms: the name is not one a room can have",
|
|
@@ -9160,18 +9360,18 @@ var gu = async (e, t) => {
|
|
|
9160
9360
|
notJoined: "rooms: not joined",
|
|
9161
9361
|
malformed: "rooms: malformed frame",
|
|
9162
9362
|
ended: "rooms: the room has ended"
|
|
9163
|
-
}, $ = (e, t) => Object.assign(Error(t), { code: e }),
|
|
9363
|
+
}, $ = (e, t) => Object.assign(Error(t), { code: e }), _d = (e) => e instanceof Error && typeof e.code == "string", vd = {
|
|
9164
9364
|
send: !0,
|
|
9165
9365
|
receive: !0,
|
|
9166
9366
|
maxMessageBytes: 262144
|
|
9167
|
-
},
|
|
9367
|
+
}, yd = async () => {
|
|
9168
9368
|
if (!i) return;
|
|
9169
9369
|
let e = (await d("a room").catch(() => void 0))?.rooms;
|
|
9170
9370
|
return typeof e?.open == "function" ? e : void 0;
|
|
9171
|
-
},
|
|
9172
|
-
throw $("unavailable",
|
|
9173
|
-
},
|
|
9174
|
-
let t = e.invite, n = e, r = 0, i = e.self, a = e.owner, o = e.claimed, s = e.mailbox, c = await e.defaults().catch(() =>
|
|
9371
|
+
}, bd = () => {
|
|
9372
|
+
throw $("unavailable", gd.unavailable);
|
|
9373
|
+
}, xd = (e) => e === "blocked" ? "blocked" : e === "not-found" ? "ended" : "unavailable", Sd = async (e) => {
|
|
9374
|
+
let t = e.invite, n = e, r = 0, i = e.self, a = e.owner, o = e.claimed, s = e.mailbox, c = await e.defaults().catch(() => vd), l = !1, u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), f = Hn("room"), p = () => {}, h = () => {}, g = new Promise((e) => {
|
|
9175
9375
|
h = e;
|
|
9176
9376
|
}), _ = (e) => {
|
|
9177
9377
|
let t = [...d];
|
|
@@ -9180,7 +9380,7 @@ var gu = async (e, t) => {
|
|
|
9180
9380
|
n(e);
|
|
9181
9381
|
} catch {}
|
|
9182
9382
|
}, v = (e) => {
|
|
9183
|
-
l || (l = !0, p(), u.clear(), f(), _($("closed",
|
|
9383
|
+
l || (l = !0, p(), u.clear(), f(), _($("closed", gd.ended)), h({ reason: e }));
|
|
9184
9384
|
}, y = (e) => {
|
|
9185
9385
|
if (!l) {
|
|
9186
9386
|
e.type === "defaults" && (c = e.defaults), e.type === "permissions" && e.id === i.id && (i = {
|
|
@@ -9201,7 +9401,7 @@ var gu = async (e, t) => {
|
|
|
9201
9401
|
let d = await e.join(t).catch(() => void 0);
|
|
9202
9402
|
if (l || u !== r) return;
|
|
9203
9403
|
if (!d) return v("unavailable");
|
|
9204
|
-
if ("error" in d) return v(
|
|
9404
|
+
if ("error" in d) return v(xd(d.error));
|
|
9205
9405
|
if (d.self.id !== i.id) return Promise.resolve(d.leave()).catch(() => {}), v("unavailable");
|
|
9206
9406
|
n = d, i = d.self, a = d.owner, o = d.claimed, s = d.mailbox, b(d, u);
|
|
9207
9407
|
let f = await d.defaults().catch(() => void 0);
|
|
@@ -9209,10 +9409,10 @@ var gu = async (e, t) => {
|
|
|
9209
9409
|
};
|
|
9210
9410
|
p = m((e, t) => {
|
|
9211
9411
|
let n = r;
|
|
9212
|
-
r = t, !(l || n === 0 || n === t) && (_($("unavailable",
|
|
9412
|
+
r = t, !(l || n === 0 || n === t) && (_($("unavailable", gd.unavailable)), x(e.rooms, t));
|
|
9213
9413
|
}), b(e, r);
|
|
9214
9414
|
let S = async (e) => {
|
|
9215
|
-
if (l) throw $("closed",
|
|
9415
|
+
if (l) throw $("closed", gd.ended);
|
|
9216
9416
|
let t = () => {}, r = new Promise((e, n) => {
|
|
9217
9417
|
t = n;
|
|
9218
9418
|
});
|
|
@@ -9220,7 +9420,7 @@ var gu = async (e, t) => {
|
|
|
9220
9420
|
try {
|
|
9221
9421
|
return await Promise.race([Promise.resolve(e(n)), r]);
|
|
9222
9422
|
} catch (e) {
|
|
9223
|
-
throw
|
|
9423
|
+
throw _d(e) ? e : $("unavailable", gd.unavailable);
|
|
9224
9424
|
} finally {
|
|
9225
9425
|
d.delete(t);
|
|
9226
9426
|
}
|
|
@@ -9276,52 +9476,52 @@ var gu = async (e, t) => {
|
|
|
9276
9476
|
},
|
|
9277
9477
|
closed: g
|
|
9278
9478
|
};
|
|
9279
|
-
},
|
|
9280
|
-
let e = await
|
|
9479
|
+
}, Cd = async () => {
|
|
9480
|
+
let e = await yd();
|
|
9281
9481
|
return e ? e.available().catch(() => !1) : !1;
|
|
9282
|
-
},
|
|
9283
|
-
if (typeof e != "string" || e.length === 0 || e.length > 72) throw $("invalid",
|
|
9284
|
-
let n = await
|
|
9285
|
-
if (!n) throw $("unavailable",
|
|
9286
|
-
let r = await n.open(e, t).catch(
|
|
9482
|
+
}, wd = async (e, t) => {
|
|
9483
|
+
if (typeof e != "string" || e.length === 0 || e.length > 72) throw $("invalid", gd.badName);
|
|
9484
|
+
let n = await yd();
|
|
9485
|
+
if (!n) throw $("unavailable", gd.unavailable);
|
|
9486
|
+
let r = await n.open(e, t).catch(bd);
|
|
9287
9487
|
if ("error" in r) throw $(r.error, r.message);
|
|
9288
|
-
return
|
|
9289
|
-
},
|
|
9290
|
-
let t = await
|
|
9291
|
-
if (!t) throw $("unavailable",
|
|
9292
|
-
let n = await t.create(e).catch(
|
|
9488
|
+
return Sd(r);
|
|
9489
|
+
}, Td = async (e) => {
|
|
9490
|
+
let t = await yd();
|
|
9491
|
+
if (!t) throw $("unavailable", gd.unavailable);
|
|
9492
|
+
let n = await t.create(e).catch(bd);
|
|
9293
9493
|
if ("error" in n) throw $(n.error, n.message);
|
|
9294
|
-
return
|
|
9295
|
-
},
|
|
9494
|
+
return Sd(n);
|
|
9495
|
+
}, Ed = async (e, t) => {
|
|
9296
9496
|
let n = typeof e == "string" ? e.indexOf(".") : -1;
|
|
9297
|
-
if (n <= 0 || n === e.length - 1) throw $("invalid",
|
|
9298
|
-
let r = await
|
|
9299
|
-
if (!r) throw $("unavailable",
|
|
9300
|
-
let i = await r.join(e, t).catch(
|
|
9497
|
+
if (n <= 0 || n === e.length - 1) throw $("invalid", gd.inviteNoKey);
|
|
9498
|
+
let r = await yd();
|
|
9499
|
+
if (!r) throw $("unavailable", gd.unavailable);
|
|
9500
|
+
let i = await r.join(e, t).catch(bd);
|
|
9301
9501
|
if ("error" in i) throw $(i.error, i.message);
|
|
9302
|
-
return
|
|
9303
|
-
},
|
|
9304
|
-
if (
|
|
9305
|
-
for (let e of [
|
|
9502
|
+
return Sd(i);
|
|
9503
|
+
}, Dd = /* @__PURE__ */ new Set(), Od = () => {
|
|
9504
|
+
if (Dd.size === 0) return !1;
|
|
9505
|
+
for (let e of [...Dd]) try {
|
|
9306
9506
|
e();
|
|
9307
9507
|
} catch {}
|
|
9308
9508
|
return !0;
|
|
9309
|
-
},
|
|
9509
|
+
}, kd = (e, t) => {
|
|
9310
9510
|
if (typeof e?.onUpdateTaken == "function") return Promise.resolve(e.onUpdateTaken(t));
|
|
9311
|
-
},
|
|
9312
|
-
for (let e of [...
|
|
9511
|
+
}, Ad = /* @__PURE__ */ new Set(), jd = () => {
|
|
9512
|
+
for (let e of [...Ad]) try {
|
|
9313
9513
|
e();
|
|
9314
9514
|
} catch {}
|
|
9315
|
-
},
|
|
9515
|
+
}, Md = 0;
|
|
9316
9516
|
typeof window < "u" && m(() => {
|
|
9317
9517
|
let e = p();
|
|
9318
|
-
|
|
9319
|
-
|
|
9518
|
+
e && Ad.size !== 0 && Md !== e.epoch && (Md = e.epoch, Promise.resolve(e.remote.shell?.onUpdate(jd)).catch(() => {
|
|
9519
|
+
Md === e.epoch && (Md = 0);
|
|
9320
9520
|
}));
|
|
9321
9521
|
});
|
|
9322
|
-
var
|
|
9323
|
-
if (!
|
|
9324
|
-
|
|
9522
|
+
var Nd = 0, Pd = !1, Fd = () => {
|
|
9523
|
+
if (!Od() && !Pd) {
|
|
9524
|
+
Pd = !0;
|
|
9325
9525
|
try {
|
|
9326
9526
|
location.reload();
|
|
9327
9527
|
} catch {}
|
|
@@ -9329,55 +9529,55 @@ var ad = 0, od = !1, sd = () => {
|
|
|
9329
9529
|
};
|
|
9330
9530
|
typeof window < "u" && m(() => {
|
|
9331
9531
|
let e = p();
|
|
9332
|
-
if (!e ||
|
|
9333
|
-
|
|
9334
|
-
let t =
|
|
9532
|
+
if (!e || Nd === e.epoch) return;
|
|
9533
|
+
Nd = e.epoch;
|
|
9534
|
+
let t = kd(e.remote.shell, Fd);
|
|
9335
9535
|
if (!t) {
|
|
9336
|
-
|
|
9536
|
+
Nd = 0;
|
|
9337
9537
|
return;
|
|
9338
9538
|
}
|
|
9339
9539
|
t.catch(() => {
|
|
9340
|
-
|
|
9540
|
+
Nd === e.epoch && (Nd = 0);
|
|
9341
9541
|
});
|
|
9342
9542
|
});
|
|
9343
9543
|
//#endregion
|
|
9344
9544
|
//#region src/utils/fetch.ts
|
|
9345
|
-
var
|
|
9545
|
+
var Id = (e, t) => pc.fetch(e, t), Ld = "banou26/stub", Rd = "season-seed", zd = (e) => `https://github.com/${Ld}/releases/download/${Rd}/${e}`, Bd = (e) => e.startsWith(zd("")), Vd = "export", Hd = "store", Ud = "answers", Wd = (e, t, n) => {
|
|
9346
9546
|
try {
|
|
9347
|
-
return new URL(e, n).searchParams.getAll(
|
|
9547
|
+
return new URL(e, n).searchParams.getAll(Vd).includes(t);
|
|
9348
9548
|
} catch {
|
|
9349
9549
|
return !1;
|
|
9350
9550
|
}
|
|
9351
|
-
},
|
|
9551
|
+
}, Gd = (e, t) => Wd(e, Hd, t), Kd = (e, t) => Wd(e, Ud, t), qd = "query", Jd = (e, t) => Wd(e, qd, t), Yd = "store", Xd = "legacy", Zd = (e, t) => {
|
|
9352
9552
|
try {
|
|
9353
|
-
return new URL(e, t).searchParams.get(
|
|
9553
|
+
return new URL(e, t).searchParams.get(Yd) === Xd;
|
|
9354
9554
|
} catch {
|
|
9355
9555
|
return !1;
|
|
9356
9556
|
}
|
|
9357
|
-
},
|
|
9557
|
+
}, Qd = "trace", $d = (e, t) => {
|
|
9358
9558
|
try {
|
|
9359
|
-
return new URL(e, t).searchParams.getAll(
|
|
9559
|
+
return new URL(e, t).searchParams.getAll(Qd).includes("1");
|
|
9360
9560
|
} catch {
|
|
9361
9561
|
return !1;
|
|
9362
9562
|
}
|
|
9363
|
-
},
|
|
9563
|
+
}, ef = "seed", tf = (e, t) => {
|
|
9364
9564
|
try {
|
|
9365
|
-
return new URL(e, t).searchParams.getAll(
|
|
9565
|
+
return new URL(e, t).searchParams.getAll(ef).includes("off");
|
|
9366
9566
|
} catch {
|
|
9367
9567
|
return !1;
|
|
9368
9568
|
}
|
|
9369
|
-
},
|
|
9370
|
-
f({ fetch: (e, t) =>
|
|
9569
|
+
}, nf = (e) => typeof e == "string" ? e : e instanceof URL ? e.href : e.url, rf = (e, t) => tf(e) && Bd(nf(t)), af = new _();
|
|
9570
|
+
f({ fetch: (e, t) => rf(location.href, e) ? new Response(null, {
|
|
9371
9571
|
status: 404,
|
|
9372
9572
|
statusText: "the season seed is switched off for this page"
|
|
9373
|
-
}) :
|
|
9374
|
-
transport:
|
|
9573
|
+
}) : Id(e, t) }, {
|
|
9574
|
+
transport: af,
|
|
9375
9575
|
key: "fetch"
|
|
9376
9576
|
});
|
|
9377
|
-
var { handleRequest:
|
|
9378
|
-
transport:
|
|
9577
|
+
var { handleRequest: of, setUserKeys: sf, registerRemoteSource: cf, unregisterRemoteSource: lf, remotePicker: uf, remotePlayer: df, selectRemoteRelease: ff, exportStore: pf, exportAnswers: mf, exportAsks: hf, graphCounts: gf, traceGraph: _f, traceAnswer: vf, setGraphEnabled: yf, setReadStore: bf } = await f({}, {
|
|
9578
|
+
transport: af,
|
|
9379
9579
|
key: "yoga"
|
|
9380
|
-
}),
|
|
9381
|
-
|
|
9580
|
+
}), xf = new URLSearchParams(location.search);
|
|
9581
|
+
Zd(location.href) ? yf(xf.has("graph")) : await bf("graph");
|
|
9382
9582
|
//#endregion
|
|
9383
|
-
export {
|
|
9583
|
+
export { $d as _, of as a, df as c, vf as d, _f as f, Jd as g, Gd as h, gf as i, ff as l, Kd as m, hf as n, cf as o, lf as p, pf as r, uf as s, mf as t, sf as u, hd as v, Du as y };
|