Ë
    Eêñi¬>  ã                  ó  — U d dl m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 d dlmZ d dlmZ d dlmZ erd d	lmZ d d
l	mZmZ d dlmZ  G d„ de«      Zeed   z  dz  Zded<   eez  dz  Zded<    G d„ d«      Z y)é    )Úannotations)ÚEnum)ÚTYPE_CHECKINGÚLiteralÚ	TypeAliasÚcast)Úcreate_layout_config)ÚStreamlitAPIException)ÚHeading)Úgather_metrics)Ú
clean_text)ÚDeltaGenerator)ÚTextAlignmentÚWidth)ÚSupportsStrc                  ó   — e Zd ZdZdZdZy)ÚHeadingProtoTagÚh1Úh2Úh3N)Ú__name__Ú
__module__Ú__qualname__Ú	TITLE_TAGÚ
HEADER_TAGÚSUBHEADER_TAG© ó    ú\/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/streamlit/elements/heading.pyr   r       s   „ Ø€IØ€JØ�Mr   r   FNr   ÚAnchorÚDividerc                  ó2  — e Zd Z ed«      	 ddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z ed«      	 ddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„«       Z ed
«      	 dddddœ	 	 	 	 	 	 	 	 	 	 	 dd„«       Zedd„«       Ze	dd„«       Z
e		 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd„«       Zy)ÚHeadingMixinÚheaderNFÚstretchÚleft)ÚhelpÚdividerÚwidthÚtext_alignmentc          
     ó¦   — t        ||d¬«      }| j                  j                  dt        j	                  t
        j                  ||||¬«      |¬«      S )aA  Display text in header formatting.

        Parameters
        ----------
        body : str
            The text to display as GitHub-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the header. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow"
            Shows a colored divider below the header. If this is ``True``,
            successive headers will cycle through divider colors, except gray
            and rainbow. That is, the first header will have a blue line, the
            second header will have a green line, and so on. If this is a
            string, the color can be set to one of the following: blue, green,
            orange, red, violet, yellow, gray/grey, or rainbow.

        width : "stretch", "content", or int
            The width of the header element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed the width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.header("_Streamlit_ is :blue[cool] :sunglasses:")
        >>> st.header("This is a header with a divider", divider="gray")
        >>> st.header("These headers have rotating dividers", divider=True)
        >>> st.header("One", divider=True)
        >>> st.header("Two", divider=True)
        >>> st.header("Three", divider=True)
        >>> st.header("Four", divider=True)

        .. output::
           https://doc-header.streamlit.app/
           height: 600px

        T©r)   r*   Úallow_content_widthÚheading©ÚtagÚbodyÚanchorr'   r(   ©Úlayout_config)r	   ÚdgÚ_enqueuer#   Ú_create_heading_protor   r   ©Úselfr1   r2   r'   r(   r)   r*   r4   s           r   r$   zHeadingMixin.header+   sf   € ôv -ØØ)Ø $ô
ˆð �w‰w×ÑØÜ×.Ñ.Ü#×.Ñ.ØØØØð /ó ð (ð  ó 

ð 
	
r   Ú	subheaderc          
     ó¦   — t        ||d¬«      }| j                  j                  dt        j	                  t
        j                  ||||¬«      |¬«      S )ah  Display text in subheader formatting.

        Parameters
        ----------
        body : str
            The text to display as GitHub-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the subheader. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        divider : bool, "blue", "green", "orange", "red", "violet", "yellow", "gray"/"grey", or "rainbow"
            Shows a colored divider below the header. If this is ``True``,
            successive headers will cycle through divider colors, except gray
            and rainbow. That is, the first header will have a blue line, the
            second header will have a green line, and so on. If this is a
            string, the color can be set to one of the following: blue, green,
            orange, red, violet, yellow, gray/grey, or rainbow.

        width : "stretch", "content", or int
            The width of the subheader element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed the width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.subheader("_Streamlit_ is :blue[cool] :sunglasses:")
        >>> st.subheader("This is a subheader with a divider", divider="gray")
        >>> st.subheader("These subheaders have rotating dividers", divider=True)
        >>> st.subheader("One", divider=True)
        >>> st.subheader("Two", divider=True)
        >>> st.subheader("Three", divider=True)
        >>> st.subheader("Four", divider=True)

        .. output::
           https://doc-subheader.streamlit.app/
           height: 500px

        Tr,   r.   r/   r3   )r	   r5   r6   r#   r7   r   r   r8   s           r   r:   zHeadingMixin.subheader˜   sf   € ôv -ØØ)Ø $ô
ˆð �w‰w×ÑØÜ×.Ñ.Ü#×1Ñ1ØØØØð /ó ð (ð  ó 

ð 
	
r   Útitle)r'   r)   r*   c          	     ó¤   — t        ||d¬«      }| j                  j                  dt        j	                  t
        j                  |||¬«      |¬«      S )aV  Display text in title formatting.

        Each document should have a single `st.title()`, although this is not
        enforced.

        Parameters
        ----------
        body : str
            The text to display as GitHub-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives.

            .. |st.markdown| replace:: ``st.markdown``
            .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

        anchor : str or False
            The anchor name of the header that can be accessed with #anchor
            in the URL. If omitted, it generates an anchor using the body.
            If False, the anchor is not shown in the UI.

        help : str or None
            A tooltip that gets displayed next to the title. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        width : "stretch", "content", or int
            The width of the title element. This can be one of the following:

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed the width of the parent container.
            - An integer specifying the width in pixels: The element has a
              fixed width. If the specified width is greater than the width of
              the parent container, the width of the element matches the width
              of the parent container.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.title("This is a title")
        >>> st.title("_Streamlit_ is :blue[cool] :sunglasses:")

        .. output::
           https://doc-title.streamlit.app/
           height: 220px

        Tr,   r.   )r0   r1   r2   r'   r3   )r	   r5   r6   r#   r7   r   r   )r9   r1   r2   r'   r)   r*   r4   s          r   r<   zHeadingMixin.title  sc   € ô` -ØØ)Ø $ô
ˆð �w‰w×ÑØÜ×.Ñ.Ü#×-Ñ-ØØØð	 /ó ð (ð  ó 	
ð 		
r   c                ó   — t        d| «      S )zGet our DeltaGenerator.r   )r   )r9   s    r   r5   zHeadingMixin.dgf  s   € ô Ð$ dÓ+Ð+r   c                óv   — | du ryg d¢}| |v rt        d| «      S t        d| › ddj                  |«      › d�«      ‚)	NTÚauto)	ÚredÚorangeÚyellowÚblueÚgreenÚvioletÚgrayÚgreyÚrainbowÚstrz&Divider parameter has invalid value: `z`. Please choose from: z, ú.)r   r
   Újoin)r(   Úvalid_colorss     r   Ú_handle_divider_colorz"HeadingMixin._handle_divider_colork  sY   € à�d‰?Øò

ˆð �lÑ"Ü˜˜wÓ'Ð'Ü#Ø4°W°IÐ=TÐUY×U^ÑU^Ð_kÓUlÐTmÐmnÐoó
ð 	
r   c                ó\  — t        «       }| j                  |_        t        |«      |_        |rt
        j                  |«      |_        |�Y|du rd|_        nMt        |t        «      r||_        n5|du rt        d|› d�«      ‚t        dt        |«      j                  › d�«      ‚|r||_        |S )NFTz$Anchor parameter has invalid value: z-. Supported values: None, any string or Falsez#Anchor parameter has invalid type: )ÚHeadingProtoÚvaluer0   r   r1   r#   rN   r(   Úhide_anchorÚ
isinstancerJ   r2   r
   Útyper   r'   )r0   r1   r2   r'   r(   Úprotos         r   r7   z"HeadingMixin._create_heading_proto€  sÄ   € ô “ˆØ—I‘IˆŒ	Ü Ó%ˆŒ
ÙÜ(×>Ñ>¸wÓGˆEŒMØÐØ˜‰Ø$(�Õ!Ü˜F¤CÔ(Ø%�•Ø˜4‘Ü+Ø:¸6¸(ð CBð Bóð ô
 ,Ø9¼$¸v»,×:OÑ:OÐ9Pð QBð Bóð ñ
 ØˆEŒJàˆr   )N)r1   r   r2   r    r'   ú
str | Noner(   r!   r)   r   r*   r   Úreturnr   )r1   r   r2   r    r'   rV   r)   r   r*   r   rW   r   )rW   r   )r(   r!   rW   rJ   )NNF)r0   r   r1   r   r2   r    r'   rV   r(   r!   rW   rP   )r   r   r   r   r$   r:   r<   Úpropertyr5   ÚstaticmethodrN   r7   r   r   r   r#   r#   *   sñ  „ Ù�HÓð ðj
ð
  Ø Ø Ø(.ñj
àðj
ð ðj
ð
 ðj
ð ðj
ð ðj
ð &ðj
ð 
òj
ó ðj
ñX �KÓ ð ðj
ð
  Ø Ø Ø(.ñj
àðj
ð ðj
ð
 ðj
ð ðj
ð ðj
ð &ðj
ð 
òj
ó !ðj
ñX �GÓð ð^
ð
  Ø Ø(.ñ^
àð^
ð ð^
ð
 ð^
ð ð^
ð &ð^
ð 
ò^
ó ð^
ð@ ò,ó ð,ð ò
ó ð
ð( ð ØØ ðØðàðð ðð ð	ð
 ðð 
òó ñr   r#   )!Ú
__future__r   Úenumr   Útypingr   r   r   r   Ú#streamlit.elements.lib.layout_utilsr	   Ústreamlit.errorsr
   Ústreamlit.proto.Heading_pb2r   rP   Ústreamlit.runtime.metrics_utilr   Ústreamlit.string_utilr   Ústreamlit.delta_generatorr   r   r   Ústreamlit.type_utilr   r   rJ   r    Ú__annotations__Úboolr!   r#   r   r   r   ú<module>rf      ss   ðö #å ß :Ó :å DÝ 2Ý ?Ý 9Ý ,áÝ8ßHÝ/ô�dô ð ˜' %™.Ñ(¨4Ñ/€ˆ	Ó /Ø˜C‘Z $Ñ&€ˆÓ &÷vò vr   