+
    Diw                    "   ^ RI Ht Rt^ RIt^ RIHtHtHt ^ RIH	t	H
t
 ^ RIHtHt ^R	IHtHtHtHt ^R
IHtHtHtHtHtHt ]P4                  R8  d   ^ RIHt M^ RIHt ]	! RR7       ! R R]4      4       t ! R R]]4      t ! R R]4      tR# )    )annotationsBufferedByteReceiveStreamBufferedByteStreamBufferedConnectableN)CallableIterableMapping)	dataclassfield)AnySupportsIndex)ClosedResourceErrorDelimiterNotFoundEndOfStreamIncompleteRead)AnyByteReceiveStreamAnyByteStreamAnyByteStreamConnectableByteReceiveStream
ByteStreamByteStreamConnectable)overrideF)eqc                      ] tR t^t$ RtR]R&   ]! R]R7      tR]R&   ]! RRR7      t	R	]R
&   R R lt
]R R l4       t]R R l4       tR R ltRR R lltR R ltR R ltRtR# )r   z
Wraps any bytes-based receive stream and uses a buffer to provide sophisticated
receiving capabilities in the form of a byte stream.
r   receive_streamF)initdefault_factory	bytearray_buffer)r   defaultbool_closedc                   V ^8  d   QhRR/#    returnNone )formats   "t/Users/tonyclaw/.openclaw/workspace/services/omi-webhook/venv/lib/python3.14/site-packages/anyio/streams/buffered.py__annotate__&BufferedByteReceiveStream.__annotate__)   s      d     c                	d   "   V P                   P                  4       G R j  xL
  RV n        R #  L5i)NT)r   acloser"   selfs   &r*   r/    BufferedByteReceiveStream.aclose)   s)     !!((*** 	+s   0.0c                   V ^8  d   QhRR/# )r%   r&   bytesr(   )r)   s   "r*   r+   r,   .   s     # # #r-   c                ,    \        V P                  4      # )z"The bytes currently in the buffer.)r4   r   r0   s   &r*   buffer BufferedByteReceiveStream.buffer-   s     T\\""r-   c                   V ^8  d   QhRR/# )r%   r&   zMapping[Any, Callable[[], Any]]r(   )r)   s   "r*   r+   r,   3   s     4 4"A 4r-   c                	.    V P                   P                  # N)r   extra_attributesr0   s   &r*   r;   *BufferedByteReceiveStream.extra_attributes2   s    ""333r-   c                    V ^8  d   QhRRRR/# )r%   datazIterable[SupportsIndex]r&   r'   r(   )r)   s   "r*   r+   r,   6   s     " "5 "T "r-   c               <    V P                   P                  V4       R# )a  
Append data directly into the buffer.

Any data in the buffer will be consumed by receive operations before receiving
anything from the wrapped stream.

:param data: the data to append to the buffer (can be bytes or anything else
    that supports ``__index__()``)

N)r   extend)r1   r>   s   ""r*   	feed_data#BufferedByteReceiveStream.feed_data6   s     	D!r-   c                    V ^8  d   QhRRRR/# )r%   	max_bytesintr&   r4   r(   )r)   s   "r*   r+   r,   C   s      s u r-   c                	  "   V P                   '       d   \        hV P                  '       d*   \        V P                  R V 4      pV P                  R V1 V# \	        V P
                  \        4      '       d$   V P
                  P                  V4      G R j  xL
 # V P
                  P                  4       G R j  xL
 p\        V4      V8  d#   V P                  P                  W!R  4       VR V # V#  LZ L:5ir:   )
r"   r   r   r4   
isinstancer   r   receivelenr@   )r1   rD   chunks   && r*   rH   !BufferedByteReceiveStream.receiveC   s     <<<%%<<<$,,z	23EZiZ(L++->??,,44Y??? --5577E5zI%##E*$56Zi(( @ 8s)   *C3A'C3C/!C36C179C31C3c                    V ^8  d   QhRRRR/# )r%   nbytesrE   r&   r4   r(   )r)   s   "r*   r+   r,   X   s     ' 'C 'E 'r-   c                  "    V\        V P                  4      ,
          pV^ 8:  d*   V P                  RV pV P                  RV1 \        V4      #  \        V P                  \
        4      '       d%   V P                  P                  V4      G Rj  xL
 pM#V P                  P                  4       G Rj  xL
 p V P                  P                  V4       K   LE L$  \         d   p\        ThRp?ii ; i5i)z
Read exactly the given amount of bytes from the stream.

:param nbytes: the number of bytes to read
:return: the bytes read
:raises ~anyio.IncompleteRead: if the stream was closed before the requested
    amount of bytes could be read from the stream

N)
rI   r   r4   rG   r   r   rH   r   r   r@   )r1   rM   	remainingretvalrJ   excs   &&    r*   receive_exactly)BufferedByteReceiveStream.receive_exactlyX   s      T\\!22IA~gv.LL&)V}$.d113DEE"&"5"5"="=i"HHE"&"5"5"="="??E LL& I? .$#-.sZ   AC3>C CC C3C 2C3C 7C3C C C0$C++C00C3c               $    V ^8  d   QhRRRRRR/# )r%   	delimiterr4   rD   rE   r&   r(   )r)   s   "r*   r+   r,   s   s!     $& $&U $&s $&u $&r-   c                8  "   \        V4      p^ p V P                  P                  W4      pV^ 8  d:   V P                  RV pV P                  RV\        V4      ,           1 \        V4      # \        V P                  4      V8  d   \	        V4      h V P
                  P                  4       G Rj  xL
 p\        \        T P                  4      T,
          ^,           ^ 4      pT P                  P                  T4       K   LN  \         d   p\        ThRp?ii ; i5i)a  
Read from the stream until the delimiter is found or max_bytes have been read.

:param delimiter: the marker to look for in the stream
:param max_bytes: maximum number of bytes that will be read before raising
    :exc:`~anyio.DelimiterNotFound`
:return: the bytes read (not including the delimiter)
:raises ~anyio.IncompleteRead: if the stream was closed before the delimiter
    was found
:raises ~anyio.DelimiterNotFound: if the delimiter is not found within the
    bytes read up to the maximum allowed

N)rI   r   findr4   r   r   rH   r   r   maxr@   )	r1   rU   rD   delimiter_sizeoffsetindexfoundr>   rQ   s	   &&&      r*   receive_until'BufferedByteReceiveStream.receive_untils   s      YLL%%i8EzVe,LL!;53y>#9!;<U|# 4<< I-'	22.!0088::
 T\\*^;a?CFLL% ; .$#-.s=   BDD  /C>0D  4A
D>D   DDDD)r"   N)i   )__name__
__module____qualname____firstlineno____doc____annotations__r   r   r   r"   r/   propertyr6   r;   rA   rH   rR   r]   __static_attributes__r(   r-   r*   r   r      sw    
 )(E9EGYEue4GT4 # # 4 4"*'6$& $&r-   c                  ^   a  ] tR t^tRtR V 3R llt]R R l4       t]R R l4       tRt	V ;t
# )	r   zy
A full-duplex variant of :class:`BufferedByteReceiveStream`. All writes are passed
through to the wrapped stream as-is.
c                   V ^8  d   QhRR/# )r%   streamr   r(   )r)   s   "r*   r+   BufferedByteStream.__annotate__   s      } r-   c                2   < \         SV `  V4       Wn        R# )z*
:param stream: the stream to be wrapped

N)super__init___stream)r1   ri   	__class__s   &&r*   rm   BufferedByteStream.__init__   s    
 	 r-   c                   V ^8  d   QhRR/# r$   r(   )r)   s   "r*   r+   rj      s     & & &r-   c                	V   "   V P                   P                  4       G R j  xL
  R #  L5ir:   )rn   send_eofr0   s   &r*   rs   BufferedByteStream.send_eof   s     ll##%%%s   )')c                    V ^8  d   QhRRRR/# )r%   itemr4   r&   r'   r(   )r)   s   "r*   r+   rj      s     & &u & &r-   c                	X   "   V P                   P                  V4      G R j  xL
  R #  L5ir:   )rn   send)r1   rv   s   &&r*   rx   BufferedByteStream.send   s     ll%%%s   *(*)rn   )r_   r`   ra   rb   rc   rm   r   rs   rx   rf   __classcell__)ro   s   @r*   r   r      s:    
  & & & &r-   c                  8    ] tR t^tR R lt]R R l4       tRtR# )r   c                   V ^8  d   QhRR/# )r%   connectabler   r(   )r)   s   "r*   r+    BufferedConnectable.__annotate__   s     ' '$< 'r-   c                    Wn         R# )z.
:param connectable: the connectable to wrap

Nr}   )r1   r}   s   &&r*   rm   BufferedConnectable.__init__   s
    
 'r-   c                   V ^8  d   QhRR/# )r%   r&   r   r(   )r)   s   "r*   r+   r~      s     * *1 *r-   c                	h   "   V P                   P                  4       G R j  xL
 p\        V4      #  L5ir:   )r}   connectr   )r1   ri   s   & r*   r   BufferedConnectable.connect   s,     ''//11!&)) 2s   202r   N)r_   r`   ra   rb   rm   r   r   rf   r(   r-   r*   r   r      s    ' * *r-   )r   r   r   )      ) 
__future__r   __all__syscollections.abcr   r   r	   dataclassesr
   r   typingr   r    r   r   r   r   abcr   r   r   r   r   r   version_infor   typing_extensionsr   r   r   r(   r-   r*   <module>r      s    "  7 7 ( % R R  w* ex& 1 x& x&v&2J &.*/ *r-   