
    hi                       d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
 ddlmZmZmZmZ erddlmZ  G d de          Z G d	 d
e          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )z=Custom element classes for presentation-related XML elements.    )annotations)TYPE_CHECKINGCallablecast)
ST_SlideIdST_SlideSizeCoordinate	XsdString)BaseOxmlElementRequiredAttribute
ZeroOrMore	ZeroOrOne)Lengthc                      e Zd ZU dZded<   ded<   ded<    edd	
          Zded<    edd
          Zded<    edd
          Zded<   dS )CT_PresentationzZ`p:presentation` element, root of the Presentation part stored as `/ppt/presentation.xml`.zCallable[[], CT_SlideSize]get_or_add_sldSzzCallable[[], CT_SlideIdList]get_or_add_sldIdLstz"Callable[[], CT_SlideMasterIdList]get_or_add_sldMasterIdLstzp:sldMasterIdLst)zp:notesMasterIdLstzp:handoutMasterIdLst
p:sldIdLstp:sldSz	p:notesSz)
successorszCT_SlideMasterIdList | NonesldMasterIdLstr   )r   r   zCT_SlideIdList | NonesldIdLstr   )r   zCT_SlideSize | NonesldSzN)	__name__
__module____qualname____doc____annotations__r   r   r   r        n/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/pptx/oxml/presentation.pyr   r      s         dd00005555AAAA 				
 		
 		
      '0i!9' ' 'H     "+n" " "E      r!   r   c                  X    e Zd ZU dZ ede          Zded<    ede          Z	ded<   dS )
CT_SlideIdzz`p:sldId` element.

    Direct child of `p:sldIdLst` that contains an `rId` reference to a slide in the presentation.
    idintr:idstrrIdN)
r   r   r   r   r   r   r%   r   r	   r)   r    r!   r"   r$   r$   )   sZ          
  j11B1111  33C333333r!   r$   c                  ^    e Zd ZU dZded<   ded<    ed          ZddZedd            Z	dS )CT_SlideIdListz}`p:sldIdLst` element.

    Direct child of <p:presentation> that contains a list of the slide parts in the presentation.
    zlist[CT_SlideId]	sldId_lstzCallable[..., CT_SlideId]
_add_sldIdzp:sldIdr)   r(   returnr$   c                :    |                      | j        |          S )zCreate and return a reference to a new `p:sldId` child element.

        The new `p:sldId` element has its r:id attribute set to `rId`.
        )r%   r)   )r-   _next_id)selfr)   s     r"   	add_sldIdzCT_SlideIdList.add_sldId>   s    
 $-S999r!   r&   c                :   ddd t          d|                     d                    D             }t          dz
  g|z             dz   }|k    r|S t          fd|D                       }|r(t	          d t          |	          D                       ndS )
zThe next available slide ID as an `int`.

        Valid slide IDs start at 256. The next integer value greater than the max value in use is
        chosen, which minimizes that chance of reusing the id of a deleted slide.
           ic                ,    g | ]}t          |          S r    )r&   ).0ss     r"   
<listcomp>z+CT_SlideIdList._next_id.<locals>.<listcomp>O   s    SSSqCFFSSSr!   z	list[str]z./p:sldId/@id   c              3  <   K   | ]}|cxk    rk    n n|V  d S Nr    )r6   r%   MAX_SLIDE_IDMIN_SLIDE_IDs     r"   	<genexpr>z*CT_SlideIdList._next_id.<locals>.<genexpr>U   sE      ^^r,":\:\:\:\P\:\:\:\:\:\:\:\:\:\^^r!   c              3  ,   K   | ]\  }}||k    |V  d S r;   r    )r6   candidate_idused_ids      r"   r>   z*CT_SlideIdList._next_id.<locals>.<genexpr>W   s=        )L'7** **** r!   )start)r   xpathmaxsortednext	enumerate)r1   used_idssimple_nextvalid_used_idsr<   r=   s       @@r"   r0   zCT_SlideIdList._next_idE   s     !SSDdjj6Q6Q$R$RSSS<!+,x7881<,&&  ^^^^^X^^^^^ D  -6~\-Z-Z-Z      	
r!   N)r)   r(   r.   r$   )r.   r&   )
r   r   r   r   r   r   sldIdr2   propertyr0   r    r!   r"   r+   r+   3   s}          
  ))))Jy!!E: : : : 
 
 
 X
 
 
r!   r+   c                  4    e Zd ZU dZded<    ed          ZdS )CT_SlideMasterIdListz`p:sldMasterIdLst` element.

    Child of `p:presentation` containing references to the slide masters that belong to the
    presentation.
    zlist[CT_SlideMasterIdListEntry]sldMasterId_lstzp:sldMasterIdN)r   r   r   r   r   r   sldMasterIdr    r!   r"   rN   rN   a   s7           5444*_--KKKr!   rN   c                  6    e Zd ZU dZ ede          Zded<   dS )CT_SlideMasterIdListEntryzt
    ``<p:sldMasterId>`` element, child of ``<p:sldMasterIdLst>`` containing
    a reference to a slide master.
    r'   r(   r)   N)r   r   r   r   r   r	   r)   r   r    r!   r"   rR   rR   m   s<          
 ! 33C333333r!   rR   c                  X    e Zd ZU dZ ede          Zded<    ede          Zded<   dS )CT_SlideSizez`p:sldSz` element.

    Direct child of <p:presentation> that contains the width and height of slides in the
    presentation.
    cxr   cyN)	r   r   r   r   r   r   rU   r   rV   r    r!   r"   rT   rT   v   s|           #"$ B     #"$ B      r!   rT   N)r   
__future__r   typingr   r   r   pptx.oxml.simpletypesr   r   r	   pptx.oxml.xmlchemyr
   r   r   r   	pptx.utilr   r   r$   r+   rN   rR   rT   r    r!   r"   <module>r\      s   C C " " " " " " 0 0 0 0 0 0 0 0 0 0 O O O O O O O O O O X X X X X X X X X X X X !          o   64 4 4 4 4 4 4 4+
 +
 +
 +
 +
_ +
 +
 +
\	. 	. 	. 	. 	.? 	. 	. 	.4 4 4 4 4 4 4 4    ?     r!   