ó
    EñiÍ  ã                  óh   • S SK Jr  SSKJr  Sr\(       a  S SKJr   " S S5      r S
     SS	 jjrg)é    )Úannotationsé   )ÚImageF)ÚCallablec                  ó@   • \ rS rSrSrS	S jrS
S jrSS jrSS jrSr	g)ÚIteratoré   a  
This class implements an iterator object that can be used to loop
over an image sequence.

You can use the ``[]`` operator to access elements by index. This operator
will raise an :py:exc:`IndexError` if you try to access a nonexistent
frame.

:param im: An image object.
c                ó„   • [        US5      (       d  Sn[        U5      eXl        [        U R                  SS5      U l        g )NÚseekzim must have seek methodÚ
_min_framer   )ÚhasattrÚAttributeErrorÚimÚgetattrÚposition)Úselfr   Úmsgs      ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/PIL/ImageSequence.pyÚ__init__ÚIterator.__init__&   s8   € Ü�r˜6×"Ñ"Ø,ˆCÜ  Ó%Ð%ØŒÜ §¡¨°qÓ9ˆ�ó    c                ó’   •  U R                   R                  U5        U R                   $ ! [         a  nSn[        U5      UeS nAff = f)Núend of sequence)r   r   ÚEOFErrorÚ
IndexError)r   ÚixÚer   s       r   Ú__getitem__ÚIterator.__getitem__-   sA   € ð	)Ø�G‰G�L‰L˜ÔØ—7‘7ˆNøÜó 	)Ø#ˆCÜ˜S“/ qÐ(ûð	)ús   ‚&) ©
A³AÁAc                ó   • U $ ©N© )r   s    r   Ú__iter__ÚIterator.__iter__5   s   € Øˆr   c                óÐ   •  U R                   R                  U R                  5        U =R                  S-  sl        U R                   $ ! [         a  nSn[	        U5      UeS nAff = f)Nr   r   )r   r   r   r   ÚStopIteration)r   r   r   s      r   Ú__next__ÚIterator.__next__8   sT   € ð	,Ø�G‰G�L‰L˜Ÿ™Ô'Ø�MŠM˜QÑ�MØ—7‘7ˆNøÜó 	,Ø#ˆCÜ Ó$¨!Ð+ûð	,ús   ‚AA Á
A%ÁA Á A%)r   r   N)r   úImage.ImageÚreturnÚNone)r   Úintr*   r)   )r*   r   )r*   r)   )
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r#   r'   Ú__static_attributes__r"   r   r   r   r      s   † ñ	ô:ô)ô÷,r   r   Nc                ó8  • [        U [        5      (       d  U /n / nU  HP  nUR                  5       nU[        U5       Vs/ s H  oUR	                  5       PM     sn-  nUR                  U5        MR     U(       a  U V s/ s H
  o" U 5      PM     sn $ U$ s  snf s  sn f )a  
Applies a given function to all frames in an image or a list of images.
The frames are returned as a list of separate images.

:param im: An image, or a list of images.
:param func: The function to apply to all of the image frames.
:returns: A list of images.
)Ú
isinstanceÚlistÚtellr   Úcopyr   )r   ÚfuncÚimsÚ
imSequenceÚcurrentÚim_frames         r   Ú
all_framesr=   B   s�   € ô �bœ$×ÑØˆTˆà
€CÛˆ
Ø—/‘/Ó#ˆà´¸Ô0DÓEÒ0D H—‘–Ñ0DÑEÑEˆà�‰˜Ö ñ ö (,™sÓ#šs˜ˆD�ŽH™sÑ#Ð4°Ð4ùò Fùò $s   ¾BÁ<Br!   )r   zImage.Image | list[Image.Image]r8   z+Callable[[Image.Image], Image.Image] | Noner*   zlist[Image.Image])	Ú
__future__r   Ú r   ÚTYPE_CHECKINGÚcollections.abcr   r   r=   r"   r   r   Ú<module>rB      sG   ðõ" #å à€ÞÝ(÷%,ñ %,ðT 9=ð5Ø'ð5à
5ð5ð ö5r   