+
    JV-jz'  ã            	      ó´  € ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^RIHt . tR)R R lltR*R R	 llt ! R
 R4      t ! R R]4      t]P$                  R8X  d	   ]! ]4        ! R R]4      t]P$                  R8X  d	   ]! ]4        ! R R]P(                  ]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t]P$                  R+9  d¡   ]P6                  ! R4      '       d	   ]! ]4       ]P6                  ! R4      '       d	   ]! ]4       ]P6                  ! R 4      '       d	   ]! ]4       ]P6                  ! R!4      '       d	   ]! ]4       ]P6                  ! R"4      '       d	   ]! ]4        ! R# R$]4      t ^ R%IHt ]! ]4       ]!R&8X  dˆ   ]"! ]PF                  4      ^8  d   ]$! R'4       ]PJ                  ! 4        ]PL                  ! ]PF                  ^,          4      ;_uu_ 4       t']$! ]! ]'.]PF                  R(,          O5!  4       RRR4       R# R#   ]  d     L™i ; i  + '       g   i     R# ; i),é    )ÚannotationsN©Úquote)ÚAny)ÚImagec               ó$   € V ^8„  d   QhRRRRRR/# )é   Úviewerztype[Viewer] | ViewerÚorderÚintÚreturnÚNone© )Úformats   "Ú^/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/PIL/ImageShow.pyÚ__annotate__r      s"   € ÷ #ñ #Ð*ð #°3ð #¸tñ #ó    c                óÔ   € \        V \        4      '       d   \        V \        4      '       d   V ! 4       p V^ 8”  d   \        P                  V 4       R# \        P                  ^ V 4       R# )aü  
The :py:func:`register` function is used to register additional viewers::

    from PIL import ImageShow
    ImageShow.register(MyViewer())  # MyViewer will be used as a last resort
    ImageShow.register(MySecondViewer(), 0)  # MySecondViewer will be prioritised
    ImageShow.register(ImageShow.XVViewer(), 0)  # XVViewer will be prioritised

:param viewer: The viewer to be registered.
:param order:
    Zero or a negative integer to prepend this viewer to the list,
    a positive integer to append it.
N)Ú
isinstanceÚtypeÚ
issubclassÚViewerÚ_viewersÚappendÚinsert)r
   r   s   &&r   Úregisterr      sE   € ô �&œ$×Ò¤J¨v´v×$>Ò$>Ù“ˆØˆq„yÜ�‰˜Öä�‰˜˜6Ö"r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r	   ÚimageúImage.ImageÚtitleú
str | NoneÚoptionsr   r   Úboolr   )r   s   "r   r   r   3   s(   € ÷ ñ �ð  Jð À#ð È$ñ r   c                ó\   € \          F!  pVP                  ! V 3RV/VB '       g   K    R# 	  R# )zó
Display a given image.

:param image: An image object.
:param title: Optional title. Not all viewers can display the title.
:param \**options: Additional viewer options.
:returns: ``True`` if a suitable viewer was found, ``False`` otherwise.
r    TF)r   Úshow)r   r    r"   r
   s   &&, r   r%   r%   3   s/   € ÷ ˆØ�;Š;�uÑ5 EÐ5¨W×5Ò5Úñ ñ r   c                  ó„   € ] tR t^Bt$ RtR R ltRtR]R&    / tR]R&    R	 R
 lt	R R lt
R R ltR R ltR R ltRtR# )r   zBase class for viewers.c               ó$   € V ^8„  d   QhRRRRRR/# ©r	   r   r   r"   r   r   r   r   )r   s   "r   r   ÚViewer.__annotate__G   s!   € ÷ 1ñ 1˜+ð 1°#ð 1¸#ñ 1r   c                ó  € VP                   R9   ge   V P                  R8X  d   VP                   R9   gC   \        P                  ! VP                   4      pVP                   V8w  d   VP	                  V4      pV P
                  ! V3/ VB # )zk
The main function for displaying an image.
Converts the given image to the target format and displays it.
ÚPNG)Ú1ÚRGBA)zI;16ÚLA)Úmoder   r   ÚgetmodebaseÚconvertÚ
show_image)Úselfr   r"   Úbases   &&, r   r%   ÚViewer.showG   si   € ð �J‰J˜-Ô'Ø—‘˜uÔ$¨¯©°~Ô)Eä×$Ò$ U§Z¡ZÓ0ˆDØ�z‰z˜TÔ!ØŸ™ dÓ+�à�Š˜uÑ0¨Ñ0Ð0r   Nr!   r   zdict[str, Any]r"   c               ó    € V ^8„  d   QhRRRR/# )r	   r   r   r   r!   r   )r   s   "r   r   r)   ^   s   € ÷ ñ  ð °
ñ r   c                ó   € V P                   # )z3Return format name, or ``None`` to save as PGM/PPM.)r   ©r3   r   s   &&r   Ú
get_formatÚViewer.get_format^   s   € à�{‰{Ðr   c               ó$   € V ^8„  d   QhRRRRRR/# ©r	   ÚfileÚstrr"   r   r   r   )r   s   "r   r   r)   b   s!   € ÷ 'ñ ' ð '°ð '¸ñ 'r   c                ó   € Rp\        V4      h)zR
Returns the command used to display the file.
Not implemented in the base class.
zunavailable in base viewer)ÚNotImplementedError)r3   r=   r"   Úmsgs   &&, r   Úget_commandÚViewer.get_commandb   s   € ð
 +ˆÜ! #Ó&Ð&r   c               ó    € V ^8„  d   QhRRRR/# )r	   r   r   r   r>   r   )r   s   "r   r   r)   j   s   € ÷ Jñ J ð J°ñ Jr   c                ó\   € VP                   ! RRV P                  V4      /V P                  B # )z+Save to temporary file and return filename.r   r   )Ú_dumpr9   r"   r8   s   &&r   Ú
save_imageÚViewer.save_imagej   s&   € à�{Š{ÑI $§/¡/°%Ó"8ÐI¸D¿L¹LÑIÐIr   c               ó$   € V ^8„  d   QhRRRRRR/# r(   r   )r   s   "r   r   r)   n   s&   € ÷ Añ A ð A¸ð AÀñ Ar   c                óF   € V P                   ! V P                  V4      3/ VB # )zDisplay the given image.)Ú	show_filerG   ©r3   r   r"   s   &&,r   r2   ÚViewer.show_imagen   s   € à�~Š~˜dŸo™o¨eÓ4Ñ@¸Ñ@Ð@r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r	   Úpathr>   r"   r   r   r   r   )r   s   "r   r   r)   r   ó!   € ÷ ñ ˜cð ¨cð °cñ r   c                óª   € \         P                  P                  V4      '       g   \        h\         P                  ! V P
                  ! V3/ VB 4       ^# )ú
Display given file.
)ÚosrP   ÚexistsÚFileNotFoundErrorÚsystemrB   ©r3   rP   r"   s   &&,r   rK   ÚViewer.show_filer   s<   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü
�	Š	�$×"Ò" 4Ñ3¨7Ñ3Ô4Ùr   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r%   r   Ú__annotations__r"   r9   rB   rG   r2   rK   Ú__static_attributes__r   r   r   r   r   B   sF   ‡ Ù!õ1ð$ €FˆJÓØ/Ø €Gˆ^Ó Ø7õõ'õJõA÷ñ r   r   c                  óB   € ] tR t^tRtRtR^RR/tR R ltR R	 ltR
t	R# )ÚWindowsViewerzNThe default viewer on Windows is the default system application for PNG files.r+   Úcompress_levelÚsave_allTc               ó$   € V ^8„  d   QhRRRRRR/# r<   r   )r   s   "r   r   ÚWindowsViewer.__annotate__…   s!   € ÷ 
ñ 
 ð 
°ð 
¸ñ 
r   c                	ó   € R V RV R2# )zstart "Pillow" /WAIT "z)" && ping -n 4 127.0.0.1 >NUL && del /f "Ú"r   ©r3   r=   r"   s   &&,r   rB   ÚWindowsViewer.get_command…   s   € à$ T Fð +à˜˜qð"ð	
r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   rf   Œ   s!   € ÷ ñ ˜cð ¨cð °cñ r   c                óÌ   € \         P                  P                  V4      '       g   \        h\        P
                  ! V P                  ! V3/ VB R\        \        R4      R7       ^# )rS   TÚCREATE_NO_WINDOW)ÚshellÚcreationflags)rT   rP   rU   rV   Ú
subprocessÚPopenrB   ÚgetattrrX   s   &&,r   rK   ÚWindowsViewer.show_fileŒ   sQ   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü×ÒØ×Ò˜TÑ- WÑ-ØÜ!¤*Ð.@ÓAõ	
ñ
 r   r   N©
rZ   r[   r\   r]   r^   r   r"   rB   rK   r`   r   r   r   rb   rb      s'   † ÙXà€FØ  J°Ð5€Gõ
÷ñ r   rb   Úwin32c                  óB   € ] tR t^žtRtRtR^RR/tR R ltR R	 ltR
t	R# )Ú	MacViewerz2The default viewer on macOS using ``Preview.app``.r+   rc   rd   Tc               ó$   € V ^8„  d   QhRRRRRR/# r<   r   )r   s   "r   r   ÚMacViewer.__annotate__¤   s!   € ÷ ñ  ð °ð ¸ñ r   c                	óF   € R pRV R\        V4       R\        V4       R2pV# )zopen -a Preview.appÚ(Ú z; sleep 20; rm -f z)&r   ©r3   r=   r"   Úcommands   &&, r   rB   ÚMacViewer.get_command¤   s1   € ð (ˆØ�g�Y˜a¤ d£˜}Ð,>¼uÀT»{¸mÈ2ÐNˆØˆr   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   ry   «   s!   € ÷ ñ ˜cð ¨cð °cñ r   c                ó   € \         P                  P                  V4      '       g   \        h\        P
                  ! RRRV.4       \        \        RR4      ;'       d    \        \        R4      pV'       * ;'       d    \        P                  ;'       g    \        P                  ! R4      pV'       d   \        P                  ! VRR	V.4       ^# )
rS   Úopenz-azPreview.appÚfrozenFÚ_MEIPASSÚpython3z-cz<import os, sys, time; time.sleep(20); os.remove(sys.argv[1]))rT   rP   rU   rV   rp   Úcallrr   ÚsysÚhasattrÚ
executableÚshutilÚwhichrq   )r3   rP   r"   Úpyinstallerr‰   s   &&,  r   rK   ÚMacViewer.show_file«   sš   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü�Š˜  }°dÐ;Ô<äœc 8¨UÓ3×PÐP¼ÄÀZÓ8PˆØ%”o×8Ð8¬#¯.©.×TÐT¼V¿\º\È)Ó=Tˆ
ßÜ×ÒàØØRØð	ôñ r   r   Nrt   r   r   r   rw   rw   ž   s'   † Ù<à€FØ  J°Ð5€Gõ÷ñ r   rw   Údarwinc                  ó\   € ] tR t^ÅtRtR^RR/t]P                  R R l4       tR R lt	R	t
R
# )Ú
UnixViewerr+   rc   rd   Tc               ó$   € V ^8„  d   QhRRRRRR/# ©r	   r=   r>   r"   r   r   útuple[str, str]r   )r   s   "r   r   ÚUnixViewer.__annotate__Ê   s!   € ÷ ñ  3ð °3ð ¸?ñ r   c                	ó   € R # ©Nr   ri   s   &&,r   Úget_command_exÚUnixViewer.get_command_exÉ   s   € ár   c               ó$   € V ^8„  d   QhRRRRRR/# r<   r   )r   s   "r   r   r”   Í   s!   € ÷ *ñ * ð *°ð *¸ñ *r   c                	óV   € V P                   ! V3/ VB ^ ,          pV R\        V4       2# )r   r|   )r—   r   r}   s   &&, r   rB   ÚUnixViewer.get_commandÍ   s1   € Ø×%Ò% dÑ6¨gÑ6°qÕ9ˆØ�˜!œE $›K˜=Ð)Ð)r   r   N)rZ   r[   r\   r]   r   r"   ÚabcÚabstractmethodr—   rB   r`   r   r   r   r�   r�   Å   s7   † Ø€FØ  J°Ð5€Gà×Ñôó ð÷*ñ *r   r�   c                  ó2   € ] tR t^ÒtRtR R ltR R ltRtR# )Ú	XDGViewerz+
The freedesktop.org ``xdg-open`` command.
c               ó$   € V ^8„  d   QhRRRRRR/# r’   r   )r   s   "r   r   ÚXDGViewer.__annotate__×   s!   € ÷ #ñ # 3ð #°3ð #¸?ñ #r   c                	ó   € R ;r4W43# )úxdg-openr   )r3   r=   r"   r~   r‰   s   &&,  r   r—   ÚXDGViewer.get_command_ex×   s   € Ø)Ð)ˆØÐ"Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   r¡   Û   rQ   r   c                óŒ   € \         P                  P                  V4      '       g   \        h\        P
                  ! RV.4       ^# )rS   r£   ©rT   rP   rU   rV   rp   rq   rX   s   &&,r   rK   ÚXDGViewer.show_fileÛ   s3   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü×Ò˜* dÐ+Ô,Ùr   r   N©rZ   r[   r\   r]   r^   r—   rK   r`   r   r   r   rŸ   rŸ   Ò   s   † ñõ#÷ñ r   rŸ   c                  ó6   € ] tR t^åtRtRR R lltR R ltRtR# )	ÚDisplayViewerzT
The ImageMagick ``display`` command.
This viewer supports the ``title`` parameter.
Nc               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r	   r=   r>   r    r!   r"   r   r   r“   r   )r   s   "r   r   ÚDisplayViewer.__annotate__ë   s,   € ÷ #ñ #Øð#Ø *ð#Ø>Að#à	ñ#r   c                	óH   € R ;rEV'       d   VR\        V4       2,          pWE3# )Údisplayz -title r   ©r3   r=   r    r"   r~   r‰   s   &&&,  r   r—   ÚDisplayViewer.get_command_exë   s-   € ð  )Ð(ˆßØ˜¤%¨£, Ð0Õ0ˆGØÐ"Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   r®   ó   ó!   € ÷ ñ ˜cð ¨cð °cñ r   c                óø   € \         P                  P                  V4      '       g   \        hR.pVP	                  R4      pV'       d   VRV.,          pVP                  V4       \        P                  ! V4       ^# )rS   r°   r    z-title©rT   rP   rU   rV   Úgetr   rp   rq   ©r3   rP   r"   Úargsr    s   &&,  r   rK   ÚDisplayViewer.show_fileó   sa   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Øˆ{ˆØ—‘˜GÓ$ˆßØ�X˜uÐ%Õ%ˆDØ�‰�DÔä×Ò˜ÔÙr   r   r–   r©   r   r   r   r«   r«   å   s   † ñ÷
#÷ñ r   r«   c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	ÚGmDisplayVieweri  z*The GraphicsMagick ``gm display`` command.c               ó$   € V ^8„  d   QhRRRRRR/# r’   r   )r   s   "r   r   ÚGmDisplayViewer.__annotate__  ó!   € ÷ #ñ # 3ð #°3ð #¸?ñ #r   c                	ó   € R pRpWC3# )Úgmz
gm displayr   ©r3   r=   r"   r‰   r~   s   &&,  r   r—   ÚGmDisplayViewer.get_command_ex  s   € Øˆ
ØˆØÐ"Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   r¾     rQ   r   c                óŽ   € \         P                  P                  V4      '       g   \        h\        P
                  ! RRV.4       ^# )rS   rÁ   r°   r§   rX   s   &&,r   rK   ÚGmDisplayViewer.show_file  s5   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü×Ò˜$ 	¨4Ð0Ô1Ùr   r   Nr©   r   r   r   r¼   r¼     s   † Ù4õ#÷
ñ r   r¼   c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	Ú	EogVieweri  z'The GNOME Image Viewer ``eog`` command.c               ó$   € V ^8„  d   QhRRRRRR/# r’   r   )r   s   "r   r   ÚEogViewer.__annotate__  r¿   r   c                	ó   € R pRpWC3# )Úeogzeog -nr   rÂ   s   &&,  r   r—   ÚEogViewer.get_command_ex  s   € Øˆ
ØˆØÐ"Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   rÊ     rQ   r   c                óŽ   € \         P                  P                  V4      '       g   \        h\        P
                  ! RRV.4       ^# )rS   rÌ   z-nr§   rX   s   &&,r   rK   ÚEogViewer.show_file  s5   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#Ü×Ò˜%  tÐ,Ô-Ùr   r   Nr©   r   r   r   rÈ   rÈ     s   † Ù1õ#÷
ñ r   rÈ   c                  ó6   € ] tR tRtRtR	R R lltR R ltRtR# )
ÚXVVieweri'  zL
The X Viewer ``xv`` command.
This viewer supports the ``title`` parameter.
Nc               ó(   € V ^8„  d   QhRRRRRRRR/# r­   r   )r   s   "r   r   ÚXVViewer.__annotate__-  s,   € ÷ #ñ #Øð#Ø *ð#Ø>Að#à	ñ#r   c                	óH   € R ;rEV'       d   VR\        V4       2,          pWE3# )Úxvz -name r   r±   s   &&&,  r   r—   ÚXVViewer.get_command_ex-  s-   € ð
  $Ð#ˆßØ˜¤ u£ Ð/Õ/ˆGØÐ"Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# rO   r   )r   s   "r   r   rÔ   7  r´   r   c                óø   € \         P                  P                  V4      '       g   \        hR.pVP	                  R4      pV'       d   VRV.,          pVP                  V4       \        P                  ! V4       ^# )rS   rÖ   r    z-namer¶   r¸   s   &&,  r   rK   ÚXVViewer.show_file7  sa   € ô �w‰w�~‰~˜d×#Ò#Ü#Ð#ØˆvˆØ—‘˜GÓ$ˆßØ�W˜eÐ$Õ$ˆDØ�‰�DÔä×Ò˜ÔÙr   r   r–   r©   r   r   r   rÒ   rÒ   '  s   † ñ÷
#÷ñ r   rÒ   r£   r°   rÁ   rÌ   rÖ   c                  ó&   € ] tR tRtRtR R ltRtR# )ÚIPythonVieweriT  z!The viewer for IPython frontends.c               ó$   € V ^8„  d   QhRRRRRR/# r(   r   )r   s   "r   r   ÚIPythonViewer.__annotate__W  s!   € ÷ ñ  ð ¸ð Àñ r   c                	ó   € \        V4       ^# ©é   )Úipython_displayrL   s   &&,r   r2   ÚIPythonViewer.show_imageW  s   € Ü˜ÔÙr   r   N)rZ   r[   r\   r]   r^   r2   r`   r   r   r   rÜ   rÜ   T  s   † Ù+÷ñ r   rÜ   )r°   Ú__main__z.Syntax: python3 ImageShow.py imagefile [title]:r	   NNrà   r–   )ru   rŽ   )(Ú
__future__r   rœ   rT   rŠ   rp   r‡   Úshlexr   Útypingr   Ú r   r   r   r%   r   rb   Úplatformrw   ÚABCr�   rŸ   r«   r¼   rÈ   rÒ   r‹   rÜ   ÚIPython.displayr°   râ   ÚImportErrorrZ   ÚlenÚargvÚprintÚexitr‚   Úimr   r   r   Ú<module>rò      sü  ðõ #ã 
Û 	Û Û Û 
Ý Ý å à€÷#÷,÷7ñ 7ôz�Fô ð6 ‡<�<�7ÔÙˆ]Ôô �ô  ðF ‡<�<�8ÔÙˆYÔô
*�—‘˜&ô 
*ô�
ô ô&�Jô ô<�jô ô$�
ô ô$ˆzô ð@ ‡<�<Ð*Ô*Ø‡|‚|�J×ÒÙ�ÔØ‡|‚|�I×ÒÙ�ÔØ‡|‚|�D×ÒÙ�Ô!Ø‡|‚|�E×ÒÙ�ÔØ‡|‚|�D×ÒÙ�Ôô�Fô ðÝ:ñ ˆ]Ôð ˆzÔÙ
ˆ3�8‰8ƒ}�qÔÙÐ>Ô?Ø�ŠŒ
à	�Š�C—H‘H˜Q•K×	 Ô	  BÙ‰d�2Ð%˜Ÿ™ �Ó%Ô&÷ 
!Ñ	 ñ øð ô 	Ùð	ú÷ 
!×	 Ð	 ús   ÆH9 È"IÈ9IÉIÉI	