@ghostlytools/sdk 1.8.0 → 1.9.0

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.
@@ -1379,7 +1379,14 @@ function normalizeRelayUrl(input) {
1379
1379
  function relayUrlProblem(input) {
1380
1380
  const line = input.trim();
1381
1381
  if (normalizeRelayUrl(line)) return null;
1382
- return /^(?:[a-z][a-z\d+.-]*:\/\/)?[^\s/:]+\.[^\s]+$/i.test(line) ? `Use an https:// relay address: ${line}` : `Not a relay address: ${line}`;
1382
+ return looksLikeHost(line) || looksLikeHost(line.replace(/^[a-z][a-z\d+.-]*:\/\//i, "")) ? `Use an https:// relay address: ${line}` : `Not a relay address: ${line}`;
1383
+ }
1384
+ /** No space, and a dot after the first character, before the last one and before any `/` or `:`; linear, for a long pasted line. */
1385
+ function looksLikeHost(text) {
1386
+ if (/\s/.test(text)) return false;
1387
+ const slash = text.search(/[/:]/);
1388
+ const dot = text.indexOf(".", 1);
1389
+ return dot > 0 && dot < text.length - 1 && (slash < 0 || dot < slash);
1383
1390
  }
1384
1391
  /** A relay the breaker leaves alone for failing (`RelayBreaker`): nothing was asked of it now. */
1385
1392
  var RelayLeftAloneError = class extends Error {};
@@ -4146,17 +4153,17 @@ function parseImageMeta(value, mime) {
4146
4153
  height
4147
4154
  } : void 0;
4148
4155
  }
4149
- var u16be = (b, at) => b[at] << 8 | b[at + 1];
4156
+ var u16be$1 = (b, at) => b[at] << 8 | b[at + 1];
4150
4157
  var u16le = (b, at) => b[at] | b[at + 1] << 8;
4151
4158
  var u24le = (b, at) => b[at] | b[at + 1] << 8 | b[at + 2] << 16;
4152
- var u32be = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
4159
+ var u32be$2 = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
4153
4160
  var ascii = (b, at, text) => [...text].every((c, i) => b[at + i] === c.charCodeAt(0));
4154
4161
  var sized = (width, height) => edge(width) && edge(height) ? {
4155
4162
  width,
4156
4163
  height
4157
4164
  } : void 0;
4158
4165
  /** SOFn markers: every frame type but DHT (C4), JPG (C8) and DAC (CC). */
4159
- var JPEG_FRAME = /* @__PURE__ */ new Set([
4166
+ var JPEG_FRAME$1 = /* @__PURE__ */ new Set([
4160
4167
  192,
4161
4168
  193,
4162
4169
  194,
@@ -4176,8 +4183,8 @@ function exifOrientation(b, tiff, end) {
4176
4183
  if (tiff + 8 > end) return 1;
4177
4184
  const little = ascii(b, tiff, "II");
4178
4185
  if (!little && !ascii(b, tiff, "MM")) return 1;
4179
- const u16 = (at) => little ? u16le(b, at) : u16be(b, at);
4180
- const u32 = (at) => little ? u16le(b, at) + u16le(b, at + 2) * 65536 : u32be(b, at);
4186
+ const u16 = (at) => little ? u16le(b, at) : u16be$1(b, at);
4187
+ const u32 = (at) => little ? u16le(b, at) + u16le(b, at + 2) * 65536 : u32be$2(b, at);
4181
4188
  if (u16(tiff + 2) !== 42) return 1;
4182
4189
  const ifd = tiff + u32(tiff + 4);
4183
4190
  if (ifd + 2 > end) return 1;
@@ -4206,13 +4213,13 @@ function jpegSize(b) {
4206
4213
  continue;
4207
4214
  }
4208
4215
  if (marker === 217 || marker === 218) return void 0;
4209
- const length = u16be(b, at + 2);
4216
+ const length = u16be$1(b, at + 2);
4210
4217
  if (length < 2) return void 0;
4211
4218
  const end = Math.min(b.length, at + 2 + length);
4212
4219
  if (marker === 225 && ascii(b, at + 4, "Exif\0\0")) orientation = exifOrientation(b, at + 10, end);
4213
- if (JPEG_FRAME.has(marker)) {
4220
+ if (JPEG_FRAME$1.has(marker)) {
4214
4221
  if (at + 9 > b.length) return void 0;
4215
- const height = u16be(b, at + 5), width = u16be(b, at + 7);
4222
+ const height = u16be$1(b, at + 5), width = u16be$1(b, at + 7);
4216
4223
  return orientation >= 5 ? sized(height, width) : sized(width, height);
4217
4224
  }
4218
4225
  at += 2 + length;
@@ -4262,7 +4269,7 @@ function gifSize(b) {
4262
4269
  function imageSize(head) {
4263
4270
  const b = head;
4264
4271
  try {
4265
- if (b.length >= 24 && b[0] === 137 && ascii(b, 1, "PNG\r\n\n") && ascii(b, 12, "IHDR")) return sized(u32be(b, 16), u32be(b, 20));
4272
+ if (b.length >= 24 && b[0] === 137 && ascii(b, 1, "PNG\r\n\n") && ascii(b, 12, "IHDR")) return sized(u32be$2(b, 16), u32be$2(b, 20));
4266
4273
  if (b.length >= 10 && (ascii(b, 0, "GIF87a") || ascii(b, 0, "GIF89a"))) return gifSize(b);
4267
4274
  if (b.length >= 4 && b[0] === 255 && b[1] === 216 && b[2] === 255) return jpegSize(b);
4268
4275
  if (b.length >= 16 && ascii(b, 0, "RIFF") && ascii(b, 8, "WEBP")) return webpSize(b);
@@ -6516,7 +6523,7 @@ function isViewerTag(tag) {
6516
6523
  }
6517
6524
  function serviceIdFromName(name, taken = []) {
6518
6525
  const used = new Set(taken);
6519
- const base = name.toLowerCase().normalize("NFKD").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 24) || "service";
6526
+ const base = name.toLowerCase().normalize("NFKD").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 24) || "service";
6520
6527
  let id = base;
6521
6528
  for (let n = 2; used.has(id) || LEGACY_SERVICES.some((s) => s.id === id); n++) id = `${base}-${n}`;
6522
6529
  return id;
@@ -9950,7 +9957,7 @@ function messageKeys(mk) {
9950
9957
  function aad(lane, sender, recipient, header) {
9951
9958
  return concatBytes(utf8Encode("ghostly-ratchet/1"), new Uint8Array([LANE[lane]]), publicKeyFromZ32(sender), publicKeyFromZ32(recipient), header);
9952
9959
  }
9953
- function header$1(lane, session, n) {
9960
+ function header$2(lane, session, n) {
9954
9961
  return concatBytes(new Uint8Array([VERSION$1, LANE[lane]]), unb64(session.sid), unb64(session.dhsPub), u32$2(session.pnHold), u32$2(n));
9955
9962
  }
9956
9963
  function parseHeader(sealed) {
@@ -9995,7 +10002,7 @@ function ratchetSeal(prev, keys, lane, plaintext, options = {}) {
9995
10002
  }
9996
10003
  const session = state.current ??= newSession(context(keys), random(SID_BYTES), random, now);
9997
10004
  const [mk, next] = advance(session.send[lane]);
9998
- const head = header$1(lane, session, session.send[lane].n);
10005
+ const head = header$2(lane, session, session.send[lane].n);
9999
10006
  session.send[lane] = next;
10000
10007
  session.at = now;
10001
10008
  const { key, nonce } = messageKeys(mk);
@@ -10760,6 +10767,18 @@ function cardUrl(value) {
10760
10767
  if (url.protocol !== "https:" || !url.hostname || url.username || url.password) return void 0;
10761
10768
  return url.href.length <= STATUS_CARD_LIMITS.url ? url.href : void 0;
10762
10769
  }
10770
+ /**
10771
+ * The link an app card names, sent or read (WISP 405 § An app): a card's link without its query or fragment. A
10772
+ * private file's read token rides in a query, and a card goes to a contact; a bundle is pinned by its digest, not its link.
10773
+ */
10774
+ function appCardUrl(value) {
10775
+ const href = cardUrl(value);
10776
+ if (!href) return void 0;
10777
+ const url = new URL(href);
10778
+ url.search = "";
10779
+ url.hash = "";
10780
+ return url.href;
10781
+ }
10763
10782
  /** The host a card shows beside a link, so the reader sees where it goes before following it. */
10764
10783
  function cardLinkHost(url) {
10765
10784
  try {
@@ -10877,7 +10896,7 @@ function readStatusCard(raw, now = Date.now()) {
10877
10896
  if (!isAppRef(raw.ref) || id !== appCardId(raw.ref) || !isAppHash(raw.digest) || !appSequence(raw.sequence)) return void 0;
10878
10897
  const title = cardLine(raw.title, STATUS_CARD_LIMITS.appTitle);
10879
10898
  if (!title) return void 0;
10880
- const version = cardLine(raw.version, STATUS_CARD_LIMITS.appVersion), url = cardUrl(raw.url);
10899
+ const version = cardLine(raw.version, STATUS_CARD_LIMITS.appVersion), url = appCardUrl(raw.url);
10881
10900
  return {
10882
10901
  kind: "app",
10883
10902
  id,
@@ -11215,8 +11234,8 @@ function removedCardText(of, title) {
11215
11234
  function statusCardText(card) {
11216
11235
  if (card.kind === "removed") return removedCardText(card.of);
11217
11236
  if (card.kind === "app") {
11218
- const named = `${card.title}${card.version ? ` ${card.version}` : ""}`;
11219
- return [card.opened ? `🧩 Opened ${named} in this chat (Ghostly app)` : `🧩 ${named} (Ghostly app)`, ...card.url ? [card.url] : []].join("\n");
11237
+ const named = `${card.title}${card.version ? ` ${card.version}` : ""}`, url = appCardUrl(card.url);
11238
+ return [card.opened ? `🧩 Opened ${named} in this chat (Ghostly app)` : `🧩 ${named} (Ghostly app)`, ...url ? [url] : []].join("\n");
11220
11239
  }
11221
11240
  if (card.kind === "usage") {
11222
11241
  const left = `${usageLeft(card)}% left${card.window ? ` (${card.window})` : ""}`;
@@ -14005,7 +14024,7 @@ function irohRelayUrl(value, spelling = "dotted") {
14005
14024
  const host = url.hostname, name = host.replace(/\.$/, "");
14006
14025
  if (!name.includes(".") && name !== "localhost") return value;
14007
14026
  if (name.startsWith("[") || /^\d+(\.\d+){3}$/.test(name)) return value;
14008
- const wanted = spelling === "plain" || name === "localhost" ? name : `${name}.`;
14027
+ const wanted = spelling === "dotted" && /(^|\.)iroh\.link$/.test(name) ? `${name}.` : name;
14009
14028
  if (wanted === host) return value;
14010
14029
  url.hostname = wanted;
14011
14030
  return url.href;
@@ -14025,6 +14044,14 @@ function irohDescriptor(descriptor, spelling = "dotted") {
14025
14044
  * as a test relay is (the same rule as the relay settings).
14026
14045
  */
14027
14046
  var RELAY_URL = /^((https|wss):\/\/[^\s]{1,120}|(http|ws):\/\/(127\.0\.0\.1|localhost|\[::1\])(:\d{1,5})?(\/[^\s]{0,100})?)$/;
14047
+ /**
14048
+ * A relay URL with more than its server's address in it: a login, a query or a fragment, which no relay setting takes
14049
+ * (irohWeb.ts `irohRelayProblem`, hyperdhtRelay.ts `hyperdhtRelayProblem`). An older app named its HyperDHT relay as
14050
+ * set, with them; such a descriptor is not dialed or kept, and the rest of what the contact told still is.
14051
+ */
14052
+ var RELAY_WITH_SECRETS = /^[a-z]+:\/\/[^/?#]*@|[?#]/i;
14053
+ /** A relay URL a descriptor may name: `RELAY_URL`, with nothing but the server's address in it. */
14054
+ var relayUrl = (value) => typeof value === "string" && RELAY_URL.test(value) && !RELAY_WITH_SECRETS.test(value);
14028
14055
  var HEX_KEY = /^[0-9a-f]{64}$/;
14029
14056
  /** An Iroh direct address as the adapters parse it: an IPv4 or bracketed IPv6 address and its port. */
14030
14057
  var SOCKET_ADDRESS = /^(\d{1,3}(\.\d{1,3}){3}|\[[0-9A-Fa-f:.]{2,45}(%[A-Za-z0-9._-]{1,16})?\]):\d{1,5}$/;
@@ -14032,7 +14059,7 @@ var MAX_ADDRESSES = 8;
14032
14059
  /**
14033
14060
  * A contact's native descriptors as it tells them on a session (`paired-policy`, `paired-adapters`) or as this app
14034
14061
  * kept them: only what the adapters dial, each field in the shape its adapter makes. The keys are 64 hex characters,
14035
- * a relay passes `RELAY_URL` (the rule its capability record is read by), an Iroh descriptor lists at most eight
14062
+ * a relay passes `relayUrl` (the rule its capability record is read by), an Iroh descriptor lists at most eight
14036
14063
  * socket addresses. A descriptor that is anything else is left out, as one the contact never told; a field this app
14037
14064
  * does not know is not kept.
14038
14065
  */
@@ -14040,17 +14067,16 @@ function checkedDescriptors(value) {
14040
14067
  const out = {};
14041
14068
  if (!value || typeof value !== "object" || Array.isArray(value)) return out;
14042
14069
  const raw = value;
14043
- const relay = (v) => typeof v === "string" && RELAY_URL.test(v);
14044
14070
  const relayed = (v) => v === void 0 || typeof v === "boolean";
14045
14071
  const iroh = raw["iroh/1"];
14046
- if (iroh && typeof iroh === "object" && typeof iroh.id === "string" && HEX_KEY.test(iroh.id) && (iroh.relay === void 0 || iroh.relay === null || relay(iroh.relay)) && relayed(iroh.relayed) && Array.isArray(iroh.addresses) && iroh.addresses.length <= MAX_ADDRESSES && iroh.addresses.every((a) => typeof a === "string" && SOCKET_ADDRESS.test(a))) out["iroh/1"] = {
14072
+ if (iroh && typeof iroh === "object" && typeof iroh.id === "string" && HEX_KEY.test(iroh.id) && (iroh.relay === void 0 || iroh.relay === null || relayUrl(iroh.relay)) && relayed(iroh.relayed) && Array.isArray(iroh.addresses) && iroh.addresses.length <= MAX_ADDRESSES && iroh.addresses.every((a) => typeof a === "string" && SOCKET_ADDRESS.test(a))) out["iroh/1"] = {
14047
14073
  id: iroh.id,
14048
14074
  relay: iroh.relay ?? null,
14049
14075
  addresses: [...iroh.addresses],
14050
14076
  ...iroh.relayed !== void 0 ? { relayed: iroh.relayed } : {}
14051
14077
  };
14052
14078
  const hyper = raw["hyperdht/1"];
14053
- if (hyper && typeof hyper === "object" && typeof hyper.publicKey === "string" && HEX_KEY.test(hyper.publicKey) && (hyper.relay === void 0 || relay(hyper.relay)) && relayed(hyper.relayed)) out["hyperdht/1"] = {
14079
+ if (hyper && typeof hyper === "object" && typeof hyper.publicKey === "string" && HEX_KEY.test(hyper.publicKey) && (hyper.relay === void 0 || relayUrl(hyper.relay)) && relayed(hyper.relayed)) out["hyperdht/1"] = {
14054
14080
  publicKey: hyper.publicKey,
14055
14081
  ...hyper.relay !== void 0 ? { relay: hyper.relay } : {},
14056
14082
  ...hyper.relayed !== void 0 ? { relayed: hyper.relayed } : {}
@@ -14552,7 +14578,7 @@ var decOrEmpty = (s) => {
14552
14578
  }
14553
14579
  };
14554
14580
  var hash = (s) => enc(sha256(utf8Encode(s)));
14555
- var header = enc(utf8Encode(JSON.stringify({
14581
+ var header$1 = enc(utf8Encode(JSON.stringify({
14556
14582
  alg: "EdDSA",
14557
14583
  typ: "ghostly-pubky-identity-delegation/1"
14558
14584
  })));
@@ -14568,13 +14594,13 @@ function ringClaims(statement, issuer, delegate, issuedAt, expiresAt) {
14568
14594
  }
14569
14595
  function ringAuthorization(claims, seed) {
14570
14596
  if (toZ32(ed25519.getPublicKey(seed)) !== claims.iss) throw new Error("Ring identity mismatch");
14571
- const input = header + "." + enc(utf8Encode(JSON.stringify(claims)));
14597
+ const input = header$1 + "." + enc(utf8Encode(JSON.stringify(claims)));
14572
14598
  return input + "." + enc(ed25519.sign(utf8Encode(input), seed));
14573
14599
  }
14574
14600
  function verifyRingAuthorization(authorization, statement, issuer, issuedAt, expiresAt) {
14575
14601
  if (typeof authorization !== "string" || authorization.length > 2400) throw new Error("Invalid Ring authorization");
14576
14602
  const [h, p, s, ...extra] = authorization.split(".");
14577
- if (extra.length || h !== header || !p || !s) throw new Error("Unsupported Ring authorization");
14603
+ if (extra.length || h !== header$1 || !p || !s) throw new Error("Unsupported Ring authorization");
14578
14604
  let claims;
14579
14605
  try {
14580
14606
  claims = JSON.parse(utf8Decode(dec(p)));
@@ -14752,7 +14778,7 @@ async function verifyPeerProof(event, c, readStorage) {
14752
14778
  if (sig.length !== 64 || !verify(sig, data, fromZ32(c.externalKey))) throw new Error("Invalid Pubky signature");
14753
14779
  } else if (c.adapter === "keet-import") {
14754
14780
  if (sig.length !== 107 || sig[0] !== 1 || sig[41] !== 0 || sig[42] !== 1) throw new Error("Unsupported Keet attestation");
14755
- const { default: IdentityKey } = await import("./keet-identity-key-Db5KY0V1.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
14781
+ const { default: IdentityKey } = await import("./keet-identity-key-D8ioYMkd.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
14756
14782
  if (!IdentityKey.verify(b4a.from(sig), b4a.from(data), { expectedIdentity: b4a.from(unhex(c.externalKey)) })) throw new Error("Invalid Keet attestation");
14757
14783
  } else throw new Error("Unsupported proof adapter");
14758
14784
  }
@@ -15788,12 +15814,12 @@ function capsDescriptors(descriptors) {
15788
15814
  const iroh = descriptors?.["iroh/1"];
15789
15815
  if (iroh && typeof iroh.id === "string" && HEX64$1.test(iroh.id)) out["iroh/1"] = {
15790
15816
  id: hexToKey(iroh.id),
15791
- ...typeof iroh.relay === "string" && RELAY_URL.test(iroh.relay) ? { relay: iroh.relay } : {}
15817
+ ...relayUrl(iroh.relay) ? { relay: iroh.relay } : {}
15792
15818
  };
15793
15819
  const hyper = descriptors?.["hyperdht/1"];
15794
15820
  if (hyper && typeof hyper.publicKey === "string" && HEX64$1.test(hyper.publicKey)) out["hyperdht/1"] = {
15795
15821
  publicKey: hexToKey(hyper.publicKey),
15796
- ...typeof hyper.relay === "string" && RELAY_URL.test(hyper.relay) ? { relay: hyper.relay } : {}
15822
+ ...relayUrl(hyper.relay) ? { relay: hyper.relay } : {}
15797
15823
  };
15798
15824
  return out;
15799
15825
  }
@@ -15827,16 +15853,17 @@ function parseDescriptors(value) {
15827
15853
  const raw = value;
15828
15854
  const out = {};
15829
15855
  const iroh = raw["iroh/1"], hyper = raw["hyperdht/1"];
15856
+ const withSecrets = (relay) => typeof relay === "string" && RELAY_WITH_SECRETS.test(relay);
15830
15857
  if (iroh !== void 0) {
15831
15858
  if (!iroh || typeof iroh.id !== "string" || !KEY.test(iroh.id) || iroh.relay !== void 0 && (typeof iroh.relay !== "string" || !RELAY_URL.test(iroh.relay))) return null;
15832
- out["iroh/1"] = {
15859
+ if (!withSecrets(iroh.relay)) out["iroh/1"] = {
15833
15860
  id: iroh.id,
15834
15861
  ...iroh.relay !== void 0 ? { relay: iroh.relay } : {}
15835
15862
  };
15836
15863
  }
15837
15864
  if (hyper !== void 0) {
15838
15865
  if (!hyper || typeof hyper.publicKey !== "string" || !KEY.test(hyper.publicKey) || hyper.relay !== void 0 && (typeof hyper.relay !== "string" || !RELAY_URL.test(hyper.relay))) return null;
15839
- out["hyperdht/1"] = {
15866
+ if (!withSecrets(hyper.relay)) out["hyperdht/1"] = {
15840
15867
  publicKey: hyper.publicKey,
15841
15868
  ...hyper.relay !== void 0 ? { relay: hyper.relay } : {}
15842
15869
  };
@@ -19057,8 +19084,20 @@ var FILE_LIMITS = {
19057
19084
  stallMs: 6e4,
19058
19085
  /** A receiver makes what it stored durable, and records the point to resume from, this often. */
19059
19086
  checkpointBytes: 8388608,
19060
- /** A receiver confirms at least this often while writing. */
19087
+ /**
19088
+ * A receiver confirms at least this often while writing, and the file's last bytes at once. Its writes are buffered
19089
+ * and done at once, so confirming whenever they were all done too was confirming nearly every chunk: 6,400 confirms for
19090
+ * 100 MiB, each a native call and a progress update on both sides. A host that batches them (`batchConfirms`) does not.
19091
+ */
19061
19092
  ackEveryBytes: 131072,
19093
+ /**
19094
+ * Batched (`ChatFilesHost.batchConfirms`), bytes stored and not confirmed are confirmed this long after the first of
19095
+ * them was stored, at most. What a sender has in flight may be no more than `ackEveryBytes` (a window at its floor, one
19096
+ * chunk while the path is measured), and bytes waiting here for a confirm are bytes it cannot send: on a slow or
19097
+ * wavering path a confirm comes about every this long, as fast as the window needs. A round trip it measures is up to
19098
+ * this much longer, well inside the queue it allows (`queueMs`).
19099
+ */
19100
+ ackWaitMs: 10,
19062
19101
  /** A sender reads its file this much at a time. */
19063
19102
  readBytes: 1048576,
19064
19103
  /** The session refused a data frame (its send budget was full): the sender looks again after this long. */
@@ -19395,6 +19434,13 @@ var ChatFiles = class {
19395
19434
  peerRoomValue = null;
19396
19435
  /** What the chat's files may have in flight, sized by the path. */
19397
19436
  pace = new FilePace();
19437
+ /**
19438
+ * What the chat's files had in flight just before the last confirm. A receiver confirms many chunks at once
19439
+ * (`ackEveryBytes`), and the chunks sent for them go with that much in flight, the window: counted one by one, the
19440
+ * first went with the window less a confirm, and read as a path carrying that little, it shrank the window and ended
19441
+ * every trial of a larger one (a fifth of the rate on a wavering path). Confirmed chunk by chunk, it is what each sends with.
19442
+ */
19443
+ refill = 0;
19398
19444
  constructor(host) {
19399
19445
  this.host = host;
19400
19446
  }
@@ -19479,6 +19525,7 @@ var ChatFiles = class {
19479
19525
  this.attached = true;
19480
19526
  this.peerRoomValue = null;
19481
19527
  this.pace.reset();
19528
+ this.refill = 0;
19482
19529
  this.host.uplink?.join(this);
19483
19530
  this.sayRoom();
19484
19531
  this.sweep();
@@ -19514,7 +19561,11 @@ var ChatFiles = class {
19514
19561
  clearTimeout(entry.out.wake);
19515
19562
  entry.out.next = entry.record.confirmed;
19516
19563
  }
19517
- if (entry.in) clearTimeout(entry.in.timer);
19564
+ if (entry.in) {
19565
+ clearTimeout(entry.in.timer);
19566
+ clearTimeout(entry.in.ackTimer);
19567
+ entry.in.ackTimer = void 0;
19568
+ }
19518
19569
  if (entry.in && !transferEnded(entry.record)) this.checkpoint(entry);
19519
19570
  }
19520
19571
  }
@@ -19601,7 +19652,7 @@ var ChatFiles = class {
19601
19652
  out.next = record.confirmed;
19602
19653
  const paused = record.state === "paused" && record.pausedBy === "me";
19603
19654
  if (!this.send(this.offerFrame(record, paused))) return;
19604
- if (!paused && record.state !== "offered") {
19655
+ if (!paused && record.state !== "offered" && record.state !== "verifying") {
19605
19656
  record.state = "offered";
19606
19657
  record.pausedBy = void 0;
19607
19658
  this.changed(entry);
@@ -19708,7 +19759,7 @@ var ChatFiles = class {
19708
19759
  out.sends.push({
19709
19760
  end: out.next,
19710
19761
  at: this.now(),
19711
- flight: this.inFlight(),
19762
+ flight: Math.max(this.inFlight(), Math.min(this.refill, this.pace.limit(this.floor()))),
19712
19763
  generation
19713
19764
  });
19714
19765
  }
@@ -19837,9 +19888,16 @@ var ChatFiles = class {
19837
19888
  this.startNext();
19838
19889
  });
19839
19890
  }
19840
- /** The next file waiting its turn, once one ends. */
19891
+ /**
19892
+ * The next file waiting its turn, once one ends. The others were told they wait when they were queued: told again at
19893
+ * each end, n files at once made about n²/2 frames, and their sender stored its record for each.
19894
+ */
19841
19895
  startNext() {
19842
- for (const entry of this.entries.values()) if (entry.record.direction === "in" && entry.record.state === "queued") this.startIncoming(entry);
19896
+ for (const entry of this.entries.values()) {
19897
+ if (entry.record.direction !== "in" || entry.record.state !== "queued" || entry.in.starting) continue;
19898
+ if (this.activeIncoming(entry) >= FILE_LIMITS.maxActiveIncoming) return;
19899
+ this.startIncoming(entry);
19900
+ }
19843
19901
  }
19844
19902
  async onOffer(frame) {
19845
19903
  const id = frame.id;
@@ -20057,6 +20115,7 @@ var ChatFiles = class {
20057
20115
  /** An agreed file that ended here, offered again: taken again from the start. */
20058
20116
  async retake(entry) {
20059
20117
  await entry.in?.target?.then((t) => t.discard()).catch(() => {});
20118
+ clearTimeout(entry.in?.ackTimer);
20060
20119
  entry.in = {
20061
20120
  written: 0,
20062
20121
  stored: 0,
@@ -20109,15 +20168,8 @@ var ChatFiles = class {
20109
20168
  if (transferEnded(record) || incoming.dropped) return;
20110
20169
  await (await target).append(bytes);
20111
20170
  incoming.stored = offset + bytes.length;
20112
- if (incoming.stored === incoming.written || incoming.stored - incoming.acked >= FILE_LIMITS.ackEveryBytes) {
20113
- incoming.acked = incoming.stored;
20114
- this.send({
20115
- t: "pf-got",
20116
- id: record.id,
20117
- offset: incoming.stored
20118
- });
20119
- this.changed(entry, true);
20120
- }
20171
+ if (incoming.stored - incoming.acked >= FILE_LIMITS.ackEveryBytes || incoming.stored === record.file.size || !this.host.batchConfirms && incoming.stored === incoming.written) this.confirm(entry);
20172
+ else if (this.host.batchConfirms) incoming.ackTimer ??= setTimeout(() => this.confirm(entry), FILE_LIMITS.ackWaitMs);
20121
20173
  if (incoming.stored - incoming.checkpointed >= FILE_LIMITS.checkpointBytes) await this.checkpointNow(entry);
20122
20174
  }).catch((error) => {
20123
20175
  if (transferEnded(record)) return;
@@ -20131,6 +20183,20 @@ var ChatFiles = class {
20131
20183
  this.startNext();
20132
20184
  });
20133
20185
  }
20186
+ /** `pf-got` for what is stored and not confirmed yet. */
20187
+ confirm(entry) {
20188
+ const { record } = entry, incoming = entry.in;
20189
+ clearTimeout(incoming.ackTimer);
20190
+ incoming.ackTimer = void 0;
20191
+ if (transferEnded(record) || incoming.stored <= incoming.acked) return;
20192
+ incoming.acked = incoming.stored;
20193
+ this.send({
20194
+ t: "pf-got",
20195
+ id: record.id,
20196
+ offset: incoming.stored
20197
+ });
20198
+ this.changed(entry, true);
20199
+ }
20134
20200
  /** What was stored is durable, and a restart resumes from there. */
20135
20201
  async checkpoint(entry) {
20136
20202
  if (!entry.in?.target) return;
@@ -20296,6 +20362,7 @@ var ChatFiles = class {
20296
20362
  out.generation++;
20297
20363
  record.confirmed = frame.offset;
20298
20364
  out.next = frame.offset;
20365
+ this.refill = 0;
20299
20366
  record.state = "active";
20300
20367
  record.pausedBy = record.waitingFor = void 0;
20301
20368
  this.changed(outgoing);
@@ -20308,6 +20375,7 @@ var ChatFiles = class {
20308
20375
  return;
20309
20376
  case "pf-wait":
20310
20377
  if (record.state === "paused" && record.pausedBy === "me") return;
20378
+ if (frame.why === "paused" ? record.state === "paused" && record.pausedBy === "peer" : record.state === "asking" && record.waitingFor === (frame.why === "busy" ? "busy" : "consent")) return;
20311
20379
  out.generation++;
20312
20380
  out.next = record.confirmed;
20313
20381
  clearTimeout(out.timer);
@@ -20323,6 +20391,7 @@ var ChatFiles = class {
20323
20391
  return;
20324
20392
  case "pf-got": {
20325
20393
  if (!isInt$1(frame.offset) || frame.offset <= record.confirmed || frame.offset > out.next) return;
20394
+ this.refill = this.inFlight();
20326
20395
  this.pace.delivered += frame.offset - record.confirmed;
20327
20396
  record.confirmed = frame.offset;
20328
20397
  let sample;
@@ -20367,6 +20436,8 @@ var ChatFiles = class {
20367
20436
  if (entry.in) {
20368
20437
  const incoming = entry.in;
20369
20438
  clearTimeout(incoming.timer);
20439
+ clearTimeout(incoming.ackTimer);
20440
+ incoming.ackTimer = void 0;
20370
20441
  incoming.writing.finally(() => {
20371
20442
  if (transferEnded(record)) incoming.target = void 0;
20372
20443
  });
@@ -20405,6 +20476,7 @@ var ChatFiles = class {
20405
20476
  const entry = this.entry(direction, id), { record } = entry;
20406
20477
  if (transferEnded(record) || record.state === "verifying" || record.state === "paused" && record.pausedBy === "me") return;
20407
20478
  if (direction === "in" && record.state === "asking") return;
20479
+ if (sentWhole(record)) return;
20408
20480
  record.state = "paused";
20409
20481
  record.pausedBy = "me";
20410
20482
  if (entry.out) {
@@ -21121,6 +21193,8 @@ var CarriedTransport = class {
21121
21193
  seen = -1n;
21122
21194
  /** A read under way: resolved when a carried packet comes meanwhile. */
21123
21195
  waiting = null;
21196
+ /** The records of a publish refused before they were signed, while nobody could carry them: signed when one can (`latest`). */
21197
+ unsigned = null;
21124
21198
  /** The packet the relays have not got yet. */
21125
21199
  pending = null;
21126
21200
  /** How many carried packets of the member's came: a deferral that ends with none more says no member reaches it. */
@@ -21153,6 +21227,7 @@ var CarriedTransport = class {
21153
21227
  async publish(identity, records, options) {
21154
21228
  if (this.stopped || identity.pubKeyZ32 !== this.myKey) return this.inner.publish(identity, records, options);
21155
21229
  this.drop();
21230
+ this.unsigned = null;
21156
21231
  if (this.hooks.open()) {
21157
21232
  const relayOptions = options?.signal ? options : {
21158
21233
  ...options,
@@ -21166,6 +21241,16 @@ var CarriedTransport = class {
21166
21241
  if (this.hooks.direct && this.inner.publishPayload) published.then(() => this.handDirect(payload), () => {});
21167
21242
  return published;
21168
21243
  }
21244
+ if (this.hooks.canCarry && !this.hooks.canCarry()) {
21245
+ const held = this.inner.publishHeld?.(identity.pubKeyZ32, options);
21246
+ if (held) {
21247
+ this.unsigned = {
21248
+ identity,
21249
+ records
21250
+ };
21251
+ throw held;
21252
+ }
21253
+ }
21169
21254
  const payload = this.newest = this.stamp(identity, records);
21170
21255
  this.mine = payload;
21171
21256
  let carried = {
@@ -21332,13 +21417,20 @@ var CarriedTransport = class {
21332
21417
  }
21333
21418
  /** My newest packet for this edge while it is down, for a member that can pass it on now; null once it is up. */
21334
21419
  latest() {
21335
- return this.stopped || this.hooks.open() ? null : this.mine;
21420
+ if (this.stopped || this.hooks.open()) return null;
21421
+ if (this.unsigned) {
21422
+ const { identity, records } = this.unsigned;
21423
+ this.unsigned = null;
21424
+ this.mine = this.newest = this.stamp(identity, records);
21425
+ }
21426
+ return this.mine;
21336
21427
  }
21337
21428
  /** The edge is going: nothing more is deferred or carried, and a last packet goes straight to the relays. */
21338
21429
  stop() {
21339
21430
  this.stopped = true;
21340
21431
  this.drop();
21341
21432
  this.mine = null;
21433
+ this.unsigned = null;
21342
21434
  const waiting = this.waiting;
21343
21435
  this.waiting = null;
21344
21436
  waiting?.();
@@ -23594,6 +23686,9 @@ var GhostLink = class {
23594
23686
  this.advertiseTransports();
23595
23687
  this.options.events?.onTransportsChanged?.();
23596
23688
  };
23689
+ endpoint.onRelayBack = () => {
23690
+ if (this.endpoints.get(endpoint.transport) === endpoint) this.knockAgain(endpoint.transport);
23691
+ };
23597
23692
  this.advertiseTransports();
23598
23693
  if (this.resuming === endpoint.transport) this.knock(endpoint.transport);
23599
23694
  else this.joinRace(endpoint.transport);
@@ -23771,6 +23866,11 @@ var GhostLink = class {
23771
23866
  if (!this.transportOffer().includes(transport)) return;
23772
23867
  const epoch = this.connectionEpoch;
23773
23868
  this.dialing = true;
23869
+ const knocking = this.knocking = {
23870
+ transport,
23871
+ epoch,
23872
+ again: false
23873
+ };
23774
23874
  traceLink(this.myPubKeyZ32, "knock", { transport });
23775
23875
  try {
23776
23876
  const { channel, binding } = await endpoint.connect(descriptor);
@@ -23785,6 +23885,7 @@ var GhostLink = class {
23785
23885
  error: error instanceof Error ? error.message : String(error)
23786
23886
  });
23787
23887
  } finally {
23888
+ if (this.knocking === knocking) this.knocking = null;
23788
23889
  if (epoch === this.connectionEpoch) {
23789
23890
  this.dialing = false;
23790
23891
  this.settleCrossed();
@@ -23792,6 +23893,36 @@ var GhostLink = class {
23792
23893
  }
23793
23894
  if (!this.channel) this.maybeAutoConnect(this.presence);
23794
23895
  }
23896
+ /** The knock under way (`knock`): its transport, its attempt, and whether it was knocked again (`knockAgain`). */
23897
+ knocking = null;
23898
+ /**
23899
+ * The endpoint of a knock still under way is back on its relay (`NativeEndpoint.onRelayBack`): it is knocked again, once,
23900
+ * beside the first, and the first live wins. An Android phone back from Doze knocked at once through an Iroh whose relay
23901
+ * was gone; Iroh found it again only seconds later (its reconnect backoff, up to 16 s), and what the knock sent meanwhile
23902
+ * went nowhere: QUIC sends it again seconds on, and the dial is given 20 s. Live again 4.4 s and 9.8 s after the
23903
+ * return (away 5 and 15 minutes), and once not over Iroh at all (the emulator with a CLI bot, 2026-11-01).
23904
+ */
23905
+ async knockAgain(transport) {
23906
+ const knocking = this.knocking;
23907
+ if (!knocking || knocking.transport !== transport || knocking.again || knocking.epoch !== this.connectionEpoch) return;
23908
+ const endpoint = this.endpoints.get(transport), descriptor = this.peerDescriptors[transport];
23909
+ if (!endpoint || !descriptor || this.channel || this.stopped || this.streamBlocked || this.keyStopped) return;
23910
+ knocking.again = true;
23911
+ traceLink(this.myPubKeyZ32, "knock-again", { transport });
23912
+ try {
23913
+ const { channel, binding } = await endpoint.connect(descriptor);
23914
+ if (this.stopped || knocking.epoch !== this.connectionEpoch || this.channel) {
23915
+ channel.close();
23916
+ return;
23917
+ }
23918
+ this.attach(channel, binding);
23919
+ } catch (error) {
23920
+ traceLink(this.myPubKeyZ32, "knock-again-failed", {
23921
+ transport,
23922
+ error: error instanceof Error ? error.message : String(error)
23923
+ });
23924
+ }
23925
+ }
23795
23926
  canReleaseEndpoint(transport) {
23796
23927
  return this.activeBinding?.transport !== transport && this.candidate?.binding?.transport !== transport && !this.dialing && !this.switcher.pending && !this.transitionTarget;
23797
23928
  }
@@ -26976,6 +27107,993 @@ var GhostLink = class {
26976
27107
  }
26977
27108
  };
26978
27109
  //#endregion
27110
+ //#region ../core/src/pictureMetadata.ts
27111
+ /**
27112
+ * What a picture leaves with. A photo's file says more than its pixels: its Exif and XMP hold where it was taken, the
27113
+ * device, the time, often a thumbnail of the uncropped original. The sender removes them before the file is stored and
27114
+ * its digest computed, so what the contact (or anyone in a community) receives is the picture alone: JPEG, PNG, WebP
27115
+ * and HEIF (HEIC, AVIF), without decoding or re-encoding a pixel.
27116
+ *
27117
+ * Fail-closed: a file that is one of these pictures, by its bytes or by its type, and whose metadata cannot be removed
27118
+ * (truncated, malformed, a part this does not know) is refused with `NO_PICTURE_METADATA`, never sent as it was. Any
27119
+ * other file goes as it is.
27120
+ */
27121
+ var PICTURE_METADATA_LIMITS = {
27122
+ /** The largest picture read whole to remove its metadata: past this it is refused. */
27123
+ maxBytes: 268435456,
27124
+ /** Bytes read first to tell a picture from another file. */
27125
+ headBytes: 64
27126
+ };
27127
+ /** Why a picture is refused: its metadata could not be removed, so it does not go at all. */
27128
+ var NO_PICTURE_METADATA = "This picture cannot be sent: Ghostly could not remove the details saved in it, like where it was taken";
27129
+ /** The types of the pictures stripped here: a file of one of them whose bytes are not that picture is refused. */
27130
+ var STRIPPED_TYPES$1 = /* @__PURE__ */ new Set([
27131
+ "image/jpeg",
27132
+ "image/jpg",
27133
+ "image/pjpeg",
27134
+ "image/png",
27135
+ "image/apng",
27136
+ "image/webp",
27137
+ "image/heic",
27138
+ "image/heif",
27139
+ "image/heic-sequence",
27140
+ "image/heif-sequence",
27141
+ "image/avif",
27142
+ "image/gif",
27143
+ "image/tiff",
27144
+ "image/tiff-fx"
27145
+ ]);
27146
+ /** HEIF brands (HEIC, AVIF, the generic `mif1`): an MP4 video's `ftyp` names none of them. */
27147
+ var HEIF_BRANDS = /* @__PURE__ */ new Set([
27148
+ "heic",
27149
+ "heix",
27150
+ "heim",
27151
+ "heis",
27152
+ "hevc",
27153
+ "hevx",
27154
+ "mif1",
27155
+ "mif2",
27156
+ "msf1",
27157
+ "avif",
27158
+ "avis"
27159
+ ]);
27160
+ var u16be = (b, at) => b[at] << 8 | b[at + 1];
27161
+ var u32be$1 = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
27162
+ var u32le = (b, at) => (b[at] | b[at + 1] << 8 | b[at + 2] << 16 | b[at + 3] << 24) >>> 0;
27163
+ var text$1 = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
27164
+ var starts = (b, at, prefix) => at + prefix.length <= b.length && text$1(b, at, prefix.length) === prefix;
27165
+ /** A picture this strips, by its first bytes. */
27166
+ function kindOf(b) {
27167
+ if (b.length >= 3 && b[0] === 255 && b[1] === 216 && b[2] === 255) return "jpeg";
27168
+ if (b.length >= 8 && b[0] === 137 && starts(b, 1, "PNG\r\n\n")) return "png";
27169
+ if (b.length >= 12 && starts(b, 0, "RIFF") && starts(b, 8, "WEBP")) return "webp";
27170
+ if (starts(b, 0, "GIF87a") || starts(b, 0, "GIF89a")) return "gif";
27171
+ if (starts(b, 0, "II*\0") || starts(b, 0, "MM\0*") || starts(b, 0, "II+\0") || starts(b, 0, "MM\0+")) return "tiff";
27172
+ if (b.length >= 16 && starts(b, 4, "ftyp")) {
27173
+ const end = Math.min(b.length, u32be$1(b, 0));
27174
+ for (let at = 8; at + 4 <= end; at += 4) if (at !== 12 && HEIF_BRANDS.has(text$1(b, at, 4))) return "heif";
27175
+ }
27176
+ }
27177
+ /** Refuses the picture where its bytes are not what this expects. */
27178
+ function check$1(ok) {
27179
+ if (!ok) throw new Error(NO_PICTURE_METADATA);
27180
+ }
27181
+ /** SOFn markers: every frame type but DHT (C4), JPG (C8) and DAC (CC). */
27182
+ var JPEG_FRAME = /* @__PURE__ */ new Set([
27183
+ 192,
27184
+ 193,
27185
+ 194,
27186
+ 195,
27187
+ 197,
27188
+ 198,
27189
+ 199,
27190
+ 201,
27191
+ 202,
27192
+ 203,
27193
+ 205,
27194
+ 206,
27195
+ 207
27196
+ ]);
27197
+ function jpegKeeps(marker, b, payload) {
27198
+ if (marker >= 192 && marker <= 207 || marker >= 218 && marker <= 223) return true;
27199
+ if (marker === 224) return starts(b, payload, "JFIF\0");
27200
+ if (marker === 226) return starts(b, payload, "ICC_PROFILE\0");
27201
+ if (marker === 238) return starts(b, payload, "Adobe");
27202
+ return false;
27203
+ }
27204
+ /** An APP1 Exif, big-endian, whose IFD0 holds `orientation` alone. */
27205
+ var orientationOnly = (orientation) => Uint8Array.of(255, 225, 0, 34, 69, 120, 105, 102, 0, 0, 77, 77, 0, 42, 0, 0, 0, 8, 0, 1, 1, 18, 0, 3, 0, 0, 0, 1, 0, orientation, 0, 0, 0, 0, 0, 0);
27206
+ function stripJpeg(b) {
27207
+ const parts = [b.subarray(0, 2)];
27208
+ let at = 2, framed = false, scanned = false, exif = false;
27209
+ for (;;) {
27210
+ check$1(at < b.length && b[at] === 255);
27211
+ while (at < b.length && b[at] === 255) at++;
27212
+ check$1(at < b.length);
27213
+ const marker = b[at++];
27214
+ if (marker === 217) {
27215
+ check$1(framed && scanned);
27216
+ parts.push(Uint8Array.of(255, 217));
27217
+ return parts;
27218
+ }
27219
+ if (marker === 1 || marker >= 208 && marker <= 215) {
27220
+ parts.push(Uint8Array.of(255, marker));
27221
+ continue;
27222
+ }
27223
+ check$1(marker !== 0 && marker !== 216 && at + 2 <= b.length);
27224
+ const length = u16be(b, at);
27225
+ check$1(length >= 2 && at + length <= b.length);
27226
+ if (jpegKeeps(marker, b, at + 2)) {
27227
+ parts.push(Uint8Array.of(255, marker), b.subarray(at, at + length));
27228
+ if (JPEG_FRAME.has(marker)) framed = true;
27229
+ } else if (marker === 225 && !scanned && !exif && starts(b, at + 2, "Exif\0\0")) {
27230
+ exif = true;
27231
+ const orientation = exifOrientation(b, at + 8, at + length);
27232
+ if (orientation >= 2) parts.push(orientationOnly(orientation));
27233
+ }
27234
+ at += length;
27235
+ if (marker !== 218) continue;
27236
+ check$1(framed);
27237
+ scanned = true;
27238
+ let end = at;
27239
+ for (;;) {
27240
+ end = b.indexOf(255, end);
27241
+ check$1(end >= 0);
27242
+ let next = end + 1;
27243
+ while (next < b.length && b[next] === 255) next++;
27244
+ check$1(next < b.length);
27245
+ if (b[next] !== 0 && !(b[next] >= 208 && b[next] <= 215)) break;
27246
+ end = next + 1;
27247
+ }
27248
+ parts.push(b.subarray(at, end));
27249
+ at = end;
27250
+ }
27251
+ }
27252
+ var PNG_CRITICAL = /* @__PURE__ */ new Set([
27253
+ "IHDR",
27254
+ "PLTE",
27255
+ "IDAT",
27256
+ "IEND"
27257
+ ]);
27258
+ var PNG_DRAWS = /* @__PURE__ */ new Set([
27259
+ "tRNS",
27260
+ "gAMA",
27261
+ "cHRM",
27262
+ "sRGB",
27263
+ "iCCP",
27264
+ "sBIT",
27265
+ "bKGD",
27266
+ "pHYs",
27267
+ "cICP",
27268
+ "mDCV",
27269
+ "cLLI",
27270
+ "acTL",
27271
+ "fcTL",
27272
+ "fdAT"
27273
+ ]);
27274
+ function stripPng(b) {
27275
+ const parts = [b.subarray(0, 8)];
27276
+ let at = 8;
27277
+ for (;;) {
27278
+ check$1(at + 12 <= b.length);
27279
+ const length = u32be$1(b, at), type = text$1(b, at + 4, 4);
27280
+ check$1(at + 12 + length <= b.length && (at > 8 || type === "IHDR"));
27281
+ const critical = (b[at + 4] & 32) === 0;
27282
+ check$1(!critical || PNG_CRITICAL.has(type));
27283
+ if (critical || PNG_DRAWS.has(type)) parts.push(b.subarray(at, at + 12 + length));
27284
+ at += 12 + length;
27285
+ if (type === "IEND") return parts;
27286
+ }
27287
+ }
27288
+ var WEBP_KEEPS = /* @__PURE__ */ new Set([
27289
+ "VP8 ",
27290
+ "VP8L",
27291
+ "VP8X",
27292
+ "ALPH",
27293
+ "ANIM",
27294
+ "ANMF",
27295
+ "ICCP"
27296
+ ]);
27297
+ function stripWebp(b) {
27298
+ check$1(b.length >= 20);
27299
+ const riffEnd = 8 + u32le(b, 4);
27300
+ check$1(riffEnd <= b.length && riffEnd % 2 === 0);
27301
+ const parts = [];
27302
+ let at = 12, size = 4, drawn = false;
27303
+ while (at < riffEnd) {
27304
+ check$1(at + 8 <= riffEnd);
27305
+ const type = text$1(b, at, 4), length = u32le(b, at + 4), end = at + 8 + length + (length & 1);
27306
+ check$1(end <= riffEnd && (at > 12 || type === "VP8 " || type === "VP8L" || type === "VP8X"));
27307
+ if (WEBP_KEEPS.has(type)) {
27308
+ let chunk = b.subarray(at, end);
27309
+ if (type === "VP8X") {
27310
+ check$1(length >= 10);
27311
+ chunk = chunk.slice();
27312
+ chunk[8] = chunk[8] & -13;
27313
+ }
27314
+ if (type === "VP8 " || type === "VP8L" || type === "ANMF") drawn = true;
27315
+ parts.push(chunk);
27316
+ size += chunk.length;
27317
+ }
27318
+ at = end;
27319
+ }
27320
+ check$1(drawn);
27321
+ const header = /* @__PURE__ */ new Uint8Array(12);
27322
+ header.set(b.subarray(0, 12));
27323
+ new DataView(header.buffer).setUint32(4, size, true);
27324
+ return [header, ...parts];
27325
+ }
27326
+ var HEIF_TOP = /* @__PURE__ */ new Set([
27327
+ "ftyp",
27328
+ "meta",
27329
+ "mdat",
27330
+ "free",
27331
+ "skip"
27332
+ ]);
27333
+ var HEIF_META = /* @__PURE__ */ new Set([
27334
+ "hdlr",
27335
+ "dinf",
27336
+ "pitm",
27337
+ "iloc",
27338
+ "iinf",
27339
+ "iref",
27340
+ "iprp",
27341
+ "idat",
27342
+ "grpl",
27343
+ "free",
27344
+ "skip"
27345
+ ]);
27346
+ /** Items that hold metadata: Exif, and XMP (or any other document) as a MIME item. */
27347
+ var HEIF_METADATA_ITEMS = /* @__PURE__ */ new Set([
27348
+ "Exif",
27349
+ "mime",
27350
+ "uri "
27351
+ ]);
27352
+ function boxes$1(b, start, end) {
27353
+ const found = [];
27354
+ for (let at = start; at < end;) {
27355
+ check$1(at + 8 <= end);
27356
+ let size = u32be$1(b, at), body = at + 8;
27357
+ const type = text$1(b, at + 4, 4);
27358
+ if (size === 1) {
27359
+ check$1(at + 16 <= end);
27360
+ size = u32be$1(b, at + 8) * 2 ** 32 + u32be$1(b, at + 12);
27361
+ body = at + 16;
27362
+ } else if (size === 0) size = end - at;
27363
+ if (type === "uuid") body += 16;
27364
+ check$1(size >= body - at && at + size <= end);
27365
+ found.push({
27366
+ type,
27367
+ start: at,
27368
+ body,
27369
+ end: at + size
27370
+ });
27371
+ at += size;
27372
+ }
27373
+ return found;
27374
+ }
27375
+ function stripHeif(b) {
27376
+ const top = boxes$1(b, 0, b.length);
27377
+ check$1(top[0]?.type === "ftyp" && top.every((box) => HEIF_TOP.has(box.type)));
27378
+ const metas = top.filter((box) => box.type === "meta");
27379
+ check$1(metas.length === 1);
27380
+ const meta = metas[0];
27381
+ const children = boxes$1(b, meta.body + 4, meta.end);
27382
+ check$1(children.every((box) => HEIF_META.has(box.type)));
27383
+ const one = (type) => {
27384
+ const of = children.filter((box) => box.type === type);
27385
+ check$1(of.length <= 1);
27386
+ return of[0];
27387
+ };
27388
+ const iinf = one("iinf"), iloc = one("iloc"), idat = one("idat");
27389
+ check$1(!!iinf && !!iloc);
27390
+ const metadata = /* @__PURE__ */ new Set();
27391
+ const infeVersion = b[iinf.body];
27392
+ const entries = boxes$1(b, iinf.body + 4 + (infeVersion === 0 ? 2 : 4), iinf.end);
27393
+ for (const infe of entries) {
27394
+ check$1(infe.type === "infe" && infe.body + 4 <= infe.end);
27395
+ const version = b[infe.body];
27396
+ check$1(version === 2 || version === 3);
27397
+ let at = infe.body + 4;
27398
+ const id = version === 2 ? u16be(b, at) : u32be$1(b, at);
27399
+ at += version === 2 ? 2 : 4;
27400
+ check$1(at + 6 <= infe.end);
27401
+ if (HEIF_METADATA_ITEMS.has(text$1(b, at + 2, 4))) metadata.add(id);
27402
+ }
27403
+ const out = b.slice();
27404
+ const version = b[iloc.body];
27405
+ check$1(version <= 2);
27406
+ let at = iloc.body + 4;
27407
+ /** The next field of `size` bytes (0, 2, 4 or 8), big-endian. */
27408
+ const read = (size) => {
27409
+ check$1(at + size <= iloc.end);
27410
+ 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;
27411
+ check$1(Number.isSafeInteger(value));
27412
+ at += size;
27413
+ return value;
27414
+ };
27415
+ const read2 = () => read(2);
27416
+ check$1(at + 2 <= iloc.end);
27417
+ const offsetSize = b[at] >> 4, lengthSize = b[at] & 15, baseSize = b[at + 1] >> 4, indexSize = version > 0 ? b[at + 1] & 15 : 0;
27418
+ check$1([
27419
+ offsetSize,
27420
+ lengthSize,
27421
+ baseSize,
27422
+ indexSize
27423
+ ].every((size) => size === 0 || size === 4 || size === 8));
27424
+ at += 2;
27425
+ const count = read(version < 2 ? 2 : 4);
27426
+ for (let i = 0; i < count; i++) {
27427
+ const id = version < 2 ? read2() : read(4);
27428
+ const method = version > 0 ? read2() & 15 : 0;
27429
+ const reference = read2();
27430
+ const base = read(baseSize);
27431
+ const extents = read2();
27432
+ for (let e = 0; e < extents; e++) {
27433
+ if (indexSize) read(indexSize);
27434
+ const offset = read(offsetSize), length = read(lengthSize);
27435
+ if (!metadata.has(id)) continue;
27436
+ check$1(reference === 0 && length > 0 && (method === 0 || method === 1 && !!idat));
27437
+ const start = (method === 1 ? idat.body : 0) + base + offset, limit = method === 1 ? idat.end : b.length;
27438
+ check$1(start + length <= limit);
27439
+ out.fill(0, start, start + length);
27440
+ }
27441
+ }
27442
+ return [out];
27443
+ }
27444
+ var GIF_APPS_KEPT = /* @__PURE__ */ new Set([
27445
+ "NETSCAPE2.0",
27446
+ "ANIMEXTS1.0",
27447
+ "ICCRGBG1012"
27448
+ ]);
27449
+ function stripGif(b) {
27450
+ check$1(b.length >= 13);
27451
+ /** A colour table's bytes, from the flags that say it is there and its size. */
27452
+ const table = (flags) => flags & 128 ? 3 << (flags & 7) + 1 : 0;
27453
+ /** The end of the data sub-blocks at `at`, past their empty block. */
27454
+ const blocks = (at) => {
27455
+ for (;;) {
27456
+ check$1(at < b.length);
27457
+ const length = b[at];
27458
+ at += 1 + length;
27459
+ if (!length) return at;
27460
+ }
27461
+ };
27462
+ let at = 13 + table(b[10]), framed = false;
27463
+ check$1(at <= b.length);
27464
+ const parts = [b.subarray(0, at)];
27465
+ for (;;) {
27466
+ check$1(at < b.length);
27467
+ const introducer = b[at];
27468
+ if (introducer === 59) {
27469
+ check$1(framed);
27470
+ parts.push(Uint8Array.of(59));
27471
+ return parts;
27472
+ }
27473
+ if (introducer === 44) {
27474
+ check$1(at + 10 <= b.length);
27475
+ const data = at + 10 + table(b[at + 9]);
27476
+ check$1(data < b.length);
27477
+ const end = blocks(data + 1);
27478
+ parts.push(b.subarray(at, end));
27479
+ framed = true;
27480
+ at = end;
27481
+ continue;
27482
+ }
27483
+ check$1(introducer === 33 && at + 2 < b.length);
27484
+ const label = b[at + 1], end = blocks(at + 2);
27485
+ const app = label === 255 && b[at + 2] === 11 && GIF_APPS_KEPT.has(text$1(b, at + 3, 11));
27486
+ if (label === 249 || label === 1 || app) parts.push(b.subarray(at, end));
27487
+ else check$1(label === 254 || label === 255);
27488
+ at = end;
27489
+ }
27490
+ }
27491
+ var TIFF_DRAWS = /* @__PURE__ */ new Set([
27492
+ 254,
27493
+ 255,
27494
+ 256,
27495
+ 257,
27496
+ 258,
27497
+ 259,
27498
+ 262,
27499
+ 263,
27500
+ 264,
27501
+ 265,
27502
+ 266,
27503
+ 273,
27504
+ 274,
27505
+ 277,
27506
+ 278,
27507
+ 279,
27508
+ 280,
27509
+ 281,
27510
+ 282,
27511
+ 283,
27512
+ 284,
27513
+ 286,
27514
+ 287,
27515
+ 290,
27516
+ 291,
27517
+ 292,
27518
+ 293,
27519
+ 296,
27520
+ 297,
27521
+ 301,
27522
+ 317,
27523
+ 318,
27524
+ 319,
27525
+ 320,
27526
+ 321,
27527
+ 322,
27528
+ 323,
27529
+ 324,
27530
+ 325,
27531
+ 332,
27532
+ 334,
27533
+ 336,
27534
+ 338,
27535
+ 339,
27536
+ 340,
27537
+ 341,
27538
+ 529,
27539
+ 530,
27540
+ 531,
27541
+ 532,
27542
+ 34675
27543
+ ]);
27544
+ /** Text and documents about the picture: DocumentName to HostComputer, InkNames, XMP, Copyright, IPTC, Photoshop, Windows' XP tags, PrintIM. */
27545
+ var TIFF_METADATA = /* @__PURE__ */ new Set([
27546
+ 269,
27547
+ 270,
27548
+ 271,
27549
+ 272,
27550
+ 285,
27551
+ 305,
27552
+ 306,
27553
+ 315,
27554
+ 316,
27555
+ 333,
27556
+ 700,
27557
+ 33432,
27558
+ 33723,
27559
+ 34377,
27560
+ 18246,
27561
+ 18249,
27562
+ 40091,
27563
+ 40092,
27564
+ 40093,
27565
+ 40094,
27566
+ 40095,
27567
+ 50341
27568
+ ]);
27569
+ /** The IFDs of Exif, GPS and interoperability, emptied whole. */
27570
+ var TIFF_METADATA_IFDS = /* @__PURE__ */ new Set([
27571
+ 34665,
27572
+ 34853,
27573
+ 40965
27574
+ ]);
27575
+ /** Compression without JPEG: none, CCITT, LZW, Deflate, PackBits. */
27576
+ var TIFF_COMPRESSION = /* @__PURE__ */ new Set([
27577
+ 1,
27578
+ 2,
27579
+ 3,
27580
+ 4,
27581
+ 5,
27582
+ 8,
27583
+ 32773,
27584
+ 32946
27585
+ ]);
27586
+ /** Bytes per value of each field type. */
27587
+ var TIFF_TYPE_BYTES = [
27588
+ 0,
27589
+ 1,
27590
+ 1,
27591
+ 2,
27592
+ 4,
27593
+ 8,
27594
+ 1,
27595
+ 1,
27596
+ 2,
27597
+ 4,
27598
+ 8,
27599
+ 4,
27600
+ 8,
27601
+ 4
27602
+ ];
27603
+ function stripTiff(b) {
27604
+ const little = b[0] === 73;
27605
+ const u16 = (at) => {
27606
+ check$1(at + 2 <= b.length);
27607
+ return little ? b[at] | b[at + 1] << 8 : u16be(b, at);
27608
+ };
27609
+ const u32 = (at) => {
27610
+ check$1(at + 4 <= b.length);
27611
+ return little ? u32le(b, at) : u32be$1(b, at);
27612
+ };
27613
+ check$1(b.length >= 8 && u16(2) === 42);
27614
+ const out = b.slice(), seen = /* @__PURE__ */ new Set();
27615
+ /** An IFD's entries: tag, type, the value's first byte (in the entry or where it points) and its bytes. */
27616
+ const entries = (ifd) => {
27617
+ check$1(ifd >= 8 && !seen.has(ifd) && seen.size < 1024);
27618
+ seen.add(ifd);
27619
+ const count = u16(ifd), next = ifd + 2 + count * 12;
27620
+ u32(next);
27621
+ return {
27622
+ next,
27623
+ list: Array.from({ length: count }, (_, i) => {
27624
+ const at = ifd + 2 + i * 12, tag = u16(at), type = u16(at + 2);
27625
+ check$1(type >= 1 && type < TIFF_TYPE_BYTES.length);
27626
+ const bytes = TIFF_TYPE_BYTES[type] * u32(at + 4);
27627
+ const value = bytes <= 4 ? at + 8 : u32(at + 8);
27628
+ check$1(Number.isSafeInteger(bytes) && value + bytes <= b.length);
27629
+ return {
27630
+ at,
27631
+ tag,
27632
+ type,
27633
+ value,
27634
+ bytes
27635
+ };
27636
+ })
27637
+ };
27638
+ };
27639
+ /** An Exif, GPS or interoperability IFD: every value zeroed, then the IFD itself, so it holds no entry. */
27640
+ const empty = (ifd) => {
27641
+ const { next, list } = entries(ifd);
27642
+ for (const entry of list) {
27643
+ check$1(entry.tag !== 37500);
27644
+ if (TIFF_METADATA_IFDS.has(entry.tag)) empty(u32(entry.value));
27645
+ out.fill(0, entry.value, entry.value + entry.bytes);
27646
+ }
27647
+ out.fill(0, ifd, next + 4);
27648
+ };
27649
+ for (let ifd = u32(4); ifd;) {
27650
+ const { next, list } = entries(ifd);
27651
+ let kept = 0;
27652
+ for (const { at, tag, value, bytes } of list) {
27653
+ if (tag === 259) check$1(TIFF_COMPRESSION.has(u16(value)));
27654
+ if (TIFF_METADATA_IFDS.has(tag)) {
27655
+ empty(u32(value));
27656
+ continue;
27657
+ }
27658
+ if (TIFF_METADATA.has(tag)) out.fill(0, value, value + bytes);
27659
+ else check$1(TIFF_DRAWS.has(tag));
27660
+ out.copyWithin(ifd + 2 + kept++ * 12, at, at + 12);
27661
+ }
27662
+ check$1(kept > 0);
27663
+ const end = ifd + 2 + kept * 12;
27664
+ out.set(little ? [kept & 255, kept >> 8] : [kept >> 8, kept & 255], ifd);
27665
+ out.set(b.subarray(next, next + 4), end);
27666
+ out.fill(0, end + 4, next + 4);
27667
+ ifd = u32(next);
27668
+ }
27669
+ return [out];
27670
+ }
27671
+ var STRIP = {
27672
+ jpeg: stripJpeg,
27673
+ png: stripPng,
27674
+ webp: stripWebp,
27675
+ heif: stripHeif,
27676
+ gif: stripGif,
27677
+ tiff: stripTiff
27678
+ };
27679
+ /**
27680
+ * A picture's bytes without its metadata, as parts to put in a Blob; undefined when the file is not a picture this
27681
+ * strips (by its bytes and its type), so it goes as it is. Throws `NO_PICTURE_METADATA` when it is one but its
27682
+ * metadata cannot be removed.
27683
+ */
27684
+ function stripPictureMetadata(bytes, mime) {
27685
+ const kind = kindOf(bytes);
27686
+ if (!kind) {
27687
+ if (STRIPPED_TYPES$1.has(mime.split(";")[0].trim().toLowerCase())) throw new Error(NO_PICTURE_METADATA);
27688
+ return;
27689
+ }
27690
+ return STRIP[kind](bytes);
27691
+ }
27692
+ /**
27693
+ * Whether a file is a picture whose metadata goes before it is sent, by its first `PICTURE_METADATA_LIMITS.headBytes`
27694
+ * bytes or by its type: then it is read whole and stripped (`stripPictureMetadata`), else it goes as it is.
27695
+ */
27696
+ function isStrippedPicture(head, mime) {
27697
+ return !!kindOf(head) || STRIPPED_TYPES$1.has(mime.split(";")[0].trim().toLowerCase());
27698
+ }
27699
+ /**
27700
+ * `source` as it is sent: without its metadata when it is a picture (`stripPictureMetadata`), or undefined when it is
27701
+ * not one and goes as it is. Only its first bytes are read for any other file. Throws `NO_PICTURE_METADATA` for a
27702
+ * picture that cannot be stripped or is past `PICTURE_METADATA_LIMITS.maxBytes`; an error reading `source` as it is.
27703
+ */
27704
+ async function withoutPictureMetadata(source, mime) {
27705
+ if (!isStrippedPicture(new Uint8Array(await source.slice(0, PICTURE_METADATA_LIMITS.headBytes).arrayBuffer()), mime)) return void 0;
27706
+ if (source.size > PICTURE_METADATA_LIMITS.maxBytes) throw new Error(NO_PICTURE_METADATA);
27707
+ const parts = stripPictureMetadata(new Uint8Array(await source.arrayBuffer()), mime);
27708
+ return parts && new Blob(parts, { type: mime });
27709
+ }
27710
+ //#endregion
27711
+ //#region ../core/src/videoMetadata.ts
27712
+ /**
27713
+ * What a video leaves with. An MP4 or QuickTime file says more than its frames: its `udta` and `meta` boxes hold where
27714
+ * it was recorded (`©xyz`, `com.apple.quicktime.location.ISO6709`), the device, often its software; a timed metadata
27715
+ * track (an iPhone's location and motion, a GoPro's GPS) holds them sample by sample. The sender removes them before
27716
+ * the file is stored and its digest computed, without decoding or re-encoding a frame: each such box becomes a `free`
27717
+ * box of the same size, zeroed, and each metadata track's samples are zeroed where they are, so no offset in the file
27718
+ * moves and it plays as it did. Only the boxes' headers, `moov` and `moof` are read; the media goes untouched.
27719
+ *
27720
+ * Fail-closed: a file that is an MP4 or QuickTime video, by its bytes or by its type, and whose metadata cannot be
27721
+ * removed (truncated, malformed, a part this does not know) is refused with `NO_VIDEO_METADATA`, never sent as it was.
27722
+ * A picture (HEIF is pictureMetadata.ts's), a file without a video track (an M4A) and any other file go as they are.
27723
+ */
27724
+ var VIDEO_METADATA_LIMITS = {
27725
+ /** The largest `moov` or `moof` read whole, and the most bytes of a metadata track's chunk: past this the video is refused. */
27726
+ maxBoxBytes: 67108864,
27727
+ /** The most top-level boxes walked (a fragmented MP4 has two per fragment). */
27728
+ maxBoxes: 1e5,
27729
+ /** Bytes read first to tell a video from another file. */
27730
+ headBytes: 64
27731
+ };
27732
+ /** Why a video is refused: its metadata could not be removed, so it does not go at all. */
27733
+ var NO_VIDEO_METADATA = "This video cannot be sent: Ghostly could not remove the details saved in it, like where it was recorded";
27734
+ /** The types of the videos stripped here: a file of one of them whose bytes are not one is refused. */
27735
+ var STRIPPED_TYPES = /* @__PURE__ */ new Set([
27736
+ "video/mp4",
27737
+ "video/quicktime",
27738
+ "video/x-m4v",
27739
+ "video/3gpp",
27740
+ "video/3gpp2"
27741
+ ]);
27742
+ /** The first box of an MP4 (`ftyp`) or of a QuickTime file written without one. */
27743
+ var FIRST_BOXES = /* @__PURE__ */ new Set([
27744
+ "ftyp",
27745
+ "moov",
27746
+ "mdat",
27747
+ "wide",
27748
+ "free",
27749
+ "skip"
27750
+ ]);
27751
+ /** Boxes that hold metadata wherever they are: emptied into `free`. */
27752
+ var METADATA = /* @__PURE__ */ new Set([
27753
+ "udta",
27754
+ "meta",
27755
+ "uuid"
27756
+ ]);
27757
+ /** At the top: what makes the movie, kept (`moov` and `moof` looked into); a preview picture, an event message, emptied. */
27758
+ var TOP_KEEPS = /* @__PURE__ */ new Set([
27759
+ "ftyp",
27760
+ "styp",
27761
+ "moov",
27762
+ "mdat",
27763
+ "moof",
27764
+ "mfra",
27765
+ "sidx",
27766
+ "ssix",
27767
+ "prft",
27768
+ "pdin",
27769
+ "free",
27770
+ "skip",
27771
+ "wide"
27772
+ ]);
27773
+ var TOP_EMPTIED = /* @__PURE__ */ new Set([
27774
+ ...METADATA,
27775
+ "pnot",
27776
+ "PICT",
27777
+ "emsg",
27778
+ "Xtra"
27779
+ ]);
27780
+ var MOOV_KEEPS = /* @__PURE__ */ new Set([
27781
+ "mvhd",
27782
+ "trak",
27783
+ "mvex",
27784
+ "iods",
27785
+ "ctab",
27786
+ "free",
27787
+ "skip",
27788
+ "wide"
27789
+ ]);
27790
+ var TRAK_KEEPS = /* @__PURE__ */ new Set([
27791
+ "tkhd",
27792
+ "edts",
27793
+ "mdia",
27794
+ "tref",
27795
+ "tapt",
27796
+ "load",
27797
+ "txas",
27798
+ "matt",
27799
+ "free",
27800
+ "skip",
27801
+ "wide"
27802
+ ]);
27803
+ /** Boxes looked into below a track (and in a fragment) for the metadata boxes in them. */
27804
+ var CONTAINERS = /* @__PURE__ */ new Set([
27805
+ "mdia",
27806
+ "minf",
27807
+ "dinf",
27808
+ "stbl",
27809
+ "edts",
27810
+ "mvex",
27811
+ "traf"
27812
+ ]);
27813
+ /** Track handlers kept as they are: picture, sound, text and subtitles, timecode, hints. `meta` tracks have their samples zeroed. */
27814
+ var HANDLERS = /* @__PURE__ */ new Set([
27815
+ "vide",
27816
+ "soun",
27817
+ "text",
27818
+ "sbtl",
27819
+ "subt",
27820
+ "clcp",
27821
+ "tmcd",
27822
+ "hint",
27823
+ "auxv",
27824
+ "pict",
27825
+ "sdsm",
27826
+ "odsm",
27827
+ "subp"
27828
+ ]);
27829
+ /** Zeros put in a Blob a part at a time. */
27830
+ var ZEROS = /* @__PURE__ */ new Uint8Array(1048576);
27831
+ var u32be = (b, at) => (b[at] << 24 >>> 0) + (b[at + 1] << 16) + (b[at + 2] << 8) + b[at + 3];
27832
+ var text = (b, at, length) => String.fromCharCode(...b.subarray(at, at + length));
27833
+ /** Refuses the video where its bytes are not what this expects. */
27834
+ function check(ok) {
27835
+ if (!ok) throw new Error(NO_VIDEO_METADATA);
27836
+ }
27837
+ /** A box's header at `at` of `b` (`base` its offset in the file), up to `end` (a size of 0 runs to it). */
27838
+ function header(b, at, end, base = 0) {
27839
+ check(at + 8 <= b.length);
27840
+ let size = u32be(b, at), body = at + 8;
27841
+ const type = text(b, at + 4, 4);
27842
+ if (size === 1) {
27843
+ check(at + 16 <= b.length);
27844
+ size = u32be(b, at + 8) * 2 ** 32 + u32be(b, at + 12);
27845
+ body = at + 16;
27846
+ } else if (size === 0) size = end - (base + at);
27847
+ if (type === "uuid") body += 16;
27848
+ check(Number.isSafeInteger(size) && size >= body - at && base + at + size <= end);
27849
+ return {
27850
+ type,
27851
+ start: base + at,
27852
+ body: base + body,
27853
+ end: base + at + size
27854
+ };
27855
+ }
27856
+ function boxes(b, start, end) {
27857
+ const found = [];
27858
+ for (let at = start; at < end;) {
27859
+ check(at + 8 <= end);
27860
+ const box = header(b.subarray(0, end), at, end);
27861
+ found.push(box);
27862
+ at = box.end;
27863
+ }
27864
+ return found;
27865
+ }
27866
+ /** A box made `free` where it is: its size kept, everything after its size zeroed. */
27867
+ function empty(b, box) {
27868
+ b.set([
27869
+ 102,
27870
+ 114,
27871
+ 101,
27872
+ 101
27873
+ ], box.start + 4);
27874
+ b.fill(0, box.start + (u32be(b, box.start) === 1 ? 16 : 8), box.end);
27875
+ }
27876
+ /** Every metadata box in a container's children (and in theirs, for the containers below a track) emptied. */
27877
+ function emptyWithin(b, start, end) {
27878
+ for (const box of boxes(b, start, end)) if (METADATA.has(box.type)) empty(b, box);
27879
+ else if (CONTAINERS.has(box.type)) emptyWithin(b, box.body, box.end);
27880
+ }
27881
+ var child = (b, parent, type) => {
27882
+ if (!parent) return void 0;
27883
+ const of = boxes(b, parent.body, parent.end).filter((box) => box.type === type);
27884
+ check(of.length <= 1);
27885
+ return of[0];
27886
+ };
27887
+ /** The byte ranges of a track's samples in the file, one per chunk, from its sample table. */
27888
+ function sampleRanges(b, stbl) {
27889
+ const stsz = child(b, stbl, "stsz"), stz2 = child(b, stbl, "stz2"), stsc = child(b, stbl, "stsc");
27890
+ const stco = child(b, stbl, "stco"), co64 = child(b, stbl, "co64");
27891
+ check(!!stsc && !!stsz !== !!stz2 && !!stco !== !!co64);
27892
+ const need = (box, at, bytes) => check(at + bytes <= box.end);
27893
+ const sizeTable = stsz ?? stz2;
27894
+ need(sizeTable, sizeTable.body, 12);
27895
+ const count = u32be(b, sizeTable.body + 8);
27896
+ let sizeOf;
27897
+ /** Samples of one size: a chunk's length is counted, not added up a sample at a time. */
27898
+ let uniform = 0;
27899
+ if (stsz) {
27900
+ uniform = u32be(b, stsz.body + 4);
27901
+ if (!uniform) need(stsz, stsz.body + 12, count * 4);
27902
+ sizeOf = (i) => u32be(b, stsz.body + 12 + i * 4);
27903
+ } else {
27904
+ const field = b[stz2.body + 7];
27905
+ check(field === 4 || field === 8 || field === 16);
27906
+ need(stz2, stz2.body + 12, Math.ceil(count * field / 8));
27907
+ const at = stz2.body + 12;
27908
+ 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;
27909
+ }
27910
+ const offsets = stco ?? co64;
27911
+ need(offsets, offsets.body, 8);
27912
+ const chunks = u32be(b, offsets.body + 4);
27913
+ need(offsets, offsets.body + 8, chunks * (co64 ? 8 : 4));
27914
+ 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);
27915
+ need(stsc, stsc.body, 8);
27916
+ const runs = u32be(b, stsc.body + 4);
27917
+ need(stsc, stsc.body + 8, runs * 12);
27918
+ const ranges = [];
27919
+ let sample = 0;
27920
+ for (let run = 0; run < runs; run++) {
27921
+ const first = u32be(b, stsc.body + 8 + run * 12), perChunk = u32be(b, stsc.body + 12 + run * 12);
27922
+ const last = run + 1 < runs ? u32be(b, stsc.body + 8 + (run + 1) * 12) : chunks + 1;
27923
+ check(first >= 1 && last > first && last <= chunks + 1);
27924
+ for (let chunk = first; chunk < last; chunk++) {
27925
+ const start = offsetOf(chunk - 1);
27926
+ check(sample + perChunk <= count);
27927
+ let length = uniform * perChunk;
27928
+ if (!uniform) for (let i = 0; i < perChunk; i++) length += sizeOf(sample + i);
27929
+ sample += perChunk;
27930
+ check(Number.isSafeInteger(start) && length <= VIDEO_METADATA_LIMITS.maxBoxBytes);
27931
+ if (length) ranges.push([start, start + length]);
27932
+ }
27933
+ }
27934
+ check(sample === count);
27935
+ return ranges;
27936
+ }
27937
+ /** Whether every data reference of a track is this file (a self-contained `url ` or `alis`). */
27938
+ function selfContained(b, minf) {
27939
+ const dref = child(b, child(b, minf, "dinf"), "dref");
27940
+ if (!dref) return false;
27941
+ return boxes(b, dref.body + 8, dref.end).every((entry) => entry.body + 4 <= entry.end && (b[entry.body + 3] & 1) === 1);
27942
+ }
27943
+ /**
27944
+ * `moov` with its metadata boxes emptied, read whole: whether it has a video track, and the byte ranges of its
27945
+ * metadata tracks' samples (zeroed by the caller where they are).
27946
+ */
27947
+ function stripMoov(b) {
27948
+ let video = false, fragmented = false;
27949
+ const zeroed = [];
27950
+ for (const box of boxes(b, header(b, 0, b.length).body, b.length)) {
27951
+ if (METADATA.has(box.type)) {
27952
+ empty(b, box);
27953
+ continue;
27954
+ }
27955
+ check(MOOV_KEEPS.has(box.type));
27956
+ if (box.type === "mvex") {
27957
+ fragmented = true;
27958
+ emptyWithin(b, box.body, box.end);
27959
+ }
27960
+ if (box.type !== "trak") continue;
27961
+ let mdia;
27962
+ for (const part of boxes(b, box.body, box.end)) {
27963
+ if (METADATA.has(part.type)) {
27964
+ empty(b, part);
27965
+ continue;
27966
+ }
27967
+ check(TRAK_KEEPS.has(part.type));
27968
+ if (part.type === "mdia") {
27969
+ check(!mdia);
27970
+ mdia = part;
27971
+ }
27972
+ }
27973
+ check(!!mdia);
27974
+ const hdlr = child(b, mdia, "hdlr"), minf = child(b, mdia, "minf");
27975
+ check(!!hdlr && !!minf && hdlr.body + 12 <= hdlr.end);
27976
+ const handler = text(b, hdlr.body + 8, 4);
27977
+ const stbl = child(b, minf, "stbl");
27978
+ check(!!stbl);
27979
+ if (handler === "meta") {
27980
+ check(selfContained(b, minf));
27981
+ for (const range of sampleRanges(b, stbl)) zeroed.push(range);
27982
+ } else check(HANDLERS.has(handler));
27983
+ if (handler === "vide") video = true;
27984
+ emptyWithin(b, box.body, box.end);
27985
+ }
27986
+ return {
27987
+ video,
27988
+ fragmented,
27989
+ zeroed
27990
+ };
27991
+ }
27992
+ /** A box's header in the file at `at`, read from it. */
27993
+ async function headerAt(source, at) {
27994
+ return header(new Uint8Array(await source.slice(at, at + 16).arrayBuffer()), 0, source.size, at);
27995
+ }
27996
+ /** A box read whole, within the limit. */
27997
+ async function whole(source, box) {
27998
+ check(box.end - box.start <= VIDEO_METADATA_LIMITS.maxBoxBytes);
27999
+ const bytes = new Uint8Array(await source.slice(box.start, box.end).arrayBuffer());
28000
+ check(bytes.length === box.end - box.start);
28001
+ return bytes;
28002
+ }
28003
+ /** An MP4 or QuickTime file, by its first box: an HEIF picture is pictureMetadata.ts's. */
28004
+ function isVideoContainer(head, mime) {
28005
+ return head.length >= 8 && FIRST_BOXES.has(text(head, 4, 4)) && !isStrippedPicture(head, mime);
28006
+ }
28007
+ /**
28008
+ * `source` as it is sent: an MP4 or QuickTime video without its metadata, made of `source`'s own bytes but for the
28009
+ * boxes and samples zeroed; undefined when it goes as it is (not one of these videos, a file without a video track).
28010
+ * Throws `NO_VIDEO_METADATA` for a video whose metadata cannot be removed; an error reading `source` as it is.
28011
+ */
28012
+ async function withoutVideoMetadata(source, mime) {
28013
+ const head = new Uint8Array(await source.slice(0, VIDEO_METADATA_LIMITS.headBytes).arrayBuffer());
28014
+ const typed = STRIPPED_TYPES.has(mime.split(";")[0].trim().toLowerCase());
28015
+ if (!isVideoContainer(head, mime)) {
28016
+ if (typed && !isStrippedPicture(head, mime)) throw new Error(NO_VIDEO_METADATA);
28017
+ return;
28018
+ }
28019
+ /** What replaces the file's bytes, by where it starts: a box rewritten, or zeros (no `bytes`). */
28020
+ const patches = [];
28021
+ const top = [];
28022
+ for (let at = 0; at < source.size;) {
28023
+ check(top.length < VIDEO_METADATA_LIMITS.maxBoxes);
28024
+ const box = await headerAt(source, at);
28025
+ if (top.length && box.type === "\0\0\0\0" && box.end === source.size) {
28026
+ patches.push({
28027
+ start: at,
28028
+ end: source.size
28029
+ });
28030
+ break;
28031
+ }
28032
+ check(TOP_KEEPS.has(box.type) || TOP_EMPTIED.has(box.type));
28033
+ top.push(box);
28034
+ at = box.end;
28035
+ }
28036
+ const moovs = top.filter((box) => box.type === "moov");
28037
+ check(moovs.length === 1);
28038
+ const moov = await whole(source, moovs[0]);
28039
+ const { video, fragmented, zeroed } = stripMoov(moov);
28040
+ if (!video && !typed) return void 0;
28041
+ patches.push({
28042
+ start: moovs[0].start,
28043
+ end: moovs[0].end,
28044
+ bytes: moov
28045
+ });
28046
+ check(!fragmented || !zeroed.length);
28047
+ for (const box of top) if (box.type === "moof") {
28048
+ const moof = await whole(source, box);
28049
+ emptyWithin(moof, box.body - box.start, moof.length);
28050
+ patches.push({
28051
+ start: box.start,
28052
+ end: box.end,
28053
+ bytes: moof
28054
+ });
28055
+ } else if (TOP_EMPTIED.has(box.type)) {
28056
+ const head = new Uint8Array(await source.slice(box.start, box.body).arrayBuffer());
28057
+ empty(head, {
28058
+ type: box.type,
28059
+ start: 0,
28060
+ body: head.length,
28061
+ end: head.length
28062
+ });
28063
+ patches.push({
28064
+ start: box.start,
28065
+ end: box.body,
28066
+ bytes: head
28067
+ }, {
28068
+ start: box.body,
28069
+ end: box.end
28070
+ });
28071
+ }
28072
+ const mdats = top.filter((box) => box.type === "mdat");
28073
+ const merged = [];
28074
+ for (const [start, end] of zeroed.sort((a, b) => a[0] - b[0])) {
28075
+ check(mdats.some((mdat) => start >= mdat.body && end <= mdat.end));
28076
+ const last = merged[merged.length - 1];
28077
+ if (last && start <= last[1]) last[1] = Math.max(last[1], end);
28078
+ else merged.push([start, end]);
28079
+ }
28080
+ for (const [start, end] of merged) patches.push({
28081
+ start,
28082
+ end
28083
+ });
28084
+ const parts = [];
28085
+ let at = 0;
28086
+ for (const patch of patches.sort((a, b) => a.start - b.start)) {
28087
+ check(patch.start >= at);
28088
+ if (patch.start > at) parts.push(source.slice(at, patch.start));
28089
+ if (patch.bytes) parts.push(patch.bytes);
28090
+ else for (let left = patch.end - patch.start; left > 0; left -= ZEROS.length) parts.push(ZEROS.subarray(0, Math.min(left, ZEROS.length)));
28091
+ at = patch.end;
28092
+ }
28093
+ if (at < source.size) parts.push(source.slice(at));
28094
+ return new Blob(parts, { type: mime });
28095
+ }
28096
+ //#endregion
26979
28097
  //#region ../core/src/payments.ts
26980
28098
  /**
26981
28099
  * Payments between two linked peers. Ghostly does not move money itself: it
@@ -31451,16 +32569,10 @@ var GroupSession = class {
31451
32569
  /** Set while a save of what received messages changed is due (`persistSoon`). */
31452
32570
  saveTimer;
31453
32571
  /**
31454
- * The frames of members who left that each member was handed (`frameKey`), so an app that does not take them (from
31455
- * before revision 2026-10-13, and never marks them seen) is not handed them again at every sync. In memory only.
32572
+ * The removals of authors out of the roster that each member was handed (`editKey`), so an app that does not take
32573
+ * them is not handed them again at every sync. In memory only.
31456
32574
  */
31457
32575
  leaversHanded = /* @__PURE__ */ new Map();
31458
- /**
31459
- * The frames a commit took out of the logs (`pruneRelay`), newest last, and whether the app holds them with its
31460
- * messages: a removal's `left` mark can come after its commit, and what the leaver wrote is then kept again
31461
- * (`unprune`). In memory only: started again, the app's rows bring theirs back.
31462
- */
31463
- pruned = [];
31464
32576
  /** Syncs answered per member, a few a minute (`GROUP_LIMITS.syncAnswers`). In memory only. */
31465
32577
  syncsAnswered = /* @__PURE__ */ new Map();
31466
32578
  /**
@@ -31474,6 +32586,8 @@ var GroupSession = class {
31474
32586
  * message written just now. Each frame of the answer keeps it open: it goes a slice at a time. In memory only.
31475
32587
  */
31476
32588
  answering = /* @__PURE__ */ new Map();
32589
+ /** Per member ahead of me: the epoch its last sync said, up to which its answer to mine brings the chain. In memory only. */
32590
+ syncedEpoch = /* @__PURE__ */ new Map();
31477
32591
  /** Catch-up answers still going out, a slice at a time (`handOut`). */
31478
32592
  answers;
31479
32593
  /**
@@ -31496,20 +32610,20 @@ var GroupSession = class {
31496
32610
  if (onRows) {
31497
32611
  const held = new Set(onRows.map(frameKey$1));
31498
32612
  if (state.relay?.length) state.relay = state.relay.filter((f) => !held.has(frameKey$1(f)));
31499
- this.onRows = state.status === "active" ? onRows.filter((f) => this.handsOn(f.s, f.e)) : [];
32613
+ this.onRows = state.status === "active" ? onRows.filter((f) => this.handsOn(f.s)) : [];
31500
32614
  this.trimRelay();
31501
32615
  }
31502
32616
  this.answers = new CatchUpAnswers({
31503
32617
  send: (to, frame) => {
31504
- if ((frame.t === "group-msg" || frame.t === "group-edit") && !rosterHas(this.roster, frame.s)) {
32618
+ if (frame.t === "group-edit" && !rosterHas(this.roster, frame.s)) {
31505
32619
  const handed = this.leaversHanded.get(to) ?? /* @__PURE__ */ new Set();
31506
- this.leaversHanded.set(to, handed.add(frame.t === "group-edit" ? editKey(frame) : frameKey$1(frame)));
32620
+ this.leaversHanded.set(to, handed.add(editKey(frame)));
31507
32621
  }
31508
32622
  return hooks.send(to, frame);
31509
32623
  },
31510
32624
  ...hooks.handled && { handled: (to) => hooks.handled(to) },
31511
32625
  active: () => this.state.status === "active",
31512
- key: (frame) => frame.t === "group-msg" ? frameKey$1(frame) : void 0
32626
+ key: (frame) => frame.t === "group-msg" ? frameKey$1(frame) : frame.t === "group-commit" ? `commit:${frame.commit.e}` : void 0
31513
32627
  });
31514
32628
  this.provisional = new Set((state.provisional ?? []).slice(-GROUP_LIMITS.provisional));
31515
32629
  this.chainMovedAt = this.clock();
@@ -31798,8 +32912,9 @@ var GroupSession = class {
31798
32912
  return this.hooks.save(structuredClone(this.state));
31799
32913
  }
31800
32914
  /**
31801
- * A save within `GROUP_LIMITS.saveWithinMs`, for what a received message changes (what was seen, what is kept to hand
31802
- * on): the state holds the whole hand-on log, and a member back in a busy group wrote all of it once per message.
32915
+ * A save within `GROUP_LIMITS.saveWithinMs`, for what a received message, commit or secret changes (what was seen,
32916
+ * what is kept to hand on, the chain): the state holds the whole hand-on log and chain, and a member back in a busy
32917
+ * group wrote all of it once per message, and once per commit.
31803
32918
  * The message itself is stored before (`hooks.message`). An app killed before the save takes those frames again when
31804
32919
  * it syncs: its store has the messages already, and the state then catches up.
31805
32920
  */
@@ -31907,7 +33022,7 @@ var GroupSession = class {
31907
33022
  }
31908
33023
  transferAdmin(memberKey, now = Date.now()) {
31909
33024
  return this.serialize(async () => {
31910
- this.requireAdmin();
33025
+ this.requireAdmin("Only the admin can hand the admin role over");
31911
33026
  if (!rosterHas(this.roster, memberKey) || memberKey === this.myKey) throw new Error("Not a member");
31912
33027
  await this.commit("role", memberKey, now);
31913
33028
  });
@@ -31968,18 +33083,10 @@ var GroupSession = class {
31968
33083
  this.hooks.changed();
31969
33084
  return { secret };
31970
33085
  }
31971
- /**
31972
- * Someone removed is not handed on any more, whatever they sent while in the roster; one who left still is, for the
31973
- * epochs before its leave (WISP 902 § Catch-up).
31974
- */
33086
+ /** Someone removed or gone is not handed on any more, whatever they sent while in the roster (WISP 902 § Catch-up). */
31975
33087
  pruneRelay() {
31976
- const prune = (log, row) => log.filter((f) => this.handsOn(f.s, f.e) || (this.pruned.push({
31977
- frame: f,
31978
- row
31979
- }), false));
31980
- if (this.state.relay?.length) this.state.relay = prune(this.state.relay, false);
31981
- if (this.onRows?.length) this.onRows = prune(this.onRows, true);
31982
- this.pruned.splice(0, this.pruned.length - GROUP_LIMITS.relay);
33088
+ if (this.state.relay?.length) this.state.relay = this.state.relay.filter((f) => this.handsOn(f.s));
33089
+ if (this.onRows?.length) this.onRows = this.onRows.filter((f) => this.handsOn(f.s));
31983
33090
  if (this.state.relayEdits?.length) this.state.relayEdits = this.state.relayEdits.filter((f) => rosterHas(this.roster, f.s) || this.isRemovalEdit(f));
31984
33091
  }
31985
33092
  /** Whether a kept edit is a removal (WISP 400 § Delete for everyone): its box, under its epoch's key, says `rm`. */
@@ -31993,18 +33100,6 @@ var GroupSession = class {
31993
33100
  return false;
31994
33101
  }
31995
33102
  }
31996
- /** The frames `pruneRelay` dropped that are handed on again now (a removal's `left` mark came after it), back in their logs. */
31997
- unprune() {
31998
- const back = this.pruned.filter((p) => this.handsOn(p.frame.s, p.frame.e));
31999
- if (!back.length) return;
32000
- this.pruned = this.pruned.filter((p) => !back.includes(p));
32001
- for (const { frame, row } of back) {
32002
- const log = row && this.onRows ? this.onRows : this.state.relay ??= [];
32003
- const at = log.findIndex((f) => f.ts > frame.ts);
32004
- log.splice(at < 0 ? log.length : at, 0, frame);
32005
- }
32006
- this.trimRelay();
32007
- }
32008
33103
  /** Another member's edit, kept to hand on: the latest per message; the oldest go once the log is full. False: one as new was kept. */
32009
33104
  keepEdit(frame) {
32010
33105
  const same = (f) => f.s === frame.s && f.e === frame.e && f.n === frame.n;
@@ -32069,7 +33164,6 @@ var GroupSession = class {
32069
33164
  this.state.sent = [];
32070
33165
  this.state.relay = [];
32071
33166
  if (this.onRows) this.onRows = [];
32072
- this.pruned = [];
32073
33167
  this.state.relayEdits = [];
32074
33168
  this.state.alone = [];
32075
33169
  this.waiting = [];
@@ -32572,8 +33666,8 @@ var GroupSession = class {
32572
33666
  }
32573
33667
  /**
32574
33668
  * A message, from its author's edge or handed on by another member. Handed on, it is taken only while both are in
32575
- * the roster (someone removed is neither heard from nor handed on, #300), or from a member in it when its author left
32576
- * after it (`handsOn`), and its boxes only with the author's `xs`.
33669
+ * the roster (someone removed or gone is neither heard from nor handed on, #300, `handsOn`), and its boxes only with
33670
+ * the author's `xs`.
32577
33671
  */
32578
33672
  async receiveMessage(from, raw, waited = false) {
32579
33673
  if (!isMessageFrame$1(raw)) return;
@@ -32584,7 +33678,7 @@ var GroupSession = class {
32584
33678
  const relayed = raw.s !== from;
32585
33679
  const now = this.now(), answer = (this.answering.get(from) ?? 0) > now;
32586
33680
  if (answer) this.answering.set(from, now + ANSWER_WINDOW_MS);
32587
- if (relayed && (!rosterHas(this.roster, from) || !this.handsOn(raw.s, raw.e))) return;
33681
+ if (relayed && (!rosterHas(this.roster, from) || !this.handsOn(raw.s))) return;
32588
33682
  if (this.isDuplicate(raw)) return;
32589
33683
  const signedWhole = relayed && this.wholeSigned(raw);
32590
33684
  if (!signedWhole && !verify(fromBase64Url(raw.sig), messageSigned$1(raw), publicKeyFromZ32(raw.s))) return;
@@ -32635,7 +33729,7 @@ var GroupSession = class {
32635
33729
  this.markSeen(raw);
32636
33730
  this.keep(clean(raw));
32637
33731
  this.persistSoon();
32638
- if (this.handsOn(raw.s, raw.e)) this.took(clean(raw));
33732
+ if (this.handsOn(raw.s)) this.took(clean(raw));
32639
33733
  return;
32640
33734
  }
32641
33735
  const id = first && !this.provisional.has(own) ? groupMessageId(raw.s, first.e, first.n) : own;
@@ -32673,7 +33767,7 @@ var GroupSession = class {
32673
33767
  if (firstFrame && rosterHas(this.state.chain[firstFrame.e]?.m ?? [], this.myKey)) this.markSeen(firstFrame);
32674
33768
  this.keep(clean(raw));
32675
33769
  this.persistSoon();
32676
- if (this.handsOn(raw.s, raw.e)) this.took(clean(raw));
33770
+ if (this.handsOn(raw.s)) this.took(clean(raw));
32677
33771
  }
32678
33772
  /**
32679
33773
  * An edit of a member's own message, from its author's edge or handed on by another member: believed only while its
@@ -32853,6 +33947,14 @@ var GroupSession = class {
32853
33947
  this.asked.set(from, now);
32854
33948
  this.hooks.send(from, this.syncFrame([], from));
32855
33949
  }
33950
+ /**
33951
+ * Whether my sync to `from` (the one my edge opened with) still waits for its answer, which has the chain from the
33952
+ * epoch it said: asking again on reading its newer sync, or a commit of that answer, had each commit I missed sent
33953
+ * twice, each with a secret sealed again (200 missed went as 400 frames, 1,456 when answers go a slice at a time).
33954
+ */
33955
+ awaitsAnswer(from) {
33956
+ return (this.answering.get(from) ?? 0) > this.now();
33957
+ }
32856
33958
  async replayWaiting() {
32857
33959
  await this.metaFollowsChain();
32858
33960
  const ready = this.waiting.filter((w) => w.frame.e <= this.epoch && !!this.state.secrets[w.frame.e]);
@@ -32867,15 +33969,13 @@ var GroupSession = class {
32867
33969
  const raw = frame.commit;
32868
33970
  if (!raw || typeof raw !== "object" || !Number.isSafeInteger(raw.e)) return;
32869
33971
  const e = raw.e;
33972
+ if (this.awaitsAnswer(from)) this.answering.set(from, this.now() + ANSWER_WINDOW_MS);
32870
33973
  if (e <= this.epoch) {
32871
33974
  const known = this.state.chain[e];
32872
33975
  const result = verifyCommit(raw, this.state.chain[e - 1] ?? null, this.id);
32873
33976
  if ("error" in result || result.commit.by !== known.by || result.commit.by !== this.admin) return;
32874
33977
  if (commitHash(result.commit) !== commitHash(known)) await this.fork(`Member ${from.slice(0, 8)} holds a different membership history for epoch ${e}`);
32875
- else if (this.takeLeftMark(known, frame.left)) {
32876
- this.unprune();
32877
- await this.persist();
32878
- }
33978
+ else if (this.takeLeftMark(known, frame.left)) await this.persist();
32879
33979
  return;
32880
33980
  }
32881
33981
  if (e > this.epoch + 1) {
@@ -32897,7 +33997,7 @@ var GroupSession = class {
32897
33997
  commit: result.commit,
32898
33998
  ...mark ? { left: mark } : {}
32899
33999
  });
32900
- if (this.state.status === "active" && !this.state.secrets[this.epoch]) this.ask(from);
34000
+ if (this.state.status === "active" && !this.state.secrets[this.epoch] && !(this.awaitsAnswer(from) && this.epoch < (this.syncedEpoch.get(from) ?? 0))) this.ask(from);
32901
34001
  const next = this.pendingCommits.get(this.epoch + 1);
32902
34002
  if (next) {
32903
34003
  this.pendingCommits.delete(this.epoch + 1);
@@ -32905,21 +34005,12 @@ var GroupSession = class {
32905
34005
  }
32906
34006
  }
32907
34007
  /**
32908
- * Whether a frame of `author` under `epoch` is taken from another member, kept and handed on: while its author is in
32909
- * the roster, or when it left (its removal marked `left`, and it is not back in) and the frame is from before that,
32910
- * and from after any removal of it before that was not a leave: let back in, it is not handed on for those epochs.
34008
+ * Whether a frame of `author` is taken from another member, kept and handed on: only while its author is in the
34009
+ * roster. One who left, as one removed, keeps its seed and the secrets of its epochs, and a copy of its state signs
34010
+ * frames for them after the leave, dated as it likes: whether the admin marked its removal `left` changes nothing.
32911
34011
  */
32912
- handsOn(author, epoch) {
32913
- if (rosterHas(this.roster, author)) return true;
32914
- const chain = this.state.chain;
32915
- let left = false;
32916
- for (let e = chain.length - 1; e > 0; e--) {
32917
- if (chain[e].k !== "remove" || chain[e].s !== author) continue;
32918
- if (left && epoch >= e) return true;
32919
- if (!this.state.leftMarks?.[e] || epoch >= e) return false;
32920
- left = true;
32921
- }
32922
- return left;
34012
+ handsOn(author) {
34013
+ return rosterHas(this.roster, author);
32923
34014
  }
32924
34015
  /** Keeps the admin's mark on a commit that took out a member who left (`GroupCommitFrame.left`) when it holds; true when new. */
32925
34016
  takeLeftMark(commit, mark) {
@@ -32946,7 +34037,7 @@ var GroupSession = class {
32946
34037
  if (sealed) this.takeSecret(commit.e, sealed);
32947
34038
  this.pruneSecrets();
32948
34039
  this.pruneRelay();
32949
- await this.persist();
34040
+ this.persistSoon();
32950
34041
  this.hooks.changed();
32951
34042
  await this.replayWaiting();
32952
34043
  }
@@ -32968,7 +34059,7 @@ var GroupSession = class {
32968
34059
  taken = this.takeSecret(entry.e, entry.s) || taken;
32969
34060
  }
32970
34061
  if (!taken) return;
32971
- await this.persist();
34062
+ this.persistSoon();
32972
34063
  this.hooks.changed();
32973
34064
  await this.replayWaiting();
32974
34065
  }
@@ -32979,7 +34070,8 @@ var GroupSession = class {
32979
34070
  if (!answered.take()) return;
32980
34071
  this.hear(frame);
32981
34072
  if (frame.e > this.epoch) {
32982
- this.ask(from);
34073
+ this.syncedEpoch.set(from, frame.e);
34074
+ if (!this.awaitsAnswer(from)) this.ask(from);
32983
34075
  this.offerMeta(from, frame.mt);
32984
34076
  this.handOwn(from, frame);
32985
34077
  return;
@@ -33016,12 +34108,7 @@ var GroupSession = class {
33016
34108
  });
33017
34109
  const lacks = missingIn(frame, from);
33018
34110
  const asked = new Set(Array.isArray(frame.ask) ? frame.ask.filter((k) => typeof k === "string" && k !== from && k !== this.myKey && rosterHas(this.roster, k)) : []);
33019
- const handed = this.leaversHanded.get(from);
33020
- const kept = !asked.size && !this.state.leftMarks ? [] : this.kept().filter((f) => {
33021
- if (!this.state.chain[f.e] || !rosterHas(this.state.chain[f.e].m, from) || !lacks(f) || this.isRemoved(f)) return false;
33022
- if (asked.has(f.s)) return true;
33023
- return !rosterHas(this.roster, f.s) && !handed?.has(frameKey$1(f)) && this.handsOn(f.s, f.e);
33024
- });
34111
+ const kept = !asked.size ? [] : this.kept().filter((f) => asked.has(f.s) && !!this.state.chain[f.e] && rosterHas(this.state.chain[f.e].m, from) && lacks(f) && !this.isRemoved(f));
33025
34112
  const written = asWritten(this.ownLacked(from, frame), kept);
33026
34113
  const metas = this.metaFor(from, frame.mt);
33027
34114
  for (const f of written) {
@@ -33033,6 +34120,7 @@ var GroupSession = class {
33033
34120
  const edits = (this.state.relayEdits ?? []).filter((f) => f.s === author && readable(f));
33034
34121
  answer.push(...edits.slice(-GROUP_LIMITS.handOnEdits));
33035
34122
  }
34123
+ const handed = this.leaversHanded.get(from);
33036
34124
  const gone = (this.state.relayEdits ?? []).filter((f) => !rosterHas(this.roster, f.s) && readable(f) && !handed?.has(editKey(f)));
33037
34125
  answer.push(...gone.slice(-GROUP_LIMITS.handOnEdits));
33038
34126
  answer.push(...metas.map((m) => m.frame));
@@ -33739,6 +34827,31 @@ function verifyCommunityCommit(raw, parent, parentRoster, groupId, before) {
33739
34827
  * member's second leave under the one statement there was, and no newcomer could enter that group again.
33740
34828
  */
33741
34829
  function verifyCommunityChain(raw, groupId) {
34830
+ const check = checkChain(raw, groupId);
34831
+ for (;;) {
34832
+ const step = check.next();
34833
+ if (step.done) return step.value;
34834
+ }
34835
+ }
34836
+ /**
34837
+ * `verifyCommunityChain` for a client whose engine shares its page's thread: the same checks, letting the thread go every
34838
+ * `CHAIN_SLICE_MS` of them. One commit's signature takes ~2.6 ms in JavaScript on a desktop CPU, several times that on a
34839
+ * phone, so a history near `COMMUNITY_LIMITS.chain` checked at once was an app that drew nothing for 5 s and more.
34840
+ */
34841
+ async function verifyCommunityChainPaced(raw, groupId) {
34842
+ const check = checkChain(raw, groupId), pause = pacer(CHAIN_SLICE_MS);
34843
+ for (;;) {
34844
+ const step = check.next();
34845
+ if (step.done) return step.value;
34846
+ await pause();
34847
+ }
34848
+ }
34849
+ /** `verifyCommunityChainPaced` checks commits for this long at most before it lets the thread go. */
34850
+ var CHAIN_SLICE_MS = 5;
34851
+ /** A fresh epoch's secret is sealed to members for this long at most before the thread goes (`CommunitySession.commit`). */
34852
+ var SEAL_SLICE_MS = 5;
34853
+ /** The chain's checks, one commit per step. */
34854
+ function* checkChain(raw, groupId) {
33742
34855
  if (!Array.isArray(raw) || raw.length === 0 || raw.length > COMMUNITY_LIMITS.chain) return { error: "Malformed membership chain" };
33743
34856
  const chain = [], rosters = [];
33744
34857
  let entry = "";
@@ -33748,6 +34861,7 @@ function verifyCommunityChain(raw, groupId) {
33748
34861
  chain.push(result.commit);
33749
34862
  rosters.push(result.roster);
33750
34863
  if (result.commit.x !== void 0) entry = result.commit.x;
34864
+ yield;
33751
34865
  }
33752
34866
  return {
33753
34867
  chain,
@@ -33860,6 +34974,8 @@ var MessagePace = class {
33860
34974
  var frameKey = (f) => `${f.e}:${f.h}:${f.n}`;
33861
34975
  /** A frame among everyone's: each member counts its own `n`, so `frameKey` alone tells only one member's frames apart. */
33862
34976
  var storeKey = (f) => `${f.s}:${frameKey(f)}`;
34977
+ /** A new link's entry seed is sealed to members for this long at most before the thread goes (`replaceLink`). */
34978
+ var ENTRY_SLICE_MS = 5;
33863
34979
  /**
33864
34980
  * Where a frame said again under a newer commit was first said (`o`, WISP 903 § Messages and catch-up): its commit's
33865
34981
  * epoch and short hash and its number there. Never the frame's own place, nor a later epoch than its own.
@@ -33899,6 +35015,18 @@ function isSealed(v) {
33899
35015
  "c"
33900
35016
  ].every((k) => typeof v[k] === "string" && B64.test(v[k]) && v[k].length <= 128);
33901
35017
  }
35018
+ /** A welcome's shape and the whole chain it and the pieces before it carry, not yet checked (`CommunitySession.join`). */
35019
+ function readWelcome(link, pieces, welcome) {
35020
+ if (!welcome || typeof welcome !== "object") return { error: "Malformed welcome" };
35021
+ const w = welcome;
35022
+ if (w.t !== "group-welcome" || w.v !== 2 || w.g !== link.g || !Array.isArray(w.commits) || !Array.isArray(w.secrets) || !isSealed(w.rv) || !isSealed(w.entry)) return { error: "Malformed welcome" };
35023
+ const commits = [...pieces.flatMap((p) => p && typeof p === "object" && Array.isArray(p.commits) ? p.commits : []), ...w.commits];
35024
+ if (commits.length > COMMUNITY_LIMITS.chain) return { error: "Membership chain too long" };
35025
+ return {
35026
+ welcome: w,
35027
+ commits
35028
+ };
35029
+ }
33902
35030
  /** A pair payload's box: an ephemeral key, a nonce and a ciphertext of at most `appBytes` sealed. */
33903
35031
  var MAX_PAIR_BOX = Math.ceil((COMMUNITY_LIMITS.appBytes + 16) * 4 / 3) + 4;
33904
35032
  function isPairBox(v) {
@@ -33913,7 +35041,7 @@ function isMessageFrame(v) {
33913
35041
  * One member's view of a community group: the branch it follows and the ones it knows, the
33914
35042
  * secrets it holds, what it has seen, and the recent frames it keeps for others.
33915
35043
  */
33916
- var CommunitySession = class {
35044
+ var CommunitySession = class CommunitySession {
33917
35045
  hooks;
33918
35046
  state;
33919
35047
  identity;
@@ -34026,12 +35154,17 @@ var CommunitySession = class {
34026
35154
  * add was made by another member (the first one to answer me went away) is as good.
34027
35155
  */
34028
35156
  static join(link, pieces, welcome, seedB64, now = Date.now()) {
34029
- if (!welcome || typeof welcome !== "object") return { error: "Malformed welcome" };
34030
- const w = welcome;
34031
- if (w.t !== "group-welcome" || w.v !== 2 || w.g !== link.g || !Array.isArray(w.commits) || !Array.isArray(w.secrets) || !isSealed(w.rv) || !isSealed(w.entry)) return { error: "Malformed welcome" };
34032
- const commits = [...pieces.flatMap((p) => p && typeof p === "object" && Array.isArray(p.commits) ? p.commits : []), ...w.commits];
34033
- if (commits.length > COMMUNITY_LIMITS.chain) return { error: "Membership chain too long" };
34034
- const verified = verifyCommunityChain(commits, link.g);
35157
+ const read = readWelcome(link, pieces, welcome);
35158
+ if ("error" in read) return read;
35159
+ return CommunitySession.joinVerified(link, read.welcome, verifyCommunityChain(read.commits, link.g), seedB64, now);
35160
+ }
35161
+ /** `join`, its chain checked a slice at a time (`verifyCommunityChainPaced`): what an app sharing its page's thread calls. */
35162
+ static async joinPaced(link, pieces, welcome, seedB64, now = Date.now()) {
35163
+ const read = readWelcome(link, pieces, welcome);
35164
+ if ("error" in read) return read;
35165
+ return CommunitySession.joinVerified(link, read.welcome, await verifyCommunityChainPaced(read.commits, link.g), seedB64, now);
35166
+ }
35167
+ static joinVerified(link, w, verified, seedB64, now) {
34035
35168
  if ("error" in verified) return verified;
34036
35169
  const { chain, roster, entry } = verified;
34037
35170
  const me = identityFromSeedB64(seedB64);
@@ -34834,14 +35967,18 @@ var CommunitySession = class {
34834
35967
  commit
34835
35968
  });
34836
35969
  if (FRESH.has(kind)) {
34837
- for (const [key] of roster) if (key !== this.myKey && isZ32Key(key)) this.hooks.addressed(key, {
34838
- t: "group-secret",
34839
- v: 2,
34840
- g: this.id,
34841
- to: key,
34842
- h: hash,
34843
- s: sealSecret(key, secret, secretAad(this.id, hash, key))
34844
- });
35970
+ const pause = pacer(SEAL_SLICE_MS);
35971
+ for (const [key] of roster) if (key !== this.myKey && isZ32Key(key)) {
35972
+ this.hooks.addressed(key, {
35973
+ t: "group-secret",
35974
+ v: 2,
35975
+ g: this.id,
35976
+ to: key,
35977
+ h: hash,
35978
+ s: sealSecret(key, secret, secretAad(this.id, hash, key))
35979
+ });
35980
+ await pause();
35981
+ }
34845
35982
  }
34846
35983
  this.hooks.changed();
34847
35984
  await this.renewLasting();
@@ -34952,9 +36089,13 @@ var CommunitySession = class {
34952
36089
  seedB64: entry?.seedB64 ?? ""
34953
36090
  };
34954
36091
  await this.persist();
34955
- if (entry) for (const key of this.others) {
34956
- const frame = this.entryFrame(key);
34957
- if (frame) this.hooks.addressed(key, frame);
36092
+ if (entry) {
36093
+ const pause = pacer(ENTRY_SLICE_MS);
36094
+ for (const key of this.others) {
36095
+ const frame = this.entryFrame(key);
36096
+ if (frame) this.hooks.addressed(key, frame);
36097
+ await pause();
36098
+ }
34958
36099
  }
34959
36100
  this.hooks.changed();
34960
36101
  return this.state.entry.key;
@@ -35512,6 +36653,7 @@ var CommunitySession = class {
35512
36653
  case "group-left": return this.receiveLeft(frame);
35513
36654
  case "group-entry": {
35514
36655
  if (frame.to !== this.myKey || !isSealed(frame.s) || frame.x !== this.currentEntryKey()) return false;
36656
+ if (this.state.entry.key === frame.x && this.state.entry.seedB64) return false;
35515
36657
  const seed = openSecret(this.identity.seed, this.myKey, frame.s, entryAad(this.id, this.myKey));
35516
36658
  return !!seed && this.takeEntrySeed(toBase64Url(seed));
35517
36659
  }
@@ -37368,6 +38510,6 @@ function x401ApprovalDigest(subject) {
37368
38510
  return toBase64Url(sha256(utf8Encode(canonical)));
37369
38511
  }
37370
38512
  //#endregion
37371
- export { COMMUNITY_LIMITS as $, identityFromSeed as $C, FRESH_READ_MS as $S, handoffDataFrame as $_, LIVENESS_PING_MS as $a, readImageMeta as $b, encodeAppRangeData as $c, LIVE_POLL_MS as $d, LINK_MAX_CHARS as $f, MAX_MSGS_PAYLOAD_B64 as $g, countUnusedInvite as $h, sparkAddressKind as $i, DNS_TYPE as $l, sha256Hex as $m, bip322MessageHash as $n, meshHubs as $o, buttonLabelClash as $p, checkDidJws as $r, COMMUNITY_PIN_FRAME as $s, carryMentions as $t, identityPresentationBytes as $u, enrollCancelReason as $v, verifyDeviceTransports as $x, requestRecords as $y, readX401ProofResponseHeader as A, RelayBreaker as AC, sealTurnBody as AS, HANDOFF_LIST_PER_FRAME as A_, ENDPOINT as Aa, appRefPublisher as Ab, wakePayload as Ac, RING_LIFETIME as Ad, formatVideoDuration as Af, offerIsFresh as Ag, directBlocked as Ah, openDidDhtPayload as Ai, REACTIONS_CAPABILITY as Al, commitUntaggedHash as Am, parseGroupMetaFrame as An, fetchesByItself as Ao, validReactionNumber as Ap, shortAtprotoDid as Ar, FileUplink as As, mergeKnocks as At, capsDescriptors as Au, readHandoffRelease as Av, utf8Decode as Aw, inviteQrText as Ax, MAX_SLOT_KNOCKS as Ay, APP_STORE_KINDS as B, createRelayPayload as BC, turnSequence as BS, HANDOFF_VERSION as B_, CROSSED_FRESH_MS as Ba, readAppRevocations as Bb, vapidKeysMatch as Bc, checkedDescriptors as Bd, EDIT_SEND_LIMIT as Bf, compressSdp as Bg, OFFER_FAST_MS as Bh, USDT_PUBLIC_RPC as Bi, PAIRED_PROFILE as Bl, verifyCommitSignature as Bm, SshSigError as Bn, GROUP_VERSION_SIGNALS as Bo, ACTIVE_TASK_STATUSES as Bp, parseAtprotoVerificationKey as Br, TYPING_RATE_WINDOW_MS as Bs, mentionedMembers as Bt, IDENTITY_MAX_EVIDENCE as Bu, setAckFrame as Bv, deviceEchoFrame as Bx, contactDay as By, buildX401TokenObject as C, relayUrlProblem as CC, TurnRecordError as CS, HANDOFF_DATA as C_, parseLightningDestination as Ca, sha256Paced as Cb, deviceWakeRequest as Cc, proofStatement as Cd, voiceDownloadName as Cf, wrapDataChannel as Cg, OFFER_HOST_GATHER_MS as Ch, didDhtDocument as Ci, BUTTONS_CAPABILITY as Cl, LEGACY_GROUP_MEMBERS as Cm, groupMetaTag as Cn, parseEngineError as Co, queueReaction as Cp, atprotoDidMethod as Cr, PAIRED_CALL_FRAME as Cs, MAX_KNOCKS as Ct, CAPS_LIMITS as Cu, readHandoffData as Cv, fromBase64Url as Cw, createLink as Cx, turnOff as Cy, readX401ProofRequest as D, BREAKER_BASE_MS as DC, openTurnValue as DS, HANDOFF_HAVE as D_, BOLT11_PATTERN as Da, APP_STATEMENT_LIMITS as Db, readWakePayload as Dc, validExternalKey as Dd, voicePeaksOf as Df, RTC_SIGNAL_MAX_AGE_MS as Dg, DIRECT_OWN_ATTEMPTS as Dh, encodeDidDhtDeactivated as Di, FILES_CAPABILITY as Dl, OWN_FRAME_LIMIT as Dm, nextGroupMetaRevision as Dn, GROUP_VERSION_FILES as Do, reactionIsNewer as Dp, isAtprotoDid as Dr, FILE_DATA_KIND as Ds, groupEntryUrl as Dt, CapsKeys as Du, readHandoffHello as Dv, toBase64 as Dw, inviteLink as Dx, KNOCK_SLOT_LABEL as Dy, isX401Protocol as E, BREAKER_ALL_DOWN_PROBE_MS as EC, nextTurnPosition as ES, HANDOFF_FILE_REQUEST as E_, resolveLightningDestination as Ea, APP_PREFIXES as Eb, readWake as Ec, storageProofPath as Ed, voiceLevelsOf as Ef, RTC_SIGNAL_FUTURE_MS as Eg, DIRECT_EVIDENCE_MS as Eh, didDhtRecords as Ei, FILES_BINARY_CAPABILITY as El, MEMBER_KEY as Em, keepPastGroupMeta as En, GROUP_HAVE_FRAME as Eo, reactionFrame as Ep, checkAtprotoProofRecord as Er, ChatFiles as Es, entryParams as Et, CapsExchange as Eu, readHandoffHave as Ev, randomBytes as Ew, encodeInviteCode as Ex, KNOCK_SLOTS as Ey, appRevocationFor as F, withRequestOptions as FC, turnKeys as FS, HANDOFF_PIECE_OVERHEAD as F_, parseCashuRequestPayload as Fa, isAppKey as Fb, decryptPushPayload as Fc, verifyRingAuthorization as Fd, EDIT_BUFFER_MAX as Ff, RTC_CONFIG as Fg, EXPECT_PEER_MS as Fh, ONCHAIN_PROVIDER as Fi, TYPING_CAPABILITY as Fl, rosterHas as Fm, wrapGroupMeta as Fn, readGroupWant as Fo, groupReplyAuthor as Fp, decodeDagCbor as Fr, transferEnded as Fs, GROUP_WAKE_MEMBER_INTERVAL_MS as Ft, IDENTITY_CHALLENGE_WINDOW as Fu, sortParts as Fv, __require as Fw, DEVICE_CAPABILITIES as Fx, REQUEST_PACKET_BYTES as Fy, readAppStore as G, readOwnRelayPayload as GC, BACKGROUND_WHILE_SIGNALING as GS, handoffAckFrame as G_, DHT_PIN_GRACE_MS as Ga, verifyAppRevocation as Gb, AppRanges as Gc, transportOrder as Gd, dhtEditId as Gf, isGlobalIpv4Host as Gg, RELAY_POLL_INTERVALS as Gh, formatPaymentAmount as Gi, HOLD_DATED_BACK_MS as Gl, edgeParams as Gm, sshKeyDigestHex as Gn, SIGNAL_PROVEN_MS as Go, PR_CHECKS as Gp, DID_DOCUMENT_MAX_BYTES as Gr, TypingReceiver as Gs, GroupSession as Gt, IDENTITY_PROVIDER_ID as Gu, DEVICE_KINDS as Gv, deviceLinkParams as Gx, linkRecords as Gy, checkAppListing as H, newerPacket as HC, turnStatedVerifier as HS, NO_ATTEMPTS as H_, CROSSED_WAIT_MS as Ha, setAppSignatureFastPath as Hb, APP_RANGE_ERRORS as Hc, irohRelayUrl as Hd, MAX_REMOVAL_NUMBER as Hf, decompressSdp as Hg, OFFER_STEP_MAX as Hh, arkAddressPrefix as Hi, SESSION_FRAME_MAX as Hl, confirmationMatches as Hm, parseSshSignature as Hn, SIGNAL_CARRIERS as Ho, BUTTON_STYLES as Hp, unsignedCommitBytes as Hr, TYPING_SEND_LIMIT as Hs, GROUP_LIMITS as Ht, IDENTITY_MAX_RECEIVED as Hu, setUpdateMessage as Hv, deviceFrameCapability as Hx, knockSlotIdentity as Hy, appStoreDecision as I, MAX_DNS_PACKET_BYTES as IC, turnName as IS, HANDOFF_RELEASE as I_, parseFedimintRequestPayload as Ia, isAppRef as Ib, encryptPushPayload as Ic, verifyRingEvidence as Id, EDIT_BUFFER_MS as If, answersOffer as Ig, FIRST_PUBLISH_MAX_MS as Ih, PaymentPreflightError as Ii, UPGRADE_CAPABILITY as Il, signCommit as Im, SSHSIG_MAX_ARMOR as In, readGroupWantNo as Io, pairedReplyAuthor as Ip, encodeDagCbor as Ir, transferStalled as Is, GROUP_WAKE_RECEIVE_LIMIT as It, IDENTITY_CHECK_UNAVAILABLE as Iu, SET_ACK as Iv, __toCommonJS as Iw, DEVICE_ECHO_FRAME as Ix, REQUEST_TEXT_BYTES as Iy, GROUP_TYPING_FRAME as J, decodeTxtPacket as JC, CHAT_RESERVE_MOST_SHARE as JS, handoffAttemptSucceeded as J_, GhostLink as Ja, IMAGE_LIMITS as Jb, appRangeDataFrame as Jc, DHT_FILE_TOO_LARGE as Jd, parseEditFrame as Jf, pickCallCandidates as Jg, TRANSPORTS_GONE_MS as Jh, validatePaymentTarget as Ji, HoldRefusedError as Jl, newEpochSecret as Jm, isLegacySignature as Jn, readGroupSignal as Jo, ROUTINE_STATES as Jp, DID_JWS_ALGS as Jr, parseTypingFrame as Js, frameBytes as Jt, IDENTITY_SUBJECT as Ju, ENROLL_DONE as Jv, deviceLinkSecret as Jx, mergeContactKnocks as Jy, readAppStoreSteps as K, signRelayPayload as KC, BACKGROUND_WRITES_SHARE as KS, handoffAttemptAllowed as K_, EARLY_DIAL_JOIN_MS as Ka, verifyAppSignature as Kb, appRangeCancelFrame as Kc, ACTIVE_DHT_POLL_MS as Kd, editFrame as Kf, keepsToRelays as Kg, SIGNAL_OUT_READS as Kh, isWalletNetwork as Ki, HOLD_LIMITS as Kl, encryptText as Km, sshSignCommand as Kn, SIGNAL_REPLY_MS as Ko, PR_STATES as Kp, DID_FILE_MAX_BYTES as Kr, TypingSender as Ks, asWritten as Kt, IDENTITY_REVOCATION_LABEL as Ku, ENROLL_CANCEL as Kv, deviceLinkRendezvousSeed as Kx, makeStamp as Ky, appUpdateDecision as L, PKARR_FUTURE_SKEW_MS as LC, turnPacket as LS, HANDOFF_REQUEST as L_, ANSWERS_REFUSED_PAUSES as La, isAppSignature as Lb, generateVapidKeys as Lc, RELAY_URL as Ld, EDIT_FRAME as Lf, buildSdpFromSignal as Lg, IDLE_THRESHOLD as Lh, SEPOLIA_TEST_USDT as Li, WAKE_SESSION_CAPABILITY as Ll, sortRoster as Lm, SSHSIG_NAMESPACE as Ln, CARRIED_DEFER_MS as Lo, readReply as Lp, findInMst as Lr, TYPING_FRAME as Ls, GroupWakeLimiter as Lt, IDENTITY_CLOCK_SKEW as Lu, SET_UPDATE as Lv, DEVICE_PING_FRAME as Lx, STAMP_BITS_DEFAULT as Ly, readX401ProofResultHeader as M, budgetRetryMs as MC, signTurnPacket as MS, HANDOFF_OFFER as M_, fedimintRequestPayload as Ma, appSignedBytes as Mb, PUSH_SERVICE_HOSTS as Mc, ringClaims as Md, isVideoMime as Mf, CALL_SIGNAL_FUTURE_MS as Mg, AWAITING_PEER_MS as Mh, signDidDhtPacket as Mi, SESSION_CAPABILITIES_FRAME as Ml, parseGroupCommit as Mm, parseGroupMetaTag as Mn, isGroupMessageId as Mo, PAIRED_REPLY_AUTHORS as Mp, AtprotoProofError as Mr, encodeFileData as Ms, GROUP_WAKE_FRAME as Mt, emptyCapsState as Mu, readHandoffVerified as Mv, __commonJSMin as Mw, pastedAgain as Mx, REQUEST_LABEL as My, x401AnswerableRequests as N, heldBackError as NC, signTurnRelease as NS, HANDOFF_PAKE as N_, findEndpoint as Na, checkAppRevokeStatement as Nb, WebPushError as Nc, ringEvidence as Nd, parseVideoMeta as Nf, CALL_SIGNAL_MAX_AGE_MS as Ng, DEPARTED_READ_MS as Nh, ETHEREUM_USDT as Ni, STATUS_CARD_CAPABILITY as Nl, rememberAlone as Nm, signGroupMeta as Nn, readGroupFileMeta as No, REPLY_ID as Np, atprotoCidFor as Nr, refusalText as Ns, GROUP_WAKE_GROUP_LIMIT as Nt, encodePacketTransports as Nu, sameDigest as Nv, __esmMin as Nw, readInviteCode as Nx, REQUEST_LIFETIME_MS as Ny, readX401ProofRequestHeader as O, BREAKER_MAX_MS as OC, readTurnBody as OS, HANDOFF_HELLO as O_, decodeBolt11 as Oa, appFingerprint as Ob, relayRequest as Oc, verifyNostrProof as Od, PLAYABLE_VIDEO as Of, buildDataSdp as Og, DIRECT_PEERS as Oh, encodeDidDhtPacket as Oi, KNOWN_SESSION_CAPABILITIES as Ol, SAID_AGAIN as Om, openGroupMeta as On, GROUP_WANT_FRAME as Oo, readDhtReactions as Op, normalizeAtprotoHandle as Or, FILE_FRAMES as Os, knockIdentity as Ot, CapsRefusedError as Ou, readHandoffManifest as Ov, toBase64Url as Ow, inviteOwnership as Ox, LINK_RECORD_LABEL as Oy, addedAppPermissions as P, isDiscoveryBudgetError as PC, turnInstance as PS, HANDOFF_PIECE_BYTES as P_, isFederationId as Pa, isAppHash as Pb, checkPushEndpoint as Pc, validRingKey as Pd, EDITED_FRAME as Pf, PAIRED_CALL_CANDIDATES as Pg, DHT_POLL_INTERVALS as Ph, EVM_TEST_CHAINS as Pi, SessionCapabilities as Pl, rosterAdmin as Pm, verifyGroupMetaSignature as Pn, readGroupHave as Po, REPLY_LIMITS as Pp, decodeAtprotoCommit as Pr, sentWhole as Ps, GROUP_WAKE_GROUP_WINDOW_MS as Pt, parsePacketTransports as Pu, sealHandoffPiece as Pv, __exportAll as Pw, DEVICES_CAPABILITY as Px, REQUEST_NAME_UNITS as Py, sealGroupTyping as Q, createIdentity as QC, DEPARTED_READS as QS, handoffContextProof as Q_, LIVENESS_MISSED_PINGS as Qa, previewable as Qb, decodeAppRangeData as Qc, DhtDelivery as Qd, validRemovalNumber as Qf, LABEL$1 as Qg, WATCH_PEER_MS as Qh, isSparkAddress as Qi, DNS_LABEL as Ql, sealSecret as Qm, MessageRefusal as Qn, mayBeHub as Qo, appCardId as Qp, DidError as Qr, typingKindOf as Qs, GROUP_EDIT_TEXT_BYTES as Qt, emptyIdentityLedger as Qu, enrollCancelFrame as Qv, unsignedDeviceTransports as Qx, requestPlaintextBytes as Qy, checkAppBeforeRun as R, PacketTooLargeError as RC, turnPayloadSequence as RS, HANDOFF_TIMINGS as R_, ANSWERS_REFUSED_PAUSE_MS as Ra, readAppRevocation as Rb, pushRequest as Rc, TRANSPORTS as Rd, EDIT_RATE_WINDOW_MS as Rf, callRtcConfig as Rg, LinkSession as Rh, SEPOLIA_TEST_USDT_FAUCET as Ri, parseSessionCapabilities as Rl, verifyChain as Rm, SSH_KEY_TYPES as Rn, CarriedTransport as Ro, replySnippet as Rp, parseAtprotoCar as Rr, TYPING_KINDS as Rs, groupWakeFrame as Rt, IDENTITY_FRAME_LIMIT as Ru, encodeSetSlots as Rv, ENROLL_CAPABILITY as Rx, STAMP_BITS_MAX as Ry, buildX401ResultArtifact as S, readRelayBody as SC, TURN_VERSION as SS, HANDOFF_CANCEL_REASONS as S_, parseInvoiceCallback as Sa, readAppBundleAsync as Sb, WakeLimiter as Sc, proofHash as Sd, recordingMime as Sf, sendBody as Sg, GATHER_STALL_MS as Sh, decodeDidDhtPacket as Si, APP_RANGES_CAPABILITY as Sl, GROUP_VERSION_LARGE as Sm, groupMetaPicture as Sn, engineText as So, parseReactionFrame as Sp, ATPROTO_PROOF_SCOPE as Sr, MAX_PAIRED_CALL_SIGNAL as Ss, KNOCK_TTL_MS as St, CAPS_LABEL as Su, readHandoffCancel as Sv, fromBase64 as Sw, createChatInvite as Sx, takeRequest as Sy, encodeX401Header as T, traceLink as TC, firstDeviceSetSecret as TS, HANDOFF_FILE_MISSING as T_, requestLnurlInvoice as Ta, APP_NAME as Tb, parseWakeFrame as Tc, storageProofBody as Td, voiceLevel as Tf, DATA_CHANNEL_LABEL as Tg, STALLED_EVIDENCE_MS as Th, didDhtKey as Ti, EDIT_CAPABILITY as Tl, MAX_GROUP_MEMBERS as Tm, groupName as Tn, GROUP_FILE_LIMITS as To, reactionEmoji as Tp, atprotoProofRkey as Tr, parsePairedCallFrame as Ts, encodeGroupEntryLink as Tt, CAPS_REFRESH_MS as Tu, readHandoffFileFrame as Tv, isZ32Key as Tw, encodeGhostlyInvite as Tx, ContactRequestError as Ty, checkAppStoreIndex as U, openRelayPayload as UC, turnVerifierMark as US, filePartDigest as U_, DEMOTE_AFTER_FAILURES as Ua, signAppObject as Ub, APP_RANGE_FRAMES as Uc, rankTransports as Ud, REMOVED_TEXT as Uf, extractParamsFromSdp as Ug, PRESENCE_HEARTBEAT as Uh, assertTokenUnits as Ui, SESSION_RECEIVE_PENDING as Ul, confirmationTag as Um, sameSshKey as Un, SIGNAL_FRESH_MS as Uo, CRON_LINE as Up, verifyAtprotoRecordProof as Ur, TYPING_STATUS_MAX as Us, GROUP_REACTED_FRAME as Ut, IDENTITY_MAX_VALIDITY as Uu, signTombstone as Uv, deviceKeyZ32 as Ux, knockSlotOf as Uy, APP_STORE_LIMITS as V, measureRecords as VC, turnSignedMessage as VS, HANDOFF_WINDOW as V_, CROSSED_PROBE_MS as Va, readAppSignature as Vb, APP_RANGE_DATA_KIND as Vc, irohDescriptor as Vd, MAX_EDITS_PER_MESSAGE as Vf, contactRtcConfig as Vg, OFFER_LOOK_MS as Vh, WALLET_NETWORKS as Vi, PairedSession as Vl, GROUP_PROFILE as Vm, parseSshPublicKey as Vn, SIGNALS_PER_MINUTE as Vo, BUTTON_ID as Vp, readAtprotoCid as Vr, TYPING_REFRESH_MS as Vs, parseGroupWakeFrame as Vt, IDENTITY_MAX_FRAME as Vu, setUpdateFrame as Vv, deviceEchoNonce as Vx, knockHolds as Vy, readAppListing as W, parseRelayPayload as WC, BACKGROUND_REQUESTS_PER_MINUTE as WS, filePartName as W_, DEMOTE_MS as Wa, signAppRevocation as Wb, APP_RANGE_LIMITS as Wc, relayedTransports as Wd, RateWindow as Wf, heardCallSignal as Wg, PRESENCE_WINDOW as Wh, assertWholeSats as Wi, HOLD_CAPABILITY as Wl, decryptText as Wm, sshFingerprint as Wn, SIGNAL_HOLD_MS as Wo, ITEM_STATES as Wp, verifyAtprotoSignature as Wr, TYPING_TIMEOUT_MS as Ws, GROUP_READ_NOTE as Wt, IDENTITY_PROOF_CAPABILITY as Wu, verifySetUpdate as Wv, deviceLinkPairing as Wx, knockSlotRecords as Wy, groupTypingEpoch as X, readDnsName as XC, CHAT_WATCH_SHARE as XS, handoffCancelFrame as X_, INVITER_DIAL_GRACE_MS as Xa, isImageMime as Xb, appRangeErrorFrame as Xc, DHT_TEXT_BYTES as Xd, validEditMessage as Xf, signalHasVideo as Xg, UNUSED_INVITE_UPKEEP_MS as Xh, SPARK_NETWORKS as Xi, newMailbox as Xl, openSecret as Xm, verifyBitcoinMessage as Xn, MESH_HUBS as Xo, STATUS_CARD_LIMITS as Xp, DID_MAX_LENGTH as Xr, typingActivity as Xs, COMMUNITY_EDIT_FRAME as Xt, IdentityExchange as Xu, ENROLL_HELLO as Xv, newDeviceSetSecret as Xx, readKnockSlot as Xy, GroupTypingBoard as Y, encodeTxtPacket as YC, CHAT_RESERVE_PER_CHAT as YS, handoffBusyFrame as Y_, HANDLED_WAIT_MS as Ya, imageSize as Yb, appRangeEndFrame as Yc, DHT_MESSAGE_TTL as Yd, parseEditedFrame as Yf, sdpHasCandidates as Yg, UNUSED_INVITE_READS_PER_MINUTE as Yh, walletNetworkOf as Yi, isHoldUrl as Yl, openPair as Ym, legacyMessageHash as Yn, GROUP_VERSION_HUBS as Yo, RUN_RESULTS as Yp, DID_JWS_MAX_LENGTH as Yr, sanitizeTypingStatus as Ys, groupMessageId as Yt, IdentityCheckUnavailable as Yu, ENROLL_GRANT as Yv, devicePingFrame as Yx, openRequest as Yy, openGroupTyping as Z, IDENTITY_MEMO_SIZE as ZC, DEFAULT_RELAYS as ZS, handoffContext as Z_, INVITE_TAKEN as Za, parseImageMeta as Zb, appRangeGetFrame as Zc, DHT_TEXT_REFUSED as Zd, validEditNumber as Zf, waitForIceGathering as Zg, UNUSED_INVITE_WAIT_MAX_MS as Zh, SPARK_PROVIDER as Zi, readManifest as Zl, sealPair as Zm, BIP322_REVISION as Zn, NO_HUB_POLICY as Zo, TASK_STATUSES as Zp, DID_METHODS as Zr, typingFrame as Zs, GROUP_EDIT_FRAME as Zt, boundVerifiedIdentity as Zu, ENROLL_PROOF as Zv, signDeviceTransports as Zx, readLinkRecord as Zy, X401_PROTOCOLS as _, WATCH_SHARE as _C, TURN_REV_LIMIT as _S, HANDOFF_ACK as __, LIGHTNING_DESTINATION_PATTERN as _a, isAppLicense as _b, WAKE_CALL_WAIT_MS as _c, emptyProofLedger as _d, downsamplePeaks as _f, PROTOCOL_VERSION as _g, ANSWER_REFUSED_REDIALS as _h, DID_DHT_MAX_PAYLOAD as _i, isAppVersion as _l, receivedTimestamp as _m, encodeGroupMetaBody as _n, parsePaymentNetworks as _o, REACTION_FRAME as _p, u64 as _r, readBeacon as _s, shortHash as _t, recordsName as _u, isHandoffPartName as _v, stripHidden as _w, INVITE_HRP as _x, endedRequests as _y, X401_DCQL_LIMITS as a, HEDGE_MISSING_MS as aC, TURN_VISIBLE_MS as aS, HTTP_SERVICE_PROTO as a_, PUBKY_PROOF_ROOT as aa, APP_CLIENT_NAME as ab, mayPin as ac, receivedIdentityStatus as ad, readDhtFile as af, formatLocalTarget as ag, RATCHET_KEEP_MS as ah, didWebFile as ai, APP_PEER_OPEN_MAX as al, checkStatusCard as am, MENTION_EVERYONE as an, RACE_ANSWERED_MS as ao, linksIn as ap, ByteReader as ar, beaconKeys as as, communityHasFrame as at, WELL_KNOWN_PATH as au, handoffHaveFrames as av, encrypt as aw, createContactLink as ax, enrollProofFrame as ay, buildX401ProofRequest as b, currentRelays as bC, TURN_SLOTS as bS, HANDOFF_BUSY_REASONS as b_, findLightningDestination as ba, pacer as bb, WAKE_SUBJECT as bc, nostrProofTemplate as bd, isPlayableAudioType as bf, encodeChunk as bg, DataLink as bh, DID_DHT_VERSION as bi, readAppFrame as bl, GROUP_ID as bm, groupMetaChange as bn, EngineError as bo, nextReactionNumber as bp, ATPROTO_FULL_SCOPE as br, shouldBeHub as bs, verifyCommunityCommit as bt, wellKnownUrl as bu, readHandoffAck as bv, bytesEqual as bw, INVITE_VERSION as bx, planKnocks as by, readX401DcqlQuery as c, RELAY_REQUESTS_PER_MINUTE as cC, turnPutSummary as cS, SERVICES_VERSION as c_, newPubkyProofFolder as ca, APP_PERMISSIONS as cb, parsePinnedFrame as cc, verifyIdentityPresentation as cd, formatFileSize as cf, resolveTargetUrl as cg, emptyRatchetState as ch, didWebHost as ci, APP_RESUME_GRACE_MS as cl, sameButtonText as cm, mentionsMember as cn, REDESCRIBED_GRACE_MS as co, sanitizePreviewImage as cp, decodeBitcoinAddress as cr, freshHubs as cs, communityUntaggedHash as ct, domainTxtRecord as cu, handoffOfferFrame as cv, tryDecrypt as cw, DEVICE_INVITE_BYTES as cx, readEnrollHello as cy, newX401HolderKey as d, RelaysFailedError as dC, TURN_BODY_BYTES as dS, isValidServiceId as d_, pubkyProofFile as da, appDigest as db, pinNumberHolds as dc, lastSharedWithMe as dd, sanitizeMime as df, viewerResponseHeaders as dg, ratchetOn as dh, parseDidDocument as di, AppSessions as dl, taskProgress as dm, GROUP_META_PAST as dn, SWITCH_RETIRE_MS as do, forwardedMany as dp, encodeTx as dr, lobbyRecords as ds, encodeCommunityLink as dt, isPublicAddress as du, handoffRequestFrame as dv, jpegSize$1 as dw, createDeviceInvite as dx, MAX_DONE as dy, GROUP_BURST_MS as eC, seedSigner as eS, RECORD_TTL as e_, sparkInvoiceDetails as ea, seenEntry as eb, GROUP_PIN_FRAME as ec, identityRevocationValue as ed, emptyDhtDeliveryState as ef, presenceSeenAt as eg, FOLLOW_MS as eh, checkDidSignature as ei, isServeId as el, cardEditNumber as em, communityEditFrame as en, MAX_PAIRED_MESSAGE_FRAME as eo, LINK_PREVIEW_LIMITS as ep, bip322ToSign as er, meshRendezvous as es, COMMUNITY_PROFILE as et, DOMAIN_FILE_MAX_BYTES as eu, handoffDigest as ev, identityFromSeedB64 as ew, canonicalJson as ex, enrollDigits as ey, readX401SdJwtVc as f, SIGNALING_ALLOWANCE_SHARE as fC, TURN_LABEL as fS, isViewerTag as f_, pubkyProofPath as fa, appViewOf as fb, pinnedFrame as fc, PROOF_ADAPTERS as fd, PLAYABLE_AUDIO as ff, webLocalFetch as fg, ratchetOpen as fh, parseDidJws as fi, appCloseFrame as fl, usageLeft as fm, GROUP_META_PAST_CHARS as fn, UNPROVEN_AUTH_MS as fo, readForwarded as fp, encodeWitness as fr, mergeBeacon as fs, leaveStands as ft, nip05RootKey as fu, handoffRetryAfter as fv, sanitizeAvatar as fw, deviceInviteJoinerKeyZ32 as fx, MAX_MISSED as fy, X401_LIMITS as g, TURN_SOURCE_TIMEOUT_MS as gC, TURN_NO_ACTIVE as gS, viewerTag as g_, pubkyHomeserverOf as ga, findAppForbiddenKey as gb, WAKE_CALL_TTL_SECONDS as gc, STORAGE_ROOT as gd, baseMime as gf, MAX_CHUNK_PAYLOAD_BYTES as gg, ratchetUnknownSession as gh, strictBase64Url as gi, chatAppId as gl, heardTime as gm, MAX_GROUP_PICTURE_LENGTH as gn, pairedMessageFrame as go, REACTED_FRAME as gp, u32$1 as gr, rankHubs as gs, rosterHash as gt, recordsFromWellKnown as gu, handoffVersions as gv, sanitizeNick as gw, DEVICE_INVITE_VERSION as gx, clearMissed as gy, X401_HEADERS as h, SLOW_MS as hC, TURN_NAME_BYTES as hS, servicesToWire as h_, homeserverWebEndpoint as ha, checkAppManifest as hb, WAKE_CALL_INTERVAL_MS as hc, STORAGE_LIFETIME as hd, VOICE_METER as hf, LIMITS as hg, ratchetSessionOf as hh, staticDidDocument as hi, appOpenFrame as hl, claimedTime as hm, MAX_GROUP_NAME_LENGTH as hn, pairedMessageFits as ho, QUICK_REACTIONS as hp, txHash as hr, pickHubs as hs, leftStatement as ht, recordsFromTxt as hu, handoffVerifiedMessage as hv, sanitizeDisplayText as hw, readDeviceInvite as hx, REOPEN_BELOW as hy, x401ApprovalDigest as i, GROUP_SIGNALING_ALLOWANCE_SHARE as iC, TURN_SETTLE_MS as iS, parseLinkRecords as i_, PUBKY_PROOF_MAX_BYTES as ia, APP_CLIENTS as ib, PIN_LIMITS as ic, newIdentityBinding as id, dhtFileId as if, HttpHost as ig, RATCHET_HEADER_BYTES as ih, didWebDocumentUrl as ii, APP_FRAME as il, cardUrl as im, validEditText as in, PONG_WAIT_MS as io, linkStop as ip, BitcoinAddressError as ir, COMMUNITY_TOPOLOGY as is, communityGroupId as it, NIP05_PATH as iu, handoffFileRequestFrame as iv, decrypt as iw, CONTACT_LINK_VERSION as ix, enrollMessage as iy, readX401ProofResult as j, DiscoveryBudgetError as jC, signTurnBody as jS, HANDOFF_MANIFEST as j_, cashuRequestPayload as ja, appRevocationId as jb, wakeRequest as jc, ringAuthorization as jd, isPlayableVideoType as jf, parseRtcSignal as jg, symmetricNat as jh, resolveDidDht as ji, SERVICES_CAPABILITY as jl, expectedRoster as jm, parseGroupMetaStatement as jn, groupFileFallback as jo, wireReaction as jp, AtprotoCid as jr, decodeFileData as js, readKnocks as jt, dialDescriptors as ju, readHandoffTurnFrame as jv, utf8Encode as jw, ownInviteRefusal as jx, REQUEST_CLOCK_SKEW_MS as jy, readX401ProofResponse as k, BREAKER_THRESHOLD as kC, readTurnPacket as kS, HANDOFF_LATER_BYTES as k_, findBolt11 as ka, appRef as kb, wakeFrame as kc, verifyPeerProof as kd, VIDEO_LIMITS as kf, extractRtcParams as kg, DirectPathWatch as kh, jwkThumbprint as ki, PIN_CAPABILITY as kl, commitHash as km, parseGroupMetaBody as kn, GROUP_WANT_NO_FRAME as ko, readReaction as kp, parseAtprotoDidDocument as kr, FILE_LIMITS as ks, knockRecords as kt, DHT_TEXT_CAPABILITY as ku, readHandoffPake as kv, toZ32 as kw, inviteQrSegments as kx, MAX_SEEN as ky, x401VpToken as l, REQUESTS_PER_MINUTE as lC, TOMBSTONE_SEQUENCE as lS, decodeServices as l_, normalizePubkyKey as la, APP_SCREENSHOTS_DIR as lb, pinFrame as lc, IDENTITY_TIMELINE_MAX as ld, safeBlobType as lf, sanitizeRequestHeaders as lg, isRatcheted as lh, normalizeDid as li, APP_SEND_LIMIT as ll, statusCardBytes as lm, validMentions as ln, RESUME_WAIT_MS as lo, FORWARD_LIMITS as lp, decodeTx as lr, hubRank as ls, decodeCommunityLink as lt, domainWellKnownFile as lu, handoffPakeFrame as lv, MAX_AVATAR_LENGTH as lw, DEVICE_INVITE_LIFETIME_S as lx, verifyEnrollProof as ly, x401HolderJwk as m, SLOW_DEMOTE_MS as mC, TURN_MAX as mS, servicesFromWire as m_, encodeSvcbPacket as ma, buildAppBundle as mb, DEVICE_WAKE_TTL_SECONDS as mc, PeerProofs as md, VOICE_LIMITS as mf, CHUNK_KIND as mg, ratchetSeal as mh, signingKeys as mi, appDataFrame as ml, arrivalKey as mm, MAX_GROUP_NAME_BYTES as mn, WAKE_LOST_MS as mo, GROUP_REACTION_FRAME as mp, sha256d as mr, newerHead as ms, leaveStatement3 as mt, parseDomainTxt as mu, handoffVerifiedFrame as mv, hasVisible as mw, encodeDeviceInvite as mx, NEW_PER_HOUR as my, X401_RESPONSE_MODES as n, GROUP_OVER_PACE_MS as nC, TURN_PUT_WINDOW_MS as nS, emptyLinkRecords as n_, BITCOIN_NETWORKS as na, APP_BUNDLE_LIMITS as nb, PIN_CLOCK_SKEW_MS as nc, identityStatementText as nd, DHT_FILE_CAPABILITY as nf, GhostlyHttpError as ng, MAX_SKIPPED_KEYS as nh, didJwsAlg as ni, readAppRangeFrame as nl, cardLinkHost as nm, meshMessageRef as nn, PAIRING_ATTEMPT_MS as no, canonicalUrl as np, decodeBase64 as nr, pickMeshHubs as ns, GROUP_READ_NOTE_COMMUNITY as nt, DOMAIN_METHODS as nu, handoffEphemeral as nv, sign as nw, readCanonicalJson as nx, enrollGrantFrame as ny, matchX401Dcql as o, HEDGE_MS as oC, classifyTurnRead as oS, LEGACY_SERVICES as o_, isPubkyKey as oa, APP_FORBIDDEN_KEYS as ob, nextPinNumber as oc, revokesIdentity as od, FileTransfers as of, parseLocalTarget as og, RATCHET_OVERHEAD as oh, didWebFileNames as oi, APP_RATE_LIMIT as ol, readStatusCard as om, MENTION_LIMITS as on, RACE_DIRECT_MS as oo, parseLinkPreview as op, compactSize as or, beaconRecords as os, communityMessageId as ot, decodeDnsResponse as ou, handoffHelloFrame as ov, generateEncryptionKey as ow, encodeContactLink as ox, formatEnrollDigits as oy, sameX401HolderJwk as p, SIGNALING_WINDOW_MS as pC, TURN_LAST_SEQUENCE as pS, serviceIdFromName as p_, decodeSvcbRecords as pa, assembleAppBundle as pb, readPin as pc, PROOF_CAPABILITY as pd, RECORDING_TYPES as pf, CHUNK_FLAG_END as pg, ratchetRoot as ph, parseDidSignaturePaste as pi, appDataBytes as pl, MESSAGE_CLOCK_SKEW_MS as pm, MAX_GROUP_META_BODY as pn, WAKE_ANSWER_GRACE_MS as po, COMMUNITY_REACTION_FRAME as pp, hash160 as pr, mergeLobby as ps, leaveStatement as pt, normalizeDomain as pu, handoffStreamKey as pv, MAX_NICK_LENGTH as pw, deviceInviteJoinerParams as px, MAX_WAITING as py, signAppStore as q, decodeDnsAnswers as qC, CHAT_RESERVE as qS, handoffAttemptFailed as q_, FIRST_PAIRING_PACE_MS as qa, verifyAppStatementBytes as qb, appRangeChunk as qc, DHT_FILE_REFUSED as qd, editedFrame as qf, parseCallSignal as qg, STALLED_LOOK_MS as qh, parsePaymentAmount as qi, HoldKeys as ql, epochKeys as qm, verifySshSignature as qn, groupSignalFrame as qo, REMOVABLE_KINDS as qp, DID_GHOSTLY_SERVICE as qr, parseTypingActivity as qs, chainPieces as qt, IDENTITY_STATEMENT_PREFIX as qu, ENROLL_CANCEL_REASONS as qv, deviceLinkSealKey as qx, makeStampPaced as qy, readX401OpenId4VpRequest as r, GROUP_RATION_WINDOW_MS as rC, TURN_RAISE_READ_TIMEOUT_MS as rS, isEmptyLinkPacket as r_, isBitcoinAddress as ra, APP_BUNDLE_MAGIC as rb, PIN_FRAME as rc, isIdentityBinding as rd, dhtFileElements as rf, HttpClient as rg, RATCHET_CAPABILITY as rh, didSignedMessages as ri, APP_DATA_MAX_BYTES as rl, cardTimeUtc as rm, parseCommunityEdit as rn, PAIRING_RETRY_MS as ro, linkEnd as rp, verifyBip322 as rr, wireHubPolicy as rs, communityCommitHash as rt, DOMAIN_TXT_MAX_BYTES as ru, handoffFileMissingFrame as rv, verify as rw, CONTACT_LINK_BYTES as rx, enrollHelloFrame as ry, presentX401SdJwtVc as s, PREVIOUS_DEFAULT_RELAYS as sC, keptAtEqualSequence as sS, MAX_SERVICES as s_, isPubkyProofFolder as sa, APP_ICON_PATH as sb, parsePinFrame as sc, signIdentityPresentation as sd, PREVIEWABLE_IMAGE as sf, relativizeLocation as sg, RatchetBox as sh, didWebFileUrl as si, APP_RATE_WINDOW_MS as sl, removedCardText as sm, mentionsBytes as sn, RACE_RELAYED_MS as so, previewImageSize as sp, decodeAnyBitcoinAddress as sr, doorHubs as ss, communityRoster as st, dnsProofName as su, handoffManifestFrames as sv, sealedLength as sw, readContactLink as sx, readEnrollGrant as sy, X401_REQUEST_LIMITS as t, GROUP_BURST_ONE_LINK as tC, webCryptoSigner as tS, buildLinkRecords as t_, sparkNetworkOf as ta, stampHolds as tb, PINNED_FRAME as tc, identityStatement as td, peekDhtMailbox as tf, unusedInviteWait as tg, MAX_SKIP as th, didGhostlyServiceEntry as ti, parseAppRangeFrame as tl, cardLine as tm, communityMessageAuthor as tn, PAIRED_FRAME_TOO_LARGE as to, LINK_TRAILING as tp, bip322ToSpend as tr, parseHubPolicy as ts, CommunitySession as tt, DOMAIN_MAX_RECORDS as tu, handoffDoneFrame as tv, publicKeyFromZ32 as tw, canonicalJsonBytes as tx, enrollDoneFrame as ty, X401_CREDENTIAL_LIMITS as u, RelayTransport as uC, TOMBSTONE_TURN as uS, encodeServices as u_, pubkyProofCapability as ua, APP_VIEWS as ub, pinIsNewer as uc, applyIdentityEvent as ud, sanitizeFileName as uf, sanitizeResponseHeaders as ug, ratchetHeard as uh, parseDid as ui, APP_VERSION_MAX as ul, statusCardText as um, wireMentions as un, RTC_UNSTARTED_MS as uo, forwardedAgain as up, decodeWitness as ur, lobbyKeys as us, derivedSecret as ut, encodeDnsQuery as uu, handoffReleaseFrame as uv, MAX_AVATAR_SIDE as uw, DEVICE_INVITE_OWN_DEVICE as ux, FLOOD_PER_DAY as uy, X401_SCHEME as v, WAY_BACK_SHARE as vC, TURN_SEALED_BYTES as vS, HANDOFF_ATTEMPTS as v_, LNURL_LIMITS as va, isAppPath as vb, WAKE_FRAME as vc, importedProof as vd, fileMessageText as vf, decodeChunk as vg, CONNECT_TIMEOUT_MS as vh, DID_DHT_PREFIX as vi, isChatAppId as vl, shownTime as vm, groupDisplayName as vn, publishFailure as vo, REACTION_LIMITS as vp, varBytes as vr, readBeaconHead as vs, signCommunity as vt, txtValue as vu, newHandoffId as vv, trimEndOf as vw, INVITE_LINK_ORIGIN as vx, inboxRecord as vy, decodeX401Header as w, setLinkTraceSink as wC, encodeTurnFields as wS, HANDOFF_DONE as w_, parsePayParams as wa, yieldThread as wb, newWakeToken as wc, storageProof as wd, voiceFileName as wf, DATA_CHANNEL_ID as wg, REANSWERS as wh, didDhtFromPublicKey as wi, CALLS_CAPABILITY as wl, MAX_GROUP_CHAIN as wm, groupMetaToHand as wn, PairingTracker as wo, reactedFrame as wp, atprotoProofRecord as wr, PairedCalls as ws, decodeGroupEntryLink as wt, CAPS_PUBLISH_SPACING_MS as wu, readHandoffDone as wv, fromZ32 as ww, decodeInviteCode as wx, CONTACT_RECORD_TTL as wy, buildX401ProofResult as x, normalizeRelayUrl as xC, TURN_TTL as xS, HANDOFF_CANCEL as x_, invoiceCallbackUrl as xa, readAppBundle as xb, WAKE_TTL_SECONDS as xc, proofCapability as xd, parseVoiceMeta as xf, encodeControl as xg, GATHER_ATTEMPTS as xh, DidDhtError as xi, APPS_CAPABILITY as xl, GROUP_MEMBER_CAP as xm, groupMetaNewer as xn, engineError as xo, parseReactedFrame as xp, ATPROTO_PROOF_COLLECTION as xr, validHead as xs, GROUP_ENTRY_PROFILE as xt, CAPS_ISSUED_BACK_MS as xu, readHandoffBusy as xv, concatBytes as xw, OwnInviteError as xx, settleRequest as xy, X401_VERSION as y, WRITE_FIRST_MS as yC, TURN_SIGNED_BYTES as yS, HANDOFF_BUSY as y_, fetchLnurlJson as ya, isAppUrl as yb, WAKE_INTERVAL_MS as yc, isProofAdapter as yd, formatVoiceDuration as yf, decodeControl as yg, DATA_SETTLE_MS as yh, DID_DHT_TTL as yi, parseAppFrame as yl, GROUP_ADMIN_OFF_ERROR as ym, groupMetaBody as yn, ENGINE_ERRORS as yo, ReactionWindow as yp, ATPROTO_DECLARED_SCOPE as yr, readLobby as ys, verifyCommunityChain as yt, validDomainRecord as yu, openHandoffPiece as yv, unwrapPasted as yw, INVITE_MAX_LENGTH as yx, newInbox as yy, planAppUpdate as z, RELAY_PAYLOAD_MAX_BYTES as zC, turnReleaseMessage as zS, HANDOFF_VERIFIED as z_, BLOCKED_DIAL_WAIT_MS as za, readAppRevocationShape as zb, vapidAuthorization as zc, automaticTransport as zd, EDIT_RECEIVE_LIMIT as zf, callSignalHeardAt as zg, MAX_DHT_TEXT_BYTES as zh, TEST_USDT_FAUCET_AMOUNT as zi, sessionCapabilitiesFrame as zl, verifyCommit as zm, SSH_PUBLIC_KEY_MAX as zn, GROUP_SIGNAL_FRAME as zo, wireReply as zp, parseAtprotoDidKey as zr, TYPING_RATE_LIMIT as zs, groupWakes as zt, IDENTITY_FRAME_WINDOW_MS as zu, readSetUpdate as zv, HANDOFF_CAPABILITY as zx, STAMP_BITS_MIN as zy };
38513
+ export { COMMUNITY_LIMITS as $, createRelayPayload as $C, turnSequence as $S, HANDOFF_WINDOW as $_, DEMOTE_MS as $a, readAppSignature as $b, APP_RANGE_LIMITS as $c, rankTransports as $d, MAX_REMOVAL_NUMBER as $f, contactRtcConfig as $g, OFFER_LOOK_MS as $h, isSparkAddress as $i, HOLD_CAPABILITY as $l, GROUP_PROFILE as $m, MessageRefusal as $n, SIGNAL_HOLD_MS as $o, BUTTON_STYLES as $p, DidError as $r, TYPING_TIMEOUT_MS as $s, GROUP_EDIT_TEXT_BYTES as $t, IDENTITY_PROOF_CAPABILITY as $u, setUpdateFrame as $v, deviceEchoFrame as $x, knockHolds as $y, readX401ProofResponseHeader as A, WATCH_SHARE as AC, TURN_REV_LIMIT as AS, HANDOFF_ATTEMPTS as A_, findBolt11 as Aa, isAppPath as Ab, WAKE_TTL_SECONDS as Ac, proofCapability as Ad, formatVoiceDuration as Af, decodeChunk as Ag, CONNECT_TIMEOUT_MS as Ah, jwkThumbprint as Ai, APPS_CAPABILITY as Al, shownTime as Am, parseGroupMetaBody as An, engineError as Ao, ReactionWindow as Ap, parseAtprotoDidDocument as Ar, validHead as As, knockRecords as At, CAPS_ISSUED_BACK_MS as Au, newHandoffId as Av, stripHidden as Aw, INVITE_HRP as Ax, inboxRecord as Ay, APP_STORE_KINDS as B, BREAKER_BASE_MS as BC, openTurnValue as BS, HANDOFF_HELLO as B_, withoutVideoMetadata as Ba, appFingerprint as Bb, wakeRequest as Bc, ringAuthorization as Bd, VIDEO_LIMITS as Bf, buildDataSdp as Bg, DIRECT_PEERS as Bh, TEST_USDT_FAUCET_AMOUNT as Bi, SERVICES_CAPABILITY as Bl, SAID_AGAIN as Bm, SSH_PUBLIC_KEY_MAX as Bn, groupFileFallback as Bo, readReaction as Bp, parseAtprotoDidKey as Br, decodeFileData as Bs, groupWakes as Bt, dialDescriptors as Bu, readHandoffManifest as Bv, toBase64 as Bw, inviteLink as Bx, LINK_RECORD_LABEL as By, buildX401TokenObject as C, RelayTransport as CC, TOMBSTONE_TURN as CS, isValidServiceId as C_, parseInvoiceCallback as Ca, appDigest as Cb, DEVICE_WAKE_TTL_SECONDS as Cc, PeerProofs as Cd, PLAYABLE_AUDIO as Cf, viewerResponseHeaders as Cg, ratchetOn as Ch, decodeDidDhtPacket as Ci, appDataFrame as Cl, taskProgress as Cm, groupMetaPicture as Cn, WAKE_LOST_MS as Co, readForwarded as Cp, ATPROTO_PROOF_SCOPE as Cr, newerHead as Cs, KNOCK_TTL_MS as Ct, parseDomainTxt as Cu, handoffRequestFrame as Cv, MAX_AVATAR_SIDE as Cw, DEVICE_INVITE_OWN_DEVICE as Cx, MAX_DONE as Cy, readX401ProofRequest as D, SLOW_DEMOTE_MS as DC, TURN_MAX as DS, servicesToWire as D_, resolveLightningDestination as Da, checkAppManifest as Db, WAKE_FRAME as Dc, importedProof as Dd, baseMime as Df, LIMITS as Dg, ratchetSessionOf as Dh, didDhtRecords as Di, isChatAppId as Dl, claimedTime as Dm, keepPastGroupMeta as Dn, publishFailure as Do, REACTED_FRAME as Dp, checkAtprotoProofRecord as Dr, readBeaconHead as Ds, entryParams as Dt, txtValue as Du, handoffVerifiedMessage as Dv, hasVisible as Dw, encodeDeviceInvite as Dx, REOPEN_BELOW as Dy, isX401Protocol as E, SIGNALING_WINDOW_MS as EC, TURN_LAST_SEQUENCE as ES, servicesFromWire as E_, requestLnurlInvoice as Ea, buildAppBundle as Eb, WAKE_CALL_WAIT_MS as Ec, emptyProofLedger as Ed, VOICE_METER as Ef, CHUNK_KIND as Eg, ratchetSeal as Eh, didDhtKey as Ei, isAppVersion as El, arrivalKey as Em, groupName as En, parsePaymentNetworks as Eo, QUICK_REACTIONS as Ep, atprotoProofRkey as Er, readBeacon as Es, encodeGroupEntryLink as Et, recordsName as Eu, handoffVerifiedFrame as Ev, MAX_NICK_LENGTH as Ew, deviceInviteJoinerParams as Ex, NEW_PER_HOUR as Ey, appRevocationFor as F, readRelayBody as FC, TURN_VERSION as FS, HANDOFF_DATA as F_, isFederationId as Fa, sha256Paced as Fb, readWake as Fc, storageProofPath as Fd, voiceFileName as Ff, wrapDataChannel as Fg, OFFER_HOST_GATHER_MS as Fh, EVM_TEST_CHAINS as Fi, FILES_BINARY_CAPABILITY as Fl, LEGACY_GROUP_MEMBERS as Fm, verifyGroupMetaSignature as Fn, GROUP_HAVE_FRAME as Fo, reactedFrame as Fp, decodeAtprotoCommit as Fr, ChatFiles as Fs, GROUP_WAKE_GROUP_WINDOW_MS as Ft, CapsExchange as Fu, readHandoffData as Fv, fromBase64 as Fw, createChatInvite as Fx, turnOff as Fy, readAppStore as G, budgetRetryMs as GC, signTurnPacket as GS, HANDOFF_PAKE as G_, withoutPictureMetadata as Ga, checkAppRevokeStatement as Gb, encryptPushPayload as Gc, verifyRingEvidence as Gd, EDITED_FRAME as Gf, CALL_SIGNAL_MAX_AGE_MS as Gg, DEPARTED_READ_MS as Gh, assertWholeSats as Gi, UPGRADE_CAPABILITY as Gl, rememberAlone as Gm, sshFingerprint as Gn, readGroupWantNo as Go, REPLY_LIMITS as Gp, verifyAtprotoSignature as Gr, transferStalled as Gs, GROUP_READ_NOTE as Gt, IDENTITY_CHECK_UNAVAILABLE as Gu, sameDigest as Gv, __commonJSMin as Gw, pastedAgain as Gx, REQUEST_LIFETIME_MS as Gy, checkAppListing as H, BREAKER_THRESHOLD as HC, readTurnPacket as HS, HANDOFF_LIST_PER_FRAME as H_, PICTURE_METADATA_LIMITS as Ha, appRefPublisher as Hb, WebPushError as Hc, ringEvidence as Hd, isPlayableVideoType as Hf, offerIsFresh as Hg, directBlocked as Hh, WALLET_NETWORKS as Hi, STATUS_CARD_CAPABILITY as Hl, commitUntaggedHash as Hm, parseSshPublicKey as Hn, readGroupFileMeta as Ho, wireReaction as Hp, readAtprotoCid as Hr, refusalText as Hs, parseGroupWakeFrame as Ht, encodePacketTransports as Hu, readHandoffRelease as Hv, toZ32 as Hw, inviteQrSegments as Hx, MAX_SLOT_KNOCKS as Hy, appStoreDecision as I, relayUrlProblem as IC, TurnRecordError as IS, HANDOFF_DONE as I_, parseCashuRequestPayload as Ia, yieldThread as Ib, readWakePayload as Ic, validExternalKey as Id, voiceLevel as If, DATA_CHANNEL_ID as Ig, REANSWERS as Ih, ONCHAIN_PROVIDER as Ii, FILES_CAPABILITY as Il, MAX_GROUP_CHAIN as Im, wrapGroupMeta as In, GROUP_VERSION_FILES as Io, reactionEmoji as Ip, decodeDagCbor as Ir, FILE_DATA_KIND as Is, GROUP_WAKE_MEMBER_INTERVAL_MS as It, CapsKeys as Iu, readHandoffDone as Iv, fromBase64Url as Iw, createLink as Ix, CONTACT_RECORD_TTL as Iy, GROUP_TYPING_FRAME as J, withRequestOptions as JC, turnKeys as JS, HANDOFF_RELEASE as J_, BLOCKED_DIAL_WAIT_MS as Ja, isAppRef as Jb, vapidAuthorization as Jc, TRANSPORTS as Jd, EDIT_FRAME as Jf, answersOffer as Jg, FIRST_PUBLISH_MAX_MS as Jh, parsePaymentAmount as Ji, sessionCapabilitiesFrame as Jl, signCommit as Jm, verifySshSignature as Jn, GROUP_SIGNAL_FRAME as Jo, readReply as Jp, DID_GHOSTLY_SERVICE as Jr, TYPING_RATE_LIMIT as Js, chainPieces as Jt, IDENTITY_FRAME_WINDOW_MS as Ju, SET_ACK as Jv, __require as Jw, DEVICE_CAPABILITIES as Jx, REQUEST_TEXT_BYTES as Jy, readAppStoreSteps as K, heldBackError as KC, signTurnRelease as KS, HANDOFF_PIECE_BYTES as K_, ANSWERS_REFUSED_PAUSES as Ka, isAppHash as Kb, generateVapidKeys as Kc, RELAY_URL as Kd, EDIT_BUFFER_MAX as Kf, PAIRED_CALL_CANDIDATES as Kg, DHT_POLL_INTERVALS as Kh, formatPaymentAmount as Ki, WAKE_SESSION_CAPABILITY as Kl, rosterAdmin as Km, sshKeyDigestHex as Kn, CARRIED_DEFER_MS as Ko, groupReplyAuthor as Kp, DID_DOCUMENT_MAX_BYTES as Kr, TYPING_FRAME as Ks, GroupSession as Kt, IDENTITY_CLOCK_SKEW as Ku, sealHandoffPiece as Kv, __esmMin as Kw, readInviteCode as Kx, REQUEST_NAME_UNITS as Ky, appUpdateDecision as L, setLinkTraceSink as LC, encodeTurnFields as LS, HANDOFF_FILE_MISSING as L_, parseFedimintRequestPayload as La, APP_NAME as Lb, relayRequest as Lc, verifyNostrProof as Ld, voiceLevelsOf as Lf, DATA_CHANNEL_LABEL as Lg, STALLED_EVIDENCE_MS as Lh, PaymentPreflightError as Li, KNOWN_SESSION_CAPABILITIES as Ll, MAX_GROUP_MEMBERS as Lm, SSHSIG_MAX_ARMOR as Ln, GROUP_WANT_FRAME as Lo, reactionFrame as Lp, encodeDagCbor as Lr, FILE_FRAMES as Ls, GROUP_WAKE_RECEIVE_LIMIT as Lt, CapsRefusedError as Lu, readHandoffFileFrame as Lv, fromZ32 as Lw, decodeInviteCode as Lx, ContactRequestError as Ly, readX401ProofResultHeader as M, WRITE_FIRST_MS as MC, TURN_SIGNED_BYTES as MS, HANDOFF_BUSY_REASONS as M_, cashuRequestPayload as Ma, pacer as Mb, deviceWakeRequest as Mc, proofStatement as Md, parseVoiceMeta as Mf, encodeChunk as Mg, DataLink as Mh, resolveDidDht as Mi, BUTTONS_CAPABILITY as Ml, GROUP_ID as Mm, parseGroupMetaStatement as Mn, parseEngineError as Mo, parseReactedFrame as Mp, AtprotoCid as Mr, PAIRED_CALL_FRAME as Ms, readKnocks as Mt, CAPS_LIMITS as Mu, readHandoffAck as Mv, unwrapPasted as Mw, INVITE_MAX_LENGTH as Mx, planKnocks as My, x401AnswerableRequests as N, currentRelays as NC, TURN_SLOTS as NS, HANDOFF_CANCEL as N_, fedimintRequestPayload as Na, readAppBundle as Nb, newWakeToken as Nc, storageProof as Nd, recordingMime as Nf, encodeControl as Ng, GATHER_ATTEMPTS as Nh, signDidDhtPacket as Ni, CALLS_CAPABILITY as Nl, GROUP_MEMBER_CAP as Nm, parseGroupMetaTag as Nn, PairingTracker as No, parseReactionFrame as Np, AtprotoProofError as Nr, PairedCalls as Ns, GROUP_WAKE_FRAME as Nt, CAPS_PUBLISH_SPACING_MS as Nu, readHandoffBusy as Nv, bytesEqual as Nw, INVITE_VERSION as Nx, settleRequest as Ny, readX401ProofRequestHeader as O, SLOW_MS as OC, TURN_NAME_BYTES as OS, viewerTag as O_, BOLT11_PATTERN as Oa, findAppForbiddenKey as Ob, WAKE_INTERVAL_MS as Oc, isProofAdapter as Od, downsamplePeaks as Of, MAX_CHUNK_PAYLOAD_BYTES as Og, ratchetUnknownSession as Oh, encodeDidDhtDeactivated as Oi, parseAppFrame as Ol, heardTime as Om, nextGroupMetaRevision as On, ENGINE_ERRORS as Oo, REACTION_FRAME as Op, isAtprotoDid as Or, readLobby as Os, groupEntryUrl as Ot, validDomainRecord as Ou, handoffVersions as Ov, sanitizeDisplayText as Ow, readDeviceInvite as Ox, clearMissed as Oy, addedAppPermissions as P, normalizeRelayUrl as PC, TURN_TTL as PS, HANDOFF_CANCEL_REASONS as P_, findEndpoint as Pa, readAppBundleAsync as Pb, parseWakeFrame as Pc, storageProofBody as Pd, voiceDownloadName as Pf, sendBody as Pg, GATHER_STALL_MS as Ph, ETHEREUM_USDT as Pi, EDIT_CAPABILITY as Pl, GROUP_VERSION_LARGE as Pm, signGroupMeta as Pn, GROUP_FILE_LIMITS as Po, queueReaction as Pp, atprotoCidFor as Pr, parsePairedCallFrame as Ps, GROUP_WAKE_GROUP_LIMIT as Pt, CAPS_REFRESH_MS as Pu, readHandoffCancel as Pv, concatBytes as Pw, OwnInviteError as Px, takeRequest as Py, sealGroupTyping as Q, RELAY_PAYLOAD_MAX_BYTES as QC, turnReleaseMessage as QS, HANDOFF_VERSION as Q_, DEMOTE_AFTER_FAILURES as Qa, readAppRevocations as Qb, APP_RANGE_FRAMES as Qc, irohRelayUrl as Qd, MAX_EDITS_PER_MESSAGE as Qf, compressSdp as Qg, OFFER_FAST_MS as Qh, SPARK_PROVIDER as Qi, SESSION_RECEIVE_PENDING as Ql, verifyCommitSignature as Qm, BIP322_REVISION as Qn, SIGNAL_FRESH_MS as Qo, BUTTON_ID as Qp, DID_METHODS as Qr, TYPING_STATUS_MAX as Qs, GROUP_EDIT_FRAME as Qt, IDENTITY_MAX_VALIDITY as Qu, setAckFrame as Qv, HANDOFF_CAPABILITY as Qx, contactDay as Qy, checkAppBeforeRun as R, traceLink as RC, firstDeviceSetSecret as RS, HANDOFF_FILE_REQUEST as R_, NO_VIDEO_METADATA as Ra, APP_PREFIXES as Rb, wakeFrame as Rc, verifyPeerProof as Rd, voicePeaksOf as Rf, RTC_SIGNAL_FUTURE_MS as Rg, DIRECT_EVIDENCE_MS as Rh, SEPOLIA_TEST_USDT as Ri, PIN_CAPABILITY as Rl, MEMBER_KEY as Rm, SSHSIG_NAMESPACE as Rn, GROUP_WANT_NO_FRAME as Ro, reactionIsNewer as Rp, findInMst as Rr, FILE_LIMITS as Rs, GroupWakeLimiter as Rt, DHT_TEXT_CAPABILITY as Ru, readHandoffHave as Rv, isZ32Key as Rw, encodeGhostlyInvite as Rx, KNOCK_SLOTS as Ry, buildX401ResultArtifact as S, REQUESTS_PER_MINUTE as SC, TOMBSTONE_SEQUENCE as SS, encodeServices as S_, invoiceCallbackUrl as Sa, APP_VIEWS as Sb, readPin as Sc, PROOF_CAPABILITY as Sd, sanitizeMime as Sf, sanitizeResponseHeaders as Sg, ratchetHeard as Sh, DidDhtError as Si, appDataBytes as Sl, statusCardText as Sm, groupMetaNewer as Sn, WAKE_ANSWER_GRACE_MS as So, forwardedMany as Sp, ATPROTO_PROOF_COLLECTION as Sr, mergeLobby as Ss, GROUP_ENTRY_PROFILE as St, normalizeDomain as Su, handoffReleaseFrame as Sv, MAX_AVATAR_LENGTH as Sw, DEVICE_INVITE_LIFETIME_S as Sx, FLOOD_PER_DAY as Sy, encodeX401Header as T, SIGNALING_ALLOWANCE_SHARE as TC, TURN_LABEL as TS, serviceIdFromName as T_, parsePayParams as Ta, assembleAppBundle as Tb, WAKE_CALL_TTL_SECONDS as Tc, STORAGE_ROOT as Td, VOICE_LIMITS as Tf, CHUNK_FLAG_END as Tg, ratchetRoot as Th, didDhtFromPublicKey as Ti, chatAppId as Tl, MESSAGE_CLOCK_SKEW_MS as Tm, groupMetaToHand as Tn, pairedMessageFrame as To, GROUP_REACTION_FRAME as Tp, atprotoProofRecord as Tr, rankHubs as Ts, decodeGroupEntryLink as Tt, recordsFromWellKnown as Tu, handoffStreamKey as Tv, sanitizeAvatar as Tw, deviceInviteJoinerKeyZ32 as Tx, MAX_WAITING as Ty, checkAppStoreIndex as U, RelayBreaker as UC, sealTurnBody as US, HANDOFF_MANIFEST as U_, isStrippedPicture as Ua, appRevocationId as Ub, checkPushEndpoint as Uc, validRingKey as Ud, isVideoMime as Uf, parseRtcSignal as Ug, symmetricNat as Uh, arkAddressPrefix as Ui, SessionCapabilities as Ul, expectedRoster as Um, parseSshSignature as Un, readGroupHave as Uo, PAIRED_REPLY_AUTHORS as Up, unsignedCommitBytes as Ur, sentWhole as Us, GROUP_LIMITS as Ut, parsePacketTransports as Uu, readHandoffTurnFrame as Uv, utf8Decode as Uw, inviteQrText as Ux, REQUEST_CLOCK_SKEW_MS as Uy, APP_STORE_LIMITS as V, BREAKER_MAX_MS as VC, readTurnBody as VS, HANDOFF_LATER_BYTES as V_, NO_PICTURE_METADATA as Va, appRef as Vb, PUSH_SERVICE_HOSTS as Vc, ringClaims as Vd, formatVideoDuration as Vf, extractRtcParams as Vg, DirectPathWatch as Vh, USDT_PUBLIC_RPC as Vi, SESSION_CAPABILITIES_FRAME as Vl, commitHash as Vm, SshSigError as Vn, isGroupMessageId as Vo, validReactionNumber as Vp, parseAtprotoVerificationKey as Vr, encodeFileData as Vs, mentionedMembers as Vt, emptyCapsState as Vu, readHandoffPake as Vv, toBase64Url as Vw, inviteOwnership as Vx, MAX_SEEN as Vy, readAppListing as W, DiscoveryBudgetError as WC, signTurnBody as WS, HANDOFF_OFFER as W_, stripPictureMetadata as Wa, appSignedBytes as Wb, decryptPushPayload as Wc, verifyRingAuthorization as Wd, parseVideoMeta as Wf, CALL_SIGNAL_FUTURE_MS as Wg, AWAITING_PEER_MS as Wh, assertTokenUnits as Wi, TYPING_CAPABILITY as Wl, parseGroupCommit as Wm, sameSshKey as Wn, readGroupWant as Wo, REPLY_ID as Wp, verifyAtprotoRecordProof as Wr, transferEnded as Ws, GROUP_REACTED_FRAME as Wt, IDENTITY_CHALLENGE_WINDOW as Wu, readHandoffVerified as Wv, utf8Encode as Ww, ownInviteRefusal as Wx, REQUEST_LABEL as Wy, groupTypingEpoch as X, PKARR_FUTURE_SKEW_MS as XC, turnPacket as XS, HANDOFF_TIMINGS as X_, CROSSED_PROBE_MS as Xa, readAppRevocation as Xb, APP_RANGE_DATA_KIND as Xc, checkedDescriptors as Xd, EDIT_RECEIVE_LIMIT as Xf, callRtcConfig as Xg, LinkSession as Xh, walletNetworkOf as Xi, PairedSession as Xl, verifyChain as Xm, legacyMessageHash as Xn, SIGNALS_PER_MINUTE as Xo, wireReply as Xp, DID_JWS_MAX_LENGTH as Xr, TYPING_REFRESH_MS as Xs, groupMessageId as Xt, IDENTITY_MAX_FRAME as Xu, encodeSetSlots as Xv, DEVICE_PING_FRAME as Xx, STAMP_BITS_MAX as Xy, GroupTypingBoard as Y, MAX_DNS_PACKET_BYTES as YC, turnName as YS, HANDOFF_REQUEST as Y_, CROSSED_FRESH_MS as Ya, isAppSignature as Yb, vapidKeysMatch as Yc, automaticTransport as Yd, EDIT_RATE_WINDOW_MS as Yf, buildSdpFromSignal as Yg, IDLE_THRESHOLD as Yh, validatePaymentTarget as Yi, PAIRED_PROFILE as Yl, sortRoster as Ym, isLegacySignature as Yn, GROUP_VERSION_SIGNALS as Yo, replySnippet as Yp, DID_JWS_ALGS as Yr, TYPING_RATE_WINDOW_MS as Ys, frameBytes as Yt, IDENTITY_MAX_EVIDENCE as Yu, SET_UPDATE as Yv, __toCommonJS as Yw, DEVICE_ECHO_FRAME as Yx, STAMP_BITS_DEFAULT as Yy, openGroupTyping as Z, PacketTooLargeError as ZC, turnPayloadSequence as ZS, HANDOFF_VERIFIED as Z_, CROSSED_WAIT_MS as Za, readAppRevocationShape as Zb, APP_RANGE_ERRORS as Zc, irohDescriptor as Zd, EDIT_SEND_LIMIT as Zf, callSignalHeardAt as Zg, MAX_DHT_TEXT_BYTES as Zh, SPARK_NETWORKS as Zi, SESSION_FRAME_MAX as Zl, verifyCommit as Zm, verifyBitcoinMessage as Zn, SIGNAL_CARRIERS as Zo, ACTIVE_TASK_STATUSES as Zp, DID_MAX_LENGTH as Zr, TYPING_SEND_LIMIT as Zs, COMMUNITY_EDIT_FRAME as Zt, IDENTITY_MAX_RECEIVED as Zu, readSetUpdate as Zv, ENROLL_CAPABILITY as Zx, STAMP_BITS_MIN as Zy, X401_PROTOCOLS as _, GROUP_SIGNALING_ALLOWANCE_SHARE as _C, TURN_SETTLE_MS as _S, HTTP_SERVICE_PROTO as __, pubkyHomeserverOf as _a, APP_CLIENT_NAME as _b, parsePinnedFrame as _c, verifyIdentityPresentation as _d, FileTransfers as _f, formatLocalTarget as _g, RATCHET_KEEP_MS as _h, strictBase64Url as _i, APP_RESUME_GRACE_MS as _l, checkStatusCard as _m, MAX_GROUP_PICTURE_LENGTH as _n, REDESCRIBED_GRACE_MS as _o, parseLinkPreview as _p, u32$1 as _r, freshHubs as _s, shortHash as _t, domainTxtRecord as _u, handoffHaveFrames as _v, decrypt as _w, CONTACT_LINK_VERSION as _x, enrollProofFrame as _y, X401_DCQL_LIMITS as a, BACKGROUND_WRITES_SHARE as aC, deviceLinkRendezvousSeed as aS, parseCallSignal as a_, PUBKY_PROOF_MAX_BYTES as aa, makeStampPaced as ab, typingActivity as ac, IdentityExchange as ad, DHT_FILE_TOO_LARGE as af, STALLED_LOOK_MS as ag, epochKeys as ah, didWebDocumentUrl as ai, appRangeErrorFrame as al, ROUTINE_STATES as am, validEditText as an, INVITER_DIAL_GRACE_MS as ao, parseEditFrame as ap, BitcoinAddressError as ar, MESH_HUBS as as, communityHasFrame as at, newMailbox as au, handoffAttemptFailed as av, signRelayPayload as aw, verifyAppStatementBytes as ax, ENROLL_CANCEL_REASONS as ay, buildX401ProofRequest as b, PREVIOUS_DEFAULT_RELAYS as bC, keptAtEqualSequence as bS, SERVICES_VERSION as b_, fetchLnurlJson as ba, APP_PERMISSIONS as bb, pinNumberHolds as bc, lastSharedWithMe as bd, safeBlobType as bf, resolveTargetUrl as bg, emptyRatchetState as bh, DID_DHT_TTL as bi, AppSessions as bl, sameButtonText as bm, groupMetaBody as bn, SWITCH_RETIRE_MS as bo, FORWARD_LIMITS as bp, ATPROTO_DECLARED_SCOPE as br, lobbyRecords as bs, verifyCommunityChainPaced as bt, isPublicAddress as bu, handoffOfferFrame as bv, sealedLength as bw, readContactLink as bx, readEnrollHello as by, readX401DcqlQuery as c, CHAT_RESERVE_PER_CHAT as cC, devicePingFrame as cS, signalHasVideo as c_, isPubkyProofFolder as ca, readKnockSlot as cb, COMMUNITY_PIN_FRAME as cc, identityPresentationBytes as cd, DHT_TEXT_REFUSED as cf, UNUSED_INVITE_UPKEEP_MS as cg, openSecret as ch, didWebFileUrl as ci, encodeAppRangeData as cl, TASK_STATUSES as cm, mentionsBytes as cn, LIVENESS_PING_MS as co, validEditNumber as cp, decodeAnyBitcoinAddress as cr, meshHubs as cs, communityUntaggedHash as ct, DNS_TYPE as cu, handoffCancelFrame as cv, encodeTxtPacket as cw, imageSize as cx, ENROLL_HELLO as cy, newX401HolderKey as d, DEPARTED_READS as dC, unsignedDeviceTransports as dS, MAX_MSGS_PAYLOAD_B64 as d_, pubkyProofCapability as da, requestRecords as db, PIN_CLOCK_SKEW_MS as dc, identityStatementText as dd, emptyDhtDeliveryState as df, countUnusedInvite as dg, sha256Hex as dh, parseDid as di, readAppRangeFrame as dl, buttonLabelClash as dm, wireMentions as dn, PAIRING_ATTEMPT_MS as do, LINK_PREVIEW_LIMITS as dp, decodeWitness as dr, pickMeshHubs as ds, encodeCommunityLink as dt, DOMAIN_METHODS as du, handoffDataFrame as dv, createIdentity as dw, previewable as dx, enrollCancelReason as dy, turnSignedMessage as eC, deviceEchoNonce as eS, decompressSdp as e_, sparkAddressKind as ea, knockSlotIdentity as eb, TypingReceiver as ec, IDENTITY_PROVIDER_ID as ed, relayUrl as ef, OFFER_STEP_MAX as eg, confirmationMatches as eh, checkDidJws as ei, AppRanges as el, CRON_LINE as em, carryMentions as en, DHT_PIN_GRACE_MS as eo, REMOVED_TEXT as ep, bip322MessageHash as er, SIGNAL_PROVEN_MS as es, COMMUNITY_PROFILE as et, HOLD_DATED_BACK_MS as eu, NO_ATTEMPTS as ev, measureRecords as ew, setAppSignatureFastPath as ex, setUpdateMessage as ey, readX401SdJwtVc as f, FRESH_READ_MS as fC, verifyDeviceTransports as fS, RECORD_TTL as f_, pubkyProofFile as fa, seenEntry as fb, PIN_FRAME as fc, isIdentityBinding as fd, peekDhtMailbox as ff, presenceSeenAt as fg, FOLLOW_MS as fh, parseDidDocument as fi, APP_DATA_MAX_BYTES as fl, cardEditNumber as fm, GROUP_META_PAST as fn, PAIRING_RETRY_MS as fo, LINK_TRAILING as fp, encodeTx as fr, wireHubPolicy as fs, leaveStands as ft, DOMAIN_TXT_MAX_BYTES as fu, handoffDigest as fv, identityFromSeed as fw, readImageMeta as fx, enrollDigits as fy, X401_LIMITS as g, GROUP_RATION_WINDOW_MS as gC, TURN_RAISE_READ_TIMEOUT_MS as gS, parseLinkRecords as g_, homeserverWebEndpoint as ga, APP_CLIENTS as gb, parsePinFrame as gc, signIdentityPresentation as gd, readDhtFile as gf, HttpHost as gg, RATCHET_HEADER_BYTES as gh, staticDidDocument as gi, APP_RATE_WINDOW_MS as gl, cardUrl as gm, MAX_GROUP_NAME_LENGTH as gn, RACE_RELAYED_MS as go, linksIn as gp, txHash as gr, doorHubs as gs, rosterHash as gt, dnsProofName as gu, handoffFileRequestFrame as gv, verify as gw, CONTACT_LINK_BYTES as gx, enrollMessage as gy, X401_HEADERS as h, GROUP_OVER_PACE_MS as hC, TURN_PUT_WINDOW_MS as hS, isEmptyLinkPacket as h_, encodeSvcbPacket as ha, APP_BUNDLE_MAGIC as hb, nextPinNumber as hc, revokesIdentity as hd, dhtFileId as hf, HttpClient as hg, RATCHET_CAPABILITY as hh, signingKeys as hi, APP_RATE_LIMIT as hl, cardTimeUtc as hm, MAX_GROUP_NAME_BYTES as hn, RACE_DIRECT_MS as ho, linkStop as hp, sha256d as hr, beaconRecords as hs, leftStatement as ht, decodeDnsResponse as hu, handoffFileMissingFrame as hv, sign as hw, readCanonicalJson as hx, enrollHelloFrame as hy, x401ApprovalDigest as i, BACKGROUND_WHILE_SIGNALING as iC, deviceLinkParams as iS, keepsToRelays as i_, isBitcoinAddress as ia, makeStamp as ib, sanitizeTypingStatus as ic, IdentityCheckUnavailable as id, DHT_FILE_REFUSED as if, SIGNAL_OUT_READS as ig, encryptText as ih, didSignedMessages as ii, appRangeEndFrame as il, REMOVABLE_KINDS as im, parseCommunityEdit as in, HANDLED_WAIT_MS as io, editedFrame as ip, verifyBip322 as ir, GROUP_VERSION_HUBS as is, communityGroupId as it, isHoldUrl as iu, handoffAttemptAllowed as iv, readOwnRelayPayload as iw, verifyAppSignature as ix, ENROLL_CANCEL as iy, readX401ProofResult as j, WAY_BACK_SHARE as jC, TURN_SEALED_BYTES as jS, HANDOFF_BUSY as j_, ENDPOINT as ja, isAppUrl as jb, WakeLimiter as jc, proofHash as jd, isPlayableAudioType as jf, decodeControl as jg, DATA_SETTLE_MS as jh, openDidDhtPayload as ji, APP_RANGES_CAPABILITY as jl, GROUP_ADMIN_OFF_ERROR as jm, parseGroupMetaFrame as jn, engineText as jo, nextReactionNumber as jp, shortAtprotoDid as jr, MAX_PAIRED_CALL_SIGNAL as js, mergeKnocks as jt, CAPS_LABEL as ju, openHandoffPiece as jv, trimEndOf as jw, INVITE_LINK_ORIGIN as jx, newInbox as jy, readX401ProofResponse as k, TURN_SOURCE_TIMEOUT_MS as kC, TURN_NO_ACTIVE as kS, HANDOFF_ACK as k_, decodeBolt11 as ka, isAppLicense as kb, WAKE_SUBJECT as kc, nostrProofTemplate as kd, fileMessageText as kf, PROTOCOL_VERSION as kg, ANSWER_REFUSED_REDIALS as kh, encodeDidDhtPacket as ki, readAppFrame as kl, receivedTimestamp as km, openGroupMeta as kn, EngineError as ko, REACTION_LIMITS as kp, normalizeAtprotoHandle as kr, shouldBeHub as ks, knockIdentity as kt, wellKnownUrl as ku, isHandoffPartName as kv, sanitizeNick as kw, DEVICE_INVITE_VERSION as kx, endedRequests as ky, x401VpToken as l, CHAT_WATCH_SHARE as lC, newDeviceSetSecret as lS, waitForIceGathering as l_, newPubkyProofFolder as la, readLinkRecord as lb, GROUP_PIN_FRAME as lc, identityRevocationValue as ld, DhtDelivery as lf, UNUSED_INVITE_WAIT_MAX_MS as lg, sealPair as lh, didWebHost as li, isServeId as ll, appCardId as lm, mentionsMember as ln, MAX_PAIRED_MESSAGE_FRAME as lo, validRemovalNumber as lp, decodeBitcoinAddress as lr, meshRendezvous as ls, decodeCommunityLink as lt, DOMAIN_FILE_MAX_BYTES as lu, handoffContext as lv, readDnsName as lw, isImageMime as lx, ENROLL_PROOF as ly, x401HolderJwk as m, GROUP_BURST_ONE_LINK as mC, webCryptoSigner as mS, emptyLinkRecords as m_, decodeSvcbRecords as ma, APP_BUNDLE_LIMITS as mb, mayPin as mc, receivedIdentityStatus as md, dhtFileElements as mf, GhostlyHttpError as mg, MAX_SKIPPED_KEYS as mh, parseDidSignaturePaste as mi, APP_PEER_OPEN_MAX as ml, cardLinkHost as mm, MAX_GROUP_META_BODY as mn, RACE_ANSWERED_MS as mo, linkEnd as mp, hash160 as mr, beaconKeys as ms, leaveStatement3 as mt, WELL_KNOWN_PATH as mu, handoffEphemeral as mv, publicKeyFromZ32 as mw, canonicalJsonBytes as mx, enrollGrantFrame as my, X401_RESPONSE_MODES as n, turnVerifierMark as nC, deviceKeyZ32 as nS, heardCallSignal as n_, sparkNetworkOf as na, knockSlotRecords as nb, parseTypingActivity as nc, IDENTITY_STATEMENT_PREFIX as nd, transportOrder as nf, PRESENCE_WINDOW as ng, decryptText as nh, didGhostlyServiceEntry as ni, appRangeChunk as nl, PR_CHECKS as nm, communityMessageAuthor as nn, FIRST_PAIRING_PACE_MS as no, dhtEditId as np, bip322ToSpend as nr, groupSignalFrame as ns, GROUP_READ_NOTE_COMMUNITY as nt, HoldKeys as nu, filePartName as nv, openRelayPayload as nw, signAppRevocation as nx, verifySetUpdate as ny, matchX401Dcql as o, CHAT_RESERVE as oC, deviceLinkSealKey as oS, pickCallCandidates as o_, PUBKY_PROOF_ROOT as oa, mergeContactKnocks as ob, typingFrame as oc, boundVerifiedIdentity as od, DHT_MESSAGE_TTL as of, TRANSPORTS_GONE_MS as og, newEpochSecret as oh, didWebFile as oi, appRangeGetFrame as ol, RUN_RESULTS as om, MENTION_EVERYONE as on, INVITE_TAKEN as oo, parseEditedFrame as op, ByteReader as or, NO_HUB_POLICY as os, communityMessageId as ot, readManifest as ou, handoffAttemptSucceeded as ov, decodeDnsAnswers as ow, IMAGE_LIMITS as ox, ENROLL_DONE as oy, sameX401HolderJwk as p, GROUP_BURST_MS as pC, seedSigner as pS, buildLinkRecords as p_, pubkyProofPath as pa, stampHolds as pb, PIN_LIMITS as pc, newIdentityBinding as pd, DHT_FILE_CAPABILITY as pf, unusedInviteWait as pg, MAX_SKIP as ph, parseDidJws as pi, APP_FRAME as pl, cardLine as pm, GROUP_META_PAST_CHARS as pn, PONG_WAIT_MS as po, canonicalUrl as pp, encodeWitness as pr, COMMUNITY_TOPOLOGY as ps, leaveStatement as pt, NIP05_PATH as pu, handoffDoneFrame as pv, identityFromSeedB64 as pw, canonicalJson as px, enrollDoneFrame as py, signAppStore as q, isDiscoveryBudgetError as qC, turnInstance as qS, HANDOFF_PIECE_OVERHEAD as q_, ANSWERS_REFUSED_PAUSE_MS as qa, isAppKey as qb, pushRequest as qc, RELAY_WITH_SECRETS as qd, EDIT_BUFFER_MS as qf, RTC_CONFIG as qg, EXPECT_PEER_MS as qh, isWalletNetwork as qi, parseSessionCapabilities as ql, rosterHas as qm, sshSignCommand as qn, CarriedTransport as qo, pairedReplyAuthor as qp, DID_FILE_MAX_BYTES as qr, TYPING_KINDS as qs, asWritten as qt, IDENTITY_FRAME_LIMIT as qu, sortParts as qv, __exportAll as qw, DEVICES_CAPABILITY as qx, REQUEST_PACKET_BYTES as qy, readX401OpenId4VpRequest as r, BACKGROUND_REQUESTS_PER_MINUTE as rC, deviceLinkPairing as rS, isGlobalIpv4Host as r_, BITCOIN_NETWORKS as ra, linkRecords as rb, parseTypingFrame as rc, IDENTITY_SUBJECT as rd, ACTIVE_DHT_POLL_MS as rf, RELAY_POLL_INTERVALS as rg, edgeParams as rh, didJwsAlg as ri, appRangeDataFrame as rl, PR_STATES as rm, meshMessageRef as rn, GhostLink as ro, editFrame as rp, decodeBase64 as rr, readGroupSignal as rs, communityCommitHash as rt, HoldRefusedError as ru, handoffAckFrame as rv, parseRelayPayload as rw, verifyAppRevocation as rx, DEVICE_KINDS as ry, presentX401SdJwtVc as s, CHAT_RESERVE_MOST_SHARE as sC, deviceLinkSecret as sS, sdpHasCandidates as s_, isPubkyKey as sa, openRequest as sb, typingKindOf as sc, emptyIdentityLedger as sd, DHT_TEXT_BYTES as sf, UNUSED_INVITE_READS_PER_MINUTE as sg, openPair as sh, didWebFileNames as si, decodeAppRangeData as sl, STATUS_CARD_LIMITS as sm, MENTION_LIMITS as sn, LIVENESS_MISSED_PINGS as so, validEditMessage as sp, compactSize as sr, mayBeHub as ss, communityRoster as st, DNS_LABEL as su, handoffBusyFrame as sv, decodeTxtPacket as sw, exifOrientation as sx, ENROLL_GRANT as sy, X401_REQUEST_LIMITS as t, turnStatedVerifier as tC, deviceFrameCapability as tS, extractParamsFromSdp as t_, sparkInvoiceDetails as ta, knockSlotOf as tb, TypingSender as tc, IDENTITY_REVOCATION_LABEL as td, relayedTransports as tf, PRESENCE_HEARTBEAT as tg, confirmationTag as th, checkDidSignature as ti, appRangeCancelFrame as tl, ITEM_STATES as tm, communityEditFrame as tn, EARLY_DIAL_JOIN_MS as to, RateWindow as tp, bip322ToSign as tr, SIGNAL_REPLY_MS as ts, CommunitySession as tt, HOLD_LIMITS as tu, filePartDigest as tv, newerPacket as tw, signAppObject as tx, signTombstone as ty, X401_CREDENTIAL_LIMITS as u, DEFAULT_RELAYS as uC, signDeviceTransports as uS, LABEL$1 as u_, normalizePubkyKey as ua, requestPlaintextBytes as ub, PINNED_FRAME as uc, identityStatement as ud, LIVE_POLL_MS as uf, WATCH_PEER_MS as ug, sealSecret as uh, normalizeDid as ui, parseAppRangeFrame as ul, appCardUrl as um, validMentions as un, PAIRED_FRAME_TOO_LARGE as uo, LINK_MAX_CHARS as up, decodeTx as ur, parseHubPolicy as us, derivedSecret as ut, DOMAIN_MAX_RECORDS as uu, handoffContextProof as uv, IDENTITY_MEMO_SIZE as uw, parseImageMeta as ux, enrollCancelFrame as uy, X401_SCHEME as v, HEDGE_MISSING_MS as vC, TURN_VISIBLE_MS as vS, LEGACY_SERVICES as v_, LIGHTNING_DESTINATION_PATTERN as va, APP_FORBIDDEN_KEYS as vb, pinFrame as vc, IDENTITY_TIMELINE_MAX as vd, PREVIEWABLE_IMAGE as vf, parseLocalTarget as vg, RATCHET_OVERHEAD as vh, DID_DHT_MAX_PAYLOAD as vi, APP_SEND_LIMIT as vl, readStatusCard as vm, encodeGroupMetaBody as vn, RESUME_WAIT_MS as vo, previewImageSize as vp, u64 as vr, hubRank as vs, signCommunity as vt, domainWellKnownFile as vu, handoffHelloFrame as vv, encrypt as vw, createContactLink as vx, formatEnrollDigits as vy, decodeX401Header as w, RelaysFailedError as wC, TURN_BODY_BYTES as wS, isViewerTag as w_, parseLightningDestination as wa, appViewOf as wb, WAKE_CALL_INTERVAL_MS as wc, STORAGE_LIFETIME as wd, RECORDING_TYPES as wf, webLocalFetch as wg, ratchetOpen as wh, didDhtDocument as wi, appOpenFrame as wl, usageLeft as wm, groupMetaTag as wn, pairedMessageFits as wo, COMMUNITY_REACTION_FRAME as wp, atprotoDidMethod as wr, pickHubs as ws, MAX_KNOCKS as wt, recordsFromTxt as wu, handoffRetryAfter as wv, jpegSize$1 as ww, createDeviceInvite as wx, MAX_MISSED as wy, buildX401ProofResult as x, RELAY_REQUESTS_PER_MINUTE as xC, turnPutSummary as xS, decodeServices as x_, findLightningDestination as xa, APP_SCREENSHOTS_DIR as xb, pinnedFrame as xc, PROOF_ADAPTERS as xd, sanitizeFileName as xf, sanitizeRequestHeaders as xg, isRatcheted as xh, DID_DHT_VERSION as xi, appCloseFrame as xl, statusCardBytes as xm, groupMetaChange as xn, UNPROVEN_AUTH_MS as xo, forwardedAgain as xp, ATPROTO_FULL_SCOPE as xr, mergeBeacon as xs, verifyCommunityCommit as xt, nip05RootKey as xu, handoffPakeFrame as xv, tryDecrypt as xw, DEVICE_INVITE_BYTES as xx, verifyEnrollProof as xy, X401_VERSION as y, HEDGE_MS as yC, classifyTurnRead as yS, MAX_SERVICES as y_, LNURL_LIMITS as ya, APP_ICON_PATH as yb, pinIsNewer as yc, applyIdentityEvent as yd, formatFileSize as yf, relativizeLocation as yg, RatchetBox as yh, DID_DHT_PREFIX as yi, APP_VERSION_MAX as yl, removedCardText as ym, groupDisplayName as yn, RTC_UNSTARTED_MS as yo, sanitizePreviewImage as yp, varBytes as yr, lobbyKeys as ys, verifyCommunityChain as yt, encodeDnsQuery as yu, handoffManifestFrames as yv, generateEncryptionKey as yw, encodeContactLink as yx, readEnrollGrant as yy, planAppUpdate as z, BREAKER_ALL_DOWN_PROBE_MS as zC, nextTurnPosition as zS, HANDOFF_HAVE as z_, VIDEO_METADATA_LIMITS as za, APP_STATEMENT_LIMITS as zb, wakePayload as zc, RING_LIFETIME as zd, PLAYABLE_VIDEO as zf, RTC_SIGNAL_MAX_AGE_MS as zg, DIRECT_OWN_ATTEMPTS as zh, SEPOLIA_TEST_USDT_FAUCET as zi, REACTIONS_CAPABILITY as zl, OWN_FRAME_LIMIT as zm, SSH_KEY_TYPES as zn, fetchesByItself as zo, readDhtReactions as zp, parseAtprotoCar as zr, FileUplink as zs, groupWakeFrame as zt, capsDescriptors as zu, readHandoffHello as zv, randomBytes as zw, encodeInviteCode as zx, KNOCK_SLOT_LABEL as zy };
37372
38514
 
37373
- //# sourceMappingURL=src-CfpOdLVf.js.map
38515
+ //# sourceMappingURL=src-Ch4NWeBg.js.map