
    li                    z    d Z ddlmZ ddlZddlmZmZ ddlmZ	 ddl
mZ erddlmZ ddlmZ ddd	Zdd
ZddZy)a  Directly exposed API classes, Presentation for now.

Provides some syntactic sugar for interacting with the pptx.presentation.Package graph and also
provides some insulation so not so many classes in the other modules need to be named as internal
(leading underscore).
    )annotationsN)IOTYPE_CHECKING)CONTENT_TYPE)Package)presentation)PresentationPartc                    | 
t               } t        j                  |       j                  }t	        |      sd}t        || |j                  fz        |j                  S )z
    Return a |Presentation| object loaded from *pptx*, where *pptx* can be
    either a path to a ``.pptx`` file (a string) or a file-like object. If
    *pptx* is missing or ``None``, the built-in default presentation
    "template" is loaded.
    z8file '%s' is not a PowerPoint file, content type is '%s')_default_pptx_pathr   openmain_document_part_is_pptx_package
ValueErrorcontent_typer   )pptxpresentation_parttmpls      F/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/pptx/api.pyPresentationr      s\     |!#T*==-.I'8'E'E FFGG)))    c                     t         j                  j                  t              d   } t         j                  j	                  | dd      S )z6Return the path to the built-in default .pptx package.r   	templateszdefault.pptx)ospathsplit__file__join)_thisdirs    r   r   r   (   s0    ww}}X&q)H77<<+~>>r   c                ^    t         j                  t         j                  f}| j                  |v S )zMReturn |True| if *prs_part* is a valid main document part, |False| otherwise.)CTPML_PRESENTATION_MAINPML_PRES_MACRO_MAINr   )prs_partvalid_content_typess     r   r   r   .   s+    33R5K5KL  $777r   )N)r   zstr | IO[bytes] | Nonereturnzpresentation.Presentation)r%   str)r#   r	   )__doc__
__future__r   r   typingr   r   pptx.opc.constantsr   r    pptx.packager   r   r   pptx.parts.presentationr	   r   r   r    r   r   <module>r.      s3    # 	 $ 1  !8*&?8r   