Ë
    EêñiÒ¥  ã                  óB  — d dl mZ d dlZd dlZd dlZd dlZd dl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 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 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& d dl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZY d dlZm[Z[ d dl\m]Z] d dl^m_Z_ e	rd dl`maZambZbmcZc d dldmeZe  ejÌ                  «       Zg G d„ d«      Zhy)é    )ÚannotationsN)ÚPath)ÚTYPE_CHECKINGÚAny)Ú	MagicMock)Úparse)ÚBidiComponentManager)ÚRuntime)ÚMemoryCacheStorageManager)ÚMediaFileManager)ÚMemoryMediaFileStorage)ÚPagesManager)ÚScriptCache)ÚSecrets)ÚTESTING_KEY)ÚSafeSessionState)ÚSessionState)Úpage_icon_and_name)2ÚBlockÚButtonÚButtonGroupÚCaptionÚ	ChatInputÚChatMessageÚCheckboxÚCodeÚColorPickerÚColumnÚ	DataframeÚ	DateInputÚDateTimeInputÚDividerÚElementListÚElementTreeÚErrorÚ	ExceptionÚExpanderÚFeedbackÚFileUploaderÚHeaderÚInfoÚJsonÚLatexÚMarkdownÚ
MenuButtonÚMetricÚMultiselectÚNodeÚNumberInputÚRadioÚ	SelectboxÚSelectSliderÚSliderÚStatusÚ	SubheaderÚSuccessÚTabÚTableÚTextÚTextAreaÚ	TextInputÚ	TimeInputÚTitleÚToastÚToggleÚWarningÚ
WidgetListÚrepr_)ÚLocalScriptRunner)Úpatch_config_options)Ú	calc_hash)ÚCallableÚIteratorÚSequence)ÚWidgetStatesc                  ó†  — e Zd ZdZdddœ	 	 	 	 	 	 	 	 	 dFd„ZeddœdGd„«       Zeddddœ	 	 	 	 	 	 	 	 	 dHd	„«       Zeddddœ	 	 	 	 	 	 	 	 	 dId
„«       Zeddœ	 	 	 	 	 dJd„«       Z		 	 dK	 	 	 	 	 dLd„Z
dMd„ZddœdNd„ZdOd„ZedPd„«       ZedPd„«       ZedQd„«       ZedRd„«       ZedRd„«       ZedRd„«       ZedSd„«       ZedTd„«       ZedUd„«       ZedVd„«       ZedWd„«       ZedXd„«       ZedYd„«       ZedZd„«       Zed[d„«       Zed\d „«       Zed]d!„«       Zed^d"„«       Z ed_d#„«       Z!ed`d$„«       Z"edad%„«       Z#edbd&„«       Z$edcd'„«       Z%eddd(„«       Z&eded)„«       Z'edfd*„«       Z(edgd+„«       Z)edhd,„«       Z*edid-„«       Z+edjd.„«       Z,edkd/„«       Z-edld0„«       Z.edmd1„«       Z/ednd2„«       Z0edod3„«       Z1edpd4„«       Z2edqd5„«       Z3edrd6„«       Z4edsd7„«       Z5edtd8„«       Z6edud9„«       Z7edvd:„«       Z8edwd;„«       Z9edxd<„«       Z:edyd=„«       Z;edzd>„«       Z<ed{d?„«       Z=ed|d@„«       Z>d}dA„Z?d~dB„Z@ddC„ZAd€dD„ZBd�dE„ZCy)‚ÚAppTestaÆ
  
    A simulated Streamlit app to check the correctness of displayed    elements and outputs.

    An instance of ``AppTest`` simulates a running Streamlit app. This class
    provides methods to set up, manipulate, and inspect the app contents via
    API instead of a browser UI. It can be used to write automated tests of an
    app in various scenarios. These can then be run using a tool like pytest.

    ``AppTest`` can be initialized by one of three class methods:

    * |st.testing.v1.AppTest.from_file|_ (recommended)
    * |st.testing.v1.AppTest.from_string|_
    * |st.testing.v1.AppTest.from_function|_

    Once initialized, Session State and widget values can be updated and the
    script can be run. Unlike an actual live-running Streamlit app, you need to
    call ``AppTest.run()`` explicitly to re-run the app after changing a widget
    value. Switching pages also requires an explicit, follow-up call to
    ``AppTest.run()``.

    ``AppTest`` enables developers to build tests on their app as-is, in the
    familiar python test format, without major refactoring or abstracting out
    logic to be tested separately from the UI. Tests can run quickly with very
    low overhead. A typical pattern is to build a suite of tests for an app
    that ensure consistent functionality as the app evolves, and run the tests
    locally and/or in a CI environment like Github Actions.

    .. note::
        ``AppTest`` only supports testing a single page of an app per
        instance. For multipage apps using ``st.navigation``, ``AppTest``
        will render the default page. To test other pages, you can use
        ``AppTest.switch_page()`` within your test or modify query parameters
        before running.

    .. |st.testing.v1.AppTest.from_file| replace:: ``st.testing.v1.AppTest.from_file``
    .. _st.testing.v1.AppTest.from_file: #apptestfrom_file
    .. |st.testing.v1.AppTest.from_string| replace:: ``st.testing.v1.AppTest.from_string``
    .. _st.testing.v1.AppTest.from_string: #apptestfrom_string
    .. |st.testing.v1.AppTest.from_function| replace:: ``st.testing.v1.AppTest.from_function``
    .. _st.testing.v1.AppTest.from_function: #apptestfrom_function

    Attributes
    ----------
    secrets: dict[str, Any]
        Dictionary of secrets to be used the simulated app. Use dict-like
        syntax to set secret values for the simulated app.

    session_state: SafeSessionState
        Session State for the simulated app. SafeSessionState object supports
        read and write operations as usual for Streamlit apps.

    query_params: dict[str, Any]
        Dictionary of query parameters to be used by the simluated app. Use
        dict-like syntax to set ``query_params`` values for the simulated app.
    N©ÚargsÚkwargsc               óò   — t        |«      | _        || _        t        «       }i |t        <   t        |d„ «      | _        i | _        i | _        || _	        || _
        d| _        t        «       }| |_        || _        y )Nc                  ó   — y ©N© rV   ó    ú_/var/www/pod-logistic/pod-ai/venv/lib/python3.12/site-packages/streamlit/testing/v1/app_test.pyú<lambda>z"AppTest.__init__.<locals>.<lambda>­   s   � rW   Ú )ÚstrÚ_script_pathÚdefault_timeoutr   r   r   Úsession_stateÚquery_paramsÚsecretsrQ   rR   Ú
_page_hashr$   Ú_runnerÚ_tree)ÚselfÚscript_pathr]   rQ   rR   r^   Útrees          rX   Ú__init__zAppTest.__init__¡   sr   € ô   Ó,ˆÔØ.ˆÔÜ$›ˆØ%'ˆ”kÑ"Ü-¨m¹\ÓJˆÔØ,.ˆÔØ')ˆŒØˆŒ	ØˆŒØˆŒä‹}ˆØˆŒØˆ�
rW   é   ©r]   c               ó(   — | j                  ||¬«      S )a3  
        Create an instance of ``AppTest`` to simulate an app page defined        within a string.

        This is useful for testing short scripts that fit comfortably as an
        inline string in the test itself, without having to create a separate
        file for it. The script must be executable on its own and so must
        contain all necessary imports.

        Parameters
        ----------
        script: str
            The string contents of the script to be run.

        default_timeout: float
            Default time in seconds before a script run is timed out. Can be
            overridden for individual ``.run()`` calls.

        Returns
        -------
        AppTest
            A simulated Streamlit app for testing. The simulated app can be
            executed via ``.run()``.

        ri   )Ú_from_string)ÚclsÚscriptr]   s      rX   Úfrom_stringzAppTest.from_string¸   s   € ð6 ×Ñ ¸ÐÓHÐHrW   ©r]   rQ   rR   c               óà   — t        t        |d«      «      }t        t        j                  |«      }t        j                  |«      }|j                  |d¬«       t        t        |«      |||¬«      S )Nzutf-8)Úencodingro   )
rI   Úbytesr   ÚTMP_DIRÚnameÚtextwrapÚdedentÚ
write_textrO   r[   )rl   rm   r]   rQ   rR   Úscript_nameÚpathÚaligned_scripts           rX   rk   zAppTest._from_stringÕ   s]   € ô  ¤ f¨gÓ 6Ó7ˆä”G—L‘L +Ó.ˆÜ!Ÿ™¨Ó0ˆØ�‰˜°ˆÔ9ÜÜ�‹I ¸TÈ&ô
ð 	
rW   c               óæ   — t        j                  |«      \  }}t        j                  dj	                  |«      «      }|dt        |d«      r|j                  nd› d�z   }| j                  ||||¬«      S )a  
        Create an instance of ``AppTest`` to simulate an app page defined        within a function.

        This is similar to ``AppTest.from_string()``, but more convenient to
        write with IDE assistance. The script must be executable on its own and
        so must contain all necessary imports.

        Parameters
        ----------
        script: Callable
            A function whose body will be used as a script. Must be runnable
            in isolation, so it must include any necessary imports.

        default_timeout: float
            Default time in seconds before a script run is timed out. Can be
            overridden for individual ``.run()`` calls.

        args: tuple
            An optional tuple of args to pass to the script function.

        kwargs: dict
            An optional dict of kwargs to pass to the script function.

        Returns
        -------
        AppTest
            A simulated Streamlit app for testing. The simulated app can be
            executed via ``.run()``.

        rZ   ú
Ú__name__rm   z(*__args, **__kwargs)ro   )ÚinspectÚgetsourcelinesru   rv   ÚjoinÚhasattrr}   rk   )	rl   rm   r]   rQ   rR   Úsource_linesÚ_ÚsourceÚmodules	            rX   Úfrom_functionzAppTest.from_functionç   s~   € ôP "×0Ñ0°Ó8‰ˆ�aÜ—‘ §¡¨Ó!6Ó7ˆàØ¤g¨f°jÔ&A�6—?’?ÀxÐPÐPeÐfñgð 	ð ×ÑØ O¸$Àvð  ó 
ð 	
rW   c               ó
  — t        |«      }|j                  «       r|}nYt        j                  j	                  t        j
                  d«      «      }t        |d   j                  «      }|j                  |z  }t        ||¬«      S )a.  
        Create an instance of ``AppTest`` to simulate an app page defined        within a file.

        This option is most convenient for CI workflows and testing of
        published apps. The script must be executable on its own and so must
        contain all necessary imports.

        Parameters
        ----------
        script_path: str | Path
            Path to a script file. The path should be absolute or relative to
            the file calling ``.from_file``.

        default_timeout: float
            Default time in seconds before a script run is timed out. Can be
            overridden for individual ``.run()`` calls.

        Returns
        -------
        AppTest
            A simulated Streamlit app for testing. The simulated app can be
            executed via ``.run()``.
        Né   ri   )	r   Úis_fileÚ	tracebackÚStackSummaryÚextractÚ
walk_stackÚfilenameÚparentrO   )rl   re   r]   ry   ÚstackÚfilepaths         rX   Ú	from_filezAppTest.from_file  sq   € ô8 ˜;Ó'ˆØ×ÑÔ Ø‰Dô
 ×*Ñ*×2Ñ2´9×3GÑ3GÈÓ3MÓNˆEÜ˜E !™H×-Ñ-Ó.ˆHØ—?‘? [Ñ0ˆDÜ�t¨_Ô=Ð=rW   c                ó
  — ddl }|€| j                  }t        t        ¬«      }t	        t        d«      «      |_        t        «       |_        t        «       |_
        |t        _        t        «       }dt        _        t        | j                  |d¬«      }|j                   }| j                   r"t#        «       }| j                   |_        ||_        t'        | j                  | j(                  || j*                  | j,                  ¬«      }	| j/                  |	«       t1        dd	i«      5  |	j3                  || j4                  || j6                  «      | _        | | j8                  _        ddd«       |	j<                  d
   d   j>                  }
tA        jB                  |
«      | _        | j                   rA|j                   j$                  �$tE        |j                   j$                  «      | _        ||_        dt        _        | S # 1 sw Y   Œ™xY w)z®Run the script, and parse the output messages for querying
        and interaction.

        Timeout is in seconds, or None to use the default timeout of the runner.
        r   N)Úspecz/mock/mediaF)Úsetup_watcherrP   zglobal.appTestTéÿÿÿÿÚclient_state)#Ú	streamlitr]   r   r
   r   r   Úmedia_file_mgrr   Úcache_storage_managerr	   Úbidi_component_registryÚ	_instancer   r   Úuses_pages_directoryr\   r`   r   Ú_secretsrG   r^   rQ   rR   Ú_register_uploaded_filesrH   Úrunr_   ra   rc   rb   Ú
event_dataÚquery_stringr   Úparse_qsÚdict)rd   Úwidget_stateÚtimeoutÚstÚmock_runtimeÚscript_cacheÚpages_managerÚsaved_secretsÚnew_secretsÚscript_runnerr¢   s              rX   Ú_runzAppTest._runA  s­  € ó 	àˆ?Ø×*Ñ*ˆGô !¤gÔ.ˆÜ&6Ü" =Ó1ó'
ˆÔ#ô .GÓ-HˆÔ*Ü/CÓ/EˆÔ,Ø(ŒÔÜ"“}ˆà,0ŒÔ)Ü$Ø×Ñ˜|¸5ô
ˆð "$§¡ˆà�<Š<Ü!›)ˆKØ#'§<¡<ˆKÔ Ø$ˆBŒJä)Ø×ÑØ×ÑØØ—‘Ø—;‘;ô
ˆð 	×%Ñ% mÔ4ä!Ð#3°TÐ":Ó;ñ 	&Ø&×*Ñ*Ø˜d×/Ñ/°¸$¿/¹/óˆDŒJð "&ˆD�J‰JÔ÷		&ð %×/Ñ/°Ñ3°NÑC×PÑPˆÜ!ŸN™N¨<Ó8ˆÔà�<Š<Ø�z‰z×"Ñ"Ð.Ü# B§J¡J×$7Ñ$7Ó8�”Ø&ˆBŒJØ ŒÔàˆ÷	&ð 	&ús   Ä"?G9Ç9Hc                ó´   — ddl m} | j                  j                  D ]9  }|j	                  «       D ]$  \  }}}} |||||¬«      }|j                  |«       Œ& Œ; y)z?Register files from FileUploader widgets with the file manager.r   )ÚUploadedFileRec)Úfile_idrt   ÚtypeÚdataN)Ú'streamlit.runtime.uploaded_file_managerr°   rc   Úfile_uploaderÚ_get_files_to_registerÚregister_file)	rd   r­   r°   Úwidgetr±   rŽ   ÚcontentÚ	mime_typeÚfile_recs	            rX   rŸ   z AppTest._register_uploaded_files„  sm   € åKà—j‘j×.Ñ.ò 	6ˆFð ×.Ñ.Ó0ò6ñ ØØØØá*Ø#Ø!Ø"Ø ô	�ð ×+Ñ+¨HÕ5ñ6ñ	6rW   ©r¦   c               ó:   — | j                   j                  |¬«      S )a±  Run the script from the current state.

        This is equivalent to manually rerunning the app or the rerun that
        occurs upon user interaction. ``AppTest.run()`` must be manually called
        after updating a widget value or switching pages as script reruns do
        not occur automatically as they do for live-running Streamlit apps.

        Parameters
        ----------
        timeout : float or None
            The maximum number of seconds to run the script. If ``timeout`` is
            ``None`` (default), Streamlit uses the default timeout set for the
            instance of ``AppTest``.

        Returns
        -------
        AppTest
            self

        r¼   )rc   r    )rd   r¦   s     rX   r    zAppTest.run—  s   € ð* �z‰z�~‰~ gˆ~Ó.Ð.rW   c                ó  — t        | j                  «      j                  }||z  }|j                  «       st	        d|› d�«      ‚t        |j                  «       «      }t        t        |«      «      \  }}t        |«      | _	        | S )aÔ  Switch to another page of the app.

        This method does not automatically rerun the app. Use a follow-up call
        to ``AppTest.run()`` to obtain the elements on the selected page.

        Parameters
        ----------
        page_path: str
            Path of the page to switch to. The path must be relative to the
            main script's location (e.g. ``"pages/my_page.py"``).

        Returns
        -------
        AppTest
            self

        zUnable to find script at z:, make sure the page given is relative to the main script.)
r   r\   r�   r‰   Ú
ValueErrorr[   Úresolver   rI   ra   )rd   Ú	page_pathÚmain_dirÚfull_page_pathÚpage_path_strrƒ   Ú	page_names          rX   Úswitch_pagezAppTest.switch_page®  sƒ   € ô$ ˜×)Ñ)Ó*×1Ñ1ˆØ! IÑ-ˆØ×%Ñ%Ô'ÜØ+¨I¨;Ð6pÐqóð ô ˜N×2Ñ2Ó4Ó5ˆÜ)¬$¨}Ó*=Ó>‰ˆˆ9Ü# IÓ.ˆŒØˆrW   c                ó.   — | j                   j                  S )aP  Sequence of elements within the main body of the app.

        Returns
        -------
        Block
            A container of elements. Block can be queried for elements in the
            same manner as ``AppTest``. For example, ``Block.checkbox`` will
            return all ``st.checkbox`` within the associated container.
        )rc   Úmain©rd   s    rX   rÈ   zAppTest.mainË  s   € ð �z‰z�‰ÐrW   c                ó.   — | j                   j                  S )aJ  Sequence of all elements within ``st.sidebar``.

        Returns
        -------
        Block
            A container of elements. Block can be queried for elements in the
            same manner as ``AppTest``. For example, ``Block.checkbox`` will
            return all ``st.checkbox`` within the associated container.
        )rc   ÚsidebarrÉ   s    rX   rË   zAppTest.sidebarØ  s   € ð �z‰z×!Ñ!Ð!rW   c                ó.   — | j                   j                  S )a×  Sequence of all ``st.button`` and ``st.form_submit_button`` widgets.

        Returns
        -------
        WidgetList of Button
            Sequence of all ``st.button`` and ``st.form_submit_button``
            widgets. Individual widgets can be accessed from a WidgetList by
            index (order on the page) or key. For example, ``at.button[0]`` for
            the first widget or ``at.button(key="my_key")`` for a widget with a
            given key.
        )rc   ÚbuttonrÉ   s    rX   rÍ   zAppTest.buttonå  s   € ð �z‰z× Ñ Ð rW   c                ó.   — | j                   j                  S )aä  Sequence of all ``st.pills`` and ``st.segmented_control`` widgets.

        Returns
        -------
        WidgetList of ButtonGroup
            Sequence of all ``st.pills`` and ``st.segmented_control`` widgets.
            Individual widgets can be accessed from a WidgetList by index
            (order on the page) or key. For example, ``at.button_group[0]`` for
            the first widget or ``at.button_group(key="my_key")`` for a widget
            with a given key.
        )rc   Úbutton_grouprÉ   s    rX   rÏ   zAppTest.button_groupô  s   € ð �z‰z×&Ñ&Ð&rW   c                ó.   — | j                   j                  S )a°  Sequence of all ``st.pills`` widgets.

        Returns
        -------
        WidgetList of ButtonGroup
            Sequence of all ``st.pills`` widgets (filtered by style).
            Individual widgets can be accessed from a WidgetList by index
            (order on the page) or key. For example, ``at.pills[0]`` for
            the first widget or ``at.pills(key="my_key")`` for a widget
            with a given key.
        )rc   ÚpillsrÉ   s    rX   rÑ   zAppTest.pills  s   € ð �z‰z×ÑÐrW   c                ó.   — | j                   j                  S )aà  Sequence of all ``st.segmented_control`` widgets.

        Returns
        -------
        WidgetList of ButtonGroup
            Sequence of all ``st.segmented_control`` widgets (filtered by style).
            Individual widgets can be accessed from a WidgetList by index
            (order on the page) or key. For example, ``at.segmented_control[0]``
            for the first widget or ``at.segmented_control(key="my_key")``
            for a widget with a given key.
        )rc   Úsegmented_controlrÉ   s    rX   rÓ   zAppTest.segmented_control  s   € ð �z‰z×+Ñ+Ð+rW   c                ó.   — | j                   j                  S )a„  Sequence of all ``st.caption`` elements.

        Returns
        -------
        ElementList of Caption
            Sequence of all ``st.caption`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.caption[0]`` for the first element. Caption is an
            extension of the Element class.
        )rc   ÚcaptionrÉ   s    rX   rÕ   zAppTest.caption!  ó   € ð �z‰z×!Ñ!Ð!rW   c                ó.   — | j                   j                  S )a¢  Sequence of all ``st.chat_input`` widgets.

        Returns
        -------
        WidgetList of ChatInput
            Sequence of all ``st.chat_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.chat_input[0]`` for the first widget or
            ``at.chat_input(key="my_key")`` for a widget with a given key.
        )rc   Ú
chat_inputrÉ   s    rX   rØ   zAppTest.chat_input/  ó   € ð �z‰z×$Ñ$Ð$rW   c                ó.   — | j                   j                  S )a—  Sequence of all ``st.chat_message`` elements.

        Returns
        -------
        Sequence of ChatMessage
            Sequence of all ``st.chat_message`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.chat_message[0]`` for the first element.  ChatMessage
            is an extension of the Block class.
        )rc   Úchat_messagerÉ   s    rX   rÛ   zAppTest.chat_message=  ó   € ð �z‰z×&Ñ&Ð&rW   c                ó.   — | j                   j                  S )a™  Sequence of all ``st.checkbox`` widgets.

        Returns
        -------
        WidgetList of Checkbox
            Sequence of all ``st.checkbox`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.checkbox[0]`` for the first widget or
            ``at.checkbox(key="my_key")`` for a widget with a given key.
        )rc   ÚcheckboxrÉ   s    rX   rÞ   zAppTest.checkboxK  ó   € ð �z‰z×"Ñ"Ð"rW   c                ó.   — | j                   j                  S )au  Sequence of all ``st.code`` elements.

        Returns
        -------
        ElementList of Code
            Sequence of all ``st.code`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.code[0]`` for the first element. Code is an
            extension of the Element class.
        )rc   ÚcoderÉ   s    rX   rá   zAppTest.codeY  ó   € ð �z‰z�‰ÐrW   c                ó.   — | j                   j                  S )a¬  Sequence of all ``st.color_picker`` widgets.

        Returns
        -------
        WidgetList of ColorPicker
            Sequence of all ``st.color_picker`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.color_picker[0]`` for the first widget or
            ``at.color_picker(key="my_key")`` for a widget with a given key.
        )rc   Úcolor_pickerrÉ   s    rX   rä   zAppTest.color_pickerg  rÜ   rW   c                ó.   — | j                   j                  S )a  Sequence of all columns within ``st.columns`` elements.

        Each column within a single ``st.columns`` will be returned as a
        separate Column in the Sequence.

        Returns
        -------
        Sequence of Column
            Sequence of all columns within ``st.columns`` elements. Individual
            columns can be accessed from an ElementList by index (order on the
            page). For example, ``at.columns[0]`` for the first column. Column
            is an extension of the Block class.
        )rc   ÚcolumnsrÉ   s    rX   ræ   zAppTest.columnsu  s   € ð �z‰z×!Ñ!Ð!rW   c                ó.   — | j                   j                  S )aŽ  Sequence of all ``st.dataframe`` elements.

        Returns
        -------
        ElementList of Dataframe
            Sequence of all ``st.dataframe`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.dataframe[0]`` for the first element. Dataframe is an
            extension of the Element class.
        )rc   Ú	dataframerÉ   s    rX   rè   zAppTest.dataframe†  ó   € ð �z‰z×#Ñ#Ð#rW   c                ó.   — | j                   j                  S )a¢  Sequence of all ``st.date_input`` widgets.

        Returns
        -------
        WidgetList of DateInput
            Sequence of all ``st.date_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.date_input[0]`` for the first widget or
            ``at.date_input(key="my_key")`` for a widget with a given key.
        )rc   Ú
date_inputrÉ   s    rX   rë   zAppTest.date_input”  rÙ   rW   c                ó.   — | j                   j                  S )a¶  Sequence of all ``st.datetime_input`` widgets.

        Returns
        -------
        WidgetList of DateTimeInput
            Sequence of all ``st.datetime_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.datetime_input[0]`` for the first widget or
            ``at.datetime_input(key="my_key")`` for a widget with a given key.
        )rc   Údatetime_inputrÉ   s    rX   rí   zAppTest.datetime_input¢  s   € ð �z‰z×(Ñ(Ð(rW   c                ó.   — | j                   j                  S )a„  Sequence of all ``st.divider`` elements.

        Returns
        -------
        ElementList of Divider
            Sequence of all ``st.divider`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.divider[0]`` for the first element. Divider is an
            extension of the Element class.
        )rc   ÚdividerrÉ   s    rX   rï   zAppTest.divider°  rÖ   rW   c                ó.   — | j                   j                  S )az  Sequence of all ``st.error`` elements.

        Returns
        -------
        ElementList of Error
            Sequence of all ``st.error`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.error[0]`` for the first element. Error is an
            extension of the Element class.
        )rc   ÚerrorrÉ   s    rX   rñ   zAppTest.error¾  ó   € ð �z‰z×ÑÐrW   c                ó.   — | j                   j                  S )aŽ  Sequence of all ``st.exception`` elements.

        Returns
        -------
        ElementList of Exception
            Sequence of all ``st.exception`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.exception[0]`` for the first element. Exception is an
            extension of the Element class.
        )rc   Ú	exceptionrÉ   s    rX   rô   zAppTest.exceptionÌ  ré   rW   c                ó.   — | j                   j                  S )aŒ  Sequence of all ``st.feedback`` widgets.

        Returns
        -------
        WidgetList of Feedback
            Sequence of all ``st.feedback`` widgets. Individual widgets can be
            accessed from a WidgetList by index (order on the page) or key. For
            example, ``at.feedback[0]`` for the first widget or
            ``at.feedback(key="my_key")`` to access by key.
        )rc   ÚfeedbackrÉ   s    rX   rö   zAppTest.feedbackÚ  rß   rW   c                ó.   — | j                   j                  S )a±  Sequence of all ``st.file_uploader`` widgets.

        Returns
        -------
        WidgetList of FileUploader
            Sequence of all ``st.file_uploader`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.file_uploader[0]`` for the first widget or
            ``at.file_uploader(key="my_key")`` for a widget with a given key.
        )rc   rµ   rÉ   s    rX   rµ   zAppTest.file_uploaderè  ó   € ð �z‰z×'Ñ'Ð'rW   c                ó.   — | j                   j                  S )a„  Sequence of all ``st.expander`` elements.

        Returns
        -------
        Sequence of Expandable
            Sequence of all ``st.expander`` elements. Individual elements can be
            accessed from a Sequence by index (order on the page). For
            example, ``at.expander[0]`` for the first element. Expandable is an
            extension of the Block class.
        )rc   ÚexpanderrÉ   s    rX   rú   zAppTest.expanderö  rß   rW   c                ó.   — | j                   j                  S )a  Sequence of all ``st.header`` elements.

        Returns
        -------
        ElementList of Header
            Sequence of all ``st.header`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.header[0]`` for the first element. Header is an
            extension of the Element class.
        )rc   ÚheaderrÉ   s    rX   rü   zAppTest.header  ó   € ð �z‰z× Ñ Ð rW   c                ó.   — | j                   j                  S )au  Sequence of all ``st.info`` elements.

        Returns
        -------
        ElementList of Info
            Sequence of all ``st.info`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.info[0]`` for the first element. Info is an
            extension of the Element class.
        )rc   ÚinforÉ   s    rX   rÿ   zAppTest.info  râ   rW   c                ó.   — | j                   j                  S )au  Sequence of all ``st.json`` elements.

        Returns
        -------
        ElementList of Json
            Sequence of all ``st.json`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.json[0]`` for the first element. Json is an
            extension of the Element class.
        )rc   ÚjsonrÉ   s    rX   r  zAppTest.json   râ   rW   c                ó.   — | j                   j                  S )az  Sequence of all ``st.latex`` elements.

        Returns
        -------
        ElementList of Latex
            Sequence of all ``st.latex`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.latex[0]`` for the first element. Latex is an
            extension of the Element class.
        )rc   ÚlatexrÉ   s    rX   r  zAppTest.latex.  rò   rW   c                ó.   — | j                   j                  S )a‰  Sequence of all ``st.markdown`` elements.

        Returns
        -------
        ElementList of Markdown
            Sequence of all ``st.markdown`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.markdown[0]`` for the first element. Markdown is an
            extension of the Element class.
        )rc   ÚmarkdownrÉ   s    rX   r  zAppTest.markdown<  rß   rW   c                ó.   — | j                   j                  S )a  Sequence of all ``st.metric`` elements.

        Returns
        -------
        ElementList of Metric
            Sequence of all ``st.metric`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.metric[0]`` for the first element. Metric is an
            extension of the Element class.
        )rc   ÚmetricrÉ   s    rX   r  zAppTest.metricJ  rý   rW   c                ó.   — | j                   j                  S )a§  Sequence of all ``st.menu_button`` widgets.

        Returns
        -------
        WidgetList of MenuButton
            Sequence of all ``st.menu_button`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.menu_button[0]`` for the first widget or
            ``at.menu_button(key="my_key")`` for a widget with a given key.
        )rc   Úmenu_buttonrÉ   s    rX   r	  zAppTest.menu_buttonX  ó   € ð �z‰z×%Ñ%Ð%rW   c                ó.   — | j                   j                  S )a¨  Sequence of all ``st.multiselect`` widgets.

        Returns
        -------
        WidgetList of Multiselect
            Sequence of all ``st.multiselect`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.multiselect[0]`` for the first widget or
            ``at.multiselect(key="my_key")`` for a widget with a given key.
        )rc   ÚmultiselectrÉ   s    rX   r  zAppTest.multiselectf  r
  rW   c                ó.   — | j                   j                  S )a¬  Sequence of all ``st.number_input`` widgets.

        Returns
        -------
        WidgetList of NumberInput
            Sequence of all ``st.number_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.number_input[0]`` for the first widget or
            ``at.number_input(key="my_key")`` for a widget with a given key.
        )rc   Únumber_inputrÉ   s    rX   r  zAppTest.number_inputt  rÜ   rW   c                ó.   — | j                   j                  S )aŠ  Sequence of all ``st.radio`` widgets.

        Returns
        -------
        WidgetList of Radio
            Sequence of all ``st.radio`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.radio[0]`` for the first widget or
            ``at.radio(key="my_key")`` for a widget with a given key.
        )rc   ÚradiorÉ   s    rX   r  zAppTest.radio‚  rò   rW   c                ó.   — | j                   j                  S )a±  Sequence of all ``st.select_slider`` widgets.

        Returns
        -------
        WidgetList of SelectSlider
            Sequence of all ``st.select_slider`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.select_slider[0]`` for the first widget or
            ``at.select_slider(key="my_key")`` for a widget with a given key.
        )rc   Úselect_sliderrÉ   s    rX   r  zAppTest.select_slider�  rø   rW   c                ó.   — | j                   j                  S )až  Sequence of all ``st.selectbox`` widgets.

        Returns
        -------
        WidgetList of Selectbox
            Sequence of all ``st.selectbox`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.selectbox[0]`` for the first widget or
            ``at.selectbox(key="my_key")`` for a widget with a given key.
        )rc   Ú	selectboxrÉ   s    rX   r  zAppTest.selectboxž  ré   rW   c                ó.   — | j                   j                  S )a�  Sequence of all ``st.slider`` widgets.

        Returns
        -------
        WidgetList of Slider
            Sequence of all ``st.slider`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.slider[0]`` for the first widget or
            ``at.slider(key="my_key")`` for a widget with a given key.
        )rc   ÚsliderrÉ   s    rX   r  zAppTest.slider¬  rý   rW   c                ó.   — | j                   j                  S )aŽ  Sequence of all ``st.subheader`` elements.

        Returns
        -------
        ElementList of Subheader
            Sequence of all ``st.subheader`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.subheader[0]`` for the first element. Subheader is an
            extension of the Element class.
        )rc   Ú	subheaderrÉ   s    rX   r  zAppTest.subheaderº  ré   rW   c                ó.   — | j                   j                  S )a„  Sequence of all ``st.success`` elements.

        Returns
        -------
        ElementList of Success
            Sequence of all ``st.success`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.success[0]`` for the first element. Success is an
            extension of the Element class.
        )rc   ÚsuccessrÉ   s    rX   r  zAppTest.successÈ  rÖ   rW   c                ó.   — | j                   j                  S )av  Sequence of all ``st.status`` elements.

        Returns
        -------
        Sequence of Status
            Sequence of all ``st.status`` elements. Individual elements can be
            accessed from a Sequence by index (order on the page). For
            example, ``at.status[0]`` for the first element. Status is an
            extension of the Block class.
        )rc   ÚstatusrÉ   s    rX   r  zAppTest.statusÖ  rý   rW   c                ó.   — | j                   j                  S )az  Sequence of all ``st.table`` elements.

        Returns
        -------
        ElementList of Table
            Sequence of all ``st.table`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.table[0]`` for the first element. Table is an
            extension of the Element class.
        )rc   ÚtablerÉ   s    rX   r  zAppTest.tableä  rò   rW   c                ó.   — | j                   j                  S )aÄ  Sequence of all tabs within ``st.tabs`` elements.

        Each tab within a single ``st.tabs`` will be returned as a separate Tab
        in the Sequence. Additionally, the tab labels are forwarded to each
        Tab element as a property. For example, ``st.tabs("A","B")`` will
        yield two Tab objects, with ``Tab.label`` returning "A" and "B",
        respectively.

        Returns
        -------
        Sequence of Tab
            Sequence of all tabs within ``st.tabs`` elements. Individual
            tabs can be accessed from an ElementList by index (order on the
            page). For example, ``at.tabs[0]`` for the first tab. Tab is an
            extension of the Block class.
        )rc   ÚtabsrÉ   s    rX   r   zAppTest.tabsò  s   € ð$ �z‰z�‰ÐrW   c                ó.   — | j                   j                  S )au  Sequence of all ``st.text`` elements.

        Returns
        -------
        ElementList of Text
            Sequence of all ``st.text`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.text[0]`` for the first element. Text is an
            extension of the Element class.
        )rc   ÚtextrÉ   s    rX   r"  zAppTest.text  râ   rW   c                ó.   — | j                   j                  S )a�  Sequence of all ``st.text_area`` widgets.

        Returns
        -------
        WidgetList of TextArea
            Sequence of all ``st.text_area`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.text_area[0]`` for the first widget or
            ``at.text_area(key="my_key")`` for a widget with a given key.
        )rc   Ú	text_arearÉ   s    rX   r$  zAppTest.text_area  ré   rW   c                ó.   — | j                   j                  S )a¢  Sequence of all ``st.text_input`` widgets.

        Returns
        -------
        WidgetList of TextInput
            Sequence of all ``st.text_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.text_input[0]`` for the first widget or
            ``at.text_input(key="my_key")`` for a widget with a given key.
        )rc   Ú
text_inputrÉ   s    rX   r&  zAppTest.text_input"  rÙ   rW   c                ó.   — | j                   j                  S )a¢  Sequence of all ``st.time_input`` widgets.

        Returns
        -------
        WidgetList of TimeInput
            Sequence of all ``st.time_input`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.time_input[0]`` for the first widget or
            ``at.time_input(key="my_key")`` for a widget with a given key.
        )rc   Ú
time_inputrÉ   s    rX   r(  zAppTest.time_input0  rÙ   rW   c                ó.   — | j                   j                  S )az  Sequence of all ``st.title`` elements.

        Returns
        -------
        ElementList of Title
            Sequence of all ``st.title`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.title[0]`` for the first element. Title is an
            extension of the Element class.
        )rc   ÚtitlerÉ   s    rX   r*  zAppTest.title>  rò   rW   c                ó.   — | j                   j                  S )az  Sequence of all ``st.toast`` elements.

        Returns
        -------
        ElementList of Toast
            Sequence of all ``st.toast`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.toast[0]`` for the first element. Toast is an
            extension of the Element class.
        )rc   ÚtoastrÉ   s    rX   r,  zAppTest.toastL  rò   rW   c                ó.   — | j                   j                  S )a�  Sequence of all ``st.toggle`` widgets.

        Returns
        -------
        WidgetList of Toggle
            Sequence of all ``st.toggle`` widgets. Individual widgets can
            be accessed from a WidgetList by index (order on the page) or key.
            For example, ``at.toggle[0]`` for the first widget or
            ``at.toggle(key="my_key")`` for a widget with a given key.
        )rc   ÚtogglerÉ   s    rX   r.  zAppTest.toggleZ  rý   rW   c                ó.   — | j                   j                  S )a„  Sequence of all ``st.warning`` elements.

        Returns
        -------
        ElementList of Warning
            Sequence of all ``st.warning`` elements. Individual elements can be
            accessed from an ElementList by index (order on the page). For
            example, ``at.warning[0]`` for the first element. Warning is an
            extension of the Element class.
        )rc   ÚwarningrÉ   s    rX   r0  zAppTest.warningh  rÖ   rW   c                ó,   — t        | j                  «      S rU   )Úlenrc   rÉ   s    rX   Ú__len__zAppTest.__len__v  s   € Ü�4—:‘:‹ÐrW   c              #  ó8   K  — | j                   E d {  –—†  y 7 Œ­wrU   ©rc   rÉ   s    rX   Ú__iter__zAppTest.__iter__y  s   è ø€ Ø—:‘:×Òús   ‚’“c                ó    — | j                   |   S rU   r5  )rd   Úidxs     rX   Ú__getitem__zAppTest.__getitem__|  s   € Ø�z‰z˜#‰ÐrW   c                ó8   — | j                   j                  |«      S )a±  Get elements or widgets of the specified type.

        This method returns the collection of all elements or widgets of
        the specified type on the current page. Retrieve a specific element by
        using its index (order on page) or key lookup.

        Parameters
        ----------
        element_type: str
            An element attribute of ``AppTest``. For example, "button",
            "caption", or "chat_input".

        Returns
        -------
        Sequence of Elements
            Sequence of elements of the given type. Individual elements can
            be accessed from a Sequence by index (order on the page). When
            getting and ``element_type`` that is a widget, individual widgets
            can be accessed by key. For example, ``at.get("text")[0]`` for the
            first ``st.text`` element or ``at.get("slider")(key="my_key")`` for
            the ``st.slider`` widget with a given key.
        )rc   Úget)rd   Úelement_types     rX   r;  zAppTest.get  s   € ð. �z‰z�~‰~˜lÓ+Ð+rW   c                ó   — t        | «      S rU   )rF   rÉ   s    rX   Ú__repr__zAppTest.__repr__˜  s   € Ü�T‹{ÐrW   )
re   ú
str | Pathr]   ÚfloatrQ   útuple[Any, ...] | NonerR   údict[str, Any] | NoneÚreturnÚNone)rm   r[   r]   r@  rC  rO   )
rm   r[   r]   r@  rQ   rA  rR   rB  rC  rO   )
rm   zCallable[..., Any]r]   r@  rQ   rA  rR   rB  rC  rO   )re   r?  r]   r@  rC  rO   )NN)r¥   zWidgetStates | Noner¦   úfloat | NonerC  rO   )r­   rG   rC  rD  )r¦   rE  rC  rO   )rÁ   r[   rC  rO   )rC  r   )rC  zWidgetList[Button])rC  zWidgetList[ButtonGroup[Any]])rC  zElementList[Caption])rC  zWidgetList[ChatInput])rC  zSequence[ChatMessage])rC  zWidgetList[Checkbox])rC  zElementList[Code])rC  zWidgetList[ColorPicker])rC  zSequence[Column])rC  zElementList[Dataframe])rC  zWidgetList[DateInput])rC  zWidgetList[DateTimeInput])rC  zElementList[Divider])rC  zElementList[Error])rC  zElementList[Exception])rC  zWidgetList[Feedback])rC  zWidgetList[FileUploader])rC  zSequence[Expander])rC  zElementList[Header])rC  zElementList[Info])rC  zElementList[Json])rC  zElementList[Latex])rC  zElementList[Markdown])rC  zElementList[Metric])rC  zWidgetList[MenuButton[Any]])rC  zWidgetList[Multiselect[Any]])rC  zWidgetList[NumberInput])rC  zWidgetList[Radio[Any]])rC  zWidgetList[SelectSlider[Any]])rC  zWidgetList[Selectbox[Any]])rC  zWidgetList[Slider[Any]])rC  zElementList[Subheader])rC  zElementList[Success])rC  zSequence[Status])rC  zElementList[Table])rC  zSequence[Tab])rC  zElementList[Text])rC  zWidgetList[TextArea])rC  zWidgetList[TextInput])rC  zWidgetList[TimeInput])rC  zElementList[Title])rC  zElementList[Toast])rC  zWidgetList[Toggle])rC  zElementList[Warning])rC  Úint)rC  zIterator[Node])r8  rF  rC  r2   )r<  r[   rC  zSequence[Node])rC  r[   )Dr}   Ú
__module__Ú__qualname__Ú__doc__rg   Úclassmethodrn   rk   r†   r’   r®   rŸ   r    rÆ   ÚpropertyrÈ   rË   rÍ   rÏ   rÑ   rÓ   rÕ   rØ   rÛ   rÞ   rá   rä   ræ   rè   rë   rí   rï   rñ   rô   rö   rµ   rú   rü   rÿ   r  r  r  r  r	  r  r  r  r  r  r  r  r  r  r  r   r"  r$  r&  r(  r*  r,  r.  r0  r3  r6  r9  r;  r>  rV   rW   rX   rO   rO   g   sH  „ ñ7ð| (,Ø(,ñàðð ð	ð
 %ðð &ðð 
óð. ØBCô Ió ðIð8 ð
 "#Ø'+Ø(,ñ
àð
ð ð	
ð
 %ð
ð &ð
ð 
ò
ó ð
ð" ð
 "#Ø'+Ø(,ñ/
à"ð/
ð ð	/
ð
 %ð/
ð &ð/
ð 
ò/
ó ð/
ðb àBCñ%>Ø$ð%>Ø:?ð%>à	ò%>ó ð%>ðR -1Ø $ðAà)ðAð ðAð 
ó	AóF6ð& .2õ /ó.ð: ò
ó ð
ð ò
"ó ð
"ð ò!ó ð!ð ò'ó ð'ð ò ó ð ð ò,ó ð,ð ò"ó ð"ð ò%ó ð%ð ò'ó ð'ð ò#ó ð#ð òó ðð ò'ó ð'ð ò"ó ð"ð  ò$ó ð$ð ò%ó ð%ð ò)ó ð)ð ò"ó ð"ð ò ó ð ð ò$ó ð$ð ò#ó ð#ð ò(ó ð(ð ò#ó ð#ð ò!ó ð!ð òó ðð òó ðð ò ó ð ð ò#ó ð#ð ò!ó ð!ð ò&ó ð&ð ò&ó ð&ð ò'ó ð'ð ò ó ð ð ò(ó ð(ð ò$ó ð$ð ò!ó ð!ð ò$ó ð$ð ò"ó ð"ð ò!ó ð!ð ò ó ð ð òó ðð& òó ðð ò$ó ð$ð ò%ó ð%ð ò%ó ð%ð ò ó ð ð ò ó ð ð ò!ó ð!ð ò"ó ð"óóóó,ô2rW   rO   )iÚ
__future__r   r~   Útempfileru   rŠ   Úpathlibr   Útypingr   r   Úunittest.mockr   Úurllibr   Ú)streamlit.components.v2.component_managerr	   Ústreamlit.runtimer
   Ú5streamlit.runtime.caching.storage.dummy_cache_storager   Ú$streamlit.runtime.media_file_managerr   Ú+streamlit.runtime.memory_media_file_storager   Ústreamlit.runtime.pages_managerr   Ú+streamlit.runtime.scriptrunner.script_cacher   Ústreamlit.runtime.secretsr   Ústreamlit.runtime.state.commonr   Ú*streamlit.runtime.state.safe_session_stater   Ú%streamlit.runtime.state.session_stater   Ústreamlit.source_utilr   Ú!streamlit.testing.v1.element_treer   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   Ú(streamlit.testing.v1.local_script_runnerrG   Ústreamlit.testing.v1.utilrH   Ústreamlit.utilrI   Úcollections.abcrJ   rK   rL   Ú streamlit.proto.WidgetStates_pb2rM   ÚTemporaryDirectoryrs   rO   rV   rW   rX   ú<module>re     sÁ   ðõ #ã Û Û Û Ý ß %Ý #Ý å JÝ %õõ BÝ NÝ 8Ý CÝ -Ý 6Ý GÝ >Ý 4÷3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3÷ 3õh GÝ :Ý $áß<Ñ<å=à
%ˆ(×
%Ñ
%Ó
'€÷rò rrW   