ó
    ˆ*£h¦%  ã                  óÚ   • S r SSKJr  SSKJrJr  SSKJr  SSKJ	r
  SSKJr  SSKJr  \(       a&  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJrJr   " S S\5      r " S S\5      rg)zDObjects related to mouse click and hover actions on a shape or text.é    )Úannotations)ÚTYPE_CHECKINGÚcast)Ú	PP_ACTION)ÚRELATIONSHIP_TYPE)ÚSubshape)Úlazyproperty)ÚCT_Hyperlink)ÚCT_NonVisualDrawingProps)ÚCT_TextCharacterProperties)Ú	SlidePart)Ú	BaseShape)ÚSlideÚSlidesc                  óî   ^ • \ rS rSrSr S     SU 4S jjjr\S 5       r\SS j5       r	\SS j5       r
\
R                  SS j5       r
S r\SS	 j5       r\S
 5       r\S 5       r\SS j5       rSrU =r$ )ÚActionSettingé   zAProperties specifying how a shape or run reacts to mouse actions.c                óD   >• [         [        U ]  U5        Xl        X0l        g ©N)Úsuperr   Ú__init__Ú_elementÚ_hover©ÚselfÚxPrÚparentÚhoverÚ	__class__s       €ÚH/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pptx/action.pyr   ÚActionSetting.__init__   s   ø€ ô 	Œm˜TÑ+¨FÔ3àŒà�ó    c           	     ót  • U R                   nUc  [        R                  $ UR                  nUS:X  ao  UR                  S   n[        R
                  [        R                  [        R                  [        R                  [        R                  [        R                  S.U   $ [        R                  [        R                  [        R                  [        R                  [        R                  [        R                   [        R"                  [        R$                  S.R'                  U[        R                  5      $ )až  Member of :ref:`PpActionType` enumeration, such as `PP_ACTION.HYPERLINK`.

The returned member indicates the type of action that will result when the
specified shape or text is clicked or the mouse pointer is positioned over the
shape during a slide show.

If there is no click-action or the click-action value is not recognized (is not
one of the official `MsoPpAction` values) then `PP_ACTION.NONE` is returned.
ÚhlinkshowjumpÚjump)Ú
firstslideÚ	lastslideÚlastslideviewedÚ	nextslideÚpreviousslideÚendshow)NÚhlinksldjumpÚ	hlinkpresÚ	hlinkfileÚ
customshowÚoleÚmacroÚprogram)Ú_hlinkr   ÚNONEÚaction_verbÚaction_fieldsÚFIRST_SLIDEÚ
LAST_SLIDEÚLAST_SLIDE_VIEWEDÚ
NEXT_SLIDEÚPREVIOUS_SLIDEÚEND_SHOWÚ	HYPERLINKÚNAMED_SLIDEÚPLAYÚ	OPEN_FILEÚNAMED_SLIDE_SHOWÚOLE_VERBÚ	RUN_MACROÚRUN_PROGRAMÚget)r   Úhlinkr5   Úrelative_targets       r    ÚactionÚActionSetting.action'   sí   € ð —‘ˆà‰=Ü—>‘>Ð!à×'Ñ'ˆà˜/Ó)Ø#×1Ñ1°&Ñ9ˆOä'×3Ñ3Ü&×1Ñ1Ü#,×#>Ñ#>Ü&×1Ñ1Ü!*×!9Ñ!9Ü$×-Ñ-ñð ñð ô ×%Ñ%Ü%×1Ñ1Ü"Ÿ™Ü"×,Ñ,Ü#×4Ñ4Ü×%Ñ%Ü×(Ñ(Ü ×,Ñ,ñ	
÷ ‰#ˆkœ9Ÿ>™>Ó
*ð		+r"   c                óX   • [        U R                  U R                  U R                  5      $ )zÄ
A |Hyperlink| object representing the hyperlink action defined on
this click or hover mouse event. A |Hyperlink| object is always
returned, even if no hyperlink or other click action is defined.
)Ú	Hyperlinkr   Ú_parentr   ©r   s    r    Ú	hyperlinkÚActionSetting.hyperlinkO   s   € ô ˜Ÿ™¨¯©°d·k±kÓBÐBr"   c                ó¶  • [         R                  [         R                  [         R                  [         R                  [         R
                  4nU R                  U;  a  gU R                  [         R                  :X  a  U R                  S   $ U R                  [         R                  :X  a  U R                  S   $ U R                  [         R                  :X  aB  U R                  S-   nU[        U R                  5      :¼  a  [        S5      eU R                  U   $ U R                  [         R                  :X  a/  U R                  S-
  nUS:  a  [        S5      eU R                  U   $ U R                  [         R
                  :X  aV  U R                  c   eU R                  R                  n[        SU R                  R                  U5      5      nUR                   $ g)a(  
A reference to the slide in this presentation that is the target of
the slide jump action in this shape. Slide jump actions include
`PP_ACTION.FIRST_SLIDE`, `LAST_SLIDE`, `NEXT_SLIDE`,
`PREVIOUS_SLIDE`, and `NAMED_SLIDE`. Returns |None| for all other
actions. In particular, the `LAST_SLIDE_VIEWED` action and the `PLAY`
(start other presentation) actions are not supported.

A slide object may be assigned to this property, which makes the
shape an "internal hyperlink" to the assigened slide::

    slide, target_slide = prs.slides[0], prs.slides[1]
    shape = slide.shapes[0]
    shape.target_slide = target_slide

Assigning |None| removes any slide jump action. Note that this is
accomplished by removing any action present (such as a hyperlink),
without first checking that it is a slide jump action.
Nr   éÿÿÿÿé   zno next slidezno previous slider   )r   r7   r8   r:   r;   r>   rH   Ú_slidesÚ_slide_indexÚlenÚ
ValueErrorr3   ÚrIdr   ÚpartÚrelated_partÚslide)r   Úslide_jump_actionsÚnext_slide_idxÚprev_slide_idxrW   Ú
slide_parts         r    Útarget_slideÚActionSetting.target_slideX   sy  € ô, ×!Ñ!Ü× Ñ Ü× Ñ Ü×$Ñ$Ü×!Ñ!ð
Ðð �;‰;Ð0Ó0Øà�;‰;œ)×/Ñ/Ó/Ø—<‘< ‘?Ð"Ø�[‰[œI×0Ñ0Ó0Ø—<‘< Ñ#Ð#Ø�[‰[œI×0Ñ0Ó0Ø!×.Ñ.°Ñ2ˆNØ¤ T§\¡\Ó!2Ó2Ü  Ó1Ð1Ø—<‘< Ñ/Ð/Ø�[‰[œI×4Ñ4Ó4Ø!×.Ñ.°Ñ2ˆNØ Ó!Ü Ð!4Ó5Ð5Ø—<‘< Ñ/Ð/Ø�[‰[œI×1Ñ1Ó1Ø—;‘;Ñ*Ð*Ð*Ø—+‘+—/‘/ˆCÜ˜k¨4¯9©9×+AÑ+AÀ#Ó+FÓGˆJØ×#Ñ#Ð#ð	 2r"   c                óà   • U R                  5         Uc  g U R                  R                  5       nSUl        U R                  R                  UR                  [        R                  5      Ul        g )Nzppaction://hlinksldjump)	Ú_clear_click_actionr   Úget_or_add_hlinkClickrH   rX   Ú	relate_toÚRTÚSLIDErW   )r   rZ   rF   s      r    r_   r`   Œ   sO   € à× Ñ Ô"Ø‰=ØØ—‘×3Ñ3Ó5ˆØ0ˆŒØ—I‘I×'Ñ'¨¯
©
´B·H±HÓ=ˆ�	r"   c                ó¶   • U R                   nUc  gUR                  nU(       a  U R                  R                  U5        U R                  R                  U5        g)z!Remove any existing click action.N©r3   rW   rX   Údrop_relr   Úremove©r   rF   rW   s      r    rb   Ú!ActionSetting._clear_click_action•   sC   € à—‘ˆØ‰=ØØ�i‰iˆÞØ�I‰I×Ñ˜sÔ#Ø�‰×Ñ˜UÕ#r"   c                ó¾   • U R                   (       a7  [        U R                  [        5      (       d   eU R                  R                  $ U R                  R
                  $ )z€
Reference to the `a:hlinkClick` or `a:hlinkHover` element for this
click action. Returns |None| if the element is not present.
)r   Ú
isinstancer   r   Ú
hlinkHoverÚ
hlinkClickrM   s    r    r3   ÚActionSetting._hlinkŸ   sC   € ð �;�;Ü˜dŸm™mÔ-E×FÑFÐFÐFØ—=‘=×+Ñ+Ð+Ø�}‰}×'Ñ'Ð'r"   c                ó.   • U R                   R                  $ )zG
Reference to the slide containing the shape having this click action.
)rX   rZ   rM   s    r    Ú_slideÚActionSetting._slideª   s   € ð
 �y‰y�‰Ðr"   c                óL   • U R                   R                  U R                  5      $ )z^
Position in the slide collection of the slide containing the shape
having this click action.
)rS   Úindexrs   rM   s    r    rT   ÚActionSetting._slide_index±   s   € ð �|‰|×!Ñ! $§+¡+Ó.Ð.r"   c                ój   • U R                   R                  R                  R                  R                  $ )z:
Reference to the slide collection for this presentation.
)rX   ÚpackageÚpresentation_partÚpresentationÚslidesrM   s    r    rS   ÚActionSetting._slides¹   s&   € ð
 �y‰y× Ñ ×2Ñ2×?Ñ?×FÑFÐFr"   ©r   r   ©F©r   z5CT_NonVisualDrawingProps | CT_TextCharacterPropertiesr   r   r   Úbool)ÚreturnrK   )r‚   úSlide | None)rZ   rƒ   ©r‚   zCT_Hyperlink | None)r‚   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚpropertyrH   r	   rN   r_   Úsetterrb   r3   rs   rT   rS   Ú__static_attributes__Ú__classcell__©r   s   @r    r   r      sâ   ø† ÙKð ð	
àBð
ð ð
ð ÷	
ð 
ð ñ%+ó ð%+ðN óCó ðCð ó1$ó ð1$ðf ×Ñó>ó ð>ò$ð ó(ó ð(ð ñó ðð ñ/ó ð/ð óGó öGr"   r   c                  ó    ^ • \ rS rSrSr S
     SU 4S jjjr\SS j5       r\R                  SS j5       rSS jr	\SS j5       r
S rS	rU =r$ )rK   éÁ   z5Represents a hyperlink action on a shape or text run.c                óD   >• [         [        U ]  U5        Xl        X0l        g r   )r   rK   r   r   r   r   s       €r    r   ÚHyperlink.__init__Ä   s   ø€ ô 	Œi˜Ñ'¨Ô/àŒà�r"   c                ó€   • U R                   nUc  gUR                  nU(       d  gU R                  R                  U5      $ )aF  Read/write. The URL of the hyperlink.

URL can be on http, https, mailto, or file scheme; others may work. Returns |None| if no
hyperlink is defined, including when another action such as `RUN_MACRO` is defined on the
object. Assigning |None| removes any action defined on the object, whether it is a hyperlink
action or not.
N)r3   rW   rX   Ú
target_refrk   s      r    ÚaddressÚHyperlink.addressÐ   s=   € ð —‘ˆð ‰=Øð �i‰iˆÞØà�y‰y×#Ñ# CÓ(Ð(r"   c                ó²   • U R                  5         U(       a@  U R                  R                  U[        R                  SS9nU R                  5       nX#l        g g )NT)Úis_external)Ú_remove_hlinkrX   rd   re   r=   Ú_get_or_add_hlinkrW   )r   ÚurlrW   rF   s       r    r•   r–   æ   sJ   € ð 	×ÑÔæØ—)‘)×%Ñ% c¬2¯<©<ÀTÐ%ÐJˆCØ×*Ñ*Ó,ˆEØ�Ið r"   c                ó    • U R                   (       a$  [        SU R                  5      R                  5       $ U R                  R	                  5       $ )z©Get the `a:hlinkClick` or `a:hlinkHover` element for the Hyperlink object.

The actual element depends on the value of `self._hover`. Create the element if not present.
r   )r   r   r   Úget_or_add_hlinkHoverrc   rM   s    r    rš   ÚHyperlink._get_or_add_hlinkð   s9   € ð
 �;�;ÜÐ2°D·M±MÓB×XÑXÓZÐZØ�}‰}×2Ñ2Ó4Ð4r"   c                ó�   • U R                   (       a   [        SU R                  5      R                  $ U R                  R                  $ )z€Reference to the `a:hlinkClick` or `h:hlinkHover` element for this click action.

Returns |None| if the element is not present.
r   )r   r   r   ro   rp   rM   s    r    r3   ÚHyperlink._hlinkù   s3   € ð �;�;ÜÐ2°D·M±MÓB×MÑMÐMØ�}‰}×'Ñ'Ð'r"   c                ó¶   • U R                   nUc  gUR                  nU(       a  U R                  R                  U5        U R                  R                  U5        g)z]Remove the a:hlinkClick or a:hlinkHover element.

Also drops any relationship it might have.
Nrh   rk   s      r    r™   ÚHyperlink._remove_hlink  sE   € ð
 —‘ˆØ‰=ØØ�i‰iˆÞØ�I‰I×Ñ˜sÔ#Ø�‰×Ñ˜UÕ#r"   r~   r   r€   )r‚   ú
str | None)r›   r£   )r‚   r
   r„   )r…   r†   r‡   rˆ   r‰   r   rŠ   r•   r‹   rš   r3   r™   rŒ   r�   rŽ   s   @r    rK   rK   Á   s€   ø† Ù?ð ð	
àBð
ð ð
ð ÷	
ð 
ð ó)ó ð)ð* ‡^�^óó ðô5ð ó(ó ð(÷$ð $r"   rK   N)r‰   Ú
__future__r   Útypingr   r   Úpptx.enum.actionr   Úpptx.opc.constantsr   re   Úpptx.shapesr   Ú	pptx.utilr	   Úpptx.oxml.actionr
   Úpptx.oxml.shapes.sharedr   Úpptx.oxml.textr   Úpptx.parts.slider   Úpptx.shapes.baser   Ú
pptx.slider   r   r   rK   © r"   r    Ú<module>r±      sN   ðÙ Jå "ç &å &Ý 6Ý  Ý "æÝ-Ý@Ý9Ý*Ý*ß(ôiG�Hô iGôXM$�õ M$r"   