@mtkruto/node 0.1.201 → 0.1.299

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 (742) hide show
  1. package/COPYING +674 -0
  2. package/README.md +77 -1
  3. package/esm/0_deps.d.ts +20 -1
  4. package/esm/0_deps.js +21 -1
  5. package/esm/0_errors.d.ts +19 -0
  6. package/esm/0_errors.js +19 -0
  7. package/esm/1_utilities.d.ts +20 -1
  8. package/esm/1_utilities.js +20 -1
  9. package/esm/2_connection.d.ts +19 -0
  10. package/esm/2_connection.js +19 -0
  11. package/esm/2_tl.d.ts +19 -0
  12. package/esm/2_tl.js +19 -0
  13. package/esm/3_errors.d.ts +19 -0
  14. package/esm/3_errors.js +19 -0
  15. package/esm/3_storage.d.ts +19 -0
  16. package/esm/3_storage.js +19 -0
  17. package/esm/3_transport.d.ts +19 -0
  18. package/esm/3_transport.js +19 -0
  19. package/esm/3_types.d.ts +19 -0
  20. package/esm/3_types.js +19 -0
  21. package/esm/4_constants.js +19 -0
  22. package/esm/4_errors.d.ts +19 -0
  23. package/esm/4_errors.js +22 -3
  24. package/esm/5_client.d.ts +19 -0
  25. package/esm/5_client.js +19 -0
  26. package/esm/client/0_client_abstract.d.ts +19 -0
  27. package/esm/client/0_client_abstract.js +19 -0
  28. package/esm/client/0_filters.d.ts +19 -0
  29. package/esm/client/0_filters.js +19 -0
  30. package/esm/client/0_html.d.ts +19 -0
  31. package/esm/client/0_html.js +19 -0
  32. package/esm/client/0_markdown.js +5 -5
  33. package/esm/client/0_message.d.ts +19 -0
  34. package/esm/client/0_message.js +19 -0
  35. package/esm/client/0_params.d.ts +19 -0
  36. package/esm/client/0_params.js +19 -0
  37. package/esm/client/0_password.js +19 -0
  38. package/esm/client/0_types.d.ts +19 -0
  39. package/esm/client/0_types.js +19 -0
  40. package/esm/client/0_utilities.d.ts +7 -0
  41. package/esm/client/0_utilities.js +66 -4
  42. package/esm/client/1_account_manager.d.ts +19 -0
  43. package/esm/client/1_account_manager.js +23 -4
  44. package/esm/client/1_bot_info_manager.d.ts +19 -0
  45. package/esm/client/1_bot_info_manager.js +19 -0
  46. package/esm/client/1_business_connection_manager.d.ts +19 -0
  47. package/esm/client/1_business_connection_manager.js +19 -0
  48. package/esm/client/1_client_encrypted.d.ts +19 -0
  49. package/esm/client/1_client_encrypted.js +23 -4
  50. package/esm/client/1_client_plain.d.ts +19 -0
  51. package/esm/client/1_client_plain.js +22 -3
  52. package/esm/client/1_composer.d.ts +19 -0
  53. package/esm/client/1_composer.js +19 -0
  54. package/esm/client/1_file_manager.d.ts +19 -0
  55. package/esm/client/1_file_manager.js +25 -5
  56. package/esm/client/1_network_statistics_manager.d.ts +19 -0
  57. package/esm/client/1_network_statistics_manager.js +19 -0
  58. package/esm/client/1_reaction_manager.d.ts +19 -0
  59. package/esm/client/1_reaction_manager.js +21 -2
  60. package/esm/client/1_update_manager.d.ts +19 -0
  61. package/esm/client/1_update_manager.js +28 -8
  62. package/esm/client/2_message_manager.d.ts +19 -0
  63. package/esm/client/2_message_manager.js +66 -24
  64. package/esm/client/3_callback_query_manager.d.ts +19 -0
  65. package/esm/client/3_callback_query_manager.js +21 -0
  66. package/esm/client/3_chat_list_manager.d.ts +19 -0
  67. package/esm/client/3_chat_list_manager.js +32 -12
  68. package/esm/client/3_inline_query_manager.d.ts +19 -0
  69. package/esm/client/3_inline_query_manager.js +23 -2
  70. package/esm/client/3_story_manager.d.ts +19 -0
  71. package/esm/client/3_story_manager.js +26 -5
  72. package/esm/client/4_client.d.ts +19 -0
  73. package/esm/client/4_client.js +37 -17
  74. package/esm/connection/0_connection.d.ts +19 -0
  75. package/esm/connection/0_connection.js +19 -0
  76. package/esm/connection/1_connection_web_socket.js +22 -2
  77. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/DomHandler.d.ts +83 -0
  78. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/DomHandler.js +203 -0
  79. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.d.ts +50 -0
  80. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +274 -0
  81. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.d.ts +47 -0
  82. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +51 -0
  83. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.d.ts +66 -0
  84. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +191 -0
  85. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Node.d.ts +168 -0
  86. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +385 -0
  87. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Parser.d.ts +159 -0
  88. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Parser.js +431 -0
  89. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Tokenizer.d.ts +181 -0
  90. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/Tokenizer.js +1046 -0
  91. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/mod.d.ts +42 -0
  92. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +52 -0
  93. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode.d.ts +11 -0
  94. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode.js +122 -0
  95. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.d.ts +1 -0
  96. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +24 -0
  97. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.d.ts +46 -0
  98. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +121 -0
  99. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/decode.d.ts +31 -0
  100. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/decode.js +30 -0
  101. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/entities.d.ts +2128 -0
  102. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/entities.js +2127 -0
  103. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/legacy.d.ts +109 -0
  104. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/legacy.js +108 -0
  105. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/xml.d.ts +8 -0
  106. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/xml.js +1 -0
  107. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.d.ts +90 -0
  108. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +95 -0
  109. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.d.ts +50 -0
  110. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +128 -0
  111. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.d.ts +46 -0
  112. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +110 -0
  113. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.d.ts +42 -0
  114. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +120 -0
  115. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/mod.d.ts +6 -0
  116. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/mod.js +6 -0
  117. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.d.ts +54 -0
  118. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +110 -0
  119. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.d.ts +40 -0
  120. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +75 -0
  121. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.d.ts +58 -0
  122. package/esm/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +101 -0
  123. package/{script/deps/deno.land/x/tgcrypto@0.3.3 → esm/deps/deno.land/x/tgcrypto@0.4.0}/mod.d.ts +0 -1
  124. package/esm/deps/deno.land/x/{tgcrypto@0.3.3 → tgcrypto@0.4.0}/mod.js +0 -11
  125. package/esm/deps/deno.land/x/tgcrypto@0.4.0/tgcrypto.js +308 -0
  126. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.d.ts +2 -0
  127. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +5 -1
  128. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/inflate.d.ts +2 -2
  129. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/inflate.js +5 -1
  130. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +1 -1
  131. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +8 -8
  132. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +2 -2
  133. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +19 -21
  134. package/esm/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +3 -3
  135. package/esm/mod.d.ts +20 -1
  136. package/esm/mod.js +20 -1
  137. package/esm/storage/0_storage.d.ts +19 -0
  138. package/esm/storage/0_storage.js +25 -5
  139. package/esm/storage/1_utilities.d.ts +19 -1
  140. package/esm/storage/1_utilities.js +21 -3
  141. package/esm/storage/2_storage_indexed_db.d.ts +19 -0
  142. package/esm/storage/2_storage_indexed_db.js +19 -0
  143. package/esm/storage/2_storage_local_storage.d.ts +19 -0
  144. package/esm/storage/2_storage_local_storage.js +20 -4
  145. package/esm/storage/2_storage_memory.d.ts +19 -0
  146. package/esm/storage/2_storage_memory.js +19 -0
  147. package/esm/storage/2_storage_session_storage.d.ts +19 -0
  148. package/esm/storage/2_storage_session_storage.js +20 -4
  149. package/esm/tl/0_tl_raw_reader.d.ts +19 -0
  150. package/esm/tl/0_tl_raw_reader.js +19 -0
  151. package/esm/tl/0_tl_raw_writer.d.ts +19 -0
  152. package/esm/tl/0_tl_raw_writer.js +19 -0
  153. package/esm/tl/1_tl_object.d.ts +19 -0
  154. package/esm/tl/1_tl_object.js +19 -0
  155. package/esm/tl/2_types.d.ts +19 -0
  156. package/esm/tl/2_types.js +19 -0
  157. package/esm/tl/3_deserialize.d.ts +19 -0
  158. package/esm/tl/3_deserialize.js +19 -0
  159. package/esm/tl/3_functions.d.ts +19 -0
  160. package/esm/tl/3_functions.js +19 -0
  161. package/esm/tl/3_utilities.d.ts +19 -0
  162. package/esm/tl/3_utilities.js +24 -4
  163. package/esm/tl/4_tl_reader.d.ts +19 -0
  164. package/esm/tl/4_tl_reader.js +19 -0
  165. package/esm/tl/5_tl_writer.d.ts +19 -0
  166. package/esm/tl/5_tl_writer.js +19 -0
  167. package/esm/tl/6_rpc_result.d.ts +19 -0
  168. package/esm/tl/6_rpc_result.js +19 -0
  169. package/esm/tl/7_message.d.ts +19 -0
  170. package/esm/tl/7_message.js +19 -0
  171. package/esm/tl/8_message_container.d.ts +19 -0
  172. package/esm/tl/8_message_container.js +19 -0
  173. package/esm/transport/0_obfuscation.js +19 -0
  174. package/esm/transport/0_transport.d.ts +19 -0
  175. package/esm/transport/0_transport.js +19 -0
  176. package/esm/transport/1_transport_abridged.d.ts +19 -0
  177. package/esm/transport/1_transport_abridged.js +19 -0
  178. package/esm/transport/1_transport_intermediate.d.ts +19 -0
  179. package/esm/transport/1_transport_intermediate.js +19 -0
  180. package/esm/transport/2_transport_provider.d.ts +19 -0
  181. package/esm/transport/2_transport_provider.js +23 -4
  182. package/esm/transport/3_transport_provider_web_socket.d.ts +19 -0
  183. package/esm/transport/3_transport_provider_web_socket.js +19 -0
  184. package/esm/types/0_authorization_state.d.ts +19 -0
  185. package/esm/types/0_authorization_state.js +19 -0
  186. package/esm/types/0_bot_command.d.ts +19 -0
  187. package/esm/types/0_bot_command.js +19 -0
  188. package/esm/types/0_chat_action.d.ts +19 -0
  189. package/esm/types/0_chat_action.js +19 -0
  190. package/esm/types/0_chat_administrator_rights.d.ts +19 -0
  191. package/esm/types/0_chat_administrator_rights.js +19 -0
  192. package/esm/types/0_chat_member_rights.d.ts +19 -0
  193. package/esm/types/0_chat_member_rights.js +19 -0
  194. package/esm/types/0_chat_photo.d.ts +19 -1
  195. package/esm/types/0_chat_photo.js +19 -2
  196. package/esm/types/0_connection_state.d.ts +19 -0
  197. package/esm/types/0_connection_state.js +19 -0
  198. package/esm/types/0_contact.d.ts +19 -0
  199. package/esm/types/0_contact.js +19 -0
  200. package/esm/types/0_dice.d.ts +19 -0
  201. package/esm/types/0_dice.js +19 -0
  202. package/esm/types/0_file_source.d.ts +19 -0
  203. package/esm/types/0_file_source.js +19 -0
  204. package/esm/types/0_giveaway_parameters.d.ts +19 -0
  205. package/esm/types/0_giveaway_parameters.js +19 -0
  206. package/esm/types/0_id.d.ts +19 -0
  207. package/esm/types/0_id.js +19 -0
  208. package/esm/types/0_keyboard_button_poll_type.d.ts +19 -0
  209. package/esm/types/0_keyboard_button_poll_type.js +19 -0
  210. package/esm/types/0_link_preview.d.ts +19 -0
  211. package/esm/types/0_link_preview.js +19 -0
  212. package/esm/types/0_location.d.ts +19 -0
  213. package/esm/types/0_location.js +19 -0
  214. package/esm/types/0_login_url.d.ts +19 -0
  215. package/esm/types/0_login_url.js +19 -0
  216. package/esm/types/0_mask_position.d.ts +19 -0
  217. package/esm/types/0_mask_position.js +19 -0
  218. package/esm/types/0_message_entity.d.ts +19 -0
  219. package/esm/types/0_message_entity.js +22 -3
  220. package/esm/types/0_message_reference.d.ts +19 -0
  221. package/esm/types/0_message_reference.js +19 -0
  222. package/esm/types/0_message_search_filter.d.ts +19 -0
  223. package/esm/types/0_message_search_filter.js +21 -2
  224. package/esm/types/0_mini_app_info.d.ts +19 -0
  225. package/esm/types/0_mini_app_info.js +19 -0
  226. package/esm/types/0_network_statistics_entry.d.ts +19 -0
  227. package/esm/types/0_network_statistics_entry.js +19 -0
  228. package/esm/types/0_parse_mode.d.ts +19 -0
  229. package/esm/types/0_parse_mode.js +19 -0
  230. package/esm/types/0_poll_option.d.ts +19 -0
  231. package/esm/types/0_poll_option.js +19 -0
  232. package/esm/types/0_price_tag.d.ts +19 -0
  233. package/esm/types/0_price_tag.js +19 -0
  234. package/esm/types/0_reaction.d.ts +19 -0
  235. package/esm/types/0_reaction.js +21 -2
  236. package/esm/types/0_restriction_reason.d.ts +19 -0
  237. package/esm/types/0_restriction_reason.js +19 -0
  238. package/esm/types/0_story_reference.d.ts +19 -0
  239. package/esm/types/0_story_reference.js +19 -0
  240. package/esm/types/0_thumbnail.d.ts +19 -0
  241. package/esm/types/0_thumbnail.js +19 -0
  242. package/esm/types/0_voice.d.ts +19 -0
  243. package/esm/types/0_voice.js +19 -0
  244. package/esm/types/1_animation.d.ts +19 -0
  245. package/esm/types/1_animation.js +19 -0
  246. package/esm/types/1_audio.d.ts +19 -0
  247. package/esm/types/1_audio.js +19 -0
  248. package/esm/types/1_bot_command_scope.d.ts +19 -0
  249. package/esm/types/1_bot_command_scope.js +22 -3
  250. package/esm/types/1_chat_p.d.ts +19 -0
  251. package/esm/types/1_chat_p.js +22 -2
  252. package/esm/types/1_document.d.ts +19 -0
  253. package/esm/types/1_document.js +19 -0
  254. package/esm/types/1_giveaway.d.ts +19 -0
  255. package/esm/types/1_giveaway.js +19 -0
  256. package/esm/types/1_inline_query_result_button.d.ts +19 -0
  257. package/esm/types/1_inline_query_result_button.js +19 -0
  258. package/esm/types/1_input_message_content.d.ts +19 -0
  259. package/esm/types/1_input_message_content.js +19 -0
  260. package/esm/types/1_input_story_content.d.ts +19 -0
  261. package/esm/types/1_input_story_content.js +19 -0
  262. package/esm/types/1_keyboard_button.d.ts +19 -0
  263. package/esm/types/1_keyboard_button.js +22 -3
  264. package/esm/types/1_message_reaction.d.ts +19 -0
  265. package/esm/types/1_message_reaction.js +21 -2
  266. package/esm/types/1_network_statistics.d.ts +19 -0
  267. package/esm/types/1_network_statistics.js +19 -0
  268. package/esm/types/1_photo.d.ts +19 -0
  269. package/esm/types/1_photo.js +19 -0
  270. package/esm/types/1_poll.d.ts +19 -0
  271. package/esm/types/1_poll.js +19 -0
  272. package/esm/types/1_reaction_count.d.ts +19 -0
  273. package/esm/types/1_reaction_count.js +19 -0
  274. package/esm/types/1_reply_quote.d.ts +19 -0
  275. package/esm/types/1_reply_quote.js +19 -0
  276. package/esm/types/1_sticker.d.ts +19 -0
  277. package/esm/types/1_sticker.js +19 -0
  278. package/esm/types/1_story_privacy.d.ts +19 -0
  279. package/esm/types/1_story_privacy.js +22 -3
  280. package/esm/types/1_story_reaction.d.ts +19 -0
  281. package/esm/types/1_story_reaction.js +19 -0
  282. package/esm/types/1_user.d.ts +19 -0
  283. package/esm/types/1_user.js +19 -0
  284. package/esm/types/1_venue.d.ts +19 -0
  285. package/esm/types/1_venue.js +19 -0
  286. package/esm/types/1_video.d.ts +19 -0
  287. package/esm/types/1_video.js +19 -0
  288. package/esm/types/1_video_note.d.ts +19 -0
  289. package/esm/types/1_video_note.js +19 -0
  290. package/esm/types/2_business_connection.d.ts +19 -0
  291. package/esm/types/2_business_connection.js +19 -0
  292. package/esm/types/2_chat_member.d.ts +19 -0
  293. package/esm/types/2_chat_member.js +25 -5
  294. package/esm/types/2_chosen_inline_result.d.ts +19 -0
  295. package/esm/types/2_chosen_inline_result.js +22 -2
  296. package/esm/types/2_game.d.ts +19 -0
  297. package/esm/types/2_game.js +19 -0
  298. package/esm/types/2_inactive_chat.d.ts +19 -0
  299. package/esm/types/2_inactive_chat.js +22 -2
  300. package/esm/types/2_inline_keyboard_button.d.ts +19 -0
  301. package/esm/types/2_inline_keyboard_button.js +22 -3
  302. package/esm/types/2_inline_query.d.ts +19 -0
  303. package/esm/types/2_inline_query.js +22 -3
  304. package/esm/types/2_invite_link.d.ts +19 -0
  305. package/esm/types/2_invite_link.js +22 -2
  306. package/esm/types/2_message_interactions.d.ts +19 -0
  307. package/esm/types/2_message_interactions.js +19 -0
  308. package/esm/types/2_message_reaction_count.d.ts +19 -0
  309. package/esm/types/2_message_reaction_count.js +19 -0
  310. package/esm/types/2_message_reactions.d.ts +19 -0
  311. package/esm/types/2_message_reactions.js +19 -0
  312. package/esm/types/2_story_content.d.ts +19 -0
  313. package/esm/types/2_story_content.js +24 -5
  314. package/esm/types/2_story_interactions.d.ts +19 -0
  315. package/esm/types/2_story_interactions.js +19 -0
  316. package/esm/types/2_story_interactive_area.d.ts +19 -0
  317. package/esm/types/2_story_interactive_area.js +24 -5
  318. package/esm/types/3_chat_member_updated.d.ts +19 -0
  319. package/esm/types/3_chat_member_updated.js +23 -3
  320. package/esm/types/3_reply_markup.d.ts +19 -0
  321. package/esm/types/3_reply_markup.js +23 -3
  322. package/esm/types/3_story.d.ts +19 -0
  323. package/esm/types/3_story.js +22 -2
  324. package/esm/types/4_inline_query_result.d.ts +19 -0
  325. package/esm/types/4_inline_query_result.js +24 -5
  326. package/esm/types/4_message.d.ts +19 -0
  327. package/esm/types/4_message.js +36 -16
  328. package/esm/types/5_callback_query.d.ts +19 -0
  329. package/esm/types/5_callback_query.js +23 -3
  330. package/esm/types/5_chat.d.ts +19 -0
  331. package/esm/types/5_chat.js +27 -7
  332. package/esm/types/6_update.d.ts +19 -0
  333. package/esm/types/6_update.js +19 -0
  334. package/esm/types/_file_id.d.ts +19 -0
  335. package/esm/types/_file_id.js +28 -8
  336. package/esm/types/_getters.d.ts +19 -0
  337. package/esm/types/_getters.js +19 -0
  338. package/esm/utilities/0_bigint.d.ts +1 -0
  339. package/esm/utilities/0_bigint.js +44 -0
  340. package/esm/utilities/0_buffer.d.ts +19 -0
  341. package/esm/utilities/0_buffer.js +19 -0
  342. package/esm/utilities/0_cache_map.d.ts +19 -0
  343. package/esm/utilities/0_cache_map.js +19 -0
  344. package/esm/utilities/0_color.d.ts +19 -0
  345. package/esm/utilities/0_color.js +19 -0
  346. package/esm/utilities/0_crypto.d.ts +19 -0
  347. package/esm/utilities/0_crypto.js +19 -0
  348. package/esm/utilities/0_hash.js +19 -0
  349. package/esm/utilities/0_logger.d.ts +27 -0
  350. package/esm/utilities/0_logger.js +28 -5
  351. package/esm/utilities/0_mutex.d.ts +19 -0
  352. package/esm/utilities/0_mutex.js +19 -0
  353. package/esm/utilities/0_object.d.ts +19 -0
  354. package/esm/utilities/0_object.js +19 -0
  355. package/esm/utilities/0_rle.d.ts +19 -0
  356. package/esm/utilities/0_rle.js +19 -0
  357. package/esm/utilities/0_types.d.ts +19 -0
  358. package/esm/utilities/0_types.js +19 -0
  359. package/esm/utilities/1_auth.js +19 -0
  360. package/esm/utilities/1_base64.d.ts +19 -0
  361. package/esm/utilities/1_base64.js +19 -0
  362. package/esm/utilities/1_math.d.ts +20 -0
  363. package/esm/utilities/1_math.js +70 -0
  364. package/esm/utilities/1_misc.d.ts +19 -0
  365. package/esm/utilities/1_misc.js +21 -2
  366. package/esm/utilities/1_queue.d.ts +19 -0
  367. package/esm/utilities/1_queue.js +19 -0
  368. package/package.json +1 -1
  369. package/script/0_deps.d.ts +20 -1
  370. package/script/0_deps.js +22 -3
  371. package/script/0_errors.d.ts +19 -0
  372. package/script/0_errors.js +19 -0
  373. package/script/1_utilities.d.ts +20 -1
  374. package/script/1_utilities.js +20 -1
  375. package/script/2_connection.d.ts +19 -0
  376. package/script/2_connection.js +19 -0
  377. package/script/2_tl.d.ts +19 -0
  378. package/script/2_tl.js +19 -0
  379. package/script/3_errors.d.ts +19 -0
  380. package/script/3_errors.js +19 -0
  381. package/script/3_storage.d.ts +19 -0
  382. package/script/3_storage.js +19 -0
  383. package/script/3_transport.d.ts +19 -0
  384. package/script/3_transport.js +19 -0
  385. package/script/3_types.d.ts +19 -0
  386. package/script/3_types.js +19 -0
  387. package/script/4_constants.js +19 -0
  388. package/script/4_errors.d.ts +19 -0
  389. package/script/4_errors.js +22 -3
  390. package/script/5_client.d.ts +19 -0
  391. package/script/5_client.js +19 -0
  392. package/script/client/0_client_abstract.d.ts +19 -0
  393. package/script/client/0_client_abstract.js +19 -0
  394. package/script/client/0_filters.d.ts +19 -0
  395. package/script/client/0_filters.js +19 -0
  396. package/script/client/0_html.d.ts +19 -0
  397. package/script/client/0_html.js +19 -0
  398. package/script/client/0_markdown.js +5 -5
  399. package/script/client/0_message.d.ts +19 -0
  400. package/script/client/0_message.js +19 -0
  401. package/script/client/0_params.d.ts +19 -0
  402. package/script/client/0_params.js +19 -0
  403. package/script/client/0_password.js +19 -0
  404. package/script/client/0_types.d.ts +19 -0
  405. package/script/client/0_types.js +19 -0
  406. package/script/client/0_utilities.d.ts +7 -0
  407. package/script/client/0_utilities.js +73 -4
  408. package/script/client/1_account_manager.d.ts +19 -0
  409. package/script/client/1_account_manager.js +23 -4
  410. package/script/client/1_bot_info_manager.d.ts +19 -0
  411. package/script/client/1_bot_info_manager.js +19 -0
  412. package/script/client/1_business_connection_manager.d.ts +19 -0
  413. package/script/client/1_business_connection_manager.js +19 -0
  414. package/script/client/1_client_encrypted.d.ts +19 -0
  415. package/script/client/1_client_encrypted.js +21 -2
  416. package/script/client/1_client_plain.d.ts +19 -0
  417. package/script/client/1_client_plain.js +21 -2
  418. package/script/client/1_composer.d.ts +19 -0
  419. package/script/client/1_composer.js +19 -0
  420. package/script/client/1_file_manager.d.ts +19 -0
  421. package/script/client/1_file_manager.js +24 -4
  422. package/script/client/1_network_statistics_manager.d.ts +19 -0
  423. package/script/client/1_network_statistics_manager.js +19 -0
  424. package/script/client/1_reaction_manager.d.ts +19 -0
  425. package/script/client/1_reaction_manager.js +21 -2
  426. package/script/client/1_update_manager.d.ts +19 -0
  427. package/script/client/1_update_manager.js +27 -7
  428. package/script/client/2_message_manager.d.ts +19 -0
  429. package/script/client/2_message_manager.js +70 -28
  430. package/script/client/3_callback_query_manager.d.ts +19 -0
  431. package/script/client/3_callback_query_manager.js +21 -0
  432. package/script/client/3_chat_list_manager.d.ts +19 -0
  433. package/script/client/3_chat_list_manager.js +31 -11
  434. package/script/client/3_inline_query_manager.d.ts +19 -0
  435. package/script/client/3_inline_query_manager.js +23 -2
  436. package/script/client/3_story_manager.d.ts +19 -0
  437. package/script/client/3_story_manager.js +23 -2
  438. package/script/client/4_client.d.ts +19 -0
  439. package/script/client/4_client.js +35 -15
  440. package/script/connection/0_connection.d.ts +19 -0
  441. package/script/connection/0_connection.js +19 -0
  442. package/script/connection/1_connection_web_socket.js +21 -1
  443. package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomHandler.d.ts +83 -0
  444. package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomHandler.js +207 -0
  445. package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.d.ts +50 -0
  446. package/script/deps/deno.land/x/html_parser@v0.1.3/src/DomSerializer.js +301 -0
  447. package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.d.ts +47 -0
  448. package/script/deps/deno.land/x/html_parser@v0.1.3/src/ElementType.js +55 -0
  449. package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.d.ts +66 -0
  450. package/script/deps/deno.land/x/html_parser@v0.1.3/src/FeedHandler.js +222 -0
  451. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.d.ts +168 -0
  452. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Node.js +404 -0
  453. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Parser.d.ts +159 -0
  454. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Parser.js +438 -0
  455. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Tokenizer.d.ts +181 -0
  456. package/script/deps/deno.land/x/html_parser@v0.1.3/src/Tokenizer.js +1052 -0
  457. package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.d.ts +42 -0
  458. package/script/deps/deno.land/x/html_parser@v0.1.3/src/mod.js +88 -0
  459. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode.d.ts +11 -0
  460. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode.js +128 -0
  461. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.d.ts +1 -0
  462. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/decode_codepoint.js +30 -0
  463. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.d.ts +46 -0
  464. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/encode.js +129 -0
  465. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/decode.d.ts +31 -0
  466. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/decode.js +32 -0
  467. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/entities.d.ts +2128 -0
  468. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/entities.js +2129 -0
  469. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/legacy.d.ts +109 -0
  470. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/legacy.js +110 -0
  471. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/xml.d.ts +8 -0
  472. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/maps/xml.js +3 -0
  473. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.d.ts +90 -0
  474. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.js +114 -0
  475. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.d.ts +50 -0
  476. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/helpers.js +134 -0
  477. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.d.ts +46 -0
  478. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/legacy.js +118 -0
  479. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.d.ts +42 -0
  480. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/manipulation.js +129 -0
  481. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/mod.d.ts +6 -0
  482. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/mod.js +22 -0
  483. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.d.ts +54 -0
  484. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/querying.js +119 -0
  485. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.d.ts +40 -0
  486. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/stringify.js +86 -0
  487. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.d.ts +58 -0
  488. package/script/deps/deno.land/x/html_parser@v0.1.3/src/utils/traversal.js +112 -0
  489. package/{esm/deps/deno.land/x/tgcrypto@0.3.3 → script/deps/deno.land/x/tgcrypto@0.4.0}/mod.d.ts +0 -1
  490. package/script/deps/deno.land/x/{tgcrypto@0.3.3 → tgcrypto@0.4.0}/mod.js +1 -13
  491. package/script/deps/deno.land/x/tgcrypto@0.4.0/tgcrypto.js +310 -0
  492. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.d.ts +2 -0
  493. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/deflate.js +7 -1
  494. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/inflate.d.ts +2 -2
  495. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/inflate.js +7 -1
  496. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/crc32.js +1 -1
  497. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/deflate.js +8 -8
  498. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inffast.js +2 -2
  499. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/inflate.js +19 -21
  500. package/script/deps/raw.githubusercontent.com/MTKruto/compress/main/zlib/zlib/trees.js +3 -3
  501. package/script/mod.d.ts +20 -1
  502. package/script/mod.js +21 -1
  503. package/script/storage/0_storage.d.ts +19 -0
  504. package/script/storage/0_storage.js +24 -4
  505. package/script/storage/1_utilities.d.ts +19 -1
  506. package/script/storage/1_utilities.js +22 -4
  507. package/script/storage/2_storage_indexed_db.d.ts +19 -0
  508. package/script/storage/2_storage_indexed_db.js +19 -0
  509. package/script/storage/2_storage_local_storage.d.ts +19 -0
  510. package/script/storage/2_storage_local_storage.js +19 -3
  511. package/script/storage/2_storage_memory.d.ts +19 -0
  512. package/script/storage/2_storage_memory.js +19 -0
  513. package/script/storage/2_storage_session_storage.d.ts +19 -0
  514. package/script/storage/2_storage_session_storage.js +19 -3
  515. package/script/tl/0_tl_raw_reader.d.ts +19 -0
  516. package/script/tl/0_tl_raw_reader.js +19 -0
  517. package/script/tl/0_tl_raw_writer.d.ts +19 -0
  518. package/script/tl/0_tl_raw_writer.js +19 -0
  519. package/script/tl/1_tl_object.d.ts +19 -0
  520. package/script/tl/1_tl_object.js +19 -0
  521. package/script/tl/2_types.d.ts +19 -0
  522. package/script/tl/2_types.js +19 -0
  523. package/script/tl/3_deserialize.d.ts +19 -0
  524. package/script/tl/3_deserialize.js +19 -0
  525. package/script/tl/3_functions.d.ts +19 -0
  526. package/script/tl/3_functions.js +19 -0
  527. package/script/tl/3_utilities.d.ts +19 -0
  528. package/script/tl/3_utilities.js +23 -3
  529. package/script/tl/4_tl_reader.d.ts +19 -0
  530. package/script/tl/4_tl_reader.js +19 -0
  531. package/script/tl/5_tl_writer.d.ts +19 -0
  532. package/script/tl/5_tl_writer.js +19 -0
  533. package/script/tl/6_rpc_result.d.ts +19 -0
  534. package/script/tl/6_rpc_result.js +19 -0
  535. package/script/tl/7_message.d.ts +19 -0
  536. package/script/tl/7_message.js +19 -0
  537. package/script/tl/8_message_container.d.ts +19 -0
  538. package/script/tl/8_message_container.js +19 -0
  539. package/script/transport/0_obfuscation.js +19 -0
  540. package/script/transport/0_transport.d.ts +19 -0
  541. package/script/transport/0_transport.js +19 -0
  542. package/script/transport/1_transport_abridged.d.ts +19 -0
  543. package/script/transport/1_transport_abridged.js +19 -0
  544. package/script/transport/1_transport_intermediate.d.ts +19 -0
  545. package/script/transport/1_transport_intermediate.js +19 -0
  546. package/script/transport/2_transport_provider.d.ts +19 -0
  547. package/script/transport/2_transport_provider.js +23 -4
  548. package/script/transport/3_transport_provider_web_socket.d.ts +19 -0
  549. package/script/transport/3_transport_provider_web_socket.js +19 -0
  550. package/script/types/0_authorization_state.d.ts +19 -0
  551. package/script/types/0_authorization_state.js +19 -0
  552. package/script/types/0_bot_command.d.ts +19 -0
  553. package/script/types/0_bot_command.js +19 -0
  554. package/script/types/0_chat_action.d.ts +19 -0
  555. package/script/types/0_chat_action.js +19 -0
  556. package/script/types/0_chat_administrator_rights.d.ts +19 -0
  557. package/script/types/0_chat_administrator_rights.js +19 -0
  558. package/script/types/0_chat_member_rights.d.ts +19 -0
  559. package/script/types/0_chat_member_rights.js +19 -0
  560. package/script/types/0_chat_photo.d.ts +19 -1
  561. package/script/types/0_chat_photo.js +19 -2
  562. package/script/types/0_connection_state.d.ts +19 -0
  563. package/script/types/0_connection_state.js +19 -0
  564. package/script/types/0_contact.d.ts +19 -0
  565. package/script/types/0_contact.js +19 -0
  566. package/script/types/0_dice.d.ts +19 -0
  567. package/script/types/0_dice.js +19 -0
  568. package/script/types/0_file_source.d.ts +19 -0
  569. package/script/types/0_file_source.js +19 -0
  570. package/script/types/0_giveaway_parameters.d.ts +19 -0
  571. package/script/types/0_giveaway_parameters.js +19 -0
  572. package/script/types/0_id.d.ts +19 -0
  573. package/script/types/0_id.js +19 -0
  574. package/script/types/0_keyboard_button_poll_type.d.ts +19 -0
  575. package/script/types/0_keyboard_button_poll_type.js +19 -0
  576. package/script/types/0_link_preview.d.ts +19 -0
  577. package/script/types/0_link_preview.js +19 -0
  578. package/script/types/0_location.d.ts +19 -0
  579. package/script/types/0_location.js +19 -0
  580. package/script/types/0_login_url.d.ts +19 -0
  581. package/script/types/0_login_url.js +19 -0
  582. package/script/types/0_mask_position.d.ts +19 -0
  583. package/script/types/0_mask_position.js +19 -0
  584. package/script/types/0_message_entity.d.ts +19 -0
  585. package/script/types/0_message_entity.js +22 -3
  586. package/script/types/0_message_reference.d.ts +19 -0
  587. package/script/types/0_message_reference.js +19 -0
  588. package/script/types/0_message_search_filter.d.ts +19 -0
  589. package/script/types/0_message_search_filter.js +21 -2
  590. package/script/types/0_mini_app_info.d.ts +19 -0
  591. package/script/types/0_mini_app_info.js +19 -0
  592. package/script/types/0_network_statistics_entry.d.ts +19 -0
  593. package/script/types/0_network_statistics_entry.js +19 -0
  594. package/script/types/0_parse_mode.d.ts +19 -0
  595. package/script/types/0_parse_mode.js +19 -0
  596. package/script/types/0_poll_option.d.ts +19 -0
  597. package/script/types/0_poll_option.js +19 -0
  598. package/script/types/0_price_tag.d.ts +19 -0
  599. package/script/types/0_price_tag.js +19 -0
  600. package/script/types/0_reaction.d.ts +19 -0
  601. package/script/types/0_reaction.js +21 -2
  602. package/script/types/0_restriction_reason.d.ts +19 -0
  603. package/script/types/0_restriction_reason.js +19 -0
  604. package/script/types/0_story_reference.d.ts +19 -0
  605. package/script/types/0_story_reference.js +19 -0
  606. package/script/types/0_thumbnail.d.ts +19 -0
  607. package/script/types/0_thumbnail.js +19 -0
  608. package/script/types/0_voice.d.ts +19 -0
  609. package/script/types/0_voice.js +19 -0
  610. package/script/types/1_animation.d.ts +19 -0
  611. package/script/types/1_animation.js +19 -0
  612. package/script/types/1_audio.d.ts +19 -0
  613. package/script/types/1_audio.js +19 -0
  614. package/script/types/1_bot_command_scope.d.ts +19 -0
  615. package/script/types/1_bot_command_scope.js +22 -3
  616. package/script/types/1_chat_p.d.ts +19 -0
  617. package/script/types/1_chat_p.js +21 -1
  618. package/script/types/1_document.d.ts +19 -0
  619. package/script/types/1_document.js +19 -0
  620. package/script/types/1_giveaway.d.ts +19 -0
  621. package/script/types/1_giveaway.js +19 -0
  622. package/script/types/1_inline_query_result_button.d.ts +19 -0
  623. package/script/types/1_inline_query_result_button.js +19 -0
  624. package/script/types/1_input_message_content.d.ts +19 -0
  625. package/script/types/1_input_message_content.js +19 -0
  626. package/script/types/1_input_story_content.d.ts +19 -0
  627. package/script/types/1_input_story_content.js +19 -0
  628. package/script/types/1_keyboard_button.d.ts +19 -0
  629. package/script/types/1_keyboard_button.js +22 -3
  630. package/script/types/1_message_reaction.d.ts +19 -0
  631. package/script/types/1_message_reaction.js +21 -2
  632. package/script/types/1_network_statistics.d.ts +19 -0
  633. package/script/types/1_network_statistics.js +19 -0
  634. package/script/types/1_photo.d.ts +19 -0
  635. package/script/types/1_photo.js +19 -0
  636. package/script/types/1_poll.d.ts +19 -0
  637. package/script/types/1_poll.js +19 -0
  638. package/script/types/1_reaction_count.d.ts +19 -0
  639. package/script/types/1_reaction_count.js +19 -0
  640. package/script/types/1_reply_quote.d.ts +19 -0
  641. package/script/types/1_reply_quote.js +19 -0
  642. package/script/types/1_sticker.d.ts +19 -0
  643. package/script/types/1_sticker.js +19 -0
  644. package/script/types/1_story_privacy.d.ts +19 -0
  645. package/script/types/1_story_privacy.js +22 -3
  646. package/script/types/1_story_reaction.d.ts +19 -0
  647. package/script/types/1_story_reaction.js +19 -0
  648. package/script/types/1_user.d.ts +19 -0
  649. package/script/types/1_user.js +19 -0
  650. package/script/types/1_venue.d.ts +19 -0
  651. package/script/types/1_venue.js +19 -0
  652. package/script/types/1_video.d.ts +19 -0
  653. package/script/types/1_video.js +19 -0
  654. package/script/types/1_video_note.d.ts +19 -0
  655. package/script/types/1_video_note.js +19 -0
  656. package/script/types/2_business_connection.d.ts +19 -0
  657. package/script/types/2_business_connection.js +19 -0
  658. package/script/types/2_chat_member.d.ts +19 -0
  659. package/script/types/2_chat_member.js +24 -4
  660. package/script/types/2_chosen_inline_result.d.ts +19 -0
  661. package/script/types/2_chosen_inline_result.js +21 -1
  662. package/script/types/2_game.d.ts +19 -0
  663. package/script/types/2_game.js +19 -0
  664. package/script/types/2_inactive_chat.d.ts +19 -0
  665. package/script/types/2_inactive_chat.js +21 -1
  666. package/script/types/2_inline_keyboard_button.d.ts +19 -0
  667. package/script/types/2_inline_keyboard_button.js +22 -3
  668. package/script/types/2_inline_query.d.ts +19 -0
  669. package/script/types/2_inline_query.js +22 -3
  670. package/script/types/2_invite_link.d.ts +19 -0
  671. package/script/types/2_invite_link.js +21 -1
  672. package/script/types/2_message_interactions.d.ts +19 -0
  673. package/script/types/2_message_interactions.js +19 -0
  674. package/script/types/2_message_reaction_count.d.ts +19 -0
  675. package/script/types/2_message_reaction_count.js +19 -0
  676. package/script/types/2_message_reactions.d.ts +19 -0
  677. package/script/types/2_message_reactions.js +19 -0
  678. package/script/types/2_story_content.d.ts +19 -0
  679. package/script/types/2_story_content.js +24 -5
  680. package/script/types/2_story_interactions.d.ts +19 -0
  681. package/script/types/2_story_interactions.js +19 -0
  682. package/script/types/2_story_interactive_area.d.ts +19 -0
  683. package/script/types/2_story_interactive_area.js +24 -5
  684. package/script/types/3_chat_member_updated.d.ts +19 -0
  685. package/script/types/3_chat_member_updated.js +22 -2
  686. package/script/types/3_reply_markup.d.ts +19 -0
  687. package/script/types/3_reply_markup.js +22 -2
  688. package/script/types/3_story.d.ts +19 -0
  689. package/script/types/3_story.js +21 -1
  690. package/script/types/4_inline_query_result.d.ts +19 -0
  691. package/script/types/4_inline_query_result.js +24 -5
  692. package/script/types/4_message.d.ts +19 -0
  693. package/script/types/4_message.js +35 -15
  694. package/script/types/5_callback_query.d.ts +19 -0
  695. package/script/types/5_callback_query.js +22 -2
  696. package/script/types/5_chat.d.ts +19 -0
  697. package/script/types/5_chat.js +26 -6
  698. package/script/types/6_update.d.ts +19 -0
  699. package/script/types/6_update.js +19 -0
  700. package/script/types/_file_id.d.ts +19 -0
  701. package/script/types/_file_id.js +27 -7
  702. package/script/types/_getters.d.ts +19 -0
  703. package/script/types/_getters.js +19 -0
  704. package/script/utilities/0_bigint.d.ts +1 -0
  705. package/script/utilities/0_bigint.js +46 -1
  706. package/script/utilities/0_buffer.d.ts +19 -0
  707. package/script/utilities/0_buffer.js +19 -0
  708. package/script/utilities/0_cache_map.d.ts +19 -0
  709. package/script/utilities/0_cache_map.js +19 -0
  710. package/script/utilities/0_color.d.ts +19 -0
  711. package/script/utilities/0_color.js +19 -0
  712. package/script/utilities/0_crypto.d.ts +19 -0
  713. package/script/utilities/0_crypto.js +19 -0
  714. package/script/utilities/0_hash.js +19 -0
  715. package/script/utilities/0_logger.d.ts +27 -0
  716. package/script/utilities/0_logger.js +30 -6
  717. package/script/utilities/0_mutex.d.ts +19 -0
  718. package/script/utilities/0_mutex.js +19 -0
  719. package/script/utilities/0_object.d.ts +19 -0
  720. package/script/utilities/0_object.js +19 -0
  721. package/script/utilities/0_rle.d.ts +19 -0
  722. package/script/utilities/0_rle.js +19 -0
  723. package/script/utilities/0_types.d.ts +19 -0
  724. package/script/utilities/0_types.js +19 -0
  725. package/script/utilities/1_auth.js +19 -0
  726. package/script/utilities/1_base64.d.ts +19 -0
  727. package/script/utilities/1_base64.js +19 -0
  728. package/script/utilities/1_math.d.ts +20 -0
  729. package/script/utilities/1_math.js +74 -0
  730. package/script/utilities/1_misc.d.ts +19 -0
  731. package/script/utilities/1_misc.js +21 -2
  732. package/script/utilities/1_queue.d.ts +19 -0
  733. package/script/utilities/1_queue.js +19 -0
  734. package/esm/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +0 -324
  735. package/esm/utilities/0_control.d.ts +0 -1
  736. package/esm/utilities/0_control.js +0 -3
  737. package/script/deps/deno.land/x/tgcrypto@0.3.3/tgcrypto.js +0 -326
  738. package/script/utilities/0_control.d.ts +0 -1
  739. package/script/utilities/0_control.js +0 -7
  740. /package/{LICENSE → COPYING.LESSER} +0 -0
  741. /package/esm/deps/deno.land/x/{tgcrypto@0.3.3 → tgcrypto@0.4.0}/tgcrypto.d.ts +0 -0
  742. /package/script/deps/deno.land/x/{tgcrypto@0.3.3 → tgcrypto@0.4.0}/tgcrypto.d.ts +0 -0
@@ -82,7 +82,7 @@ const MAX_BITS = 15;
82
82
  /* All codes must not exceed MAX_BITS bits */
83
83
  const MIN_MATCH = 3;
84
84
  const MAX_MATCH = 258;
85
- const MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1;
85
+ const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
86
86
  const PRESET_DICT = 0x20;
87
87
  const INIT_STATE = 42;
88
88
  const EXTRA_STATE = 69;
@@ -101,7 +101,7 @@ function err(strm, errorCode) {
101
101
  return errorCode;
102
102
  }
103
103
  function rank(f) {
104
- return (f << 1) - (f > 4 ? 9 : 0);
104
+ return ((f) << 1) - ((f) > 4 ? 9 : 0);
105
105
  }
106
106
  function zero(buf) {
107
107
  buf.fill(0, 0, buf.length);
@@ -132,7 +132,7 @@ function flush_pending(strm) {
132
132
  }
133
133
  }
134
134
  function flush_block_only(s, last) {
135
- trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last);
135
+ trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
136
136
  s.block_start = s.strstart;
137
137
  flush_pending(s.strm);
138
138
  }
@@ -320,13 +320,13 @@ function fill_window(s) {
320
320
  p = n;
321
321
  do {
322
322
  m = s.head[--p];
323
- s.head[p] = m >= _w_size ? m - _w_size : 0;
323
+ s.head[p] = (m >= _w_size ? m - _w_size : 0);
324
324
  } while (--n);
325
325
  n = _w_size;
326
326
  p = n;
327
327
  do {
328
328
  m = s.prev[--p];
329
- s.prev[p] = m >= _w_size ? m - _w_size : 0;
329
+ s.prev[p] = (m >= _w_size ? m - _w_size : 0);
330
330
  /* If n is not on any hash chain, prev[n] is garbage but
331
331
  * its value will never be used.
332
332
  */
@@ -607,7 +607,7 @@ function deflate_fast(s, flush) {
607
607
  /***/
608
608
  }
609
609
  }
610
- s.insert = (s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1;
610
+ s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
611
611
  if (flush === status_js_1.default.Z_FINISH) {
612
612
  /*** FLUSH_BLOCK(s, 1); ***/
613
613
  flush_block_only(s, true);
@@ -1467,7 +1467,7 @@ function deflateResetKeep(strm) {
1467
1467
  s.wrap = -s.wrap;
1468
1468
  /* was made negative by deflate(..., Z_FINISH); */
1469
1469
  }
1470
- s.status = s.wrap ? INIT_STATE : BUSY_STATE;
1470
+ s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
1471
1471
  strm.adler = (s.wrap === 2)
1472
1472
  ? 0 // crc32(0, Z_NULL, 0)
1473
1473
  : 1; // adler32(0, Z_NULL, 0)
@@ -1630,7 +1630,7 @@ function deflate(strm, flush) {
1630
1630
  else {
1631
1631
  level_flags = 3;
1632
1632
  }
1633
- header |= level_flags << 6;
1633
+ header |= (level_flags << 6);
1634
1634
  if (s.strstart !== 0)
1635
1635
  header |= PRESET_DICT;
1636
1636
  header += 31 - (header % 31);
@@ -315,8 +315,8 @@ function inflate_fast(strm, start) {
315
315
  /* update state and return */
316
316
  strm.next_in = _in;
317
317
  strm.next_out = _out;
318
- strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);
319
- strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);
318
+ strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
319
+ strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
320
320
  state.hold = hold;
321
321
  state.bits = bits;
322
322
  return;
@@ -630,7 +630,7 @@ function inflate(strm, flush) {
630
630
  break;
631
631
  }
632
632
  if (state.head) {
633
- state.head.text = (hold >> 8) & 1;
633
+ state.head.text = ((hold >> 8) & 1);
634
634
  }
635
635
  if (state.flags & 0x0200) {
636
636
  //=== CRC2(state.check, hold);
@@ -684,8 +684,8 @@ function inflate(strm, flush) {
684
684
  }
685
685
  //===//
686
686
  if (state.head) {
687
- state.head.xflags = hold & 0xff;
688
- state.head.os = hold >> 8;
687
+ state.head.xflags = (hold & 0xff);
688
+ state.head.os = (hold >> 8);
689
689
  }
690
690
  if (state.flags & 0x0200) {
691
691
  //=== CRC2(state.check, hold);
@@ -841,7 +841,7 @@ function inflate(strm, flush) {
841
841
  //===//
842
842
  }
843
843
  if (state.head) {
844
- state.head.hcrc = (state.flags >> 9) & 1;
844
+ state.head.hcrc = ((state.flags >> 9) & 1);
845
845
  state.head.done = true;
846
846
  }
847
847
  strm.adler = state.check = 0;
@@ -901,7 +901,7 @@ function inflate(strm, flush) {
901
901
  bits += 8;
902
902
  }
903
903
  //===//
904
- state.last = hold & 0x01 /*BITS(1)*/;
904
+ state.last = (hold & 0x01) /*BITS(1)*/;
905
905
  //--- DROPBITS(1) ---//
906
906
  hold >>>= 1;
907
907
  bits -= 1;
@@ -1041,7 +1041,7 @@ function inflate(strm, flush) {
1041
1041
  bits += 8;
1042
1042
  }
1043
1043
  //===//
1044
- state.lens[order[state.have++]] = hold & 0x07; //BITS(3);
1044
+ state.lens[order[state.have++]] = (hold & 0x07); //BITS(3);
1045
1045
  //--- DROPBITS(3) ---//
1046
1046
  hold >>>= 3;
1047
1047
  bits -= 3;
@@ -1076,7 +1076,7 @@ function inflate(strm, flush) {
1076
1076
  here_bits = here >>> 24;
1077
1077
  here_op = (here >>> 16) & 0xff;
1078
1078
  here_val = here & 0xffff;
1079
- if (here_bits <= bits)
1079
+ if ((here_bits) <= bits)
1080
1080
  break;
1081
1081
  //--- PULLBYTE() ---//
1082
1082
  if (have === 0)
@@ -1350,7 +1350,7 @@ function inflate(strm, flush) {
1350
1350
  here_bits = here >>> 24;
1351
1351
  here_op = (here >>> 16) & 0xff;
1352
1352
  here_val = here & 0xffff;
1353
- if (here_bits <= bits)
1353
+ if ((here_bits) <= bits)
1354
1354
  break;
1355
1355
  //--- PULLBYTE() ---//
1356
1356
  if (have === 0)
@@ -1399,7 +1399,7 @@ function inflate(strm, flush) {
1399
1399
  break;
1400
1400
  }
1401
1401
  state.offset = here_val;
1402
- state.extra = here_op & 15;
1402
+ state.extra = (here_op) & 15;
1403
1403
  state.mode = DISTEXT;
1404
1404
  /* falls through */
1405
1405
  case DISTEXT:
@@ -1510,12 +1510,11 @@ function inflate(strm, flush) {
1510
1510
  strm.total_out += _out;
1511
1511
  state.total += _out;
1512
1512
  if (_out) {
1513
- strm.adler =
1514
- state.check =
1515
- /*UPDATE(state.check, put - _out, _out);*/
1516
- state.flags
1517
- ? (0, crc32_js_1.crc32)(state.check, output, _out, put - _out)
1518
- : (0, adler32_js_1.default)(state.check, output, _out, put - _out);
1513
+ strm.adler = state.check =
1514
+ /*UPDATE(state.check, put - _out, _out);*/
1515
+ (state.flags
1516
+ ? (0, crc32_js_1.crc32)(state.check, output, _out, put - _out)
1517
+ : (0, adler32_js_1.default)(state.check, output, _out, put - _out));
1519
1518
  }
1520
1519
  _out = left;
1521
1520
  // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
@@ -1598,12 +1597,11 @@ function inflate(strm, flush) {
1598
1597
  strm.total_out += _out;
1599
1598
  state.total += _out;
1600
1599
  if (state.wrap && _out) {
1601
- strm.adler =
1602
- state
1603
- .check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1604
- state.flags
1605
- ? (0, crc32_js_1.crc32)(state.check, output, _out, strm.next_out - _out)
1606
- : (0, adler32_js_1.default)(state.check, output, _out, strm.next_out - _out);
1600
+ strm.adler = state
1601
+ .check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1602
+ (state.flags
1603
+ ? (0, crc32_js_1.crc32)(state.check, output, _out, strm.next_out - _out)
1604
+ : (0, adler32_js_1.default)(state.check, output, _out, strm.next_out - _out));
1607
1605
  }
1608
1606
  strm.data_type = state.bits + (state.last ? 64 : 0) +
1609
1607
  (state.mode === TYPE ? 128 : 0) +
@@ -264,7 +264,7 @@ function d_code(dist) {
264
264
  function put_short(s, w) {
265
265
  // put_byte(s, (uch)((w) & 0xff));
266
266
  // put_byte(s, (uch)((ush)(w) >> 8));
267
- s.pending_buf[s.pending++] = w & 0xff;
267
+ s.pending_buf[s.pending++] = (w) & 0xff;
268
268
  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
269
269
  }
270
270
  /* ===========================================================================
@@ -699,7 +699,7 @@ function build_tree(s, desc) {
699
699
  * two codes of non zero frequency.
700
700
  */
701
701
  while (s.heap_len < 2) {
702
- node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0;
702
+ node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
703
703
  tree[node * 2] /*.Freq*/ = 1;
704
704
  s.depth[node] = 0;
705
705
  s.opt_len--;
@@ -712,7 +712,7 @@ function build_tree(s, desc) {
712
712
  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
713
713
  * establish sub-heaps of increasing lengths:
714
714
  */
715
- for (n = s.heap_len >> 1 /*int /2*/; n >= 1; n--)
715
+ for (n = (s.heap_len >> 1 /*int /2*/); n >= 1; n--)
716
716
  pqdownheap(s, tree, n);
717
717
  /* Construct the Huffman tree by repeatedly combining the least two
718
718
  * frequent nodes.
package/script/mod.d.ts CHANGED
@@ -1,5 +1,24 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  export * from "./0_errors.js";
2
- export { getColorFromPeerId, getColorName, getRandomId, setLogVerbosity } from "./1_utilities.js";
21
+ export { getColorFromPeerId, getColorName, getRandomId, type LoggingProvider, setLoggingProvider, setLogVerbosity } from "./1_utilities.js";
3
22
  export { checkPassword } from "./client/0_password.js";
4
23
  export * from "./2_connection.js";
5
24
  export * from "./3_storage.js";
package/script/mod.js CHANGED
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
22
  if (k2 === undefined) k2 = k;
4
23
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -26,12 +45,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
45
  return result;
27
46
  };
28
47
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.setLogVerbosity = exports.getRandomId = exports.getColorName = exports.getColorFromPeerId = void 0;
48
+ exports.errors = exports.SYSTEM_VERSION = exports.SYSTEM_LANG_CODE = exports.LAYER = exports.LANG_PACK = exports.LANG_CODE = exports.INITIAL_DC = exports.DEVICE_MODEL = exports.APP_VERSION = exports.checkPassword = exports.setLogVerbosity = exports.setLoggingProvider = exports.getRandomId = exports.getColorName = exports.getColorFromPeerId = void 0;
30
49
  __exportStar(require("./0_errors.js"), exports);
31
50
  var _1_utilities_js_1 = require("./1_utilities.js");
32
51
  Object.defineProperty(exports, "getColorFromPeerId", { enumerable: true, get: function () { return _1_utilities_js_1.getColorFromPeerId; } });
33
52
  Object.defineProperty(exports, "getColorName", { enumerable: true, get: function () { return _1_utilities_js_1.getColorName; } });
34
53
  Object.defineProperty(exports, "getRandomId", { enumerable: true, get: function () { return _1_utilities_js_1.getRandomId; } });
54
+ Object.defineProperty(exports, "setLoggingProvider", { enumerable: true, get: function () { return _1_utilities_js_1.setLoggingProvider; } });
35
55
  Object.defineProperty(exports, "setLogVerbosity", { enumerable: true, get: function () { return _1_utilities_js_1.setLogVerbosity; } });
36
56
  var _0_password_js_1 = require("./client/0_password.js");
37
57
  Object.defineProperty(exports, "checkPassword", { enumerable: true, get: function () { return _0_password_js_1.checkPassword; } });
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { MaybePromise } from "../1_utilities.js";
2
21
  import { AnyEntity, enums, ReadObject, TLObject, types } from "../2_tl.js";
3
22
  import { DC } from "../3_transport.js";
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
22
  if (kind === "m") throw new TypeError("Private method is not writable");
4
23
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -13,6 +32,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
32
  var _Storage_instances, _Storage_authKeyId, _Storage_resetAuthKeyId, _Storage_accountId, _Storage_accountType, _Storage_getUpdateId;
14
33
  Object.defineProperty(exports, "__esModule", { value: true });
15
34
  exports.Storage = exports.K = void 0;
35
+ const _0_deps_js_1 = require("../0_deps.js");
16
36
  const _1_utilities_js_1 = require("../1_utilities.js");
17
37
  const _2_tl_js_1 = require("../2_tl.js");
18
38
  // key parts
@@ -135,7 +155,7 @@ class Storage {
135
155
  const channel = await this.getEntity(id);
136
156
  if (channel) {
137
157
  if (!(channel instanceof _2_tl_js_1.types.Channel) && !(channel instanceof _2_tl_js_1.types.ChannelForbidden)) {
138
- (0, _1_utilities_js_1.UNREACHABLE)();
158
+ (0, _0_deps_js_1.unreachable)();
139
159
  }
140
160
  return typeof channel.access_hash === "bigint" ? channel.access_hash : null;
141
161
  }
@@ -147,7 +167,7 @@ class Storage {
147
167
  const user = await this.getEntity(id);
148
168
  if (user) {
149
169
  if (!(user instanceof _2_tl_js_1.types.User)) {
150
- (0, _1_utilities_js_1.UNREACHABLE)();
170
+ (0, _0_deps_js_1.unreachable)();
151
171
  }
152
172
  return typeof user.access_hash === "bigint" ? user.access_hash : null;
153
173
  }
@@ -251,10 +271,10 @@ class Storage {
251
271
  async setAccountType(type) {
252
272
  try {
253
273
  await this.getAccountType();
254
- (0, _1_utilities_js_1.UNREACHABLE)();
274
+ (0, _0_deps_js_1.unreachable)();
255
275
  }
256
276
  catch (err) {
257
- if (!(err instanceof Error) || !(err.message == "Unreachable")) {
277
+ if (!(err instanceof _0_deps_js_1.AssertionError)) {
258
278
  throw err;
259
279
  }
260
280
  else {
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { StorageKeyPart } from "./0_storage.js";
2
21
  export declare enum ValueType {
3
22
  Boolean = 0,
@@ -8,7 +27,6 @@ export declare enum ValueType {
8
27
  Uint8Array = 5,
9
28
  Array = 6
10
29
  }
11
- export declare const WEB_STORAGE_PREFIX_EXP: RegExp;
12
30
  export declare function toString(value: unknown): string;
13
31
  export declare function fromString<T>(string: string): T;
14
32
  export declare function fixKey(key: readonly StorageKeyPart[]): IDBValidKey[];
@@ -1,8 +1,27 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInRange = exports.getPrefixKeyRange = exports.restoreKey = exports.fixKey = exports.fromString = exports.toString = exports.WEB_STORAGE_PREFIX_EXP = exports.ValueType = void 0;
22
+ exports.isInRange = exports.getPrefixKeyRange = exports.restoreKey = exports.fixKey = exports.fromString = exports.toString = exports.ValueType = void 0;
4
23
  const _0_deps_js_1 = require("../0_deps.js");
5
- const _1_utilities_js_1 = require("../1_utilities.js");
24
+ const _0_deps_js_2 = require("../0_deps.js");
6
25
  var ValueType;
7
26
  (function (ValueType) {
8
27
  ValueType[ValueType["Boolean"] = 0] = "Boolean";
@@ -13,7 +32,6 @@ var ValueType;
13
32
  ValueType[ValueType["Uint8Array"] = 5] = "Uint8Array";
14
33
  ValueType[ValueType["Array"] = 6] = "Array";
15
34
  })(ValueType || (exports.ValueType = ValueType = {}));
16
- exports.WEB_STORAGE_PREFIX_EXP = /^[\d\w]+$/;
17
35
  function toString(value) {
18
36
  if (typeof value === "boolean") {
19
37
  return `${ValueType.Boolean}${Number(value)}`;
@@ -46,7 +64,7 @@ function toString(value) {
46
64
  return `${ValueType.Array}${items.join("\n")}`;
47
65
  }
48
66
  else {
49
- (0, _1_utilities_js_1.UNREACHABLE)();
67
+ (0, _0_deps_js_2.unreachable)();
50
68
  }
51
69
  }
52
70
  exports.toString = toString;
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
2
21
  export interface StorageIndexedDBParams {
3
22
  /** Whether to store files. Defaults to true. */
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
22
  if (kind === "m") throw new TypeError("Private method is not writable");
4
23
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
2
21
  export declare class StorageLocalStorage extends Storage implements Storage {
3
22
  #private;
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
22
  if (kind === "m") throw new TypeError("Private method is not writable");
4
23
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -23,9 +42,6 @@ class StorageLocalStorage extends _0_storage_js_1.Storage {
23
42
  if (prefix.length <= 0) {
24
43
  throw new Error("Empty prefix");
25
44
  }
26
- else if (!_1_utilities_js_1.WEB_STORAGE_PREFIX_EXP.test(prefix)) {
27
- throw new Error("Unallowed prefix");
28
- }
29
45
  super();
30
46
  _StorageLocalStorage_prefix.set(this, void 0);
31
47
  __classPrivateFieldSet(this, _StorageLocalStorage_prefix, prefix, "f");
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { MaybePromise } from "../1_utilities.js";
2
21
  import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
3
22
  export declare class StorageMemory extends Storage implements Storage {
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
5
+ *
6
+ * This file is part of MTKruto.
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Lesser General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
2
21
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
22
  if (kind === "m") throw new TypeError("Private method is not writable");
4
23
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
@@ -1,3 +1,22 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
1
20
  import { MaybePromise } from "../1_utilities.js";
2
21
  import { GetManyFilter, Storage, StorageKeyPart } from "./0_storage.js";
3
22
  export declare class StorageSessionStorage extends Storage implements Storage {