
    "Ki-                        % S SK r S SKrS SKrS SKJrJr  S SKJr  S SKJ	r	J
r
JrJrJrJr  \R                  S:  a  S SKJr  OS SKJr  \\\SS	4   r  S SKrS
r \R                  S:  a  S SKJr  OS SKJr  S
rSrSrS rSr  " S S\5      r! " S S\5      r" " S S\5      r# " S S\SS9r$ " S S5      r%\%" \5      r&\%\'S'   S\#SS4S jr(  S-S \\)   S!\*S\+4S" jjr, " S# S$\5      r- " S% S&5      r. " S' S(\-5      r/ " S) S*\-5      r0 " S+ S,\-5      r1g! \ a    S SKr Nf = f! \ a    Sr Nf = f! \ a    Sr Nf = f).    N)ABCabstractmethod)Executor)AnyFinalOptionalProtocol	TypedDictcast)      )Buffer)Unionzmemoryview[int]zmemoryview[bytes]TF)r      )ZstdDecompressori   i   c                   <    \ rS rSrS\S\4S jrS	S\S\4S jjrSr	g)
ZLibCompressObjProtocol,   datareturnc                     g N selfr   s     [/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/aiohttp/compression_utils.pycompress ZLibCompressObjProtocol.compress-   s    s    modec                    g r   r   r   r!   s     r   flushZLibCompressObjProtocol.flush.   s    #r    r   N.)
__name__
__module____qualname____firstlineno__r   bytesr   intr$   __static_attributes__r   r    r   r   r   ,   s    2V225#5555r    r   c                   \    \ rS rSrSS\S\S\4S jjrSS\S\4S jjr\	S\
4S j5       rS	rg
)ZLibDecompressObjProtocol1   r   
max_lengthr   c                     g r   r   r   r   r1   s      r   
decompress$ZLibDecompressObjProtocol.decompress2   s    r    lengthc                    g r   r   r   r6   s     r   r$   ZLibDecompressObjProtocol.flush3   s    Cr    c                     g r   r   r   s    r   eofZLibDecompressObjProtocol.eof5   s    r    r   Nr&   )r'   r(   r)   r*   r   r,   r+   r4   r$   propertyboolr<   r-   r   r    r   r/   r/   1   s4    KvK3KK7C7U7T r    r/   c                       \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\S'         SS\S\S	\S
\S\S\\   S\4S jjr	 SS	\S\S\
4S jjr SS\S	\S\S\4S jjr SS	\S\S\S\4S jjrSrg)ZLibBackendProtocol9   	MAX_WBITSZ_FULL_FLUSHZ_SYNC_FLUSHZ_BEST_SPEEDZ_FINISHlevelmethodwbitsmemLevelstrategyzdictr   c                     g r   r   )r   rH   rI   rJ   rK   rL   rM   s          r   compressobjZLibBackendProtocol.compressobj@   s     #&r    c                     g r   r   )r   rJ   rM   s      r   decompressobj!ZLibBackendProtocol.decompressobjI   s    $'r    r   c                    g r   r   )r   r   rH   rJ   s       r   r   ZLibBackendProtocol.compressM       r    bufsizec                    g r   r   )r   r   rJ   rW   s       r   r4   ZLibBackendProtocol.decompressP   rV   r    r   N)......)..)r'   r(   r)   r*   r,   __annotations__r   r   r   rO   r/   rR   r+   r   r4   r-   r   r    r   rA   rA   9   s    NM "%&& & 	&
 & & & 
!& 14(('-(	"(
 ?B&)8;	 AD&):=	 r    rA   c                   4    \ rS rSr% \\S'   \\S'   \\S'   Srg)CompressObjArgsU   rJ   rL   rH   r   N)r'   r(   r)   r*   r,   rZ   r-   r   r    r   r\   r\   U   s    JMJr    r\   )totalc                   $   \ rS rSrS\4S jr\S\4S j5       r\S\	4S j5       r
\S\	4S j5       r\S\	4S j5       r\S\	4S	 j5       r\S\	4S
 j5       rS\S\S\4S jrS\S\S\4S jrS\S\S\S\4S jrS\S\S\S\4S jrS\S\4S jrSrg)ZLibBackendWrapper[   _zlib_backendc                     Xl         g r   rb   )r   rb   s     r   __init__ZLibBackendWrapper.__init__\   s    2?r    r   c                 0    [        U R                  SS5      $ )Nr'   	undefinedgetattrrb   r;   s    r   nameZLibBackendWrapper.name_   s    t)):{CCr    c                 .    U R                   R                  $ r   )rb   rC   r;   s    r   rC   ZLibBackendWrapper.MAX_WBITSc   s    !!+++r    c                 .    U R                   R                  $ r   )rb   rD   r;   s    r   rD   ZLibBackendWrapper.Z_FULL_FLUSHg       !!...r    c                 .    U R                   R                  $ r   )rb   rE   r;   s    r   rE   ZLibBackendWrapper.Z_SYNC_FLUSHk   rq   r    c                 .    U R                   R                  $ r   )rb   rF   r;   s    r   rF   ZLibBackendWrapper.Z_BEST_SPEEDo   rq   r    c                 .    U R                   R                  $ r   )rb   rG   r;   s    r   rG   ZLibBackendWrapper.Z_FINISHs   s    !!***r    argskwargsc                 :    U R                   R                  " U0 UD6$ r   )rb   rO   r   rx   ry   s      r   rO   ZLibBackendWrapper.compressobjw   s    !!--t>v>>r    c                 :    U R                   R                  " U0 UD6$ r   )rb   rR   r{   s      r   rR    ZLibBackendWrapper.decompressobjz   s    !!//@@@r    r   c                 B    U R                   R                  " U/UQ70 UD6$ r   )rb   r   r   r   rx   ry   s       r   r   ZLibBackendWrapper.compress}   s#    !!**4A$A&AAr    c                 B    U R                   R                  " U/UQ70 UD6$ r   )rb   r4   r   s       r   r4   ZLibBackendWrapper.decompress   s#    !!,,TCDCFCCr    attrnamec                 .    [        U R                  U5      $ r   ri   )r   r   s     r   __getattr__ZLibBackendWrapper.__getattr__   s    t))844r    rd   N)r'   r(   r)   r*   rA   re   r>   strrk   r,   rC   rD   rE   rF   rG   r   r   rO   r/   rR   r   r+   r   r4   r   r-   r   r    r   r`   r`   [   sO   @&9 @ Dc D D ,3 , , /c / / /c / / /c / / +# + +? ? ?8O ?A3 A# A:S ABV BC B3 B5 BDv Dc DS DU D5C 5C 5r    r`   ZLibBackendnew_zlib_backendr   c                     U [         l        g r   )r   rb   )r   s    r   set_zlib_backendr      s
     0Kr    encodingsuppress_deflate_headerc                     U S:X  a  S[         R                  -   $ U(       a  [         R                  * $ [         R                  $ )Ngzip   )r   rC   )r   r   s     r   encoding_to_moder      s9     6K))))%<K!!!W+BWBWWr    c                   |    \ rS rSrS\4S\\   S\\   4S jjr\	\
4S\S\S\4S	 jj5       r\
4S\S\S\4S
 jjrSrg)DecompressionBaseHandler   Nexecutormax_sync_chunk_sizec                     Xl         X l        g)z&Base class for decompression handlers.N	_executor_max_sync_chunk_size)r   r   r   s      r   re   !DecompressionBaseHandler.__init__   s     "$7!r    r   r1   r   c                     gDecompress the given data.Nr   r3   s      r   decompress_sync(DecompressionBaseHandler.decompress_sync   s    r    c                    #    U R                   b[  [        U5      U R                   :  aB  [        R                  " 5       R	                  U R
                  U R                  X5      I Sh  vN $ U R                  X5      $  N7fr   )r   lenasyncioget_event_looprun_in_executorr   r   r3   s      r   r4   #DecompressionBaseHandler.decompress   so     
 %%1D	D555 //1AA 4 4d   ##D55s   A$A>&A<'A>r   )r'   r(   r)   r*   MAX_SYNC_CHUNK_SIZEr   r   r,   re   r   ZLIB_MAX_LENGTH_UNLIMITEDr+   r   r4   r-   r   r    r   r   r      s     (,-@88$8 &c]8 -F))'*)	) ) .G66'*6	6 6r    r   c                       \ rS rSrSSSSSS\4S\\   S\S\\   S\\   S\\   S	\\	   S
\\   4S jjr
S\S\4S jrS\S\4S jrSS\\   S\4S jjrSrg)ZLibCompressor   NFr   r   rH   rJ   rL   r   r   c                    X`l         Xpl        Uc  [        X5      OUU l        [	        [
        R                  5      U l        0 nU R                  US'   Ub  XXS'   Ub  X8S'   U R                  R                  " S0 UD6U l        g )NrJ   rL   rH   r   )	r   r   r   _moder`   r   rb   rO   _compressor)	r   r   r   rH   rJ   rL   r   r   ry   s	            r   re   ZLibCompressor.__init__   s     "$7! } X? 	

 %7{7P7P$Q"$**w!):#7O--99CFCr    r   r   c                 8    U R                   R                  U5      $ r   )r   r   r   s     r   compress_syncZLibCompressor.compress_sync   s    ((..r    c                 0  #    U R                   SL=(       a    [        U5      U R                   :  nU(       aL  [        R                  " 5       R	                  U R
                  U R                  R                  U5      I Sh  vN $ U R                  U5      $  N7f)a  Compress the data and returned the compressed bytes.

Note that flush() must be called after the last call to compress()

If the data size is large than the max_sync_chunk_size, the compression
will be done in the executor. Otherwise, the compression will be done
in the event loop.

**WARNING: This method is NOT cancellation-safe when used with flush().**
If this operation is cancelled, the compressor state may be corrupted.
The connection MUST be closed after cancellation to avoid data corruption
in subsequent compress operations.

For cancellation-safe compression (e.g., WebSocket), the caller MUST wrap
compress() + flush() + send operations in a shield and lock to ensure atomicity.
N)	r   r   r   get_running_loopr   r   r   r   r   )r   r   should_use_executors      r   r   ZLibCompressor.compress   s     & %%T1 6D	D555 	  113CC 0 0 9 94   !!$''s   A<B>B?Br!   c                 r    U R                   R                  Ub  U5      $ U R                  R                  5      $ )a  Flush the compressor synchronously.

**WARNING: This method is NOT cancellation-safe when called after compress().**
The flush() operation accesses shared compressor state. If compress() was
cancelled, calling flush() may result in corrupted data. The connection MUST
be closed after compress() cancellation.

For cancellation-safe compression (e.g., WebSocket), the caller MUST wrap
compress() + flush() + send operations in a shield and lock to ensure atomicity.
)r   r$   rb   rG   r#   s     r   r$   ZLibCompressor.flush   s>     %%$D
 	
*.*<*<*E*E
 	
r    )r   r   r   r   rb   r   )r'   r(   r)   r*   r   r   r   r?   r,   r   re   r+   r   r   r$   r-   r   r    r   r   r      s     #'(-##"&'+-@D3-D "&D }	D
 }D 3-D 8$D &c]D6/% /E /(5 (U (8
(3- 
5 
 
r    r   c            
          ^  \ rS rSrSSS\4S\\   S\S\\   S\\	   4U 4S jjjr
\4S	\S
\	S\4S jjrSS\	S\4S jjr\S\4S j5       rSrU =r$ )ZLibDecompressori  NFr   r   r   r   c                    > [         TU ]  X4S9  [        X5      U l        [	        [
        R                  5      U l        U R                  R                  U R                  S9U l        g )Nr   r   )rJ   )	superre   r   r   r`   r   rb   rR   _decompressor)r   r   r   r   r   	__class__s        r   re   ZLibDecompressor.__init__  sT     	(T%hH
$6{7P7P$Q!//==DJJ=Or    r   r1   r   c                 8    U R                   R                  X5      $ r   )r   r4   r3   s      r   r    ZLibDecompressor.decompress_sync  s     !!,,T>>r    r6   c                 x    US:  a  U R                   R                  U5      $ U R                   R                  5       $ )Nr   )r   r$   r8   s     r   r$   ZLibDecompressor.flush  s?     z $$V,	
 ##))+	
r    c                 .    U R                   R                  $ r   )r   r<   r;   s    r   r<   ZLibDecompressor.eof  s    !!%%%r    )r   r   rb   )r   )r'   r(   r)   r*   r   r   r   r?   r   r,   re   r   r   r+   r   r$   r>   r<   r-   __classcell__r   s   @r   r   r     s     #'(-'+-@
P3-
P "&
P 8$	
P
 &c]
P 
P /H??(+?	?

C 
 
 &T & &r    r   c                   v   ^  \ rS rSrS\4S\\   S\\   SS4U 4S jjjr\	4S\
S\S\4S	 jjrS\4S
 jrSrU =r$ )BrotliDecompressori   Nr   r   r   c                    > [         (       d  [        S5      e[        R                  " 5       U l        [
        TU ]  XS9  g)z)Decompress data using the Brotli library.zIThe brotli decompression is not available. Please install `Brotli` moduler   N)
HAS_BROTLIRuntimeErrorbrotliDecompressor_objr   re   r   r   r   r   s      r   re   BrotliDecompressor.__init__$  s>     z1  '')	(Tr    r   r1   c                     [        U R                  S5      (       a)  [        [        U R                  R	                  X5      5      $ [        [        U R                  R                  X5      5      $ )r   r4   )hasattrr   r   r+   r4   processr3   s      r   r   "BrotliDecompressor.decompress_sync2  sM     499l++tyy33DEFFE499,,T>??r    c                     [        U R                  S5      (       a(  [        [        U R                  R	                  5       5      $ g)zFlush the decompressor.r$   r    )r   r   r   r+   r$   r;   s    r   r$   BrotliDecompressor.flush:  s.    499g&&tyy011r    r   )r'   r(   r)   r*   r   r   r   r,   re   r   r   r+   r   r$   r-   r   r   s   @r   r   r      sw     (,-@U8$U &c]U 
	U U /H@@(+@	@u  r    r   c                   v   ^  \ rS rSrS\4S\\   S\\   SS4U 4S jjjr\	4S\
S\S\
4S	 jjrS\
4S
 jrSrU =r$ )ZSTDDecompressoriA  Nr   r   r   c                 j   > [         (       d  [        S5      e[        5       U l        [        TU ]  XS9  g )NzOThe zstd decompression is not available. Please install `backports.zstd` moduler   )HAS_ZSTDr   r   r   r   re   r   s      r   re   ZSTDDecompressor.__init__B  s8    
 x9  %&	(Tr    r   r1   c                 \    U[         :X  a  [        OUnU R                  R                  X5      $ r   )r   ZSTD_MAX_LENGTH_UNLIMITEDr   r4   )r   r   r1   zstd_max_lengths       r   r    ZSTDDecompressor.decompress_syncO  s1     66 & 	
 yy##D::r    c                     g)Nr    r   r;   s    r   r$   ZSTDDecompressor.flush[  s    r    r   )r'   r(   r)   r*   r   r   r   r,   re   r   r+   r   r$   r-   r   r   s   @r   r   r   A  ss     (,-@U8$U &c]U 
	U U .G
;
;'*
;	
;u  r    r   )NF)2r   syszlibabcr   r   concurrent.futuresr   typingr   r   r   r	   r
   r   version_infocollections.abcr   r   r+   	bytearray
brotlicffir   ImportErrorr   compression.zstdr   backports.zstdr   r   DEFAULT_MAX_DECOMPRESS_SIZEr   r   r   r/   rA   r\   r`   r   rZ   r   r   r?   r,   r   r   r   r   r   r   r   r    r   <module>r      s    
  # ' B Bw&5)%68KKLF# J
7"53H
  #    6h 6
 ( 8iu *5 *5Z #5T": :1': 1t 1
 #$)XsmX!X 	X6s 6<H
 H
V&/ &<1 B/ _	    J  HsB   D D& D4 
D# D& "D##D& &D10D14D?>D?