+
    ‚i   c                   sN   € R t ^ RIHt ^RIHt ^RIHt ^RIHt  ! R R4      tR# )zv
OS-independent base for an event and VT sequence scanner

See unix_eventqueue and windows_eventqueue for subclasses.
)Údeque)Úkeymap©ÚEvent)Útracec                   sŒ   a € ] tR t^!t o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltV 3R lR lt	Rt
V tR# )ÚBaseEventQueuec                s@   <€ V ^8„  d   QhRS[ RS[S[S[ 3,          RR/# )é   ÚencodingÚkeymap_dictÚreturnN)ZstrÚdictÚbytes©ZformatÚ__classdict__ó   "€Ú0/usr/lib64/python3.14/_pyrepl/base_eventqueue.pyÚ__annotate__ÚBaseEventQueue.__annotate__"   s+   ø€ ÷ ñ ¡ð ±4¹¹s¸
Õ3Cð Èñ ó    c                sÔ   € \         P                  ! V4      V n        V P                  V n         \        R V P                   R7       Wn        \        4       V n        \        4       V n        R# )zkeymap {k!r}©ÚkN)	r   Zcompile_keymapÚcompiled_keymapr   r   r    ÚeventsÚ	bytearrayÚbuf)Úselfr   r   s   &&&r   Ú__init__ZBaseEventQueue.__init__"   sG   € Ü%×4Ò4°[ÓAˆÔØ×*Ñ*ˆŒÜˆn §¡Õ,Ø ŒÜ$)£GˆŒÜ“;ˆŽr   c                s.   <€ V ^8„  d   QhRS[ R,          /# )r   r	   Nr   r   r   r   r   r   *   s   ø€ ÷ ñ ‘U˜T•\ñ r   c                s^   € V P                   '       d   V P                   P                  4       # R# )z*
Retrieves the next event from the queue.
N)r   Zpopleft©r   ó   &r   ÚgetZBaseEventQueue.get*   s#   € ð ;;ˆ;Ø—;‘;×&Ñ&Ó(Ð(ár   c                ó    <€ V ^8„  d   QhRS[ /# ©r   r	   )Zboolr   r   r   r   r   3   s   ø€ ÷ ñ ‘tñ r   c                s$   € V P                   '       * # )z
Checks if the queue is empty.
)r   r   r   r   ÚemptyZBaseEventQueue.empty3   s   € ð —;‘;ŒÐr   c                r   r   )r   r   r   r   r   r   9   s   ø€ ÷ ñ ™9ñ r   c                s<   € V P                   p\        4       V n         V# )z.
Flushes the buffer and returns its contents.
)r   r   )r   Zolds   & r   Ú	flush_bufZBaseEventQueue.flush_buf9   s   € ð h‰hˆÜ“;ˆŒØˆ
r   c                s$   <€ V ^8„  d   QhRS[ RR/# )r   Úeventr	   Nr   r   r   r   r   r   A   s   ø€ ÷ "ñ "™Eð " dñ "r   c                sV   € \        RVR7       V P                  P                  V4       R# )z"
Inserts an event into the queue.
zadded event {event})r"   N)r   r   Úappend)r   r"   s   &&r   ÚinsertZBaseEventQueue.insertA   s!   € ô 	Ð#¨5Õ1Ø‰×Ñ˜5Ö!r   c                s4   <€ V ^8„  d   QhRS[ S[,          RR/# )r   Úcharr	   N)Úintr   r   r   r   r   r   H   s   ø€ ÷ &/ñ &/™™uð &/¨ñ &/r   c           
     s.  € \        V\        4      '       d   TM
\        V4      pVP                  4       pV P                  P                  V4       WP                  9   dŸ   V P                  V P                  J d   V P                  V,          p\        RVR7       \        V\        4      '       d	   W0n        R# V P                  \        RV\        V P                  4       4      4      4       V P                  V n        R# V P                  '       d‚   V P                  ^ ,          ^8X  dj   \        R4       V P                  V n        V P                  \        RRR4      4       V P                  4       R,           F  pV P                  V4       K  	  R#  \        V P                  4      P                  V P                   4      pV P                  \        RV\        V P                  4       4      4      4       T P                  T n        R#   \"         d     R# i ; i)	zQ
Processes a character by updating the buffer and handling special key mappings.
zfound map {k!r}r   Zkeyz,unrecognized escape sequence, propagating...Zs   :i   NNN)Z
isinstancer&   ZordZto_bytesr   r#   r   r   r   r
   r$   r   r   r!   ÚpushZdecoder   ZUnicodeError)r   r%   Zord_charr   Z_cZdecodeds   &&    r   r'   ZBaseEventQueue.pushH   s  € ô
 & d¬C×0Ò0‘4´c¸$³iˆØ× Ñ Ó"ˆØ‰‰˜Ô!à—;‘;ÔØ{‰{˜d×2Ñ2Ó2ð —‘˜DÕ!ˆAÜÐ# qÕ)Ü˜!œT×"Ò"Ø–à—‘œE %¨¬E°$·.±.Ó2BÓ,CÓDÔEØ"×2Ñ2–àXXˆX˜$Ÿ(™( 1+¨Ô+ô Ð@ÔAØ×.Ñ.ˆDŒKØK‰Kœ˜e V¨WÓ5Ô6Ø—n‘nÓ& r×*Ð*Ø—	‘	˜"–ó +ðLÜ §¡›/×0Ñ0°·±Ó?ð —‘œE %¨´%¸¿¹Ó8HÓ2IÓJÔKØ×.Ñ.ˆDŽKøô	  ô Úðús   Æ.H ÈHÈH)r   r   r   r   r   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__r   r   r    r!   r$   r'   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r   !   sA   ø‡ € ÷ð ÷ð ÷ð ÷ð ÷"ð "÷&/ö &/r   r   N)	Z__doc__Zcollectionsr    Z r   Zconsoler   r   r   ) r   r   Ú<module>r(      s$   ðñ*õ å Ý Ý ÷M/ó M/r   