Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/argparse.cpython-311.opt-1.pyc

�

c��f����d�dZdZgd�ZddlZddlZddlZddl	Z	ddl
m
ZmZdZ
dZdZd	Zd
ZdZdZGd
�de��Zd�ZGd�de��ZGd�de��ZGd�de��ZGd�de��ZGd�de��Zd�ZGd�de��ZGd�de��ZGd�d e��Z Gd!�d"e ��Z!Gd#�d$e ��Z"Gd%�d&e ��Z#Gd'�d(e#��Z$Gd)�d*e#��Z%Gd+�d,e ��Z&Gd-�d.e ��Z'Gd/�d0e ��Z(Gd1�d2e ��Z)Gd3�d4e ��Z*Gd5�d6e ��Z+Gd7�d8e&��Z,Gd9�d:e��Z-Gd;�d<e��Z.Gd=�d>e��Z/Gd?�d@e/��Z0GdA�dBe0��Z1GdC�dDee/��Z2dS)Ea�
Command-line parsing library

This module is an optparse-inspired command-line parsing library that:

    - handles both optional and positional arguments
    - produces highly informative usage messages
    - supports parsers that dispatch to sub-parsers

The following is a simple usage example that sums integers from the
command-line and writes the result to a file::

    parser = argparse.ArgumentParser(
        description='sum the integers at the command line')
    parser.add_argument(
        'integers', metavar='int', nargs='+', type=int,
        help='an integer to be summed')
    parser.add_argument(
        '--log', default=sys.stdout, type=argparse.FileType('w'),
        help='the file where the sum should be written')
    args = parser.parse_args()
    args.log.write('%s' % sum(args.integers))
    args.log.close()

The module contains the following public classes:

    - ArgumentParser -- The main entry point for command-line parsing. As the
        example above shows, the add_argument() method is used to populate
        the parser with actions for optional and positional arguments. Then
        the parse_args() method is invoked to convert the args at the
        command-line into an object with attributes.

    - ArgumentError -- The exception raised by ArgumentParser objects when
        there are errors with the parser's actions. Errors raised while
        parsing the command-line are caught by ArgumentParser and emitted
        as command-line messages.

    - FileType -- A factory for defining types of files to be created. As the
        example above shows, instances of FileType are typically passed as
        the type= argument of add_argument() calls.

    - Action -- The base class for parser actions. Typically actions are
        selected by passing strings like 'store_true' or 'append_const' to
        the action= argument of add_argument(). However, for greater
        customization of ArgumentParser actions, subclasses of Action may
        be defined and passed as the action= argument.

    - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter,
        ArgumentDefaultsHelpFormatter -- Formatter classes which
        may be passed as the formatter_class= argument to the
        ArgumentParser constructor. HelpFormatter is the default,
        RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser
        not to change the formatting for help text, and
        ArgumentDefaultsHelpFormatter adds information about argument defaults
        to the help.

All other classes in this module are considered implementation details.
(Also note that HelpFormatter and RawDescriptionHelpFormatter are only
considered public as object names -- the API of the formatter objects is
still considered an implementation detail.)
z1.1)�ArgumentParser�
ArgumentError�ArgumentTypeError�BooleanOptionalAction�FileType�
HelpFormatter�ArgumentDefaultsHelpFormatter�RawDescriptionHelpFormatter�RawTextHelpFormatter�MetavarTypeHelpFormatter�	Namespace�Action�ONE_OR_MORE�OPTIONAL�PARSER�	REMAINDER�SUPPRESS�ZERO_OR_MORE�N)�gettext�ngettextz==SUPPRESS==�?�*�+zA...�...�_unrecognized_argsc�$�eZdZdZd�Zd�Zd�ZdS)�_AttributeHolderaAbstract base class that provides __repr__.

    The __repr__ method returns a string in the format::
        ClassName(attr=name, attr=name, ...)
    The attributes are determined either by a class-level attribute,
    '_kwarg_names', or by inspecting the instance __dict__.
    c���t|��j}g}i}|���D]$}|�t	|�����%|���D]9\}}|���r|�|�d|�����4|||<�:|r%|�dt	|��z��|�dd�|���d�S)N�=z**%s�(�, �))�type�__name__�	_get_args�append�repr�_get_kwargs�isidentifier�join)�self�	type_name�arg_strings�	star_args�arg�name�values       �//opt/alt/python311/lib64/python3.11/argparse.py�__repr__z_AttributeHolder.__repr__vs�����J�J�'�	����	��>�>�#�#�	*�	*�C����t�C�y�y�)�)�)�)��+�+�-�-�	(�	(�K�D�%�� � �"�"�
(��"�"�d�d�d�E�E�#:�;�;�;�;�"'�	�$����	9����v��Y���7�8�8�8�$�9�9�d�i�i��&<�&<�&<�&<�=�=�c�N�t|j�����S�N)�list�__dict__�items�r+s r2r(z_AttributeHolder._get_kwargs�s���D�M�'�'�)�)�*�*�*r4c��gSr6�r:s r2r%z_AttributeHolder._get_args�s���	r4N)r$�
__module__�__qualname__�__doc__r3r(r%r<r4r2rrmsK��������
>�
>�
>�+�+�+�����r4rc�|�|�gSt|��tur
|dd�Sddl}|�|��S�Nr)r#r7�copy)r9rBs  r2�_copy_itemsrC�sG���}��	��E�{�{�d����Q�Q�Q�x���K�K�K��9�9�U���r4c���eZdZdZ			d!d�Zd�Zd�ZGd�d	e��Zd
�Z	d�Z
d�Zd
�Zd"d�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �ZdS)#rz�Formatter for generating usage messages and argument help strings.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    ��Nc��|�"ddl}|���j}|dz}||_||_t|t
|dz
|dz����|_||_d|_	d|_
d|_|�|d��|_
|j
|_tjdtj��|_tjd��|_dS)NrrE�z\s+z\n\n\n+)�shutil�get_terminal_size�columns�_prog�_indent_increment�min�max�_max_help_position�_width�_current_indent�_level�_action_max_length�_Section�
_root_section�_current_section�_re�compile�ASCII�_whitespace_matcher�_long_break_matcher)r+�prog�indent_increment�max_help_position�widthrIs      r2�__init__zHelpFormatter.__init__�s����=��M�M�M��,�,�.�.�6�E��Q�J�E���
�!1���"%�&7�&)�%�"�*�6F��6J�&K�&K�#M�#M������ ������"#���!�]�]�4��6�6��� $� 2���#&�;�v�s�y�#A�#A�� �#&�;�z�#:�#:�� � � r4c�P�|xj|jz
c_|xjdz
c_dS�N��rRrMrSr:s r2�_indentzHelpFormatter._indent�s-������ 6�6������q�����r4c�P�|xj|jzc_|xjdzc_dSrcrer:s r2�_dedentzHelpFormatter._dedent�s-������ 6�6������q�����r4c��eZdZdd�Zd�ZdS)�HelpFormatter._SectionNc�>�||_||_||_g|_dSr6)�	formatter�parent�headingr9)r+rlrmrns    r2razHelpFormatter._Section.__init__�s"��&�D�N� �D�K�"�D�L��D�J�J�Jr4c��|j�|j���|jj}|d�|jD����}|j�|j���|sdS|jturA|j�:|jj}td��t|j���z}d|d|fz}nd}|d||dg��S)Nc��g|]
\}}||���Sr<r<)�.0�func�argss   r2�
<listcomp>z6HelpFormatter._Section.format_help.<locals>.<listcomp>�s"��G�G�G�j�d�D�d�d�D�k�G�G�Gr4�z%(heading)s:)rn�%*s%s
�
)rmrlrf�_join_partsr9rhrnrrR�_�dict)r+r*�	item_help�current_indent�heading_textrns      r2�format_helpz"HelpFormatter._Section.format_help�s����{�&���&�&�(�(�(��>�-�D���G�G�D�J�G�G�G�H�H�I��{�&���&�&�(�(�(��
��r��|�8�+�+���0H�!%��!?�� ��0�0�4���3M�3M�3M�M��#�~�r�<�&H�H������4��w�	�4�8�9�9�9r4r6)r$r=r>rar~r<r4r2rUrj�s7������	�	�	�	�	:�	:�	:�	:�	:r4rUc�H�|jj�||f��dSr6)rWr9r&)r+rrrss   r2�	_add_itemzHelpFormatter._add_item�s&����#�*�*�D�$�<�8�8�8�8�8r4c��|���|�||j|��}|�|jg��||_dSr6)rfrUrWr�r~)r+rn�sections   r2�
start_sectionzHelpFormatter.start_section�sL���������-�-��d�&;�W�E�E�����w�*�B�/�/�/� '����r4c�P�|jj|_|���dSr6)rWrmrhr:s r2�end_sectionzHelpFormatter.end_section�s!�� $� 5� <����������r4c�\�|tur |� |�|j|g��dSdSdSr6)rr��_format_text)r+�texts  r2�add_textzHelpFormatter.add_text�s?���x���D�$4��N�N�4�,�t�f�5�5�5�5�5� ��$4�$4r4c�^�|tur#||||f}|�|j|��dSdSr6)rr��
_format_usage)r+�usage�actions�groups�prefixrss      r2�	add_usagezHelpFormatter.add_usages@���� � ��'�6�6�1�D��N�N�4�-�t�4�4�4�4�4�!� r4c�|�|jtur�|j}||��g}|�|��D] }|�||�����!tt
t|����}||jz}t|j	|��|_	|�
|j|g��dSdSr6)�helpr�_format_action_invocation�_iter_indented_subactionsr&rO�map�lenrRrTr��_format_action)r+�action�get_invocation�invocations�	subaction�invocation_length�
action_lengths       r2�add_argumentzHelpFormatter.add_arguments����;�h�&�&�"�;�N�)�>�&�1�1�2�K�!�;�;�F�C�C�
>�
>�	��"�"�>�>�)�#<�#<�=�=�=�=�!$�C��[�$9�$9� :� :��-��0D�D�M�&)�$�*A�*7�'9�'9�D�#�
�N�N�4�.���9�9�9�9�9�'�&r4c�:�|D]}|�|���dSr6)r�)r+r�r�s   r2�
add_argumentszHelpFormatter.add_argumentss2���	&�	&�F����f�%�%�%�%�	&�	&r4c��|j���}|r3|j�d|��}|�d��dz}|S)N�

rw)rVr~r\�sub�strip)r+r�s  r2r~zHelpFormatter.format_helpsQ���!�-�-�/�/���	+��+�/�/���=�=�D��:�:�d�#�#�d�*�D��r4c�@�d�d�|D����S)Nruc�(�g|]}|r|tu�
|��Sr<)r)rq�parts  r2rtz-HelpFormatter._join_parts.<locals>.<listcomp>&s5��:�:�:� ��:�$(��$8�$8��$8�$8�$8r4)r*)r+�part_stringss  r2rxzHelpFormatter._join_parts%s4���w�w�:�:�$0�:�:�:�;�;�	;r4c�
��|�td��}|�|t|j���z}�nO|�|sdt|j���z}�n1|��.dt|j���z}g}g}|D]4}|jr|�|���|�|���5|j}	|	||z|��}
d�d�||
fD����}|j|jz
�t|��t|��z�k�rqd}|	||��}|	||��}
tj||��}tj||
��}d�fd�	}t|��t|��zd�zkrpdt|��t|��zd	zz}|r1||g|z||��}|�|||����n�|r||g|z||��}n�|g}n|dt|��z}||z}|||��}t|��d	kr@g}|�|||����|�|||����|g|z}d
�|��}|�|�d�S)
Nzusage: �r]z%(prog)s� c��g|]}|�|��Sr<r<)rq�ss  r2rtz/HelpFormatter._format_usage.<locals>.<listcomp>Fs��C�C�C�A��C�a�C�C�Cr4z%\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+c���g}g}|�t|��dz
}nt|��dz
}|D]�}|dzt|��z�krA|r?|�|d�|��z��g}t|��dz
}|�|��|t|��dzz
}��|r+|�|d�|��z��|� |dt|��d�|d<|S)Nrdr�r)r�r&r*)�parts�indentr��lines�line�line_lenr��
text_widths       �r2�	get_linesz.HelpFormatter._format_usage.<locals>.get_linesZs����E��D��)�#&�v�;�;��?���#&�v�;�;��?�� %�2�2��#�a�<�#�d�)�)�3�j�@�@�T�@�!�L�L��#�(�(�4�.�.�)@�A�A�A�#%�D�'*�6�{�{�Q��H����D�)�)�)� �C��I�I��M�1����>����V�c�h�h�t�n�n�%<�=�=�=��)�#(��8�C��K�K�L�L�#9��a�� �Lr4g�?rdrwr�r6)
ryrzrL�option_stringsr&�_format_actions_usager*rQrRr�rX�findall�extend)r+r�r�r�r�r]�	optionals�positionalsr��format�action_usage�part_regexp�	opt_usage�	pos_usage�	opt_parts�	pos_partsr�r�r�r�r�s                    @r2r�zHelpFormatter._format_usage*s����>��y�\�\�F����D�d�j�1�1�1�1�E�E��]�7�]���4�:�!6�!6�!6�6�E�E��]���$�*� 5� 5� 5�5�D��I��K�!�
/�
/���(�/��$�$�V�,�,�,�,��&�&�v�.�.�.�.��/�F�!�6�)�k�"9�6�B�B�L��H�H�C�C�$��)=�C�C�C�D�D�E���t�';�;�J��6�{�{�S��Z�Z�'�*�4�4���
#�F�9�f�5�5�	�"�F�;��7�7�	��K��Y�?�?�	��K��Y�?�?�	�
!�!�!�!�!�!�*�v�;�;��T���*�d�Z�.?�?�?� �C��K�K�#�d�)�)�$;�a�$?�@�F� �'� )�	�4�&�9�*<�f�f� M� M�����Y�Y�y�&�%A�%A�B�B�B�B�"�'� )�	�4�&�9�*<�f�f� M� M���!%����!�3�v�;�;�.�F�%�	�1�E�%�I�e�V�4�4�E��5�z�z�A�~�~� "�����Y�Y�y�&�%A�%A�B�B�B����Y�Y�y�&�%A�%A�B�B�B�!�F�U�N�E��	�	�%�(�(��$�V�U�U�U�+�+r4c�,�t��}i}|D�]G}|jstd|�����	|�|jd��}t	|j��}||z}|||�|jkr�d}	|jD]*}
|�|
��|
jtur|	dz
}	�+||	z
}|s��|js5||vr||xxdz
cc<nd||<||vr||xxdz
cc<n@d||<n:|dkr4||vr||xxdz
cc<nd||<||vr||xxd	z
cc<nd	||<t|dz|��D]}d
||<���8#t$rY��EwxYwg}
t|��D�]\}}
|
jtury|
�d��|�|��d
kr|�
|���X|�|dz��d
kr|�
|dz����|
jsg|�|
��}|�|
|��}|
|vr"|ddkr|ddkr
|dd�}|
�|����|
jd}|
jdkr|
���}n2|�|
��}|�|
|��}|�d|��}|
js	|
|vrd
|z}|
�|�����t)|d���D]}||g|
||�<�d�d�|
D����}d}d}t-jd|zd|��}t-jd|zd|��}t-j|�d|��d|��}|���}|S)Nzempty group rrdz [�[�]z (r r"�|���r��[%s]T)�reversec��g|]}|�|��Sr6r<)rq�items  r2rtz7HelpFormatter._format_actions_usage.<locals>.<listcomp>�s��D�D�D�$�4�3C��3C�3C�3Cr4z[\[(]z[\])]z(%s) z\1� (%s)z *ru)�set�_group_actions�
ValueError�indexr��addr�r�required�range�	enumerater&�get�popr��#_get_default_metavar_for_positional�_format_args�nargs�format_usage�!_get_default_metavar_for_optional�sortedr*rXr�r�)r+r�r��
group_actions�inserts�group�start�group_action_count�end�suppressed_actions_countr��exposed_actions_count�ir��defaultr��
option_string�args_stringr��open�closes                     r2r�z#HelpFormatter._format_actions_usage�s}�����
����*	)�*	)�E��'�
9� �!7��!7�!7�8�8�8�&
)��
�
�e�&:�1�&=�>�>��&)��)=�%>�%>�"��0�0���5��9�%��)=�=�=�/0�,�"'�"6�:�:��%�)�)�&�1�1�1�!�;�(�2�2�4��9�4��,>�AY�,Y�)�0�!� � �>�/� �G�+�+�#�E�N�N�N�d�2�N�N�N�N�-0�G�E�N��'�>�>�#�C�L�L�L�C�/�L�L�L�L�+.�G�C�L�L�.��2�2� �G�+�+�#�E�N�N�N�d�2�N�N�N�N�-0�G�E�N��'�>�>�#�C�L�L�L�C�/�L�L�L�L�+.�G�C�L�"�5�1�9�c�2�2�)�)��%(���
�
���I�
�
�
���
����N��"�7�+�+�-	#�-	#�I�A�v��{�h�&�&����T�"�"�"��;�;�q�>�>�S�(�(��K�K��N�N�N�N��[�[��Q��'�'�3�.�.��K�K��A��&�&�&���*�!
#��B�B�6�J�J���(�(���9�9���]�*�*��A�w�#�~�~�$�r�(�c�/�/�#�A�b�D�z�����T�"�"�"�"�!'� 5�a� 8�
��<�1�$�$�!�.�.�0�0�D�D�
#�D�D�V�L�L�G�"&�"3�"3�F�G�"D�"D�K�&3�m�m�[�[�A�D���)�6��+F�+F�!�D�=�D����T�"�"�"�"����.�.�.�	&�	&�A�!�!�*��E�!�A�#�J�J��x�x�D�D�%�D�D�D�E�E�������w�x�$���t�4�4���w�x�%�'���5�5���w�D�D�D�%�%�0�#�t�<�<���z�z�|�|���s� E�
E�Ec��d|vr|t|j���z}t|j|jz
d��}d|jz}|�|||��dzS)Nz%(prog)r��r�r�)rzrLrOrQrR�
_fill_text)r+r�r�r�s    r2r�zHelpFormatter._format_text�se�������$�D�J�/�/�/�/�D����t�';�;�R�@�@�
��t�+�+�����t�Z��8�8�6�A�Ar4c�~�t|jdz|j��}t|j|z
d��}||jz
dz
}|�|��}|js|jd|f}d|z}n7t|��|kr|jd||f}d|z}d}n|jd|f}d|z}|}|g}|jr�|j�	��rw|�
|��}	|	r_|�|	|��}
|�d|d|
dfz��|
dd�D]}|�d|d|fz���n*|�
d��s|�d��|�|��D]*}|�|�|�����+|�|��S)	NrEr�rurvz	%*s%-*s  rrdrw)rNrTrPrOrQrRr�r�r�r��_expand_help�_split_linesr&�endswithr�r�rx)
r+r��
help_position�
help_width�action_width�
action_header�tup�indent_firstr��	help_text�
help_linesr�r�s
             r2r�zHelpFormatter._format_actions���D�3�a�7� �3�5�5�
����}�4�b�9�9�
�$�t�';�;�a�?���6�6�v�>�>�
��{�	)��&��M�9�C�%��O�M�M���
�
�<�
/�
/��&��L�-�G�C�'�#�-�M��L�L��&��M�9�C�%��O�M�(�L�����;�
	�6�;�,�,�.�.�
	��)�)�&�1�1�I��
H�!�.�.�y�*�E�E�
����Y�,��J�q�M�)J�J�K�K�K�&�q�r�r�N�H�H�D��L�L��m�R��-F�!F�G�G�G�G���'�'��-�-�	��L�L������7�7��?�?�	9�	9�I��L�L��,�,�Y�7�7�8�8�8�8�����&�&�&r4c��|js8|�|��}|�||��d��\}|Sg}|jdkr|�|j��nO|�|��}|�||��}|jD]}|�|�d|�����d�|��S)Nrdrr�r!)	r�r��_metavar_formatterr�r�r�r�r&r*)r+r�r��metavarr�r�r�s       r2r�z'HelpFormatter._format_action_invocation4s����$�	$��>�>�v�F�F�G�?�t�.�.�v�w�?�?��B�B�H�G��N��E��|�q� � ����V�2�3�3�3�3�
�@�@��H�H��"�/�/���@�@��%+�%:�I�I�M��L�L�M�M�M�;�;�!G�H�H�H�H��9�9�U�#�#�#r4c���|j�|j�n3|j�*d�|jD��}dd�|��z�n|��fd�}|S)Nc�,�g|]}t|����Sr<��str)rq�choices  r2rtz4HelpFormatter._metavar_formatter.<locals>.<listcomp>Ps��D�D�D�6�3�v�;�;�D�D�Dr4z{%s}�,c�>��t�t��r�S�f|zSr6)�
isinstance�tuple)�
tuple_size�results �r2r�z0HelpFormatter._metavar_formatter.<locals>.formatUs'����&�%�(�(�
/��
��z�J�.�.r4)r��choicesr*)r+r��default_metavar�choice_strsr�rs     @r2r�z HelpFormatter._metavar_formatterLsn����>�%��^�F�F�
�^�
'�D�D�V�^�D�D�D�K��c�h�h�{�3�3�3�F�F�$�F�	/�	/�	/�	/�	/�
�
r4c��|�||��}|j�d|d��z}�n"|jtkrd|d��z}�n|jtkr*|d��}t	|��dkrd|z}n�d|z}n�|jt
krd|d��z}n�|jtkrd}n�|jtkrd	|d��z}nw|jtkrd
}nd	d�t|j��D��}n#t$rtd��d�wxYwd
�|��||j��z}|S)N�%srdr�rEz
[%s [%s ...]]z[%s ...]z%s [%s ...]rz%s ...ruc��g|]}d��S)rr<)rqrys  r2rtz.HelpFormatter._format_args.<locals>.<listcomp>rs��=�=�=�A�4�=�=�=r4zinvalid nargs valuer�)
r�r�rrr�rrrrr��	TypeErrorr�r*)r+r�r	�get_metavarrr��formatss       r2r�zHelpFormatter._format_args\s}���-�-�f�o�F�F���<���K�K��N�N�*�F�F�
�\�X�
%�
%��k�k�!�n�n�,�F�F�
�\�\�
)�
)�!�k�!�n�n�G��7�|�|�q� � �(�7�2���#�g�-���
�\�[�
(�
(�"�[�[��^�^�3�F�F�
�\�Y�
&�
&��F�F�
�\�V�
#�
#����A���.�F�F�
�\�X�
%�
%��F�F�
B�=�=��v�|�)<�)<�=�=�=�����
B�
B�
B� �!6�7�7�T�A�
B�����X�X�g�&�&���V�\�)B�)B�B�F��
s�-D�D'c��tt|��|j���}t|��D]}||tur||=�t|��D](}t||d��r||j||<�)|�d���*d�d�|dD����}||d<|�	|��|zS)Nr�r$rr!c�,�g|]}t|����Sr<r�)rq�cs  r2rtz.HelpFormatter._expand_help.<locals>.<listcomp>�s��$G�$G�$G��S��V�V�$G�$G�$Gr4)
rz�varsrLr7r�hasattrr$r�r*�_get_help_string)r+r��paramsr0�choices_strs     r2r�zHelpFormatter._expand_helpxs����d�6�l�l���4�4�4����L�L�	!�	!�D��d�|�x�'�'��4�L����L�L�	5�	5�D��v�d�|�Z�0�0�
5�%�d�|�4��t����:�:�i� � �,��)�)�$G�$G�V�I�5F�$G�$G�$G�H�H�K� +�F�9���$�$�V�,�,�v�5�5r4c#�K�	|j}|���|��Ed{V��|���dS#t$rYdSwxYwr6)�_get_subactionsrfrh�AttributeError)r+r��get_subactionss   r2r�z'HelpFormatter._iter_indented_subactions�sw����	�#�3�N�
�L�L�N�N�N�%�~�'�'�'�'�'�'�'�'�'��L�L�N�N�N�N�N���	�	�	��D�D�	���s�A�
A�Ac��|j�d|�����}ddl}|�||��S)Nr�r)r[r�r��textwrap�wrap)r+r�r`rs    r2r�zHelpFormatter._split_lines�sE���'�+�+�C��6�6�<�<�>�>��	�����}�}�T�5�)�)�)r4c��|j�d|�����}ddl}|�||||���S)Nr�r)�initial_indent�subsequent_indent)r[r�r�r�fill)r+r�r`r�rs     r2r�zHelpFormatter._fill_text�sT���'�+�+�C��6�6�<�<�>�>�������}�}�T�5�,2�/5��7�7�	7r4c��|jSr6)r��r+r�s  r2rzHelpFormatter._get_help_string��
���{�r4c�4�|j���Sr6)�dest�upperr%s  r2r�z/HelpFormatter._get_default_metavar_for_optional�s���{� � �"�"�"r4c��|jSr6)r(r%s  r2r�z1HelpFormatter._get_default_metavar_for_positional�r&r4)rErFNr6) r$r=r>r?rarfrh�objectrUr�r�r�r�r�r�r�r~rxr�r�r�r�r�r�r�r�r�r�r�rr�r�r<r4r2rr�s���������#$�#%��	;�;�;�;�>������
:�:�:�:�:�6�:�:�:�@9�9�9�(�(�(����6�6�6�5�5�5�5�
:�:�:�$&�&�&����;�;�;�
^,�^,�^,�@q�q�q�fB�B�B�.'�.'�.'�`$�$�$�0��� ���86�6�6����*�*�*�7�7�7����#�#�#�����r4rc��eZdZdZd�ZdS)r	z�Help message formatter which retains any formatting in descriptions.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c�n��d��fd�|�d���D����S)Nruc3�"�K�|]	}�|zV��
dSr6r<)rqr�r�s  �r2�	<genexpr>z9RawDescriptionHelpFormatter._fill_text.<locals>.<genexpr>�s'�����P�P��v��}�P�P�P�P�P�Pr4T)�keepends)r*�
splitlines)r+r�r`r�s   `r2r�z&RawDescriptionHelpFormatter._fill_text�s8����w�w�P�P�P�P����$��1O�1O�P�P�P�P�P�Pr4N)r$r=r>r?r�r<r4r2r	r	�s2��������Q�Q�Q�Q�Qr4r	c��eZdZdZd�ZdS)r
z�Help message formatter which retains formatting of all help text.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c�*�|���Sr6)r1)r+r�r`s   r2r�z!RawTextHelpFormatter._split_lines�s����� � � r4N)r$r=r>r?r�r<r4r2r
r
�s-��������!�!�!�!�!r4r
c��eZdZdZd�ZdS)rz�Help message formatter which adds default values to argument help.

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c��|j}|�d}d|vr>|jtur0ttg}|js	|j|vr|td��z
}|S)a6
        Add the default value to the option help message.

        ArgumentDefaultsHelpFormatter and BooleanOptionalAction when it isn't
        already present. This code will do that, detecting cornercases to
        prevent duplicates or cases where it wouldn't make sense to the end
        user.
        Nruz
%(default)z (default: %(default)s))r�r�rrrr�r�ry)r+r�r��defaulting_nargss    r2rz.ArgumentDefaultsHelpFormatter._get_help_string�sh���{���<��D��t�#�#��~�X�-�-�$,�l�#;� ��(�9�F�L�<L�,L�,L��A�7�8�8�8�D��r4N)r$r=r>r?rr<r4r2rr�s-������������r4rc��eZdZdZd�Zd�ZdS)raHelp message formatter which uses the argument 'type' as the default
    metavar value (instead of the argument 'dest')

    Only the name of this class is considered a public API. All the methods
    provided by the class are considered an implementation detail.
    c��|jjSr6�r#r$r%s  r2r�z:MetavarTypeHelpFormatter._get_default_metavar_for_optional��
���{�#�#r4c��|jjSr6r9r%s  r2r�z<MetavarTypeHelpFormatter._get_default_metavar_for_positional�r:r4N)r$r=r>r?r�r�r<r4r2rr�s<��������$�$�$�$�$�$�$�$r4rc��|�dS|jrd�|j��S|jdtfvr|jS|jdtfvr|jS|jr dd�|j��zdzSdS)N�/�{r�})r�r*r�rr(r)�arguments r2�_get_action_namerA�s������t�	�	 �	��x�x��/�0�0�0�	�	�$��!1�	1�	1����	��t�X�.�	.�	.��}��	�	���S�X�X�h�.�/�/�/�#�5�5��tr4c��eZdZdZd�Zd�ZdS)rz�An error from creating or using an argument (optional or positional).

    The string value of this exception is the message, augmented with
    information about the argument that caused it.
    c�<�t|��|_||_dSr6)rA�
argument_name�message)r+r@rEs   r2razArgumentError.__init__s��-�h�7�7�������r4c�p�|j�d}ntd��}|t|j|j���zS)Nz%(message)sz'argument %(argument_name)s: %(message)s)rErD)rDryrzrE)r+r�s  r2�__str__zArgumentError.__str__sH����%�"�F�F��@�A�A�F���T�\�+/�+=�?�?�?�?�	?r4N)r$r=r>r?rarGr<r4r2rr�s<�����������?�?�?�?�?r4rc��eZdZdZdS)rz@An error from trying to convert a command line string to a type.N)r$r=r>r?r<r4r2rrs������J�J��Dr4rc�>�eZdZdZ								dd�Zd�Zd�Zd	d�ZdS)
r
a\	Information about how to convert command line strings to Python objects.

    Action objects are used by an ArgumentParser to represent the information
    needed to parse a single argument from one or more strings from the
    command line. The keyword arguments to the Action constructor are also
    all attributes of Action instances.

    Keyword Arguments:

        - option_strings -- A list of command-line option strings which
            should be associated with this action.

        - dest -- The name of the attribute to hold the created object(s)

        - nargs -- The number of command-line arguments that should be
            consumed. By default, one argument will be consumed and a single
            value will be produced.  Other values include:
                - N (an integer) consumes N arguments (and produces a list)
                - '?' consumes zero or one arguments
                - '*' consumes zero or more arguments (and produces a list)
                - '+' consumes one or more arguments (and produces a list)
            Note that the difference between the default and nargs=1 is that
            with the default, a single value will be produced, while with
            nargs=1, a list containing a single value will be produced.

        - const -- The value to be produced if the option is specified and the
            option uses an action that takes no values.

        - default -- The value to be produced if the option is not specified.

        - type -- A callable that accepts a single string argument, and
            returns the converted value.  The standard Python types str, int,
            float, and complex are useful examples of such callables.  If None,
            str is used.

        - choices -- A container of values that should be allowed. If not None,
            after a command-line argument has been converted to the appropriate
            type, an exception will be raised if it is not a member of this
            collection.

        - required -- True if the action must always be specified at the
            command line. This is only meaningful for optional command-line
            arguments.

        - help -- The help string describing the argument.

        - metavar -- The name to be used for the option's argument with the
            help string. If None, the 'dest' value will be used as the name.
    NFc��||_||_||_||_||_||_||_||_|	|_|
|_	dSr6�
r�r(r��constr�r#rr�r�r�)r+r�r(r�rLr�r#rr�r�r�s           r2razAction.__init__LsO��-�����	���
���
������	���� ��
���	�����r4c�(��gd�}�fd�|D��S)NrKc�4��g|]}|t�|��f��Sr<��getattr�rqr0r+s  �r2rtz&Action._get_kwargs.<locals>.<listcomp>o�(���>�>�>���w�t�T�*�*�+�>�>�>r4r<�r+�namess` r2r(zAction._get_kwargsbs0���
�
�
��?�>�>�>��>�>�>�>r4c��|jdSrA�r�r:s r2r�zAction.format_usageqs���"�1�%�%r4c�:�ttd�����)Nz.__call__() not defined)�NotImplementedErrorry�r+�parser�	namespace�valuesr�s     r2�__call__zAction.__call__ts��!�!�$=�">�">�?�?�?r4�NNNNNFNNr6)r$r=r>r?rar(r�r]r<r4r2r
r
s�������0�0�j������������,
?�
?�
?�&�&�&�@�@�@�@�@�@r4r
c�:��eZdZ						d�fd�	Zdd�Zd�Z�xZS)rNFc	���g}	|D]N}
|	�|
��|
�d��r"d|
dd�z}
|	�|
���Ot���|	|d||||||��	�	dS)N�--�--no-rEr)	r�r(r�r�r#rr�r�r�)r&�
startswith�superra)r+r�r(r�r#rr�r�r��_option_stringsr��	__class__s           �r2razBooleanOptionalAction.__init__ys������+�	6�	6�M��"�"�=�1�1�1��'�'��-�-�
6� '�-����*;� ;�
��&�&�}�5�5�5��
�����*���������	�		�		�		�		�		r4c�p�||jvr,t||j|�d����dSdS)Nrb)r��setattrr(rcrYs     r2r]zBooleanOptionalAction.__call__�sC���D�/�/�/��I�t�y�m�.F�.F�w�.O�.O�*O�P�P�P�P�P�0�/r4c�6�d�|j��S)Nz | )r*r�r:s r2r�z"BooleanOptionalAction.format_usage�s���z�z�$�-�.�.�.r4)NNNFNNr6)r$r=r>rar]r��
__classcell__�rfs@r2rrxsx�������������������<Q�Q�Q�Q�/�/�/�/�/�/�/r4rc�8��eZdZ								d�fd�	Zdd�Z�xZS)�_StoreActionNFc����|dkrtd���|�"|tkrtdtz���tt|���|||||||||	|
��
�
dS)Nrz�nargs for store actions must be != 0; if you have nothing to store, actions such as store true or store const may be more appropriate� nargs must be %r to supply constrK)r�rrdrmra�r+r�r(r�rLr�r#rr�r�r�rfs           �r2raz_StoreAction.__init__�s�����A�:�:��K�L�L�
L����(�!2�!2��?�(�J�K�K�K�
�l�D�!�!�*�*�)����������	+�
	�
	�
	�
	�
	r4c�2�t||j|��dSr6)rhr(rYs     r2r]z_StoreAction.__call__�s���	�4�9�f�-�-�-�-�-r4r^r6�r$r=r>rar]rjrks@r2rmrm�sk�������
��������������:.�.�.�.�.�.�.�.r4rmc�2��eZdZ					d�fd�	Zdd�Z�xZS)�_StoreConstActionNFc	�f��tt|���||d||||���dS)Nr)r�r(r�rLr�r�r�)rdrtra�	r+r�r(rLr�r�r�r�rfs	        �r2raz_StoreConstAction.__init__�sL���	���&�&�/�/�)�������	0�	�	�	�	�	r4c�<�t||j|j��dSr6)rhr(rLrYs     r2r]z_StoreConstAction.__call__�s���	�4�9�d�j�1�1�1�1�1r4�NNFNNr6rrrks@r2rtrt�sb�������
�����������"2�2�2�2�2�2�2�2r4rtc�&��eZdZ			d�fd�	Z�xZS)�_StoreTrueActionFNc�d��tt|���||d|||���dS)NT�r�r(rLr�r�r�)rdrzra�r+r�r(r�r�r�rfs      �r2raz_StoreTrueAction.__init__�sI���	���%�%�.�.�)������
	/�	�	�	�	�	r4)FFN�r$r=r>rarjrks@r2rzrz�sH�������
������������r4rzc�&��eZdZ			d�fd�	Z�xZS)�_StoreFalseActionTFNc�d��tt|���||d|||���dS)NFr|)rdr�rar}s      �r2raz_StoreFalseAction.__init__�sI���	���&�&�/�/�)������
	0�	�	�	�	�	r4)TFNr~rks@r2r�r��sH�������
������������r4r�c�8��eZdZ								d�fd�	Zdd�Z�xZS)�
_AppendActionNFc����|dkrtd���|�"|tkrtdtz���tt|���|||||||||	|
��
�
dS)Nrz�nargs for append actions must be != 0; if arg strings are not supplying the value to append, the append const action may be more appropriaterorK)r�rrdr�rarps           �r2raz_AppendAction.__init__�s�����A�:�:��O�P�P�
P����(�!2�!2��?�(�J�K�K�K�
�m�T�"�"�+�+�)����������	,�
	�
	�
	�
	�
	r4c��t||jd��}t|��}|�|��t	||j|��dSr6)rPr(rCr&rh�r+rZr[r\r�r9s      r2r]z_AppendAction.__call__�N���	�4�9�d�3�3���E�"�"��
���V�����	�4�9�e�,�,�,�,�,r4r^r6rrrks@r2r�r��sk�������
��������������:-�-�-�-�-�-�-�-r4r�c�2��eZdZ					d�fd�	Zdd�Z�xZS)�_AppendConstActionNFc
�h��tt|���||d|||||���dS)Nr)r�r(r�rLr�r�r�r�)rdr�rarvs	        �r2raz_AppendConstAction.__init__#sO���	� �$�'�'�0�0�)��������	1�	�	�	�	�	r4c��t||jd��}t|��}|�|j��t||j|��dSr6)rPr(rCr&rLrhr�s      r2r]z_AppendConstAction.__call__5sP���	�4�9�d�3�3���E�"�"��
���T�Z� � � ��	�4�9�e�,�,�,�,�,r4rxr6rrrks@r2r�r�!sb�������
�����������$-�-�-�-�-�-�-�-r4r�c�.��eZdZ			d�fd�	Zdd�Z�xZS)�_CountActionNFc�d��tt|���||d|||���dS)Nr)r�r(r�r�r�r�)rdr�rar}s      �r2raz_CountAction.__init__>sH���	�l�D�!�!�*�*�)������
	+�	�	�	�	�	r4c�l�t||jd��}|�d}t||j|dz��dS�Nrrd)rPr(rh)r+rZr[r\r��counts      r2r]z_CountAction.__call__Ls=���	�4�9�d�3�3���=��E��	�4�9�e�a�i�0�0�0�0�0r4)NFNr6rrrks@r2r�r�<s\�������
���������1�1�1�1�1�1�1�1r4r�c�.��eZdZeedf�fd�	Zdd�Z�xZS)�_HelpActionNc�b��tt|���|||d|���dS)Nr�r�r(r�r�r�)rdr�ra)r+r�r(r�r�rfs     �r2raz_HelpAction.__init__UsE���
	�k�4� � �)�)�)�����	*�	�	�	�	�	r4c�V�|���|���dSr6)�
print_help�exitrYs     r2r]z_HelpAction.__call__as%�����������
�
�
�
�
r4r6�r$r=r>rrar]rjrks@r2r�r�Ss\��������!��	
�
�
�
�
�
��������r4r�c�0��eZdZdeedf�fd�	Zdd�Z�xZS)�_VersionActionNc���|�td��}tt|���|||d|���||_dS)Nz&show program's version number and exitrr�)ryrdr�ra�version)r+r�r�r(r�r�rfs      �r2raz_VersionAction.__init__hs[����<��=�>�>�D�
�n�d�#�#�,�,�)�����	-�	�	�	�����r4c��|j}|�|j}|���}|�|��|�|���t
j��|���dSr6)r��_get_formatterr��_print_messager~�_sys�stdoutr�)r+rZr[r\r�r�rls       r2r]z_VersionAction.__call__xso���,���?��n�G��)�)�+�+�	����7�#�#�#����i�3�3�5�5�t�{�C�C�C����
�
�
�
�
r4r6r�rks@r2r�r�fs_���������!�������� �������r4r�c�X��eZdZGd�de��Zedddf�fd�	Zd�Zd�Zd	d�Z	�xZ
S)
�_SubParsersActionc���eZdZ�fd�Z�xZS)�&_SubParsersAction._ChoicesPseudoActionc���|x}}|r|dd�|��zz
}ttj|��}|�g|||���dS)Nr�r!)r�r(r�r�)r*rdr��_ChoicesPseudoActionra)r+r0�aliasesr�r�r(�suprfs       �r2raz/_SubParsersAction._ChoicesPseudoAction.__init__�sq���!�!�G�d��
8��7�T�Y�Y�w�%7�%7�7�7���)�>��E�E�C��L�L���D�!(�
�
*�
*�
*�
*�
*r4r~rks@r2r�r��s8�������	*�	*�	*�	*�	*�	*�	*�	*�	*r4r�FNc	���||_||_i|_g|_t	t
|���||t|j|||���dS)N)r�r(r�rr�r�r�)�_prog_prefix�
_parser_class�_name_parser_map�_choices_actionsrdr�rar)	r+r�r]�parser_classr(r�r�r�rfs	        �r2raz_SubParsersAction.__init__�so���!���)��� "��� "���
���&�&�/�/�)����)����	0�	�	�	�	�	r4c��|�d���|j�d|��|d<|�dd��}||jvr t	|td��|z���|D]+}||jvr t	|td��|z����,d|vrF|�d��}|�|||��}|j�|��|j	di|��}||j|<|D]}||j|<�
|S)Nr]r�r�r<zconflicting subparser: %szconflicting subparser alias: %sr�)
r�r�r�r�rryr�r�r&r�)r+r0�kwargsr��aliasr��
choice_actionrZs        r2�
add_parserz_SubParsersAction.add_parser�sQ���:�:�f���%�(,�(9�(9�(9�4�4�@�F�6�N��*�*�Y��+�+���4�(�(�(���a�(C�&D�&D�t�&K�L�L�L��	H�	H�E���-�-�-�#��!�=�>�>��F�H�H�H�.�
�V����:�:�f�%�%�D� �5�5�d�G�T�J�J�M��!�(�(��7�7�7�$��#�-�-�f�-�-��&,���d�#��	2�	2�E�+1�D�!�%�(�(��
r4c��|jSr6)r�r:s r2rz!_SubParsersAction._get_subactions�s���$�$r4c�t�|d}|dd�}|jturt||j|��	|j|}nM#t$r@|d�|j��d�}t
d��|z}t||���wxYw|�|d��\}	}t|	���
��D]\}
}t||
|���|rRt|���tg��t|t���|��dSdS)Nrrdr!)�parser_namerz5unknown parser %(parser_name)r (choices: %(choices)s))r(rrhr��KeyErrorr*ryr�parse_known_argsrr9�
setdefault�_UNRECOGNIZED_ARGS_ATTRrPr�)r+rZr[r\r�r�r-rs�msg�subnamespace�keyr1s            r2r]z_SubParsersAction.__call__�s_���Q�i���Q�R�R�j���9�H�$�$��I�t�y�+�6�6�6�	+��*�;�7�F�F���	+�	+�	+�#.�#�y�y��)>�?�?�A�A�D��K�L�L�t�S�C���c�*�*�*�		+����%+�$;�$;�K��$N�$N�!��k��|�,�,�2�2�4�4�	+�	+�J�C���I�s�E�*�*�*�*��	L���O�O�&�&�'>��C�C�C��I�6�7�7�>�>�{�K�K�K�K�K�	L�	Ls�
A�A
Br6)r$r=r>r
r�rrar�rr]rjrks@r2r�r��s��������*�*�*�*�*�v�*�*�*�����������.���<%�%�%�L�L�L�L�L�L�L�Lr4r�c��eZdZdd�ZdS)�
_ExtendActionNc��t||jd��}t|��}|�|��t	||j|��dSr6)rPr(rCr�rhr�s      r2r]z_ExtendAction.__call__�r�r4r6)r$r=r>r]r<r4r2r�r��s(������-�-�-�-�-�-r4r�c�&�eZdZdZdd�Zd�Zd�ZdS)	ra�Factory for creating file object types

    Instances of FileType are typically passed as type= arguments to the
    ArgumentParser add_argument() method.

    Keyword Arguments:
        - mode -- A string indicating how the file is to be opened. Accepts the
            same values as the builtin open() function.
        - bufsize -- The file's desired buffer size. Accepts the same values as
            the builtin open() function.
        - encoding -- The file's encoding. Accepts the same values as the
            builtin open() function.
        - errors -- A string indicating how encoding and decoding errors are to
            be handled. Accepts the same value as the builtin open() function.
    �rr�Nc�>�||_||_||_||_dSr6)�_mode�_bufsize�	_encoding�_errors)r+�mode�bufsize�encoding�errorss     r2razFileType.__init__s"����
���
�!�������r4c���|dkr�d�jvr&d�jvrtjjntjSt	�fd�dD����r&d�jvrtjjntjSt
d���jz}t|���	t|�j�j	�j
�j��S#t$r+}||d�}t
d��}t||z���d}~wwxYw)	N�-r��bc3�*�K�|]
}|�jvV��dSr6)r�)rqrr+s  �r2r/z$FileType.__call__.<locals>.<genexpr>
s)�����4�4��Q�$�*�_�4�4�4�4�4�4r4�waxzargument "-" with mode %r)�filename�errorz$can't open '%(filename)s': %(error)s)r�r��stdin�buffer�anyr�ryr�r�r�r�r��OSErrorr)r+�stringr��ersrEs`     r2r]zFileType.__call__s����S�=�=��d�j� � �,/�4�:�,=�,=�t�z�(�(�4�:�M��4�4�4�4�e�4�4�4�4�4�
&�-0�D�J�->�->�t�{�)�)�D�K�O��3�4�4�t�z�A�� ��o�o�%�	4����
�D�M�4�>���&�&�
&���	4�	4�	4� &��3�3�D��>�?�?�G�#�G�d�N�3�3�3�����	4���s�&C�
C;�&C6�6C;c���|j|jf}d|jfd|jfg}d�d�|D��d�|D��z��}t|��j�d|�d�S)Nr�r�r!c�8�g|]}|dk�t|����S)r�)r')rqr/s  r2rtz%FileType.__repr__.<locals>.<listcomp>s#��E�E�E�C�3�"�9�9�d�3�i�i�9�9�9r4c�&�g|]\}}|�|�d|����S)Nrr<)rq�kwr/s   r2rtz%FileType.__repr__.<locals>.<listcomp> s3��2�2�2�g�b�#�!$��*,���S�S�1�!0��r4r r")r�r�r�r�r*r#r$)r+rsr��args_strs    r2r3zFileType.__repr__s����z�4�=�(���t�~�.��4�<�0H�I���9�9�E�E�4�E�E�E�2�2��2�2�2�2�3�3�� ��:�:�.�.�.����9�9r4)r�r�NN)r$r=r>r?rar]r3r<r4r2rr�sP�������� ����4�4�4�(:�:�:�:�:r4rc�$�eZdZdZd�Zd�Zd�ZdS)rz�Simple object for storing attributes.

    Implements equality by attribute names and values, and provides a simple
    string representation.
    c�>�|D]}t||||���dSr6)rh)r+r�r0s   r2razNamespace.__init__/s4���	.�	.�D��D�$��t��-�-�-�-�	.�	.r4c�z�t|t��stSt|��t|��kSr6)rr�NotImplementedr)r+�others  r2�__eq__zNamespace.__eq__3s1���%��+�+�	"�!�!��D�z�z�T�%�[�[�(�(r4c��||jvSr6)r8)r+r�s  r2�__contains__zNamespace.__contains__8s���d�m�#�#r4N)r$r=r>r?rar�r�r<r4r2rr(sK��������.�.�.�)�)�)�
$�$�$�$�$r4rc���eZdZ�fd�Zd�Zdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zdd�Zd�Zd�Zd�Zd�Z�xZS)�_ActionsContainerc����tt|�����||_||_||_||_i|_|�ddt��|�ddt��|�ddt��|�ddt��|�ddt��|�ddt��|�ddt��|�ddt��|�dd	t ��|�dd
t"��|�ddt$��|�ddt&��|���g|_i|_g|_g|_i|_t5jd
��|_g|_dS)Nr��store�store_const�
store_true�store_falser&�append_constr�r�r��parsersr�z^-\d+$|^-\d*\.\d+$)rdr�ra�description�argument_default�prefix_chars�conflict_handler�_registries�registerrmrtrzr�r�r�r�r�r�r�r��_get_handler�_actions�_option_string_actions�_action_groups�_mutually_exclusive_groups�	_defaultsrXrY�_negative_number_matcher�_has_negative_number_optionals)r+r�r�r�r�rfs     �r2raz_ActionsContainer.__init__>s����
	���&�&�/�/�1�1�1�&��� 0���(��� 0������	
�
�
�h��l�3�3�3��
�
�h���6�6�6��
�
�h�
�/@�A�A�A��
�
�h��.>�?�?�?��
�
�h�
�/@�A�A�A��
�
�h��-�8�8�8��
�
�h��0B�C�C�C��
�
�h���6�6�6��
�
�h���4�4�4��
�
�h�	�>�:�:�:��
�
�h�	�+<�=�=�=��
�
�h��-�8�8�8�	
��������
�&(��#�!���*,��'����),��4I�(J�(J��%�/1��+�+�+r4c�F�|j�|i��}|||<dSr6)r�r�)r+�
registry_namer1r+�registrys     r2r�z_ActionsContainer.registerss'���#�.�.�}�b�A�A�� �����r4Nc�D�|j|�||��Sr6)r�r�)r+rr1r�s    r2�
_registry_getz_ActionsContainer._registry_getws ����
�.�2�2�5�'�B�B�Br4c��|j�|��|jD]}|j|vr||j|_�dSr6)r��updater�r(r�)r+r�r�s   r2�set_defaultsz_ActionsContainer.set_defaults}sQ������f�%�%�%��m�	5�	5�F��{�f�$�$�!'���!4����	5�	5r4c��|jD]}|j|kr|j�	|jcS�|j�|d��Sr6)r�r(r�r�r�)r+r(r�s   r2�get_defaultz_ActionsContainer.get_default�sN���m�	&�	&�F��{�d�"�"�v�~�'A��~�%�%�%���~�!�!�$��-�-�-r4c�8�|j}|r#t|��dkr3|dd|vr#|rd|vrtd���|j|i|��}n
|j|i|��}d|vr3|d}||jvr|j||d<n|j�
|j|d<|�|��}t|��std|�d����|di|��}|�	d	|j
|j
��}t|��st|�d
����|turt|�d����t|d��rG	|�
���|d��n#t$rtd
���wxYw|�|��S)z�
        add_argument(dest, ..., name=value, ...)
        add_argument(option_string, option_string, ..., name=value, ...)
        rdrr(z+dest supplied twice for positional argumentr�Nzunknown action "�"r#z is not callablez: is a FileType class object, instance of it must be passedr�z,length of metavar tuple does not match nargsr<)r�r�r��_get_positional_kwargs�_get_optional_kwargsr�r��_pop_action_class�callablerr#rrr�r�r�_add_action)r+rsr��charsr(�action_classr��	type_funcs        r2r�z_ActionsContainer.add_argument�s���!���	@�s�4�y�y�A�~�~�$�q�'�!�*�E�*A�*A��
P��&�(�(� �!N�O�O�O�0�T�0�$�A�&�A�A�F�F�/�T�.��?��?�?�F��F�"�"��&�>�D��t�~�%�%�$(�N�4�$8��y�!�!��&�2�$(�$9��y�!��-�-�f�5�5����%�%�	F��*�l�l�l�D�E�E�E���'�'��'�'���&�&�v�v�{�F�K�H�H�	��	�"�"�	B��Y�Y�Y�@�A�A�A��� � ��2;�)�)�>�?�?�
?��4�)�*�*�	Q�
Q��#�#�%�%�2�2�6�4�@�@�@�@���
Q�
Q�
Q� �!O�P�P�P�
Q��������'�'�'s�(E*�*Fc�Z�t|g|�Ri|��}|j�|��|Sr6)�_ArgumentGroupr�r&)r+rsr�r�s    r2�add_argument_groupz$_ActionsContainer.add_argument_group�s;���t�5�d�5�5�5�f�5�5����"�"�5�)�)�)��r4c�T�t|fi|��}|j�|��|Sr6)�_MutuallyExclusiveGroupr�r&)r+r�r�s   r2�add_mutually_exclusive_groupz._ActionsContainer.add_mutually_exclusive_group�s3��'��7�7��7�7���'�.�.�u�5�5�5��r4c�$�|�|��|j�|��||_|jD]}||j|<�
|jD]=}|j�|��r!|js|j�d���>|S)NT)	�_check_conflictr�r&�	containerr�r�r��matchr�)r+r�r�s   r2rz_ActionsContainer._add_action�s������V�$�$�$�	
�
���V�$�$�$����$�2�	@�	@�M�9?�D�'�
�6�6�$�2�	E�	E�M��,�2�2�=�A�A�
E��:�E��7�>�>�t�D�D�D���
r4c�:�|j�|��dSr6)r��remover%s  r2�_remove_actionz _ActionsContainer._remove_action�s���
���V�$�$�$�$�$r4c��i}|jD];}|j|vr&td��}t||jz���|||j<�<i}|jD]T}|j|vr/|�|j|j|j���||j<|jD]}||j||<��U|jD],}|�	|j
���}|jD]}|||<��-|jD]+}|�||���
|���,dS)Nz.cannot merge actions - two groups are named %r)�titler�r�)r�)r�r!ryr�rr�r�r�r�rr�r�r�r)r+r�title_group_mapr�r��	group_mapr��mutex_groups        r2�_add_container_actionsz(_ActionsContainer._add_container_actions�s������(�	1�	1�E��{�o�-�-��H�I�I�� ����!4�5�5�5�+0�O�E�K�(�(��	��-�	A�	A�E��{�/�1�1�/3�/F�/F��+� %� 1�%*�%;�0G�0=�0=����,� �.�
A�
A��$3�E�K�$@�	�&�!�!�
A��9�	0�	0�E��;�;���<�)�)�K� �.�
0�
0��$/�	�&�!�!�
0� �(�	<�	<�F��M�M�&�$�'�'�3�3�F�;�;�;�;�	<�	<r4c��d|vrtd��}t|���|�d��ttfvrd|d<|�d��tkr	d|vrd|d<t||g���S)Nr�z1'required' is an invalid argument for positionalsr�Tr��r(r�)ryrr�rrrz)r+r(r�r�s    r2rz(_ActionsContainer._get_positional_kwargs
s��������G�H�H�C��C�.�.� ��:�:�g���x��&>�>�>�!%�F�:���:�:�g���,�.�.�9�F�3J�3J�!%�F�:���F��b�9�9�9�9r4c�@�g}g}|D]�}|d|jvr+||jd�}td��}t||z���|�|��t	|��dkr$|d|jvr|�|����|�dd��}|�f|r	|d}n|d}|�|j��}|s!td��}t||z���|�dd��}t|||�	��S)
Nr)�optionr�zNinvalid option string %(option)r: must start with a character %(prefix_chars)rrdr(z%dest= is required for options like %rr�ryr')	r�ryr�r&r�r��lstrip�replacerz)	r+rsr�r��long_option_stringsr�r�r(�dest_option_strings	         r2rz&_ActionsContainer._get_optional_kwargssa���� ��!�	:�	:�M� ��#�t�'8�8�8�"/�(,�(9�;�;���G�H�H�� ��t��,�,�,�
�!�!�-�0�0�0��=�!�!�A�%�%�-��*:�d�>O�*O�*O�#�*�*�=�9�9�9���z�z�&�$�'�'���<�"�
7�%8��%;�"�"�%3�A�%6�"�%�,�,�T�->�?�?�D��
6��?�@�@�� ��}�!4�5�5�5��<�<��S�)�)�D��F��n�E�E�E�Er4c�\�|�d|��}|�d||��S)Nr�)r�r)r+r�r�r�s    r2r
z#_ActionsContainer._pop_action_class?s-�����H�g�.�.���!�!�(�F�F�;�;�;r4c��d|jz}	t||��S#t$r'td��}t	||jz���wxYw)Nz_handle_conflict_%sz%invalid conflict_resolution value: %r)r�rPrryr�)r+�handler_func_namer�s   r2r�z_ActionsContainer._get_handlerCse��1�D�4I�I��	:��4�!2�3�3�3���	:�	:�	:��;�<�<�C��S�4�#8�8�9�9�9�	:���s	��1A
c��g}|jD]/}||jvr$|j|}|�||f���0|r"|���}|||��dSdSr6)r�r�r&r�)r+r��confl_optionalsr��confl_optionalr�s      r2rz!_ActionsContainer._check_conflictLs�����#�2�	H�	H�M��� ;�;�;�!%�!<�]�!K���&�&�
�~�'F�G�G�G���	6�#�0�0�2�2����V�_�5�5�5�5�5�	6�	6r4c��tddt|����}d�d�|D����}t|||z���)Nzconflicting option string: %szconflicting option strings: %sr!c��g|]\}}|��Sr<r<)rqr�r�s   r2rtz<_ActionsContainer._handle_conflict_error.<locals>.<listcomp>^s,��%=�%=�%=�)>���&3�%=�%=�%=r4)rr�r*r)r+r��conflicting_actionsrE�conflict_strings     r2�_handle_conflict_errorz(_ActionsContainer._handle_conflict_errorZsk���:�;��2�3�3�5�5���)�)�%=�%=�(;�%=�%=�%=�>�>���F�G�o�$=�>�>�>r4c���|D][\}}|j�|��|j�|d��|js|j�|���\dSr6)r�rr�r�rr)r+r�r6r�s    r2�_handle_conflict_resolvez*_ActionsContainer._handle_conflict_resolvecsy��&9�		8�		8�!�M�6�
�!�(�(��7�7�7��'�+�+�M�4�@�@�@��(�
8�� �/�/��7�7�7��		8�		8r4r6)r$r=r>rar�rrrr�rrrrr%rrr
r�rr8r:rjrks@r2r�r�<sL�������01�01�01�01�01�j!�!�!�C�C�C�C�5�5�5�.�.�.�1(�1(�1(�f���
���
���*%�%�%�&<�&<�&<�P:�:�:�  F� F� F�D<�<�<�<�:�:�:�6�6�6�?�?�?�8�8�8�8�8�8�8r4r�c�>��eZdZd�fd�	Z�fd�Z�fd�Z�fd�Z�xZS)rNc�p��|j}|d|j��|d|j��|d|j��t	t
|��j}|dd|i|��||_g|_|j	|_	|j
|_
|j|_|j|_|j
|_
|j|_dS)Nr�r�r�r�r<)r�r�r�r�rdrrar!r�r�r�r�r�r�r�)r+rr!r�r�r�
super_initrfs       �r2raz_ArgumentGroup.__init__ts�����"����!�9�#=�>�>�>���~�y�5�6�6�6���!�9�#=�>�>�>��>�4�0�0�9�
��
�5�5�{�5�f�5�5�5���
� ���%�0���!�*��
�&/�&F��#�"�,����4�	
�+�*3�*N��'�'�'r4c���tt|���|��}|j�|��|Sr6)rdrrr�r&�r+r�rfs  �r2rz_ArgumentGroup._add_action�s<����~�t�,�,�8�8��@�@����"�"�6�*�*�*��
r4c���tt|���|��|j�|��dSr6)rdrrr�rr?s  �r2rz_ArgumentGroup._remove_action�s>���
�n�d�#�#�2�2�6�:�:�:���"�"�6�*�*�*�*�*r4c�n��tjdtd���t��j|i|��S)Nz&Nesting argument groups is deprecated.rE��category�
stacklevel)�warnings�warn�DeprecationWarningrdr�r+rsr�rfs   �r2rz!_ArgumentGroup.add_argument_group�sC����
�4�'��	
�	
�	
�	
�
*�u�w�w�)�4�:�6�:�:�:r4�NN)r$r=r>rarrrrjrks@r2rrrs��������O�O�O�O�O�O�,�����
+�+�+�+�+�;�;�;�;�;�;�;�;�;r4rc�6��eZdZd�fd�	Zd�Zd�Z�fd�Z�xZS)rFc�t��tt|���|��||_||_dSr6)rdrrar��
_container)r+rr�rfs   �r2raz _MutuallyExclusiveGroup.__init__�s4���
�%�t�,�,�5�5�i�@�@�@� ��
�#����r4c��|jrtd��}t|���|j�|��}|j�|��|S)Nz-mutually exclusive arguments must be optional)r�ryr�rLrr�r&)r+r�r�s   r2rz#_MutuallyExclusiveGroup._add_action�sW���?�	"��C�D�D�C��S�/�/�!���,�,�V�4�4����"�"�6�*�*�*��
r4c�n�|j�|��|j�|��dSr6)rLrr�rr%s  r2rz&_MutuallyExclusiveGroup._remove_action�s5����&�&�v�.�.�.���"�"�6�*�*�*�*�*r4c�n��tjdtd���t��j|i|��S)Nz0Nesting mutually exclusive groups is deprecated.rErB)rErFrGrdrrHs   �r2rz4_MutuallyExclusiveGroup.add_mutually_exclusive_group�sC����
�>�'��	
�	
�	
�	
�
4�u�w�w�3�T�D�V�D�D�Dr4)F)r$r=r>rarrrrjrks@r2rr�s}�������$�$�$�$�$�$�
���+�+�+�E�E�E�E�E�E�E�E�Er4rc
���eZdZdZddddgedddddddf
�fd�	Zd�Zd�Zd	�Zd
�Z	d�Z
d$d�Zd$d
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd$d�Zd$d�Zd�Zd�Zd�Zd�Zd�Zd�Zd%d�Zd%d�Zd%d �Zd&d"�Z d#�Z!�xZ"S)'raKObject for parsing command line strings into Python objects.

    Keyword Arguments:
        - prog -- The name of the program (default:
            ``os.path.basename(sys.argv[0])``)
        - usage -- A usage message (default: auto-generated from arguments)
        - description -- A description of what the program does
        - epilog -- Text following the argument descriptions
        - parents -- Parsers whose arguments should be copied into this one
        - formatter_class -- HelpFormatter class for printing help messages
        - prefix_chars -- Characters that prefix optional arguments
        - fromfile_prefix_chars -- Characters that prefix files containing
            additional arguments
        - argument_default -- The default value for all arguments
        - conflict_handler -- String indicating how to handle conflicts
        - add_help -- Add a -h/-help option
        - allow_abbrev -- Allow long options to be abbreviated unambiguously
        - exit_on_error -- Determines whether or not ArgumentParser exits with
            error info when an error occurs
    Nr�r�Tc	���tt|��j}||||	|
���|�/tj�tjd��}||_||_	||_
||_||_||_
||_|
|_|j}|t#d����|_|t#d����|_d|_d�}|�dd|��d|vrdn|d}|j
r5|�|dz|d	zd
zd
t.t#d�����|D]I}|�|��	|j}|j�|���:#t6$rY�FwxYwdS)
N)r�r�r�r�rzpositional arguments�optionsc��|Sr6r<)r�s r2�identityz)ArgumentParser.__init__.<locals>.identity�s���Mr4r#r��hrEr�zshow this help message and exit)r�r�r�)rdrra�_os�path�basenamer��argvr]r��epilog�formatter_class�fromfile_prefix_chars�add_help�allow_abbrev�
exit_on_errorrry�_positionals�
_optionals�_subparsersr�r�rr%r�rr)r+r]r�r�rZ�parentsr[r�r\r�r�r]r^r_�	superinit�	add_grouprT�default_prefixrm�defaultsrfs                    �r2razArgumentParser.__init__�s�����.�$�/�/�8�	��	�k�+�#3�#3�	5�	5�	5�	5��<��8�$�$�T�Y�q�\�2�2�D���	���
����.���%:��"� ��
�(���*����+�	�%�I�a�(>�&?�&?�@�@���#�)�A�i�L�L�1�1������	�	�	��
�
�f�d�H�-�-�-�!$�|� 3� 3����a����=�	;�����s�"�N�1�$4�V�$;��x��8�9�9�
�
;�
;�
;��	0�	0�F��'�'��/�/�/�
0�!�+����%�%�h�/�/�/�/��"�
�
�
���
����		0�	0s�E<�<
F	�F	c�(��gd�}�fd�|D��S)N)r]r�r�r[r�r]c�4��g|]}|t�|��f��Sr<rOrQs  �r2rtz.ArgumentParser._get_kwargs.<locals>.<listcomp>rRr4r<rSs` r2r(zArgumentParser._get_kwargss0���
�
�
��?�>�>�>��>�>�>�>r4c��|j�"|�td����|�dt	|����d|vsd|vrbt|�dd����}t|�dd����}|�||��|_n|j|_|�d���u|�	��}|�
��}|j}|�|j
||d��|������|d<|�|d��}|d
d	gi|��}|j�|��|S)Nz(cannot have multiple subparser argumentsr�r!r��subcommandsr]rur�r�r<)rbr�ryr�r#r�rr`r�r��_get_positional_actionsr�r�r�r~r�r
r)	r+r�r!r�rlr�r��
parsers_classr�s	         r2�add_subparserszArgumentParser.add_subparserss����'��J�J�q�C�D�D�E�E�E�	���.�$�t�*�*�5�5�5��f���
�� 7� 7��f�j�j��-�8�8�9�9�E��F�J�J�}�d�;�;�<�<�K�#�6�6�u�k�J�J�D���#�0�D���:�:�f���%��+�+�-�-�I��6�6�8�8�K��4�F�����
�K���D�D�D�&�2�2�4�4�:�:�<�<�F�6�N��.�.�v�y�A�A�
���;�;�b�;�F�;�;����$�$�V�,�,�,��
r4c�~�|jr|j�|��n|j�|��|Sr6)r�rarr`r%s  r2rzArgumentParser._add_action=sB��� �	2��O�'�'��/�/�/�/���)�)�&�1�1�1��
r4c�$�d�|jD��S)Nc� �g|]}|j�	|��Sr<rV�rqr�s  r2rtz8ArgumentParser._get_optional_actions.<locals>.<listcomp>Es0��*�*�*���(�*��*�*�*r4�r�r:s r2�_get_optional_actionsz$ArgumentParser._get_optional_actionsDs%��*�*�"�m�*�*�*�	*r4c�$�d�|jD��S)Nc� �g|]}|j�	|��Sr<rVrrs  r2rtz:ArgumentParser._get_positional_actions.<locals>.<listcomp>Js0��.�.�.���,�.��.�.�.r4rsr:s r2rlz&ArgumentParser._get_positional_actionsIs%��.�.�"�m�.�.�.�	.r4c��|�||��\}}|r:td��}|�|d�|��z��|S�Nzunrecognized arguments: %sr�)r�ryr�r*�r+rsr[rYr�s     r2�
parse_argszArgumentParser.parse_argsQsW���*�*�4��;�;�
��d��	-��0�1�1�C��J�J�s�S�X�X�d�^�^�+�,�,�,��r4c��|�tjdd�}nt|��}|�t��}|jD]N}|jtur>t||j��s)|jturt||j|j���O|j
D].}t||��st|||j
|���/|jrT	|�||��\}}nR#t$r,}|�t|����Yd}~n!d}~wwxYw|�||��\}}t|t ��r=|�t%|t ����t'|t ��||fSrc)r�rYr7rr�r(rrr�rhr�r_�_parse_known_argsrr�rr�r�rP�delattr)r+rsr[r�r(�errs      r2r�zArgumentParser.parse_known_argsXs����<��9�Q�R�R�=�D�D���:�:�D���!���I��m�	H�	H�F��{�(�*�*��y�&�+�6�6�H��~�X�5�5��	�6�;���G�G�G���N�	?�	?�D��9�d�+�+�
?��	�4����)=�>�>�>����	F�
%�"&�"8�"8��y�"I�"I��	�4�4�� �
%�
%�
%��
�
�3�s�8�8�$�$�$�$�$�$�$�$�����
%����#�4�4�T�9�E�E�O�I�t��9�5�6�6�	8��K�K��	�+B�C�C�D�D�D��I�6�7�7�7��$��s�C%�%
D�/"D�Dc	�n����������� �!��j�������i��jD]v}|j}t	|j��D]X\}}��|g��}|�|d|���|�||dzd����Y�wi�g}t���}	t	|	��D]q\}}
|
dkr0|�d��|	D]}
|�d����;��	|
��}|�d}n|�|<d}|�|���rd�
|���t���t���d�����fd�	�!������!fd�}
����������!fd	�}g�d
� �rt���}nd}� |krmt� fd��D����}� |kr|� ��}|� kr|� �;|� � �vr!�� |�}��|��|� |
� ��� � |k�m|� ��}���|d���g}�jD]�}|�vr�|jr#|�t#|�����0|j�zt'|jt(��r`t+�|j��rK|jt/�|j��ur/t1�|j��||j������|r8��t7d
��d�
|��z���jD]d}|jr[|jD]}|�vrnL�	d�|jD��}t7d��}��|d�
|��z���e��fS)Nrdrar��A�Oruc�h���	�|����||��}||jurc�
�|����|g��D]7}|�
vr1t	d��}t|��}t
|||z����8|tur|��||��dSdS)Nznot allowed with argument %s)r��_get_valuesr�r�ryrArr)r��argument_stringsr��argument_values�conflict_actionr��action_name�action_conflictsr[�seen_actions�seen_non_default_actionsr+s       �����r2�take_actionz5ArgumentParser._parse_known_args.<locals>.take_action�s�������V�$�$�$�"�.�.�v�7G�H�H�O�
�f�n�4�4�(�,�,�V�4�4�4�'7�';�';�F�B�'G�'G�G�G�O�&�*B�B�B�� >�?�?��&6��&G�&G��+�F�C�+�4E�F�F�F�C��h�.�.���t�Y���G�G�G�G�G�/�.r4c����|}|\}}}}�j}g}	|� ���|��|dzS|��)||d��}�j}	|dkr�|d|	vr�|dkr�|s
|d|	vr"td��}
t	||
|z���|�|g|f��|d}||dz}�j}||vr5||}|dd�}|sdx}}n�|ddkr
d}|dd�}n�d}n���||z��|dz}
n�|dkr!|dz}
|g}|�|||f��ngtd��}
t	||
|z���|dz}�|d�}|||��}||z}
�||
�}|�|||f��n���|D]\}}}�|||���|
S)NTrdr�rruzignored explicit argument %rr)�_match_argumentr&r�ryrr�)�start_index�option_tupler�r��sep�explicit_arg�match_argument�
action_tuples�	arg_countrr��char�
optionals_map�stoprsr��selected_patternsr-�arg_strings_pattern�extras�option_string_indicesr+r�s                 ������r2�consume_optionalz:ArgumentParser._parse_known_args.<locals>.consume_optional�s����1��=�L�7C�4�F�M�3��"�1�N��M�B
��>��M�M�+�k�":�;�;�;�&��?�*� �+� .��v�s� ;� ;�I�
!�-�E�!�Q���)�!�,�E�9�9�(�B�.�.��L�,�q�/�U�":�":�"#�$B�"C�"C�C�"/���l�8J�"K�"K�K�%�,�,�f�b�-�-H�I�I�I�,�Q�/��(,�|�A��(>�
�(,�(C�
�(�M�9�9�%2�=�%A�F�+7����+;�L�#/�)�59� 9��l�l�!-�a��C�!7�!7�&)��/;�A�B�B�/?���&(���"�M�M�$��*=�>�>�>�#.��?�D�!�#�a���*�Q��� ,�~��%�,�,�f�d�M�-J�K�K�K��
 � >�?�?��+�F�C�,�4F�G�G�G�(�!�O�E�(;�E�F�F�(C�%� .��v�7H� I� I�I� �9�,�D�&�u�T�z�2�D�!�(�(�&�$�
�)F�G�G�G��EB
�N0=�
9�
9�+���m���F�D�-�8�8�8�8��Kr4c�����
j}�|d�}|�	|��}t�	|��D]#\}}�|||z�}||z
}�||���$�	t|��d��	dd�<|Sr6)�_match_arguments_partial�zipr�)r��
match_partial�selected_pattern�
arg_countsr�r�rsr-r�r�r+r�s       �����r2�consume_positionalsz=ArgumentParser._parse_known_args.<locals>.consume_positionalss���� �9�M�2�;�<�<�@��&��{�4D�E�E�J�&)��j�%A�%A�
*�
*�!��	�"�;��i�0G�#G�H���y�(����F�D�)�)�)�)�)��Z���)9�)9�:�K����N��r4rr�c� ��g|]
}|�k�|��Sr<r<)rqr�r�s  �r2rtz4ArgumentParser._parse_known_args.<locals>.<listcomp>9s.���,)�,)�,)���K�'�'��'�'�'r4z(the following arguments are required: %sr!c�H�g|]}|jtu�t|���� Sr<)r�rrArrs  r2rtz4ArgumentParser._parse_known_args.<locals>.<listcomp>xs7��=�=�=�!'� &��8� ;� ;�.�f�5�5� ;� ;� ;r4z#one of the arguments %s is requiredr�r6)r\�_read_args_from_filesr�r�r�r�r��iterr&�_parse_optionalr*r�rlrOrNr�r�rAr�rrrr(rPrh�
_get_valuer�ry)"r+r-r[r$r�r��mutex_action�	conflicts�arg_string_pattern_parts�arg_strings_iter�
arg_stringr��patternr�r��max_option_string_index�next_option_string_index�positionals_end_index�strings�
stop_index�required_actionsr�r�rTr�r�r�r�r�r�r�r�r�r�s"```                      @@@@@@@@@r2r|z ArgumentParser._parse_known_args~sU���������������%�1��4�4�[�A�A�K����:�	8�	8�K�'�6�M�#,�[�-G�#H�#H�
8�
8���<�,�7�7��b�I�I�	�� � ��r��r�!2�3�3�3�� � ��q�1�u�v�v�!6�7�7�7�7�
8�!#��#%� ���,�,��&�'7�8�8�	9�	9�M�A�z��T�!�!�(�/�/��4�4�4�"2�9�9�J�,�3�3�C�8�8�8�8�9� $�3�3�J�?�?���'�!�G�G�/;�)�!�,�!�G�(�/�/��8�8�8�8�!�g�g�&>�?�?���u�u��#&�5�5� �	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�*S	�S	�S	�S	�S	�S	�S	�S	�S	�S	�n�2�2�4�4��	�	�	�	�	�	�	�	�	�(���� �	)�&)�*?�&@�&@�#�#�&(�#��4�4�4�(+�,)�,)�,)�,)�2�,)�,)�,)�(*�(*�$��6�6�6�(;�(;�K�(H�(H�%�)�;�6�6�"7�K��"7�K��"7�7�7�%�k�2J�&J�K���
�
�g�&�&�&�6��+�*�;�7�7�K�5�4�4�4�:)�(��5�5�
�	�
�
�k�*�+�+�.�/�/�/����m�	I�	I�F��\�)�)��?�I�$�+�+�,<�V�,D�,D�E�E�E�E���2�"�6�>�3�7�7�3��	�6�;�7�7�3���'�)�V�[�*I�*I�I�I��	�6�;� $������ G� G�I�I�I���	4��J�J�q�C�D�D��y�y�!1�2�2�3�
4�
4�
4��4�	6�	6�E��~�
6�#�2�
6�
6�F��!9�9�9���:�
=�=�+0�+?�=�=�=�E��A�B�B�C��J�J�s�S�X�X�e�_�_�4�5�5�5���&� � r4c�<�g}|D�]}|r|d|jvr|�|���*	t|dd���5}g}|������D]/}|�|��D]}|�|����0|�|��}|�|��ddd��n#1swxYwY��#t$r-}|�	t|����Yd}~��d}~wwxYw|Sr�)r\r&r��readr1�convert_arg_line_to_argsr�r�r�r�r)r+r-�new_arg_stringsr��	args_file�arg_liner/r~s        r2r�z$ArgumentParser._read_args_from_files�s�����%�	)�	)�J��
)��A��d�6P�!P�!P��&�&�z�2�2�2�2�	)��j����n�-�-�<��&(��(1���(8�(8�(C�(C�(E�(E�8�8�H�'+�'D�'D�X�'N�'N�8�8�� +� 2� 2�3� 7� 7� 7� 7�8�&*�&@�&@��&M�&M��'�.�.�{�;�;�;�
<�<�<�<�<�<�<�<�<�<�<����<�<�<�<����)�)�)��J�J�s�3�x�x�(�(�(�(�(�(�(�(�����)�����s<�C"�BC�
C"�C	�C"�C	�C"�"
D�,"D�Dc��|gSr6r<)r+r�s  r2r�z'ArgumentParser.convert_arg_line_to_args�s
���z�r4c��|�|��}tj||��}|��dtd��ttd��t
td��i}|�|j��}|�tdd|j��|jz}t||���t|�d����S)Nzexpected one argumentzexpected at most one argumentzexpected at least one argumentzexpected %s argumentzexpected %s argumentsrd)�_get_nargs_patternrXrryrrr�r�rrr�r�)r+r�r��
nargs_patternr�nargs_errorsr�s       r2r�zArgumentParser._match_argument�s����/�/��7�7�
��	�-�)<�=�=���=��a�/�0�0��!�;�<�<��Q�?�@�@��L�
�"�"�6�<�0�0�C��{��5�6�%�|�-�-�/5�|�<�� ���,�,�,��5�;�;�q�>�>�"�"�"r4c�8��g}tt|��dd��D]w}|d|�}d��fd�|D����}tj||��}|�3|�d�|���D����n�x|S)Nrr�ruc�:��g|]}��|����Sr<)r�)rqr�r+s  �r2rtz;ArgumentParser._match_arguments_partial.<locals>.<listcomp>�s7���<�<�<�#)� $�6�6�v�>�>�<�<�<r4c�,�g|]}t|����Sr<)r�)rqr�s  r2rtz;ArgumentParser._match_arguments_partial.<locals>.<listcomp>�s��H�H�H�v�s�6�{�{�H�H�Hr4)r�r�r*rXrr�r�)r+r�r�rr��
actions_slicer�rs`       r2r�z'ArgumentParser._match_arguments_partial�s�������s�7�|�|�Q��+�+�	�	�A�#�B�Q�B�K�M��g�g�<�<�<�<�-:�<�<�<�=�=�G��I�g�':�;�;�E�� ��
�
�H�H������H�H�H�I�I�I���!�
�
r4c�t�|sdS|d|jvrdS||jvr|j|}||ddfSt|��dkrdS|�d��\}}}|r||jvr|j|}||||fS|�|��}t|��dkrLd�d�|D����}||d�}t
d��}	|�|	|z��nt|��dkr|\}
|
S|j�	|��r	|j
sdSd|vrdSd|ddfS)	Nrrdrr!c��g|]	\}}}}|��
Sr<r<)rqr�r�r�r�s     r2rtz2ArgumentParser._parse_optional.<locals>.<listcomp>�s6��!O�!O�!O�<�F�M�3��"/�!O�!O�!Or4)r)�matchesz4ambiguous option: %(option)s could match %(matches)sr�)r�r�r��	partition�_get_option_tuplesr*ryr�r�rr�)r+r�r�r�r�r��
option_tuplesrRrsr�r�s           r2r�zArgumentParser._parse_optional�s����	��4��!�}�� 1�1�1��4���4�4�4��0��<�F��:�t�T�1�1��z�?�?�a����4�,6�+?�+?��+D�+D�(�
�s�L��	<�=�D�$?�?�?��0��?�F��=�#�|�;�;��/�/�
�;�;�
��}����!�!��i�i�!O�!O�@M�!O�!O�!O�P�P�G�(�W�=�=�D��J�K�K�C��J�J�s�T�z�"�"�"�"���
�
�1�
$�
$�)�M�L���
�(�.�.�z�:�:�	��6�
��t��*����4��Z��t�+�+r4c��g}|j}|d|vrx|d|vrn|jrf|�d��\}}}|sdx}}|jD]?}|�|��r(|j|}||||f}|�|���@n�|d|vr�|d|vr�|}|dd�}	|dd�}
|jD]n}||	kr)|j|}||d|
f}|�|���1|�|��r(|j|}||ddf}|�|���on%|�td��|z��|S)NrrdrrEruzunexpected option string: %s)r�r^r�r�rcr&r�ry)r+r�rr�
option_prefixr�r�r�r��short_option_prefix�short_explicit_args           r2r�z!ArgumentParser._get_option_tuples�s������!�����u�$�$��q�)9�U�)B�)B�� �
+�3@�3J�3J�3�3O�3O�0�
�s�L��.�)-�-�C�,�%)�%@�+�+�M�$�/�/�
�>�>�+�!%�!<�]�!K��$�m�S�,�F���
�
�c�*�*�*���
�1�
��
&�
&�=��+;�5�+H�+H�)�M�"/����"3��!.�q�r�r�!2��!%�!<�
'�
'�
� �$7�7�7�!�8��G�F� �-��5G�G�C��M�M�#�&�&�&�&�"�-�-�m�<�<�'�!�8��G�F� �-��t�;�C��M�M�#�&�&�&��
'�
�J�J�q�7�8�8�=�H�I�I�I��
r4c�b�|j}|�d}no|tkrd}na|tkrd}nS|tkrd}nE|tkrd}n7|t
krd}n)|tkrd}ndd	�d
|z��z}|jr,|�	d	d��}|�	dd��}|S)
Nz(-*A-*)z(-*A?-*)z	(-*[A-]*)z
(-*A[A-]*)z([-AO]*)z(-*A[-AO]*)z(-*-*)z(-*%s-*)z-*r�rur�)
r�rrrrrrr*r�r+)r+r�r�r�s    r2r�z!ArgumentParser._get_nargs_pattern&	s�������=�%�M�M��h�
�
�&�M�M��l�
"�
"�'�M�M��k�
!�
!�(�M�M��i�
�
�&�M�M��f�_�_�)�M�M��h�
�
�$�M�M�'����3��;�)?�)?�?�M�� �	;�)�1�1�$��;�;�M�)�1�1�#�r�:�:�M��r4c��|�||��\}}|r:td��}|�|d�|��z��|Srx)�parse_known_intermixed_argsryr�r*rys     r2�parse_intermixed_argsz$ArgumentParser.parse_intermixed_argsW	sW���5�5�d�I�F�F�
��d��	-��0�1�1�C��J�J�s�S�X�X�d�^�^�+�,�,�,��r4c���|����d��D��}|rtd|djz����fd�|jD��rtd���	|j}	|j�!|���dd�|_�D]2}|j|_t|_|j|_	t|_�3|�
||��\}}�D]a}t||j��rJt||j��gkr1ddlm}|d|j�d	|����t!||j���b	�D]}|j|_|j	|_�n"#�D]}|j|_|j	|_�wxYw|���}	|D]}|j|_d
|_�|jD]}	|	j|	_d
|	_�|�
||��\}}
|D]}|j|_�|jD]}	|	j|	_�n,#|D]}|j|_�|jD]}	|	j|	_�wxYw	||_n#||_wxYw||
fS)Nc�<�g|]}|jttfv�|��Sr<)r�rrrrs  r2rtz>ArgumentParser.parse_known_intermixed_args.<locals>.<listcomp>l	s3��
5�
5�
5������ 3�3�3��3�3�3r4z3parse_intermixed_args: positional arg with nargs=%src�:��g|]}|jD]
}|�v�|j���Sr<)r�r()rqr�r�r�s   �r2rtz>ArgumentParser.parse_known_intermixed_args.<locals>.<listcomp>r	sI���I�I�I�E��.�I�I��&�K�2G�2G�
�K�2G�2G�2G�2Gr4z;parse_intermixed_args: positional in mutuallyExclusiveGroup�)rFzDo not expect z in F)rlrr�r�r�r��
save_nargsrr��save_defaultr�rr(rPrErFr}rtr��
save_required)r+rsr[�a�
save_usager��remaining_argsrFr�r�r�r�s           @r2r�z*ArgumentParser.parse_known_intermixed_args^	sD����2�2�4�4��
5�
5�+�
5�
5�
5���	9��-�-.�q�T�Z�8�9�9�
9�I�I�I�I�T�%D�I�I�I�	7��6�7�7�
7�.	$���J�
9��:�%�!%�!2�!2�!4�!4�Q�R�R�!8�D�J�)�.�.�F�(.��F�%�#+�F�L�*0�.�F�'�%-�F�N�N�,0�,A�,A�$�BK�-M�-M�)�	�>�)�8�8�F��	�6�;�7�7�8� '�	�6�;� ?� ?�� C� C�1�1�1�1�1�1��������i�i�P�Q�Q�Q��	�6�;�7�7�7��
8�*�9�9�F�#)�#4�F�L�%+�%8�F�N�N�9��k�9�9�F�#)�#4�F�L�%+�%8�F�N�N�9�����2�2�4�4�I�
9�(�,�,�F�+1�?�F�(�&+�F�O�O�!�<�+�+�E�*/�.�E�'�%*�E�N�N�$(�$9�$9�.�:C�%E�%E�!�	�6�(�;�;�F�&,�&:�F�O�O�!�<�9�9�E�%*�%8�E�N�N�9��(�;�;�F�&,�&:�F�O�O�!�<�9�9�E�%*�%8�E�N�N�9����9�$�D�J�J���D�J�#�#�#�#��&� � s>�$I�,CE%�I�%F�I�AH�*(I�)H;�;I�	Ic������js<�jttfvr'	|�d��n#t
$rYnwxYw|si�jtkrY�jr�j}n�j}t|t��r,���|��}���|���n3|s?�jtkr/�js(�j��j}n|}���|��n�t|��dkrA�jdtfvr1|\}���|��}���|��n��jtkr��fd�|D��}n~�jtkr,��fd�|D��}���|d��nB�jtkrt}n*��fd�|D��}|D]}���|���|S)Nrardc�<��g|]}���|����Sr<�r��rq�vr�r+s  ��r2rtz.ArgumentParser._get_values.<locals>.<listcomp>�	�'���E�E�E�A�T�_�_�V�Q�/�/�E�E�Er4c�<��g|]}���|����Sr<r�r�s  ��r2rtz.ArgumentParser._get_values.<locals>.<listcomp>�	r�r4rc�<��g|]}���|����Sr<r�r�s  ��r2rtz.ArgumentParser._get_values.<locals>.<listcomp>�	r�r4)r�r�rrrr�rrLr�rrr��_check_valuerr�r)r+r�r-r1r�r�s``    r2r�zArgumentParser._get_values�	sK�����$�	���f�i�=P�)P�)P�
��"�"�4�(�(�(�(���
�
�
���
�����*	-�v�|�x�7�7��$�
'���������%��%�%�
1������6�6���!�!�&�%�0�0�0���	-�&�,�,�">�">��'�#?��~�)�����#�����f�e�,�,�,�,���
�
��
"�
"�v�|��h�7G�'G�'G�%�K�J��O�O�F�J�7�7�E����f�e�,�,�,�,��\�Y�
&�
&�E�E�E�E�E��E�E�E�E�E��\�V�
#�
#�E�E�E�E�E��E�E�E�E����f�e�A�h�/�/�/�/��\�X�
%�
%��E�E�F�E�E�E�E��E�E�E�E��
-�
-���!�!�&�!�,�,�,�,��s�6�
A�Ac�4�|�d|j|j��}t|��s"td��}t	|||z���	||��}n�#t
$rL}t
|jdt|j����}t|��}t	||���d}~wttf$rPt
|jdt|j����}||d�}td��}t	|||z���wxYw|S)Nr#z%r is not callabler$)r#r1z!invalid %(type)s value: %(value)r)rr#rryrrrPr'rrr�)	r+r�r�rr�rr~r0rss	         r2r�zArgumentParser._get_value�	s*���&�&�v�v�{�F�K�H�H�	��	�"�"�	9��(�)�)�C����i��8�8�8�	4��Y�z�*�*�F�F��!�	-�	-�	-��6�;�
�D���4E�4E�F�F�D��c�(�(�C����,�,�,������:�&�	4�	4�	4��6�;�
�D���4E�4E�F�F�D� �:�6�6�D��7�8�8�C����d�
�3�3�3�		4�����
s�A � 
D�*AB1�1A$Dc���|j�[||jvrT|d�tt|j����d�}t	d��}t|||z���dSdS)Nr!)r1rz3invalid choice: %(value)r (choose from %(choices)s))rr*r�r'ryr)r+r�r1rsr�s     r2r�zArgumentParser._check_value�	sr���>�%�%�v�~�*E�*E�"�#�y�y��T�6�>�)B�)B�C�C�E�E�D��I�J�J�C����d�
�3�3�3�	&�%�*E�*Er4c��|���}|�|j|j|j��|���Sr6)r�r�r�r�r�r~)r+rls  r2r�zArgumentParser.format_usage
sK���'�'�)�)�	����D�J��
� �;�	=�	=�	=��$�$�&�&�&r4c���|���}|�|j|j|j��|�|j��|jD]d}|�|j	��|�|j��|�
|j��|����e|�|j
��|���Sr6)r�r�r�r�r�r�r�r�r�r!r�r�r�rZr~)r+rl�action_groups   r2r~zArgumentParser.format_help
s����'�'�)�)�	�	���D�J��
� �;�	=�	=�	=�	���4�+�,�,�,�!�/�	$�	$�L��#�#�L�$6�7�7�7����|�7�8�8�8��#�#�L�$?�@�@�@��!�!�#�#�#�#�	���4�;�'�'�'��$�$�&�&�&r4c�8�|�|j���S)Nr�)r[r]r:s r2r�zArgumentParser._get_formatter%
s���#�#���#�3�3�3r4c�r�|�tj}|�|���|��dSr6)r�r�r�r��r+�files  r2�print_usagezArgumentParser.print_usage+
s6���<��;�D����D�-�-�/�/��6�6�6�6�6r4c�r�|�tj}|�|���|��dSr6)r�r�r�r~r�s  r2r�zArgumentParser.print_help0
s6���<��;�D����D�,�,�.�.��5�5�5�5�5r4c��|r>|ptj}	|�|��dS#ttf$rYdSwxYwdSr6)r��stderr�writerr�)r+rEr�s   r2r�zArgumentParser._print_message5
sd���	��&�4�;�D�
��
�
�7�#�#�#�#�#��"�G�,�
�
�
����
����		�	s�)�>�>rc�r�|r |�|tj��tj|��dSr6)r�r�r�r�)r+�statusrEs   r2r�zArgumentParser.exit@
s8���	6�������5�5�5��	�&�����r4c��|�tj��|j|d�}|�dtd��|z��dS)z�error(message: string)

        Prints a usage message incorporating the message to stderr and
        exits.

        If you override this in a subclass, it should not return -- it
        should either exit or raise an exception.
        )r]rErEz%(prog)s: error: %(message)s
N)r�r�r�r]r�ry)r+rErss   r2r�zArgumentParser.errorE
sQ��	
�����%�%�%��	�g�6�6���	�	�!�Q�7�8�8�4�?�@�@�@�@�@r4rIr6)rN)#r$r=r>r?rrar(rnrrtrlrzr�r|r�r�r�r�r�r�r�r�r�r�r�r�r�r~r�r�r�r�r�r�rjrks@r2rr�sR���������,��!���!.�!�'+�"&�")��"�#�=0�=0�=0�=0�=0�=0�D	?�	?�	?����>���*�*�*�
.�.�.�����$�$�$�$�LA!�A!�A!�F���2���#�#�#�,��� 7,�7,�7,�r(�(�(�T+�+�+�b����H!�H!�H!�H!�Z6�6�6�p���44�4�4�'�'�'�'�'�'�.4�4�4�7�7�7�7�
6�6�6�6�
��������
A�A�A�A�A�A�Ar4r)3r?�__version__�__all__�osrV�rerX�sysr�rErryrrrrrrrr�r+rrCrr	r
rrrA�	Exceptionrrr
rrmrtrzr�r�r�r�r�r�r�r�rrr�rrrr<r4r2�<module>r�s���;�;�z������,����������������*�*�*�*�*�*�*�*���������	���	�.�������v����>	�	�	�"G�G�G�G�G�F�G�G�G�TQ�Q�Q�Q�Q�-�Q�Q�Q�!�!�!�!�!�6�!�!�!������M����:$�$�$�$�$�}�$�$�$�&���?�?�?�?�?�I�?�?�?�(	�	�	�	�	�	�	�	�	�\@�\@�\@�\@�\@�
�\@�\@�\@�~$/�$/�$/�$/�$/�F�$/�$/�$/�N .� .� .� .� .�6� .� .� .�F2�2�2�2�2��2�2�2�.�����(����"�����)����"#-�#-�#-�#-�#-�F�#-�#-�#-�L-�-�-�-�-��-�-�-�61�1�1�1�1�6�1�1�1�.�����&����&�����V����8bL�bL�bL�bL�bL��bL�bL�bL�H-�-�-�-�-�M�-�-�-�1:�1:�1:�1:�1:�v�1:�1:�1:�n$�$�$�$�$� �$�$�$�(s8�s8�s8�s8�s8��s8�s8�s8�l	';�';�';�';�';�&�';�';�';�TE�E�E�E�E�n�E�E�E�8XA�XA�XA�XA�XA�%�'8�XA�XA�XA�XA�XAr4

Hacked By AnonymousFox1.0, Coded By AnonymousFox