
    gAz                       U d dl mZ d dlZd dlZ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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( e	rd dlm)Z) d dl*mZ+ d dl,m-Z- ee.ee/ej`                  ejb                  ejd                  ddf   Z3de4d<   ee.ee/ej`                  e5e.ee.ee/ej`                  f   f   df   Z6de4d<   ee7e8ee.f   Z9de4d<   dZ:de4d<    G d d      Z;dZ<de4d <   d)d!Z=	 	 	 	 	 	 	 	 	 	 d*d"Z>	 	 	 	 	 	 	 	 d+	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d,d#Z?	 	 	 	 	 	 d-d$Z@d.d%ZAd/d&ZBd0d'ZC	 	 	 	 	 	 	 d1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d2d(ZDy)3    )annotationsN)	timedelta)Path)TYPE_CHECKINGFinalUnioncast)	TypeAlias)runtime	type_utilurl_util)current_form_id)process_subtitle_data)compute_and_register_element_id)StreamlitAPIException)Audio)Video)caching)gather_metrics)time_to_seconds)
NumpyShape)Any)typing)DeltaGeneratornpt.NDArray[Any]r
   	MediaDataSubtitleData	MediaTimea   Failed to convert '{param_name}' to a timedelta. Please use a string in a format supported by [Pandas Timedelta constructor](https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html), e.g. `"10s"`, `"15 seconds"`, or `"1h23s"`. Got: {param_value}r   TIMEDELTA_PARSE_ERROR_MESSAGEc                      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d       Zedd	       Zy)
MediaMixinaudioNF)sample_rateend_timeloopautoplayc               x   t        ||      \  }}t               }t        j                  |d      }	|	r|t	        d      |	s|| j
                  j                  d       | j
                  j                         }
t        |
||||||||t        | j
                        
       | j
                  j                  d|      S )a  Display an audio player.

        Parameters
        ----------
        data : str, Path, bytes, BytesIO, numpy.ndarray, or file
            The audio to play. This can be one of the following:

            - A URL (string) for a hosted audio file.
            - A path to a local audio file. The path can be a ``str``
              or ``Path`` object. Paths can be absolute or relative to the
              working directory (where you execute ``streamlit run``).
            - Raw audio data. Raw data formats must include all necessary file
              headers to match the file format specified via ``format``.

            If ``data`` is a NumPy array, it must either be a 1D array of the
            waveform or a 2D array of shape (C, S) where C is the number of
            channels and S is the number of samples. See the default channel
            order at
            http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx

        format : str
            The MIME type for the audio file. This defaults to ``"audio/wav"``.
            For more information, see https://tools.ietf.org/html/rfc4281.

        start_time: int, float, timedelta, str, or None
            The time from which the element should start playing. This can be
            one of the following:

            - ``None`` (default): The element plays from the beginning.
            - An ``int`` or ``float`` specifying the time in seconds. ``float``
              values are rounded down to whole seconds.
            - A string specifying the time in a format supported by `Pandas'
              Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
              e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
            - A ``timedelta`` object from `Python's built-in datetime library
              <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
              e.g. ``timedelta(seconds=70)``.
        sample_rate: int or None
            The sample rate of the audio data in samples per second. This is
            only required if ``data`` is a NumPy array.
        end_time: int, float, timedelta, str, or None
            The time at which the element should stop playing. This can be
            one of the following:

            - ``None`` (default): The element plays through to the end.
            - An ``int`` or ``float`` specifying the time in seconds. ``float``
              values are rounded down to whole seconds.
            - A string specifying the time in a format supported by `Pandas'
              Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
              e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
            - A ``timedelta`` object from `Python's built-in datetime library
              <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
              e.g. ``timedelta(seconds=70)``.
        loop: bool
            Whether the audio should loop playback.
        autoplay: bool
            Whether the audio file should start playing automatically. This is
            ``False`` by default. Browsers will not autoplay audio files if the
            user has not interacted with the page by clicking somewhere.

        Examples
        --------
        To display an audio player for a local file, specify the file's string
        path and format.

        >>> import streamlit as st
        >>>
        >>> st.audio("cat-purr.mp3", format="audio/mpeg", loop=True)

        .. output::
           https://doc-audio-purr.streamlit.app/
           height: 250px

        You can also pass ``bytes`` or ``numpy.ndarray`` objects to ``st.audio``.

        >>> import streamlit as st
        >>> import numpy as np
        >>>
        >>> audio_file = open("myaudio.ogg", "rb")
        >>> audio_bytes = audio_file.read()
        >>>
        >>> st.audio(audio_bytes, format="audio/ogg")
        >>>
        >>> sample_rate = 44100  # 44100 samples per second
        >>> seconds = 2  # Note duration of 2 seconds
        >>> frequency_la = 440  # Our played note will be 440 Hz
        >>> # Generate array with seconds*sample_rate steps, ranging between 0 and seconds
        >>> t = np.linspace(0, seconds, seconds * sample_rate, False)
        >>> # Generate a 440 Hz sine wave
        >>> note_la = np.sin(frequency_la * t * 2 * np.pi)
        >>>
        >>> st.audio(note_la, sample_rate=sample_rate)

        .. output::
           https://doc-audio.streamlit.app/
           height: 865px

        numpy.ndarrayz=`sample_rate` must be specified when `data` is a numpy array.zGWarning: `sample_rate` will be ignored since data is not a numpy array.form_idr"   )_parse_start_time_end_time
AudioProtor   is_typer   dgwarning_get_delta_path_strmarshall_audior   _enqueue)selfdataformat
start_timer#   r$   r%   r&   audio_protois_data_numpy_arraycoordinatess              M/var/www/openai/venv/lib/python3.12/site-packages/streamlit/elements/media.pyr"   zMediaMixin.audioH   s    \  :*hO
H l'//oF;#6'O  #{'>GGOO gg113#DGG,	
 ww55    video)	subtitlesr$   r%   r&   mutedc                   t        ||      \  }}t               }	| j                  j                         }
t	        |
|	||||||||t        | j                               | j                  j                  d|	      S )a%  Display a video player.

        Parameters
        ----------
        data : str, Path, bytes, io.BytesIO, numpy.ndarray, or file
            The video to play. This can be one of the following:

            - A URL (string) for a hosted video file, including YouTube URLs.
            - A path to a local video file. The path can be a ``str``
              or ``Path`` object. Paths can be absolute or relative to the
              working directory (where you execute ``streamlit run``).
            - Raw video data. Raw data formats must include all necessary file
              headers to match the file format specified via ``format``.

        format : str
            The MIME type for the video file. This defaults to ``"video/mp4"``.
            For more information, see https://tools.ietf.org/html/rfc4281.

        start_time: int, float, timedelta, str, or None
            The time from which the element should start playing. This can be
            one of the following:

            - ``None`` (default): The element plays from the beginning.
            - An ``int`` or ``float`` specifying the time in seconds. ``float``
              values are rounded down to whole seconds.
            - A string specifying the time in a format supported by `Pandas'
              Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
              e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
            - A ``timedelta`` object from `Python's built-in datetime library
              <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
              e.g. ``timedelta(seconds=70)``.
        subtitles: str, bytes, Path, io.BytesIO, or dict
            Optional subtitle data for the video, supporting several input types:

            - ``None`` (default): No subtitles.

            - A string, bytes, or Path: File path to a subtitle file in
              ``.vtt`` or ``.srt`` formats, or the raw content of subtitles
              conforming to these formats. Paths can be absolute or relative to
              the working directory (where you execute ``streamlit run``).
              If providing raw content, the string must adhere to the WebVTT or
              SRT format specifications.

            - io.BytesIO: A BytesIO stream that contains valid ``.vtt`` or ``.srt``
              formatted subtitle data.

            - A dictionary: Pairs of labels and file paths or raw subtitle content in
              ``.vtt`` or ``.srt`` formats to enable multiple subtitle tracks.
              The label will be shown in the video player. Example:
              ``{"English": "path/to/english.vtt", "French": "path/to/french.srt"}``

            When provided, subtitles are displayed by default. For multiple
            tracks, the first one is displayed by default. If you don't want any
            subtitles displayed by default, use an empty string for the value
            in a dictrionary's first pair: ``{"None": "", "English": "path/to/english.vtt"}``

            Not supported for YouTube videos.
        end_time: int, float, timedelta, str, or None
            The time at which the element should stop playing. This can be
            one of the following:

            - ``None`` (default): The element plays through to the end.
            - An ``int`` or ``float`` specifying the time in seconds. ``float``
              values are rounded down to whole seconds.
            - A string specifying the time in a format supported by `Pandas'
              Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
              e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
            - A ``timedelta`` object from `Python's built-in datetime library
              <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
              e.g. ``timedelta(seconds=70)``.
        loop: bool
            Whether the video should loop playback.
        autoplay: bool
            Whether the video should start playing automatically. This is
            ``False`` by default. Browsers will not autoplay unmuted videos
            if the user has not interacted with the page by clicking somewhere.
            To enable autoplay without user interaction, you must also set
            ``muted=True``.
        muted: bool
            Whether the video should play with the audio silenced. This is
            ``False`` by default. Use this in conjunction with ``autoplay=True``
            to enable autoplay without user interaction.

        Example
        -------
        >>> import streamlit as st
        >>>
        >>> video_file = open("myvideo.mp4", "rb")
        >>> video_bytes = video_file.read()
        >>>
        >>> st.video(video_bytes)

        .. output::
           https://doc-video.streamlit.app/
           height: 700px

        When you include subtitles, they will be turned on by default. A viewer
        can turn off the subtitles (or captions) from the browser's default video
        control menu, usually located in the lower-right corner of the video.

        Here is a simple VTT file (``subtitles.vtt``):

        >>> WEBVTT
        >>>
        >>> 0:00:01.000 --> 0:00:02.000
        >>> Look!
        >>>
        >>> 0:00:03.000 --> 0:00:05.000
        >>> Look at the pretty stars!

        If the above VTT file lives in the same directory as your app, you can
        add subtitles like so:

        >>> import streamlit as st
        >>>
        >>> VIDEO_URL = "https://example.com/not-youtube.mp4"
        >>> st.video(VIDEO_URL, subtitles="subtitles.vtt")

        .. output::
           https://doc-video-subtitles.streamlit.app/
           height: 700px

        See additional examples of supported subtitle input types in our
        `video subtitles feature demo <https://doc-video-subtitle-inputs.streamlit.app/>`_.

        .. note::
           Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV), as this codec is
           not widely supported by browsers. Converting your video to H.264 will allow the video to be displayed in Streamlit.
           See this `StackOverflow post <https://stackoverflow.com/a/49535220/2394542>`_ or this
           `Streamlit forum post <https://discuss.streamlit.io/t/st-video-doesnt-show-opencv-generated-mp4/3193/2>`_
           for more information.

        r)   r<   )r+   
VideoProtor.   r0   marshall_videor   r2   )r3   r4   r5   r6   r=   r$   r%   r&   r>   video_protor9   s              r:   r<   zMediaMixin.video   sz    d  :*hO
H lgg113#DGG,	
 ww55r;   c                    t        d|       S )zGet our DeltaGenerator.r   )r	   )r3   s    r:   r.   zMediaMixin.dgy  s     $d++r;   )	audio/wavr   )r4   r   r5   strr6   r   r#   
int | Noner$   MediaTime | Noner%   boolr&   rH   returnr   )	video/mp4r   )r4   r   r5   rE   r6   r   r=   r   r$   rG   r%   rH   r&   rH   r>   rH   rI   r   )rI   r   )__name__
__module____qualname__r   r"   r<   propertyr.    r;   r:   r!   r!   G   s>   G " !	I6 #'%)I6I6 I6 	I6  I6 #I6 I6 I6 
I6 I6V G " !	b6 #'%)b6b6 b6 	b6  b6 #b6 b6 b6 b6 
b6 b6H , ,r;   r!   a  ^((https?://(?:www\.)?(?:m\.)?youtube\.com))/((?:oembed\?url=https?%3A//(?:www\.)youtube.com/watch\?(?:v%3D)(?P<video_id_1>[\w\-]{10,20})&format=json)|(?:attribution_link\?a=.*watch(?:%3Fv%3D|%3Fv%3D)(?P<video_id_2>[\w\-]{10,20}))(?:%26feature.*))|(https?:)?(\/\/)?((www\.|m\.)?youtube(-nocookie)?\.com\/((watch)?\?(app=desktop&)?(feature=\w*&)?v=|embed\/|v\/|e\/)|youtu\.be\/)(?P<video_id_3>[\w\-]{10,20})
YOUTUBE_REc                    t        j                  t        |       }|r<|j                  d      xs$ |j                  d      xs |j                  d      }d| S y)a  Return whether URL is any kind of YouTube embed or watch link.  If so,
    reshape URL into an embed link suitable for use in an iframe.

    If not a YouTube URL, return None.

    Parameters
    ----------
        url : str

    Example
    -------
    >>> print(_reshape_youtube_url("https://youtu.be/_T8LGqJtuGc"))

    .. output::
        https://www.youtube.com/embed/_T8LGqJtuGc
    
video_id_1
video_id_2
video_id_3zhttps://www.youtube.com/embed/N)rematchrP   group)urlrV   codes      r:   _reshape_youtube_urlrZ     s\    " HHZ%EKK% ){{<(){{<( 	
 0v66r;   c                   |yt        |t        t        f      r|}nt        |t              rt        |      }nt        |t        j
                        r"|j                  d       |j                         }nt        |t        j                        st        |t        j                        r'|j                  d       |j                         }|y|}n>t        j                  |d      r|j                         }nt        dt        |      z        t!        j"                         rNt!        j$                         j&                  j)                  |||       }t+        j,                  |||        ||_        yd}||_        y)a  Fill audio or video proto based on contents of data.

    Given a string, check if it's a url; if so, send it out without modification.
    Otherwise assume strings are filenames and let any OS errors raise.

    Load data either from file or through bytes-processing methods into a
    MediaFile object.  Pack proto with generated Tornado-based URL.

    (When running in "raw" mode, we won't actually load data into the
    MediaFileManager, and we'll return an empty URL.)
    Nr   r(   zInvalid binary data format: %s )
isinstancerE   bytesr   ioBytesIOseekgetvalue	RawIOBaseBufferedReaderreadr   r-   tobytesRuntimeErrortyper   existsget_instancemedia_file_mgraddr   save_media_datarX   )r9   protor4   mimetypedata_or_filename	read_datafile_urls          r:   _marshall_av_mediars     s*   & | $e%	D$	t9	D"**	%		!==?	D",,	':dB<M<M+N		!IIK	(			4	1<<>;d4jHII~~'')88<<h
 	 0(KH
 EI EIr;   c                ,   |dk  s|||k  rt        d      ||_        |	|_        |||_        ||_        t
        j                  j                  |_        t        |t              rt        |      }t        |t              r_t        j                  |d      rHt        |      x}r3||_        t
        j                  j                   |_        |r!t        d      ||_        nt#        | |||       |rg }t        |t        t$        t&        j(                  t        f      r|j+                  d|f       nHt        |t,              r |j/                  |j1                                nt        dt        |       d	      |D ]E  \  }}|j2                  j5                         }|xs d
|_        |  d| d}	 t9        |||      |_        G |r,||_        tA        dd|
|j                  ||||||	
      |_!        yy# t:        t<        f$ r}t        d|       |d}~ww xY w)a	  Marshalls a video proto, using url processors as needed.

    Parameters
    ----------
    coordinates : str
    proto : the proto to fill. Must have a string field called "data".
    data : str, Path, bytes, BytesIO, numpy.ndarray, or file opened with
           io.open().
        Raw video data or a string with a URL pointing to the video
        to load. Includes support for YouTube URLs.
        If passing the raw data, this must include headers and any other
        bytes required in the actual file.
    mimetype : str
        The mime type for the video file. Defaults to 'video/mp4'.
        See https://tools.ietf.org/html/rfc4281 for more info.
    start_time : int
        The time from which this element should start playing. (default: 0)
    subtitles: str, dict, or io.BytesIO
        Optional subtitle data for the video, supporting several input types:
        - None (default): No subtitles.
        - A string: File path to a subtitle file in '.vtt' or '.srt' formats, or the raw content of subtitles conforming to these formats.
            If providing raw content, the string must adhere to the WebVTT or SRT format specifications.
        - A dictionary: Pairs of labels and file paths or raw subtitle content in '.vtt' or '.srt' formats.
            Enables multiple subtitle tracks. The label will be shown in the video player.
            Example: {'English': 'path/to/english.vtt', 'French': 'path/to/french.srt'}
        - io.BytesIO: A BytesIO stream that contains valid '.vtt' or '.srt' formatted subtitle data.
        When provided, subtitles are displayed by default. For multiple tracks, the first one is displayed by default.
        Not supported for YouTube videos.
    end_time: int
            The time at which this element should stop playing
    loop: bool
        Whether the video should loop playback.
    autoplay: bool
        Whether the video should start playing automatically.
        Browsers will not autoplay video files if the user has not interacted with
        the page yet, for example by clicking on the page while it loads.
        To enable autoplay without user interaction, you can set muted=True.
        Defaults to False.
    muted: bool
        Whether the video should play with the audio silenced. This can be used to
        enable autoplay without user interaction. Defaults to False.
    form_id: str | None
        The ID of the form that this element is placed in. Provide None if
        the element is not placed in a form.
    r   Nz,Invalid start_time and end_time combination.httphttpsr4   allowed_schemasz/Subtitles are not supported for YouTube videos.defaultz%Unsupported data type for subtitles: z/. Only str (file paths) and dict are supported.r\   z	[subtitle]z)Failed to process the provided subtitle: r<   )	user_keyr*   rX   ro   r6   r$   r%   r&   r>   )"r   r6   r>   r$   r%   r@   TypeNATIVErh   r]   r   rE   r   is_urlrZ   rX   YOUTUBE_IFRAMErs   r^   r_   r`   appenddictextenditemsr=   rl   labelr   	TypeError
ValueErrorr&   r   id)r9   rn   r4   ro   r6   r=   r$   r%   r&   r>   r*   youtube_urlsubtitle_itemsr   subtitle_datasubsubtitle_coordinatesoriginal_errs                     r:   rA   rA     s    v A~(.8z3I#$RSS!EEK!EJ ''EJ$4y$7" /t44;4#EI#77EJ+E  EI;tX>LN i#ubjj$!?@!!9i"89	4(!!)//"34'7Y7H I@ A 
 %3 E=//%%'CCI '2])E7!#D $/(- %3& !2		!
  z* $+?wG#$$s   -G00H?HHc                N   	 t        | d      }|t        t        |      } 	 t        |d      }|t        |      }| |fS # t        t        f$ r$ t        j                  d|       }t        |      dw xY w# t        $ r$ t        j                  d|      }t        |      dw xY w)z5Parse start_time and end_time and return them as int.F)coerce_none_to_infNr6   )
param_nameparam_valuer$   )r   r   intr   r   r5   )r6   r$   maybe_start_time	error_msgs       r:   r+   r+   f  s    
	9*:%P#)*
9"8F8}H x! ":. 9188# 9 
	 $I.D8	9 ! 9188!x 9 
	 $I.D8	9s    A A7 3A47-B$c                B   ddl }|j                  | t              }t        t	        t
        |j                              dk(  rd}nMt        |j                        dk(  r*|j                  d   }|j                  j                         }nt        d      |j                  dk(  r+|j                  |j                        j                         |fS |j                  |j                  |            }||z  dz  }|j                  |j                        }|j                         |fS )a  Validates and normalizes numpy array data.
    We validate numpy array shape (should be 1d or 2d)
    We normalize input data to int16 [-32768, 32767] range.

    Parameters
    ----------
    data : numpy array
        numpy array to be validated and normalized

    Returns
    -------
    Tuple of (bytes, int)
        (bytes, nchan)
        where
         - bytes : bytes of normalized numpy array converted to int16
         - nchan : number of channels for audio signal. 1 for mono, or 2 for stereo.
    r   N)dtype      z1Numpy array audio input must be a 1D or 2D array.i  )numpyarrayfloatlenr	   r   shapeTravelr   sizeastypeint16rf   maxabs)r4   nptransformed_datanchanmax_abs_valuenp_arrayscaled_datas          r:   _validate_and_normalizer     s   ( )+$e)D
4
,22349	##	$	)
 !&&q)+--335#$WXX!&&rxx088:EAAFF266"234M
 !=0E9H//"((+K %''r;   c                   ddl }t        |       \  }}t        j                         5 }|j	                  |d      5 }|j                  |       |j                  |       |j                  d       |j                  dd       |j                  |       |j                         cddd       cddd       S # 1 sw Y   nxY wddd       y# 1 sw Y   yxY w)z
    Transform a numpy array to a PCM bytestring
    We use code from IPython display module to convert numpy array to wave bytes
    https://github.com/ipython/ipython/blob/1015c392f3d50cf4ff3e9f29beede8c1abfdcb2a/IPython/lib/display.py#L146
    r   Nwb)moder   NONE)waver   r_   r`   opensetnchannelssetframeratesetsampwidthsetcomptypewriteframesrb   )r4   r#   r   scaledr   fpwaveobjs          r:   	_make_wavr     s     +D1MFE	TYYrY5U#[)QFF+F#{{} 6555s#   C	A&B4!	C	4B=	9C		Cc                b    t        j                  | d      r|t        t        d|       |      } | S )z:Convert data to wav bytes if the data type is numpy array.r(   r   )r   r-   r   r	   )r4   r#   s     r:   _maybe_convert_to_wav_bytesr     s0    /K4K0$7EKr;   c
                V   ||_         |||_        ||_        t        |t              rt        |      }t        |t
              rt        j                  |d      r||_        nt        ||      }t        | |||       |r,||_        t        dd|	|j                  ||||||
      |_        yy)a  Marshalls an audio proto, using data and url processors as needed.

    Parameters
    ----------
    coordinates : str
    proto : The proto to fill. Must have a string field called "url".
    data : str, Path, bytes, BytesIO, numpy.ndarray, or file opened with
            io.open()
        Raw audio data or a string with a URL pointing to the file to load.
        If passing the raw data, this must include headers and any other bytes
        required in the actual file.
    mimetype : str
        The mime type for the audio file. Defaults to "audio/wav".
        See https://tools.ietf.org/html/rfc4281 for more info.
    start_time : int
        The time from which this element should start playing. (default: 0)
    sample_rate: int or None
        Optional param to provide sample_rate in case of numpy array
    end_time: int
        The time at which this element should stop playing
    loop: bool
        Whether the audio should loop playback.
    autoplay : bool
        Whether the audio should start playing automatically.
        Browsers will not autoplay audio files if the user has not interacted with the page yet.
    form_id: str | None
        The ID of the form that this element is placed in. Provide None if
        the element is not placed in a form.
    Nru   rx   r"   )	r|   r*   rX   ro   r6   r#   r$   r%   r&   )r6   r$   r%   r]   r   rE   r   r   rX   r   rs   r&   r   r   )
r9   rn   r4   ro   r6   r#   r$   r%   r&   r*   s
             r:   r1   r1     s    T "E!EJ$4y$7" 	*4=;tX>!2		!#
 r;   )rX   rE   rI   
str | None)
r9   rE   rn   zAudioProto | VideoProtor4   r   ro   rE   rI   None)rJ   r   NNFFFN)r9   rE   rn   r@   r4   r   ro   rE   r6   r   r=   r   r$   rF   r%   rH   r&   rH   r>   rH   r*   r   rI   r   )r6   r   r$   rG   rI   ztuple[int, int | None])r4   r   rI   ztuple[bytes, int])r4   r   r#   r   rI   r^   )r4   r   r#   rF   rI   r   )rD   r   NNFFN)r9   rE   rn   r,   r4   r   ro   rE   r6   r   r#   rF   r$   rF   r%   rH   r&   rH   r*   r   rI   r   )E
__future__r   r_   rU   datetimer   pathlibr   r   r   r   r   r	   typing_extensionsr
   	streamlitr   r   r   !streamlit.elements.lib.form_utilsr   %streamlit.elements.lib.subtitle_utilsr   streamlit.elements.lib.utilsr   streamlit.errorsr   streamlit.proto.Audio_pb2r   r,   streamlit.proto.Video_pb2r   r@   streamlit.runtimer   streamlit.runtime.metrics_utilr   streamlit.time_utilr   streamlit.type_utilr   r   r   nptstreamlit.delta_generatorr   rE   r^   r`   rc   rd   r   __annotations__r   r   r   r   r   r   r!   rP   rZ   rs   rA   r+   r   r   r   r1   rO   r;   r:   <module>r      s   # 	 	   4 4 ' 2 2 = G H 2 9 9 % 9 / *#8 	JJLL
		9 	  ubjj$sE#tUBJJ2N,O'O"PRVVi  S%C78	9 8E u u, u,v	 n
E  n855"5 5 	5
 
5x  "J
J
J
 J
 	J

 J
 J
 J
 J
 J
 J
 J
 
J
Z  %5  :.(b*  "G
G
G
 G
 	G

 G
 G
 G
 G
 G
 G
 
G
r;   