
    /_i9>                       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
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)LayoutConfigvalidate_width)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     Y/var/www/html/land_sniper/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       t        ||      }| 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allow_contentr*   r+   headingtagbodyanchorr(   r)   layout_config)r
   r	   dg_enqueuer$   _create_heading_protor   r   selfr3   r4   r(   r)   r*   r+   r6   s           r    r%   zHeadingMixin.header+   sg    v 	uD1$5Pww..#.. /  (   

 
	
r   	subheaderc          
         t        |d       t        ||      }| 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/   r0   r1   r5   )r
   r	   r7   r8   r$   r9   r   r   r:   s           r    r<   zHeadingMixin.subheader   sg    v 	uD1$5Pww..#11 /  (   

 
	
r   title)r(   r*   r+   c          	         t        |d       t        ||      }| 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   )r2   r3   r4   r(   r5   )r
   r	   r7   r8   r$   r9   r   r   )r;   r3   r4   r(   r*   r+   r6   s          r    r>   zHeadingMixin.title   sd    ` 	uD1$5Pww..#--	 /  (   	
 		
r   c                    t        d|       S )zGet our DeltaGenerator.r   )r   )r;   s    r    r7   zHeadingMixin.dg]  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_colorb  sY    d?

 l"w''#4WI=TUYU^U^_kUlTmmn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valuer2   r   r3   r$   rP   r)   hide_anchor
isinstancerL   r4   r   typer   r(   )r2   r3   r4   r(   r)   protos         r    r9   z"HeadingMixin._create_heading_protow  s     II	%
(>>wGEM$(!FC(%4+:6( CB B 
 ,9$v,:O:O9P QB B 
 EJr   )N)r3   r   r4   r!   r(   
str | Noner)   r"   r*   r   r+   r   returnr   )r3   r   r4   r!   r(   rX   r*   r   r+   r   rY   r   )rY   r   )r)   r"   rY   rL   )NNF)r2   r   r3   r   r4   r!   r(   rX   r)   r"   rY   rR   )r   r   r   r   r%   r<   r>   propertyr7   staticmethodrP   r9   r   r   r    r$   r$   *   s   H g

    (.g
g
 g

 g
 g
 g
 &g
 
g
 g
R K  g

    (.g
g
 g

 g
 g
 g
 &g
 
g
 !g
R G [

   (.[
[
 [

 [
 [
 &[
 
[
 [
z , , 
 
(     	
  
 r   r$   )"
__future__r   enumr   typingr   r   r   r   #streamlit.elements.lib.layout_utilsr	   r
   streamlit.errorsr   streamlit.proto.Heading_pb2r   rR   streamlit.runtime.metrics_utilr   streamlit.string_utilr   streamlit.delta_generatorr   r   r   streamlit.type_utilr   r   rL   r!   __annotations__boolr"   r$   r   r   r    <module>rh      ss    #  : : L 2 ? 9 ,8H/d  '%.(4/	 /CZ$& &m mr   