Files
discord-decomp/_bundle/Module1341.js
T
2026-11-01 12:12:55 +02:00

1759 lines
49 KiB
JavaScript

// Metro module 1341 (f1342).
import { MessageType, MESSAGE_TYPE, reflectionMergePartial, UnknownFieldHandler, WireType } from "./Module1307";
import { Versions } from "./Module1335";
import { $callWithNewTarget } from "../_hermes/prelude";
function $mk69052($env) {
return () => c1114_5;
}
function $mk69053($env) {
return () => ["discord_protos.discord_users.v1.GIFType", c1114_3];
}
function $mk69054($env) {
return () => c1114_11;
}
function $mk69055($env) {
return () => c1114_11;
}
function $mk69056($env) {
return () => c1114_11;
}
function $mk69057($env) {
return () => c1114_11;
}
function $mk69058($env) {
return () => c1114_11;
}
function $mk69059($env) {
return () => c1114_11;
}
function $mk69060($env) {
return () => c1114_11;
}
let c1114_17, c1114_18, c1114_4, c1114_19, c1114_5, c1114_20, c1114_6, c1114_21, c1114_7, c1114_22, c1114_8, c1114_23, c1114_9, c1114_24, c1114_10, c1114_25, c1114_11, c1114_26, c1114_12, c1114_27, c1114_13, c1114_28, c1114_14, c1114_29, c1114_15, c1114_30, c1114_16;
let env1114;
const r20 = env1114 = {};
const c1114_3 = {
NONE: 0,
0: "NONE",
IMAGE: 1,
1: "IMAGE",
VIDEO: 2,
2: "VIDEO"
};
class FrecencyUserSettings$Type extends MessageType {
constructor() {
const r10 = [{
no: 1,
name: "versions",
kind: "message",
T: () => Versions
}, {
no: 2,
name: "favorite_gifs",
kind: "message",
T: () => c1114_4
}, {
no: 3,
name: "favorite_stickers",
kind: "message",
T: () => c1114_6
}, {
no: 4,
name: "sticker_frecency",
kind: "message",
T: () => c1114_7
}, {
no: 5,
name: "favorite_emojis",
kind: "message",
T: () => c1114_8
}, {
no: 6,
name: "emoji_frecency",
kind: "message",
T: () => c1114_9
}, {
no: 7,
name: "application_command_frecency",
kind: "message",
T: () => c1114_10
}, {
no: 8,
name: "favorite_soundboard_sounds",
kind: "message",
T: () => c1114_12
}, {
no: 9,
name: "application_frecency",
kind: "message",
T: () => c1114_15
}, {
no: 10,
name: "heard_sound_frecency",
kind: "message",
T: () => c1114_13
}, {
no: 11,
name: "played_sound_frecency",
kind: "message",
T: () => c1114_14
}, {
no: 12,
name: "guild_and_channel_frecency",
kind: "message",
T: () => c1114_16
}, {
no: 13,
name: "emoji_reaction_frecency",
kind: "message",
T: () => c1114_9
}];
super("discord_protos.discord_users.v1.FrecencyUserSettings", r10);
}
create(a0) {
const r1 = {};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r4 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
L22: {
const [r11, r30] = a0.tag();
switch (r11) {
case 1:
r4.versions = Versions.internalBinaryRead(a0, a0.uint32(), a2, r4.versions);
break L22;
case 2:
r4.favoriteGifs = c1114_4.internalBinaryRead(a0, a0.uint32(), a2, r4.favoriteGifs);
break L22;
case 3:
r4.favoriteStickers = c1114_6.internalBinaryRead(a0, a0.uint32(), a2, r4.favoriteStickers);
break L22;
case 4:
r4.stickerFrecency = c1114_7.internalBinaryRead(a0, a0.uint32(), a2, r4.stickerFrecency);
break L22;
case 5:
r4.favoriteEmojis = c1114_8.internalBinaryRead(a0, a0.uint32(), a2, r4.favoriteEmojis);
break L22;
case 6:
r4.emojiFrecency = c1114_9.internalBinaryRead(a0, a0.uint32(), a2, r4.emojiFrecency);
break L22;
case 7:
r4.applicationCommandFrecency = c1114_10.internalBinaryRead(a0, a0.uint32(), a2, r4.applicationCommandFrecency);
break L22;
case 8:
r4.favoriteSoundboardSounds = c1114_12.internalBinaryRead(a0, a0.uint32(), a2, r4.favoriteSoundboardSounds);
break L22;
case 9:
r4.applicationFrecency = c1114_15.internalBinaryRead(a0, a0.uint32(), a2, r4.applicationFrecency);
break L22;
case 10:
r4.heardSoundFrecency = c1114_13.internalBinaryRead(a0, a0.uint32(), a2, r4.heardSoundFrecency);
break L22;
case 11:
r4.playedSoundFrecency = c1114_14.internalBinaryRead(a0, a0.uint32(), a2, r4.playedSoundFrecency);
break L22;
case 12:
r4.guildAndChannelFrecency = c1114_16.internalBinaryRead(a0, a0.uint32(), a2, r4.guildAndChannelFrecency);
break L22;
case 13:
r4.emojiReactionFrecency = c1114_9.internalBinaryRead(a0, a0.uint32(), a2, r4.emojiReactionFrecency);
break L22;
default:
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r11} (wire type ${r30}) for ${this.typeName}`);
}
const r146 = a0.skip(r30);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r4, r11, r30, r146);
}
}
}
}
return r4;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.versions) {
Versions.internalBinaryWrite(a0.versions, a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.favoriteGifs) {
c1114_4.internalBinaryWrite(a0.favoriteGifs, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.favoriteStickers) {
c1114_6.internalBinaryWrite(a0.favoriteStickers, a1.tag(3, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.stickerFrecency) {
c1114_7.internalBinaryWrite(a0.stickerFrecency, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.favoriteEmojis) {
c1114_8.internalBinaryWrite(a0.favoriteEmojis, a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.emojiFrecency) {
c1114_9.internalBinaryWrite(a0.emojiFrecency, a1.tag(6, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.applicationCommandFrecency) {
c1114_10.internalBinaryWrite(a0.applicationCommandFrecency, a1.tag(7, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.favoriteSoundboardSounds) {
c1114_12.internalBinaryWrite(a0.favoriteSoundboardSounds, a1.tag(8, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.applicationFrecency) {
c1114_15.internalBinaryWrite(a0.applicationFrecency, a1.tag(9, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.heardSoundFrecency) {
c1114_13.internalBinaryWrite(a0.heardSoundFrecency, a1.tag(10, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.playedSoundFrecency) {
c1114_14.internalBinaryWrite(a0.playedSoundFrecency, a1.tag(11, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.guildAndChannelFrecency) {
c1114_16.internalBinaryWrite(a0.guildAndChannelFrecency, a1.tag(12, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.emojiReactionFrecency) {
c1114_9.internalBinaryWrite(a0.emojiReactionFrecency, a1.tag(13, WireType.LengthDelimited).fork(), a2).join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_17 = FrecencyUserSettings$Type;
const r16 = new FrecencyUserSettings$Type();
class FavoriteGIFs$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "gifs",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69052(r2)
}
}, {
no: 2,
name: "hide_tooltip",
kind: "scalar",
T: 8
}];
super("discord_protos.discord_users.v1.FavoriteGIFs", r10);
}
create(a0) {
const r1 = {
gifs: {},
hideTooltip: false
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.gifs, a0, a2);
} else if (r19 === 2) {
r5.hideTooltip = a0.bool();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.FavoriteGIFs.gifs");
}
r38 = c1114_5.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_5.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.gifs)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_5.internalBinaryWrite(a0.gifs[item], a1, a2);
a1.join().join();
}
if (a0.hideTooltip !== false) {
a1.tag(2, WireType.Varint).bool(a0.hideTooltip);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_18 = FavoriteGIFs$Type;
const prototypeOf = Object.getPrototypeOf(FavoriteGIFs$Type);
const r65 = [{
no: 1,
name: "gifs",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69052(r20)
}
}, {
no: 2,
name: "hide_tooltip",
kind: "scalar",
T: 8
}];
const r67 = Object.create(FavoriteGIFs$Type.prototype);
const r69 = $callWithNewTarget(prototypeOf, r67, FavoriteGIFs$Type, "discord_protos.discord_users.v1.FavoriteGIFs", r65);
c1114_4 = r69 instanceof Object ? r69 : r67;
class FavoriteGIF$Type extends MessageType {
constructor() {
const r1 = env1114;
const r2 = [{
no: 1,
name: "format",
kind: "enum",
T: $mk69053(r1)
}, {
no: 2,
name: "src",
kind: "scalar",
T: 9
}, {
no: 3,
name: "width",
kind: "scalar",
T: 13
}, {
no: 4,
name: "height",
kind: "scalar",
T: 13
}, {
no: 5,
name: "order",
kind: "scalar",
T: 13
}];
super("discord_protos.discord_users.v1.FavoriteGIF", r2);
}
create(a0) {
const r1 = {
format: 0,
src: "",
width: 0,
height: 0,
order: 0
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r8 = a3 == null ? this.create() : a3;
const r11 = a0.pos + a1;
while (a0.pos < r11) {
const [r22, r21] = a0.tag();
if (r22 === 1) {
r8.format = a0.int32();
} else if (r22 === 2) {
r8.src = a0.string();
} else if (r22 === 3) {
r8.width = a0.uint32();
} else if (r22 === 4) {
r8.height = a0.uint32();
} else if (r22 === 5) {
r8.order = a0.uint32();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r22} (wire type ${r21}) for ${this.typeName}`);
}
const r37 = a0.skip(r21);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r8, r22, r21, r37);
}
}
}
return r8;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.format !== 0) {
a1.tag(1, WireType.Varint).int32(a0.format);
}
if (a0.src !== "") {
a1.tag(2, WireType.LengthDelimited).string(a0.src);
}
if (a0.width !== 0) {
a1.tag(3, WireType.Varint).uint32(a0.width);
}
if (a0.height !== 0) {
a1.tag(4, WireType.Varint).uint32(a0.height);
}
if (a0.order !== 0) {
a1.tag(5, WireType.Varint).uint32(a0.order);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_19 = FavoriteGIF$Type;
const prototypeOf2 = Object.getPrototypeOf(FavoriteGIF$Type);
const r82 = [{
no: 1,
name: "format",
kind: "enum",
T: $mk69053(r20)
}, {
no: 2,
name: "src",
kind: "scalar",
T: 9
}, {
no: 3,
name: "width",
kind: "scalar",
T: 13
}, {
no: 4,
name: "height",
kind: "scalar",
T: 13
}, {
no: 5,
name: "order",
kind: "scalar",
T: 13
}];
const r87 = Object.create(FavoriteGIF$Type.prototype);
const r91 = $callWithNewTarget(prototypeOf2, r87, FavoriteGIF$Type, "discord_protos.discord_users.v1.FavoriteGIF", r82);
c1114_5 = r91 instanceof Object ? r91 : r87;
class FavoriteStickers$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "sticker_ids",
kind: "scalar",
repeat: 1,
T: 6
}];
super("discord_protos.discord_users.v1.FavoriteStickers", r2);
}
create(a0) {
const r1 = {
stickerIds: []
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r33] = a0.tag();
if (r19 === 1) {
if (r33 === WireType.LengthDelimited) {
const r71 = a0.int32() + a0.pos;
while (a0.pos < r71) {
r5.stickerIds.push(a0.fixed64().toString());
}
} else {
r5.stickerIds.push(a0.fixed64().toString());
}
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r33}) for ${this.typeName}`);
}
const r14 = a0.skip(r33);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r33, r14);
}
}
}
return r5;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.stickerIds.length) {
a1.tag(1, WireType.LengthDelimited).fork();
const length = a0.stickerIds.length;
let r0 = 0;
if (0 < length) {
do {
a1.fixed64(a0.stickerIds[r0]);
r0 = r0 + 1;
} while (r0 < a0.stickerIds.length);
}
a1.join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_20 = FavoriteStickers$Type;
const prototypeOf3 = Object.getPrototypeOf(FavoriteStickers$Type);
const r103 = [{
no: 1,
name: "sticker_ids",
kind: "scalar",
repeat: 1,
T: 6
}];
const r104 = Object.create(FavoriteStickers$Type.prototype);
const r108 = $callWithNewTarget(prototypeOf3, r104, FavoriteStickers$Type, "discord_protos.discord_users.v1.FavoriteStickers", r103);
c1114_6 = r108 instanceof Object ? r108 : r104;
class StickerFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "stickers",
kind: "map",
K: 6,
V: {
kind: "message",
T: $mk69054(r2)
}
}];
super("discord_protos.discord_users.v1.StickerFrecency", r10);
}
create(a0) {
const r1 = {
stickers: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.stickers, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.fixed64().toString();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.StickerFrecency.stickers");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "0";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.stickers)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).fixed64(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.stickers[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_21 = StickerFrecency$Type;
const prototypeOf4 = Object.getPrototypeOf(StickerFrecency$Type);
const r123 = [{
no: 1,
name: "stickers",
kind: "map",
K: 6,
V: {
kind: "message",
T: $mk69054(r20)
}
}];
const r124 = Object.create(StickerFrecency$Type.prototype);
const r128 = $callWithNewTarget(prototypeOf4, r124, StickerFrecency$Type, "discord_protos.discord_users.v1.StickerFrecency", r123);
c1114_7 = r128 instanceof Object ? r128 : r124;
class FavoriteEmojis$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "emojis",
kind: "scalar",
repeat: 2,
T: 9
}];
super("discord_protos.discord_users.v1.FavoriteEmojis", r2);
}
create(a0) {
const r1 = {
emojis: []
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.emojis.push(a0.string());
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
internalBinaryWrite(a0, a1, a2) {
const length = a0.emojis.length;
let r0 = 0;
if (0 < length) {
do {
a1.tag(1, WireType.LengthDelimited).string(a0.emojis[r0]);
r0 = r0 + 1;
} while (r0 < a0.emojis.length);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_22 = FavoriteEmojis$Type;
const prototypeOf5 = Object.getPrototypeOf(FavoriteEmojis$Type);
const r140 = [{
no: 1,
name: "emojis",
kind: "scalar",
repeat: 2,
T: 9
}];
const r141 = Object.create(FavoriteEmojis$Type.prototype);
const r145 = $callWithNewTarget(prototypeOf5, r141, FavoriteEmojis$Type, "discord_protos.discord_users.v1.FavoriteEmojis", r140);
c1114_8 = r145 instanceof Object ? r145 : r141;
class EmojiFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "emojis",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69055(r2)
}
}];
super("discord_protos.discord_users.v1.EmojiFrecency", r10);
}
create(a0) {
const r1 = {
emojis: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.emojis, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.EmojiFrecency.emojis");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.emojis)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.emojis[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_23 = EmojiFrecency$Type;
const prototypeOf6 = Object.getPrototypeOf(EmojiFrecency$Type);
const r160 = [{
no: 1,
name: "emojis",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69055(r20)
}
}];
const r161 = Object.create(EmojiFrecency$Type.prototype);
const r165 = $callWithNewTarget(prototypeOf6, r161, EmojiFrecency$Type, "discord_protos.discord_users.v1.EmojiFrecency", r160);
c1114_9 = r165 instanceof Object ? r165 : r161;
class ApplicationCommandFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "application_commands",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69056(r2)
}
}];
super("discord_protos.discord_users.v1.ApplicationCommandFrecency", r10);
}
create(a0) {
const r1 = {
applicationCommands: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.applicationCommands, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.ApplicationCommandFrecency.application_commands");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.applicationCommands)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.applicationCommands[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_24 = ApplicationCommandFrecency$Type;
const prototypeOf7 = Object.getPrototypeOf(ApplicationCommandFrecency$Type);
const r180 = [{
no: 1,
name: "application_commands",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69056(r20)
}
}];
const r181 = Object.create(ApplicationCommandFrecency$Type.prototype);
const r185 = $callWithNewTarget(prototypeOf7, r181, ApplicationCommandFrecency$Type, "discord_protos.discord_users.v1.ApplicationCommandFrecency", r180);
c1114_10 = r185 instanceof Object ? r185 : r181;
class FrecencyItem$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "total_uses",
kind: "scalar",
T: 13
}, {
no: 2,
name: "recent_uses",
kind: "scalar",
repeat: 1,
T: 4
}, {
no: 3,
name: "frecency",
kind: "scalar",
T: 5
}, {
no: 4,
name: "score",
kind: "scalar",
T: 5
}];
super("discord_protos.discord_users.v1.FrecencyItem", r2);
}
create(a0) {
const r1 = {
totalUses: 0,
recentUses: [],
frecency: 0,
score: 0
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r7 = a3 == null ? this.create() : a3;
const r10 = a0.pos + a1;
while (a0.pos < r10) {
const [r21, r35] = a0.tag();
if (r21 === 1) {
r7.totalUses = a0.uint32();
} else if (r21 === 2) {
if (r35 === WireType.LengthDelimited) {
const r77 = a0.int32() + a0.pos;
while (a0.pos < r77) {
r7.recentUses.push(a0.uint64().toString());
}
} else {
r7.recentUses.push(a0.uint64().toString());
}
} else if (r21 === 3) {
r7.frecency = a0.int32();
} else if (r21 === 4) {
r7.score = a0.int32();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r21} (wire type ${r35}) for ${this.typeName}`);
}
const r16 = a0.skip(r35);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r7, r21, r35, r16);
}
}
}
return r7;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.totalUses !== 0) {
a1.tag(1, WireType.Varint).uint32(a0.totalUses);
}
if (a0.recentUses.length) {
a1.tag(2, WireType.LengthDelimited).fork();
const r36 = 0 < a0.recentUses.length;
let r37 = 0;
if (r36) {
do {
a1.uint64(a0.recentUses[r37]);
r37 = r37 + 1;
} while (r37 < a0.recentUses.length);
}
a1.join();
}
if (a0.frecency !== 0) {
a1.tag(3, WireType.Varint).int32(a0.frecency);
}
if (a0.score !== 0) {
a1.tag(4, WireType.Varint).int32(a0.score);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_25 = FrecencyItem$Type;
const prototypeOf8 = Object.getPrototypeOf(FrecencyItem$Type);
const r197 = [{
no: 1,
name: "total_uses",
kind: "scalar",
T: 13
}, {
no: 2,
name: "recent_uses",
kind: "scalar",
repeat: 1,
T: 4
}, {
no: 3,
name: "frecency",
kind: "scalar",
T: 5
}, {
no: 4,
name: "score",
kind: "scalar",
T: 5
}];
const r201 = Object.create(FrecencyItem$Type.prototype);
const r205 = $callWithNewTarget(prototypeOf8, r201, FrecencyItem$Type, "discord_protos.discord_users.v1.FrecencyItem", r197);
c1114_11 = r205 instanceof Object ? r205 : r201;
class FavoriteSoundboardSounds$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "sound_ids",
kind: "scalar",
repeat: 1,
T: 6
}];
super("discord_protos.discord_users.v1.FavoriteSoundboardSounds", r2);
}
create(a0) {
const r1 = {
soundIds: []
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r33] = a0.tag();
if (r19 === 1) {
if (r33 === WireType.LengthDelimited) {
const r71 = a0.int32() + a0.pos;
while (a0.pos < r71) {
r5.soundIds.push(a0.fixed64().toString());
}
} else {
r5.soundIds.push(a0.fixed64().toString());
}
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r33}) for ${this.typeName}`);
}
const r14 = a0.skip(r33);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r33, r14);
}
}
}
return r5;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.soundIds.length) {
a1.tag(1, WireType.LengthDelimited).fork();
const length = a0.soundIds.length;
let r0 = 0;
if (0 < length) {
do {
a1.fixed64(a0.soundIds[r0]);
r0 = r0 + 1;
} while (r0 < a0.soundIds.length);
}
a1.join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_26 = FavoriteSoundboardSounds$Type;
const prototypeOf9 = Object.getPrototypeOf(FavoriteSoundboardSounds$Type);
const r217 = [{
no: 1,
name: "sound_ids",
kind: "scalar",
repeat: 1,
T: 6
}];
const r218 = Object.create(FavoriteSoundboardSounds$Type.prototype);
const r222 = $callWithNewTarget(prototypeOf9, r218, FavoriteSoundboardSounds$Type, "discord_protos.discord_users.v1.FavoriteSoundboardSounds", r217);
c1114_12 = r222 instanceof Object ? r222 : r218;
class HeardSoundFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "heard_sounds",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69057(r2)
}
}];
super("discord_protos.discord_users.v1.HeardSoundFrecency", r10);
}
create(a0) {
const r1 = {
heardSounds: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.heardSounds, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.HeardSoundFrecency.heard_sounds");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.heardSounds)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.heardSounds[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_27 = HeardSoundFrecency$Type;
const prototypeOf10 = Object.getPrototypeOf(HeardSoundFrecency$Type);
const r237 = [{
no: 1,
name: "heard_sounds",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69057(r20)
}
}];
const r238 = Object.create(HeardSoundFrecency$Type.prototype);
const r242 = $callWithNewTarget(prototypeOf10, r238, HeardSoundFrecency$Type, "discord_protos.discord_users.v1.HeardSoundFrecency", r237);
c1114_13 = r242 instanceof Object ? r242 : r238;
class PlayedSoundFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "played_sounds",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69058(r2)
}
}];
super("discord_protos.discord_users.v1.PlayedSoundFrecency", r10);
}
create(a0) {
const r1 = {
playedSounds: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.playedSounds, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.PlayedSoundFrecency.played_sounds");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.playedSounds)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.playedSounds[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_28 = PlayedSoundFrecency$Type;
const prototypeOf11 = Object.getPrototypeOf(PlayedSoundFrecency$Type);
const r257 = [{
no: 1,
name: "played_sounds",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69058(r20)
}
}];
const r258 = Object.create(PlayedSoundFrecency$Type.prototype);
const r262 = $callWithNewTarget(prototypeOf11, r258, PlayedSoundFrecency$Type, "discord_protos.discord_users.v1.PlayedSoundFrecency", r257);
c1114_14 = r262 instanceof Object ? r262 : r258;
class ApplicationFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "applications",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69059(r2)
}
}];
super("discord_protos.discord_users.v1.ApplicationFrecency", r10);
}
create(a0) {
const r1 = {
applications: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.applications, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.string();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.ApplicationFrecency.applications");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.applications)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.applications[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_29 = ApplicationFrecency$Type;
const prototypeOf12 = Object.getPrototypeOf(ApplicationFrecency$Type);
const r277 = [{
no: 1,
name: "applications",
kind: "map",
K: 9,
V: {
kind: "message",
T: $mk69059(r20)
}
}];
const r278 = Object.create(ApplicationFrecency$Type.prototype);
const r282 = $callWithNewTarget(prototypeOf12, r278, ApplicationFrecency$Type, "discord_protos.discord_users.v1.ApplicationFrecency", r277);
c1114_15 = r282 instanceof Object ? r282 : r278;
class GuildAndChannelFrecency$Type extends MessageType {
constructor() {
const r2 = env1114;
const r10 = [{
no: 1,
name: "guild_and_channels",
kind: "map",
K: 6,
V: {
kind: "message",
T: $mk69060(r2)
}
}];
super("discord_protos.discord_users.v1.GuildAndChannelFrecency", r10);
}
create(a0) {
const r1 = {
guildAndChannels: {}
};
globalThis.globalThis.Object.defineProperty(r1, MESSAGE_TYPE, {
enumerable: false,
value: this
});
if (a0 !== void 0) {
reflectionMergePartial(this, r1, a0);
}
return r1;
}
internalBinaryRead(a0, a1, a2, a3) {
const r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
this.binaryReadMap1(r5.guildAndChannels, a0, a2);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r19} (wire type ${r18}) for ${this.typeName}`);
}
const r34 = a0.skip(r18);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r5, r19, r18, r34);
}
}
}
return r5;
}
binaryReadMap1(a0, a1, a2) {
let r38, pos;
const r10 = a1.pos + a1.uint32();
const r3 = a1.pos < r10;
let r9 = void 0;
let r8 = void 0;
let r23 = void 0;
let r24 = void 0;
if (r3) {
do {
const [r27, ] = a1.tag();
const r15 = r9;
let r29 = r8;
if (r27 === 1) {
r29 = a1.fixed64().toString();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.discord_users.v1.GuildAndChannelFrecency.guild_and_channels");
}
r38 = c1114_11.internalBinaryRead(a1, a1.uint32(), a2);
}
pos = a1.pos;
r9 = r38;
r8 = r29;
r23 = r9;
r24 = r8;
} while (pos < r10);
}
if (r24 == null) {
r24 = "0";
}
if (r23 == null) {
r23 = c1114_11.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.guildAndChannels)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).fixed64(item);
a1.tag(2, WireType.LengthDelimited).fork();
c1114_11.internalBinaryWrite(a0.guildAndChannels[item], a1, a2);
a1.join().join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1114_30 = GuildAndChannelFrecency$Type;
const prototypeOf13 = Object.getPrototypeOf(GuildAndChannelFrecency$Type);
const r298 = [{
no: 1,
name: "guild_and_channels",
kind: "map",
K: 6,
V: {
kind: "message",
T: $mk69060(r20)
}
}];
const r299 = Object.create(GuildAndChannelFrecency$Type.prototype);
const r303 = $callWithNewTarget(prototypeOf13, r299, GuildAndChannelFrecency$Type, "discord_protos.discord_users.v1.GuildAndChannelFrecency", r298);
c1114_16 = r303 instanceof Object ? r303 : r299;
export { c1114_3 as GIFType };
export { r16 as FrecencyUserSettings };
export { c1114_4 as FavoriteGIFs };
export { c1114_5 as FavoriteGIF };
export { c1114_6 as FavoriteStickers };
export { c1114_7 as StickerFrecency };
export { c1114_8 as FavoriteEmojis };
export { c1114_9 as EmojiFrecency };
export { c1114_10 as ApplicationCommandFrecency };
export { c1114_11 as FrecencyItem };
export { c1114_12 as FavoriteSoundboardSounds };
export { c1114_13 as HeardSoundFrecency };
export { c1114_14 as PlayedSoundFrecency };
export { c1114_15 as ApplicationFrecency };
export { c1114_16 as GuildAndChannelFrecency };