§
    £”j	  ã                  óä   — d Z ddlmZ ddlmZmZmZmZ ddlm	Z	 ddl
mZmZ erddlmZ  e	j        ¦   «         Z e	j        dd¬	¦  «        Ze                     e¦  «         dd„Zdd„Z	 	 ddd„ZdS )zXML parser for python-docx.é    )Úannotations)ÚTYPE_CHECKINGÚDictÚTypeÚcast)Úetree)ÚNamespacePrefixedTagÚnsmap)ÚBaseOxmlElementTF)Úremove_blank_textÚresolve_entitiesÚxmlústr | bytesÚreturnú'BaseOxmlElement'c                óR   — t          dt          j        | t          ¦  «        ¦  «        S )z·Root lxml element obtained by parsing XML character string `xml`.

    The custom parser is used, so custom element classes are produced for elements in
    `xml` that have them.
    r   )r   r   Ú
fromstringÚoxml_parser)r   s    ú_/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/docx/oxml/parser.pyÚ	parse_xmlr      s"   € õ Ð!¥5Ô#3°C½Ñ#EÔ#EÑFÔFÐFó    ÚtagÚstrÚclsúType['BaseOxmlElement']c                óŠ   — |                       d¦  «        \  }}t                               t          |         ¦  «        }|||<   dS )zóRegister an lxml custom element-class to use for `tag`.

    A instance of `cls` to be constructed when the oxml parser encounters an element
    with matching `tag`. `tag` is a string of the form `nspfx:tagroot`, e.g.
    `'w:document'`.
    ú:N)ÚsplitÚelement_class_lookupÚget_namespacer
   )r   r   ÚnspfxÚtagrootÚ	namespaces        r   Úregister_element_clsr$       s>   € ð —Y’Y˜s‘^”^�N€Eˆ7Ý$×2Ò2µ5¸´<Ñ@Ô@€IØ€IˆgÑÐÐr   NÚ
nsptag_strÚattrsúDict[str, str] | NoneÚnsdeclsú BaseOxmlElement | etree._Elementc                óv   — t          | ¦  «        }|€|j        }t                               |j        ||¬¦  «        S )al  Return a 'loose' lxml element having the tag specified by `nsptag_str`.

    The tag in `nsptag_str` must contain the standard namespace prefix, e.g. `a:tbl`.
    The resulting element is an instance of the custom element class for this tag name
    if one is defined. A dictionary of attribute values may be provided as `attrs`; they
    are set if present. All namespaces defined in the dict `nsdecls` are declared in the
    element using the key as the prefix and the value as the namespace name. If
    `nsdecls` is not provided, a single namespace declaration is added based on the
    prefix on `nsptag_str`.
    N)Úattribr
   )r	   r
   r   ÚmakeelementÚ
clark_name)r%   r&   r(   Únsptags       r   ÚOxmlElementr/   ,   s;   € õ " *Ñ-Ô-€FØ€Ø”,ˆÝ×"Ò" 6Ô#4¸UÈ'Ð"ÑRÔRÐRr   )r   r   r   r   )r   r   r   r   )NN)r%   r   r&   r'   r(   r'   r   r)   )Ú__doc__Ú
__future__r   Útypingr   r   r   r   Úlxmlr   Údocx.oxml.nsr	   r
   Údocx.oxml.xmlchemyr   ÚElementNamespaceClassLookupr   Ú	XMLParserr   Úset_element_class_lookupr   r$   r/   © r   r   ú<module>r:      s#  ðð "Ð !à "Ð "Ð "Ð "Ð "Ð "à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2à Ð Ð Ð Ð Ð à 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4àð 3Ø2Ð2Ð2Ð2Ð2Ð2ð 9�uÔ8Ñ:Ô:Ð ØˆeŒo°ÀuÐMÑMÔM€Ø × $Ò $Ð%9Ñ :Ô :Ð :ðGð Gð Gð Gð	ð 	ð 	ð 	ð $(Ø%)ðSð Sð Sð Sð Sð Sð Sr   