@mtkruto/node 0.1.162 → 0.1.183

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 (567) hide show
  1. package/esm/0_deps.d.ts +4 -4
  2. package/esm/0_deps.js +5 -5
  3. package/esm/4_constants.d.ts +1 -2
  4. package/esm/4_constants.js +2 -3
  5. package/esm/5_client.d.ts +2 -2
  6. package/esm/5_client.js +2 -2
  7. package/esm/client/0_client_abstract.d.ts +6 -4
  8. package/esm/client/0_client_abstract.js +11 -5
  9. package/esm/client/0_message.d.ts +1 -1
  10. package/esm/client/0_message.js +3 -6
  11. package/esm/client/1_client_encrypted.d.ts +34 -0
  12. package/esm/client/1_client_encrypted.js +237 -0
  13. package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
  14. package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
  15. package/esm/client/1_composer.d.ts +2 -3
  16. package/esm/client/1_file_manager.d.ts +4 -2
  17. package/esm/client/1_file_manager.js +35 -11
  18. package/esm/client/2_message_manager.d.ts +4 -2
  19. package/esm/client/2_message_manager.js +31 -16
  20. package/esm/client/3_chat_list_manager.d.ts +2 -0
  21. package/esm/client/3_chat_list_manager.js +1 -1
  22. package/esm/client/4_client.d.ts +131 -94
  23. package/esm/client/4_client.js +197 -382
  24. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.js +6 -3
  25. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.d.ts +7 -0
  26. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.js +7 -0
  27. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.js +2 -1
  28. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.js +8 -8
  29. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
  30. package/esm/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
  31. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/basename.js +9 -0
  32. package/esm/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
  33. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/dirname.js +9 -0
  34. package/esm/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
  35. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/extname.js +9 -0
  36. package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.js +1 -1
  37. package/esm/storage/0_storage.d.ts +7 -1
  38. package/esm/storage/0_storage.js +22 -2
  39. package/esm/tl/6_message.d.ts +3 -2
  40. package/esm/tl/6_message.js +1 -1
  41. package/esm/tl/7_message_container.d.ts +6 -4
  42. package/esm/tl/7_message_container.js +22 -7
  43. package/esm/types/0_thumbnail.js +7 -13
  44. package/esm/types/1_sticker.d.ts +1 -1
  45. package/esm/types/1_sticker.js +6 -6
  46. package/esm/types/4_inline_query_result.d.ts +1 -1
  47. package/esm/types/4_inline_query_result.js +4 -0
  48. package/esm/utilities/0_bigint.d.ts +1 -0
  49. package/esm/utilities/0_bigint.js +1 -0
  50. package/package.json +1 -1
  51. package/script/0_deps.d.ts +4 -4
  52. package/script/0_deps.js +5 -5
  53. package/script/4_constants.d.ts +1 -2
  54. package/script/4_constants.js +3 -4
  55. package/script/5_client.d.ts +2 -2
  56. package/script/5_client.js +2 -2
  57. package/script/client/0_client_abstract.d.ts +6 -4
  58. package/script/client/0_client_abstract.js +11 -5
  59. package/script/client/0_message.d.ts +1 -1
  60. package/script/client/0_message.js +3 -6
  61. package/script/client/1_client_encrypted.d.ts +34 -0
  62. package/script/client/1_client_encrypted.js +241 -0
  63. package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
  64. package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
  65. package/script/client/1_composer.d.ts +2 -3
  66. package/script/client/1_file_manager.d.ts +4 -2
  67. package/script/client/1_file_manager.js +34 -10
  68. package/script/client/2_message_manager.d.ts +4 -2
  69. package/script/client/2_message_manager.js +31 -16
  70. package/script/client/3_chat_list_manager.d.ts +2 -0
  71. package/script/client/3_chat_list_manager.js +1 -1
  72. package/script/client/4_client.d.ts +131 -94
  73. package/script/client/4_client.js +193 -378
  74. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.js +6 -3
  75. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.d.ts +7 -0
  76. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.js +7 -0
  77. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.js +2 -1
  78. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.js +8 -8
  79. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
  80. package/script/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
  81. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/basename.js +9 -0
  82. package/script/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
  83. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/dirname.js +9 -0
  84. package/script/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
  85. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/extname.js +9 -0
  86. package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.js +1 -1
  87. package/script/storage/0_storage.d.ts +7 -1
  88. package/script/storage/0_storage.js +22 -2
  89. package/script/tl/6_message.d.ts +3 -2
  90. package/script/tl/6_message.js +1 -1
  91. package/script/tl/7_message_container.d.ts +6 -4
  92. package/script/tl/7_message_container.js +20 -5
  93. package/script/types/0_thumbnail.js +7 -13
  94. package/script/types/1_sticker.d.ts +1 -1
  95. package/script/types/1_sticker.js +6 -6
  96. package/script/types/4_inline_query_result.d.ts +1 -1
  97. package/script/types/4_inline_query_result.js +4 -0
  98. package/script/utilities/0_bigint.d.ts +1 -0
  99. package/script/utilities/0_bigint.js +1 -0
  100. package/esm/client/5_composer.d.ts +0 -4
  101. package/esm/client/5_composer.js +0 -3
  102. package/script/client/5_composer.d.ts +0 -4
  103. package/script/client/5_composer.js +0 -7
  104. package/script/deps/deno.land/std@0.218.0/path/posix/basename.d.ts +0 -8
  105. package/script/deps/deno.land/std@0.218.0/path/posix/dirname.d.ts +0 -5
  106. package/script/deps/deno.land/std@0.218.0/path/posix/extname.d.ts +0 -6
  107. package/script/deps/deno.land/std@0.218.0/path/windows/basename.d.ts +0 -8
  108. package/script/deps/deno.land/std@0.218.0/path/windows/dirname.d.ts +0 -5
  109. package/script/deps/deno.land/std@0.218.0/path/windows/extname.d.ts +0 -6
  110. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
  111. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.js +0 -0
  112. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
  113. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.d.ts +0 -0
  114. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.js +0 -0
  115. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.d.ts +0 -0
  116. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.js +0 -0
  117. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
  118. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
  119. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
  120. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
  121. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
  122. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.js +0 -0
  123. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
  124. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.js +0 -0
  125. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
  126. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.js +0 -0
  127. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
  128. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.js +0 -0
  129. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
  130. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
  131. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
  132. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
  133. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
  134. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
  135. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
  136. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.js +0 -0
  137. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
  138. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
  139. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
  140. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.js +0 -0
  141. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
  142. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
  143. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
  144. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
  145. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
  146. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
  147. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
  148. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
  149. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
  150. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
  151. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
  152. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
  153. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
  154. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
  155. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
  156. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
  157. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
  158. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.js +0 -0
  159. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
  160. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.js +0 -0
  161. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.d.ts +0 -0
  162. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.js +0 -0
  163. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.d.ts +0 -0
  164. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.js +0 -0
  165. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
  166. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.js +0 -0
  167. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
  168. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.js +0 -0
  169. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
  170. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.js +0 -0
  171. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
  172. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
  173. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.js +0 -0
  174. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
  175. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.js +0 -0
  176. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
  177. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.js +0 -0
  178. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
  179. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.js +0 -0
  180. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
  181. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.js +0 -0
  182. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
  183. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
  184. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
  185. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
  186. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
  187. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.js +0 -0
  188. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
  189. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
  190. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
  191. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
  192. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  193. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
  194. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
  195. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
  196. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
  197. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.js +0 -0
  198. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
  199. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
  200. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.js +0 -0
  201. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
  202. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.js +0 -0
  203. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
  204. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.js +0 -0
  205. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
  206. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
  207. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
  208. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
  209. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
  210. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.js +0 -0
  211. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
  212. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
  213. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.js +0 -0
  214. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
  215. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
  216. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
  217. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
  218. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.d.ts +0 -0
  219. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.js +0 -0
  220. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.d.ts +0 -0
  221. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.js +0 -0
  222. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.d.ts +0 -0
  223. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.js +0 -0
  224. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.d.ts +0 -0
  225. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.js +0 -0
  226. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.d.ts +0 -0
  227. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.js +0 -0
  228. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.d.ts +0 -0
  229. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.js +0 -0
  230. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.d.ts +0 -0
  231. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.js +0 -0
  232. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.d.ts +0 -0
  233. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.js +0 -0
  234. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
  235. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.js +0 -0
  236. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
  237. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
  238. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
  239. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.js +0 -0
  240. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
  241. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.js +0 -0
  242. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.d.ts +0 -0
  243. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.js +0 -0
  244. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
  245. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.js +0 -0
  246. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.d.ts +0 -0
  247. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.js +0 -0
  248. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.d.ts +0 -0
  249. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.js +0 -0
  250. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
  251. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.js +0 -0
  252. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.d.ts +0 -0
  253. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.js +0 -0
  254. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
  255. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.js +0 -0
  256. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
  257. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.js +0 -0
  258. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
  259. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.js +0 -0
  260. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
  261. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.js +0 -0
  262. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
  263. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
  264. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
  265. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
  266. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
  267. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
  268. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
  269. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
  270. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
  271. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
  272. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
  273. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
  274. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.js +0 -0
  275. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
  276. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.js +0 -0
  277. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
  278. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
  279. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
  280. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.js +0 -0
  281. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
  282. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.js +0 -0
  283. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
  284. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.js +0 -0
  285. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
  286. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
  287. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
  288. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
  289. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.d.ts +0 -0
  290. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.js +0 -0
  291. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.d.ts +0 -0
  292. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.js +0 -0
  293. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
  294. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.js +0 -0
  295. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
  296. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
  297. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
  298. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.js +0 -0
  299. /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/basename.d.ts +0 -0
  300. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/basename.js +0 -0
  301. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
  302. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.js +0 -0
  303. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
  304. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.js +0 -0
  305. /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/dirname.d.ts +0 -0
  306. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/dirname.js +0 -0
  307. /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/extname.d.ts +0 -0
  308. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/extname.js +0 -0
  309. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
  310. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.js +0 -0
  311. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
  312. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
  313. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
  314. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
  315. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
  316. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
  317. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
  318. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
  319. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
  320. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.js +0 -0
  321. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
  322. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
  323. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
  324. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.js +0 -0
  325. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
  326. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.js +0 -0
  327. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
  328. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
  329. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
  330. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.js +0 -0
  331. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
  332. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.js +0 -0
  333. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
  334. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.js +0 -0
  335. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
  336. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
  337. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
  338. /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
  339. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
  340. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.js +0 -0
  341. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
  342. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.d.ts +0 -0
  343. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.js +0 -0
  344. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.d.ts +0 -0
  345. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.js +0 -0
  346. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
  347. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
  348. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
  349. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
  350. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
  351. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.js +0 -0
  352. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
  353. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.js +0 -0
  354. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
  355. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.js +0 -0
  356. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
  357. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.js +0 -0
  358. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
  359. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
  360. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
  361. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
  362. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
  363. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
  364. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
  365. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.js +0 -0
  366. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
  367. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
  368. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
  369. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.js +0 -0
  370. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
  371. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
  372. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
  373. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
  374. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
  375. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
  376. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
  377. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
  378. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
  379. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
  380. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
  381. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
  382. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
  383. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
  384. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
  385. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
  386. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
  387. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.js +0 -0
  388. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
  389. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.js +0 -0
  390. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.d.ts +0 -0
  391. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.js +0 -0
  392. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.d.ts +0 -0
  393. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.js +0 -0
  394. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
  395. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.js +0 -0
  396. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
  397. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.js +0 -0
  398. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
  399. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.js +0 -0
  400. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
  401. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
  402. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.js +0 -0
  403. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
  404. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.js +0 -0
  405. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
  406. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.js +0 -0
  407. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
  408. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.js +0 -0
  409. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
  410. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.js +0 -0
  411. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
  412. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
  413. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
  414. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
  415. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
  416. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.js +0 -0
  417. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
  418. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
  419. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
  420. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
  421. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  422. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
  423. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
  424. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
  425. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
  426. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.js +0 -0
  427. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
  428. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
  429. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.js +0 -0
  430. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
  431. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.js +0 -0
  432. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
  433. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.js +0 -0
  434. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
  435. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
  436. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
  437. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
  438. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
  439. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.js +0 -0
  440. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
  441. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
  442. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.js +0 -0
  443. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
  444. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
  445. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
  446. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
  447. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.d.ts +0 -0
  448. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.js +0 -0
  449. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.d.ts +0 -0
  450. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.js +0 -0
  451. /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/basename.d.ts +0 -0
  452. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.js +0 -0
  453. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.d.ts +0 -0
  454. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.js +0 -0
  455. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.d.ts +0 -0
  456. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.js +0 -0
  457. /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/dirname.d.ts +0 -0
  458. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.js +0 -0
  459. /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/extname.d.ts +0 -0
  460. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.js +0 -0
  461. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.d.ts +0 -0
  462. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.js +0 -0
  463. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
  464. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.js +0 -0
  465. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
  466. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
  467. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
  468. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.js +0 -0
  469. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
  470. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.js +0 -0
  471. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.d.ts +0 -0
  472. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.js +0 -0
  473. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
  474. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.js +0 -0
  475. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.d.ts +0 -0
  476. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.js +0 -0
  477. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.d.ts +0 -0
  478. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.js +0 -0
  479. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
  480. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.js +0 -0
  481. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.d.ts +0 -0
  482. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.js +0 -0
  483. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
  484. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.js +0 -0
  485. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
  486. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.js +0 -0
  487. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
  488. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.js +0 -0
  489. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
  490. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.js +0 -0
  491. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
  492. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
  493. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
  494. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
  495. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
  496. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
  497. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
  498. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
  499. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
  500. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
  501. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
  502. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
  503. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.js +0 -0
  504. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
  505. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.js +0 -0
  506. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
  507. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
  508. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
  509. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.js +0 -0
  510. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
  511. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.js +0 -0
  512. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
  513. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.js +0 -0
  514. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
  515. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
  516. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
  517. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
  518. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.d.ts +0 -0
  519. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.js +0 -0
  520. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.d.ts +0 -0
  521. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.js +0 -0
  522. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
  523. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.js +0 -0
  524. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
  525. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
  526. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
  527. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.js +0 -0
  528. /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/basename.d.ts +0 -0
  529. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/basename.js +0 -0
  530. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
  531. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.js +0 -0
  532. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
  533. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.js +0 -0
  534. /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/dirname.d.ts +0 -0
  535. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/dirname.js +0 -0
  536. /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/extname.d.ts +0 -0
  537. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/extname.js +0 -0
  538. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
  539. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.js +0 -0
  540. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
  541. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
  542. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
  543. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
  544. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
  545. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
  546. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
  547. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
  548. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
  549. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.js +0 -0
  550. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
  551. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
  552. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
  553. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.js +0 -0
  554. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
  555. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.js +0 -0
  556. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
  557. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
  558. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
  559. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.js +0 -0
  560. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
  561. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.js +0 -0
  562. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
  563. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.js +0 -0
  564. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
  565. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
  566. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
  567. /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/0_params.js"), exports);
18
- __exportStar(require("./client/2_client_plain.js"), exports);
18
+ __exportStar(require("./client/1_client_plain.js"), exports);
19
+ __exportStar(require("./client/1_client_encrypted.js"), exports);
19
20
  __exportStar(require("./client/4_client.js"), exports);
20
- __exportStar(require("./client/5_composer.js"), exports);
@@ -16,16 +16,18 @@ export interface ClientAbstractParams {
16
16
  }
17
17
  export declare abstract class ClientAbstract {
18
18
  #private;
19
- protected readonly initialDc: DC;
20
- protected transportProvider: TransportProvider;
21
- protected readonly cdn: boolean;
19
+ readonly initialDc: DC;
20
+ transportProvider: TransportProvider;
21
+ readonly cdn: boolean;
22
22
  protected transport?: ReturnType<TransportProvider>;
23
23
  constructor(params?: ClientAbstractParams);
24
- protected stateChangeHandler?: (connected: boolean) => void;
24
+ stateChangeHandler?: (connected: boolean) => void;
25
+ get dc(): DC;
25
26
  get dcId(): number;
26
27
  setDc(dc: DC): MaybePromise<void>;
27
28
  get connected(): boolean;
28
29
  connect(): Promise<void>;
29
30
  reconnect(dc?: DC): Promise<void>;
30
31
  disconnect(): Promise<void>;
32
+ get disconnected(): boolean;
31
33
  }
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
+ 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");
5
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
+ };
2
7
  var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
8
  if (kind === "m") throw new TypeError("Private method is not writable");
4
9
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
10
  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");
6
11
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
12
  };
8
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
- 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");
11
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
- };
13
13
  var _ClientAbstract_dc;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ClientAbstract = void 0;
@@ -53,6 +53,9 @@ class ClientAbstract {
53
53
  this.transportProvider = params?.transportProvider ?? (0, _3_transport_js_1.transportProviderWebSocket)();
54
54
  this.cdn = params?.cdn ?? false;
55
55
  }
56
+ get dc() {
57
+ return __classPrivateFieldGet(this, _ClientAbstract_dc, "f") ?? this.initialDc;
58
+ }
56
59
  get dcId() {
57
60
  if (!this.transport) {
58
61
  throw new Error("Not connected");
@@ -87,6 +90,9 @@ class ClientAbstract {
87
90
  await this.transport.transport.deinitialize();
88
91
  await this.transport.connection.close();
89
92
  }
93
+ get disconnected() {
94
+ return !this.transport?.transport.initialized;
95
+ }
90
96
  }
91
97
  exports.ClientAbstract = ClientAbstract;
92
98
  _ClientAbstract_dc = new WeakMap();
@@ -5,5 +5,5 @@ export declare function unpackUnencryptedMessage(buffer: Uint8Array): {
5
5
  messageId: bigint;
6
6
  message: Uint8Array;
7
7
  };
8
- export declare function encryptMessage(message: Message_, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint): Promise<Uint8Array>;
8
+ export declare function encryptMessage(message: Message_ | MessageContainer, authKey: Uint8Array, authKeyId: bigint, salt: bigint, sessionId: bigint): Promise<Uint8Array>;
9
9
  export declare function decryptMessage(buffer: Uint8Array, authKey: Uint8Array, authKeyId: bigint, _sessionId: bigint): Promise<Message_ | MessageContainer>;
@@ -35,14 +35,10 @@ function unpackUnencryptedMessage(buffer) {
35
35
  }
36
36
  exports.unpackUnencryptedMessage = unpackUnencryptedMessage;
37
37
  async function encryptMessage(message, authKey, authKeyId, salt, sessionId) {
38
- const encoded = message.body[_2_tl_js_1.serialize]();
39
38
  const payloadWriter = new _2_tl_js_1.TLWriter();
40
39
  payloadWriter.writeInt64(salt);
41
40
  payloadWriter.writeInt64(sessionId);
42
- payloadWriter.writeInt64(message.id);
43
- payloadWriter.writeInt32(message.seqNo);
44
- payloadWriter.writeInt32(encoded.length);
45
- payloadWriter.write(encoded);
41
+ payloadWriter.write(message[_2_tl_js_1.serialize]());
46
42
  payloadWriter.write(new Uint8Array((0, _1_utilities_js_1.mod)(-(payloadWriter.buffer.length + 12), 16) + 12));
47
43
  const payload = payloadWriter.buffer;
48
44
  const messageKey = (await (0, _1_utilities_js_1.sha256)((0, _1_utilities_js_1.concat)(authKey.subarray(88, 120), payload))).subarray(8, 24);
@@ -77,7 +73,8 @@ async function decryptMessage(buffer, authKey, authKeyId, _sessionId) {
77
73
  plainReader = new _2_tl_js_1.TLReader(plainReader.read(length));
78
74
  const cid = plainReader.readInt32(false);
79
75
  if (cid == _2_tl_js_1.MessageContainer[_2_tl_js_1.id]) {
80
- return _2_tl_js_1.MessageContainer.deserialize(plainReader.buffer);
76
+ const messages = _2_tl_js_1.MessageContainer.deserialize(plainReader.buffer);
77
+ return new _2_tl_js_1.MessageContainer(mid, seqno, messages);
81
78
  }
82
79
  else if (cid == _2_tl_js_1.RPCResult[_2_tl_js_1.id]) {
83
80
  const body = _2_tl_js_1.RPCResult.deserialize(plainReader.buffer);
@@ -0,0 +1,34 @@
1
+ import { enums, functions, ReadObject, TLObject, types } from "../2_tl.js";
2
+ import { ClientAbstract } from "./0_client_abstract.js";
3
+ import { ClientAbstractParams } from "./0_client_abstract.js";
4
+ export type ErrorSource = "deserialization" | "decryption" | "unknown";
5
+ export interface Handlers {
6
+ serverSaltReassigned?: (newServerSalt: bigint) => void;
7
+ updates?: (updates: enums.Updates | enums.Update, call: TLObject | null, callback?: () => void) => void;
8
+ result?: (result: ReadObject, callback: () => void) => void;
9
+ error?: (err: unknown, source: ErrorSource) => void;
10
+ }
11
+ /**
12
+ * An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
13
+ *
14
+ * There are a few things to note:
15
+ *
16
+ * - This is a bare client and it stores nothing.
17
+ * - It expects an authorization key to be present before invoking any method.
18
+ * - Authorization must be set using `setAuthKey`.
19
+ * - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
20
+ * - It doesn't uncompress compressed packets.
21
+ */
22
+ export declare class ClientEncrypted extends ClientAbstract {
23
+ #private;
24
+ handlers: Handlers;
25
+ constructor(params?: ClientAbstractParams);
26
+ connect(): Promise<void>;
27
+ setAuthKey(key: Uint8Array): Promise<void>;
28
+ get authKey(): Uint8Array;
29
+ set serverSalt(serverSalt: bigint);
30
+ get serverSalt(): bigint;
31
+ invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T): Promise<T extends functions.Function<unknown> ? T["__R"] : void>;
32
+ invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait: true): Promise<void>;
33
+ invoke<T extends (functions.Function<unknown> | types.Type) = functions.Function<unknown>>(function_: T, noWait?: boolean): Promise<T | void>;
34
+ }
@@ -0,0 +1,241 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ 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");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ 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");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _ClientEncrypted_instances, _ClientEncrypted_authKey, _ClientEncrypted_authKeyId, _ClientEncrypted_sessionId, _ClientEncrypted_state, _ClientEncrypted_toAcknowledge, _ClientEncrypted_recentAcks, _ClientEncrypted_promises, _ClientEncrypted_L, _ClientEncrypted_LreceiveLoop, _ClientEncrypted_Linvoke, _ClientEncrypted_nextMessageId, _ClientEncrypted_nextSeqNo, _ClientEncrypted_sendMessage, _ClientEncrypted_receiveLoop;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ClientEncrypted = void 0;
16
+ const _0_deps_js_1 = require("../0_deps.js");
17
+ const _1_utilities_js_1 = require("../1_utilities.js");
18
+ const _2_tl_js_1 = require("../2_tl.js");
19
+ const _4_errors_js_1 = require("../4_errors.js");
20
+ const _0_client_abstract_js_1 = require("./0_client_abstract.js");
21
+ const _0_message_js_1 = require("./0_message.js");
22
+ const _0_types_js_1 = require("./0_types.js");
23
+ // global ClientEncrypted ID counter for logs
24
+ let id = 0;
25
+ /**
26
+ * An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
27
+ *
28
+ * There are a few things to note:
29
+ *
30
+ * - This is a bare client and it stores nothing.
31
+ * - It expects an authorization key to be present before invoking any method.
32
+ * - Authorization must be set using `setAuthKey`.
33
+ * - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
34
+ * - It doesn't uncompress compressed packets.
35
+ */
36
+ class ClientEncrypted extends _0_client_abstract_js_1.ClientAbstract {
37
+ constructor(params) {
38
+ super(params);
39
+ _ClientEncrypted_instances.add(this);
40
+ _ClientEncrypted_authKey.set(this, new Uint8Array());
41
+ _ClientEncrypted_authKeyId.set(this, 0n);
42
+ _ClientEncrypted_sessionId.set(this, (0, _1_utilities_js_1.getRandomBigInt)(8, true, false));
43
+ _ClientEncrypted_state.set(this, { serverSalt: 0n, seqNo: 0, messageId: 0n });
44
+ _ClientEncrypted_toAcknowledge.set(this, new Set());
45
+ _ClientEncrypted_recentAcks.set(this, new _1_utilities_js_1.CacheMap(20));
46
+ _ClientEncrypted_promises.set(this, new Map());
47
+ // loggers
48
+ _ClientEncrypted_L.set(this, void 0);
49
+ _ClientEncrypted_LreceiveLoop.set(this, void 0);
50
+ _ClientEncrypted_Linvoke.set(this, void 0);
51
+ // receive loop handlers
52
+ Object.defineProperty(this, "handlers", {
53
+ enumerable: true,
54
+ configurable: true,
55
+ writable: true,
56
+ value: {}
57
+ });
58
+ const L = __classPrivateFieldSet(this, _ClientEncrypted_L, (0, _1_utilities_js_1.getLogger)("ClientEncrypted").client(id++), "f");
59
+ __classPrivateFieldSet(this, _ClientEncrypted_LreceiveLoop, L.branch("receiveLoop"), "f");
60
+ __classPrivateFieldSet(this, _ClientEncrypted_Linvoke, L.branch("invoke"), "f");
61
+ }
62
+ async connect() {
63
+ await super.connect();
64
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_receiveLoop).call(this)); // TODO: ability to join this promise
65
+ }
66
+ async setAuthKey(key) {
67
+ const hash = await (0, _1_utilities_js_1.sha1)(key);
68
+ __classPrivateFieldSet(this, _ClientEncrypted_authKeyId, (0, _1_utilities_js_1.bigIntFromBuffer)(hash.slice(-8), true, false), "f");
69
+ __classPrivateFieldSet(this, _ClientEncrypted_authKey, key, "f");
70
+ }
71
+ get authKey() {
72
+ return __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f");
73
+ }
74
+ set serverSalt(serverSalt) {
75
+ __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt = serverSalt;
76
+ }
77
+ get serverSalt() {
78
+ return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt;
79
+ }
80
+ async invoke(function_, noWait) {
81
+ const messageId = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this);
82
+ const message__ = new _2_tl_js_1.Message_(messageId, __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, true), function_);
83
+ let message_;
84
+ let container = undefined;
85
+ if (__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").size) {
86
+ const ack = new _2_tl_js_1.Message_(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f")] }));
87
+ __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").set(ack.id, { container, message: ack });
88
+ message_ = new _2_tl_js_1.MessageContainer(container = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), [message__, ack]);
89
+ }
90
+ else {
91
+ message_ = message__;
92
+ }
93
+ await __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, message_);
94
+ __classPrivateFieldGet(this, _ClientEncrypted_Linvoke, "f").debug("invoked", function_[_2_tl_js_1.name]);
95
+ if (noWait) {
96
+ __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, {
97
+ container,
98
+ message: message__,
99
+ call: function_,
100
+ });
101
+ return;
102
+ }
103
+ return await new Promise((resolve, reject) => {
104
+ __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, { container, message: message__, resolve, reject, call: function_ });
105
+ }).then((v) => v);
106
+ }
107
+ }
108
+ exports.ClientEncrypted = ClientEncrypted;
109
+ _ClientEncrypted_authKey = new WeakMap(), _ClientEncrypted_authKeyId = new WeakMap(), _ClientEncrypted_sessionId = new WeakMap(), _ClientEncrypted_state = new WeakMap(), _ClientEncrypted_toAcknowledge = new WeakMap(), _ClientEncrypted_recentAcks = new WeakMap(), _ClientEncrypted_promises = new WeakMap(), _ClientEncrypted_L = new WeakMap(), _ClientEncrypted_LreceiveLoop = new WeakMap(), _ClientEncrypted_Linvoke = new WeakMap(), _ClientEncrypted_instances = new WeakSet(), _ClientEncrypted_nextMessageId = function _ClientEncrypted_nextMessageId() {
110
+ return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId = (0, _0_message_js_1.getMessageId)(__classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId);
111
+ }, _ClientEncrypted_nextSeqNo = function _ClientEncrypted_nextSeqNo(contentRelated) {
112
+ let seqNo = __classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo * 2;
113
+ if (contentRelated) {
114
+ seqNo++;
115
+ __classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo++;
116
+ }
117
+ return seqNo;
118
+ }, _ClientEncrypted_sendMessage = async function _ClientEncrypted_sendMessage(message) {
119
+ const payload = await (0, _0_message_js_1.encryptMessage)(message, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt, __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f"));
120
+ await this.transport.transport.send(payload);
121
+ }, _ClientEncrypted_receiveLoop = async function _ClientEncrypted_receiveLoop() {
122
+ if (!this.transport) {
123
+ (0, _1_utilities_js_1.UNREACHABLE)();
124
+ }
125
+ while (this.connected) {
126
+ try {
127
+ const buffer = await this.transport.transport.receive();
128
+ __classPrivateFieldGet(this, _ClientEncrypted_L, "f").inBin(buffer);
129
+ let decrypted;
130
+ try {
131
+ decrypted = await ((0, _0_message_js_1.decryptMessage)(buffer, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f")));
132
+ __classPrivateFieldGet(this, _ClientEncrypted_L, "f").in(decrypted);
133
+ }
134
+ catch (err) {
135
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to decrypt message:", err);
136
+ this.handlers.error?.(err, "decryption");
137
+ continue;
138
+ }
139
+ const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
140
+ for (const message of messages) {
141
+ let body = message.body;
142
+ if (body instanceof _2_tl_js_1.types.Gzip_packed) {
143
+ body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
144
+ }
145
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("received", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
146
+ if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
147
+ this.handlers.updates?.(body, null);
148
+ }
149
+ else if (body instanceof _2_tl_js_1.types.New_session_created) {
150
+ this.serverSalt = body.server_salt;
151
+ this.handlers.serverSaltReassigned?.(this.serverSalt);
152
+ }
153
+ else if (message.body instanceof _2_tl_js_1.RPCResult) {
154
+ let result = message.body.result;
155
+ if (result instanceof _2_tl_js_1.types.Gzip_packed) {
156
+ result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
157
+ }
158
+ if (result instanceof _2_tl_js_1.types.Rpc_error) {
159
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
160
+ }
161
+ else {
162
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
163
+ }
164
+ const messageId = message.body.messageId;
165
+ const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(messageId);
166
+ const resolvePromise = () => {
167
+ if (promise) {
168
+ if (result instanceof _2_tl_js_1.types.Rpc_error) {
169
+ promise.reject?.((0, _4_errors_js_1.upgradeInstance)(result, promise.call));
170
+ }
171
+ else {
172
+ promise.resolve?.(result);
173
+ }
174
+ __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(messageId);
175
+ }
176
+ };
177
+ if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
178
+ this.handlers.updates?.(result, promise?.call ?? null, resolvePromise);
179
+ }
180
+ else {
181
+ this.handlers.result?.(result, resolvePromise);
182
+ }
183
+ }
184
+ else if (message.body instanceof _2_tl_js_1.types.Pong) {
185
+ const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.msg_id);
186
+ if (promise) {
187
+ promise.resolve?.(message.body);
188
+ __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(message.body.msg_id);
189
+ }
190
+ }
191
+ else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
192
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("server salt reassigned");
193
+ this.serverSalt = message.body.new_server_salt;
194
+ this.handlers.serverSaltReassigned?.(this.serverSalt);
195
+ const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.bad_msg_id);
196
+ const ack = __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").get(message.body.bad_msg_id);
197
+ if (promise) {
198
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
199
+ }
200
+ else if (ack) {
201
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
202
+ }
203
+ else {
204
+ for (const promise of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").values()) {
205
+ if (promise.container && promise.container == message.body.bad_msg_id) {
206
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
207
+ }
208
+ }
209
+ for (const ack of __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").values()) {
210
+ if (ack.container && ack.container == message.body.bad_msg_id) {
211
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
212
+ }
213
+ }
214
+ }
215
+ }
216
+ __classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").add(message.id);
217
+ }
218
+ }
219
+ catch (err) {
220
+ if (!this.connected) {
221
+ break;
222
+ }
223
+ else if (err instanceof _2_tl_js_1.TLError) {
224
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to deserialize:", err);
225
+ this.handlers.error?.(err, "deserialization");
226
+ }
227
+ else {
228
+ __classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("unexpected error:", err);
229
+ }
230
+ }
231
+ }
232
+ if (!this.connected) {
233
+ for (const [key, { reject }] of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").entries()) {
234
+ reject?.(new _0_types_js_1.ConnectionError("Connection was closed"));
235
+ __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(key);
236
+ }
237
+ }
238
+ else {
239
+ (0, _1_utilities_js_1.UNREACHABLE)();
240
+ }
241
+ };
@@ -7,6 +7,9 @@ export interface ClientPlainParams extends ClientAbstractParams {
7
7
  */
8
8
  publicKeys?: PublicKeys;
9
9
  }
10
+ /**
11
+ * An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
12
+ */
10
13
  export declare class ClientPlain extends ClientAbstract {
11
14
  #private;
12
15
  constructor(params?: ClientPlainParams);
@@ -21,11 +21,14 @@ const _0_client_abstract_js_1 = require("./0_client_abstract.js");
21
21
  const _0_message_js_1 = require("./0_message.js");
22
22
  const L = (0, _1_utilities_js_1.getLogger)("ClientPlain");
23
23
  const LcreateAuthKey = L.branch("createAuthKey");
24
+ /**
25
+ * An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
26
+ */
24
27
  class ClientPlain extends _0_client_abstract_js_1.ClientAbstract {
25
28
  constructor(params) {
26
29
  super(params);
27
30
  _ClientPlain_publicKeys.set(this, void 0);
28
- _ClientPlain_lastMsgId.set(this, 0n);
31
+ _ClientPlain_lastMsgId.set(this, 0n); // TODO: refactor
29
32
  __classPrivateFieldSet(this, _ClientPlain_publicKeys, params?.publicKeys ?? _4_constants_js_1.PUBLIC_KEYS, "f");
30
33
  }
31
34
  async invoke(function_) {
@@ -1,7 +1,7 @@
1
+ import { MaybePromise } from "../1_utilities.js";
1
2
  import { Update, UpdateIntersection, User } from "../3_types.js";
2
3
  import { FilterQuery, WithFilter } from "./0_filters.js";
3
- type MaybePromise<T> = T | Promise<T>;
4
- export type NextFunction = () => Promise<void>;
4
+ export type NextFunction<T = void> = () => Promise<T>;
5
5
  export type MiddlewareFn<C> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
6
6
  export interface MiddlewareObj<C> {
7
7
  middleware: () => MiddlewareFn<C>;
@@ -27,4 +27,3 @@ export declare class Composer<C extends {
27
27
  prefixes: string | string[];
28
28
  }, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
29
29
  }
30
- export {};
@@ -1,4 +1,5 @@
1
- import { Document } from "../3_types.js";
1
+ import { types } from "../2_tl.js";
2
+ import { Sticker } from "../3_types.js";
2
3
  import { DownloadParams, UploadParams } from "./0_params.js";
3
4
  import { C } from "./0_types.js";
4
5
  export declare class FileManager {
@@ -6,5 +7,6 @@ export declare class FileManager {
6
7
  constructor(c: C);
7
8
  upload(contents: Uint8Array, params?: UploadParams): Promise<import("../tl/2_types.js").InputFile_ | import("../tl/2_types.js").InputFileBig_>;
8
9
  download(fileId: string, params?: DownloadParams): AsyncGenerator<Uint8Array, void, unknown>;
9
- getCustomEmojiDocuments(id: string | string[]): Promise<Document[]>;
10
+ getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?: number): Promise<string>;
11
+ getCustomEmojiStickers(id: string | string[]): Promise<Sticker[]>;
10
12
  }
@@ -13,10 +13,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  var _FileManager_instances, _FileManager_c, _FileManager_Lupload, _FileManager_downloadInner;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.FileManager = void 0;
16
- const _0_deps_js_1 = require("../0_deps.js");
17
16
  const _1_utilities_js_1 = require("../1_utilities.js");
18
17
  const _2_tl_js_1 = require("../2_tl.js");
19
18
  const _3_types_js_1 = require("../3_types.js");
19
+ const _4_constants_js_1 = require("../4_constants.js");
20
20
  const _4_errors_js_1 = require("../4_errors.js");
21
21
  const _0_types_js_1 = require("./0_types.js");
22
22
  class FileManager {
@@ -129,6 +129,18 @@ class FileManager {
129
129
  }
130
130
  break;
131
131
  }
132
+ case _3_types_js_1.FileType.Thumbnail: {
133
+ const location = new _2_tl_js_1.types.InputDocumentFileLocation({
134
+ id: fileId_.location.id,
135
+ access_hash: fileId_.location.accessHash,
136
+ file_reference: fileId_.fileReference ?? new Uint8Array(),
137
+ thumb_size: "thumbnailType" in fileId_.location.source ? String.fromCharCode(fileId_.location.source.thumbnailType) : (0, _1_utilities_js_1.UNREACHABLE)(),
138
+ });
139
+ for await (const chunk of __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_downloadInner).call(this, location, fileId_.dcId, params)) {
140
+ yield chunk;
141
+ }
142
+ break;
143
+ }
132
144
  }
133
145
  }
134
146
  else if (fileId_.location.type == "common") {
@@ -146,14 +158,26 @@ class FileManager {
146
158
  (0, _1_utilities_js_1.UNREACHABLE)();
147
159
  }
148
160
  }
149
- async getCustomEmojiDocuments(id) {
161
+ async getStickerSetName(inputStickerSet, hash = 0) {
162
+ const maybeStickerSetName = await __classPrivateFieldGet(this, _FileManager_c, "f").messageStorage.getStickerSetName(inputStickerSet.id, inputStickerSet.access_hash);
163
+ if (maybeStickerSetName != null && Date.now() - maybeStickerSetName[1].getTime() < _4_constants_js_1.STICKER_SET_NAME_TTL) {
164
+ return maybeStickerSetName[0];
165
+ }
166
+ else {
167
+ const stickerSet = await __classPrivateFieldGet(this, _FileManager_c, "f").api.messages.getStickerSet({ stickerset: inputStickerSet, hash });
168
+ const name = stickerSet[_2_tl_js_1.as](_2_tl_js_1.types.messages.StickerSet).set.short_name;
169
+ await __classPrivateFieldGet(this, _FileManager_c, "f").messageStorage.updateStickerSetName(inputStickerSet.id, inputStickerSet.access_hash, name);
170
+ return name;
171
+ }
172
+ }
173
+ async getCustomEmojiStickers(id) {
150
174
  id = Array.isArray(id) ? id : [id];
151
175
  if (!id.length) {
152
176
  throw new Error("No custom emoji ID provided");
153
177
  }
154
- const documents = new Array();
178
+ const stickers = new Array();
155
179
  let shouldFetch = false;
156
- for (const [i, id_] of id.entries()) {
180
+ for (const id_ of id) {
157
181
  const maybeDocument = await __classPrivateFieldGet(this, _FileManager_c, "f").messageStorage.getCustomEmojiDocument(BigInt(id_));
158
182
  if (maybeDocument != null && Date.now() - maybeDocument[1].getTime() <= 30 * 60 * 1000) {
159
183
  const document_ = maybeDocument[0];
@@ -165,8 +189,8 @@ class FileManager {
165
189
  };
166
190
  const fileUniqueId = (0, _3_types_js_1.toUniqueFileId)(fileId_);
167
191
  const fileId = (0, _3_types_js_1.serializeFileId)(fileId_);
168
- const document = (0, _3_types_js_1.constructDocument)(document_, new _2_tl_js_1.types.DocumentAttributeFilename({ file_name: `${id[i] ?? "customEmoji"}.${(0, _0_deps_js_1.extension)(document_.mime_type)}` }), fileId, fileUniqueId);
169
- documents.push(document);
192
+ const sticker = await (0, _3_types_js_1.constructSticker)(document_, fileId, fileUniqueId, this.getStickerSetName.bind(this), id_);
193
+ stickers.push(sticker);
170
194
  }
171
195
  else {
172
196
  shouldFetch = true;
@@ -174,7 +198,7 @@ class FileManager {
174
198
  }
175
199
  }
176
200
  if (!shouldFetch) {
177
- return documents;
201
+ return stickers;
178
202
  }
179
203
  const documents_ = await __classPrivateFieldGet(this, _FileManager_c, "f").api.messages.getCustomEmojiDocuments({ document_id: id.map(BigInt) }).then((v) => v.map((v) => v[_2_tl_js_1.as](_2_tl_js_1.types.Document)));
180
204
  for (const [i, document_] of documents_.entries()) {
@@ -187,10 +211,10 @@ class FileManager {
187
211
  };
188
212
  const fileUniqueId = (0, _3_types_js_1.toUniqueFileId)(fileId_);
189
213
  const fileId = (0, _3_types_js_1.serializeFileId)(fileId_);
190
- const document = (0, _3_types_js_1.constructDocument)(document_, new _2_tl_js_1.types.DocumentAttributeFilename({ file_name: `${id[i] ?? "customEmoji"}.${(0, _0_deps_js_1.extension)(document_.mime_type)}` }), fileId, fileUniqueId);
191
- documents.push(document);
214
+ const sticker = await (0, _3_types_js_1.constructSticker)(document_, fileId, fileUniqueId, this.getStickerSetName.bind(this), id[i]);
215
+ stickers.push(sticker);
192
216
  }
193
- return documents;
217
+ return stickers;
194
218
  }
195
219
  }
196
220
  exports.FileManager = FileManager;
@@ -17,7 +17,6 @@ export declare class MessageManager {
17
17
  parseMode?: ParseMode;
18
18
  entities?: MessageEntity[];
19
19
  }): Promise<readonly [string, enums.MessageEntity[] | undefined]>;
20
- getStickerSetName(inputStickerSet: types.InputStickerSetID, hash?: number): Promise<string>;
21
20
  constructMessage(message_: enums.Message, r?: boolean): Promise<Message>;
22
21
  forwardMessages(from: ID, to: ID, messageIds: number[], params?: ForwardMessagesParams): Promise<Message[]>;
23
22
  getHistory(chatId: ID, params?: GetHistoryParams): Promise<Message[]>;
@@ -34,7 +33,7 @@ export declare class MessageManager {
34
33
  sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<import("../3_types.js").MessageVideo>;
35
34
  sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<import("../3_types.js").MessageDocument>;
36
35
  sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<import("../3_types.js").MessagePhoto>;
37
- resolveFileId(maybeFileId: string, expectedFileType: FileType): {
36
+ resolveFileId(maybeFileId: string, expectedFileType: FileType | FileType[]): {
38
37
  id: bigint;
39
38
  access_hash: bigint;
40
39
  file_reference: Uint8Array;
@@ -74,5 +73,8 @@ export declare class MessageManager {
74
73
  leaveChat(chatId: ID): Promise<void>;
75
74
  blockUser(userId: ID): Promise<void>;
76
75
  unblockUser(userId: ID): Promise<void>;
76
+ getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
77
+ setChatStickerSet(chatId: ID, setName: string): Promise<void>;
78
+ deleteChatStickerSet(chatId: ID): Promise<void>;
77
79
  }
78
80
  export {};