ó
    ˆ*£h4¹  ã                  óf  • S r SSKJr  SSKrSSKrSSKJrJrJrJ	r	J
r
Jr  SSKJr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  SSKJ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)  SSK*J+r+  SSK,J-r-J.r.  SSK/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8  SSK9J:r:  SSK;J<r<J=r=  \(       aL  SSK>J?r?  SSK@JArA  SSKBJCrC  SSKJDrDJErE  SSKFJGrG  SSKHJIrI  SSKJJKrK  SSKLJMrM  SSKNJOrO  SS KPJQrQJRrR  SS!KSJTrT  SS"K;JUrU   " S# S$\:5      rV " S% S&\V5      rW " S' S(\W5      rX " S) S*\W5      rY " S+ S,\V5      rZ " S- S.\V5      r[ " S/ S0\V5      r\ " S1 S2\V5      r] " S3 S4\]5      r^ " S5 S6\]5      r_ " S7 S8\_5      r` " S9 S:\:5      raSES; jrbSES< jrcSES= jrdSES> jreSFS? jrfSES@ jrg " SA SB\h5      ri " SC SD\h5      rjg)Gz:The shape tree, the structure that holds a slide's shapes.é    )ÚannotationsN)ÚIOÚTYPE_CHECKINGÚCallableÚIterableÚIteratorÚcast)ÚPP_PLACEHOLDERÚPROG_ID)ÚSPEAKER_IMAGE_BYTESÚVideo)ÚCONTENT_TYPE)Úqn)ÚCT_Shape)ÚCT_GraphicalObjectFrame)Ú
CT_Picture)ÚST_Direction)ÚAutoShapeTypeÚShape)Ú	BaseShape)Ú	Connector)ÚFreeformBuilder)ÚGraphicFrame)Ú
GroupShape)ÚMovieÚPicture)	ÚChartPlaceholderÚLayoutPlaceholderÚMasterPlaceholderÚNotesSlidePlaceholderÚPicturePlaceholderÚPlaceholderGraphicFrameÚPlaceholderPictureÚSlidePlaceholderÚTablePlaceholder)ÚParentedElementProxy)ÚEmuÚlazyproperty)ÚChart)Ú	ChartData)ÚXL_CHART_TYPE)ÚMSO_CONNECTOR_TYPEÚ	MSO_SHAPE)ÚShapeElement)ÚCT_Connector)ÚCT_GroupShape)Ú	ImagePart)Ú	SlidePart)ÚSlideÚSlideLayout)ÚProvidesPart)ÚLengthc                  óä   ^ • \ rS rSrSrSU 4S jjrSS jrSS jrSS jrSS jr	SS jr
\SS	 j5       r\R                  SS
 j5       r\SS j5       rSS jrSS jr\SS j5       rSS jrSrU =r$ )Ú_BaseShapeséM   z–Base class for a shape collection appearing in a slide-type object.

Subclasses include Slide, SlideLayout, and SlideMaster. Provides common methods.
c                óF   >• [         [        U ]  X5        Xl        S U l        g ©N)Úsuperr8   Ú__init__Ú_spTreeÚ_cached_max_shape_id)ÚselfÚspTreeÚparentÚ	__class__s      €ÚR/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pptx/shapes/shapetree.pyr=   Ú_BaseShapes.__init__S   s   ø€ ÜŒk˜4Ñ)¨&Ô9ØŒØ$(ˆÕ!ó    c                ó’   • [        U R                  5       5      n X!   nU R                  U5      $ ! [         a    [        S5      ef = f)z4Return shape at `idx` in sequence, e.g. `shapes[2]`.zshape index out of range)ÚlistÚ_iter_member_elmsÚ
IndexErrorÚ_shape_factory)r@   ÚidxÚ
shape_elmsÚ	shape_elms       rD   Ú__getitem__Ú_BaseShapes.__getitem__X   sQ   € ä˜$×0Ñ0Ó2Ó3ˆ
ð	9Ø"™ˆIð ×"Ñ" 9Ó-Ð-øô ó 	9ÜÐ7Ó8Ð8ð	9ús	   ›0 °Ac              #  ó`   #   • U R                  5        H  nU R                  U5      v •  M     g7f)zBGenerate a reference to each shape in the collection, in sequence.N)rI   rK   ©r@   rN   s     rD   Ú__iter__Ú_BaseShapes.__iter__a   s)   é € à×/Ñ/Ö1ˆIØ×%Ñ% iÓ0Ô0ò 2ùs   ‚,.c                óJ   • [        U R                  5       5      n[        U5      $ )z•Return count of shapes in this shape tree.

A group shape contributes 1 to the total, without regard to the number of shapes contained
in the group.
)rH   rI   Úlen)r@   rM   s     rD   Ú__len__Ú_BaseShapes.__len__f   s!   € ô ˜$×0Ñ0Ó2Ó3ˆ
Ü�:‹ÐrF   c                óô   • UR                   nUR                  UR                  UR                  UR                  4u  p4pVU R
                  nU R                  X7U5      nU R                  R                  XxX4XV5        g)z3Add a new placeholder shape based on `placeholder`.N)	ÚelementÚph_typeÚ	ph_orientÚph_szÚph_idxÚ_next_shape_idÚ_next_ph_namer>   Úadd_placeholder)	r@   ÚplaceholderÚspr[   ÚorientÚszrL   Úid_Únames	            rD   Úclone_placeholderÚ_BaseShapes.clone_placeholdero   sc   € à× Ñ ˆØ$&§J¡J°·±¸b¿h¹hÈÏ	É	Ð#RÑ ˆ˜Ø×!Ñ!ˆØ×!Ñ! '°Ó7ˆØ�‰×$Ñ$ S°ÀÕIrF   c                óì  • [         R                  S[         R                  S[         R                  S[         R                  S[         R
                  S[         R                  S[         R                  S[         R                  S[         R                  S	[         R                  S
[         R                  S[         R                  S[         R                  S[         R                  S[         R                  S0U   $ )zôReturn the base name for a placeholder of `ph_type` in this shape collection.

There is some variance between slide types, for example a notes slide uses a different
name for the body placeholder, so this method can be overriden by subclasses.
zClipArt PlaceholderzText PlaceholderÚTitlezChart PlaceholderúDate PlaceholderúFooter PlaceholderúHeader PlaceholderzMedia PlaceholderzContent PlaceholderzSmartArt PlaceholderzPicture PlaceholderúSlide Number PlaceholderÚSubtitlezTable Placeholder)r
   ÚBITMAPÚBODYÚCENTER_TITLEÚCHARTÚDATEÚFOOTERÚHEADERÚ
MEDIA_CLIPÚOBJECTÚ	ORG_CHARTÚPICTUREÚSLIDE_NUMBERÚSUBTITLEÚTABLEÚTITLE©r@   r[   s     rD   Úph_basenameÚ_BaseShapes.ph_basenamew   sÉ   € ô ×!Ñ!Ð#8Ü×ÑÐ!3Ü×'Ñ'¨Ü× Ñ Ð"5Ü×ÑÐ!3Ü×!Ñ!Ð#7Ü×!Ñ!Ð#7Ü×%Ñ%Ð':Ü×!Ñ!Ð#8Ü×$Ñ$Ð&<Ü×"Ñ"Ð$9Ü×'Ñ'Ð)CÜ×#Ñ# ZÜ× Ñ Ð"5Ü× Ñ  'ð
ð  ñ!ð 	rF   c                ó   • U R                   SL$ )a¿  True if "turbo-add" mode is enabled. Read/Write.

EXPERIMENTAL: This feature can radically improve performance when adding large numbers
(hundreds of shapes) to a slide. It works by caching the last shape ID used and
incrementing that value to assign the next shape id. This avoids repeatedly searching all
shape ids in the slide each time a new ID is required.

Performance is not noticeably improved for a slide with a relatively small number of
shapes, but because the search time rises with the square of the shape count, this option
can be useful for optimizing generation of a slide composed of many shapes.

Shape-id collisions can occur (causing a repair error on load) if more than one |Slide|
object is used to interact with the same slide in the presentation. Note that the |Slides|
collection creates a new |Slide| object each time a slide is accessed (e.g. `slide =
prs.slides[0]`, so you must be careful to limit use to a single |Slide| object.
N)r?   ©r@   s    rD   Úturbo_add_enabledÚ_BaseShapes.turbo_add_enabled�   s   € ð$ ×(Ñ(°Ð4Ð4rF   c                ón   • [        U5      nU(       a  U R                  R                  U l        g S U l        g r;   )Úboolr>   Úmax_shape_idr?   )r@   ÚvalueÚenables      rD   r…   r†   £   s&   € ä�e“ˆÞAG D§L¡L×$=Ñ$=ˆÕ!ÈTˆÕ!rF   c                ó   • g)zSReturn true if `shape_elm` represents a member of this collection, False otherwise.T© ©rN   s    rD   Ú_is_member_elmÚ_BaseShapes._is_member_elm¨   s   € ð rF   c              #  ó†   #   • U R                   R                  5        H  nU R                  U5      (       d  M  Uv •  M!     g7f)zpGenerate each child of the `p:spTree` element that corresponds to a shape.

Items appear in XML document order.
N)r>   Úiter_shape_elmsr�   rR   s     rD   rI   Ú_BaseShapes._iter_member_elms­   s4   é € ð
 Ÿ™×5Ñ5Ö7ˆIØ×"Ñ" 9×-Ó-Ø”ò 8ùs
   ‚2A¸	Ac                óÂ   • U R                  U5      nU[        R                  :X  a  SU-  nUS-
  nU R                  R	                  S5      n SXE4-  nXv;  a   U$ US-  nM  )a  Next unique placeholder name for placeholder shape of type `ph_type`.

Usually will be standard placeholder root name suffixed with id-1, e.g.
_next_ph_name(ST_PlaceholderType.TBL, 4, 'horz') ==> 'Table Placeholder 3'. The number is
incremented as necessary to make the name unique within the collection. If `orient` is
`'vert'`, the placeholder name is prefixed with `'Vertical '`.
zVertical %sé   z//p:cNvPr/@nameú%s %d)r�   r   ÚVERTr>   Úxpath)r@   r[   Úidrd   ÚbasenameÚnumpartÚnamesrg   s           rD   r`   Ú_BaseShapes._next_ph_name¶   s~   € ð ×#Ñ# GÓ,ˆð ”\×&Ñ&Ó&Ø$ xÑ/ˆHð �q‘&ˆØ—‘×"Ñ"Ð#4Ó5ˆØØ˜hÐ0Ñ0ˆDØÓ Øð ˆð �q‰LˆGñ	 rF   c                ó�   • U R                   b!  U =R                   S-  sl         U R                   $ U R                  R                  S-   $ )zØReturn a unique shape id suitable for use with a new shape.

The returned id is 1 greater than the maximum shape id used so far. In practice, the
minimum id is 2 because the spTree element is always assigned id="1".
r•   )r?   r>   r‰   r„   s    rD   r_   Ú_BaseShapes._next_shape_idÏ   sB   € ð ×$Ñ$Ñ0Ø×%Ò%¨Ñ*Õ%Ø×,Ñ,Ð,à�|‰|×(Ñ(¨1Ñ,Ð,rF   c                ó   • [        X5      $ ©úHReturn an instance of the appropriate shape proxy class for `shape_elm`.)ÚBaseShapeFactoryrR   s     rD   rK   Ú_BaseShapes._shape_factoryÝ   s   € ä 	Ó0Ð0rF   )r?   r>   )rA   r0   rB   r5   )rL   ÚintÚreturnr   )r¦   zIterator[BaseShape]©r¦   r¥   )rb   r   r¦   ÚNone©r[   r
   r¦   Ústr)r¦   rˆ   )rŠ   rˆ   ©rN   r.   r¦   rˆ   )r¦   zIterator[ShapeElement])r[   r
   r™   r¥   rd   rª   r¦   rª   ©rN   r.   r¦   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r=   rO   rS   rW   rh   r�   Úpropertyr…   ÚsetterÚstaticmethodr�   rI   r`   r_   rK   Ú__static_attributes__Ú__classcell__©rC   s   @rD   r8   r8   M   s“   ø† ñ÷
)ô
.ô1ô
ôJôð0 ó5ó ð5ð& ×ÑóRó ðRð óó ðô ôð2 ó-ó ð-÷1ò 1rF   r8   c                  óö  ^ • \ rS rSr% SrS\S'   S\S'   SU 4S jjr              SS jr            SS	 jrSSS
 jjr	     S                   SS jjr
  S           S S jjr            S!S jrS"S jr S#       S$S jjrS%S jr            S&S jr            S'S jr              S(S jr            S)S jrS*S jrS+S jrSrU =r$ ),Ú_BaseGroupShapeséâ   z/Base class for shape-trees that can add shapes.r2   Úpartr0   Ú_elementc                ó8   >• [         [        U ]  X5        Xl        g r;   )r<   r¹   r=   Ú_grpSp)r@   ÚgrpSprB   rC   s      €rD   r=   Ú_BaseGroupShapes.__init__è   s   ø€ ÜÔ Ñ.¨uÔ=Ø�rF   c                ó´   • U R                   R                  X5      nU R                  XrX4U5      nU R                  5         [	        SU R                  U5      5      $ )a
  Add a new chart of `chart_type` to the slide.

The chart is positioned at (`x`, `y`), has size (`cx`, `cy`), and depicts `chart_data`.
`chart_type` is one of the :ref:`XlChartType` enumeration values. `chart_data` is a
|ChartData| object populated with the categories and series values for the chart.

Note that a |GraphicFrame| shape object is returned, not the |Chart| object contained in
that graphic frame shape. The chart object may be accessed using the :attr:`chart`
property of the returned |GraphicFrame| object.
r)   )r»   Úadd_chart_partÚ_add_chart_graphicFrameÚ_recalculate_extentsr	   rK   )	r@   Ú
chart_typeÚxÚyÚcxÚcyÚ
chart_dataÚrIdÚgraphicFrames	            rD   Ú	add_chartÚ_BaseGroupShapes.add_chartì   sP   € ð& �i‰i×&Ñ& zÓ>ˆØ×3Ñ3°C¸AÀ2ÓFˆØ×!Ñ!Ô#Ü�G˜T×0Ñ0°Ó>Ó?Ð?rF   c                ó†   • U R                  XX4U5      nU R                  5         [        [        U R	                  U5      5      $ )a   Add a newly created connector shape to the end of this shape tree.

`connector_type` is a member of the :ref:`MsoConnectorType` enumeration and the end-point
values are specified as EMU values. The returned connector is of type `connector_type` and
has begin and end points as specified.
)Ú
_add_cxnSprÄ   r	   r   rK   )r@   Úconnector_typeÚbegin_xÚbegin_yÚend_xÚend_yÚcxnSps          rD   Úadd_connectorÚ_BaseGroupShapes.add_connector  s:   € ð —‘ ¸ÈÓOˆØ×!Ñ!Ô#Ü”I˜t×2Ñ2°5Ó9Ó:Ð:rF   c                ó  • [        U5      nU R                  R                  5       nU H  nUR                  UR                  S5        M!     U(       a  UR	                  5         [        [        U R                  U5      5      $ )ad  Return a |GroupShape| object newly appended to this shape tree.

The group shape is empty and must be populated with shapes using methods on its shape
tree, available on its `.shapes` property. The position and extents of the group shape are
determined by the shapes it contains; its position and extents are recalculated each time
a shape is added to it.
zp:extLst)Útupler¼   Ú	add_grpSpÚinsert_element_beforeÚrecalculate_extentsr	   r   rK   )r@   Úshapesr¿   Úshapes       rD   Úadd_group_shapeÚ _BaseGroupShapes.add_group_shape  si   € ô �v“ˆØ—‘×'Ñ'Ó)ˆÛˆEØ×'Ñ'Ø—‘ 
öñ ö Ø×%Ñ%Ô'Ü”J × 3Ñ 3°EÓ :Ó;Ð;rF   c
                óè   • [         R                  U U R                  UUUUUUUUU	5      n
U R                  R	                  U
5        U R                  5         [        [        U R                  U
5      5      $ )aÁ  Return newly-created GraphicFrame shape embedding `object_file`.

The returned graphic-frame shape contains `object_file` as an embedded OLE object. It is
displayed as an icon at `left`, `top` with size `width`, `height`. `width` and `height`
may be omitted when `prog_id` is a member of `PROG_ID`, in which case the default icon
size is used. This is advised for best appearance where applicable because it avoids an
icon with a "stretched" appearance.

`object_file` may either be a str path to a file or file-like object (such as
`io.BytesIO`) containing the bytes of the object to be embedded (such as an Excel file).

`prog_id` can be either a member of `pptx.enum.shapes.PROG_ID` or a str value like
`"Adobe.Exchange.7"` determined by inspecting the XML generated by PowerPoint for an
object of the desired type.

`icon_file` may either be a str path to an image file or a file-like object containing the
image. The image provided will be displayed in lieu of the OLE object; double-clicking on
the image opens the object (subject to operating-system limitations). The image file can
be any supported image file. Those produced by PowerPoint itself are generally EMF and can
be harvested from a PPTX package that embeds such an object. PNG and JPG also work fine.

`icon_width` and `icon_height` are `Length` values (e.g. Emu() or Inches()) that describe
the size of the icon image within the shape. These should be omitted unless a custom
`icon_file` is provided. The dimensions must be discovered by inspecting the XML.
Automatic resizing of the OLE-object shape can occur when the icon is double-clicked if
these values are not as set by PowerPoint. This behavior may only manifest in the Windows
version of PowerPoint.
)	Ú_OleObjectElementCreatorrÌ   r_   r>   ÚappendrÄ   r	   r   rK   )r@   Úobject_fileÚprog_idÚleftÚtopÚwidthÚheightÚ	icon_fileÚ
icon_widthÚicon_heightrÌ   s              rD   Úadd_ole_objectÚ_BaseGroupShapes.add_ole_object(  st   € ôP 0×<Ñ<ØØ×ÑØØØØØØØØØó
ˆð 	�‰×Ñ˜LÔ)Ø×!Ñ!Ô#Ü”L $×"5Ñ"5°lÓ"CÓDÐDrF   c                óÀ   • U R                   R                  U5      u  pgU R                  XgX#XE5      nU R                  5         [	        [
        U R                  U5      5      $ )aû  Add picture shape displaying image in `image_file`.

`image_file` can be either a path to a file (a string) or a file-like object. The picture
is positioned with its top-left corner at (`top`, `left`). If `width` and `height` are
both |None|, the native size of the image is used. If only one of `width` or `height` is
used, the unspecified dimension is calculated to preserve the aspect ratio of the image.
If both are specified, the picture is stretched to fit, without regard to its native
aspect ratio.
)r»   Úget_or_add_image_partÚ_add_pic_from_image_partrÄ   r	   r   rK   )	r@   Ú
image_filerç   rè   ré   rê   Ú
image_partrË   Úpics	            rD   Úadd_pictureÚ_BaseGroupShapes.add_picturea  sR   € ð" Ÿ)™)×9Ñ9¸*ÓE‰ˆ
Ø×+Ñ+¨J¸TÈÓVˆØ×!Ñ!Ô#Ü”G˜T×0Ñ0°Ó5Ó6Ð6rF   c                óœ   • [        U5      nU R                  XbX4U5      nU R                  5         [        [        U R                  U5      5      $ )zûReturn new |Shape| object appended to this shape tree.

`autoshape_type_id` is a member of :ref:`MsoAutoShapeType` e.g. `MSO_SHAPE.RECTANGLE`
specifying the type of shape to be added. The remaining arguments specify the new shape's
position and size.
)r   Ú_add_sprÄ   r	   r   rK   )r@   Úautoshape_type_idrç   rè   ré   rê   Úautoshape_typerc   s           rD   Ú	add_shapeÚ_BaseGroupShapes.add_shapew  sE   € ô 'Ð'8Ó9ˆØ�\‰\˜.°¸FÓCˆØ×!Ñ!Ô#Ü”E˜4×.Ñ.¨rÓ2Ó3Ð3rF   c                ó„   • U R                  XX45      nU R                  5         [        [        U R	                  U5      5      $ )z—Return newly added text box shape appended to this shape tree.

The text box is of the specified size, located at the specified position on the slide.
)Ú_add_textbox_sprÄ   r	   r   rK   )r@   rç   rè   ré   rê   rc   s         rD   Úadd_textboxÚ_BaseGroupShapes.add_textbox…  s:   € ð
 ×!Ñ! $¨UÓ;ˆØ×!Ñ!Ô#Ü”E˜4×.Ñ.¨rÓ2Ó3Ð3rF   c                ój   • [        U[        5      (       a  UOX34u  pE[        R                  " XX$U5      $ )aV  Return |FreeformBuilder| object to specify a freeform shape.

The optional `start_x` and `start_y` arguments specify the starting pen position in local
coordinates. They will be rounded to the nearest integer before use and each default to
zero.

The optional `scale` argument specifies the size of local coordinates proportional to
slide coordinates (EMU). If the vertical scale is different than the horizontal scale
(local coordinate units are "rectangular"), a pair of numeric values can be provided as
the `scale` argument, e.g. `scale=(1.0, 2.0)`. In this case the first number is
interpreted as the horizontal (X) scale and the second as the vertical (Y) scale.

A convenient method for calculating scale is to divide a |Length| object by an equivalent
count of local coordinate units, e.g. `scale = Inches(1)/1000` for 1000 local units per
inch.
)Ú
isinstancerÚ   r   Únew)r@   Ústart_xÚstart_yÚscaleÚx_scaleÚy_scales         rD   Úbuild_freeformÚ_BaseGroupShapes.build_freeformŽ  s1   € ô& %/¨u´e×$<Ñ$<™5À5À.Ñˆä×"Ò" 4°'ÀGÓLÐLrF   c                ó~   • [        U R                  R                  5       5      nUR                  UR                  5      $ )zhReturn the index of `shape` in this sequence.

Raises |ValueError| if `shape` is not in the collection.
)rH   r¼   r’   ÚindexrZ   )r@   rß   rM   s      rD   r  Ú_BaseGroupShapes.index¥  s0   € ô
 ˜$Ÿ-™-×7Ñ7Ó9Ó:ˆ
Ø×Ñ §¡Ó.Ð.rF   c           	     ó–   • U R                   nSUS-
  -  n[        R                  " XgXX4U5      nU R                  R	                  U5        U$ )zµReturn new `p:graphicFrame` element appended to this shape tree.

The `p:graphicFrame` element has the specified position and size and refers to the chart
part identified by `rId`.
zChart %dr•   )r_   r   Únew_chart_graphicFramer>   rä   )	r@   rË   rÆ   rÇ   rÈ   rÉ   Úshape_idrg   rÌ   s	            rD   rÃ   Ú(_BaseGroupShapes._add_chart_graphicFrame­  sP   € ð ×&Ñ&ˆØ˜X¨™\Ñ*ˆÜ.×EÒEØ˜C A¨2ó
ˆð 	�‰×Ñ˜LÔ)ØÐrF   c                óÒ   • U R                   nSUS-
  -  nX$:„  X5:„  p˜[        X$5      [        X55      pº[        XB-
  5      [        XS-
  5      pÜU R                  R	                  XgXX¼XØU	5	      $ )z¼Return a newly-added `p:cxnSp` element as specified.

The `p:cxnSp` element is for a connector of `connector_type` beginning at (`begin_x`,
`begin_y`) and extending to (`end_x`, `end_y`).
zConnector %dr•   )r_   ÚminÚabsr¼   Ú	add_cxnSp)r@   rÑ   rÒ   rÓ   rÔ   rÕ   rf   rg   ÚflipHÚflipVrÆ   rÇ   rÈ   rÉ   s                 rD   rÐ   Ú_BaseGroupShapes._add_cxnSp½  sl   € ð ×!Ñ!ˆØ  q¡Ñ)ˆà‘¨©ˆuÜ�7Ó"¤C¨Ó$7ˆ1Ü�U‘_Ó%¤s¨5©?Ó';ˆBà�}‰}×&Ñ& s°.ÀQÈBÐW\Ó]Ð]rF   c           
     ó¨   • U R                   nUR                  XV5      u  p‰SUS-
  -  n
UR                  nU R                  R	                  XzX²X4X‰5      nU$ )a  Return a newly appended `p:pic` element as specified.

The `p:pic` element displays the image in `image_part` with size and position specified by
`x`, `y`, `cx`, and `cy`. The element is appended to the shape tree, causing it to be
displayed first in z-order on the slide.
z
Picture %dr•   )r_   r  Údescr¾   Úadd_pic)r@   rô   rË   rÆ   rÇ   rÈ   rÉ   rf   Ú	scaled_cxÚ	scaled_cyrg   r  rõ   s                rD   rò   Ú)_BaseGroupShapes._add_pic_from_image_partÓ  sX   € ð ×!Ñ!ˆØ)×/Ñ/°Ó7Ñˆ	Ø˜s Q™wÑ'ˆØ�‰ˆØ�k‰k×!Ñ! #¨T¸¸iÓSˆØˆ
rF   c           	     ó–   • U R                   nSUR                  US-
  4-  nU R                  R                  XgUR                  X#XE5      nU$ )zˆReturn newly-added `p:sp` element as specified.

`p:sp` element is of `autoshape_type` at position (`x`, `y`) and of size (`cx`, `cy`).
r–   r•   )r_   rš   r¾   Úadd_autoshapeÚprst)	r@   rû   rÆ   rÇ   rÈ   rÉ   rf   rg   rc   s	            rD   rù   Ú_BaseGroupShapes._add_spé  sM   € ð ×!Ñ!ˆØ˜.×1Ñ1°3¸±7Ð;Ñ;ˆØ�[‰[×&Ñ& s°.×2EÑ2EÀqÈRÓTˆØˆ	rF   c                óh   • U R                   nSUS-
  -  nU R                  R                  XVXX45      nU$ )zfReturn newly-appended textbox `p:sp` element.

Element has position (`x`, `y`) and size (`cx`, `cy`).
z
TextBox %dr•   )r_   r>   r   )r@   rÆ   rÇ   rÈ   rÉ   rf   rg   rc   s           rD   rÿ   Ú _BaseGroupShapes._add_textbox_spõ  s:   € ð
 ×!Ñ!ˆØ˜s Q™wÑ'ˆØ�\‰\×%Ñ% c°°rÓ>ˆØˆ	rF   c                ó   • g©z©Adjust position and size to incorporate all contained shapes.

This would typically be called when a contained shape is added, removed, or its position
or size updated.
Nr�   r„   s    rD   rÄ   Ú%_BaseGroupShapes._recalculate_extentsÿ  s   € ð 	rF   )r¾   )r¿   r0   rB   r5   )rÅ   r+   rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   rÊ   r*   r¦   r)   )rÑ   r,   rÒ   r6   rÓ   r6   rÔ   r6   rÕ   r6   r¦   r   )r�   )rÞ   zIterable[BaseShape]r¦   r   )NNNNN)rå   ústr | IO[bytes]ræ   rª   rç   r6   rè   r6   ré   úLength | Nonerê   r*  rë   ústr | IO[bytes] | Nonerì   r*  rí   r*  r¦   r   )NN)ró   r)  rç   r6   rè   r6   ré   r*  rê   r*  r¦   r   )rú   r-   rç   r6   rè   r6   ré   r6   rê   r6   r¦   r   )
rç   r6   rè   r6   ré   r6   rê   r6   r¦   r   )r   r   g      ð?)r  Úfloatr  r,  r  ztuple[float, float] | floatr¦   r   )rß   r   r¦   r¥   )rË   rª   rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   r¦   r   )rÑ   r,   rÒ   r6   rÓ   r6   rÔ   r6   rÕ   r6   r¦   r/   )rô   r1   rË   rª   rÆ   r6   rÇ   r6   rÈ   r*  rÉ   r*  r¦   r   )rû   r   rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   r¦   r   )
rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   r¦   r   ©r¦   r¨   )r­   r®   r¯   r°   r±   Ú__annotations__r=   rÍ   r×   rà   rî   rö   rü   r   r
  r  rÃ   rÐ   rò   rù   rÿ   rÄ   rµ   r¶   r·   s   @rD   r¹   r¹   â   sî  ø‡ Ù9à
ƒOØÓ÷ð@à!ð@ð ð@ð ð	@ð
 ð@ð ð@ð ð@ð 
ô@ð0;à*ð;ð ð;ð ð	;ð
 ð;ð ð;ð 
ô;ö$<ð0  $Ø $Ø,0Ø$(Ø%)ð7Eà$ð7Eð ð7Eð ð	7Eð
 ð7Eð ð7Eð ð7Eð *ð7Eð "ð7Eð #ð7Eð 
õ7Eð|  $Ø $ð7à#ð7ð ð7ð ð	7ð
 ð7ð ð7ð 
õ7ð,4Ø!*ð4Ø28ð4Ø?Eð4ØNTð4Ø^dð4à	ô4ô4ð \_ðMØðMØ+0ðMØ=XðMà	õMô./ðØðØ!ðØ&,ðØ28ðØ>Dðà	 ôð ^à*ð^ð ð^ð ð	^ð
 ð^ð ð^ð 
ô^ð,àðð ðð ð	ð
 ðð ðð ðð 
ôð,
Ø+ð
Ø06ð
Ø;Að
ØGMð
ØSYð
à	ô
ô÷ò rF   r¹   c                  ó"   • \ rS rSrSrSS jrSrg)ÚGroupShapesi
  z¼The sequence of child shapes belonging to a group shape.

Note that this collection can itself contain a group shape, making this part of a recursive,
tree data structure (acyclic graph).
c                ó8   • U R                   R                  5         gr'  )r¾   rÝ   r„   s    rD   rÄ   Ú GroupShapes._recalculate_extents  s   € ð 	�‰×'Ñ'Õ)rF   r�   Nr-  )r­   r®   r¯   r°   r±   rÄ   rµ   r�   rF   rD   r0  r0  
  s   † ñ÷*rF   r0  c                  óú   • \ rS rSr% SrS\S'   S\R                  4               SS jjr              SS jr	SS jr
\SS	 j5       r\SS
 j5       r              SS jrSS jrSS jrSrg)ÚSlideShapesi  z¼Sequence of shapes appearing on a slide.

The first shape in the sequence is the backmost in z-order and the last shape is topmost.
Supports indexed access, len(), index(), and iteration.
r3   rB   Nc                óæ   • [         R                  U U R                  UUUUUUU5	      nU R                  R	                  U5        U R                  U5        [        [        U R                  U5      5      $ )at  Return newly added movie shape displaying video in `movie_file`.

**EXPERIMENTAL.** This method has important limitations:

* The size must be specified; no auto-scaling such as that provided by :meth:`add_picture`
  is performed.
* The MIME type of the video file should be specified, e.g. 'video/mp4'. The provided
  video file is not interrogated for its type. The MIME type `video/unknown` is used by
  default (and works fine in tests as of this writing).
* A poster frame image must be provided, it cannot be automatically extracted from the
  video file. If no poster frame is provided, the default "media loudspeaker" image will
  be used.

Return a newly added movie shape to the slide, positioned at (`left`, `top`), having size
(`width`, `height`), and containing `movie_file`. Before the video is started,
`poster_frame_image` is displayed as a placeholder for the video.
)	Ú_MoviePicElementCreatorÚnew_movie_picr_   r>   rä   Ú_add_video_timingr	   r   rK   )	r@   Ú
movie_filerç   rè   ré   rê   Úposter_frame_imageÚ	mime_typeÚ	movie_pics	            rD   Ú	add_movieÚSlideShapes.add_movie#  so   € ô6 ,×9Ñ9ØØ×ÑØØØØØØØó

ˆ	ð 	�‰×Ñ˜IÔ&Ø×Ñ˜yÔ)Ü”L $×"5Ñ"5°iÓ"@ÓAÐArF   c                óf   • U R                  XX4XV5      n[        [        U R                  U5      5      $ )a†  Add a |GraphicFrame| object containing a table.

The table has the specified number of `rows` and `cols` and the specified position and
size. `width` is evenly distributed between the columns of the new table. Likewise,
`height` is evenly distributed between the rows. Note that the `.table` property on the
returned |GraphicFrame| shape must be used to access the enclosed |Table| object.
)Ú"_add_graphicFrame_containing_tabler	   r   rK   )r@   ÚrowsÚcolsrç   rè   ré   rê   rÌ   s           rD   Ú	add_tableÚSlideShapes.add_tableM  s1   € ð ×>Ñ>¸tÈ4ÐV[ÓdˆÜ”L $×"5Ñ"5°lÓ"CÓDÐDrF   c                óT   • UR                  5        H  nU R                  U5        M     g)z¥Add placeholder shapes based on those in `slide_layout`.

Z-order of placeholders is preserved. Latent placeholders (date, slide number, and footer)
are not cloned.
N)Úiter_cloneable_placeholdersrh   )r@   Úslide_layoutrb   s      rD   Úclone_layout_placeholdersÚ%SlideShapes.clone_layout_placeholdersZ  s&   € ð (×CÑCÖEˆKØ×"Ñ" ;Ö/ò FrF   c                ó.   • U R                   R                  $ )z-Sequence of placeholder shapes in this slide.)rB   Úplaceholdersr„   s    rD   rK  ÚSlideShapes.placeholdersc  s   € ð �{‰{×'Ñ'Ð'rF   c                ó¨   • U R                   R                  5        H4  nUR                  S:X  d  M  [        [        U R                  U5      5      s  $    g)zYThe title placeholder shape on the slide.

|None| if the slide has no title placeholder.
r   N)r>   Úiter_ph_elmsr^   r	   r   rK   )r@   Úelms     rD   ÚtitleÚSlideShapes.titleh  sC   € ð —<‘<×,Ñ,Ö.ˆCØ�z‰z˜Q�ÜœE 4×#6Ñ#6°sÓ#;Ó<Ò<ñ /ð rF   c           
     ój   • U R                   nSUS-
  -  nU R                  R                  XxXX4XV5      n	U	$ )zNReturn a newly added `p:graphicFrame` element containing a table as specified.zTable %dr•   )r_   r>   rC  )
r@   rA  rB  rÆ   rÇ   rÈ   rÉ   Ú_idrg   rÌ   s
             rD   r@  Ú.SlideShapes._add_graphicFrame_containing_tables  s=   € ð ×!Ñ!ˆØ˜S 1™WÑ%ˆØ—|‘|×-Ñ-¨c¸ÀQÈ2ÓRˆØÐrF   c                ó–   • U R                   R                  S5      S   nUR                  5       nUR                  UR                  5        g)z´Add a `p:video` element under `p:sld/p:timing`.

The element will refer to the specified `pic` element by its shape id, and cause the video
play controls to appear for that video.
z/p:sldr   N)r>   r˜   Úget_or_add_childTnLstÚ	add_videor  )r@   rõ   ÚsldÚ
childTnLsts       rD   r8  ÚSlideShapes._add_video_timing|  s=   € ð �l‰l× Ñ  Ó*¨1Ñ-ˆØ×.Ñ.Ó0ˆ
Ø×Ñ˜SŸ\™\Õ*rF   c                ó   • [        X5      $ r¡   ©ÚSlideShapeFactoryrR   s     rD   rK   ÚSlideShapes._shape_factory†  s   € ä  Ó1Ð1rF   r�   )r9  r)  rç   r6   rè   r6   ré   r6   rê   r6   r:  r+  r;  rª   r¦   r   )rA  r¥   rB  r¥   rç   r6   rè   r6   ré   r6   rê   r6   r¦   r   )rG  r4   r¦   r¨   )r¦   ÚSlidePlaceholders)r¦   zShape | None)rA  r¥   rB  r¥   rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   r¦   r   )rõ   r   r¦   r¨   r¬   )r­   r®   r¯   r°   r±   r.  ÚCTÚVIDEOr=  rC  rH  r²   rK  rP  r@  r8  rK   rµ   r�   rF   rD   r4  r4    s0  ‡ ñð ƒMð 6:ØŸ™ð(Bà#ð(Bð ð(Bð ð	(Bð
 ð(Bð ð(Bð 3ð(Bð ð(Bð 
õ(BðTEØðEØ"ðEØ*0ðEØ7=ðEØFLðEØV\ðEà	ôEô0ð ó(ó ð(ð óó ððØðØ"ðØ'-ðØ28ðØ>DðØJPðà	 ôô+÷2rF   r4  c                  ó"   • \ rS rSrSrSS jrSrg)ÚLayoutShapesi‹  zÃSequence of shapes appearing on a slide layout.

The first shape in the sequence is the backmost in z-order and the last shape is topmost.
Supports indexed access, len(), index(), and iteration.
c                ó   • [        X5      $ r¡   ©Ú_LayoutShapeFactoryrR   s     rD   rK   ÚLayoutShapes._shape_factory’  ó   € ä" 9Ó3Ð3rF   r�   Nr¬   ©r­   r®   r¯   r°   r±   rK   rµ   r�   rF   rD   rc  rc  ‹  ó   † ñ÷4rF   rc  c                  ó"   • \ rS rSrSrSS jrSrg)ÚMasterShapesi—  zºSequence of shapes appearing on a slide master.

The first shape in the sequence is the backmost in z-order and the last shape is topmost.
Supports indexed access, len(), and iteration.
c                ó   • [        X5      $ r¡   )Ú_MasterShapeFactoryrR   s     rD   rK   ÚMasterShapes._shape_factoryž  rh  rF   r�   Nr¬   ri  r�   rF   rD   rl  rl  —  rj  rF   rl  c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	ÚNotesSlideShapesi£  zÂSequence of shapes appearing on a notes slide.

The first shape in the sequence is the backmost in z-order and the last shape is topmost.
Supports indexed access, len(), index(), and iteration.
c                óÌ   • [         R                  S[         R                  S[         R                  S[         R                  S[         R
                  S[         R                  S0U   $ )zëReturn the base name for a placeholder of `ph_type` in this shape collection.

A notes slide uses a different name for the body placeholder and has some unique
placeholder types, so this method overrides the default in the base class.
zNotes Placeholderrl   rm   rn   zSlide Image Placeholderro   )r
   rr   ru   rv   rw   ÚSLIDE_IMAGEr|   r€   s     rD   r�   ÚNotesSlideShapes.ph_basenameª  s`   € ô ×ÑÐ!4Ü×ÑÐ!3Ü×!Ñ!Ð#7Ü×!Ñ!Ð#7Ü×&Ñ&Ð(AÜ×'Ñ'Ð)Cð
ð ñð 	rF   c                ó   • [        X5      $ )zKReturn appropriate shape object for `shape_elm` appearing on a notes slide.)Ú_NotesSlideShapeFactoryrR   s     rD   rK   ÚNotesSlideShapes._shape_factory¹  s   € ä& yÓ7Ð7rF   r�   Nr©   r¬   )r­   r®   r¯   r°   r±   r�   rK   rµ   r�   rF   rD   rq  rq  £  s   † ñô÷8rF   rq  c                  ó,   • \ rS rSrSr\SS j5       rSrg)ÚBasePlaceholdersi¾  a  Base class for placeholder collections.

Subclasses differentiate behaviors for a master, layout, and slide. By default, placeholder
shapes are constructed using |BaseShapeFactory|. Subclasses should override
:method:`_shape_factory` to use custom placeholder classes.
c                ó   • U R                   $ )z<True if `shape_elm` is a placeholder shape, False otherwise.)Ú
has_ph_elmrŽ   s    rD   r�   ÚBasePlaceholders._is_member_elmÆ  s   € ð ×#Ñ#Ð#rF   r�   Nr«   )r­   r®   r¯   r°   r±   r´   r�   rµ   r�   rF   rD   ry  ry  ¾  s   † ñð ó$ó ó$rF   ry  c                  ó<   • \ rS rSr% SrS\S'   S	S
S jjrSS jrSrg)ÚLayoutPlaceholdersiÌ  zVSequence of |LayoutPlaceholder| instance for each placeholder shape on a slide layout.z)Callable[[], Iterator[LayoutPlaceholder]]rS   Nc                óT   • U  H!  nUR                   R                  U:X  d  M  Us  $    U$ )zQThe first placeholder shape with matching `idx` value, or `default` if not found.)rZ   r^   )r@   rL   Údefaultrb   s       rD   ÚgetÚLayoutPlaceholders.getÓ  s-   € ãˆKØ×"Ñ"×)Ñ)¨SÕ0Ø"Ò"ñ  ð ˆrF   c                ó   • [        X5      $ r¡   re  rR   s     rD   rK   Ú!LayoutPlaceholders._shape_factoryÚ  rh  rF   r�   r;   )rL   r¥   r€  úLayoutPlaceholder | Noner¦   r…  r¬   ©	r­   r®   r¯   r°   r±   r.  r�  rK   rµ   r�   rF   rD   r~  r~  Ì  s   ‡ Ù`ðó ö÷4rF   r~  c                  óD   • \ rS rSr% SrS\S'   S	S
S jjr    SS jrSrg)ÚMasterPlaceholdersiß  zTSequence of MasterPlaceholder representing the placeholder shapes on a slide master.z)Callable[[], Iterator[MasterPlaceholder]]rS   Nc                ó@   • U  H  nUR                   U:X  d  M  Us  $    U$ )z”Return the first placeholder shape with type `ph_type` (e.g. 'body').

Returns `default` if no such placeholder shape is present in the collection.
)r[   )r@   r[   r€  rb   s       rD   r�  ÚMasterPlaceholders.getæ  s)   € ó
  ˆKØ×"Ñ" gÕ-Ø"Ò"ñ  ð ˆrF   c                ó4   • [        [        [        X5      5      $ r¡   )r	   r   rn  ©r@   Úplaceholder_elms     rD   rK   Ú!MasterPlaceholders._shape_factoryð  s   € ô Ô%Ô':¸?Ó'QÓRÐRrF   r�   r;   )r[   r
   r€  zMasterPlaceholder | None)r�  r   r¦   r   r†  r�   rF   rD   rˆ  rˆ  ß  s,   ‡ Ù^ðó öðSØ'ðSà	÷SrF   rˆ  c                  ó6   • \ rS rSr% SrS\S'       SS jrSrg)	ÚNotesSlidePlaceholdersi÷  z0Sequence of placeholder shapes on a notes slide.z-Callable[[], Iterator[NotesSlidePlaceholder]]rS   c                ó4   • [        [        [        X5      5      $ )zTReturn an instance of the appropriate placeholder proxy class for `placeholder_elm`.)r	   r    rv  rŒ  s     rD   rK   Ú%NotesSlidePlaceholders._shape_factoryþ  s   € ô Ô)Ô+BÀ?Ó+YÓZÐZrF   r�   N)r�  r   r¦   r    )r­   r®   r¯   r°   r±   r.  rK   rµ   r�   rF   rD   r�  r�  ÷  s'   ‡ Ù:ðó ð[Ø'ð[à	÷[rF   r�  c                  ó>   • \ rS rSr% SrS\S'   S
S jrS rSS jrSr	g	)r_  i  zŸCollection of placeholder shapes on a slide.

Supports iteration, :func:`len`, and dictionary-style lookup on the `idx` value of the
placeholders it contains.
r0   r¼   c                óš   • U R                   R                  5        H   nUR                  U:X  d  M  [        X 5      s  $    [	        SU-  5      e)zÌAccess placeholder shape having `idx`.

Note that while this looks like list access, idx is actually a dictionary key and will
raise |KeyError| if no placeholder with that idx value is in the collection.
z+no placeholder on this slide with idx == %d)r¼   rN  r^   r]  ÚKeyError)r@   rL   Úes      rD   rO   ÚSlidePlaceholders.__getitem__  sD   € ð —‘×+Ñ+Ö-ˆAØ�x‰x˜3�Ü(¨Ó1Ò1ñ .ô ÐDÀsÑJÓKÐKrF   c                óŒ   ^ • [        T R                  R                  5        Vs/ s H  oPM     snS S9nU 4S jU 5       $ s  snf )z+Generate placeholder shapes in `idx` order.c                ó   • U R                   $ r;   )r^   )r–  s    rD   Ú<lambda>Ú,SlidePlaceholders.__iter__.<locals>.<lambda>  s   € ÐRS×RZÒRZrF   )Úkeyc              3  ó<   >#   • U  H  n[        UT5      v •  M     g 7fr;   r\  )Ú.0r–  r@   s     €rD   Ú	<genexpr>Ú-SlidePlaceholders.__iter__.<locals>.<genexpr>  s   øé € Ð<²G¨qÔ! ! T×*Ð*²Gùs   ƒ)Úsortedr¼   rN  )r@   r–  Úph_elmss   `  rD   rS   ÚSlidePlaceholders.__iter__  s?   ø€ ä T§]¡]×%?Ñ%?Ô%AÓBÒ%A š!Ñ%AÑBÑHZÑ[ˆÜ<±GÓ<Ð<ùò Cs   £Ac                óZ   • [        [        U R                  R                  5       5      5      $ )z#Return count of placeholder shapes.)rV   rH   r¼   rN  r„   s    rD   rW   ÚSlidePlaceholders.__len__  s   € ä”4˜Ÿ™×2Ñ2Ó4Ó5Ó6Ð6rF   r�   N)rL   r¥   r§   )
r­   r®   r¯   r°   r±   r.  rO   rS   rW   rµ   r�   rF   rD   r_  r_    s   ‡ ñð Óô	Lò=÷
7rF   r_  c           	     óT  • U R                   n[        U [        5      (       a.  U R                  S5      nU(       a  [	        X5      $ [        X5      $ [        S5      [        [        S5      [        [        S5      [        [        S5      [        0R                  U[        5      nU" X5      $ )r¢   z./p:nvPicPr/p:nvPr/a:videoFilezp:cxnSpzp:grpSpúp:spúp:graphicFrame)Útagr  r   r˜   r   r   r   r   r   r   r   r�  r   )rN   rB   r©  Ú
videoFilesÚ	shape_clss        rD   r£   r£   #  s�   € à
�-‰-€Cä�)œZ×(Ñ(Ø—_‘_Ð%EÓFˆ
ÞÜ˜Ó+Ð+Ü�yÓ)Ð)ô 	ˆ9‹”yÜ
ˆ9‹”zÜ
ˆ6‹
”EÜ
ÐÓœlð	÷
 
�cˆ#ŒyÓð ñ �YÓ'Ð'rF   c                óz   • [        U [        5      (       a  U R                  (       a  [        X5      $ [	        X5      $ )zBReturn appropriate shape object for `shape_elm` on a slide layout.)r  r   r{  r   r£   ©rN   rB   s     rD   rf  rf  7  ó-   € ä�)œX×&Ñ&¨9×+?×+?Ü  Ó3Ð3Ü˜IÓ.Ð.rF   c                óz   • [        U [        5      (       a  U R                  (       a  [        X5      $ [	        X5      $ )zBReturn appropriate shape object for `shape_elm` on a slide master.)r  r   r{  r   r£   r­  s     rD   rn  rn  >  r®  rF   c                óz   • [        U [        5      (       a  U R                  (       a  [        X5      $ [	        X5      $ )zAReturn appropriate shape object for `shape_elm` on a notes slide.)r  r   r{  r    r£   r­  s     rD   rv  rv  E  s-   € ä�)œX×&Ñ&¨9×+?×+?Ü$ YÓ7Ð7Ü˜IÓ.Ð.rF   c                óŽ  • U R                   nU[        S5      :X  aq  [        R                  [        [        R
                  [        [        R                  [        [        R                  [        0R                  U R                  [        5      nO2U[        S5      :X  a  [        nOU[        S5      :X  a  [        nO[        nU" X5      $ )zCReturn a placeholder shape of the appropriate type for `shape_elm`.r§  r¨  zp:pic)r©  r   r
   rq   r!   rt   r   r{   r~   r%   r�  r[   r$   r"   r#   r£   )rN   rB   r©  ÚConstructors       rD   Ú_SlidePlaceholderFactoryr³  L  sœ   € à
�-‰-€CØ
Œb�‹jÓä×!Ñ!Ô#5Ü× Ñ Ô"2Ü×"Ñ"Ô$6Ü× Ñ Ô"2ð	
÷
 ‰#ˆi×ÑÔ!1Ó
2ñ 	ð 
”Ð#Ó$Ó	$Ü-‰Ø	”�7“Ó	Ü(‰ä&ˆÙ�yÓ)Ð)rF   c                óP   • U R                   (       a  [        X5      $ [        X5      $ )z;Return appropriate shape object for `shape_elm` on a slide.)r{  r³  r£   r­  s     rD   r]  r]  _  s!   € à××Ü'¨	Ó:Ð:Ü˜IÓ.Ð.rF   c                  óD  ^ • \ rS rSrSr                  SU 4S jjr\                    SS j5       r\SS j5       r	\
SS j5       r\
SS j5       r\
SS j5       r\SS	 j5       r\SS
 j5       r\
SS j5       r\
SS j5       r\SS j5       rSrU =r$ )r6  if  až  Functional service object for creating a new movie p:pic element.

It's entire external interface is its :meth:`new_movie_pic` class method that returns a new
`p:pic` element containing the specified video. This class is not intended to be constructed
or an instance of it retained by the caller; it is a "one-shot" object, really a function
wrapped in a object such that its helper methods can be organized here.
c
                ó    >• [         [        U ]  5         Xl        X l        X0l        XEXg4u  U l        U l        U l        U l	        X€l
        X�l        g r;   )r<   r6  r=   Ú_shapesÚ	_shape_idÚ_movie_fileÚ_xÚ_yÚ_cxÚ_cyÚ_poster_frame_fileÚ
_mime_type)r@   rÞ   r  r9  rÆ   rÇ   rÈ   rÉ   Úposter_frame_filer;  rC   s             €rD   r=   Ú _MoviePicElementCreator.__init__o  sH   ø€ ô 	Ô% tÑ5Ô7ØŒØ!ŒØ%ÔØ/0°R¨|Ñ,ˆŒ�”˜$œ( D¤HØ"3ÔØ#�rF   c
                ó.   • U " XX4XVXxU	5	      R                   $ )zÀReturn a new `p:pic` element containing video in `movie_file`.

If `mime_type` is None, 'video/unknown' is used. If `poster_frame_file` is None, the
default "media loudspeaker" image is used.
)Ú_pic)
ÚclsrÞ   r  r9  rÆ   rÇ   rÈ   rÉ   r:  r;  s
             rD   r7  Ú%_MoviePicElementCreator.new_movie_picƒ  s   € ñ$ �6 Z°A¸2ÐS\Ó]×bÑbÐbrF   c                ó    • U R                   S   $ )z³Return the rId of RT.MEDIA relationship to video part.

For historical reasons, there are two relationships to the same part; one is the video rId
and the other is the media rId.
r   ©Ú_video_part_rIdsr„   s    rD   Ú
_media_rIdÚ"_MoviePicElementCreator._media_rId—  ó   € ð ×$Ñ$ QÑ'Ð'rF   c                óò   • [         R                  " U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  5	      $ )z5Return the new `p:pic` element referencing the video.)r   Únew_video_picr¸  Ú_shape_nameÚ
_video_rIdrÉ  Ú_poster_frame_rIdrº  r»  r¼  r½  r„   s    rD   rÃ  Ú_MoviePicElementCreator._pic   sZ   € ô ×'Ò'Ø�N‰NØ×ÑØ�O‰OØ�O‰OØ×"Ñ"Ø�G‰GØ�G‰GØ�H‰HØ�H‰Hó

ð 
	
rF   c                óX   • U R                   nUc  [        R                  " [        5      $ U$ )zˆReturn the image file for video placeholder image.

If no poster frame file is provided, the default "media loudspeaker" image is used.
)r¾  ÚioÚBytesIOr   )r@   rÀ  s     rD   Ú_poster_frame_image_fileÚ0_MoviePicElementCreator._poster_frame_image_file¯  s,   € ð !×3Ñ3ÐØÑ$Ü—:’:Ô1Ó2Ð2Ø Ð rF   c                óT   • U R                   R                  U R                  5      u  pU$ )z…Return the rId of relationship to poster frame image.

The poster frame is the image used to represent the video before it's played.
)Ú_slide_partrñ   rÕ  )r@   Ú_Úposter_frame_rIds      rD   rÐ  Ú)_MoviePicElementCreator._poster_frame_rIdº  s)   € ð #×.Ñ.×DÑDÀT×EbÑEbÓcÑˆØÐrF   c                ó.   • U R                   R                  $ )ztReturn the appropriate shape name for the p:pic shape.

A movie shape is named with the base filename of the video.
)Ú_videoÚfilenamer„   s    rD   rÎ  Ú#_MoviePicElementCreator._shape_nameÃ  s   € ð �{‰{×#Ñ#Ð#rF   c                ó.   • U R                   R                  $ )z8Return SlidePart object for slide containing this movie.©r·  r»   r„   s    rD   rØ  Ú#_MoviePicElementCreator._slide_partË  ó   € ð �|‰|× Ñ Ð rF   c                óX   • [         R                  " U R                  U R                  5      $ )z2Return a |Video| object containing the movie file.)r   Úfrom_path_or_file_liker¹  r¿  r„   s    rD   rÝ  Ú_MoviePicElementCreator._videoÐ  s!   € ô ×+Ò+¨D×,<Ñ,<¸d¿o¹oÓNÐNrF   c                óV   • U R                   R                  U R                  5      u  pX4$ )z’Return the rIds for relationships to media part for video.

This is where the media part and its relationships to the slide are actually created.
)rØ  Úget_or_add_video_media_partrÝ  )r@   Ú	media_rIdÚ	video_rIds      rD   rÈ  Ú(_MoviePicElementCreator._video_part_rIdsÕ  s*   € ð  $×/Ñ/×KÑKÈDÏKÉKÓXÑˆ	ØÐ#Ð#rF   c                ó    • U R                   S   $ )z³Return the rId of RT.VIDEO relationship to video part.

For historical reasons, there are two relationships to the same part; one is the video rId
and the other is the media rId.
r•   rÇ  r„   s    rD   rÏ  Ú"_MoviePicElementCreator._video_rIdÞ  rË  rF   )	r¼  r½  r¿  r¹  r¾  r¸  r·  rº  r»  )rÞ   r4  r  r¥   r9  r)  rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   rÀ  r+  r;  ú
str | None)rÞ   r4  r  r¥   r9  r)  rÆ   r6   rÇ   r6   rÈ   r6   rÉ   r6   r:  r+  r;  rî  r¦   r   ©r¦   rª   )r¦   r   ©r¦   r)  ©r¦   r2   )r¦   r   )r¦   ztuple[str, str])r­   r®   r¯   r°   r±   r=   Úclassmethodr7  r²   rÉ  r(   rÃ  rÕ  rÐ  rÎ  rØ  rÝ  rÈ  rÏ  rµ   r¶   r·   s   @rD   r6  r6  f  s�  ø† ñð$àð$ð ð$ð $ð	$ð
 ð$ð ð$ð ð$ð ð$ð 2ð$ð ÷$ð( ðcàðcð ðcð $ð	cð
 ðcð ðcð ðcð ðcð 3ðcð ðcð 
ócó ðcð& ó(ó ð(ð ó
ó ð
ð ó!ó ð!ð ó ó ð ð ó$ó ð$ð ó!ó ð!ð óOó ðOð ó$ó ð$ð ó(ó ö(rF   r6  c                  ón  • \ rS rSrSr                      SS jr\                        SS j5       r\SS j5       r	\SS j5       r
\SS j5       r\SS j5       r\SS	 j5       r\SS
 j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       r\SS j5       rSrg)rã   iè  aÈ  Functional service object for creating a new OLE-object p:graphicFrame element.

It's entire external interface is its :meth:`graphicFrame` class method that returns a new
`p:graphicFrame` element containing the specified embedded OLE-object shape. This class is not
intended to be constructed or an instance of it retained by the caller; it is a "one-shot"
object, really a function wrapped in a object such that its helper methods can be organized
here.
c                óˆ   • Xl         X l        X0l        X@l        XPl        X`l        Xpl        X€l        X�l        X l	        X°l
        g r;   )r·  r¸  Ú_ole_object_fileÚ_prog_id_argrº  r»  Ú_cx_argÚ_cy_argÚ_icon_file_argÚ_icon_width_argÚ_icon_height_arg)r@   rÞ   r  Úole_object_fileræ   rÆ   rÇ   rÈ   rÉ   rë   rì   rí   s               rD   r=   Ú!_OleObjectElementCreator.__init__ò  s@   € ð ŒØ!ŒØ /ÔØ#ÔØŒØŒØŒØŒØ'ÔØ)ÔØ +ÕrF   c                ó:   • U " UUUUUUUUU	U
U5      R                   $ )zJReturn new `p:graphicFrame` element containing embedded `ole_object_file`.)Ú_graphicFrame)rÄ  rÞ   r  rü  ræ   rÆ   rÇ   rÈ   rÉ   rë   rì   rí   s               rD   rÌ   Ú%_OleObjectElementCreator.graphicFrame  s9   € ñ  ØØØØØØØØØØØó
÷ ‰-ð	rF   c                ó  • [         R                  " U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  U R                  U R                  5      $ )zGNewly-created `p:graphicFrame` element referencing embedded OLE-object.)r   Únew_ole_object_graphicFramer¸  rÎ  Ú_ole_object_rIdÚ_progIdÚ	_icon_rIdrº  r»  r¼  r½  Ú_icon_widthÚ_icon_heightr„   s    rD   rÿ  Ú&_OleObjectElementCreator._graphicFrame*  sl   € ô '×BÒBØ�N‰NØ×ÑØ× Ñ Ø�L‰LØ�N‰NØ�G‰GØ�G‰GØ�H‰HØ�H‰HØ×ÑØ×Ñó
ð 	
rF   c                óÆ   • U R                   b  U R                   $ [        U R                  [        5      (       a  [	        U R                  R
                  5      $ [	        S5      $ )zBEmu object specifying width of "show-as-icon" image for OLE shape.éPº )r÷  r  rö  r   r'   ré   r„   s    rD   r¼  Ú_OleObjectElementCreator._cx;  sS   € ð �<‰<Ñ#Ø—<‘<Ðô
 -7°t×7HÑ7HÌ'×,RÑ,RŒC�×!Ñ!×'Ñ'Ó(ð	
ÜX[Ð\bÓXcð	
rF   c                óÆ   • U R                   b  U R                   $ [        U R                  [        5      (       a  [	        U R                  R
                  5      $ [	        S5      $ )zCEmu object specifying height of "show-as-icon" image for OLE shape.é@M	 )rø  r  rö  r   r'   rê   r„   s    rD   r½  Ú_OleObjectElementCreator._cyH  sS   € ð �<‰<Ñ#Ø—<‘<Ðô
 .8¸×8IÑ8IÌ7×-SÑ-SŒC�×!Ñ!×(Ñ(Ó)ð	
ÜY\Ð]cÓYdð	
rF   c                óJ   • U R                   b  U R                   $ [        S5      $ )a�  Vertical size of enclosed EMF icon within the OLE graphic-frame.

This must be specified when a custom icon is used, to avoid stretching of the image and
possible undesired resizing by PowerPoint when the OLE shape is double-clicked to open it.

The correct size can be determined by creating an example PPTX using PowerPoint and then
inspecting the XML of the OLE graphics-frame (p:oleObj.imgH).
r  )rû  r'   r„   s    rD   r  Ú%_OleObjectElementCreator._icon_heightU  s%   € ð )-×(=Ñ(=Ñ(Iˆt×$Ñ$ÐZÌsÐSYË{ÐZrF   c                ól  • U R                   b  U R                   $ [        U R                  [        5      (       a  U R                  R                  OSn[
        R                  R                  [        5      S   n[
        R                  R                  [
        R                  R                  USSU5      5      $ )z•Reference to image file containing icon to show in lieu of this object.

This can be either a str path or a file-like object (io.BytesIO typically).
zgeneric-icon.emfr   z..Ú	templates)rù  r  rö  r   Úicon_filenameÚosÚpathÚsplitÚ__file__ÚabspathÚjoin)r@   r  Ú_thisdirs      rD   Ú_icon_image_fileÚ)_OleObjectElementCreator._icon_image_filea  s‰   € ð ×ÑÑ*Ø×&Ñ&Ð&ô ˜$×+Ñ+¬W×5Ñ5ð ×Ñ×+Ò+à#ð 	ô —7‘7—=‘=¤Ó*¨1Ñ-ˆÜ�w‰w�‰œrŸw™wŸ|™|¨H°d¸KÈÓWÓXÐXrF   c                óT   • U R                   R                  U R                  5      u  pU$ )zHstr rId like "rId7" of rel to icon (image) representing OLE-object part.)rØ  rñ   r  )r@   rÙ  rË   s      rD   r  Ú"_OleObjectElementCreator._icon_rIdv  s'   € ð ×!Ñ!×7Ñ7¸×8MÑ8MÓN‰ˆØˆ
rF   c                óJ   • U R                   b  U R                   $ [        S5      $ )zíWidth of enclosed EMF icon within the OLE graphic-frame.

This must be specified when a custom icon is used, to avoid stretching of the image and
possible undesired resizing by PowerPoint when the OLE shape is double-clicked to open it.
r
  )rú  r'   r„   s    rD   r  Ú$_OleObjectElementCreator._icon_width|  s%   € ð (,×';Ñ';Ñ'Gˆt×#Ñ#ÐXÌSÐQWË[ÐXrF   c                ób   • U R                   R                  U R                  U R                  5      $ )zœstr rId like "rId6" of relationship to embedded ole_object part.

This is where the ole_object part and its relationship to the slide are actually created.
)rØ  Úadd_embedded_ole_object_partrö  rõ  r„   s    rD   r  Ú(_OleObjectElementCreator._ole_object_rId…  s.   € ð ×Ñ×<Ñ<Ø×Ñ˜t×4Ñ4ó
ð 	
rF   c                ó`   • U R                   n[        U[        5      (       a  UR                  $ U$ )z›str like "Excel.Sheet.12" identifying program used to open object.

This value appears in the `progId` attribute of the `p:oleObj` element for the object.
)rö  r  r   ÚprogId)r@   Úprog_id_args     rD   r  Ú _OleObjectElementCreator._progId�  s.   € ð ×'Ñ'ˆô &0°¼W×%EÑ%Eˆ{×!Ñ!ÐVÈ;ÐVrF   c                ó&   • SU R                   S-
  -  $ )z�str name like "Object 1" for the embedded ole_object shape.

The name is formed from the prefix "Object " and the shape-id decremented by 1.
z	Object %dr•   )r¸  r„   s    rD   rÎ  Ú$_OleObjectElementCreator._shape_name›  s   € ð ˜dŸn™n¨qÑ0Ñ1Ð1rF   c                ó.   • U R                   R                  $ )z SlidePart object for this slide.rá  r„   s    rD   rØ  Ú$_OleObjectElementCreator._slide_part£  rã  rF   )r÷  rø  rù  rû  rú  rõ  rö  r¸  r·  rº  r»  N)rÞ   r¹   r  r¥   rü  r)  ræ   úPROG_ID | strrÆ   r6   rÇ   r6   rÈ   r*  rÉ   r*  rë   r+  rì   r*  rí   r*  )rÞ   r¹   r  r¥   rü  r)  ræ   r,  rÆ   r6   rÇ   r6   rÈ   r*  rÉ   r*  rë   r+  rì   r*  rí   r*  r¦   r   )r¦   r   )r¦   r6   rð  rï  rñ  )r­   r®   r¯   r°   r±   r=   rò  rÌ   r(   rÿ  r¼  r½  r  r  r  r  r  r  rÎ  rØ  rµ   r�   rF   rD   rã   rã   è  sæ  † ñð,à ð,ð ð,ð )ð	,ð
 ð,ð ð,ð ð,ð ð,ð ð,ð *ð,ð "ð,ð #ô,ð4 ðà ðð ðð )ð	ð
 ðð ðð ðð ðð ðð *ðð "ðð #ðð 
!óó ðð: ó
ó ð
ð  ó

ó ð

ð ó

ó ð

ð ó	[ó ð	[ð óYó ðYð( óó ðð
 óYó ðYð ó
ó ð
ð ó	Wó ð	Wð ó2ó ð2ð ó!ó ó!rF   rã   )rN   r.   rB   r5   r¦   r   )rN   r.   rB   r5   )kr±   Ú
__future__r   rÓ  r  Útypingr   r   r   r   r   r	   Úpptx.enum.shapesr
   r   Ú
pptx.mediar   r   Úpptx.opc.constantsr   r`  Úpptx.oxml.nsr   Úpptx.oxml.shapes.autoshaper   Úpptx.oxml.shapes.graphfrmr   Úpptx.oxml.shapes.picturer   Úpptx.oxml.simpletypesr   Úpptx.shapes.autoshaper   r   Úpptx.shapes.baser   Úpptx.shapes.connectorr   Úpptx.shapes.freeformr   Úpptx.shapes.graphfrmr   Úpptx.shapes.groupr   Úpptx.shapes.picturer   r   Úpptx.shapes.placeholderr   r   r   r    r!   r"   r#   r$   r%   Úpptx.sharedr&   Ú	pptx.utilr'   r(   Úpptx.chart.chartr)   Úpptx.chart.datar*   Úpptx.enum.chartr+   r,   r-   Úpptx.oxml.shapesr.   Úpptx.oxml.shapes.connectorr/   Úpptx.oxml.shapes.groupshaper0   Úpptx.parts.imager1   Úpptx.parts.slider2   Ú
pptx.slider3   r4   Ú
pptx.typesr5   r6   r8   r¹   r0  r4  rc  rl  rq  ry  r~  rˆ  r�  r_  r£   rf  rn  rv  r³  r]  Úobjectr6  rã   r�   rF   rD   Ú<module>rL     sa  ðÙ @å "ã 	Û 	ß H× Hç 4ß 1Ý 1Ý Ý /Ý =Ý /Ý .ß 6Ý &Ý +Ý 0Ý -Ý (ß .÷
÷ 
õ 
õ -ß 'æÝ&Ý)Ý-ß>Ý-Ý7Ý9Ý*Ý*ß-Ý'Ý ô6R1Ð&ô R1ôje�{ô eôP	*Ð"ô *ô n2Ð"ô n2ôb	4�;ô 	4ô	4�;ô 	4ô8�{ô 8ô6$�{ô $ô4Ð)ô 4ô&SÐ)ô Sô0[Ð/ô [ô7Ð,ô 7ô<(ô(/ô/ô/ô*ô&/ô(˜fô (ôD~!˜võ ~!rF   