@mtkruto/node 0.1.170 → 0.1.190

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 (570) 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_html.js +0 -6
  10. package/esm/client/0_markdown.d.ts +21 -0
  11. package/esm/client/0_markdown.js +321 -0
  12. package/esm/client/0_message.d.ts +1 -1
  13. package/esm/client/0_message.js +3 -6
  14. package/esm/client/0_params.d.ts +16 -0
  15. package/esm/client/1_client_encrypted.d.ts +34 -0
  16. package/esm/client/1_client_encrypted.js +239 -0
  17. package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
  18. package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
  19. package/esm/client/1_composer.d.ts +2 -3
  20. package/esm/client/2_message_manager.d.ts +8 -3
  21. package/esm/client/2_message_manager.js +101 -9
  22. package/esm/client/4_client.d.ts +98 -40
  23. package/esm/client/4_client.js +263 -414
  24. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
  25. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
  26. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
  27. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
  28. package/{script/deps/deno.land/std@0.219.0 → esm/deps/deno.land/std@0.221.0}/path/basename.d.ts +9 -0
  29. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
  30. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
  31. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
  32. package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  33. package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
  34. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  35. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
  36. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  37. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
  38. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  39. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
  40. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
  41. package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/basename.d.ts +9 -0
  42. package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
  43. package/esm/storage/0_storage.d.ts +10 -1
  44. package/esm/storage/0_storage.js +40 -5
  45. package/esm/tl/6_message.d.ts +3 -2
  46. package/esm/tl/6_message.js +1 -1
  47. package/esm/tl/7_message_container.d.ts +6 -4
  48. package/esm/tl/7_message_container.js +22 -7
  49. package/esm/types/0_message_entity.d.ts +1 -0
  50. package/esm/types/0_message_entity.js +34 -0
  51. package/esm/types/0_parse_mode.d.ts +1 -1
  52. package/esm/types/4_inline_query_result.d.ts +1 -1
  53. package/esm/types/4_inline_query_result.js +4 -0
  54. package/esm/utilities/0_bigint.d.ts +1 -0
  55. package/esm/utilities/0_bigint.js +1 -0
  56. package/package.json +1 -1
  57. package/script/0_deps.d.ts +4 -4
  58. package/script/0_deps.js +5 -5
  59. package/script/4_constants.d.ts +1 -2
  60. package/script/4_constants.js +3 -4
  61. package/script/5_client.d.ts +2 -2
  62. package/script/5_client.js +2 -2
  63. package/script/client/0_client_abstract.d.ts +6 -4
  64. package/script/client/0_client_abstract.js +11 -5
  65. package/script/client/0_html.js +0 -6
  66. package/script/client/0_markdown.d.ts +21 -0
  67. package/script/client/0_markdown.js +325 -0
  68. package/script/client/0_message.d.ts +1 -1
  69. package/script/client/0_message.js +3 -6
  70. package/script/client/0_params.d.ts +16 -0
  71. package/script/client/1_client_encrypted.d.ts +34 -0
  72. package/script/client/1_client_encrypted.js +243 -0
  73. package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
  74. package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
  75. package/script/client/1_composer.d.ts +2 -3
  76. package/script/client/2_message_manager.d.ts +8 -3
  77. package/script/client/2_message_manager.js +101 -9
  78. package/script/client/4_client.d.ts +98 -40
  79. package/script/client/4_client.js +259 -410
  80. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
  81. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
  82. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
  83. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
  84. package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/basename.d.ts +9 -0
  85. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
  86. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
  87. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
  88. package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  89. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/parse.js +13 -1
  90. package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  91. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
  92. package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  93. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
  94. package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  95. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
  96. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
  97. package/{esm/deps/deno.land/std@0.219.0/path → script/deps/deno.land/std@0.221.0/path/windows}/basename.d.ts +9 -0
  98. package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
  99. package/script/storage/0_storage.d.ts +10 -1
  100. package/script/storage/0_storage.js +40 -5
  101. package/script/tl/6_message.d.ts +3 -2
  102. package/script/tl/6_message.js +1 -1
  103. package/script/tl/7_message_container.d.ts +6 -4
  104. package/script/tl/7_message_container.js +20 -5
  105. package/script/types/0_message_entity.d.ts +1 -0
  106. package/script/types/0_message_entity.js +36 -1
  107. package/script/types/0_parse_mode.d.ts +1 -1
  108. package/script/types/4_inline_query_result.d.ts +1 -1
  109. package/script/types/4_inline_query_result.js +4 -0
  110. package/script/utilities/0_bigint.d.ts +1 -0
  111. package/script/utilities/0_bigint.js +1 -0
  112. package/esm/client/5_composer.d.ts +0 -4
  113. package/esm/client/5_composer.js +0 -3
  114. package/esm/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
  115. package/esm/deps/deno.land/std@0.219.0/path/parse.js +0 -12
  116. package/script/client/5_composer.d.ts +0 -4
  117. package/script/client/5_composer.js +0 -7
  118. package/script/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
  119. package/script/deps/deno.land/std@0.219.0/path/posix/basename.d.ts +0 -8
  120. package/script/deps/deno.land/std@0.219.0/path/posix/dirname.d.ts +0 -5
  121. package/script/deps/deno.land/std@0.219.0/path/posix/extname.d.ts +0 -6
  122. package/script/deps/deno.land/std@0.219.0/path/windows/basename.d.ts +0 -8
  123. package/script/deps/deno.land/std@0.219.0/path/windows/dirname.d.ts +0 -5
  124. package/script/deps/deno.land/std@0.219.0/path/windows/extname.d.ts +0 -6
  125. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
  126. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
  127. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
  128. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
  129. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
  130. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
  131. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
  132. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
  133. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
  134. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
  135. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
  136. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
  137. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
  138. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
  139. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
  140. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
  141. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
  142. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
  143. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
  144. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
  145. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
  146. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
  147. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
  148. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
  149. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
  150. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
  151. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
  152. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
  153. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
  154. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
  155. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
  156. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
  157. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
  158. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
  159. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
  160. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
  161. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
  162. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
  163. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
  164. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
  165. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
  166. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
  167. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
  168. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
  169. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
  170. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
  171. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
  172. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
  173. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
  174. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
  175. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
  176. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
  177. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
  178. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
  179. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
  180. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
  181. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
  182. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
  183. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
  184. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
  185. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
  186. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
  187. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
  188. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
  189. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
  190. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
  191. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
  192. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
  193. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
  194. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
  195. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
  196. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
  197. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
  198. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
  199. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
  200. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
  201. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
  202. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
  203. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
  204. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
  205. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
  206. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
  207. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
  208. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
  209. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  210. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
  211. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
  212. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
  213. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
  214. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
  215. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
  216. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
  217. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
  218. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
  219. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
  220. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
  221. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
  222. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
  223. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
  224. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
  225. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
  226. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
  227. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
  228. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
  229. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
  230. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
  231. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
  232. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  233. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
  234. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
  235. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
  236. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
  237. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
  238. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
  239. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
  240. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
  241. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
  242. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
  243. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.d.ts +0 -0
  244. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
  245. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.d.ts +0 -0
  246. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
  247. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
  248. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
  249. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
  250. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
  251. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
  252. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
  253. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
  254. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
  255. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
  256. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
  257. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
  258. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
  259. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
  260. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
  261. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
  262. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
  263. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
  264. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
  265. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
  266. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
  267. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
  268. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
  269. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
  270. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
  271. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
  272. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
  273. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
  274. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
  275. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
  276. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
  277. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
  278. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
  279. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
  280. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
  281. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
  282. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
  283. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
  284. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
  285. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
  286. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
  287. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
  288. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
  289. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
  290. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
  291. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
  292. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
  293. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
  294. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
  295. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
  296. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
  297. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
  298. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
  299. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
  300. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
  301. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
  302. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
  303. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
  304. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
  305. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
  306. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
  307. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
  308. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
  309. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
  310. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
  311. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
  312. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
  313. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
  314. /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/dirname.d.ts +0 -0
  315. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
  316. /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/extname.d.ts +0 -0
  317. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
  318. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
  319. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
  320. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
  321. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
  322. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
  323. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
  324. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
  325. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
  326. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
  327. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
  328. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
  329. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
  330. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
  331. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
  332. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
  333. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
  334. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
  335. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
  336. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
  337. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
  338. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
  339. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
  340. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
  341. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
  342. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
  343. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
  344. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
  345. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
  346. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
  347. /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
  348. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
  349. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
  350. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
  351. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
  352. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
  353. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
  354. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
  355. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
  356. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
  357. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
  358. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
  359. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
  360. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
  361. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
  362. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
  363. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
  364. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
  365. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
  366. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
  367. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
  368. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
  369. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
  370. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
  371. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
  372. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
  373. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
  374. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
  375. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
  376. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
  377. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
  378. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
  379. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
  380. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
  381. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
  382. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
  383. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
  384. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
  385. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
  386. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
  387. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
  388. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
  389. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
  390. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
  391. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
  392. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
  393. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
  394. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
  395. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
  396. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
  397. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
  398. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
  399. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
  400. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
  401. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
  402. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
  403. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
  404. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
  405. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
  406. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
  407. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
  408. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
  409. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
  410. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
  411. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
  412. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
  413. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
  414. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
  415. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
  416. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
  417. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
  418. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
  419. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
  420. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
  421. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
  422. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
  423. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
  424. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
  425. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
  426. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
  427. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
  428. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
  429. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
  430. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
  431. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
  432. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
  433. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
  434. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
  435. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
  436. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
  437. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
  438. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
  439. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
  440. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
  441. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
  442. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
  443. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
  444. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
  445. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
  446. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
  447. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
  448. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
  449. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
  450. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
  451. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
  452. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
  453. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
  454. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
  455. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
  456. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
  457. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
  458. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
  459. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
  460. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
  461. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
  462. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
  463. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
  464. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
  465. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
  466. /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/dirname.d.ts +0 -0
  467. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
  468. /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/extname.d.ts +0 -0
  469. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
  470. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
  471. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
  472. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
  473. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
  474. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
  475. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
  476. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
  477. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
  478. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
  479. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
  480. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
  481. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
  482. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
  483. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
  484. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
  485. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
  486. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
  487. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
  488. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
  489. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
  490. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
  491. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
  492. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
  493. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
  494. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
  495. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
  496. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
  497. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
  498. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
  499. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
  500. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
  501. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
  502. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
  503. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
  504. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
  505. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
  506. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
  507. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
  508. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
  509. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
  510. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
  511. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
  512. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
  513. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
  514. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
  515. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
  516. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
  517. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
  518. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
  519. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
  520. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
  521. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
  522. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
  523. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
  524. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
  525. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
  526. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
  527. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
  528. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
  529. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
  530. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
  531. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
  532. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
  533. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
  534. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
  535. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
  536. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
  537. /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/dirname.d.ts +0 -0
  538. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
  539. /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/extname.d.ts +0 -0
  540. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
  541. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
  542. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
  543. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
  544. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
  545. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
  546. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
  547. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
  548. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
  549. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
  550. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
  551. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
  552. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
  553. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
  554. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
  555. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
  556. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
  557. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
  558. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
  559. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
  560. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
  561. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
  562. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
  563. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
  564. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
  565. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
  566. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
  567. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
  568. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
  569. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
  570. /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
@@ -10,54 +10,56 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
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
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _Client_instances, _Client_auth, _Client_sessionId, _Client_state, _Client_promises, _Client_toAcknowledge, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_parseMode, _Client_publicKeys, _Client_autoStart, _Client_ignoreOutgoing, _Client_prefixes, _Client_storeMessages, _Client_id, _Client_L, _Client_Lauthorize, _Client_LreceiveLoop, _Client_LpingLoop, _Client_Linvoke, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_namespaceProxies, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_setAuth, _Client_storageInited, _Client_initStorage, _Client_connectMutex, _Client_connectionInited, _Client_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _Client_getSelfId, _Client_receiveLoop, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_pingLoop, _Client_pingLoopStarted, _Client_autoStarted, _Client_lastMsgId, _Client_invoke, _Client_handleInvokeError, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe, _Client_handle;
13
+ var _Client_instances, _Client_client, _Client_guaranteeUpdateDelivery, _Client_updateManager, _Client_networkStatisticsManager, _Client_botInfoManager, _Client_fileManager, _Client_reactionManager, _Client_messageManager, _Client_storyManager, _Client_callbackQueryManager, _Client_inlineQueryManager, _Client_chatListManager, _Client_accountManager, _Client_parseMode, _Client_publicKeys, _Client_ignoreOutgoing, _Client_storeMessages, _Client_Lauthorize, _Client_LpingLoop, _Client_LhandleMigrationError, _Client_L$initConncetion, _Client_namespaceProxies, _Client_getApiId, _Client_constructContext, _Client_propagateConnectionState, _Client_lastPropagatedConnectionState, _Client_stateChangeHandler, _Client_storageInited, _Client_initStorage, _Client_connectionInited, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_getSelfId, _Client_pingLoopStarted, _Client_pingLoopAbortController, _Client_pingInterval, _Client_lastUpdates, _Client_startPingLoop, _Client_pingLoop, _Client_invoke, _Client_handleInvokeError, _Client_getUserAccessHash, _Client_getChannelAccessHash, _Client_getInputPeerInner, _Client_handleCtxUpdate, _Client_queueHandleCtxUpdate, _Client_handleUpdate, _Client_lastGetMe, _Client_getMe;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Client = exports.restartAuth = exports.skipInvoke = exports.handleMigrationError = void 0;
16
- const _0_deps_js_1 = require("../0_deps.js");
15
+ exports.Client = exports.handleMigrationError = exports.restartAuth = exports.Composer = void 0;
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_storage_js_1 = require("../3_storage.js");
20
19
  const _3_types_js_1 = require("../3_types.js");
21
20
  const _4_constants_js_1 = require("../4_constants.js");
22
21
  const _4_errors_js_1 = require("../4_errors.js");
23
- const _0_client_abstract_js_1 = require("./0_client_abstract.js");
24
- const _0_filters_js_1 = require("./0_filters.js");
25
- const _0_message_js_1 = require("./0_message.js");
26
22
  const _0_password_js_1 = require("./0_password.js");
27
- const _0_types_js_1 = require("./0_types.js");
28
23
  const _0_utilities_js_1 = require("./0_utilities.js");
29
24
  const _1_account_manager_js_1 = require("./1_account_manager.js");
30
25
  const _1_bot_info_manager_js_1 = require("./1_bot_info_manager.js");
26
+ const _1_client_encrypted_js_1 = require("./1_client_encrypted.js");
27
+ const _1_client_plain_js_1 = require("./1_client_plain.js");
31
28
  const _1_composer_js_1 = require("./1_composer.js");
32
29
  const _1_file_manager_js_1 = require("./1_file_manager.js");
33
30
  const _1_network_statistics_manager_js_1 = require("./1_network_statistics_manager.js");
34
31
  const _1_reaction_manager_js_1 = require("./1_reaction_manager.js");
35
32
  const _1_update_manager_js_1 = require("./1_update_manager.js");
36
- const _2_client_plain_js_1 = require("./2_client_plain.js");
37
33
  const _2_message_manager_js_1 = require("./2_message_manager.js");
38
34
  const _3_callback_query_manager_js_1 = require("./3_callback_query_manager.js");
39
35
  const _3_chat_list_manager_js_1 = require("./3_chat_list_manager.js");
40
36
  const _3_inline_query_manager_js_1 = require("./3_inline_query_manager.js");
41
37
  const _3_story_manager_js_1 = require("./3_story_manager.js");
42
- let id = 0;
43
- const getEntity = Symbol();
44
- exports.handleMigrationError = Symbol("handleMigrationError");
45
- const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
38
+ class Composer extends _1_composer_js_1.Composer {
39
+ }
40
+ exports.Composer = Composer;
46
41
  function skipInvoke() {
47
42
  return (_ctx, next) => next();
48
43
  }
49
- exports.skipInvoke = skipInvoke;
50
44
  exports.restartAuth = Symbol("restartAuth");
51
- class Client extends _0_client_abstract_js_1.ClientAbstract {
45
+ exports.handleMigrationError = Symbol("handleMigrationError");
46
+ // global Client ID counter for logs
47
+ let id = 0;
48
+ const getEntity = Symbol();
49
+ const functionNamespaces = Object.entries(_2_tl_js_1.functions).filter(([, v]) => !(v instanceof Function)).map(([k]) => k);
50
+ /**
51
+ * An MTKruto client.
52
+ */
53
+ class Client extends Composer {
52
54
  /**
53
55
  * Constructs the client.
54
56
  *
55
- * @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the string session.
57
+ * @param storage The storage provider to use. Defaults to memory storage. Passing a string constructs a memory storage with the string being the auth string.
56
58
  * @param apiId App's API ID from [my.telegram.org](https://my.telegram.org/apps). Defaults to 0 (unset).
57
59
  * @param apiHash App's API hash from [my.telegram.org/apps](https://my.telegram.org/apps). Defaults to empty string (unset).
58
60
  */
59
61
  constructor(storage, apiId = 0, apiHash = "", params) {
60
- super(params);
62
+ super();
61
63
  _Client_instances.add(this);
62
64
  Object.defineProperty(this, "apiId", {
63
65
  enumerable: true,
@@ -71,11 +73,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
71
73
  writable: true,
72
74
  value: apiHash
73
75
  });
74
- _Client_auth.set(this, null);
75
- _Client_sessionId.set(this, (0, _1_utilities_js_1.getRandomBigInt)(8, true, false));
76
- _Client_state.set(this, { salt: 0n, seqNo: 0 });
77
- _Client_promises.set(this, new Map());
78
- _Client_toAcknowledge.set(this, new Set());
76
+ _Client_client.set(this, void 0);
79
77
  _Client_guaranteeUpdateDelivery.set(this, void 0);
80
78
  _Client_updateManager.set(this, void 0);
81
79
  _Client_networkStatisticsManager.set(this, void 0);
@@ -138,16 +136,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
138
136
  value: void 0
139
137
  });
140
138
  _Client_publicKeys.set(this, void 0);
141
- _Client_autoStart.set(this, void 0);
142
139
  _Client_ignoreOutgoing.set(this, void 0);
143
- _Client_prefixes.set(this, void 0);
144
140
  _Client_storeMessages.set(this, void 0);
145
- _Client_id.set(this, void 0);
146
- _Client_L.set(this, void 0);
147
141
  _Client_Lauthorize.set(this, void 0);
148
- _Client_LreceiveLoop.set(this, void 0);
149
142
  _Client_LpingLoop.set(this, void 0);
150
- _Client_Linvoke.set(this, void 0);
151
143
  _Client_LhandleMigrationError.set(this, void 0);
152
144
  _Client_L$initConncetion.set(this, void 0);
153
145
  _Client_namespaceProxies.set(this, (() => {
@@ -289,6 +281,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
289
281
  const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
290
282
  return this.sendDocument(chatId, document, { ...params, replyToMessageId });
291
283
  },
284
+ replySticker: (sticker, params) => {
285
+ const { chatId, messageId } = mustGetMsg();
286
+ const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
287
+ return this.sendSticker(chatId, sticker, { ...params, replyToMessageId });
288
+ },
292
289
  replyContact: (firstName, number, params) => {
293
290
  const { chatId, messageId } = mustGetMsg();
294
291
  const replyToMessageId = getReplyToMessageId(params?.quote, chatId, messageId);
@@ -399,6 +396,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
399
396
  const inlineMessageId = mustGetInlineMsgId();
400
397
  return this.editInlineMessageText(inlineMessageId, text, params);
401
398
  },
399
+ editInlineMessageLiveLocation: (latitude, longitude, params) => {
400
+ const inlineMessageId = mustGetInlineMsgId();
401
+ return this.editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
402
+ },
402
403
  editInlineMessageReplyMarkup: (params) => {
403
404
  const inlineMessageId = mustGetInlineMsgId();
404
405
  return this.editInlineMessageReplyMarkup(inlineMessageId, params);
@@ -407,6 +408,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
407
408
  const { chatId } = mustGetMsg();
408
409
  return this.editMessageText(chatId, messageId, text, params);
409
410
  },
411
+ editMessageLiveLocation: (messageId, latitude, longitude, params) => {
412
+ const { chatId } = mustGetMsg();
413
+ return this.editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
414
+ },
410
415
  editMessageReplyMarkup: (messageId, params) => {
411
416
  const { chatId } = mustGetMsg();
412
417
  return this.editMessageReplyMarkup(chatId, messageId, params);
@@ -517,39 +522,35 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
517
522
  unblock: () => {
518
523
  return this.unblockUser(mustGetUserId());
519
524
  },
525
+ getChatMember: (userId) => {
526
+ const { chatId } = mustGetMsg();
527
+ return this.getChatMember(chatId, userId);
528
+ },
529
+ setChatStickerSet: (setName) => {
530
+ const { chatId } = mustGetMsg();
531
+ return this.setChatStickerSet(chatId, setName);
532
+ },
533
+ deleteChatStickerSet: () => {
534
+ const { chatId } = mustGetMsg();
535
+ return this.deleteChatStickerSet(chatId);
536
+ },
520
537
  };
521
538
  return (0, _1_utilities_js_1.cleanObject)(context);
522
539
  });
523
540
  _Client_lastPropagatedConnectionState.set(this, null);
524
- Object.defineProperty(this, "stateChangeHandler", {
525
- enumerable: true,
526
- configurable: true,
527
- writable: true,
528
- value: ((connected) => {
529
- __classPrivateFieldGet(this, _Client_connectMutex, "f").lock().then((unlock) => {
530
- try {
531
- const connectionState = connected ? "ready" : "notConnected";
532
- if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
533
- __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
534
- }
535
- }
536
- finally {
537
- unlock();
538
- }
539
- });
540
- }).bind(this)
541
- });
541
+ _Client_stateChangeHandler.set(this, ((connected) => {
542
+ const connectionState = connected ? "ready" : "notConnected";
543
+ if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
544
+ __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
545
+ }
546
+ }).bind(this));
542
547
  _Client_storageInited.set(this, false);
543
- _Client_connectMutex.set(this, new _1_utilities_js_1.Mutex());
544
548
  _Client_connectionInited.set(this, false);
545
549
  _Client_lastPropagatedAuthorizationState.set(this, null);
546
- _Client_selfId.set(this, null);
550
+ _Client_pingLoopStarted.set(this, false);
547
551
  _Client_pingLoopAbortController.set(this, null);
548
552
  _Client_pingInterval.set(this, 60 * 1000); // 60 seconds
549
553
  _Client_lastUpdates.set(this, new Date());
550
- _Client_pingLoopStarted.set(this, false);
551
- _Client_autoStarted.set(this, false);
552
- _Client_lastMsgId.set(this, 0n);
553
554
  _Client_handleInvokeError.set(this, skipInvoke());
554
555
  /**
555
556
  * Invokes a function waiting and returning its reply if the second parameter is not `true`. Requires the client
@@ -577,8 +578,38 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
577
578
  })
578
579
  });
579
580
  _Client_lastGetMe.set(this, null);
580
- //#region Composer
581
- _Client_handle.set(this, _1_composer_js_1.skip);
581
+ __classPrivateFieldSet(this, _Client_client, new _1_client_encrypted_js_1.ClientEncrypted(params), "f");
582
+ __classPrivateFieldGet(this, _Client_client, "f").stateChangeHandler = __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").bind(this);
583
+ __classPrivateFieldGet(this, _Client_client, "f").handlers = {
584
+ serverSaltReassigned: async (newServerSalt) => {
585
+ await this.storage.setServerSalt(newServerSalt);
586
+ },
587
+ updates: (updates, call, callback) => {
588
+ __classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(updates, true, call, callback);
589
+ __classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
590
+ },
591
+ result: async (result, callback) => {
592
+ await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
593
+ callback();
594
+ },
595
+ error: async (_err, source) => {
596
+ switch (source) {
597
+ case "deserialization":
598
+ await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
599
+ break;
600
+ case "decryption":
601
+ try {
602
+ await this.disconnect();
603
+ }
604
+ catch {
605
+ //
606
+ }
607
+ await this.connect();
608
+ await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
609
+ break;
610
+ }
611
+ },
612
+ };
582
613
  this.storage = typeof storage === "string" ? new _3_storage_js_1.StorageMemory(storage) : storage ?? new _3_storage_js_1.StorageMemory();
583
614
  __classPrivateFieldSet(this, _Client_storeMessages, params?.storeMessages ?? false, "f");
584
615
  if (!__classPrivateFieldGet(this, _Client_storeMessages, "f")) {
@@ -595,16 +626,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
595
626
  this.systemLangCode = params?.systemLangCode ?? _4_constants_js_1.SYSTEM_LANG_CODE;
596
627
  this.systemVersion = params?.systemVersion ?? _4_constants_js_1.SYSTEM_VERSION;
597
628
  __classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
598
- __classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
599
629
  __classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
600
- __classPrivateFieldSet(this, _Client_prefixes, params?.prefixes, "f");
630
+ if (params?.prefixes) {
631
+ this.prefixes = params?.prefixes;
632
+ }
601
633
  __classPrivateFieldSet(this, _Client_guaranteeUpdateDelivery, params?.guaranteeUpdateDelivery ?? false, "f");
602
- __classPrivateFieldSet(this, _Client_id, id++, "f");
603
- const L = __classPrivateFieldSet(this, _Client_L, (0, _1_utilities_js_1.getLogger)("Client").client(__classPrivateFieldGet(this, _Client_id, "f")), "f");
634
+ const L = (0, _1_utilities_js_1.getLogger)("Client").client(id++);
604
635
  __classPrivateFieldSet(this, _Client_Lauthorize, L.branch("authorize"), "f");
605
- __classPrivateFieldSet(this, _Client_LreceiveLoop, L.branch("receiveLoop"), "f");
606
636
  __classPrivateFieldSet(this, _Client_LpingLoop, L.branch("pingLoop"), "f");
607
- __classPrivateFieldSet(this, _Client_Linvoke, L.branch("invoke"), "f");
608
637
  __classPrivateFieldSet(this, _Client_LhandleMigrationError, L.branch("[handleMigrationError]"), "f");
609
638
  __classPrivateFieldSet(this, _Client_L$initConncetion, L.branch("#initConnection"), "f");
610
639
  const c = {
@@ -614,7 +643,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
614
643
  messageStorage: this.messageStorage,
615
644
  guaranteeUpdateDelivery: __classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f"),
616
645
  setConnectionState: __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).bind(this),
617
- resetConnectionState: () => this.stateChangeHandler(this.connected),
646
+ resetConnectionState: () => __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").call(this, this.connected),
618
647
  getSelfId: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).bind(this),
619
648
  getInputPeer: this.getInputPeer.bind(this),
620
649
  getInputChannel: this.getInputChannel.bind(this),
@@ -623,8 +652,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
623
652
  handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
624
653
  parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
625
654
  apiFactory: (dcId) => {
626
- const client = new Client((!dcId || dcId == this.dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
627
- transportProvider: this.transportProvider,
655
+ const client = new Client((!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
656
+ transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
628
657
  appVersion: this.appVersion,
629
658
  deviceModel: this.deviceModel,
630
659
  langCode: this.langCode,
@@ -633,7 +662,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
633
662
  systemVersion: this.systemVersion,
634
663
  cdn: true,
635
664
  });
636
- __classPrivateFieldGet(client, _Client_state, "f").salt = __classPrivateFieldGet(this, _Client_state, "f").salt;
665
+ __classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
637
666
  client.invoke.use(async (ctx, next) => {
638
667
  if (ctx.error instanceof _4_errors_js_1.AuthKeyUnregistered && dcId) {
639
668
  try {
@@ -653,14 +682,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
653
682
  api: client.api,
654
683
  connect: async () => {
655
684
  await client.connect();
656
- if (dcId && dcId != this.dcId) {
685
+ if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
657
686
  let dc = String(dcId);
658
- if (this.dcId < 0) {
687
+ if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
659
688
  dc += "-test";
660
689
  }
661
690
  await client.setDc(dc);
662
691
  }
663
- await __classPrivateFieldGet(client, _Client_instances, "m", _Client_initConnection).call(client);
664
692
  },
665
693
  disconnect: client.disconnect.bind(client),
666
694
  };
@@ -681,8 +709,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
681
709
  __classPrivateFieldSet(this, _Client_chatListManager, new _3_chat_list_manager_js_1.ChatListManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
682
710
  __classPrivateFieldSet(this, _Client_accountManager, new _1_account_manager_js_1.AccountManager(c), "f");
683
711
  __classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
684
- const transportProvider = this.transportProvider;
685
- this.transportProvider = (params) => {
712
+ const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
713
+ __classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
686
714
  const transport = transportProvider(params);
687
715
  transport.connection.callback = __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getTransportReadWriteCallback();
688
716
  return transport;
@@ -691,7 +719,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
691
719
  this.on("connectionState", ({ connectionState }, next) => {
692
720
  (0, _1_utilities_js_1.drop)((async () => {
693
721
  if (connectionState == "notConnected") {
694
- if (!this.transport?.transport.initialized) {
722
+ if (this.disconnected) {
695
723
  L.debug("not reconnecting");
696
724
  return;
697
725
  }
@@ -728,6 +756,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
728
756
  });
729
757
  }
730
758
  }
759
+ // direct ClientEncrypted property proxies
760
+ get connected() {
761
+ return __classPrivateFieldGet(this, _Client_client, "f").connected;
762
+ }
763
+ get disconnected() {
764
+ return __classPrivateFieldGet(this, _Client_client, "f").disconnected;
765
+ }
731
766
  /**
732
767
  * Sets the DC and resets the auth key stored in the session provider
733
768
  * if the stored DC was not the same as the `dc` parameter.
@@ -741,7 +776,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
741
776
  await this.storage.setAuthKey(null);
742
777
  await this.storage.getAuthKey();
743
778
  }
744
- super.setDc(dc);
779
+ __classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
745
780
  }
746
781
  /**
747
782
  * Loads the session if `setDc` was not called, initializes and connnects
@@ -749,58 +784,43 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
749
784
  * Before establishing the connection, the session is saved.
750
785
  */
751
786
  async connect() {
752
- if (this.connected) {
753
- return;
754
- }
755
- const unlock = await __classPrivateFieldGet(this, _Client_connectMutex, "f").lock();
756
- try {
757
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
758
- const authKey = await this.storage.getAuthKey();
759
- if (authKey == null) {
760
- const plain = new _2_client_plain_js_1.ClientPlain({ initialDc: this.initialDc, transportProvider: this.transportProvider, cdn: this.cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
761
- const dc = await this.storage.getDc();
762
- if (dc != null) {
763
- plain.setDc(dc);
764
- }
765
- await plain.connect();
766
- const [authKey, salt] = await plain.createAuthKey();
767
- await plain.disconnect();
768
- await this.storage.setAuthKey(authKey);
769
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
770
- __classPrivateFieldGet(this, _Client_state, "f").salt = salt;
771
- await this.storage.setServerSalt(salt);
772
- }
773
- else {
774
- if (__classPrivateFieldGet(this, _Client_state, "f").salt == 0n) {
775
- __classPrivateFieldGet(this, _Client_state, "f").salt = await this.storage.getServerSalt() ?? 0n;
776
- }
777
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_setAuth).call(this, authKey);
787
+ await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
788
+ const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
789
+ if (authKey != null && dc != null) {
790
+ await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
791
+ await __classPrivateFieldGet(this, _Client_client, "f").setDc(dc); // TODO: remove await
792
+ if (__classPrivateFieldGet(this, _Client_client, "f").serverSalt == 0n) {
793
+ __classPrivateFieldGet(this, _Client_client, "f").serverSalt = await this.storage.getServerSalt() ?? 0n;
778
794
  }
795
+ }
796
+ else {
797
+ const plain = new _1_client_plain_js_1.ClientPlain({ initialDc: __classPrivateFieldGet(this, _Client_client, "f").initialDc, transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider, cdn: __classPrivateFieldGet(this, _Client_client, "f").cdn, publicKeys: __classPrivateFieldGet(this, _Client_publicKeys, "f") });
779
798
  const dc = await this.storage.getDc();
780
799
  if (dc != null) {
781
- await this.setDc(dc);
800
+ plain.setDc(dc);
801
+ __classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
782
802
  }
783
- await super.connect();
784
- if (dc == null) {
785
- await this.storage.setDc(this.initialDc);
786
- }
787
- __classPrivateFieldGet(this, _Client_L, "f").debug("connected");
788
- (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_receiveLoop).call(this));
789
- if (__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
790
- (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
791
- }
792
- }
793
- finally {
794
- unlock();
803
+ await plain.connect();
804
+ const [authKey, serverSalt] = await plain.createAuthKey();
805
+ (0, _1_utilities_js_1.drop)(plain.disconnect());
806
+ await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
807
+ __classPrivateFieldGet(this, _Client_client, "f").serverSalt = serverSalt;
795
808
  }
809
+ await __classPrivateFieldGet(this, _Client_client, "f").connect();
810
+ await Promise.all([this.storage.setAuthKey(__classPrivateFieldGet(this, _Client_client, "f").authKey), this.storage.setDc(__classPrivateFieldGet(this, _Client_client, "f").dc), this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_client, "f").serverSalt)]);
796
811
  }
797
- async [(_Client_auth = new WeakMap(), _Client_sessionId = new WeakMap(), _Client_state = new WeakMap(), _Client_promises = new WeakMap(), _Client_toAcknowledge = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(), _Client_updateManager = new WeakMap(), _Client_networkStatisticsManager = new WeakMap(), _Client_botInfoManager = new WeakMap(), _Client_fileManager = new WeakMap(), _Client_reactionManager = new WeakMap(), _Client_messageManager = new WeakMap(), _Client_storyManager = new WeakMap(), _Client_callbackQueryManager = new WeakMap(), _Client_inlineQueryManager = new WeakMap(), _Client_chatListManager = new WeakMap(), _Client_accountManager = new WeakMap(), _Client_parseMode = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_autoStart = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_prefixes = new WeakMap(), _Client_storeMessages = new WeakMap(), _Client_id = new WeakMap(), _Client_L = new WeakMap(), _Client_Lauthorize = new WeakMap(), _Client_LreceiveLoop = new WeakMap(), _Client_LpingLoop = new WeakMap(), _Client_Linvoke = new WeakMap(), _Client_LhandleMigrationError = new WeakMap(), _Client_L$initConncetion = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_connectMutex = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_selfId = new WeakMap(), _Client_pingLoopAbortController = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_autoStarted = new WeakMap(), _Client_lastMsgId = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_handle = new WeakMap(), _Client_instances = new WeakSet(), _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
812
+ async reconnect(dc) {
813
+ await __classPrivateFieldGet(this, _Client_client, "f").reconnect(dc);
814
+ }
815
+ async [(_Client_client = new WeakMap(), _Client_guaranteeUpdateDelivery = new WeakMap(), _Client_updateManager = new WeakMap(), _Client_networkStatisticsManager = new WeakMap(), _Client_botInfoManager = new WeakMap(), _Client_fileManager = new WeakMap(), _Client_reactionManager = new WeakMap(), _Client_messageManager = new WeakMap(), _Client_storyManager = new WeakMap(), _Client_callbackQueryManager = new WeakMap(), _Client_inlineQueryManager = new WeakMap(), _Client_chatListManager = new WeakMap(), _Client_accountManager = new WeakMap(), _Client_parseMode = new WeakMap(), _Client_publicKeys = new WeakMap(), _Client_ignoreOutgoing = new WeakMap(), _Client_storeMessages = new WeakMap(), _Client_Lauthorize = new WeakMap(), _Client_LpingLoop = new WeakMap(), _Client_LhandleMigrationError = new WeakMap(), _Client_L$initConncetion = new WeakMap(), _Client_namespaceProxies = new WeakMap(), _Client_constructContext = new WeakMap(), _Client_lastPropagatedConnectionState = new WeakMap(), _Client_stateChangeHandler = new WeakMap(), _Client_storageInited = new WeakMap(), _Client_connectionInited = new WeakMap(), _Client_lastPropagatedAuthorizationState = new WeakMap(), _Client_pingLoopStarted = new WeakMap(), _Client_pingLoopAbortController = new WeakMap(), _Client_pingInterval = new WeakMap(), _Client_lastUpdates = new WeakMap(), _Client_handleInvokeError = new WeakMap(), _Client_lastGetMe = new WeakMap(), _Client_instances = new WeakSet(), _Client_getApiId = async function _Client_getApiId() {
816
+ const apiId = this.apiId || await this.storage.getApiId();
817
+ if (!apiId) {
818
+ throw new Error("apiId not set");
819
+ }
820
+ return apiId;
821
+ }, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
798
822
  __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
799
823
  __classPrivateFieldSet(this, _Client_lastPropagatedConnectionState, connectionState, "f");
800
- }, _Client_setAuth = async function _Client_setAuth(key) {
801
- const hash = await (0, _1_utilities_js_1.sha1)(key);
802
- const id = (0, _1_utilities_js_1.bigIntFromBuffer)(hash.slice(-8), true, false);
803
- __classPrivateFieldSet(this, _Client_auth, { key, id }, "f");
804
824
  }, _Client_initStorage = async function _Client_initStorage() {
805
825
  if (!__classPrivateFieldGet(this, _Client_storageInited, "f")) {
806
826
  await this.storage.initialize();
@@ -811,7 +831,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
811
831
  }
812
832
  }, exports.handleMigrationError)](err) {
813
833
  let newDc = String(err.dc);
814
- if (Math.abs(this.dcId) >= 10000) {
834
+ if (Math.abs(__classPrivateFieldGet(this, _Client_client, "f").dcId) >= 10000) {
815
835
  newDc += "-test";
816
836
  }
817
837
  await this.reconnect(newDc);
@@ -819,7 +839,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
819
839
  }
820
840
  async disconnect() {
821
841
  __classPrivateFieldSet(this, _Client_connectionInited, false, "f");
822
- await super.disconnect();
842
+ await __classPrivateFieldGet(this, _Client_client, "f").disconnect();
823
843
  __classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
824
844
  }
825
845
  /**
@@ -840,13 +860,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
840
860
  * [2]: https://core.telegram.org/method/updates.getState
841
861
  */
842
862
  async authorize(params) {
843
- if (!this.apiId) {
844
- throw new Error("apiId not set");
845
- }
846
- if (!this.apiHash) {
847
- throw new Error("apiHash not set");
848
- }
849
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
850
863
  try {
851
864
  await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
852
865
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
@@ -859,6 +872,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
859
872
  throw err;
860
873
  }
861
874
  }
875
+ const apiId = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this);
876
+ if (!this.apiHash) {
877
+ throw new Error("apiHash not set");
878
+ }
862
879
  if (typeof params === "undefined") {
863
880
  const loginType = (0, _1_utilities_js_1.mustPromptOneOf)("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
864
881
  if (loginType == "b") {
@@ -872,15 +889,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
872
889
  if (typeof params === "string") {
873
890
  while (true) {
874
891
  try {
875
- const auth = await this.api.auth.importBotAuthorization({ api_id: this.apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 });
876
- __classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
892
+ const auth = await this.api.auth.importBotAuthorization({ api_id: apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 });
893
+ await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
877
894
  await this.storage.setAccountType("bot");
878
895
  break;
879
896
  }
880
897
  catch (err) {
881
898
  if (err instanceof _4_errors_js_1.Migrate) {
882
899
  await this[exports.handleMigrationError](err);
883
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
884
900
  continue;
885
901
  }
886
902
  else {
@@ -917,7 +933,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
917
933
  catch (err) {
918
934
  if (err instanceof _4_errors_js_1.Migrate) {
919
935
  await this[exports.handleMigrationError](err);
920
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
921
936
  sentCode = await sendCode();
922
937
  }
923
938
  else {
@@ -945,7 +960,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
945
960
  phone_code: code,
946
961
  phone_code_hash: sentCode.phone_code_hash,
947
962
  });
948
- __classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
963
+ await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
949
964
  await this.storage.setAccountType("user");
950
965
  __classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
951
966
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
@@ -974,7 +989,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
974
989
  const password = typeof params.password === "string" ? params.password : await params.password(ap.hint ?? null);
975
990
  const input = await (0, _0_password_js_1.checkPassword)(password, ap);
976
991
  const auth = await this.api.auth.checkPassword({ password: input });
977
- __classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
992
+ await this.storage.setAccountId(Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id));
978
993
  await this.storage.setAccountType("user");
979
994
  __classPrivateFieldGet(this, _Client_Lauthorize, "f").debug("authorized as user");
980
995
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, true);
@@ -1015,14 +1030,19 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1015
1030
  return this.invoke(function_, true);
1016
1031
  }
1017
1032
  exportAuthString() {
1018
- return this.storage.exportAuthString();
1033
+ return this.storage.exportAuthString(this.apiId);
1019
1034
  }
1020
1035
  async importAuthString(authString) {
1021
1036
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
1022
1037
  await this.storage.importAuthString(authString);
1023
1038
  }
1039
+ /**
1040
+ * Get a chat's inputPeer. Useful when calling API functions directly.
1041
+ *
1042
+ * @param id The identifier of the chat.
1043
+ */
1024
1044
  async getInputPeer(id) {
1025
- if (id === "me") {
1045
+ if (id === "me" || id == await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) {
1026
1046
  return new _2_tl_js_1.types.InputPeerSelf();
1027
1047
  }
1028
1048
  const inputPeer = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getInputPeerInner).call(this, id);
@@ -1036,6 +1056,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1036
1056
  }
1037
1057
  return inputPeer;
1038
1058
  }
1059
+ /**
1060
+ * Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
1061
+ *
1062
+ * @param id The identifier of the channel or the supergroup.
1063
+ */
1039
1064
  async getInputChannel(id) {
1040
1065
  const inputPeer = await this.getInputPeer(id);
1041
1066
  if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerChannel)) {
@@ -1043,6 +1068,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1043
1068
  }
1044
1069
  return new _2_tl_js_1.types.InputChannel(inputPeer);
1045
1070
  }
1071
+ /**
1072
+ * Get a user's inputUser. Useful when calling API functions directly.
1073
+ *
1074
+ * @param id The identifier of the user.
1075
+ */
1046
1076
  async getInputUser(id) {
1047
1077
  const inputPeer = await this.getInputPeer(id);
1048
1078
  if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerUser)) {
@@ -1050,152 +1080,19 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1050
1080
  }
1051
1081
  return new _2_tl_js_1.types.InputUser(inputPeer);
1052
1082
  }
1053
- async [(_Client_initConnection = async function _Client_initConnection() {
1054
- if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
1055
- await this.api.initConnection({
1056
- api_id: this.apiId,
1057
- app_version: this.appVersion,
1058
- device_model: this.deviceModel,
1059
- lang_code: this.langCode,
1060
- lang_pack: this.langPack,
1061
- query: new _2_tl_js_1.functions.invokeWithLayer({
1062
- layer: _4_constants_js_1.LAYER,
1063
- query: new _2_tl_js_1.functions.help.getConfig(),
1064
- }),
1065
- system_lang_code: this.systemLangCode,
1066
- system_version: this.systemVersion,
1067
- });
1068
- __classPrivateFieldSet(this, _Client_connectionInited, true, "f");
1069
- __classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
1070
- }
1071
- }, _Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
1083
+ async [(_Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
1072
1084
  if (__classPrivateFieldGet(this, _Client_lastPropagatedAuthorizationState, "f") != authorized) {
1073
- await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { authorizationState: { authorized } }), _0_utilities_js_1.resolve);
1085
+ await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { authorizationState: { authorized } }), _0_utilities_js_1.resolve);
1074
1086
  __classPrivateFieldSet(this, _Client_lastPropagatedAuthorizationState, authorized, "f");
1075
1087
  }
1076
1088
  }, _Client_getSelfId = async function _Client_getSelfId() {
1077
- if (__classPrivateFieldGet(this, _Client_selfId, "f") == null) {
1078
- __classPrivateFieldSet(this, _Client_selfId, await this.getMe().then((v) => v.id), "f");
1079
- }
1080
- return __classPrivateFieldGet(this, _Client_selfId, "f");
1081
- }, _Client_receiveLoop = async function _Client_receiveLoop() {
1082
- if (!__classPrivateFieldGet(this, _Client_auth, "f") || !this.transport) {
1083
- throw new _0_types_js_1.ConnectionError("Not connected");
1084
- }
1085
- while (this.connected) {
1086
- try {
1087
- if (__classPrivateFieldGet(this, _Client_toAcknowledge, "f").size >= _4_constants_js_1.ACK_THRESHOLD) {
1088
- await this.send(new _2_tl_js_1.types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _Client_toAcknowledge, "f")] }));
1089
- __classPrivateFieldGet(this, _Client_toAcknowledge, "f").clear();
1090
- }
1091
- const buffer = await this.transport.transport.receive();
1092
- __classPrivateFieldGet(this, _Client_L, "f").inBin(buffer);
1093
- let decrypted;
1094
- try {
1095
- decrypted = await ((0, _0_message_js_1.decryptMessage)(buffer, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_sessionId, "f")));
1096
- __classPrivateFieldGet(this, _Client_L, "f").in(decrypted);
1097
- }
1098
- catch (err) {
1099
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to decrypt message:", err);
1100
- (0, _1_utilities_js_1.drop)((async () => {
1101
- try {
1102
- await this.disconnect();
1103
- }
1104
- catch {
1105
- //
1106
- }
1107
- await this.connect();
1108
- await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("decryption");
1109
- })());
1110
- continue;
1111
- }
1112
- const messages = decrypted instanceof _2_tl_js_1.MessageContainer ? decrypted.messages : [decrypted];
1113
- for (const message of messages) {
1114
- let body = message.body;
1115
- if (body instanceof _2_tl_js_1.types.Gzip_packed) {
1116
- body = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(body.packed_data)).readObject();
1117
- }
1118
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("received", (typeof body === "object" && _2_tl_js_1.name in body) ? body[_2_tl_js_1.name] : body.constructor.name);
1119
- if (body instanceof _2_tl_js_1.types._Updates || body instanceof _2_tl_js_1.types._Update) {
1120
- __classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(body, true);
1121
- }
1122
- else if (body instanceof _2_tl_js_1.types.New_session_created) {
1123
- __classPrivateFieldGet(this, _Client_state, "f").salt = body.server_salt;
1124
- await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
1125
- }
1126
- else if (message.body instanceof _2_tl_js_1.RPCResult) {
1127
- let result = message.body.result;
1128
- if (result instanceof _2_tl_js_1.types.Gzip_packed) {
1129
- result = new _2_tl_js_1.TLReader((0, _0_deps_js_1.gunzip)(result.packed_data)).readObject();
1130
- }
1131
- if (result instanceof _2_tl_js_1.types.Rpc_error) {
1132
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
1133
- }
1134
- else {
1135
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && _2_tl_js_1.name in result) ? result[_2_tl_js_1.name] : result.constructor.name);
1136
- }
1137
- const messageId = message.body.messageId;
1138
- const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(messageId);
1139
- const resolvePromise = () => {
1140
- if (promise) {
1141
- if (result instanceof _2_tl_js_1.types.Rpc_error) {
1142
- promise.reject((0, _4_errors_js_1.upgradeInstance)(result, promise.call));
1143
- }
1144
- else {
1145
- promise.resolve(result);
1146
- }
1147
- __classPrivateFieldGet(this, _Client_promises, "f").delete(messageId);
1148
- }
1149
- };
1150
- if (result instanceof _2_tl_js_1.types._Updates || result instanceof _2_tl_js_1.types._Update) {
1151
- __classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(result, true, promise?.call, resolvePromise);
1152
- }
1153
- else {
1154
- await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
1155
- resolvePromise();
1156
- }
1157
- }
1158
- else if (message.body instanceof _2_tl_js_1.types.Pong) {
1159
- const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.msg_id);
1160
- if (promise) {
1161
- promise.resolve(message.body);
1162
- __classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.msg_id);
1163
- }
1164
- }
1165
- else if (message.body instanceof _2_tl_js_1.types.Bad_server_salt) {
1166
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").debug("server salt reassigned");
1167
- __classPrivateFieldGet(this, _Client_state, "f").salt = message.body.new_server_salt;
1168
- await this.storage.setServerSalt(__classPrivateFieldGet(this, _Client_state, "f").salt);
1169
- const promise = __classPrivateFieldGet(this, _Client_promises, "f").get(message.body.bad_msg_id);
1170
- if (promise) {
1171
- promise.resolve(message.body);
1172
- __classPrivateFieldGet(this, _Client_promises, "f").delete(message.body.bad_msg_id);
1173
- }
1174
- }
1175
- __classPrivateFieldGet(this, _Client_toAcknowledge, "f").add(message.id);
1176
- }
1177
- }
1178
- catch (err) {
1179
- if (!this.connected) {
1180
- break;
1181
- }
1182
- else if (err instanceof _2_tl_js_1.TLError) {
1183
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("failed to deserialize:", err);
1184
- (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap("deserialize"));
1185
- }
1186
- else {
1187
- __classPrivateFieldGet(this, _Client_LreceiveLoop, "f").error("unexpected error:", err);
1188
- }
1189
- }
1190
- }
1191
- if (!this.connected) {
1192
- for (const { reject } of __classPrivateFieldGet(this, _Client_promises, "f").values()) {
1193
- reject(new _0_types_js_1.ConnectionError("Connection was closed"));
1194
- }
1195
- }
1196
- else {
1197
- (0, _1_utilities_js_1.UNREACHABLE)();
1089
+ const id = await this.storage.getAccountId();
1090
+ if (id == null) {
1091
+ throw new Error("Unauthorized");
1198
1092
  }
1093
+ return id;
1094
+ }, _Client_startPingLoop = function _Client_startPingLoop() {
1095
+ (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
1199
1096
  }, _Client_pingLoop = async function _Client_pingLoop() {
1200
1097
  __classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
1201
1098
  while (this.connected) {
@@ -1227,72 +1124,46 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1227
1124
  let n = 1;
1228
1125
  while (true) {
1229
1126
  try {
1230
- if (!__classPrivateFieldGet(this, _Client_auth, "f") || !this.transport) {
1231
- if (__classPrivateFieldGet(this, _Client_autoStart, "f") && !__classPrivateFieldGet(this, _Client_autoStarted, "f")) {
1232
- await this.start();
1233
- }
1234
- else {
1235
- throw new _0_types_js_1.ConnectionError("Not connected");
1236
- }
1237
- }
1238
- if (!__classPrivateFieldGet(this, _Client_auth, "f") || !this.transport) {
1239
- (0, _1_utilities_js_1.UNREACHABLE)();
1240
- }
1241
- let seqNo = __classPrivateFieldGet(this, _Client_state, "f").seqNo * 2;
1242
- if (!(function_ instanceof _2_tl_js_1.functions.ping) && !(function_ instanceof _2_tl_js_1.types.Msgs_ack)) {
1243
- seqNo++;
1244
- __classPrivateFieldGet(this, _Client_state, "f").seqNo++;
1245
- }
1246
- const messageId = __classPrivateFieldSet(this, _Client_lastMsgId, (0, _0_message_js_1.getMessageId)(__classPrivateFieldGet(this, _Client_lastMsgId, "f")), "f");
1247
- const message = new _2_tl_js_1.Message_(messageId, seqNo, function_);
1248
- const payload = await (0, _0_message_js_1.encryptMessage)(message, __classPrivateFieldGet(this, _Client_auth, "f").key, __classPrivateFieldGet(this, _Client_auth, "f").id, __classPrivateFieldGet(this, _Client_state, "f").salt, __classPrivateFieldGet(this, _Client_sessionId, "f"));
1249
- await this.transport.transport.send(payload);
1250
- __classPrivateFieldGet(this, _Client_L, "f").out(message);
1251
- __classPrivateFieldGet(this, _Client_L, "f").outBin(payload);
1252
- __classPrivateFieldGet(this, _Client_Linvoke, "f").debug("invoked", function_[_2_tl_js_1.name]);
1253
- if (noWait) {
1254
- __classPrivateFieldGet(this, _Client_promises, "f").set(message.id, {
1255
- resolve: (result) => {
1256
- if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
1257
- (0, _1_utilities_js_1.drop)(this.invoke(function_, true));
1258
- }
1259
- },
1260
- reject: () => { },
1261
- call: function_,
1262
- });
1263
- return;
1264
- }
1265
- let result;
1266
- try {
1267
- result = await new Promise((resolve, reject) => {
1268
- __classPrivateFieldGet(this, _Client_promises, "f").set(message.id, { resolve, reject, call: function_ });
1269
- });
1270
- }
1271
- catch (err) {
1272
- if (err instanceof _4_errors_js_1.AuthKeyUnregistered) {
1273
- await __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateAuthorizationState).call(this, false);
1274
- }
1275
- throw err;
1276
- }
1277
- if (result instanceof _2_tl_js_1.types.Bad_server_salt) {
1278
- return await this.invoke(function_);
1127
+ if (function_ instanceof _2_tl_js_1.functions.Function && !__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
1128
+ const result = await __classPrivateFieldGet(this, _Client_client, "f").invoke(new _2_tl_js_1.functions.initConnection({
1129
+ api_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this),
1130
+ app_version: this.appVersion,
1131
+ device_model: this.deviceModel,
1132
+ lang_code: this.langCode,
1133
+ lang_pack: this.langPack,
1134
+ query: new _2_tl_js_1.functions.invokeWithLayer({
1135
+ layer: _4_constants_js_1.LAYER,
1136
+ query: function_,
1137
+ }),
1138
+ system_lang_code: this.systemLangCode,
1139
+ system_version: this.systemVersion,
1140
+ }), noWait);
1141
+ __classPrivateFieldSet(this, _Client_connectionInited, true, "f");
1142
+ __classPrivateFieldGet(this, _Client_L$initConncetion, "f").debug("connection inited");
1143
+ return result;
1279
1144
  }
1280
1145
  else {
1281
- if (!__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
1282
- (0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
1283
- __classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
1284
- }
1285
- return result;
1146
+ return await __classPrivateFieldGet(this, _Client_client, "f").invoke(function_, noWait);
1286
1147
  }
1287
1148
  }
1288
1149
  catch (err) {
1289
- if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
1150
+ if (err instanceof _4_errors_js_1.ConnectionNotInited) {
1151
+ __classPrivateFieldSet(this, _Client_connectionInited, false, "f");
1152
+ continue;
1153
+ }
1154
+ else if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
1290
1155
  continue;
1291
1156
  }
1292
1157
  else {
1293
1158
  throw err;
1294
1159
  }
1295
1160
  }
1161
+ finally {
1162
+ if (!__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
1163
+ __classPrivateFieldGet(this, _Client_instances, "m", _Client_startPingLoop).call(this);
1164
+ __classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
1165
+ }
1166
+ }
1296
1167
  }
1297
1168
  }, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
1298
1169
  const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUser({ user_id: userId, access_hash: 0n })] });
@@ -1373,77 +1244,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1373
1244
  }
1374
1245
  return await this.messageStorage.getEntity(id);
1375
1246
  }
1376
- use(...middleware) {
1377
- const composer = new _1_composer_js_1.Composer(...middleware);
1378
- __classPrivateFieldSet(this, _Client_handle, (0, _1_composer_js_1.concat)(__classPrivateFieldGet(this, _Client_handle, "f"), (0, _1_composer_js_1.flatten)(composer)), "f");
1379
- return composer;
1380
- }
1381
- branch(predicate, trueHandler_, falseHandler_) {
1382
- const trueHandler = (0, _1_composer_js_1.flatten)(trueHandler_);
1383
- const falseHandler = (0, _1_composer_js_1.flatten)(falseHandler_);
1384
- return this.use(async (upd, next) => {
1385
- if (await predicate(upd)) {
1386
- await trueHandler(upd, next);
1387
- }
1388
- else {
1389
- await falseHandler(upd, next);
1390
- }
1391
- });
1392
- }
1393
- filter(predicate, ...middleware) {
1394
- const composer = new _1_composer_js_1.Composer(...middleware);
1395
- this.branch(predicate, composer, _1_composer_js_1.skip);
1396
- return composer;
1397
- }
1398
- on(filter, ...middleware) {
1399
- return this.filter((ctx) => {
1400
- return (0, _0_filters_js_1.match)(filter, ctx);
1401
- }, ...middleware);
1402
- }
1403
- command(commands, ...middleware) {
1404
- const commands__ = typeof commands === "object" && "names" in commands ? commands.names : commands;
1405
- const commands_ = Array.isArray(commands__) ? commands__ : [commands__];
1406
- const prefixes_ = typeof commands === "object" && "prefixes" in commands ? commands.prefixes : (__classPrivateFieldGet(this, _Client_prefixes, "f") ?? []);
1407
- const prefixes = Array.isArray(prefixes_) ? prefixes_ : [prefixes_];
1408
- for (const left of prefixes) {
1409
- for (const right of prefixes) {
1410
- if (left == right) {
1411
- continue;
1412
- }
1413
- if (left.startsWith(right) || right.startsWith(left)) {
1414
- throw new Error("Intersecting prefixes");
1415
- }
1416
- }
1417
- }
1418
- return this.on("message:text").filter((ctx) => {
1419
- const prefixes_ = prefixes.length == 0 ? [!ctx.me?.isBot ? "\\" : "/"] : prefixes;
1420
- if (prefixes_.length == 0) {
1421
- return false;
1422
- }
1423
- const cmd = ctx.message.text.split(/\s/, 1)[0];
1424
- const prefix = prefixes_.find((v) => cmd.startsWith(v));
1425
- if (prefix === undefined) {
1426
- return false;
1427
- }
1428
- if (cmd.includes("@")) {
1429
- const username = cmd.split("@", 2)[1];
1430
- if (username.toLowerCase() !== ctx.me.username?.toLowerCase()) {
1431
- return false;
1432
- }
1433
- }
1434
- const command_ = cmd.split("@", 1)[0].split(prefix, 2)[1].toLowerCase();
1435
- for (const command of commands_) {
1436
- if (typeof command === "string" && (command.toLowerCase() == command_)) {
1437
- return true;
1438
- }
1439
- else if (command instanceof RegExp && command.test(command_)) {
1440
- return true;
1441
- }
1442
- }
1443
- return false;
1444
- }, ...middleware);
1445
- }
1446
- //#endregion
1447
1247
  /**
1448
1248
  * Send a text message.
1449
1249
  *
@@ -1459,7 +1259,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1459
1259
  * Edit a message's text.
1460
1260
  *
1461
1261
  * @method ms
1462
- * @param chatId The identifier of the chat that contains the messages.
1262
+ * @param chatId The identifier of the chat that contains the message.
1463
1263
  * @param messageId The message's identifier.
1464
1264
  * @param text The new text of the message.
1465
1265
  * @returns The edited text message.
@@ -1468,7 +1268,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1468
1268
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
1469
1269
  }
1470
1270
  /**
1471
- * Edit an inline message's text.
1271
+ * Edit an inline message's text. Bot-only.
1472
1272
  *
1473
1273
  * @method ms
1474
1274
  * @param inlineMessageId The inline message's identifier.
@@ -1481,7 +1281,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1481
1281
  * Edit a message's reply markup.
1482
1282
  *
1483
1283
  * @method ms
1484
- * @param chatId The identifier of the chat that contains the messages.
1284
+ * @param chatId The identifier of the chat that contains the message.
1485
1285
  * @param messageId The message's identifier.
1486
1286
  * @returns The edited message.
1487
1287
  */
@@ -1489,7 +1289,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1489
1289
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageReplyMarkup(chatId, messageId, params);
1490
1290
  }
1491
1291
  /**
1492
- * Edit an inline message's reply markup.
1292
+ * Edit an inline message's reply markup. Bot-only.
1493
1293
  *
1494
1294
  * @method ms
1495
1295
  * @param inlineMessageId The inline message's identifier.
@@ -1497,6 +1297,31 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1497
1297
  async editInlineMessageReplyMarkup(inlineMessageId, params) {
1498
1298
  await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageReplyMarkup(inlineMessageId, params);
1499
1299
  }
1300
+ /**
1301
+ * Edit a message's live location.
1302
+ *
1303
+ * @method ms
1304
+ * @param chatId The identifier of the chat that contains the messages.
1305
+ * @param messageId The message's identifier.
1306
+ * @param latitude The new latitude.
1307
+ * @param longitude The new longitude.
1308
+ * @returns The edited location message.
1309
+ */
1310
+ async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
1311
+ return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageLiveLocation(chatId, messageId, latitude, longitude, params);
1312
+ }
1313
+ /**
1314
+ * Edit an inline message's live location. Bot-only.
1315
+ *
1316
+ * @method ms
1317
+ * @param inlineMessageId The inline message's identifier.
1318
+ * @param latitude The new latitude.
1319
+ * @param longitude The new longitude.
1320
+ * @returns The edited location message.
1321
+ */
1322
+ async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
1323
+ await __classPrivateFieldGet(this, _Client_messageManager, "f").editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params);
1324
+ }
1500
1325
  /**
1501
1326
  * Retrieve multiple messages.
1502
1327
  *
@@ -1572,11 +1397,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1572
1397
  * @method ac
1573
1398
  */
1574
1399
  async getMe() {
1575
- const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUserSelf()] });
1576
- if (users.length < 1) {
1577
- (0, _1_utilities_js_1.UNREACHABLE)();
1400
+ let user_ = await this[getEntity](new _2_tl_js_1.types.PeerUser({ user_id: BigInt(await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).call(this)) }));
1401
+ if (user_ == null) {
1402
+ const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUserSelf()] });
1403
+ user_ = users[0][_2_tl_js_1.as](_2_tl_js_1.types.User);
1404
+ await this.messageStorage.setEntity(user_);
1578
1405
  }
1579
- const user = (0, _3_types_js_1.constructUser)(users[0][_2_tl_js_1.as](_2_tl_js_1.types.User));
1406
+ const user = (0, _3_types_js_1.constructUser)(user_);
1580
1407
  __classPrivateFieldSet(this, _Client_lastGetMe, user, "f");
1581
1408
  return user;
1582
1409
  }
@@ -1601,6 +1428,17 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1601
1428
  async sendPoll(chatId, question, options, params) {
1602
1429
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendPoll(chatId, question, options, params);
1603
1430
  }
1431
+ /**
1432
+ * Stop a poll.
1433
+ *
1434
+ * @method ms
1435
+ * @param chatId The chat that includes the poll.
1436
+ * @param messageId The idenfifier of the poll's message.
1437
+ * @returns The new state of the poll.
1438
+ */
1439
+ async stopPoll(chatId, messageId, params) {
1440
+ return await __classPrivateFieldGet(this, _Client_messageManager, "f").stopPoll(chatId, messageId, params);
1441
+ }
1604
1442
  /**
1605
1443
  * Send a chat action.
1606
1444
  *
@@ -1744,6 +1582,17 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1744
1582
  async sendDocument(chatId, document, params) {
1745
1583
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendDocument(chatId, document, params);
1746
1584
  }
1585
+ /**
1586
+ * Send a sticker.
1587
+ *
1588
+ * @method ms
1589
+ * @param chatId The chat to send the sticker to.
1590
+ * @param document The sticker to send.
1591
+ * @returns The sent sticker.
1592
+ */
1593
+ async sendSticker(chatId, sticker, params) {
1594
+ return await __classPrivateFieldGet(this, _Client_messageManager, "f").sendSticker(chatId, sticker, params);
1595
+ }
1747
1596
  /**
1748
1597
  * Send a video.
1749
1598
  *
@@ -1891,7 +1740,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1891
1740
  return await __classPrivateFieldGet(this, _Client_fileManager, "f").getCustomEmojiStickers(id);
1892
1741
  }
1893
1742
  /**
1894
- * Set a chat's available reactions.
1743
+ * Set a chat's available reactions. User-only.
1895
1744
  *
1896
1745
  * @method ch
1897
1746
  * @param chatId The identifier of the chat.
@@ -1953,7 +1802,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
1953
1802
  await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatPhoto(chatId);
1954
1803
  }
1955
1804
  /**
1956
- * Delete all messages sent by a specific member of a chat.
1805
+ * Delete all messages sent by a specific member of a chat. User-only.
1957
1806
  *
1958
1807
  * @method ms
1959
1808
  * @param chatId The identifier of the chat. Must be a supergroup.
@@ -2204,7 +2053,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
2204
2053
  return await __classPrivateFieldGet(this, _Client_accountManager, "f").getInactiveChats();
2205
2054
  }
2206
2055
  /**
2207
- * Search the messages of a chat.
2056
+ * Search the messages of a chat. User-only.
2208
2057
  *
2209
2058
  * @method ms
2210
2059
  * @param chatId The identifier of the chat to search the messages in.
@@ -2214,7 +2063,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
2214
2063
  return await __classPrivateFieldGet(this, _Client_messageManager, "f").searchMessages(chatId, query, params);
2215
2064
  }
2216
2065
  /**
2217
- * Set the number of boosts required to circument a chat's default restrictions.
2066
+ * Set the number of boosts required to circument a chat's default restrictions. User-only.
2218
2067
  *
2219
2068
  * @method ch
2220
2069
  * @param chatId The identifier of the chat.
@@ -2311,7 +2160,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
2311
2160
  }
2312
2161
  exports.Client = Client;
2313
2162
  _Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
2314
- await __classPrivateFieldGet(this, _Client_handle, "f").call(this, await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), _0_utilities_js_1.resolve);
2163
+ await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), _0_utilities_js_1.resolve);
2315
2164
  }, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
2316
2165
  __classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(_1_update_manager_js_1.UpdateManager.MAIN_BOX_ID).add(async () => {
2317
2166
  await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update);