+
     Bi>                      a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^RIHtHtHt R]R&    ^RIHt R R ltR	 R
 ltR tR]P.                  ! RR4      R]P.                  ! RR4      R]P0                  ! R]P2                  4      R]P4                  ! 4       R]R]P.                  ! RR4      /tR R ltR^ /R R lltR#   ] d
    ^RIHt  Li ; i)zThis is an alternative to python_reader which tries to emulate
the CPython prompt as closely as possible, with the exception of
allowing multiline input and multiline history entries.
)annotationsN)_get_readermultiline_inputappend_history_filez-tuple[type[Exception], ...] | type[Exception]_error)r   c                   V ^8  d   QhRR/# )   returnstr )formats   "./usr/lib/python3.14/_pyrepl/simple_interact.py__annotate__r   -   s      s     c                     \        4        R#   \         dp   p \        P                  P	                  RR4      ;p'       d   RT 2p\        \        T 4      ;'       g    \        T 4      ;'       g    R4      T,           u Rp ? # Rp ? ii ; i)zGReturns the error message if there is a problem initializing the state.TERM z; TERM=zunknown errorN)r   r   osenvirongetr
   repr)eterms     r   checkr   -   st    @
 	  @::>>&"--4-TF#D3q677T!W7784??@s'   
 BABB0B=BBc                    V ^8  d   QhRRRR/# )r   textr
   r	   r   )r   s   "r   r   r   8   s      c c r   c                x    V P                  R 4      p\        V4      pV^ 8  d   W^,
          ,          R8X  d   V# V # )z 	
)rstriplen)r   shortns   &  r   _strip_final_indentr"   8   s9     KKEE
A1u!e$Kr   c                 P    \        4       p V P                  P                  R 4       R# )clear_screenN)r   scheduled_commandsappend)readers    r   _clear_screenr(   C   s    ]F
$$^4r   exitr   quit	copyrighthelpclearc               $    V ^8  d   QhRRRRRR/# )r   consolecode.InteractiveConsoleunicodetextr
   r	   boolr   )r   s   "r   r   r   R   s"      0 s t r   c                |   \        V4      p V P                  VR R4      pVRJ #   \        \        \        3 d    TP                  RR7      p\        T4      ^8X  d    R# TR,          pTP                  R	4      pTP                  4       R8g  pTP                  R4      '       * pT;'       g    T;'       d    Tu # i ; i)
z<stdin>singleNT)keependsFr   r   ) 	)
r"   compileOverflowErrorSyntaxError
ValueError
splitlinesr   
startswithstripendswith)	r0   r2   srccodelines	last_linewas_indented	not_empty
incompletes	   &&       r   _more_linesrI   R   s    
k
*CsIx8 t| ;
3 	:-u:?"I	 ++K8OO%+	"++D11
))	99z9	:s   $ 8B;AB;5B;:B;future_flagsc               $    V ^8  d   QhRRRRRR/# )r   r0   r1   rJ   intr	   Noner   )r   s   "r   r   r   e   s-     P P$P P 
	Pr   c                 a  ^RI Hp V! S P                  4       V'       d.   S P                  P                  ;P
                  V,          un        \        P                  ! \        S 4      p^ p\        P                  P                  R4      p\        \        R4      pT;'       d    TpR V 3R llp   \        P                  P                  4        \!        \        RR4      p	\!        \        R	R
4      p
 \#        W9V
4      pT! T4      '       d   K`  RT R2pS P'                  \)        T4      TRR7      pT'       d   Q h \+        4        T^,          pT'       g   K  S PM                  R\        PV                  ! 4        R\        PX                  ! 4        R24       K    \         d     Li ; i  \$         d     R# i ; i  \,        \.        \0        3 d$   p\2        P4                  ! RT 24        Rp?LRp?ii ; i  \6         d    \9        4       pTP;                  4        TP<                  TP>                  J d   TPA                  RR.34       \C        TPE                  4       4      Tn#        RTn$        TPK                  4        S PM                  R4       S PO                  4         ELU\P         d&    S PM                  R4       S PO                  4         EL\R         d    h  S PU                  4        S PO                  4         EL; i)   )_setupshowrefcountgettotalrefcountc                    V ^8  d   QhRRRR/# )r   	statementr
   r	   r3   r   )r   s   "r   r   7run_multiline_interactive_console.<locals>.__annotate__v   s      S T r   c                d  < V P                  4       p V SP                  9   g   V \        9  d   R # \        4       pVP                  P                  4        \        V ,          p\        V4      '       d+   VP                  4       ;_uu_ 4        V! 4        RRR4       R# R #   + '       g   i     R# ; i)FNT)r@   localsREPL_COMMANDSr   historypopcallablesuspend_history)rT   r'   commandr0   s   &  r   maybe_run_command<run_multiline_interactive_console.<locals>.maybe_run_commandv   s|    OO%	&)=*H	*G''))	 * *)s   
BB/	Tps1z>>> ps2z... z<python-input->r5   )filename_symbolz-failed to open the history file for writing: Nzisearch-endr   z
KeyboardInterrupt
z
MemoryError
[z refs, z	 blocks]
)-readlinerP   rW   r:   compilerflags	functoolspartialrI   sys	_xoptionsr   hasattrstdoutflush	Exceptiongetattrr   EOFErrorpushr"   r   FileNotFoundErrorPermissionErrorOSErrorwarningswarnKeyboardInterruptr   cmpltn_resetinput_transisearch_transdo_cmdr   get_unicodeposdirtyrefreshwriteresetbufferMemoryError
SystemExitshowtracebackrR   getallocatedblocks)r0   rJ   rP   
more_linesinput_n_is_x_showrefcount_set_is_pydebug_buildshow_ref_countr^   r`   ra   rT   
input_namemorer   rs   f$              r   !run_multiline_interactive_consoler   e   s   
 !
7>>  &&,6&"";8JG ]]..~>%78+AA0AN  *	"

  " #uf-C#uf-C+JSA	 !++)'!4J<< 3I >]e<fDO8S#% qLG& >MMC((*+ ,**,-Z9S     &@ S MaSQRRS ! 		"ANN}}/-"./(AEAGIIKMM12! 	"MM+,! 		"!!#!s   3F "G: 4F,  G: -G: >
F> 	G: F)&G: (F))G: ,F;7G: :F;;G: >G7G2-G: 2G77G: :B)L&L/"LL#L)__conditional_annotations____doc__
__future__r   _sitebuiltinsri   r   rk   rC   rw   errnorf   r   r   r   __annotations__unix_consoler   ModuleNotFoundErrorwindows_consoler   r"   r(   Quitter_Printerr+   _HelperrX   rI   r   )r   s   @r   <module>r      s   *
 #   	 
    G G 	6 5($5 M!!&"-
M!!&"-''S]]C
M!!#]
M!!&"-&P P Pw  ('(s   C CC