


'''simple docstring'''






import argparse


a_					:    int          =    "docs/source/_static/js/custom.js"






def 	_A				(lowerCAmelCase__  :Union[str, Any]		)   ->  List[str]:




     '''simple docstring'''



     with open(lowerCAmelCase__				,						encoding='utf-8'				,						newline='\n'		) as f:
          _a			      =							f.readlines()
     _a			      =							0

     # First let's put the right version
     while not lines[index].startswith('const stableVersion ='		):
          index += 1
     _a			      =							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(lowerCAmelCase__				,						'w'				,						encoding='utf-8'				,						newline='\n'		) as f:
          f.writelines(lowerCAmelCase__		)


if __name__ == "__main__":
 a_					:    List[Any]          =    argparse.ArgumentParser()
 parser.add_argument("--version", help="Release version.")
 a_					:    List[str]          =    parser.parse_args()
 update_custom_js(args.version)





'''simple docstring'''






class  a     :
 def __init__( self      ,				__magic_name__						)					->							Optional[int]:
      _a			      =							n
      _a			      =							[None] * self.n
      _a			      =							0  # index of the first element
      _a			      =							0
      _a			      =							0
 def __len__( self						)					->							int:
      return self.size
 def 							__UpperCAmelCase		( self						)					->							bool:
      return self.size == 0
 def 							__UpperCAmelCase		( self						)					->							Optional[Any]:
      return False if self.is_empty() else self.array[self.front]
 def 							__UpperCAmelCase		( self      ,				__magic_name__						)					->							Optional[Any]:
      if self.size >= self.n:
           raise Exception('QUEUE IS FULL'						)

      _a			      =							data
      _a			      =							(self.rear + 1) % self.n
      self.size += 1
      return self




 def 							__UpperCAmelCase		( self						)					->							Any:
      if self.size == 0:
           raise Exception('UNDERFLOW'						)

      _a			      =							self.array[self.front]
      _a			      =							None
      _a			      =							(self.front + 1) % self.n
      self.size -= 1
      return temp

