@sgintokic/baileys 0.0.2

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.

Potentially problematic release.


This version of @sgintokic/baileys might be problematic. Click here for more details.

Files changed (106) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +1097 -0
  3. package/WAProto/index.js +2 -0
  4. package/engine-requirements.js +1 -0
  5. package/lib/Defaults/index.js +155 -0
  6. package/lib/Signal/Group/ciphertext-message.js +11 -0
  7. package/lib/Signal/Group/group-session-builder.js +41 -0
  8. package/lib/Signal/Group/group_cipher.js +108 -0
  9. package/lib/Signal/Group/index.js +11 -0
  10. package/lib/Signal/Group/keyhelper.js +14 -0
  11. package/lib/Signal/Group/sender-chain-key.js +31 -0
  12. package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
  13. package/lib/Signal/Group/sender-key-message.js +79 -0
  14. package/lib/Signal/Group/sender-key-name.js +49 -0
  15. package/lib/Signal/Group/sender-key-record.js +46 -0
  16. package/lib/Signal/Group/sender-key-state.js +104 -0
  17. package/lib/Signal/Group/sender-message-key.js +29 -0
  18. package/lib/Signal/libsignal.js +485 -0
  19. package/lib/Signal/lid-mapping.js +291 -0
  20. package/lib/Socket/Client/index.js +2 -0
  21. package/lib/Socket/Client/types.js +10 -0
  22. package/lib/Socket/Client/websocket.js +64 -0
  23. package/lib/Socket/business.js +293 -0
  24. package/lib/Socket/chats.js +1068 -0
  25. package/lib/Socket/communities.js +476 -0
  26. package/lib/Socket/groups.js +383 -0
  27. package/lib/Socket/index.js +8 -0
  28. package/lib/Socket/messages-recv.js +1830 -0
  29. package/lib/Socket/messages-send.js +1462 -0
  30. package/lib/Socket/mex.js +55 -0
  31. package/lib/Socket/newsletter.js +277 -0
  32. package/lib/Socket/socket.js +1087 -0
  33. package/lib/Store/index.js +3 -0
  34. package/lib/Store/make-in-memory-store.js +517 -0
  35. package/lib/Store/make-ordered-dictionary.js +75 -0
  36. package/lib/Store/object-repository.js +23 -0
  37. package/lib/Types/Auth.js +1 -0
  38. package/lib/Types/Bussines.js +1 -0
  39. package/lib/Types/Call.js +1 -0
  40. package/lib/Types/Chat.js +7 -0
  41. package/lib/Types/Contact.js +1 -0
  42. package/lib/Types/Events.js +1 -0
  43. package/lib/Types/GroupMetadata.js +1 -0
  44. package/lib/Types/Label.js +24 -0
  45. package/lib/Types/LabelAssociation.js +6 -0
  46. package/lib/Types/Message.js +18 -0
  47. package/lib/Types/Newsletter.js +33 -0
  48. package/lib/Types/Product.js +1 -0
  49. package/lib/Types/Signal.js +1 -0
  50. package/lib/Types/Socket.js +2 -0
  51. package/lib/Types/State.js +15 -0
  52. package/lib/Types/USync.js +1 -0
  53. package/lib/Types/index.js +31 -0
  54. package/lib/Utils/auth-utils.js +293 -0
  55. package/lib/Utils/browser-utils.js +32 -0
  56. package/lib/Utils/business.js +245 -0
  57. package/lib/Utils/chat-utils.js +959 -0
  58. package/lib/Utils/crypto.js +133 -0
  59. package/lib/Utils/decode-wa-message.js +376 -0
  60. package/lib/Utils/event-buffer.js +620 -0
  61. package/lib/Utils/generics.js +417 -0
  62. package/lib/Utils/history.js +150 -0
  63. package/lib/Utils/identity-change-handler.js +63 -0
  64. package/lib/Utils/index.js +21 -0
  65. package/lib/Utils/link-preview.js +91 -0
  66. package/lib/Utils/logger.js +2 -0
  67. package/lib/Utils/lt-hash.js +6 -0
  68. package/lib/Utils/make-mutex.js +31 -0
  69. package/lib/Utils/message-retry-manager.js +240 -0
  70. package/lib/Utils/messages-media.js +901 -0
  71. package/lib/Utils/messages.js +2052 -0
  72. package/lib/Utils/noise-handler.js +229 -0
  73. package/lib/Utils/offline-node-processor.js +50 -0
  74. package/lib/Utils/pre-key-manager.js +119 -0
  75. package/lib/Utils/process-message.js +641 -0
  76. package/lib/Utils/reporting-utils.js +346 -0
  77. package/lib/Utils/signal.js +188 -0
  78. package/lib/Utils/stanza-ack.js +33 -0
  79. package/lib/Utils/sync-action-utils.js +53 -0
  80. package/lib/Utils/tc-token-utils.js +15 -0
  81. package/lib/Utils/use-multi-file-auth-state.js +116 -0
  82. package/lib/Utils/use-single-file-auth-state.js +94 -0
  83. package/lib/Utils/validate-connection.js +235 -0
  84. package/lib/WABinary/constants.js +1300 -0
  85. package/lib/WABinary/decode.js +258 -0
  86. package/lib/WABinary/encode.js +219 -0
  87. package/lib/WABinary/generic-utils.js +203 -0
  88. package/lib/WABinary/index.js +5 -0
  89. package/lib/WABinary/jid-utils.js +93 -0
  90. package/lib/WABinary/types.js +1 -0
  91. package/lib/WAM/BinaryInfo.js +9 -0
  92. package/lib/WAM/constants.js +20669 -0
  93. package/lib/WAM/encode.js +151 -0
  94. package/lib/WAM/index.js +3 -0
  95. package/lib/WAUSync/Protocols/USyncContactProtocol.js +21 -0
  96. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +50 -0
  97. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +20 -0
  98. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +29 -0
  99. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +59 -0
  100. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +21 -0
  101. package/lib/WAUSync/Protocols/index.js +4 -0
  102. package/lib/WAUSync/USyncQuery.js +103 -0
  103. package/lib/WAUSync/USyncUser.js +22 -0
  104. package/lib/WAUSync/index.js +3 -0
  105. package/lib/index.js +11 -0
  106. package/package.json +58 -0
@@ -0,0 +1,1300 @@
1
+ export const TAGS = {
2
+ LIST_EMPTY: 0,
3
+ DICTIONARY_0: 236,
4
+ DICTIONARY_1: 237,
5
+ DICTIONARY_2: 238,
6
+ DICTIONARY_3: 239,
7
+ INTEROP_JID: 245,
8
+ FB_JID: 246,
9
+ AD_JID: 247,
10
+ LIST_8: 248,
11
+ LIST_16: 249,
12
+ JID_PAIR: 250,
13
+ HEX_8: 251,
14
+ BINARY_8: 252,
15
+ BINARY_20: 253,
16
+ BINARY_32: 254,
17
+ NIBBLE_8: 255,
18
+ PACKED_MAX: 127,
19
+ };
20
+ export const DOUBLE_BYTE_TOKENS = [
21
+ [
22
+ "read-self",
23
+ "active",
24
+ "fbns",
25
+ "protocol",
26
+ "reaction",
27
+ "screen_width",
28
+ "heartbeat",
29
+ "deviceid",
30
+ "2:47DEQpj8",
31
+ "uploadfieldstat",
32
+ "voip_settings",
33
+ "retry",
34
+ "priority",
35
+ "longitude",
36
+ "conflict",
37
+ "false",
38
+ "ig_professional",
39
+ "replaced",
40
+ "preaccept",
41
+ "cover_photo",
42
+ "uncompressed",
43
+ "encopt",
44
+ "ppic",
45
+ "04",
46
+ "passive",
47
+ "status-revoke-drop",
48
+ "keygen",
49
+ "540",
50
+ "offer",
51
+ "rate",
52
+ "opus",
53
+ "latitude",
54
+ "w:gp2",
55
+ "ver",
56
+ "4",
57
+ "business_profile",
58
+ "medium",
59
+ "sender",
60
+ "prev_v_id",
61
+ "email",
62
+ "website",
63
+ "invited",
64
+ "sign_credential",
65
+ "05",
66
+ "transport",
67
+ "skey",
68
+ "reason",
69
+ "peer_abtest_bucket",
70
+ "America/Sao_Paulo",
71
+ "appid",
72
+ "refresh",
73
+ "100",
74
+ "06",
75
+ "404",
76
+ "101",
77
+ "104",
78
+ "107",
79
+ "102",
80
+ "109",
81
+ "103",
82
+ "member_add_mode",
83
+ "105",
84
+ "transaction-id",
85
+ "110",
86
+ "106",
87
+ "outgoing",
88
+ "108",
89
+ "111",
90
+ "tokens",
91
+ "followers",
92
+ "ig_handle",
93
+ "self_pid",
94
+ "tue",
95
+ "dec",
96
+ "thu",
97
+ "joinable",
98
+ "peer_pid",
99
+ "mon",
100
+ "features",
101
+ "wed",
102
+ "peer_device_presence",
103
+ "pn",
104
+ "delete",
105
+ "07",
106
+ "fri",
107
+ "audio_duration",
108
+ "admin",
109
+ "connected",
110
+ "delta",
111
+ "rcat",
112
+ "disable",
113
+ "collection",
114
+ "08",
115
+ "480",
116
+ "sat",
117
+ "phash",
118
+ "all",
119
+ "invite",
120
+ "accept",
121
+ "critical_unblock_low",
122
+ "group_update",
123
+ "signed_credential",
124
+ "blinded_credential",
125
+ "eph_setting",
126
+ "net",
127
+ "09",
128
+ "background_location",
129
+ "refresh_id",
130
+ "Asia/Kolkata",
131
+ "privacy_mode_ts",
132
+ "account_sync",
133
+ "voip_payload_type",
134
+ "service_areas",
135
+ "acs_public_key",
136
+ "v_id",
137
+ "0a",
138
+ "fallback_class",
139
+ "relay",
140
+ "actual_actors",
141
+ "metadata",
142
+ "w:biz",
143
+ "5",
144
+ "connected-limit",
145
+ "notice",
146
+ "0b",
147
+ "host_storage",
148
+ "fb_page",
149
+ "subject",
150
+ "privatestats",
151
+ "invis",
152
+ "groupadd",
153
+ "010",
154
+ "note.m4r",
155
+ "uuid",
156
+ "0c",
157
+ "8000",
158
+ "sun",
159
+ "372",
160
+ "1020",
161
+ "stage",
162
+ "1200",
163
+ "720",
164
+ "canonical",
165
+ "fb",
166
+ "011",
167
+ "video_duration",
168
+ "0d",
169
+ "1140",
170
+ "superadmin",
171
+ "012",
172
+ "Opening.m4r",
173
+ "keystore_attestation",
174
+ "dleq_proof",
175
+ "013",
176
+ "timestamp",
177
+ "ab_key",
178
+ "w:sync:app:state",
179
+ "0e",
180
+ "vertical",
181
+ "600",
182
+ "p_v_id",
183
+ "6",
184
+ "likes",
185
+ "014",
186
+ "500",
187
+ "1260",
188
+ "creator",
189
+ "0f",
190
+ "rte",
191
+ "destination",
192
+ "group",
193
+ "group_info",
194
+ "syncd_anti_tampering_fatal_exception_enabled",
195
+ "015",
196
+ "dl_bw",
197
+ "Asia/Jakarta",
198
+ "vp8/h.264",
199
+ "online",
200
+ "1320",
201
+ "fb:multiway",
202
+ "10",
203
+ "timeout",
204
+ "016",
205
+ "nse_retry",
206
+ "urn:xmpp:whatsapp:dirty",
207
+ "017",
208
+ "a_v_id",
209
+ "web_shops_chat_header_button_enabled",
210
+ "nse_call",
211
+ "inactive-upgrade",
212
+ "none",
213
+ "web",
214
+ "groups",
215
+ "2250",
216
+ "mms_hot_content_timespan_in_seconds",
217
+ "contact_blacklist",
218
+ "nse_read",
219
+ "suspended_group_deletion_notification",
220
+ "binary_version",
221
+ "018",
222
+ "https://www.whatsapp.com/otp/copy/",
223
+ "reg_push",
224
+ "shops_hide_catalog_attachment_entrypoint",
225
+ "server_sync",
226
+ ".",
227
+ "ephemeral_messages_allowed_values",
228
+ "019",
229
+ "mms_vcache_aggregation_enabled",
230
+ "iphone",
231
+ "America/Argentina/Buenos_Aires",
232
+ "01a",
233
+ "mms_vcard_autodownload_size_kb",
234
+ "nse_ver",
235
+ "shops_header_dropdown_menu_item",
236
+ "dhash",
237
+ "catalog_status",
238
+ "communities_mvp_new_iqs_serverprop",
239
+ "blocklist",
240
+ "default",
241
+ "11",
242
+ "ephemeral_messages_enabled",
243
+ "01b",
244
+ "original_dimensions",
245
+ "8",
246
+ "mms4_media_retry_notification_encryption_enabled",
247
+ "mms4_server_error_receipt_encryption_enabled",
248
+ "original_image_url",
249
+ "sync",
250
+ "multiway",
251
+ "420",
252
+ "companion_enc_static",
253
+ "shops_profile_drawer_entrypoint",
254
+ "01c",
255
+ "vcard_as_document_size_kb",
256
+ "status_video_max_duration",
257
+ "request_image_url",
258
+ "01d",
259
+ "regular_high",
260
+ "s_t",
261
+ "abt",
262
+ "share_ext_min_preliminary_image_quality",
263
+ "01e",
264
+ "32",
265
+ "syncd_key_rotation_enabled",
266
+ "data_namespace",
267
+ "md_downgrade_read_receipts2",
268
+ "patch",
269
+ "polltype",
270
+ "ephemeral_messages_setting",
271
+ "userrate",
272
+ "15",
273
+ "partial_pjpeg_bw_threshold",
274
+ "played-self",
275
+ "catalog_exists",
276
+ "01f",
277
+ "mute_v2",
278
+ ],
279
+ [
280
+ "reject",
281
+ "dirty",
282
+ "announcement",
283
+ "020",
284
+ "13",
285
+ "9",
286
+ "status_video_max_bitrate",
287
+ "fb:thrift_iq",
288
+ "offline_batch",
289
+ "022",
290
+ "full",
291
+ "ctwa_first_business_reply_logging",
292
+ "h.264",
293
+ "smax_id",
294
+ "group_description_length",
295
+ "https://www.whatsapp.com/otp/code",
296
+ "status_image_max_edge",
297
+ "smb_upsell_business_profile_enabled",
298
+ "021",
299
+ "web_upgrade_to_md_modal",
300
+ "14",
301
+ "023",
302
+ "s_o",
303
+ "smaller_video_thumbs_status_enabled",
304
+ "media_max_autodownload",
305
+ "960",
306
+ "blocking_status",
307
+ "peer_msg",
308
+ "joinable_group_call_client_version",
309
+ "group_call_video_maximization_enabled",
310
+ "return_snapshot",
311
+ "high",
312
+ "America/Mexico_City",
313
+ "entry_point_block_logging_enabled",
314
+ "pop",
315
+ "024",
316
+ "1050",
317
+ "16",
318
+ "1380",
319
+ "one_tap_calling_in_group_chat_size",
320
+ "regular_low",
321
+ "inline_joinable_education_enabled",
322
+ "hq_image_max_edge",
323
+ "locked",
324
+ "America/Bogota",
325
+ "smb_biztools_deeplink_enabled",
326
+ "status_image_quality",
327
+ "1088",
328
+ "025",
329
+ "payments_upi_intent_transaction_limit",
330
+ "voip",
331
+ "w:g2",
332
+ "027",
333
+ "md_pin_chat_enabled",
334
+ "026",
335
+ "multi_scan_pjpeg_download_enabled",
336
+ "shops_product_grid",
337
+ "transaction_id",
338
+ "ctwa_context_enabled",
339
+ "20",
340
+ "fna",
341
+ "hq_image_quality",
342
+ "alt_jpeg_doc_detection_quality",
343
+ "group_call_max_participants",
344
+ "pkey",
345
+ "America/Belem",
346
+ "image_max_kbytes",
347
+ "web_cart_v1_1_order_message_changes_enabled",
348
+ "ctwa_context_enterprise_enabled",
349
+ "urn:xmpp:whatsapp:account",
350
+ "840",
351
+ "Asia/Kuala_Lumpur",
352
+ "max_participants",
353
+ "video_remux_after_repair_enabled",
354
+ "stella_addressbook_restriction_type",
355
+ "660",
356
+ "900",
357
+ "780",
358
+ "context_menu_ios13_enabled",
359
+ "mute-state",
360
+ "ref",
361
+ "payments_request_messages",
362
+ "029",
363
+ "frskmsg",
364
+ "vcard_max_size_kb",
365
+ "sample_buffer_gif_player_enabled",
366
+ "match_last_seen",
367
+ "510",
368
+ "4983",
369
+ "video_max_bitrate",
370
+ "028",
371
+ "w:comms:chat",
372
+ "17",
373
+ "frequently_forwarded_max",
374
+ "groups_privacy_blacklist",
375
+ "Asia/Karachi",
376
+ "02a",
377
+ "web_download_document_thumb_mms_enabled",
378
+ "02b",
379
+ "hist_sync",
380
+ "biz_block_reasons_version",
381
+ "1024",
382
+ "18",
383
+ "web_is_direct_connection_for_plm_transparent",
384
+ "view_once_write",
385
+ "file_max_size",
386
+ "paid_convo_id",
387
+ "online_privacy_setting",
388
+ "video_max_edge",
389
+ "view_once_read",
390
+ "enhanced_storage_management",
391
+ "multi_scan_pjpeg_encoding_enabled",
392
+ "ctwa_context_forward_enabled",
393
+ "video_transcode_downgrade_enable",
394
+ "template_doc_mime_types",
395
+ "hq_image_bw_threshold",
396
+ "30",
397
+ "body",
398
+ "u_aud_limit_sil_restarts_ctrl",
399
+ "other",
400
+ "participating",
401
+ "w:biz:directory",
402
+ "1110",
403
+ "vp8",
404
+ "4018",
405
+ "meta",
406
+ "doc_detection_image_max_edge",
407
+ "image_quality",
408
+ "1170",
409
+ "02c",
410
+ "smb_upsell_chat_banner_enabled",
411
+ "key_expiry_time_second",
412
+ "pid",
413
+ "stella_interop_enabled",
414
+ "19",
415
+ "linked_device_max_count",
416
+ "md_device_sync_enabled",
417
+ "02d",
418
+ "02e",
419
+ "360",
420
+ "enhanced_block_enabled",
421
+ "ephemeral_icon_in_forwarding",
422
+ "paid_convo_status",
423
+ "gif_provider",
424
+ "project_name",
425
+ "server-error",
426
+ "canonical_url_validation_enabled",
427
+ "wallpapers_v2",
428
+ "syncd_clear_chat_delete_chat_enabled",
429
+ "medianotify",
430
+ "02f",
431
+ "shops_required_tos_version",
432
+ "vote",
433
+ "reset_skey_on_id_change",
434
+ "030",
435
+ "image_max_edge",
436
+ "multicast_limit_global",
437
+ "ul_bw",
438
+ "21",
439
+ "25",
440
+ "5000",
441
+ "poll",
442
+ "570",
443
+ "22",
444
+ "031",
445
+ "1280",
446
+ "WhatsApp",
447
+ "032",
448
+ "bloks_shops_enabled",
449
+ "50",
450
+ "upload_host_switching_enabled",
451
+ "web_ctwa_context_compose_enabled",
452
+ "ptt_forwarded_features_enabled",
453
+ "unblocked",
454
+ "partial_pjpeg_enabled",
455
+ "fbid:devices",
456
+ "height",
457
+ "ephemeral_group_query_ts",
458
+ "group_join_permissions",
459
+ "order",
460
+ "033",
461
+ "alt_jpeg_status_quality",
462
+ "migrate",
463
+ "popular-bank",
464
+ "win_uwp_deprecation_killswitch_enabled",
465
+ "web_download_status_thumb_mms_enabled",
466
+ "blocking",
467
+ "url_text",
468
+ "035",
469
+ "web_forwarding_limit_to_groups",
470
+ "1600",
471
+ "val",
472
+ "1000",
473
+ "syncd_msg_date_enabled",
474
+ "bank-ref-id",
475
+ "max_subject",
476
+ "payments_web_enabled",
477
+ "web_upload_document_thumb_mms_enabled",
478
+ "size",
479
+ "request",
480
+ "ephemeral",
481
+ "24",
482
+ "receipt_agg",
483
+ "ptt_remember_play_position",
484
+ "sampling_weight",
485
+ "enc_rekey",
486
+ "mute_always",
487
+ "037",
488
+ "034",
489
+ "23",
490
+ "036",
491
+ "action",
492
+ "click_to_chat_qr_enabled",
493
+ "width",
494
+ "disabled",
495
+ "038",
496
+ "md_blocklist_v2",
497
+ "played_self_enabled",
498
+ "web_buttons_message_enabled",
499
+ "flow_id",
500
+ "clear",
501
+ "450",
502
+ "fbid:thread",
503
+ "bloks_session_state",
504
+ "America/Lima",
505
+ "attachment_picker_refresh",
506
+ "download_host_switching_enabled",
507
+ "1792",
508
+ "u_aud_limit_sil_restarts_test2",
509
+ "custom_urls",
510
+ "device_fanout",
511
+ "optimistic_upload",
512
+ "2000",
513
+ "key_cipher_suite",
514
+ "web_smb_upsell_in_biz_profile_enabled",
515
+ "e",
516
+ "039",
517
+ "siri_post_status_shortcut",
518
+ "pair-device",
519
+ "lg",
520
+ "lc",
521
+ "stream_attribution_url",
522
+ "model",
523
+ "mspjpeg_phash_gen",
524
+ "catalog_send_all",
525
+ "new_multi_vcards_ui",
526
+ "share_biz_vcard_enabled",
527
+ "-",
528
+ "clean",
529
+ "200",
530
+ "md_blocklist_v2_server",
531
+ "03b",
532
+ "03a",
533
+ "web_md_migration_experience",
534
+ "ptt_conversation_waveform",
535
+ "u_aud_limit_sil_restarts_test1",
536
+ ],
537
+ [
538
+ "64",
539
+ "ptt_playback_speed_enabled",
540
+ "web_product_list_message_enabled",
541
+ "paid_convo_ts",
542
+ "27",
543
+ "manufacturer",
544
+ "psp-routing",
545
+ "grp_uii_cleanup",
546
+ "ptt_draft_enabled",
547
+ "03c",
548
+ "business_initiated",
549
+ "web_catalog_products_onoff",
550
+ "web_upload_link_thumb_mms_enabled",
551
+ "03e",
552
+ "mediaretry",
553
+ "35",
554
+ "hfm_string_changes",
555
+ "28",
556
+ "America/Fortaleza",
557
+ "max_keys",
558
+ "md_mhfs_days",
559
+ "streaming_upload_chunk_size",
560
+ "5541",
561
+ "040",
562
+ "03d",
563
+ "2675",
564
+ "03f",
565
+ "...",
566
+ "512",
567
+ "mute",
568
+ "48",
569
+ "041",
570
+ "alt_jpeg_quality",
571
+ "60",
572
+ "042",
573
+ "md_smb_quick_reply",
574
+ "5183",
575
+ "c",
576
+ "1343",
577
+ "40",
578
+ "1230",
579
+ "043",
580
+ "044",
581
+ "mms_cat_v1_forward_hot_override_enabled",
582
+ "user_notice",
583
+ "ptt_waveform_send",
584
+ "047",
585
+ "Asia/Calcutta",
586
+ "250",
587
+ "md_privacy_v2",
588
+ "31",
589
+ "29",
590
+ "128",
591
+ "md_messaging_enabled",
592
+ "046",
593
+ "crypto",
594
+ "690",
595
+ "045",
596
+ "enc_iv",
597
+ "75",
598
+ "failure",
599
+ "ptt_oot_playback",
600
+ "AIzaSyDR5yfaG7OG8sMTUj8kfQEb8T9pN8BM6Lk",
601
+ "w",
602
+ "048",
603
+ "2201",
604
+ "web_large_files_ui",
605
+ "Asia/Makassar",
606
+ "812",
607
+ "status_collapse_muted",
608
+ "1334",
609
+ "257",
610
+ "2HP4dm",
611
+ "049",
612
+ "patches",
613
+ "1290",
614
+ "43cY6T",
615
+ "America/Caracas",
616
+ "web_sticker_maker",
617
+ "campaign",
618
+ "ptt_pausable_enabled",
619
+ "33",
620
+ "42",
621
+ "attestation",
622
+ "biz",
623
+ "04b",
624
+ "query_linked",
625
+ "s",
626
+ "125",
627
+ "04a",
628
+ "810",
629
+ "availability",
630
+ "1411",
631
+ "responsiveness_v2_m1",
632
+ "catalog_not_created",
633
+ "34",
634
+ "America/Santiago",
635
+ "1465",
636
+ "enc_p",
637
+ "04d",
638
+ "status_info",
639
+ "04f",
640
+ "key_version",
641
+ "..",
642
+ "04c",
643
+ "04e",
644
+ "md_group_notification",
645
+ "1598",
646
+ "1215",
647
+ "web_cart_enabled",
648
+ "37",
649
+ "630",
650
+ "1920",
651
+ "2394",
652
+ "-1",
653
+ "vcard",
654
+ "38",
655
+ "elapsed",
656
+ "36",
657
+ "828",
658
+ "peer",
659
+ "pricing_category",
660
+ "1245",
661
+ "invalid",
662
+ "stella_ios_enabled",
663
+ "2687",
664
+ "45",
665
+ "1528",
666
+ "39",
667
+ "u_is_redial_audio_1104_ctrl",
668
+ "1025",
669
+ "1455",
670
+ "58",
671
+ "2524",
672
+ "2603",
673
+ "054",
674
+ "bsp_system_message_enabled",
675
+ "web_pip_redesign",
676
+ "051",
677
+ "verify_apps",
678
+ "1974",
679
+ "1272",
680
+ "1322",
681
+ "1755",
682
+ "052",
683
+ "70",
684
+ "050",
685
+ "1063",
686
+ "1135",
687
+ "1361",
688
+ "80",
689
+ "1096",
690
+ "1828",
691
+ "1851",
692
+ "1251",
693
+ "1921",
694
+ "key_config_id",
695
+ "1254",
696
+ "1566",
697
+ "1252",
698
+ "2525",
699
+ "critical_block",
700
+ "1669",
701
+ "max_available",
702
+ "w:auth:backup:token",
703
+ "product",
704
+ "2530",
705
+ "870",
706
+ "1022",
707
+ "participant_uuid",
708
+ "web_cart_on_off",
709
+ "1255",
710
+ "1432",
711
+ "1867",
712
+ "41",
713
+ "1415",
714
+ "1440",
715
+ "240",
716
+ "1204",
717
+ "1608",
718
+ "1690",
719
+ "1846",
720
+ "1483",
721
+ "1687",
722
+ "1749",
723
+ "69",
724
+ "url_number",
725
+ "053",
726
+ "1325",
727
+ "1040",
728
+ "365",
729
+ "59",
730
+ "Asia/Riyadh",
731
+ "1177",
732
+ "test_recommended",
733
+ "057",
734
+ "1612",
735
+ "43",
736
+ "1061",
737
+ "1518",
738
+ "1635",
739
+ "055",
740
+ "1034",
741
+ "1375",
742
+ "750",
743
+ "1430",
744
+ "event_code",
745
+ "1682",
746
+ "503",
747
+ "55",
748
+ "865",
749
+ "78",
750
+ "1309",
751
+ "1365",
752
+ "44",
753
+ "America/Guayaquil",
754
+ "535",
755
+ "LIMITED",
756
+ "1377",
757
+ "1613",
758
+ "1420",
759
+ "1599",
760
+ "1822",
761
+ "05a",
762
+ "1681",
763
+ "password",
764
+ "1111",
765
+ "1214",
766
+ "1376",
767
+ "1478",
768
+ "47",
769
+ "1082",
770
+ "4282",
771
+ "Europe/Istanbul",
772
+ "1307",
773
+ "46",
774
+ "058",
775
+ "1124",
776
+ "256",
777
+ "rate-overlimit",
778
+ "retail",
779
+ "u_a_socket_err_fix_succ_test",
780
+ "1292",
781
+ "1370",
782
+ "1388",
783
+ "520",
784
+ "861",
785
+ "psa",
786
+ "regular",
787
+ "1181",
788
+ "1766",
789
+ "05b",
790
+ "1183",
791
+ "1213",
792
+ "1304",
793
+ "1537",
794
+ ],
795
+ [
796
+ "1724",
797
+ "profile_picture",
798
+ "1071",
799
+ "1314",
800
+ "1605",
801
+ "407",
802
+ "990",
803
+ "1710",
804
+ "746",
805
+ "pricing_model",
806
+ "056",
807
+ "059",
808
+ "061",
809
+ "1119",
810
+ "6027",
811
+ "65",
812
+ "877",
813
+ "1607",
814
+ "05d",
815
+ "917",
816
+ "seen",
817
+ "1516",
818
+ "49",
819
+ "470",
820
+ "973",
821
+ "1037",
822
+ "1350",
823
+ "1394",
824
+ "1480",
825
+ "1796",
826
+ "keys",
827
+ "794",
828
+ "1536",
829
+ "1594",
830
+ "2378",
831
+ "1333",
832
+ "1524",
833
+ "1825",
834
+ "116",
835
+ "309",
836
+ "52",
837
+ "808",
838
+ "827",
839
+ "909",
840
+ "495",
841
+ "1660",
842
+ "361",
843
+ "957",
844
+ "google",
845
+ "1357",
846
+ "1565",
847
+ "1967",
848
+ "996",
849
+ "1775",
850
+ "586",
851
+ "736",
852
+ "1052",
853
+ "1670",
854
+ "bank",
855
+ "177",
856
+ "1416",
857
+ "2194",
858
+ "2222",
859
+ "1454",
860
+ "1839",
861
+ "1275",
862
+ "53",
863
+ "997",
864
+ "1629",
865
+ "6028",
866
+ "smba",
867
+ "1378",
868
+ "1410",
869
+ "05c",
870
+ "1849",
871
+ "727",
872
+ "create",
873
+ "1559",
874
+ "536",
875
+ "1106",
876
+ "1310",
877
+ "1944",
878
+ "670",
879
+ "1297",
880
+ "1316",
881
+ "1762",
882
+ "en",
883
+ "1148",
884
+ "1295",
885
+ "1551",
886
+ "1853",
887
+ "1890",
888
+ "1208",
889
+ "1784",
890
+ "7200",
891
+ "05f",
892
+ "178",
893
+ "1283",
894
+ "1332",
895
+ "381",
896
+ "643",
897
+ "1056",
898
+ "1238",
899
+ "2024",
900
+ "2387",
901
+ "179",
902
+ "981",
903
+ "1547",
904
+ "1705",
905
+ "05e",
906
+ "290",
907
+ "903",
908
+ "1069",
909
+ "1285",
910
+ "2436",
911
+ "062",
912
+ "251",
913
+ "560",
914
+ "582",
915
+ "719",
916
+ "56",
917
+ "1700",
918
+ "2321",
919
+ "325",
920
+ "448",
921
+ "613",
922
+ "777",
923
+ "791",
924
+ "51",
925
+ "488",
926
+ "902",
927
+ "Asia/Almaty",
928
+ "is_hidden",
929
+ "1398",
930
+ "1527",
931
+ "1893",
932
+ "1999",
933
+ "2367",
934
+ "2642",
935
+ "237",
936
+ "busy",
937
+ "065",
938
+ "067",
939
+ "233",
940
+ "590",
941
+ "993",
942
+ "1511",
943
+ "54",
944
+ "723",
945
+ "860",
946
+ "363",
947
+ "487",
948
+ "522",
949
+ "605",
950
+ "995",
951
+ "1321",
952
+ "1691",
953
+ "1865",
954
+ "2447",
955
+ "2462",
956
+ "NON_TRANSACTIONAL",
957
+ "433",
958
+ "871",
959
+ "432",
960
+ "1004",
961
+ "1207",
962
+ "2032",
963
+ "2050",
964
+ "2379",
965
+ "2446",
966
+ "279",
967
+ "636",
968
+ "703",
969
+ "904",
970
+ "248",
971
+ "370",
972
+ "691",
973
+ "700",
974
+ "1068",
975
+ "1655",
976
+ "2334",
977
+ "060",
978
+ "063",
979
+ "364",
980
+ "533",
981
+ "534",
982
+ "567",
983
+ "1191",
984
+ "1210",
985
+ "1473",
986
+ "1827",
987
+ "069",
988
+ "701",
989
+ "2531",
990
+ "514",
991
+ "prev_dhash",
992
+ "064",
993
+ "496",
994
+ "790",
995
+ "1046",
996
+ "1139",
997
+ "1505",
998
+ "1521",
999
+ "1108",
1000
+ "207",
1001
+ "544",
1002
+ "637",
1003
+ "final",
1004
+ "1173",
1005
+ "1293",
1006
+ "1694",
1007
+ "1939",
1008
+ "1951",
1009
+ "1993",
1010
+ "2353",
1011
+ "2515",
1012
+ "504",
1013
+ "601",
1014
+ "857",
1015
+ "modify",
1016
+ "spam_request",
1017
+ "p_121_aa_1101_test4",
1018
+ "866",
1019
+ "1427",
1020
+ "1502",
1021
+ "1638",
1022
+ "1744",
1023
+ "2153",
1024
+ "068",
1025
+ "382",
1026
+ "725",
1027
+ "1704",
1028
+ "1864",
1029
+ "1990",
1030
+ "2003",
1031
+ "Asia/Dubai",
1032
+ "508",
1033
+ "531",
1034
+ "1387",
1035
+ "1474",
1036
+ "1632",
1037
+ "2307",
1038
+ "2386",
1039
+ "819",
1040
+ "2014",
1041
+ "066",
1042
+ "387",
1043
+ "1468",
1044
+ "1706",
1045
+ "2186",
1046
+ "2261",
1047
+ "471",
1048
+ "728",
1049
+ "1147",
1050
+ "1372",
1051
+ "1961",
1052
+ ],
1053
+ ];
1054
+ export const SINGLE_BYTE_TOKENS = [
1055
+ "",
1056
+ "xmlstreamstart",
1057
+ "xmlstreamend",
1058
+ "s.whatsapp.net",
1059
+ "type",
1060
+ "participant",
1061
+ "from",
1062
+ "receipt",
1063
+ "id",
1064
+ "notification",
1065
+ "disappearing_mode",
1066
+ "status",
1067
+ "jid",
1068
+ "broadcast",
1069
+ "user",
1070
+ "devices",
1071
+ "device_hash",
1072
+ "to",
1073
+ "offline",
1074
+ "message",
1075
+ "result",
1076
+ "class",
1077
+ "xmlns",
1078
+ "duration",
1079
+ "notify",
1080
+ "iq",
1081
+ "t",
1082
+ "ack",
1083
+ "g.us",
1084
+ "enc",
1085
+ "urn:xmpp:whatsapp:push",
1086
+ "presence",
1087
+ "config_value",
1088
+ "picture",
1089
+ "verified_name",
1090
+ "config_code",
1091
+ "key-index-list",
1092
+ "contact",
1093
+ "mediatype",
1094
+ "routing_info",
1095
+ "edge_routing",
1096
+ "get",
1097
+ "read",
1098
+ "urn:xmpp:ping",
1099
+ "fallback_hostname",
1100
+ "0",
1101
+ "chatstate",
1102
+ "business_hours_config",
1103
+ "unavailable",
1104
+ "download_buckets",
1105
+ "skmsg",
1106
+ "verified_level",
1107
+ "composing",
1108
+ "handshake",
1109
+ "device-list",
1110
+ "media",
1111
+ "text",
1112
+ "fallback_ip4",
1113
+ "media_conn",
1114
+ "device",
1115
+ "creation",
1116
+ "location",
1117
+ "config",
1118
+ "item",
1119
+ "fallback_ip6",
1120
+ "count",
1121
+ "w:profile:picture",
1122
+ "image",
1123
+ "business",
1124
+ "2",
1125
+ "hostname",
1126
+ "call-creator",
1127
+ "display_name",
1128
+ "relaylatency",
1129
+ "platform",
1130
+ "abprops",
1131
+ "success",
1132
+ "msg",
1133
+ "offline_preview",
1134
+ "prop",
1135
+ "key-index",
1136
+ "v",
1137
+ "day_of_week",
1138
+ "pkmsg",
1139
+ "version",
1140
+ "1",
1141
+ "ping",
1142
+ "w:p",
1143
+ "download",
1144
+ "video",
1145
+ "set",
1146
+ "specific_hours",
1147
+ "props",
1148
+ "primary",
1149
+ "unknown",
1150
+ "hash",
1151
+ "commerce_experience",
1152
+ "last",
1153
+ "subscribe",
1154
+ "max_buckets",
1155
+ "call",
1156
+ "profile",
1157
+ "member_since_text",
1158
+ "close_time",
1159
+ "call-id",
1160
+ "sticker",
1161
+ "mode",
1162
+ "participants",
1163
+ "value",
1164
+ "query",
1165
+ "profile_options",
1166
+ "open_time",
1167
+ "code",
1168
+ "list",
1169
+ "host",
1170
+ "ts",
1171
+ "contacts",
1172
+ "upload",
1173
+ "lid",
1174
+ "preview",
1175
+ "update",
1176
+ "usync",
1177
+ "w:stats",
1178
+ "delivery",
1179
+ "auth_ttl",
1180
+ "context",
1181
+ "fail",
1182
+ "cart_enabled",
1183
+ "appdata",
1184
+ "category",
1185
+ "atn",
1186
+ "direct_connection",
1187
+ "decrypt-fail",
1188
+ "relay_id",
1189
+ "mmg-fallback.whatsapp.net",
1190
+ "target",
1191
+ "available",
1192
+ "name",
1193
+ "last_id",
1194
+ "mmg.whatsapp.net",
1195
+ "categories",
1196
+ "401",
1197
+ "is_new",
1198
+ "index",
1199
+ "tctoken",
1200
+ "ip4",
1201
+ "token_id",
1202
+ "latency",
1203
+ "recipient",
1204
+ "edit",
1205
+ "ip6",
1206
+ "add",
1207
+ "thumbnail-document",
1208
+ "26",
1209
+ "paused",
1210
+ "true",
1211
+ "identity",
1212
+ "stream:error",
1213
+ "key",
1214
+ "sidelist",
1215
+ "background",
1216
+ "audio",
1217
+ "3",
1218
+ "thumbnail-image",
1219
+ "biz-cover-photo",
1220
+ "cat",
1221
+ "gcm",
1222
+ "thumbnail-video",
1223
+ "error",
1224
+ "auth",
1225
+ "deny",
1226
+ "serial",
1227
+ "in",
1228
+ "registration",
1229
+ "thumbnail-link",
1230
+ "remove",
1231
+ "00",
1232
+ "gif",
1233
+ "thumbnail-gif",
1234
+ "tag",
1235
+ "capability",
1236
+ "multicast",
1237
+ "item-not-found",
1238
+ "description",
1239
+ "business_hours",
1240
+ "config_expo_key",
1241
+ "md-app-state",
1242
+ "expiration",
1243
+ "fallback",
1244
+ "ttl",
1245
+ "300",
1246
+ "md-msg-hist",
1247
+ "device_orientation",
1248
+ "out",
1249
+ "w:m",
1250
+ "open_24h",
1251
+ "side_list",
1252
+ "token",
1253
+ "inactive",
1254
+ "01",
1255
+ "document",
1256
+ "te2",
1257
+ "played",
1258
+ "encrypt",
1259
+ "msgr",
1260
+ "hide",
1261
+ "direct_path",
1262
+ "12",
1263
+ "state",
1264
+ "not-authorized",
1265
+ "url",
1266
+ "terminate",
1267
+ "signature",
1268
+ "status-revoke-delay",
1269
+ "02",
1270
+ "te",
1271
+ "linked_accounts",
1272
+ "trusted_contact",
1273
+ "timezone",
1274
+ "ptt",
1275
+ "kyc-id",
1276
+ "privacy_token",
1277
+ "readreceipts",
1278
+ "appointment_only",
1279
+ "address",
1280
+ "expected_ts",
1281
+ "privacy",
1282
+ "7",
1283
+ "android",
1284
+ "interactive",
1285
+ "device-identity",
1286
+ "enabled",
1287
+ "attribute_padding",
1288
+ "1080",
1289
+ "03",
1290
+ "screen_height",
1291
+ ];
1292
+ export const TOKEN_MAP = {};
1293
+ for (const [i, SINGLE_BYTE_TOKEN] of SINGLE_BYTE_TOKENS.entries()) {
1294
+ TOKEN_MAP[SINGLE_BYTE_TOKEN] = { index: i };
1295
+ }
1296
+ for (const [i, DOUBLE_BYTE_TOKEN] of DOUBLE_BYTE_TOKENS.entries()) {
1297
+ for (const [j, element] of DOUBLE_BYTE_TOKEN.entries()) {
1298
+ TOKEN_MAP[element] = { dict: i, index: j };
1299
+ }
1300
+ }