+
    ^eòj'!  ã                   óÒ   € R t ^ RIHt ]P                  t^ RIHt  ^ RIH	t
  ]  ]  ! R R4      t]! 4       tR#   ] d    R t
 L%i ; i  ] d    ]t L1i ; i  ] d    ]t L=i ; i)z9
The ``E`` Element factory for generating XML documents.
N©Úpartial)ÚGenericAliasc                 ó:   € V P                    R VP                    R2# )Ú[Ú])Ú__name__©ÚclsÚitems   &&Úƒ/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/lxml/builder.pyÚ_GenericAliasr   4   s   € Ø—,‘,�˜q §¡ ¨qÐ1Ð1ó    c                   ó@   a € ] tR t^Bt o RtRR ltR tR tR tRt	V t
R# )	ÚElementMakeraG  Element generator factory.

Unlike the ordinary Element factory, the E factory allows you to pass in
more than just a tag and some optional attributes; you can also pass in
text and other elements.  The text is added as either text or tail
attributes, and elements are inserted at the right spot.  Some small
examples::

    >>> from lxml import etree as ET
    >>> from lxml.builder import E

    >>> ET.tostring(E("tag"))
    '<tag/>'
    >>> ET.tostring(E("tag", "text"))
    '<tag>text</tag>'
    >>> ET.tostring(E("tag", "text", key="value"))
    '<tag key="value">text</tag>'
    >>> ET.tostring(E("tag", E("subtag", "text"), "tail"))
    '<tag><subtag>text</subtag>tail</tag>'

For simple tags, the factory also allows you to write ``E.tag(...)`` instead
of ``E('tag', ...)``::

    >>> ET.tostring(E.tag())
    '<tag/>'
    >>> ET.tostring(E.tag("text"))
    '<tag>text</tag>'
    >>> ET.tostring(E.tag(E.subtag("text"), "tail"))
    '<tag><subtag>text</subtag>tail</tag>'

Here's a somewhat larger example; this shows how to generate HTML
documents, using a mix of prepared factory functions for inline elements,
nested ``E.tag`` calls, and embedded XHTML fragments::

    # some common inline elements
    A = E.a
    I = E.i
    B = E.b

    def CLASS(v):
        # helper function, 'class' is a reserved word
        return {'class': v}

    page = (
        E.html(
            E.head(
                E.title("This is a sample document")
            ),
            E.body(
                E.h1("Hello!", CLASS("title")),
                E.p("This is a paragraph with ", B("bold"), " text in it!"),
                E.p("This is another paragraph, with a ",
                    A("link", href="http://www.python.org"), "."),
                E.p("Here are some reserved characters: <spam&egg>."),
                ET.XML("<p>And finally, here is an embedded XHTML fragment.</p>"),
            )
        )
    )

    print ET.tostring(page)

Here's a prettyprinted version of the output from the above script::

    <html>
      <head>
        <title>This is a sample document</title>
      </head>
      <body>
        <h1 class="title">Hello!</h1>
        <p>This is a paragraph with <b>bold</b> text in it!</p>
        <p>This is another paragraph, with <a href="http://www.python.org">link</a>.</p>
        <p>Here are some reserved characters: &lt;spam&amp;egg&gt;.</p>
        <p>And finally, here is an embedded XHTML fragment.</p>
      </body>
    </html>

For namespace support, you can pass a namespace map (``nsmap``)
and/or a specific target ``namespace`` to the ElementMaker class::

    >>> E = ElementMaker(namespace="http://my.ns/")
    >>> print(ET.tostring( E.test ))
    <test xmlns="http://my.ns/"/>

    >>> E = ElementMaker(namespace="http://my.ns/", nsmap={'p':'http://my.ns/'})
    >>> print(ET.tostring( E.test ))
    <p:test xmlns:p="http://my.ns/"/>
Nc                óî  a€ Ve   RV,           R,           MR V n         V'       d   \        V4      MR V n        Ve   \        V4      '       g   Q hVe   TM\        P
                  V n        S'       d   \        S4      M/ oR pR p\        S9  d
   VS\        &   \        S9  d
   VS\        &   \        P                  S9  d   VS\        P                  &   V3R lp\        S9  d
   VS\        &   SV n
        R # )NÚ{Ú}c                 óÆ   €  V R,          pVP                   ;'       g    RV,           Vn         R#   \         d'    T P                  ;'       g    RT,           T n         R# i ; i)é   Ú Néÿÿÿÿ)ÚtailÚ
IndexErrorÚtext)Úelemr   Ú
last_childs   && r   Úadd_textÚ'ElementMaker.__init__.<locals>.add_text¦   sR   € ðAØ! "�X�
ð $.§?¡?×#8Ð#8°b¸DÕ"@�
–øô ô 5Ø!ŸY™YŸ_˜_¨"°Õ4�—	ð5ús   ‚	/ ¯A ÁA ÁA c                 ón   € V P                   '       d   \        R V P                   ,          4      hWn         R# )z<Can't add a CDATA section. Element already has some text: %rN)r   Ú
ValueError)r   Úcdatas   &&r   Ú	add_cdataÚ(ElementMaker.__init__.<locals>.add_cdata®   s(   € Ø�y�yˆyÜ Ð!_Ðbf×bkÑbkÕ!kÓlÐlØŽIr   c                 óÀ   <€ V P                   pVP                  4        F<  w  r4\        V\        4      '       d   WBV&   K!  S\	        V4      ,          ! R V4      W#&   K>  	  R # ©N)ÚattribÚitemsÚ
isinstanceÚ
basestringÚtype)r   r   r&   ÚkÚvÚtypemaps   &&   €r   Úadd_dictÚ'ElementMaker.__init__.<locals>.add_dictº   sI   ø€ Ø—[‘[ˆFØŸ
™
ž‘�Ü˜a¤×,Ò,Ø !˜1“Ià '¬¨Q«Ö 0°°qÓ 9�F“Ió	 %r   )Ú
_namespaceÚdictÚ_nsmapÚcallableÚETÚElementÚ_makeelementÚstrÚunicodeÚCDATAÚ_typemap)Úselfr-   Ú	namespaceÚnsmapÚmakeelementr   r"   r.   s   &f&&&   r   Ú__init__ÚElementMaker.__init__›   sÊ   ø€ à3<Ò3H˜# 	�/¨CÖ/ÈdˆŒß%*”d˜5”k°ˆŒàÒ"¤h¨{×&;Ò&;Ð;Ð;Ø+6Ò+B™KÌÏ
É
ˆÔ÷ $+”$�w”-°ˆò	Aò	ô
 �gÔØ#ˆG”C‰LÜ˜'Ô!Ø'ˆG”GÑÜ�8‰8˜7Ô"Ø )ˆG”B—H‘HÑõ	:ô �wÔØ$ˆG”D‰MàˆŽr   c                óP  € V P                   p\        V\        4      '       g$   \        V\        4      '       d   VP                  pM/V P
                  e"   V^ ,          R8w  d   V P
                  V,           pV P                  WP                  R7      pV'       d   V\        ,          ! WS4       V Fô  p\        V4      '       d   V! 4       pVP                  \        V4      4      pVfŠ   \        P                  ! V4      '       d   VP                  V4       Kh  \        V4      P                   F  pVP                  V4      pVf   K   M)	  \!        R\        V4      P"                  : RV: R24      hV! WV4      p	V	'       g   KÔ  VP                  \        V	4      4      ! WY4       Kö  	  V# )Nr   )r=   zbad argument type: Ú(Ú))r:   r(   r7   Ú_QNamer   r0   r6   r2   r1   r3   Úgetr*   r4   Ú	iselementÚappendÚ__mro__Ú	TypeErrorr   )
r;   ÚtagÚchildrenr&   r-   r   r   ÚtÚbasetyper,   s
   &&*,      r   Ú__call__ÚElementMaker.__call__Ç   s@  € Ø—-‘-ˆô ˜#œs×#Ò#¬
°3¼×(?Ò(?à—(‘(‰CØ�_‰_Ò(¨S°­V°s¬]Ø—/‘/ CÕ'ˆCØ× Ñ  ¯K©KÐ Ó8ˆßØ”DŽM˜$Ô'ãˆDÜ˜�~Š~Ù“v�Ø—‘œD ›JÓ'ˆAØŠyÜ—<’< ×%Ò%Ø—K‘K Ô%ÙÜ $ T£
× 2Ô 2�HàŸ™ HÓ-�AØ”}Ùñ	 !3õ $Ü%)¨$£Z×%8Ô%8»$ð%@ó Að Aá�$“ˆAß‰qØ—‘œD ›GÔ$ TÖ-ñ% ð( ˆr   c                ó   € \        W4      # r%   r   )r;   rJ   s   &&r   Ú__getattr__ÚElementMaker.__getattr__ê   s   € Ü�tÓ!Ð!r   c                ó   € \        W4      # r%   )r   r	   s   &&r   Ú__class_getitem__ÚElementMaker.__class_getitem__î   s   € Ü˜SÓ'Ð'r   )r6   r0   r2   r:   )NNNN)r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r?   rN   rQ   rT   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   B   s'   ø‡ € ñVôp* òX!òF"÷(ð (r   r   )rY   Ú
lxml.etreeÚetreer4   ÚQNamerD   Ú	functoolsr   Útypesr   r   ÚImportErrorr)   Ú	NameErrorr7   r8   r   ÚE© r   r   Ú<module>rf      s‹   ðñLõ
 Ø	�‰€å ð2Ý3ðÙðÙ÷
m(ñ m(ñb ƒN‚øðC ô 2ô2ð2ûð ô Ø‚Jðûð
 ô Ø‚Gðús1   œ; £A ¦A »
AÁAÁ	AÁAÁ	A&Á%A&