+
    i                    \    R t ^ RIHt ^ RIt^ RIt ! R R]4      t]! R4      t]! R4      tR# )z_Provides the PackURI value type.

Also some useful known pack URI strings such as PACKAGE_URI.
)annotationsNc                      ] tR t^tRt]P                  ! R4      tR R lt]	R R l4       t
]R R l4       t]R	 R
 l4       t]R 4       t]R 4       t]R 4       tR R lt]R 4       tRtR# )PackURIzpProvides access to pack URI components such as the baseURI and the filename slice.

Behaves as |str| otherwise.
z([a-zA-Z]+)([1-9][0-9]*)?c                   V ^8  d   QhRR/# )   pack_uri_strstr )formats   "V/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/docx/opc/packuri.py__annotate__PackURI.__annotate__   s     . .3 .    c                	n    V^ ,          R8w  d   Rp\        W!,          4      h\        P                  W4      # )    /z'PackURI must begin with slash, got '%s')
ValueErrorr   __new__)clsr   tmpls   && r   r   PackURI.__new__   s0    ?c!<DT011{{3--r   c               $    V ^8  d   QhRRRRRR/# )r   baseURIr   relative_refreturnr   r	   )r
   s   "r   r   r      s!        c      r   c                p    \         P                  ! W4      p\         P                  ! V4      p\        V4      # )zIThe absolute PackURI formed by translating `relative_ref` onto `baseURI`.)	posixpathjoinabspathr   )r   r   
joined_uriabs_uris   &&  r   from_rel_refPackURI.from_rel_ref   s-     ^^G:
##J/wr   c                   V ^8  d   QhRR/# r   r   r   r	   )r
   s   "r   r   r   "   s     ( ( (r   c                <    \         P                  ! V 4      ^ ,          # )zThe base URI of this pack URI, the directory portion, roughly speaking.

E.g. ``'/ppt/slides'`` for ``'/ppt/slides/slide1.xml'``. For the package pseudo-
partname '/', baseURI is '/'.
r   splitselfs   &r   r   PackURI.baseURI!        t$Q''r   c                   V ^8  d   QhRR/# r$   r	   )r
   s   "r   r   r   +   s     C CS Cr   c                    \         P                  ! V 4      ^,          pVP                  R4      '       d
   VR,          # T# )zwThe extension portion of this pack URI, e.g. ``'xml'`` for ``'/word/document.xml'``.

Note the period is not included.
.   NN)r   splitext
startswith)r)   raw_exts   & r   extPackURI.ext*   s8     $$T*1-%0055wr{B7Br   c                <    \         P                  ! V 4      ^,          # )zThe "filename" portion of this pack URI, e.g. ``'slide1.xml'`` for
``'/ppt/slides/slide1.xml'``.

For the package pseudo-partname '/', filename is ''.
r&   r(   s   &r   filenamePackURI.filename4   r+   r   c                   V P                   pV'       g   R# \        P                  ! V4      ^ ,          pV P                  P	                  V4      pVf   R# VP                  ^4      '       d   \        VP                  ^4      4      # R# )zReturn partname index as integer for tuple partname or None for singleton
partname, e.g. ``21`` for ``'/ppt/slides/slide21.xml'`` and |None| for
``'/ppt/presentation.xml'``.N)r7   r   r1   _filename_rematchgroupint)r)   r7   	name_partr;   s   &   r   idxPackURI.idx=   si    
 ==&&x03	!!''	2=;;q>>u{{1~&&r   c                    V R,          # )zThe pack URI with the leading slash stripped off, the form used as the Zip
file membername for the package item.

Returns '' for the package pseudo-partname '/'.
r/   r	   r(   s   &r   
membernamePackURI.membernameM   s     Bxr   c                   V ^8  d   QhRR/# )r   r   r   r	   )r
   s   "r   r   r   V   s     P PC Pr   c                N    VR8X  d
   V R,          # \         P                  ! W4      # )zReturn string containing relative reference to package item from `baseURI`.

E.g. PackURI('/ppt/slideLayouts/slideLayout1.xml') would return
'../slideLayouts/slideLayout1.xml' for baseURI '/ppt/slides'.
r   r/   )r   relpath)r)   r   s   &&r   r   PackURI.relative_refV   s$     #c>tBxOy/@/@/OOr   c                    RV P                   ,          p\        P                  ! V P                  RV4      p\	        V4      # )zThe pack URI of the .rels part corresponding to the current pack URI.

Only produces sensible output if the pack URI is a partname or the package
pseudo-partname '/'.
z%s.rels_rels)r7   r   r   r   r   )r)   rels_filenamerels_uri_strs   &  r   rels_uriPackURI.rels_uri`   s3     "DMM1 ~~dllG]K|$$r   r	   N)__name__
__module____qualname____firstlineno____doc__recompiler:   r   staticmethodr!   propertyr   r4   r7   r?   rB   r   rL   __static_attributes__r	   r   r   r   r      s    
 ::9:L.     ( ( C C ( (    P % %r   r   r   z/[Content_Types].xml)	rR   
__future__r   r   rS   r   r   PACKAGE_URICONTENT_TYPES_URIr	   r   r   <module>r[      s;   
 #  	]%c ]%@ cl23 r   