


import argparse


__lowerCAmelCase      :					Optional[Any]    							='docs/source/_static/js/custom.js'


def 			_UpperCamelCase				( lowercase__ ):


						with open(_lowercase       ,			encoding='''utf-8'''       ,			newline='''\n''' ) as f:
												__SCREAMING_SNAKE_CASE		:	List[Any]						     =						f.readlines()
						__SCREAMING_SNAKE_CASE		:	List[Any]						     =						0

						# First let's put the right version
						while not lines[index].startswith('''const stableVersion =''' ):
												index += 1
						__SCREAMING_SNAKE_CASE		:	Optional[int]						     =						F'''const stableVersion = "v{version}"\n'''

						# Then update the dictionary
						while not lines[index].startswith('''const versionMapping = {''' ):
												index += 1

						# We go until the end
						while not lines[index].startswith('''}''' ):
												index += 1
						# We add the new version at the end
						lines[index - 1] += F'''    "v{version}": "v{version}",\n'''

						with open(_lowercase       ,			'''w'''       ,			encoding='''utf-8'''       ,			newline='''\n''' ) as f:
												f.writelines(_lowercase )


if __name__ == "__main__":
						__lowerCAmelCase      :					Dict    							=argparse.ArgumentParser()
						parser.add_argument('--version', help='Release version.')
						__lowerCAmelCase      :					int    							=parser.parse_args()
						update_custom_js(args.version)






from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


__a							     =					{}

try:
     if not is_sentencepiece_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __a							     =					['NllbTokenizer']

try:
     if not is_tokenizers_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     __a							     =					['NllbTokenizerFast']


if TYPE_CHECKING:
     try:
          if not is_sentencepiece_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_nllb import NllbTokenizer

     try:
          if not is_tokenizers_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .tokenization_nllb_fast import NllbTokenizerFast

else:
     import sys

     __a							     =					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)