const { c: e } = require("hyperschema/runtime"),
d = 28
let o = d
const n = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), e.uint.preencode(d, o.length))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), e.uint.encode(d, o.length))
},
decode: (d) => ({ key: e.fixed32.decode(d), length: e.uint.decode(d) }),
},
c = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), e.uint.preencode(d, o.seq))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), e.uint.encode(d, o.seq))
},
decode: (d) => ({ key: e.fixed32.decode(d), seq: e.uint.decode(d) }),
},
r = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.publicKey), e.fixed32.preencode(d, o.secretKey))
},
encode(d, o) {
;(e.fixed32.encode(d, o.publicKey), e.fixed32.encode(d, o.secretKey))
},
decode: (d) => ({ publicKey: e.fixed32.decode(d), secretKey: e.fixed32.decode(d) }),
},
t = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.publicKey), e.fixed64.preencode(d, o.secretKey))
},
encode(d, o) {
;(e.fixed32.encode(d, o.publicKey), e.fixed64.encode(d, o.secretKey))
},
decode: (d) => ({ publicKey: e.fixed32.decode(d), secretKey: e.fixed64.decode(d) }),
},
i = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
d.end++,
o.encryptionKey && e.buffer.preencode(d, o.encryptionKey),
o.fastForwardTo && e.fixed32.preencode(d, o.fastForwardTo))
},
encode(d, o) {
const n = (o.encryptionKey ? 1 : 0) | (o.fastForwardTo ? 2 : 0)
;(e.fixed32.encode(d, o.key),
e.uint.encode(d, n),
o.encryptionKey && e.buffer.encode(d, o.encryptionKey),
o.fastForwardTo && e.fixed32.encode(d, o.fastForwardTo))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d)
return {
key: o,
encryptionKey: 1 & n ? e.buffer.decode(d) : null,
fastForwardTo: 2 & n ? e.fixed32.decode(d) : null,
}
},
},
a = {
preencode(d, o) {
e.uint.preencode(d, o.timestamp)
},
encode(d, o) {
e.uint.encode(d, o.timestamp)
},
decode: (d) => ({ timestamp: e.uint.decode(d) }),
},
s = {
preencode(d, o) {
;(e.uint.preencode(d, o.blockOffset),
e.uint.preencode(d, o.blockLength),
e.uint.preencode(d, o.byteOffset),
e.uint.preencode(d, o.byteLength))
},
encode(d, o) {
;(e.uint.encode(d, o.blockOffset),
e.uint.encode(d, o.blockLength),
e.uint.encode(d, o.byteOffset),
e.uint.encode(d, o.byteLength))
},
decode: (d) => ({
blockOffset: e.uint.decode(d),
blockLength: e.uint.decode(d),
byteOffset: e.uint.decode(d),
byteLength: e.uint.decode(d),
}),
},
p = {
preencode(d, o) {
;(e.uint.preencode(d, o.width), e.uint.preencode(d, o.height))
},
encode(d, o) {
;(e.uint.encode(d, o.width), e.uint.encode(d, o.height))
},
decode: (d) => ({ width: e.uint.decode(d), height: e.uint.decode(d) }),
},
u = e.frame(p),
l = {
preencode(d, o) {
;(d.end++,
o.name && e.string.preencode(d, o.name),
o.mimetype && e.string.preencode(d, o.mimetype),
o.dimensions && u.preencode(d, o.dimensions),
o.userdata && e.buffer.preencode(d, o.userdata),
o.duration && e.uint.preencode(d, o.duration))
},
encode(d, o) {
const n =
(o.name ? 1 : 0) |
(o.mimetype ? 2 : 0) |
(o.dimensions ? 4 : 0) |
(o.userdata ? 8 : 0) |
(o.duration ? 16 : 0) |
(o.isPreview ? 32 : 0)
;(e.uint.encode(d, n),
o.name && e.string.encode(d, o.name),
o.mimetype && e.string.encode(d, o.mimetype),
o.dimensions && u.encode(d, o.dimensions),
o.userdata && e.buffer.encode(d, o.userdata),
o.duration && e.uint.encode(d, o.duration))
},
decode(d) {
const o = e.uint.decode(d)
return {
name: 1 & o ? e.string.decode(d) : null,
mimetype: 2 & o ? e.string.decode(d) : null,
dimensions: 4 & o ? u.decode(d) : null,
userdata: 8 & o ? e.buffer.decode(d) : null,
duration: 16 & o ? e.uint.decode(d) : 0,
isPreview: !!(32 & o),
}
},
},
f = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
e.string.preencode(d, o.path),
e.uint.preencode(d, o.version),
e.uint.preencode(d, o.size))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key),
e.string.encode(d, o.path),
e.uint.encode(d, o.version),
e.uint.encode(d, o.size))
},
decode: (d) => ({
key: e.fixed32.decode(d),
path: e.string.decode(d),
version: e.uint.decode(d),
size: e.uint.decode(d),
}),
},
m = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), s.preencode(d, o.blob))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), s.encode(d, o.blob))
},
decode: (d) => ({ key: e.fixed32.decode(d), blob: s.decode(d) }),
},
y = e.frame(m),
x = e.frame(f),
b = {
preencode(d, o) {
;(d.end++,
o.inlined && e.buffer.preencode(d, o.inlined),
o.blob && s.preencode(d, o.blob),
o.externalBlob && y.preencode(d, o.externalBlob),
o.externalDrive && x.preencode(d, o.externalDrive))
},
encode(d, o) {
const n =
(o.inlined ? 1 : 0) |
(o.blob ? 2 : 0) |
(o.externalBlob ? 4 : 0) |
(o.externalDrive ? 8 : 0)
;(e.uint.encode(d, n),
o.inlined && e.buffer.encode(d, o.inlined),
o.blob && s.encode(d, o.blob),
o.externalBlob && y.encode(d, o.externalBlob),
o.externalDrive && x.encode(d, o.externalDrive))
},
decode(d) {
const o = e.uint.decode(d)
return {
inlined: 1 & o ? e.buffer.decode(d) : null,
blob: 2 & o ? s.decode(d) : null,
externalBlob: 4 & o ? y.decode(d) : null,
externalDrive: 8 & o ? x.decode(d) : null,
}
},
},
v = e.frame(b),
k = e.frame(l),
g = {
preencode(d, o) {
;(v.preencode(d, o.pointer),
d.end++,
o.metadata && k.preencode(d, o.metadata),
o.preview && yi.preencode(d, o.preview),
o.hash && e.fixed32.preencode(d, o.hash))
},
encode(d, o) {
const n = (o.metadata ? 1 : 0) | (o.preview ? 2 : 0) | (o.hash ? 4 : 0)
;(v.encode(d, o.pointer),
e.uint.encode(d, n),
o.metadata && k.encode(d, o.metadata),
o.preview && yi.encode(d, o.preview),
o.hash && e.fixed32.encode(d, o.hash))
},
decode(d) {
const o = v.decode(d),
n = e.uint.decode(d)
return {
pointer: o,
metadata: 1 & n ? k.decode(d) : null,
preview: 2 & n ? yi.decode(d) : null,
hash: 4 & n ? e.fixed32.decode(d) : null,
}
},
},
K = e.frame(g),
h = K,
w = K,
P = {
preencode(e, d) {
;(e.end++,
d.small && K.preencode(e, d.small),
d.medium && h.preencode(e, d.medium),
d.large && w.preencode(e, d.large))
},
encode(d, o) {
const n = (o.small ? 1 : 0) | (o.medium ? 2 : 0) | (o.large ? 4 : 0)
;(e.uint.encode(d, n),
o.small && K.encode(d, o.small),
o.medium && h.encode(d, o.medium),
o.large && w.encode(d, o.large))
},
decode(d) {
const o = e.uint.decode(d)
return {
small: 1 & o ? K.decode(d) : null,
medium: 2 & o ? h.decode(d) : null,
large: 4 & o ? w.decode(d) : null,
}
},
},
R = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = o.isDeleted ? 1 : 0
e.uint.encode(d, n)
},
decode: (d) => ({ isDeleted: !!(1 & e.uint.decode(d)) }),
},
T = e.frame(R),
A = K,
M = {
preencode(d, n) {
;(e.uint.preencode(d, n.id),
c.preencode(d, n.oplog),
T.preencode(d, n.status),
A.preencode(d, n.file),
d.end++,
o >= 22 && n.version && e.uint.preencode(d, n.version))
},
encode(d, n) {
const r = o >= 22 && n.version ? 1 : 0
;(e.uint.encode(d, n.id),
c.encode(d, n.oplog),
T.encode(d, n.status),
A.encode(d, n.file),
e.uint.encode(d, r),
o >= 22 && n.version && e.uint.encode(d, n.version))
},
decode(d) {
const n = e.uint.decode(d),
r = c.decode(d),
t = T.decode(d),
i = A.decode(d),
a = d.start < d.end ? e.uint.decode(d) : 0
return {
id: n,
oplog: r,
status: t,
file: i,
version: o >= 22 && 1 & a ? e.uint.decode(d) : 0,
}
},
},
S = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = (o.isActive ? 1 : 0) | (o.isIndexing ? 2 : 0)
e.uint.encode(d, n)
},
decode(d) {
const o = e.uint.decode(d)
return { isActive: !!(1 & o), isIndexing: !!(2 & o) }
},
},
C = {
preencode(d, n) {
const c =
(n.isAdmin ? 1 : 0) |
(n.isModerator ? 2 : 0) |
(n.isPending ? 4 : 0) |
(n.isActive ? 8 : 0) |
(n.isMuted ? 16 : 0) |
(n.isBanned ? 32 : 0) |
(n.isShadowBanned ? 64 : 0) |
(o >= 19 && n.isRemoved ? 128 : 0)
e.uint.preencode(d, c)
},
encode(d, n) {
const c =
(n.isAdmin ? 1 : 0) |
(n.isModerator ? 2 : 0) |
(n.isPending ? 4 : 0) |
(n.isActive ? 8 : 0) |
(n.isMuted ? 16 : 0) |
(n.isBanned ? 32 : 0) |
(n.isShadowBanned ? 64 : 0) |
(o >= 19 && n.isRemoved ? 128 : 0)
e.uint.encode(d, c)
},
decode(d) {
const n = e.uint.decode(d)
return {
isAdmin: !!(1 & n),
isModerator: !!(2 & n),
isPending: !!(4 & n),
isActive: !!(8 & n),
isMuted: !!(16 & n),
isBanned: !!(32 & n),
isShadowBanned: !!(64 & n),
isRemoved: o >= 19 && !!(128 & n),
}
},
},
F = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = (o.isMuted ? 1 : 0) | (o.isBanned ? 2 : 0) | (o.isShadowBanned ? 4 : 0)
e.uint.encode(d, n)
},
decode(d) {
const o = e.uint.decode(d)
return { isMuted: !!(1 & o), isBanned: !!(2 & o), isShadowBanned: !!(4 & o) }
},
},
D = {
preencode(d, o) {
e.uint.preencode(d, o.version)
},
encode(d, o) {
e.uint.encode(d, o.version)
},
decode: (d) => ({ version: e.uint.decode(d) }),
},
I = {
preencode(d, o) {
;(e.uint.preencode(d, o.total), e.uint.preencode(d, o.active))
},
encode(d, o) {
;(e.uint.encode(d, o.total), e.uint.encode(d, o.active))
},
decode: (d) => ({ total: e.uint.decode(d), active: e.uint.decode(d) }),
},
q = {
preencode(d, o) {
;(e.uint.preencode(d, o.total), e.uint.preencode(d, o.active), e.uint.preencode(d, o.pending))
},
encode(d, o) {
;(e.uint.encode(d, o.total), e.uint.encode(d, o.active), e.uint.encode(d, o.pending))
},
decode: (d) => ({
total: e.uint.decode(d),
active: e.uint.decode(d),
pending: e.uint.decode(d),
}),
},
L = {
preencode(d, n) {
;(e.uint.preencode(d, n.clock),
e.uint.preencode(d, n.pinned),
e.uint.preencode(d, n.threads),
e.uint.preencode(d, n.timestamp),
d.end++,
o >= 24 && n.flagsClock && e.uint.preencode(d, n.flagsClock))
},
encode(d, n) {
const c = o >= 24 && n.flagsClock ? 1 : 0
;(e.uint.encode(d, n.clock),
e.uint.encode(d, n.pinned),
e.uint.encode(d, n.threads),
e.uint.encode(d, n.timestamp),
e.uint.encode(d, c),
o >= 24 && n.flagsClock && e.uint.encode(d, n.flagsClock))
},
decode(d) {
const n = e.uint.decode(d),
c = e.uint.decode(d),
r = e.uint.decode(d),
t = e.uint.decode(d),
i = d.start < d.end ? e.uint.decode(d) : 0
return {
clock: n,
pinned: c,
threads: r,
timestamp: t,
flagsClock: o >= 24 && 1 & i ? e.uint.decode(d) : 0,
}
},
},
j = {
preencode(d, o) {
e.uint.preencode(d, o.clock)
},
encode(d, o) {
e.uint.encode(d, o.clock)
},
decode: (d) => ({ clock: e.uint.decode(d) }),
},
E = e.frame(I),
B = e.frame(q),
V = e.frame(L),
N = e.frame(j),
U = {
preencode(e, d) {
;(E.preencode(e, d.devices),
B.preencode(e, d.members),
V.preencode(e, d.chat),
N.preencode(e, d.files))
},
encode(e, d) {
;(E.encode(e, d.devices), B.encode(e, d.members), V.encode(e, d.chat), N.encode(e, d.files))
},
decode: (e) => ({
devices: E.decode(e),
members: B.decode(e),
chat: V.decode(e),
files: N.decode(e),
}),
},
J = { Default: 1, Broadcast: 2, DirectMessage: 3 },
O = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 3) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
W = {
preencode(e, d) {
;(e.end++, d.roomType && O.preencode(e, d.roomType))
},
encode(d, o) {
const n =
(o.roomType ? 1 : 0) |
(o.isExperimental ? 2 : 0) |
(o.isJoiningDisabled ? 4 : 0) |
(o.isAppendingDisabled ? 8 : 0) |
(o.isCallingDisabled ? 16 : 0) |
(o.isMembershipEventsDisabled ? 32 : 0)
;(e.uint.encode(d, n), o.roomType && O.encode(d, o.roomType))
},
decode(d) {
const o = e.uint.decode(d)
return {
roomType: 1 & o ? O.decode(d) : 0,
isExperimental: !!(2 & o),
isJoiningDisabled: !!(4 & o),
isAppendingDisabled: !!(8 & o),
isCallingDisabled: !!(16 & o),
isMembershipEventsDisabled: !!(32 & o),
}
},
},
H = e.frame(D),
z = e.frame(W),
G = {
preencode(d, o) {
;(H.preencode(d, o.abi), z.preencode(d, o.settings), e.uint.preencode(d, o.creationTime))
},
encode(d, o) {
;(H.encode(d, o.abi), z.encode(d, o.settings), e.uint.encode(d, o.creationTime))
},
decode: (d) => ({ abi: H.decode(d), settings: z.decode(d), creationTime: e.uint.decode(d) }),
},
Q = {
preencode(d, o) {
e.fixed32.preencode(d, o.seed)
},
encode(d, o) {
e.fixed32.encode(d, o.seed)
},
decode: (d) => ({ seed: e.fixed32.decode(d) }),
},
X = {
preencode(d, o) {
;(r.preencode(d, o.mailboxKeyPair),
t.preencode(d, o.discoveryKeyPair),
e.fixed32.preencode(d, o.wakeupTopic),
e.fixed32.preencode(d, o.swarmTopic))
},
encode(d, o) {
;(r.encode(d, o.mailboxKeyPair),
t.encode(d, o.discoveryKeyPair),
e.fixed32.encode(d, o.wakeupTopic),
e.fixed32.encode(d, o.swarmTopic))
},
decode: (d) => ({
mailboxKeyPair: r.decode(d),
discoveryKeyPair: t.decode(d),
wakeupTopic: e.fixed32.decode(d),
swarmTopic: e.fixed32.decode(d),
}),
},
Y = e.array(e.fixed32),
Z = {
preencode(d, n) {
;(d.end++,
n.title && e.string.preencode(d, n.title),
n.avatar && xi.preencode(d, n.avatar),
n.description && e.string.preencode(d, n.description),
o >= 17 && n.supportedLanguages && bi.preencode(d, n.supportedLanguages),
o >= 19 && n.blindPeers && Y.preencode(d, n.blindPeers))
},
encode(d, n) {
const c =
(n.title ? 1 : 0) |
(n.avatar ? 2 : 0) |
(n.description ? 4 : 0) |
(o >= 17 && n.supportedLanguages ? 8 : 0) |
(o >= 19 && n.blindPeers ? 16 : 0)
;(e.uint.encode(d, c),
n.title && e.string.encode(d, n.title),
n.avatar && xi.encode(d, n.avatar),
n.description && e.string.encode(d, n.description),
o >= 17 && n.supportedLanguages && bi.encode(d, n.supportedLanguages),
o >= 19 && n.blindPeers && Y.encode(d, n.blindPeers))
},
decode(d) {
const n = e.uint.decode(d)
return {
title: 1 & n ? e.string.decode(d) : null,
avatar: 2 & n ? xi.decode(d) : null,
description: 4 & n ? e.string.decode(d) : null,
supportedLanguages: o >= 17 && 8 & n ? bi.decode(d) : null,
blindPeers: o >= 19 && 16 & n ? Y.decode(d) : null,
}
},
},
$ = {
preencode(d, o) {
e.fixed32.preencode(d, o.key)
},
encode(d, o) {
e.fixed32.encode(d, o.key)
},
decode: (d) => ({ key: e.fixed32.decode(d) }),
},
_ = e.frame(a),
ee = e.frame($),
de = {
preencode(e, d) {
;(_.preencode(e, d.header), ee.preencode(e, d.peer))
},
encode(e, d) {
;(_.encode(e, d.header), ee.encode(e, d.peer))
},
decode: (e) => ({ header: _.decode(e), peer: ee.decode(e) }),
},
oe = _,
ne = {
preencode(d, o) {
;(oe.preencode(d, o.header), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(oe.encode(d, o.header), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ header: oe.decode(d), key: e.fixed32.decode(d) }),
},
ce = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.memberKey), e.buffer.preencode(d, o.proof))
},
encode(d, o) {
;(e.fixed32.encode(d, o.memberKey), e.buffer.encode(d, o.proof))
},
decode: (d) => ({ memberKey: e.fixed32.decode(d), proof: e.buffer.decode(d) }),
},
re = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.id), e.buffer.preencode(d, o.response))
},
encode(d, o) {
;(e.fixed32.encode(d, o.id), e.buffer.encode(d, o.response))
},
decode: (d) => ({ id: e.fixed32.decode(d), response: e.buffer.decode(d) }),
},
te = e.frame(S),
ie = e.frame(re),
ae = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
e.fixed32.preencode(d, o.memberKey),
te.preencode(d, o.status),
vi.preencode(d, o.profile),
d.end++,
o.invitation && ie.preencode(d, o.invitation))
},
encode(d, o) {
const n = o.invitation ? 1 : 0
;(e.fixed32.encode(d, o.key),
e.fixed32.encode(d, o.memberKey),
te.encode(d, o.status),
vi.encode(d, o.profile),
e.uint.encode(d, n),
o.invitation && ie.encode(d, o.invitation))
},
decode: (d) => ({
key: e.fixed32.decode(d),
memberKey: e.fixed32.decode(d),
status: te.decode(d),
profile: vi.decode(d),
invitation: 1 & e.uint.decode(d) ? ie.decode(d) : null,
}),
},
se = {
preencode(d, o) {
;(e.uint.preencode(d, o.timestamp),
d.end++,
o.mailbox && e.fixed32.preencode(d, o.mailbox),
o.displayName && e.string.preencode(d, o.displayName),
o.avatar && ki.preencode(d, o.avatar),
o.username && e.string.preencode(d, o.username))
},
encode(d, o) {
const n =
(o.mailbox ? 1 : 0) | (o.displayName ? 2 : 0) | (o.avatar ? 4 : 0) | (o.username ? 8 : 0)
;(e.uint.encode(d, o.timestamp),
e.uint.encode(d, n),
o.mailbox && e.fixed32.encode(d, o.mailbox),
o.displayName && e.string.encode(d, o.displayName),
o.avatar && ki.encode(d, o.avatar),
o.username && e.string.encode(d, o.username))
},
decode(d) {
const o = e.uint.decode(d),
n = e.uint.decode(d)
return {
timestamp: o,
mailbox: 1 & n ? e.fixed32.decode(d) : null,
displayName: 2 & n ? e.string.decode(d) : null,
avatar: 4 & n ? ki.decode(d) : null,
username: 8 & n ? e.string.decode(d) : null,
}
},
},
pe = {
preencode(d, o) {
;(d.end++,
o.swarmKey && e.fixed32.preencode(d, o.swarmKey),
o.name && e.string.preencode(d, o.name))
},
encode(d, o) {
const n = (o.swarmKey ? 1 : 0) | (o.name ? 2 : 0) | (o.isMobile ? 4 : 0)
;(e.uint.encode(d, n),
o.swarmKey && e.fixed32.encode(d, o.swarmKey),
o.name && e.string.encode(d, o.name))
},
decode(d) {
const o = e.uint.decode(d)
return {
swarmKey: 1 & o ? e.fixed32.decode(d) : null,
name: 2 & o ? e.string.decode(d) : null,
isMobile: !!(4 & o),
}
},
},
ue = e.frame(se),
le = {
preencode(e, d) {
;(ue.preencode(e, d.profile), ce.preencode(e, d.attestation))
},
encode(e, d) {
;(ue.encode(e, d.profile), ce.encode(e, d.attestation))
},
decode: (e) => ({ profile: ue.decode(e), attestation: ce.decode(e) }),
},
fe = {
preencode(e, d) {
;(gi.preencode(e, d.profile), ce.preencode(e, d.attestation))
},
encode(e, d) {
;(gi.encode(e, d.profile), ce.encode(e, d.attestation))
},
decode: (e) => ({ profile: gi.decode(e), attestation: ce.decode(e) }),
},
me = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.id),
e.buffer.preencode(d, o.data),
e.buffer.preencode(d, o.signature))
},
encode(d, o) {
;(e.fixed32.encode(d, o.id), e.buffer.encode(d, o.data), e.buffer.encode(d, o.signature))
},
decode: (d) => ({
id: e.fixed32.decode(d),
data: e.buffer.decode(d),
signature: e.buffer.decode(d),
}),
},
ye = {
preencode(d, o) {
e.fixed32.preencode(d, o.devicePublicKey)
},
encode(d, o) {
e.fixed32.encode(d, o.devicePublicKey)
},
decode: (d) => ({ devicePublicKey: e.fixed32.decode(d) }),
},
xe = {
preencode(d, o) {
;(ce.preencode(d, o.privateProfileIdentity), e.buffer.preencode(d, o.deviceProof))
},
encode(d, o) {
;(ce.encode(d, o.privateProfileIdentity), e.buffer.encode(d, o.deviceProof))
},
decode: (d) => ({ privateProfileIdentity: ce.decode(d), deviceProof: e.buffer.decode(d) }),
},
be = e.frame(fe),
ve = e.frame(le),
ke = e.frame(ye),
ge = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.deviceKey),
t.preencode(d, o.keyPair),
be.preencode(d, o.device),
ve.preencode(d, o.member),
d.end++,
o.identity && ke.preencode(d, o.identity))
},
encode(d, o) {
const n = o.identity ? 1 : 0
;(e.fixed32.encode(d, o.deviceKey),
t.encode(d, o.keyPair),
be.encode(d, o.device),
ve.encode(d, o.member),
e.uint.encode(d, n),
o.identity && ke.encode(d, o.identity))
},
decode: (d) => ({
deviceKey: e.fixed32.decode(d),
keyPair: t.decode(d),
device: be.decode(d),
member: ve.decode(d),
identity: 1 & e.uint.decode(d) ? ke.decode(d) : null,
}),
},
Ke = e.frame(ge),
he = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.id),
Ke.preencode(d, o.request),
e.buffer.preencode(d, o.signature))
},
encode(d, o) {
;(e.fixed32.encode(d, o.id), Ke.encode(d, o.request), e.buffer.encode(d, o.signature))
},
decode: (d) => ({
id: e.fixed32.decode(d),
request: Ke.decode(d),
signature: e.buffer.decode(d),
}),
},
we = be,
Pe = ve,
Re = {
preencode(e, d) {
;(we.preencode(e, d.device), e.end++, d.member && Pe.preencode(e, d.member))
},
encode(d, o) {
const n = o.member ? 1 : 0
;(we.encode(d, o.device), e.uint.encode(d, n), o.member && Pe.encode(d, o.member))
},
decode: (d) => ({ device: we.decode(d), member: 1 & e.uint.decode(d) ? Pe.decode(d) : null }),
},
Te = e.frame(he),
Ae = e.frame(Re),
Me = {
preencode(e, d) {
;(e.end++,
d.withInvitation && Te.preencode(e, d.withInvitation),
d.withMemberProof && Ae.preencode(e, d.withMemberProof))
},
encode(d, o) {
const n = (o.withInvitation ? 1 : 0) | (o.withMemberProof ? 2 : 0)
;(e.uint.encode(d, n),
o.withInvitation && Te.encode(d, o.withInvitation),
o.withMemberProof && Ae.encode(d, o.withMemberProof))
},
decode(d) {
const o = e.uint.decode(d)
return {
withInvitation: 1 & o ? Te.decode(d) : null,
withMemberProof: 2 & o ? Ae.decode(d) : null,
}
},
},
Se = e.frame(me),
Ce = e.frame(xe),
Fe = {
preencode(e, d) {
;(Se.preencode(e, d.signedKeys), e.end++, d.identity && Ce.preencode(e, d.identity))
},
encode(d, o) {
const n = o.identity ? 1 : 0
;(Se.encode(d, o.signedKeys), e.uint.encode(d, n), o.identity && Ce.encode(d, o.identity))
},
decode: (d) => ({
signedKeys: Se.decode(d),
identity: 1 & e.uint.decode(d) ? Ce.decode(d) : null,
}),
},
De = {
preencode(d, o) {
;(d.end++, o.expiration && e.uint.preencode(d, o.expiration))
},
encode(d, o) {
const n =
(o.expiration ? 1 : 0) |
(o.requiresConfirmation ? 2 : 0) |
(o.canModerate ? 4 : 0) |
(o.canAdmin ? 8 : 0)
;(e.uint.encode(d, n), o.expiration && e.uint.encode(d, o.expiration))
},
decode(d) {
const o = e.uint.decode(d)
return {
expiration: 1 & o ? e.uint.decode(d) : 0,
requiresConfirmation: !!(2 & o),
canModerate: !!(4 & o),
canAdmin: !!(8 & o),
}
},
},
Ie = Se,
qe = e.frame(De),
Le = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.id),
Ie.preencode(d, o.response),
qe.preencode(d, o.metadata),
d.end++,
o.anchor && n.preencode(d, o.anchor))
},
encode(d, o) {
const c = (o.anchor ? 1 : 0) | (o.isActive ? 2 : 0)
;(e.fixed32.encode(d, o.id),
Ie.encode(d, o.response),
qe.encode(d, o.metadata),
e.uint.encode(d, c),
o.anchor && n.encode(d, o.anchor))
},
decode(d) {
const o = e.fixed32.decode(d),
c = Ie.decode(d),
r = qe.decode(d),
t = e.uint.decode(d)
return {
id: o,
response: c,
metadata: r,
anchor: 1 & t ? n.decode(d) : null,
isActive: !!(2 & t),
}
},
},
je = _,
Ee = e.frame(Le),
Be = {
preencode(e, d) {
;(je.preencode(e, d.header), Ee.preencode(e, d.invitation))
},
encode(e, d) {
;(je.encode(e, d.header), Ee.encode(e, d.invitation))
},
decode: (e) => ({ header: je.decode(e), invitation: Ee.decode(e) }),
},
Ve = _,
Ne = {
preencode(d, o) {
;(Ve.preencode(d, o.header), e.fixed32.preencode(d, o.id))
},
encode(d, o) {
;(Ve.encode(d, o.header), e.fixed32.encode(d, o.id))
},
decode: (d) => ({ header: Ve.decode(d), id: e.fixed32.decode(d) }),
},
Ue = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.mailbox),
e.fixed32.preencode(d, o.invitationSeed),
n.preencode(d, o.anchor))
},
encode(d, o) {
;(e.fixed32.encode(d, o.mailbox),
e.fixed32.encode(d, o.invitationSeed),
n.encode(d, o.anchor))
},
decode: (d) => ({
mailbox: e.fixed32.decode(d),
invitationSeed: e.fixed32.decode(d),
anchor: n.decode(d),
}),
},
Je = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.mailbox),
e.fixed32.preencode(d, o.invitationSeed),
n.preencode(d, o.anchor),
e.fixed32.preencode(d, o.identityPublicKey))
},
encode(d, o) {
;(e.fixed32.encode(d, o.mailbox),
e.fixed32.encode(d, o.invitationSeed),
n.encode(d, o.anchor),
e.fixed32.encode(d, o.identityPublicKey))
},
decode: (d) => ({
mailbox: e.fixed32.decode(d),
invitationSeed: e.fixed32.decode(d),
anchor: n.decode(d),
identityPublicKey: e.fixed32.decode(d),
}),
},
Oe = {
preencode(d, o) {
e.fixed32.preencode(d, o.mailbox)
},
encode(d, o) {
e.fixed32.encode(d, o.mailbox)
},
decode: (d) => ({ mailbox: e.fixed32.decode(d) }),
},
We = e.frame(Ue),
He = e.frame(Je),
ze = e.frame(Oe),
Ge = e.array(e.ipv4Address),
Qe = {
preencode(e, d) {
;(e.end++,
d.room && We.preencode(e, d.room),
d.identity && He.preencode(e, d.identity),
d.contact && ze.preencode(e, d.contact),
o >= 9 && d.readonly && Ki.preencode(e, d.readonly),
o >= 17 && d.additionalNodes && Ge.preencode(e, d.additionalNodes))
},
encode(d, n) {
const c =
(n.room ? 1 : 0) |
(n.identity ? 2 : 0) |
(n.contact ? 4 : 0) |
(o >= 9 && n.readonly ? 8 : 0) |
(o >= 17 && n.additionalNodes ? 16 : 0)
;(e.uint.encode(d, c),
n.room && We.encode(d, n.room),
n.identity && He.encode(d, n.identity),
n.contact && ze.encode(d, n.contact),
o >= 9 && n.readonly && Ki.encode(d, n.readonly),
o >= 17 && n.additionalNodes && Ge.encode(d, n.additionalNodes))
},
decode(d) {
const n = e.uint.decode(d)
return {
room: 1 & n ? We.decode(d) : null,
identity: 2 & n ? He.decode(d) : null,
contact: 4 & n ? ze.decode(d) : null,
readonly: o >= 9 && 8 & n ? Ki.decode(d) : null,
additionalNodes: o >= 17 && 16 & n ? Ge.decode(d) : null,
}
},
},
Xe = _,
Ye = {
preencode(d, o) {
;(Xe.preencode(d, o.header), e.buffer.preencode(d, o.blindRequest))
},
encode(d, o) {
;(Xe.encode(d, o.header), e.buffer.encode(d, o.blindRequest))
},
decode: (d) => ({ header: Xe.decode(d), blindRequest: e.buffer.decode(d) }),
},
Ze = _,
$e = {
preencode(e, d) {
;(Ze.preencode(e, d.header), e.end++, d.profile && hi.preencode(e, d.profile))
},
encode(d, o) {
const n = o.profile ? 1 : 0
;(Ze.encode(d, o.header), e.uint.encode(d, n), o.profile && hi.encode(d, o.profile))
},
decode: (d) => ({ header: Ze.decode(d), profile: 1 & e.uint.decode(d) ? hi.decode(d) : null }),
},
_e = { preencode(e, d) {}, encode(e, d) {}, decode: (e) => ({}) },
ed = _e,
dd = Ke,
od = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.deviceKey),
e.fixed32.preencode(d, o.id),
dd.preencode(d, o.request))
},
encode(d, o) {
;(e.fixed32.encode(d, o.deviceKey), e.fixed32.encode(d, o.id), dd.encode(d, o.request))
},
decode: (d) => ({
deviceKey: e.fixed32.decode(d),
id: e.fixed32.decode(d),
request: dd.decode(d),
}),
},
nd = _,
cd = Ce,
rd = {
preencode(d, o) {
;(nd.preencode(d, o.header),
e.fixed32.preencode(d, o.deviceKey),
d.end++,
o.identity && cd.preencode(d, o.identity))
},
encode(d, o) {
const n = o.identity ? 1 : 0
;(nd.encode(d, o.header),
e.fixed32.encode(d, o.deviceKey),
e.uint.encode(d, n),
o.identity && cd.encode(d, o.identity))
},
decode: (d) => ({
header: nd.decode(d),
deviceKey: e.fixed32.decode(d),
identity: 1 & e.uint.decode(d) ? cd.decode(d) : null,
}),
},
td = _,
id = {
preencode(d, o) {
;(td.preencode(d, o.header), e.fixed32.preencode(d, o.deviceKey))
},
encode(d, o) {
;(td.encode(d, o.header), e.fixed32.encode(d, o.deviceKey))
},
decode: (d) => ({ header: td.decode(d), deviceKey: e.fixed32.decode(d) }),
},
ad = e.frame(C),
sd = ue,
pd = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), ad.preencode(d, o.status), sd.preencode(d, o.profile))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), ad.encode(d, o.status), sd.encode(d, o.profile))
},
decode: (d) => ({ key: e.fixed32.decode(d), status: ad.decode(d), profile: sd.decode(d) }),
},
ud = ad,
ld = ue,
fd = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
ud.preencode(d, o.status),
ld.preencode(d, o.profile),
d.end++,
o.proofs && wi.preencode(d, o.proofs))
},
encode(d, o) {
const n = o.proofs ? 1 : 0
;(e.fixed32.encode(d, o.key),
ud.encode(d, o.status),
ld.encode(d, o.profile),
e.uint.encode(d, n),
o.proofs && wi.encode(d, o.proofs))
},
decode: (d) => ({
key: e.fixed32.decode(d),
status: ud.decode(d),
profile: ld.decode(d),
proofs: 1 & e.uint.decode(d) ? wi.decode(d) : null,
}),
},
md = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
d.end++,
o.profileAttestation && e.buffer.preencode(d, o.profileAttestation),
o.latestReceipt && e.buffer.preencode(d, o.latestReceipt))
},
encode(d, o) {
const n = (o.profileAttestation ? 1 : 0) | (o.latestReceipt ? 2 : 0)
;(e.fixed32.encode(d, o.key),
e.uint.encode(d, n),
o.profileAttestation && e.buffer.encode(d, o.profileAttestation),
o.latestReceipt && e.buffer.encode(d, o.latestReceipt))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d)
return {
key: o,
profileAttestation: 1 & n ? e.buffer.decode(d) : null,
latestReceipt: 2 & n ? e.buffer.decode(d) : null,
}
},
},
yd = _,
xd = ve,
bd = {
preencode(e, d) {
;(yd.preencode(e, d.header), xd.preencode(e, d.member))
},
encode(e, d) {
;(yd.encode(e, d.header), xd.encode(e, d.member))
},
decode: (e) => ({ header: yd.decode(e), member: xd.decode(e) }),
},
vd = _,
kd = e.frame(F),
gd = {
preencode(d, o) {
;(vd.preencode(d, o.header),
e.fixed32.preencode(d, o.memberKey),
e.uint.preencode(d, o.key),
kd.preencode(d, o.status))
},
encode(d, o) {
;(vd.encode(d, o.header),
e.fixed32.encode(d, o.memberKey),
e.uint.encode(d, o.key),
kd.encode(d, o.status))
},
decode: (d) => ({
header: vd.decode(d),
memberKey: e.fixed32.decode(d),
key: e.uint.decode(d),
status: kd.decode(d),
}),
},
Kd = _,
hd = {
preencode(d, o) {
;(Kd.preencode(d, o.header), e.fixed32.preencode(d, o.key), d.end++)
},
encode(d, o) {
const n = (o.isModerator ? 1 : 0) | (o.isAdmin ? 2 : 0)
;(Kd.encode(d, o.header), e.fixed32.encode(d, o.key), e.uint.encode(d, n))
},
decode(d) {
const o = Kd.decode(d),
n = e.fixed32.decode(d),
c = e.uint.decode(d)
return { header: o, key: n, isModerator: !!(1 & c), isAdmin: !!(2 & c) }
},
},
wd = _,
Pd = {
preencode(d, o) {
;(wd.preencode(d, o.header), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(wd.encode(d, o.header), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ header: wd.decode(d), key: e.fixed32.decode(d) }),
},
Rd = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), e.uint.preencode(d, o.mentions))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), e.uint.encode(d, o.mentions))
},
decode: (d) => ({ key: e.fixed32.decode(d), mentions: e.uint.decode(d) }),
},
Td = {
preencode(d, o) {
;(d.end++, o.memberKey && e.fixed32.preencode(d, o.memberKey))
},
encode(d, o) {
const n = o.memberKey ? 1 : 0
;(e.uint.encode(d, n), o.memberKey && e.fixed32.encode(d, o.memberKey))
},
decode: (d) => ({ memberKey: 1 & e.uint.decode(d) ? e.fixed32.decode(d) : null }),
},
Ad = Td,
Md = {
preencode(d, o) {
;(d.end++, o.from && e.string.preencode(d, o.from), o.to && e.string.preencode(d, o.to))
},
encode(d, o) {
const n = (o.from ? 1 : 0) | (o.to ? 2 : 0)
;(e.uint.encode(d, n), o.from && e.string.encode(d, o.from), o.to && e.string.encode(d, o.to))
},
decode(d) {
const o = e.uint.decode(d)
return { from: 1 & o ? e.string.decode(d) : null, to: 2 & o ? e.string.decode(d) : null }
},
},
Sd = e.frame(Td),
Cd = e.frame(Ad),
Fd = e.frame(Md),
Dd = {
preencode(d, n) {
const c =
(n.memberJoined ? 1 : 0) |
(n.memberLeft ? 2 : 0) |
(n.titleChanged ? 4 : 0) |
(n.callStarted ? 8 : 0) |
(n.callHangup ? 16 : 0) |
(n.callMissed ? 32 : 0) |
(o >= 4 && n.roomAvatarChanged ? 64 : 0) |
(o >= 4 && n.invitationCreated ? 128 : 0) |
(o >= 4 && n.memberRemoved ? 256 : 0) |
(o >= 27 && n.locationShared ? 512 : 0)
;(e.uint.preencode(d, c),
n.memberJoined && Sd.preencode(d, n.memberJoined),
n.memberLeft && Cd.preencode(d, n.memberLeft),
n.titleChanged && Fd.preencode(d, n.titleChanged),
o >= 4 && n.memberRemoved && Pi.preencode(d, n.memberRemoved),
o >= 27 && n.locationShared && Ri.preencode(d, n.locationShared))
},
encode(d, n) {
const c =
(n.memberJoined ? 1 : 0) |
(n.memberLeft ? 2 : 0) |
(n.titleChanged ? 4 : 0) |
(n.callStarted ? 8 : 0) |
(n.callHangup ? 16 : 0) |
(n.callMissed ? 32 : 0) |
(o >= 4 && n.roomAvatarChanged ? 64 : 0) |
(o >= 4 && n.invitationCreated ? 128 : 0) |
(o >= 4 && n.memberRemoved ? 256 : 0) |
(o >= 27 && n.locationShared ? 512 : 0)
;(e.uint.encode(d, c),
n.memberJoined && Sd.encode(d, n.memberJoined),
n.memberLeft && Cd.encode(d, n.memberLeft),
n.titleChanged && Fd.encode(d, n.titleChanged),
o >= 4 && n.memberRemoved && Pi.encode(d, n.memberRemoved),
o >= 27 && n.locationShared && Ri.encode(d, n.locationShared))
},
decode(d) {
const n = e.uint.decode(d)
return {
memberJoined: 1 & n ? Sd.decode(d) : null,
memberLeft: 2 & n ? Cd.decode(d) : null,
titleChanged: 4 & n ? Fd.decode(d) : null,
callStarted: !!(8 & n),
callHangup: !!(16 & n),
callMissed: !!(32 & n),
roomAvatarChanged: o >= 4 && !!(64 & n),
invitationCreated: o >= 4 && !!(128 & n),
memberRemoved: o >= 4 && 256 & n ? Pi.decode(d) : null,
locationShared: o >= 27 && 512 & n ? Ri.decode(d) : null,
}
},
},
Id = {
preencode(e, d) {
;(e.end++, o >= 27 && d.locationShared && Ti.preencode(e, d.locationShared))
},
encode(d, n) {
const c =
(n.callStarted ? 1 : 0) |
(n.callHangup ? 2 : 0) |
(n.callMissed ? 4 : 0) |
(o >= 27 && n.locationShared ? 8 : 0)
;(e.uint.encode(d, c), o >= 27 && n.locationShared && Ti.encode(d, n.locationShared))
},
decode(d) {
const n = e.uint.decode(d)
return {
callStarted: !!(1 & n),
callHangup: !!(2 & n),
callMissed: !!(4 & n),
locationShared: o >= 27 && 8 & n ? Ti.decode(d) : null,
}
},
},
qd = {
preencode(d, o) {
;(e.uint.preencode(d, o.start), e.uint.preencode(d, o.length))
},
encode(d, o) {
;(e.uint.encode(d, o.start), e.uint.encode(d, o.length))
},
decode: (d) => ({ start: e.uint.decode(d), length: e.uint.decode(d) }),
},
Ld = e.frame(qd),
jd = {
preencode(d, o) {
;(Ld.preencode(d, o.range), e.string.preencode(d, o.content))
},
encode(d, o) {
;(Ld.encode(d, o.range), e.string.encode(d, o.content))
},
decode: (d) => ({ range: Ld.decode(d), content: e.string.decode(d) }),
},
Ed = Ld,
Bd = {
preencode(d, o) {
;(Ed.preencode(d, o.range), e.fixed32.preencode(d, o.memberKey))
},
encode(d, o) {
;(Ed.encode(d, o.range), e.fixed32.encode(d, o.memberKey))
},
decode: (d) => ({ range: Ed.decode(d), memberKey: e.fixed32.decode(d) }),
},
Vd = K,
Nd = e.array(e.uint),
Ud = {
preencode(d, n) {
;(d.end++,
n.title && e.string.preencode(d, n.title),
n.description && e.string.preencode(d, n.description),
n.file && Vd.preencode(d, n.file),
o >= 12 && n.files && Nd.preencode(d, n.files))
},
encode(d, n) {
const c =
(n.title ? 1 : 0) |
(n.description ? 2 : 0) |
(n.file ? 4 : 0) |
(o >= 12 && n.files ? 8 : 0)
;(e.uint.encode(d, c),
n.title && e.string.encode(d, n.title),
n.description && e.string.encode(d, n.description),
n.file && Vd.encode(d, n.file),
o >= 12 && n.files && Nd.encode(d, n.files))
},
decode(d) {
const n = e.uint.decode(d)
return {
title: 1 & n ? e.string.decode(d) : null,
description: 2 & n ? e.string.decode(d) : null,
file: 4 & n ? Vd.decode(d) : null,
files: o >= 12 && 8 & n ? Nd.decode(d) : null,
}
},
},
Jd = Ld,
Od = e.frame(Ud),
Wd = {
preencode(d, o) {
;(Jd.preencode(d, o.range),
e.string.preencode(d, o.url),
d.end++,
o.preview && Od.preencode(d, o.preview))
},
encode(d, o) {
const n = o.preview ? 1 : 0
;(Jd.encode(d, o.range),
e.string.encode(d, o.url),
e.uint.encode(d, n),
o.preview && Od.encode(d, o.preview))
},
decode: (d) => ({
range: Jd.decode(d),
url: e.string.decode(d),
preview: 1 & e.uint.decode(d) ? Od.decode(d) : null,
}),
},
Hd = e.array(e.frame(Bd)),
zd = e.array(e.frame(Wd)),
Gd = zd,
Qd = e.array(e.frame(qd)),
Xd = Qd,
Yd = Qd,
Zd = e.array(e.frame(jd)),
$d = Qd,
_d = Qd,
eo = {
preencode(d, n) {
const c =
(n.mention ? 1 : 0) |
(n.httpLink ? 2 : 0) |
(n.pearLink ? 4 : 0) |
(n.bold ? 8 : 0) |
(n.italic ? 16 : 0) |
(n.code ? 32 : 0) |
(n.emoji ? 64 : 0) |
(n.codeBlock ? 128 : 0) |
(n.strike ? 256 : 0) |
(o >= 17 && n.translation ? 512 : 0)
;(e.uint.preencode(d, c),
n.mention && Hd.preencode(d, n.mention),
n.httpLink && zd.preencode(d, n.httpLink),
n.pearLink && Gd.preencode(d, n.pearLink),
n.bold && Qd.preencode(d, n.bold),
n.italic && Xd.preencode(d, n.italic),
n.code && Yd.preencode(d, n.code),
n.emoji && Zd.preencode(d, n.emoji),
n.codeBlock && $d.preencode(d, n.codeBlock),
n.strike && _d.preencode(d, n.strike),
o >= 17 && n.translation && Ai.preencode(d, n.translation))
},
encode(d, n) {
const c =
(n.mention ? 1 : 0) |
(n.httpLink ? 2 : 0) |
(n.pearLink ? 4 : 0) |
(n.bold ? 8 : 0) |
(n.italic ? 16 : 0) |
(n.code ? 32 : 0) |
(n.emoji ? 64 : 0) |
(n.codeBlock ? 128 : 0) |
(n.strike ? 256 : 0) |
(o >= 17 && n.translation ? 512 : 0)
;(e.uint.encode(d, c),
n.mention && Hd.encode(d, n.mention),
n.httpLink && zd.encode(d, n.httpLink),
n.pearLink && Gd.encode(d, n.pearLink),
n.bold && Qd.encode(d, n.bold),
n.italic && Xd.encode(d, n.italic),
n.code && Yd.encode(d, n.code),
n.emoji && Zd.encode(d, n.emoji),
n.codeBlock && $d.encode(d, n.codeBlock),
n.strike && _d.encode(d, n.strike),
o >= 17 && n.translation && Ai.encode(d, n.translation))
},
decode(d) {
const n = e.uint.decode(d)
return {
mention: 1 & n ? Hd.decode(d) : null,
httpLink: 2 & n ? zd.decode(d) : null,
pearLink: 4 & n ? Gd.decode(d) : null,
bold: 8 & n ? Qd.decode(d) : null,
italic: 16 & n ? Xd.decode(d) : null,
code: 32 & n ? Yd.decode(d) : null,
emoji: 64 & n ? Zd.decode(d) : null,
codeBlock: 128 & n ? $d.decode(d) : null,
strike: 256 & n ? _d.decode(d) : null,
translation: o >= 17 && 512 & n ? Ai.decode(d) : null,
}
},
},
oo = e.array(e.frame(g)),
no = e.frame(eo),
co = e.frame(Id),
ro = {
preencode(d, o) {
;(d.end++,
o.text && e.string.preencode(d, o.text),
o.files && oo.preencode(d, o.files),
o.display && no.preencode(d, o.display),
o.replyTo && c.preencode(d, o.replyTo),
o.parent && c.preencode(d, o.parent),
o.event && co.preencode(d, o.event))
},
encode(d, n) {
const r =
(n.text ? 1 : 0) |
(n.files ? 2 : 0) |
(n.display ? 4 : 0) |
(n.replyTo ? 8 : 0) |
(n.parent ? 16 : 0) |
(n.event ? 32 : 0) |
(o >= 27 && n.forwarded ? 64 : 0)
;(e.uint.encode(d, r),
n.text && e.string.encode(d, n.text),
n.files && oo.encode(d, n.files),
n.display && no.encode(d, n.display),
n.replyTo && c.encode(d, n.replyTo),
n.parent && c.encode(d, n.parent),
n.event && co.encode(d, n.event))
},
decode(d) {
const n = e.uint.decode(d)
return {
text: 1 & n ? e.string.decode(d) : null,
files: 2 & n ? oo.decode(d) : null,
display: 4 & n ? no.decode(d) : null,
replyTo: 8 & n ? c.decode(d) : null,
parent: 16 & n ? c.decode(d) : null,
event: 32 & n ? co.decode(d) : null,
forwarded: o >= 27 && !!(64 & n),
}
},
},
to = Nd,
io = no,
ao = {
preencode(d, o) {
;(d.end++,
o.text && e.string.preencode(d, o.text),
o.files && to.preencode(d, o.files),
o.display && io.preencode(d, o.display),
o.replyTo && c.preencode(d, o.replyTo),
o.parent && c.preencode(d, o.parent))
},
encode(d, n) {
const r =
(n.text ? 1 : 0) |
(n.files ? 2 : 0) |
(n.display ? 4 : 0) |
(n.replyTo ? 8 : 0) |
(n.parent ? 16 : 0) |
(o >= 27 && n.forwarded ? 32 : 0)
;(e.uint.encode(d, r),
n.text && e.string.encode(d, n.text),
n.files && to.encode(d, n.files),
n.display && io.encode(d, n.display),
n.replyTo && c.encode(d, n.replyTo),
n.parent && c.encode(d, n.parent))
},
decode(d) {
const n = e.uint.decode(d)
return {
text: 1 & n ? e.string.decode(d) : null,
files: 2 & n ? to.decode(d) : null,
display: 4 & n ? io.decode(d) : null,
replyTo: 8 & n ? c.decode(d) : null,
parent: 16 & n ? c.decode(d) : null,
forwarded: o >= 27 && !!(32 & n),
}
},
},
so = oo,
po = no,
uo = {
preencode(d, o) {
;(d.end++,
o.text && e.string.preencode(d, o.text),
o.files && so.preencode(d, o.files),
o.display && po.preencode(d, o.display),
o.replyTo && c.preencode(d, o.replyTo),
o.parent && c.preencode(d, o.parent))
},
encode(d, n) {
const r =
(n.text ? 1 : 0) |
(n.files ? 2 : 0) |
(n.display ? 4 : 0) |
(n.replyTo ? 8 : 0) |
(n.parent ? 16 : 0) |
(o >= 27 && n.forwarded ? 32 : 0)
;(e.uint.encode(d, r),
n.text && e.string.encode(d, n.text),
n.files && so.encode(d, n.files),
n.display && po.encode(d, n.display),
n.replyTo && c.encode(d, n.replyTo),
n.parent && c.encode(d, n.parent))
},
decode(d) {
const n = e.uint.decode(d)
return {
text: 1 & n ? e.string.decode(d) : null,
files: 2 & n ? so.decode(d) : null,
display: 4 & n ? po.decode(d) : null,
replyTo: 8 & n ? c.decode(d) : null,
parent: 16 & n ? c.decode(d) : null,
forwarded: o >= 27 && !!(32 & n),
}
},
},
lo = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = (o.isEdited ? 1 : 0) | (o.isDeleted ? 2 : 0) | (o.isPinned ? 4 : 0)
e.uint.encode(d, n)
},
decode(d) {
const o = e.uint.decode(d)
return { isEdited: !!(1 & o), isDeleted: !!(2 & o), isPinned: !!(4 & o) }
},
},
fo = {
preencode(d, o) {
;(e.uint.preencode(d, o.thread), e.uint.preencode(d, o.index))
},
encode(d, o) {
;(e.uint.encode(d, o.thread), e.uint.encode(d, o.index))
},
decode: (d) => ({ thread: e.uint.decode(d), index: e.uint.decode(d) }),
},
mo = e.frame(U),
yo = {
preencode(d, o) {
;(e.uint.preencode(d, o.id),
e.uint.preencode(d, o.count),
d.end++,
o.parent && c.preencode(d, o.parent),
o.stats && mo.preencode(d, o.stats))
},
encode(d, o) {
const n = (o.parent ? 1 : 0) | (o.stats ? 2 : 0)
;(e.uint.encode(d, o.id),
e.uint.encode(d, o.count),
e.uint.encode(d, n),
o.parent && c.encode(d, o.parent),
o.stats && mo.encode(d, o.stats))
},
decode(d) {
const o = e.uint.decode(d),
n = e.uint.decode(d),
r = e.uint.decode(d)
return {
id: o,
count: n,
parent: 1 & r ? c.decode(d) : null,
stats: 2 & r ? mo.decode(d) : null,
}
},
},
xo = e.frame(lo),
bo = e.frame(ao),
vo = e.frame(Dd),
ko = {
preencode(d, o) {
;(fo.preencode(d, o.id),
c.preencode(d, o.oplog),
e.uint.preencode(d, o.clock),
e.uint.preencode(d, o.timestamp),
d.end++,
o.editedAt && e.uint.preencode(d, o.editedAt),
xo.preencode(d, o.status),
o.message && bo.preencode(d, o.message),
o.event && vo.preencode(d, o.event))
},
encode(d, o) {
const n = (o.editedAt ? 1 : 0) | (o.message ? 2 : 0) | (o.event ? 4 : 0)
;(fo.encode(d, o.id),
c.encode(d, o.oplog),
e.uint.encode(d, o.clock),
e.uint.encode(d, o.timestamp),
e.uint.encode(d, n),
o.editedAt && e.uint.encode(d, o.editedAt),
xo.encode(d, o.status),
o.message && bo.encode(d, o.message),
o.event && vo.encode(d, o.event))
},
decode(d) {
const o = fo.decode(d),
n = c.decode(d),
r = e.uint.decode(d),
t = e.uint.decode(d),
i = e.uint.decode(d)
return {
id: o,
oplog: n,
clock: r,
timestamp: t,
editedAt: 1 & i ? e.uint.decode(d) : 0,
status: xo.decode(d),
message: 2 & i ? bo.decode(d) : null,
event: 4 & i ? vo.decode(d) : null,
}
},
},
go = xo,
Ko = e.frame(uo),
ho = vo,
wo = {
preencode(d, o) {
;(fo.preencode(d, o.id),
c.preencode(d, o.oplog),
e.uint.preencode(d, o.clock),
e.uint.preencode(d, o.timestamp),
d.end++,
o.editedAt && e.uint.preencode(d, o.editedAt),
go.preencode(d, o.status),
o.message && Ko.preencode(d, o.message),
o.event && ho.preencode(d, o.event))
},
encode(d, o) {
const n = (o.editedAt ? 1 : 0) | (o.message ? 2 : 0) | (o.event ? 4 : 0)
;(fo.encode(d, o.id),
c.encode(d, o.oplog),
e.uint.encode(d, o.clock),
e.uint.encode(d, o.timestamp),
e.uint.encode(d, n),
o.editedAt && e.uint.encode(d, o.editedAt),
go.encode(d, o.status),
o.message && Ko.encode(d, o.message),
o.event && ho.encode(d, o.event))
},
decode(d) {
const o = fo.decode(d),
n = c.decode(d),
r = e.uint.decode(d),
t = e.uint.decode(d),
i = e.uint.decode(d)
return {
id: o,
oplog: n,
clock: r,
timestamp: t,
editedAt: 1 & i ? e.uint.decode(d) : 0,
status: go.decode(d),
message: 2 & i ? Ko.decode(d) : null,
event: 4 & i ? ho.decode(d) : null,
}
},
},
Po = _,
Ro = e.frame(ro),
To = {
preencode(e, d) {
;(Po.preencode(e, d.header), Ro.preencode(e, d.message))
},
encode(e, d) {
;(Po.encode(e, d.header), Ro.encode(e, d.message))
},
decode: (e) => ({ header: Po.decode(e), message: Ro.decode(e) }),
},
Ao = _,
Mo = {
preencode(e, d) {
;(Ao.preencode(e, d.header), c.preencode(e, d.oplog))
},
encode(e, d) {
;(Ao.encode(e, d.header), c.encode(e, d.oplog))
},
decode: (e) => ({ header: Ao.decode(e), oplog: c.decode(e) }),
},
So = _,
Co = Ro,
Fo = {
preencode(e, d) {
;(So.preencode(e, d.header), c.preencode(e, d.oplog), Co.preencode(e, d.message))
},
encode(e, d) {
;(So.encode(e, d.header), c.encode(e, d.oplog), Co.encode(e, d.message))
},
decode: (e) => ({ header: So.decode(e), oplog: c.decode(e), message: Co.decode(e) }),
},
Do = _,
Io = {
preencode(e, d) {
;(Do.preencode(e, d.header), c.preencode(e, d.oplog), e.end++)
},
encode(d, o) {
const n = o.isPinned ? 1 : 0
;(Do.encode(d, o.header), c.encode(d, o.oplog), e.uint.encode(d, n))
},
decode: (d) => ({
header: Do.decode(d),
oplog: c.decode(d),
isPinned: !!(1 & e.uint.decode(d)),
}),
},
qo = {
preencode(d, o) {
;(fo.preencode(d, o.id),
e.fixed32.preencode(d, o.sender),
e.uint.preencode(d, o.clock),
e.string.preencode(d, o.reaction))
},
encode(d, o) {
;(fo.encode(d, o.id),
e.fixed32.encode(d, o.sender),
e.uint.encode(d, o.clock),
e.string.encode(d, o.reaction))
},
decode: (d) => ({
id: fo.decode(d),
sender: e.fixed32.decode(d),
clock: e.uint.decode(d),
reaction: e.string.decode(d),
}),
},
Lo = {
preencode(d, o) {
;(e.string.preencode(d, o.text), e.uint.preencode(d, o.count))
},
encode(d, o) {
;(e.string.encode(d, o.text), e.uint.encode(d, o.count))
},
decode: (d) => ({ text: e.string.decode(d), count: e.uint.decode(d) }),
},
jo = e.array(e.frame(Lo)),
Eo = {
preencode(d, n) {
;(fo.preencode(d, n.id),
e.uint.preencode(d, n.total),
jo.preencode(d, n.reactions),
d.end++,
o >= 17 && n.editedAt && e.uint.preencode(d, n.editedAt))
},
encode(d, n) {
const c = o >= 17 && n.editedAt ? 1 : 0
;(fo.encode(d, n.id),
e.uint.encode(d, n.total),
jo.encode(d, n.reactions),
e.uint.encode(d, c),
o >= 17 && n.editedAt && e.uint.encode(d, n.editedAt))
},
decode(d) {
const n = fo.decode(d),
c = e.uint.decode(d),
r = jo.decode(d),
t = d.start < d.end ? e.uint.decode(d) : 0
return { id: n, total: c, reactions: r, editedAt: o >= 17 && 1 & t ? e.uint.decode(d) : 0 }
},
},
Bo = _,
Vo = {
preencode(d, o) {
;(Bo.preencode(d, o.header), c.preencode(d, o.oplog), e.string.preencode(d, o.reaction))
},
encode(d, o) {
;(Bo.encode(d, o.header), c.encode(d, o.oplog), e.string.encode(d, o.reaction))
},
decode: (d) => ({ header: Bo.decode(d), oplog: c.decode(d), reaction: e.string.decode(d) }),
},
No = _,
Uo = {
preencode(d, o) {
;(No.preencode(d, o.header), c.preencode(d, o.oplog), e.string.preencode(d, o.reaction))
},
encode(d, o) {
;(No.encode(d, o.header), c.encode(d, o.oplog), e.string.encode(d, o.reaction))
},
decode: (d) => ({ header: No.decode(d), oplog: c.decode(d), reaction: e.string.decode(d) }),
},
Jo = _,
Oo = e.frame(Z),
Wo = {
preencode(d, o) {
;(Jo.preencode(d, o.header), e.uint.preencode(d, o.key), Oo.preencode(d, o.config))
},
encode(d, o) {
;(Jo.encode(d, o.header), e.uint.encode(d, o.key), Oo.encode(d, o.config))
},
decode: (d) => ({ header: Jo.decode(d), key: e.uint.decode(d), config: Oo.decode(d) }),
},
Ho = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.memberKey),
e.string.preencode(d, o.displayName),
d.end++,
o.avatar && Mi.preencode(d, o.avatar))
},
encode(d, o) {
const n = o.avatar ? 1 : 0
;(e.fixed32.encode(d, o.memberKey),
e.string.encode(d, o.displayName),
e.uint.encode(d, n),
o.avatar && Mi.encode(d, o.avatar))
},
decode: (d) => ({
memberKey: e.fixed32.decode(d),
displayName: e.string.decode(d),
avatar: 1 & e.uint.decode(d) ? Mi.decode(d) : null,
}),
},
zo = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), d.end++, o.username && e.string.preencode(d, o.username))
},
encode(d, o) {
const n = o.username ? 1 : 0
;(e.fixed32.encode(d, o.key),
e.uint.encode(d, n),
o.username && e.string.encode(d, o.username))
},
decode: (d) => ({
key: e.fixed32.decode(d),
username: 1 & e.uint.decode(d) ? e.string.decode(d) : null,
}),
},
Go = e.frame(zo),
Qo = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.publicKey),
d.end++,
o.discoveryCoreKey && e.fixed32.preencode(d, o.discoveryCoreKey),
o.userRegistry && Go.preencode(d, o.userRegistry))
},
encode(d, o) {
const n = (o.discoveryCoreKey ? 1 : 0) | (o.userRegistry ? 2 : 0)
;(e.fixed32.encode(d, o.publicKey),
e.uint.encode(d, n),
o.discoveryCoreKey && e.fixed32.encode(d, o.discoveryCoreKey),
o.userRegistry && Go.encode(d, o.userRegistry))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d)
return {
publicKey: o,
discoveryCoreKey: 1 & n ? e.fixed32.decode(d) : null,
userRegistry: 2 & n ? Go.decode(d) : null,
}
},
},
Xo = _,
Yo = e.frame(G),
Zo = e.frame(Q),
$o = Oo,
_o = e.frame(Qo),
en = be,
dn = e.array(e.frame(le)),
on = {
preencode(e, d) {
;(Xo.preencode(e, d.header),
Yo.preencode(e, d.digest),
Zo.preencode(e, d.capabilities),
e.end++,
d.config && $o.preencode(e, d.config),
d.identity && _o.preencode(e, d.identity),
d.bootstrapDevice && en.preencode(e, d.bootstrapDevice),
d.initialMembers && dn.preencode(e, d.initialMembers))
},
encode(d, o) {
const n =
(o.config ? 1 : 0) |
(o.identity ? 2 : 0) |
(o.bootstrapDevice ? 4 : 0) |
(o.initialMembers ? 8 : 0)
;(Xo.encode(d, o.header),
Yo.encode(d, o.digest),
Zo.encode(d, o.capabilities),
e.uint.encode(d, n),
o.config && $o.encode(d, o.config),
o.identity && _o.encode(d, o.identity),
o.bootstrapDevice && en.encode(d, o.bootstrapDevice),
o.initialMembers && dn.encode(d, o.initialMembers))
},
decode(d) {
const o = Xo.decode(d),
n = Yo.decode(d),
c = Zo.decode(d),
r = e.uint.decode(d)
return {
header: o,
digest: n,
capabilities: c,
config: 1 & r ? $o.decode(d) : null,
identity: 2 & r ? _o.decode(d) : null,
bootstrapDevice: 4 & r ? en.decode(d) : null,
initialMembers: 8 & r ? dn.decode(d) : null,
}
},
},
nn = _,
cn = {
preencode(d, o) {
;(nn.preencode(d, o.header), e.uint.preencode(d, o.version))
},
encode(d, o) {
;(nn.encode(d, o.header), e.uint.encode(d, o.version))
},
decode: (d) => ({ header: nn.decode(d), version: e.uint.decode(d) }),
},
rn = _,
tn = z,
an = {
preencode(d, o) {
;(rn.preencode(d, o.header), e.uint.preencode(d, o.key), tn.preencode(d, o.settings))
},
encode(d, o) {
;(rn.encode(d, o.header), e.uint.encode(d, o.key), tn.encode(d, o.settings))
},
decode: (d) => ({ header: rn.decode(d), key: e.uint.decode(d), settings: tn.decode(d) }),
},
sn = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.memberKey),
Si.preencode(d, o.status),
d.end++,
o.mailbox && e.fixed32.preencode(d, o.mailbox),
o.roomKey && e.fixed32.preencode(d, o.roomKey))
},
encode(d, o) {
const n = (o.mailbox ? 1 : 0) | (o.roomKey ? 2 : 0)
;(e.fixed32.encode(d, o.memberKey),
Si.encode(d, o.status),
e.uint.encode(d, n),
o.mailbox && e.fixed32.encode(d, o.mailbox),
o.roomKey && e.fixed32.encode(d, o.roomKey))
},
decode(d) {
const o = e.fixed32.decode(d),
n = Si.decode(d),
c = e.uint.decode(d)
return {
memberKey: o,
status: n,
mailbox: 1 & c ? e.fixed32.decode(d) : null,
roomKey: 2 & c ? e.fixed32.decode(d) : null,
}
},
},
pn = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey),
e.buffer.preencode(d, o.encryptionKey),
e.fixed32.preencode(d, o.seed),
n.preencode(d, o.initiator),
e.fixed32.preencode(d, o.fastForwardTo))
},
encode(d, o) {
;(e.fixed32.encode(d, o.roomKey),
e.buffer.encode(d, o.encryptionKey),
e.fixed32.encode(d, o.seed),
n.encode(d, o.initiator),
e.fixed32.encode(d, o.fastForwardTo))
},
decode: (d) => ({
roomKey: e.fixed32.decode(d),
encryptionKey: e.buffer.decode(d),
seed: e.fixed32.decode(d),
initiator: n.decode(d),
fastForwardTo: e.fixed32.decode(d),
}),
},
un = e.array(e.frame(pn)),
ln = Y,
fn = {
preencode(e, d) {
;(un.preencode(e, d.sharedRooms), ln.preencode(e, d.blockedContacts))
},
encode(e, d) {
;(un.encode(e, d.sharedRooms), ln.encode(e, d.blockedContacts))
},
decode: (e) => ({ sharedRooms: un.decode(e), blockedContacts: ln.decode(e) }),
},
mn = _o,
yn = {
preencode(e, d) {
mn.preencode(e, d.identity)
},
encode(e, d) {
mn.encode(e, d.identity)
},
decode: (e) => ({ identity: mn.decode(e) }),
},
xn = {
preencode(d, o) {
;(e.uint.preencode(d, o.rooms), e.uint.preencode(d, o.contacts))
},
encode(d, o) {
;(e.uint.encode(d, o.rooms), e.uint.encode(d, o.contacts))
},
decode: (d) => ({ rooms: e.uint.decode(d), contacts: e.uint.decode(d) }),
},
bn = {
preencode(d, o) {
;(e.uint.preencode(d, o.rooms), e.uint.preencode(d, o.contactRequests))
},
encode(d, o) {
;(e.uint.encode(d, o.rooms), e.uint.encode(d, o.contactRequests))
},
decode: (d) => ({ rooms: e.uint.decode(d), contactRequests: e.uint.decode(d) }),
},
vn = {
preencode(d, o) {
e.buffer.preencode(d, o.entropy)
},
encode(d, o) {
e.buffer.encode(d, o.entropy)
},
decode: (d) => ({ entropy: e.buffer.decode(d) }),
},
kn = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.publicKey),
e.fixed32.preencode(d, o.devicePublicKey),
e.fixed32.preencode(d, o.writerKey))
},
encode(d, o) {
;(e.fixed32.encode(d, o.publicKey),
e.fixed32.encode(d, o.devicePublicKey),
e.fixed32.encode(d, o.writerKey))
},
decode: (d) => ({
publicKey: e.fixed32.decode(d),
devicePublicKey: e.fixed32.decode(d),
writerKey: e.fixed32.decode(d),
}),
},
gn = e.frame(kn),
Kn = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.id),
e.fixed32.preencode(d, o.invitationSeed),
e.fixed32.preencode(d, o.mailbox),
t.preencode(d, o.responseKeyPair),
n.preencode(d, o.initiator),
n.preencode(d, o.inviter),
d.end++,
o.identity && gn.preencode(d, o.identity))
},
encode(d, o) {
const c = o.identity ? 1 : 0
;(e.fixed32.encode(d, o.id),
e.fixed32.encode(d, o.invitationSeed),
e.fixed32.encode(d, o.mailbox),
t.encode(d, o.responseKeyPair),
n.encode(d, o.initiator),
n.encode(d, o.inviter),
e.uint.encode(d, c),
o.identity && gn.encode(d, o.identity))
},
decode: (d) => ({
id: e.fixed32.decode(d),
invitationSeed: e.fixed32.decode(d),
mailbox: e.fixed32.decode(d),
responseKeyPair: t.decode(d),
initiator: n.decode(d),
inviter: n.decode(d),
identity: 1 & e.uint.decode(d) ? gn.decode(d) : null,
}),
},
hn = _,
wn = {
preencode(d, o) {
;(hn.preencode(d, o.header), e.buffer.preencode(d, o.blindResponse))
},
encode(d, o) {
;(hn.encode(d, o.header), e.buffer.encode(d, o.blindResponse))
},
decode: (d) => ({ header: hn.decode(d), blindResponse: e.buffer.decode(d) }),
},
Pn = _,
Rn = e.frame(Kn),
Tn = {
preencode(e, d) {
;(Pn.preencode(e, d.header), Rn.preencode(e, d.invitation))
},
encode(e, d) {
;(Pn.encode(e, d.header), Rn.encode(e, d.invitation))
},
decode: (e) => ({ header: Pn.decode(e), invitation: Rn.decode(e) }),
},
An = _,
Mn = {
preencode(d, o) {
;(An.preencode(d, o.header), e.fixed32.preencode(d, o.id))
},
encode(d, o) {
;(An.encode(d, o.header), e.fixed32.encode(d, o.id))
},
decode: (d) => ({ header: An.decode(d), id: e.fixed32.decode(d) }),
},
Sn = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.publicKey),
e.fixed32.preencode(d, o.devicePublicKey),
d.end++,
o.privateProfileKey && e.fixed32.preencode(d, o.privateProfileKey),
o.deviceKeyPair && t.preencode(d, o.deviceKeyPair),
e.buffer.preencode(d, o.deviceProof))
},
encode(d, o) {
const n = (o.privateProfileKey ? 1 : 0) | (o.deviceKeyPair ? 2 : 0)
;(e.fixed32.encode(d, o.publicKey),
e.fixed32.encode(d, o.devicePublicKey),
e.uint.encode(d, n),
o.privateProfileKey && e.fixed32.encode(d, o.privateProfileKey),
o.deviceKeyPair && t.encode(d, o.deviceKeyPair),
e.buffer.encode(d, o.deviceProof))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.fixed32.decode(d),
c = e.uint.decode(d)
return {
publicKey: o,
devicePublicKey: n,
privateProfileKey: 1 & c ? e.fixed32.decode(d) : null,
deviceKeyPair: 2 & c ? t.decode(d) : null,
deviceProof: e.buffer.decode(d),
}
},
},
Cn = {
preencode(e, d) {
e.end++
},
encode(d, n) {
const c =
(n.isActive ? 1 : 0) |
(n.isFullyMuted ? 2 : 0) |
(n.isMentionsOnlyMuted ? 4 : 0) |
(o >= 14 && n.isReadOnly ? 8 : 0) |
(o >= 27 && n.isFavorite ? 16 : 0)
e.uint.encode(d, c)
},
decode(d) {
const n = e.uint.decode(d)
return {
isActive: !!(1 & n),
isFullyMuted: !!(2 & n),
isMentionsOnlyMuted: !!(4 & n),
isReadOnly: o >= 14 && !!(8 & n),
isFavorite: o >= 27 && !!(16 & n),
}
},
},
Fn = e.frame(Cn),
Dn = e.frame(Sn),
In = gn,
qn = {
preencode(d, c) {
;(e.fixed32.preencode(d, c.roomKey),
e.buffer.preencode(d, c.encryptionKey),
e.fixed32.preencode(d, c.mailbox),
Fn.preencode(d, c.status),
e.uint.preencode(d, c.clock),
d.end++,
c.initiator && n.preencode(d, c.initiator),
c.fastForwardTo && e.fixed32.preencode(d, c.fastForwardTo),
c.identitySwap && Dn.preencode(d, c.identitySwap),
o >= 9 && c.identitySwapV2 && In.preencode(d, c.identitySwapV2),
o >= 15 && c.contact && e.fixed32.preencode(d, c.contact))
},
encode(d, c) {
const r =
(c.initiator ? 1 : 0) |
(c.fastForwardTo ? 2 : 0) |
(c.identitySwap ? 4 : 0) |
(o >= 9 && c.identitySwapV2 ? 8 : 0) |
(o >= 15 && c.contact ? 16 : 0)
;(e.fixed32.encode(d, c.roomKey),
e.buffer.encode(d, c.encryptionKey),
e.fixed32.encode(d, c.mailbox),
Fn.encode(d, c.status),
e.uint.encode(d, c.clock),
e.uint.encode(d, r),
c.initiator && n.encode(d, c.initiator),
c.fastForwardTo && e.fixed32.encode(d, c.fastForwardTo),
c.identitySwap && Dn.encode(d, c.identitySwap),
o >= 9 && c.identitySwapV2 && In.encode(d, c.identitySwapV2),
o >= 15 && c.contact && e.fixed32.encode(d, c.contact))
},
decode(d) {
const c = e.fixed32.decode(d),
r = e.buffer.decode(d),
t = e.fixed32.decode(d),
i = Fn.decode(d),
a = e.uint.decode(d),
s = e.uint.decode(d)
return {
roomKey: c,
encryptionKey: r,
mailbox: t,
status: i,
clock: a,
initiator: 1 & s ? n.decode(d) : null,
fastForwardTo: 2 & s ? e.fixed32.decode(d) : null,
identitySwap: 4 & s ? Dn.decode(d) : null,
identitySwapV2: o >= 9 && 8 & s ? In.decode(d) : null,
contact: o >= 15 && 16 & s ? e.fixed32.decode(d) : null,
}
},
},
Ln = _,
jn = {
preencode(d, o) {
;(Ln.preencode(d, o.header),
e.fixed32.preencode(d, o.roomKey),
e.buffer.preencode(d, o.encryptionKey),
e.fixed32.preencode(d, o.mailbox),
d.end++,
o.fastForwardTo && e.fixed32.preencode(d, o.fastForwardTo),
o.initiator && n.preencode(d, o.initiator),
o.dm && e.fixed32.preencode(d, o.dm))
},
encode(d, c) {
const r =
(c.fastForwardTo ? 1 : 0) |
(c.initiator ? 2 : 0) |
(c.dm ? 4 : 0) |
(o >= 14 && c.isReadOnly ? 8 : 0)
;(Ln.encode(d, c.header),
e.fixed32.encode(d, c.roomKey),
e.buffer.encode(d, c.encryptionKey),
e.fixed32.encode(d, c.mailbox),
e.uint.encode(d, r),
c.fastForwardTo && e.fixed32.encode(d, c.fastForwardTo),
c.initiator && n.encode(d, c.initiator),
c.dm && e.fixed32.encode(d, c.dm))
},
decode(d) {
const c = Ln.decode(d),
r = e.fixed32.decode(d),
t = e.buffer.decode(d),
i = e.fixed32.decode(d),
a = e.uint.decode(d)
return {
header: c,
roomKey: r,
encryptionKey: t,
mailbox: i,
fastForwardTo: 1 & a ? e.fixed32.decode(d) : null,
initiator: 2 & a ? n.decode(d) : null,
dm: 4 & a ? e.fixed32.decode(d) : null,
isReadOnly: o >= 14 && !!(8 & a),
}
},
},
En = _,
Bn = {
preencode(d, o) {
;(En.preencode(d, o.header), e.fixed32.preencode(d, o.discoveryKey))
},
encode(d, o) {
;(En.encode(d, o.header), e.fixed32.encode(d, o.discoveryKey))
},
decode: (d) => ({ header: En.decode(d), discoveryKey: e.fixed32.decode(d) }),
},
Vn = _,
Nn = Fn,
Un = {
preencode(d, o) {
;(Vn.preencode(d, o.header),
e.fixed32.preencode(d, o.roomKey),
e.uint.preencode(d, o.key),
Nn.preencode(d, o.status))
},
encode(d, o) {
;(Vn.encode(d, o.header),
e.fixed32.encode(d, o.roomKey),
e.uint.encode(d, o.key),
Nn.encode(d, o.status))
},
decode: (d) => ({
header: Vn.decode(d),
roomKey: e.fixed32.decode(d),
key: e.uint.decode(d),
status: Nn.decode(d),
}),
},
Jn = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = o.isBlocked ? 1 : 0
e.uint.encode(d, n)
},
decode: (d) => ({ isBlocked: !!(1 & e.uint.decode(d)) }),
},
On = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.memberKey),
e.uint.preencode(d, o.clock),
Ci.preencode(d, o.status),
d.end++,
o.mailbox && e.fixed32.preencode(d, o.mailbox),
o.roomKey && e.fixed32.preencode(d, o.roomKey))
},
encode(d, o) {
const n = (o.mailbox ? 1 : 0) | (o.roomKey ? 2 : 0)
;(e.fixed32.encode(d, o.memberKey),
e.uint.encode(d, o.clock),
Ci.encode(d, o.status),
e.uint.encode(d, n),
o.mailbox && e.fixed32.encode(d, o.mailbox),
o.roomKey && e.fixed32.encode(d, o.roomKey))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d),
c = Ci.decode(d),
r = e.uint.decode(d)
return {
memberKey: o,
clock: n,
status: c,
mailbox: 1 & r ? e.fixed32.decode(d) : null,
roomKey: 2 & r ? e.fixed32.decode(d) : null,
}
},
},
Wn = _,
Hn = e.frame(sn),
zn = {
preencode(e, d) {
;(Wn.preencode(e, d.header), Hn.preencode(e, d.contact))
},
encode(e, d) {
;(Wn.encode(e, d.header), Hn.encode(e, d.contact))
},
decode: (e) => ({ header: Wn.decode(e), contact: Hn.decode(e) }),
},
Gn = _,
Qn = {
preencode(d, o) {
;(Gn.preencode(d, o.header),
e.fixed32.preencode(d, o.memberKey),
e.uint.preencode(d, o.key),
Fi.preencode(d, o.status))
},
encode(d, o) {
;(Gn.encode(d, o.header),
e.fixed32.encode(d, o.memberKey),
e.uint.encode(d, o.key),
Fi.encode(d, o.status))
},
decode: (d) => ({
header: Gn.decode(d),
memberKey: e.fixed32.decode(d),
key: e.uint.decode(d),
status: Fi.decode(d),
}),
},
Xn = _,
Yn = {
preencode(d, o) {
;(Xn.preencode(d, o.header), e.fixed32.preencode(d, o.memberKey))
},
encode(d, o) {
;(Xn.encode(d, o.header), e.fixed32.encode(d, o.memberKey))
},
decode: (d) => ({ header: Xn.decode(d), memberKey: e.fixed32.decode(d) }),
},
Zn = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n =
(o.isPending ? 1 : 0) |
(o.isAccepted ? 2 : 0) |
(o.isRejected ? 4 : 0) |
(o.isDiscarded ? 8 : 0) |
(o.isSeen ? 16 : 0)
e.uint.encode(d, n)
},
decode(d) {
const o = e.uint.decode(d)
return {
isPending: !!(1 & o),
isAccepted: !!(2 & o),
isRejected: !!(4 & o),
isDiscarded: !!(8 & o),
isSeen: !!(16 & o),
}
},
},
$n = ve,
_n = e.frame(i),
ec = {
preencode(d, o) {
;($n.preencode(d, o.sender),
_n.preencode(d, o.keys),
e.fixed32.preencode(d, o.mailbox),
d.end++,
o.message && e.string.preencode(d, o.message))
},
encode(d, o) {
const n = o.message ? 1 : 0
;($n.encode(d, o.sender),
_n.encode(d, o.keys),
e.fixed32.encode(d, o.mailbox),
e.uint.encode(d, n),
o.message && e.string.encode(d, o.message))
},
decode: (d) => ({
sender: $n.decode(d),
keys: _n.decode(d),
mailbox: e.fixed32.decode(d),
message: 1 & e.uint.decode(d) ? e.string.decode(d) : null,
}),
},
dc = e.frame(ec),
oc = {
preencode(e, d) {
;(dc.preencode(e, d.body), ce.preencode(e, d.attestation))
},
encode(e, d) {
;(dc.encode(e, d.body), ce.encode(e, d.attestation))
},
decode: (e) => ({ body: dc.decode(e), attestation: ce.decode(e) }),
},
nc = ue,
cc = e.frame(Zn),
rc = _n,
tc = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.memberKey),
e.uint.preencode(d, n.clock),
nc.preencode(d, n.sender),
cc.preencode(d, n.status),
rc.preencode(d, n.keys),
e.fixed32.preencode(d, n.mailbox),
d.end++,
n.message && e.string.preencode(d, n.message),
o >= 17 && n.sentAt && e.uint.preencode(d, n.sentAt))
},
encode(d, n) {
const c = (n.message ? 1 : 0) | (o >= 17 && n.sentAt ? 2 : 0)
;(e.fixed32.encode(d, n.memberKey),
e.uint.encode(d, n.clock),
nc.encode(d, n.sender),
cc.encode(d, n.status),
rc.encode(d, n.keys),
e.fixed32.encode(d, n.mailbox),
e.uint.encode(d, c),
n.message && e.string.encode(d, n.message),
o >= 17 && n.sentAt && e.uint.encode(d, n.sentAt))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.uint.decode(d),
r = nc.decode(d),
t = cc.decode(d),
i = rc.decode(d),
a = e.fixed32.decode(d),
s = e.uint.decode(d)
return {
memberKey: n,
clock: c,
sender: r,
status: t,
keys: i,
mailbox: a,
message: 1 & s ? e.string.decode(d) : null,
sentAt: o >= 17 && 2 & s ? e.uint.decode(d) : 0,
}
},
},
ic = _,
ac = {
preencode(d, o) {
;(ic.preencode(d, o.header), e.buffer.preencode(d, o.blindRequest))
},
encode(d, o) {
;(ic.encode(d, o.header), e.buffer.encode(d, o.blindRequest))
},
decode: (d) => ({ header: ic.decode(d), blindRequest: e.buffer.decode(d) }),
},
sc = _,
pc = cc,
uc = {
preencode(d, n) {
;(sc.preencode(d, n.header),
e.fixed32.preencode(d, n.memberKey),
e.uint.preencode(d, n.key),
pc.preencode(d, n.status),
d.end++,
o >= 15 && n.roomKey && e.fixed32.preencode(d, n.roomKey))
},
encode(d, n) {
const c = o >= 15 && n.roomKey ? 1 : 0
;(sc.encode(d, n.header),
e.fixed32.encode(d, n.memberKey),
e.uint.encode(d, n.key),
pc.encode(d, n.status),
e.uint.encode(d, c),
o >= 15 && n.roomKey && e.fixed32.encode(d, n.roomKey))
},
decode(d) {
const n = sc.decode(d),
c = e.fixed32.decode(d),
r = e.uint.decode(d),
t = pc.decode(d),
i = d.start < d.end ? e.uint.decode(d) : 0
return {
header: n,
memberKey: c,
key: r,
status: t,
roomKey: o >= 15 && 1 & i ? e.fixed32.decode(d) : null,
}
},
},
lc = {
preencode(d, o) {
;(e.uint.preencode(d, o.timestamp),
e.fixed32.preencode(d, o.key),
e.fixed32.preencode(d, o.mailbox))
},
encode(d, o) {
;(e.uint.encode(d, o.timestamp), e.fixed32.encode(d, o.key), e.fixed32.encode(d, o.mailbox))
},
decode: (d) => ({
version: e.uint.decode(d),
timestamp: e.uint.decode(d),
key: e.fixed32.decode(d),
mailbox: e.fixed32.decode(d),
}),
},
fc = {
preencode(d, o) {
switch ((e.uint.preencode(d, o.version), o.version)) {
case 0:
case 1:
lc.preencode(d, o)
break
default:
throw new Error("Unsupported version")
}
},
encode(d, o) {
switch ((e.uint.encode(d, o.version), o.version)) {
case 0:
case 1:
lc.encode(d, o)
break
default:
throw new Error("Unsupported version")
}
},
decode(d) {
const o = d.start,
n = e.uint.decode(d)
switch (((d.start = o), n)) {
case 0:
case 1:
return lc.decode(d)
default:
throw new Error("Unsupported version")
}
},
},
mc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.discoveryPublicKey),
e.uint.preencode(d, o.timestamp),
d.end++,
o.lastSynced && e.uint.preencode(d, o.lastSynced))
},
encode(d, o) {
const n = (o.lastSynced ? 1 : 0) | (o.dirty ? 2 : 0)
;(e.fixed32.encode(d, o.discoveryPublicKey),
e.uint.encode(d, o.timestamp),
e.uint.encode(d, n),
o.lastSynced && e.uint.encode(d, o.lastSynced))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d),
c = e.uint.decode(d)
return {
discoveryPublicKey: o,
timestamp: n,
lastSynced: 1 & c ? e.uint.decode(d) : 0,
dirty: !!(2 & c),
}
},
},
yc = {
preencode(d, o) {
;(e.uint.preencode(d, o.rooms), e.uint.preencode(d, o.activeRooms))
},
encode(d, o) {
;(e.uint.encode(d, o.rooms), e.uint.encode(d, o.activeRooms))
},
decode: (d) => ({ rooms: e.uint.decode(d), activeRooms: e.uint.decode(d) }),
},
xc = D,
bc = Y,
vc = {
preencode(e, d) {
;(e.end++, d.blockedMembers && bc.preencode(e, d.blockedMembers))
},
encode(d, o) {
const n = o.blockedMembers ? 1 : 0
;(e.uint.encode(d, n), o.blockedMembers && bc.encode(d, o.blockedMembers))
},
decode: (d) => ({ blockedMembers: 1 & e.uint.decode(d) ? bc.decode(d) : null }),
},
kc = e.frame(X),
gc = e.frame(vc),
Kc = {
preencode(d, o) {
;(e.buffer.preencode(d, o.encryptionKey),
e.fixed32.preencode(d, o.seed),
kc.preencode(d, o.capabilities),
n.preencode(d, o.initiator),
e.fixed32.preencode(d, o.fastForwardTo),
d.end++,
o.privateProfile && gc.preencode(d, o.privateProfile))
},
encode(d, o) {
const c = o.privateProfile ? 1 : 0
;(e.buffer.encode(d, o.encryptionKey),
e.fixed32.encode(d, o.seed),
kc.encode(d, o.capabilities),
n.encode(d, o.initiator),
e.fixed32.encode(d, o.fastForwardTo),
e.uint.encode(d, c),
o.privateProfile && gc.encode(d, o.privateProfile))
},
decode: (d) => ({
encryptionKey: e.buffer.decode(d),
seed: e.fixed32.decode(d),
capabilities: kc.decode(d),
initiator: n.decode(d),
fastForwardTo: e.fixed32.decode(d),
privateProfile: 1 & e.uint.decode(d) ? gc.decode(d) : null,
}),
},
hc = {
preencode(d, o) {
;(d.end++, o.count && e.uint.preencode(d, o.count))
},
encode(d, o) {
const n = o.count ? 1 : 0
;(e.uint.encode(d, n), o.count && e.uint.encode(d, o.count))
},
decode: (d) => ({ count: 1 & e.uint.decode(d) ? e.uint.decode(d) : 0 }),
},
wc = e.frame(Kc),
Pc = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.roomKey),
e.uint.preencode(d, n.priority),
d.end++,
n.v3 && wc.preencode(d, n.v3),
o >= 5 && n.timestamp && e.uint.preencode(d, n.timestamp))
},
encode(d, n) {
const c = (n.v3 ? 1 : 0) | (o >= 3 && n.errored ? 2 : 0) | (o >= 5 && n.timestamp ? 4 : 0)
;(e.fixed32.encode(d, n.roomKey),
e.uint.encode(d, n.priority),
e.uint.encode(d, c),
n.v3 && wc.encode(d, n.v3),
o >= 5 && n.timestamp && e.uint.encode(d, n.timestamp))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.uint.decode(d),
r = e.uint.decode(d)
return {
roomKey: n,
priority: c,
v3: 1 & r ? wc.decode(d) : null,
errored: o >= 3 && !!(2 & r),
timestamp: o >= 5 && 4 & r ? e.uint.decode(d) : 0,
}
},
},
Rc = {
preencode(e, d) {
e.end++
},
encode(d, o) {
const n = o.isConfirmed ? 1 : 0
e.uint.encode(d, n)
},
decode: (d) => ({ isConfirmed: !!(1 & e.uint.decode(d)) }),
},
Tc = e.frame(Rc),
Ac = Dn,
Mc = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.publicKey),
e.fixed32.preencode(d, n.privateProfileKey),
t.preencode(d, n.deviceKeyPair),
e.buffer.preencode(d, n.deviceProof),
Tc.preencode(d, n.status),
d.end++,
n.entropy && e.buffer.preencode(d, n.entropy),
n.swap && Ac.preencode(d, n.swap),
o >= 9 && n.swapV2 && Di.preencode(d, n.swapV2))
},
encode(d, n) {
const c = (n.entropy ? 1 : 0) | (n.swap ? 2 : 0) | (o >= 9 && n.swapV2 ? 4 : 0)
;(e.fixed32.encode(d, n.publicKey),
e.fixed32.encode(d, n.privateProfileKey),
t.encode(d, n.deviceKeyPair),
e.buffer.encode(d, n.deviceProof),
Tc.encode(d, n.status),
e.uint.encode(d, c),
n.entropy && e.buffer.encode(d, n.entropy),
n.swap && Ac.encode(d, n.swap),
o >= 9 && n.swapV2 && Di.encode(d, n.swapV2))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = t.decode(d),
i = e.buffer.decode(d),
a = Tc.decode(d),
s = e.uint.decode(d)
return {
publicKey: n,
privateProfileKey: c,
deviceKeyPair: r,
deviceProof: i,
status: a,
entropy: 1 & s ? e.buffer.decode(d) : null,
swap: 2 & s ? Ac.decode(d) : null,
swapV2: o >= 9 && 4 & s ? Di.decode(d) : null,
}
},
},
Sc = {
RestoreIdentity: 1,
CreateRoom: 2,
LeaveRoom: 3,
ClearRoom: 4,
JoinRoomInvitation: 5,
JoinRoomKeys: 6,
JoinRoomResponse: 7,
SendContactRequest: 8,
TestFastTask: 9,
TestSlowTask: 10,
TestErrorTask: 11,
},
Cc = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 11) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
Fc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey),
e.buffer.preencode(d, o.encryptionKey),
d.end++,
o.fastForwardTo && e.fixed32.preencode(d, o.fastForwardTo),
o.initiator && n.preencode(d, o.initiator))
},
encode(d, o) {
const c = (o.fastForwardTo ? 1 : 0) | (o.initiator ? 2 : 0)
;(e.fixed32.encode(d, o.roomKey),
e.buffer.encode(d, o.encryptionKey),
e.uint.encode(d, c),
o.fastForwardTo && e.fixed32.encode(d, o.fastForwardTo),
o.initiator && n.encode(d, o.initiator))
},
decode(d) {
const o = e.fixed32.decode(d),
c = e.buffer.decode(d),
r = e.uint.decode(d)
return {
roomKey: o,
encryptionKey: c,
fastForwardTo: 1 & r ? e.fixed32.decode(d) : null,
initiator: 2 & r ? n.decode(d) : null,
}
},
},
Dc = Rn,
Ic = {
preencode(e, d) {
Dc.preencode(e, d.invitation)
},
encode(e, d) {
Dc.encode(e, d.invitation)
},
decode: (e) => ({ invitation: Dc.decode(e) }),
},
qc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.mailbox),
t.preencode(d, o.keyPair),
e.buffer.preencode(d, o.response))
},
encode(d, o) {
;(e.fixed32.encode(d, o.mailbox), t.encode(d, o.keyPair), e.buffer.encode(d, o.response))
},
decode: (d) => ({
mailbox: e.fixed32.decode(d),
keyPair: t.decode(d),
response: e.buffer.decode(d),
}),
},
Lc = $,
jc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey),
e.buffer.preencode(d, o.encryptionKey),
d.end++,
o.fastForwardTo && e.fixed32.preencode(d, o.fastForwardTo),
o.initiator && n.preencode(d, o.initiator),
o.mailbox && e.fixed32.preencode(d, o.mailbox))
},
encode(d, o) {
const c = (o.fastForwardTo ? 1 : 0) | (o.initiator ? 2 : 0) | (o.mailbox ? 4 : 0)
;(e.fixed32.encode(d, o.roomKey),
e.buffer.encode(d, o.encryptionKey),
e.uint.encode(d, c),
o.fastForwardTo && e.fixed32.encode(d, o.fastForwardTo),
o.initiator && n.encode(d, o.initiator),
o.mailbox && e.fixed32.encode(d, o.mailbox))
},
decode(d) {
const o = e.fixed32.decode(d),
c = e.buffer.decode(d),
r = e.uint.decode(d)
return {
roomKey: o,
encryptionKey: c,
fastForwardTo: 1 & r ? e.fixed32.decode(d) : null,
initiator: 2 & r ? n.decode(d) : null,
mailbox: 4 & r ? e.fixed32.decode(d) : null,
}
},
},
Ec = e.frame(jc),
Bc = {
preencode(e, d) {
Ec.preencode(e, d.keys)
},
encode(e, d) {
Ec.encode(e, d.keys)
},
decode: (e) => ({ keys: Ec.decode(e) }),
},
Vc = e.frame(on),
Nc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey),
e.buffer.preencode(d, o.encryptionKey),
d.end++,
o.fastForwardTo && e.fixed32.preencode(d, o.fastForwardTo),
o.initiator && n.preencode(d, o.initiator),
o.mailbox && e.fixed32.preencode(d, o.mailbox),
o.keyPair && t.preencode(d, o.keyPair),
o.genesis && Vc.preencode(d, o.genesis))
},
encode(d, o) {
const c =
(o.fastForwardTo ? 1 : 0) |
(o.initiator ? 2 : 0) |
(o.mailbox ? 4 : 0) |
(o.keyPair ? 8 : 0) |
(o.genesis ? 16 : 0) |
(o.isPrivateProfile ? 32 : 0)
;(e.fixed32.encode(d, o.roomKey),
e.buffer.encode(d, o.encryptionKey),
e.uint.encode(d, c),
o.fastForwardTo && e.fixed32.encode(d, o.fastForwardTo),
o.initiator && n.encode(d, o.initiator),
o.mailbox && e.fixed32.encode(d, o.mailbox),
o.keyPair && t.encode(d, o.keyPair),
o.genesis && Vc.encode(d, o.genesis))
},
decode(d) {
const o = e.fixed32.decode(d),
c = e.buffer.decode(d),
r = e.uint.decode(d)
return {
roomKey: o,
encryptionKey: c,
fastForwardTo: 1 & r ? e.fixed32.decode(d) : null,
initiator: 2 & r ? n.decode(d) : null,
mailbox: 4 & r ? e.fixed32.decode(d) : null,
keyPair: 8 & r ? t.decode(d) : null,
genesis: 16 & r ? Vc.decode(d) : null,
isPrivateProfile: !!(32 & r),
}
},
},
Uc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey), d.end++)
},
encode(d, o) {
const n = o.isGossiped ? 1 : 0
;(e.fixed32.encode(d, o.roomKey), e.uint.encode(d, n))
},
decode: (d) => ({ roomKey: e.fixed32.decode(d), isGossiped: !!(1 & e.uint.decode(d)) }),
},
Jc = {
preencode(d, o) {
e.fixed32.preencode(d, o.roomKey)
},
encode(d, o) {
e.fixed32.encode(d, o.roomKey)
},
decode: (d) => ({ roomKey: e.fixed32.decode(d) }),
},
Oc = {
preencode(d, o) {
;(e.string.preencode(d, o.mnemonic),
d.end++,
o.profileDiscoveryTimeout && e.uint.preencode(d, o.profileDiscoveryTimeout))
},
encode(d, o) {
const n = (o.profileDiscoveryTimeout ? 1 : 0) | (o.recover ? 2 : 0)
;(e.string.encode(d, o.mnemonic),
e.uint.encode(d, n),
o.profileDiscoveryTimeout && e.uint.encode(d, o.profileDiscoveryTimeout))
},
decode(d) {
const o = e.string.decode(d),
n = e.uint.decode(d)
return {
mnemonic: o,
profileDiscoveryTimeout: 1 & n ? e.uint.decode(d) : 0,
recover: !!(2 & n),
}
},
},
Wc = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.roomKey),
e.fixed32.preencode(d, n.memberKey),
d.end++,
n.message && e.string.preencode(d, n.message),
o >= 6 && n.contactInfo && Ii.preencode(d, n.contactInfo))
},
encode(d, n) {
const c = (n.message ? 1 : 0) | (o >= 6 && n.contactInfo ? 2 : 0)
;(e.fixed32.encode(d, n.roomKey),
e.fixed32.encode(d, n.memberKey),
e.uint.encode(d, c),
n.message && e.string.encode(d, n.message),
o >= 6 && n.contactInfo && Ii.encode(d, n.contactInfo))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = e.uint.decode(d)
return {
roomKey: n,
memberKey: c,
message: 1 & r ? e.string.decode(d) : null,
contactInfo: o >= 6 && 2 & r ? Ii.decode(d) : null,
}
},
},
Hc = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), d.end++)
},
encode(d, o) {
const n = o.isPrivateProfile ? 1 : 0
;(e.fixed32.encode(d, o.key), e.uint.encode(d, n))
},
decode: (d) => ({ key: e.fixed32.decode(d), isPrivateProfile: !!(1 & e.uint.decode(d)) }),
},
zc = e.frame(Oc),
Gc = e.frame(Nc),
Qc = e.frame(Uc),
Xc = e.frame(Jc),
Yc = e.frame(Ic),
Zc = e.frame(Bc),
$c = e.frame(qc),
_c = e.frame(Wc),
er = e.frame(Hc),
dr = {
preencode(d, o) {
const n =
(o.restoreIdentity ? 1 : 0) |
(o.createRoom ? 2 : 0) |
(o.leaveRoom ? 4 : 0) |
(o.clearRoom ? 8 : 0) |
(o.joinRoomInvitation ? 16 : 0) |
(o.joinRoomKeys ? 32 : 0) |
(o.joinRoomResponse ? 64 : 0) |
(o.sendContactRequest ? 128 : 0) |
(o.migrateV2Room ? 256 : 0)
;(e.fixed32.preencode(d, o.discoveryKey),
e.uint.preencode(d, o.priority),
e.uint.preencode(d, o.timestamp),
e.uint.preencode(d, o.type),
e.uint.preencode(d, n),
o.restoreIdentity && zc.preencode(d, o.restoreIdentity),
o.createRoom && Gc.preencode(d, o.createRoom),
o.leaveRoom && Qc.preencode(d, o.leaveRoom),
o.clearRoom && Xc.preencode(d, o.clearRoom),
o.joinRoomInvitation && Yc.preencode(d, o.joinRoomInvitation),
o.joinRoomKeys && Zc.preencode(d, o.joinRoomKeys),
o.joinRoomResponse && $c.preencode(d, o.joinRoomResponse),
o.sendContactRequest && _c.preencode(d, o.sendContactRequest),
o.migrateV2Room && er.preencode(d, o.migrateV2Room))
},
encode(d, o) {
const n =
(o.restoreIdentity ? 1 : 0) |
(o.createRoom ? 2 : 0) |
(o.leaveRoom ? 4 : 0) |
(o.clearRoom ? 8 : 0) |
(o.joinRoomInvitation ? 16 : 0) |
(o.joinRoomKeys ? 32 : 0) |
(o.joinRoomResponse ? 64 : 0) |
(o.sendContactRequest ? 128 : 0) |
(o.migrateV2Room ? 256 : 0)
;(e.fixed32.encode(d, o.discoveryKey),
e.uint.encode(d, o.priority),
e.uint.encode(d, o.timestamp),
e.uint.encode(d, o.type),
e.uint.encode(d, n),
o.restoreIdentity && zc.encode(d, o.restoreIdentity),
o.createRoom && Gc.encode(d, o.createRoom),
o.leaveRoom && Qc.encode(d, o.leaveRoom),
o.clearRoom && Xc.encode(d, o.clearRoom),
o.joinRoomInvitation && Yc.encode(d, o.joinRoomInvitation),
o.joinRoomKeys && Zc.encode(d, o.joinRoomKeys),
o.joinRoomResponse && $c.encode(d, o.joinRoomResponse),
o.sendContactRequest && _c.encode(d, o.sendContactRequest),
o.migrateV2Room && er.encode(d, o.migrateV2Room))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.uint.decode(d),
c = e.uint.decode(d),
r = e.uint.decode(d),
t = e.uint.decode(d)
return {
discoveryKey: o,
priority: n,
timestamp: c,
type: r,
restoreIdentity: 1 & t ? zc.decode(d) : null,
createRoom: 2 & t ? Gc.decode(d) : null,
leaveRoom: 4 & t ? Qc.decode(d) : null,
clearRoom: 8 & t ? Xc.decode(d) : null,
joinRoomInvitation: 16 & t ? Yc.decode(d) : null,
joinRoomKeys: 32 & t ? Zc.decode(d) : null,
joinRoomResponse: 64 & t ? $c.decode(d) : null,
sendContactRequest: 128 & t ? _c.decode(d) : null,
migrateV2Room: 256 & t ? er.decode(d) : null,
}
},
},
or = Ee,
nr = {
preencode(d, o) {
;(e.buffer.preencode(d, o.seed), or.preencode(d, o.invitation))
},
encode(d, o) {
;(e.buffer.encode(d, o.seed), or.encode(d, o.invitation))
},
decode: (d) => ({ seed: e.buffer.decode(d), invitation: or.decode(d) }),
},
cr = {
preencode(e, d) {
e.end++
},
encode(d, n) {
const c =
(n.isWritable ? 1 : 0) |
(n.isReadable ? 2 : 0) |
(n.isPrivateProfile ? 4 : 0) |
(o >= 8 && n.isRemoved ? 8 : 0)
e.uint.encode(d, c)
},
decode(d) {
const n = e.uint.decode(d)
return {
isWritable: !!(1 & n),
isReadable: !!(2 & n),
isPrivateProfile: !!(4 & n),
isRemoved: o >= 8 && !!(8 & n),
}
},
},
rr = {
preencode(d, o) {
;(e.uint.preencode(d, o.creation),
e.uint.preencode(d, o.latestSync),
e.uint.preencode(d, o.latestChatMessage))
},
encode(d, o) {
;(e.uint.encode(d, o.creation),
e.uint.encode(d, o.latestSync),
e.uint.encode(d, o.latestChatMessage))
},
decode: (d) => ({
creation: e.uint.decode(d),
latestSync: e.uint.decode(d),
latestChatMessage: e.uint.decode(d),
}),
},
tr = Yo,
ir = mo,
ar = e.frame(rr),
sr = kc,
pr = e.frame(cr),
ur = e.frame(ae),
lr = e.frame(fd),
fr = Oo,
mr = _o,
yr = e.frame(wo),
xr = Y,
br = e.frame(pd),
vr = Fn,
kr = {
preencode(d, n) {
const c =
(n.selfDevice ? 1 : 0) |
(n.selfMember ? 2 : 0) |
(n.config ? 4 : 0) |
(n.identity ? 8 : 0) |
(n.lastMessage ? 16 : 0) |
(n.dm ? 32 : 0) |
(o >= 19 && n.readLengths ? 64 : 0) |
(o >= 19 && n.lastMember ? 128 : 0) |
(o >= 21 && n.version ? 256 : 0) |
(o >= 27 && n.preferences ? 512 : 0)
;(e.fixed32.preencode(d, n.roomKey),
e.fixed32.preencode(d, n.discoveryKey),
e.buffer.preencode(d, n.encryptionKey),
tr.preencode(d, n.digest),
ir.preencode(d, n.stats),
ar.preencode(d, n.timestamps),
e.uint.preencode(d, n.fork),
e.uint.preencode(d, n.length),
e.fixed32.preencode(d, n.seed),
sr.preencode(d, n.capabilities),
pr.preencode(d, n.status),
e.uint.preencode(d, c),
n.selfDevice && ur.preencode(d, n.selfDevice),
n.selfMember && lr.preencode(d, n.selfMember),
n.config && fr.preencode(d, n.config),
n.identity && mr.preencode(d, n.identity),
n.lastMessage && yr.preencode(d, n.lastMessage),
n.dm && xr.preencode(d, n.dm),
o >= 19 && n.readLengths && qi.preencode(d, n.readLengths),
o >= 19 && n.lastMember && br.preencode(d, n.lastMember),
o >= 21 && n.version && e.uint.preencode(d, n.version),
o >= 27 && n.preferences && vr.preencode(d, n.preferences))
},
encode(d, n) {
const c =
(n.selfDevice ? 1 : 0) |
(n.selfMember ? 2 : 0) |
(n.config ? 4 : 0) |
(n.identity ? 8 : 0) |
(n.lastMessage ? 16 : 0) |
(n.dm ? 32 : 0) |
(o >= 19 && n.readLengths ? 64 : 0) |
(o >= 19 && n.lastMember ? 128 : 0) |
(o >= 21 && n.version ? 256 : 0) |
(o >= 27 && n.preferences ? 512 : 0)
;(e.fixed32.encode(d, n.roomKey),
e.fixed32.encode(d, n.discoveryKey),
e.buffer.encode(d, n.encryptionKey),
tr.encode(d, n.digest),
ir.encode(d, n.stats),
ar.encode(d, n.timestamps),
e.uint.encode(d, n.fork),
e.uint.encode(d, n.length),
e.fixed32.encode(d, n.seed),
sr.encode(d, n.capabilities),
pr.encode(d, n.status),
e.uint.encode(d, c),
n.selfDevice && ur.encode(d, n.selfDevice),
n.selfMember && lr.encode(d, n.selfMember),
n.config && fr.encode(d, n.config),
n.identity && mr.encode(d, n.identity),
n.lastMessage && yr.encode(d, n.lastMessage),
n.dm && xr.encode(d, n.dm),
o >= 19 && n.readLengths && qi.encode(d, n.readLengths),
o >= 19 && n.lastMember && br.encode(d, n.lastMember),
o >= 21 && n.version && e.uint.encode(d, n.version),
o >= 27 && n.preferences && vr.encode(d, n.preferences))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = e.buffer.decode(d),
t = tr.decode(d),
i = ir.decode(d),
a = ar.decode(d),
s = e.uint.decode(d),
p = e.uint.decode(d),
u = e.fixed32.decode(d),
l = sr.decode(d),
f = pr.decode(d),
m = e.uint.decode(d)
return {
roomKey: n,
discoveryKey: c,
encryptionKey: r,
digest: t,
stats: i,
timestamps: a,
fork: s,
length: p,
seed: u,
capabilities: l,
status: f,
selfDevice: 1 & m ? ur.decode(d) : null,
selfMember: 2 & m ? lr.decode(d) : null,
config: 4 & m ? fr.decode(d) : null,
identity: 8 & m ? mr.decode(d) : null,
lastMessage: 16 & m ? yr.decode(d) : null,
dm: 32 & m ? xr.decode(d) : null,
readLengths: o >= 19 && 64 & m ? qi.decode(d) : null,
lastMember: o >= 19 && 128 & m ? br.decode(d) : null,
version: o >= 21 && 256 & m ? e.uint.decode(d) : 0,
preferences: o >= 27 && 512 & m ? vr.decode(d) : null,
}
},
},
gr = Fn,
Kr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey), gr.preencode(d, o.status))
},
encode(d, o) {
;(e.fixed32.encode(d, o.roomKey), gr.encode(d, o.status))
},
decode: (d) => ({ roomKey: e.fixed32.decode(d), status: gr.decode(d) }),
},
hr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.mailbox),
e.fixed32.preencode(d, o.key),
d.end++,
o.roomKey && e.fixed32.preencode(d, o.roomKey),
o.keyPair && t.preencode(d, o.keyPair),
o.responseKeyPair && t.preencode(d, o.responseKeyPair))
},
encode(d, o) {
const n = (o.roomKey ? 1 : 0) | (o.keyPair ? 2 : 0) | (o.responseKeyPair ? 4 : 0)
;(e.fixed32.encode(d, o.mailbox),
e.fixed32.encode(d, o.key),
e.uint.encode(d, n),
o.roomKey && e.fixed32.encode(d, o.roomKey),
o.keyPair && t.encode(d, o.keyPair),
o.responseKeyPair && t.encode(d, o.responseKeyPair))
},
decode(d) {
const o = e.fixed32.decode(d),
n = e.fixed32.decode(d),
c = e.uint.decode(d)
return {
mailbox: o,
key: n,
roomKey: 1 & c ? e.fixed32.decode(d) : null,
keyPair: 2 & c ? t.decode(d) : null,
responseKeyPair: 4 & c ? t.decode(d) : null,
}
},
},
wr = ue,
Pr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), wr.preencode(d, o.profile))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), wr.encode(d, o.profile))
},
decode: (d) => ({ key: e.fixed32.decode(d), profile: wr.decode(d) }),
},
Rr = ur,
Tr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey), Rr.preencode(d, o.device))
},
encode(d, o) {
;(e.fixed32.encode(d, o.roomKey), Rr.encode(d, o.device))
},
decode: (d) => ({ roomKey: e.fixed32.decode(d), device: Rr.decode(d) }),
},
Ar = K,
Mr = {
preencode(d, o) {
;(Ar.preencode(d, o.file),
e.fixed32.preencode(d, o.roomKey),
d.end++,
o.encryptionKey && e.buffer.preencode(d, o.encryptionKey))
},
encode(d, o) {
const n = (o.encryptionKey ? 1 : 0) | (o.cleared ? 2 : 0) | (o.own ? 4 : 0)
;(Ar.encode(d, o.file),
e.fixed32.encode(d, o.roomKey),
e.uint.encode(d, n),
o.encryptionKey && e.buffer.encode(d, o.encryptionKey))
},
decode(d) {
const o = Ar.decode(d),
n = e.fixed32.decode(d),
c = e.uint.decode(d)
return {
file: o,
roomKey: n,
encryptionKey: 1 & c ? e.buffer.decode(d) : null,
cleared: !!(2 & c),
own: !!(4 & c),
}
},
},
Sr = _,
Cr = {
preencode(d, n) {
;(Sr.preencode(d, n.header),
c.preencode(d, n.oplog),
e.uint.preencode(d, n.index),
Li.preencode(d, n.preview),
d.end++,
o >= 12 && n.displayType && Qr.preencode(d, n.displayType))
},
encode(d, n) {
const r = o >= 12 && n.displayType ? 1 : 0
;(Sr.encode(d, n.header),
c.encode(d, n.oplog),
e.uint.encode(d, n.index),
Li.encode(d, n.preview),
e.uint.encode(d, r),
o >= 12 && n.displayType && Qr.encode(d, n.displayType))
},
decode(d) {
const n = Sr.decode(d),
r = c.decode(d),
t = e.uint.decode(d),
i = Li.decode(d),
a = d.start < d.end ? e.uint.decode(d) : 0
return {
header: n,
oplog: r,
index: t,
preview: i,
displayType: o >= 12 && 1 & a ? Qr.decode(d) : 0,
}
},
},
Fr = {
preencode(d, n) {
;(d.end++, o >= 4 && n.memberKey && e.fixed32.preencode(d, n.memberKey))
},
encode(d, n) {
const c = o >= 4 && n.memberKey ? 1 : 0
;(e.uint.encode(d, c), o >= 4 && n.memberKey && e.fixed32.encode(d, n.memberKey))
},
decode(d) {
const n = e.uint.decode(d)
return { memberKey: o >= 4 && 1 & n ? e.fixed32.decode(d) : null }
},
},
Dr = ue,
Ir = {
preencode(e, d) {
;(Dr.preencode(e, d.profile), ce.preencode(e, d.attestation))
},
encode(e, d) {
;(Dr.encode(e, d.profile), ce.encode(e, d.attestation))
},
decode: (e) => ({ profile: Dr.decode(e), attestation: ce.decode(e) }),
},
qr = _,
Lr = {
preencode(d, o) {
;(qr.preencode(d, o.header), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(qr.encode(d, o.header), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ header: qr.decode(d), key: e.fixed32.decode(d) }),
},
jr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.deviceKey),
ce.preencode(d, o.privateProfileIdentity),
e.buffer.preencode(d, o.deviceProof))
},
encode(d, o) {
;(e.fixed32.encode(d, o.deviceKey),
ce.encode(d, o.privateProfileIdentity),
e.buffer.encode(d, o.deviceProof))
},
decode: (d) => ({
deviceKey: e.fixed32.decode(d),
privateProfileIdentity: ce.decode(d),
deviceProof: e.buffer.decode(d),
}),
},
Er = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.roomKey),
e.fixed32.preencode(d, n.encryptionKey),
e.fixed32.preencode(d, n.seed),
d.end++,
o >= 9 && n.fastForwardTo && e.fixed32.preencode(d, n.fastForwardTo))
},
encode(d, n) {
const c = o >= 9 && n.fastForwardTo ? 1 : 0
;(e.fixed32.encode(d, n.roomKey),
e.fixed32.encode(d, n.encryptionKey),
e.fixed32.encode(d, n.seed),
e.uint.encode(d, c),
o >= 9 && n.fastForwardTo && e.fixed32.encode(d, n.fastForwardTo))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = e.fixed32.decode(d),
t = e.uint.decode(d)
return {
roomKey: n,
encryptionKey: c,
seed: r,
fastForwardTo: o >= 9 && 1 & t ? e.fixed32.decode(d) : null,
}
},
},
Br = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.publicKey),
e.fixed32.preencode(d, n.writerKey),
e.fixed32.preencode(d, n.devicePublicKey),
d.end++,
o >= 9 && n.privateProfileKey && e.fixed32.preencode(d, n.privateProfileKey))
},
encode(d, n) {
const c = o >= 9 && n.privateProfileKey ? 1 : 0
;(e.fixed32.encode(d, n.publicKey),
e.fixed32.encode(d, n.writerKey),
e.fixed32.encode(d, n.devicePublicKey),
e.uint.encode(d, c),
o >= 9 && n.privateProfileKey && e.fixed32.encode(d, n.privateProfileKey))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = e.fixed32.decode(d),
t = e.uint.decode(d)
return {
publicKey: n,
writerKey: c,
devicePublicKey: r,
privateProfileKey: o >= 9 && 1 & t ? e.fixed32.decode(d) : null,
}
},
},
Vr = _,
Nr = {
preencode(d, o) {
;(Vr.preencode(d, o.header), e.fixed32.preencode(d, o.memberKey))
},
encode(d, o) {
;(Vr.encode(d, o.header), e.fixed32.encode(d, o.memberKey))
},
decode: (d) => ({ header: Vr.decode(d), memberKey: e.fixed32.decode(d) }),
},
Ur = {
preencode(d, o) {
e.fixed32.preencode(d, o.privateProfileKey)
},
encode(d, o) {
e.fixed32.encode(d, o.privateProfileKey)
},
decode: (d) => ({ privateProfileKey: e.fixed32.decode(d) }),
},
Jr = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key), e.fixed32.preencode(d, o.responsePublicKey))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key), e.fixed32.encode(d, o.responsePublicKey))
},
decode: (d) => ({ key: e.fixed32.decode(d), responsePublicKey: e.fixed32.decode(d) }),
},
Or = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.roomKey),
d.end++,
o >= 10 && n.repairs && e.uint.preencode(d, n.repairs))
},
encode(d, n) {
const c = o >= 10 && n.repairs ? 1 : 0
;(e.fixed32.encode(d, n.roomKey),
e.uint.encode(d, c),
o >= 10 && n.repairs && e.uint.encode(d, n.repairs))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.uint.decode(d)
return { roomKey: n, repairs: o >= 10 && 1 & c ? e.uint.decode(d) : 0 }
},
},
Wr = {
preencode(d, n) {
;(d.end++,
o >= 11 && n.key && e.string.preencode(d, n.key),
o >= 11 && n.description && e.string.preencode(d, n.description))
},
encode(d, n) {
const c =
(o >= 11 && n.key ? 1 : 0) |
(o >= 11 && n.value ? 2 : 0) |
(o >= 11 && n.description ? 4 : 0)
;(e.uint.encode(d, c),
o >= 11 && n.key && e.string.encode(d, n.key),
o >= 11 && n.description && e.string.encode(d, n.description))
},
decode(d) {
const n = e.uint.decode(d)
return {
key: o >= 11 && 1 & n ? e.string.decode(d) : null,
value: o >= 11 && !!(2 & n),
description: o >= 11 && 4 & n ? e.string.decode(d) : null,
}
},
},
Hr = e.array(e.frame(Wr)),
zr = {
preencode(e, d) {
;(e.end++, o >= 11 && d.flags && Hr.preencode(e, d.flags))
},
encode(d, n) {
const c = o >= 11 && n.flags ? 1 : 0
;(e.uint.encode(d, c), o >= 11 && n.flags && Hr.encode(d, n.flags))
},
decode(d) {
const n = e.uint.decode(d)
return { flags: o >= 11 && 1 & n ? Hr.decode(d) : null }
},
},
Gr = { HttpLink: 1, PearLink: 2 },
Qr = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 2) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
Xr = _,
Yr = {
preencode(d, o) {
;(Xr.preencode(d, o.header), e.uint.preencode(d, o.value))
},
encode(d, o) {
;(Xr.encode(d, o.header), e.uint.encode(d, o.value))
},
decode: (d) => ({ header: Xr.decode(d), value: e.uint.decode(d) }),
},
Zr = {
preencode(d, o) {
;(e.uint.preencode(d, o.key), e.uint.preencode(d, o.value))
},
encode(d, o) {
;(e.uint.encode(d, o.key), e.uint.encode(d, o.value))
},
decode: (d) => ({ key: e.uint.decode(d), value: e.uint.decode(d) }),
},
$r = _,
_r = {
preencode(d, o) {
;($r.preencode(d, o.header), e.uint.preencode(d, o.from), e.uint.preencode(d, o.to))
},
encode(d, o) {
;($r.encode(d, o.header), e.uint.encode(d, o.from), e.uint.encode(d, o.to))
},
decode: (d) => ({ header: $r.decode(d), from: e.uint.decode(d), to: e.uint.decode(d) }),
},
et = {
RoomType: 1,
IsExperimental: 2,
IsJoiningDisabled: 3,
IsAppendingDisabled: 4,
IsCallingDisabled: 5,
IsMembershipEventsDisabled: 6,
},
dt = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 6) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
ot = Ge,
nt = {
preencode(d, n) {
;(d.end++,
o >= 16 && n.nodes && ot.preencode(d, n.nodes),
o >= 24 && n.concurrency && e.uint.preencode(d, n.concurrency),
o >= 24 && n.maxWindow && e.uint.preencode(d, n.maxWindow),
o >= 24 && n.randomPunchInterval && e.uint.preencode(d, n.randomPunchInterval),
o >= 24 && n.connectionKeepAlive && e.uint.preencode(d, n.connectionKeepAlive))
},
encode(d, n) {
const c =
(o >= 16 && n.nodes ? 1 : 0) |
(o >= 24 && n.concurrency ? 2 : 0) |
(o >= 24 && n.maxWindow ? 4 : 0) |
(o >= 24 && n.randomPunchInterval ? 8 : 0) |
(o >= 24 && n.connectionKeepAlive ? 16 : 0)
;(e.uint.encode(d, c),
o >= 16 && n.nodes && ot.encode(d, n.nodes),
o >= 24 && n.concurrency && e.uint.encode(d, n.concurrency),
o >= 24 && n.maxWindow && e.uint.encode(d, n.maxWindow),
o >= 24 && n.randomPunchInterval && e.uint.encode(d, n.randomPunchInterval),
o >= 24 && n.connectionKeepAlive && e.uint.encode(d, n.connectionKeepAlive))
},
decode(d) {
const n = e.uint.decode(d)
return {
nodes: o >= 16 && 1 & n ? ot.decode(d) : null,
concurrency: o >= 24 && 2 & n ? e.uint.decode(d) : 0,
maxWindow: o >= 24 && 4 & n ? e.uint.decode(d) : 0,
randomPunchInterval: o >= 24 && 8 & n ? e.uint.decode(d) : 0,
connectionKeepAlive: o >= 24 && 16 & n ? e.uint.decode(d) : 0,
}
},
},
ct = { en: "en", it: "it", ru: "ru", es: "es", de: "de" },
rt = {
preencode(e, d) {
e.end++
},
encode(d, o) {
switch (o) {
case "en":
e.uint.encode(d, 1)
break
case "it":
e.uint.encode(d, 2)
break
case "ru":
e.uint.encode(d, 3)
break
case "es":
e.uint.encode(d, 4)
break
case "de":
e.uint.encode(d, 5)
break
default:
throw new Error("Unknown enum")
}
},
decode(d) {
switch (e.uint.decode(d)) {
case 1:
return "en"
case 2:
return "it"
case 3:
return "ru"
case 4:
return "es"
case 5:
return "de"
default:
return null
}
},
},
tt = Ld,
it = {
preencode(d, o) {
;(tt.preencode(d, o.range), rt.preencode(d, o.language), e.string.preencode(d, o.text))
},
encode(d, o) {
;(tt.encode(d, o.range), rt.encode(d, o.language), e.string.encode(d, o.text))
},
decode: (d) => ({ range: tt.decode(d), language: rt.decode(d), text: e.string.decode(d) }),
},
at = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey), e.uint.preencode(d, o.count))
},
encode(d, o) {
;(e.fixed32.encode(d, o.roomKey), e.uint.encode(d, o.count))
},
decode: (d) => ({ roomKey: e.fixed32.decode(d), count: e.uint.decode(d) }),
},
st = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.deviceKey), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(e.fixed32.encode(d, o.deviceKey), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ deviceKey: e.fixed32.decode(d), key: e.fixed32.decode(d) }),
},
pt = _,
ut = {
preencode(d, o) {
;(pt.preencode(d, o.header), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(pt.encode(d, o.header), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ header: pt.decode(d), key: e.fixed32.decode(d) }),
},
lt = _,
ft = {
preencode(d, o) {
;(lt.preencode(d, o.header), e.fixed32.preencode(d, o.key))
},
encode(d, o) {
;(lt.encode(d, o.header), e.fixed32.encode(d, o.key))
},
decode: (d) => ({ header: lt.decode(d), key: e.fixed32.decode(d) }),
},
mt = { Flag: 1 },
yt = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 1) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
xt = {
preencode(d, o) {
;(fo.preencode(d, o.id),
e.fixed32.preencode(d, o.sender),
e.uint.preencode(d, o.clock),
yt.preencode(d, o.label))
},
encode(d, o) {
;(fo.encode(d, o.id),
e.fixed32.encode(d, o.sender),
e.uint.encode(d, o.clock),
yt.encode(d, o.label))
},
decode: (d) => ({
id: fo.decode(d),
sender: e.fixed32.decode(d),
clock: e.uint.decode(d),
label: yt.decode(d),
}),
},
bt = _,
vt = {
preencode(e, d) {
;(bt.preencode(e, d.header), c.preencode(e, d.oplog), yt.preencode(e, d.label))
},
encode(e, d) {
;(bt.encode(e, d.header), c.encode(e, d.oplog), yt.encode(e, d.label))
},
decode: (e) => ({ header: bt.decode(e), oplog: c.decode(e), label: yt.decode(e) }),
},
kt = _,
gt = {
preencode(e, d) {
;(kt.preencode(e, d.header), c.preencode(e, d.oplog), yt.preencode(e, d.label))
},
encode(e, d) {
;(kt.encode(e, d.header), c.encode(e, d.oplog), yt.encode(e, d.label))
},
decode: (e) => ({ header: kt.decode(e), oplog: c.decode(e), label: yt.decode(e) }),
},
Kt = {
preencode(d, o) {
;(yt.preencode(d, o.label), e.uint.preencode(d, o.count))
},
encode(d, o) {
;(yt.encode(d, o.label), e.uint.encode(d, o.count))
},
decode: (d) => ({ label: yt.decode(d), count: e.uint.decode(d) }),
},
ht = e.array(e.frame(Kt)),
wt = {
preencode(d, n) {
;(fo.preencode(d, n.id),
e.uint.preencode(d, n.total),
ht.preencode(d, n.labels),
e.uint.preencode(d, n.editedAt),
d.end++,
o >= 24 && n.flagsClock && e.uint.preencode(d, n.flagsClock),
o >= 24 && n.version && e.uint.preencode(d, n.version))
},
encode(d, n) {
const c =
(o >= 24 && n.flagsClock ? 1 : 0) |
(o >= 24 && n.version ? 2 : 0) |
(o >= 25 && n.isDeleted ? 4 : 0)
;(fo.encode(d, n.id),
e.uint.encode(d, n.total),
ht.encode(d, n.labels),
e.uint.encode(d, n.editedAt),
e.uint.encode(d, c),
o >= 24 && n.flagsClock && e.uint.encode(d, n.flagsClock),
o >= 24 && n.version && e.uint.encode(d, n.version))
},
decode(d) {
const n = fo.decode(d),
c = e.uint.decode(d),
r = ht.decode(d),
t = e.uint.decode(d),
i = d.start < d.end ? e.uint.decode(d) : 0
return {
id: n,
total: c,
labels: r,
editedAt: t,
flagsClock: o >= 24 && 1 & i ? e.uint.decode(d) : 0,
version: o >= 24 && 2 & i ? e.uint.decode(d) : 0,
isDeleted: o >= 25 && !!(4 & i),
}
},
},
Pt = _,
Rt = {
preencode(d, o) {
;(Pt.preencode(d, o.header), e.uint.preencode(d, o.length))
},
encode(d, o) {
;(Pt.encode(d, o.header), e.uint.encode(d, o.length))
},
decode: (d) => ({ header: Pt.decode(d), length: e.uint.decode(d) }),
},
Tt = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.memberKey), e.uint.preencode(d, o.length))
},
encode(d, o) {
;(e.fixed32.encode(d, o.memberKey), e.uint.encode(d, o.length))
},
decode: (d) => ({ memberKey: e.fixed32.decode(d), length: e.uint.decode(d) }),
},
At = $,
Mt = {
preencode(e, d) {
e.end++
},
encode(d, n) {
const c = o >= 19 && n.disableReadReceipts ? 1 : 0
e.uint.encode(d, c)
},
decode(d) {
const n = e.uint.decode(d)
return { disableReadReceipts: o >= 19 && !!(1 & n) }
},
},
St = { disableReadReceipts: "disableReadReceipts" },
Ct = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if ("disableReadReceipts" !== o) throw new Error("Unknown enum")
e.uint.encode(d, 1)
},
decode: (d) => (1 === e.uint.decode(d) ? "disableReadReceipts" : null),
},
Ft = _,
Dt = e.frame(Mt),
It = {
preencode(e, d) {
;(Ft.preencode(e, d.header), Ct.preencode(e, d.key), Dt.preencode(e, d.settings))
},
encode(e, d) {
;(Ft.encode(e, d.header), Ct.encode(e, d.key), Dt.encode(e, d.settings))
},
decode: (e) => ({ header: Ft.decode(e), key: Ct.decode(e), settings: Dt.decode(e) }),
},
qt = {
preencode(d, n) {
;(d.end++,
o >= 20 && n.roomKey && e.fixed32.preencode(d, n.roomKey),
o >= 23 && n.coreKey && e.fixed32.preencode(d, n.coreKey))
},
encode(d, n) {
const c = (o >= 20 && n.roomKey ? 1 : 0) | (o >= 23 && n.coreKey ? 2 : 0)
;(e.uint.encode(d, c),
o >= 20 && n.roomKey && e.fixed32.encode(d, n.roomKey),
o >= 23 && n.coreKey && e.fixed32.encode(d, n.coreKey))
},
decode(d) {
const n = e.uint.decode(d)
return {
roomKey: o >= 20 && 1 & n ? e.fixed32.decode(d) : null,
coreKey: o >= 23 && 2 & n ? e.fixed32.decode(d) : null,
}
},
},
Lt = e.frame(qt),
jt = {
preencode(d, n) {
;(e.string.preencode(d, n.code),
e.string.preencode(d, n.message),
e.string.preencode(d, n.stack),
e.uint.preencode(d, n.timestamp),
d.end++,
o >= 20 && n.details && Lt.preencode(d, n.details))
},
encode(d, n) {
const c = o >= 20 && n.details ? 1 : 0
;(e.string.encode(d, n.code),
e.string.encode(d, n.message),
e.string.encode(d, n.stack),
e.uint.encode(d, n.timestamp),
e.uint.encode(d, c),
o >= 20 && n.details && Lt.encode(d, n.details))
},
decode(d) {
const n = e.string.decode(d),
c = e.string.decode(d),
r = e.string.decode(d),
t = e.uint.decode(d),
i = e.uint.decode(d)
return {
code: n,
message: c,
stack: r,
timestamp: t,
details: o >= 20 && 1 & i ? Lt.decode(d) : null,
}
},
},
Et = { RESUME: 1, WAKEUP: 2, PRESUSPEND: 3, SUSPEND: 4 },
Bt = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 4) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
Vt = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.roomKey), e.uint.preencode(d, o.total))
},
encode(d, o) {
;(e.fixed32.encode(d, o.roomKey), e.uint.encode(d, o.total))
},
decode: (d) => ({ roomKey: e.fixed32.decode(d), total: e.uint.decode(d) }),
},
Nt = { Flag: 1 },
Ut = {
preencode(e, d) {
e.end++
},
encode(d, o) {
if (o > 1) throw new Error("Unknown enum")
e.uint.encode(d, o)
},
decode: (d) => e.uint.decode(d),
},
Jt = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
e.fixed32.preencode(d, o.sender),
e.uint.preencode(d, o.clock),
Ut.preencode(d, o.label))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key),
e.fixed32.encode(d, o.sender),
e.uint.encode(d, o.clock),
Ut.encode(d, o.label))
},
decode: (d) => ({
key: e.fixed32.decode(d),
sender: e.fixed32.decode(d),
clock: e.uint.decode(d),
label: Ut.decode(d),
}),
},
Ot = _,
Wt = {
preencode(d, o) {
;(Ot.preencode(d, o.header), e.fixed32.preencode(d, o.key), Ut.preencode(d, o.label))
},
encode(d, o) {
;(Ot.encode(d, o.header), e.fixed32.encode(d, o.key), Ut.encode(d, o.label))
},
decode: (d) => ({ header: Ot.decode(d), key: e.fixed32.decode(d), label: Ut.decode(d) }),
},
Ht = {
preencode(d, o) {
;(Ut.preencode(d, o.label), e.uint.preencode(d, o.count))
},
encode(d, o) {
;(Ut.encode(d, o.label), e.uint.encode(d, o.count))
},
decode: (d) => ({ label: Ut.decode(d), count: e.uint.decode(d) }),
},
zt = e.array(e.frame(Ht)),
Gt = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.key),
e.uint.preencode(d, o.total),
zt.preencode(d, o.labels),
e.uint.preencode(d, o.editedAt),
e.uint.preencode(d, o.flagsClock))
},
encode(d, o) {
;(e.fixed32.encode(d, o.key),
e.uint.encode(d, o.total),
zt.encode(d, o.labels),
e.uint.encode(d, o.editedAt),
e.uint.encode(d, o.flagsClock))
},
decode: (d) => ({
key: e.fixed32.decode(d),
total: e.uint.decode(d),
labels: zt.decode(d),
editedAt: e.uint.decode(d),
flagsClock: e.uint.decode(d),
}),
},
Qt = {
preencode(d, o) {
;(e.float64.preencode(d, o.latitude), e.float64.preencode(d, o.longitude))
},
encode(d, o) {
;(e.float64.encode(d, o.latitude), e.float64.encode(d, o.longitude))
},
decode: (d) => ({ latitude: e.float64.decode(d), longitude: e.float64.decode(d) }),
},
Xt = _,
Yt = {
preencode(d, o) {
;(Xt.preencode(d, o.header),
e.fixed32.preencode(d, o.deviceKey),
e.fixed32.preencode(d, o.fromDeviceKey))
},
encode(d, o) {
;(Xt.encode(d, o.header),
e.fixed32.encode(d, o.deviceKey),
e.fixed32.encode(d, o.fromDeviceKey))
},
decode: (d) => ({
header: Xt.decode(d),
deviceKey: e.fixed32.decode(d),
fromDeviceKey: e.fixed32.decode(d),
}),
},
Zt = _,
$t = Y,
_t = {
preencode(d, n) {
;(Zt.preencode(d, n.header),
e.fixed32.preencode(d, n.callKey),
e.buffer.preencode(d, n.encryptionKey),
d.end++,
o >= 28 && n.streams && $t.preencode(d, n.streams),
o >= 28 && n.discoveryKey && e.fixed32.preencode(d, n.discoveryKey),
o >= 28 && n.version && e.uint.preencode(d, n.version))
},
encode(d, n) {
const c =
(o >= 28 && n.streams ? 1 : 0) |
(o >= 28 && n.discoveryKey ? 2 : 0) |
(o >= 28 && n.version ? 4 : 0)
;(Zt.encode(d, n.header),
e.fixed32.encode(d, n.callKey),
e.buffer.encode(d, n.encryptionKey),
e.uint.encode(d, c),
o >= 28 && n.streams && $t.encode(d, n.streams),
o >= 28 && n.discoveryKey && e.fixed32.encode(d, n.discoveryKey),
o >= 28 && n.version && e.uint.encode(d, n.version))
},
decode(d) {
const n = Zt.decode(d),
c = e.fixed32.decode(d),
r = e.buffer.decode(d),
t = e.uint.decode(d)
return {
header: n,
callKey: c,
encryptionKey: r,
streams: o >= 28 && 1 & t ? $t.decode(d) : null,
discoveryKey: o >= 28 && 2 & t ? e.fixed32.decode(d) : null,
version: o >= 28 && 4 & t ? e.uint.decode(d) : 0,
}
},
},
ei = _,
di = Y,
oi = {
preencode(d, n) {
;(ei.preencode(d, n.header),
e.fixed32.preencode(d, n.callKey),
d.end++,
o >= 28 && n.streams && di.preencode(d, n.streams))
},
encode(d, n) {
const c = o >= 28 && n.streams ? 1 : 0
;(ei.encode(d, n.header),
e.fixed32.encode(d, n.callKey),
e.uint.encode(d, c),
o >= 28 && n.streams && di.encode(d, n.streams))
},
decode(d) {
const n = ei.decode(d),
c = e.fixed32.decode(d),
r = e.uint.decode(d)
return { header: n, callKey: c, streams: o >= 28 && 1 & r ? di.decode(d) : null }
},
},
ni = _,
ci = {
preencode(d, o) {
;(ni.preencode(d, o.header), e.fixed32.preencode(d, o.callKey))
},
encode(d, o) {
;(ni.encode(d, o.header), e.fixed32.encode(d, o.callKey))
},
decode: (d) => ({ header: ni.decode(d), callKey: e.fixed32.decode(d) }),
},
ri = _,
ti = {
preencode(d, o) {
;(ri.preencode(d, o.header), e.fixed32.preencode(d, o.callKey))
},
encode(d, o) {
;(ri.encode(d, o.header), e.fixed32.encode(d, o.callKey))
},
decode: (d) => ({ header: ri.decode(d), callKey: e.fixed32.decode(d) }),
},
ii = _,
ai = {
preencode(d, o) {
;(ii.preencode(d, o.header),
e.fixed32.preencode(d, o.callKey),
e.fixed32.preencode(d, o.streamKey))
},
encode(d, o) {
;(ii.encode(d, o.header), e.fixed32.encode(d, o.callKey), e.fixed32.encode(d, o.streamKey))
},
decode: (d) => ({
header: ii.decode(d),
callKey: e.fixed32.decode(d),
streamKey: e.fixed32.decode(d),
}),
},
si = _,
pi = {
preencode(d, o) {
;(si.preencode(d, o.header),
e.fixed32.preencode(d, o.callKey),
e.fixed32.preencode(d, o.streamKey))
},
encode(d, o) {
;(si.encode(d, o.header), e.fixed32.encode(d, o.callKey), e.fixed32.encode(d, o.streamKey))
},
decode: (d) => ({
header: si.decode(d),
callKey: e.fixed32.decode(d),
streamKey: e.fixed32.decode(d),
}),
},
ui = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.callKey),
e.buffer.preencode(d, n.encryptionKey),
e.uint.preencode(d, n.createdAt),
d.end++,
o >= 28 && n.endedAt && e.uint.preencode(d, n.endedAt),
o >= 28 && n.discoveryKey && e.fixed32.preencode(d, n.discoveryKey),
o >= 28 && n.version && e.uint.preencode(d, n.version))
},
encode(d, n) {
const c =
(o >= 28 && n.endedAt ? 1 : 0) |
(o >= 28 && n.discoveryKey ? 2 : 0) |
(o >= 28 && n.version ? 4 : 0)
;(e.fixed32.encode(d, n.callKey),
e.buffer.encode(d, n.encryptionKey),
e.uint.encode(d, n.createdAt),
e.uint.encode(d, c),
o >= 28 && n.endedAt && e.uint.encode(d, n.endedAt),
o >= 28 && n.discoveryKey && e.fixed32.encode(d, n.discoveryKey),
o >= 28 && n.version && e.uint.encode(d, n.version))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.buffer.decode(d),
r = e.uint.decode(d),
t = e.uint.decode(d)
return {
callKey: n,
encryptionKey: c,
createdAt: r,
endedAt: o >= 28 && 1 & t ? e.uint.decode(d) : 0,
discoveryKey: o >= 28 && 2 & t ? e.fixed32.decode(d) : null,
version: o >= 28 && 4 & t ? e.uint.decode(d) : 0,
}
},
},
li = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.callKey),
e.fixed32.preencode(d, o.memberKey),
e.uint.preencode(d, o.createdAt))
},
encode(d, o) {
;(e.fixed32.encode(d, o.callKey),
e.fixed32.encode(d, o.memberKey),
e.uint.encode(d, o.createdAt))
},
decode: (d) => ({
callKey: e.fixed32.decode(d),
memberKey: e.fixed32.decode(d),
createdAt: e.uint.decode(d),
}),
},
fi = {
preencode(d, n) {
;(e.fixed32.preencode(d, n.callKey),
e.fixed32.preencode(d, n.deviceKey),
e.fixed32.preencode(d, n.memberKey),
e.uint.preencode(d, n.createdAt),
d.end++,
o >= 28 && n.swarmKey && e.fixed32.preencode(d, n.swarmKey))
},
encode(d, n) {
const c = o >= 28 && n.swarmKey ? 1 : 0
;(e.fixed32.encode(d, n.callKey),
e.fixed32.encode(d, n.deviceKey),
e.fixed32.encode(d, n.memberKey),
e.uint.encode(d, n.createdAt),
e.uint.encode(d, c),
o >= 28 && n.swarmKey && e.fixed32.encode(d, n.swarmKey))
},
decode(d) {
const n = e.fixed32.decode(d),
c = e.fixed32.decode(d),
r = e.fixed32.decode(d),
t = e.uint.decode(d),
i = e.uint.decode(d)
return {
callKey: n,
deviceKey: c,
memberKey: r,
createdAt: t,
swarmKey: o >= 28 && 1 & i ? e.fixed32.decode(d) : null,
}
},
},
mi = {
preencode(d, o) {
;(e.fixed32.preencode(d, o.callKey),
e.fixed32.preencode(d, o.deviceKey),
e.buffer.preencode(d, o.streamKey),
e.uint.preencode(d, o.createdAt))
},
encode(d, o) {
;(e.fixed32.encode(d, o.callKey),
e.fixed32.encode(d, o.deviceKey),
e.buffer.encode(d, o.streamKey),
e.uint.encode(d, o.createdAt))
},
decode: (d) => ({
callKey: e.fixed32.decode(d),
deviceKey: e.fixed32.decode(d),
streamKey: e.buffer.decode(d),
createdAt: e.uint.decode(d),
}),
},
yi = e.frame(P),
xi = yi,
bi = e.array(rt),
vi = e.frame(pe),
ki = yi,
gi = vi,
Ki = e.frame(Er),
hi = vi,
wi = e.frame(md),
Pi = e.frame(Fr),
Ri = e.frame(Qt),
Ti = Ri,
Ai = e.array(e.frame(it)),
Mi = yi,
Si = e.frame(Jn),
Ci = Si,
Fi = Si,
Di = e.frame(Br),
Ii = e.frame(Ir),
qi = e.array(e.frame(Tt)),
Li = yi
function ji(e) {
o = e
}
function Ei(d, n, c = 28) {
return ((o = c), e.encode(Ni(d), n))
}
function Bi(d, n, c = 28) {
return ((o = c), e.decode(Ni(d), n))
}
function Vi(e) {
switch (e) {
case "@keet/room-type":
return J
case "@local/tasks":
return Sc
case "@keet/display-type":
return Gr
case "@keet/system-settings-keys":
return et
case "@keet/room-supported-language":
return ct
case "@keet/label-type":
return mt
case "@keet-private-id/user-settings-key":
return St
case "@local/keet-state":
return Et
case "@keet/member-label-type":
return Nt
default:
throw new Error("Enum not found " + e)
}
}
function Ni(e) {
switch (e) {
case "@keet/head":
return n
case "@keet/oplog-id":
return c
case "@keet/encryption-keypair":
return r
case "@keet/signing-keypair":
return t
case "@keet/room-keys":
return i
case "@keet/operation-header":
return a
case "@keet/blob-pointer":
return s
case "@keet/file-dimensions":
return p
case "@keet/file-metadata":
return l
case "@keet/external-drive-pointer":
return f
case "@keet/external-blob-pointer":
return m
case "@keet/file-pointer":
return b
case "@keet/file":
return g
case "@keet/image-file":
return P
case "@keet/file-status":
return R
case "@keet/file-record":
return M
case "@keet/device-status":
return S
case "@keet/member-status":
return C
case "@keet/member-moderation-status":
return F
case "@keet/abi":
return D
case "@keet/device-stats":
return I
case "@keet/member-stats":
return q
case "@keet/chat-stats":
return L
case "@keet/file-stats":
return j
case "@keet/stats":
return U
case "@keet/room-type":
return O
case "@keet/system-settings":
return W
case "@keet/system-digest":
return G
case "@keet/room-seed":
return Q
case "@keet/room-capabilities":
return X
case "@keet/room-config":
return Z
case "@keet/blind-peer":
return $
case "@keet/add-blind-peer-operation":
return de
case "@keet/remove-blind-peer-operation":
return ne
case "@keet/identity-attestation":
return ce
case "@keet/device-invitation":
return re
case "@keet/device":
return ae
case "@keet/member-profile":
return se
case "@keet/device-profile":
return pe
case "@keet/member-update":
return le
case "@keet/device-update":
return fe
case "@keet/signed-pairing-data":
return me
case "@keet/device-request-identity":
return ye
case "@keet/device-response-identity":
return xe
case "@keet/device-request-with-invitation":
return ge
case "@keet/device-request-with-invitation-and-proof":
return he
case "@keet/device-request-with-member-proof":
return Re
case "@keet/device-request":
return Me
case "@keet/device-response":
return Fe
case "@keet/invitation-metadata":
return De
case "@keet/invitation":
return Le
case "@keet/add-invitation-operation":
return Be
case "@keet/remove-invitation-operation":
return Ne
case "@keet/sendable-room-invitation":
return Ue
case "@keet/sendable-identity-invitation":
return Je
case "@keet/sendable-contact-invitation":
return Oe
case "@keet/sendable-invitation":
return Qe
case "@keet/add-device-operation":
return Ye
case "@keet/update-device-operation":
return $e
case "@keet/start-indexing-operation":
return _e
case "@keet/stop-indexing-operation":
return ed
case "@keet/join-request":
return od
case "@keet/accept-join-request-operation":
return rd
case "@keet/reject-join-request-operation":
return id
case "@keet/member":
return pd
case "@keet/full-member":
return fd
case "@keet/member-proofs":
return md
case "@keet/update-member-operation":
return bd
case "@keet/change-member-status-operation":
return gd
case "@keet/change-member-role-operation":
return hd
case "@keet/remove-member-operation":
return Pd
case "@keet/member-activity":
return Rd
case "@keet/member-joined-event":
return Td
case "@keet/member-left-event":
return Ad
case "@keet/title-changed-chat-event":
return Md
case "@keet/chat-event":
return Dd
case "@keet/sendable-event":
return Id
case "@keet/display-range":
return qd
case "@keet/display-content-range":
return jd
case "@keet/mention-display-item":
return Bd
case "@keet/link-preview":
return Ud
case "@keet/display-link-item":
return Wd
case "@keet/display":
return eo
case "@keet/oplog-message":
return ro
case "@keet/index-message":
return ao
case "@keet/full-index-message":
return uo
case "@keet/message-status":
return lo
case "@keet/message-index-id":
return fo
case "@keet/thread":
return yo
case "@keet/chat-message-record":
return ko
case "@keet/full-chat-message-record":
return wo
case "@keet/add-chat-message-operation":
return To
case "@keet/remove-chat-message-operation":
return Mo
case "@keet/update-chat-message-operation":
return Fo
case "@keet/pin-chat-message-operation":
return Io
case "@keet/reaction":
return qo
case "@keet/reactions-summary":
return Lo
case "@keet/reactions-digest":
return Eo
case "@keet/add-reaction-operation":
return Vo
case "@keet/remove-reaction-operation":
return Uo
case "@keet/update-room-config-operation":
return Wo
case "@keet/group-member":
return Ho
case "@keet/user-registry-info":
return zo
case "@keet/room-identity":
return Qo
case "@keet/genesis-operation":
return on
case "@keet/upgrade-operation":
return cn
case "@keet/update-system-settings-operation":
return an
case "@keet-private-id/contact":
return sn
case "@keet-private-id/v3-room-migration-info":
return pn
case "@keet-private-id/run-v3-migration-operation":
return fn
case "@keet-private-id/update-identity-operation":
return yn
case "@keet-private-id/counters":
return xn
case "@keet-private-id/stats":
return bn
case "@keet-private-id/add-entropy-operation":
return vn
case "@keet-private-id/pending-invitation-identity":
return kn
case "@keet-private-id/pending-invitation":
return Kn
case "@keet-private-id/resolve-pending-invitation-operation":
return wn
case "@keet-private-id/add-pending-invitation-operation":
return Tn
case "@keet-private-id/remove-pending-invitation-operation":
return Mn
case "@keet-private-id/identity-swap":
return Sn
case "@keet-private-id/room-status":
return Cn
case "@keet-private-id/room":
return qn
case "@keet-private-id/add-room-operation":
return jn
case "@keet-private-id/remove-room-operation":
return Bn
case "@keet-private-id/update-room-status-operation":
return Un
case "@keet-private-id/contact-status":
return Jn
case "@keet-private-id/contact-record":
return On
case "@keet-private-id/add-contact-operation":
return zn
case "@keet-private-id/update-contact-status-operation":
return Qn
case "@keet-private-id/remove-contact-operation":
return Yn
case "@keet-private-id/contact-request-status":
return Zn
case "@keet-private-id/contact-request-body":
return ec
case "@keet-private-id/contact-request":
return oc
case "@keet-private-id/contact-request-record":
return tc
case "@keet-private-id/add-contact-request-operation":
return ac
case "@keet-private-id/update-contact-request-status-operation":
return uc
case "@keet-private-id/profile-discovery-record-v1":
return lc
case "@keet-private-id/profile-discovery-record":
return fc
case "@local/background-sync-room":
return mc
case "@local/stats":
return yc
case "@local/migration-status":
return xc
case "@local/v3-private-profile-migration":
return vc
case "@local/v3-room-migration":
return Kc
case "@local/room-migration-stats":
return hc
case "@local/room-migration":
return Pc
case "@local/identity-status":
return Rc
case "@local/identity-record":
return Mc
case "@local/tasks":
return Cc
case "@local/room-keys":
return Fc
case "@local/join-room-invitation-task":
return Ic
case "@local/join-room-response-task":
return qc
case "@local/fast-forward-to":
return Lc
case "@local/add-room-fields":
return jc
case "@local/join-room-keys-task":
return Bc
case "@local/create-room-task":
return Nc
case "@local/leave-room-task":
return Uc
case "@local/clear-room-task":
return Jc
case "@local/restore-identity-task":
return Oc
case "@local/send-contact-request-task":
return Wc
case "@local/migrate-v2-room-task":
return Hc
case "@local/task":
return dr
case "@local/shared-invitation":
return nr
case "@local/room-status":
return cr
case "@local/room-timestamps":
return rr
case "@local/room":
return kr
case "@local/room-preferences":
return Kr
case "@local/writer":
return hr
case "@local/member":
return Pr
case "@local/device":
return Tr
case "@local/file":
return Mr
case "@keet/add-file-preview-operation":
return Cr
case "@keet/member-removed-event":
return Fr
case "@keet/member-contact-info":
return Ir
case "@keet/remove-device-operation":
return Lr
case "@keet/device-identity":
return jr
case "@keet/readonly-room-invitation":
return Er
case "@keet-private-id/identity-swap-v2":
return Br
case "@keet-private-id/activate-contact-room-operation":
return Nr
case "@local/identity-swap":
return Ur
case "@local/writer-append":
return Jr
case "@local/room-metadata":
return Or
case "@local/debug-flag":
return Wr
case "@local/debug":
return zr
case "@keet/display-type":
return Qr
case "@keet/test-increment-operation":
return Yr
case "@keet/test-collection-record-1":
return Zr
case "@keet/migrate-abi-operation":
return _r
case "@keet/system-settings-keys":
return dt
case "@local/hyperdht-record":
return nt
case "@keet/room-supported-language":
return rt
case "@keet/translation-display-item":
return it
case "@local/unread":
return at
case "@keet-private-id/unreads":
return st
case "@keet-private-id/add-unreads-key-operation":
return ut
case "@keet-private-id/remove-unreads-key-operation":
return ft
case "@keet/label-type":
return yt
case "@keet/chat-label":
return xt
case "@keet/add-chat-label-operation":
return vt
case "@keet/remove-chat-label-operation":
return gt
case "@keet/chat-label-summary":
return Kt
case "@keet/chat-label-digest":
return wt
case "@keet/update-read-length-operation":
return Rt
case "@keet/read-length":
return Tt
case "@keet/tmp-removed-member":
return At
case "@keet-private-id/settings":
return Mt
case "@keet-private-id/user-settings-key":
return Ct
case "@keet-private-id/update-settings-operation":
return It
case "@local/error-record-details":
return qt
case "@local/error-record":
return jt
case "@local/keet-state":
return Bt
case "@local/file-stats":
return Vt
case "@keet/member-label-type":
return Ut
case "@keet/member-label":
return Jt
case "@keet/add-member-label-operation":
return Wt
case "@keet/member-label-summary":
return Ht
case "@keet/member-label-digest":
return Gt
case "@keet/location-shared-event":
return Qt
case "@keet/move-indexer-operation":
return Yt
case "@keet/start-call":
return _t
case "@keet/join-call":
return oi
case "@keet/leave-call":
return ci
case "@keet/end-call":
return ti
case "@keet/add-call-stream":
return ai
case "@keet/remove-call-stream":
return pi
case "@keet/call-record":
return ui
case "@keet/call-member-record":
return li
case "@keet/call-device-record":
return fi
case "@keet/call-stream-record":
return mi
default:
throw new Error("Encoder not found " + e)
}
}
function Ui(e, d = 28) {
const n = Ni(e)
return {
preencode(e, c) {
;((o = d), n.preencode(e, c))
},
encode(e, c) {
;((o = d), n.encode(e, c))
},
decode: (e) => ((o = d), n.decode(e)),
}
}
const Ji = Ui
module.exports = {
resolveStruct: Ji,
getStruct: Ui,
getEnum: Vi,
getEncoding: Ni,
encode: Ei,
decode: Bi,
setVersion: ji,
version: o,
}