@mtkruto/node 0.62.0 → 0.63.0

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 (513) hide show
  1. package/esm/2_tl.d.ts +6 -6
  2. package/esm/2_tl.d.ts.map +1 -1
  3. package/esm/2_tl.js +6 -6
  4. package/esm/3_errors.d.ts +1 -2
  5. package/esm/3_errors.d.ts.map +1 -1
  6. package/esm/3_errors.js +2 -1
  7. package/esm/4_constants.d.ts +0 -1
  8. package/esm/4_constants.d.ts.map +1 -1
  9. package/esm/4_constants.js +0 -1
  10. package/esm/4_errors.d.ts +2 -2
  11. package/esm/4_errors.d.ts.map +1 -1
  12. package/esm/4_session.d.ts +24 -0
  13. package/esm/4_session.d.ts.map +1 -0
  14. package/esm/4_session.js +23 -0
  15. package/esm/5_client.d.ts +1 -1
  16. package/esm/5_client.js +1 -1
  17. package/esm/client/0_client_abstract.d.ts +28 -26
  18. package/esm/client/0_client_abstract.d.ts.map +1 -1
  19. package/esm/client/0_client_abstract.js +16 -88
  20. package/esm/client/0_params.d.ts +5 -0
  21. package/esm/client/0_params.d.ts.map +1 -1
  22. package/esm/client/0_password.d.ts.map +1 -1
  23. package/esm/client/0_password.js +2 -2
  24. package/esm/client/0_storage_operations.d.ts +4 -4
  25. package/esm/client/0_storage_operations.d.ts.map +1 -1
  26. package/esm/client/0_storage_operations.js +14 -14
  27. package/esm/client/0_update_processor.d.ts +19 -0
  28. package/esm/client/0_update_processor.d.ts.map +1 -1
  29. package/esm/client/0_update_processor.js +19 -0
  30. package/esm/client/0_utilities.d.ts +6 -2
  31. package/esm/client/0_utilities.d.ts.map +1 -1
  32. package/esm/client/0_utilities.js +21 -23
  33. package/esm/client/1_client_plain.d.ts +9 -6
  34. package/esm/client/1_client_plain.d.ts.map +1 -1
  35. package/esm/client/1_client_plain.js +26 -41
  36. package/esm/client/1_types.d.ts +4 -23
  37. package/esm/client/1_types.d.ts.map +1 -1
  38. package/esm/client/2_account_manager.js +10 -10
  39. package/esm/client/2_business_connection_manager.d.ts.map +1 -1
  40. package/esm/client/2_business_connection_manager.js +4 -4
  41. package/esm/client/2_client_encrypted.d.ts +58 -0
  42. package/esm/client/2_client_encrypted.d.ts.map +1 -0
  43. package/esm/client/2_client_encrypted.js +265 -0
  44. package/esm/client/2_file_manager.d.ts.map +1 -1
  45. package/esm/client/2_file_manager.js +54 -74
  46. package/esm/client/2_network_statistics_manager.d.ts +1 -1
  47. package/esm/client/2_network_statistics_manager.d.ts.map +1 -1
  48. package/esm/client/2_network_statistics_manager.js +3 -3
  49. package/esm/client/2_payment_manager.d.ts.map +1 -1
  50. package/esm/client/2_payment_manager.js +3 -3
  51. package/esm/client/2_reaction_manager.d.ts.map +1 -1
  52. package/esm/client/2_reaction_manager.js +10 -10
  53. package/esm/client/2_translations_manager.d.ts +19 -0
  54. package/esm/client/2_translations_manager.d.ts.map +1 -1
  55. package/esm/client/2_translations_manager.js +24 -5
  56. package/esm/client/2_update_manager.d.ts +4 -4
  57. package/esm/client/2_update_manager.d.ts.map +1 -1
  58. package/esm/client/2_update_manager.js +69 -79
  59. package/esm/client/3_client_encrypted_pool.d.ts +30 -0
  60. package/esm/client/3_client_encrypted_pool.d.ts.map +1 -0
  61. package/esm/client/3_client_encrypted_pool.js +70 -0
  62. package/esm/client/3_message_manager.d.ts.map +1 -1
  63. package/esm/client/3_message_manager.js +100 -74
  64. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  65. package/esm/client/3_video_chat_manager.js +15 -20
  66. package/esm/client/4_callback_query_manager.d.ts.map +1 -1
  67. package/esm/client/4_callback_query_manager.js +2 -2
  68. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  69. package/esm/client/4_chat_list_manager.js +33 -33
  70. package/esm/client/4_chat_manager.d.ts.map +1 -1
  71. package/esm/client/4_chat_manager.js +25 -25
  72. package/esm/client/4_gift_manager.js +2 -2
  73. package/esm/client/4_inline_query_manager.d.ts.map +1 -1
  74. package/esm/client/4_inline_query_manager.js +4 -4
  75. package/esm/client/4_poll_manager.d.ts.map +1 -1
  76. package/esm/client/4_poll_manager.js +5 -5
  77. package/esm/client/4_story_manager.d.ts.map +1 -1
  78. package/esm/client/4_story_manager.js +10 -10
  79. package/esm/client/5_client.d.ts +3 -9
  80. package/esm/client/5_client.d.ts.map +1 -1
  81. package/esm/client/5_client.js +290 -306
  82. package/esm/connection/0_connection.d.ts +5 -4
  83. package/esm/connection/0_connection.d.ts.map +1 -1
  84. package/esm/connection/1_connection_web_socket.js +2 -2
  85. package/esm/mod.d.ts +1 -1
  86. package/esm/mod.d.ts.map +1 -1
  87. package/esm/mod.js +1 -1
  88. package/{script/tl/2_tl_reader.d.ts → esm/session/0_session_error.d.ts} +4 -7
  89. package/esm/session/0_session_error.d.ts.map +1 -0
  90. package/esm/{tl/2_tl_reader.d.ts → session/0_session_error.js} +5 -7
  91. package/esm/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
  92. package/esm/session/0_session_state.d.ts.map +1 -0
  93. package/esm/session/0_session_state.js +77 -0
  94. package/esm/session/1_session.d.ts +31 -0
  95. package/esm/session/1_session.d.ts.map +1 -0
  96. package/esm/session/1_session.js +149 -0
  97. package/esm/session/2_session_encrypted.d.ts +40 -0
  98. package/esm/session/2_session_encrypted.d.ts.map +1 -0
  99. package/esm/session/2_session_encrypted.js +416 -0
  100. package/esm/session/2_session_plain.d.ts +25 -0
  101. package/esm/session/2_session_plain.d.ts.map +1 -0
  102. package/esm/session/2_session_plain.js +56 -0
  103. package/esm/tl/0_tl_error.d.ts +22 -0
  104. package/esm/tl/0_tl_error.d.ts.map +1 -0
  105. package/esm/tl/0_tl_error.js +21 -0
  106. package/esm/tl/0_types.d.ts +25 -0
  107. package/esm/tl/0_types.d.ts.map +1 -0
  108. package/esm/tl/0_types.js +20 -0
  109. package/esm/tl/0_utilities.d.ts +32 -0
  110. package/esm/tl/0_utilities.d.ts.map +1 -0
  111. package/esm/tl/0_utilities.js +51 -0
  112. package/esm/tl/0_utilities_test.d.ts.map +1 -0
  113. package/esm/tl/1_mtproto_api.d.ts +371 -0
  114. package/esm/tl/1_mtproto_api.d.ts.map +1 -0
  115. package/esm/tl/1_mtproto_api.js +416 -0
  116. package/esm/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
  117. package/esm/tl/1_telegram_api.d.ts.map +1 -0
  118. package/esm/tl/{0_api.js → 1_telegram_api.js} +4945 -11109
  119. package/{script/tl/0_tl_raw_reader.d.ts → esm/tl/1_tl_reader.d.ts} +5 -2
  120. package/esm/tl/1_tl_reader.d.ts.map +1 -0
  121. package/esm/tl/{2_tl_reader.js → 1_tl_reader.js} +107 -40
  122. package/esm/tl/1_tl_reader_test.d.ts.map +1 -0
  123. package/esm/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
  124. package/esm/tl/1_tl_writer.d.ts.map +1 -0
  125. package/esm/tl/{2_tl_writer.js → 1_tl_writer.js} +80 -23
  126. package/esm/tl/1_tl_writer_test.d.ts.map +1 -0
  127. package/esm/tl/1_utilities.d.ts +9 -24
  128. package/esm/tl/1_utilities.d.ts.map +1 -1
  129. package/esm/tl/1_utilities.js +18 -64
  130. package/esm/tl/2_message.d.ts +2 -2
  131. package/esm/tl/2_message.d.ts.map +1 -1
  132. package/esm/tl/2_message.js +7 -7
  133. package/esm/tl/2_mtproto.d.ts +33 -0
  134. package/esm/tl/2_mtproto.d.ts.map +1 -0
  135. package/esm/tl/2_mtproto.js +53 -0
  136. package/{script/tl/2_utilities.d.ts → esm/tl/2_telegram.d.ts} +16 -2
  137. package/esm/tl/2_telegram.d.ts.map +1 -0
  138. package/esm/tl/{2_utilities.js → 2_telegram.js} +46 -1
  139. package/esm/transport/0_transport.d.ts +1 -1
  140. package/esm/transport/0_transport.d.ts.map +1 -1
  141. package/esm/types/0_chat_photo.d.ts.map +1 -1
  142. package/esm/types/0_chat_photo.js +2 -2
  143. package/esm/types/0_giveaway_parameters.d.ts.map +1 -1
  144. package/esm/types/0_giveaway_parameters.js +3 -3
  145. package/esm/types/0_location.d.ts.map +1 -1
  146. package/esm/types/0_location.js +5 -5
  147. package/esm/types/0_message_entity.d.ts.map +1 -1
  148. package/esm/types/0_message_entity.js +20 -20
  149. package/esm/types/0_reaction.d.ts.map +1 -1
  150. package/esm/types/0_reaction.js +4 -4
  151. package/esm/types/0_slow_mode_duration.d.ts +19 -0
  152. package/esm/types/0_slow_mode_duration.d.ts.map +1 -1
  153. package/esm/types/0_slow_mode_duration.js +19 -0
  154. package/esm/types/0_thumbnail.d.ts.map +1 -1
  155. package/esm/types/0_thumbnail.js +3 -3
  156. package/esm/types/0_translation.d.ts +19 -0
  157. package/esm/types/0_translation.d.ts.map +1 -1
  158. package/esm/types/0_translation.js +22 -3
  159. package/esm/types/0_video_chat.d.ts.map +1 -1
  160. package/esm/types/0_video_chat.js +2 -2
  161. package/esm/types/1_animation.d.ts.map +1 -1
  162. package/esm/types/1_animation.js +2 -2
  163. package/esm/types/1_audio.d.ts.map +1 -1
  164. package/esm/types/1_audio.js +2 -2
  165. package/esm/types/1_bot_command_scope.d.ts.map +1 -1
  166. package/esm/types/1_bot_command_scope.js +2 -2
  167. package/esm/types/1_chat_p.d.ts.map +1 -1
  168. package/esm/types/1_chat_p.js +6 -6
  169. package/esm/types/1_document.d.ts.map +1 -1
  170. package/esm/types/1_document.js +2 -2
  171. package/esm/types/1_keyboard_button.d.ts.map +1 -1
  172. package/esm/types/1_keyboard_button.js +10 -10
  173. package/esm/types/1_message_reaction.d.ts.map +1 -1
  174. package/esm/types/1_message_reaction.js +6 -6
  175. package/esm/types/1_photo.d.ts.map +1 -1
  176. package/esm/types/1_photo.js +3 -3
  177. package/esm/types/1_sticker.d.ts.map +1 -1
  178. package/esm/types/1_sticker.js +8 -8
  179. package/esm/types/1_story_privacy.d.ts.map +1 -1
  180. package/esm/types/1_story_privacy.js +7 -7
  181. package/esm/types/1_user.d.ts.map +1 -1
  182. package/esm/types/1_user.js +2 -2
  183. package/esm/types/1_venue.d.ts.map +1 -1
  184. package/esm/types/1_venue.js +2 -2
  185. package/esm/types/1_video.d.ts.map +1 -1
  186. package/esm/types/1_video.js +2 -2
  187. package/esm/types/1_video_note.d.ts.map +1 -1
  188. package/esm/types/1_video_note.js +2 -2
  189. package/esm/types/2_chat.d.ts.map +1 -1
  190. package/esm/types/2_chat.js +8 -8
  191. package/esm/types/2_chat_member.d.ts.map +1 -1
  192. package/esm/types/2_chat_member.js +10 -10
  193. package/esm/types/2_chat_settings.d.ts +19 -0
  194. package/esm/types/2_chat_settings.d.ts.map +1 -1
  195. package/esm/types/2_chat_settings.js +21 -2
  196. package/esm/types/2_chosen_inline_result.d.ts.map +1 -1
  197. package/esm/types/2_chosen_inline_result.js +4 -4
  198. package/esm/types/2_game.d.ts.map +1 -1
  199. package/esm/types/2_game.js +4 -4
  200. package/esm/types/2_gift_upgraded_component.d.ts.map +1 -1
  201. package/esm/types/2_gift_upgraded_component.js +3 -3
  202. package/esm/types/2_inactive_chat.d.ts.map +1 -1
  203. package/esm/types/2_inactive_chat.js +2 -2
  204. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  205. package/esm/types/2_inline_keyboard_button.js +10 -10
  206. package/esm/types/2_inline_query.d.ts.map +1 -1
  207. package/esm/types/2_inline_query.js +7 -7
  208. package/esm/types/2_message_reactions.d.ts.map +1 -1
  209. package/esm/types/2_message_reactions.js +2 -2
  210. package/esm/types/2_story_content.d.ts.map +1 -1
  211. package/esm/types/2_story_content.js +6 -6
  212. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  213. package/esm/types/2_story_interactive_area.js +9 -9
  214. package/esm/types/3_chat_member_updated.d.ts.map +1 -1
  215. package/esm/types/3_chat_member_updated.js +2 -2
  216. package/esm/types/3_gift.d.ts.map +1 -1
  217. package/esm/types/3_gift.js +3 -3
  218. package/esm/types/3_join_request.d.ts.map +1 -1
  219. package/esm/types/3_join_request.js +2 -2
  220. package/esm/types/3_reply_markup.d.ts.map +1 -1
  221. package/esm/types/3_reply_markup.js +5 -5
  222. package/esm/types/4_claimed_gift.d.ts.map +1 -1
  223. package/esm/types/4_claimed_gift.js +2 -2
  224. package/esm/types/4_inline_query_result.d.ts.map +1 -1
  225. package/esm/types/4_inline_query_result.js +14 -14
  226. package/esm/types/4_message.d.ts.map +1 -1
  227. package/esm/types/4_message.js +57 -57
  228. package/esm/types/5_callback_query.d.ts +1 -1
  229. package/esm/types/5_callback_query.d.ts.map +1 -1
  230. package/esm/types/5_callback_query.js +7 -8
  231. package/esm/types/5_chat_list_item.d.ts.map +1 -1
  232. package/esm/types/5_chat_list_item.js +5 -5
  233. package/esm/types/5_claimed_gifts.d.ts.map +1 -1
  234. package/esm/types/5_claimed_gifts.js +6 -6
  235. package/esm/types/_file_id.d.ts.map +1 -1
  236. package/esm/types/_file_id.js +3 -3
  237. package/package.json +1 -1
  238. package/script/2_tl.d.ts +6 -6
  239. package/script/2_tl.d.ts.map +1 -1
  240. package/script/2_tl.js +11 -11
  241. package/script/3_errors.d.ts +1 -2
  242. package/script/3_errors.d.ts.map +1 -1
  243. package/script/3_errors.js +2 -1
  244. package/script/4_constants.d.ts +0 -1
  245. package/script/4_constants.d.ts.map +1 -1
  246. package/script/4_constants.js +1 -2
  247. package/script/4_errors.d.ts +2 -2
  248. package/script/4_errors.d.ts.map +1 -1
  249. package/script/4_session.d.ts +24 -0
  250. package/script/4_session.d.ts.map +1 -0
  251. package/script/4_session.js +39 -0
  252. package/script/5_client.d.ts +1 -1
  253. package/script/5_client.js +1 -1
  254. package/script/client/0_client_abstract.d.ts +28 -26
  255. package/script/client/0_client_abstract.d.ts.map +1 -1
  256. package/script/client/0_client_abstract.js +18 -113
  257. package/script/client/0_params.d.ts +5 -0
  258. package/script/client/0_params.d.ts.map +1 -1
  259. package/script/client/0_password.d.ts.map +1 -1
  260. package/script/client/0_password.js +1 -1
  261. package/script/client/0_storage_operations.d.ts +4 -4
  262. package/script/client/0_storage_operations.d.ts.map +1 -1
  263. package/script/client/0_storage_operations.js +13 -13
  264. package/script/client/0_update_processor.d.ts +19 -0
  265. package/script/client/0_update_processor.d.ts.map +1 -1
  266. package/script/client/0_update_processor.js +19 -0
  267. package/script/client/0_utilities.d.ts +6 -2
  268. package/script/client/0_utilities.d.ts.map +1 -1
  269. package/script/client/0_utilities.js +22 -24
  270. package/script/client/1_client_plain.d.ts +9 -6
  271. package/script/client/1_client_plain.d.ts.map +1 -1
  272. package/script/client/1_client_plain.js +25 -40
  273. package/script/client/1_types.d.ts +4 -23
  274. package/script/client/1_types.d.ts.map +1 -1
  275. package/script/client/2_account_manager.js +9 -9
  276. package/script/client/2_business_connection_manager.d.ts.map +1 -1
  277. package/script/client/2_business_connection_manager.js +3 -3
  278. package/script/client/2_client_encrypted.d.ts +58 -0
  279. package/script/client/2_client_encrypted.d.ts.map +1 -0
  280. package/script/client/2_client_encrypted.js +269 -0
  281. package/script/client/2_file_manager.d.ts.map +1 -1
  282. package/script/client/2_file_manager.js +52 -72
  283. package/script/client/2_network_statistics_manager.d.ts +1 -1
  284. package/script/client/2_network_statistics_manager.d.ts.map +1 -1
  285. package/script/client/2_network_statistics_manager.js +3 -3
  286. package/script/client/2_payment_manager.d.ts.map +1 -1
  287. package/script/client/2_payment_manager.js +2 -2
  288. package/script/client/2_reaction_manager.d.ts.map +1 -1
  289. package/script/client/2_reaction_manager.js +9 -9
  290. package/script/client/2_translations_manager.d.ts +19 -0
  291. package/script/client/2_translations_manager.d.ts.map +1 -1
  292. package/script/client/2_translations_manager.js +23 -4
  293. package/script/client/2_update_manager.d.ts +4 -4
  294. package/script/client/2_update_manager.d.ts.map +1 -1
  295. package/script/client/2_update_manager.js +68 -78
  296. package/script/client/3_client_encrypted_pool.d.ts +30 -0
  297. package/script/client/3_client_encrypted_pool.d.ts.map +1 -0
  298. package/script/client/3_client_encrypted_pool.js +74 -0
  299. package/script/client/3_message_manager.d.ts.map +1 -1
  300. package/script/client/3_message_manager.js +99 -73
  301. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  302. package/script/client/3_video_chat_manager.js +14 -19
  303. package/script/client/4_callback_query_manager.d.ts.map +1 -1
  304. package/script/client/4_callback_query_manager.js +1 -1
  305. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  306. package/script/client/4_chat_list_manager.js +32 -32
  307. package/script/client/4_chat_manager.d.ts.map +1 -1
  308. package/script/client/4_chat_manager.js +24 -24
  309. package/script/client/4_gift_manager.js +1 -1
  310. package/script/client/4_inline_query_manager.d.ts.map +1 -1
  311. package/script/client/4_inline_query_manager.js +3 -3
  312. package/script/client/4_poll_manager.d.ts.map +1 -1
  313. package/script/client/4_poll_manager.js +4 -4
  314. package/script/client/4_story_manager.d.ts.map +1 -1
  315. package/script/client/4_story_manager.js +9 -9
  316. package/script/client/5_client.d.ts +3 -9
  317. package/script/client/5_client.d.ts.map +1 -1
  318. package/script/client/5_client.js +284 -300
  319. package/script/connection/0_connection.d.ts +5 -4
  320. package/script/connection/0_connection.d.ts.map +1 -1
  321. package/script/connection/1_connection_web_socket.js +2 -2
  322. package/script/mod.d.ts +1 -1
  323. package/script/mod.d.ts.map +1 -1
  324. package/script/mod.js +1 -2
  325. package/script/session/0_session_error.d.ts +24 -0
  326. package/script/session/0_session_error.d.ts.map +1 -0
  327. package/script/session/0_session_error.js +29 -0
  328. package/script/{tl/2_tl_writer.d.ts → session/0_session_state.d.ts} +7 -5
  329. package/script/session/0_session_state.d.ts.map +1 -0
  330. package/script/session/0_session_state.js +81 -0
  331. package/script/session/1_session.d.ts +31 -0
  332. package/script/session/1_session.d.ts.map +1 -0
  333. package/script/session/1_session.js +176 -0
  334. package/script/session/2_session_encrypted.d.ts +40 -0
  335. package/script/session/2_session_encrypted.d.ts.map +1 -0
  336. package/script/session/2_session_encrypted.js +420 -0
  337. package/script/session/2_session_plain.d.ts +25 -0
  338. package/script/session/2_session_plain.d.ts.map +1 -0
  339. package/script/session/2_session_plain.js +60 -0
  340. package/script/tl/0_tl_error.d.ts +22 -0
  341. package/script/tl/0_tl_error.d.ts.map +1 -0
  342. package/script/tl/0_tl_error.js +25 -0
  343. package/script/tl/0_types.d.ts +25 -0
  344. package/script/tl/0_types.d.ts.map +1 -0
  345. package/script/tl/0_types.js +21 -0
  346. package/script/tl/0_utilities.d.ts +32 -0
  347. package/script/tl/0_utilities.d.ts.map +1 -0
  348. package/script/tl/0_utilities.js +59 -0
  349. package/script/tl/0_utilities_test.d.ts.map +1 -0
  350. package/script/tl/1_mtproto_api.d.ts +371 -0
  351. package/script/tl/1_mtproto_api.d.ts.map +1 -0
  352. package/script/tl/1_mtproto_api.js +419 -0
  353. package/script/tl/{0_api.d.ts → 1_telegram_api.d.ts} +23 -340
  354. package/script/tl/1_telegram_api.d.ts.map +1 -0
  355. package/script/tl/{0_api.js → 1_telegram_api.js} +4947 -11134
  356. package/{esm/tl/0_tl_raw_reader.d.ts → script/tl/1_tl_reader.d.ts} +5 -2
  357. package/script/tl/1_tl_reader.d.ts.map +1 -0
  358. package/script/tl/1_tl_reader.js +218 -0
  359. package/script/tl/1_tl_reader_test.d.ts.map +1 -0
  360. package/script/tl/{0_tl_raw_writer.d.ts → 1_tl_writer.d.ts} +5 -2
  361. package/script/tl/1_tl_writer.d.ts.map +1 -0
  362. package/script/tl/{2_tl_writer.js → 1_tl_writer.js} +102 -45
  363. package/script/tl/1_tl_writer_test.d.ts.map +1 -0
  364. package/script/tl/1_utilities.d.ts +9 -24
  365. package/script/tl/1_utilities.d.ts.map +1 -1
  366. package/script/tl/1_utilities.js +19 -72
  367. package/script/tl/2_message.d.ts +2 -2
  368. package/script/tl/2_message.d.ts.map +1 -1
  369. package/script/tl/2_message.js +7 -7
  370. package/script/tl/2_mtproto.d.ts +33 -0
  371. package/script/tl/2_mtproto.d.ts.map +1 -0
  372. package/script/tl/2_mtproto.js +78 -0
  373. package/{esm/tl/2_utilities.d.ts → script/tl/2_telegram.d.ts} +16 -2
  374. package/script/tl/2_telegram.d.ts.map +1 -0
  375. package/script/tl/2_telegram.js +167 -0
  376. package/script/transport/0_transport.d.ts +1 -1
  377. package/script/transport/0_transport.d.ts.map +1 -1
  378. package/script/types/0_chat_photo.d.ts.map +1 -1
  379. package/script/types/0_chat_photo.js +1 -1
  380. package/script/types/0_giveaway_parameters.d.ts.map +1 -1
  381. package/script/types/0_giveaway_parameters.js +2 -2
  382. package/script/types/0_location.d.ts.map +1 -1
  383. package/script/types/0_location.js +4 -4
  384. package/script/types/0_message_entity.d.ts.map +1 -1
  385. package/script/types/0_message_entity.js +19 -19
  386. package/script/types/0_reaction.d.ts.map +1 -1
  387. package/script/types/0_reaction.js +3 -3
  388. package/script/types/0_slow_mode_duration.d.ts +19 -0
  389. package/script/types/0_slow_mode_duration.d.ts.map +1 -1
  390. package/script/types/0_slow_mode_duration.js +19 -0
  391. package/script/types/0_thumbnail.d.ts.map +1 -1
  392. package/script/types/0_thumbnail.js +2 -2
  393. package/script/types/0_translation.d.ts +19 -0
  394. package/script/types/0_translation.d.ts.map +1 -1
  395. package/script/types/0_translation.js +21 -2
  396. package/script/types/0_video_chat.d.ts.map +1 -1
  397. package/script/types/0_video_chat.js +1 -1
  398. package/script/types/1_animation.d.ts.map +1 -1
  399. package/script/types/1_animation.js +1 -1
  400. package/script/types/1_audio.d.ts.map +1 -1
  401. package/script/types/1_audio.js +1 -1
  402. package/script/types/1_bot_command_scope.d.ts.map +1 -1
  403. package/script/types/1_bot_command_scope.js +1 -1
  404. package/script/types/1_chat_p.d.ts.map +1 -1
  405. package/script/types/1_chat_p.js +5 -5
  406. package/script/types/1_document.d.ts.map +1 -1
  407. package/script/types/1_document.js +1 -1
  408. package/script/types/1_keyboard_button.d.ts.map +1 -1
  409. package/script/types/1_keyboard_button.js +9 -9
  410. package/script/types/1_message_reaction.d.ts.map +1 -1
  411. package/script/types/1_message_reaction.js +5 -5
  412. package/script/types/1_photo.d.ts.map +1 -1
  413. package/script/types/1_photo.js +2 -2
  414. package/script/types/1_sticker.d.ts.map +1 -1
  415. package/script/types/1_sticker.js +7 -7
  416. package/script/types/1_story_privacy.d.ts.map +1 -1
  417. package/script/types/1_story_privacy.js +6 -6
  418. package/script/types/1_user.d.ts.map +1 -1
  419. package/script/types/1_user.js +1 -1
  420. package/script/types/1_venue.d.ts.map +1 -1
  421. package/script/types/1_venue.js +1 -1
  422. package/script/types/1_video.d.ts.map +1 -1
  423. package/script/types/1_video.js +1 -1
  424. package/script/types/1_video_note.d.ts.map +1 -1
  425. package/script/types/1_video_note.js +1 -1
  426. package/script/types/2_chat.d.ts.map +1 -1
  427. package/script/types/2_chat.js +7 -7
  428. package/script/types/2_chat_member.d.ts.map +1 -1
  429. package/script/types/2_chat_member.js +9 -9
  430. package/script/types/2_chat_settings.d.ts +19 -0
  431. package/script/types/2_chat_settings.d.ts.map +1 -1
  432. package/script/types/2_chat_settings.js +20 -1
  433. package/script/types/2_chosen_inline_result.d.ts.map +1 -1
  434. package/script/types/2_chosen_inline_result.js +3 -3
  435. package/script/types/2_game.d.ts.map +1 -1
  436. package/script/types/2_game.js +3 -3
  437. package/script/types/2_gift_upgraded_component.d.ts.map +1 -1
  438. package/script/types/2_gift_upgraded_component.js +2 -2
  439. package/script/types/2_inactive_chat.d.ts.map +1 -1
  440. package/script/types/2_inactive_chat.js +1 -1
  441. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  442. package/script/types/2_inline_keyboard_button.js +9 -9
  443. package/script/types/2_inline_query.d.ts.map +1 -1
  444. package/script/types/2_inline_query.js +6 -6
  445. package/script/types/2_message_reactions.d.ts.map +1 -1
  446. package/script/types/2_message_reactions.js +1 -1
  447. package/script/types/2_story_content.d.ts.map +1 -1
  448. package/script/types/2_story_content.js +5 -5
  449. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  450. package/script/types/2_story_interactive_area.js +8 -8
  451. package/script/types/3_chat_member_updated.d.ts.map +1 -1
  452. package/script/types/3_chat_member_updated.js +1 -1
  453. package/script/types/3_gift.d.ts.map +1 -1
  454. package/script/types/3_gift.js +2 -2
  455. package/script/types/3_join_request.d.ts.map +1 -1
  456. package/script/types/3_join_request.js +1 -1
  457. package/script/types/3_reply_markup.d.ts.map +1 -1
  458. package/script/types/3_reply_markup.js +4 -4
  459. package/script/types/4_claimed_gift.d.ts.map +1 -1
  460. package/script/types/4_claimed_gift.js +1 -1
  461. package/script/types/4_inline_query_result.d.ts.map +1 -1
  462. package/script/types/4_inline_query_result.js +13 -13
  463. package/script/types/4_message.d.ts.map +1 -1
  464. package/script/types/4_message.js +56 -56
  465. package/script/types/5_callback_query.d.ts +1 -1
  466. package/script/types/5_callback_query.d.ts.map +1 -1
  467. package/script/types/5_callback_query.js +6 -7
  468. package/script/types/5_chat_list_item.d.ts.map +1 -1
  469. package/script/types/5_chat_list_item.js +4 -4
  470. package/script/types/5_claimed_gifts.d.ts.map +1 -1
  471. package/script/types/5_claimed_gifts.js +5 -5
  472. package/script/types/_file_id.d.ts.map +1 -1
  473. package/script/types/_file_id.js +2 -2
  474. package/esm/client/0_message.d.ts +0 -29
  475. package/esm/client/0_message.d.ts.map +0 -1
  476. package/esm/client/0_message.js +0 -83
  477. package/esm/client/1_client_encrypted.d.ts +0 -52
  478. package/esm/client/1_client_encrypted.d.ts.map +0 -1
  479. package/esm/client/1_client_encrypted.js +0 -381
  480. package/esm/tl/0_api.d.ts.map +0 -1
  481. package/esm/tl/0_tl_raw_reader.d.ts.map +0 -1
  482. package/esm/tl/0_tl_raw_reader.js +0 -97
  483. package/esm/tl/0_tl_raw_reader_test.d.ts.map +0 -1
  484. package/esm/tl/0_tl_raw_writer.d.ts.map +0 -1
  485. package/esm/tl/0_tl_raw_writer.js +0 -86
  486. package/esm/tl/0_tl_raw_writer_test.d.ts.map +0 -1
  487. package/esm/tl/1_utilities_test.d.ts.map +0 -1
  488. package/esm/tl/2_tl_reader.d.ts.map +0 -1
  489. package/esm/tl/2_tl_reader_test.d.ts.map +0 -1
  490. package/esm/tl/2_tl_writer.d.ts.map +0 -1
  491. package/esm/tl/2_tl_writer_test.d.ts.map +0 -1
  492. package/esm/tl/2_utilities.d.ts.map +0 -1
  493. package/script/client/0_message.d.ts +0 -29
  494. package/script/client/0_message.d.ts.map +0 -1
  495. package/script/client/0_message.js +0 -90
  496. package/script/client/1_client_encrypted.d.ts +0 -52
  497. package/script/client/1_client_encrypted.d.ts.map +0 -1
  498. package/script/client/1_client_encrypted.js +0 -385
  499. package/script/tl/0_api.d.ts.map +0 -1
  500. package/script/tl/0_tl_raw_reader.d.ts.map +0 -1
  501. package/script/tl/0_tl_raw_reader.js +0 -102
  502. package/script/tl/0_tl_raw_reader_test.d.ts.map +0 -1
  503. package/script/tl/0_tl_raw_writer.d.ts.map +0 -1
  504. package/script/tl/0_tl_raw_writer.js +0 -90
  505. package/script/tl/0_tl_raw_writer_test.d.ts.map +0 -1
  506. package/script/tl/1_utilities_test.d.ts.map +0 -1
  507. package/script/tl/2_tl_reader.d.ts.map +0 -1
  508. package/script/tl/2_tl_reader.js +0 -150
  509. package/script/tl/2_tl_reader_test.d.ts.map +0 -1
  510. package/script/tl/2_tl_writer.d.ts.map +0 -1
  511. package/script/tl/2_tl_writer_test.d.ts.map +0 -1
  512. package/script/tl/2_utilities.d.ts.map +0 -1
  513. package/script/tl/2_utilities.js +0 -98
@@ -17,9 +17,11 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
+ import { Schema } from "./0_types.js";
20
21
  export declare class TLError extends Error {
21
22
  }
22
- export declare class TLRawReader {
23
+ export declare class TLReader {
24
+ #private;
23
25
  protected _buffer: Uint8Array;
24
26
  constructor(_buffer: Uint8Array);
25
27
  get buffer(): Uint8Array;
@@ -34,5 +36,6 @@ export declare class TLRawReader {
34
36
  readInt256(signed?: boolean): bigint;
35
37
  readBytes(): Uint8Array;
36
38
  readString(): string;
39
+ readType(name: string, schema: Schema): Promise<any>;
37
40
  }
38
- //# sourceMappingURL=0_tl_raw_reader.d.ts.map
41
+ //# sourceMappingURL=1_tl_reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_tl_reader.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAoB,MAAM,EAAE,MAAM,cAAc,CAAC;AAGxD,qBAAa,OAAQ,SAAQ,KAAK;CAEjC;AAED,qBAAa,QAAQ;;IACP,SAAS,CAAC,OAAO,EAAE,UAAU;gBAAnB,OAAO,EAAE,UAAU;IAGzC,IAAI,MAAM,IAAI,UAAU,CAEvB;IAED,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAS/B,MAAM,CAAC,KAAK,EAAE,MAAM;IAQpB,SAAS,CAAC,MAAM,UAAO,GAAG,MAAM;IAKhC,SAAS,CAAC,MAAM,UAAO,GAAG,MAAM;IAKhC,WAAW;IAIX,SAAS,CAAC,MAAM,UAAO,GAAG,MAAM;IAKhC,UAAU,IAAI,MAAM;IAKpB,UAAU,CAAC,MAAM,UAAO,GAAG,MAAM;IAKjC,UAAU,CAAC,MAAM,UAAO,GAAG,MAAM;IAKjC,SAAS,IAAI,UAAU;IAiBvB,UAAU,IAAI,MAAM;IAId,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAmH3D"}
@@ -24,59 +24,127 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
24
24
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
25
  };
26
26
  var _TLReader_instances, _TLReader_deserializeEnum, _TLReader_deserializeType, _TLReader_deserializeVector, _TLReader_deserializePrimitive;
27
- import { TLError, TLRawReader } from "./0_tl_raw_reader.js";
28
- import { getEnum, getType, getTypeName } from "./0_api.js";
29
- import { unreachable } from "../0_deps.js";
30
- import { gunzip } from "../1_utilities.js";
31
- import { analyzeOptionalParam, BOOL_FALSE, BOOL_TRUE, getOptionalParamInnerType, getVectorItemType, GZIP_PACKED, isOptionalParam, VECTOR, X } from "./1_utilities.js";
32
- export class TLReader extends TLRawReader {
33
- constructor() {
34
- super(...arguments);
27
+ import { bigIntFromBuffer } from "../1_utilities.js";
28
+ import { analyzeOptionalParam, BOOL_FALSE, BOOL_TRUE, getOptionalParamInnerType, getVectorItemType, isOptionalParam, VECTOR, X } from "./0_utilities.js";
29
+ export class TLError extends Error {
30
+ }
31
+ export class TLReader {
32
+ constructor(_buffer) {
35
33
  _TLReader_instances.add(this);
34
+ Object.defineProperty(this, "_buffer", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: _buffer
39
+ });
36
40
  }
37
- async deserialize(type) {
38
- if (isOptionalParam(type)) {
39
- type = getOptionalParamInnerType(type);
41
+ get buffer() {
42
+ return this._buffer;
43
+ }
44
+ read(count) {
45
+ if (this._buffer.length < count) {
46
+ throw new TLError("No data remaining");
47
+ }
48
+ const buffer = this._buffer.slice(0, count);
49
+ this._buffer = this._buffer.subarray(count);
50
+ return buffer;
51
+ }
52
+ unread(count) {
53
+ const newOffest = this._buffer.byteOffset - count;
54
+ if (newOffest < 0) {
55
+ throw new TLError("No data has been read");
56
+ }
57
+ this._buffer = new Uint8Array(this._buffer.buffer, newOffest);
58
+ }
59
+ readInt24(signed = true) {
60
+ const buffer = this.read(24 / 8);
61
+ return Number(bigIntFromBuffer(buffer, true, signed));
62
+ }
63
+ readInt32(signed = true) {
64
+ const buffer = this.read(32 / 8);
65
+ return Number(bigIntFromBuffer(buffer, true, signed));
66
+ }
67
+ unreadInt32() {
68
+ this.unread(32 / 8);
69
+ }
70
+ readInt64(signed = true) {
71
+ const buffer = this.read(64 / 8);
72
+ return bigIntFromBuffer(buffer, true, signed);
73
+ }
74
+ readDouble() {
75
+ const buffer = this.read(8);
76
+ return new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength).getFloat64(0, true);
77
+ }
78
+ readInt128(signed = true) {
79
+ const buffer = this.read(128 / 8);
80
+ return bigIntFromBuffer(buffer, true, signed);
81
+ }
82
+ readInt256(signed = true) {
83
+ const buffer = this.read(256 / 8);
84
+ return bigIntFromBuffer(buffer, true, signed);
85
+ }
86
+ readBytes() {
87
+ let L = this.read(1)[0];
88
+ let padding;
89
+ if (L > 253) {
90
+ L = this.readInt24();
91
+ padding = L % 4;
40
92
  }
41
- const primitive = __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializePrimitive).call(this, type);
93
+ else {
94
+ padding = (L + 1) % 4;
95
+ }
96
+ const bytes = this.read(L);
97
+ if (padding > 0) {
98
+ padding = 4 - padding;
99
+ this.read(padding);
100
+ }
101
+ return bytes;
102
+ }
103
+ readString() {
104
+ return new TextDecoder().decode(this.readBytes());
105
+ }
106
+ async readType(name, schema) {
107
+ if (isOptionalParam(name)) {
108
+ name = getOptionalParamInnerType(name);
109
+ }
110
+ const primitive = __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializePrimitive).call(this, name);
42
111
  if (primitive !== undefined) {
43
112
  return primitive;
44
113
  }
45
114
  const id = this.readInt32(false);
46
- if (id == GZIP_PACKED) {
47
- const buffer = await gunzip(this.readBytes());
48
- return await new TLReader(buffer).deserialize(type);
49
- }
50
- if (type == X) {
51
- const typeName = getTypeName(id);
115
+ if (name == X) {
116
+ const typeName = schema.identifierToName[id];
52
117
  if (!typeName) {
53
118
  throw new TLError(`Unknown constructor: ${id.toString(16)}`);
54
119
  }
55
120
  this.unreadInt32();
56
- return await this.deserialize(typeName);
121
+ return await this.readType(typeName, schema);
57
122
  }
58
123
  if (id == VECTOR) {
59
- return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeVector).call(this, type);
124
+ return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeVector).call(this, name, schema);
60
125
  }
61
- const enum_ = getEnum(type);
62
- if (enum_) {
63
- return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeEnum).call(this, enum_, id);
126
+ const definition = schema.definitions[name];
127
+ if (definition) {
128
+ return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeType).call(this, name, definition, id, schema);
64
129
  }
65
- const type_ = getType(type);
66
- if (type_) {
67
- return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeType).call(this, type, type_, id);
130
+ const deserializedEnum = await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeEnum).call(this, name, id, schema);
131
+ if (deserializedEnum !== undefined) {
132
+ return deserializedEnum;
68
133
  }
69
- unreachable(`unknown type: ${type} id ${id}`);
134
+ throw new TLError(`Unknown type: ${name} ID ${id}`);
70
135
  }
71
136
  }
72
- _TLReader_instances = new WeakSet(), _TLReader_deserializeEnum = async function _TLReader_deserializeEnum(enum_, id) {
73
- const validTypes = enum_.map((v) => [v, getType(v)]);
74
- const type = validTypes.find((v) => v[1] && v[1][0] == id);
75
- if (!type || !type[1]) {
76
- throw new TLError(`Constructor not in enum: ${id.toString(16)}`);
77
- }
78
- return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeType).call(this, type[0], type[1], id);
79
- }, _TLReader_deserializeType = async function _TLReader_deserializeType(type, desc, id) {
137
+ _TLReader_instances = new WeakSet(), _TLReader_deserializeEnum = async function _TLReader_deserializeEnum(type, id, schema) {
138
+ const name = schema.identifierToName[id];
139
+ if (!name) {
140
+ return;
141
+ }
142
+ const definition = schema.definitions[name];
143
+ if (definition[2] != type) {
144
+ return;
145
+ }
146
+ return await __classPrivateFieldGet(this, _TLReader_instances, "m", _TLReader_deserializeType).call(this, name, definition, id, schema);
147
+ }, _TLReader_deserializeType = async function _TLReader_deserializeType(type, desc, id, schema) {
80
148
  if (desc[0] != id) {
81
149
  throw new TLError(`Expected constructor ${desc[0].toString(16)} but got ${id}`);
82
150
  }
@@ -94,13 +162,13 @@ _TLReader_instances = new WeakSet(), _TLReader_deserializeEnum = async function
94
162
  flagFields[name] = this.readInt32();
95
163
  continue;
96
164
  }
97
- const value = await this.deserialize(type);
165
+ const value = await this.readType(type, schema);
98
166
  if (typeof value !== "boolean" || value) {
99
167
  type_[name] = value;
100
168
  }
101
169
  }
102
170
  return type_;
103
- }, _TLReader_deserializeVector = async function _TLReader_deserializeVector(type) {
171
+ }, _TLReader_deserializeVector = async function _TLReader_deserializeVector(type, schema) {
104
172
  const itemType = getVectorItemType(type);
105
173
  if (!itemType) {
106
174
  throw new TLError(`Expected Vector but received ${type}`);
@@ -108,7 +176,7 @@ _TLReader_instances = new WeakSet(), _TLReader_deserializeEnum = async function
108
176
  const size = this.readInt32();
109
177
  const array = new Array();
110
178
  for (let i = 0; i < size; ++i) {
111
- array.push(await this.deserialize(itemType));
179
+ array.push(await this.readType(itemType, schema));
112
180
  }
113
181
  return array;
114
182
  }, _TLReader_deserializePrimitive = function _TLReader_deserializePrimitive(type) {
@@ -136,9 +204,8 @@ _TLReader_instances = new WeakSet(), _TLReader_deserializeEnum = async function
136
204
  return false;
137
205
  }
138
206
  else {
139
- unreachable(`expected boolTrue or boolFalse but got ${id}`);
207
+ throw new TLError(`Expected boolTrue or boolFalse but got ${id}`);
140
208
  }
141
- break;
142
209
  }
143
210
  case "string":
144
211
  return this.readString();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_tl_reader_test.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_reader_test.ts"],"names":[],"mappings":""}
@@ -17,7 +17,9 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- export declare class TLRawWriter {
20
+ import { Schema } from "./0_types.js";
21
+ export declare class TLWriter {
22
+ #private;
21
23
  protected _buffer: Uint8Array;
22
24
  constructor();
23
25
  get buffer(): Uint8Array;
@@ -30,5 +32,6 @@ export declare class TLRawWriter {
30
32
  writeInt256(int: bigint, signed?: boolean): typeof this;
31
33
  writeBytes(bytes: Uint8Array): typeof this;
32
34
  writeString(string: string): typeof this;
35
+ writeObject(value: any, schema: Schema): typeof this;
33
36
  }
34
- //# sourceMappingURL=0_tl_raw_writer.d.ts.map
37
+ //# sourceMappingURL=1_tl_writer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_tl_writer.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,qBAAa,QAAQ;;IACnB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAoB;;IAKjD,IAAI,MAAM,IAAI,UAAU,CAEvB;IAED,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,IAAI;IAKtC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,IAAI;IAKnD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,IAAI;IAKnD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,IAAI;IAKnD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;IAOxC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,IAAI;IAKpD,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO,IAAI;IAKpD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,IAAI;IAkB1C,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;IAKxC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;CAkLrD"}
@@ -17,45 +17,103 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
+ // deno-lint-ignore-file no-explicit-any
20
21
  var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
21
22
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
22
23
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
23
24
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
24
25
  };
25
26
  var _TLWriter_instances, _TLWriter_serialize, _TLWriter_serializeVector, _TLWriter_serializePrimitive, _TLWriter_isTypeValid;
26
- // deno-lint-ignore-file no-explicit-any
27
- import { getEnum, getType } from "./0_api.js";
28
- import { TLError } from "./0_tl_raw_reader.js";
29
- import { TLRawWriter } from "./0_tl_raw_writer.js";
30
- import { analyzeOptionalParam, assertIsValidType, BOOL_FALSE, BOOL_TRUE, getOptionalParamInnerType, getVectorItemType, isOptionalParam, repr, VECTOR } from "./1_utilities.js";
31
- export class TLWriter extends TLRawWriter {
27
+ import { concat } from "../0_deps.js";
28
+ import { TLError } from "./0_tl_error.js";
29
+ import { analyzeOptionalParam, BOOL_FALSE, BOOL_TRUE, getOptionalParamInnerType, getVectorItemType, isOptionalParam, repr, VECTOR } from "./0_utilities.js";
30
+ import { bufferFromBigInt } from "../utilities/0_buffer.js";
31
+ export class TLWriter {
32
32
  constructor() {
33
- super(...arguments);
34
33
  _TLWriter_instances.add(this);
34
+ Object.defineProperty(this, "_buffer", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: new Uint8Array()
39
+ });
40
+ }
41
+ get buffer() {
42
+ return this._buffer;
43
+ }
44
+ write(buffer) {
45
+ this._buffer = concat([this._buffer, buffer]);
46
+ return this;
47
+ }
48
+ writeInt24(int, signed = true) {
49
+ this.write(bufferFromBigInt(int, 24 / 8, true, signed));
50
+ return this;
51
+ }
52
+ writeInt32(int, signed = true) {
53
+ this.write(bufferFromBigInt(int, 32 / 8, true, signed));
54
+ return this;
55
+ }
56
+ writeInt64(int, signed = true) {
57
+ this.write(bufferFromBigInt(int, 64 / 8, true, signed));
58
+ return this;
59
+ }
60
+ writeDouble(double) {
61
+ const buffer = new Uint8Array(8);
62
+ new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength).setFloat64(0, double, true);
63
+ this.write(buffer);
64
+ return this;
65
+ }
66
+ writeInt128(int, signed = true) {
67
+ this.write(bufferFromBigInt(int, 128 / 8, true, signed));
68
+ return this;
69
+ }
70
+ writeInt256(int, signed = true) {
71
+ this.write(bufferFromBigInt(int, 256 / 8, true, signed));
72
+ return this;
73
+ }
74
+ writeBytes(bytes) {
75
+ let padding;
76
+ if (bytes.length > 253) {
77
+ this.write(new Uint8Array([254]));
78
+ this.writeInt24(bytes.length);
79
+ padding = bytes.length % 4;
80
+ }
81
+ else {
82
+ this.write(new Uint8Array([bytes.length]));
83
+ padding = (bytes.length + 1) % 4;
84
+ }
85
+ this.write(bytes);
86
+ if (padding > 0) {
87
+ padding = 4 - padding;
88
+ this.write(new Uint8Array(padding));
89
+ }
90
+ return this;
91
+ }
92
+ writeString(string) {
93
+ this.writeBytes(new TextEncoder().encode(string));
94
+ return this;
35
95
  }
36
- serialize(value) {
37
- assertIsValidType(value);
38
- __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, value._, value, "");
96
+ writeObject(value, schema) {
97
+ __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, value._, value, "", schema);
39
98
  return this;
40
99
  }
41
100
  }
42
- _TLWriter_instances = new WeakSet(), _TLWriter_serialize = function _TLWriter_serialize(type, value, debugInfo) {
101
+ _TLWriter_instances = new WeakSet(), _TLWriter_serialize = function _TLWriter_serialize(type, value, debugInfo, schema) {
43
102
  if (__classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serializePrimitive).call(this, type, value, debugInfo)) {
44
103
  return;
45
104
  }
46
- if (__classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serializeVector).call(this, type, value, debugInfo)) {
105
+ if (__classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serializeVector).call(this, type, value, debugInfo, schema)) {
47
106
  return;
48
107
  }
49
- assertIsValidType(value);
50
- const maybeParameters = getType(value._);
51
- if (!maybeParameters) {
108
+ const maybeDefinition = schema.definitions[value._];
109
+ if (!maybeDefinition) {
52
110
  throw new TLError(`Unknown type: ${value._}`);
53
111
  }
54
- if (type != "!X" && !__classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_isTypeValid).call(this, type, value)) {
112
+ if (type != "!X" && !__classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_isTypeValid).call(this, type, value, schema)) {
55
113
  throw new TLError(`Expected ${type} but got ${value._}`);
56
114
  }
57
115
  const type__ = value;
58
- const [id, parameters_] = maybeParameters;
116
+ const [id, parameters_] = maybeDefinition;
59
117
  this.writeInt32(id, false);
60
118
  for (let [i, [name, type]] of parameters_.entries()) {
61
119
  if (isOptionalParam(type) && type__[name] === undefined) {
@@ -84,10 +142,10 @@ _TLWriter_instances = new WeakSet(), _TLWriter_serialize = function _TLWriter_se
84
142
  if (isOptionalParam(type)) {
85
143
  type = getOptionalParamInnerType(type);
86
144
  }
87
- __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, type, type__[name], debugInfo);
145
+ __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, type, type__[name], debugInfo, schema);
88
146
  }
89
147
  return;
90
- }, _TLWriter_serializeVector = function _TLWriter_serializeVector(type, value, debugInfo) {
148
+ }, _TLWriter_serializeVector = function _TLWriter_serializeVector(type, value, debugInfo, schema) {
91
149
  const itemType = getVectorItemType(type);
92
150
  if (!itemType) {
93
151
  return false;
@@ -98,7 +156,7 @@ _TLWriter_instances = new WeakSet(), _TLWriter_serialize = function _TLWriter_se
98
156
  this.writeInt32(VECTOR, false);
99
157
  this.writeInt32(value.length);
100
158
  for (const item of value) {
101
- __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, itemType, item, debugInfo);
159
+ __classPrivateFieldGet(this, _TLWriter_instances, "m", _TLWriter_serialize).call(this, itemType, item, debugInfo, schema);
102
160
  }
103
161
  return true;
104
162
  }, _TLWriter_serializePrimitive = function _TLWriter_serializePrimitive(type, value, debugInfo) {
@@ -197,10 +255,9 @@ _TLWriter_instances = new WeakSet(), _TLWriter_serialize = function _TLWriter_se
197
255
  default:
198
256
  return false;
199
257
  }
200
- }, _TLWriter_isTypeValid = function _TLWriter_isTypeValid(type, value) {
258
+ }, _TLWriter_isTypeValid = function _TLWriter_isTypeValid(type, value, schema) {
201
259
  if (type == value._) {
202
260
  return true;
203
261
  }
204
- const enum_ = getEnum(type);
205
- return enum_?.includes(value._) || false;
262
+ return schema.definitions[value._]?.[2] === type;
206
263
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_tl_writer_test.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_writer_test.ts"],"names":[],"mappings":""}
@@ -7,7 +7,7 @@
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Lesser General Public License as published by
9
9
  * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.,,
10
+ * (at your option) any later version.
11
11
  *
12
12
  * This program is distributed in the hope that it will be useful,
13
13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,27 +17,12 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { AnyType, Enums, Functions, Types } from "./0_api.js";
21
- export declare function isOptionalParam(ntype: string): boolean;
22
- export declare function getOptionalParamInnerType(ntype: string): string;
23
- export declare function analyzeOptionalParam(ntype: string): {
24
- flagField: string;
25
- bitIndex: number;
26
- };
27
- export declare function isValidType(object: any): object is AnyType;
28
- export declare function assertIsValidType(object: any): void;
29
- export declare function is<S extends keyof (Types & Functions)>(typeName: S, value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never;
30
- export declare function isOneOf<S extends keyof (Types & Functions)>(typeNames: S[] | readonly S[], value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never;
31
- export declare function isOfEnum<S extends keyof Enums>(enumName: S, value: unknown): value is Enums[S];
32
- export declare function as<S extends keyof Types>(typeName: S, value: unknown): Types[S];
33
- export declare function isGenericFunction(value: unknown): boolean;
34
- export declare function mustGetReturnType(name: string): string;
35
- export declare function repr(value: unknown): string | null;
36
- export declare function getVectorItemType(type: string): string | null;
37
- export declare const X = "X";
38
- export declare const VECTOR = 481674261;
39
- export declare const BOOL_TRUE = 2574415285;
40
- export declare const BOOL_FALSE = 3162085175;
41
- export declare const GZIP_PACKED = 812830625;
42
- export declare const RPC_RESULT = 4082920705;
20
+ import { Schema } from "./0_types.js";
21
+ export declare function isValidObject(object: any, schema: Schema): boolean;
22
+ export declare function assertIsValidObject(object: any, schema: Schema): void;
23
+ export declare function is(typeName: string, value: any, schema: Schema): boolean;
24
+ export declare function isOneOf(names: string[], value: unknown, schema: Schema): boolean;
25
+ export declare function isOfEnum(name: string, value: any, schema: Schema): boolean;
26
+ export declare function as(name: string, value: unknown, schema: Schema): unknown;
27
+ export declare function mustGetReturnType(name: string, schema: Schema): string;
43
28
  //# sourceMappingURL=1_utilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_utilities.d.ts","sourceRoot":"","sources":["../../src/tl/1_utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AAEhF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AACD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/D;AACD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAY3F;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,OAAO,CAE1D;AACD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,QAI5C;AAED,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,SAAS,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAMjL;AACD,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,SAAS,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAExM;AACD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAE9F;AACD,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAM/E;AAWD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEzD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK7D;AAID,eAAO,MAAM,CAAC,MAAM,CAAC;AACrB,eAAO,MAAM,MAAM,YAAa,CAAC;AACjC,eAAO,MAAM,SAAS,aAAa,CAAC;AACpC,eAAO,MAAM,UAAU,aAAa,CAAC;AACrC,eAAO,MAAM,WAAW,YAAa,CAAC;AACtC,eAAO,MAAM,UAAU,aAAa,CAAC"}
1
+ {"version":3,"file":"1_utilities.d.ts","sourceRoot":"","sources":["../../src/tl/1_utilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,wBAAgB,aAAa,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAExD;AACD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,QAI9D;AAED,wBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAM9D;AACD,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAEtE;AACD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAEhE;AACD,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAM9D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMtE"}
@@ -7,7 +7,7 @@
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Lesser General Public License as published by
9
9
  * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.,,
10
+ * (at your option) any later version.
11
11
  *
12
12
  * This program is distributed in the hope that it will be useful,
13
13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,87 +18,41 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  // deno-lint-ignore-file no-explicit-any
21
- import { assertEquals, assertFalse, unreachable } from "../0_deps.js";
22
- import { getEnum, getType } from "./0_api.js";
23
- export function isOptionalParam(ntype) {
24
- return ntype.includes("?");
21
+ import { unreachable } from "../0_deps.js";
22
+ export function isValidObject(object, schema) {
23
+ return object != null && typeof object === "object" && typeof object._ === "string" && schema.definitions[object._] !== undefined;
25
24
  }
26
- export function getOptionalParamInnerType(ntype) {
27
- return ntype.split("?")[1];
28
- }
29
- export function analyzeOptionalParam(ntype) {
30
- if (!isOptionalParam(ntype)) {
31
- throw new Error("Parameter not optional");
32
- }
33
- const flagField = ntype.split(".")[0];
34
- assertEquals(typeof flagField, "string");
35
- const bitIndex = Number(ntype.split("?")[0].split(".")[1]);
36
- assertFalse(isNaN(bitIndex));
37
- return { flagField, bitIndex };
38
- }
39
- export function isValidType(object) {
40
- return object != null && typeof object === "object" && typeof object._ === "string" && getType(object._) !== undefined;
41
- }
42
- export function assertIsValidType(object) {
43
- if (!isValidType(object)) {
44
- throw new Error("Invalid object");
25
+ export function assertIsValidObject(object, schema) {
26
+ if (!isValidObject(object, schema)) {
27
+ unreachable();
45
28
  }
46
29
  }
47
- export function is(typeName, value) {
48
- if (!isValidType(value)) {
30
+ export function is(typeName, value, schema) {
31
+ if (!isValidObject(value, schema)) {
49
32
  return false;
50
33
  }
51
34
  else {
52
35
  return value._ === typeName;
53
36
  }
54
37
  }
55
- export function isOneOf(typeNames, value) {
56
- return typeNames.some((v) => is(v, value));
38
+ export function isOneOf(names, value, schema) {
39
+ return names.some((v) => is(v, value, schema));
57
40
  }
58
- export function isOfEnum(enumName, value) {
59
- return isOneOf(getEnum(enumName) ?? [], value);
41
+ export function isOfEnum(name, value, schema) {
42
+ return isValidObject(value, schema) && schema.definitions[value._][2] == name;
60
43
  }
61
- export function as(typeName, value) {
62
- if (is(typeName, value)) {
44
+ export function as(name, value, schema) {
45
+ if (is(name, value, schema)) {
63
46
  return value;
64
47
  }
65
48
  else {
66
49
  unreachable();
67
50
  }
68
51
  }
69
- const GENERIC_FUNCTIONS = [
70
- "invokeAfterMsg",
71
- "invokeAfterMsgs",
72
- "initConnection",
73
- "invokeWithLayer",
74
- "invokeWithoutUpdates",
75
- "invokeWithMessagesRange",
76
- "invokeWithTakeout",
77
- ];
78
- export function isGenericFunction(value) {
79
- return isOneOf(GENERIC_FUNCTIONS, value);
80
- }
81
- export function mustGetReturnType(name) {
82
- const type = getType(name);
83
- if (!type || type.length < 3 || !type[2]) {
52
+ export function mustGetReturnType(name, schema) {
53
+ const type = schema.definitions[name];
54
+ if (!type || !type[2]) {
84
55
  unreachable();
85
56
  }
86
57
  return type[2];
87
58
  }
88
- export function repr(value) {
89
- return value == null ? null : (typeof value === "object" && "_" in value) ? value._ : value.constructor.name;
90
- }
91
- export function getVectorItemType(type) {
92
- if (!type.startsWith(VECTOR_PREFIX) || !type.endsWith(VECTOR_SUFFIX)) {
93
- return null;
94
- }
95
- return type.slice(VECTOR_PREFIX.length).slice(0, -1 * VECTOR_SUFFIX.length);
96
- }
97
- const VECTOR_PREFIX = "Vector<";
98
- const VECTOR_SUFFIX = ">";
99
- export const X = "X";
100
- export const VECTOR = 0x1CB5C415;
101
- export const BOOL_TRUE = 0x997275b5;
102
- export const BOOL_FALSE = 0xbc799737;
103
- export const GZIP_PACKED = 0x3072CFA1;
104
- export const RPC_RESULT = 0xF35C6D01;
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import { TLRawReader } from "./0_tl_raw_reader.js";
20
+ import { TLReader } from "./1_tl_reader.js";
21
21
  export interface message {
22
22
  _: "message";
23
23
  msg_id: bigint;
@@ -25,7 +25,7 @@ export interface message {
25
25
  body: Uint8Array | msg_container;
26
26
  }
27
27
  export declare function serializeMessage(message: message): Promise<Uint8Array>;
28
- export declare function deserializeMessage(reader: TLRawReader): Promise<message>;
28
+ export declare function deserializeMessage(reader: TLReader): Promise<message>;
29
29
  export interface msg_container {
30
30
  _: "msg_container";
31
31
  messages: message[];
@@ -1 +1 @@
1
- {"version":3,"file":"2_message.d.ts","sourceRoot":"","sources":["../../src/tl/2_message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKnD,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,SAAS,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,aAAa,CAAC;CAClC;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAa5E;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB9E;AAID,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,eAAe,CAAC;IACnB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,yBAAyB,aAAa,CAAC;AAEpD,wBAAsB,qBAAqB,CAAC,YAAY,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ5F;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAQxF"}
1
+ {"version":3,"file":"2_message.d.ts","sourceRoot":"","sources":["../../src/tl/2_message.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,SAAS,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,aAAa,CAAC;CAClC;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAa5E;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB3E;AAID,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,eAAe,CAAC;IACnB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,yBAAyB,aAAa,CAAC;AAEpD,wBAAsB,qBAAqB,CAAC,YAAY,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ5F;AAED,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAQxF"}