
    h                    <    S SK Jr  S SKJr  SSKJr   " S S5      rg)    )annotations)IO   )o8c                  0    \ rS rSrSrSrSS jrS	S jrSrg)
PaletteFile   z-File handler for Teragon-style palette files.RGBc                &   [        S5       Vs/ s H  n[        U5      S-  PM     nn UR                  5       nU(       d  OUR                  S5      (       a  M1  [	        U5      S:  a  Sn[        U5      eUR                  5        Vs/ s H  n[        U5      PM     nn Uu  p(pSUs=::  a  S::  a(  O  O%[        U5      [        U	5      -   [        U
5      -   X2'   M  SR                  U5      U l
        g s  snf s  snf ! [         a
    Uu  p(U=p Nkf = f)	N         #d   zbad palette filer          )ranger   readline
startswithlenSyntaxErrorsplitint
ValueErrorjoinpalette)selffpir   smsgxvrgbs              A/var/www/html/env/lib/python3.13/site-packages/PIL/PaletteFile.py__init__PaletteFile.__init__   s    &+Cj1j2a519j1A||D!!1v|(!#&&!"+AQA+ q
 A}}URU]RU2
' * xx(/ 2 ,  	As   C2C7C< <DDc                2    U R                   U R                  4$ )N)r   rawmode)r   s    r&   
getpalettePaletteFile.getpalette5   s    ||T\\))r   )r   N)r   z	IO[bytes]returnNone)r-   ztuple[bytes, str])	__name__
__module____qualname____firstlineno____doc__r*   r'   r+   __static_attributes__ r   r&   r   r      s    7G)4*r   r   N)
__future__r   typingr   _binaryr   r   r5   r   r&   <module>r9      s    #   *  *r   