Ë
    îñþiºX  ã                  ó²  — d dl mZ d dlmZ d dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ ej,                  rd d
lmZ ddlmZ  G d„ d«      Zej8                  dd„«       Z G d„ dej<                  «      Z G d„ d«      Z  G d„ dejB                  «      Z"	 	 	 	 	 	 dd„Z# G d„ d«      Z$ G d„ d«      Z%y)é    )ÚannotationsN)ÚTracebackTypeé   )Ú_compat)Ú
formatting)Útermui)Úutils)Ú_find_binary_reader)ÚReadableBuffer)ÚCommandc                  óZ   — e Zd Zdd„Zdd„Zdd„Zddd„Zddd„Zddd„Zdd„Z	dd„Z
dd	„Zy
)ÚEchoingStdinc                ó.   — || _         || _        d| _        y )NF)Ú_inputÚ_outputÚ_paused)ÚselfÚinputÚoutputs      úM/root/aria/mcps/aria-brain/venv/lib/python3.12/site-packages/click/testing.pyÚ__init__zEchoingStdin.__init__   s   € ØˆŒØˆŒØˆ�ó    c                ó.   — t        | j                  |«      S ©N)Úgetattrr   ©r   Úxs     r   Ú__getattr__zEchoingStdin.__getattr__    s   € Ü�t—{‘{ AÓ&Ð&r   c                óT   — | j                   s| j                  j                  |«       |S r   )r   r   Úwrite)r   Úrvs     r   Ú_echozEchoingStdin._echo#   s    € Ø�|Š|Ø�L‰L×Ñ˜rÔ"àˆ	r   c                óV   — | j                  | j                  j                  |«      «      S r   )r"   r   Úread©r   Úns     r   r$   zEchoingStdin.read)   s    € Ø�z‰z˜$Ÿ+™+×*Ñ*¨1Ó-Ó.Ð.r   c                óV   — | j                  | j                  j                  |«      «      S r   )r"   r   Úread1r%   s     r   r(   zEchoingStdin.read1,   s    € Ø�z‰z˜$Ÿ+™+×+Ñ+¨AÓ.Ó/Ð/r   c                óV   — | j                  | j                  j                  |«      «      S r   )r"   r   Úreadliner%   s     r   r*   zEchoingStdin.readline/   s    € Ø�z‰z˜$Ÿ+™+×.Ñ.¨qÓ1Ó2Ð2r   c                óz   — | j                   j                  «       D �cg c]  }| j                  |«      ‘Œ c}S c c}w r   )r   Ú	readlinesr"   r   s     r   r,   zEchoingStdin.readlines2   s+   € Ø'+§{¡{×'<Ñ'<Ó'>Ö? !�—
‘
˜1•Ò?Ð?ùÒ?s   �8c                ó@   ‡ — t        ˆ fd„‰ j                  D «       «      S )Nc              3  ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wr   )r"   )Ú.0r   r   s     €r   ú	<genexpr>z(EchoingStdin.__iter__.<locals>.<genexpr>6   s   øè ø€ Ò7 a�D—J‘J˜q—MÑ7ùs   ƒ)Úiterr   ©r   s   `r   Ú__iter__zEchoingStdin.__iter__5   s   ø€ ÜÓ7¨4¯;©;Ô7Ó7Ð7r   c                ó,   — t        | j                  «      S r   )Úreprr   r2   s    r   Ú__repr__zEchoingStdin.__repr__8   s   € Ü�D—K‘KÓ Ð r   N)r   ú
t.BinaryIOr   r7   ÚreturnÚNone)r   Ústrr8   út.Any)r!   Úbytesr8   r<   )éÿÿÿÿ)r&   Úintr8   r<   )r8   zlist[bytes])r8   zcabc.Iterator[bytes]©r8   r:   )Ú__name__Ú
__module__Ú__qualname__r   r   r"   r$   r(   r*   r,   r3   r6   © r   r   r   r      s0   „ óó
'óô/ô0ô3ó@ó8ô!r   r   c              #  ó>   K  — | €d –— y d| _         d –— d| _         y ­w)NTF)r   ©Ústreams    r   Ú_pause_echorG   <   s   è ø€ à€~ÜàˆŒÛØˆ�ùs   ‚c                  ó<   ‡ — e Zd ZdZdˆ fd„Zdˆ fd„Zdˆ fd„Zˆ xZS )ÚBytesIOCopyzdPatch ``io.BytesIO`` to let the written stream be copied to another.

    .. versionadded:: 8.2
    c                ó0   •— t         ‰| �  «        || _        y r   )Úsuperr   Úcopy_to)r   rL   Ú	__class__s     €r   r   zBytesIOCopy.__init__L   s   ø€ Ü‰ÑÔØˆ�r   c                óV   •— t         ‰| �  «        | j                  j                  «        y r   )rK   ÚflushrL   ©r   rM   s    €r   rO   zBytesIOCopy.flushP   s   ø€ Ü‰‰ŒØ�‰×ÑÕr   c                óX   •— | j                   j                  |«       t        ‰| �  |«      S r   )rL   r    rK   )r   ÚbrM   s     €r   r    zBytesIOCopy.writeT   s$   ø€ Ø�‰×Ñ˜1ÔÜ‰w‰}˜QÓÐr   )rL   z
io.BytesIOr8   r9   ©r8   r9   )rR   r   r8   r>   )r@   rA   rB   Ú__doc__r   rO   r    Ú__classcell__©rM   s   @r   rI   rI   F   s   ø„ ñõ
õ÷ ñ  r   rI   c                  ó   — e Zd ZdZdd„Zy)ÚStreamMixerz‚Mixes `<stdout>` and `<stderr>` streams.

    The result is available in the ``output`` attribute.

    .. versionadded:: 8.2
    c                ó¢   — t        j                  «       | _        t        | j                  ¬«      | _        t        | j                  ¬«      | _        y )N)rL   )ÚioÚBytesIOr   rI   ÚstdoutÚstderrr2   s    r   r   zStreamMixer.__init__a   s/   € Ü"$§*¡*£,ˆŒÜ"-°d·k±kÔ"BˆŒÜ"-°d·k±kÔ"Bˆ�r   NrS   )r@   rA   rB   rT   r   rC   r   r   rX   rX   Y   s   „ ñôCr   rX   c                  óx   ‡ — e Zd ZdZddœ	 	 	 	 	 	 	 	 	 	 	 d	ˆ fd„Zd
d„Zdˆ fd„Zedd„«       Zedd„«       Z	ˆ xZ
S )Ú_NamedTextIOWrapperaü  A :class:`~io.TextIOWrapper` with custom ``name`` and ``mode``
    that does not close its underlying buffer.

    An optional ``original_fd`` preserves the file descriptor of the
    stream being replaced, so that C-level consumers that call
    :meth:`fileno` (``faulthandler``, ``subprocess``, ...) still work.
    Inspired by pytest's ``capsys``/``capfd`` split: see :doc:`/testing`
    for details.

    .. versionchanged:: 8.3.3
        Added ``original_fd`` parameter and :meth:`fileno` override.
    r=   )Úoriginal_fdc               óP   •— t        ‰| �  |fi |¤Ž || _        || _        || _        y r   )rK   r   Ú_nameÚ_modeÚ_original_fd)r   ÚbufferÚnameÚmoder`   ÚkwargsrM   s         €r   r   z_NamedTextIOWrapper.__init__u   s-   ø€ ô 	‰Ñ˜Ñ* 6Ò*ØˆŒ
ØˆŒ
Ø'ˆÕr   c                 ó   — y)zÃThe buffer this object contains belongs to some other object,
        so prevent the default ``__del__`` implementation from closing
        that buffer.

        .. versionadded:: 8.3.2
        NrC   r2   s    r   Úclosez_NamedTextIOWrapper.closeƒ   s   � r   c                óV   •— | j                   dk\  r| j                   S t        ‰| �	  «       S )ax  Return the file descriptor of the original stream, if one was
        provided at construction time.

        This allows C-level consumers (``faulthandler``, ``subprocess``,
        signal handlers, ...) to obtain a valid fd without crashing, even
        though the Python-level writes are redirected to an in-memory
        buffer.

        .. versionadded:: 8.3.3
        r   )rd   rK   ÚfilenorP   s    €r   rl   z_NamedTextIOWrapper.fileno‹   s,   ø€ ð ×Ñ Ò!Ø×$Ñ$Ð$Ü‰w‰~ÓÐr   c                ó   — | j                   S r   )rb   r2   s    r   rf   z_NamedTextIOWrapper.nameš   ó   € à�z‰zÐr   c                ó   — | j                   S r   )rc   r2   s    r   rg   z_NamedTextIOWrapper.modež   rn   r   )re   r7   rf   r:   rg   r:   r`   r>   rh   r;   r8   r9   rS   )r8   r>   r?   )r@   rA   rB   rT   r   rj   rl   Úpropertyrf   rg   rU   rV   s   @r   r_   r_   g   s~   ø„ ñð& ñ(àð(ð ð(ð ð	(ð ð(ð ð(ð 
õ(óõ ð òó ðð òó ôr   r_   c                óì   — t        | d«      r.t        t        j                  d| «      «      }|�|S t	        d«      ‚| €d} n!t        | t        «      r| j                  |«      } t        j                  | «      S )Nr$   út.IO[t.Any]z.Could not find binary reader for input stream.r   )
Úhasattrr
   ÚtÚcastÚ	TypeErrorÚ
isinstancer:   ÚencoderZ   r[   )r   Úcharsetr!   s      r   Úmake_input_streamrz   £   sj   € ô ˆu�fÔÜ ¤§¡¨°uÓ!=Ó>ˆàˆ>ØˆIäÐHÓIÐIà€}Ø‰Ü	�Eœ3Ô	Ø—‘˜WÓ%ˆä�:‰:�eÓÐr   c                  óx   — e Zd ZdZ	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d„Zed
d„«       Zed
d„«       Zed
d„«       Zd
d„Z	y)ÚResultaC  Holds the captured result of an invoked CLI script.

    :param runner: The runner that created the result
    :param stdout_bytes: The standard output as bytes.
    :param stderr_bytes: The standard error as bytes.
    :param output_bytes: A mix of ``stdout_bytes`` and ``stderr_bytes``, as the
        user would see  it in its terminal.
    :param return_value: The value returned from the invoked command.
    :param exit_code: The exit code as integer.
    :param exception: The exception that happened if one did.
    :param exc_info: Exception information (exception type, exception instance,
        traceback type).

    .. versionchanged:: 8.2
        ``stderr_bytes`` no longer optional, ``output_bytes`` introduced and
        ``mix_stderr`` has been removed.

    .. versionadded:: 8.0
        Added ``return_value``.
    Nc	                ót   — || _         || _        || _        || _        || _        || _        || _        || _        y r   ©ÚrunnerÚstdout_bytesÚstderr_bytesÚoutput_bytesÚreturn_valueÚ	exit_codeÚ	exceptionÚexc_info)	r   r   r€   r�   r‚   rƒ   r„   r…   r†   s	            r   r   zResult.__init__Í   s@   € ð ˆŒØ(ˆÔØ(ˆÔØ(ˆÔØ(ˆÔØ"ˆŒØ"ˆŒØ ˆ�r   c                ó‚   — | j                   j                  | j                  j                  d«      j	                  dd«      S )a  The terminal output as unicode string, as the user would see it.

        .. versionchanged:: 8.2
            No longer a proxy for ``self.stdout``. Now has its own independent stream
            that is mixing `<stdout>` and `<stderr>`, in the order they were written.
        Úreplaceú
ú
)r‚   Údecoder   ry   rˆ   r2   s    r   r   zResult.outputâ   s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r   c                ó‚   — | j                   j                  | j                  j                  d«      j	                  dd«      S )z&The standard output as unicode string.rˆ   r‰   rŠ   )r€   r‹   r   ry   rˆ   r2   s    r   r\   zResult.stdoutî   s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r   c                ó‚   — | j                   j                  | j                  j                  d«      j	                  dd«      S )zŸThe standard error as unicode string.

        .. versionchanged:: 8.2
            No longer raise an exception, always returns the `<stderr>` string.
        rˆ   r‰   rŠ   )r�   r‹   r   ry   rˆ   r2   s    r   r]   zResult.stderrõ   s9   € ð × Ñ ×'Ñ'¨¯©×(;Ñ(;¸YÓG×OÑOØ�Dó
ð 	
r   c                ó€   — | j                   rt        | j                   «      nd}dt        | «      j                  › d|› d�S )NÚokayú<ú ú>)r…   r5   Útyper@   )r   Úexc_strs     r   r6   zResult.__repr__   s8   € Ø*.¯.ª.”$�t—~‘~Ô&¸fˆØ”4˜“:×&Ñ&Ð' q¨¨	°Ð3Ð3r   r   )r   Ú	CliRunnerr€   r<   r�   r<   r‚   r<   rƒ   r;   r„   r>   r…   zBaseException | Noner†   z?tuple[type[BaseException], BaseException, TracebackType] | Noner?   )
r@   rA   rB   rT   r   rp   r   r\   r]   r6   rC   r   r   r|   r|   ·   s    „ ñð> ð!àð!ð ð!ð ð	!ð
 ð!ð ð!ð ð!ð (ð!ðó!ð* ò	
ó ð	
ð ò
ó ð
ð ò
ó ð
ô4r   r|   c                  óì   — e Zd ZdZ	 	 	 	 d		 	 	 	 	 	 	 	 	 d
d„Zdd„Z	 d	 	 	 dd„Zej                  	 	 	 d	 	 	 	 	 	 	 dd„«       Z		 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z
ej                  	 d	 	 	 dd„«       Zy)r•   aë  The CLI runner provides functionality to invoke a Click command line
    script for unittesting purposes in a isolated environment.  This only
    works in single-threaded systems without any concurrency as it changes the
    global interpreter state.

    :param charset: the character set for the input and output data.
    :param env: a dictionary with environment variables for overriding.
    :param echo_stdin: if this is set to `True`, then reading from `<stdin>` writes
                       to `<stdout>`.  This is useful for showing examples in
                       some circumstances.  Note that regular prompts
                       will automatically echo the input.
    :param catch_exceptions: Whether to catch any exceptions other than
                             ``SystemExit`` when running :meth:`~CliRunner.invoke`.

    .. versionchanged:: 8.2
        Added the ``catch_exceptions`` parameter.

    .. versionchanged:: 8.2
        ``mix_stderr`` parameter has been removed.
    Nc                óD   — || _         |xs i | _        || _        || _        y r   )ry   ÚenvÚ
echo_stdinÚcatch_exceptions)r   ry   r˜   r™   rš   s        r   r   zCliRunner.__init__  s%   € ð ˆŒØ25²)¸ˆŒØ$ˆŒØ 0ˆÕr   c                ó"   — |j                   xs dS )zžGiven a command object it will return the default program name
        for it.  The default is the `name` attribute or ``"root"`` if not
        set.
        Úroot)rf   )r   Úclis     r   Úget_default_prog_namezCliRunner.get_default_prog_name'  s   € ð
 �x‰xÒ!˜6Ð!r   c                óV   — t        | j                  «      }|r|j                  |«       |S )z8Returns the environment overrides for invoking a script.)Údictr˜   Úupdate)r   Ú	overridesr!   s      r   Úmake_envzCliRunner.make_env.  s%   € ô �$—(‘(‹^ˆÙØ�I‰I�iÔ Øˆ	r   c              #  ól	  ‡‡‡K  — t        || j                  «      }d}t        j                  }t        j                  }t        j
                  }t        j                  }	dt        _        | j                  |«      }t        «       }
dd„} ||«      } ||«      }| j                  r:t        j                  t        j                  t        ||
j                  «      «      x}}t        || j                  dd¬«      xt        _        Š| j                  rd‰_        t        |
j                  | j                  dd	|¬
«      t        _        t        |
j
                  | j                  dd	d|¬«      t        _        t#        |«      ddˆfd„«       }t#        |«      ddˆfd„«       }t#        |«      dd„«       }|Š	 d	 	 	 	 	 dˆfd„}t$        j&                  }t$        j(                  }t$        j*                  }t,        j.                  }t0        j.                  }t2        j4                  j6                  Š|t$        _        |t$        _        |t$        _        |t,        _        |t0        _        	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dˆfd„}|t2        j4                  _        i }	 |j9                  «       D ]O  \  }}t:        j<                  j?                  |«      ||<   |€	 t:        j<                  |= Œ=|t:        j<                  |<   ŒQ |
j                  |
j
                  |
jB                  f–— |j9                  «       D ]-  \  }}|€	 t:        j<                  |= Œ|t:        j<                  |<   Œ/ |t        _        |t        _        |t        _        |t$        _        |t$        _        |t$        _        |t,        _        |t0        _        |	t        _        ‰t2        j4                  _        y# t@        $ r Y �Œ<w xY w# t@        $ r Y ŒÄw xY w# |j9                  «       D ]<  \  }}|€"	 t:        j<                  |= Œ# t@        $ r Y Œ&w xY w|t:        j<                  |<   Œ> |t        _        |t        _        |t        _        |t$        _        |t$        _        |t$        _        |t,        _        |t0        _        |	t        _        ‰t2        j4                  _        w xY w­w)a\  A context manager that sets up the isolation for invoking of a
        command line tool.  This sets up `<stdin>` with the given input data
        and `os.environ` with the overrides from the given dictionary.
        This also rebinds some internals in Click to be mocked (like the
        prompt functionality).

        This is automatically done in the :meth:`invoke` method.

        :param input: the input stream to put into `sys.stdin`.
        :param env: the environment overrides as dictionary.
        :param color: whether the output should contain color codes. The
                      application can still override this explicitly.

        .. versionadded:: 8.2
            An additional output stream is returned, which is a mix of
            `<stdout>` and `<stderr>` streams.

        .. versionchanged:: 8.2
            Always returns the `<stderr>` stream.

        .. versionchanged:: 8.0
            `<stderr>` is opened with ``errors="backslashreplace"``
            instead of the default ``"strict"``.

        .. versionchanged:: 4.0
            Added the ``color`` parameter.
        NéP   c                ób   — 	 | j                  «       S # t        t        j                  f$ r Y yw xY w)Nr=   )rl   ÚAttributeErrorrZ   ÚUnsupportedOperationrE   s    r   Ú_safe_filenoz)CliRunner.isolation.<locals>._safe_filenok  s0   € ðØ—}‘}“Ð&øÜ"¤B×$;Ñ$;Ð<ò Ùðús   ‚ ’.­.z<stdin>Úr)Úencodingrf   rg   r   z<stdout>Úw)r«   rf   rg   r`   z<stderr>Úbackslashreplace)r«   rf   rg   Úerrorsr`   c                ó<  •— t         j                  j                  | xs d«       	 t        ‰«      j	                  d«      }t         j                  j                  |› d�«       t         j                  j                  «        |S # t
        $ r}t        «       |‚d }~ww xY w)NÚ r‰   rŠ   )Úsysr\   r    ÚnextÚrstripÚStopIterationÚEOFErrorrO   )ÚpromptÚvalÚeÚ
text_inputs      €r   Úvisible_inputz*CliRunner.isolation.<locals>.visible_input“  s~   ø€ ä�J‰J×Ñ˜Vš\ rÔ*ð(Ü˜:Ó&×-Ñ-¨fÓ5�ô �J‰J×Ñ ˜u B˜ZÔ(Ü�J‰J×ÑÔØˆJøô	 !ò (Ü“j aÐ'ûð(ús   ¦B Â	BÂBÂBc                óú   •— t         j                  j                  | xs d› d�«       t         j                  j                  «        	 t	        ‰«      j                  d«      S # t        $ r}t        «       |‚d }~ww xY w)Nr°   rŠ   r‰   )r±   r\   r    rO   r²   r³   r´   rµ   )r¶   r¸   r¹   s     €r   Úhidden_inputz)CliRunner.isolation.<locals>.hidden_inputž  se   ø€ ä�J‰J×Ñ ¢¨"˜~¨RÐ0Ô1Ü�J‰J×ÑÔð(Ü˜JÓ'×.Ñ.¨vÓ6Ð6øÜ ò (Ü“j aÐ'ûð(ús   ÁA! Á!	A:Á*A5Á5A:c                óÂ   — t         j                  j                  d«      }| rt         j                  j	                  |«       t         j                  j                  «        |S )Nr   )r±   Ústdinr$   r\   r    rO   )ÚechoÚchars     r   Ú_getcharz%CliRunner.isolation.<locals>._getchar§  s>   € ä—9‘9—>‘> !Ó$ˆDáÜ—
‘
× Ñ  Ô&ä�J‰J×ÑÔØˆKr   c                ó   •— |€‰ S | S r   rC   )rF   ÚcolorÚdefault_colors     €r   Úshould_strip_ansiz.CliRunner.isolation.<locals>.should_strip_ansi³  s   ø€ ð ˆ}Ø(Ð(Ð(Ø�9Ðr   c                óh   •— |€t         j                  }|€t         j                  } ‰| f|||dœ|¤Ž y)ab  Default ``pdb.Pdb`` to real terminal streams during
            ``CliRunner`` isolation.

            Without this patch, ``pdb.Pdb.__init__`` inherits from
            ``cmd.Cmd`` which falls back to ``sys.stdin``/``sys.stdout``
            when no explicit streams are provided. During isolation
            those are ``BytesIO``-backed wrappers, so the debugger
            reads from an empty buffer and writes to captured output,
            making interactive debugging impossible.

            By defaulting to ``sys.__stdin__``/``sys.__stdout__`` (the
            original terminal streams Python preserves regardless of
            redirection), debuggers can interact with the user while
            ``click.echo`` output is still captured normally.

            This covers ``pdb.set_trace()``, ``breakpoint()``,
            ``pdb.post_mortem()``, and debuggers that subclass
            ``pdb.Pdb`` (ipdb, pdbpp). Explicit ``stdin``/``stdout``
            arguments are honored and not overridden. Debuggers that
            do not subclass ``pdb.Pdb`` (pudb, debugpy) are not
            covered.
            N)Úcompletekeyr¾   r\   )r±   Ú	__stdin__Ú
__stdout__)r   rÇ   r¾   r\   rh   Úold_pdb_inits        €r   Ú_patched_pdb_initz.CliRunner.isolation.<locals>._patched_pdb_initÆ  s@   ø€ ð: ˆ}ÜŸ™�Øˆ~ÜŸ™�ÙØðØ"-°UÀ6ñØMSór   )rF   rr   r8   r>   r   )r¶   z
str | Noner8   r:   )r¿   Úboolr8   r:   )NN)rF   zt.IO[t.Any] | NonerÃ   úbool | Noner8   rÌ   )ÚtabNN)r   zpdb.PdbrÇ   r:   r¾   út.IO[str] | Noner\   rÏ   rh   r;   r8   r9   )"rz   ry   r±   r¾   r\   r]   r   ÚFORCED_WIDTHr£   rX   r™   rt   ru   ÚBinaryIOr   r_   Ú_CHUNK_SIZErG   r   Úvisible_prompt_funcÚhidden_prompt_funcrÁ   r	   rÅ   r   ÚpdbÚPdbr   ÚitemsÚosÚenvironÚgetÚ	Exceptionr   )r   r   r˜   rÃ   Úbytes_inputÚ
echo_inputÚ	old_stdinÚ
old_stdoutÚ
old_stderrÚold_forced_widthÚstream_mixerr©   Úold_stdout_fdÚold_stderr_fdrº   r¼   rÁ   rÅ   Úold_visible_prompt_funcÚold_hidden_prompt_funcÚold__getchar_funcÚold_should_strip_ansiÚold__compat_should_strip_ansirË   Úold_envÚkeyÚvaluerÄ   rÊ   r¹   s                              @@@r   Ú	isolationzCliRunner.isolation7  sJ  úè ø€ ôD (¨¨t¯|©|Ó<ˆØˆ
ä—I‘Iˆ	Ü—Z‘Zˆ
Ü—Z‘Zˆ
Ü%×2Ñ2ÐØ"$Œ
Ôà�m‰m˜CÓ ˆä"“}ˆó	ñ % ZÓ0ˆÙ$ ZÓ0ˆà�?Š?Ü'(§v¡vÜ—
‘
œL¨°l×6IÑ6IÓJó(ð ˆK˜*ô "5Ø $§,¡,°YÀSô"
ð 	
ŒŒ	�Jð �?Š?ð &'ˆJÔ"ä(Ø×ÑØ—\‘\ØØØ%ô
ŒŒ
ô )Ø×ÑØ—\‘\ØØØ%Ø%ô
ŒŒ
ô 
�ZÓ	 õ	ó 
!ð	ô 
�ZÓ	 õ	(ó 
!ð	(ô 
�ZÓ	 ò	ó 
!ð	ð ˆð EIð	Ø&ð	Ø6Að	àõ	ô #)×"<Ñ"<ÐÜ!'×!:Ñ!:ÐÜ"ŸO™OÐÜ %× 7Ñ 7ÐÜ(/×(AÑ(AÐ%Ü—w‘w×'Ñ'ˆØ%2ŒÔ"Ø$0ŒÔ!Ø"ŒŒØ"3ŒÔØ$5ŒÔ!ð  %Ø&*Ø'+ð	#	Øð#	àð#	ð $ð#	ð %ð	#	ð
 ð#	ð õ#	ðJ -Œ�‰Ôàˆð	,Ø!Ÿi™i›kò ,‘
��UÜ!Ÿz™zŸ~™~¨cÓ2�˜‘Ø�=ðÜŸJ™J s™Oð ',”B—J‘J˜s’Oð,ð  ×&Ñ&¨×(;Ñ(;¸\×=PÑ=PÐQÒQà%Ÿm™m›oò ,‘
��UØ�=ðÜŸJ™J s™Oð ',”B—J‘J˜s’Oð,ð $ŒCŒJØ#ŒCŒJØ!ŒCŒIØ)@ŒFÔ&Ø(>ŒFÔ%Ø/ŒFŒOØ&;ŒEÔ#Ø(EŒGÔ%Ø&6ŒJÔ#Ø+ŒC�G‰GÕøô/ %ò Úðûô %ò Ùðûð	 &Ÿm™m›oò ,‘
��UØ�=ðÜŸJ™J s™OøÜ$ò Ùðúð ',”B—J‘J˜s’Oð,ð $ŒCŒJØ#ŒCŒJØ!ŒCŒIØ)@ŒFÔ&Ø(>ŒFÔ%Ø/ŒFŒOØ&;ŒEÔ#Ø(EŒGÔ%Ø&6ŒJÔ#Ø+ŒC�G‰GÕüsŒ   …JR4Ê	:O( ËO	Ë;O( ÌR4Ì)OÌ:BR4Ï		OÏO( ÏOÏO( Ï	O%Ï"R4Ï$O%Ï%R4Ï(R1ÐPÐR1Ð	P 	ÐR1ÐP 	Ð BR1Ò1R4c           
     ó&  — d}|€| j                   }| j                  |||¬«      5 }	d}
d}d}t        |t        «      rt	        j
                  |«      }	 |j                  d«      }	  |j                  d|xs d|dœ|¤Ž}
t        j"                  j)                  «        t        j*                  j)                  «        |	d   j-                  «       }|	d	   j-                  «       }|	d
   j-                  «       }	 ddd«       t/        | 
|¬«      S # t        $ r | j                  |«      }Y ŒÇw xY w# t        $ r¥}t        j                  «       }t        j                  d|j                  «      }|€d}|dk7  r|}t        |t         «      sIt        j"                  j%                  t        |«      «       t        j"                  j%                  d«       d	}|}Y d}~�ŒZd}~wt&        $ r&}|s‚ |}d	}t        j                  «       }Y d}~�Œ‡d}~ww xY w# t        j"                  j)                  «        t        j*                  j)                  «        |	d   j-                  «       }|	d	   j-                  «       }|	d
   j-                  «       }w xY w# 1 sw Y   �Œ•xY w)a{  Invokes a command in an isolated environment.  The arguments are
        forwarded directly to the command line script, the `extra` keyword
        arguments are passed to the :meth:`~clickpkg.Command.main` function of
        the command.

        This returns a :class:`Result` object.

        :param cli: the command to invoke
        :param args: the arguments to invoke. It may be given as an iterable
                     or a string. When given as string it will be interpreted
                     as a Unix shell command. More details at
                     :func:`shlex.split`.
        :param input: the input data for `sys.stdin`.
        :param env: the environment overrides.
        :param catch_exceptions: Whether to catch any other exceptions than
                                 ``SystemExit``. If :data:`None`, the value
                                 from :class:`CliRunner` is used.
        :param extra: the keyword arguments to pass to :meth:`main`.
        :param color: whether the output should contain color codes. The
                      application can still override this explicitly.

        .. versionadded:: 8.2
            The result object has the ``output_bytes`` attribute with
            the mix of ``stdout_bytes`` and ``stderr_bytes``, as the user would
            see it in its terminal.

        .. versionchanged:: 8.2
            The result object always returns the ``stderr_bytes`` stream.

        .. versionchanged:: 8.0
            The result object has the ``return_value`` attribute with
            the value returned from the invoked command.

        .. versionchanged:: 4.0
            Added the ``color`` parameter.

        .. versionchanged:: 3.0
            Added the ``catch_exceptions`` parameter.

        .. versionchanged:: 3.0
            The result object has the ``exc_info`` attribute with the
            traceback if available.
        N)r   r˜   rÃ   r   Ú	prog_namerC   )Úargsrï   zint | t.Any | NonerŠ   r   é   r~   )rš   rí   rw   r:   ÚshlexÚsplitÚpopÚKeyErrorrž   ÚmainÚ
SystemExitr±   r†   rt   ru   Úcoder>   r\   r    rÛ   rO   r]   Úgetvaluer|   )r   r�   rð   r   r˜   rš   rÃ   Úextrar†   Ú
outstreamsrƒ   r…   r„   rï   r¸   Úe_coder\   r]   r   s                      r   ÚinvokezCliRunner.invoke  sG  € ðj ˆØÐ#Ø#×4Ñ4Ðà�^‰^ %¨S¸ˆ^Ó>ð +	2À*ØˆLØ.2ˆIØˆIä˜$¤Ô$Ü—{‘{ 4Ó(�ð<Ø!ŸI™I kÓ2�	ð2Ø'˜sŸx™xÐV¨TªZ°RÀ9ÑVÐPUÑV�ô2 —
‘
× Ñ Ô"Ü—
‘
× Ñ Ô"Ø# A™×/Ñ/Ó1�Ø# A™×/Ñ/Ó1�Ø# A™×/Ñ/Ó1‘÷W+	2ôZ ØØØØØ%ØØØô	
ð 		
øôG ò <Ø ×6Ñ6°sÓ;’	ð<ûô
 ò #ÜŸ<™<›>�ÜŸ™Ð 4°a·f±fÓ=�à�>Ø�Fà˜Q’;Ø !�Iä! &¬#Ô.Ü—J‘J×$Ñ$¤S¨£[Ô1Ü—J‘J×$Ñ$ TÔ*Ø�Fà"–	ûäò *Ù'ØØ�	Ø�	ÜŸ<™<›>–ûð*ûô —
‘
× Ñ Ô"Ü—
‘
× Ñ Ô"Ø# A™×/Ñ/Ó1�Ø# A™×/Ñ/Ó1�Ø# A™×/Ñ/Ó1‘ú÷W+	2ñ +	2úst   ¥,JÁDÁ$D.Á=A5JÄD+Ä(JÄ*D+Ä+JÄ.	H	Ä7BGÇHÇH	Ç#HÇ>HÈH	È	HÈA7JÊJÊJc              #  ó’  K  — t        j                  «       }t        j                  |¬«      }t        j                  |«       	 |–— t        j                  |«       |€ddl}	 |j                  |«       yy# t        $ r Y yw xY w# t        j                  |«       |€&ddl}	 |j                  |«       w # t        $ r Y w w xY ww xY w­w)aã  A context manager that creates a temporary directory and
        changes the current working directory to it. This isolates tests
        that affect the contents of the CWD to prevent them from
        interfering with each other.

        :param temp_dir: Create the temporary directory under this
            directory. If given, the created directory is not removed
            when exiting.

        .. versionchanged:: 8.0
            Added the ``temp_dir`` parameter.
        )ÚdirNr   )rØ   ÚgetcwdÚtempfileÚmkdtempÚchdirÚshutilÚrmtreeÚOSError)r   Útemp_dirÚcwdÚdtr  s        r   Úisolated_filesystemzCliRunner.isolated_filesystem~  s´   è ø€ ô  �i‰i‹kˆÜ×Ñ (Ô+ˆÜ
�‰�Œð	ØŠHä�H‰H�SŒMàÐÛðØ—M‘M "Õ%ð	  øô
 ò Ùðûô �H‰H�SŒMàÐÛðØ—M‘M "Õ%øÜò Ùðúð  üsf   ‚A CÁB ÁCÁ#A6 Á4CÁ6	BÁ?CÂBÂCÂCÂ"B4Â3CÂ4	C Â=CÂ?C Ã CÃC)zutf-8NFT)
ry   r:   r˜   ú$cabc.Mapping[str, str | None] | Noner™   rÌ   rš   rÌ   r8   r9   )r�   r   r8   r:   r   )r¢   r  r8   zcabc.Mapping[str, str | None])NNF)r   ú str | bytes | t.IO[t.Any] | Noner˜   r  rÃ   rÌ   r8   z8cabc.Iterator[tuple[io.BytesIO, io.BytesIO, io.BytesIO]])NNNNF)r�   r   rð   zstr | cabc.Sequence[str] | Noner   r  r˜   r  rš   rÍ   rÃ   rÌ   rú   r;   r8   r|   )r  zstr | os.PathLike[str] | Noner8   zcabc.Iterator[str])r@   rA   rB   rT   r   rž   r£   Ú
contextlibÚcontextmanagerrí   rý   r
  rC   r   r   r•   r•     sY  „ ñð. Ø48Ø Ø!%ð
1àð
1ð 2ð
1ð ð	
1ð
 ð
1ð 
ó
1ó"ð AEðØ=ðà	&óð ×Ñð 37Ø48Øð	S,à/ðS,ð 2ðS,ð ð	S,ð
 
BòS,ó ðS,ðp 15Ø26Ø48Ø(,Øðo
àðo
ð .ðo
ð 0ð	o
ð
 2ðo
ð &ðo
ð ðo
ð ðo
ð 
óo
ðb ×Ñà8<ðØ5ðà	òó ñr   r•   )rF   zEchoingStdin | Noner8   zcabc.Iterator[None])r   r  ry   r:   r8   r7   )&Ú
__future__r   Úcollections.abcÚabcÚcabcr  rZ   rØ   rÕ   rò   r±   r  Útypingrt   Útypesr   r°   r   r   r   r	   r
   ÚTYPE_CHECKINGÚ	_typeshedr   Úcorer   r   r  rG   r[   rI   rX   ÚTextIOWrapperr_   rz   r|   r•   rC   r   r   ú<module>r     sÌ   ðÝ "å Û Û 	Û 	Û 
Û Û 
Û Û Ý å Ý Ý Ý Ý (à‡?‚?Ý(å÷!ñ !ðD ×Ñòó ðô �"—*‘*ô  ÷&Cñ Cô9˜"×*Ñ*ô 9ðxØ+ðØ69ðàó÷(K4ñ K4÷\Xò Xr   