§
    �Ÿjn  ã                   ól  — d Z ddlmZ  ede¦  «         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mZmZmZmZmZmZmZmZmZ ddlmZmZmZmZmZmZmZmZmZm Z   ej!        d "                    g d	¢¦  «        ¦  «        Z# ej!        d
¦  «        Z$ ej!        d¦  «        Z%d„ Z&e	j'        Z(e	j'        dz   Z) G d„ d¦  «        Z* G d„ d¦  «        Z+d„ Z,d„ Z-d„ Z. ej!        dej/        ¦  «        Z0 ej!        dej/        ¦  «        Z1d„ Z2d„ Z3d„ Z4 G d„ de5¦  «        Z6 G d„ de6¦  «        Z7dS )a6  DEPRECATED: Input handling and transformation machinery.

This module was deprecated in IPython 7.0, in favour of inputtransformer2.

The first class in this module, :class:`InputSplitter`, is designed to tell when
input from a line-oriented frontend is complete and should be executed, and when
the user should be prompted for another line of code instead. The name 'input
splitter' is largely for historical reasons.

A companion, :class:`IPythonInputSplitter`, provides the same functionality but
with full support for the extended IPython syntax (magics, system calls, etc).
The code to actually do these transformations is in :mod:`IPython.core.inputtransformer`.
:class:`IPythonInputSplitter` feeds the raw code to the transformers in order
and stores the results.

For more details, see the class docstrings below.
é    )ÚwarnzeIPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`N)ÚList)
Úleading_indentÚclassic_promptÚ
ipy_promptÚ	cellmagicÚassemble_logical_linesÚhelp_endÚescaped_commandsÚassign_from_magicÚassign_from_systemÚassemble_python_lines)
Ú	ESC_SHELLÚ
ESC_SH_CAPÚESC_HELPÚ	ESC_HELP2Ú	ESC_MAGICÚ
ESC_MAGIC2Ú	ESC_QUOTEÚ
ESC_QUOTE2Ú	ESC_PARENÚESC_SEQUENCESú|)z^\s+raise(\s.*)?$z^\s+raise\([^\)]*\).*$z^\s+return(\s.*)?$z^\s+return\([^\)]*\).*$z^\s+pass\s*$z^\s+break\s*$z^\s+continue\s*$z^([ \t\r\f\v]+)z^\s*\#c                 óf   — t                                | ¦  «        }|r|                     ¦   «         S dS )a  Return the number of initial spaces in a string.

    Note that tabs are counted as a single space.  For now, we do *not* support
    mixing of tabs and spaces in the user's input.

    Parameters
    ----------
    s : string

    Returns
    -------
    n : int
    r   )Úini_spaces_reÚmatchÚend)ÚsÚ
ini_spacess     úg/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/IPython/core/inputsplitter.pyÚnum_ini_spacesr!   O   s4   € õ ×$Ò$ QÑ'Ô'€JØð Ø�~Š~ÑÔÐàˆqó    é   c                   ó   — e Zd ZexZZd„ ZdS )ÚIncompleteStringc                 ó>   — || _         || _        || _        || _        d S ©N©r   Ústartr   Úline)Úselfr   r)   r   r*   s        r    Ú__init__zIncompleteString.__init__l   s"   € ØˆŒØˆŒ
ØˆŒØˆŒ	ˆ	ˆ	r"   N)Ú__name__Ú
__module__Ú__qualname__ÚINCOMPLETE_STRINGÚtypeÚ
exact_typer,   © r"   r    r%   r%   j   s-   € € € € € Ø)Ð)€Dˆ:ðð ð ð ð r"   r%   c                   ó   — e Zd ZexZZd„ ZdS )ÚInMultilineStatementc                 ó>   — d| _         |x| _        | _        || _        d S ©NÚ r(   )r+   Úposr*   s      r    r,   zInMultilineStatement.__init__t   s"   € ØˆŒØ #Ð#ˆŒ
�T”XØˆŒ	ˆ	ˆ	r"   N)r-   r.   r/   ÚIN_MULTILINE_STATEMENTr1   r2   r,   r3   r"   r    r5   r5   r   s-   € € € € € Ø.Ð.€Dˆ:ðð ð ð ð r"   r5   c              #   ó’  K  — t          j        | ¦  «        j        }t          j        t          j        dddd¦  «        }	 t          j        |¦  «        D ]}|V — Œd	S # t          j        $ rÛ}|                      d¬¦  «        }t          |¦  «        t          |d         ¦  «        f}d|j
        d         v rX|j        x\  }}}||dz
           |d	…         d                     ||d	…         ¦  «        z   } t          | |||d         ¦  «        V — n)d
|j
        d         v rt          ||d         ¦  «        V — n‚ Y d	}~d	S Y d	}~d	S d	}~ww xY w)a  Iterate over tokens from a possibly-incomplete string of code.

    This adds two special token types: INCOMPLETE_STRING and
    IN_MULTILINE_STATEMENT. These can only occur as the last token yielded, and
    represent the two main ways for code to be incomplete.
    r8   )r#   r   T)Úkeependséÿÿÿÿzmulti-line stringr   r#   Nzmulti-line statement)ÚioÚStringIOÚreadlineÚtokenizeÚ	TokenInfoÚNEWLINEÚgenerate_tokensÚ
TokenErrorÚ
splitlinesÚlenÚargsr   Újoinr%   r5   )	r   r@   ÚtokenÚeÚlinesr   ÚlÚcr)   s	            r    Úpartial_tokensrO   y   s}  è è € õ Œ{˜1‰~Œ~Ô&€HÝÔ�xÔ/°°V¸VÀRÑHÔH€EðÝÔ-¨hÑ7Ô7ð 	ð 	ˆEØˆKˆKˆKˆKð	ð 	øåÔð ð ð à—’ d�Ñ+Ô+ˆÝ�%‰jŒj�#˜e Bœi™.œ.Ð(ˆØ !¤&¨¤)Ð+Ð+Ø œ9Ð$‰DˆAˆq�5Ø�a˜‘c”
˜1˜2˜2” §¢¨¨q¨r¨r¬Ñ!3Ô!3Ñ3ˆAÝ" 1 e¨S°%¸´)Ñ<Ô<Ð<Ð<Ð<Ð<Ø# q¤v¨a¤yÐ0Ð0Ý& s¨E°"¬IÑ6Ô6Ð6Ð6Ð6Ð6àð	 =Ð<Ð<Ð<Ð<Ð<à6Ð6Ð6Ð6Ð6Ð6øøøøðøøøs   ¿A ÁEÁ+C
EÅEc                 óÜ  ‡— t          t          | ¦  «        ¦  «        }|d         j        t          j        k    r|                     ¦   «          |sdS |d         j        t          j        t          j        t          j        hv rD|                     ¦   «          |d         j        t          j        t          j        t          j        hv °D|d         j        t          k    rdS dgŠˆfd„}t          |¦  «        }|D ]ƒ}|j        t          j        t          j        hv r ||j        d         ¦  «         Œ8|j        t          j        k    r6	  |t          |¦  «        j        d         ¦  «         Œr# t           $ r Y  nw xY wŒ„‰                     ¦   «         }|d         j        t"          k    r7|d         j        t          j        t          j        t          j        hv r|dz   S |S |d         j        t          j        k    r|dz   S |rod}t/          |¦  «        D ]\  }}|j        t          j        k    r|dz   }Œ ||d…         }d„ |D ¦   «         }	|	r&|	d         d	v rt1          ‰¦  «        D ]}
|
|k     r|
c S Œ|S )
z:Find the number of spaces for the next line of indentationr=   r   c                 óN   •— | ‰d         k    r‰                      | ¦  «         d S d S ©Nr=   )Úappend)ÚnÚprev_indentss    €r    Ú_add_indentz%find_next_indent.<locals>._add_indent¢   s5   ø€ Ø�˜RÔ Ò Ð Ø×Ò Ñ"Ô"Ð"Ð"Ð"ð !Ð r"   r#   éþÿÿÿé   Nc                 óF   — g | ]}|j         t          j        k    ¯|j        ‘ŒS r3   )r1   rA   ÚNAMEÚstring)Ú.0Úts     r    ú
<listcomp>z$find_next_indent.<locals>.<listcomp>Å   s(   € ÐOÐOÐO˜a°q´vÅÄÒ7NÐ7N�”Ð7NÐ7NÐ7Nr"   >   ÚpassÚbreakÚraiseÚreturnÚcontinue)ÚlistrO   r1   rA   Ú	ENDMARKERÚpopÚDEDENTrC   ÚCOMMENTr0   ÚiterÚINDENTr   ÚNLÚnextr)   ÚStopIterationr:   r2   ÚLPARÚLSQBÚLBRACEÚCOLONÚ	enumerateÚreversed)ÚcodeÚtokensrV   ÚtokiterÚtokÚlast_indentÚlast_line_startsÚiÚlast_line_tokensÚnamesÚindentrU   s              @r    Úfind_next_indentr~   ’   s¦  ø€ å•. Ñ&Ô&Ñ'Ô'€FØˆb„z„�(Ô,Ò,Ð,Ø�
Š
‰ŒˆØð ØˆqØ�"Œ:Œ?�xœµÔ0@Å(ÔBRÐSÐSÐSØ�
Š
‰Œˆð �"Œ:Œ?�xœµÔ0@Å(ÔBRÐSÐSÐSð ˆb„z„Õ+Ò+Ð+àˆqð �3€Lð#ð #ð #ð #ð #õ �6‰lŒl€GØð ð ˆØŒ8�œ­¬Ð9Ð9Ð9ØˆK˜œ œ
Ñ#Ô#Ð#Ð#ØŒh�(œ+Ò%Ð%ðØ��D ™MœMÔ/°Ô2Ñ3Ô3Ð3Ð3øÝ ð ð ð Ø��ðøøøð &ð ×"Ò"Ñ$Ô$€Kð ˆb„z„Õ0Ò0Ð0Ø�"Œ:Ô ¥X¤]µH´MÅ8Ä?Ð$SÐSÐSØ ‘?Ð"ØÐàˆb„zÔ¥¤Ò.Ð.à˜Q‰Ðàð "ð ÐÝ Ñ'Ô'ð 	)ð 	)‰FˆAˆsØŒx�8Ô+Ò+Ð+Ø#$ q¡5Ð øà!Ð"2Ð"3Ð"3Ô4ÐØOÐOÐ#3ÐOÑOÔOˆØð 	"�U˜1”XÐ!QÐQÐQå" <Ñ0Ô0ð "ð "�Ø˜KÒ'Ð'Ø!�M�M�Mð (ð Ðs   Å#E(Å(
E6Å5E6c                 ór   — | sdS |                       ¦   «         d         }|dk    p|                     ¦   «         S )zÎDetermine if the input source ends in a blank.

    A blank is either a newline or a line consisting of whitespace.

    Parameters
    ----------
    src : string
        A single or multiline string.
    Fr=   r8   )rF   Úisspace)ÚsrcÚlls     r    Ú
last_blankrƒ   Ï   s9   € ð Ð�u�uØ
�.Š.Ñ
Ô
˜2Ô
€BØ�"ŠHÐ%˜Ÿš™œÐ%r"   z\n\s*\n\s*$z.+\n\s*\n\s+$c                 ó  — | sdS d                      dg|                      ¦   «         dd…         z   ¦  «        }t          t                               |¦  «        ¦  «        p&t          t
                               |¦  «        ¦  «        S )zÑDetermine if the input source ends in two blanks.

    A blank is either a newline or a line consisting of whitespace.

    Parameters
    ----------
    src : string
        A single or multiline string.
    Fú
z###
rW   N)rI   rF   ÚboolÚlast_two_blanks_rer   Úlast_two_blanks_re2)r�   Únew_srcs     r    Úlast_two_blanksrŠ   á   sy   € ð Ð�u�uð �iŠi˜˜	 C§N¢NÑ$4Ô$4°R°S°SÔ$9Ñ9Ñ:Ô:€GÝÕ#×)Ò)¨'Ñ2Ô2Ñ3Ô3ð 5ÝÕ$×*Ò*¨7Ñ3Ô3Ñ4Ô4ð7r"   c                 ó.   — t          j        dd| ¦  «        S )a  Remove all comments from input source.

    Note: comments are NOT recognized inside of strings!

    Parameters
    ----------
    src : string
        A single or multiline input string.

    Returns
    -------
    String with all Python comments removed.
    z#.*r8   )ÚreÚsub)r�   s    r    Úremove_commentsrŽ   ø   s   € õ Œ6�%˜˜SÑ!Ô!Ð!r"   c                  óD   — t          t          j        dd¦  «        } | €d} | S )zcReturn the default standard input encoding.

    If sys.stdin has no encoding, 'ascii' is returned.ÚencodingNÚascii)ÚgetattrÚsysÚstdin)r�   s    r    Úget_input_encodingr•   
  s'   € õ •s”y *¨dÑ3Ô3€HØÐØˆØ€Or"   c                   ó°   — e Zd ZU dZdZdZdZdZee	         e
d<   ej        e
d<   dZdZdd	„Zd
„ Zd„ Zd„ Zde	defd„Zd„ Zd„ Z ee¦  «        Zdd„Zd„ ZdS )ÚInputSplittera$  An object that can accumulate lines of Python source before execution.

    This object is designed to be fed python source line-by-line, using
    :meth:`push`. It will return on each push whether the currently pushed
    code could be executed already. In addition, it provides a method called
    :meth:`push_accepts_more` that can be used to query whether more input
    can be pushed into a single interactive block.

    This is a simple example of how an interactive terminal-based client can use
    this tool::

        isp = InputSplitter()
        while isp.push_accepts_more():
            indent = ' '*isp.indent_spaces
            prompt = '>>> ' + indent
            line = indent + raw_input(prompt)
            isp.push(line)
        print 'Input source was:\n', isp.source_reset(),
    ©NNr8   NÚ_bufferÚ_compileFrb   c                 ój   — g | _         t          j        ¦   «         | _        t	          ¦   «         | _        dS )z$Create a new InputSplitter instance.N)r™   ÚcodeopÚCommandCompilerrš   r•   r�   ©r+   s    r    r,   zInputSplitter.__init__L  s*   € àˆŒÝÔ.Ñ0Ô0ˆŒÝ*Ñ,Ô,ˆŒˆˆr"   c                 óV   — g | j         dd…<   d| _        d| _        d| _        d| _        dS ©z,Reset the input buffer and associated state.Nr8   F)r™   Úsourcert   Ú_is_completeÚ_is_invalidrž   s    r    ÚresetzInputSplitter.resetR  s5   € àˆŒ�Q�Q�Q‰ØˆŒØˆŒ	Ø!ˆÔØ ˆÔÐÐr"   c                 ó<   — | j         }|                      ¦   «          |S )z:Return the input source and perform a full reset.
        )r¡   r¤   ©r+   Úouts     r    Úsource_resetzInputSplitter.source_resetZ  s   € ð ŒkˆØ�
Š
‰ŒˆØˆ
r"   c                 ó¸  — |                       ¦   «          	 |                      |¦  «         | j        r	 |                       ¦   «          dS |                      ¦   «         r*d|                      ¦   «         f|                       ¦   «          S 	 |                       ¦   «          dS # t
          $ r Y |                       ¦   «          dS w xY w# |                       ¦   «          w xY w)ak  Return whether a block of code is ready to execute, or should be continued

        This is a non-stateful API, and will reset the state of this InputSplitter.

        Parameters
        ----------
        source : string
            Python input code, which can be multiline.

        Returns
        -------
        status : str
            One of 'complete', 'incomplete', or 'invalid' if source is not a
            prefix of valid code.
        indent_spaces : int or None
            The number of spaces by which to indent the next line of code. If
            status is not 'incomplete', this is None.
        )ÚinvalidNÚ
incomplete)ÚcompleteN)r¤   Úpushr£   Úpush_accepts_moreÚget_indent_spacesÚSyntaxError)r+   r¡   s     r    Úcheck_completezInputSplitter.check_completea  sæ   € ð& 	�
Š
‰Œˆð	Ø�IŠI�fÑÔÐð Ôð (Ø&ð �JŠJ‰LŒLˆLˆLˆLð ×'Ò'Ñ)Ô)ð (Ø# T×%;Ò%;Ñ%=Ô%=Ð=ð �JŠJ‰LŒLˆLˆLð (à�JŠJ‰LŒLˆLˆLˆLøõ ð 	#ð 	#ð 	#ð #ð �JŠJ‰LŒLˆLˆLˆLð	#øøøøð �JŠJ‰LŒLˆLˆLøøøs.   –B «C Á	)C Â
C Â(C Â?C Ã C ÃCrL   c                 ó,  — t          |t          ¦  «        sJ ‚|                      |¦  «         | j        }d\  | _        | _        d| _        |                     d¦  «        rdS 	 t          j	        ¦   «         5  t          j
        dt          ¦  «         |                      |d¬¦  «        | _        ddd¦  «         n# 1 swxY w Y   | j        du| _        n=# t          t          t          t           t"          t          f$ r d| _        d| _        Y nw xY w| j        S )	a  Push one or more lines of input.

        This stores the given lines and returns a status code indicating
        whether the code forms a complete Python block or not.

        Any exceptions generated in compilation are swallowed, but if an
        exception was produced, the method returns True.

        Parameters
        ----------
        lines : string
            One or more lines of Python input.

        Returns
        -------
        is_complete : boolean
            True if the current input source (the result of the current input
            plus prior inputs) forms a complete Python execution block.  Note that
            this value is also stored as a private attribute (``_is_complete``), so it
            can be queried at any time.
        r˜   Fz\
ÚerrorÚexec)ÚsymbolNT)Ú
isinstanceÚstrÚ_storer¡   rt   r¢   r£   ÚendswithÚwarningsÚcatch_warningsÚsimplefilterÚSyntaxWarningrš   r°   ÚOverflowErrorÚ
ValueErrorÚ	TypeErrorÚMemoryError)r+   rL   r¡   s      r    r­   zInputSplitter.push…  sm  € õ, ˜%¥Ñ%Ô%Ð%Ð%Ð%Ø�Š�EÑÔÐØ”ˆð
 (2Ñ$ˆŒ	�4Ô$Ø ˆÔð �?Š?˜6Ñ"Ô"ð 	Ø�5ð	6ÝÔ(Ñ*Ô*ð Að AÝÔ% g­}Ñ=Ô=Ð=Ø ŸMšM¨&¸˜MÑ@Ô@�”	ðAð Að Añ Aô Að Að Að Að Að Að Aøøøð Að Að Að Að !%¤	°Ð 5ˆDÔÐøõ �]­J½	Ý�]ð,ð 	$ð 	$ð 	$à $ˆDÔØ#ˆDÔÐÐð	$øøøð Ô Ð s6   Á"C Á57B8Â,C Â8B<Â<C Â?B<Ã C Ã7DÄDc                 óö  — | j         sdS | j                             ¦   «         d         }|r|                     ¦   «         rdS |                      ¦   «         dk    r t          | j                             ¦   «         ¦  «        dk    rdS 	 t          j        d                     | j	        ¦  «        ¦  «        }t          |j
        ¦  «        dk    rt          |j
        d         d¦  «        sdS n# t          $ r Y dS w xY wdS )a§  Return whether a block of interactive input can accept more input.

        This method is meant to be used by line-oriented frontends, who need to
        guess whether a block is complete or not based solely on prior and
        current input lines.  The InputSplitter considers it has a complete
        interactive block and will not accept more input when either:

        * A SyntaxError is raised

        * The code is complete and consists of a single line or a single
          non-compound statement

        * The code is complete and has a blank line at the end

        If the current input produces a syntax error, this method immediately
        returns False but does *not* raise the syntax error exception, as
        typically clients will want to send invalid syntax to an execution
        backend which might convert the invalid syntax into valid Python via
        one of the dynamic IPython mechanisms.
        Tr=   Fr   r#   r8   Úbody)r¢   r¡   rF   r€   r¯   rG   ÚastÚparserI   r™   rÃ   ÚhasattrÚ	Exception)r+   Ú	last_lineÚcode_asts      r    r®   zInputSplitter.push_accepts_more½  s  € ð0 Ô ð 	à�4ð ”K×*Ò*Ñ,Ô,¨RÔ0ˆ	Øð 	˜i×/Ò/Ñ1Ô1ð 	à�5ð
 ×!Ò!Ñ#Ô# qÒ(Ð(Ý�4”;×)Ò)Ñ+Ô+Ñ,Ô,°Ò1Ð1Ø�uð	!Ýœ9 R§W¢W¨T¬\Ñ%:Ô%:Ñ;Ô;�õ
 �x”}Ñ%Ô%¨Ò*Ð*Ý(/°´¸aÔ0@À&Ñ(IÔ(Ið +ð !˜5øøõ ð ð ð à�u�uðøøøð ˆts   Â,C( Ã(
C6Ã5C6c                 óˆ   — | j         \  }}|| j        k    r|S t          | j        d d…         ¦  «        }| j        |f| _         |S rR   )Ú_indent_spaces_cacher¡   r~   )r+   Ú	sourceforrT   s      r    r¯   zInputSplitter.get_indent_spacesô  sN   € ØÔ0‰ˆ	�1Ø˜œÒ#Ð#ØˆHõ ˜Tœ[¨¨"¨Ô-Ñ.Ô.ˆØ%)¤[°!Ð$4ˆÔ!Øˆr"   r¡   c                 óæ   — |€| j         }|                     d¦  «        r|                     |¦  «         n|                     |dz   ¦  «         t          | ||                      |¦  «        ¦  «         dS )z‚Store one or more lines of input.

        If input lines are not newline-terminated, a newline is automatically
        appended.Nr…   )r™   r¹   rS   ÚsetattrÚ_set_source)r+   rL   ÚbufferÚstores       r    r¸   zInputSplitter._store  su   € ð ˆ>Ø”\ˆFà�>Š>˜$ÑÔð 	&Ø�MŠM˜%Ñ Ô Ð Ð à�MŠM˜% ™*Ñ%Ô%Ð%Ý��e˜T×-Ò-¨fÑ5Ô5Ñ6Ô6Ð6Ð6Ð6r"   c                 ó,   — d                      |¦  «        S r7   )rI   )r+   rÐ   s     r    rÏ   zInputSplitter._set_source  s   € Ø�xŠx˜ÑÔÐr"   )rb   N)Nr¡   )r-   r.   r/   Ú__doc__rË   r�   r¡   rt   r   r·   Ú__annotations__rœ   r�   r¢   r£   r,   r¤   r¨   r±   r†   r­   r®   r¯   ÚpropertyÚindent_spacesr¸   rÏ   r3   r"   r    r—   r—     s!  € € € € € € ðð ð2 &Ðð €Hð €Fð €Dð
 �#ŒYÐÐÑàÔ$Ð$Ð$Ñ$à€Là€Kð-ð -ð -ð -ð!ð !ð !ðð ð ð"ð "ð "ðH6!˜ð 6! ð 6!ð 6!ð 6!ð 6!ðp5ð 5ð 5ðnð ð ð �HÐ.Ñ/Ô/€Mð7ð 7ð 7ð 7ð ð  ð  ð  ð  r"   r—   c                   óª   ‡ — e Zd ZdZdZdZdZdZ	 	 dˆ fd„	Ze	d„ ¦   «         Z
e	d„ ¦   «         Zˆ fd	„Zd
„ Zd„ Zd„ Zˆ fd„Zd„ Zdedefˆ fd„Zd„ Zˆ xZS )ÚIPythonInputSplitterzBAn input splitter that recognizes all of IPython's special syntax.r8   FNTc                 óú  •— t          t          | ¦  «                             ¦   «          g | _        d| _        |�|| _        n=t          ¦   «         t          ¦   «         t          ¦   «         t          |¬¦  «        g| _        t          ¦   «         | _
        |�|| _        n;t          ¦   «         t          ¦   «         t          ¦   «         t          ¦   «         g| _        t!          ¦   «         | _        |�	|| _        d S g | _        d S )NT)Úend_on_blank_line)ÚsuperrØ   r,   Ú_buffer_rawÚ	_validateÚphysical_line_transformsr   r   r   r   r	   Úlogical_line_transformsr
   r   r   r   r   Úpython_line_transforms)r+   Úline_input_checkerrÞ   rß   rà   Ú	__class__s        €r    r,   zIPythonInputSplitter.__init__)  s÷   ø€ åÕ" DÑ)Ô)×2Ò2Ñ4Ô4Ð4ØˆÔØˆŒà#Ð/Ø,DˆDÔ)Ð)õ .<Ñ-=Ô-=Ý-;Ñ-=Ô-=Ý-7©\¬\Ý-6ÐI[Ð-\Ñ-\Ô-\ð	-.ˆDÔ)õ '=Ñ&>Ô&>ˆÔ#Ø"Ð.Ø+BˆDÔ(Ð(õ -5©J¬JÝ,<Ñ,>Ô,>Ý,=Ñ,?Ô,?Ý,>Ñ,@Ô,@ð	,-ˆDÔ(õ &;Ñ%<Ô%<ˆÔ"Ø!Ð-Ø*@ˆDÔ'Ð'Ð'ð +-ˆDÔ'Ð'Ð'r"   c                 óT   — | j         | j        gz   | j        z   | j        gz   | j        z   S )z!Quick access to all transformers.)rÞ   r	   rß   r   rà   rž   s    r    Ú
transformszIPythonInputSplitter.transformsK  sD   € ð Ô,ØÔ(Ð)ñ*Ø,0Ô,HñIàÔ'Ð(ñ)à,0Ô,GñHð 	Hr"   c                 óz   — | j         dd…         }| j        s|| j        g| j        z   z  }|| j        gz   | j        z   S )zTTransformers, excluding logical line transformers if we're in a
        Python line.N)rÞ   Úwithin_python_liner	   rß   r   rà   )r+   r]   s     r    Útransforms_in_usez&IPythonInputSplitter.transforms_in_useR  sR   € ð Ô)¨!¨!¨!Ô,ˆØÔ&ð 	NØ�$Ô-Ð.°Ô1MÑMÑMˆAØ�DÔ.Ð/Ñ/°$Ô2MÑMÐMr"   c                 óö   •— t          t          | ¦  «                             ¦   «          g | j        dd…<   d| _        d| _        d| _        | j        D ]'}	 |                     ¦   «          Œ# t          $ r Y Œ$w xY wdS r    )	rÛ   rØ   r¤   rÜ   Ú
source_rawÚtransformer_accumulatingræ   rä   r°   )r+   r]   râ   s     €r    r¤   zIPythonInputSplitter.reset[  s™   ø€ åÕ" DÑ)Ô)×/Ò/Ñ1Ô1Ð1Ø ˆÔ˜˜˜ÑØˆŒØ(-ˆÔ%Ø"'ˆÔà”ð 	ð 	ˆAðØ—’‘	”	�	�	øÝð ð ð ð �ðøøøð	ð 	s   ÁA)Á)
A6Á5A6c                 ó²   — d„ }g }| j         D ]} |||¦  «        }Œt          |¦  «        }|r*|                      d                     |¦  «        ¦  «         d S d S )Nc              3   ó°   K  — |D ]4}|                      ¦   «         D ]}|                      |¦  «        }|�|V — ŒŒ5|                      ¦   «         }|�|V — dS dS )a)  yield transformed lines

            always strings, never None

            transform: the current transform
            outs: an iterable of previously transformed inputs.
                 Each may be multiline, which will be passed
                 one line at a time to transform.
            N)rF   r­   r¤   )Ú	transformÚoutsr§   r*   Útmps        r    Ú_flushz7IPythonInputSplitter.flush_transformers.<locals>._flushl  s   è è € ð ð "ð "�ØŸNšNÑ,Ô,ð "ð "�Dà#Ÿ.š.¨Ñ.Ô.�CØ�Ø!˜	˜	˜	øð	"ð —/’/Ñ#Ô#ˆCØˆØ�	�	�	�	�	ð ˆr"   r…   )rç   rd   r¸   rI   )r+   rð   r§   r]   s       r    Úflush_transformersz'IPythonInputSplitter.flush_transformersk  sz   € ð	ð 	ð 	ð, ˆØÔ'ð 	!ð 	!ˆAØ�&˜˜C‘.”.ˆCˆCå�3‰iŒiˆØð 	(Ø�KŠK˜Ÿ	š	 #™œÑ'Ô'Ð'Ð'Ð'ð	(ð 	(r"   c                 ó<   — | j         }|                      ¦   «          |S )z8Return raw input only and perform a full reset.
        )ré   r¤   r¦   s     r    Ú	raw_resetzIPythonInputSplitter.raw_resetŠ  s   € ð ŒoˆØ�
Š
‰ŒˆØˆ
r"   c                 ó”   — 	 |                       ¦   «          | j        |                      ¦   «          S # |                      ¦   «          w xY wr'   )rñ   r¡   r¤   rž   s    r    r¨   z!IPythonInputSplitter.source_reset‘  s?   € ð	Ø×#Ò#Ñ%Ô%Ð%Ø”;à�JŠJ‰LŒLˆLˆLøˆD�JŠJ‰LŒLˆLˆLøøøs	   ‚1 ±Ac                 ód   •— | j         rdS t          t          | ¦  «                             ¦   «         S ©NT)rê   rÛ   rØ   r®   )r+   râ   s    €r    r®   z&IPythonInputSplitter.push_accepts_more˜  s1   ø€ ØÔ(ð 	IØ�4åÕ-¨tÑ4Ô4×FÒFÑHÔHÐHr"   c                 óæ   — |                       ¦   «          	 |                      |¦  «         |                      ¦   «          | j        |                       ¦   «          S # |                       ¦   «          w xY w)z/Process and translate a cell of input.
        )r¤   r­   rñ   r¡   )r+   Úcells     r    Útransform_cellz#IPythonInputSplitter.transform_cellž  s]   € ð 	�
Š
‰Œˆð	Ø�IŠI�d‰OŒOˆOØ×#Ò#Ñ%Ô%Ð%Ø”;à�JŠJ‰LŒLˆLˆLøˆD�JŠJ‰LŒLˆLˆLøøøs   –/A ÁA0rL   rb   c                 ó„  •— t          |t          ¦  «        sJ ‚|                     ¦   «         }|sdg}|                      || j        d¦  «         g }|D ].}|                      |¦  «        }|�|                     |¦  «         Œ/|r=d                     |¦  «        }t          t          | ¦  «         
                    |¦  «        S dS )aJ  Push one or more lines of IPython input.

        This stores the given lines and returns a status code indicating
        whether the code forms a complete Python block or not, after processing
        all input lines for special IPython syntax.

        Any exceptions generated in compilation are swallowed, but if an
        exception was produced, the method returns True.

        Parameters
        ----------
        lines : string
            One or more lines of Python input.

        Returns
        -------
        is_complete : boolean
            True if the current input source (the result of the current input
            plus prior inputs) forms a complete Python execution block.  Note that
            this value is also stored as a private attribute (_is_complete), so it
            can be queried at any time.
        r8   ré   Nr…   F)r¶   r·   rF   r¸   rÜ   Ú_transform_linerS   rI   rÛ   rØ   r­   )r+   rL   Ú
lines_listÚtransformed_lines_listr*   ÚtransformedÚtransformed_linesrâ   s          €r    r­   zIPythonInputSplitter.push©  sÝ   ø€ õ. ˜%¥Ñ%Ô%Ð%Ð%Ð%ð ×%Ò%Ñ'Ô'ˆ
Øð 	Ø˜ˆJð
 	�Š�E˜4Ô+¨\Ñ:Ô:Ð:à!#ÐØð 	;ð 	;ˆDØ×.Ò.¨tÑ4Ô4ˆKØÐ&Ø&×-Ò-¨kÑ:Ô:Ð:øà!ð 	Ø $§	¢	Ð*@Ñ AÔ AÐÝÕ-¨tÑ4Ô4×9Ò9Ð:KÑLÔLÐLð �5r"   c                 óú  ‡ — ˆ fd„}‰ j         D ]&}|                     |¦  «        }|€ ||¦  «        c S Œ'‰ j        sU‰ j                             |¦  «        }|€ |d¦  «        S ‰ j        D ]&}|                     |¦  «        }|€ ||¦  «        c S Œ'‰ j                             |¦  «        }|€d‰ _         |d¦  «        S d‰ _        ‰ j        D ]&}|                     |¦  «        }|€ ||¦  «        c S Œ'd‰ _        |S )zíPush a line of input code through the various transformers.

        Returns any output from the transformers, or None if a transformer
        is accumulating lines.

        Sets self.transformer_accumulating as a side effect.
        c                 ó   •— d‰_         d S rö   )rê   )Údbgr+   s    €r    Ú_accumulatingz;IPythonInputSplitter._transform_line.<locals>._accumulatingâ  s   ø€ à,0ˆDÔ)Ø�4r"   Nzacc logical lineTzacc python lineF)rÞ   r­   ræ   r	   rß   r   rà   rê   )r+   r*   r  Útransformers   `   r    rû   z$IPythonInputSplitter._transform_lineÚ  ss  ø€ ð	ð 	ð 	ð 	ð 	ð
  Ô8ð 	2ð 	2ˆKØ×#Ò# DÑ)Ô)ˆDØˆ|Ø$�} [Ñ1Ô1Ð1Ð1Ð1ð ð Ô&ð 	6ØÔ.×3Ò3°DÑ9Ô9ˆDØˆ|Ø$�}Ð%7Ñ8Ô8Ð8à#Ô;ð 6ð 6�Ø"×'Ò'¨Ñ-Ô-�Ø�<Ø(˜=¨Ñ5Ô5Ð5Ð5Ð5ð  ð Ô)×.Ò.¨tÑ4Ô4ˆØˆ<Ø&*ˆDÔ#Ø �=Ð!2Ñ3Ô3Ð3à&+ˆDÔ#àÔ6ð 	2ð 	2ˆKØ×#Ò# DÑ)Ô)ˆDØˆ|Ø$�} [Ñ1Ô1Ð1Ð1Ð1ð ð ).ˆÔ%Øˆr"   )TNNN)r-   r.   r/   rÓ   ré   rê   ræ   rÜ   r,   rÕ   rä   rç   r¤   rñ   ró   r¨   r®   rù   r·   r†   r­   rû   Ú__classcell__)râ   s   @r    rØ   rØ     sS  ø€ € € € € ØLÐLð €Jð  %Ðð Ðð
 €KàIMØIMð -ð  -ð  -ð  -ð  -ð  -ðD ðHð Hñ „XðHð ðNð Nñ „XðNðð ð ð ð ð (ð (ð (ð>ð ð ðð ð ðIð Ið Ið Ið Ið	ð 	ð 	ð/˜ð / ð /ð /ð /ð /ð /ð /ðb*ð *ð *ð *ð *ð *ð *r"   rØ   )8rÓ   rº   r   ÚDeprecationWarningrÄ   rœ   r>   rŒ   r“   rA   Útypingr   ÚIPython.core.inputtransformerr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ÚcompilerI   Ú	dedent_rer   Úcomment_line_rer!   ÚN_TOKENSr0   r:   r%   r5   rO   r~   rƒ   Ú	MULTILINEr‡   rˆ   rŠ   rŽ   r•   Úobjectr—   rØ   r3   r"   r    ú<module>r     sf  ððð ð$ Ð Ð Ð Ð Ð à €ÐlØñô ð ð
 €
€
€
Ø €€€Ø 	€	€	€	Ø 	€	€	€	Ø 
€
€
€
Ø €€€Ø €€€à Ð Ð Ð Ð Ð ð
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ð 
-ðYð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð Yð ˆBŒJ�s—x’xð !ð !ð !ñ ô ñ ô €	ð �”
Ð-Ñ.Ô.€ð �"”*˜YÑ'Ô'€ðð ð ð, Ô%Ð Ø!Ô*¨QÑ.Ð ðð ð ð ð ñ ô ð ðð ð ð ð ñ ô ð ðð ð ð2:ð :ð :ðz&ð &ð &ð  �R”Z °´Ñ=Ô=Ð Ø �b”jÐ!1°2´<Ñ@Ô@Ð ð7ð 7ð 7ð."ð "ð "ð$	ð 	ð 	ðz ð z ð z ð z ð z �Fñ z ô z ð z ðznð nð nð nð n˜=ñ nô nð nð nð nr"   