§
    „ßjº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j        d#d„¦   «         Z G d„ dej        ¦  «        Z G d„ d¦  «        Z  G d„ dej!        ¦  «        Z"d$d„Z# G d„ d ¦  «        Z$ G d!„ d"¦  «        Z%dS )%é    )ÚannotationsN)ÚTracebackTypeé   )Ú_compat)Ú
formatting)Útermui)Úutils)Ú_find_binary_reader)ÚReadableBuffer)ÚCommandc                  ó\   — 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dS )"ÚEchoingStdinÚinputú
t.BinaryIOÚoutputÚreturnÚNonec                ó0   — || _         || _        d| _        d S )NF)Ú_inputÚ_outputÚ_paused)Úselfr   r   s      ú@/var/www/html/venv/lib/python3.11/site-packages/click/testing.pyÚ__init__zEchoingStdin.__init__   s   € ØˆŒØˆŒØˆŒˆˆó    ÚxÚstrút.Anyc                ó,   — t          | j        |¦  «        S ©N)Úgetattrr   )r   r   s     r   Ú__getattr__zEchoingStdin.__getattr__    s   € Ý�t”{ AÑ&Ô&Ð&r   ÚrvÚbytesc                óH   — | j         s| j                             |¦  «         |S r    )r   r   Úwrite)r   r#   s     r   Ú_echozEchoingStdin._echo#   s'   € ØŒ|ð 	#ØŒL×Ò˜rÑ"Ô"Ð"àˆ	r   éÿÿÿÿÚnÚintc                ó\   — |                       | j                             |¦  «        ¦  «        S r    )r'   r   Úread©r   r)   s     r   r,   zEchoingStdin.read)   s$   € Ø�zŠz˜$œ+×*Ò*¨1Ñ-Ô-Ñ.Ô.Ð.r   c                ó\   — |                       | j                             |¦  «        ¦  «        S r    )r'   r   Úread1r-   s     r   r/   zEchoingStdin.read1,   s$   € Ø�zŠz˜$œ+×+Ò+¨AÑ.Ô.Ñ/Ô/Ð/r   c                ó\   — |                       | j                             |¦  «        ¦  «        S r    )r'   r   Úreadliner-   s     r   r1   zEchoingStdin.readline/   s$   € Ø�zŠz˜$œ+×.Ò.¨qÑ1Ô1Ñ2Ô2Ð2r   úlist[bytes]c                óN   ‡ — ˆ fd„‰ j                              ¦   «         D ¦   «         S )Nc                ó:   •— g | ]}‰                      |¦  «        ‘ŒS © ©r'   ©Ú.0r   r   s     €r   ú
<listcomp>z*EchoingStdin.readlines.<locals>.<listcomp>3   s#   ø€ Ð?Ð?Ð? !�—
’
˜1‘”Ð?Ð?Ð?r   )r   Ú	readlines©r   s   `r   r:   zEchoingStdin.readlines2   s+   ø€ Ø?Ð?Ð?Ð? t¤{×'<Ò'<Ñ'>Ô'>Ð?Ñ?Ô?Ð?r   úcabc.Iterator[bytes]c                óD   ‡ — t          ˆ fd„‰ j        D ¦   «         ¦  «        S )Nc              3  óB   •K  — | ]}‰                      |¦  «        V — Œd S r    r6   r7   s     €r   ú	<genexpr>z(EchoingStdin.__iter__.<locals>.<genexpr>6   s-   øè è € Ð7Ð7 a�D—J’J˜q‘M”MÐ7Ð7Ð7Ð7Ð7Ð7r   )Úiterr   r;   s   `r   Ú__iter__zEchoingStdin.__iter__5   s(   ø€ ÝÐ7Ð7Ð7Ð7¨4¬;Ð7Ñ7Ô7Ñ7Ô7Ð7r   c                ó*   — t          | j        ¦  «        S r    )Úreprr   r;   s    r   Ú__repr__zEchoingStdin.__repr__8   s   € Ý�D”KÑ Ô Ð r   N)r   r   r   r   r   r   )r   r   r   r   )r#   r$   r   r$   )r(   )r)   r*   r   r$   )r   r2   )r   r<   ©r   r   )Ú__name__Ú
__module__Ú__qualname__r   r"   r'   r,   r/   r1   r:   rA   rD   r5   r   r   r   r      sÛ   € € € € € ðð ð ð ð
'ð 'ð 'ð 'ðð ð ð ð/ð /ð /ð /ð /ð0ð 0ð 0ð 0ð 0ð3ð 3ð 3ð 3ð 3ð@ð @ð @ð @ð8ð 8ð 8ð 8ð!ð !ð !ð !ð !ð !r   r   ÚstreamúEchoingStdin | Noner   úcabc.Iterator[None]c              #  ó>   K  — | €d V — d S d| _         d V — d| _         d S )NTF)r   ©rI   s    r   Ú_pause_echorN   <   s3   è è € à€~ØˆˆˆˆˆàˆŒØˆˆˆØˆŒˆˆr   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
    Úcopy_toú
io.BytesIOr   r   c                óV   •— t          ¦   «                              ¦   «          || _        d S r    )Úsuperr   rQ   )r   rQ   Ú	__class__s     €r   r   zBytesIOCopy.__init__L   s$   ø€ Ý‰Œ×ÒÑÔÐØˆŒˆˆr   c                óz   •— t          ¦   «                              ¦   «          | j                             ¦   «          d S r    )rT   ÚflushrQ   ©r   rU   s    €r   rW   zBytesIOCopy.flushP   s.   ø€ Ý‰Œ�Š‰ŒˆØŒ×ÒÑÔÐÐÐr   Úbr   r*   c                óz   •— | j                              |¦  «         t          ¦   «                              |¦  «        S r    )rQ   r&   rT   )r   rY   rU   s     €r   r&   zBytesIOCopy.writeT   s/   ø€ ØŒ×Ò˜1ÑÔÐÝ‰wŒw�}Š}˜QÑÔÐr   )rQ   rR   r   r   ©r   r   )rY   r   r   r*   )rF   rG   rH   Ú__doc__r   rW   r&   Ú__classcell__©rU   s   @r   rP   rP   F   sƒ   ø€ € € € € ðð ð
ð ð ð ð ð ðð ð ð ð ð ð ð  ð  ð  ð  ð  ð  ð  ð  ð  r   rP   c                  ó   — e Zd ZdZdd„ZdS )ÚStreamMixerz‚Mixes `<stdout>` and `<stderr>` streams.

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

    .. versionadded:: 8.2
    r   r   c                óž   — t          j        ¦   «         | _        t          | j        ¬¦  «        | _        t          | j        ¬¦  «        | _        d S )N)rQ   )ÚioÚBytesIOr   rP   ÚstdoutÚstderrr;   s    r   r   zStreamMixer.__init__a   s;   € Ý"$¤*¡,¤,ˆŒÝ"-°d´kÐ"BÑ"BÔ"BˆŒÝ"-°d´kÐ"BÑ"BÔ"BˆŒˆˆr   Nr[   )rF   rG   rH   r\   r   r5   r   r   r`   r`   Y   s8   € € € € € ðð ðCð Cð Cð Cð Cð Cr   r`   c                  ón   ‡ — 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_fdÚbufferr   Únamer   Úmoderh   r*   Úkwargsr   r   r   c               óf   •—  t          ¦   «         j        |fi |¤Ž || _        || _        || _        d S r    )rT   r   Ú_nameÚ_modeÚ_original_fd)r   ri   rj   rk   rh   rl   rU   s         €r   r   z_NamedTextIOWrapper.__init__u   s@   ø€ ð 	�‰ŒÔ˜Ð*Ð* 6Ð*Ð*Ð*ØˆŒ
ØˆŒ
Ø'ˆÔÐÐr   c                ó   — dS )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
        Nr5   r;   s    r   Úclosez_NamedTextIOWrapper.closeƒ   s   € € € r   c                óh   •— | 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   )rp   rT   ÚfilenorX   s    €r   rt   z_NamedTextIOWrapper.fileno‹   s0   ø€ ð Ô Ò!Ð!ØÔ$Ð$Ý‰wŒw�~Š~ÑÔÐr   c                ó   — | j         S r    )rn   r;   s    r   rj   z_NamedTextIOWrapper.nameš   ó
   € àŒzÐr   c                ó   — | j         S r    )ro   r;   s    r   rk   z_NamedTextIOWrapper.modež   rv   r   )ri   r   rj   r   rk   r   rh   r*   rl   r   r   r   r[   )r   r*   rE   )rF   rG   rH   r\   r   rr   rt   Úpropertyrj   rk   r]   r^   s   @r   rg   rg   g   sÈ   ø€ € € € € ðð ð& ð(ð (ð (ð (ð (ð (ð (ð (ðð ð ð ð ð  ð  ð  ð  ð  ð ðð ð ñ „Xðð ðð ð ñ „Xðð ð ð ð r   rg   r   ú str | bytes | t.IO[t.Any] | NoneÚcharsetr   r   c                ó  — t          | d¦  «        r5t          t          j        d| ¦  «        ¦  «        }|�|S t	          d¦  «        ‚| €d} n*t          | t          ¦  «        r|                      |¦  «        } t          j	        | ¦  «        S )Nr,   út.IO[t.Any]z.Could not find binary reader for input stream.r   )
Úhasattrr
   ÚtÚcastÚ	TypeErrorÚ
isinstancer   Úencoderb   rc   )r   rz   r#   s      r   Úmake_input_streamrƒ   £   sˆ   € õ ˆu�fÑÔð JÝ ¥¤¨°uÑ!=Ô!=Ñ>Ô>ˆàˆ>ØˆIåÐHÑIÔIÐIà€}ØˆˆÝ	�E�3Ñ	Ô	ð &Ø—’˜WÑ%Ô%ˆåŒ:�eÑÔÐr   c                  ón   — 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	dS )Ú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``.
    NÚrunnerÚ	CliRunnerÚstdout_bytesr$   Ústderr_bytesÚoutput_bytesÚreturn_valuer   Ú	exit_coder*   Ú	exceptionúBaseException | NoneÚexc_infoú?tuple[type[BaseException], BaseException, TracebackType] | Nonec	                óv   — || _         || _        || _        || _        || _        || _        || _        || _        d S r    ©r†   rˆ   r‰   rŠ   r‹   rŒ   r�   r�   )	r   r†   rˆ   r‰   rŠ   r‹   rŒ   r�   r�   s	            r   r   zResult.__init__Í   sD   € ð ˆŒØ(ˆÔØ(ˆÔØ(ˆÔØ(ˆÔØ"ˆŒØ"ˆŒØ ˆŒˆˆr   r   r   c                ót   — | j                              | j        j        d¦  «                             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†   rz   r”   r;   s    r   r   zResult.outputâ   s9   € ð Ô ×'Ò'¨¬Ô(;¸YÑGÔG×OÒOØ�Dñ
ô 
ð 	
r   c                ót   — | j                              | j        j        d¦  «                             dd¦  «        S )z&The standard output as unicode string.r”   r•   r–   )rˆ   r—   r†   rz   r”   r;   s    r   rd   zResult.stdoutî   s9   € ð Ô ×'Ò'¨¬Ô(;¸YÑGÔG×OÒOØ�Dñ
ô 
ð 	
r   c                ót   — | j                              | j        j        d¦  «                             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†   rz   r”   r;   s    r   re   zResult.stderrõ   s9   € ð Ô ×'Ò'¨¬Ô(;¸YÑGÔG×OÒOØ�Dñ
ô 
ð 	
r   c                ór   — | j         rt          | j         ¦  «        nd}dt          | ¦  «        j        › d|› d�S )NÚokayú<ú ú>)r�   rC   ÚtyperF   )r   Úexc_strs     r   rD   zResult.__repr__   s?   € Ø*.¬.ÐD•$�t”~Ñ&Ô&Ð&¸fˆØ3•4˜‘:”:Ô&Ð3Ð3¨Ð3Ð3Ð3Ð3r   r    )r†   r‡   rˆ   r$   r‰   r$   rŠ   r$   r‹   r   rŒ   r*   r�   rŽ   r�   r�   rE   )
rF   rG   rH   r\   r   rx   r   rd   re   rD   r5   r   r   r…   r…   ·   s°   € € € € € ðð ð> ð!ð !ð !ð !ð !ð* ð	
ð 	
ð 	
ñ „Xð	
ð ð
ð 
ð 
ñ „Xð
ð ð
ð 
ð 
ñ „Xð
ð4ð 4ð 4ð 4ð 4ð 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dS )0r‡   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.
    úutf-8NFTrz   r   Úenvú$cabc.Mapping[str, str | None] | NoneÚ
echo_stdinÚboolÚcatch_exceptionsr   r   c                óB   — || _         |pi | _        || _        || _        d S r    )rz   r£   r¥   r§   )r   rz   r£   r¥   r§   s        r   r   zCliRunner.__init__  s+   € ð ˆŒØ25°)¸ˆŒØ$ˆŒØ 0ˆÔÐÐr   Úclir   c                ó   — |j         p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)rj   )r   r©   s     r   Úget_default_prog_namezCliRunner.get_default_prog_name'  s   € ð
 ŒxÐ!˜6Ð!r   Ú	overridesúcabc.Mapping[str, str | None]c                ó\   — t          | j        ¦  «        }|r|                     |¦  «         |S )z8Returns the environment overrides for invoking a script.)Údictr£   Úupdate)r   r­   r#   s      r   Úmake_envzCliRunner.make_env.  s0   € õ �$”(‰^Œ^ˆØð 	!Ø�IŠI�iÑ Ô Ð Øˆ	r   r   ry   Úcolorú8cabc.Iterator[tuple[io.BytesIO, io.BytesIO, io.BytesIO]]c              #  óÚ  ‡‡‡K  — t          || j        ¦  «        }d}t          j        }t          j        }t          j        }t          j        }	dt          _        |                      |¦  «        }t          ¦   «         }
d)d„} ||¦  «        } ||¦  «        }| j
        r4t          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          j        j        Š|t$          _        |t$          _        |t$          _        |t,          _        |t0          _        	 	 	 d/d0ˆfd(„}|t2          j        _        i }	 |                     ¦   «         D ]W\  }}t:          j                             |¦  «        ||<   |€	 t:          j        |= Œ8# t@          $ r Y ŒDw xY w|t:          j        |<   ŒX|
j        |
j        |
j!        fV — |                     ¦   «         D ]5\  }}|€	 t:          j        |= Œ# t@          $ r Y Œ"w xY w|t:          j        |<   Œ6|t          _        |t          _        |t          _        |t$          _        |t$          _        |t$          _        |t,          _        |t0          _        |	t          _        ‰t2          j        _        dS # |                     ¦   «         D ]5\  }}|€	 t:          j        |= Œ# t@          $ r Y Œ"w xY w|t:          j        |<   Œ6|t          _        |t          _        |t          _        |t$          _        |t$          _        |t$          _        |t,          _        |t0          _        |	t          _        ‰t2          j        _        w xY w)1a\  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   rI   r|   r   r*   c                óf   — 	 |                       ¦   «         S # t          t          j        f$ r Y dS w xY w)Nr(   )rt   ÚAttributeErrorrb   ÚUnsupportedOperationrM   s    r   Ú_safe_filenoz)CliRunner.isolation.<locals>._safe_filenok  s?   € ðØ—}’}‘”Ð&øÝ"¥BÔ$;Ð<ð ð ð Ø�r�rðøøøs   ‚ –0¯0z<stdin>Úr)Úencodingrj   rk   r   z<stdout>Úw)r¼   rj   rk   rh   z<stderr>Úbackslashreplace)r¼   rj   rk   Úerrorsrh   Úpromptú
str | Noner   c                óT  •— t           j                             | pd¦  «         	 t          ‰¦  «                             d¦  «        }n!# t
          $ r}t          ¦   «         |‚d }~ww xY wt           j                             |› d�¦  «         t           j                             ¦   «          |S )NÚ r•   r–   )Úsysrd   r&   ÚnextÚrstripÚStopIterationÚEOFErrorrW   )rÀ   ÚvalÚeÚ
text_inputs      €r   Úvisible_inputz*CliRunner.isolation.<locals>.visible_input“  sŸ   ø€ åŒJ×Ò˜V˜\ rÑ*Ô*Ð*ð(Ý˜:Ñ&Ô&×-Ò-¨fÑ5Ô5��øÝ ð (ð (ð (Ý‘j”j aÐ'øøøøð(øøøåŒJ×Ò ˜Z˜Z˜ZÑ(Ô(Ð(ÝŒJ×ÒÑÔÐØˆJs   ¤"A Á
A%ÁA Á A%c                ó  •— t           j                             | pd› d�¦  «         t           j                             ¦   «          	 t	          ‰¦  «                             d¦  «        S # t          $ r}t          ¦   «         |‚d }~ww xY w)NrÃ   r–   r•   )rÄ   rd   r&   rW   rÅ   rÆ   rÇ   rÈ   )rÀ   rÊ   rË   s     €r   Úhidden_inputz)CliRunner.isolation.<locals>.hidden_inputž  s†   ø€ åŒJ×Ò  ¨"Ð0Ð0Ð0Ñ1Ô1Ð1ÝŒJ×ÒÑÔÐð(Ý˜JÑ'Ô'×.Ò.¨vÑ6Ô6Ð6øÝ ð (ð (ð (Ý‘j”j aÐ'øøøøð(øøøs   Á!A' Á'
BÁ1B Â BÚechor¦   c                óÂ   — t           j                             d¦  «        }| rt           j                             |¦  «         t           j                             ¦   «          |S )Nr   )rÄ   Ústdinr,   rd   r&   rW   )rÏ   Úchars     r   Ú_getcharz%CliRunner.isolation.<locals>._getchar§  sL   € å”9—>’> !Ñ$Ô$ˆDàð 'Ý”
× Ò  Ñ&Ô&Ð&åŒJ×ÒÑÔÐØˆKr   út.IO[t.Any] | Noner³   úbool | Nonec                ó   •— |€‰ S | S r    r5   )rI   r³   Údefault_colors     €r   Úshould_strip_ansiz.CliRunner.isolation.<locals>.should_strip_ansi³  s   ø€ ð ˆ}Ø(Ð(Ð(Ø�9Ðr   Útabr   úpdb.PdbÚcompletekeyrÑ   út.IO[str] | Nonerd   rl   r   r   c                óZ   •— |€t           j        }|€t           j        } ‰| f|||dœ|¤Ž dS )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)rÛ   rÑ   rd   )rÄ   Ú	__stdin__Ú
__stdout__)r   rÛ   rÑ   rd   rl   Úold_pdb_inits        €r   Ú_patched_pdb_initz.CliRunner.isolation.<locals>._patched_pdb_initÆ  sW   ø€ ð: ˆ}Ýœ�Øˆ~Ýœ�ØˆLØðØ"-°UÀ6ðð ØMSðð ð ð ð r   )rI   r|   r   r*   r    )rÀ   rÁ   r   r   )rÏ   r¦   r   r   )NN)rI   rÔ   r³   rÕ   r   r¦   )rÙ   NN)r   rÚ   rÛ   r   rÑ   rÜ   rd   rÜ   rl   r   r   r   )"rƒ   rz   rÄ   rÑ   rd   re   r   ÚFORCED_WIDTHr²   r`   r¥   r~   r   ÚBinaryIOr   rg   Ú_CHUNK_SIZErN   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  sÔ  øøøè è € õD (¨¨t¬|Ñ<Ô<ˆØˆ
å”Iˆ	Ý”Zˆ
Ý”Zˆ
Ý%Ô2ÐØ"$�
Ôà�mŠm˜CÑ Ô ˆå"‘}”}ˆð	ð 	ð 	ð 	ð %˜ ZÑ0Ô0ˆØ$˜ ZÑ0Ô0ˆàŒ?ð 	Ý'(¤vÝ”
�L¨°lÔ6IÑJÔJñ(ô (ð ˆK˜*õ "5Ø $¤,°YÀSð"
ñ "
ô "
ð 	
�Œ	�Jð Œ?ð 	'ð &'ˆJÔ"å(ØÔØ”\ØØØ%ð
ñ 
ô 
�Œ
õ )ØÔØ”\ØØØ%Ø%ð
ñ 
ô 
�Œ
õ 
�ZÑ	 Ô	 ð	ð 	ð 	ð 	ð 	ð 	ñ 
!Ô	 ð	õ 
�ZÑ	 Ô	 ð	(ð 	(ð 	(ð 	(ð 	(ð 	(ñ 
!Ô	 ð	(õ 
�ZÑ	 Ô	 ð	ð 	ð 	ñ 
!Ô	 ð	ð ˆð EIð	ð 	ð 	ð 	ð 	ð 	ð 	õ #)Ô"<ÐÝ!'Ô!:ÐÝ"œOÐÝ %Ô 7ÐÝ(/Ô(AÐ%Ý”wÔ'ˆØ%2�Ô"Ø$0�Ô!Ø"�ŒØ"3�ÔØ$5�Ô!ð  %Ø&*Ø'+ð	#	ð #	ð #	ð #	ð #	ð #	ð #	ðJ -�ŒÔàˆð	,Ø!Ÿiši™kœkð ,ð ,‘
��UÝ!œzŸ~š~¨cÑ2Ô2�˜‘Ø�=ðÝœJ s˜O˜OøÝ$ð ð ð Ø˜ðøøøð ',•B”J˜s‘O�OØÔ&¨Ô(;¸\Ô=PÐQÐQÐQÐQà%Ÿmšm™oœoð ,ð ,‘
��UØ�=ðÝœJ s˜O˜OøÝ$ð ð ð Ø˜ðøøøð ',•B”J˜s‘O�OØ#�CŒJØ#�CŒJØ!�CŒIØ)@�FÔ&Ø(>�FÔ%Ø/�FŒOØ&;�EÔ#Ø(E�GÔ%Ø&6�JÔ#Ø+�CŒGÔÐÐøð# &Ÿmšm™oœoð ,ð ,‘
��UØ�=ðÝœJ s˜O˜OøÝ$ð ð ð Ø˜ðøøøð ',•B”J˜s‘O�OØ#�CŒJØ#�CŒJØ!�CŒIØ)@�FÔ&Ø(>�FÔ%Ø/�FŒOØ&;�EÔ#Ø(E�GÔ%Ø&6�JÔ#Ø+�CŒGÔÐ+Ð+Ð+Ð+sg   É=N! ÊJ"Ê!N! Ê"
J/Ê,N! Ê.J/Ê/)N! Ë4LÌ
LÌLÎ!Q*Î>OÏQ*Ï
O	ÏQ*ÏO	ÏBQ*Úargsústr | cabc.Sequence[str] | NonerÕ   Úextrar   r…   c           
     óš  — d}|€| j         }|                      |||¬¦  «        5 }	d}
d}d}t          |t          ¦  «        rt	          j        |¦  «        }	 |                     d¦  «        }n%# t          $ r |                      |¦  «        }Y nw xY w	  |j	        d|pd|dœ|¤Ž}
nà# t          $ r§}t          j        ¦   «         }t          j        d|j        ¦  «        }|€d}|dk    r|}t          |t           ¦  «        sMt          j                             t          |¦  «        ¦  «         t          j                             d¦  «         d	}|}Y d}~n4d}~wt&          $ r$}|s‚ |}d	}t          j        ¦   «         }Y d}~nd}~ww xY wt          j                             ¦   «          t          j                             ¦   «          |	d                              ¦   «         }|	d	                              ¦   «         }|	d
                              ¦   «         }n�# t          j                             ¦   «          t          j                             ¦   «          |	d                              ¦   «         }|	d	                              ¦   «         }|	d
                              ¦   «         }w xY w	 ddd¦  «         n# 1 swxY w Y   t/          | ||||
|||¬¦  «        S )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_namer5   )r   r  zint | t.Any | Noner–   r   é   r’   )r§   rÿ   r�   r   ÚshlexÚsplitÚpopÚKeyErrorr¬   ÚmainÚ
SystemExitrÄ   r�   r~   r   Úcoder*   rd   r&   rí   rW   re   Úgetvaluer…   )r   r©   r   r   r£   r§   r³   r  r�   Ú
outstreamsr‹   r�   rŒ   r  rÊ   Úe_coderd   re   r   s                      r   ÚinvokezCliRunner.invoke  s+  € ðj ˆØÐ#Ø#Ô4Ðà�^Š^ %¨S¸ˆ^Ñ>Ô>ð +	2À*ØˆLØ.2ˆIØˆIå˜$¥Ñ$Ô$ð )Ý”{ 4Ñ(Ô(�ð<Ø!ŸIšI kÑ2Ô2�	�	øÝð <ð <ð <Ø ×6Ò6°sÑ;Ô;�	�	�	ð<øøøð2Ø'˜sœxÐV¨T¨Z°RÀ9ÐVÐVÐPUÐVÐV��øÝð #ð #ð #Ýœ<™>œ>�ÝœÐ 4°a´fÑ=Ô=�à�>Ø�Fà˜Q’;�;Ø !�Iå! &­#Ñ.Ô.ð Ý”J×$Ò$¥S¨¡[¤[Ñ1Ô1Ð1Ý”J×$Ò$ TÑ*Ô*Ð*Ø�Fà"�	�	�	�	�	�	øøøøåð *ð *ð *Ø'ð ØØ�	Ø�	Ýœ<™>œ>������øøøøð*øøøõ ”
× Ò Ñ"Ô"Ð"Ý”
× Ò Ñ"Ô"Ð"Ø# Aœ×/Ò/Ñ1Ô1�Ø# Aœ×/Ò/Ñ1Ô1�Ø# Aœ×/Ò/Ñ1Ô1��øõ	 ”
× Ò Ñ"Ô"Ð"Ý”
× Ò Ñ"Ô"Ð"Ø# Aœ×/Ò/Ñ1Ô1�Ø# Aœ×/Ò/Ñ1Ô1�Ø# Aœ×/Ò/Ñ1Ô1�Ð1Ð1Ð1Ð1�ðW+	2ð +	2ð +	2ñ +	2ô +	2ð +	2ð +	2ð +	2ð +	2ð +	2ð +	2øøøð +	2ð +	2ð +	2ð +	2õZ ØØØØØ%ØØØð	
ñ 	
ô 	
ð 		
s†   ¤0J+ÁA+Á*J+Á+BÂ
J+ÂBÂJ+ÂB$Â#HÂ$
FÂ.BEÅHÅFÅE<Å7HÅ<FÆHÆBJ+ÈBJÊJ+Ê+J/Ê2J/Útemp_dirústr | os.PathLike[str] | Noneúcabc.Iterator[str]c              #  óž  K  — t          j        ¦   «         }t          j        |¬¦  «        }t          j        |¦  «         	 |V — t          j        |¦  «         |€-ddl}	 |                     |¦  «         dS # t          $ r Y dS w xY wdS # t          j        |¦  «         |€+ddl}	 |                     |¦  «         w # t          $ r Y w w xY ww xY 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   r  ÚcwdÚdtr  s        r   Úisolated_filesystemzCliRunner.isolated_filesystem~  s  è è € õ  Œi‰kŒkˆÝÔ (Ð+Ñ+Ô+ˆÝ
Œ�‰Œˆð	ØˆHˆHˆHåŒH�S‰MŒMˆMàÐØ���ðØ—M’M "Ñ%Ô%Ð%Ð%Ð%øÝð ð ð Ø�D�Dðøøøð  Ðøõ ŒH�S‰MŒMˆMàÐØ���ðØ—M’M "Ñ%Ô%Ð%Ð%øÝð ð ð Ø�Dðøøøð  øøøsB   Á B	 ÁA6 Á6
BÂBÂ	CÂ%B;Â:CÂ;
CÃCÃCÃC)r¢   NFT)
rz   r   r£   r¤   r¥   r¦   r§   r¦   r   r   )r©   r   r   r   r    )r­   r¤   r   r®   )NNF)r   ry   r£   r¤   r³   r¦   r   r´   )NNNNF)r©   r   r   r  r   ry   r£   r¤   r§   rÕ   r³   r¦   r  r   r   r…   )r  r  r   r  )rF   rG   rH   r\   r   r¬   r²   Ú
contextlibÚcontextmanagerrÿ   r  r  r5   r   r   r‡   r‡     s  € € € € € ðð ð. Ø48Ø Ø!%ð
1ð 
1ð 
1ð 
1ð 
1ð"ð "ð "ð "ð AEðð ð ð ð ð Ôð 37Ø48Øð	S,ð S,ð S,ð S,ñ ÔðS,ðp 15Ø26Ø48Ø(,Øðo
ð o
ð o
ð o
ð o
ðb Ôà8<ðð ð ð ñ Ôðð ð r   r‡   )rI   rJ   r   rK   )r   ry   rz   r   r   r   )&Ú
__future__r   Úcollections.abcÚabcÚcabcr   rb   rê   rç   r  rÄ   r  Útypingr~   Útypesr   rÃ   r   r   r   r	   r
   ÚTYPE_CHECKINGÚ	_typeshedr   Úcorer   r   r!  rN   rc   rP   r`   ÚTextIOWrapperrg   rƒ   r…   r‡   r5   r   r   ú<module>r,     si  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ø 	€	€	€	Ø 	€	€	€	Ø 
€
€
€
Ø €€€Ø 
€
€
€
Ø €€€Ø Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø (Ð (Ð (Ð (Ð (Ð (à„?ð Ø(Ð(Ð(Ð(Ð(Ð(àÐÐÐÐÐð!ð !ð !ð !ð !ñ !ô !ð !ðD Ôðð ð ñ Ôðð ð  ð  ð  ð  �"”*ñ  ô  ð  ð&Cð Cð Cð Cð Cñ Cô Cð Cð9ð 9ð 9ð 9ð 9˜"Ô*ñ 9ô 9ð 9ðxð ð ð ð(K4ð K4ð K4ð K4ð K4ñ K4ô K4ð K4ð\Xð Xð Xð Xð Xñ Xô Xð Xð Xð Xr   