@mtkruto/node 0.1.162 → 0.1.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/0_deps.d.ts +4 -4
- package/esm/0_deps.js +5 -5
- package/esm/4_constants.d.ts +1 -2
- package/esm/4_constants.js +2 -3
- package/esm/5_client.d.ts +2 -2
- package/esm/5_client.js +2 -2
- package/esm/client/0_client_abstract.d.ts +6 -4
- package/esm/client/0_client_abstract.js +11 -5
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +3 -6
- package/esm/client/1_client_encrypted.d.ts +34 -0
- package/esm/client/1_client_encrypted.js +237 -0
- package/esm/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/esm/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/esm/client/1_composer.d.ts +2 -3
- package/esm/client/1_file_manager.d.ts +4 -2
- package/esm/client/1_file_manager.js +35 -11
- package/esm/client/2_message_manager.d.ts +4 -2
- package/esm/client/2_message_manager.js +31 -16
- package/esm/client/3_chat_list_manager.d.ts +2 -0
- package/esm/client/3_chat_list_manager.js +1 -1
- package/esm/client/4_client.d.ts +131 -94
- package/esm/client/4_client.js +197 -382
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.d.ts +7 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.js +7 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.js +8 -8
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/esm/storage/0_storage.d.ts +7 -1
- package/esm/storage/0_storage.js +22 -2
- package/esm/tl/6_message.d.ts +3 -2
- package/esm/tl/6_message.js +1 -1
- package/esm/tl/7_message_container.d.ts +6 -4
- package/esm/tl/7_message_container.js +22 -7
- package/esm/types/0_thumbnail.js +7 -13
- package/esm/types/1_sticker.d.ts +1 -1
- package/esm/types/1_sticker.js +6 -6
- package/esm/types/4_inline_query_result.d.ts +1 -1
- package/esm/types/4_inline_query_result.js +4 -0
- package/esm/utilities/0_bigint.d.ts +1 -0
- package/esm/utilities/0_bigint.js +1 -0
- package/package.json +1 -1
- package/script/0_deps.d.ts +4 -4
- package/script/0_deps.js +5 -5
- package/script/4_constants.d.ts +1 -2
- package/script/4_constants.js +3 -4
- package/script/5_client.d.ts +2 -2
- package/script/5_client.js +2 -2
- package/script/client/0_client_abstract.d.ts +6 -4
- package/script/client/0_client_abstract.js +11 -5
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +3 -6
- package/script/client/1_client_encrypted.d.ts +34 -0
- package/script/client/1_client_encrypted.js +241 -0
- package/script/client/{2_client_plain.d.ts → 1_client_plain.d.ts} +3 -0
- package/script/client/{2_client_plain.js → 1_client_plain.js} +4 -1
- package/script/client/1_composer.d.ts +2 -3
- package/script/client/1_file_manager.d.ts +4 -2
- package/script/client/1_file_manager.js +34 -10
- package/script/client/2_message_manager.d.ts +4 -2
- package/script/client/2_message_manager.js +31 -16
- package/script/client/3_chat_list_manager.d.ts +2 -0
- package/script/client/3_chat_list_manager.js +1 -1
- package/script/client/4_client.d.ts +131 -94
- package/script/client/4_client.js +193 -378
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.js +6 -3
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.d.ts +7 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/mod.js +7 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.js +2 -1
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.js +8 -8
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.js +2 -2
- package/script/deps/deno.land/std@0.220.1/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/basename.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/dirname.js +9 -0
- package/script/deps/deno.land/std@0.220.1/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/extname.js +9 -0
- package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.js +1 -1
- package/script/storage/0_storage.d.ts +7 -1
- package/script/storage/0_storage.js +22 -2
- package/script/tl/6_message.d.ts +3 -2
- package/script/tl/6_message.js +1 -1
- package/script/tl/7_message_container.d.ts +6 -4
- package/script/tl/7_message_container.js +20 -5
- package/script/types/0_thumbnail.js +7 -13
- package/script/types/1_sticker.d.ts +1 -1
- package/script/types/1_sticker.js +6 -6
- package/script/types/4_inline_query_result.d.ts +1 -1
- package/script/types/4_inline_query_result.js +4 -0
- package/script/utilities/0_bigint.d.ts +1 -0
- package/script/utilities/0_bigint.js +1 -0
- package/esm/client/5_composer.d.ts +0 -4
- package/esm/client/5_composer.js +0 -3
- package/script/client/5_composer.d.ts +0 -4
- package/script/client/5_composer.js +0 -7
- package/script/deps/deno.land/std@0.218.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.218.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.218.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.218.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.218.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.218.0/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0/path/posix → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/_os.js +0 -0
- /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/constants.js +0 -0
- /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/dirname.js +0 -0
- /package/{esm/deps/deno.land/std@0.218.0/path/windows → script/deps/deno.land/std@0.220.1/path}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/format.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0/path → std@0.220.1/path/windows}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.218.0 → std@0.220.1}/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,
|
|
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_L, _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_initConnection, _Client_lastPropagatedAuthorizationState, _Client_propagateAuthorizationState, _Client_selfId, _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.
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
exports.
|
|
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
|
-
|
|
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
|
|
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(
|
|
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
|
-
|
|
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,11 @@ 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
141
|
_Client_L.set(this, void 0);
|
|
147
142
|
_Client_Lauthorize.set(this, void 0);
|
|
148
|
-
_Client_LreceiveLoop.set(this, void 0);
|
|
149
143
|
_Client_LpingLoop.set(this, void 0);
|
|
150
|
-
_Client_Linvoke.set(this, void 0);
|
|
151
144
|
_Client_LhandleMigrationError.set(this, void 0);
|
|
152
145
|
_Client_L$initConncetion.set(this, void 0);
|
|
153
146
|
_Client_namespaceProxies.set(this, (() => {
|
|
@@ -517,39 +510,36 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
517
510
|
unblock: () => {
|
|
518
511
|
return this.unblockUser(mustGetUserId());
|
|
519
512
|
},
|
|
513
|
+
getChatMember: (userId) => {
|
|
514
|
+
const { chatId } = mustGetMsg();
|
|
515
|
+
return this.getChatMember(chatId, userId);
|
|
516
|
+
},
|
|
517
|
+
setChatStickerSet: (setName) => {
|
|
518
|
+
const { chatId } = mustGetMsg();
|
|
519
|
+
return this.setChatStickerSet(chatId, setName);
|
|
520
|
+
},
|
|
521
|
+
deleteChatStickerSet: () => {
|
|
522
|
+
const { chatId } = mustGetMsg();
|
|
523
|
+
return this.deleteChatStickerSet(chatId);
|
|
524
|
+
},
|
|
520
525
|
};
|
|
521
526
|
return (0, _1_utilities_js_1.cleanObject)(context);
|
|
522
527
|
});
|
|
523
528
|
_Client_lastPropagatedConnectionState.set(this, null);
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
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
|
-
});
|
|
529
|
+
_Client_stateChangeHandler.set(this, ((connected) => {
|
|
530
|
+
const connectionState = connected ? "ready" : "notConnected";
|
|
531
|
+
if (this.connected == connected && __classPrivateFieldGet(this, _Client_lastPropagatedConnectionState, "f") != connectionState) {
|
|
532
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).call(this, connectionState);
|
|
533
|
+
}
|
|
534
|
+
}).bind(this));
|
|
542
535
|
_Client_storageInited.set(this, false);
|
|
543
|
-
_Client_connectMutex.set(this, new _1_utilities_js_1.Mutex());
|
|
544
536
|
_Client_connectionInited.set(this, false);
|
|
545
537
|
_Client_lastPropagatedAuthorizationState.set(this, null);
|
|
546
538
|
_Client_selfId.set(this, null);
|
|
539
|
+
_Client_pingLoopStarted.set(this, false);
|
|
547
540
|
_Client_pingLoopAbortController.set(this, null);
|
|
548
541
|
_Client_pingInterval.set(this, 60 * 1000); // 60 seconds
|
|
549
542
|
_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
543
|
_Client_handleInvokeError.set(this, skipInvoke());
|
|
554
544
|
/**
|
|
555
545
|
* Invokes a function waiting and returning its reply if the second parameter is not `true`. Requires the client
|
|
@@ -577,8 +567,38 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
577
567
|
})
|
|
578
568
|
});
|
|
579
569
|
_Client_lastGetMe.set(this, null);
|
|
580
|
-
|
|
581
|
-
|
|
570
|
+
__classPrivateFieldSet(this, _Client_client, new _1_client_encrypted_js_1.ClientEncrypted(params), "f");
|
|
571
|
+
__classPrivateFieldGet(this, _Client_client, "f").stateChangeHandler = __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").bind(this);
|
|
572
|
+
__classPrivateFieldGet(this, _Client_client, "f").handlers = {
|
|
573
|
+
serverSaltReassigned: async (newServerSalt) => {
|
|
574
|
+
await this.storage.setServerSalt(newServerSalt);
|
|
575
|
+
},
|
|
576
|
+
updates: (updates, call, callback) => {
|
|
577
|
+
__classPrivateFieldGet(this, _Client_updateManager, "f").processUpdates(updates, true, call, callback);
|
|
578
|
+
__classPrivateFieldSet(this, _Client_lastUpdates, new Date(), "f");
|
|
579
|
+
},
|
|
580
|
+
result: async (result, callback) => {
|
|
581
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").processResult(result);
|
|
582
|
+
callback();
|
|
583
|
+
},
|
|
584
|
+
error: async (_err, source) => {
|
|
585
|
+
switch (source) {
|
|
586
|
+
case "deserialization":
|
|
587
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
588
|
+
break;
|
|
589
|
+
case "decryption":
|
|
590
|
+
try {
|
|
591
|
+
await this.disconnect();
|
|
592
|
+
}
|
|
593
|
+
catch {
|
|
594
|
+
//
|
|
595
|
+
}
|
|
596
|
+
await this.connect();
|
|
597
|
+
await __classPrivateFieldGet(this, _Client_updateManager, "f").recoverUpdateGap(source);
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
};
|
|
582
602
|
this.storage = typeof storage === "string" ? new _3_storage_js_1.StorageMemory(storage) : storage ?? new _3_storage_js_1.StorageMemory();
|
|
583
603
|
__classPrivateFieldSet(this, _Client_storeMessages, params?.storeMessages ?? false, "f");
|
|
584
604
|
if (!__classPrivateFieldGet(this, _Client_storeMessages, "f")) {
|
|
@@ -595,16 +615,14 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
595
615
|
this.systemLangCode = params?.systemLangCode ?? _4_constants_js_1.SYSTEM_LANG_CODE;
|
|
596
616
|
this.systemVersion = params?.systemVersion ?? _4_constants_js_1.SYSTEM_VERSION;
|
|
597
617
|
__classPrivateFieldSet(this, _Client_publicKeys, params?.publicKeys, "f");
|
|
598
|
-
__classPrivateFieldSet(this, _Client_autoStart, params?.autoStart ?? true, "f");
|
|
599
618
|
__classPrivateFieldSet(this, _Client_ignoreOutgoing, params?.ignoreOutgoing ?? null, "f");
|
|
600
|
-
|
|
619
|
+
if (params?.prefixes) {
|
|
620
|
+
this.prefixes = params?.prefixes;
|
|
621
|
+
}
|
|
601
622
|
__classPrivateFieldSet(this, _Client_guaranteeUpdateDelivery, params?.guaranteeUpdateDelivery ?? false, "f");
|
|
602
|
-
__classPrivateFieldSet(this,
|
|
603
|
-
const L = __classPrivateFieldSet(this, _Client_L, (0, _1_utilities_js_1.getLogger)("Client").client(__classPrivateFieldGet(this, _Client_id, "f")), "f");
|
|
623
|
+
const L = __classPrivateFieldSet(this, _Client_L, (0, _1_utilities_js_1.getLogger)("Client").client(id++), "f");
|
|
604
624
|
__classPrivateFieldSet(this, _Client_Lauthorize, L.branch("authorize"), "f");
|
|
605
|
-
__classPrivateFieldSet(this, _Client_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
606
625
|
__classPrivateFieldSet(this, _Client_LpingLoop, L.branch("pingLoop"), "f");
|
|
607
|
-
__classPrivateFieldSet(this, _Client_Linvoke, L.branch("invoke"), "f");
|
|
608
626
|
__classPrivateFieldSet(this, _Client_LhandleMigrationError, L.branch("[handleMigrationError]"), "f");
|
|
609
627
|
__classPrivateFieldSet(this, _Client_L$initConncetion, L.branch("#initConnection"), "f");
|
|
610
628
|
const c = {
|
|
@@ -614,7 +632,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
614
632
|
messageStorage: this.messageStorage,
|
|
615
633
|
guaranteeUpdateDelivery: __classPrivateFieldGet(this, _Client_guaranteeUpdateDelivery, "f"),
|
|
616
634
|
setConnectionState: __classPrivateFieldGet(this, _Client_instances, "m", _Client_propagateConnectionState).bind(this),
|
|
617
|
-
resetConnectionState: () => this.
|
|
635
|
+
resetConnectionState: () => __classPrivateFieldGet(this, _Client_stateChangeHandler, "f").call(this, this.connected),
|
|
618
636
|
getSelfId: __classPrivateFieldGet(this, _Client_instances, "m", _Client_getSelfId).bind(this),
|
|
619
637
|
getInputPeer: this.getInputPeer.bind(this),
|
|
620
638
|
getInputChannel: this.getInputChannel.bind(this),
|
|
@@ -623,8 +641,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
623
641
|
handleUpdate: __classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).bind(this),
|
|
624
642
|
parseMode: __classPrivateFieldGet(this, _Client_parseMode, "f"),
|
|
625
643
|
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,
|
|
644
|
+
const client = new Client((!dcId || dcId == __classPrivateFieldGet(this, _Client_client, "f").dcId) ? this.storage : this.storage.branch(`download_client_${dcId}`), this.apiId, this.apiHash, {
|
|
645
|
+
transportProvider: __classPrivateFieldGet(this, _Client_client, "f").transportProvider,
|
|
628
646
|
appVersion: this.appVersion,
|
|
629
647
|
deviceModel: this.deviceModel,
|
|
630
648
|
langCode: this.langCode,
|
|
@@ -633,7 +651,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
633
651
|
systemVersion: this.systemVersion,
|
|
634
652
|
cdn: true,
|
|
635
653
|
});
|
|
636
|
-
__classPrivateFieldGet(client,
|
|
654
|
+
__classPrivateFieldGet(client, _Client_client, "f").serverSalt = __classPrivateFieldGet(this, _Client_client, "f").serverSalt;
|
|
637
655
|
client.invoke.use(async (ctx, next) => {
|
|
638
656
|
if (ctx.error instanceof _4_errors_js_1.AuthKeyUnregistered && dcId) {
|
|
639
657
|
try {
|
|
@@ -653,9 +671,9 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
653
671
|
api: client.api,
|
|
654
672
|
connect: async () => {
|
|
655
673
|
await client.connect();
|
|
656
|
-
if (dcId && dcId != this.dcId) {
|
|
674
|
+
if (dcId && dcId != __classPrivateFieldGet(this, _Client_client, "f").dcId) {
|
|
657
675
|
let dc = String(dcId);
|
|
658
|
-
if (this.dcId < 0) {
|
|
676
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").dcId < 0) {
|
|
659
677
|
dc += "-test";
|
|
660
678
|
}
|
|
661
679
|
await client.setDc(dc);
|
|
@@ -678,11 +696,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
678
696
|
__classPrivateFieldSet(this, _Client_callbackQueryManager, new _3_callback_query_manager_js_1.CallbackQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
679
697
|
__classPrivateFieldSet(this, _Client_storyManager, new _3_story_manager_js_1.StoryManager({ ...c, fileManager: __classPrivateFieldGet(this, _Client_fileManager, "f"), messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
680
698
|
__classPrivateFieldSet(this, _Client_inlineQueryManager, new _3_inline_query_manager_js_1.InlineQueryManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
681
|
-
__classPrivateFieldSet(this, _Client_chatListManager, new _3_chat_list_manager_js_1.ChatListManager({ ...c, messageManager: __classPrivateFieldGet(this, _Client_messageManager, "f") }), "f");
|
|
699
|
+
__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
700
|
__classPrivateFieldSet(this, _Client_accountManager, new _1_account_manager_js_1.AccountManager(c), "f");
|
|
683
701
|
__classPrivateFieldGet(this, _Client_updateManager, "f").setUpdateHandler(__classPrivateFieldGet(this, _Client_instances, "m", _Client_handleUpdate).bind(this));
|
|
684
|
-
const transportProvider = this.transportProvider;
|
|
685
|
-
this.transportProvider = (params) => {
|
|
702
|
+
const transportProvider = __classPrivateFieldGet(this, _Client_client, "f").transportProvider;
|
|
703
|
+
__classPrivateFieldGet(this, _Client_client, "f").transportProvider = (params) => {
|
|
686
704
|
const transport = transportProvider(params);
|
|
687
705
|
transport.connection.callback = __classPrivateFieldGet(this, _Client_networkStatisticsManager, "f").getTransportReadWriteCallback();
|
|
688
706
|
return transport;
|
|
@@ -691,7 +709,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
691
709
|
this.on("connectionState", ({ connectionState }, next) => {
|
|
692
710
|
(0, _1_utilities_js_1.drop)((async () => {
|
|
693
711
|
if (connectionState == "notConnected") {
|
|
694
|
-
if (
|
|
712
|
+
if (this.disconnected) {
|
|
695
713
|
L.debug("not reconnecting");
|
|
696
714
|
return;
|
|
697
715
|
}
|
|
@@ -728,6 +746,13 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
728
746
|
});
|
|
729
747
|
}
|
|
730
748
|
}
|
|
749
|
+
// direct ClientEncrypted property proxies
|
|
750
|
+
get connected() {
|
|
751
|
+
return __classPrivateFieldGet(this, _Client_client, "f").connected;
|
|
752
|
+
}
|
|
753
|
+
get disconnected() {
|
|
754
|
+
return __classPrivateFieldGet(this, _Client_client, "f").disconnected;
|
|
755
|
+
}
|
|
731
756
|
/**
|
|
732
757
|
* Sets the DC and resets the auth key stored in the session provider
|
|
733
758
|
* if the stored DC was not the same as the `dc` parameter.
|
|
@@ -741,7 +766,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
741
766
|
await this.storage.setAuthKey(null);
|
|
742
767
|
await this.storage.getAuthKey();
|
|
743
768
|
}
|
|
744
|
-
|
|
769
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
745
770
|
}
|
|
746
771
|
/**
|
|
747
772
|
* Loads the session if `setDc` was not called, initializes and connnects
|
|
@@ -749,58 +774,43 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
749
774
|
* Before establishing the connection, the session is saved.
|
|
750
775
|
*/
|
|
751
776
|
async connect() {
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
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);
|
|
777
|
+
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
778
|
+
const [authKey, dc] = await Promise.all([this.storage.getAuthKey(), this.storage.getDc()]);
|
|
779
|
+
if (authKey != null && dc != null) {
|
|
780
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
781
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setDc(dc); // TODO: remove await
|
|
782
|
+
if (__classPrivateFieldGet(this, _Client_client, "f").serverSalt == 0n) {
|
|
783
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = await this.storage.getServerSalt() ?? 0n;
|
|
778
784
|
}
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
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
788
|
const dc = await this.storage.getDc();
|
|
780
789
|
if (dc != null) {
|
|
781
|
-
|
|
790
|
+
plain.setDc(dc);
|
|
791
|
+
__classPrivateFieldGet(this, _Client_client, "f").setDc(dc);
|
|
782
792
|
}
|
|
783
|
-
await
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
__classPrivateFieldGet(this,
|
|
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();
|
|
793
|
+
await plain.connect();
|
|
794
|
+
const [authKey, serverSalt] = await plain.createAuthKey();
|
|
795
|
+
(0, _1_utilities_js_1.drop)(plain.disconnect());
|
|
796
|
+
await __classPrivateFieldGet(this, _Client_client, "f").setAuthKey(authKey);
|
|
797
|
+
__classPrivateFieldGet(this, _Client_client, "f").serverSalt = serverSalt;
|
|
795
798
|
}
|
|
799
|
+
await __classPrivateFieldGet(this, _Client_client, "f").connect();
|
|
800
|
+
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
801
|
}
|
|
797
|
-
|
|
802
|
+
reconnect(dc) {
|
|
803
|
+
return __classPrivateFieldGet(this, _Client_client, "f").reconnect(dc);
|
|
804
|
+
}
|
|
805
|
+
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_L = 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_selfId = 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() {
|
|
806
|
+
const apiId = this.apiId || await this.storage.getApiId();
|
|
807
|
+
if (!apiId) {
|
|
808
|
+
throw new Error("apiId not set");
|
|
809
|
+
}
|
|
810
|
+
return apiId;
|
|
811
|
+
}, _Client_propagateConnectionState = function _Client_propagateConnectionState(connectionState) {
|
|
798
812
|
__classPrivateFieldGet(this, _Client_instances, "m", _Client_queueHandleCtxUpdate).call(this, { connectionState });
|
|
799
813
|
__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
814
|
}, _Client_initStorage = async function _Client_initStorage() {
|
|
805
815
|
if (!__classPrivateFieldGet(this, _Client_storageInited, "f")) {
|
|
806
816
|
await this.storage.initialize();
|
|
@@ -811,7 +821,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
811
821
|
}
|
|
812
822
|
}, exports.handleMigrationError)](err) {
|
|
813
823
|
let newDc = String(err.dc);
|
|
814
|
-
if (Math.abs(this.dcId) >= 10000) {
|
|
824
|
+
if (Math.abs(__classPrivateFieldGet(this, _Client_client, "f").dcId) >= 10000) {
|
|
815
825
|
newDc += "-test";
|
|
816
826
|
}
|
|
817
827
|
await this.reconnect(newDc);
|
|
@@ -819,7 +829,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
819
829
|
}
|
|
820
830
|
async disconnect() {
|
|
821
831
|
__classPrivateFieldSet(this, _Client_connectionInited, false, "f");
|
|
822
|
-
await
|
|
832
|
+
await __classPrivateFieldGet(this, _Client_client, "f").disconnect();
|
|
823
833
|
__classPrivateFieldGet(this, _Client_pingLoopAbortController, "f")?.abort();
|
|
824
834
|
}
|
|
825
835
|
/**
|
|
@@ -840,12 +850,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
840
850
|
* [2]: https://core.telegram.org/method/updates.getState
|
|
841
851
|
*/
|
|
842
852
|
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
853
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initConnection).call(this);
|
|
850
854
|
try {
|
|
851
855
|
await __classPrivateFieldGet(this, _Client_updateManager, "f").fetchState("authorize");
|
|
@@ -859,6 +863,10 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
859
863
|
throw err;
|
|
860
864
|
}
|
|
861
865
|
}
|
|
866
|
+
const apiId = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this);
|
|
867
|
+
if (!this.apiHash) {
|
|
868
|
+
throw new Error("apiHash not set");
|
|
869
|
+
}
|
|
862
870
|
if (typeof params === "undefined") {
|
|
863
871
|
const loginType = (0, _1_utilities_js_1.mustPromptOneOf)("Do you want to login as bot [b] or user [u]?", ["b", "u"]);
|
|
864
872
|
if (loginType == "b") {
|
|
@@ -872,7 +880,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
872
880
|
if (typeof params === "string") {
|
|
873
881
|
while (true) {
|
|
874
882
|
try {
|
|
875
|
-
const auth = await this.api.auth.importBotAuthorization({ api_id:
|
|
883
|
+
const auth = await this.api.auth.importBotAuthorization({ api_id: apiId, api_hash: this.apiHash, bot_auth_token: params, flags: 0 });
|
|
876
884
|
__classPrivateFieldSet(this, _Client_selfId, Number(auth[_2_tl_js_1.as](_2_tl_js_1.types.auth.Authorization).user.id), "f");
|
|
877
885
|
await this.storage.setAccountType("bot");
|
|
878
886
|
break;
|
|
@@ -1015,12 +1023,17 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1015
1023
|
return this.invoke(function_, true);
|
|
1016
1024
|
}
|
|
1017
1025
|
exportAuthString() {
|
|
1018
|
-
return this.storage.exportAuthString();
|
|
1026
|
+
return this.storage.exportAuthString(this.apiId);
|
|
1019
1027
|
}
|
|
1020
1028
|
async importAuthString(authString) {
|
|
1021
1029
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_initStorage).call(this);
|
|
1022
1030
|
await this.storage.importAuthString(authString);
|
|
1023
1031
|
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Get a chat's inputPeer. Useful when calling API functions directly.
|
|
1034
|
+
*
|
|
1035
|
+
* @param id The identifier of the chat.
|
|
1036
|
+
*/
|
|
1024
1037
|
async getInputPeer(id) {
|
|
1025
1038
|
if (id === "me") {
|
|
1026
1039
|
return new _2_tl_js_1.types.InputPeerSelf();
|
|
@@ -1036,6 +1049,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1036
1049
|
}
|
|
1037
1050
|
return inputPeer;
|
|
1038
1051
|
}
|
|
1052
|
+
/**
|
|
1053
|
+
* Get a channel or a supergroup's inputChannel. Useful when calling API functions directly.
|
|
1054
|
+
*
|
|
1055
|
+
* @param id The identifier of the channel or the supergroup.
|
|
1056
|
+
*/
|
|
1039
1057
|
async getInputChannel(id) {
|
|
1040
1058
|
const inputPeer = await this.getInputPeer(id);
|
|
1041
1059
|
if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerChannel)) {
|
|
@@ -1043,6 +1061,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1043
1061
|
}
|
|
1044
1062
|
return new _2_tl_js_1.types.InputChannel(inputPeer);
|
|
1045
1063
|
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Get a user's inputUser. Useful when calling API functions directly.
|
|
1066
|
+
*
|
|
1067
|
+
* @param id The identifier of the user.
|
|
1068
|
+
*/
|
|
1046
1069
|
async getInputUser(id) {
|
|
1047
1070
|
const inputPeer = await this.getInputPeer(id);
|
|
1048
1071
|
if (!(inputPeer instanceof _2_tl_js_1.types.InputPeerUser)) {
|
|
@@ -1053,7 +1076,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1053
1076
|
async [(_Client_initConnection = async function _Client_initConnection() {
|
|
1054
1077
|
if (!__classPrivateFieldGet(this, _Client_connectionInited, "f")) {
|
|
1055
1078
|
await this.api.initConnection({
|
|
1056
|
-
api_id: this.
|
|
1079
|
+
api_id: await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getApiId).call(this),
|
|
1057
1080
|
app_version: this.appVersion,
|
|
1058
1081
|
device_model: this.deviceModel,
|
|
1059
1082
|
lang_code: this.langCode,
|
|
@@ -1070,7 +1093,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1070
1093
|
}
|
|
1071
1094
|
}, _Client_propagateAuthorizationState = async function _Client_propagateAuthorizationState(authorized) {
|
|
1072
1095
|
if (__classPrivateFieldGet(this, _Client_lastPropagatedAuthorizationState, "f") != authorized) {
|
|
1073
|
-
await
|
|
1096
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, { authorizationState: { authorized } }), _0_utilities_js_1.resolve);
|
|
1074
1097
|
__classPrivateFieldSet(this, _Client_lastPropagatedAuthorizationState, authorized, "f");
|
|
1075
1098
|
}
|
|
1076
1099
|
}, _Client_getSelfId = async function _Client_getSelfId() {
|
|
@@ -1078,124 +1101,8 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1078
1101
|
__classPrivateFieldSet(this, _Client_selfId, await this.getMe().then((v) => v.id), "f");
|
|
1079
1102
|
}
|
|
1080
1103
|
return __classPrivateFieldGet(this, _Client_selfId, "f");
|
|
1081
|
-
},
|
|
1082
|
-
|
|
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)();
|
|
1198
|
-
}
|
|
1104
|
+
}, _Client_startPingLoop = function _Client_startPingLoop() {
|
|
1105
|
+
(0, _1_utilities_js_1.drop)(__classPrivateFieldGet(this, _Client_instances, "m", _Client_pingLoop).call(this));
|
|
1199
1106
|
}, _Client_pingLoop = async function _Client_pingLoop() {
|
|
1200
1107
|
__classPrivateFieldSet(this, _Client_pingLoopAbortController, new AbortController(), "f");
|
|
1201
1108
|
while (this.connected) {
|
|
@@ -1227,63 +1134,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1227
1134
|
let n = 1;
|
|
1228
1135
|
while (true) {
|
|
1229
1136
|
try {
|
|
1230
|
-
|
|
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_);
|
|
1279
|
-
}
|
|
1280
|
-
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;
|
|
1286
|
-
}
|
|
1137
|
+
return await __classPrivateFieldGet(this, _Client_client, "f").invoke(function_, noWait);
|
|
1287
1138
|
}
|
|
1288
1139
|
catch (err) {
|
|
1289
1140
|
if (await __classPrivateFieldGet(this, _Client_handleInvokeError, "f").call(this, Object.freeze({ client: this, error: err, function: function_, n: n++ }), () => Promise.resolve(false))) {
|
|
@@ -1293,6 +1144,12 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1293
1144
|
throw err;
|
|
1294
1145
|
}
|
|
1295
1146
|
}
|
|
1147
|
+
finally {
|
|
1148
|
+
if (!__classPrivateFieldGet(this, _Client_pingLoopStarted, "f")) {
|
|
1149
|
+
__classPrivateFieldGet(this, _Client_instances, "m", _Client_startPingLoop).call(this);
|
|
1150
|
+
__classPrivateFieldSet(this, _Client_pingLoopStarted, true, "f");
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1296
1153
|
}
|
|
1297
1154
|
}, _Client_getUserAccessHash = async function _Client_getUserAccessHash(userId) {
|
|
1298
1155
|
const users = await this.api.users.getUsers({ id: [new _2_tl_js_1.types.InputUser({ user_id: userId, access_hash: 0n })] });
|
|
@@ -1373,77 +1230,6 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1373
1230
|
}
|
|
1374
1231
|
return await this.messageStorage.getEntity(id);
|
|
1375
1232
|
}
|
|
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
1233
|
/**
|
|
1448
1234
|
* Send a text message.
|
|
1449
1235
|
*
|
|
@@ -1468,7 +1254,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1468
1254
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageText(chatId, messageId, text, params);
|
|
1469
1255
|
}
|
|
1470
1256
|
/**
|
|
1471
|
-
* Edit an inline message's text.
|
|
1257
|
+
* Edit an inline message's text. Bot-only.
|
|
1472
1258
|
*
|
|
1473
1259
|
* @method ms
|
|
1474
1260
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1489,7 +1275,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1489
1275
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").editMessageReplyMarkup(chatId, messageId, params);
|
|
1490
1276
|
}
|
|
1491
1277
|
/**
|
|
1492
|
-
* Edit an inline message's reply markup.
|
|
1278
|
+
* Edit an inline message's reply markup. Bot-only.
|
|
1493
1279
|
*
|
|
1494
1280
|
* @method ms
|
|
1495
1281
|
* @param inlineMessageId The inline message's identifier.
|
|
@@ -1887,11 +1673,11 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1887
1673
|
* @param id Identifier of one or more of custom emojis.
|
|
1888
1674
|
* @returns The custom emoji documents.
|
|
1889
1675
|
*/
|
|
1890
|
-
async
|
|
1891
|
-
return await __classPrivateFieldGet(this, _Client_fileManager, "f").
|
|
1676
|
+
async getCustomEmojiStickers(id) {
|
|
1677
|
+
return await __classPrivateFieldGet(this, _Client_fileManager, "f").getCustomEmojiStickers(id);
|
|
1892
1678
|
}
|
|
1893
1679
|
/**
|
|
1894
|
-
* Set a chat's available reactions.
|
|
1680
|
+
* Set a chat's available reactions. User-only.
|
|
1895
1681
|
*
|
|
1896
1682
|
* @method ch
|
|
1897
1683
|
* @param chatId The identifier of the chat.
|
|
@@ -1953,7 +1739,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
1953
1739
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatPhoto(chatId);
|
|
1954
1740
|
}
|
|
1955
1741
|
/**
|
|
1956
|
-
* Delete all messages sent by a specific member of a chat.
|
|
1742
|
+
* Delete all messages sent by a specific member of a chat. User-only.
|
|
1957
1743
|
*
|
|
1958
1744
|
* @method ms
|
|
1959
1745
|
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
@@ -2204,7 +1990,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2204
1990
|
return await __classPrivateFieldGet(this, _Client_accountManager, "f").getInactiveChats();
|
|
2205
1991
|
}
|
|
2206
1992
|
/**
|
|
2207
|
-
* Search the messages of a chat.
|
|
1993
|
+
* Search the messages of a chat. User-only.
|
|
2208
1994
|
*
|
|
2209
1995
|
* @method ms
|
|
2210
1996
|
* @param chatId The identifier of the chat to search the messages in.
|
|
@@ -2214,7 +2000,7 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2214
2000
|
return await __classPrivateFieldGet(this, _Client_messageManager, "f").searchMessages(chatId, query, params);
|
|
2215
2001
|
}
|
|
2216
2002
|
/**
|
|
2217
|
-
* Set the number of boosts required to circument a chat's default restrictions.
|
|
2003
|
+
* Set the number of boosts required to circument a chat's default restrictions. User-only.
|
|
2218
2004
|
*
|
|
2219
2005
|
* @method ch
|
|
2220
2006
|
* @param chatId The identifier of the chat.
|
|
@@ -2279,10 +2065,39 @@ class Client extends _0_client_abstract_js_1.ClientAbstract {
|
|
|
2279
2065
|
async unblockUser(userId) {
|
|
2280
2066
|
await __classPrivateFieldGet(this, _Client_messageManager, "f").unblockUser(userId);
|
|
2281
2067
|
}
|
|
2068
|
+
/**
|
|
2069
|
+
* Get information on a user's chat membership.
|
|
2070
|
+
*
|
|
2071
|
+
* @method ch
|
|
2072
|
+
* @param chatId The identifier of a chat that includes the user.
|
|
2073
|
+
* @param userId The identifier of the user.
|
|
2074
|
+
*/
|
|
2075
|
+
async getChatMember(chatId, userId) {
|
|
2076
|
+
return await __classPrivateFieldGet(this, _Client_messageManager, "f").getChatMember(chatId, userId);
|
|
2077
|
+
}
|
|
2078
|
+
/**
|
|
2079
|
+
* Set a chat's sticker set.
|
|
2080
|
+
*
|
|
2081
|
+
* @method ch
|
|
2082
|
+
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2083
|
+
* @param setName The name of the set.
|
|
2084
|
+
*/
|
|
2085
|
+
async setChatStickerSet(chatId, setName) {
|
|
2086
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").setChatStickerSet(chatId, setName);
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* Delete a chat's sticker set.
|
|
2090
|
+
*
|
|
2091
|
+
* @method ch
|
|
2092
|
+
* @param chatId The identifier of the chat. Must be a supergroup.
|
|
2093
|
+
*/
|
|
2094
|
+
async deleteChatStickerSet(chatId) {
|
|
2095
|
+
await __classPrivateFieldGet(this, _Client_messageManager, "f").deleteChatStickerSet(chatId);
|
|
2096
|
+
}
|
|
2282
2097
|
}
|
|
2283
2098
|
exports.Client = Client;
|
|
2284
2099
|
_Client_handleCtxUpdate = async function _Client_handleCtxUpdate(update) {
|
|
2285
|
-
await
|
|
2100
|
+
await this.middleware()(await __classPrivateFieldGet(this, _Client_constructContext, "f").call(this, update), _0_utilities_js_1.resolve);
|
|
2286
2101
|
}, _Client_queueHandleCtxUpdate = function _Client_queueHandleCtxUpdate(update) {
|
|
2287
2102
|
__classPrivateFieldGet(this, _Client_updateManager, "f").getHandleUpdateQueue(_1_update_manager_js_1.UpdateManager.MAIN_BOX_ID).add(async () => {
|
|
2288
2103
|
await __classPrivateFieldGet(this, _Client_instances, "m", _Client_handleCtxUpdate).call(this, update);
|