@hiroosy/baileys-lite 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/WAProto/index.js +231 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
  226. package/src/socket/messages-recv.js +3 -1
  227. package/src/socket/messages-send.js +25 -10
  228. package/src/socket/socket-core.js +53 -57
  229. package/src/utils/wa-protocol-core.js +3 -9
@@ -0,0 +1,1235 @@
1
+ "use strict";
2
+ function StatusAttribution(p) {
3
+ if (p)
4
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
5
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
6
+ this[ks[i]] = p[ks[i]];
7
+ }
8
+ StatusAttribution.prototype.type = null;
9
+ StatusAttribution.prototype.actionUrl = null;
10
+ StatusAttribution.prototype.statusReshare = null;
11
+ StatusAttribution.prototype.externalShare = null;
12
+ StatusAttribution.prototype.music = null;
13
+ StatusAttribution.prototype.groupStatus = null;
14
+ StatusAttribution.prototype.rlAttribution = null;
15
+ StatusAttribution.prototype.aiCreatedAttribution = null;
16
+ let $oneOfFields;
17
+ Object.defineProperty(StatusAttribution.prototype, "_type", {
18
+ get: $util.oneOfGetter($oneOfFields = ["type"]),
19
+ set: $util.oneOfSetter($oneOfFields)
20
+ });
21
+ Object.defineProperty(StatusAttribution.prototype, "_actionUrl", {
22
+ get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
23
+ set: $util.oneOfSetter($oneOfFields)
24
+ });
25
+ Object.defineProperty(StatusAttribution.prototype, "attributionData", {
26
+ get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music", "groupStatus", "rlAttribution", "aiCreatedAttribution"]),
27
+ set: $util.oneOfSetter($oneOfFields)
28
+ });
29
+ StatusAttribution.create = function create(properties) {
30
+ return new StatusAttribution(properties);
31
+ };
32
+ StatusAttribution.encode = function encode(m, w) {
33
+ if (!w)
34
+ w = $Writer.create();
35
+ if (m.type != null && Object.hasOwnProperty.call(m, "type"))
36
+ w.uint32(8).int32(m.type);
37
+ if (m.actionUrl != null && Object.hasOwnProperty.call(m, "actionUrl"))
38
+ w.uint32(18).string(m.actionUrl);
39
+ if (m.statusReshare != null && Object.hasOwnProperty.call(m, "statusReshare"))
40
+ $root.proto.StatusAttribution.StatusReshare.encode(m.statusReshare, w.uint32(26).fork()).ldelim();
41
+ if (m.externalShare != null && Object.hasOwnProperty.call(m, "externalShare"))
42
+ $root.proto.StatusAttribution.ExternalShare.encode(m.externalShare, w.uint32(34).fork()).ldelim();
43
+ if (m.music != null && Object.hasOwnProperty.call(m, "music"))
44
+ $root.proto.StatusAttribution.Music.encode(m.music, w.uint32(42).fork()).ldelim();
45
+ if (m.groupStatus != null && Object.hasOwnProperty.call(m, "groupStatus"))
46
+ $root.proto.StatusAttribution.GroupStatus.encode(m.groupStatus, w.uint32(50).fork()).ldelim();
47
+ if (m.rlAttribution != null && Object.hasOwnProperty.call(m, "rlAttribution"))
48
+ $root.proto.StatusAttribution.RLAttribution.encode(m.rlAttribution, w.uint32(58).fork()).ldelim();
49
+ if (m.aiCreatedAttribution != null && Object.hasOwnProperty.call(m, "aiCreatedAttribution"))
50
+ $root.proto.StatusAttribution.AiCreatedAttribution.encode(m.aiCreatedAttribution, w.uint32(66).fork()).ldelim();
51
+ return w;
52
+ };
53
+ StatusAttribution.decode = function decode(r, l, e, n) {
54
+ if (!(r instanceof $Reader))
55
+ r = $Reader.create(r);
56
+ if (n === undefined)
57
+ n = 0;
58
+ if (n > $Reader.recursionLimit)
59
+ throw Error("maximum nesting depth exceeded");
60
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution();
61
+ while (r.pos < c) {
62
+ var t = r.uint32();
63
+ if (t === e)
64
+ break;
65
+ switch (t >>> 3) {
66
+ case 1: {
67
+ m.type = r.int32();
68
+ break;
69
+ }
70
+ case 2: {
71
+ m.actionUrl = r.string();
72
+ break;
73
+ }
74
+ case 3: {
75
+ m.statusReshare = $root.proto.StatusAttribution.StatusReshare.decode(r, r.uint32(), undefined, n + 1);
76
+ break;
77
+ }
78
+ case 4: {
79
+ m.externalShare = $root.proto.StatusAttribution.ExternalShare.decode(r, r.uint32(), undefined, n + 1);
80
+ break;
81
+ }
82
+ case 5: {
83
+ m.music = $root.proto.StatusAttribution.Music.decode(r, r.uint32(), undefined, n + 1);
84
+ break;
85
+ }
86
+ case 6: {
87
+ m.groupStatus = $root.proto.StatusAttribution.GroupStatus.decode(r, r.uint32(), undefined, n + 1);
88
+ break;
89
+ }
90
+ case 7: {
91
+ m.rlAttribution = $root.proto.StatusAttribution.RLAttribution.decode(r, r.uint32(), undefined, n + 1);
92
+ break;
93
+ }
94
+ case 8: {
95
+ m.aiCreatedAttribution = $root.proto.StatusAttribution.AiCreatedAttribution.decode(r, r.uint32(), undefined, n + 1);
96
+ break;
97
+ }
98
+ default:
99
+ r.skipType(t & 7, n);
100
+ break;
101
+ }
102
+ }
103
+ return m;
104
+ };
105
+ StatusAttribution.fromObject = function fromObject(d, n) {
106
+ if (d instanceof $root.proto.StatusAttribution)
107
+ return d;
108
+ if (n === undefined)
109
+ n = 0;
110
+ if (n > $util.recursionLimit)
111
+ throw Error("maximum nesting depth exceeded");
112
+ var m = new $root.proto.StatusAttribution();
113
+ switch (d.type) {
114
+ default:
115
+ if (typeof d.type === "number") {
116
+ m.type = d.type;
117
+ break;
118
+ }
119
+ break;
120
+ case "UNKNOWN":
121
+ case 0:
122
+ m.type = 0;
123
+ break;
124
+ case "RESHARE":
125
+ case 1:
126
+ m.type = 1;
127
+ break;
128
+ case "EXTERNAL_SHARE":
129
+ case 2:
130
+ m.type = 2;
131
+ break;
132
+ case "MUSIC":
133
+ case 3:
134
+ m.type = 3;
135
+ break;
136
+ case "STATUS_MENTION":
137
+ case 4:
138
+ m.type = 4;
139
+ break;
140
+ case "GROUP_STATUS":
141
+ case 5:
142
+ m.type = 5;
143
+ break;
144
+ case "RL_ATTRIBUTION":
145
+ case 6:
146
+ m.type = 6;
147
+ break;
148
+ case "AI_CREATED":
149
+ case 7:
150
+ m.type = 7;
151
+ break;
152
+ case "LAYOUTS":
153
+ case 8:
154
+ m.type = 8;
155
+ break;
156
+ case "NEWSLETTER_STATUS":
157
+ case 9:
158
+ m.type = 9;
159
+ break;
160
+ case "STATUS_CLOSE_SHARING":
161
+ case 10:
162
+ m.type = 10;
163
+ break;
164
+ case "PAID_PARTNERSHIP":
165
+ case 11:
166
+ m.type = 11;
167
+ break;
168
+ }
169
+ if (d.actionUrl != null) {
170
+ m.actionUrl = String(d.actionUrl);
171
+ }
172
+ if (d.statusReshare != null) {
173
+ if (typeof d.statusReshare !== "object")
174
+ throw TypeError(".proto.StatusAttribution.statusReshare: object expected");
175
+ m.statusReshare = $root.proto.StatusAttribution.StatusReshare.fromObject(d.statusReshare, n + 1);
176
+ }
177
+ if (d.externalShare != null) {
178
+ if (typeof d.externalShare !== "object")
179
+ throw TypeError(".proto.StatusAttribution.externalShare: object expected");
180
+ m.externalShare = $root.proto.StatusAttribution.ExternalShare.fromObject(d.externalShare, n + 1);
181
+ }
182
+ if (d.music != null) {
183
+ if (typeof d.music !== "object")
184
+ throw TypeError(".proto.StatusAttribution.music: object expected");
185
+ m.music = $root.proto.StatusAttribution.Music.fromObject(d.music, n + 1);
186
+ }
187
+ if (d.groupStatus != null) {
188
+ if (typeof d.groupStatus !== "object")
189
+ throw TypeError(".proto.StatusAttribution.groupStatus: object expected");
190
+ m.groupStatus = $root.proto.StatusAttribution.GroupStatus.fromObject(d.groupStatus, n + 1);
191
+ }
192
+ if (d.rlAttribution != null) {
193
+ if (typeof d.rlAttribution !== "object")
194
+ throw TypeError(".proto.StatusAttribution.rlAttribution: object expected");
195
+ m.rlAttribution = $root.proto.StatusAttribution.RLAttribution.fromObject(d.rlAttribution, n + 1);
196
+ }
197
+ if (d.aiCreatedAttribution != null) {
198
+ if (typeof d.aiCreatedAttribution !== "object")
199
+ throw TypeError(".proto.StatusAttribution.aiCreatedAttribution: object expected");
200
+ m.aiCreatedAttribution = $root.proto.StatusAttribution.AiCreatedAttribution.fromObject(d.aiCreatedAttribution, n + 1);
201
+ }
202
+ return m;
203
+ };
204
+ StatusAttribution.toObject = function toObject(m, o) {
205
+ if (!o)
206
+ o = {};
207
+ var d = {};
208
+ if (m.type != null && m.hasOwnProperty("type")) {
209
+ d.type = o.enums === String ? $root.proto.StatusAttribution.Type[m.type] === undefined ? m.type : $root.proto.StatusAttribution.Type[m.type] : m.type;
210
+ if (o.oneofs)
211
+ d._type = "type";
212
+ }
213
+ if (m.actionUrl != null && m.hasOwnProperty("actionUrl")) {
214
+ d.actionUrl = m.actionUrl;
215
+ if (o.oneofs)
216
+ d._actionUrl = "actionUrl";
217
+ }
218
+ if (m.statusReshare != null && m.hasOwnProperty("statusReshare")) {
219
+ d.statusReshare = $root.proto.StatusAttribution.StatusReshare.toObject(m.statusReshare, o);
220
+ if (o.oneofs)
221
+ d.attributionData = "statusReshare";
222
+ }
223
+ if (m.externalShare != null && m.hasOwnProperty("externalShare")) {
224
+ d.externalShare = $root.proto.StatusAttribution.ExternalShare.toObject(m.externalShare, o);
225
+ if (o.oneofs)
226
+ d.attributionData = "externalShare";
227
+ }
228
+ if (m.music != null && m.hasOwnProperty("music")) {
229
+ d.music = $root.proto.StatusAttribution.Music.toObject(m.music, o);
230
+ if (o.oneofs)
231
+ d.attributionData = "music";
232
+ }
233
+ if (m.groupStatus != null && m.hasOwnProperty("groupStatus")) {
234
+ d.groupStatus = $root.proto.StatusAttribution.GroupStatus.toObject(m.groupStatus, o);
235
+ if (o.oneofs)
236
+ d.attributionData = "groupStatus";
237
+ }
238
+ if (m.rlAttribution != null && m.hasOwnProperty("rlAttribution")) {
239
+ d.rlAttribution = $root.proto.StatusAttribution.RLAttribution.toObject(m.rlAttribution, o);
240
+ if (o.oneofs)
241
+ d.attributionData = "rlAttribution";
242
+ }
243
+ if (m.aiCreatedAttribution != null && m.hasOwnProperty("aiCreatedAttribution")) {
244
+ d.aiCreatedAttribution = $root.proto.StatusAttribution.AiCreatedAttribution.toObject(m.aiCreatedAttribution, o);
245
+ if (o.oneofs)
246
+ d.attributionData = "aiCreatedAttribution";
247
+ }
248
+ return d;
249
+ };
250
+ StatusAttribution.prototype.toJSON = function toJSON() {
251
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
252
+ };
253
+ StatusAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
254
+ if (typeUrlPrefix === undefined) {
255
+ typeUrlPrefix = "type.googleapis.com";
256
+ }
257
+ return typeUrlPrefix + "/proto.StatusAttribution";
258
+ };
259
+ $lazy(StatusAttribution, "AiCreatedAttribution", function() {
260
+ function AiCreatedAttribution(p) {
261
+ if (p)
262
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
263
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
264
+ this[ks[i]] = p[ks[i]];
265
+ }
266
+ AiCreatedAttribution.prototype.source = null;
267
+ let $oneOfFields;
268
+ Object.defineProperty(AiCreatedAttribution.prototype, "_source", {
269
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
270
+ set: $util.oneOfSetter($oneOfFields)
271
+ });
272
+ AiCreatedAttribution.create = function create(properties) {
273
+ return new AiCreatedAttribution(properties);
274
+ };
275
+ AiCreatedAttribution.encode = function encode(m, w) {
276
+ if (!w)
277
+ w = $Writer.create();
278
+ if (m.source != null && Object.hasOwnProperty.call(m, "source"))
279
+ w.uint32(8).int32(m.source);
280
+ return w;
281
+ };
282
+ AiCreatedAttribution.decode = function decode(r, l, e, n) {
283
+ if (!(r instanceof $Reader))
284
+ r = $Reader.create(r);
285
+ if (n === undefined)
286
+ n = 0;
287
+ if (n > $Reader.recursionLimit)
288
+ throw Error("maximum nesting depth exceeded");
289
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.AiCreatedAttribution();
290
+ while (r.pos < c) {
291
+ var t = r.uint32();
292
+ if (t === e)
293
+ break;
294
+ switch (t >>> 3) {
295
+ case 1: {
296
+ m.source = r.int32();
297
+ break;
298
+ }
299
+ default:
300
+ r.skipType(t & 7, n);
301
+ break;
302
+ }
303
+ }
304
+ return m;
305
+ };
306
+ AiCreatedAttribution.fromObject = function fromObject(d, n) {
307
+ if (d instanceof $root.proto.StatusAttribution.AiCreatedAttribution)
308
+ return d;
309
+ if (n === undefined)
310
+ n = 0;
311
+ if (n > $util.recursionLimit)
312
+ throw Error("maximum nesting depth exceeded");
313
+ var m = new $root.proto.StatusAttribution.AiCreatedAttribution();
314
+ switch (d.source) {
315
+ default:
316
+ if (typeof d.source === "number") {
317
+ m.source = d.source;
318
+ break;
319
+ }
320
+ break;
321
+ case "UNKNOWN":
322
+ case 0:
323
+ m.source = 0;
324
+ break;
325
+ case "STATUS_MIMICRY":
326
+ case 1:
327
+ m.source = 1;
328
+ break;
329
+ }
330
+ return m;
331
+ };
332
+ AiCreatedAttribution.toObject = function toObject(m, o) {
333
+ if (!o)
334
+ o = {};
335
+ var d = {};
336
+ if (m.source != null && m.hasOwnProperty("source")) {
337
+ d.source = o.enums === String ? $root.proto.StatusAttribution.AiCreatedAttribution.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.AiCreatedAttribution.Source[m.source] : m.source;
338
+ if (o.oneofs)
339
+ d._source = "source";
340
+ }
341
+ return d;
342
+ };
343
+ AiCreatedAttribution.prototype.toJSON = function toJSON() {
344
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
345
+ };
346
+ AiCreatedAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
347
+ if (typeUrlPrefix === undefined) {
348
+ typeUrlPrefix = "type.googleapis.com";
349
+ }
350
+ return typeUrlPrefix + "/proto.StatusAttribution.AiCreatedAttribution";
351
+ };
352
+ $lazy(AiCreatedAttribution, "Source", function() {
353
+ const valuesById = {}, values = Object.create(valuesById);
354
+ values[valuesById[0] = "UNKNOWN"] = 0;
355
+ values[valuesById[1] = "STATUS_MIMICRY"] = 1;
356
+ return values;
357
+ });
358
+ return AiCreatedAttribution;
359
+ });
360
+ $lazy(StatusAttribution, "ExternalShare", function() {
361
+ function ExternalShare(p) {
362
+ if (p)
363
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
364
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
365
+ this[ks[i]] = p[ks[i]];
366
+ }
367
+ ExternalShare.prototype.actionUrl = null;
368
+ ExternalShare.prototype.source = null;
369
+ ExternalShare.prototype.duration = null;
370
+ ExternalShare.prototype.actionFallbackUrl = null;
371
+ let $oneOfFields;
372
+ Object.defineProperty(ExternalShare.prototype, "_actionUrl", {
373
+ get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
374
+ set: $util.oneOfSetter($oneOfFields)
375
+ });
376
+ Object.defineProperty(ExternalShare.prototype, "_source", {
377
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
378
+ set: $util.oneOfSetter($oneOfFields)
379
+ });
380
+ Object.defineProperty(ExternalShare.prototype, "_duration", {
381
+ get: $util.oneOfGetter($oneOfFields = ["duration"]),
382
+ set: $util.oneOfSetter($oneOfFields)
383
+ });
384
+ Object.defineProperty(ExternalShare.prototype, "_actionFallbackUrl", {
385
+ get: $util.oneOfGetter($oneOfFields = ["actionFallbackUrl"]),
386
+ set: $util.oneOfSetter($oneOfFields)
387
+ });
388
+ ExternalShare.create = function create(properties) {
389
+ return new ExternalShare(properties);
390
+ };
391
+ ExternalShare.encode = function encode(m, w) {
392
+ if (!w)
393
+ w = $Writer.create();
394
+ if (m.actionUrl != null && Object.hasOwnProperty.call(m, "actionUrl"))
395
+ w.uint32(10).string(m.actionUrl);
396
+ if (m.source != null && Object.hasOwnProperty.call(m, "source"))
397
+ w.uint32(16).int32(m.source);
398
+ if (m.duration != null && Object.hasOwnProperty.call(m, "duration"))
399
+ w.uint32(24).int32(m.duration);
400
+ if (m.actionFallbackUrl != null && Object.hasOwnProperty.call(m, "actionFallbackUrl"))
401
+ w.uint32(34).string(m.actionFallbackUrl);
402
+ return w;
403
+ };
404
+ ExternalShare.decode = function decode(r, l, e, n) {
405
+ if (!(r instanceof $Reader))
406
+ r = $Reader.create(r);
407
+ if (n === undefined)
408
+ n = 0;
409
+ if (n > $Reader.recursionLimit)
410
+ throw Error("maximum nesting depth exceeded");
411
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.ExternalShare();
412
+ while (r.pos < c) {
413
+ var t = r.uint32();
414
+ if (t === e)
415
+ break;
416
+ switch (t >>> 3) {
417
+ case 1: {
418
+ m.actionUrl = r.string();
419
+ break;
420
+ }
421
+ case 2: {
422
+ m.source = r.int32();
423
+ break;
424
+ }
425
+ case 3: {
426
+ m.duration = r.int32();
427
+ break;
428
+ }
429
+ case 4: {
430
+ m.actionFallbackUrl = r.string();
431
+ break;
432
+ }
433
+ default:
434
+ r.skipType(t & 7, n);
435
+ break;
436
+ }
437
+ }
438
+ return m;
439
+ };
440
+ ExternalShare.fromObject = function fromObject(d, n) {
441
+ if (d instanceof $root.proto.StatusAttribution.ExternalShare)
442
+ return d;
443
+ if (n === undefined)
444
+ n = 0;
445
+ if (n > $util.recursionLimit)
446
+ throw Error("maximum nesting depth exceeded");
447
+ var m = new $root.proto.StatusAttribution.ExternalShare();
448
+ if (d.actionUrl != null) {
449
+ m.actionUrl = String(d.actionUrl);
450
+ }
451
+ switch (d.source) {
452
+ default:
453
+ if (typeof d.source === "number") {
454
+ m.source = d.source;
455
+ break;
456
+ }
457
+ break;
458
+ case "UNKNOWN":
459
+ case 0:
460
+ m.source = 0;
461
+ break;
462
+ case "INSTAGRAM":
463
+ case 1:
464
+ m.source = 1;
465
+ break;
466
+ case "FACEBOOK":
467
+ case 2:
468
+ m.source = 2;
469
+ break;
470
+ case "MESSENGER":
471
+ case 3:
472
+ m.source = 3;
473
+ break;
474
+ case "SPOTIFY":
475
+ case 4:
476
+ m.source = 4;
477
+ break;
478
+ case "YOUTUBE":
479
+ case 5:
480
+ m.source = 5;
481
+ break;
482
+ case "PINTEREST":
483
+ case 6:
484
+ m.source = 6;
485
+ break;
486
+ case "THREADS":
487
+ case 7:
488
+ m.source = 7;
489
+ break;
490
+ case "APPLE_MUSIC":
491
+ case 8:
492
+ m.source = 8;
493
+ break;
494
+ case "SHARECHAT":
495
+ case 9:
496
+ m.source = 9;
497
+ break;
498
+ case "GOOGLE_PHOTOS":
499
+ case 10:
500
+ m.source = 10;
501
+ break;
502
+ case "SOUNDCLOUD":
503
+ case 11:
504
+ m.source = 11;
505
+ break;
506
+ case "SHAZAM":
507
+ case 12:
508
+ m.source = 12;
509
+ break;
510
+ }
511
+ if (d.duration != null) {
512
+ m.duration = d.duration | 0;
513
+ }
514
+ if (d.actionFallbackUrl != null) {
515
+ m.actionFallbackUrl = String(d.actionFallbackUrl);
516
+ }
517
+ return m;
518
+ };
519
+ ExternalShare.toObject = function toObject(m, o) {
520
+ if (!o)
521
+ o = {};
522
+ var d = {};
523
+ if (m.actionUrl != null && m.hasOwnProperty("actionUrl")) {
524
+ d.actionUrl = m.actionUrl;
525
+ if (o.oneofs)
526
+ d._actionUrl = "actionUrl";
527
+ }
528
+ if (m.source != null && m.hasOwnProperty("source")) {
529
+ d.source = o.enums === String ? $root.proto.StatusAttribution.ExternalShare.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.ExternalShare.Source[m.source] : m.source;
530
+ if (o.oneofs)
531
+ d._source = "source";
532
+ }
533
+ if (m.duration != null && m.hasOwnProperty("duration")) {
534
+ d.duration = m.duration;
535
+ if (o.oneofs)
536
+ d._duration = "duration";
537
+ }
538
+ if (m.actionFallbackUrl != null && m.hasOwnProperty("actionFallbackUrl")) {
539
+ d.actionFallbackUrl = m.actionFallbackUrl;
540
+ if (o.oneofs)
541
+ d._actionFallbackUrl = "actionFallbackUrl";
542
+ }
543
+ return d;
544
+ };
545
+ ExternalShare.prototype.toJSON = function toJSON() {
546
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
547
+ };
548
+ ExternalShare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
549
+ if (typeUrlPrefix === undefined) {
550
+ typeUrlPrefix = "type.googleapis.com";
551
+ }
552
+ return typeUrlPrefix + "/proto.StatusAttribution.ExternalShare";
553
+ };
554
+ $lazy(ExternalShare, "Source", function() {
555
+ const valuesById = {}, values = Object.create(valuesById);
556
+ values[valuesById[0] = "UNKNOWN"] = 0;
557
+ values[valuesById[1] = "INSTAGRAM"] = 1;
558
+ values[valuesById[2] = "FACEBOOK"] = 2;
559
+ values[valuesById[3] = "MESSENGER"] = 3;
560
+ values[valuesById[4] = "SPOTIFY"] = 4;
561
+ values[valuesById[5] = "YOUTUBE"] = 5;
562
+ values[valuesById[6] = "PINTEREST"] = 6;
563
+ values[valuesById[7] = "THREADS"] = 7;
564
+ values[valuesById[8] = "APPLE_MUSIC"] = 8;
565
+ values[valuesById[9] = "SHARECHAT"] = 9;
566
+ values[valuesById[10] = "GOOGLE_PHOTOS"] = 10;
567
+ values[valuesById[11] = "SOUNDCLOUD"] = 11;
568
+ values[valuesById[12] = "SHAZAM"] = 12;
569
+ return values;
570
+ });
571
+ return ExternalShare;
572
+ });
573
+ $lazy(StatusAttribution, "GroupStatus", function() {
574
+ function GroupStatus(p) {
575
+ if (p)
576
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
577
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
578
+ this[ks[i]] = p[ks[i]];
579
+ }
580
+ GroupStatus.prototype.authorJid = null;
581
+ let $oneOfFields;
582
+ Object.defineProperty(GroupStatus.prototype, "_authorJid", {
583
+ get: $util.oneOfGetter($oneOfFields = ["authorJid"]),
584
+ set: $util.oneOfSetter($oneOfFields)
585
+ });
586
+ GroupStatus.create = function create(properties) {
587
+ return new GroupStatus(properties);
588
+ };
589
+ GroupStatus.encode = function encode(m, w) {
590
+ if (!w)
591
+ w = $Writer.create();
592
+ if (m.authorJid != null && Object.hasOwnProperty.call(m, "authorJid"))
593
+ w.uint32(10).string(m.authorJid);
594
+ return w;
595
+ };
596
+ GroupStatus.decode = function decode(r, l, e, n) {
597
+ if (!(r instanceof $Reader))
598
+ r = $Reader.create(r);
599
+ if (n === undefined)
600
+ n = 0;
601
+ if (n > $Reader.recursionLimit)
602
+ throw Error("maximum nesting depth exceeded");
603
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.GroupStatus();
604
+ while (r.pos < c) {
605
+ var t = r.uint32();
606
+ if (t === e)
607
+ break;
608
+ switch (t >>> 3) {
609
+ case 1: {
610
+ m.authorJid = r.string();
611
+ break;
612
+ }
613
+ default:
614
+ r.skipType(t & 7, n);
615
+ break;
616
+ }
617
+ }
618
+ return m;
619
+ };
620
+ GroupStatus.fromObject = function fromObject(d, n) {
621
+ if (d instanceof $root.proto.StatusAttribution.GroupStatus)
622
+ return d;
623
+ if (n === undefined)
624
+ n = 0;
625
+ if (n > $util.recursionLimit)
626
+ throw Error("maximum nesting depth exceeded");
627
+ var m = new $root.proto.StatusAttribution.GroupStatus();
628
+ if (d.authorJid != null) {
629
+ m.authorJid = String(d.authorJid);
630
+ }
631
+ return m;
632
+ };
633
+ GroupStatus.toObject = function toObject(m, o) {
634
+ if (!o)
635
+ o = {};
636
+ var d = {};
637
+ if (m.authorJid != null && m.hasOwnProperty("authorJid")) {
638
+ d.authorJid = m.authorJid;
639
+ if (o.oneofs)
640
+ d._authorJid = "authorJid";
641
+ }
642
+ return d;
643
+ };
644
+ GroupStatus.prototype.toJSON = function toJSON() {
645
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
646
+ };
647
+ GroupStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
648
+ if (typeUrlPrefix === undefined) {
649
+ typeUrlPrefix = "type.googleapis.com";
650
+ }
651
+ return typeUrlPrefix + "/proto.StatusAttribution.GroupStatus";
652
+ };
653
+ return GroupStatus;
654
+ });
655
+ $lazy(StatusAttribution, "Music", function() {
656
+ function Music(p) {
657
+ if (p)
658
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
659
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
660
+ this[ks[i]] = p[ks[i]];
661
+ }
662
+ Music.prototype.authorName = null;
663
+ Music.prototype.songId = null;
664
+ Music.prototype.title = null;
665
+ Music.prototype.author = null;
666
+ Music.prototype.artistAttribution = null;
667
+ Music.prototype.isExplicit = null;
668
+ let $oneOfFields;
669
+ Object.defineProperty(Music.prototype, "_authorName", {
670
+ get: $util.oneOfGetter($oneOfFields = ["authorName"]),
671
+ set: $util.oneOfSetter($oneOfFields)
672
+ });
673
+ Object.defineProperty(Music.prototype, "_songId", {
674
+ get: $util.oneOfGetter($oneOfFields = ["songId"]),
675
+ set: $util.oneOfSetter($oneOfFields)
676
+ });
677
+ Object.defineProperty(Music.prototype, "_title", {
678
+ get: $util.oneOfGetter($oneOfFields = ["title"]),
679
+ set: $util.oneOfSetter($oneOfFields)
680
+ });
681
+ Object.defineProperty(Music.prototype, "_author", {
682
+ get: $util.oneOfGetter($oneOfFields = ["author"]),
683
+ set: $util.oneOfSetter($oneOfFields)
684
+ });
685
+ Object.defineProperty(Music.prototype, "_artistAttribution", {
686
+ get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
687
+ set: $util.oneOfSetter($oneOfFields)
688
+ });
689
+ Object.defineProperty(Music.prototype, "_isExplicit", {
690
+ get: $util.oneOfGetter($oneOfFields = ["isExplicit"]),
691
+ set: $util.oneOfSetter($oneOfFields)
692
+ });
693
+ Music.create = function create(properties) {
694
+ return new Music(properties);
695
+ };
696
+ Music.encode = function encode(m, w) {
697
+ if (!w)
698
+ w = $Writer.create();
699
+ if (m.authorName != null && Object.hasOwnProperty.call(m, "authorName"))
700
+ w.uint32(10).string(m.authorName);
701
+ if (m.songId != null && Object.hasOwnProperty.call(m, "songId"))
702
+ w.uint32(18).string(m.songId);
703
+ if (m.title != null && Object.hasOwnProperty.call(m, "title"))
704
+ w.uint32(26).string(m.title);
705
+ if (m.author != null && Object.hasOwnProperty.call(m, "author"))
706
+ w.uint32(34).string(m.author);
707
+ if (m.artistAttribution != null && Object.hasOwnProperty.call(m, "artistAttribution"))
708
+ w.uint32(42).string(m.artistAttribution);
709
+ if (m.isExplicit != null && Object.hasOwnProperty.call(m, "isExplicit"))
710
+ w.uint32(48).bool(m.isExplicit);
711
+ return w;
712
+ };
713
+ Music.decode = function decode(r, l, e, n) {
714
+ if (!(r instanceof $Reader))
715
+ r = $Reader.create(r);
716
+ if (n === undefined)
717
+ n = 0;
718
+ if (n > $Reader.recursionLimit)
719
+ throw Error("maximum nesting depth exceeded");
720
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.Music();
721
+ while (r.pos < c) {
722
+ var t = r.uint32();
723
+ if (t === e)
724
+ break;
725
+ switch (t >>> 3) {
726
+ case 1: {
727
+ m.authorName = r.string();
728
+ break;
729
+ }
730
+ case 2: {
731
+ m.songId = r.string();
732
+ break;
733
+ }
734
+ case 3: {
735
+ m.title = r.string();
736
+ break;
737
+ }
738
+ case 4: {
739
+ m.author = r.string();
740
+ break;
741
+ }
742
+ case 5: {
743
+ m.artistAttribution = r.string();
744
+ break;
745
+ }
746
+ case 6: {
747
+ m.isExplicit = r.bool();
748
+ break;
749
+ }
750
+ default:
751
+ r.skipType(t & 7, n);
752
+ break;
753
+ }
754
+ }
755
+ return m;
756
+ };
757
+ Music.fromObject = function fromObject(d, n) {
758
+ if (d instanceof $root.proto.StatusAttribution.Music)
759
+ return d;
760
+ if (n === undefined)
761
+ n = 0;
762
+ if (n > $util.recursionLimit)
763
+ throw Error("maximum nesting depth exceeded");
764
+ var m = new $root.proto.StatusAttribution.Music();
765
+ if (d.authorName != null) {
766
+ m.authorName = String(d.authorName);
767
+ }
768
+ if (d.songId != null) {
769
+ m.songId = String(d.songId);
770
+ }
771
+ if (d.title != null) {
772
+ m.title = String(d.title);
773
+ }
774
+ if (d.author != null) {
775
+ m.author = String(d.author);
776
+ }
777
+ if (d.artistAttribution != null) {
778
+ m.artistAttribution = String(d.artistAttribution);
779
+ }
780
+ if (d.isExplicit != null) {
781
+ m.isExplicit = Boolean(d.isExplicit);
782
+ }
783
+ return m;
784
+ };
785
+ Music.toObject = function toObject(m, o) {
786
+ if (!o)
787
+ o = {};
788
+ var d = {};
789
+ if (m.authorName != null && m.hasOwnProperty("authorName")) {
790
+ d.authorName = m.authorName;
791
+ if (o.oneofs)
792
+ d._authorName = "authorName";
793
+ }
794
+ if (m.songId != null && m.hasOwnProperty("songId")) {
795
+ d.songId = m.songId;
796
+ if (o.oneofs)
797
+ d._songId = "songId";
798
+ }
799
+ if (m.title != null && m.hasOwnProperty("title")) {
800
+ d.title = m.title;
801
+ if (o.oneofs)
802
+ d._title = "title";
803
+ }
804
+ if (m.author != null && m.hasOwnProperty("author")) {
805
+ d.author = m.author;
806
+ if (o.oneofs)
807
+ d._author = "author";
808
+ }
809
+ if (m.artistAttribution != null && m.hasOwnProperty("artistAttribution")) {
810
+ d.artistAttribution = m.artistAttribution;
811
+ if (o.oneofs)
812
+ d._artistAttribution = "artistAttribution";
813
+ }
814
+ if (m.isExplicit != null && m.hasOwnProperty("isExplicit")) {
815
+ d.isExplicit = m.isExplicit;
816
+ if (o.oneofs)
817
+ d._isExplicit = "isExplicit";
818
+ }
819
+ return d;
820
+ };
821
+ Music.prototype.toJSON = function toJSON() {
822
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
823
+ };
824
+ Music.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
825
+ if (typeUrlPrefix === undefined) {
826
+ typeUrlPrefix = "type.googleapis.com";
827
+ }
828
+ return typeUrlPrefix + "/proto.StatusAttribution.Music";
829
+ };
830
+ return Music;
831
+ });
832
+ $lazy(StatusAttribution, "RLAttribution", function() {
833
+ function RLAttribution(p) {
834
+ if (p)
835
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
836
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
837
+ this[ks[i]] = p[ks[i]];
838
+ }
839
+ RLAttribution.prototype.source = null;
840
+ let $oneOfFields;
841
+ Object.defineProperty(RLAttribution.prototype, "_source", {
842
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
843
+ set: $util.oneOfSetter($oneOfFields)
844
+ });
845
+ RLAttribution.create = function create(properties) {
846
+ return new RLAttribution(properties);
847
+ };
848
+ RLAttribution.encode = function encode(m, w) {
849
+ if (!w)
850
+ w = $Writer.create();
851
+ if (m.source != null && Object.hasOwnProperty.call(m, "source"))
852
+ w.uint32(8).int32(m.source);
853
+ return w;
854
+ };
855
+ RLAttribution.decode = function decode(r, l, e, n) {
856
+ if (!(r instanceof $Reader))
857
+ r = $Reader.create(r);
858
+ if (n === undefined)
859
+ n = 0;
860
+ if (n > $Reader.recursionLimit)
861
+ throw Error("maximum nesting depth exceeded");
862
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.RLAttribution();
863
+ while (r.pos < c) {
864
+ var t = r.uint32();
865
+ if (t === e)
866
+ break;
867
+ switch (t >>> 3) {
868
+ case 1: {
869
+ m.source = r.int32();
870
+ break;
871
+ }
872
+ default:
873
+ r.skipType(t & 7, n);
874
+ break;
875
+ }
876
+ }
877
+ return m;
878
+ };
879
+ RLAttribution.fromObject = function fromObject(d, n) {
880
+ if (d instanceof $root.proto.StatusAttribution.RLAttribution)
881
+ return d;
882
+ if (n === undefined)
883
+ n = 0;
884
+ if (n > $util.recursionLimit)
885
+ throw Error("maximum nesting depth exceeded");
886
+ var m = new $root.proto.StatusAttribution.RLAttribution();
887
+ switch (d.source) {
888
+ default:
889
+ if (typeof d.source === "number") {
890
+ m.source = d.source;
891
+ break;
892
+ }
893
+ break;
894
+ case "UNKNOWN":
895
+ case 0:
896
+ m.source = 0;
897
+ break;
898
+ case "RAY_BAN_META_GLASSES":
899
+ case 1:
900
+ m.source = 1;
901
+ break;
902
+ case "OAKLEY_META_GLASSES":
903
+ case 2:
904
+ m.source = 2;
905
+ break;
906
+ case "HYPERNOVA_GLASSES":
907
+ case 3:
908
+ m.source = 3;
909
+ break;
910
+ }
911
+ return m;
912
+ };
913
+ RLAttribution.toObject = function toObject(m, o) {
914
+ if (!o)
915
+ o = {};
916
+ var d = {};
917
+ if (m.source != null && m.hasOwnProperty("source")) {
918
+ d.source = o.enums === String ? $root.proto.StatusAttribution.RLAttribution.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.RLAttribution.Source[m.source] : m.source;
919
+ if (o.oneofs)
920
+ d._source = "source";
921
+ }
922
+ return d;
923
+ };
924
+ RLAttribution.prototype.toJSON = function toJSON() {
925
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
926
+ };
927
+ RLAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
928
+ if (typeUrlPrefix === undefined) {
929
+ typeUrlPrefix = "type.googleapis.com";
930
+ }
931
+ return typeUrlPrefix + "/proto.StatusAttribution.RLAttribution";
932
+ };
933
+ $lazy(RLAttribution, "Source", function() {
934
+ const valuesById = {}, values = Object.create(valuesById);
935
+ values[valuesById[0] = "UNKNOWN"] = 0;
936
+ values[valuesById[1] = "RAY_BAN_META_GLASSES"] = 1;
937
+ values[valuesById[2] = "OAKLEY_META_GLASSES"] = 2;
938
+ values[valuesById[3] = "HYPERNOVA_GLASSES"] = 3;
939
+ return values;
940
+ });
941
+ return RLAttribution;
942
+ });
943
+ $lazy(StatusAttribution, "StatusReshare", function() {
944
+ function StatusReshare(p) {
945
+ if (p)
946
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
947
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
948
+ this[ks[i]] = p[ks[i]];
949
+ }
950
+ StatusReshare.prototype.source = null;
951
+ StatusReshare.prototype.metadata = null;
952
+ let $oneOfFields;
953
+ Object.defineProperty(StatusReshare.prototype, "_source", {
954
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
955
+ set: $util.oneOfSetter($oneOfFields)
956
+ });
957
+ Object.defineProperty(StatusReshare.prototype, "_metadata", {
958
+ get: $util.oneOfGetter($oneOfFields = ["metadata"]),
959
+ set: $util.oneOfSetter($oneOfFields)
960
+ });
961
+ StatusReshare.create = function create(properties) {
962
+ return new StatusReshare(properties);
963
+ };
964
+ StatusReshare.encode = function encode(m, w) {
965
+ if (!w)
966
+ w = $Writer.create();
967
+ if (m.source != null && Object.hasOwnProperty.call(m, "source"))
968
+ w.uint32(8).int32(m.source);
969
+ if (m.metadata != null && Object.hasOwnProperty.call(m, "metadata"))
970
+ $root.proto.StatusAttribution.StatusReshare.Metadata.encode(m.metadata, w.uint32(18).fork()).ldelim();
971
+ return w;
972
+ };
973
+ StatusReshare.decode = function decode(r, l, e, n) {
974
+ if (!(r instanceof $Reader))
975
+ r = $Reader.create(r);
976
+ if (n === undefined)
977
+ n = 0;
978
+ if (n > $Reader.recursionLimit)
979
+ throw Error("maximum nesting depth exceeded");
980
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.StatusReshare();
981
+ while (r.pos < c) {
982
+ var t = r.uint32();
983
+ if (t === e)
984
+ break;
985
+ switch (t >>> 3) {
986
+ case 1: {
987
+ m.source = r.int32();
988
+ break;
989
+ }
990
+ case 2: {
991
+ m.metadata = $root.proto.StatusAttribution.StatusReshare.Metadata.decode(r, r.uint32(), undefined, n + 1);
992
+ break;
993
+ }
994
+ default:
995
+ r.skipType(t & 7, n);
996
+ break;
997
+ }
998
+ }
999
+ return m;
1000
+ };
1001
+ StatusReshare.fromObject = function fromObject(d, n) {
1002
+ if (d instanceof $root.proto.StatusAttribution.StatusReshare)
1003
+ return d;
1004
+ if (n === undefined)
1005
+ n = 0;
1006
+ if (n > $util.recursionLimit)
1007
+ throw Error("maximum nesting depth exceeded");
1008
+ var m = new $root.proto.StatusAttribution.StatusReshare();
1009
+ switch (d.source) {
1010
+ default:
1011
+ if (typeof d.source === "number") {
1012
+ m.source = d.source;
1013
+ break;
1014
+ }
1015
+ break;
1016
+ case "UNKNOWN":
1017
+ case 0:
1018
+ m.source = 0;
1019
+ break;
1020
+ case "INTERNAL_RESHARE":
1021
+ case 1:
1022
+ m.source = 1;
1023
+ break;
1024
+ case "MENTION_RESHARE":
1025
+ case 2:
1026
+ m.source = 2;
1027
+ break;
1028
+ case "CHANNEL_RESHARE":
1029
+ case 3:
1030
+ m.source = 3;
1031
+ break;
1032
+ case "FORWARD":
1033
+ case 4:
1034
+ m.source = 4;
1035
+ break;
1036
+ }
1037
+ if (d.metadata != null) {
1038
+ if (typeof d.metadata !== "object")
1039
+ throw TypeError(".proto.StatusAttribution.StatusReshare.metadata: object expected");
1040
+ m.metadata = $root.proto.StatusAttribution.StatusReshare.Metadata.fromObject(d.metadata, n + 1);
1041
+ }
1042
+ return m;
1043
+ };
1044
+ StatusReshare.toObject = function toObject(m, o) {
1045
+ if (!o)
1046
+ o = {};
1047
+ var d = {};
1048
+ if (m.source != null && m.hasOwnProperty("source")) {
1049
+ d.source = o.enums === String ? $root.proto.StatusAttribution.StatusReshare.Source[m.source] === undefined ? m.source : $root.proto.StatusAttribution.StatusReshare.Source[m.source] : m.source;
1050
+ if (o.oneofs)
1051
+ d._source = "source";
1052
+ }
1053
+ if (m.metadata != null && m.hasOwnProperty("metadata")) {
1054
+ d.metadata = $root.proto.StatusAttribution.StatusReshare.Metadata.toObject(m.metadata, o);
1055
+ if (o.oneofs)
1056
+ d._metadata = "metadata";
1057
+ }
1058
+ return d;
1059
+ };
1060
+ StatusReshare.prototype.toJSON = function toJSON() {
1061
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1062
+ };
1063
+ StatusReshare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1064
+ if (typeUrlPrefix === undefined) {
1065
+ typeUrlPrefix = "type.googleapis.com";
1066
+ }
1067
+ return typeUrlPrefix + "/proto.StatusAttribution.StatusReshare";
1068
+ };
1069
+ $lazy(StatusReshare, "Metadata", function() {
1070
+ function Metadata(p) {
1071
+ if (p)
1072
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1073
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1074
+ this[ks[i]] = p[ks[i]];
1075
+ }
1076
+ Metadata.prototype.duration = null;
1077
+ Metadata.prototype.channelJid = null;
1078
+ Metadata.prototype.channelMessageId = null;
1079
+ Metadata.prototype.hasMultipleReshares = null;
1080
+ let $oneOfFields;
1081
+ Object.defineProperty(Metadata.prototype, "_duration", {
1082
+ get: $util.oneOfGetter($oneOfFields = ["duration"]),
1083
+ set: $util.oneOfSetter($oneOfFields)
1084
+ });
1085
+ Object.defineProperty(Metadata.prototype, "_channelJid", {
1086
+ get: $util.oneOfGetter($oneOfFields = ["channelJid"]),
1087
+ set: $util.oneOfSetter($oneOfFields)
1088
+ });
1089
+ Object.defineProperty(Metadata.prototype, "_channelMessageId", {
1090
+ get: $util.oneOfGetter($oneOfFields = ["channelMessageId"]),
1091
+ set: $util.oneOfSetter($oneOfFields)
1092
+ });
1093
+ Object.defineProperty(Metadata.prototype, "_hasMultipleReshares", {
1094
+ get: $util.oneOfGetter($oneOfFields = ["hasMultipleReshares"]),
1095
+ set: $util.oneOfSetter($oneOfFields)
1096
+ });
1097
+ Metadata.create = function create(properties) {
1098
+ return new Metadata(properties);
1099
+ };
1100
+ Metadata.encode = function encode(m, w) {
1101
+ if (!w)
1102
+ w = $Writer.create();
1103
+ if (m.duration != null && Object.hasOwnProperty.call(m, "duration"))
1104
+ w.uint32(8).int32(m.duration);
1105
+ if (m.channelJid != null && Object.hasOwnProperty.call(m, "channelJid"))
1106
+ w.uint32(18).string(m.channelJid);
1107
+ if (m.channelMessageId != null && Object.hasOwnProperty.call(m, "channelMessageId"))
1108
+ w.uint32(24).int32(m.channelMessageId);
1109
+ if (m.hasMultipleReshares != null && Object.hasOwnProperty.call(m, "hasMultipleReshares"))
1110
+ w.uint32(32).bool(m.hasMultipleReshares);
1111
+ return w;
1112
+ };
1113
+ Metadata.decode = function decode(r, l, e, n) {
1114
+ if (!(r instanceof $Reader))
1115
+ r = $Reader.create(r);
1116
+ if (n === undefined)
1117
+ n = 0;
1118
+ if (n > $Reader.recursionLimit)
1119
+ throw Error("maximum nesting depth exceeded");
1120
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusAttribution.StatusReshare.Metadata();
1121
+ while (r.pos < c) {
1122
+ var t = r.uint32();
1123
+ if (t === e)
1124
+ break;
1125
+ switch (t >>> 3) {
1126
+ case 1: {
1127
+ m.duration = r.int32();
1128
+ break;
1129
+ }
1130
+ case 2: {
1131
+ m.channelJid = r.string();
1132
+ break;
1133
+ }
1134
+ case 3: {
1135
+ m.channelMessageId = r.int32();
1136
+ break;
1137
+ }
1138
+ case 4: {
1139
+ m.hasMultipleReshares = r.bool();
1140
+ break;
1141
+ }
1142
+ default:
1143
+ r.skipType(t & 7, n);
1144
+ break;
1145
+ }
1146
+ }
1147
+ return m;
1148
+ };
1149
+ Metadata.fromObject = function fromObject(d, n) {
1150
+ if (d instanceof $root.proto.StatusAttribution.StatusReshare.Metadata)
1151
+ return d;
1152
+ if (n === undefined)
1153
+ n = 0;
1154
+ if (n > $util.recursionLimit)
1155
+ throw Error("maximum nesting depth exceeded");
1156
+ var m = new $root.proto.StatusAttribution.StatusReshare.Metadata();
1157
+ if (d.duration != null) {
1158
+ m.duration = d.duration | 0;
1159
+ }
1160
+ if (d.channelJid != null) {
1161
+ m.channelJid = String(d.channelJid);
1162
+ }
1163
+ if (d.channelMessageId != null) {
1164
+ m.channelMessageId = d.channelMessageId | 0;
1165
+ }
1166
+ if (d.hasMultipleReshares != null) {
1167
+ m.hasMultipleReshares = Boolean(d.hasMultipleReshares);
1168
+ }
1169
+ return m;
1170
+ };
1171
+ Metadata.toObject = function toObject(m, o) {
1172
+ if (!o)
1173
+ o = {};
1174
+ var d = {};
1175
+ if (m.duration != null && m.hasOwnProperty("duration")) {
1176
+ d.duration = m.duration;
1177
+ if (o.oneofs)
1178
+ d._duration = "duration";
1179
+ }
1180
+ if (m.channelJid != null && m.hasOwnProperty("channelJid")) {
1181
+ d.channelJid = m.channelJid;
1182
+ if (o.oneofs)
1183
+ d._channelJid = "channelJid";
1184
+ }
1185
+ if (m.channelMessageId != null && m.hasOwnProperty("channelMessageId")) {
1186
+ d.channelMessageId = m.channelMessageId;
1187
+ if (o.oneofs)
1188
+ d._channelMessageId = "channelMessageId";
1189
+ }
1190
+ if (m.hasMultipleReshares != null && m.hasOwnProperty("hasMultipleReshares")) {
1191
+ d.hasMultipleReshares = m.hasMultipleReshares;
1192
+ if (o.oneofs)
1193
+ d._hasMultipleReshares = "hasMultipleReshares";
1194
+ }
1195
+ return d;
1196
+ };
1197
+ Metadata.prototype.toJSON = function toJSON() {
1198
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1199
+ };
1200
+ Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1201
+ if (typeUrlPrefix === undefined) {
1202
+ typeUrlPrefix = "type.googleapis.com";
1203
+ }
1204
+ return typeUrlPrefix + "/proto.StatusAttribution.StatusReshare.Metadata";
1205
+ };
1206
+ return Metadata;
1207
+ });
1208
+ $lazy(StatusReshare, "Source", function() {
1209
+ const valuesById = {}, values = Object.create(valuesById);
1210
+ values[valuesById[0] = "UNKNOWN"] = 0;
1211
+ values[valuesById[1] = "INTERNAL_RESHARE"] = 1;
1212
+ values[valuesById[2] = "MENTION_RESHARE"] = 2;
1213
+ values[valuesById[3] = "CHANNEL_RESHARE"] = 3;
1214
+ values[valuesById[4] = "FORWARD"] = 4;
1215
+ return values;
1216
+ });
1217
+ return StatusReshare;
1218
+ });
1219
+ $lazy(StatusAttribution, "Type", function() {
1220
+ const valuesById = {}, values = Object.create(valuesById);
1221
+ values[valuesById[0] = "UNKNOWN"] = 0;
1222
+ values[valuesById[1] = "RESHARE"] = 1;
1223
+ values[valuesById[2] = "EXTERNAL_SHARE"] = 2;
1224
+ values[valuesById[3] = "MUSIC"] = 3;
1225
+ values[valuesById[4] = "STATUS_MENTION"] = 4;
1226
+ values[valuesById[5] = "GROUP_STATUS"] = 5;
1227
+ values[valuesById[6] = "RL_ATTRIBUTION"] = 6;
1228
+ values[valuesById[7] = "AI_CREATED"] = 7;
1229
+ values[valuesById[8] = "LAYOUTS"] = 8;
1230
+ values[valuesById[9] = "NEWSLETTER_STATUS"] = 9;
1231
+ values[valuesById[10] = "STATUS_CLOSE_SHARING"] = 10;
1232
+ values[valuesById[11] = "PAID_PARTNERSHIP"] = 11;
1233
+ return values;
1234
+ });
1235
+ return StatusAttribution;