@ghostlytools/cli 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{api-B-52sVYp.js → api-D89ubgas.js} +2 -2
- package/dist/assets/{api-CTqIcdu7.js → api-DL0Uazf6.js} +23 -19
- package/dist/assets/api-DL0Uazf6.js.map +1 -0
- package/dist/assets/{apiKit-CZq4Lq4f.js → apiKit-D78MXTrk.js} +2 -2
- package/dist/assets/{apiKit-CZq4Lq4f.js.map → apiKit-D78MXTrk.js.map} +1 -1
- package/dist/assets/{apps-C_X0zgSG.js → apps--pAqmfgQ.js} +3 -3
- package/dist/assets/{apps-C_X0zgSG.js.map → apps--pAqmfgQ.js.map} +1 -1
- package/dist/assets/{apps-kRsY9S2S.js → apps-BlSl1nGn.js} +1 -1
- package/dist/assets/{arkade-_aaB7VbW.js → arkade-DxB-MR43.js} +2 -2
- package/dist/assets/{arkade-_aaB7VbW.js.map → arkade-DxB-MR43.js.map} +1 -1
- package/dist/assets/{backup-OTvrmk-w.js → backup-B3JJd75o.js} +6 -6
- package/dist/assets/{backup-OTvrmk-w.js.map → backup-B3JJd75o.js.map} +1 -1
- package/dist/assets/{backup-DBg388Ke.js → backup-T7gFpU80.js} +1 -1
- package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
- package/dist/assets/{buttons-DUu7hxxT.js → buttons-C1VbDihe.js} +3 -3
- package/dist/assets/{buttons-DUu7hxxT.js.map → buttons-C1VbDihe.js.map} +1 -1
- package/dist/assets/buttons-DwWuK_uN.js +2 -0
- package/dist/assets/{client-DDpZP1R1.js → client-CGLuWFRV.js} +2 -2
- package/dist/assets/{client-DDpZP1R1.js.map → client-CGLuWFRV.js.map} +1 -1
- package/dist/assets/{codec-DrryGcPT.js → codec-YGJDr7uH.js} +2 -2
- package/dist/assets/{codec-DrryGcPT.js.map → codec-YGJDr7uH.js.map} +1 -1
- package/dist/assets/{envelope-Q_rMgoE9.js → envelope-Dwq8EN8x.js} +2 -2
- package/dist/assets/{envelope-Q_rMgoE9.js.map → envelope-Dwq8EN8x.js.map} +1 -1
- package/dist/assets/{fixedHosts-BV5GDiTU.js → fixedHosts-CINXidpd.js} +3 -3
- package/dist/assets/{fixedHosts-BV5GDiTU.js.map → fixedHosts-CINXidpd.js.map} +1 -1
- package/dist/assets/{host-BlUzZgQL.js → host-CGlHkiQv.js} +10 -10
- package/dist/assets/{host-BlUzZgQL.js.map → host-CGlHkiQv.js.map} +1 -1
- package/dist/assets/{hyperdhtRelay-BvI_uNZO.js → hyperdhtRelay-Bj5jJT5w.js} +2 -2
- package/dist/assets/{hyperdhtRelay-BvI_uNZO.js.map → hyperdhtRelay-Bj5jJT5w.js.map} +1 -1
- package/dist/assets/{irohWeb-CqPN8VPY.js → irohWeb-CYn0uB_A.js} +9 -9
- package/dist/assets/irohWeb-CYn0uB_A.js.map +1 -0
- package/dist/assets/{main-vQjlgEnt.js → main-CgLW_Gyx.js} +19 -19
- package/dist/assets/{main-vQjlgEnt.js.map → main-CgLW_Gyx.js.map} +1 -1
- package/dist/assets/{mainline-p6HOW7sb.js → mainline-B0h8RchD.js} +2 -2
- package/dist/assets/{mainline-p6HOW7sb.js.map → mainline-B0h8RchD.js.map} +1 -1
- package/dist/assets/{networkReason-DMffkiJ6.js → networkReason-BBosp2KG.js} +3 -3
- package/dist/assets/{networkReason-DMffkiJ6.js.map → networkReason-BBosp2KG.js.map} +1 -1
- package/dist/assets/{nwc-2vH18oNy.js → nwc-SSNS1aJ-.js} +3 -3
- package/dist/assets/{nwc-2vH18oNy.js.map → nwc-SSNS1aJ-.js.map} +1 -1
- package/dist/assets/{nwcProvider-DpeDy0bV.js → nwcProvider-BXqJmM98.js} +2 -2
- package/dist/assets/{nwcProvider-DpeDy0bV.js.map → nwcProvider-BXqJmM98.js.map} +1 -1
- package/dist/assets/{ownDid-iKz8u_fM.js → ownDid--DtH_Jdi.js} +2 -2
- package/dist/assets/{ownDid-iKz8u_fM.js.map → ownDid--DtH_Jdi.js.map} +1 -1
- package/dist/assets/{ownStatus-BlRKnM5F.js → ownStatus-CQPGjCUR.js} +3 -3
- package/dist/assets/{ownStatus-BlRKnM5F.js.map → ownStatus-CQPGjCUR.js.map} +1 -1
- package/dist/assets/{profiles-B5e0TyvS.js → profiles-4UQ1Hsds.js} +3 -3
- package/dist/assets/{profiles-B5e0TyvS.js.map → profiles-4UQ1Hsds.js.map} +1 -1
- package/dist/assets/{registry-Cc_PQb3k.js → registry-B6BXKv6Q.js} +1 -1
- package/dist/assets/{registry-CnFO2Pp5.js → registry-BKCFTEYp.js} +5 -5
- package/dist/assets/{registry-CnFO2Pp5.js.map → registry-BKCFTEYp.js.map} +1 -1
- package/dist/assets/{resolve-DI8uAM_Y.js → resolve-MFeFljsN.js} +2 -2
- package/dist/assets/{resolve-DI8uAM_Y.js.map → resolve-MFeFljsN.js.map} +1 -1
- package/dist/assets/{server-DdtPxkqI.js → server-rHKhnog1.js} +55 -42
- package/dist/assets/server-rHKhnog1.js.map +1 -0
- package/dist/assets/{src-BnpEQqzk.js → src-BzsyAvPf.js} +795 -165
- package/dist/assets/src-BzsyAvPf.js.map +1 -0
- package/dist/assets/{sshForges-cdIAraDw.js → sshForges-qITn-RoV.js} +2 -2
- package/dist/assets/{sshForges-cdIAraDw.js.map → sshForges-qITn-RoV.js.map} +1 -1
- package/dist/assets/{translate-kNopA04L.js → translate-Bkr_iDgp.js} +9 -7
- package/dist/assets/translate-Bkr_iDgp.js.map +1 -0
- package/dist/assets/{usdt-CDaLhEYh.js → usdt-Bp7T2iqt.js} +3 -3
- package/dist/assets/{usdt-CDaLhEYh.js.map → usdt-Bp7T2iqt.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/package.json +1 -1
- package/dist/assets/api-CTqIcdu7.js.map +0 -1
- package/dist/assets/buttons-4EKtQl-7.js +0 -2
- package/dist/assets/irohWeb-CqPN8VPY.js.map +0 -1
- package/dist/assets/server-DdtPxkqI.js.map +0 -1
- package/dist/assets/src-BnpEQqzk.js.map +0 -1
- package/dist/assets/translate-kNopA04L.js.map +0 -1
|
@@ -4746,7 +4746,7 @@ function findAppForbiddenKey(value) {
|
|
|
4746
4746
|
var MAX_CLIENTS = 16;
|
|
4747
4747
|
var SEMVER$1 = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
4748
4748
|
var HOST = /^>=(0|[1-9]\d*)\.(0|[1-9]\d*)(\.(0|[1-9]\d*))?$/;
|
|
4749
|
-
var SEGMENT$
|
|
4749
|
+
var SEGMENT$2 = /^[A-Za-z0-9._-]+$/;
|
|
4750
4750
|
var codePoints = (s) => [...s].length;
|
|
4751
4751
|
/** Text of several lines: no control character but the line feed. */
|
|
4752
4752
|
var isText$2 = (v, max) => typeof v === "string" && codePoints(v) <= max && !/[^\P{Cc}\n]/u.test(v);
|
|
@@ -4818,7 +4818,7 @@ function isAppLicense(value) {
|
|
|
4818
4818
|
/** A path of a bundle: relative, `/`-separated, `[A-Za-z0-9._-]` per segment, no `.` or `..`, at most 128 bytes. */
|
|
4819
4819
|
function isAppPath(value) {
|
|
4820
4820
|
if (typeof value !== "string" || value.length < 1 || value.length > APP_BUNDLE_LIMITS.pathBytes) return false;
|
|
4821
|
-
return value.split("/").every((s) => SEGMENT$
|
|
4821
|
+
return value.split("/").every((s) => SEGMENT$2.test(s) && s !== "." && s !== "..");
|
|
4822
4822
|
}
|
|
4823
4823
|
var bad = (field, detail = `${field} is not valid`) => ({
|
|
4824
4824
|
ok: false,
|
|
@@ -9013,7 +9013,7 @@ var LinkSession = class {
|
|
|
9013
9013
|
receivedNew = true;
|
|
9014
9014
|
if (fresh.length > 0) this.events.onMessages?.(fresh, batch);
|
|
9015
9015
|
}
|
|
9016
|
-
if (read && batch.packetTimestamp > this.peerPacketAt) this.peerPacketAt = batch.packetTimestamp;
|
|
9016
|
+
if (read && batch.packetTimestamp > this.peerPacketAt) this.peerPacketAt = Math.min(batch.packetTimestamp, Date.now() + PKARR_FUTURE_SKEW_MS);
|
|
9017
9017
|
const seenAt = batch.packetTimestamp === wasSeen ? presenceSeenAt(this.presence) : Math.max(readBefore, Math.min(batch.packetTimestamp, Date.now()));
|
|
9018
9018
|
const online = batch.services !== null && Date.now() - seenAt < 6e5;
|
|
9019
9019
|
this.presence = {
|
|
@@ -27660,9 +27660,9 @@ var HEIF_BRANDS = /* @__PURE__ */ new Set([
|
|
|
27660
27660
|
]);
|
|
27661
27661
|
var u16be = (b, at) => b[at] << 8 | b[at + 1];
|
|
27662
27662
|
var u32be$1 = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
|
|
27663
|
-
var u32le = (b, at) => (b[at] | b[at + 1] << 8 | b[at + 2] << 16 | b[at + 3] << 24) >>> 0;
|
|
27664
|
-
var text$
|
|
27665
|
-
var starts = (b, at, prefix) => at + prefix.length <= b.length && text$
|
|
27663
|
+
var u32le$1 = (b, at) => (b[at] | b[at + 1] << 8 | b[at + 2] << 16 | b[at + 3] << 24) >>> 0;
|
|
27664
|
+
var text$2 = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
|
|
27665
|
+
var starts = (b, at, prefix) => at + prefix.length <= b.length && text$2(b, at, prefix.length) === prefix;
|
|
27666
27666
|
/** A picture this strips, by its first bytes. */
|
|
27667
27667
|
function kindOf(b) {
|
|
27668
27668
|
if (b.length >= 3 && b[0] === 255 && b[1] === 216 && b[2] === 255) return "jpeg";
|
|
@@ -27672,11 +27672,11 @@ function kindOf(b) {
|
|
|
27672
27672
|
if (starts(b, 0, "II*\0") || starts(b, 0, "MM\0*") || starts(b, 0, "II+\0") || starts(b, 0, "MM\0+")) return "tiff";
|
|
27673
27673
|
if (b.length >= 16 && starts(b, 4, "ftyp")) {
|
|
27674
27674
|
const end = Math.min(b.length, u32be$1(b, 0));
|
|
27675
|
-
for (let at = 8; at + 4 <= end; at += 4) if (at !== 12 && HEIF_BRANDS.has(text$
|
|
27675
|
+
for (let at = 8; at + 4 <= end; at += 4) if (at !== 12 && HEIF_BRANDS.has(text$2(b, at, 4))) return "heif";
|
|
27676
27676
|
}
|
|
27677
27677
|
}
|
|
27678
27678
|
/** Refuses the picture where its bytes are not what this expects. */
|
|
27679
|
-
function check$
|
|
27679
|
+
function check$2(ok) {
|
|
27680
27680
|
if (!ok) throw new Error(NO_PICTURE_METADATA);
|
|
27681
27681
|
}
|
|
27682
27682
|
/** SOFn markers: every frame type but DHT (C4), JPG (C8) and DAC (CC). */
|
|
@@ -27710,12 +27710,12 @@ function stripJpeg(b) {
|
|
|
27710
27710
|
const parts = [b.subarray(0, 2)];
|
|
27711
27711
|
let at = 2, framed = false, scanned = false, exif = false;
|
|
27712
27712
|
for (;;) {
|
|
27713
|
-
check$
|
|
27713
|
+
check$2(at < b.length && b[at] === 255);
|
|
27714
27714
|
while (at < b.length && b[at] === 255) at++;
|
|
27715
|
-
check$
|
|
27715
|
+
check$2(at < b.length);
|
|
27716
27716
|
const marker = b[at++];
|
|
27717
27717
|
if (marker === 217) {
|
|
27718
|
-
check$
|
|
27718
|
+
check$2(framed && scanned);
|
|
27719
27719
|
parts.push(Uint8Array.of(255, 217));
|
|
27720
27720
|
return parts;
|
|
27721
27721
|
}
|
|
@@ -27723,9 +27723,9 @@ function stripJpeg(b) {
|
|
|
27723
27723
|
parts.push(Uint8Array.of(255, marker));
|
|
27724
27724
|
continue;
|
|
27725
27725
|
}
|
|
27726
|
-
check$
|
|
27726
|
+
check$2(marker !== 0 && marker !== 216 && at + 2 <= b.length);
|
|
27727
27727
|
const length = u16be(b, at);
|
|
27728
|
-
check$
|
|
27728
|
+
check$2(length >= 2 && at + length <= b.length);
|
|
27729
27729
|
if (marker === 224 && length > 16 && starts(b, at + 2, "JFIF\0")) parts.push(Uint8Array.of(255, 224, 0, 16, ...b.subarray(at + 2, at + 14), 0, 0));
|
|
27730
27730
|
else if (jpegKeeps(marker, b, at + 2)) {
|
|
27731
27731
|
parts.push(Uint8Array.of(255, marker), b.subarray(at, at + length));
|
|
@@ -27737,15 +27737,15 @@ function stripJpeg(b) {
|
|
|
27737
27737
|
}
|
|
27738
27738
|
at += length;
|
|
27739
27739
|
if (marker !== 218) continue;
|
|
27740
|
-
check$
|
|
27740
|
+
check$2(framed);
|
|
27741
27741
|
scanned = true;
|
|
27742
27742
|
let end = at;
|
|
27743
27743
|
for (;;) {
|
|
27744
27744
|
end = b.indexOf(255, end);
|
|
27745
|
-
check$
|
|
27745
|
+
check$2(end >= 0);
|
|
27746
27746
|
let next = end + 1;
|
|
27747
27747
|
while (next < b.length && b[next] === 255) next++;
|
|
27748
|
-
check$
|
|
27748
|
+
check$2(next < b.length);
|
|
27749
27749
|
if (b[next] !== 0 && !(b[next] >= 208 && b[next] <= 215)) break;
|
|
27750
27750
|
end = next + 1;
|
|
27751
27751
|
}
|
|
@@ -27794,11 +27794,11 @@ function stripPng(b) {
|
|
|
27794
27794
|
const parts = [b.subarray(0, 8)];
|
|
27795
27795
|
let at = 8, exif = false, imaged = false;
|
|
27796
27796
|
for (;;) {
|
|
27797
|
-
check$
|
|
27798
|
-
const length = u32be$1(b, at), type = text$
|
|
27799
|
-
check$
|
|
27797
|
+
check$2(at + 12 <= b.length);
|
|
27798
|
+
const length = u32be$1(b, at), type = text$2(b, at + 4, 4);
|
|
27799
|
+
check$2(at + 12 + length <= b.length && (at > 8 || type === "IHDR"));
|
|
27800
27800
|
const critical = (b[at + 4] & 32) === 0;
|
|
27801
|
-
check$
|
|
27801
|
+
check$2(!critical || PNG_CRITICAL.has(type));
|
|
27802
27802
|
if (critical || PNG_DRAWS.has(type)) parts.push(b.subarray(at, at + 12 + length));
|
|
27803
27803
|
else if (type === "eXIf" && !exif && !imaged) {
|
|
27804
27804
|
exif = true;
|
|
@@ -27820,20 +27820,20 @@ var WEBP_KEEPS = /* @__PURE__ */ new Set([
|
|
|
27820
27820
|
"ICCP"
|
|
27821
27821
|
]);
|
|
27822
27822
|
function stripWebp(b) {
|
|
27823
|
-
check$
|
|
27824
|
-
const riffEnd = 8 + u32le(b, 4);
|
|
27825
|
-
check$
|
|
27823
|
+
check$2(b.length >= 20);
|
|
27824
|
+
const riffEnd = 8 + u32le$1(b, 4);
|
|
27825
|
+
check$2(riffEnd <= b.length && riffEnd % 2 === 0);
|
|
27826
27826
|
const parts = [];
|
|
27827
27827
|
let at = 12, size = 4, drawn = false, exif = false, vp8x;
|
|
27828
27828
|
while (at < riffEnd) {
|
|
27829
|
-
check$
|
|
27830
|
-
const type = text$
|
|
27831
|
-
check$
|
|
27829
|
+
check$2(at + 8 <= riffEnd);
|
|
27830
|
+
const type = text$2(b, at, 4), length = u32le$1(b, at + 4), end = at + 8 + length + (length & 1);
|
|
27831
|
+
check$2(end <= riffEnd && (at > 12 || type === "VP8 " || type === "VP8L" || type === "VP8X"));
|
|
27832
27832
|
let chunk;
|
|
27833
27833
|
if (WEBP_KEEPS.has(type)) {
|
|
27834
27834
|
chunk = b.subarray(at, end);
|
|
27835
27835
|
if (type === "VP8X") {
|
|
27836
|
-
check$
|
|
27836
|
+
check$2(length >= 10);
|
|
27837
27837
|
chunk = vp8x = chunk.slice();
|
|
27838
27838
|
chunk[8] = chunk[8] & -13;
|
|
27839
27839
|
}
|
|
@@ -27861,7 +27861,7 @@ function stripWebp(b) {
|
|
|
27861
27861
|
}
|
|
27862
27862
|
at = end;
|
|
27863
27863
|
}
|
|
27864
|
-
check$
|
|
27864
|
+
check$2(drawn);
|
|
27865
27865
|
const header = /* @__PURE__ */ new Uint8Array(12);
|
|
27866
27866
|
header.set(b.subarray(0, 12));
|
|
27867
27867
|
new DataView(header.buffer).setUint32(4, size, true);
|
|
@@ -27944,16 +27944,16 @@ var HEIF_ABOUT = /* @__PURE__ */ new Set([
|
|
|
27944
27944
|
function boxes$1(b, start, end) {
|
|
27945
27945
|
const found = [];
|
|
27946
27946
|
for (let at = start; at < end;) {
|
|
27947
|
-
check$
|
|
27947
|
+
check$2(at + 8 <= end);
|
|
27948
27948
|
let size = u32be$1(b, at), body = at + 8;
|
|
27949
|
-
const type = text$
|
|
27949
|
+
const type = text$2(b, at + 4, 4);
|
|
27950
27950
|
if (size === 1) {
|
|
27951
|
-
check$
|
|
27951
|
+
check$2(at + 16 <= end);
|
|
27952
27952
|
size = u32be$1(b, at + 8) * 2 ** 32 + u32be$1(b, at + 12);
|
|
27953
27953
|
body = at + 16;
|
|
27954
27954
|
} else if (size === 0) size = end - at;
|
|
27955
27955
|
if (type === "uuid") body += 16;
|
|
27956
|
-
check$
|
|
27956
|
+
check$2(size >= body - at && at + size <= end);
|
|
27957
27957
|
found.push({
|
|
27958
27958
|
type,
|
|
27959
27959
|
start: at,
|
|
@@ -27966,58 +27966,58 @@ function boxes$1(b, start, end) {
|
|
|
27966
27966
|
}
|
|
27967
27967
|
function stripHeif(b) {
|
|
27968
27968
|
const top = boxes$1(b, 0, b.length);
|
|
27969
|
-
check$
|
|
27969
|
+
check$2(top[0]?.type === "ftyp" && top.every((box) => HEIF_TOP.has(box.type)));
|
|
27970
27970
|
const metas = top.filter((box) => box.type === "meta");
|
|
27971
|
-
check$
|
|
27971
|
+
check$2(metas.length === 1);
|
|
27972
27972
|
const meta = metas[0];
|
|
27973
27973
|
const children = boxes$1(b, meta.body + 4, meta.end);
|
|
27974
|
-
check$
|
|
27974
|
+
check$2(children.every((box) => HEIF_META.has(box.type)));
|
|
27975
27975
|
const one = (type) => {
|
|
27976
27976
|
const of = children.filter((box) => box.type === type);
|
|
27977
|
-
check$
|
|
27977
|
+
check$2(of.length <= 1);
|
|
27978
27978
|
return of[0];
|
|
27979
27979
|
};
|
|
27980
27980
|
const iinf = one("iinf"), iloc = one("iloc"), idat = one("idat");
|
|
27981
|
-
check$
|
|
27981
|
+
check$2(!!iinf && !!iloc);
|
|
27982
27982
|
const metadata = /* @__PURE__ */ new Set();
|
|
27983
27983
|
const infeVersion = b[iinf.body];
|
|
27984
27984
|
const entries = boxes$1(b, iinf.body + 4 + (infeVersion === 0 ? 2 : 4), iinf.end);
|
|
27985
27985
|
for (const infe of entries) {
|
|
27986
|
-
check$
|
|
27986
|
+
check$2(infe.type === "infe" && infe.body + 4 <= infe.end);
|
|
27987
27987
|
const version = b[infe.body];
|
|
27988
|
-
check$
|
|
27988
|
+
check$2(version === 2 || version === 3);
|
|
27989
27989
|
let at = infe.body + 4;
|
|
27990
27990
|
const id = version === 2 ? u16be(b, at) : u32be$1(b, at);
|
|
27991
27991
|
at += version === 2 ? 2 : 4;
|
|
27992
|
-
check$
|
|
27993
|
-
if (HEIF_METADATA_ITEMS.has(text$
|
|
27992
|
+
check$2(at + 6 <= infe.end);
|
|
27993
|
+
if (HEIF_METADATA_ITEMS.has(text$2(b, at + 2, 4))) metadata.add(id);
|
|
27994
27994
|
}
|
|
27995
27995
|
const iprp = one("iprp"), properties = [];
|
|
27996
27996
|
if (iprp) {
|
|
27997
27997
|
const held = boxes$1(b, iprp.body, iprp.end);
|
|
27998
27998
|
const ipco = held.filter((box) => box.type === "ipco");
|
|
27999
|
-
check$
|
|
27999
|
+
check$2(ipco.length === 1 && held.every((box) => box.type === "ipco" || box.type === "ipma"));
|
|
28000
28000
|
properties.push(...boxes$1(b, ipco[0].body, ipco[0].end));
|
|
28001
|
-
check$
|
|
28001
|
+
check$2(properties.every((box) => HEIF_DRAWS.has(box.type) || HEIF_ABOUT.has(box.type)));
|
|
28002
28002
|
}
|
|
28003
28003
|
/** `free` and `skip` boxes, at the top and in `meta`, and the properties about the picture: their bodies go as zeros. */
|
|
28004
28004
|
const space = [...[...top, ...children].filter((box) => box.type === "free" || box.type === "skip"), ...properties.filter((box) => HEIF_ABOUT.has(box.type))];
|
|
28005
28005
|
const out = b.slice();
|
|
28006
28006
|
const version = b[iloc.body];
|
|
28007
|
-
check$
|
|
28007
|
+
check$2(version <= 2);
|
|
28008
28008
|
let at = iloc.body + 4;
|
|
28009
28009
|
/** The next field of `size` bytes (0, 2, 4 or 8), big-endian. */
|
|
28010
28010
|
const read = (size) => {
|
|
28011
|
-
check$
|
|
28011
|
+
check$2(at + size <= iloc.end);
|
|
28012
28012
|
const value = size === 0 ? 0 : size === 2 ? u16be(b, at) : size === 4 ? u32be$1(b, at) : size === 8 ? u32be$1(b, at) * 2 ** 32 + u32be$1(b, at + 4) : NaN;
|
|
28013
|
-
check$
|
|
28013
|
+
check$2(Number.isSafeInteger(value));
|
|
28014
28014
|
at += size;
|
|
28015
28015
|
return value;
|
|
28016
28016
|
};
|
|
28017
28017
|
const read2 = () => read(2);
|
|
28018
|
-
check$
|
|
28018
|
+
check$2(at + 2 <= iloc.end);
|
|
28019
28019
|
const offsetSize = b[at] >> 4, lengthSize = b[at] & 15, baseSize = b[at + 1] >> 4, indexSize = version > 0 ? b[at + 1] & 15 : 0;
|
|
28020
|
-
check$
|
|
28020
|
+
check$2([
|
|
28021
28021
|
offsetSize,
|
|
28022
28022
|
lengthSize,
|
|
28023
28023
|
baseSize,
|
|
@@ -28036,12 +28036,12 @@ function stripHeif(b) {
|
|
|
28036
28036
|
const offset = read(offsetSize), length = read(lengthSize);
|
|
28037
28037
|
if (!metadata.has(id)) {
|
|
28038
28038
|
const start = base + offset, end = length ? start + length : b.length;
|
|
28039
|
-
check$
|
|
28039
|
+
check$2(reference !== 0 || method !== 0 || !space.some((box) => start < box.end && end > box.body));
|
|
28040
28040
|
continue;
|
|
28041
28041
|
}
|
|
28042
|
-
check$
|
|
28042
|
+
check$2(reference === 0 && length > 0 && (method === 0 || method === 1 && !!idat));
|
|
28043
28043
|
const start = (method === 1 ? idat.body : 0) + base + offset, limit = method === 1 ? idat.end : b.length;
|
|
28044
|
-
check$
|
|
28044
|
+
check$2(start + length <= limit);
|
|
28045
28045
|
out.fill(0, start, start + length);
|
|
28046
28046
|
}
|
|
28047
28047
|
}
|
|
@@ -28054,44 +28054,44 @@ var GIF_APPS_KEPT = /* @__PURE__ */ new Set([
|
|
|
28054
28054
|
"ICCRGBG1012"
|
|
28055
28055
|
]);
|
|
28056
28056
|
function stripGif(b) {
|
|
28057
|
-
check$
|
|
28057
|
+
check$2(b.length >= 13);
|
|
28058
28058
|
/** A colour table's bytes, from the flags that say it is there and its size. */
|
|
28059
28059
|
const table = (flags) => flags & 128 ? 3 << (flags & 7) + 1 : 0;
|
|
28060
28060
|
/** The end of the data sub-blocks at `at`, past their empty block. */
|
|
28061
28061
|
const blocks = (at) => {
|
|
28062
28062
|
for (;;) {
|
|
28063
|
-
check$
|
|
28063
|
+
check$2(at < b.length);
|
|
28064
28064
|
const length = b[at];
|
|
28065
28065
|
at += 1 + length;
|
|
28066
28066
|
if (!length) return at;
|
|
28067
28067
|
}
|
|
28068
28068
|
};
|
|
28069
28069
|
let at = 13 + table(b[10]), framed = false;
|
|
28070
|
-
check$
|
|
28070
|
+
check$2(at <= b.length);
|
|
28071
28071
|
const parts = [b.subarray(0, at)];
|
|
28072
28072
|
for (;;) {
|
|
28073
|
-
check$
|
|
28073
|
+
check$2(at < b.length);
|
|
28074
28074
|
const introducer = b[at];
|
|
28075
28075
|
if (introducer === 59) {
|
|
28076
|
-
check$
|
|
28076
|
+
check$2(framed);
|
|
28077
28077
|
parts.push(Uint8Array.of(59));
|
|
28078
28078
|
return parts;
|
|
28079
28079
|
}
|
|
28080
28080
|
if (introducer === 44) {
|
|
28081
|
-
check$
|
|
28081
|
+
check$2(at + 10 <= b.length);
|
|
28082
28082
|
const data = at + 10 + table(b[at + 9]);
|
|
28083
|
-
check$
|
|
28083
|
+
check$2(data < b.length);
|
|
28084
28084
|
const end = blocks(data + 1);
|
|
28085
28085
|
parts.push(b.subarray(at, end));
|
|
28086
28086
|
framed = true;
|
|
28087
28087
|
at = end;
|
|
28088
28088
|
continue;
|
|
28089
28089
|
}
|
|
28090
|
-
check$
|
|
28090
|
+
check$2(introducer === 33 && at + 2 < b.length);
|
|
28091
28091
|
const label = b[at + 1], end = blocks(at + 2);
|
|
28092
|
-
const app = label === 255 && b[at + 2] === 11 && GIF_APPS_KEPT.has(text$
|
|
28092
|
+
const app = label === 255 && b[at + 2] === 11 && GIF_APPS_KEPT.has(text$2(b, at + 3, 11));
|
|
28093
28093
|
if (label === 249 || label === 1 || app) parts.push(b.subarray(at, end));
|
|
28094
|
-
else check$
|
|
28094
|
+
else check$2(label === 254 || label === 255);
|
|
28095
28095
|
at = end;
|
|
28096
28096
|
}
|
|
28097
28097
|
}
|
|
@@ -28210,18 +28210,18 @@ var TIFF_TYPE_BYTES = [
|
|
|
28210
28210
|
function stripTiff(b) {
|
|
28211
28211
|
const little = b[0] === 73;
|
|
28212
28212
|
const u16 = (at) => {
|
|
28213
|
-
check$
|
|
28213
|
+
check$2(at + 2 <= b.length);
|
|
28214
28214
|
return little ? b[at] | b[at + 1] << 8 : u16be(b, at);
|
|
28215
28215
|
};
|
|
28216
28216
|
const u32 = (at) => {
|
|
28217
|
-
check$
|
|
28218
|
-
return little ? u32le(b, at) : u32be$1(b, at);
|
|
28217
|
+
check$2(at + 4 <= b.length);
|
|
28218
|
+
return little ? u32le$1(b, at) : u32be$1(b, at);
|
|
28219
28219
|
};
|
|
28220
|
-
check$
|
|
28220
|
+
check$2(b.length >= 8 && u16(2) === 42);
|
|
28221
28221
|
const out = b.slice(), seen = /* @__PURE__ */ new Set();
|
|
28222
28222
|
/** An IFD's entries: tag, type, the value's first byte (in the entry or where it points) and its bytes. */
|
|
28223
28223
|
const entries = (ifd) => {
|
|
28224
|
-
check$
|
|
28224
|
+
check$2(ifd >= 8 && !seen.has(ifd) && seen.size < 1024);
|
|
28225
28225
|
seen.add(ifd);
|
|
28226
28226
|
const count = u16(ifd), next = ifd + 2 + count * 12;
|
|
28227
28227
|
u32(next);
|
|
@@ -28229,10 +28229,10 @@ function stripTiff(b) {
|
|
|
28229
28229
|
next,
|
|
28230
28230
|
list: Array.from({ length: count }, (_, i) => {
|
|
28231
28231
|
const at = ifd + 2 + i * 12, tag = u16(at), type = u16(at + 2);
|
|
28232
|
-
check$
|
|
28232
|
+
check$2(type >= 1 && type < TIFF_TYPE_BYTES.length);
|
|
28233
28233
|
const bytes = TIFF_TYPE_BYTES[type] * u32(at + 4);
|
|
28234
28234
|
const value = bytes <= 4 ? at + 8 : u32(at + 8);
|
|
28235
|
-
check$
|
|
28235
|
+
check$2(Number.isSafeInteger(bytes) && value + bytes <= b.length);
|
|
28236
28236
|
return {
|
|
28237
28237
|
at,
|
|
28238
28238
|
tag,
|
|
@@ -28247,7 +28247,7 @@ function stripTiff(b) {
|
|
|
28247
28247
|
const empty = (ifd) => {
|
|
28248
28248
|
const { next, list } = entries(ifd);
|
|
28249
28249
|
for (const entry of list) {
|
|
28250
|
-
check$
|
|
28250
|
+
check$2(entry.tag !== 37500);
|
|
28251
28251
|
if (TIFF_METADATA_IFDS.has(entry.tag)) empty(u32(entry.value));
|
|
28252
28252
|
out.fill(0, entry.value, entry.value + entry.bytes);
|
|
28253
28253
|
}
|
|
@@ -28257,16 +28257,16 @@ function stripTiff(b) {
|
|
|
28257
28257
|
const { next, list } = entries(ifd);
|
|
28258
28258
|
let kept = 0;
|
|
28259
28259
|
for (const { at, tag, value, bytes } of list) {
|
|
28260
|
-
if (tag === 259) check$
|
|
28260
|
+
if (tag === 259) check$2(TIFF_COMPRESSION.has(u16(value)));
|
|
28261
28261
|
if (TIFF_METADATA_IFDS.has(tag)) {
|
|
28262
28262
|
empty(u32(value));
|
|
28263
28263
|
continue;
|
|
28264
28264
|
}
|
|
28265
28265
|
if (TIFF_METADATA.has(tag)) out.fill(0, value, value + bytes);
|
|
28266
|
-
else check$
|
|
28266
|
+
else check$2(TIFF_DRAWS.has(tag));
|
|
28267
28267
|
out.copyWithin(ifd + 2 + kept++ * 12, at, at + 12);
|
|
28268
28268
|
}
|
|
28269
|
-
check$
|
|
28269
|
+
check$2(kept > 0);
|
|
28270
28270
|
const end = ifd + 2 + kept * 12;
|
|
28271
28271
|
out.set(little ? [kept & 255, kept >> 8] : [kept >> 8, kept & 255], ifd);
|
|
28272
28272
|
out.set(b.subarray(next, next + 4), end);
|
|
@@ -28332,7 +28332,8 @@ async function withoutPictureMetadata(source, mime) {
|
|
|
28332
28332
|
*
|
|
28333
28333
|
* Fail-closed: a file that is an MP4 or QuickTime video, by its bytes or by its type, and whose metadata cannot be
|
|
28334
28334
|
* removed (truncated, malformed, a part of its movie this does not know) is refused with `NO_VIDEO_METADATA`, never sent as it was.
|
|
28335
|
-
* A picture (HEIF is pictureMetadata.ts's)
|
|
28335
|
+
* A picture (HEIF is pictureMetadata.ts's) and any other file go as they are; so does a file without a video track (an
|
|
28336
|
+
* M4A) here: audioMetadata.ts strips it.
|
|
28336
28337
|
*/
|
|
28337
28338
|
var VIDEO_METADATA_LIMITS = {
|
|
28338
28339
|
/** The largest `moov` or `moof` read whole, and the most bytes of a metadata track's chunk: past this the video is refused. */
|
|
@@ -28468,25 +28469,25 @@ var VISUAL = /* @__PURE__ */ new Set([
|
|
|
28468
28469
|
"pict"
|
|
28469
28470
|
]);
|
|
28470
28471
|
/** Zeros put in a Blob a slice at a time: a Blob's Blob parts are not copied, so a zeroed range of any size holds no more. */
|
|
28471
|
-
var ZEROS = new Blob([/* @__PURE__ */ new Uint8Array(1048576)]);
|
|
28472
|
+
var ZEROS$1 = new Blob([/* @__PURE__ */ new Uint8Array(1048576)]);
|
|
28472
28473
|
var u32be = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
|
|
28473
|
-
var text = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
|
|
28474
|
+
var text$1 = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
|
|
28474
28475
|
/** Refuses the video where its bytes are not what this expects. */
|
|
28475
|
-
function check(ok) {
|
|
28476
|
+
function check$1(ok) {
|
|
28476
28477
|
if (!ok) throw new Error(NO_VIDEO_METADATA);
|
|
28477
28478
|
}
|
|
28478
28479
|
/** A box's header at `at` of `b` (`base` its offset in the file), up to `end` (a size of 0 runs to it). */
|
|
28479
28480
|
function header(b, at, end, base = 0) {
|
|
28480
|
-
check(at + 8 <= b.length);
|
|
28481
|
+
check$1(at + 8 <= b.length);
|
|
28481
28482
|
let size = u32be(b, at), body = at + 8;
|
|
28482
|
-
const type = text(b, at + 4, 4);
|
|
28483
|
+
const type = text$1(b, at + 4, 4);
|
|
28483
28484
|
if (size === 1) {
|
|
28484
|
-
check(at + 16 <= b.length);
|
|
28485
|
+
check$1(at + 16 <= b.length);
|
|
28485
28486
|
size = u32be(b, at + 8) * 2 ** 32 + u32be(b, at + 12);
|
|
28486
28487
|
body = at + 16;
|
|
28487
28488
|
} else if (size === 0) size = end - (base + at);
|
|
28488
28489
|
if (type === "uuid") body += 16;
|
|
28489
|
-
check(Number.isSafeInteger(size) && size >= body - at && base + at + size <= end);
|
|
28490
|
+
check$1(Number.isSafeInteger(size) && size >= body - at && base + at + size <= end);
|
|
28490
28491
|
return {
|
|
28491
28492
|
type,
|
|
28492
28493
|
start: base + at,
|
|
@@ -28497,7 +28498,7 @@ function header(b, at, end, base = 0) {
|
|
|
28497
28498
|
function boxes(b, start, end) {
|
|
28498
28499
|
const found = [];
|
|
28499
28500
|
for (let at = start; at < end;) {
|
|
28500
|
-
check(at + 8 <= end);
|
|
28501
|
+
check$1(at + 8 <= end);
|
|
28501
28502
|
const box = header(b.subarray(0, end), at, end);
|
|
28502
28503
|
found.push(box);
|
|
28503
28504
|
at = box.end;
|
|
@@ -28531,32 +28532,32 @@ function emptyWithin(b, start, end) {
|
|
|
28531
28532
|
*/
|
|
28532
28533
|
function zeroCompressorNames(b, stbl) {
|
|
28533
28534
|
const stsd = child(b, stbl, "stsd");
|
|
28534
|
-
check(!!stsd && stsd.body + 8 <= stsd.end);
|
|
28535
|
+
check$1(!!stsd && stsd.body + 8 <= stsd.end);
|
|
28535
28536
|
for (const entry of boxes(b, stsd.body + 8, stsd.end)) {
|
|
28536
|
-
check(entry.body + 74 <= entry.end);
|
|
28537
|
+
check$1(entry.body + 74 <= entry.end);
|
|
28537
28538
|
b.fill(0, entry.body + 42, entry.body + 74);
|
|
28538
28539
|
}
|
|
28539
28540
|
}
|
|
28540
28541
|
/** A `mvhd`, `tkhd` or `mdhd` with its creation and modification times zeroed: 32 bits each in version 0, 64 in 1. */
|
|
28541
28542
|
function zeroTimes(b, box) {
|
|
28542
28543
|
const version = b[box.body], bytes = version === 1 ? 16 : 8;
|
|
28543
|
-
check(version <= 1 && box.body + 4 + bytes <= box.end);
|
|
28544
|
+
check$1(version <= 1 && box.body + 4 + bytes <= box.end);
|
|
28544
28545
|
b.fill(0, box.body + 4, box.body + 4 + bytes);
|
|
28545
28546
|
}
|
|
28546
28547
|
var child = (b, parent, type) => {
|
|
28547
28548
|
if (!parent) return void 0;
|
|
28548
28549
|
const of = boxes(b, parent.body, parent.end).filter((box) => box.type === type);
|
|
28549
|
-
check(of.length <= 1);
|
|
28550
|
+
check$1(of.length <= 1);
|
|
28550
28551
|
return of[0];
|
|
28551
28552
|
};
|
|
28552
28553
|
/** A sample table's chunks, from its `stco` or `co64`: how many, and where each starts in the file. */
|
|
28553
28554
|
function chunkOffsets(b, stbl) {
|
|
28554
28555
|
const stco = child(b, stbl, "stco"), co64 = child(b, stbl, "co64");
|
|
28555
|
-
check(!!stco !== !!co64);
|
|
28556
|
+
check$1(!!stco !== !!co64);
|
|
28556
28557
|
const offsets = stco ?? co64;
|
|
28557
|
-
check(offsets.body + 8 <= offsets.end);
|
|
28558
|
+
check$1(offsets.body + 8 <= offsets.end);
|
|
28558
28559
|
const chunks = u32be(b, offsets.body + 4);
|
|
28559
|
-
check(offsets.body + 8 + chunks * (co64 ? 8 : 4) <= offsets.end);
|
|
28560
|
+
check$1(offsets.body + 8 + chunks * (co64 ? 8 : 4) <= offsets.end);
|
|
28560
28561
|
const offsetOf = (i) => co64 ? u32be(b, co64.body + 8 + i * 8) * 2 ** 32 + u32be(b, co64.body + 12 + i * 8) : u32be(b, stco.body + 8 + i * 4);
|
|
28561
28562
|
return {
|
|
28562
28563
|
chunks,
|
|
@@ -28566,8 +28567,8 @@ function chunkOffsets(b, stbl) {
|
|
|
28566
28567
|
/** The byte ranges of a track's samples in the file, one per chunk, from its sample table. */
|
|
28567
28568
|
function sampleRanges(b, stbl) {
|
|
28568
28569
|
const stsz = child(b, stbl, "stsz"), stz2 = child(b, stbl, "stz2"), stsc = child(b, stbl, "stsc");
|
|
28569
|
-
check(!!stsc && !!stsz !== !!stz2);
|
|
28570
|
-
const need = (box, at, bytes) => check(at + bytes <= box.end);
|
|
28570
|
+
check$1(!!stsc && !!stsz !== !!stz2);
|
|
28571
|
+
const need = (box, at, bytes) => check$1(at + bytes <= box.end);
|
|
28571
28572
|
const sizeTable = stsz ?? stz2;
|
|
28572
28573
|
need(sizeTable, sizeTable.body, 12);
|
|
28573
28574
|
const count = u32be(b, sizeTable.body + 8);
|
|
@@ -28580,7 +28581,7 @@ function sampleRanges(b, stbl) {
|
|
|
28580
28581
|
sizeOf = (i) => u32be(b, stsz.body + 12 + i * 4);
|
|
28581
28582
|
} else {
|
|
28582
28583
|
const field = b[stz2.body + 7];
|
|
28583
|
-
check(field === 4 || field === 8 || field === 16);
|
|
28584
|
+
check$1(field === 4 || field === 8 || field === 16);
|
|
28584
28585
|
need(stz2, stz2.body + 12, Math.ceil(count * field / 8));
|
|
28585
28586
|
const at = stz2.body + 12;
|
|
28586
28587
|
sizeOf = field === 16 ? (i) => b[at + i * 2] << 8 | b[at + i * 2 + 1] : field === 8 ? (i) => b[at + i] : (i) => i & 1 ? b[at + (i >> 1)] & 15 : b[at + (i >> 1)] >> 4;
|
|
@@ -28594,18 +28595,18 @@ function sampleRanges(b, stbl) {
|
|
|
28594
28595
|
for (let run = 0; run < runs; run++) {
|
|
28595
28596
|
const first = u32be(b, stsc.body + 8 + run * 12), perChunk = u32be(b, stsc.body + 12 + run * 12);
|
|
28596
28597
|
const last = run + 1 < runs ? u32be(b, stsc.body + 8 + (run + 1) * 12) : chunks + 1;
|
|
28597
|
-
check(first >= 1 && last > first && last <= chunks + 1);
|
|
28598
|
+
check$1(first >= 1 && last > first && last <= chunks + 1);
|
|
28598
28599
|
for (let chunk = first; chunk < last; chunk++) {
|
|
28599
28600
|
const start = offsetOf(chunk - 1);
|
|
28600
|
-
check(sample + perChunk <= count);
|
|
28601
|
+
check$1(sample + perChunk <= count);
|
|
28601
28602
|
let length = uniform * perChunk;
|
|
28602
28603
|
if (!uniform) for (let i = 0; i < perChunk; i++) length += sizeOf(sample + i);
|
|
28603
28604
|
sample += perChunk;
|
|
28604
|
-
check(Number.isSafeInteger(start) && length <= VIDEO_METADATA_LIMITS.maxBoxBytes);
|
|
28605
|
+
check$1(Number.isSafeInteger(start) && length <= VIDEO_METADATA_LIMITS.maxBoxBytes);
|
|
28605
28606
|
if (length) ranges.push([start, start + length]);
|
|
28606
28607
|
}
|
|
28607
28608
|
}
|
|
28608
|
-
check(sample === count);
|
|
28609
|
+
check$1(sample === count);
|
|
28609
28610
|
return ranges;
|
|
28610
28611
|
}
|
|
28611
28612
|
/** Each track's default sample size in fragments, from `moov`'s `mvex/trex` boxes, by track ID. */
|
|
@@ -28614,7 +28615,7 @@ function defaultSampleSizes(moov) {
|
|
|
28614
28615
|
const mvex = child(moov, header(moov, 0, moov.length), "mvex");
|
|
28615
28616
|
for (const trex of mvex ? boxes(moov, mvex.body, mvex.end) : []) {
|
|
28616
28617
|
if (trex.type !== "trex") continue;
|
|
28617
|
-
check(trex.body + 24 <= trex.end);
|
|
28618
|
+
check$1(trex.body + 24 <= trex.end);
|
|
28618
28619
|
sizes.set(u32be(moov, trex.body + 4), u32be(moov, trex.body + 16));
|
|
28619
28620
|
}
|
|
28620
28621
|
return sizes;
|
|
@@ -28632,11 +28633,11 @@ function fragmentRanges(b, at, sizes) {
|
|
|
28632
28633
|
for (const traf of boxes(b, header(b, 0, b.length).body, b.length)) {
|
|
28633
28634
|
if (traf.type !== "traf") continue;
|
|
28634
28635
|
const tfhd = child(b, traf, "tfhd");
|
|
28635
|
-
check(!!tfhd && tfhd.body + 8 <= tfhd.end);
|
|
28636
|
+
check$1(!!tfhd && tfhd.body + 8 <= tfhd.end);
|
|
28636
28637
|
const flags = u32be(b, tfhd.body) & 16777215;
|
|
28637
28638
|
let field = tfhd.body + 8, base = flags & 131072 ? at : previous;
|
|
28638
28639
|
if (flags & 1) {
|
|
28639
|
-
check(field + 8 <= tfhd.end);
|
|
28640
|
+
check$1(field + 8 <= tfhd.end);
|
|
28640
28641
|
base = u32be(b, field) * 2 ** 32 + u32be(b, field + 4);
|
|
28641
28642
|
field += 8;
|
|
28642
28643
|
}
|
|
@@ -28645,17 +28646,17 @@ function fragmentRanges(b, at, sizes) {
|
|
|
28645
28646
|
const track = u32be(b, tfhd.body + 4);
|
|
28646
28647
|
let size = sizes.get(track);
|
|
28647
28648
|
if (flags & 16) {
|
|
28648
|
-
check(field + 4 <= tfhd.end);
|
|
28649
|
+
check$1(field + 4 <= tfhd.end);
|
|
28649
28650
|
size = u32be(b, field);
|
|
28650
28651
|
}
|
|
28651
28652
|
let next = base;
|
|
28652
28653
|
for (const trun of boxes(b, traf.body, traf.end)) {
|
|
28653
28654
|
if (trun.type !== "trun") continue;
|
|
28654
|
-
check(trun.body + 8 <= trun.end);
|
|
28655
|
+
check$1(trun.body + 8 <= trun.end);
|
|
28655
28656
|
const runFlags = u32be(b, trun.body) & 16777215, count = u32be(b, trun.body + 4);
|
|
28656
28657
|
let field = trun.body + 8;
|
|
28657
28658
|
if (runFlags & 1) {
|
|
28658
|
-
check(field + 4 <= trun.end);
|
|
28659
|
+
check$1(field + 4 <= trun.end);
|
|
28659
28660
|
next = base + (u32be(b, field) | 0);
|
|
28660
28661
|
field += 4;
|
|
28661
28662
|
}
|
|
@@ -28666,16 +28667,16 @@ function fragmentRanges(b, at, sizes) {
|
|
|
28666
28667
|
1024,
|
|
28667
28668
|
2048
|
|
28668
28669
|
].filter((flag) => runFlags & flag).length * 4;
|
|
28669
|
-
check(field + count * stride <= trun.end);
|
|
28670
|
+
check$1(field + count * stride <= trun.end);
|
|
28670
28671
|
let length = 0;
|
|
28671
28672
|
if (runFlags & 512) {
|
|
28672
28673
|
const sizeAt = field + (runFlags & 256 ? 4 : 0);
|
|
28673
28674
|
for (let i = 0; i < count; i++) length += u32be(b, sizeAt + i * stride);
|
|
28674
28675
|
} else if (count) {
|
|
28675
|
-
check(size !== void 0);
|
|
28676
|
+
check$1(size !== void 0);
|
|
28676
28677
|
length = count * size;
|
|
28677
28678
|
}
|
|
28678
|
-
check(Number.isSafeInteger(next) && Number.isSafeInteger(next + length));
|
|
28679
|
+
check$1(Number.isSafeInteger(next) && Number.isSafeInteger(next + length));
|
|
28679
28680
|
if (length) ranges.push([
|
|
28680
28681
|
next,
|
|
28681
28682
|
next + length,
|
|
@@ -28707,7 +28708,7 @@ function stripMoov(b) {
|
|
|
28707
28708
|
empty(b, box);
|
|
28708
28709
|
continue;
|
|
28709
28710
|
}
|
|
28710
|
-
check(MOOV_KEEPS.has(box.type));
|
|
28711
|
+
check$1(MOOV_KEEPS.has(box.type));
|
|
28711
28712
|
if (SPACE.has(box.type)) b.fill(0, box.body, box.end);
|
|
28712
28713
|
if (box.type === "mvhd") zeroTimes(b, box);
|
|
28713
28714
|
if (box.type === "mvex") {
|
|
@@ -28721,39 +28722,39 @@ function stripMoov(b) {
|
|
|
28721
28722
|
empty(b, part);
|
|
28722
28723
|
continue;
|
|
28723
28724
|
}
|
|
28724
|
-
check(TRAK_KEEPS.has(part.type));
|
|
28725
|
+
check$1(TRAK_KEEPS.has(part.type));
|
|
28725
28726
|
if (part.type === "tkhd") {
|
|
28726
|
-
check(!tkhd);
|
|
28727
|
+
check$1(!tkhd);
|
|
28727
28728
|
tkhd = part;
|
|
28728
28729
|
zeroTimes(b, part);
|
|
28729
28730
|
}
|
|
28730
28731
|
if (part.type === "mdia") {
|
|
28731
|
-
check(!mdia);
|
|
28732
|
+
check$1(!mdia);
|
|
28732
28733
|
mdia = part;
|
|
28733
28734
|
}
|
|
28734
28735
|
}
|
|
28735
|
-
check(!!mdia);
|
|
28736
|
+
check$1(!!mdia);
|
|
28736
28737
|
const hdlr = child(b, mdia, "hdlr"), minf = child(b, mdia, "minf"), mdhd = child(b, mdia, "mdhd");
|
|
28737
|
-
check(!!hdlr && !!minf && hdlr.body + 12 <= hdlr.end);
|
|
28738
|
+
check$1(!!hdlr && !!minf && hdlr.body + 12 <= hdlr.end);
|
|
28738
28739
|
if (mdhd) zeroTimes(b, mdhd);
|
|
28739
|
-
const handler = text(b, hdlr.body + 8, 4);
|
|
28740
|
+
const handler = text$1(b, hdlr.body + 8, 4);
|
|
28740
28741
|
const stbl = child(b, minf, "stbl");
|
|
28741
|
-
check(!!stbl);
|
|
28742
|
+
check$1(!!stbl);
|
|
28742
28743
|
tables.push(stbl);
|
|
28743
28744
|
if (handler === "meta") {
|
|
28744
|
-
check(selfContained(b, minf));
|
|
28745
|
+
check$1(selfContained(b, minf));
|
|
28745
28746
|
metadata = true;
|
|
28746
28747
|
for (const range of sampleRanges(b, stbl)) zeroed.push(range);
|
|
28747
28748
|
} else if (handler === "tmcd" && selfContained(b, minf)) {
|
|
28748
28749
|
metadata = true;
|
|
28749
28750
|
for (const range of sampleRanges(b, stbl)) zeroed.push(range);
|
|
28750
28751
|
} else if (CAPTIONS.has(handler)) {
|
|
28751
|
-
check(selfContained(b, minf) && !!tkhd);
|
|
28752
|
+
check$1(selfContained(b, minf) && !!tkhd);
|
|
28752
28753
|
const id = tkhd.body + 4 + (b[tkhd.body] === 1 ? 16 : 8);
|
|
28753
|
-
check(id + 4 <= tkhd.end);
|
|
28754
|
+
check$1(id + 4 <= tkhd.end);
|
|
28754
28755
|
captions.add(u32be(b, id));
|
|
28755
28756
|
for (const range of sampleRanges(b, stbl)) zeroed.push(range);
|
|
28756
|
-
} else check(HANDLERS.has(handler));
|
|
28757
|
+
} else check$1(HANDLERS.has(handler));
|
|
28757
28758
|
if (handler === "vide") video = true;
|
|
28758
28759
|
if (VISUAL.has(handler)) zeroCompressorNames(b, stbl);
|
|
28759
28760
|
emptyWithin(b, box.body, box.end);
|
|
@@ -28811,9 +28812,9 @@ async function headerAt(source, at) {
|
|
|
28811
28812
|
}
|
|
28812
28813
|
/** A box read whole, within the limit. */
|
|
28813
28814
|
async function whole(source, box) {
|
|
28814
|
-
check(box.end - box.start <= VIDEO_METADATA_LIMITS.maxBoxBytes);
|
|
28815
|
+
check$1(box.end - box.start <= VIDEO_METADATA_LIMITS.maxBoxBytes);
|
|
28815
28816
|
const bytes = await source.read(box.start, box.end - box.start);
|
|
28816
|
-
check(bytes.length === box.end - box.start);
|
|
28817
|
+
check$1(bytes.length === box.end - box.start);
|
|
28817
28818
|
return bytes;
|
|
28818
28819
|
}
|
|
28819
28820
|
/**
|
|
@@ -28822,7 +28823,7 @@ async function whole(source, box) {
|
|
|
28822
28823
|
* pictureMetadata.ts's.
|
|
28823
28824
|
*/
|
|
28824
28825
|
function containerOf(head, mime) {
|
|
28825
|
-
const first = head.length >= 8 ? text(head, 4, 4) : "";
|
|
28826
|
+
const first = head.length >= 8 ? text$1(head, 4, 4) : "";
|
|
28826
28827
|
if (isStrippedPicture(head, mime)) return void 0;
|
|
28827
28828
|
if (FIRST_BOXES.has(first)) return "movie";
|
|
28828
28829
|
return TOP_KEEPS.has(first) || TOP_EMPTIED.has(first) ? "boxes" : void 0;
|
|
@@ -28843,7 +28844,7 @@ async function withoutVideoMetadata(source, mime) {
|
|
|
28843
28844
|
for (const patch of patches) {
|
|
28844
28845
|
if (patch.start > at) parts.push(source.slice(at, patch.start));
|
|
28845
28846
|
if (patch.bytes) parts.push(patch.bytes);
|
|
28846
|
-
else for (let left = patch.end - patch.start; left > 0; left -= ZEROS.size) parts.push(ZEROS.slice(0, Math.min(left, ZEROS.size)));
|
|
28847
|
+
else for (let left = patch.end - patch.start; left > 0; left -= ZEROS$1.size) parts.push(ZEROS$1.slice(0, Math.min(left, ZEROS$1.size)));
|
|
28847
28848
|
at = patch.end;
|
|
28848
28849
|
}
|
|
28849
28850
|
if (at < source.size) parts.push(source.slice(at));
|
|
@@ -28852,9 +28853,9 @@ async function withoutVideoMetadata(source, mime) {
|
|
|
28852
28853
|
/**
|
|
28853
28854
|
* What `withoutVideoMetadata` changes in a video read from `source` (one not held in a Blob: a file kept in storage):
|
|
28854
28855
|
* the parts replaced, in order and apart, the rest of its bytes going as they are; undefined when it goes as it is.
|
|
28855
|
-
* Throws `NO_VIDEO_METADATA` as it does.
|
|
28856
|
+
* Throws `NO_VIDEO_METADATA` as it does. With `audio`, a movie without a video track (an M4A) is stripped too.
|
|
28856
28857
|
*/
|
|
28857
|
-
async function videoMetadataPatches(file, mime) {
|
|
28858
|
+
async function videoMetadataPatches(file, mime, audio = false) {
|
|
28858
28859
|
const source = readingAhead(file);
|
|
28859
28860
|
const head = await source.read(0, VIDEO_METADATA_LIMITS.headBytes);
|
|
28860
28861
|
const typed = STRIPPED_TYPES.has(mime.split(";")[0].trim().toLowerCase());
|
|
@@ -28870,7 +28871,7 @@ async function videoMetadataPatches(file, mime) {
|
|
|
28870
28871
|
const dropped = [];
|
|
28871
28872
|
let trailer = false;
|
|
28872
28873
|
for (let at = 0; at < source.size;) {
|
|
28873
|
-
check(top.length < VIDEO_METADATA_LIMITS.maxBoxes);
|
|
28874
|
+
check$1(top.length < VIDEO_METADATA_LIMITS.maxBoxes);
|
|
28874
28875
|
const box = await headerAt(source, at);
|
|
28875
28876
|
if (!box || top.length && box.type === "\0\0\0\0") {
|
|
28876
28877
|
patches.push({
|
|
@@ -28888,13 +28889,13 @@ async function videoMetadataPatches(file, mime) {
|
|
|
28888
28889
|
}
|
|
28889
28890
|
const moovs = top.filter((box) => box.type === "moov");
|
|
28890
28891
|
if (!moovs.length && container === "boxes" && !typed) {
|
|
28891
|
-
check(!trailer && top.every((box) => TOP_KEEPS.has(box.type) || TOP_EMPTIED.has(box.type)));
|
|
28892
|
+
check$1(!trailer && top.every((box) => TOP_KEEPS.has(box.type) || TOP_EMPTIED.has(box.type)));
|
|
28892
28893
|
return;
|
|
28893
28894
|
}
|
|
28894
|
-
check(moovs.length === 1);
|
|
28895
|
+
check$1(moovs.length === 1);
|
|
28895
28896
|
const moov = await whole(source, moovs[0]);
|
|
28896
28897
|
const { video, fragmented, metadata, zeroed, tables, captions } = stripMoov(moov);
|
|
28897
|
-
if (!video && !typed) return void 0;
|
|
28898
|
+
if (!video && !typed && !audio) return void 0;
|
|
28898
28899
|
patches.push({
|
|
28899
28900
|
start: moovs[0].start,
|
|
28900
28901
|
end: moovs[0].end,
|
|
@@ -28904,15 +28905,15 @@ async function videoMetadataPatches(file, mime) {
|
|
|
28904
28905
|
const { chunks, offsetOf } = chunkOffsets(moov, stbl);
|
|
28905
28906
|
for (let i = 0; i < chunks; i++) {
|
|
28906
28907
|
const offset = offsetOf(i);
|
|
28907
|
-
check(!meets(dropped, offset, offset + 1));
|
|
28908
|
+
check$1(!meets(dropped, offset, offset + 1));
|
|
28908
28909
|
}
|
|
28909
28910
|
}
|
|
28910
|
-
check(!fragmented || !metadata);
|
|
28911
|
+
check$1(!fragmented || !metadata);
|
|
28911
28912
|
const sizes = (dropped.length || captions.size) && fragmented ? defaultSampleSizes(moov) : void 0;
|
|
28912
28913
|
for (const box of top) if (box.type === "moof") {
|
|
28913
28914
|
const moof = await whole(source, box);
|
|
28914
28915
|
if (dropped.length || captions.size) for (const [start, end, track] of fragmentRanges(moof, box.start, sizes ?? /* @__PURE__ */ new Map())) {
|
|
28915
|
-
check(!meets(dropped, start, end));
|
|
28916
|
+
check$1(!meets(dropped, start, end));
|
|
28916
28917
|
if (captions.has(track)) zeroed.push([start, end]);
|
|
28917
28918
|
}
|
|
28918
28919
|
emptyWithin(moof, box.body - box.start, moof.length);
|
|
@@ -28946,7 +28947,7 @@ async function videoMetadataPatches(file, mime) {
|
|
|
28946
28947
|
const mdats = top.filter((box) => box.type === "mdat");
|
|
28947
28948
|
const merged = [];
|
|
28948
28949
|
for (const [start, end] of zeroed.sort((a, b) => a[0] - b[0])) {
|
|
28949
|
-
check(mdats.some((mdat) => start >= mdat.body && end <= mdat.end));
|
|
28950
|
+
check$1(mdats.some((mdat) => start >= mdat.body && end <= mdat.end));
|
|
28950
28951
|
const last = merged[merged.length - 1];
|
|
28951
28952
|
if (last && start <= last[1]) last[1] = Math.max(last[1], end);
|
|
28952
28953
|
else merged.push([start, end]);
|
|
@@ -28957,12 +28958,629 @@ async function videoMetadataPatches(file, mime) {
|
|
|
28957
28958
|
});
|
|
28958
28959
|
let at = 0;
|
|
28959
28960
|
for (const patch of patches.sort((a, b) => a.start - b.start)) {
|
|
28960
|
-
check(patch.start >= at);
|
|
28961
|
+
check$1(patch.start >= at);
|
|
28961
28962
|
at = patch.end;
|
|
28962
28963
|
}
|
|
28963
28964
|
return patches;
|
|
28964
28965
|
}
|
|
28965
28966
|
//#endregion
|
|
28967
|
+
//#region ../core/src/audioMetadata.ts
|
|
28968
|
+
/**
|
|
28969
|
+
* What an audio file leaves with. A recording made in another app, or a song a tagger went through, says more than its
|
|
28970
|
+
* sound: a title or a file name that is where it was recorded (a phone's recorder names it after the place), a comment,
|
|
28971
|
+
* a location tag, a picture, the date. The sender removes them before the file is stored and its digest computed, as
|
|
28972
|
+
* pictures' and videos' are (pictureMetadata.ts, videoMetadata.ts), without decoding or re-encoding a sample, and the
|
|
28973
|
+
* file keeps its size, so no offset in it moves and it plays as it did:
|
|
28974
|
+
*
|
|
28975
|
+
* - MP4 audio (M4A, a voice note recorded in MP4): videoMetadata.ts's box walk, its `udta` and `meta` emptied.
|
|
28976
|
+
* - MP3 and AAC: an ID3v2 tag at the start becomes an empty one (its frames zeros: padding), one at the end (with its
|
|
28977
|
+
* footer), an APEv2 tag's items, a Lyrics3v2 tag and an ID3v1 tag's fields become zeros.
|
|
28978
|
+
* - FLAC: every metadata block but its stream info and seek table (a Vorbis comment, a picture, a cue sheet, an
|
|
28979
|
+
* application's) becomes padding, zeroed.
|
|
28980
|
+
* - Ogg Opus, Vorbis and Speex: the comment header keeps its vendor (the encoder's name) and has no comment, the bytes
|
|
28981
|
+
* after it zeros; each page it changed has its checksum made again.
|
|
28982
|
+
* - WAV: every chunk but its format, data and the ones of the sound itself (`fact`, `cue `, `smpl`, `inst`) becomes
|
|
28983
|
+
* `JUNK`, zeroed (an INFO list, an `id3 ` chunk, a broadcast `bext` with its date and originator, XMP).
|
|
28984
|
+
* - WebM and Matroska, audio or video: `Tags`, `Attachments`, `Chapters`, the title, the date, the file names and each
|
|
28985
|
+
* track's name become `Void` elements (and the SeekHead's entries for them); the muxer's and the writing app's names
|
|
28986
|
+
* are zeroed. Clusters, cues and track settings are kept as they are.
|
|
28987
|
+
*
|
|
28988
|
+
* Fail-closed: a file that is one of these by its bytes and whose tags cannot be removed (truncated, malformed) is
|
|
28989
|
+
* refused with `NO_AUDIO_METADATA`, never sent as it was. Any other file goes as it is (other audio formats too).
|
|
28990
|
+
*/
|
|
28991
|
+
var AUDIO_METADATA_LIMITS = {
|
|
28992
|
+
/** The largest header, element or tag read whole (an Ogg comment header with a picture in it): past this the file is refused. */
|
|
28993
|
+
maxReadBytes: 67108864,
|
|
28994
|
+
/** The most pages, chunks, blocks or elements walked. */
|
|
28995
|
+
maxParts: 1e6,
|
|
28996
|
+
/** Bytes read first to tell an audio file from another file. */
|
|
28997
|
+
headBytes: 64
|
|
28998
|
+
};
|
|
28999
|
+
/** Why an audio file is refused: its tags could not be removed, so it does not go at all. */
|
|
29000
|
+
var NO_AUDIO_METADATA = "This audio cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded";
|
|
29001
|
+
/** Zeros put in a Blob a slice at a time: a Blob's Blob parts are not copied, so a zeroed range of any size holds no more. */
|
|
29002
|
+
var ZEROS = new Blob([/* @__PURE__ */ new Uint8Array(1048576)]);
|
|
29003
|
+
var text = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
|
|
29004
|
+
var u32le = (b, at) => (b[at] | b[at + 1] << 8 | b[at + 2] << 16 | b[at + 3] << 24) >>> 0;
|
|
29005
|
+
var syncsafe = (b, at) => b[at] << 21 | b[at + 1] << 14 | b[at + 2] << 7 | b[at + 3];
|
|
29006
|
+
var latin = (s) => Uint8Array.from(s, (c) => c.charCodeAt(0));
|
|
29007
|
+
/** Refuses the file where its bytes are not what this expects. */
|
|
29008
|
+
function check(ok) {
|
|
29009
|
+
if (!ok) throw new Error(NO_AUDIO_METADATA);
|
|
29010
|
+
}
|
|
29011
|
+
function exactly(source) {
|
|
29012
|
+
return async (offset, length) => {
|
|
29013
|
+
check(offset >= 0 && length >= 0 && length <= AUDIO_METADATA_LIMITS.maxReadBytes && offset + length <= source.size);
|
|
29014
|
+
const bytes = await source.read(offset, length);
|
|
29015
|
+
check(bytes.length === length);
|
|
29016
|
+
return bytes;
|
|
29017
|
+
};
|
|
29018
|
+
}
|
|
29019
|
+
/** Counts the parts walked, so a file of millions of tiny ones is refused rather than walked forever. */
|
|
29020
|
+
function counter() {
|
|
29021
|
+
let parts = 0;
|
|
29022
|
+
return () => check(++parts <= AUDIO_METADATA_LIMITS.maxParts);
|
|
29023
|
+
}
|
|
29024
|
+
/** An ID3v2 header at `at` of `b`: its version 2 to 4 and its size four 7-bit bytes, or none. */
|
|
29025
|
+
var isId3 = (b, at = 0) => b.length >= at + 10 && text(b, at, 3) === "ID3" && b[at + 3] >= 2 && b[at + 3] <= 4 && b[at + 4] !== 255 && [
|
|
29026
|
+
6,
|
|
29027
|
+
7,
|
|
29028
|
+
8,
|
|
29029
|
+
9
|
|
29030
|
+
].every((i) => b[at + i] < 128);
|
|
29031
|
+
/**
|
|
29032
|
+
* The ID3v2 tag whose header is `head`, at `at`: made an empty one where it is, its frames (and an extended header)
|
|
29033
|
+
* zeros, which is its padding, its flags but the footer's cleared. Returns where it ends.
|
|
29034
|
+
*/
|
|
29035
|
+
async function emptyId3(read, size, at, head, patches) {
|
|
29036
|
+
const body = syncsafe(head, 6), footer = head[3] === 4 && head[5] & 16 ? 10 : 0, end = at + 10 + body + footer;
|
|
29037
|
+
check(end <= size);
|
|
29038
|
+
const flags = Uint8Array.of(footer ? 16 : 0);
|
|
29039
|
+
patches.push({
|
|
29040
|
+
start: at + 5,
|
|
29041
|
+
end: at + 6,
|
|
29042
|
+
bytes: flags
|
|
29043
|
+
});
|
|
29044
|
+
if (body) patches.push({
|
|
29045
|
+
start: at + 10,
|
|
29046
|
+
end: at + 10 + body
|
|
29047
|
+
});
|
|
29048
|
+
if (footer) {
|
|
29049
|
+
check(text(await read(at + 10 + body, 3), 0, 3) === "3DI");
|
|
29050
|
+
patches.push({
|
|
29051
|
+
start: at + 10 + body + 5,
|
|
29052
|
+
end: at + 10 + body + 6,
|
|
29053
|
+
bytes: flags
|
|
29054
|
+
});
|
|
29055
|
+
}
|
|
29056
|
+
return end;
|
|
29057
|
+
}
|
|
29058
|
+
/**
|
|
29059
|
+
* The tags at the end of an MP3 or AAC file (after `start`): an ID3v1 (and its extended part), then any of an APEv2
|
|
29060
|
+
* tag, a Lyrics3v2 tag and an ID3v2 tag with a footer, in any order. Each found is emptied where it is.
|
|
29061
|
+
*/
|
|
29062
|
+
async function trailingTags(read, size, start, patches) {
|
|
29063
|
+
let end = size;
|
|
29064
|
+
if (end - 128 >= start && text(await read(end - 128, 3), 0, 3) === "TAG") {
|
|
29065
|
+
patches.push({
|
|
29066
|
+
start: end - 125,
|
|
29067
|
+
end: end - 1
|
|
29068
|
+
}, {
|
|
29069
|
+
start: end - 1,
|
|
29070
|
+
end,
|
|
29071
|
+
bytes: Uint8Array.of(255)
|
|
29072
|
+
});
|
|
29073
|
+
end -= 128;
|
|
29074
|
+
if (end - 227 >= start && text(await read(end - 227, 4), 0, 4) === "TAG+") {
|
|
29075
|
+
patches.push({
|
|
29076
|
+
start: end - 223,
|
|
29077
|
+
end
|
|
29078
|
+
});
|
|
29079
|
+
end -= 227;
|
|
29080
|
+
}
|
|
29081
|
+
}
|
|
29082
|
+
const count = counter();
|
|
29083
|
+
for (;;) {
|
|
29084
|
+
count();
|
|
29085
|
+
if (end - 32 >= start) {
|
|
29086
|
+
const footer = await read(end - 32, 32);
|
|
29087
|
+
if (text(footer, 0, 8) === "APETAGEX") {
|
|
29088
|
+
const length = u32le(footer, 12), header = footer[23] & 128 ? 32 : 0, tagStart = end - length - header;
|
|
29089
|
+
check(length >= 32 && tagStart >= start);
|
|
29090
|
+
if (header) {
|
|
29091
|
+
check(text(await read(tagStart, 8), 0, 8) === "APETAGEX");
|
|
29092
|
+
patches.push({
|
|
29093
|
+
start: tagStart + 16,
|
|
29094
|
+
end: tagStart + 20
|
|
29095
|
+
});
|
|
29096
|
+
}
|
|
29097
|
+
if (length > 32) patches.push({
|
|
29098
|
+
start: tagStart + header,
|
|
29099
|
+
end: end - 32
|
|
29100
|
+
});
|
|
29101
|
+
patches.push({
|
|
29102
|
+
start: end - 16,
|
|
29103
|
+
end: end - 12
|
|
29104
|
+
});
|
|
29105
|
+
end = tagStart;
|
|
29106
|
+
continue;
|
|
29107
|
+
}
|
|
29108
|
+
}
|
|
29109
|
+
if (end - 15 >= start) {
|
|
29110
|
+
const footer = await read(end - 15, 15);
|
|
29111
|
+
if (text(footer, 6, 9) === "LYRICS200") {
|
|
29112
|
+
const length = /^\d{6}$/.test(text(footer, 0, 6)) ? Number(text(footer, 0, 6)) : -1, tagStart = end - 15 - length;
|
|
29113
|
+
check(length >= 11 && tagStart >= start && text(await read(tagStart, 11), 0, 11) === "LYRICSBEGIN");
|
|
29114
|
+
if (length > 11) patches.push({
|
|
29115
|
+
start: tagStart + 11,
|
|
29116
|
+
end: end - 15
|
|
29117
|
+
});
|
|
29118
|
+
end = tagStart;
|
|
29119
|
+
continue;
|
|
29120
|
+
}
|
|
29121
|
+
}
|
|
29122
|
+
if (end - 10 >= start) {
|
|
29123
|
+
const footer = await read(end - 10, 10);
|
|
29124
|
+
if (text(footer, 0, 3) === "3DI") {
|
|
29125
|
+
check([
|
|
29126
|
+
6,
|
|
29127
|
+
7,
|
|
29128
|
+
8,
|
|
29129
|
+
9
|
|
29130
|
+
].every((i) => footer[i] < 128));
|
|
29131
|
+
const tagStart = end - 20 - syncsafe(footer, 6);
|
|
29132
|
+
check(tagStart >= start);
|
|
29133
|
+
const head = await read(tagStart, 10);
|
|
29134
|
+
check(isId3(head));
|
|
29135
|
+
check(await emptyId3(read, size, tagStart, head, patches) === end);
|
|
29136
|
+
end = tagStart;
|
|
29137
|
+
continue;
|
|
29138
|
+
}
|
|
29139
|
+
}
|
|
29140
|
+
return;
|
|
29141
|
+
}
|
|
29142
|
+
}
|
|
29143
|
+
/** An MPEG audio frame's or an ADTS header's first bytes: 11 bits set, a version and a layer that are some. */
|
|
29144
|
+
var isFrame = (b, at) => b.length >= at + 2 && b[at] === 255 && (b[at + 1] & 224) === 224 && (b[at + 1] & 24) !== 8;
|
|
29145
|
+
var FLAC_KEEPS = /* @__PURE__ */ new Set([0, 3]);
|
|
29146
|
+
/** A FLAC's metadata blocks from `at` (its `fLaC`): all but its stream info and seek table become padding, zeroed. */
|
|
29147
|
+
async function flac(read, size, at, patches) {
|
|
29148
|
+
const count = counter();
|
|
29149
|
+
for (at += 4;;) {
|
|
29150
|
+
count();
|
|
29151
|
+
const head = await read(at, 4);
|
|
29152
|
+
const last = head[0] & 128, type = head[0] & 127, end = at + 4 + (head[1] << 16 | head[2] << 8 | head[3]);
|
|
29153
|
+
check(type !== 127 && end <= size);
|
|
29154
|
+
if (!FLAC_KEEPS.has(type)) {
|
|
29155
|
+
if (type !== 1) patches.push({
|
|
29156
|
+
start: at,
|
|
29157
|
+
end: at + 1,
|
|
29158
|
+
bytes: Uint8Array.of(last | 1)
|
|
29159
|
+
});
|
|
29160
|
+
if (end > at + 4) patches.push({
|
|
29161
|
+
start: at + 4,
|
|
29162
|
+
end
|
|
29163
|
+
});
|
|
29164
|
+
}
|
|
29165
|
+
at = end;
|
|
29166
|
+
if (last) return at;
|
|
29167
|
+
}
|
|
29168
|
+
}
|
|
29169
|
+
var OGG_CRC = (() => {
|
|
29170
|
+
const table = /* @__PURE__ */ new Uint32Array(256);
|
|
29171
|
+
for (let i = 0; i < 256; i++) {
|
|
29172
|
+
let crc = i << 24;
|
|
29173
|
+
for (let bit = 0; bit < 8; bit++) crc = crc & 2147483648 ? crc << 1 ^ 79764919 : crc << 1;
|
|
29174
|
+
table[i] = crc >>> 0;
|
|
29175
|
+
}
|
|
29176
|
+
return table;
|
|
29177
|
+
})();
|
|
29178
|
+
/** Ogg's page checksum, over the page with its checksum's four bytes zeroed. */
|
|
29179
|
+
function oggCrc(page) {
|
|
29180
|
+
let crc = 0;
|
|
29181
|
+
for (let i = 0; i < page.length; i++) crc = (crc << 8 ^ OGG_CRC[(crc >>> 24 ^ (i >= 22 && i < 26 ? 0 : page[i])) & 255]) >>> 0;
|
|
29182
|
+
return crc;
|
|
29183
|
+
}
|
|
29184
|
+
/**
|
|
29185
|
+
* How a codec's comment header (its second packet) is laid out: its magic's length, and whether a framing bit
|
|
29186
|
+
* follows its comments (Vorbis). Known by the first bytes of its first packet.
|
|
29187
|
+
*/
|
|
29188
|
+
var OGG_CODECS = [
|
|
29189
|
+
{
|
|
29190
|
+
head: "OpusHead",
|
|
29191
|
+
comments: "OpusTags",
|
|
29192
|
+
framing: false
|
|
29193
|
+
},
|
|
29194
|
+
{
|
|
29195
|
+
head: "vorbis",
|
|
29196
|
+
comments: "vorbis",
|
|
29197
|
+
framing: true
|
|
29198
|
+
},
|
|
29199
|
+
{
|
|
29200
|
+
head: "Speex ",
|
|
29201
|
+
comments: "",
|
|
29202
|
+
framing: false
|
|
29203
|
+
}
|
|
29204
|
+
];
|
|
29205
|
+
/**
|
|
29206
|
+
* A comment header with no comment: its magic and vendor kept, its count 0 (and Vorbis's framing bit set), the rest
|
|
29207
|
+
* zeros: padding after the comments, which Opus says may be there and Vorbis's and Speex's readers do not read.
|
|
29208
|
+
*/
|
|
29209
|
+
function noComments(packet, codec) {
|
|
29210
|
+
const magic = codec.comments.length;
|
|
29211
|
+
check(text(packet, 0, magic) === codec.comments && packet.length >= magic + 4);
|
|
29212
|
+
const count = magic + 4 + u32le(packet, magic);
|
|
29213
|
+
check(count + 4 + (codec.framing ? 1 : 0) <= packet.length);
|
|
29214
|
+
const out = new Uint8Array(packet.length);
|
|
29215
|
+
out.set(packet.subarray(0, count));
|
|
29216
|
+
if (codec.framing) out[count + 4] = 1;
|
|
29217
|
+
return out;
|
|
29218
|
+
}
|
|
29219
|
+
/**
|
|
29220
|
+
* An Ogg file's pages walked: each logical stream's comment header (a chained file has one per link) made one with no
|
|
29221
|
+
* comment where it is, across the pages it spans, and those pages' checksums made again.
|
|
29222
|
+
*/
|
|
29223
|
+
async function ogg(read, size, patches) {
|
|
29224
|
+
const streams = /* @__PURE__ */ new Map();
|
|
29225
|
+
/** The bytes put in the pages changed, by where each page starts: by where they go in the file. */
|
|
29226
|
+
const pages = /* @__PURE__ */ new Map();
|
|
29227
|
+
const packetOf = async (ranges) => {
|
|
29228
|
+
const length = ranges.reduce((sum, [start, end]) => sum + end - start, 0);
|
|
29229
|
+
check(length <= AUDIO_METADATA_LIMITS.maxReadBytes);
|
|
29230
|
+
const packet = new Uint8Array(length);
|
|
29231
|
+
let at = 0;
|
|
29232
|
+
for (const [start, end] of ranges) {
|
|
29233
|
+
packet.set(await read(start, end - start), at);
|
|
29234
|
+
at += end - start;
|
|
29235
|
+
}
|
|
29236
|
+
return packet;
|
|
29237
|
+
};
|
|
29238
|
+
const count = counter();
|
|
29239
|
+
for (let at = 0; at < size;) {
|
|
29240
|
+
count();
|
|
29241
|
+
const head = await read(at, 27);
|
|
29242
|
+
check(text(head, 0, 4) === "OggS" && head[4] === 0);
|
|
29243
|
+
const lacing = await read(at + 27, head[26]);
|
|
29244
|
+
const end = at + 27 + lacing.length + lacing.reduce((sum, l) => sum + l, 0);
|
|
29245
|
+
check(end <= size);
|
|
29246
|
+
const serial = u32le(head, 14);
|
|
29247
|
+
if (head[5] & 2) streams.set(serial, {
|
|
29248
|
+
packet: 0,
|
|
29249
|
+
ranges: []
|
|
29250
|
+
});
|
|
29251
|
+
const stream = streams.get(serial);
|
|
29252
|
+
check(!!stream);
|
|
29253
|
+
let offset = at + 27 + lacing.length;
|
|
29254
|
+
for (const length of lacing) {
|
|
29255
|
+
if (stream.packet <= 1 && stream.codec !== null) stream.ranges.push([
|
|
29256
|
+
offset,
|
|
29257
|
+
offset + length,
|
|
29258
|
+
at
|
|
29259
|
+
]);
|
|
29260
|
+
offset += length;
|
|
29261
|
+
if (length === 255) continue;
|
|
29262
|
+
if (stream.packet === 0) {
|
|
29263
|
+
const first = await packetOf(stream.ranges);
|
|
29264
|
+
stream.codec = OGG_CODECS.find((codec) => text(first, 0, codec.head.length) === codec.head) ?? null;
|
|
29265
|
+
} else if (stream.packet === 1 && stream.codec) {
|
|
29266
|
+
const emptied = noComments(await packetOf(stream.ranges), stream.codec);
|
|
29267
|
+
let from = 0;
|
|
29268
|
+
for (const [start, until, page] of stream.ranges) {
|
|
29269
|
+
if (!pages.has(page)) pages.set(page, []);
|
|
29270
|
+
pages.get(page).push([start, emptied.subarray(from, from + until - start)]);
|
|
29271
|
+
from += until - start;
|
|
29272
|
+
}
|
|
29273
|
+
}
|
|
29274
|
+
stream.packet++;
|
|
29275
|
+
stream.ranges = [];
|
|
29276
|
+
}
|
|
29277
|
+
at = end;
|
|
29278
|
+
}
|
|
29279
|
+
for (const stream of streams.values()) check(stream.codec === null || stream.packet > 1);
|
|
29280
|
+
for (const [start, changes] of pages) {
|
|
29281
|
+
const head = await read(start, 27), lacing = await read(start + 27, head[26]);
|
|
29282
|
+
const end = start + 27 + lacing.length + lacing.reduce((sum, l) => sum + l, 0);
|
|
29283
|
+
const page = (await read(start, end - start)).slice();
|
|
29284
|
+
for (const [where, bytes] of changes) page.set(bytes, where - start);
|
|
29285
|
+
const crc = oggCrc(page);
|
|
29286
|
+
page.set([
|
|
29287
|
+
crc & 255,
|
|
29288
|
+
crc >>> 8 & 255,
|
|
29289
|
+
crc >>> 16 & 255,
|
|
29290
|
+
crc >>> 24
|
|
29291
|
+
], 22);
|
|
29292
|
+
patches.push({
|
|
29293
|
+
start,
|
|
29294
|
+
end,
|
|
29295
|
+
bytes: page
|
|
29296
|
+
});
|
|
29297
|
+
}
|
|
29298
|
+
}
|
|
29299
|
+
/** The chunks a WAV's sound is made of, kept; any other becomes `JUNK`. */
|
|
29300
|
+
var WAV_KEEPS = /* @__PURE__ */ new Set([
|
|
29301
|
+
"fmt ",
|
|
29302
|
+
"data",
|
|
29303
|
+
"fact",
|
|
29304
|
+
"cue ",
|
|
29305
|
+
"smpl",
|
|
29306
|
+
"inst"
|
|
29307
|
+
]);
|
|
29308
|
+
var WAV_SPACE = /* @__PURE__ */ new Set([
|
|
29309
|
+
"JUNK",
|
|
29310
|
+
"junk",
|
|
29311
|
+
"PAD ",
|
|
29312
|
+
"FLLR"
|
|
29313
|
+
]);
|
|
29314
|
+
async function wav(read, size, patches) {
|
|
29315
|
+
const count = counter();
|
|
29316
|
+
for (let at = 12; at + 8 <= size;) {
|
|
29317
|
+
count();
|
|
29318
|
+
const head = await read(at, 8);
|
|
29319
|
+
const id = text(head, 0, 4), length = u32le(head, 4);
|
|
29320
|
+
let end = at + 8 + length + (length & 1);
|
|
29321
|
+
if (id === "data") end = length ? Math.min(end, size) : size;
|
|
29322
|
+
else check(at + 8 + length <= size);
|
|
29323
|
+
if (!WAV_KEEPS.has(id)) {
|
|
29324
|
+
if (!WAV_SPACE.has(id)) patches.push({
|
|
29325
|
+
start: at,
|
|
29326
|
+
end: at + 4,
|
|
29327
|
+
bytes: latin("JUNK")
|
|
29328
|
+
});
|
|
29329
|
+
if (length) patches.push({
|
|
29330
|
+
start: at + 8,
|
|
29331
|
+
end: at + 8 + length
|
|
29332
|
+
});
|
|
29333
|
+
}
|
|
29334
|
+
at = Math.min(end, size);
|
|
29335
|
+
}
|
|
29336
|
+
}
|
|
29337
|
+
var EBML_HEADER = 440786851;
|
|
29338
|
+
var SEGMENT$1 = 408125543;
|
|
29339
|
+
var CLUSTER = 524531317;
|
|
29340
|
+
var VOID = 236;
|
|
29341
|
+
var CRC32 = 191;
|
|
29342
|
+
var SEEK_HEAD = 290298740;
|
|
29343
|
+
var INFO = 357149030;
|
|
29344
|
+
var TRACKS = 374648427;
|
|
29345
|
+
/** What a segment's sound and pictures are made of, kept; any other top-level element (Tags, Attachments, Chapters) becomes Void. */
|
|
29346
|
+
var SEGMENT_KEEPS = /* @__PURE__ */ new Set([
|
|
29347
|
+
SEEK_HEAD,
|
|
29348
|
+
INFO,
|
|
29349
|
+
TRACKS,
|
|
29350
|
+
CLUSTER,
|
|
29351
|
+
475249515
|
|
29352
|
+
]);
|
|
29353
|
+
/** What a cluster holds: one of unknown size ends where an element that is none of these starts. */
|
|
29354
|
+
var CLUSTER_CHILDREN = /* @__PURE__ */ new Set([
|
|
29355
|
+
231,
|
|
29356
|
+
22612,
|
|
29357
|
+
167,
|
|
29358
|
+
171,
|
|
29359
|
+
163,
|
|
29360
|
+
160,
|
|
29361
|
+
175,
|
|
29362
|
+
VOID,
|
|
29363
|
+
CRC32
|
|
29364
|
+
]);
|
|
29365
|
+
/** What Info keeps: the timing, the segment's IDs; the muxer's and writing app's names, zeroed. Any other (a title, a date, file names) becomes Void. */
|
|
29366
|
+
var INFO_KEEPS = /* @__PURE__ */ new Set([
|
|
29367
|
+
2807729,
|
|
29368
|
+
17545,
|
|
29369
|
+
29604,
|
|
29370
|
+
17476,
|
|
29371
|
+
3979555,
|
|
29372
|
+
4110627,
|
|
29373
|
+
26916
|
|
29374
|
+
]);
|
|
29375
|
+
var INFO_ZEROED = /* @__PURE__ */ new Set([19840, 22337]);
|
|
29376
|
+
var TRACK_ENTRY = 174;
|
|
29377
|
+
var TRACK_NAME = 21358;
|
|
29378
|
+
var SEEK = 19899;
|
|
29379
|
+
var SEEK_ID = 21419;
|
|
29380
|
+
/** The element whose header is at `at` of `b` (`base` its offset in the file); one of unknown size ends at `limit`. */
|
|
29381
|
+
function element(b, at, limit, base = 0) {
|
|
29382
|
+
check(at < b.length);
|
|
29383
|
+
const idLength = Math.clz32(b[at]) - 23;
|
|
29384
|
+
check(idLength >= 1 && idLength <= 4 && at + idLength < b.length);
|
|
29385
|
+
let id = 0;
|
|
29386
|
+
for (let i = 0; i < idLength; i++) id = id * 256 + b[at + i];
|
|
29387
|
+
const sizeAt = at + idLength, sizeLength = Math.clz32(b[sizeAt]) - 23;
|
|
29388
|
+
check(sizeLength >= 1 && sizeLength <= 8 && sizeAt + sizeLength <= b.length);
|
|
29389
|
+
let size = b[sizeAt] & 255 >> sizeLength, ones = size === 255 >> sizeLength;
|
|
29390
|
+
for (let i = 1; i < sizeLength; i++) {
|
|
29391
|
+
size = size * 256 + b[sizeAt + i];
|
|
29392
|
+
ones &&= b[sizeAt + i] === 255;
|
|
29393
|
+
}
|
|
29394
|
+
const body = base + sizeAt + sizeLength;
|
|
29395
|
+
return {
|
|
29396
|
+
id,
|
|
29397
|
+
start: base + at,
|
|
29398
|
+
body,
|
|
29399
|
+
end: ones ? limit : body + size,
|
|
29400
|
+
unknown: ones
|
|
29401
|
+
};
|
|
29402
|
+
}
|
|
29403
|
+
/** An element's header read from the file at `at`. */
|
|
29404
|
+
async function elementAt(source, at, limit) {
|
|
29405
|
+
return element(await source.read(at, 12), 0, limit, at);
|
|
29406
|
+
}
|
|
29407
|
+
/** A Void element `length` bytes long: its ID, its size in as many bytes as it takes to fill it, the rest zeros. */
|
|
29408
|
+
function voidHeader(length) {
|
|
29409
|
+
for (let sizeLength = 1; sizeLength <= 8; sizeLength++) {
|
|
29410
|
+
const body = length - 1 - sizeLength;
|
|
29411
|
+
if (body < 0 || body >= 2 ** (7 * sizeLength) - 1) continue;
|
|
29412
|
+
const header = new Uint8Array(1 + sizeLength);
|
|
29413
|
+
header[0] = VOID;
|
|
29414
|
+
for (let i = sizeLength, rest = body; i >= 1; i--, rest = Math.floor(rest / 256)) header[i] = rest % 256;
|
|
29415
|
+
header[1] |= 128 >> sizeLength - 1;
|
|
29416
|
+
return header;
|
|
29417
|
+
}
|
|
29418
|
+
check(false);
|
|
29419
|
+
}
|
|
29420
|
+
/** `el` of `b` (read whole, `el`'s offsets in it) made Void where it is. */
|
|
29421
|
+
function voidIn(b, el) {
|
|
29422
|
+
const header = voidHeader(el.end - el.start);
|
|
29423
|
+
b.fill(0, el.start, el.end);
|
|
29424
|
+
b.set(header, el.start);
|
|
29425
|
+
}
|
|
29426
|
+
/** The children of `parent` (in `b`, read whole) as elements, each within it. */
|
|
29427
|
+
function childrenOf(b, parent) {
|
|
29428
|
+
const found = [];
|
|
29429
|
+
for (let at = parent.body; at < parent.end;) {
|
|
29430
|
+
const child = element(b.subarray(0, parent.end), at, parent.end);
|
|
29431
|
+
check(!child.unknown && child.end <= parent.end);
|
|
29432
|
+
found.push(child);
|
|
29433
|
+
at = child.end;
|
|
29434
|
+
}
|
|
29435
|
+
return found;
|
|
29436
|
+
}
|
|
29437
|
+
/**
|
|
29438
|
+
* A top-level element of a segment read whole and changed in it: Info without its title, date and file names (its
|
|
29439
|
+
* muxer's and writing app's names zeroed), Tracks without their names, a SeekHead without the entries for what
|
|
29440
|
+
* became Void. A CRC-32 in them, wrong once they changed, becomes Void too.
|
|
29441
|
+
*/
|
|
29442
|
+
function stripTopLevel(b) {
|
|
29443
|
+
const top = element(b, 0, b.length);
|
|
29444
|
+
check(!top.unknown && top.end === b.length);
|
|
29445
|
+
for (const child of childrenOf(b, top)) {
|
|
29446
|
+
if (child.id === CRC32) voidIn(b, child);
|
|
29447
|
+
else if (top.id === INFO) {
|
|
29448
|
+
if (INFO_ZEROED.has(child.id)) b.fill(0, child.body, child.end);
|
|
29449
|
+
else if (!INFO_KEEPS.has(child.id) && child.id !== VOID) voidIn(b, child);
|
|
29450
|
+
} else if (top.id === TRACKS && child.id === TRACK_ENTRY) {
|
|
29451
|
+
for (const part of childrenOf(b, child)) if (part.id === TRACK_NAME || part.id === CRC32) voidIn(b, part);
|
|
29452
|
+
} else if (top.id === SEEK_HEAD && child.id === SEEK) {
|
|
29453
|
+
const target = childrenOf(b, child).find((part) => part.id === SEEK_ID);
|
|
29454
|
+
let id = 0;
|
|
29455
|
+
if (target) for (let i = target.body; i < target.end; i++) id = id * 256 + b[i];
|
|
29456
|
+
if (!SEGMENT_KEEPS.has(id)) voidIn(b, child);
|
|
29457
|
+
}
|
|
29458
|
+
if (child.id === VOID) b.fill(0, child.body, child.end);
|
|
29459
|
+
}
|
|
29460
|
+
}
|
|
29461
|
+
/** Where a cluster of unknown size ends: at the first element that is not a cluster's, or the segment's end. */
|
|
29462
|
+
async function clusterEnd(source, at, limit, count) {
|
|
29463
|
+
for (;;) {
|
|
29464
|
+
count();
|
|
29465
|
+
if (at >= limit) return limit;
|
|
29466
|
+
const child = await elementAt(source, at, limit);
|
|
29467
|
+
if (!CLUSTER_CHILDREN.has(child.id)) return at;
|
|
29468
|
+
check(!child.unknown);
|
|
29469
|
+
if (child.end >= limit) return limit;
|
|
29470
|
+
at = child.end;
|
|
29471
|
+
}
|
|
29472
|
+
}
|
|
29473
|
+
async function matroska(source, read, patches) {
|
|
29474
|
+
const count = counter();
|
|
29475
|
+
const toVoid = (el) => {
|
|
29476
|
+
const header = voidHeader(el.end - el.start);
|
|
29477
|
+
patches.push({
|
|
29478
|
+
start: el.start,
|
|
29479
|
+
end: el.start + header.length,
|
|
29480
|
+
bytes: header
|
|
29481
|
+
});
|
|
29482
|
+
if (el.end > el.start + header.length) patches.push({
|
|
29483
|
+
start: el.start + header.length,
|
|
29484
|
+
end: el.end
|
|
29485
|
+
});
|
|
29486
|
+
};
|
|
29487
|
+
for (let at = 0; at < source.size;) {
|
|
29488
|
+
count();
|
|
29489
|
+
const top = await elementAt(source, at, source.size);
|
|
29490
|
+
check(top.end <= source.size);
|
|
29491
|
+
if (top.id === EBML_HEADER) check(!top.unknown);
|
|
29492
|
+
else if (top.id === VOID) {
|
|
29493
|
+
if (top.end > top.body) patches.push({
|
|
29494
|
+
start: top.body,
|
|
29495
|
+
end: top.end
|
|
29496
|
+
});
|
|
29497
|
+
} else if (top.id !== SEGMENT$1) {
|
|
29498
|
+
check(!top.unknown);
|
|
29499
|
+
toVoid(top);
|
|
29500
|
+
} else for (let in_ = top.body; in_ < top.end;) {
|
|
29501
|
+
count();
|
|
29502
|
+
const el = await elementAt(source, in_, top.end);
|
|
29503
|
+
if (el.id === CLUSTER) {
|
|
29504
|
+
in_ = el.unknown ? await clusterEnd(source, el.body, top.end, count) : Math.min(el.end, top.end);
|
|
29505
|
+
continue;
|
|
29506
|
+
}
|
|
29507
|
+
check(!el.unknown && el.end <= top.end);
|
|
29508
|
+
if (el.id === INFO || el.id === TRACKS || el.id === SEEK_HEAD) {
|
|
29509
|
+
const bytes = (await read(el.start, el.end - el.start)).slice();
|
|
29510
|
+
stripTopLevel(bytes);
|
|
29511
|
+
patches.push({
|
|
29512
|
+
start: el.start,
|
|
29513
|
+
end: el.end,
|
|
29514
|
+
bytes
|
|
29515
|
+
});
|
|
29516
|
+
} else if (el.id === VOID) {
|
|
29517
|
+
if (el.end > el.body) patches.push({
|
|
29518
|
+
start: el.body,
|
|
29519
|
+
end: el.end
|
|
29520
|
+
});
|
|
29521
|
+
} else if (!SEGMENT_KEEPS.has(el.id)) toVoid(el);
|
|
29522
|
+
in_ = el.end;
|
|
29523
|
+
}
|
|
29524
|
+
at = top.end;
|
|
29525
|
+
}
|
|
29526
|
+
}
|
|
29527
|
+
/**
|
|
29528
|
+
* What `withoutAudioMetadata` changes in an audio file read from `source` (one not held in a Blob: a file kept in
|
|
29529
|
+
* storage): the parts replaced, in order and apart, the rest of its bytes going as they are; undefined when it goes as
|
|
29530
|
+
* it is. Throws `NO_AUDIO_METADATA` for one whose tags cannot be removed; an error reading `source` as it is.
|
|
29531
|
+
*/
|
|
29532
|
+
async function audioMetadataPatches(file, mime) {
|
|
29533
|
+
const source = readingAhead(file), read = exactly(source), size = source.size;
|
|
29534
|
+
const head = await source.read(0, Math.min(AUDIO_METADATA_LIMITS.headBytes, size));
|
|
29535
|
+
const patches = [];
|
|
29536
|
+
if (head.length >= 8 && text(head, 4, 4) === "ftyp") try {
|
|
29537
|
+
return await videoMetadataPatches(file, mime, true);
|
|
29538
|
+
} catch (error) {
|
|
29539
|
+
if (error instanceof Error && error.message === "This video cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded") throw Object.assign(/* @__PURE__ */ new Error(NO_AUDIO_METADATA), { cause: error });
|
|
29540
|
+
throw error;
|
|
29541
|
+
}
|
|
29542
|
+
else if (text(head, 0, 4) === "OggS") await ogg(read, size, patches);
|
|
29543
|
+
else if (head.length >= 12 && text(head, 0, 4) === "RIFF" && text(head, 8, 4) === "WAVE") await wav(read, size, patches);
|
|
29544
|
+
else if (text(head, 0, 4) === "Eߣ") await matroska(source, read, patches);
|
|
29545
|
+
else if (text(head, 0, 4) === "fLaC") await trailingTags(read, size, await flac(read, size, 0, patches), patches);
|
|
29546
|
+
else if (isId3(head) || isFrame(head, 0)) {
|
|
29547
|
+
let at = 0;
|
|
29548
|
+
const count = counter();
|
|
29549
|
+
for (let next = head; isId3(next); next = at + 10 <= size ? await read(at, 10) : /* @__PURE__ */ new Uint8Array(0)) {
|
|
29550
|
+
count();
|
|
29551
|
+
at = await emptyId3(read, size, at, next, patches);
|
|
29552
|
+
}
|
|
29553
|
+
if (at + 4 <= size && text(await read(at, 4), 0, 4) === "fLaC") at = await flac(read, size, at, patches);
|
|
29554
|
+
await trailingTags(read, size, at, patches);
|
|
29555
|
+
} else return void 0;
|
|
29556
|
+
if (!patches.length) return void 0;
|
|
29557
|
+
patches.sort((a, b) => a.start - b.start);
|
|
29558
|
+
for (let i = 1; i < patches.length; i++) check(patches[i].start >= patches[i - 1].end);
|
|
29559
|
+
return patches;
|
|
29560
|
+
}
|
|
29561
|
+
/**
|
|
29562
|
+
* `source` as it is sent: an audio file without its tags, made of `source`'s own bytes but for the parts emptied;
|
|
29563
|
+
* undefined when it goes as it is (not one of these, or one with nothing to remove). Throws `NO_AUDIO_METADATA` for
|
|
29564
|
+
* one whose tags cannot be removed; an error reading `source` as it is.
|
|
29565
|
+
*/
|
|
29566
|
+
async function withoutAudioMetadata(source, mime) {
|
|
29567
|
+
const patches = await audioMetadataPatches({
|
|
29568
|
+
size: source.size,
|
|
29569
|
+
read: async (offset, length) => new Uint8Array(await source.slice(offset, offset + length).arrayBuffer())
|
|
29570
|
+
}, mime);
|
|
29571
|
+
if (!patches) return void 0;
|
|
29572
|
+
const parts = [];
|
|
29573
|
+
let at = 0;
|
|
29574
|
+
for (const patch of patches) {
|
|
29575
|
+
if (patch.start > at) parts.push(source.slice(at, patch.start));
|
|
29576
|
+
if (patch.bytes) parts.push(patch.bytes);
|
|
29577
|
+
else for (let left = patch.end - patch.start; left > 0; left -= ZEROS.size) parts.push(ZEROS.slice(0, Math.min(left, ZEROS.size)));
|
|
29578
|
+
at = patch.end;
|
|
29579
|
+
}
|
|
29580
|
+
if (at < source.size) parts.push(source.slice(at));
|
|
29581
|
+
return new Blob(parts, { type: mime });
|
|
29582
|
+
}
|
|
29583
|
+
//#endregion
|
|
28966
29584
|
//#region ../core/src/payments.ts
|
|
28967
29585
|
/**
|
|
28968
29586
|
* Payments between two linked peers. Ghostly does not move money itself: it
|
|
@@ -33435,8 +34053,8 @@ var GroupSession = class {
|
|
|
33435
34053
|
messagePace = /* @__PURE__ */ new Map();
|
|
33436
34054
|
editPace = /* @__PURE__ */ new Map();
|
|
33437
34055
|
queue = Promise.resolve();
|
|
33438
|
-
/**
|
|
33439
|
-
pendingMeta;
|
|
34056
|
+
/** Metadata frames that name a commit or an epoch I do not have yet, one signed by the admin and one by anyone else (`waitMeta`): tried again when the chain moves. */
|
|
34057
|
+
pendingMeta = {};
|
|
33440
34058
|
/** While `handle` runs: the frames it took that a hub passes on (`handle`'s result). */
|
|
33441
34059
|
passOn = null;
|
|
33442
34060
|
/** The frames kept to hand on that the app holds with its messages, oldest first; undefined when the state holds them all. */
|
|
@@ -35520,22 +36138,14 @@ var GroupSession = class {
|
|
|
35520
36138
|
const s = frame.statement;
|
|
35521
36139
|
if (!groupMetaNewer(s, this.state.meta)) return;
|
|
35522
36140
|
if (s.e > this.epoch || frame.k > this.epoch) {
|
|
35523
|
-
this.
|
|
35524
|
-
from,
|
|
35525
|
-
frame: raw
|
|
35526
|
-
};
|
|
35527
|
-
this.ask(from);
|
|
36141
|
+
this.waitMeta(from, raw, s);
|
|
35528
36142
|
return;
|
|
35529
36143
|
}
|
|
35530
36144
|
const commit = this.state.chain[s.e];
|
|
35531
36145
|
if (commitHash(commit) !== s.h || rosterAdmin(commit.m) !== s.by || this.admin !== s.by || !verifyGroupMetaSignature(s)) return;
|
|
35532
36146
|
const secret = this.secret(frame.k);
|
|
35533
36147
|
if (!secret) {
|
|
35534
|
-
this.
|
|
35535
|
-
from,
|
|
35536
|
-
frame: raw
|
|
35537
|
-
};
|
|
35538
|
-
this.ask(from);
|
|
36148
|
+
this.waitMeta(from, raw, s);
|
|
35539
36149
|
return;
|
|
35540
36150
|
}
|
|
35541
36151
|
const opened = openGroupMeta(frame, epochKeys(secret, this.id, frame.k).message);
|
|
@@ -35556,6 +36166,21 @@ var GroupSession = class {
|
|
|
35556
36166
|
});
|
|
35557
36167
|
}
|
|
35558
36168
|
/**
|
|
36169
|
+
* A statement that waits for the chain: only one its signer signed, so an altered copy cannot push out the one
|
|
36170
|
+
* waiting. The admin I know has a place of their own, which another member's statement cannot take, and in each
|
|
36171
|
+
* place only a later statement takes the one waiting.
|
|
36172
|
+
*/
|
|
36173
|
+
waitMeta(from, raw, s) {
|
|
36174
|
+
if (!verifyGroupMetaSignature(s)) return;
|
|
36175
|
+
const place = s.by === this.admin ? "admin" : "other", waiting = this.pendingMeta[place];
|
|
36176
|
+
if (!waiting || groupMetaNewer(s, waiting.s)) this.pendingMeta[place] = {
|
|
36177
|
+
from,
|
|
36178
|
+
frame: raw,
|
|
36179
|
+
s
|
|
36180
|
+
};
|
|
36181
|
+
this.ask(from);
|
|
36182
|
+
}
|
|
36183
|
+
/**
|
|
35559
36184
|
* Who made the change a statement brings me: its signer, when they were the admin all along since the statement I
|
|
35560
36185
|
* held (or, with none, since I got in). A new admin signs again what the last one set (`metaFollowsChain`): to a
|
|
35561
36186
|
* member that missed that, it is no change of theirs it can tell apart, so nobody is named. With none held, theirs is
|
|
@@ -35572,9 +36197,9 @@ var GroupSession = class {
|
|
|
35572
36197
|
}
|
|
35573
36198
|
/** After the chain or my secrets moved: the waiting statement, and, if I became the admin, the name and picture signed again as mine. */
|
|
35574
36199
|
async metaFollowsChain() {
|
|
35575
|
-
const
|
|
35576
|
-
this.pendingMeta =
|
|
35577
|
-
if (pending) await this.receiveMeta(pending.from, pending.frame);
|
|
36200
|
+
const { admin, other } = this.pendingMeta;
|
|
36201
|
+
this.pendingMeta = {};
|
|
36202
|
+
for (const pending of [admin, other]) if (pending) await this.receiveMeta(pending.from, pending.frame);
|
|
35578
36203
|
if (this.isAdmin && this.state.meta && this.state.meta.by !== this.myKey) await this.publishMeta(this.state.meta.body, this.state.meta.ts, true);
|
|
35579
36204
|
}
|
|
35580
36205
|
async fork(reason) {
|
|
@@ -36383,8 +37008,8 @@ var CommunitySession = class CommunitySession {
|
|
|
36383
37008
|
/** My frames said again in this run (`e:h16:n`) → the id of the message they first were. In memory only. */
|
|
36384
37009
|
resealedFrom = /* @__PURE__ */ new Map();
|
|
36385
37010
|
saveTimer;
|
|
36386
|
-
/**
|
|
36387
|
-
pendingMeta;
|
|
37011
|
+
/** Metadata frames naming a commit or a secret I do not have yet, one signed by the admin and one by anyone else (`waitMeta`): tried again when the chain or my secrets move. */
|
|
37012
|
+
pendingMeta = {};
|
|
36388
37013
|
/** The store's frames the app holds with their messages (`storeKey` → message id): in memory here, not in what is saved. */
|
|
36389
37014
|
onRows = /* @__PURE__ */ new Map();
|
|
36390
37015
|
/** The oldest epoch whose seen marks are kept, as of the last `pruneSeen`. In memory only. */
|
|
@@ -38942,23 +39567,13 @@ var CommunitySession = class CommunitySession {
|
|
|
38942
39567
|
if (!groupMetaNewer(s, this.state.meta)) return false;
|
|
38943
39568
|
const at = this.mainIndex.get(s.h);
|
|
38944
39569
|
if (at === void 0) {
|
|
38945
|
-
if (s.e >= this.epoch - COMMUNITY_LIMITS.window)
|
|
38946
|
-
this.pendingMeta = {
|
|
38947
|
-
from,
|
|
38948
|
-
frame: raw
|
|
38949
|
-
};
|
|
38950
|
-
this.ask(from);
|
|
38951
|
-
}
|
|
39570
|
+
if (s.e >= this.epoch - COMMUNITY_LIMITS.window) this.waitMeta(from, raw, s);
|
|
38952
39571
|
return false;
|
|
38953
39572
|
}
|
|
38954
39573
|
if (at !== s.e || rosterAdmin(this.rosterAt(s.h) ?? []) !== s.by || this.admin !== s.by || !verifyGroupMetaSignature(s)) return false;
|
|
38955
39574
|
const secret = this.state.secrets[frame.k], sealedUnder = this.known.get(frame.k);
|
|
38956
39575
|
if (!secret || !sealedUnder) {
|
|
38957
|
-
this.
|
|
38958
|
-
from,
|
|
38959
|
-
frame: raw
|
|
38960
|
-
};
|
|
38961
|
-
this.ask(from);
|
|
39576
|
+
this.waitMeta(from, raw, s);
|
|
38962
39577
|
return false;
|
|
38963
39578
|
}
|
|
38964
39579
|
const opened = openGroupMeta(frame, epochKeys(fromBase64Url(secret), this.id, sealedUnder.e).message);
|
|
@@ -38973,6 +39588,21 @@ var CommunitySession = class CommunitySession {
|
|
|
38973
39588
|
return true;
|
|
38974
39589
|
}
|
|
38975
39590
|
/**
|
|
39591
|
+
* A statement that waits for the chain: only one its signer signed, so an altered copy cannot push out the one
|
|
39592
|
+
* waiting. The admin I know has a place of their own, which another member's statement cannot take, and in each
|
|
39593
|
+
* place only a later statement takes the one waiting.
|
|
39594
|
+
*/
|
|
39595
|
+
waitMeta(from, raw, s) {
|
|
39596
|
+
if (!verifyGroupMetaSignature(s)) return;
|
|
39597
|
+
const place = s.by === this.admin ? "admin" : "other", waiting = this.pendingMeta[place];
|
|
39598
|
+
if (!waiting || groupMetaNewer(s, waiting.s)) this.pendingMeta[place] = {
|
|
39599
|
+
from,
|
|
39600
|
+
frame: raw,
|
|
39601
|
+
s
|
|
39602
|
+
};
|
|
39603
|
+
this.ask(from);
|
|
39604
|
+
}
|
|
39605
|
+
/**
|
|
38976
39606
|
* Who made the change a statement brings me (`at`: its commit's place on my main branch): its signer, when they were
|
|
38977
39607
|
* the admin all along since the statement I held (or, with none, since I got in). A new admin signs again what the
|
|
38978
39608
|
* last one set (`metaFollowsChain`): to a member that missed that, it is no change of theirs it can tell apart. With
|
|
@@ -38997,9 +39627,9 @@ var CommunitySession = class CommunitySession {
|
|
|
38997
39627
|
* went with a branch that lost a fork, the name and picture signed again as mine under the main branch.
|
|
38998
39628
|
*/
|
|
38999
39629
|
async metaFollowsChain() {
|
|
39000
|
-
const
|
|
39001
|
-
this.pendingMeta =
|
|
39002
|
-
if (pending && await this.receiveMeta(pending.from, pending.frame)) this.hooks.relay?.(pending.frame);
|
|
39630
|
+
const { admin, other } = this.pendingMeta;
|
|
39631
|
+
this.pendingMeta = {};
|
|
39632
|
+
for (const pending of [admin, other]) if (pending && await this.receiveMeta(pending.from, pending.frame)) this.hooks.relay?.(pending.frame);
|
|
39003
39633
|
const meta = this.state.meta;
|
|
39004
39634
|
if (this.isAdmin && meta && (meta.by !== this.myKey || !this.mainIndex.has(meta.h))) await this.publishMeta(meta.body, meta.ts, true);
|
|
39005
39635
|
}
|
|
@@ -39671,6 +40301,6 @@ function readX401SdJwtVc(text) {
|
|
|
39671
40301
|
};
|
|
39672
40302
|
}
|
|
39673
40303
|
//#endregion
|
|
39674
|
-
export { SSHSIG_NAMESPACE as $, LINK_TRAILING as $a, contactAskerFrame as $c, emptyProofLedger as $i, OwnInviteError as $l, engineError as $n, RATCHET_CAPABILITY as $o, TYPING_REFRESH_MS as $r, handoffContext as $s, ONCHAIN_PROVIDER as $t, openRelayPayload as $u, knockIdentity as A, DHT_MESSAGE_TTL as Aa, ENROLL_GRANT as Ac, STATUS_CARD_CAPABILITY as Ai, appRefPublisher as Al, ENDPOINT as An, buttonLabelClash as Ao, lobbyKeys as Ar, signalHasVideo as As, didJwsAlg as At, turnKeys as Au, GROUP_REACTED_FRAME as B, baseMime as Ba, readEnrollGrant as Bc, IdentityExchange as Bi, signAppObject as Bl, NO_PICTURE_METADATA as Bn, heardTime as Bo, shouldBeHub as Br, HANDOFF_OFFER as Bs, parseDidSignaturePaste as Bt, currentRelays as Bu, communityHasFrame as C, recordsFromTxt as Ca, SET_UPDATE as Cc, isServeId as Ci, readAppBundle as Cl, pubkyProofFile as Cn, PR_STATES as Co, pickMeshHubs as Cr, answersOffer as Cs, DID_DOCUMENT_MAX_BYTES as Ct, TURN_MAX as Cu, decodeGroupEntryLink as D, wellKnownUrl as Da, signTombstone as Dc, APPS_CAPABILITY as Di, APP_STATEMENT_LIMITS as Dl, requestLnurlInvoice as Dn, TASK_STATUSES as Do, doorHubs as Dr, contactRtcConfig as Ds, checkDidJws as Dt, signTurnPacket as Du, KNOCK_TTL_MS as E, txtValue as Ea, setUpdateFrame as Ec, isAppVersion as Ei, APP_PREFIXES as El, pubkyHomeserverOf as En, STATUS_CARD_LIMITS as Eo, beaconRecords as Er, callSignalHeardAt as Es, DidError as Et, readTurnPacket as Eu, GroupWakeLimiter as F, sanitizeFileName as Fa, enrollDigits as Fc, dialDescriptors as Fi, isAppRef as Fl, parseCashuRequestPayload as Fn, statusCardBytes as Fo, pickHubs as Fr, HANDOFF_ACK as Fs, didWebFileUrl as Ft, HEDGE_MISSING_MS as Fu, GROUP_EDIT_FRAME as G, voiceLevel as Ga, inboxRecord as Gc, identityRevocationValue as Gi, canonicalJsonBytes as Gl, GhostLink as Gn, MAX_GROUP_CHAIN as Go, transferEnded as Gr, HANDOFF_VERIFIED as Gs, didDhtDocument as Gt, DiscoveryBudgetError as Gu, GroupSession as H, fileMessageText as Ha, verifyEnrollProof as Hc, boundVerifiedIdentity as Hi, parseImageMeta as Hl, isStrippedPicture as Hn, shownTime as Ho, FILE_LIMITS as Hr, HANDOFF_PIECE_BYTES as Hs, staticDidDocument as Ht, relayUrlProblem as Hu, groupWakeFrame as I, sanitizeMime as Ia, enrollDoneFrame as Ic, IDENTITY_MAX_EVIDENCE as Ii, readAppRevocation as Il, parseFedimintRequestPayload as In, statusCardText as Io, rankHubs as Ir, HANDOFF_CANCEL as Is, didWebHost as It, HEDGE_MS as Iu, meshMessageRef as J, EDIT_RATE_WINDOW_MS as Ja, settleRequest as Jc, newIdentityBinding as Ji, encodeContactLink as Jl, PAIRED_FRAME_TOO_LARGE as Jn, parseGroupCommit as Jo, STATUS_IDLE_AFTER_MS as Jr, handoffAttemptAllowed as Js, encodeDidDhtPacket as Jt, withRequestOptions as Ju, GROUP_EDIT_TEXT_BYTES as K, parseVideoMeta as Ka, newInbox as Kc, identityStatement as Ki, readCanonicalJson as Kl, INVITE_TAKEN as Kn, MEMBER_KEY as Ko, transferStalled as Kr, NO_ATTEMPTS as Ks, didDhtFromPublicKey as Kt, budgetRetryMs as Ku, groupWakes as L, PLAYABLE_AUDIO as La, enrollGrantFrame as Lc, IDENTITY_MAX_VALIDITY as Li, readAppRevocationShape as Ll, NO_VIDEO_METADATA as Ln, MESSAGE_CLOCK_SKEW_MS as Lo, readBeacon as Lr, HANDOFF_DONE as Ls, normalizeDid as Lt, RelayTransport as Lu, mergeKnocks as M, DHT_FILE_CAPABILITY as Ma, ENROLL_PROOF as Mc, CapsExchange as Mi, isAppHash as Ml, fedimintRequestPayload as Mn, cardUrl as Mo, mergeBeacon as Mr, HTTP_SERVICE_PROTO as Ms, didWebDocumentUrl as Mt, turnStatedVerifier as Mu, readKnocks as N, dhtFileId as Na, enrollCancelFrame as Nc, DHT_TEXT_CAPABILITY as Ni, isAppKey as Nl, findEndpoint as Nn, checkStatusCard as No, mergeLobby as Nr, LEGACY_SERVICES as Ns, didWebFile as Nt, turnVerifierMark as Nu, encodeGroupEntryLink as O, ACTIVE_DHT_POLL_MS as Oa, verifySetUpdate as Oc, BUTTONS_CAPABILITY as Oi, appFingerprint as Ol, resolveLightningDestination as On, appCardId as Oo, freshHubs as Or, extractParamsFromSdp as Os, checkDidSignature as Ot, signTurnRelease as Ou, GROUP_WAKE_FRAME as P, formatFileSize as Pa, enrollCancelReason as Pc, capsDescriptors as Pi, isAppLine as Pl, isFederationId as Pn, sameButtonText as Po, newerHead as Pr, serviceIdFromName as Ps, didWebFileNames as Pt, DEFAULT_RELAYS as Pu, SSHSIG_MAX_ARMOR as Q, dhtEditId as Qa, REQUEST_LIFETIME_MS as Qc, PeerProofs as Qi, readDeviceInvite as Ql, EngineError as Qn, edgeParams as Qo, TYPING_KINDS as Qr, handoffCancelFrame as Qs, EVM_TEST_CHAINS as Qt, newerPacket as Qu, parseGroupWakeFrame as R, VOICE_LIMITS as Ra, enrollHelloFrame as Rc, IDENTITY_REVOCATION_LABEL as Ri, readAppRevocations as Rl, videoMetadataPatches as Rn, arrivalKey as Ro, readBeaconHead as Rr, HANDOFF_HAVE as Rs, parseDid as Rt, RelaysFailedError as Ru, GROUP_READ_NOTE_COMMUNITY as S, normalizeDomain as Sa, SET_ACK as Sc, APP_RANGE_LIMITS as Si, pacer as Sl, pubkyProofCapability as Sn, PR_CHECKS as So, meshHubs as Sr, RTC_CONFIG as Ss, verifyAtprotoRecordProof as St, TURN_LAST_SEQUENCE as Su, encodeCommunityLink as T, recordsName as Ta, setAckFrame as Tc, chatAppId as Ti, sha256Paced as Tl, homeserverWebEndpoint as Tn, RUN_RESULTS as To, beaconKeys as Tr, callRtcConfig as Ts, DID_JWS_MAX_LENGTH as Tt, nextTurnPosition as Tu, frameBytes as U, parseVoiceMeta as Ua, clearMissed as Uc, emptyIdentityLedger as Ui, readImageMeta as Ul, stripPictureMetadata as Un, GROUP_ADMIN_OFF_ERROR as Uo, FileUplink as Ur, HANDOFF_REQUEST as Us, strictBase64Url as Ut, setLinkTraceSink as Uu, GROUP_READ_NOTE as V, downsamplePeaks as Va, readEnrollHello as Vc, boundIdentityDisplay as Vi, signAppRevocation as Vl, PICTURE_METADATA_LIMITS as Vn, receivedTimestamp as Vo, ChatFiles as Vr, HANDOFF_PAKE as Vs, signingKeys as Vt, normalizeRelayUrl as Vu, COMMUNITY_EDIT_FRAME as W, voiceDownloadName as Wa, endedRequests as Wc, identityRefusal as Wi, canonicalJson as Wl, withoutPictureMetadata as Wn, GROUP_MEMBER_CAP as Wo, sentWhole as Wr, HANDOFF_TIMINGS as Ws, DidDhtError as Wt, traceLink as Wu, mentionsMember as X, REMOVED_TEXT as Xa, turnOff as Xc, revokesIdentity as Xi, createDeviceInvite as Xl, pairedMessageFits as Xn, rosterHas as Xo, personStatus as Xr, handoffAttemptSucceeded as Xs, signDidDhtPacket as Xt, RELAY_PAYLOAD_MAX_BYTES as Xu, parseCommunityEdit as Y, MAX_REMOVAL_NUMBER as Ya, takeRequest as Yc, receivedIdentityStatus as Yi, readContactLink as Yl, pairedEditFits as Yn, rosterAdmin as Yo, liveStatus as Yr, handoffAttemptFailed as Ys, resolveDidDht as Yt, PacketTooLargeError as Yu, groupName as Z, RateWindow as Za, ContactRequestError as Zc, lastSharedWithMe as Zi, deviceInviteJoinerParams as Zl, pairedMessageFrame as Zn, verifyCommitSignature as Zo, sanitizeStatusText as Zr, handoffBusyFrame as Zs, ETHEREUM_USDT as Zt, createRelayPayload as Zu, groupTypingEpoch as _, domainTxtRecord as _a, readHandoffHello as _c, utf8Decode as _d, parseWakeFrame as _i, appDigest as _l, PUBKY_PROOF_MAX_BYTES as _n, replySnippet as _o, SIGNAL_REPLY_MS as _r, decodeControl as _s, isAtprotoDid as _t, TURN_PUT_WINDOW_MS as _u, appRevocationFor as a, irohRelayUrl as aa, handoffManifestFrames as ac, verify as ad, mayPin as ai, linkRecords as al, WALLET_NETWORKS as an, GROUP_REACTION_FRAME as ao, GROUP_WANT_NO_FRAME as ar, DAEMON_WATCH_PEER_IDLE_MS as as, verifySshSignature as at, ownInviteRefusal as au, COMMUNITY_LIMITS as b, isPublicAddress as ba, readHandoffVerified as bc, checkPushEndpoint as bi, checkAppManifest as bl, newPubkyProofFolder as bn, CRON_LINE as bo, MESH_HUBS as br, CALL_SIGNAL_MAX_AGE_MS as bs, shortAtprotoDid as bt, classifyTurnRead as bu, checkAppBeforeRun as c, HOLD_LIMITS as ca, handoffReleaseFrame as cc, hasVisible as cd, pinNumberHolds as ci, openRequest as cl, assertWholeSats as cn, nextReactionNumber as co, isGroupMessageId as cr, PRESENCE_WINDOW as cs, decodeAnyBitcoinAddress as ct, HANDOFF_CAPABILITY as cu, checkAppStoreIndex as d, isHoldUrl as da, handoffVersions as dc, bytesEqual as dd, WAKE_ONLINE_BATCH_MS as di, requestRecords as dl, walletNetworkOf as dn, reactionIsNewer as do, readGroupWant as dr, presenceSeenAt as ds, ATPROTO_PROOF_COLLECTION as dt, deviceKeyZ32 as du, validExternalKey as ea, handoffContextProof as ec, parseRelayPayload as ed, TypingSender as ei, contactAskerHolds as el, PaymentPreflightError as en, linkStop as eo, engineText as er, RatchetBox as es, SshSigError as et, createChatInvite as eu, readAppStore as f, newMailbox as fa, newHandoffId as fc, fromBase64Url as fd, WAKE_ONLINE_DELAY_MS as fi, seenEntry as fl, SPARK_NETWORKS as fn, readReaction as fo, readGroupWantNo as fr, GhostlyHttpError as fs, ATPROTO_PROOF_SCOPE as ft, deviceLinkPairing as fu, GroupTypingBoard as g, dnsProofName as ga, readHandoffHave as gc, toZ32 as gd, newWakeToken as gi, APP_PERMISSIONS as gl, isBitcoinAddress as gn, readReply as go, SIGNAL_HOLD_MS as gr, LIMITS as gs, checkAtprotoProofRecord as gt, webCryptoSigner as gu, GROUP_TYPING_FRAME as h, decodeDnsResponse as ha, readHandoffDone as hc, toBase64Url as hd, deviceWakeRequest as hi, APP_ICON_PATH as hl, sparkInvoiceDetails as hn, pairedReplyAuthor as ho, SIGNAL_FRESH_MS as hr, webLocalFetch as hs, atprotoProofRkey as ht, seedSigner as hu, addedAppPermissions as i, irohDescriptor as ia, handoffHelloFrame as ic, publicKeyFromZ32 as id, PIN_LIMITS as ii, knockSlotRecords as il, USDT_PUBLIC_RPC as in, COMMUNITY_REACTION_FRAME as io, GROUP_WANT_FRAME as ir, AWAITING_PEER_MS as is, sshSignCommand as it, inviteOwnership as iu, knockRecords as j, peekDhtMailbox as ja, ENROLL_HELLO as jc, UPGRADE_CAPABILITY as ji, checkAppRevokeStatement as jl, cashuRequestPayload as jn, cardLine as jo, lobbyRecords as jr, emptyLinkRecords as js, didSignedMessages as jt, turnName as ju, entryParams as k, DHT_FILE_TOO_LARGE as ka, ENROLL_DONE as kc, EDIT_CAPABILITY as ki, appRef as kl, decodeBolt11 as kn, appCardUrl as ko, hubRank as kr, parseCallSignal as ks, didGhostlyServiceEntry as kt, turnInstance as ku, planAppUpdate as l, HoldKeys as la, handoffRetryAfter as lc, sanitizeDisplayText as ld, readPin as li, readKnockSlot as ll, formatPaymentAmount as ln, queueReaction as lo, readGroupFileMeta as lr, RELAY_POLL_INTERVALS as ls, ATPROTO_DECLARED_SCOPE as lt, deviceEchoFrame as lu, signAppStore as m, DOMAIN_FILE_MAX_BYTES as ma, readHandoffCancel as mc, randomBytes as md, WakeLimiter as mi, APP_BUNDLE_MAGIC as ml, sparkAddressKind as mn, wireReaction as mo, GROUP_SIGNAL_FRAME as mr, parseLocalTarget as ms, atprotoProofRecord as mt, newDeviceSetSecret as mu, readX401SdJwtVc as n, automaticTransport as na, handoffDigest as nc, identityFromSeed as nd, typingActivity as ni, knockSlotIdentity as nl, SEPOLIA_TEST_USDT_FAUCET as nn, forwardedAgain as no, GROUP_FILE_LIMITS as nr, ratchetSessionOf as ns, parseSshSignature as nt, encodeInviteCode as nu, appStoreDecision as o, HOLD_CAPABILITY as oa, handoffOfferFrame as oc, MAX_AVATAR_LENGTH as od, nextPinNumber as oi, makeStampPaced as ol, arkAddressPrefix as on, REACTION_LIMITS as oo, fetchesByItself as or, DHT_POLL_INTERVALS as os, verifyBitcoinMessage as ot, DEVICES_CAPABILITY as ou, readAppStoreSteps as p, readManifest as pa, readHandoffAck as pc, isZ32Key as pd, WAKE_ONLINE_INTERVAL_MS as pi, APP_BUNDLE_LIMITS as pl, SPARK_PROVIDER as pn, validReactionNumber as po, CarriedTransport as pr, formatLocalTarget as ps, atprotoDidMethod as pt, devicePingFrame as pu, carryMentions as q, EDIT_BUFFER_MS as qa, planKnocks as qc, isIdentityBinding as qi, createContactLink as ql, LIVENESS_PING_MS as qn, commitHash as qo, STATUS_AVAILABILITIES as qr, filePartName as qs, encodeDidDhtDeactivated as qt, isDiscoveryBudgetError as qu, sameX401HolderJwk as r, dialableIrohRelay as ra, handoffEphemeral as rc, identityFromSeedB64 as rd, GROUP_PIN_FRAME as ri, knockSlotOf as rl, TEST_USDT_FAUCET_AMOUNT as rn, readForwarded as ro, GROUP_HAVE_FRAME as rr, DirectPathWatch as rs, sameSshKey as rt, inviteLink as ru, appUpdateDecision as s, HOLD_DATED_BACK_MS as sa, handoffPakeFrame as sc, sanitizeAvatar as sd, pinIsNewer as si, mergeContactKnocks as sl, assertTokenUnits as sn, ReactionWindow as so, groupFileFallback as sr, EXPECT_PEER_MS as ss, BitcoinAddressError as st, ENROLL_CAPABILITY as su, newX401HolderKey as t, TRANSPORTS as ta, handoffDataFrame as tc, createIdentity as td, sanitizeTypingStatus as ti, contactDay as tl, SEPOLIA_TEST_USDT as tn, parseLinkPreview as to, parseEngineError as tr, emptyRatchetState as ts, parseSshPublicKey as tt, decodeInviteCode as tu, APP_STORE_LIMITS as u, HoldRefusedError as ua, handoffStreamKey as uc, stripHidden as ud, WAKE_CALL_INTERVAL_MS as ui, readLinkRecord as ul, validatePaymentTarget as un, reactionEmoji as uo, readGroupHave as ur, WATCH_PEER_MS as us, ATPROTO_FULL_SCOPE as ut, deviceEchoNonce as uu, openGroupTyping as v, domainWellKnownFile as va, readHandoffPake as vc, utf8Encode as vd, relayRequest as vi, appViewOf as vl, isPubkyKey as vn, BUTTON_ID as vo, groupSignalFrame as vr, encodeControl as vs, normalizeAtprotoHandle as vt, TURN_RAISE_READ_TIMEOUT_MS as vu, decodeCommunityLink as w, recordsFromWellKnown as wa, readSetUpdate as wc, APP_DATA_MAX_BYTES as wi, readAppBundleAsync as wl, pubkyProofPath as wn, ROUTINE_STATES as wo, COMMUNITY_TOPOLOGY as wr, buildSdpFromSignal as ws, DID_FILE_MAX_BYTES as wt, firstDeviceSetSecret as wu, CommunitySession as x, nip05RootKey as xa, sealHandoffPiece as xc, vapidKeysMatch as xi, isAppUrl as xl, normalizePubkyKey as xn, ITEM_STATES as xo, mayBeHub as xr, QUICK_REDIAL_MS as xs, AtprotoProofError as xt, turnPutSummary as xu, sealGroupTyping as y, encodeDnsQuery as ya, readHandoffTurnFrame as yc, wakeRequest as yi, assembleAppBundle as yl, isPubkyProofFolder as yn, BUTTON_STYLES as yo, readGroupSignal as yr, BURST_RING_MS as ys, parseAtprotoDidDocument as yt, TURN_SETTLE_MS as yu, GROUP_LIMITS as z, VOICE_METER as za, enrollProofFrame as zc, IdentityCheckUnavailable as zi, setAppSignatureFastPath as zl, withoutVideoMetadata as zn, claimedTime as zo, readLobby as zr, HANDOFF_HELLO as zs, parseDidDocument as zt, SLOW_MS as zu };
|
|
40304
|
+
export { SSHSIG_NAMESPACE as $, REMOVED_TEXT as $a, turnOff as $c, revokesIdentity as $i, createDeviceInvite as $l, pairedMessageFits as $n, rosterHas as $o, personStatus as $r, handoffAttemptSucceeded as $s, ONCHAIN_PROVIDER as $t, RELAY_PAYLOAD_MAX_BYTES as $u, knockIdentity as A, wellKnownUrl as Aa, signTombstone as Ac, APPS_CAPABILITY as Ai, APP_STATEMENT_LIMITS as Al, ENDPOINT as An, TASK_STATUSES as Ao, doorHubs as Ar, contactRtcConfig as As, didJwsAlg as At, signTurnPacket as Au, GROUP_REACTED_FRAME as B, PLAYABLE_AUDIO as Ba, enrollGrantFrame as Bc, IDENTITY_MAX_VALIDITY as Bi, readAppRevocationShape as Bl, NO_VIDEO_METADATA as Bn, MESSAGE_CLOCK_SKEW_MS as Bo, readBeacon as Br, HANDOFF_DONE as Bs, parseDidSignaturePaste as Bt, RelayTransport as Bu, communityHasFrame as C, isPublicAddress as Ca, readHandoffVerified as Cc, checkPushEndpoint as Ci, checkAppManifest as Cl, pubkyProofFile as Cn, CRON_LINE as Co, MESH_HUBS as Cr, CALL_SIGNAL_MAX_AGE_MS as Cs, DID_DOCUMENT_MAX_BYTES as Ct, classifyTurnRead as Cu, decodeGroupEntryLink as D, recordsFromWellKnown as Da, readSetUpdate as Dc, APP_DATA_MAX_BYTES as Di, readAppBundleAsync as Dl, requestLnurlInvoice as Dn, ROUTINE_STATES as Do, COMMUNITY_TOPOLOGY as Dr, buildSdpFromSignal as Ds, checkDidJws as Dt, firstDeviceSetSecret as Du, KNOCK_TTL_MS as E, recordsFromTxt as Ea, SET_UPDATE as Ec, isServeId as Ei, readAppBundle as El, pubkyHomeserverOf as En, PR_STATES as Eo, pickMeshHubs as Er, answersOffer as Es, DidError as Et, TURN_MAX as Eu, GroupWakeLimiter as F, DHT_FILE_CAPABILITY as Fa, ENROLL_PROOF as Fc, CapsExchange as Fi, isAppHash as Fl, parseCashuRequestPayload as Fn, cardUrl as Fo, mergeBeacon as Fr, HTTP_SERVICE_PROTO as Fs, didWebFileUrl as Ft, turnStatedVerifier as Fu, GROUP_EDIT_FRAME as G, fileMessageText as Ga, verifyEnrollProof as Gc, boundVerifiedIdentity as Gi, parseImageMeta as Gl, isStrippedPicture as Gn, shownTime as Go, FILE_LIMITS as Gr, HANDOFF_PIECE_BYTES as Gs, didDhtDocument as Gt, relayUrlProblem as Gu, GroupSession as H, VOICE_METER as Ha, enrollProofFrame as Hc, IdentityCheckUnavailable as Hi, setAppSignatureFastPath as Hl, withoutVideoMetadata as Hn, claimedTime as Ho, readLobby as Hr, HANDOFF_HELLO as Hs, staticDidDocument as Ht, SLOW_MS as Hu, groupWakeFrame as I, dhtFileId as Ia, enrollCancelFrame as Ic, DHT_TEXT_CAPABILITY as Ii, isAppKey as Il, parseFedimintRequestPayload as In, checkStatusCard as Io, mergeLobby as Ir, LEGACY_SERVICES as Is, didWebHost as It, turnVerifierMark as Iu, meshMessageRef as J, voiceLevel as Ja, inboxRecord as Jc, identityRevocationValue as Ji, canonicalJsonBytes as Jl, GhostLink as Jn, MAX_GROUP_CHAIN as Jo, transferEnded as Jr, HANDOFF_VERIFIED as Js, encodeDidDhtPacket as Jt, DiscoveryBudgetError as Ju, GROUP_EDIT_TEXT_BYTES as K, parseVoiceMeta as Ka, clearMissed as Kc, emptyIdentityLedger as Ki, readImageMeta as Kl, stripPictureMetadata as Kn, GROUP_ADMIN_OFF_ERROR as Ko, FileUplink as Kr, HANDOFF_REQUEST as Ks, didDhtFromPublicKey as Kt, setLinkTraceSink as Ku, groupWakes as L, formatFileSize as La, enrollCancelReason as Lc, capsDescriptors as Li, isAppLine as Ll, NO_AUDIO_METADATA as Ln, sameButtonText as Lo, newerHead as Lr, serviceIdFromName as Ls, normalizeDid as Lt, DEFAULT_RELAYS as Lu, mergeKnocks as M, DHT_FILE_TOO_LARGE as Ma, ENROLL_DONE as Mc, EDIT_CAPABILITY as Mi, appRef as Ml, fedimintRequestPayload as Mn, appCardUrl as Mo, hubRank as Mr, parseCallSignal as Ms, didWebDocumentUrl as Mt, turnInstance as Mu, readKnocks as N, DHT_MESSAGE_TTL as Na, ENROLL_GRANT as Nc, STATUS_CARD_CAPABILITY as Ni, appRefPublisher as Nl, findEndpoint as Nn, buttonLabelClash as No, lobbyKeys as Nr, signalHasVideo as Ns, didWebFile as Nt, turnKeys as Nu, encodeGroupEntryLink as O, recordsName as Oa, setAckFrame as Oc, chatAppId as Oi, sha256Paced as Ol, resolveLightningDestination as On, RUN_RESULTS as Oo, beaconKeys as Or, callRtcConfig as Os, checkDidSignature as Ot, nextTurnPosition as Ou, GROUP_WAKE_FRAME as P, peekDhtMailbox as Pa, ENROLL_HELLO as Pc, UPGRADE_CAPABILITY as Pi, checkAppRevokeStatement as Pl, isFederationId as Pn, cardLine as Po, lobbyRecords as Pr, emptyLinkRecords as Ps, didWebFileNames as Pt, turnName as Pu, SSHSIG_MAX_ARMOR as Q, MAX_REMOVAL_NUMBER as Qa, takeRequest as Qc, receivedIdentityStatus as Qi, readContactLink as Ql, pairedEditFits as Qn, rosterAdmin as Qo, liveStatus as Qr, handoffAttemptFailed as Qs, EVM_TEST_CHAINS as Qt, PacketTooLargeError as Qu, parseGroupWakeFrame as R, sanitizeFileName as Ra, enrollDigits as Rc, dialDescriptors as Ri, isAppRef as Rl, audioMetadataPatches as Rn, statusCardBytes as Ro, pickHubs as Rr, HANDOFF_ACK as Rs, parseDid as Rt, HEDGE_MISSING_MS as Ru, GROUP_READ_NOTE_COMMUNITY as S, encodeDnsQuery as Sa, readHandoffTurnFrame as Sc, wakeRequest as Si, assembleAppBundle as Sl, pubkyProofCapability as Sn, BUTTON_STYLES as So, readGroupSignal as Sr, BURST_RING_MS as Ss, verifyAtprotoRecordProof as St, TURN_SETTLE_MS as Su, encodeCommunityLink as T, normalizeDomain as Ta, SET_ACK as Tc, APP_RANGE_LIMITS as Ti, pacer as Tl, homeserverWebEndpoint as Tn, PR_CHECKS as To, meshHubs as Tr, RTC_CONFIG as Ts, DID_JWS_MAX_LENGTH as Tt, TURN_LAST_SEQUENCE as Tu, frameBytes as U, baseMime as Ua, readEnrollGrant as Uc, IdentityExchange as Ui, signAppObject as Ul, NO_PICTURE_METADATA as Un, heardTime as Uo, shouldBeHub as Ur, HANDOFF_OFFER as Us, strictBase64Url as Ut, currentRelays as Uu, GROUP_READ_NOTE as V, VOICE_LIMITS as Va, enrollHelloFrame as Vc, IDENTITY_REVOCATION_LABEL as Vi, readAppRevocations as Vl, videoMetadataPatches as Vn, arrivalKey as Vo, readBeaconHead as Vr, HANDOFF_HAVE as Vs, signingKeys as Vt, RelaysFailedError as Vu, COMMUNITY_EDIT_FRAME as W, downsamplePeaks as Wa, readEnrollHello as Wc, boundIdentityDisplay as Wi, signAppRevocation as Wl, PICTURE_METADATA_LIMITS as Wn, receivedTimestamp as Wo, ChatFiles as Wr, HANDOFF_PAKE as Ws, DidDhtError as Wt, normalizeRelayUrl as Wu, mentionsMember as X, EDIT_BUFFER_MS as Xa, planKnocks as Xc, isIdentityBinding as Xi, createContactLink as Xl, LIVENESS_PING_MS as Xn, commitHash as Xo, STATUS_AVAILABILITIES as Xr, filePartName as Xs, signDidDhtPacket as Xt, isDiscoveryBudgetError as Xu, parseCommunityEdit as Y, parseVideoMeta as Ya, newInbox as Yc, identityStatement as Yi, readCanonicalJson as Yl, INVITE_TAKEN as Yn, MEMBER_KEY as Yo, transferStalled as Yr, NO_ATTEMPTS as Ys, resolveDidDht as Yt, budgetRetryMs as Yu, groupName as Z, EDIT_RATE_WINDOW_MS as Za, settleRequest as Zc, newIdentityBinding as Zi, encodeContactLink as Zl, PAIRED_FRAME_TOO_LARGE as Zn, parseGroupCommit as Zo, STATUS_IDLE_AFTER_MS as Zr, handoffAttemptAllowed as Zs, ETHEREUM_USDT as Zt, withRequestOptions as Zu, groupTypingEpoch as _, DOMAIN_FILE_MAX_BYTES as _a, readHandoffCancel as _c, randomBytes as _d, WakeLimiter as _i, APP_BUNDLE_MAGIC as _l, PUBKY_PROOF_MAX_BYTES as _n, wireReaction as _o, GROUP_SIGNAL_FRAME as _r, parseLocalTarget as _s, isAtprotoDid as _t, newDeviceSetSecret as _u, appRevocationFor as a, automaticTransport as aa, handoffDigest as ac, identityFromSeed as ad, typingActivity as ai, knockSlotIdentity as al, WALLET_NETWORKS as an, forwardedAgain as ao, GROUP_FILE_LIMITS as ar, ratchetSessionOf as as, verifySshSignature as at, encodeInviteCode as au, COMMUNITY_LIMITS as b, domainTxtRecord as ba, readHandoffHello as bc, utf8Decode as bd, parseWakeFrame as bi, appDigest as bl, newPubkyProofFolder as bn, replySnippet as bo, SIGNAL_REPLY_MS as br, decodeControl as bs, shortAtprotoDid as bt, TURN_PUT_WINDOW_MS as bu, checkAppBeforeRun as c, irohRelayUrl as ca, handoffManifestFrames as cc, verify as cd, mayPin as ci, linkRecords as cl, assertWholeSats as cn, GROUP_REACTION_FRAME as co, GROUP_WANT_NO_FRAME as cr, DAEMON_WATCH_PEER_IDLE_MS as cs, decodeAnyBitcoinAddress as ct, ownInviteRefusal as cu, checkAppStoreIndex as d, HOLD_LIMITS as da, handoffReleaseFrame as dc, hasVisible as dd, pinNumberHolds as di, openRequest as dl, walletNetworkOf as dn, nextReactionNumber as do, isGroupMessageId as dr, PRESENCE_WINDOW as ds, ATPROTO_PROOF_COLLECTION as dt, HANDOFF_CAPABILITY as du, lastSharedWithMe as ea, handoffBusyFrame as ec, createRelayPayload as ed, sanitizeStatusText as ei, ContactRequestError as el, PaymentPreflightError as en, RateWindow as eo, pairedMessageFrame as er, verifyCommitSignature as es, SshSigError as et, deviceInviteJoinerParams as eu, readAppStore as f, HoldKeys as fa, handoffRetryAfter as fc, sanitizeDisplayText as fd, readPin as fi, readKnockSlot as fl, SPARK_NETWORKS as fn, queueReaction as fo, readGroupFileMeta as fr, RELAY_POLL_INTERVALS as fs, ATPROTO_PROOF_SCOPE as ft, deviceEchoFrame as fu, GroupTypingBoard as g, readManifest as ga, readHandoffAck as gc, isZ32Key as gd, WAKE_ONLINE_INTERVAL_MS as gi, APP_BUNDLE_LIMITS as gl, isBitcoinAddress as gn, validReactionNumber as go, CarriedTransport as gr, formatLocalTarget as gs, checkAtprotoProofRecord as gt, devicePingFrame as gu, GROUP_TYPING_FRAME as h, newMailbox as ha, newHandoffId as hc, fromBase64Url as hd, WAKE_ONLINE_DELAY_MS as hi, seenEntry as hl, sparkInvoiceDetails as hn, readReaction as ho, readGroupWantNo as hr, GhostlyHttpError as hs, atprotoProofRkey as ht, deviceLinkPairing as hu, addedAppPermissions as i, TRANSPORTS as ia, handoffDataFrame as ic, createIdentity as id, sanitizeTypingStatus as ii, contactDay as il, USDT_PUBLIC_RPC as in, parseLinkPreview as io, parseEngineError as ir, emptyRatchetState as is, sshSignCommand as it, decodeInviteCode as iu, knockRecords as j, ACTIVE_DHT_POLL_MS as ja, verifySetUpdate as jc, BUTTONS_CAPABILITY as ji, appFingerprint as jl, cashuRequestPayload as jn, appCardId as jo, freshHubs as jr, extractParamsFromSdp as js, didSignedMessages as jt, signTurnRelease as ju, entryParams as k, txtValue as ka, setUpdateFrame as kc, isAppVersion as ki, APP_PREFIXES as kl, decodeBolt11 as kn, STATUS_CARD_LIMITS as ko, beaconRecords as kr, callSignalHeardAt as ks, didGhostlyServiceEntry as kt, readTurnPacket as ku, planAppUpdate as l, HOLD_CAPABILITY as la, handoffOfferFrame as lc, MAX_AVATAR_LENGTH as ld, nextPinNumber as li, makeStampPaced as ll, formatPaymentAmount as ln, REACTION_LIMITS as lo, fetchesByItself as lr, DHT_POLL_INTERVALS as ls, ATPROTO_DECLARED_SCOPE as lt, DEVICES_CAPABILITY as lu, signAppStore as m, isHoldUrl as ma, handoffVersions as mc, bytesEqual as md, WAKE_ONLINE_BATCH_MS as mi, requestRecords as ml, sparkAddressKind as mn, reactionIsNewer as mo, readGroupWant as mr, presenceSeenAt as ms, atprotoProofRecord as mt, deviceKeyZ32 as mu, readX401SdJwtVc as n, emptyProofLedger as na, handoffContext as nc, openRelayPayload as nd, TYPING_REFRESH_MS as ni, contactAskerFrame as nl, SEPOLIA_TEST_USDT_FAUCET as nn, LINK_TRAILING as no, engineError as nr, RATCHET_CAPABILITY as ns, parseSshSignature as nt, OwnInviteError as nu, appStoreDecision as o, dialableIrohRelay as oa, handoffEphemeral as oc, identityFromSeedB64 as od, GROUP_PIN_FRAME as oi, knockSlotOf as ol, arkAddressPrefix as on, readForwarded as oo, GROUP_HAVE_FRAME as or, DirectPathWatch as os, verifyBitcoinMessage as ot, inviteLink as ou, readAppStoreSteps as p, HoldRefusedError as pa, handoffStreamKey as pc, stripHidden as pd, WAKE_CALL_INTERVAL_MS as pi, readLinkRecord as pl, SPARK_PROVIDER as pn, reactionEmoji as po, readGroupHave as pr, WATCH_PEER_MS as ps, atprotoDidMethod as pt, deviceEchoNonce as pu, carryMentions as q, voiceDownloadName as qa, endedRequests as qc, identityRefusal as qi, canonicalJson as ql, withoutPictureMetadata as qn, GROUP_MEMBER_CAP as qo, sentWhole as qr, HANDOFF_TIMINGS as qs, encodeDidDhtDeactivated as qt, traceLink as qu, sameX401HolderJwk as r, validExternalKey as ra, handoffContextProof as rc, parseRelayPayload as rd, TypingSender as ri, contactAskerHolds as rl, TEST_USDT_FAUCET_AMOUNT as rn, linkStop as ro, engineText as rr, RatchetBox as rs, sameSshKey as rt, createChatInvite as ru, appUpdateDecision as s, irohDescriptor as sa, handoffHelloFrame as sc, publicKeyFromZ32 as sd, PIN_LIMITS as si, knockSlotRecords as sl, assertTokenUnits as sn, COMMUNITY_REACTION_FRAME as so, GROUP_WANT_FRAME as sr, AWAITING_PEER_MS as ss, BitcoinAddressError as st, inviteOwnership as su, newX401HolderKey as t, PeerProofs as ta, handoffCancelFrame as tc, newerPacket as td, TYPING_KINDS as ti, REQUEST_LIFETIME_MS as tl, SEPOLIA_TEST_USDT as tn, dhtEditId as to, EngineError as tr, edgeParams as ts, parseSshPublicKey as tt, readDeviceInvite as tu, APP_STORE_LIMITS as u, HOLD_DATED_BACK_MS as ua, handoffPakeFrame as uc, sanitizeAvatar as ud, pinIsNewer as ui, mergeContactKnocks as ul, validatePaymentTarget as un, ReactionWindow as uo, groupFileFallback as ur, EXPECT_PEER_MS as us, ATPROTO_FULL_SCOPE as ut, ENROLL_CAPABILITY as uu, openGroupTyping as v, decodeDnsResponse as va, readHandoffDone as vc, toBase64Url as vd, deviceWakeRequest as vi, APP_ICON_PATH as vl, isPubkyKey as vn, pairedReplyAuthor as vo, SIGNAL_FRESH_MS as vr, webLocalFetch as vs, normalizeAtprotoHandle as vt, seedSigner as vu, decodeCommunityLink as w, nip05RootKey as wa, sealHandoffPiece as wc, vapidKeysMatch as wi, isAppUrl as wl, pubkyProofPath as wn, ITEM_STATES as wo, mayBeHub as wr, QUICK_REDIAL_MS as ws, DID_FILE_MAX_BYTES as wt, turnPutSummary as wu, CommunitySession as x, domainWellKnownFile as xa, readHandoffPake as xc, utf8Encode as xd, relayRequest as xi, appViewOf as xl, normalizePubkyKey as xn, BUTTON_ID as xo, groupSignalFrame as xr, encodeControl as xs, AtprotoProofError as xt, TURN_RAISE_READ_TIMEOUT_MS as xu, sealGroupTyping as y, dnsProofName as ya, readHandoffHave as yc, toZ32 as yd, newWakeToken as yi, APP_PERMISSIONS as yl, isPubkyProofFolder as yn, readReply as yo, SIGNAL_HOLD_MS as yr, LIMITS as ys, parseAtprotoDidDocument as yt, webCryptoSigner as yu, GROUP_LIMITS as z, sanitizeMime as za, enrollDoneFrame as zc, IDENTITY_MAX_EVIDENCE as zi, readAppRevocation as zl, withoutAudioMetadata as zn, statusCardText as zo, rankHubs as zr, HANDOFF_CANCEL as zs, parseDidDocument as zt, HEDGE_MS as zu };
|
|
39675
40305
|
|
|
39676
|
-
//# sourceMappingURL=src-
|
|
40306
|
+
//# sourceMappingURL=src-BzsyAvPf.js.map
|