@mtkruto/node 0.1.170 → 0.1.190
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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_html.js +0 -6
- package/esm/client/0_markdown.d.ts +21 -0
- package/esm/client/0_markdown.js +321 -0
- package/esm/client/0_message.d.ts +1 -1
- package/esm/client/0_message.js +3 -6
- package/esm/client/0_params.d.ts +16 -0
- package/esm/client/1_client_encrypted.d.ts +34 -0
- package/esm/client/1_client_encrypted.js +239 -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/2_message_manager.d.ts +8 -3
- package/esm/client/2_message_manager.js +101 -9
- package/esm/client/4_client.d.ts +98 -40
- package/esm/client/4_client.js +263 -414
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
- package/{script/deps/deno.land/std@0.219.0 → esm/deps/deno.land/std@0.221.0}/path/basename.d.ts +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
- package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
- package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
- package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/basename.d.ts +9 -0
- package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
- package/esm/storage/0_storage.d.ts +10 -1
- package/esm/storage/0_storage.js +40 -5
- 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_message_entity.d.ts +1 -0
- package/esm/types/0_message_entity.js +34 -0
- package/esm/types/0_parse_mode.d.ts +1 -1
- 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_html.js +0 -6
- package/script/client/0_markdown.d.ts +21 -0
- package/script/client/0_markdown.js +325 -0
- package/script/client/0_message.d.ts +1 -1
- package/script/client/0_message.js +3 -6
- package/script/client/0_params.d.ts +16 -0
- package/script/client/1_client_encrypted.d.ts +34 -0
- package/script/client/1_client_encrypted.js +243 -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/2_message_manager.d.ts +8 -3
- package/script/client/2_message_manager.js +101 -9
- package/script/client/4_client.d.ts +98 -40
- package/script/client/4_client.js +259 -410
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.js +6 -3
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.js +2 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.js +2 -2
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.d.ts +13 -1
- package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/basename.d.ts +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/basename.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.d.ts +3 -1
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/format.js +3 -1
- package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/parse.js +13 -1
- package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/basename.js +9 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/dirname.js +9 -0
- package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/extname.js +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.js +1 -1
- package/{esm/deps/deno.land/std@0.219.0/path → script/deps/deno.land/std@0.221.0/path/windows}/basename.d.ts +9 -0
- package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/basename.js +9 -0
- package/script/storage/0_storage.d.ts +10 -1
- package/script/storage/0_storage.js +40 -5
- 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_message_entity.d.ts +1 -0
- package/script/types/0_message_entity.js +36 -1
- package/script/types/0_parse_mode.d.ts +1 -1
- 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/esm/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
- package/esm/deps/deno.land/std@0.219.0/path/parse.js +0 -12
- package/script/client/5_composer.d.ts +0 -4
- package/script/client/5_composer.js +0 -7
- package/script/deps/deno.land/std@0.219.0/path/parse.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/posix/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/posix/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/posix/extname.d.ts +0 -6
- package/script/deps/deno.land/std@0.219.0/path/windows/basename.d.ts +0 -8
- package/script/deps/deno.land/std@0.219.0/path/windows/dirname.d.ts +0 -5
- package/script/deps/deno.land/std@0.219.0/path/windows/extname.d.ts +0 -6
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/dirname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0/path/posix → std@0.221.0/path/windows}/extname.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_greater_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_is_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_less_or_equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/fmt/colors.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_db.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/content_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/extensions_by_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/format_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/get_charset.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/parse_media_type.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/type_by_extension.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/media_types/vendor/mime-db.v1.52.0.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/assert_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/basename.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/glob_to_reg_exp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/normalize_string.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/strip_trailing_separators.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_common/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_interface.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/_os.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/constants.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/dirname.js +0 -0
- /package/{esm/deps/deno.land/std@0.219.0/path/windows → script/deps/deno.land/std@0.221.0/path}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/posix/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/to_namespaced_path.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/_util.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/common.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/constants.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/dirname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/dirname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0/path → std@0.221.0/path/windows}/extname.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/extname.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/format.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/from_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/glob_to_regexp.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_absolute.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/is_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/join_globs.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/mod.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/normalize_glob.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/parse.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/relative.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/resolve.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_file_url.js +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.219.0 → std@0.221.0}/path/windows/to_namespaced_path.js +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
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");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _ClientEncrypted_instances, _ClientEncrypted_authKey, _ClientEncrypted_authKeyId, _ClientEncrypted_sessionId, _ClientEncrypted_state, _ClientEncrypted_toAcknowledge, _ClientEncrypted_recentAcks, _ClientEncrypted_promises, _ClientEncrypted_L, _ClientEncrypted_LreceiveLoop, _ClientEncrypted_Linvoke, _ClientEncrypted_nextMessageId, _ClientEncrypted_nextSeqNo, _ClientEncrypted_sendMessage, _ClientEncrypted_receiveLoop;
|
|
13
|
+
import { gunzip } from "../0_deps.js";
|
|
14
|
+
import { bigIntFromBuffer, CacheMap, drop, getLogger, getRandomBigInt, sha1, UNREACHABLE } from "../1_utilities.js";
|
|
15
|
+
import { Message_, MessageContainer, name, RPCResult, TLError, TLReader, types } from "../2_tl.js";
|
|
16
|
+
import { upgradeInstance } from "../4_errors.js";
|
|
17
|
+
import { ClientAbstract } from "./0_client_abstract.js";
|
|
18
|
+
import { decryptMessage, encryptMessage, getMessageId } from "./0_message.js";
|
|
19
|
+
import { ConnectionError } from "./0_types.js";
|
|
20
|
+
// global ClientEncrypted ID counter for logs
|
|
21
|
+
let id = 0;
|
|
22
|
+
/**
|
|
23
|
+
* An MTProto client for making encrypted connections. Most users won't need to interact with this. Used internally by `Client`.
|
|
24
|
+
*
|
|
25
|
+
* There are a few things to note:
|
|
26
|
+
*
|
|
27
|
+
* - This is a bare client and it stores nothing.
|
|
28
|
+
* - It expects an authorization key to be present before invoking any method.
|
|
29
|
+
* - Authorization must be set using `setAuthKey`.
|
|
30
|
+
* - Incoming packets that aren't a reply to a specific call are passed to the assigned handlers.
|
|
31
|
+
* - It doesn't uncompress compressed packets.
|
|
32
|
+
*/
|
|
33
|
+
export class ClientEncrypted extends ClientAbstract {
|
|
34
|
+
constructor(params) {
|
|
35
|
+
super(params);
|
|
36
|
+
_ClientEncrypted_instances.add(this);
|
|
37
|
+
_ClientEncrypted_authKey.set(this, new Uint8Array());
|
|
38
|
+
_ClientEncrypted_authKeyId.set(this, 0n);
|
|
39
|
+
_ClientEncrypted_sessionId.set(this, getRandomBigInt(8, true, false));
|
|
40
|
+
_ClientEncrypted_state.set(this, { serverSalt: 0n, seqNo: 0, messageId: 0n });
|
|
41
|
+
_ClientEncrypted_toAcknowledge.set(this, new Set());
|
|
42
|
+
_ClientEncrypted_recentAcks.set(this, new CacheMap(20));
|
|
43
|
+
_ClientEncrypted_promises.set(this, new Map());
|
|
44
|
+
// loggers
|
|
45
|
+
_ClientEncrypted_L.set(this, void 0);
|
|
46
|
+
_ClientEncrypted_LreceiveLoop.set(this, void 0);
|
|
47
|
+
_ClientEncrypted_Linvoke.set(this, void 0);
|
|
48
|
+
// receive loop handlers
|
|
49
|
+
Object.defineProperty(this, "handlers", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
configurable: true,
|
|
52
|
+
writable: true,
|
|
53
|
+
value: {}
|
|
54
|
+
});
|
|
55
|
+
const L = __classPrivateFieldSet(this, _ClientEncrypted_L, getLogger("ClientEncrypted").client(id++), "f");
|
|
56
|
+
__classPrivateFieldSet(this, _ClientEncrypted_LreceiveLoop, L.branch("receiveLoop"), "f");
|
|
57
|
+
__classPrivateFieldSet(this, _ClientEncrypted_Linvoke, L.branch("invoke"), "f");
|
|
58
|
+
}
|
|
59
|
+
async connect() {
|
|
60
|
+
await super.connect();
|
|
61
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_receiveLoop).call(this)); // TODO: ability to join this promise
|
|
62
|
+
}
|
|
63
|
+
async setAuthKey(key) {
|
|
64
|
+
const hash = await sha1(key);
|
|
65
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKeyId, bigIntFromBuffer(hash.slice(-8), true, false), "f");
|
|
66
|
+
__classPrivateFieldSet(this, _ClientEncrypted_authKey, key, "f");
|
|
67
|
+
}
|
|
68
|
+
get authKey() {
|
|
69
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f");
|
|
70
|
+
}
|
|
71
|
+
set serverSalt(serverSalt) {
|
|
72
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt = serverSalt;
|
|
73
|
+
}
|
|
74
|
+
get serverSalt() {
|
|
75
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt;
|
|
76
|
+
}
|
|
77
|
+
async invoke(function_, noWait) {
|
|
78
|
+
const messageId = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this);
|
|
79
|
+
const message__ = new Message_(messageId, __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, true), function_);
|
|
80
|
+
let message_;
|
|
81
|
+
let container = undefined;
|
|
82
|
+
if (__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").size) {
|
|
83
|
+
const ack = new Message_(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), new types.Msgs_ack({ msg_ids: [...__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f")] }));
|
|
84
|
+
__classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").set(ack.id, { container, message: ack });
|
|
85
|
+
message_ = new MessageContainer(container = __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextMessageId).call(this), __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_nextSeqNo).call(this, false), [message__, ack]);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
message_ = message__;
|
|
89
|
+
}
|
|
90
|
+
await __classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, message_);
|
|
91
|
+
__classPrivateFieldGet(this, _ClientEncrypted_Linvoke, "f").debug("invoked", function_[name]);
|
|
92
|
+
if (noWait) {
|
|
93
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, {
|
|
94
|
+
container,
|
|
95
|
+
message: message__,
|
|
96
|
+
call: function_,
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
return await new Promise((resolve, reject) => {
|
|
101
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").set(messageId, { container, message: message__, resolve, reject, call: function_ });
|
|
102
|
+
}).then((v) => v);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
_ClientEncrypted_authKey = new WeakMap(), _ClientEncrypted_authKeyId = new WeakMap(), _ClientEncrypted_sessionId = new WeakMap(), _ClientEncrypted_state = new WeakMap(), _ClientEncrypted_toAcknowledge = new WeakMap(), _ClientEncrypted_recentAcks = new WeakMap(), _ClientEncrypted_promises = new WeakMap(), _ClientEncrypted_L = new WeakMap(), _ClientEncrypted_LreceiveLoop = new WeakMap(), _ClientEncrypted_Linvoke = new WeakMap(), _ClientEncrypted_instances = new WeakSet(), _ClientEncrypted_nextMessageId = function _ClientEncrypted_nextMessageId() {
|
|
106
|
+
return __classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId = getMessageId(__classPrivateFieldGet(this, _ClientEncrypted_state, "f").messageId);
|
|
107
|
+
}, _ClientEncrypted_nextSeqNo = function _ClientEncrypted_nextSeqNo(contentRelated) {
|
|
108
|
+
let seqNo = __classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo * 2;
|
|
109
|
+
if (contentRelated) {
|
|
110
|
+
seqNo++;
|
|
111
|
+
__classPrivateFieldGet(this, _ClientEncrypted_state, "f").seqNo++;
|
|
112
|
+
}
|
|
113
|
+
return seqNo;
|
|
114
|
+
}, _ClientEncrypted_sendMessage = async function _ClientEncrypted_sendMessage(message) {
|
|
115
|
+
const payload = await encryptMessage(message, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_state, "f").serverSalt, __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f"));
|
|
116
|
+
await this.transport.transport.send(payload);
|
|
117
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").out(message);
|
|
118
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").outBin(payload);
|
|
119
|
+
}, _ClientEncrypted_receiveLoop = async function _ClientEncrypted_receiveLoop() {
|
|
120
|
+
if (!this.transport) {
|
|
121
|
+
UNREACHABLE();
|
|
122
|
+
}
|
|
123
|
+
while (this.connected) {
|
|
124
|
+
try {
|
|
125
|
+
const buffer = await this.transport.transport.receive();
|
|
126
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").inBin(buffer);
|
|
127
|
+
let decrypted;
|
|
128
|
+
try {
|
|
129
|
+
decrypted = await (decryptMessage(buffer, __classPrivateFieldGet(this, _ClientEncrypted_authKey, "f"), __classPrivateFieldGet(this, _ClientEncrypted_authKeyId, "f"), __classPrivateFieldGet(this, _ClientEncrypted_sessionId, "f")));
|
|
130
|
+
__classPrivateFieldGet(this, _ClientEncrypted_L, "f").in(decrypted);
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to decrypt message:", err);
|
|
134
|
+
this.handlers.error?.(err, "decryption");
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const messages = decrypted instanceof MessageContainer ? decrypted.messages : [decrypted];
|
|
138
|
+
for (const message of messages) {
|
|
139
|
+
let body = message.body;
|
|
140
|
+
if (body instanceof types.Gzip_packed) {
|
|
141
|
+
body = new TLReader(gunzip(body.packed_data)).readObject();
|
|
142
|
+
}
|
|
143
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("received", (typeof body === "object" && name in body) ? body[name] : body.constructor.name);
|
|
144
|
+
if (body instanceof types._Updates || body instanceof types._Update) {
|
|
145
|
+
this.handlers.updates?.(body, null);
|
|
146
|
+
}
|
|
147
|
+
else if (body instanceof types.New_session_created) {
|
|
148
|
+
this.serverSalt = body.server_salt;
|
|
149
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
150
|
+
}
|
|
151
|
+
else if (message.body instanceof RPCResult) {
|
|
152
|
+
let result = message.body.result;
|
|
153
|
+
if (result instanceof types.Gzip_packed) {
|
|
154
|
+
result = new TLReader(gunzip(result.packed_data)).readObject();
|
|
155
|
+
}
|
|
156
|
+
if (result instanceof types.Rpc_error) {
|
|
157
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", result.error_code, result.error_message);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("RPCResult:", (typeof result === "object" && name in result) ? result[name] : result.constructor.name);
|
|
161
|
+
}
|
|
162
|
+
const messageId = message.body.messageId;
|
|
163
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(messageId);
|
|
164
|
+
const resolvePromise = () => {
|
|
165
|
+
if (promise) {
|
|
166
|
+
if (result instanceof types.Rpc_error) {
|
|
167
|
+
promise.reject?.(upgradeInstance(result, promise.call));
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
promise.resolve?.(result);
|
|
171
|
+
}
|
|
172
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(messageId);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
if (result instanceof types._Updates || result instanceof types._Update) {
|
|
176
|
+
this.handlers.updates?.(result, promise?.call ?? null, resolvePromise);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
this.handlers.result?.(result, resolvePromise);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else if (message.body instanceof types.Pong) {
|
|
183
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.msg_id);
|
|
184
|
+
if (promise) {
|
|
185
|
+
promise.resolve?.(message.body);
|
|
186
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(message.body.msg_id);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else if (message.body instanceof types.Bad_server_salt) {
|
|
190
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").debug("server salt reassigned");
|
|
191
|
+
this.serverSalt = message.body.new_server_salt;
|
|
192
|
+
this.handlers.serverSaltReassigned?.(this.serverSalt);
|
|
193
|
+
const promise = __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").get(message.body.bad_msg_id);
|
|
194
|
+
const ack = __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").get(message.body.bad_msg_id);
|
|
195
|
+
if (promise) {
|
|
196
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
197
|
+
}
|
|
198
|
+
else if (ack) {
|
|
199
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
for (const promise of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").values()) {
|
|
203
|
+
if (promise.container && promise.container == message.body.bad_msg_id) {
|
|
204
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, promise.message));
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
for (const ack of __classPrivateFieldGet(this, _ClientEncrypted_recentAcks, "f").values()) {
|
|
208
|
+
if (ack.container && ack.container == message.body.bad_msg_id) {
|
|
209
|
+
drop(__classPrivateFieldGet(this, _ClientEncrypted_instances, "m", _ClientEncrypted_sendMessage).call(this, ack.message));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
__classPrivateFieldGet(this, _ClientEncrypted_toAcknowledge, "f").add(message.id);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (err) {
|
|
218
|
+
if (!this.connected) {
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
else if (err instanceof TLError) {
|
|
222
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("failed to deserialize:", err);
|
|
223
|
+
this.handlers.error?.(err, "deserialization");
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
__classPrivateFieldGet(this, _ClientEncrypted_LreceiveLoop, "f").error("unexpected error:", err);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (!this.connected) {
|
|
231
|
+
for (const [key, { reject }] of __classPrivateFieldGet(this, _ClientEncrypted_promises, "f").entries()) {
|
|
232
|
+
reject?.(new ConnectionError("Connection was closed"));
|
|
233
|
+
__classPrivateFieldGet(this, _ClientEncrypted_promises, "f").delete(key);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
UNREACHABLE();
|
|
238
|
+
}
|
|
239
|
+
};
|
|
@@ -7,6 +7,9 @@ export interface ClientPlainParams extends ClientAbstractParams {
|
|
|
7
7
|
*/
|
|
8
8
|
publicKeys?: PublicKeys;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
12
|
+
*/
|
|
10
13
|
export declare class ClientPlain extends ClientAbstract {
|
|
11
14
|
#private;
|
|
12
15
|
constructor(params?: ClientPlainParams);
|
|
@@ -18,11 +18,14 @@ import { ClientAbstract } from "./0_client_abstract.js";
|
|
|
18
18
|
import { getMessageId, packUnencryptedMessage, unpackUnencryptedMessage } from "./0_message.js";
|
|
19
19
|
const L = getLogger("ClientPlain");
|
|
20
20
|
const LcreateAuthKey = L.branch("createAuthKey");
|
|
21
|
+
/**
|
|
22
|
+
* An MTProto client for making plain connections. Most users won't need to interact with this. Used internally for creating authorization keys.
|
|
23
|
+
*/
|
|
21
24
|
export class ClientPlain extends ClientAbstract {
|
|
22
25
|
constructor(params) {
|
|
23
26
|
super(params);
|
|
24
27
|
_ClientPlain_publicKeys.set(this, void 0);
|
|
25
|
-
_ClientPlain_lastMsgId.set(this, 0n);
|
|
28
|
+
_ClientPlain_lastMsgId.set(this, 0n); // TODO: refactor
|
|
26
29
|
__classPrivateFieldSet(this, _ClientPlain_publicKeys, params?.publicKeys ?? PUBLIC_KEYS, "f");
|
|
27
30
|
}
|
|
28
31
|
async invoke(function_) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { MaybePromise } from "../1_utilities.js";
|
|
1
2
|
import { Update, UpdateIntersection, User } from "../3_types.js";
|
|
2
3
|
import { FilterQuery, WithFilter } from "./0_filters.js";
|
|
3
|
-
type
|
|
4
|
-
export type NextFunction = () => Promise<void>;
|
|
4
|
+
export type NextFunction<T = void> = () => Promise<T>;
|
|
5
5
|
export type MiddlewareFn<C> = (ctx: C, next: NextFunction) => MaybePromise<unknown>;
|
|
6
6
|
export interface MiddlewareObj<C> {
|
|
7
7
|
middleware: () => MiddlewareFn<C>;
|
|
@@ -27,4 +27,3 @@ export declare class Composer<C extends {
|
|
|
27
27
|
prefixes: string | string[];
|
|
28
28
|
}, ...middleware: Middleware<WithFilter<C, "message:text">>[]): Composer<WithFilter<C, "message:text">>;
|
|
29
29
|
}
|
|
30
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { enums, types } from "../2_tl.js";
|
|
2
2
|
import { ChatAction, ChatMember, FileSource, FileType, ID, Message, MessageEntity, ParseMode, Reaction, Update, UsernameResolver } from "../3_types.js";
|
|
3
|
-
import { AddReactionParams, BanChatMemberParams, CreateInviteLinkParams, DeleteMessagesParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetCreatedInviteLinksParams, GetHistoryParams, PinMessageParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetReactionsParams } from "./0_params.js";
|
|
3
|
+
import { AddReactionParams, BanChatMemberParams, CreateInviteLinkParams, DeleteMessagesParams, EditMessageLiveLocationParams, EditMessageParams, EditMessageReplyMarkupParams, ForwardMessagesParams, GetCreatedInviteLinksParams, GetHistoryParams, PinMessageParams, SearchMessagesParams, SendAnimationParams, SendAudioParams, SendContactParams, SendDiceParams, SendDocumentParams, SendLocationParams, SendMessageParams, SendPhotoParams, SendPollParams, SendStickerParams, SendVenueParams, SendVideoNoteParams, SendVideoParams, SendVoiceParams, SetChatMemberRightsParams, SetChatPhotoParams, SetReactionsParams, StopPollParams } from "./0_params.js";
|
|
4
4
|
import { C as C_ } from "./0_types.js";
|
|
5
5
|
import { FileManager } from "./1_file_manager.js";
|
|
6
6
|
interface C extends C_ {
|
|
@@ -13,7 +13,8 @@ export declare class MessageManager {
|
|
|
13
13
|
getMessages(chatId: ID, messageIds: number[]): Promise<Message[]>;
|
|
14
14
|
getMessageWithReply(chatId: ID, messageId: number): Promise<Message>;
|
|
15
15
|
getMessage(chatId: ID, messageId: number): Promise<Message>;
|
|
16
|
-
parseText(text: string,
|
|
16
|
+
static parseText(text: string, entities: MessageEntity[], parseMode: ParseMode): [string, MessageEntity[]];
|
|
17
|
+
parseText(text_: string, params?: {
|
|
17
18
|
parseMode?: ParseMode;
|
|
18
19
|
entities?: MessageEntity[];
|
|
19
20
|
}): Promise<readonly [string, enums.MessageEntity[] | undefined]>;
|
|
@@ -32,8 +33,9 @@ export declare class MessageManager {
|
|
|
32
33
|
sendAnimation(chatId: ID, animation: FileSource, params?: SendAnimationParams): Promise<import("../3_types.js").MessageAnimation>;
|
|
33
34
|
sendVideo(chatId: ID, video: FileSource, params?: SendVideoParams): Promise<import("../3_types.js").MessageVideo>;
|
|
34
35
|
sendDocument(chatId: ID, document: FileSource, params?: SendDocumentParams): Promise<import("../3_types.js").MessageDocument>;
|
|
36
|
+
sendSticker(chatId: ID, sticker: FileSource, params?: SendStickerParams): Promise<import("../3_types.js").MessageSticker>;
|
|
35
37
|
sendPhoto(chatId: ID, photo: FileSource, params?: SendPhotoParams): Promise<import("../3_types.js").MessagePhoto>;
|
|
36
|
-
resolveFileId(maybeFileId: string, expectedFileType: FileType): {
|
|
38
|
+
resolveFileId(maybeFileId: string, expectedFileType: FileType | FileType[]): {
|
|
37
39
|
id: bigint;
|
|
38
40
|
access_hash: bigint;
|
|
39
41
|
file_reference: Uint8Array;
|
|
@@ -76,5 +78,8 @@ export declare class MessageManager {
|
|
|
76
78
|
getChatMember(chatId: ID, userId: ID): Promise<ChatMember>;
|
|
77
79
|
setChatStickerSet(chatId: ID, setName: string): Promise<void>;
|
|
78
80
|
deleteChatStickerSet(chatId: ID): Promise<void>;
|
|
81
|
+
stopPoll(chatId: ID, messageId: number, params?: StopPollParams): Promise<import("../3_types.js").Poll>;
|
|
82
|
+
editMessageLiveLocation(chatId: ID, messageId: number, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<import("../3_types.js").MessageLocation>;
|
|
83
|
+
editInlineMessageLiveLocation(inlineMessageId: string, latitude: number, longitude: number, params?: EditMessageLiveLocationParams): Promise<void>;
|
|
79
84
|
}
|
|
80
85
|
export {};
|
|
@@ -17,7 +17,10 @@ import { constructChatMemberUpdated, constructInviteLink, deserializeFileId } fr
|
|
|
17
17
|
import { assertMessageType, chatMemberRightsToTlObject, constructChatMember, constructMessage as constructMessage_, deserializeInlineMessageId, FileType, messageEntityToTlObject, reactionEqual, reactionToTlObject, replyMarkupToTlObject } from "../3_types.js";
|
|
18
18
|
import { messageSearchFilterToTlObject } from "../types/0_message_search_filter.js";
|
|
19
19
|
import { parseHtml } from "./0_html.js";
|
|
20
|
+
import { parseMarkdown } from "./0_markdown.js";
|
|
20
21
|
import { getFileContents, isHttpUrl } from "./0_utilities.js";
|
|
22
|
+
const FALLBACK_MIME_TYPE = "application/octet-stream";
|
|
23
|
+
const STICKER_MIME_TYPES = ["image/webp", "video/webp", "application/x-tgsticker"];
|
|
21
24
|
export class MessageManager {
|
|
22
25
|
constructor(c) {
|
|
23
26
|
_MessageManager_instances.add(this);
|
|
@@ -86,9 +89,7 @@ export class MessageManager {
|
|
|
86
89
|
const messages = await this.getMessages(chatId, [messageId]);
|
|
87
90
|
return messages[0] ?? null;
|
|
88
91
|
}
|
|
89
|
-
|
|
90
|
-
const entities_ = params?.entities ?? [];
|
|
91
|
-
const parseMode = params?.parseMode ?? __classPrivateFieldGet(this, _MessageManager_c, "f").parseMode;
|
|
92
|
+
static parseText(text, entities, parseMode) {
|
|
92
93
|
switch (parseMode) {
|
|
93
94
|
case null:
|
|
94
95
|
break;
|
|
@@ -96,13 +97,31 @@ export class MessageManager {
|
|
|
96
97
|
const [newText, entitiesToPush] = parseHtml(text);
|
|
97
98
|
text = newText;
|
|
98
99
|
for (const entity of entitiesToPush) {
|
|
99
|
-
|
|
100
|
+
entities.push(entity);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case "Markdown": {
|
|
105
|
+
const [newText, entitiesToPush] = parseMarkdown(text);
|
|
106
|
+
text = newText;
|
|
107
|
+
for (const entity of entitiesToPush) {
|
|
108
|
+
entities.push(entity);
|
|
100
109
|
}
|
|
101
110
|
break;
|
|
102
111
|
}
|
|
103
112
|
default:
|
|
104
113
|
UNREACHABLE();
|
|
105
114
|
}
|
|
115
|
+
text = text.trimEnd();
|
|
116
|
+
for (const entity of entities) {
|
|
117
|
+
while (text[entity.offset + (entity.length - 1)] === undefined) {
|
|
118
|
+
--entity.length;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return [text, entities];
|
|
122
|
+
}
|
|
123
|
+
async parseText(text_, params) {
|
|
124
|
+
const [text, entities_] = MessageManager.parseText(text_, params?.entities ?? [], params?.parseMode ?? __classPrivateFieldGet(this, _MessageManager_c, "f").parseMode);
|
|
106
125
|
const entities = entities_?.length > 0 ? await Promise.all(entities_.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity))) : undefined;
|
|
107
126
|
return [text, entities];
|
|
108
127
|
}
|
|
@@ -385,11 +404,15 @@ export class MessageManager {
|
|
|
385
404
|
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, document, params, FileType.Document, []);
|
|
386
405
|
return assertMessageType(message, "document");
|
|
387
406
|
}
|
|
407
|
+
async sendSticker(chatId, sticker, params) {
|
|
408
|
+
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_sendDocumentInner).call(this, chatId, sticker, params, FileType.Sticker, [new types.DocumentAttributeSticker({ alt: params?.emoji || "", stickerset: new types.InputStickerSetEmpty() })], undefined, STICKER_MIME_TYPES);
|
|
409
|
+
return assertMessageType(message, "sticker");
|
|
410
|
+
}
|
|
388
411
|
async sendPhoto(chatId, photo, params) {
|
|
389
412
|
let media = null;
|
|
390
413
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
391
414
|
if (typeof photo === "string") {
|
|
392
|
-
const fileId = this.resolveFileId(photo, FileType.Photo);
|
|
415
|
+
const fileId = this.resolveFileId(photo, [FileType.Photo, FileType.ProfilePhoto]);
|
|
393
416
|
if (fileId != null) {
|
|
394
417
|
media = new types.InputMediaPhoto({
|
|
395
418
|
id: new types.InputPhoto(fileId),
|
|
@@ -411,6 +434,7 @@ export class MessageManager {
|
|
|
411
434
|
return assertMessageType(message, "photo");
|
|
412
435
|
}
|
|
413
436
|
resolveFileId(maybeFileId, expectedFileType) {
|
|
437
|
+
expectedFileType = Array.isArray(expectedFileType) ? expectedFileType : [expectedFileType];
|
|
414
438
|
let fileId = null;
|
|
415
439
|
try {
|
|
416
440
|
fileId = deserializeFileId(maybeFileId);
|
|
@@ -419,7 +443,7 @@ export class MessageManager {
|
|
|
419
443
|
__classPrivateFieldGet(this, _MessageManager_LresolveFileId, "f").warning(err);
|
|
420
444
|
}
|
|
421
445
|
if (fileId != null) {
|
|
422
|
-
if (fileId.type
|
|
446
|
+
if (!expectedFileType.includes(fileId.type)) {
|
|
423
447
|
UNREACHABLE();
|
|
424
448
|
}
|
|
425
449
|
return {
|
|
@@ -982,6 +1006,66 @@ export class MessageManager {
|
|
|
982
1006
|
const channel = await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputChannel(chatId);
|
|
983
1007
|
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.channels.setStickers({ channel, stickerset: new types.InputStickerSetEmpty() });
|
|
984
1008
|
}
|
|
1009
|
+
async stopPoll(chatId, messageId, params) {
|
|
1010
|
+
const message = await this.getMessage(chatId, messageId);
|
|
1011
|
+
if (message && "poll" in message && !message.poll.isClosed) {
|
|
1012
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
|
|
1013
|
+
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
1014
|
+
id: messageId,
|
|
1015
|
+
media: new types.InputMediaPoll({
|
|
1016
|
+
poll: new types.Poll({
|
|
1017
|
+
id: BigInt(message.poll.id),
|
|
1018
|
+
closed: true,
|
|
1019
|
+
question: "",
|
|
1020
|
+
answers: [],
|
|
1021
|
+
}),
|
|
1022
|
+
}),
|
|
1023
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1024
|
+
});
|
|
1025
|
+
const message_ = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1026
|
+
return assertMessageType(message_, "poll").poll;
|
|
1027
|
+
}
|
|
1028
|
+
UNREACHABLE();
|
|
1029
|
+
}
|
|
1030
|
+
async editMessageLiveLocation(chatId, messageId, latitude, longitude, params) {
|
|
1031
|
+
const message = await this.getMessage(chatId, messageId);
|
|
1032
|
+
if (message && "location" in message && message.location.livePeriod) {
|
|
1033
|
+
const result = await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editMessage({
|
|
1034
|
+
peer: await __classPrivateFieldGet(this, _MessageManager_c, "f").getInputPeer(chatId),
|
|
1035
|
+
id: messageId,
|
|
1036
|
+
media: new types.InputMediaGeoLive({
|
|
1037
|
+
geo_point: new types.InputGeoPoint({
|
|
1038
|
+
lat: latitude,
|
|
1039
|
+
long: longitude,
|
|
1040
|
+
accuracy_radius: params?.horizontalAccuracy,
|
|
1041
|
+
}),
|
|
1042
|
+
heading: params?.heading,
|
|
1043
|
+
proximity_notification_radius: params?.proximityAlertRadius,
|
|
1044
|
+
}),
|
|
1045
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1046
|
+
});
|
|
1047
|
+
const message = await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_updatesToMessages).call(this, chatId, result).then((v) => v[0]);
|
|
1048
|
+
return assertMessageType(message, "location");
|
|
1049
|
+
}
|
|
1050
|
+
UNREACHABLE();
|
|
1051
|
+
}
|
|
1052
|
+
async editInlineMessageLiveLocation(inlineMessageId, latitude, longitude, params) {
|
|
1053
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").storage.assertBot("editInlineMessageLiveLocation");
|
|
1054
|
+
const id = deserializeInlineMessageId(inlineMessageId);
|
|
1055
|
+
await __classPrivateFieldGet(this, _MessageManager_c, "f").api.messages.editInlineBotMessage({
|
|
1056
|
+
id,
|
|
1057
|
+
media: new types.InputMediaGeoLive({
|
|
1058
|
+
geo_point: new types.InputGeoPoint({
|
|
1059
|
+
lat: latitude,
|
|
1060
|
+
long: longitude,
|
|
1061
|
+
accuracy_radius: params?.horizontalAccuracy,
|
|
1062
|
+
}),
|
|
1063
|
+
heading: params?.heading,
|
|
1064
|
+
proximity_notification_radius: params?.proximityAlertRadius,
|
|
1065
|
+
}),
|
|
1066
|
+
reply_markup: await __classPrivateFieldGet(this, _MessageManager_instances, "m", _MessageManager_constructReplyMarkup).call(this, params),
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
985
1069
|
}
|
|
986
1070
|
_MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(), _MessageManager_instances = new WeakSet(), _MessageManager_updatesToMessages = async function _MessageManager_updatesToMessages(chatId, updates) {
|
|
987
1071
|
const messages = new Array();
|
|
@@ -1020,7 +1104,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1020
1104
|
const topMsgId = params?.messageThreadId;
|
|
1021
1105
|
const replyToMsgId = params?.replyToMessageId;
|
|
1022
1106
|
return replyToMsgId !== undefined ? new types.InputReplyToMessage({ reply_to_msg_id: replyToMsgId, top_msg_id: topMsgId, quote_text: params?.replyQuote?.text, quote_entities: await Promise.all(params?.replyQuote?.entities.map((v) => messageEntityToTlObject(v, __classPrivateFieldGet(this, _MessageManager_c, "f").getEntity)) ?? []), quote_offset: params?.replyQuote?.offset }) : undefined;
|
|
1023
|
-
}, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false) {
|
|
1107
|
+
}, _MessageManager_sendDocumentInner = async function _MessageManager_sendDocumentInner(chatId, document, params, fileType, otherAttribs, urlSupported = false, expectedMimeTypes) {
|
|
1024
1108
|
let media = null;
|
|
1025
1109
|
const spoiler = params?.hasSpoiler ? true : undefined;
|
|
1026
1110
|
if (typeof document === "string") {
|
|
@@ -1029,6 +1113,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1029
1113
|
media = new types.InputMediaDocument({
|
|
1030
1114
|
id: new types.InputDocument(fileId),
|
|
1031
1115
|
spoiler,
|
|
1116
|
+
query: otherAttribs.find((v) => v instanceof types.DocumentAttributeSticker)?.alt || undefined,
|
|
1032
1117
|
});
|
|
1033
1118
|
}
|
|
1034
1119
|
}
|
|
@@ -1041,8 +1126,14 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1041
1126
|
}
|
|
1042
1127
|
else {
|
|
1043
1128
|
const [contents, fileName_] = await getFileContents(document);
|
|
1044
|
-
|
|
1045
|
-
const mimeType = params?.mimeType ?? contentType(fileName.split(".").slice(-1)[0]) ??
|
|
1129
|
+
let fileName = params?.fileName ?? fileName_;
|
|
1130
|
+
const mimeType = params?.mimeType ?? contentType(fileName.split(".").slice(-1)[0]) ?? FALLBACK_MIME_TYPE;
|
|
1131
|
+
if (expectedMimeTypes && !expectedMimeTypes.includes(mimeType)) {
|
|
1132
|
+
UNREACHABLE();
|
|
1133
|
+
}
|
|
1134
|
+
if (fileName.endsWith(".tgs") && fileType == FileType.Document) {
|
|
1135
|
+
fileName += "-";
|
|
1136
|
+
}
|
|
1046
1137
|
const file = await __classPrivateFieldGet(this, _MessageManager_c, "f").fileManager.upload(contents, { fileName, chunkSize: params?.chunkSize, signal: params?.signal });
|
|
1047
1138
|
let thumb = undefined;
|
|
1048
1139
|
if (params?.thumbnail) {
|
|
@@ -1055,6 +1146,7 @@ _MessageManager_c = new WeakMap(), _MessageManager_LresolveFileId = new WeakMap(
|
|
|
1055
1146
|
spoiler,
|
|
1056
1147
|
attributes: [new types.DocumentAttributeFilename({ file_name: fileName }), ...otherAttribs],
|
|
1057
1148
|
mime_type: mimeType,
|
|
1149
|
+
force_file: fileType == FileType.Document ? true : undefined,
|
|
1058
1150
|
});
|
|
1059
1151
|
}
|
|
1060
1152
|
}
|