@mtkruto/node 0.67.2 → 0.68.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 (244) hide show
  1. package/esm/0_errors.js +2 -6
  2. package/esm/3_errors.js +2 -12
  3. package/esm/3_types.d.ts +1 -0
  4. package/esm/3_types.d.ts.map +1 -1
  5. package/esm/3_types.js +1 -0
  6. package/esm/4_errors.js +2 -12
  7. package/esm/_dnt.polyfills.d.ts +99 -0
  8. package/esm/_dnt.polyfills.d.ts.map +1 -1
  9. package/esm/_dnt.polyfills.js +127 -1
  10. package/esm/_dnt.test_polyfills.d.ts.map +1 -0
  11. package/esm/client/0_filters_test.d.ts.map +1 -1
  12. package/esm/client/0_markdown_test.d.ts.map +1 -1
  13. package/esm/client/0_params.d.ts +2 -0
  14. package/esm/client/0_params.d.ts.map +1 -1
  15. package/esm/client/0_password.d.ts +5 -5
  16. package/esm/client/0_password.d.ts.map +1 -1
  17. package/esm/client/0_password_test.d.ts.map +1 -1
  18. package/esm/client/0_storage_operations.js +143 -155
  19. package/esm/client/0_storage_operations_test.d.ts.map +1 -1
  20. package/esm/client/0_utilities.d.ts +1 -1
  21. package/esm/client/0_utilities_test.d.ts.map +1 -1
  22. package/esm/client/1_client_plain.js +4 -22
  23. package/esm/client/1_composer.js +8 -21
  24. package/esm/client/2_account_manager.js +85 -97
  25. package/esm/client/2_bot_info_manager.js +26 -38
  26. package/esm/client/2_business_connection_manager.js +10 -23
  27. package/esm/client/2_client_encrypted.js +194 -211
  28. package/esm/client/2_file_manager.d.ts +4 -3
  29. package/esm/client/2_file_manager.d.ts.map +1 -1
  30. package/esm/client/2_file_manager.js +268 -224
  31. package/esm/client/2_file_manager_test.d.ts.map +1 -1
  32. package/esm/client/2_network_statistics_manager.js +8 -21
  33. package/esm/client/2_payment_manager.js +7 -20
  34. package/esm/client/2_reaction_manager.js +7 -20
  35. package/esm/client/2_translations_manager.js +97 -107
  36. package/esm/client/2_update_manager.js +764 -759
  37. package/esm/client/3_client_encrypted_pool.js +10 -26
  38. package/esm/client/3_client_encrypted_pool_test.d.ts.map +1 -1
  39. package/esm/client/3_message_manager.d.ts +1 -1
  40. package/esm/client/3_message_manager.js +441 -448
  41. package/esm/client/3_message_manager_test.d.ts.map +1 -1
  42. package/esm/client/3_video_chat_manager.d.ts +1 -1
  43. package/esm/client/3_video_chat_manager.js +57 -68
  44. package/esm/client/4_callback_query_manager.js +18 -30
  45. package/esm/client/4_chat_list_manager.js +322 -318
  46. package/esm/client/4_chat_manager.js +118 -131
  47. package/esm/client/4_forum_manager.js +67 -73
  48. package/esm/client/4_gift_manager.js +16 -29
  49. package/esm/client/4_inline_query_manager.js +16 -28
  50. package/esm/client/4_link_preview_manager.js +6 -19
  51. package/esm/client/4_poll_manager.js +44 -57
  52. package/esm/client/4_story_manager.js +41 -53
  53. package/esm/client/5_client.d.ts +7 -0
  54. package/esm/client/5_client.d.ts.map +1 -1
  55. package/esm/client/5_client.js +1269 -1288
  56. package/esm/connection/1_connection_tcp.node.js +48 -65
  57. package/esm/connection/1_connection_web_socket.js +75 -91
  58. package/esm/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
  59. package/esm/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.js +31 -47
  60. package/esm/deps/jsr.io/@std/async/1.0.13/tee.js +11 -34
  61. package/esm/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
  62. package/esm/mod.js +2 -12
  63. package/esm/session/0_session_state.js +12 -38
  64. package/esm/session/1_session.js +49 -72
  65. package/esm/session/2_session_encrypted.js +324 -320
  66. package/esm/storage/1_utilities_test.d.ts.map +1 -1
  67. package/esm/storage/2_storage_indexed_db.js +26 -44
  68. package/esm/storage/2_storage_local_storage.node.js +12 -25
  69. package/esm/storage/2_storage_memory.js +24 -41
  70. package/esm/storage/2_storage_session_storage.js +3 -16
  71. package/esm/tl/0_utilities_test.d.ts.map +1 -1
  72. package/esm/tl/1_tl_reader.js +80 -88
  73. package/esm/tl/1_tl_reader_test.d.ts.map +1 -1
  74. package/esm/tl/1_tl_writer.js +155 -164
  75. package/esm/tl/1_tl_writer_test.d.ts.map +1 -1
  76. package/esm/transport/0_transport.js +1 -8
  77. package/esm/transport/1_transport_abridged.js +11 -24
  78. package/esm/transport/1_transport_intermediate.js +10 -23
  79. package/esm/transport/2_transport_provider_web_socket.d.ts.map +1 -1
  80. package/esm/types/0_upload_progress.d.ts +29 -0
  81. package/esm/types/0_upload_progress.d.ts.map +1 -0
  82. package/esm/types/0_upload_progress.js +20 -0
  83. package/esm/types/1_sticker.d.ts +1 -1
  84. package/esm/types/1_sticker.d.ts.map +1 -1
  85. package/esm/types/2_poll_answer.d.ts +19 -0
  86. package/esm/types/2_poll_answer.d.ts.map +1 -1
  87. package/esm/types/2_poll_answer.js +19 -0
  88. package/esm/types/7_update.d.ts +21 -2
  89. package/esm/types/7_update.d.ts.map +1 -1
  90. package/esm/utilities/0_bigint_test.d.ts.map +1 -1
  91. package/esm/utilities/0_buffer.d.ts +1 -1
  92. package/esm/utilities/0_buffer.d.ts.map +1 -1
  93. package/esm/utilities/0_buffer_test.d.ts.map +1 -1
  94. package/esm/utilities/0_hash.d.ts +2 -2
  95. package/esm/utilities/0_hash.d.ts.map +1 -1
  96. package/esm/utilities/0_mutex.js +4 -19
  97. package/esm/utilities/0_part_stream.js +11 -25
  98. package/esm/utilities/0_part_stream_test.d.ts.map +1 -1
  99. package/esm/utilities/0_rle.d.ts +2 -2
  100. package/esm/utilities/0_rle.d.ts.map +1 -1
  101. package/esm/utilities/0_rle_test.d.ts.map +1 -1
  102. package/esm/utilities/0_text.d.ts +20 -1
  103. package/esm/utilities/0_text.d.ts.map +1 -1
  104. package/esm/utilities/0_text.js +19 -0
  105. package/esm/utilities/1_auth.d.ts +1 -1
  106. package/esm/utilities/1_auth.d.ts.map +1 -1
  107. package/esm/utilities/1_base64.d.ts +1 -1
  108. package/esm/utilities/1_base64.d.ts.map +1 -1
  109. package/esm/utilities/1_base64_test.d.ts.map +1 -1
  110. package/esm/utilities/1_crypto.js +42 -53
  111. package/esm/utilities/1_crypto_test.d.ts.map +1 -1
  112. package/esm/utilities/1_logger.d.ts +2 -2
  113. package/esm/utilities/1_math_test.d.ts.map +1 -1
  114. package/esm/utilities/2_queue.js +29 -47
  115. package/package.json +1 -1
  116. package/script/0_errors.js +2 -6
  117. package/script/2_tl.js +17 -7
  118. package/script/3_errors.js +2 -12
  119. package/script/3_types.d.ts +1 -0
  120. package/script/3_types.d.ts.map +1 -1
  121. package/script/3_types.js +1 -0
  122. package/script/4_constants.js +17 -7
  123. package/script/4_errors.js +2 -12
  124. package/script/_dnt.polyfills.d.ts +99 -0
  125. package/script/_dnt.polyfills.d.ts.map +1 -1
  126. package/script/_dnt.polyfills.js +128 -0
  127. package/script/_dnt.test_polyfills.d.ts.map +1 -0
  128. package/script/client/0_filters_test.d.ts.map +1 -1
  129. package/script/client/0_markdown_test.d.ts.map +1 -1
  130. package/script/client/0_params.d.ts +2 -0
  131. package/script/client/0_params.d.ts.map +1 -1
  132. package/script/client/0_password.d.ts +5 -5
  133. package/script/client/0_password.d.ts.map +1 -1
  134. package/script/client/0_password.js +17 -7
  135. package/script/client/0_password_test.d.ts.map +1 -1
  136. package/script/client/0_storage_operations.js +143 -155
  137. package/script/client/0_storage_operations_test.d.ts.map +1 -1
  138. package/script/client/0_utilities.d.ts +1 -1
  139. package/script/client/0_utilities_test.d.ts.map +1 -1
  140. package/script/client/1_client_plain.js +4 -22
  141. package/script/client/1_composer.js +8 -21
  142. package/script/client/2_account_manager.js +85 -97
  143. package/script/client/2_bot_info_manager.js +26 -38
  144. package/script/client/2_business_connection_manager.js +10 -23
  145. package/script/client/2_client_encrypted.js +195 -212
  146. package/script/client/2_file_manager.d.ts +4 -3
  147. package/script/client/2_file_manager.d.ts.map +1 -1
  148. package/script/client/2_file_manager.js +285 -231
  149. package/script/client/2_file_manager_test.d.ts.map +1 -1
  150. package/script/client/2_network_statistics_manager.js +8 -21
  151. package/script/client/2_payment_manager.js +7 -20
  152. package/script/client/2_reaction_manager.js +7 -20
  153. package/script/client/2_translations_manager.js +98 -108
  154. package/script/client/2_update_manager.js +764 -759
  155. package/script/client/3_client_encrypted_pool.js +10 -26
  156. package/script/client/3_client_encrypted_pool_test.d.ts.map +1 -1
  157. package/script/client/3_message_manager.d.ts +1 -1
  158. package/script/client/3_message_manager.js +441 -448
  159. package/script/client/3_message_manager_test.d.ts.map +1 -1
  160. package/script/client/3_video_chat_manager.d.ts +1 -1
  161. package/script/client/3_video_chat_manager.js +57 -68
  162. package/script/client/4_callback_query_manager.js +18 -30
  163. package/script/client/4_chat_list_manager.js +322 -318
  164. package/script/client/4_chat_manager.js +118 -131
  165. package/script/client/4_forum_manager.js +67 -73
  166. package/script/client/4_gift_manager.js +16 -29
  167. package/script/client/4_inline_query_manager.js +16 -28
  168. package/script/client/4_link_preview_manager.js +6 -19
  169. package/script/client/4_poll_manager.js +44 -57
  170. package/script/client/4_story_manager.js +41 -53
  171. package/script/client/5_client.d.ts +7 -0
  172. package/script/client/5_client.d.ts.map +1 -1
  173. package/script/client/5_client.js +1269 -1288
  174. package/script/connection/1_connection_tcp.node.js +48 -65
  175. package/script/connection/1_connection_web_socket.js +92 -98
  176. package/script/deps/jsr.io/@roj/tgcrypto/1.0.1/dist/tgcrypto.js +3 -11
  177. package/script/deps/jsr.io/@std/assert/1.0.13/equal.js +17 -7
  178. package/script/deps/jsr.io/@std/async/1.0.13/delay.js +17 -7
  179. package/script/deps/jsr.io/@std/async/1.0.13/mux_async_iterator.js +31 -47
  180. package/script/deps/jsr.io/@std/async/1.0.13/tee.js +11 -34
  181. package/script/deps/jsr.io/@std/datetime/0.225.5/_date_time_formatter.js +4 -17
  182. package/script/deps/jsr.io/@std/internal/1.0.10/format.js +17 -7
  183. package/script/deps/jsr.io/@std/internal/1.0.10/styles.js +17 -7
  184. package/script/deps/jsr.io/@std/path/1.1.0/_os.js +17 -7
  185. package/script/mod.js +19 -19
  186. package/script/session/0_session_state.js +12 -38
  187. package/script/session/1_session.js +66 -79
  188. package/script/session/2_session_encrypted.js +325 -321
  189. package/script/storage/1_utilities_test.d.ts.map +1 -1
  190. package/script/storage/2_storage_indexed_db.js +26 -44
  191. package/script/storage/2_storage_local_storage.node.js +12 -25
  192. package/script/storage/2_storage_memory.js +24 -41
  193. package/script/storage/2_storage_session_storage.js +3 -16
  194. package/script/tl/0_utilities_test.d.ts.map +1 -1
  195. package/script/tl/1_tl_reader.js +81 -89
  196. package/script/tl/1_tl_reader_test.d.ts.map +1 -1
  197. package/script/tl/1_tl_writer.js +156 -165
  198. package/script/tl/1_tl_writer_test.d.ts.map +1 -1
  199. package/script/tl/2_telegram.js +17 -7
  200. package/script/transport/0_obfuscation.js +17 -7
  201. package/script/transport/0_transport.js +1 -8
  202. package/script/transport/1_transport_abridged.js +11 -24
  203. package/script/transport/1_transport_intermediate.js +10 -23
  204. package/script/transport/2_transport_provider_web_socket.d.ts.map +1 -1
  205. package/script/types/0_upload_progress.d.ts +29 -0
  206. package/script/types/0_upload_progress.d.ts.map +1 -0
  207. package/script/types/0_upload_progress.js +21 -0
  208. package/script/types/1_sticker.d.ts +1 -1
  209. package/script/types/1_sticker.d.ts.map +1 -1
  210. package/script/types/2_poll_answer.d.ts +19 -0
  211. package/script/types/2_poll_answer.d.ts.map +1 -1
  212. package/script/types/2_poll_answer.js +19 -0
  213. package/script/types/7_update.d.ts +21 -2
  214. package/script/types/7_update.d.ts.map +1 -1
  215. package/script/utilities/0_bigint.js +17 -7
  216. package/script/utilities/0_bigint_test.d.ts.map +1 -1
  217. package/script/utilities/0_buffer.d.ts +1 -1
  218. package/script/utilities/0_buffer.d.ts.map +1 -1
  219. package/script/utilities/0_buffer_test.d.ts.map +1 -1
  220. package/script/utilities/0_env.js +17 -7
  221. package/script/utilities/0_hash.d.ts +2 -2
  222. package/script/utilities/0_hash.d.ts.map +1 -1
  223. package/script/utilities/0_hash.js +17 -7
  224. package/script/utilities/0_misc.js +17 -7
  225. package/script/utilities/0_mutex.js +4 -19
  226. package/script/utilities/0_part_stream.js +11 -25
  227. package/script/utilities/0_part_stream_test.d.ts.map +1 -1
  228. package/script/utilities/0_rle.d.ts +2 -2
  229. package/script/utilities/0_rle.d.ts.map +1 -1
  230. package/script/utilities/0_rle_test.d.ts.map +1 -1
  231. package/script/utilities/0_text.d.ts +20 -1
  232. package/script/utilities/0_text.d.ts.map +1 -1
  233. package/script/utilities/0_text.js +19 -0
  234. package/script/utilities/1_auth.d.ts +1 -1
  235. package/script/utilities/1_auth.d.ts.map +1 -1
  236. package/script/utilities/1_auth.js +17 -7
  237. package/script/utilities/1_base64.d.ts +1 -1
  238. package/script/utilities/1_base64.d.ts.map +1 -1
  239. package/script/utilities/1_base64_test.d.ts.map +1 -1
  240. package/script/utilities/1_crypto.js +60 -61
  241. package/script/utilities/1_crypto_test.d.ts.map +1 -1
  242. package/script/utilities/1_logger.d.ts +2 -2
  243. package/script/utilities/1_math_test.d.ts.map +1 -1
  244. package/script/utilities/2_queue.js +30 -48
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 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
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -55,7 +55,7 @@ export interface Sticker {
55
55
  fileSize?: number;
56
56
  }
57
57
  /** @unlisted */
58
- export type StickerSetNameGetter = (inputStickerSet: Api.inputStickerSetID) => MaybePromise<string>;
58
+ export type StickerSetNameGetter = (inputStickerSet: Api.inputStickerSetID) => MaybePromise<string | undefined>;
59
59
  export declare function constructSticker(document: Api.document, fileId: string, fileUniqueId: string, getStickerSetName: StickerSetNameGetter, customEmojiId?: string): Promise<Sticker>;
60
60
  export declare function constructSticker2(document: Api.document, fileId: string, fileUniqueId: string, setName: string | undefined, customEmojiId?: string): Sticker;
61
61
  //# sourceMappingURL=1_sticker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAyB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,iBAAiB;AACjB,MAAM,WAAW,OAAO;IACtB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,kMAAkM;IAClM,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACzC,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IACpB,2GAA2G;IAC3G,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB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) 2023-2025 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 { Api } from "../2_tl.js";
2
21
  import { EntityGetter } from "./_getters.js";
3
22
  import { ChatP } from "./1_chat_p.js";
@@ -1 +1 @@
1
- {"version":3,"file":"2_poll_answer.d.ts","sourceRoot":"","sources":["../../src/types/2_poll_answer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAEtD,2BAA2B;AAC3B,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,qDAAqD;IACrD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAazH"}
1
+ {"version":3,"file":"2_poll_answer.d.ts","sourceRoot":"","sources":["../../src/types/2_poll_answer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AAEtD,2BAA2B;AAC3B,MAAM,WAAW,UAAU;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,qDAAqD;IACrD,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAsB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,qBAAqB,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,CAazH"}
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 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
22
  exports.constructPollAnswer = constructPollAnswer;
4
23
  const _0_deps_js_1 = require("../0_deps.js");
@@ -22,6 +22,7 @@ import { ConnectionState } from "./0_connection_state.js";
22
22
  import { MessageReference } from "./0_message_reference.js";
23
23
  import { StoryReference } from "./0_story_reference.js";
24
24
  import { Translation } from "./0_translation.js";
25
+ import { UploadProgress } from "./0_upload_progress.js";
25
26
  import { VideoChat } from "./0_video_chat.js";
26
27
  import { VoiceTranscription } from "./0_voice_transcription.js";
27
28
  import { BusinessConnection } from "./2_business_connection.js";
@@ -452,6 +453,23 @@ export interface UpdateLinkPreview {
452
453
  */
453
454
  linkPreview: LinkPreview;
454
455
  }
456
+ /**
457
+ * An upload has progressed.
458
+ *
459
+ * ```
460
+ * client.on("uploadProgress", (ctx) => {
461
+ * // ctx.uploadProgress
462
+ * });
463
+ * ```
464
+ * @unlisted
465
+ */
466
+ export interface UpdateUploadProgress {
467
+ /**
468
+ * The new progress of the upload.
469
+ * @discriminator
470
+ */
471
+ uploadProgress: UploadProgress;
472
+ }
455
473
  /** @unlisted */
456
474
  export interface UpdateMap {
457
475
  message: UpdateNewMessage;
@@ -482,9 +500,10 @@ export interface UpdateMap {
482
500
  pollAnswer: UpdatePollAnswer;
483
501
  voiceTranscription: UpdateVoiceTranscription;
484
502
  linkPreview: UpdateLinkPreview;
503
+ uploadProgress: UpdateUploadProgress;
485
504
  }
486
505
  /** @unlisted */
487
- export type UpdateIntersection = Partial<UpdateConnectionState & UpdateAuthorizationState & UpdateNewMessage & UpdateMessageEdited & UpdateMessageScheduled & UpdateMessagesDeleted & UpdateCallbackQuery & UpdateInlineQuery & UpdateChosenInlineResult & UpdateNewChat & UpdateEditedChat & UpdateDeletedChat & UpdateMessageInteractions & UpdateMessageReactionCount & UpdateMessageReactions & UpdateChatMember & UpdateMyChatMember & UpdateDeletedStory & UpdateNewStory & UpdateBusinessConnection & UpdateVideoChat & UpdatePreCheckoutQuery & UpdateJoinRequest & UpdateTranslations & UpdatePoll & UpdatePollAnswer & UpdateVoiceTranscription & UpdateLinkPreview>;
506
+ export type UpdateIntersection = Partial<UpdateConnectionState & UpdateAuthorizationState & UpdateNewMessage & UpdateMessageEdited & UpdateMessageScheduled & UpdateMessagesDeleted & UpdateCallbackQuery & UpdateInlineQuery & UpdateChosenInlineResult & UpdateNewChat & UpdateEditedChat & UpdateDeletedChat & UpdateMessageInteractions & UpdateMessageReactionCount & UpdateMessageReactions & UpdateChatMember & UpdateMyChatMember & UpdateDeletedStory & UpdateNewStory & UpdateBusinessConnection & UpdateVideoChat & UpdatePreCheckoutQuery & UpdateJoinRequest & UpdateTranslations & UpdatePoll & UpdatePollAnswer & UpdateVoiceTranscription & UpdateLinkPreview & UpdateUploadProgress>;
488
507
  /** An incoming update. */
489
- export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateNewMessage | UpdateMessageEdited | UpdateMessageScheduled | UpdateMessagesDeleted | UpdateCallbackQuery | UpdateInlineQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions | UpdateChatMember | UpdateMyChatMember | UpdateDeletedStory | UpdateNewStory | UpdateBusinessConnection | UpdateVideoChat | UpdatePreCheckoutQuery | UpdateJoinRequest | UpdateTranslations | UpdatePoll | UpdatePollAnswer | UpdateVoiceTranscription | UpdateLinkPreview;
508
+ export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateNewMessage | UpdateMessageEdited | UpdateMessageScheduled | UpdateMessagesDeleted | UpdateCallbackQuery | UpdateInlineQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount | UpdateMessageReactions | UpdateChatMember | UpdateMyChatMember | UpdateDeletedStory | UpdateNewStory | UpdateBusinessConnection | UpdateVideoChat | UpdatePreCheckoutQuery | UpdateJoinRequest | UpdateTranslations | UpdatePoll | UpdatePollAnswer | UpdateVoiceTranscription | UpdateLinkPreview | UpdateUploadProgress;
490
509
  //# sourceMappingURL=7_update.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"7_update.d.ts","sourceRoot":"","sources":["../../src/types/7_update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0B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gB;AAChB,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,wBAAwB,GACxB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,yBAAyB,GACzB,0BAA0B,GAC1B,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,wBAAwB,GACxB,eAAe,GACf,sBAAsB,GACtB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,gBAAgB,GAChB,wBAAwB,GACxB,iBAAiB,CACpB,CAAC;AAEF,0BAA0B;AAC1B,MAAM,MAAM,MAAM,GACd,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,wBAAwB,GACxB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,yBAAyB,GACzB,0BAA0B,GAC1B,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,wBAAwB,GACxB,eAAe,GACf,sBAAsB,GACtB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,gBAAgB,GAChB,wBAAwB,GACxB,iBAAiB,CAAC"}
1
+ {"version":3,"file":"7_update.d.ts","sourceRoot":"","sources":["../../src/types/7_update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MA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AC7C,WAAW,EAAE,iBAAiB,CAAC;IAC/B,cAAc,EAAE,oBAAoB,CAAC;CACtC;AAED,gBAAgB;AAChB,MAAM,MAAM,kBAAkB,GAAG,OAAO,CACpC,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,wBAAwB,GACxB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,yBAAyB,GACzB,0BAA0B,GAC1B,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,wBAAwB,GACxB,eAAe,GACf,sBAAsB,GACtB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,gBAAgB,GAChB,wBAAwB,GACxB,iBAAiB,GACjB,oBAAoB,CACvB,CAAC;AAEF,0BAA0B;AAC1B,MAAM,MAAM,MAAM,GACd,qBAAqB,GACrB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,iBAAiB,GACjB,wBAAwB,GACxB,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,yBAAyB,GACzB,0BAA0B,GAC1B,sBAAsB,GACtB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,wBAAwB,GACxB,eAAe,GACf,sBAAsB,GACtB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,gBAAgB,GAChB,wBAAwB,GACxB,iBAAiB,GACjB,oBAAoB,CAAC"}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.modExp = modExp;
27
37
  exports.mod = mod;
@@ -1 +1 @@
1
- {"version":3,"file":"0_bigint_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_bigint_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"0_bigint_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_bigint_test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,2BAA2B,CAAC"}
@@ -17,5 +17,5 @@
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 function bufferFromBigInt(int: bigint | number, byteCount: number, littleEndian?: boolean, signed?: boolean): Uint8Array;
20
+ export declare function bufferFromBigInt(int: bigint | number, byteCount: number, littleEndian?: boolean, signed?: boolean): Uint8Array<ArrayBuffer>;
21
21
  //# sourceMappingURL=0_buffer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"0_buffer.d.ts","sourceRoot":"","sources":["../../src/utilities/0_buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,MAAM,UAAQ,cAoC5G"}
1
+ {"version":3,"file":"0_buffer.d.ts","sourceRoot":"","sources":["../../src/utilities/0_buffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,MAAM,UAAQ,2BAoC5G"}
@@ -1 +1 @@
1
- {"version":3,"file":"0_buffer_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_buffer_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"0_buffer_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_buffer_test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,2BAA2B,CAAC"}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.getString = getString;
27
37
  exports.getNumber = getNumber;
@@ -1,3 +1,3 @@
1
- export declare function sha256(payload: Uint8Array): Promise<Uint8Array>;
2
- export declare function sha1(payload: Uint8Array): Promise<Uint8Array>;
1
+ export declare function sha256(payload: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
2
+ export declare function sha1(payload: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
3
3
  //# sourceMappingURL=0_hash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"0_hash.d.ts","sourceRoot":"","sources":["../../src/utilities/0_hash.ts"],"names":[],"mappings":"AAsBA,wBAAsB,MAAM,CAAC,OAAO,EAAE,UAAU,uBAE/C;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,UAAU,uBAE7C"}
1
+ {"version":3,"file":"0_hash.d.ts","sourceRoot":"","sources":["../../src/utilities/0_hash.ts"],"names":[],"mappings":"AAsBA,wBAAsB,MAAM,CAAC,OAAO,EAAE,UAAU,oCAE/C;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,UAAU,oCAE7C"}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.sha256 = sha256;
27
37
  exports.sha1 = sha1;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.ZERO_CHANNEL_ID = void 0;
27
37
  exports.drop = drop;
@@ -18,32 +18,17 @@
18
18
  * You should have received a copy of the GNU Lesser General Public License
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
22
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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");
24
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
- };
26
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
27
- if (kind === "m") throw new TypeError("Private method is not writable");
28
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
29
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
30
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
31
- };
32
- var _Mutex_untilUnlock;
33
21
  Object.defineProperty(exports, "__esModule", { value: true });
34
22
  exports.Mutex = void 0;
35
23
  class Mutex {
36
- constructor() {
37
- _Mutex_untilUnlock.set(this, Promise.resolve());
38
- }
24
+ #untilUnlock = Promise.resolve();
39
25
  async lock() {
40
- await __classPrivateFieldGet(this, _Mutex_untilUnlock, "f");
26
+ await this.#untilUnlock;
41
27
  return new Promise((resolve0) => {
42
- __classPrivateFieldSet(this, _Mutex_untilUnlock, new Promise((resolve1) => {
28
+ this.#untilUnlock = new Promise((resolve1) => {
43
29
  resolve0(resolve1);
44
- }), "f");
30
+ });
45
31
  });
46
32
  }
47
33
  }
48
34
  exports.Mutex = Mutex;
49
- _Mutex_untilUnlock = new WeakMap();
@@ -18,52 +18,38 @@
18
18
  * You should have received a copy of the GNU Lesser General Public License
19
19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
20
  */
21
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
22
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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");
24
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
- };
26
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
27
- if (kind === "m") throw new TypeError("Private method is not writable");
28
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
29
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
30
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
31
- };
32
- var _PartStream_buffer, _PartStream_totalRead, _PartStream_part;
33
21
  Object.defineProperty(exports, "__esModule", { value: true });
34
22
  exports.PartStream = void 0;
35
23
  const _0_deps_js_1 = require("../0_deps.js");
36
24
  class PartStream extends TransformStream {
25
+ #buffer = new Uint8Array();
26
+ #totalRead = 0;
27
+ #part = 0;
37
28
  constructor(chunkSize) {
38
29
  super({
39
30
  transform: (chunk, controller) => {
40
- var _a, _b;
41
- __classPrivateFieldSet(this, _PartStream_totalRead, __classPrivateFieldGet(this, _PartStream_totalRead, "f") + chunk.byteLength, "f");
42
- chunk = (0, _0_deps_js_1.concat)([__classPrivateFieldGet(this, _PartStream_buffer, "f"), chunk]);
31
+ this.#totalRead += chunk.byteLength;
32
+ chunk = (0, _0_deps_js_1.concat)([this.#buffer, chunk]);
43
33
  while (chunk.byteLength > chunkSize) {
44
34
  controller.enqueue({
45
35
  small: false,
46
- part: (__classPrivateFieldSet(this, _PartStream_part, (_b = __classPrivateFieldGet(this, _PartStream_part, "f"), _a = _b++, _b), "f"), _a),
36
+ part: this.#part++,
47
37
  totalParts: -1,
48
38
  bytes: chunk.slice(0, chunkSize),
49
39
  });
50
40
  chunk = chunk.slice(chunkSize);
51
41
  }
52
- __classPrivateFieldSet(this, _PartStream_buffer, chunk, "f");
42
+ this.#buffer = chunk;
53
43
  },
54
44
  flush: (controller) => {
55
45
  controller.enqueue({
56
- small: __classPrivateFieldGet(this, _PartStream_totalRead, "f") <= chunkSize,
57
- part: __classPrivateFieldGet(this, _PartStream_part, "f"),
58
- totalParts: Math.ceil(__classPrivateFieldGet(this, _PartStream_totalRead, "f") / chunkSize),
59
- bytes: __classPrivateFieldGet(this, _PartStream_buffer, "f"),
46
+ small: this.#totalRead <= chunkSize,
47
+ part: this.#part,
48
+ totalParts: Math.ceil(this.#totalRead / chunkSize),
49
+ bytes: this.#buffer,
60
50
  });
61
51
  },
62
52
  });
63
- _PartStream_buffer.set(this, new Uint8Array());
64
- _PartStream_totalRead.set(this, 0);
65
- _PartStream_part.set(this, 0);
66
53
  }
67
54
  }
68
55
  exports.PartStream = PartStream;
69
- _PartStream_buffer = new WeakMap(), _PartStream_totalRead = new WeakMap(), _PartStream_part = new WeakMap();
@@ -1 +1 @@
1
- {"version":3,"file":"0_part_stream_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_part_stream_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"0_part_stream_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_part_stream_test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,2BAA2B,CAAC"}
@@ -17,6 +17,6 @@
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 function rleEncode(s: Uint8Array): Uint8Array;
21
- export declare function rleDecode(s: Uint8Array): Uint8Array;
20
+ export declare function rleEncode(s: Uint8Array): Uint8Array<ArrayBuffer>;
21
+ export declare function rleDecode(s: Uint8Array): Uint8Array<ArrayBuffer>;
22
22
  //# sourceMappingURL=0_rle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"0_rle.d.ts","sourceRoot":"","sources":["../../src/utilities/0_rle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,cA8BtC;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,cAqBtC"}
1
+ {"version":3,"file":"0_rle.d.ts","sourceRoot":"","sources":["../../src/utilities/0_rle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,2BA8BtC;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,2BAqBtC"}
@@ -1 +1 @@
1
- {"version":3,"file":"0_rle_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_rle_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"0_rle_test.d.ts","sourceRoot":"","sources":["../../src/utilities/0_rle_test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,2BAA2B,CAAC"}
@@ -1,3 +1,22 @@
1
- export declare function encodeText(decoded: string): Uint8Array;
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2025 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
+ */
20
+ export declare function encodeText(decoded: string): Uint8Array<ArrayBufferLike>;
2
21
  export declare function decodeText(encoded: Uint8Array): string;
3
22
  //# sourceMappingURL=0_text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"0_text.d.ts","sourceRoot":"","sources":["../../src/utilities/0_text.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,cAEzC;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,UAE7C"}
1
+ {"version":3,"file":"0_text.d.ts","sourceRoot":"","sources":["../../src/utilities/0_text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,+BAEzC;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,UAE7C"}
@@ -1,4 +1,23 @@
1
1
  "use strict";
2
+ /**
3
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
4
+ * Copyright (C) 2023-2025 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
22
  exports.encodeText = encodeText;
4
23
  exports.decodeText = decodeText;
@@ -1,2 +1,2 @@
1
- export declare function rsaPad(data: Uint8Array, [serverKey, exponent]: [bigint, bigint]): Promise<Uint8Array>;
1
+ export declare function rsaPad(data: Uint8Array, [serverKey, exponent]: [bigint, bigint]): Promise<Uint8Array<ArrayBuffer>>;
2
2
  //# sourceMappingURL=1_auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_auth.d.ts","sourceRoot":"","sources":["../../src/utilities/1_auth.ts"],"names":[],"mappings":"AA2BA,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,uBAiCrF"}
1
+ {"version":3,"file":"1_auth.d.ts","sourceRoot":"","sources":["../../src/utilities/1_auth.ts"],"names":[],"mappings":"AA2BA,wBAAsB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,oCAiCrF"}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.rsaPad = rsaPad;
27
37
  /**
@@ -18,5 +18,5 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  export declare function base64EncodeUrlSafe(data: Uint8Array | ArrayBuffer | string): string;
21
- export declare function base64DecodeUrlSafe(data: string): Uint8Array;
21
+ export declare function base64DecodeUrlSafe(data: string): Uint8Array<ArrayBuffer>;
22
22
  //# sourceMappingURL=1_base64.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"1_base64.d.ts","sourceRoot":"","sources":["../../src/utilities/1_base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,UAE1E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,cAM/C"}
1
+ {"version":3,"file":"1_base64.d.ts","sourceRoot":"","sources":["../../src/utilities/1_base64.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,MAAM,UAE1E;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,2BAM/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"1_base64_test.d.ts","sourceRoot":"","sources":["../../src/utilities/1_base64_test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"1_base64_test.d.ts","sourceRoot":"","sources":["../../src/utilities/1_base64_test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,2BAA2B,CAAC"}