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

4426 lines
120 KiB
JavaScript

// Metro module 1892 (f1893).
import { MessageType, MESSAGE_TYPE, reflectionMergePartial, UnknownFieldHandler, WireType } from "./Module1307";
import { StringValue, UInt64Value, UInt32Value, BoolValue } from "./Module1337";
import { SafetyState } from "./Module1893";
import { Timestamp } from "./Module1336";
import { $callWithNewTarget } from "../_hermes/prelude";
function $mk70422($env) {
return () => StringValue;
}
function $mk70423($env) {
return () => StringValue;
}
function $mk70424($env) {
return () => c1588_17;
}
function $mk70425($env) {
return () => c1588_21;
}
function $mk70426($env) {
return () => c1588_20;
}
function $mk70427($env) {
return () => SafetyState;
}
function $mk70428($env) {
return () => c1588_19;
}
function $mk70429($env) {
return () => StringValue;
}
function $mk70430($env) {
return () => StringValue;
}
function $mk70431($env) {
return () => StringValue;
}
function $mk70432($env) {
return () => UInt64Value;
}
function $mk70433($env) {
return () => UInt32Value;
}
function $mk70434($env) {
return () => UInt64Value;
}
function $mk70435($env) {
return () => Timestamp;
}
function $mk70436($env) {
return () => ["discord_protos.users.v1.DisplayNameFont", c1588_4, "DISPLAY_NAME_FONT_"];
}
function $mk70437($env) {
return () => ["discord_protos.users.v1.DisplayNameEffect", c1588_5, "DISPLAY_NAME_EFFECT_"];
}
function $mk70438($env) {
return () => BoolValue;
}
function $mk70439($env) {
return () => c1588_18;
}
function $mk70440($env) {
return () => UInt64Value;
}
function $mk70441($env) {
return () => BoolValue;
}
function $mk70442($env) {
return () => StringValue;
}
function $mk70443($env) {
return () => StringValue;
}
function $mk70444($env) {
return () => c1588_16;
}
function $mk70445($env) {
return () => c1588_16;
}
function $mk70446($env) {
return () => ["discord_protos.users.v1.DayOfWeek", c1588_3];
}
function $mk70447($env) {
return () => c1588_22;
}
function $mk70448($env) {
return () => Timestamp;
}
function $mk70449($env) {
return () => Timestamp;
}
function $mk70450($env) {
return () => c1588_25;
}
function $mk70451($env) {
return () => c1588_26;
}
function $mk70452($env) {
return () => c1588_27;
}
function $mk70453($env) {
return () => ["discord_protos.users.v1.AnonymizationStatus", c1588_6, "ANONYMIZATION_STATUS_"];
}
function $mk70454($env) {
return () => UInt64Value;
}
function $mk70472($env) {
return () => Timestamp;
}
function $mk70473($env) {
return () => ["discord_protos.users.v1.AgeAssuranceMethod", c1588_7, "AGE_ASSURANCE_METHOD_"];
}
function $mk70474($env) {
return () => ["discord_protos.users.v1.AgeAssuranceVendor", c1588_8, "AGE_ASSURANCE_VENDOR_"];
}
function $mk70475($env) {
return () => Timestamp;
}
function $mk70476($env) {
return () => ["discord_protos.users.v1.AgeAssuranceGroup", c1588_9];
}
function $mk70477($env) {
return () => ["discord_protos.users.v1.UserLinkType", c1588_10];
}
function $mk70478($env) {
return () => ["discord_protos.users.v1.UserLinkStatus", c1588_11];
}
function $mk70479($env) {
return () => Timestamp;
}
function $mk70480($env) {
return () => Timestamp;
}
function $mk70481($env) {
return () => Timestamp;
}
function $mk70482($env) {
return () => c1588_32;
}
function $mk70483($env) {
return () => Timestamp;
}
function $mk70484($env) {
return () => ["discord_protos.users.v1.PremiumSource", c1588_12, "PREMIUM_SOURCE_"];
}
function $mk70485($env) {
return () => ["discord_protos.users.v1.PremiumSubscriptionType", c1588_13, "PREMIUM_SUBSCRIPTION_TYPE_"];
}
function $mk70486($env) {
return () => ["discord_protos.users.v1.PremiumSubscriptionGroupRole", c1588_14, "PREMIUM_SUBSCRIPTION_GROUP_ROLE_"];
}
function $mk70487($env) {
return () => Timestamp;
}
function $mk70488($env) {
return () => ["discord_protos.users.v1.PerkSource", c1588_15];
}
function $mk70489($env) {
return () => c1588_39;
}
function $mk70490($env) {
return () => c1588_40;
}
function $mk70491($env) {
return () => c1588_38;
}
function $mk70492($env) {
return () => Timestamp;
}
function $mk70493($env) {
return () => Timestamp;
}
function $mk70494($env) {
return () => StringValue;
}
function $mk70495($env) {
return () => Timestamp;
}
let c1588_43, c1588_16, c1588_44, c1588_45, c1588_46, c1588_17, c1588_47, c1588_18, c1588_48, c1588_19, c1588_49, c1588_20, c1588_50, c1588_21, c1588_51, c1588_22, c1588_52, c1588_23, c1588_53, c1588_24, c1588_54, c1588_25, c1588_55, c1588_26, c1588_56, c1588_27, c1588_57, c1588_28, c1588_58, c1588_29, c1588_59, c1588_60, c1588_30, c1588_61, c1588_31, c1588_62, c1588_32, c1588_63, c1588_33, c1588_64, c1588_34, c1588_65, c1588_66, c1588_35, c1588_67, c1588_36, c1588_68, c1588_37, c1588_69, c1588_38, c1588_70, c1588_39, c1588_71, c1588_40, c1588_72, c1588_41, c1588_73, c1588_42;
let env1588;
const r75 = env1588 = {};
const c1588_3 = {
DAY_OF_WEEK_UNSPECIFIED: 0,
0: "DAY_OF_WEEK_UNSPECIFIED",
MONDAY: 1,
1: "MONDAY",
TUESDAY: 2,
2: "TUESDAY",
WEDNESDAY: 3,
3: "WEDNESDAY",
THURSDAY: 4,
4: "THURSDAY",
FRIDAY: 5,
5: "FRIDAY",
SATURDAY: 6,
6: "SATURDAY",
SUNDAY: 7,
7: "SUNDAY"
};
const c1588_4 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
DEFAULT: 11,
11: "DEFAULT",
BANGERS: 1,
1: "BANGERS",
BIO_RHYME: 2,
2: "BIO_RHYME",
CHERRY_BOMB: 3,
3: "CHERRY_BOMB",
CHICLE: 4,
4: "CHICLE",
COMPAGNON: 5,
5: "COMPAGNON",
MUSEO_MODERNO: 6,
6: "MUSEO_MODERNO",
NEO_CASTEL: 7,
7: "NEO_CASTEL",
PIXELIFY: 8,
8: "PIXELIFY",
RIBES: 9,
9: "RIBES",
SINISTRE: 10,
10: "SINISTRE",
ZILLA_SLAB: 12,
12: "ZILLA_SLAB",
PLAYPEN_SANS: 13,
13: "PLAYPEN_SANS",
ORBITRON: 14,
14: "ORBITRON",
NEW_ROCKER: 15,
15: "NEW_ROCKER",
KALAM: 16,
16: "KALAM"
};
const c1588_5 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
SOLID: 1,
1: "SOLID",
GRADIENT: 2,
2: "GRADIENT",
NEON: 3,
3: "NEON",
TOON: 4,
4: "TOON",
POP: 5,
5: "POP",
GLOW: 6,
6: "GLOW",
PRISM: 7,
7: "PRISM",
GUMMY: 8,
8: "GUMMY",
TEST_1: 1001,
1001: "TEST_1",
TEST_2: 1002,
1002: "TEST_2",
TEST_3: 1003,
1003: "TEST_3",
TEST_4: 1004,
1004: "TEST_4"
};
const r69 = {
BADGE_TYPE_UNSPECIFIED: 0,
0: "BADGE_TYPE_UNSPECIFIED",
APRIL_FOOLS_2026: 1,
1: "APRIL_FOOLS_2026"
};
const c1588_6 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
TO_BE_ANONYMIZED_USER: 1,
1: "TO_BE_ANONYMIZED_USER",
INACCESSIBLE_ANONYMIZED_USER: 2,
2: "INACCESSIBLE_ANONYMIZED_USER",
ANONYMOUS_USER: 3,
3: "ANONYMOUS_USER"
};
const r67 = {
AGE_ASSURANCE_TIER_UNSPECIFIED: 0,
0: "AGE_ASSURANCE_TIER_UNSPECIFIED",
AGE_ASSURANCE_TIER_1: 1,
1: "AGE_ASSURANCE_TIER_1",
AGE_ASSURANCE_TIER_2: 2,
2: "AGE_ASSURANCE_TIER_2",
AGE_ASSURANCE_TIER_3: 3,
3: "AGE_ASSURANCE_TIER_3",
AGE_ASSURANCE_TIER_4: 4,
4: "AGE_ASSURANCE_TIER_4"
};
const c1588_7 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
ID_SELFIE_MATCH: 1,
1: "ID_SELFIE_MATCH",
ID_SCAN: 2,
2: "ID_SCAN",
FACIAL_AGE_ESTIMATION: 3,
3: "FACIAL_AGE_ESTIMATION",
BEHAVIORAL_INFERENCE: 4,
4: "BEHAVIORAL_INFERENCE",
CREDIT_CARD: 5,
5: "CREDIT_CARD",
EMAIL_DOMAIN: 6,
6: "EMAIL_DOMAIN",
OS_SIGNAL: 7,
7: "OS_SIGNAL",
ML_AGE_INFERENCE: 8,
8: "ML_AGE_INFERENCE",
GOOGLE_WALLET: 9,
9: "GOOGLE_WALLET"
};
const c1588_8 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
K_ID: 1,
1: "K_ID",
PERSONA: 2,
2: "PERSONA",
INCODE: 3,
3: "INCODE",
DISCORD: 4,
4: "DISCORD",
GOOGLE_WALLET: 5,
5: "GOOGLE_WALLET",
APPLE_APP_STORE: 6,
6: "APPLE_APP_STORE",
GOOGLE_PLAY: 7,
7: "GOOGLE_PLAY"
};
const c1588_9 = {
AGE_ASSURANCE_GROUP_UNSPECIFIED: 0,
0: "AGE_ASSURANCE_GROUP_UNSPECIFIED",
AGE_ASSURANCE_GROUP_13: 1,
1: "AGE_ASSURANCE_GROUP_13",
AGE_ASSURANCE_GROUP_14: 2,
2: "AGE_ASSURANCE_GROUP_14",
AGE_ASSURANCE_GROUP_15: 3,
3: "AGE_ASSURANCE_GROUP_15",
AGE_ASSURANCE_GROUP_16: 4,
4: "AGE_ASSURANCE_GROUP_16",
AGE_ASSURANCE_GROUP_17: 5,
5: "AGE_ASSURANCE_GROUP_17",
AGE_ASSURANCE_GROUP_18_21: 6,
6: "AGE_ASSURANCE_GROUP_18_21",
AGE_ASSURANCE_GROUP_22_24: 7,
7: "AGE_ASSURANCE_GROUP_22_24",
AGE_ASSURANCE_GROUP_25_34: 8,
8: "AGE_ASSURANCE_GROUP_25_34",
AGE_ASSURANCE_GROUP_35_UP: 9,
9: "AGE_ASSURANCE_GROUP_35_UP"
};
const c1588_10 = {
USER_LINK_TYPE_UNSPECIFIED: 0,
0: "USER_LINK_TYPE_UNSPECIFIED",
PARENT: 1,
1: "PARENT",
CHILD: 2,
2: "CHILD"
};
const c1588_11 = {
USER_LINK_STATUS_UNSPECIFIED: 0,
0: "USER_LINK_STATUS_UNSPECIFIED",
PENDING: 1,
1: "PENDING",
ACTIVE: 2,
2: "ACTIVE",
INACTIVE: 3,
3: "INACTIVE",
DECLINED: 4,
4: "DECLINED"
};
const r61 = {
RATE_LIMIT_TIER_UNSPECIFIED: 0,
0: "RATE_LIMIT_TIER_UNSPECIFIED",
UNLIMITED: 1,
1: "UNLIMITED",
TIER_2: 2,
2: "TIER_2",
TIER_3: 3,
3: "TIER_3",
TIER_4: 4,
4: "TIER_4",
DISABLED: 5,
5: "DISABLED"
};
const r60 = {
FEATURE_LIMIT_NAME_UNSPECIFIED: 0,
0: "FEATURE_LIMIT_NAME_UNSPECIFIED",
GUILD_MESSAGE_SEND: 1,
1: "GUILD_MESSAGE_SEND",
DM_SEND: 2,
2: "DM_SEND",
FRIEND_REQUEST: 3,
3: "FRIEND_REQUEST",
GUILD_CREATE: 4,
4: "GUILD_CREATE",
GUILD_JOIN: 5,
5: "GUILD_JOIN",
GUILD_TEXT_CHANNEL_CREATE: 6,
6: "GUILD_TEXT_CHANNEL_CREATE",
GUILD_UPLOAD_ATTACHMENT: 7,
7: "GUILD_UPLOAD_ATTACHMENT",
DM_UPLOAD_ATTACHMENT: 8,
8: "DM_UPLOAD_ATTACHMENT",
GDM_UPLOAD_ATTACHMENT: 9,
9: "GDM_UPLOAD_ATTACHMENT",
GDM_SEND: 10,
10: "GDM_SEND",
GUILD_VOICE_CHANNEL_CREATE: 11,
11: "GUILD_VOICE_CHANNEL_CREATE",
USER_PROFILE_EDIT: 12,
12: "USER_PROFILE_EDIT"
};
const r59 = {
SAFETY_FLAG_TYPE_UNSPECIFIED: 0,
0: "SAFETY_FLAG_TYPE_UNSPECIFIED",
STRANGER_DANGER: 1,
1: "STRANGER_DANGER",
LIKELY_ATO: 2,
2: "LIKELY_ATO",
PARENTAL_CONSENT_REVOKED_IOS: 3,
3: "PARENTAL_CONSENT_REVOKED_IOS",
PARENTAL_CONSENT_REVOKED_ANDROID: 4,
4: "PARENTAL_CONSENT_REVOKED_ANDROID",
REACTIVE_CHECK_APPLIED: 5,
5: "REACTIVE_CHECK_APPLIED",
PARENTAL_CONSENT_GRACE: 6,
6: "PARENTAL_CONSENT_GRACE"
};
const c1588_12 = {
NONE_UNSPECIFIED: 0,
0: "NONE_UNSPECIFIED",
SUBSCRIPTION: 1,
1: "SUBSCRIPTION",
FRACTIONAL_NITRO: 2,
2: "FRACTIONAL_NITRO",
REVERSE_TRIAL: 3,
3: "REVERSE_TRIAL",
SUBSCRIPTION_GROUP: 4,
4: "SUBSCRIPTION_GROUP"
};
const c1588_13 = {
NONE_UNSPECIFIED: 0,
0: "NONE_UNSPECIFIED",
BOOST_ONLY: 1,
1: "BOOST_ONLY",
TIER_0: 2,
2: "TIER_0",
TIER_1: 3,
3: "TIER_1",
TIER_2: 4,
4: "TIER_2"
};
const c1588_14 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
PRIMARY: 1,
1: "PRIMARY",
MEMBER: 2,
2: "MEMBER"
};
const r55 = {
UNSPECIFIED: 0,
0: "UNSPECIFIED",
ANIMATED_EMOJIS: 1,
1: "ANIMATED_EMOJIS",
EMOJIS_EVERYWHERE: 2,
2: "EMOJIS_EVERYWHERE",
STICKERS_EVERYWHERE: 3,
3: "STICKERS_EVERYWHERE",
SOUNDBOARD_EVERYWHERE: 4,
4: "SOUNDBOARD_EVERYWHERE",
ANIMATED_AVATAR: 5,
5: "ANIMATED_AVATAR",
CUSTOM_DISCRIMINATOR: 6,
6: "CUSTOM_DISCRIMINATOR",
PREMIUM_GUILD_MEMBER_PROFILE: 7,
7: "PREMIUM_GUILD_MEMBER_PROFILE",
PROFILE_PREMIUM_FEATURES: 8,
8: "PROFILE_PREMIUM_FEATURES",
STREAM_MID_QUALITY: 9,
9: "STREAM_MID_QUALITY",
STREAM_HIGH_QUALITY: 10,
10: "STREAM_HIGH_QUALITY",
CUSTOM_NOTIFICATION_SOUNDS: 11,
11: "CUSTOM_NOTIFICATION_SOUNDS",
VIDEO_FILTER_ASSETS: 12,
12: "VIDEO_FILTER_ASSETS",
INCREASED_FILE_UPLOAD_SIZE: 13,
13: "INCREASED_FILE_UPLOAD_SIZE",
INCREASED_GUILD_LIMIT: 14,
14: "INCREASED_GUILD_LIMIT",
INCREASED_MESSAGE_LENGTH: 15,
15: "INCREASED_MESSAGE_LENGTH",
NITRO_REACTION_TOGGLE: 16,
16: "NITRO_REACTION_TOGGLE",
CLIENT_THEMES: 17,
17: "CLIENT_THEMES",
PREMIUM_COLLECTIBLES: 18,
18: "PREMIUM_COLLECTIBLES",
CUSTOM_CALL_SOUNDS: 19,
19: "CUSTOM_CALL_SOUNDS",
SAVED_MESSAGES: 20,
20: "SAVED_MESSAGES",
PREMIUM_VOICE_FILTERS: 21,
21: "PREMIUM_VOICE_FILTERS",
CHAT_WALLPAPERS: 22,
22: "CHAT_WALLPAPERS",
MONTHLY_ORBS: 23,
23: "MONTHLY_ORBS",
SHOP_DISCOUNTS: 24,
24: "SHOP_DISCOUNTS",
MORE_QUEST_ORBS: 25,
25: "MORE_QUEST_ORBS",
PROFILE_BADGES: 26,
26: "PROFILE_BADGES",
APP_ICONS: 27,
27: "APP_ICONS",
BOOST_DISCOUNT: 28,
28: "BOOST_DISCOUNT",
FREE_BOOSTS: 29,
29: "FREE_BOOSTS",
INSTALL_PREMIUM_APPLICATIONS: 30,
30: "INSTALL_PREMIUM_APPLICATIONS",
INCREASED_VIDEO_UPLOAD_QUALITY: 31,
31: "INCREASED_VIDEO_UPLOAD_QUALITY"
};
const c1588_15 = {
SOURCE_UNSPECIFIED: 0,
0: "SOURCE_UNSPECIFIED",
SOURCE_NITRO: 1,
1: "SOURCE_NITRO",
SOURCE_THIRDPARTY_CROISSANT: 2,
2: "SOURCE_THIRDPARTY_CROISSANT",
SOURCE_BOT: 3,
3: "SOURCE_BOT"
};
class TimeOfDay$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "hours",
kind: "scalar",
T: 5
}, {
no: 2,
name: "minutes",
kind: "scalar",
T: 5
}, {
no: 3,
name: "seconds",
kind: "scalar",
T: 5
}, {
no: 4,
name: "nanos",
kind: "scalar",
T: 5
}];
super("discord_protos.users.v1.TimeOfDay", r2);
}
create(a0) {
const r1 = {
hours: 0,
minutes: 0,
seconds: 0,
nanos: 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, r20] = a0.tag();
if (r21 === 1) {
r7.hours = a0.int32();
} else if (r21 === 2) {
r7.minutes = a0.int32();
} else if (r21 === 3) {
r7.seconds = a0.int32();
} else if (r21 === 4) {
r7.nanos = a0.int32();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r21} (wire type ${r20}) for ${this.typeName}`);
}
const r36 = a0.skip(r20);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r7, r21, r20, r36);
}
}
}
return r7;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.hours !== 0) {
a1.tag(1, WireType.Varint).int32(a0.hours);
}
if (a0.minutes !== 0) {
a1.tag(2, WireType.Varint).int32(a0.minutes);
}
if (a0.seconds !== 0) {
a1.tag(3, WireType.Varint).int32(a0.seconds);
}
if (a0.nanos !== 0) {
a1.tag(4, WireType.Varint).int32(a0.nanos);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_43 = TimeOfDay$Type;
const prototypeOf = Object.getPrototypeOf(TimeOfDay$Type);
const r272 = [{
no: 1,
name: "hours",
kind: "scalar",
T: 5
}, {
no: 2,
name: "minutes",
kind: "scalar",
T: 5
}, {
no: 3,
name: "seconds",
kind: "scalar",
T: 5
}, {
no: 4,
name: "nanos",
kind: "scalar",
T: 5
}];
const r276 = Object.create(TimeOfDay$Type.prototype);
const r277 = $callWithNewTarget(prototypeOf, r276, TimeOfDay$Type, "discord_protos.users.v1.TimeOfDay", r272);
c1588_16 = r277 instanceof Object ? r277 : r276;
class User$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "id",
kind: "scalar",
T: 4
}, {
no: 2,
name: "username",
kind: "scalar",
T: 9
}, {
no: 3,
name: "discriminator",
kind: "scalar",
T: 9
}, {
no: 4,
name: "avatar",
kind: "message",
T: $mk70422(r1)
}, {
no: 5,
name: "bot",
kind: "scalar",
T: 8
}, {
no: 6,
name: "public_flags",
kind: "scalar",
T: 4
}, {
no: 8,
name: "global_name",
kind: "message",
T: $mk70423(r1)
}, {
no: 9,
name: "avatar_decoration_data",
kind: "message",
T: $mk70424(r1)
}, {
no: 10,
name: "primary_guild",
kind: "message",
T: $mk70425(r1)
}, {
no: 11,
name: "collectibles",
kind: "message",
T: $mk70426(r1)
}, {
no: 12,
name: "safety_state",
kind: "message",
T: $mk70427(r1)
}, {
no: 13,
name: "display_name_styles",
kind: "message",
T: $mk70428(r1)
}];
super("discord_protos.users.v1.User", r2);
}
create(a0) {
const r1 = {
id: "0",
username: "",
discriminator: "",
bot: false,
publicFlags: "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) {
let r11, r30;
const r4 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
L21: {
L16: {
[r11, r30] = a0.tag();
switch (r11) {
case 1:
r4.id = a0.uint64().toString();
break L21;
case 2:
r4.username = a0.string();
break L21;
case 3:
r4.discriminator = a0.string();
break L21;
case 4:
r4.avatar = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r4.avatar);
break L21;
case 5:
r4.bot = a0.bool();
break L21;
case 6:
r4.publicFlags = a0.uint64().toString();
break L21;
case 7:
default:
break L16;
case 8:
r4.globalName = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r4.globalName);
break L21;
case 9:
r4.avatarDecorationData = c1588_17.internalBinaryRead(a0, a0.uint32(), a2, r4.avatarDecorationData);
break L21;
case 10:
r4.primaryGuild = c1588_21.internalBinaryRead(a0, a0.uint32(), a2, r4.primaryGuild);
break L21;
case 11:
r4.collectibles = c1588_20.internalBinaryRead(a0, a0.uint32(), a2, r4.collectibles);
break L21;
case 12:
r4.safetyState = SafetyState.internalBinaryRead(a0, a0.uint32(), a2, r4.safetyState);
break L21;
case 13:
r4.displayNameStyles = c1588_19.internalBinaryRead(a0, a0.uint32(), a2, r4.displayNameStyles);
break L21;
}
}
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r11} (wire type ${r30}) for ${this.typeName}`);
}
const r114 = a0.skip(r30);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r4, r11, r30, r114);
}
}
}
return r4;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.id !== "0") {
a1.tag(1, WireType.Varint).uint64(a0.id);
}
if (a0.username !== "") {
a1.tag(2, WireType.LengthDelimited).string(a0.username);
}
if (a0.discriminator !== "") {
a1.tag(3, WireType.LengthDelimited).string(a0.discriminator);
}
if (a0.avatar) {
StringValue.internalBinaryWrite(a0.avatar, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.bot !== false) {
a1.tag(5, WireType.Varint).bool(a0.bot);
}
if (a0.publicFlags !== "0") {
a1.tag(6, WireType.Varint).uint64(a0.publicFlags);
}
if (a0.globalName) {
StringValue.internalBinaryWrite(a0.globalName, a1.tag(8, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.avatarDecorationData) {
c1588_17.internalBinaryWrite(a0.avatarDecorationData, a1.tag(9, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.primaryGuild) {
c1588_21.internalBinaryWrite(a0.primaryGuild, a1.tag(10, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.collectibles) {
c1588_20.internalBinaryWrite(a0.collectibles, a1.tag(11, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.safetyState) {
SafetyState.internalBinaryWrite(a0.safetyState, a1.tag(12, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.displayNameStyles) {
c1588_19.internalBinaryWrite(a0.displayNameStyles, 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;
}
}
c1588_44 = User$Type;
const prototypeOf2 = Object.getPrototypeOf(User$Type);
const r289 = [{
no: 1,
name: "id",
kind: "scalar",
T: 4
}, {
no: 2,
name: "username",
kind: "scalar",
T: 9
}, {
no: 3,
name: "discriminator",
kind: "scalar",
T: 9
}, {
no: 4,
name: "avatar",
kind: "message",
T: $mk70422(r75)
}, {
no: 5,
name: "bot",
kind: "scalar",
T: 8
}, {
no: 6,
name: "public_flags",
kind: "scalar",
T: 4
}, {
no: 8,
name: "global_name",
kind: "message",
T: $mk70423(r75)
}, {
no: 9,
name: "avatar_decoration_data",
kind: "message",
T: $mk70424(r75)
}, {
no: 10,
name: "primary_guild",
kind: "message",
T: $mk70425(r75)
}, {
no: 11,
name: "collectibles",
kind: "message",
T: $mk70426(r75)
}, {
no: 12,
name: "safety_state",
kind: "message",
T: $mk70427(r75)
}, {
no: 13,
name: "display_name_styles",
kind: "message",
T: $mk70428(r75)
}];
const r52 = Object.create(User$Type.prototype);
const r51 = $callWithNewTarget(prototypeOf2, r52, User$Type, "discord_protos.users.v1.User", r289);
class MediumUser$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "id",
kind: "scalar",
T: 6
}, {
no: 2,
name: "username",
kind: "scalar",
T: 9
}, {
no: 3,
name: "discriminator",
kind: "scalar",
T: 13
}, {
no: 4,
name: "avatar_hash",
kind: "message",
T: $mk70429(r1)
}, {
no: 5,
name: "bot",
kind: "scalar",
T: 8
}, {
no: 6,
name: "flags",
kind: "scalar",
T: 4
}, {
no: 7,
name: "email",
kind: "message",
T: $mk70430(r1)
}, {
no: 8,
name: "phone",
kind: "message",
T: $mk70431(r1)
}];
super("discord_protos.users.v1.MediumUser", r2);
}
create(a0) {
const r1 = {
id: "0",
username: "",
discriminator: 0,
bot: false,
flags: "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 r11 = a3 == null ? this.create() : a3;
const r14 = a0.pos + a1;
while (a0.pos < r14) {
const [r25, r24] = a0.tag();
if (r25 === 1) {
r11.id = a0.fixed64().toString();
} else if (r25 === 2) {
r11.username = a0.string();
} else if (r25 === 3) {
r11.discriminator = a0.uint32();
} else if (r25 === 4) {
r11.avatarHash = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r11.avatarHash);
} else if (r25 === 5) {
r11.bot = a0.bool();
} else if (r25 === 6) {
r11.flags = a0.uint64().toString();
} else if (r25 === 7) {
r11.email = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r11.email);
} else if (r25 === 8) {
r11.phone = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r11.phone);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r25} (wire type ${r24}) for ${this.typeName}`);
}
const r40 = a0.skip(r24);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r11, r25, r24, r40);
}
}
}
return r11;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.id !== "0") {
a1.tag(1, WireType.Bit64).fixed64(a0.id);
}
if (a0.username !== "") {
a1.tag(2, WireType.LengthDelimited).string(a0.username);
}
if (a0.discriminator !== 0) {
a1.tag(3, WireType.Varint).uint32(a0.discriminator);
}
if (a0.avatarHash) {
StringValue.internalBinaryWrite(a0.avatarHash, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.bot !== false) {
a1.tag(5, WireType.Varint).bool(a0.bot);
}
if (a0.flags !== "0") {
a1.tag(6, WireType.Varint).uint64(a0.flags);
}
if (a0.email) {
StringValue.internalBinaryWrite(a0.email, a1.tag(7, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.phone) {
StringValue.internalBinaryWrite(a0.phone, a1.tag(8, 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;
}
}
c1588_45 = MediumUser$Type;
const prototypeOf3 = Object.getPrototypeOf(MediumUser$Type);
const r322 = [{
no: 1,
name: "id",
kind: "scalar",
T: 6
}, {
no: 2,
name: "username",
kind: "scalar",
T: 9
}, {
no: 3,
name: "discriminator",
kind: "scalar",
T: 13
}, {
no: 4,
name: "avatar_hash",
kind: "message",
T: $mk70429(r75)
}, {
no: 5,
name: "bot",
kind: "scalar",
T: 8
}, {
no: 6,
name: "flags",
kind: "scalar",
T: 4
}, {
no: 7,
name: "email",
kind: "message",
T: $mk70430(r75)
}, {
no: 8,
name: "phone",
kind: "message",
T: $mk70431(r75)
}];
const r50 = Object.create(MediumUser$Type.prototype);
const r49 = $callWithNewTarget(prototypeOf3, r50, MediumUser$Type, "discord_protos.users.v1.MediumUser", r322);
class UserAvatarDecoration$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "asset",
kind: "scalar",
T: 9
}, {
no: 2,
name: "sku_id",
kind: "message",
T: $mk70432(r1)
}, {
no: 3,
name: "expires_at",
kind: "message",
T: $mk70433(r1)
}];
super("discord_protos.users.v1.UserAvatarDecoration", r2);
}
create(a0) {
const r1 = {
asset: ""
};
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 r6 = a3 == null ? this.create() : a3;
const r9 = a0.pos + a1;
while (a0.pos < r9) {
const [r20, r19] = a0.tag();
if (r20 === 1) {
r6.asset = a0.string();
} else if (r20 === 2) {
r6.skuId = UInt64Value.internalBinaryRead(a0, a0.uint32(), a2, r6.skuId);
} else if (r20 === 3) {
r6.expiresAt = UInt32Value.internalBinaryRead(a0, a0.uint32(), a2, r6.expiresAt);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
}
const r35 = a0.skip(r19);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r6, r20, r19, r35);
}
}
}
return r6;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.asset !== "") {
a1.tag(1, WireType.LengthDelimited).string(a0.asset);
}
if (a0.skuId) {
UInt64Value.internalBinaryWrite(a0.skuId, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.expiresAt) {
UInt32Value.internalBinaryWrite(a0.expiresAt, a1.tag(3, 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;
}
}
c1588_46 = UserAvatarDecoration$Type;
const prototypeOf4 = Object.getPrototypeOf(UserAvatarDecoration$Type);
const r347 = [{
no: 1,
name: "asset",
kind: "scalar",
T: 9
}, {
no: 2,
name: "sku_id",
kind: "message",
T: $mk70432(r75)
}, {
no: 3,
name: "expires_at",
kind: "message",
T: $mk70433(r75)
}];
const r352 = Object.create(UserAvatarDecoration$Type.prototype);
const r356 = $callWithNewTarget(prototypeOf4, r352, UserAvatarDecoration$Type, "discord_protos.users.v1.UserAvatarDecoration", r347);
c1588_17 = r356 instanceof Object ? r356 : r352;
class UserNameplate$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "asset",
kind: "scalar",
T: 9
}, {
no: 2,
name: "palette",
kind: "scalar",
T: 9
}, {
no: 3,
name: "sku_id",
kind: "message",
T: $mk70434(r1)
}, {
no: 4,
name: "expires_at",
kind: "message",
T: $mk70435(r1)
}, {
no: 5,
name: "label",
kind: "scalar",
T: 9
}];
super("discord_protos.users.v1.UserNameplate", r2);
}
create(a0) {
const r1 = {
asset: "",
palette: "",
label: ""
};
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.asset = a0.string();
} else if (r22 === 2) {
r8.palette = a0.string();
} else if (r22 === 3) {
r8.skuId = UInt64Value.internalBinaryRead(a0, a0.uint32(), a2, r8.skuId);
} else if (r22 === 4) {
r8.expiresAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r8.expiresAt);
} else if (r22 === 5) {
r8.label = a0.string();
} 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.asset !== "") {
a1.tag(1, WireType.LengthDelimited).string(a0.asset);
}
if (a0.palette !== "") {
a1.tag(2, WireType.LengthDelimited).string(a0.palette);
}
if (a0.skuId) {
UInt64Value.internalBinaryWrite(a0.skuId, a1.tag(3, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.expiresAt) {
Timestamp.internalBinaryWrite(a0.expiresAt, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.label !== "") {
a1.tag(5, WireType.LengthDelimited).string(a0.label);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_47 = UserNameplate$Type;
const prototypeOf5 = Object.getPrototypeOf(UserNameplate$Type);
const r368 = [{
no: 1,
name: "asset",
kind: "scalar",
T: 9
}, {
no: 2,
name: "palette",
kind: "scalar",
T: 9
}, {
no: 3,
name: "sku_id",
kind: "message",
T: $mk70434(r75)
}, {
no: 4,
name: "expires_at",
kind: "message",
T: $mk70435(r75)
}, {
no: 5,
name: "label",
kind: "scalar",
T: 9
}];
const r375 = Object.create(UserNameplate$Type.prototype);
const r379 = $callWithNewTarget(prototypeOf5, r375, UserNameplate$Type, "discord_protos.users.v1.UserNameplate", r368);
c1588_18 = r379 instanceof Object ? r379 : r375;
class DisplayNameStyles$Type extends MessageType {
constructor() {
const r1 = env1588;
const r10 = [{
no: 1,
name: "font_id",
kind: "enum",
T: $mk70436(r1)
}, {
no: 2,
name: "effect_id",
kind: "enum",
T: $mk70437(r1)
}, {
no: 3,
name: "colors",
kind: "scalar",
repeat: 1,
T: 13
}, {
no: 4,
name: "animated",
kind: "message",
T: $mk70438(r1)
}];
super("discord_protos.users.v1.DisplayNameStyles", r10);
}
create(a0) {
const r1 = {
fontId: 0,
effectId: 0,
colors: []
};
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.fontId = a0.int32();
} else if (r21 === 2) {
r7.effectId = a0.int32();
} else if (r21 === 3) {
if (r35 === WireType.LengthDelimited) {
const r84 = a0.int32() + a0.pos;
while (a0.pos < r84) {
r7.colors.push(a0.uint32());
}
} else {
r7.colors.push(a0.uint32());
}
} else if (r21 === 4) {
r7.animated = BoolValue.internalBinaryRead(a0, a0.uint32(), a2, r7.animated);
} 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.fontId !== 0) {
a1.tag(1, WireType.Varint).int32(a0.fontId);
}
if (a0.effectId !== 0) {
a1.tag(2, WireType.Varint).int32(a0.effectId);
}
if (a0.colors.length) {
a1.tag(3, WireType.LengthDelimited).fork();
const r53 = 0 < a0.colors.length;
let r55 = 0;
if (r53) {
do {
a1.uint32(a0.colors[r55]);
r55 = r55 + 1;
} while (r55 < a0.colors.length);
}
a1.join();
}
if (a0.animated) {
BoolValue.internalBinaryWrite(a0.animated, a1.tag(4, 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;
}
}
c1588_48 = DisplayNameStyles$Type;
const prototypeOf6 = Object.getPrototypeOf(DisplayNameStyles$Type);
const r392 = [{
no: 1,
name: "font_id",
kind: "enum",
T: $mk70436(r75)
}, {
no: 2,
name: "effect_id",
kind: "enum",
T: $mk70437(r75)
}, {
no: 3,
name: "colors",
kind: "scalar",
repeat: 1,
T: 13
}, {
no: 4,
name: "animated",
kind: "message",
T: $mk70438(r75)
}];
const r398 = Object.create(DisplayNameStyles$Type.prototype);
const r402 = $callWithNewTarget(prototypeOf6, r398, DisplayNameStyles$Type, "discord_protos.users.v1.DisplayNameStyles", r392);
c1588_19 = r402 instanceof Object ? r402 : r398;
class UserCollectibles$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "nameplate",
kind: "message",
T: $mk70439(r1)
}];
super("discord_protos.users.v1.UserCollectibles", r2);
}
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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.nameplate = c1588_18.internalBinaryRead(a0, a0.uint32(), a2, r5.nameplate);
} 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) {
if (a0.nameplate) {
c1588_18.internalBinaryWrite(a0.nameplate, a1.tag(1, 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;
}
}
c1588_49 = UserCollectibles$Type;
const prototypeOf7 = Object.getPrototypeOf(UserCollectibles$Type);
const r415 = [{
no: 1,
name: "nameplate",
kind: "message",
T: $mk70439(r75)
}];
const r416 = Object.create(UserCollectibles$Type.prototype);
const r420 = $callWithNewTarget(prototypeOf7, r416, UserCollectibles$Type, "discord_protos.users.v1.UserCollectibles", r415);
c1588_20 = r420 instanceof Object ? r420 : r416;
class UserPrimaryGuild$Type extends MessageType {
constructor() {
const r1 = env1588;
const r10 = [{
no: 1,
name: "identity_guild_id",
kind: "message",
T: $mk70440(r1)
}, {
no: 2,
name: "identity_enabled",
kind: "message",
T: $mk70441(r1)
}, {
no: 3,
name: "tag",
kind: "message",
T: $mk70442(r1)
}, {
no: 4,
name: "badge",
kind: "message",
T: $mk70443(r1)
}];
super("discord_protos.users.v1.UserPrimaryGuild", 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 r7 = a3 == null ? this.create() : a3;
const r10 = a0.pos + a1;
while (a0.pos < r10) {
const [r21, r20] = a0.tag();
if (r21 === 1) {
r7.identityGuildId = UInt64Value.internalBinaryRead(a0, a0.uint32(), a2, r7.identityGuildId);
} else if (r21 === 2) {
r7.identityEnabled = BoolValue.internalBinaryRead(a0, a0.uint32(), a2, r7.identityEnabled);
} else if (r21 === 3) {
r7.tag = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r7.tag);
} else if (r21 === 4) {
r7.badge = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r7.badge);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r21} (wire type ${r20}) for ${this.typeName}`);
}
const r36 = a0.skip(r20);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r7, r21, r20, r36);
}
}
}
return r7;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.identityGuildId) {
UInt64Value.internalBinaryWrite(a0.identityGuildId, a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.identityEnabled) {
BoolValue.internalBinaryWrite(a0.identityEnabled, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.tag) {
StringValue.internalBinaryWrite(a0.tag, a1.tag(3, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.badge) {
StringValue.internalBinaryWrite(a0.badge, a1.tag(4, 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;
}
}
c1588_50 = UserPrimaryGuild$Type;
const prototypeOf8 = Object.getPrototypeOf(UserPrimaryGuild$Type);
const r433 = [{
no: 1,
name: "identity_guild_id",
kind: "message",
T: $mk70440(r75)
}, {
no: 2,
name: "identity_enabled",
kind: "message",
T: $mk70441(r75)
}, {
no: 3,
name: "tag",
kind: "message",
T: $mk70442(r75)
}, {
no: 4,
name: "badge",
kind: "message",
T: $mk70443(r75)
}];
const r440 = Object.create(UserPrimaryGuild$Type.prototype);
const r444 = $callWithNewTarget(prototypeOf8, r440, UserPrimaryGuild$Type, "discord_protos.users.v1.UserPrimaryGuild", r433);
c1588_21 = r444 instanceof Object ? r444 : r440;
class ScheduleRule$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "rule_id",
kind: "scalar",
T: 9
}, {
no: 2,
name: "label",
kind: "scalar",
T: 9
}, {
no: 3,
name: "start_time",
kind: "message",
T: $mk70444(r1)
}, {
no: 4,
name: "end_time",
kind: "message",
T: $mk70445(r1)
}, {
no: 5,
name: "days",
kind: "enum",
repeat: 1,
T: $mk70446(r1)
}, {
no: 6,
name: "enabled",
kind: "scalar",
T: 8
}];
super("discord_protos.users.v1.ScheduleRule", r2);
}
create(a0) {
const r1 = {
ruleId: "",
label: "",
days: [],
enabled: 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 r9 = a3 == null ? this.create() : a3;
const r12 = a0.pos + a1;
while (a0.pos < r12) {
const [r23, r37] = a0.tag();
if (r23 === 1) {
r9.ruleId = a0.string();
} else if (r23 === 2) {
r9.label = a0.string();
} else if (r23 === 3) {
r9.startTime = c1588_16.internalBinaryRead(a0, a0.uint32(), a2, r9.startTime);
} else if (r23 === 4) {
r9.endTime = c1588_16.internalBinaryRead(a0, a0.uint32(), a2, r9.endTime);
} else if (r23 === 5) {
if (r37 === WireType.LengthDelimited) {
const r75 = a0.int32() + a0.pos;
while (a0.pos < r75) {
r9.days.push(a0.int32());
}
} else {
r9.days.push(a0.int32());
}
} else if (r23 === 6) {
r9.enabled = a0.bool();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r23} (wire type ${r37}) for ${this.typeName}`);
}
const r18 = a0.skip(r37);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r9, r23, r37, r18);
}
}
}
return r9;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.ruleId !== "") {
a1.tag(1, WireType.LengthDelimited).string(a0.ruleId);
}
if (a0.label !== "") {
a1.tag(2, WireType.LengthDelimited).string(a0.label);
}
if (a0.startTime) {
c1588_16.internalBinaryWrite(a0.startTime, a1.tag(3, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.endTime) {
c1588_16.internalBinaryWrite(a0.endTime, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.days.length) {
a1.tag(5, WireType.LengthDelimited).fork();
const length = a0.days.length;
let r0 = 0;
if (0 < length) {
do {
a1.int32(a0.days[r0]);
r0 = r0 + 1;
} while (r0 < a0.days.length);
}
a1.join();
}
if (a0.enabled !== false) {
a1.tag(6, WireType.Varint).bool(a0.enabled);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_51 = ScheduleRule$Type;
const prototypeOf9 = Object.getPrototypeOf(ScheduleRule$Type);
const r456 = [{
no: 1,
name: "rule_id",
kind: "scalar",
T: 9
}, {
no: 2,
name: "label",
kind: "scalar",
T: 9
}, {
no: 3,
name: "start_time",
kind: "message",
T: $mk70444(r75)
}, {
no: 4,
name: "end_time",
kind: "message",
T: $mk70445(r75)
}, {
no: 5,
name: "days",
kind: "enum",
repeat: 1,
T: $mk70446(r75)
}, {
no: 6,
name: "enabled",
kind: "scalar",
T: 8
}];
const r465 = Object.create(ScheduleRule$Type.prototype);
const r469 = $callWithNewTarget(prototypeOf9, r465, ScheduleRule$Type, "discord_protos.users.v1.ScheduleRule", r456);
c1588_22 = r469 instanceof Object ? r469 : r465;
class RestrictedSchedule$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "rules",
kind: "message",
repeat: 1,
T: $mk70447(r1)
}];
super("discord_protos.users.v1.RestrictedSchedule", r2);
}
create(a0) {
const r1 = {
rules: []
};
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.rules.push(c1588_22.internalBinaryRead(a0, a0.uint32(), 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;
}
internalBinaryWrite(a0, a1, a2) {
const length = a0.rules.length;
let r0 = 0;
if (0 < length) {
do {
c1588_22.internalBinaryWrite(a0.rules[r0], a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
r0 = r0 + 1;
} while (r0 < a0.rules.length);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_52 = RestrictedSchedule$Type;
const prototypeOf10 = Object.getPrototypeOf(RestrictedSchedule$Type);
const r482 = [{
no: 1,
name: "rules",
kind: "message",
repeat: 1,
T: $mk70447(r75)
}];
const r483 = Object.create(RestrictedSchedule$Type.prototype);
const r487 = $callWithNewTarget(prototypeOf10, r483, RestrictedSchedule$Type, "discord_protos.users.v1.RestrictedSchedule", r482);
c1588_23 = r487 instanceof Object ? r487 : r483;
class CrossPlatformRestriction$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "restriction_expiry",
kind: "message",
T: $mk70448(r1)
}, {
no: 2,
name: "application_id",
kind: "scalar",
T: 6
}];
super("discord_protos.users.v1.CrossPlatformRestriction", r2);
}
create(a0) {
const r1 = {
applicationId: "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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.restrictionExpiry = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r5.restrictionExpiry);
} else if (r19 === 2) {
r5.applicationId = a0.fixed64().toString();
} 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) {
if (a0.restrictionExpiry) {
Timestamp.internalBinaryWrite(a0.restrictionExpiry, a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.applicationId !== "0") {
a1.tag(2, WireType.Bit64).fixed64(a0.applicationId);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_53 = CrossPlatformRestriction$Type;
const prototypeOf11 = Object.getPrototypeOf(CrossPlatformRestriction$Type);
const r500 = [{
no: 1,
name: "restriction_expiry",
kind: "message",
T: $mk70448(r75)
}, {
no: 2,
name: "application_id",
kind: "scalar",
T: 6
}];
const r502 = Object.create(CrossPlatformRestriction$Type.prototype);
const r506 = $callWithNewTarget(prototypeOf11, r502, CrossPlatformRestriction$Type, "discord_protos.users.v1.CrossPlatformRestriction", r500);
c1588_24 = r506 instanceof Object ? r506 : r502;
class BadgeCommon$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "obtained_at",
kind: "message",
T: $mk70449(r1)
}];
super("discord_protos.users.v1.BadgeCommon", r2);
}
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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.obtainedAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r5.obtainedAt);
} 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) {
if (a0.obtainedAt) {
Timestamp.internalBinaryWrite(a0.obtainedAt, a1.tag(1, 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;
}
}
c1588_54 = BadgeCommon$Type;
const prototypeOf12 = Object.getPrototypeOf(BadgeCommon$Type);
const r519 = [{
no: 1,
name: "obtained_at",
kind: "message",
T: $mk70449(r75)
}];
const r520 = Object.create(BadgeCommon$Type.prototype);
const r524 = $callWithNewTarget(prototypeOf12, r520, BadgeCommon$Type, "discord_protos.users.v1.BadgeCommon", r519);
c1588_25 = r524 instanceof Object ? r524 : r520;
class AprilFools2026Badge$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "common",
kind: "message",
T: $mk70450(r1)
}, {
no: 2,
name: "level",
kind: "scalar",
T: 5
}, {
no: 3,
name: "combat_class",
kind: "scalar",
T: 9
}];
super("discord_protos.users.v1.AprilFools2026Badge", r2);
}
create(a0) {
const r1 = {
level: 0,
combatClass: ""
};
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 r6 = a3 == null ? this.create() : a3;
const r9 = a0.pos + a1;
while (a0.pos < r9) {
const [r20, r19] = a0.tag();
if (r20 === 1) {
r6.common = c1588_25.internalBinaryRead(a0, a0.uint32(), a2, r6.common);
} else if (r20 === 2) {
r6.level = a0.int32();
} else if (r20 === 3) {
r6.combatClass = a0.string();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
}
const r35 = a0.skip(r19);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r6, r20, r19, r35);
}
}
}
return r6;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.common) {
c1588_25.internalBinaryWrite(a0.common, a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.level !== 0) {
a1.tag(2, WireType.Varint).int32(a0.level);
}
if (a0.combatClass !== "") {
a1.tag(3, WireType.LengthDelimited).string(a0.combatClass);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_55 = AprilFools2026Badge$Type;
const prototypeOf13 = Object.getPrototypeOf(AprilFools2026Badge$Type);
const r537 = [{
no: 1,
name: "common",
kind: "message",
T: $mk70450(r75)
}, {
no: 2,
name: "level",
kind: "scalar",
T: 5
}, {
no: 3,
name: "combat_class",
kind: "scalar",
T: 9
}];
const r540 = Object.create(AprilFools2026Badge$Type.prototype);
const r544 = $callWithNewTarget(prototypeOf13, r540, AprilFools2026Badge$Type, "discord_protos.users.v1.AprilFools2026Badge", r537);
c1588_26 = r544 instanceof Object ? r544 : r540;
class Badge$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "april_fools_2026",
kind: "message",
oneof: "badge",
T: $mk70451(r1)
}];
super("discord_protos.users.v1.Badge", r2);
}
create(a0) {
const r1 = {
badge: {
oneofKind: void 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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.badge = {
oneofKind: "aprilFools2026",
aprilFools2026: c1588_26.internalBinaryRead(a0, a0.uint32(), a2, r5.badge.aprilFools2026)
};
} 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) {
if (a0.badge.oneofKind === "aprilFools2026") {
c1588_26.internalBinaryWrite(a0.badge.aprilFools2026, a1.tag(1, 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;
}
}
c1588_56 = Badge$Type;
const prototypeOf14 = Object.getPrototypeOf(Badge$Type);
const r557 = [{
no: 1,
name: "april_fools_2026",
kind: "message",
oneof: "badge",
T: $mk70451(r75)
}];
const r558 = Object.create(Badge$Type.prototype);
const r562 = $callWithNewTarget(prototypeOf14, r558, Badge$Type, "discord_protos.users.v1.Badge", r557);
c1588_27 = r562 instanceof Object ? r562 : r558;
class UserBadges$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "badges",
kind: "message",
repeat: 1,
T: $mk70452(r1)
}];
super("discord_protos.users.v1.UserBadges", r2);
}
create(a0) {
const r1 = {
badges: []
};
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.badges.push(c1588_27.internalBinaryRead(a0, a0.uint32(), 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;
}
internalBinaryWrite(a0, a1, a2) {
const length = a0.badges.length;
let r0 = 0;
if (0 < length) {
do {
c1588_27.internalBinaryWrite(a0.badges[r0], a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
r0 = r0 + 1;
} while (r0 < a0.badges.length);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_57 = UserBadges$Type;
const prototypeOf15 = Object.getPrototypeOf(UserBadges$Type);
const r575 = [{
no: 1,
name: "badges",
kind: "message",
repeat: 1,
T: $mk70452(r75)
}];
const r576 = Object.create(UserBadges$Type.prototype);
const r580 = $callWithNewTarget(prototypeOf15, r576, UserBadges$Type, "discord_protos.users.v1.UserBadges", r575);
c1588_28 = r580 instanceof Object ? r580 : r576;
class AnonymizationInfo$Type extends MessageType {
constructor() {
const r1 = env1588;
const r9 = [{
no: 1,
name: "status",
kind: "enum",
T: $mk70453(r1)
}, {
no: 2,
name: "anon_user_id",
kind: "message",
T: $mk70454(r1)
}];
super("discord_protos.users.v1.AnonymizationInfo", r9);
}
create(a0) {
const r1 = {
status: 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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.status = a0.int32();
} else if (r19 === 2) {
r5.anonUserId = UInt64Value.internalBinaryRead(a0, a0.uint32(), a2, r5.anonUserId);
} 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) {
if (a0.status !== 0) {
a1.tag(1, WireType.Varint).int32(a0.status);
}
if (a0.anonUserId) {
UInt64Value.internalBinaryWrite(a0.anonUserId, a1.tag(2, 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;
}
}
c1588_58 = AnonymizationInfo$Type;
const prototypeOf16 = Object.getPrototypeOf(AnonymizationInfo$Type);
const r593 = [{
no: 1,
name: "status",
kind: "enum",
T: $mk70453(r75)
}, {
no: 2,
name: "anon_user_id",
kind: "message",
T: $mk70454(r75)
}];
const r596 = Object.create(AnonymizationInfo$Type.prototype);
const r600 = $callWithNewTarget(prototypeOf16, r596, AnonymizationInfo$Type, "discord_protos.users.v1.AnonymizationInfo", r593);
c1588_29 = r600 instanceof Object ? r600 : r596;
class UserData$Type extends MessageType {
constructor() {
const r11 = [{
no: 1,
name: "linked_users",
kind: "map",
K: 6,
V: {
kind: "message",
T: () => c1588_31
}
}, {
no: 2,
name: "safety_feature_limits",
kind: "map",
K: 13,
V: {
kind: "message",
T: () => c1588_33
}
}, {
no: 3,
name: "safety_flags",
kind: "map",
K: 13,
V: {
kind: "message",
T: () => c1588_34
}
}, {
no: 4,
name: "quest",
kind: "message",
T: () => c1588_35
}, {
no: 5,
name: "primary_guild",
kind: "message",
T: () => c1588_21
}, {
no: 6,
name: "cross_platform_restriction",
kind: "message",
T: () => c1588_24
}, {
no: 7,
name: "collectibles",
kind: "message",
T: () => c1588_20
}, {
no: 8,
name: "safety_state",
kind: "message",
T: () => SafetyState
}, {
no: 9,
name: "premium_state",
kind: "message",
T: () => c1588_36
}, {
no: 10,
name: "display_name_styles",
kind: "message",
T: () => c1588_19
}, {
no: 11,
name: "store_country",
kind: "message",
T: () => c1588_37
}, {
no: 12,
name: "restricted_schedule",
kind: "message",
T: () => c1588_23
}, {
no: 13,
name: "age_assurance_data",
kind: "message",
T: () => c1588_30
}, {
no: 14,
name: "perks",
kind: "message",
T: () => c1588_41
}, {
no: 15,
name: "badges",
kind: "message",
T: () => c1588_28
}, {
no: 16,
name: "country_data",
kind: "message",
T: () => c1588_42
}, {
no: 17,
name: "is_pending_required_action",
kind: "scalar",
T: 8
}, {
no: 18,
name: "anonymization_info",
kind: "message",
T: () => c1588_29
}];
super("discord_protos.users.v1.UserData", r11);
}
create(a0) {
const r1 = {
linkedUsers: {},
safetyFeatureLimits: {},
safetyFlags: {},
isPendingRequiredAction: 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 r4 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
L27: {
const [r11, r30] = a0.tag();
switch (r11) {
case 1:
this.binaryReadMap1(r4.linkedUsers, a0, a2);
break L27;
case 2:
this.binaryReadMap2(r4.safetyFeatureLimits, a0, a2);
break L27;
case 3:
this.binaryReadMap3(r4.safetyFlags, a0, a2);
break L27;
case 4:
r4.quest = c1588_35.internalBinaryRead(a0, a0.uint32(), a2, r4.quest);
break L27;
case 5:
r4.primaryGuild = c1588_21.internalBinaryRead(a0, a0.uint32(), a2, r4.primaryGuild);
break L27;
case 6:
r4.crossPlatformRestriction = c1588_24.internalBinaryRead(a0, a0.uint32(), a2, r4.crossPlatformRestriction);
break L27;
case 7:
r4.collectibles = c1588_20.internalBinaryRead(a0, a0.uint32(), a2, r4.collectibles);
break L27;
case 8:
r4.safetyState = SafetyState.internalBinaryRead(a0, a0.uint32(), a2, r4.safetyState);
break L27;
case 9:
r4.premiumState = c1588_36.internalBinaryRead(a0, a0.uint32(), a2, r4.premiumState);
break L27;
case 10:
r4.displayNameStyles = c1588_19.internalBinaryRead(a0, a0.uint32(), a2, r4.displayNameStyles);
break L27;
case 11:
r4.storeCountry = c1588_37.internalBinaryRead(a0, a0.uint32(), a2, r4.storeCountry);
break L27;
case 12:
r4.restrictedSchedule = c1588_23.internalBinaryRead(a0, a0.uint32(), a2, r4.restrictedSchedule);
break L27;
case 13:
r4.ageAssuranceData = c1588_30.internalBinaryRead(a0, a0.uint32(), a2, r4.ageAssuranceData);
break L27;
case 14:
r4.perks = c1588_41.internalBinaryRead(a0, a0.uint32(), a2, r4.perks);
break L27;
case 15:
r4.badges = c1588_28.internalBinaryRead(a0, a0.uint32(), a2, r4.badges);
break L27;
case 16:
r4.countryData = c1588_42.internalBinaryRead(a0, a0.uint32(), a2, r4.countryData);
break L27;
case 17:
r4.isPendingRequiredAction = a0.bool();
break L27;
case 18:
r4.anonymizationInfo = c1588_29.internalBinaryRead(a0, a0.uint32(), a2, r4.anonymizationInfo);
break L27;
default:
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r11} (wire type ${r30}) for ${this.typeName}`);
}
const r166 = a0.skip(r30);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r4, r11, r30, r166);
}
}
}
}
return r4;
}
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.users.v1.UserData.linked_users");
}
r38 = c1588_31.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 = c1588_31.create();
}
a0[r24] = r23;
}
binaryReadMap2(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.uint32();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.users.v1.UserData.safety_feature_limits");
}
r38 = c1588_33.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 = c1588_33.create();
}
a0[r24] = r23;
}
binaryReadMap3(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.uint32();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.users.v1.UserData.safety_flags");
}
r38 = c1588_34.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 = c1588_34.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
let r29;
let r7 = Object.keys(a0.linkedUsers)[Symbol.iterator]();
const next = r7.next;
while (true) {
const r13 = r7 === void 0 ? void 0 : (r29 = next.call(r7)).done ? r7 = void 0 : r29.value;
if (r7 === void 0) {
for (const item of Object.keys(a0.safetyFeatureLimits)) {
a1.tag.call(a1, 2, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(item));
a1.tag(2, WireType.LengthDelimited).fork();
c1588_33.internalBinaryWrite(a0.safetyFeatureLimits[item], a1, a2);
a1.join().join();
}
for (const item2 of Object.keys(a0.safetyFlags)) {
a1.tag.call(a1, 3, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(item2));
a1.tag(2, WireType.LengthDelimited).fork();
c1588_34.internalBinaryWrite(a0.safetyFlags[item2], a1, a2);
a1.join().join();
}
if (a0.quest) {
c1588_35.internalBinaryWrite(a0.quest, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.primaryGuild) {
c1588_21.internalBinaryWrite(a0.primaryGuild, a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.crossPlatformRestriction) {
c1588_24.internalBinaryWrite(a0.crossPlatformRestriction, a1.tag(6, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.collectibles) {
c1588_20.internalBinaryWrite(a0.collectibles, a1.tag(7, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.safetyState) {
SafetyState.internalBinaryWrite(a0.safetyState, a1.tag(8, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.premiumState) {
c1588_36.internalBinaryWrite(a0.premiumState, a1.tag(9, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.displayNameStyles) {
c1588_19.internalBinaryWrite(a0.displayNameStyles, a1.tag(10, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.storeCountry) {
c1588_37.internalBinaryWrite(a0.storeCountry, a1.tag(11, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.restrictedSchedule) {
c1588_23.internalBinaryWrite(a0.restrictedSchedule, a1.tag(12, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.ageAssuranceData) {
c1588_30.internalBinaryWrite(a0.ageAssuranceData, a1.tag(13, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.perks) {
c1588_41.internalBinaryWrite(a0.perks, a1.tag(14, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.badges) {
c1588_28.internalBinaryWrite(a0.badges, a1.tag(15, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.countryData) {
c1588_42.internalBinaryWrite(a0.countryData, a1.tag(16, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.isPendingRequiredAction !== false) {
a1.tag(17, WireType.Varint).bool(a0.isPendingRequiredAction);
}
if (a0.anonymizationInfo) {
c1588_29.internalBinaryWrite(a0.anonymizationInfo, a1.tag(18, 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;
} else {
try {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).fixed64(r13);
a1.tag(2, WireType.LengthDelimited).fork();
c1588_31.internalBinaryWrite(a0.linkedUsers[r13], a1, a2);
a1.join().join();
} catch (r69) {
if (r7 !== void 0 && typeof r7.return === "function") {
try {
r7.return();
} catch {}
}
throw r69;
}
}
}
}
}
c1588_59 = UserData$Type;
const r35 = new UserData$Type();
class AgeAssuranceData$Type extends MessageType {
constructor() {
const r1 = env1588;
const r10 = [{
no: 1,
name: "estimated_date_of_birth",
kind: "message",
T: $mk70472(r1)
}, {
no: 2,
name: "method",
kind: "enum",
T: $mk70473(r1)
}, {
no: 3,
name: "method_version",
kind: "scalar",
T: 5
}, {
no: 4,
name: "vendor",
kind: "enum",
T: $mk70474(r1)
}, {
no: 5,
name: "verified_at",
kind: "message",
T: $mk70475(r1)
}, {
no: 6,
name: "estimated_age_group",
kind: "enum",
T: $mk70476(r1)
}, {
no: 7,
name: "is_regional_adult",
kind: "scalar",
T: 8
}];
super("discord_protos.users.v1.AgeAssuranceData", r10);
}
create(a0) {
const r1 = {
method: 0,
methodVersion: 0,
vendor: 0,
estimatedAgeGroup: 0,
isRegionalAdult: 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 r10 = a3 == null ? this.create() : a3;
const r13 = a0.pos + a1;
while (a0.pos < r13) {
const [r24, r23] = a0.tag();
if (r24 === 1) {
r10.estimatedDateOfBirth = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r10.estimatedDateOfBirth);
} else if (r24 === 2) {
r10.method = a0.int32();
} else if (r24 === 3) {
r10.methodVersion = a0.int32();
} else if (r24 === 4) {
r10.vendor = a0.int32();
} else if (r24 === 5) {
r10.verifiedAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r10.verifiedAt);
} else if (r24 === 6) {
r10.estimatedAgeGroup = a0.int32();
} else if (r24 === 7) {
r10.isRegionalAdult = a0.bool();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r24} (wire type ${r23}) for ${this.typeName}`);
}
const r39 = a0.skip(r23);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r10, r24, r23, r39);
}
}
}
return r10;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.estimatedDateOfBirth) {
Timestamp.internalBinaryWrite(a0.estimatedDateOfBirth, a1.tag(1, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.method !== 0) {
a1.tag(2, WireType.Varint).int32(a0.method);
}
if (a0.methodVersion !== 0) {
a1.tag(3, WireType.Varint).int32(a0.methodVersion);
}
if (a0.vendor !== 0) {
a1.tag(4, WireType.Varint).int32(a0.vendor);
}
if (a0.verifiedAt) {
Timestamp.internalBinaryWrite(a0.verifiedAt, a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.estimatedAgeGroup !== 0) {
a1.tag(6, WireType.Varint).int32(a0.estimatedAgeGroup);
}
if (a0.isRegionalAdult !== false) {
a1.tag(7, WireType.Varint).bool(a0.isRegionalAdult);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_60 = AgeAssuranceData$Type;
const prototypeOf17 = Object.getPrototypeOf(AgeAssuranceData$Type);
const r627 = [{
no: 1,
name: "estimated_date_of_birth",
kind: "message",
T: $mk70472(r75)
}, {
no: 2,
name: "method",
kind: "enum",
T: $mk70473(r75)
}, {
no: 3,
name: "method_version",
kind: "scalar",
T: 5
}, {
no: 4,
name: "vendor",
kind: "enum",
T: $mk70474(r75)
}, {
no: 5,
name: "verified_at",
kind: "message",
T: $mk70475(r75)
}, {
no: 6,
name: "estimated_age_group",
kind: "enum",
T: $mk70476(r75)
}, {
no: 7,
name: "is_regional_adult",
kind: "scalar",
T: 8
}];
const r638 = Object.create(AgeAssuranceData$Type.prototype);
const r642 = $callWithNewTarget(prototypeOf17, r638, AgeAssuranceData$Type, "discord_protos.users.v1.AgeAssuranceData", r627);
c1588_30 = r642 instanceof Object ? r642 : r638;
class LinkedUser$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "user_id",
kind: "scalar",
T: 6
}, {
no: 2,
name: "link_type",
kind: "enum",
T: $mk70477(r1)
}, {
no: 3,
name: "link_status",
kind: "enum",
T: $mk70478(r1)
}, {
no: 4,
name: "requestor_id",
kind: "scalar",
T: 6
}, {
no: 5,
name: "created_at",
kind: "message",
T: $mk70479(r1)
}, {
no: 6,
name: "updated_at",
kind: "message",
T: $mk70480(r1)
}];
super("discord_protos.users.v1.LinkedUser", r2);
}
create(a0) {
const r1 = {
userId: "0",
linkType: 0,
linkStatus: 0,
requestorId: "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 r9 = a3 == null ? this.create() : a3;
const r12 = a0.pos + a1;
while (a0.pos < r12) {
const [r23, r22] = a0.tag();
if (r23 === 1) {
r9.userId = a0.fixed64().toString();
} else if (r23 === 2) {
r9.linkType = a0.int32();
} else if (r23 === 3) {
r9.linkStatus = a0.int32();
} else if (r23 === 4) {
r9.requestorId = a0.fixed64().toString();
} else if (r23 === 5) {
r9.createdAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r9.createdAt);
} else if (r23 === 6) {
r9.updatedAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r9.updatedAt);
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r23} (wire type ${r22}) for ${this.typeName}`);
}
const r38 = a0.skip(r22);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r9, r23, r22, r38);
}
}
}
return r9;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.userId !== "0") {
a1.tag(1, WireType.Bit64).fixed64(a0.userId);
}
if (a0.linkType !== 0) {
a1.tag(2, WireType.Varint).int32(a0.linkType);
}
if (a0.linkStatus !== 0) {
a1.tag(3, WireType.Varint).int32(a0.linkStatus);
}
if (a0.requestorId !== "0") {
a1.tag(4, WireType.Bit64).fixed64(a0.requestorId);
}
if (a0.createdAt) {
Timestamp.internalBinaryWrite(a0.createdAt, a1.tag(5, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.updatedAt) {
Timestamp.internalBinaryWrite(a0.updatedAt, a1.tag(6, 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;
}
}
c1588_61 = LinkedUser$Type;
const prototypeOf18 = Object.getPrototypeOf(LinkedUser$Type);
const r654 = [{
no: 1,
name: "user_id",
kind: "scalar",
T: 6
}, {
no: 2,
name: "link_type",
kind: "enum",
T: $mk70477(r75)
}, {
no: 3,
name: "link_status",
kind: "enum",
T: $mk70478(r75)
}, {
no: 4,
name: "requestor_id",
kind: "scalar",
T: 6
}, {
no: 5,
name: "created_at",
kind: "message",
T: $mk70479(r75)
}, {
no: 6,
name: "updated_at",
kind: "message",
T: $mk70480(r75)
}];
const r664 = Object.create(LinkedUser$Type.prototype);
const r668 = $callWithNewTarget(prototypeOf18, r664, LinkedUser$Type, "discord_protos.users.v1.LinkedUser", r654);
c1588_31 = r668 instanceof Object ? r668 : r664;
class RateLimitData$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "limit_expiry",
kind: "message",
T: $mk70481(r1)
}];
super("discord_protos.users.v1.RateLimitData", r2);
}
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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.limitExpiry = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r5.limitExpiry);
} 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) {
if (a0.limitExpiry) {
Timestamp.internalBinaryWrite(a0.limitExpiry, a1.tag(1, 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;
}
}
c1588_62 = RateLimitData$Type;
const prototypeOf19 = Object.getPrototypeOf(RateLimitData$Type);
const r681 = [{
no: 1,
name: "limit_expiry",
kind: "message",
T: $mk70481(r75)
}];
const r682 = Object.create(RateLimitData$Type.prototype);
const r686 = $callWithNewTarget(prototypeOf19, r682, RateLimitData$Type, "discord_protos.users.v1.RateLimitData", r681);
c1588_32 = r686 instanceof Object ? r686 : r682;
class FeatureLimits$Type extends MessageType {
constructor() {
const r2 = env1588;
const r10 = [{
no: 1,
name: "map",
kind: "map",
K: 13,
V: {
kind: "message",
T: $mk70482(r2)
}
}];
super("discord_protos.users.v1.FeatureLimits", r10);
}
create(a0) {
const r1 = {
map: {}
};
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.map, 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.uint32();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.users.v1.FeatureLimits.map");
}
r38 = c1588_32.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 = c1588_32.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
for (const item of Object.keys(a0.map)) {
a1.tag.call(a1, 1, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(item));
a1.tag(2, WireType.LengthDelimited).fork();
c1588_32.internalBinaryWrite(a0.map[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;
}
}
c1588_63 = FeatureLimits$Type;
const prototypeOf20 = Object.getPrototypeOf(FeatureLimits$Type);
const r701 = [{
no: 1,
name: "map",
kind: "map",
K: 13,
V: {
kind: "message",
T: $mk70482(r75)
}
}];
const r702 = Object.create(FeatureLimits$Type.prototype);
const r706 = $callWithNewTarget(prototypeOf20, r702, FeatureLimits$Type, "discord_protos.users.v1.FeatureLimits", r701);
c1588_33 = r706 instanceof Object ? r706 : r702;
class SafetyFlag$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "flag_expiry",
kind: "message",
T: $mk70483(r1)
}];
super("discord_protos.users.v1.SafetyFlag", r2);
}
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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.flagExpiry = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r5.flagExpiry);
} 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) {
if (a0.flagExpiry) {
Timestamp.internalBinaryWrite(a0.flagExpiry, a1.tag(1, 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;
}
}
c1588_64 = SafetyFlag$Type;
const prototypeOf21 = Object.getPrototypeOf(SafetyFlag$Type);
const r719 = [{
no: 1,
name: "flag_expiry",
kind: "message",
T: $mk70483(r75)
}];
const r720 = Object.create(SafetyFlag$Type.prototype);
const r724 = $callWithNewTarget(prototypeOf21, r720, SafetyFlag$Type, "discord_protos.users.v1.SafetyFlag", r719);
c1588_34 = r724 instanceof Object ? r724 : r720;
class GuildShardingConfig$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "shards",
kind: "scalar",
repeat: 1,
T: 5
}];
super("discord_protos.users.v1.GuildShardingConfig", r2);
}
create(a0) {
const r1 = {
shards: []
};
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 r69 = a0.int32() + a0.pos;
while (a0.pos < r69) {
r5.shards.push(a0.int32());
}
} else {
r5.shards.push(a0.int32());
}
} 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.shards.length) {
a1.tag(1, WireType.LengthDelimited).fork();
const length = a0.shards.length;
let r0 = 0;
if (0 < length) {
do {
a1.int32(a0.shards[r0]);
r0 = r0 + 1;
} while (r0 < a0.shards.length);
}
a1.join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_65 = GuildShardingConfig$Type;
const prototypeOf22 = Object.getPrototypeOf(GuildShardingConfig$Type);
const r736 = [{
no: 1,
name: "shards",
kind: "scalar",
repeat: 1,
T: 5
}];
const r29 = Object.create(GuildShardingConfig$Type.prototype);
const r28 = $callWithNewTarget(prototypeOf22, r29, GuildShardingConfig$Type, "discord_protos.users.v1.GuildShardingConfig", r736);
class QuestMetadata$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "quests_completed",
kind: "scalar",
T: 13
}];
super("discord_protos.users.v1.QuestMetadata", r2);
}
create(a0) {
const r1 = {
questsCompleted: 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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.questsCompleted = a0.uint32();
} 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) {
if (a0.questsCompleted !== 0) {
a1.tag(1, WireType.Varint).uint32(a0.questsCompleted);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_66 = QuestMetadata$Type;
const prototypeOf23 = Object.getPrototypeOf(QuestMetadata$Type);
const r751 = [{
no: 1,
name: "quests_completed",
kind: "scalar",
T: 13
}];
const r752 = Object.create(QuestMetadata$Type.prototype);
const r756 = $callWithNewTarget(prototypeOf23, r752, QuestMetadata$Type, "discord_protos.users.v1.QuestMetadata", r751);
c1588_35 = r756 instanceof Object ? r756 : r752;
class PremiumState$Type extends MessageType {
constructor() {
const r1 = env1588;
const r10 = [{
no: 1,
name: "premium_source",
kind: "enum",
T: $mk70484(r1)
}, {
no: 2,
name: "premium_subscription_type",
kind: "enum",
T: $mk70485(r1)
}, {
no: 3,
name: "premium_subscription_group_role",
kind: "enum",
T: $mk70486(r1)
}];
super("discord_protos.users.v1.PremiumState", r10);
}
create(a0) {
const r1 = {
premiumSource: 0,
premiumSubscriptionType: 0,
premiumSubscriptionGroupRole: 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 r6 = a3 == null ? this.create() : a3;
const r9 = a0.pos + a1;
while (a0.pos < r9) {
const [r20, r19] = a0.tag();
if (r20 === 1) {
r6.premiumSource = a0.int32();
} else if (r20 === 2) {
r6.premiumSubscriptionType = a0.int32();
} else if (r20 === 3) {
r6.premiumSubscriptionGroupRole = a0.int32();
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r19}) for ${this.typeName}`);
}
const r35 = a0.skip(r19);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r6, r20, r19, r35);
}
}
}
return r6;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.premiumSource !== 0) {
a1.tag(1, WireType.Varint).int32(a0.premiumSource);
}
if (a0.premiumSubscriptionType !== 0) {
a1.tag(2, WireType.Varint).int32(a0.premiumSubscriptionType);
}
if (a0.premiumSubscriptionGroupRole !== 0) {
a1.tag(3, WireType.Varint).int32(a0.premiumSubscriptionGroupRole);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_67 = PremiumState$Type;
const prototypeOf24 = Object.getPrototypeOf(PremiumState$Type);
const r769 = [{
no: 1,
name: "premium_source",
kind: "enum",
T: $mk70484(r75)
}, {
no: 2,
name: "premium_subscription_type",
kind: "enum",
T: $mk70485(r75)
}, {
no: 3,
name: "premium_subscription_group_role",
kind: "enum",
T: $mk70486(r75)
}];
const r774 = Object.create(PremiumState$Type.prototype);
const r778 = $callWithNewTarget(prototypeOf24, r774, PremiumState$Type, "discord_protos.users.v1.PremiumState", r769);
c1588_36 = r778 instanceof Object ? r778 : r774;
class StoreCountry$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "country",
kind: "scalar",
T: 9
}, {
no: 2,
name: "set_at",
kind: "message",
T: $mk70487(r1)
}];
super("discord_protos.users.v1.StoreCountry", r2);
}
create(a0) {
const r1 = {
country: ""
};
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.country = a0.string();
} else if (r19 === 2) {
r5.setAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r5.setAt);
} 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) {
if (a0.country !== "") {
a1.tag(1, WireType.LengthDelimited).string(a0.country);
}
if (a0.setAt) {
Timestamp.internalBinaryWrite(a0.setAt, a1.tag(2, 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;
}
}
c1588_68 = StoreCountry$Type;
const prototypeOf25 = Object.getPrototypeOf(StoreCountry$Type);
const r790 = [{
no: 1,
name: "country",
kind: "scalar",
T: 9
}, {
no: 2,
name: "set_at",
kind: "message",
T: $mk70487(r75)
}];
const r793 = Object.create(StoreCountry$Type.prototype);
const r797 = $callWithNewTarget(prototypeOf25, r793, StoreCountry$Type, "discord_protos.users.v1.StoreCountry", r790);
c1588_37 = r797 instanceof Object ? r797 : r793;
class PerkConfig$Type extends MessageType {
constructor() {
const r1 = env1588;
const r10 = [{
no: 1,
name: "source",
kind: "enum",
repeat: 1,
T: $mk70488(r1)
}, {
no: 2,
name: "increased_file_upload_size",
kind: "message",
oneof: "kind",
T: $mk70489(r1)
}, {
no: 3,
name: "increased_guild_limit",
kind: "message",
oneof: "kind",
T: $mk70490(r1)
}];
super("discord_protos.users.v1.PerkConfig", r10);
}
create(a0) {
const r1 = {
source: [],
kind: {
oneofKind: void 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 r6 = a3 == null ? this.create() : a3;
const r9 = a0.pos + a1;
while (a0.pos < r9) {
const [r20, r34] = a0.tag();
if (r20 === 1) {
if (r34 === WireType.LengthDelimited) {
const r92 = a0.int32() + a0.pos;
while (a0.pos < r92) {
r6.source.push(a0.int32());
}
} else {
r6.source.push(a0.int32());
}
} else if (r20 === 2) {
r6.kind = {
oneofKind: "increasedFileUploadSize",
increasedFileUploadSize: c1588_39.internalBinaryRead(a0, a0.uint32(), a2, r6.kind.increasedFileUploadSize)
};
} else if (r20 === 3) {
r6.kind = {
oneofKind: "increasedGuildLimit",
increasedGuildLimit: c1588_40.internalBinaryRead(a0, a0.uint32(), a2, r6.kind.increasedGuildLimit)
};
} else {
let readUnknownField = a2.readUnknownField;
if (readUnknownField === "throw") {
throw new globalThis.globalThis.Error(`Unknown field ${r20} (wire type ${r34}) for ${this.typeName}`);
}
const r15 = a0.skip(r34);
if (readUnknownField !== false) {
if (readUnknownField === true) {
readUnknownField = UnknownFieldHandler.onRead;
}
readUnknownField(this.typeName, r6, r20, r34, r15);
}
}
}
return r6;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.source.length) {
a1.tag(1, WireType.LengthDelimited).fork();
const length = a0.source.length;
let r0 = 0;
if (0 < length) {
do {
a1.int32(a0.source[r0]);
r0 = r0 + 1;
} while (r0 < a0.source.length);
}
a1.join();
}
if (a0.kind.oneofKind === "increasedFileUploadSize") {
c1588_39.internalBinaryWrite(a0.kind.increasedFileUploadSize, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.kind.oneofKind === "increasedGuildLimit") {
c1588_40.internalBinaryWrite(a0.kind.increasedGuildLimit, a1.tag(3, 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;
}
}
c1588_69 = PerkConfig$Type;
const prototypeOf26 = Object.getPrototypeOf(PerkConfig$Type);
const r811 = [{
no: 1,
name: "source",
kind: "enum",
repeat: 1,
T: $mk70488(r75)
}, {
no: 2,
name: "increased_file_upload_size",
kind: "message",
oneof: "kind",
T: $mk70489(r75)
}, {
no: 3,
name: "increased_guild_limit",
kind: "message",
oneof: "kind",
T: $mk70490(r75)
}];
const r816 = Object.create(PerkConfig$Type.prototype);
const r820 = $callWithNewTarget(prototypeOf26, r816, PerkConfig$Type, "discord_protos.users.v1.PerkConfig", r811);
c1588_38 = r820 instanceof Object ? r820 : r816;
class PerkConfigIncreasedFileUploadSize$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "max_size",
kind: "scalar",
T: 4
}];
super("discord_protos.users.v1.PerkConfigIncreasedFileUploadSize", r2);
}
create(a0) {
const r1 = {
maxSize: "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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.maxSize = a0.uint64().toString();
} 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) {
if (a0.maxSize !== "0") {
a1.tag(1, WireType.Varint).uint64(a0.maxSize);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_70 = PerkConfigIncreasedFileUploadSize$Type;
const prototypeOf27 = Object.getPrototypeOf(PerkConfigIncreasedFileUploadSize$Type);
const r832 = [{
no: 1,
name: "max_size",
kind: "scalar",
T: 4
}];
const r833 = Object.create(PerkConfigIncreasedFileUploadSize$Type.prototype);
const r837 = $callWithNewTarget(prototypeOf27, r833, PerkConfigIncreasedFileUploadSize$Type, "discord_protos.users.v1.PerkConfigIncreasedFileUploadSize", r832);
c1588_39 = r837 instanceof Object ? r837 : r833;
class PerkConfigIncreasedGuildLimit$Type extends MessageType {
constructor() {
const r2 = [{
no: 1,
name: "max_guilds",
kind: "scalar",
T: 13
}];
super("discord_protos.users.v1.PerkConfigIncreasedGuildLimit", r2);
}
create(a0) {
const r1 = {
maxGuilds: 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 r5 = a3 == null ? this.create() : a3;
const r8 = a0.pos + a1;
while (a0.pos < r8) {
const [r19, r18] = a0.tag();
if (r19 === 1) {
r5.maxGuilds = a0.uint32();
} 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) {
if (a0.maxGuilds !== 0) {
a1.tag(1, WireType.Varint).uint32(a0.maxGuilds);
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_71 = PerkConfigIncreasedGuildLimit$Type;
const prototypeOf28 = Object.getPrototypeOf(PerkConfigIncreasedGuildLimit$Type);
const r849 = [{
no: 1,
name: "max_guilds",
kind: "scalar",
T: 13
}];
const r850 = Object.create(PerkConfigIncreasedGuildLimit$Type.prototype);
const r854 = $callWithNewTarget(prototypeOf28, r850, PerkConfigIncreasedGuildLimit$Type, "discord_protos.users.v1.PerkConfigIncreasedGuildLimit", r849);
c1588_40 = r854 instanceof Object ? r854 : r850;
class Perks$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "active_perks_bitmask",
kind: "scalar",
repeat: 1,
T: 4
}, {
no: 2,
name: "config_by_perk",
kind: "map",
K: 13,
V: {
kind: "message",
T: $mk70491(r1)
}
}, {
no: 3,
name: "rules_version",
kind: "scalar",
T: 13
}, {
no: 4,
name: "updated_at",
kind: "message",
T: $mk70492(r1)
}];
super("discord_protos.users.v1.Perks", r2);
}
create(a0) {
const r1 = {
activePerksBitmask: [],
configByPerk: {},
rulesVersion: 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) {
if (r35 === WireType.LengthDelimited) {
const r91 = a0.int32() + a0.pos;
while (a0.pos < r91) {
r7.activePerksBitmask.push(a0.uint64().toString());
}
} else {
r7.activePerksBitmask.push(a0.uint64().toString());
}
} else if (r21 === 2) {
this.binaryReadMap2(r7.configByPerk, a0, a2);
} else if (r21 === 3) {
r7.rulesVersion = a0.uint32();
} else if (r21 === 4) {
r7.updatedAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r7.updatedAt);
} 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;
}
binaryReadMap2(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.uint32();
r38 = r15;
} else {
if (r27 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.users.v1.Perks.config_by_perk");
}
r38 = c1588_38.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 = c1588_38.create();
}
a0[r24] = r23;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.activePerksBitmask.length) {
a1.tag(1, WireType.LengthDelimited).fork();
const length = a0.activePerksBitmask.length;
let r41 = 0;
if (0 < length) {
do {
a1.uint64(a0.activePerksBitmask[r41]);
r41 = r41 + 1;
} while (r41 < a0.activePerksBitmask.length);
}
a1.join();
}
for (const item of Object.keys(a0.configByPerk)) {
a1.tag.call(a1, 2, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(item));
a1.tag(2, WireType.LengthDelimited).fork();
c1588_38.internalBinaryWrite(a0.configByPerk[item], a1, a2);
a1.join().join();
}
if (a0.rulesVersion !== 0) {
a1.tag(3, WireType.Varint).uint32(a0.rulesVersion);
}
if (a0.updatedAt) {
Timestamp.internalBinaryWrite(a0.updatedAt, a1.tag(4, 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;
}
}
c1588_72 = Perks$Type;
const prototypeOf29 = Object.getPrototypeOf(Perks$Type);
const r868 = [{
no: 1,
name: "active_perks_bitmask",
kind: "scalar",
repeat: 1,
T: 4
}, {
no: 2,
name: "config_by_perk",
kind: "map",
K: 13,
V: {
kind: "message",
T: $mk70491(r75)
}
}, {
no: 3,
name: "rules_version",
kind: "scalar",
T: 13
}, {
no: 4,
name: "updated_at",
kind: "message",
T: $mk70492(r75)
}];
const r874 = Object.create(Perks$Type.prototype);
const r878 = $callWithNewTarget(prototypeOf29, r874, Perks$Type, "discord_protos.users.v1.Perks", r868);
c1588_41 = r878 instanceof Object ? r878 : r874;
class UserCountryData$Type extends MessageType {
constructor() {
const r1 = env1588;
const r2 = [{
no: 1,
name: "calculated_country",
kind: "scalar",
T: 9
}, {
no: 2,
name: "last_calculated_at",
kind: "message",
T: $mk70493(r1)
}, {
no: 3,
name: "country_override",
kind: "message",
T: $mk70494(r1)
}, {
no: 4,
name: "override_set_at",
kind: "message",
T: $mk70495(r1)
}, {
no: 5,
name: "country_scores",
kind: "map",
K: 9,
V: {
kind: "scalar",
T: 2
}
}];
super("discord_protos.users.v1.UserCountryData", r2);
}
create(a0) {
const r1 = {
calculatedCountry: "",
countryScores: {}
};
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.calculatedCountry = a0.string();
} else if (r22 === 2) {
r8.lastCalculatedAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r8.lastCalculatedAt);
} else if (r22 === 3) {
r8.countryOverride = StringValue.internalBinaryRead(a0, a0.uint32(), a2, r8.countryOverride);
} else if (r22 === 4) {
r8.overrideSetAt = Timestamp.internalBinaryRead(a0, a0.uint32(), a2, r8.overrideSetAt);
} else if (r22 === 5) {
this.binaryReadMap5(r8.countryScores, a0, a2);
} 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;
}
binaryReadMap5(a0, a1) {
let r33, pos;
const r9 = a1.pos + a1.uint32();
const r3 = a1.pos < r9;
let r8 = void 0;
let r7 = void 0;
let r6 = void 0;
let r21 = void 0;
if (r3) {
do {
const [r25, ] = a1.tag();
const r14 = r8;
let r27 = r7;
if (r25 === 1) {
r27 = a1.string();
r33 = r14;
} else {
if (r25 !== 2) {
throw new globalThis.globalThis.Error("unknown map entry field for field discord_protos.users.v1.UserCountryData.country_scores");
}
r33 = a1.float();
}
pos = a1.pos;
r8 = r33;
r7 = r27;
r6 = r8;
r21 = r7;
} while (pos < r9);
}
if (r21 == null) {
r21 = "";
}
if (r6 == null) {
r6 = 0;
}
a0[r21] = r6;
}
internalBinaryWrite(a0, a1, a2) {
if (a0.calculatedCountry !== "") {
a1.tag(1, WireType.LengthDelimited).string(a0.calculatedCountry);
}
if (a0.lastCalculatedAt) {
Timestamp.internalBinaryWrite(a0.lastCalculatedAt, a1.tag(2, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.countryOverride) {
StringValue.internalBinaryWrite(a0.countryOverride, a1.tag(3, WireType.LengthDelimited).fork(), a2).join();
}
if (a0.overrideSetAt) {
Timestamp.internalBinaryWrite(a0.overrideSetAt, a1.tag(4, WireType.LengthDelimited).fork(), a2).join();
}
for (const item of Object.keys(a0.countryScores)) {
a1.tag.call(a1, 5, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(item).tag(2, WireType.Bit32).float(a0.countryScores[item]).join();
}
let writeUnknownFields = a2.writeUnknownFields;
if (writeUnknownFields !== false) {
if (writeUnknownFields == 1) {
writeUnknownFields = UnknownFieldHandler.onWrite;
}
writeUnknownFields(this.typeName, a0, a1);
}
return a1;
}
}
c1588_73 = UserCountryData$Type;
const prototypeOf30 = Object.getPrototypeOf(UserCountryData$Type);
const r893 = [{
no: 1,
name: "calculated_country",
kind: "scalar",
T: 9
}, {
no: 2,
name: "last_calculated_at",
kind: "message",
T: $mk70493(r75)
}, {
no: 3,
name: "country_override",
kind: "message",
T: $mk70494(r75)
}, {
no: 4,
name: "override_set_at",
kind: "message",
T: $mk70495(r75)
}, {
no: 5,
name: "country_scores",
kind: "map",
K: 9,
V: {
kind: "scalar",
T: 2
}
}];
const r902 = Object.create(UserCountryData$Type.prototype);
const r906 = $callWithNewTarget(prototypeOf30, r902, UserCountryData$Type, "discord_protos.users.v1.UserCountryData", r893);
c1588_42 = r906 instanceof Object ? r906 : r902;
export { c1588_3 as DayOfWeek };
export { c1588_4 as DisplayNameFont };
export { c1588_5 as DisplayNameEffect };
export { r69 as BadgeType };
export { c1588_6 as AnonymizationStatus };
export { r67 as AgeAssuranceTier };
export { c1588_7 as AgeAssuranceMethod };
export { c1588_8 as AgeAssuranceVendor };
export { c1588_9 as AgeAssuranceGroup };
export { c1588_10 as UserLinkType };
export { c1588_11 as UserLinkStatus };
export { r61 as RateLimitTier };
export { r60 as FeatureLimitName };
export { r59 as SafetyFlagType };
export { c1588_12 as PremiumSource };
export { c1588_13 as PremiumSubscriptionType };
export { c1588_14 as PremiumSubscriptionGroupRole };
export { r55 as Perk };
export { c1588_15 as PerkSource };
export { c1588_16 as TimeOfDay };
export const User = r51 instanceof Object ? r51 : r52;
export const MediumUser = r49 instanceof Object ? r49 : r50;
export { c1588_17 as UserAvatarDecoration };
export { c1588_18 as UserNameplate };
export { c1588_19 as DisplayNameStyles };
export { c1588_20 as UserCollectibles };
export { c1588_21 as UserPrimaryGuild };
export { c1588_22 as ScheduleRule };
export { c1588_23 as RestrictedSchedule };
export { c1588_24 as CrossPlatformRestriction };
export { c1588_25 as BadgeCommon };
export { c1588_26 as AprilFools2026Badge };
export { c1588_27 as Badge };
export { c1588_28 as UserBadges };
export { c1588_29 as AnonymizationInfo };
export { r35 as UserData };
export { c1588_30 as AgeAssuranceData };
export { c1588_31 as LinkedUser };
export { c1588_32 as RateLimitData };
export { c1588_33 as FeatureLimits };
export { c1588_34 as SafetyFlag };
export const GuildShardingConfig = r28 instanceof Object ? r28 : r29;
export { c1588_35 as QuestMetadata };
export { c1588_36 as PremiumState };
export { c1588_37 as StoreCountry };
export { c1588_38 as PerkConfig };
export { c1588_39 as PerkConfigIncreasedFileUploadSize };
export { c1588_40 as PerkConfigIncreasedGuildLimit };
export { c1588_41 as Perks };
export { c1588_42 as UserCountryData };