streamlit-nightly 1.37.2.dev20240818__py2.py3-none-any.whl → 1.37.2.dev20240819__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. streamlit/dataframe_util.py +70 -71
  2. streamlit/elements/lib/built_in_chart_utils.py +1 -1
  3. streamlit/elements/lib/options_selector_utils.py +3 -3
  4. streamlit/elements/widgets/radio.py +2 -2
  5. streamlit/elements/widgets/select_slider.py +2 -2
  6. streamlit/elements/widgets/selectbox.py +2 -2
  7. streamlit/static/asset-manifest.json +7 -7
  8. streamlit/static/index.html +1 -1
  9. streamlit/static/static/js/1307.74a443f7.chunk.js +1 -0
  10. streamlit/static/static/js/3599.eaeac234.chunk.js +5 -0
  11. streamlit/static/static/js/6013.fb4531df.chunk.js +5 -0
  12. streamlit/static/static/js/7175.70728640.chunk.js +5 -0
  13. streamlit/static/static/js/8691.93a29403.chunk.js +5 -0
  14. streamlit/static/static/js/main.8c6fc86e.js +28 -0
  15. {streamlit_nightly-1.37.2.dev20240818.dist-info → streamlit_nightly-1.37.2.dev20240819.dist-info}/METADATA +1 -1
  16. {streamlit_nightly-1.37.2.dev20240818.dist-info → streamlit_nightly-1.37.2.dev20240819.dist-info}/RECORD +21 -21
  17. {streamlit_nightly-1.37.2.dev20240818.dist-info → streamlit_nightly-1.37.2.dev20240819.dist-info}/WHEEL +1 -1
  18. streamlit/static/static/js/1307.5225662c.chunk.js +0 -1
  19. streamlit/static/static/js/3599.17480cdf.chunk.js +0 -5
  20. streamlit/static/static/js/6013.fc3867be.chunk.js +0 -5
  21. streamlit/static/static/js/7175.ed4a2f0d.chunk.js +0 -5
  22. streamlit/static/static/js/8691.885f6268.chunk.js +0 -5
  23. streamlit/static/static/js/main.90c4efd0.js +0 -28
  24. /streamlit/static/static/js/{main.90c4efd0.js.LICENSE.txt → main.8c6fc86e.js.LICENSE.txt} +0 -0
  25. {streamlit_nightly-1.37.2.dev20240818.data → streamlit_nightly-1.37.2.dev20240819.data}/scripts/streamlit.cmd +0 -0
  26. {streamlit_nightly-1.37.2.dev20240818.dist-info → streamlit_nightly-1.37.2.dev20240819.dist-info}/entry_points.txt +0 -0
  27. {streamlit_nightly-1.37.2.dev20240818.dist-info → streamlit_nightly-1.37.2.dev20240819.dist-info}/top_level.txt +0 -0
@@ -70,29 +70,30 @@ _LOGGER: Final = logger.get_logger(__name__)
70
70
  _MAX_UNEVALUATED_DF_ROWS = 10000
71
71
 
72
72
  _PANDAS_DATA_OBJECT_TYPE_RE: Final = re.compile(r"^pandas.*$")
73
- _PANDAS_STYLER_TYPE_STR: Final = "pandas.io.formats.style.Styler"
74
- _XARRAY_DATA_ARRAY_TYPE_STR: Final = "xarray.core.dataarray.DataArray"
75
- _XARRAY_DATASET_TYPE_STR: Final = "xarray.core.dataset.Dataset"
76
- _SNOWPARK_DF_TYPE_STR: Final = "snowflake.snowpark.dataframe.DataFrame"
77
- _SNOWPARK_DF_ROW_TYPE_STR: Final = "snowflake.snowpark.row.Row"
78
- _SNOWPARK_TABLE_TYPE_STR: Final = "snowflake.snowpark.table.Table"
79
- _PYSPARK_DF_TYPE_STR: Final = "pyspark.sql.dataframe.DataFrame"
73
+
74
+ _DASK_DATAFRAME: Final = "dask.dataframe.core.DataFrame"
75
+ _DASK_INDEX: Final = "dask.dataframe.core.Index"
76
+ _DASK_SERIES: Final = "dask.dataframe.core.Series"
77
+ _DUCKDB_RELATION: Final = "duckdb.duckdb.DuckDBPyRelation"
80
78
  _MODIN_DF_TYPE_STR: Final = "modin.pandas.dataframe.DataFrame"
81
79
  _MODIN_SERIES_TYPE_STR: Final = "modin.pandas.series.Series"
80
+ _PANDAS_STYLER_TYPE_STR: Final = "pandas.io.formats.style.Styler"
81
+ _POLARS_DATAFRAME: Final = "polars.dataframe.frame.DataFrame"
82
+ _POLARS_LAZYFRAME: Final = "polars.lazyframe.frame.LazyFrame"
83
+ _POLARS_SERIES: Final = "polars.series.series.Series"
84
+ _PYSPARK_DF_TYPE_STR: Final = "pyspark.sql.dataframe.DataFrame"
85
+ _RAY_DATASET: Final = "ray.data.dataset.Dataset"
86
+ _RAY_MATERIALIZED_DATASET: Final = "ray.data.dataset.MaterializedDataset"
82
87
  _SNOWPANDAS_DF_TYPE_STR: Final = "snowflake.snowpark.modin.pandas.dataframe.DataFrame"
83
- _SNOWPANDAS_SERIES_TYPE_STR: Final = "snowflake.snowpark.modin.pandas.series.Series"
84
88
  _SNOWPANDAS_INDEX_TYPE_STR: Final = (
85
89
  "snowflake.snowpark.modin.plugin.extensions.index.Index"
86
90
  )
87
- _POLARS_DATAFRAME: Final = "polars.dataframe.frame.DataFrame"
88
- _POLARS_SERIES: Final = "polars.series.series.Series"
89
- _POLARS_LAZYFRAME: Final = "polars.lazyframe.frame.LazyFrame"
90
- _DASK_DATAFRAME: Final = "dask.dataframe.core.DataFrame"
91
- _DASK_SERIES: Final = "dask.dataframe.core.Series"
92
- _DASK_INDEX: Final = "dask.dataframe.core.Index"
93
- _RAY_MATERIALIZED_DATASET: Final = "ray.data.dataset.MaterializedDataset"
94
- _RAY_DATASET: Final = "ray.data.dataset.Dataset"
95
- _DUCKDB_RELATION: Final = "duckdb.duckdb.DuckDBPyRelation"
91
+ _SNOWPANDAS_SERIES_TYPE_STR: Final = "snowflake.snowpark.modin.pandas.series.Series"
92
+ _SNOWPARK_DF_ROW_TYPE_STR: Final = "snowflake.snowpark.row.Row"
93
+ _SNOWPARK_DF_TYPE_STR: Final = "snowflake.snowpark.dataframe.DataFrame"
94
+ _SNOWPARK_TABLE_TYPE_STR: Final = "snowflake.snowpark.table.Table"
95
+ _XARRAY_DATASET_TYPE_STR: Final = "xarray.core.dataset.Dataset"
96
+ _XARRAY_DATA_ARRAY_TYPE_STR: Final = "xarray.core.dataarray.DataArray"
96
97
 
97
98
  V_co = TypeVar(
98
99
  "V_co",
@@ -195,37 +196,38 @@ class DataFormat(Enum):
195
196
 
196
197
  UNKNOWN = auto()
197
198
  EMPTY = auto() # None
198
- PANDAS_DATAFRAME = auto() # pd.DataFrame
199
- PANDAS_SERIES = auto() # pd.Series
200
- PANDAS_INDEX = auto() # pd.Index
201
- PANDAS_ARRAY = auto() # pd.array
199
+
200
+ COLUMN_INDEX_MAPPING = auto() # {column: {index: value}}
201
+ COLUMN_SERIES_MAPPING = auto() # {column: Series(values)}
202
+ COLUMN_VALUE_MAPPING = auto() # {column: List[values]}
203
+ DASK_OBJECT = auto() # dask.dataframe.core.DataFrame, Series, Index
204
+ DBAPI_CURSOR = auto() # DBAPI Cursor (PEP 249)
205
+ DUCKDB_RELATION = auto() # DuckDB Relation
206
+ KEY_VALUE_DICT = auto() # {index: value}
207
+ LIST_OF_RECORDS = auto() # List[Dict[str, Scalar]]
208
+ LIST_OF_ROWS = auto() # List[List[Scalar]]
209
+ LIST_OF_VALUES = auto() # List[Scalar]
210
+ MODIN_OBJECT = auto() # Modin DataFrame, Series
202
211
  NUMPY_LIST = auto() # np.array[Scalar]
203
212
  NUMPY_MATRIX = auto() # np.array[List[Scalar]]
204
- PYARROW_TABLE = auto() # pyarrow.Table
205
- PYARROW_ARRAY = auto() # pyarrow.Array
206
- SNOWPARK_OBJECT = auto() # Snowpark DataFrame, Table, List[Row]
207
- PYSPARK_OBJECT = auto() # pyspark.DataFrame
208
- MODIN_OBJECT = auto() # Modin DataFrame, Series
209
- SNOWPANDAS_OBJECT = auto() # Snowpandas DataFrame, Series
213
+ PANDAS_ARRAY = auto() # pd.array
214
+ PANDAS_DATAFRAME = auto() # pd.DataFrame
215
+ PANDAS_INDEX = auto() # pd.Index
216
+ PANDAS_SERIES = auto() # pd.Series
210
217
  PANDAS_STYLER = auto() # pandas Styler
211
218
  POLARS_DATAFRAME = auto() # polars.dataframe.frame.DataFrame
212
219
  POLARS_LAZYFRAME = auto() # polars.lazyframe.frame.LazyFrame
213
220
  POLARS_SERIES = auto() # polars.series.series.Series
214
- XARRAY_DATASET = auto() # xarray.Dataset
215
- XARRAY_DATA_ARRAY = auto() # xarray.DataArray
216
- DASK_OBJECT = auto() # dask.dataframe.core.DataFrame, Series, Index
221
+ PYARROW_ARRAY = auto() # pyarrow.Array
222
+ PYARROW_TABLE = auto() # pyarrow.Table
223
+ PYSPARK_OBJECT = auto() # pyspark.DataFrame
217
224
  RAY_DATASET = auto() # ray.data.dataset.Dataset, MaterializedDataset
218
- LIST_OF_RECORDS = auto() # List[Dict[str, Scalar]]
219
- LIST_OF_ROWS = auto() # List[List[Scalar]]
220
- LIST_OF_VALUES = auto() # List[Scalar]
221
- TUPLE_OF_VALUES = auto() # Tuple[Scalar]
222
225
  SET_OF_VALUES = auto() # Set[Scalar]
223
- COLUMN_INDEX_MAPPING = auto() # {column: {index: value}}
224
- COLUMN_VALUE_MAPPING = auto() # {column: List[values]}
225
- COLUMN_SERIES_MAPPING = auto() # {column: Series(values)}
226
- KEY_VALUE_DICT = auto() # {index: value}
227
- DBAPI_CURSOR = auto() # DBAPI Cursor (PEP 249)
228
- DUCKDB_RELATION = auto() # DuckDB Relation
226
+ SNOWPANDAS_OBJECT = auto() # Snowpandas DataFrame, Series
227
+ SNOWPARK_OBJECT = auto() # Snowpark DataFrame, Table, List[Row]
228
+ TUPLE_OF_VALUES = auto() # Tuple[Scalar]
229
+ XARRAY_DATASET = auto() # xarray.Dataset
230
+ XARRAY_DATA_ARRAY = auto() # xarray.DataArray
229
231
 
230
232
 
231
233
  def is_pyarrow_version_less_than(v: str) -> bool:
@@ -288,30 +290,30 @@ def is_dataframe_like(obj: object) -> bool:
288
290
  # return False early to avoid unnecessary checks.
289
291
  return False
290
292
 
291
- return determine_data_format(obj) in [
293
+ return determine_data_format(obj) in {
294
+ DataFormat.COLUMN_SERIES_MAPPING,
295
+ DataFormat.DASK_OBJECT,
296
+ DataFormat.DBAPI_CURSOR,
297
+ DataFormat.MODIN_OBJECT,
298
+ DataFormat.NUMPY_LIST,
299
+ DataFormat.NUMPY_MATRIX,
300
+ DataFormat.PANDAS_ARRAY,
292
301
  DataFormat.PANDAS_DATAFRAME,
293
- DataFormat.PANDAS_SERIES,
294
302
  DataFormat.PANDAS_INDEX,
303
+ DataFormat.PANDAS_SERIES,
295
304
  DataFormat.PANDAS_STYLER,
296
- DataFormat.PANDAS_ARRAY,
297
- DataFormat.NUMPY_LIST,
298
- DataFormat.NUMPY_MATRIX,
299
- DataFormat.PYARROW_TABLE,
305
+ DataFormat.POLARS_DATAFRAME,
306
+ DataFormat.POLARS_LAZYFRAME,
307
+ DataFormat.POLARS_SERIES,
300
308
  DataFormat.PYARROW_ARRAY,
301
- DataFormat.SNOWPARK_OBJECT,
309
+ DataFormat.PYARROW_TABLE,
302
310
  DataFormat.PYSPARK_OBJECT,
303
- DataFormat.MODIN_OBJECT,
311
+ DataFormat.RAY_DATASET,
304
312
  DataFormat.SNOWPANDAS_OBJECT,
305
- DataFormat.POLARS_SERIES,
306
- DataFormat.POLARS_DATAFRAME,
307
- DataFormat.POLARS_LAZYFRAME,
313
+ DataFormat.SNOWPARK_OBJECT,
308
314
  DataFormat.XARRAY_DATASET,
309
315
  DataFormat.XARRAY_DATA_ARRAY,
310
- DataFormat.DASK_OBJECT,
311
- DataFormat.RAY_DATASET,
312
- DataFormat.COLUMN_SERIES_MAPPING,
313
- DataFormat.DBAPI_CURSOR,
314
- ]
316
+ }
315
317
 
316
318
 
317
319
  def is_unevaluated_data_object(obj: object) -> bool:
@@ -892,7 +894,7 @@ def convert_anything_to_arrow_bytes(
892
894
  return convert_pandas_df_to_arrow_bytes(df)
893
895
 
894
896
 
895
- def convert_anything_to_sequence(obj: OptionSequence[V_co]) -> list[V_co]:
897
+ def convert_anything_to_list(obj: OptionSequence[V_co]) -> list[V_co]:
896
898
  """Try to convert different formats to a list.
897
899
 
898
900
  If the input is a dataframe-like object, we just select the first
@@ -1309,21 +1311,21 @@ def convert_pandas_df_to_data_format(
1309
1311
  The converted dataframe.
1310
1312
  """
1311
1313
 
1312
- if data_format in [
1314
+ if data_format in {
1313
1315
  DataFormat.EMPTY,
1316
+ DataFormat.DASK_OBJECT,
1317
+ DataFormat.DBAPI_CURSOR,
1318
+ DataFormat.DUCKDB_RELATION,
1319
+ DataFormat.MODIN_OBJECT,
1320
+ DataFormat.PANDAS_ARRAY,
1314
1321
  DataFormat.PANDAS_DATAFRAME,
1315
- DataFormat.SNOWPARK_OBJECT,
1316
- DataFormat.PYSPARK_OBJECT,
1317
1322
  DataFormat.PANDAS_INDEX,
1318
1323
  DataFormat.PANDAS_STYLER,
1319
- DataFormat.PANDAS_ARRAY,
1320
- DataFormat.MODIN_OBJECT,
1321
- DataFormat.SNOWPANDAS_OBJECT,
1322
- DataFormat.DASK_OBJECT,
1324
+ DataFormat.PYSPARK_OBJECT,
1323
1325
  DataFormat.RAY_DATASET,
1324
- DataFormat.DBAPI_CURSOR,
1325
- DataFormat.DUCKDB_RELATION,
1326
- ]:
1326
+ DataFormat.SNOWPANDAS_OBJECT,
1327
+ DataFormat.SNOWPARK_OBJECT,
1328
+ }:
1327
1329
  return df
1328
1330
  elif data_format == DataFormat.NUMPY_LIST:
1329
1331
  import numpy as np
@@ -1347,10 +1349,7 @@ def convert_pandas_df_to_data_format(
1347
1349
  return pa.Array.from_pandas(_pandas_df_to_series(df))
1348
1350
  elif data_format == DataFormat.PANDAS_SERIES:
1349
1351
  return _pandas_df_to_series(df)
1350
- elif (
1351
- data_format == DataFormat.POLARS_DATAFRAME
1352
- or data_format == DataFormat.POLARS_LAZYFRAME
1353
- ):
1352
+ elif data_format in {DataFormat.POLARS_DATAFRAME, DataFormat.POLARS_LAZYFRAME}:
1354
1353
  import polars as pl # type: ignore[import-not-found]
1355
1354
 
1356
1355
  return pl.from_pandas(df)
@@ -643,7 +643,7 @@ def _parse_y_columns(
643
643
 
644
644
  else:
645
645
  y_column_list = [
646
- str(col) for col in dataframe_util.convert_anything_to_sequence(y_from_user)
646
+ str(col) for col in dataframe_util.convert_anything_to_list(y_from_user)
647
647
  ]
648
648
 
649
649
  for col in y_column_list:
@@ -19,7 +19,7 @@ from typing import (
19
19
  Sequence,
20
20
  )
21
21
 
22
- from streamlit.dataframe_util import OptionSequence, convert_anything_to_sequence
22
+ from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
23
23
  from streamlit.errors import StreamlitAPIException
24
24
  from streamlit.type_util import (
25
25
  T,
@@ -34,7 +34,7 @@ def check_and_convert_to_indices(
34
34
  if default_values is None:
35
35
  return None
36
36
 
37
- default_values = convert_anything_to_sequence(default_values)
37
+ default_values = convert_anything_to_list(default_values)
38
38
 
39
39
  for value in default_values:
40
40
  if value not in opt:
@@ -47,7 +47,7 @@ def check_and_convert_to_indices(
47
47
 
48
48
 
49
49
  def convert_to_sequence_and_check_comparable(options: OptionSequence[T]) -> Sequence[T]:
50
- indexable_options = convert_anything_to_sequence(options)
50
+ indexable_options = convert_anything_to_list(options)
51
51
  check_python_comparable(indexable_options)
52
52
  return indexable_options
53
53
 
@@ -18,7 +18,7 @@ from dataclasses import dataclass
18
18
  from textwrap import dedent
19
19
  from typing import TYPE_CHECKING, Any, Callable, Generic, Sequence, cast
20
20
 
21
- from streamlit.dataframe_util import OptionSequence, convert_anything_to_sequence
21
+ from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
22
22
  from streamlit.elements.form_utils import current_form_id
23
23
  from streamlit.elements.lib.policies import (
24
24
  check_widget_policies,
@@ -270,7 +270,7 @@ class RadioMixin:
270
270
  )
271
271
  maybe_raise_label_warnings(label, label_visibility)
272
272
 
273
- opt = convert_anything_to_sequence(options)
273
+ opt = convert_anything_to_list(options)
274
274
  check_python_comparable(opt)
275
275
 
276
276
  id = compute_widget_id(
@@ -20,7 +20,7 @@ from typing import TYPE_CHECKING, Any, Callable, Generic, Sequence, Tuple, cast
20
20
 
21
21
  from typing_extensions import TypeGuard
22
22
 
23
- from streamlit.dataframe_util import OptionSequence, convert_anything_to_sequence
23
+ from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
24
24
  from streamlit.elements.form_utils import current_form_id
25
25
  from streamlit.elements.lib.policies import (
26
26
  check_widget_policies,
@@ -287,7 +287,7 @@ class SelectSliderMixin:
287
287
  )
288
288
  maybe_raise_label_warnings(label, label_visibility)
289
289
 
290
- opt = convert_anything_to_sequence(options)
290
+ opt = convert_anything_to_list(options)
291
291
  check_python_comparable(opt)
292
292
 
293
293
  if len(opt) == 0:
@@ -17,7 +17,7 @@ from dataclasses import dataclass
17
17
  from textwrap import dedent
18
18
  from typing import TYPE_CHECKING, Any, Callable, Generic, Sequence, cast, overload
19
19
 
20
- from streamlit.dataframe_util import OptionSequence, convert_anything_to_sequence
20
+ from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
21
21
  from streamlit.elements.form_utils import current_form_id
22
22
  from streamlit.elements.lib.policies import (
23
23
  check_widget_policies,
@@ -281,7 +281,7 @@ class SelectboxMixin:
281
281
  )
282
282
  maybe_raise_label_warnings(label, label_visibility)
283
283
 
284
- opt = convert_anything_to_sequence(options)
284
+ opt = convert_anything_to_list(options)
285
285
  check_python_comparable(opt)
286
286
 
287
287
  id = compute_widget_id(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.5513bd04.css",
4
- "main.js": "./static/js/main.90c4efd0.js",
4
+ "main.js": "./static/js/main.8c6fc86e.js",
5
5
  "static/js/9336.3e046ad7.chunk.js": "./static/js/9336.3e046ad7.chunk.js",
6
6
  "static/js/9330.32e8a53a.chunk.js": "./static/js/9330.32e8a53a.chunk.js",
7
7
  "static/js/2736.3d50ec7f.chunk.js": "./static/js/2736.3d50ec7f.chunk.js",
@@ -15,7 +15,7 @@
15
15
  "static/js/8536.b7b2ef90.chunk.js": "./static/js/8536.b7b2ef90.chunk.js",
16
16
  "static/js/7805.ba32ae70.chunk.js": "./static/js/7805.ba32ae70.chunk.js",
17
17
  "static/js/4500.d884c792.chunk.js": "./static/js/4500.d884c792.chunk.js",
18
- "static/js/1307.5225662c.chunk.js": "./static/js/1307.5225662c.chunk.js",
18
+ "static/js/1307.74a443f7.chunk.js": "./static/js/1307.74a443f7.chunk.js",
19
19
  "static/js/2469.6217c5c3.chunk.js": "./static/js/2469.6217c5c3.chunk.js",
20
20
  "static/js/4113.786b0142.chunk.js": "./static/js/4113.786b0142.chunk.js",
21
21
  "static/js/1168.2a9806f0.chunk.js": "./static/js/1168.2a9806f0.chunk.js",
@@ -24,7 +24,7 @@
24
24
  "static/js/1116.22f8322c.chunk.js": "./static/js/1116.22f8322c.chunk.js",
25
25
  "static/js/3513.577f3dc5.chunk.js": "./static/js/3513.577f3dc5.chunk.js",
26
26
  "static/js/7602.33571c14.chunk.js": "./static/js/7602.33571c14.chunk.js",
27
- "static/js/6013.fc3867be.chunk.js": "./static/js/6013.fc3867be.chunk.js",
27
+ "static/js/6013.fb4531df.chunk.js": "./static/js/6013.fb4531df.chunk.js",
28
28
  "static/js/4335.bc097c4d.chunk.js": "./static/js/4335.bc097c4d.chunk.js",
29
29
  "static/js/4177.e5631c43.chunk.js": "./static/js/4177.e5631c43.chunk.js",
30
30
  "static/js/1451.d93e956f.chunk.js": "./static/js/1451.d93e956f.chunk.js",
@@ -36,10 +36,10 @@
36
36
  "static/js/4319.00adb829.chunk.js": "./static/js/4319.00adb829.chunk.js",
37
37
  "static/js/5106.4c60cfa4.chunk.js": "./static/js/5106.4c60cfa4.chunk.js",
38
38
  "static/js/4666.0e91bb87.chunk.js": "./static/js/4666.0e91bb87.chunk.js",
39
- "static/js/3599.17480cdf.chunk.js": "./static/js/3599.17480cdf.chunk.js",
40
- "static/js/8691.885f6268.chunk.js": "./static/js/8691.885f6268.chunk.js",
39
+ "static/js/3599.eaeac234.chunk.js": "./static/js/3599.eaeac234.chunk.js",
40
+ "static/js/8691.93a29403.chunk.js": "./static/js/8691.93a29403.chunk.js",
41
41
  "static/js/6718.6fb2aa21.chunk.js": "./static/js/6718.6fb2aa21.chunk.js",
42
- "static/js/7175.ed4a2f0d.chunk.js": "./static/js/7175.ed4a2f0d.chunk.js",
42
+ "static/js/7175.70728640.chunk.js": "./static/js/7175.70728640.chunk.js",
43
43
  "static/js/5345.816da891.chunk.js": "./static/js/5345.816da891.chunk.js",
44
44
  "static/js/9865.8216f445.chunk.js": "./static/js/9865.8216f445.chunk.js",
45
45
  "static/js/6405.67a0df81.chunk.js": "./static/js/6405.67a0df81.chunk.js",
@@ -153,6 +153,6 @@
153
153
  },
154
154
  "entrypoints": [
155
155
  "static/css/main.5513bd04.css",
156
- "static/js/main.90c4efd0.js"
156
+ "static/js/main.8c6fc86e.js"
157
157
  ]
158
158
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.90c4efd0.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.8c6fc86e.js"></script><link href="./static/css/main.5513bd04.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[1307],{51307:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});n(66845);var i=n(23593),o=n(1515);const s=(0,o.Z)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),r=(0,o.Z)("div",{target:"e115fcil1"})((()=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0})),""),l=(0,o.Z)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var d,a=n(40864);!function(e){e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth"}(d||(d={}));const c=(0,i.Z)((function(e){let t,{width:n,isFullScreen:i,element:o,height:c,endpoints:h}=e;const m=o.width;if(m===d.OriginalWidth||m===d.AutoWidth)t=void 0;else if(m===d.ColumnWidth)t=n;else{if(!(m>0))throw Error(`Invalid image width: ${m}`);t=m}const u={};return c&&i?(u.maxHeight=c,u["object-fit"]="contain"):(u.width=t,m===d.AutoWidth&&(u.maxWidth="100%")),(0,a.jsx)(s,{className:"stImage","data-testid":"stImage",style:{width:n},children:o.imgs.map(((e,t)=>{const n=e;return(0,a.jsxs)(r,{"data-testid":"stImageContainer",children:[(0,a.jsx)("img",{style:u,src:h.buildMediaURL(n.url),alt:t.toString()}),n.caption&&(0,a.jsx)(l,{"data-testid":"stImageCaption",style:u,children:` ${n.caption} `})]},t)}))})}))},23593:(e,t,n)=>{n.d(t,{Z:()=>x});var i=n(66845),o=n(13005),s=n.n(o),r=n(25621),l=n(82218),d=n(97781),a=n(46927),c=n(66694),h=n(1515);const m=(0,h.Z)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),u=(0,h.Z)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[m]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:"2.875rem",overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(40864);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels("2.875rem");return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:s,disableFullscreenMode:r}=this.props;let c=l.d,h=this.zoomIn,g="View fullscreen";return e&&(c=d.m,h=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(u,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,p.jsx)(m,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,p.jsx)(a.Z,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.E;const w=(0,r.b)(g);const x=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(w,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:s,collapse:r}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:s,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(n,e)}},82218:(e,t,n)=>{n.d(t,{d:()=>r});var i=n(25773),o=n(66845),s=n(69),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));r.displayName="FullscreenEnter"},97781:(e,t,n)=>{n.d(t,{m:()=>r});var i=n(25773),o=n(66845),s=n(69),r=o.forwardRef((function(e,t){return o.createElement(s.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));r.displayName="FullscreenExit"}}]);
@@ -0,0 +1,5 @@
1
+ (self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[3599],{79986:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});r(66845);var n=r(50641),o=r(86659),i=r(1515);const s=r(7865).F4`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,a=(0,i.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(40864);const u=e=>{let{dirty:t,value:r,maxLength:i,className:s,type:u="single",inForm:c}=e;const d=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};if(t){const e=c?"submit form":"apply";if("multiline"===u){p(`Press ${(0,n.Ge)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===u&&p(`Press Enter to ${e}`)}return i&&("chat"!==u||t)&&p(`${r.length}/${i}`,t&&r.length>=i),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:s,children:d})}},87814:(e,t,r)=>{"use strict";r.d(t,{K:()=>o});var n=r(50641);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,n.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,n.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},83599:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(66845),o=r(118),i=r(25621),s=r(70479),a=r.n(s),l=r(87814),u=r(79986),c=r(98478),d=r(86659),p=r(8879),h=r(68411),f=r(50641),m=r(40864);class y extends n.PureComponent{get initialValue(){var e;const t=this.props.widgetMgr.getStringValue(this.props.element);return null!==(e=null!==t&&void 0!==t?t:this.props.element.default)&&void 0!==e?e:null}constructor(e){super(e),this.formClearHelper=new l.K,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=e=>{const{widgetMgr:t,element:r,fragmentId:n}=this.props;t.setStringValue(r,this.state.value,e,n),this.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((e,t)=>{var r;return{value:null!==(r=t.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=e=>{const{value:t}=e.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&t.length>n||this.setState({dirty:!0,value:t})},this.isEnterKeyPressed=e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))},this.onKeyDown=e=>{const{metaKey:t,ctrlKey:r}=e,{dirty:n}=this.state;if(this.isEnterKeyPressed(e)&&(r||t)&&n){e.preventDefault(),this.commitWidgetValue({fromUi:!0});const{formId:t}=this.props.element;(0,f.$b)({formId:t})&&this.props.widgetMgr.submitForm(this.props.element.formId,this.props.fragmentId)}},this.id=a()("text_area_")}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:e}=this.props.element;e&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:e}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==e&&void 0!==e?e:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}render(){var e;const{element:t,disabled:r,width:n,widgetMgr:i,theme:s}=this.props,{value:a,dirty:l}=this.state,y={width:n},{height:b,placeholder:g}=t;return this.formClearHelper.manageFormClearListener(i,t.formId,this.onFormCleared),(0,m.jsxs)("div",{className:"stTextArea","data-testid":"stTextArea",style:y,children:[(0,m.jsx)(c.O,{label:t.label,disabled:r,labelVisibility:(0,f.iF)(null===(e=t.labelVisibility)||void 0===e?void 0:e.value),htmlFor:this.id,children:t.help&&(0,m.jsx)(d.dT,{children:(0,m.jsx)(p.Z,{content:t.help,placement:h.u.TOP_RIGHT})})}),(0,m.jsx)(o.Z,{value:null!==a&&void 0!==a?a:"",placeholder:g,onBlur:this.onBlur,onChange:this.onChange,onKeyDown:this.onKeyDown,"aria-label":t.label,disabled:r,id:this.id,overrides:{Input:{style:{lineHeight:s.lineHeights.inputWidget,height:b?`${b}px`:"",minHeight:"95px",resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:s.spacing.lg,paddingLeft:s.spacing.lg,paddingBottom:s.spacing.lg,paddingTop:s.spacing.lg}},Root:{props:{"data-testid":"stTextInput-RootElement"},style:{borderLeftWidth:s.sizes.borderWidth,borderRightWidth:s.sizes.borderWidth,borderTopWidth:s.sizes.borderWidth,borderBottomWidth:s.sizes.borderWidth}}}}),n>s.breakpoints.hideWidgetDetails&&(0,m.jsx)(u.Z,{dirty:l,value:null!==a&&void 0!==a?a:"",maxLength:t.maxChars,type:"multiline",inForm:(0,f.$b)({formId:t.formId})})]})}}const b=(0,i.b)(y)},118:(e,t,r)=>{"use strict";r.d(t,{Z:()=>F});var n=r(66845),o=r(80318),i=r(9656),s=r(38254),a=r(80745),l=r(98479);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,a.zo)("div",(function(e){return c(c({},(0,l.d5)(c(c({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var h=(0,a.zo)("div",(function(e){return(0,l.hB)(c({$positive:!1},e))}));h.displayName="StyledTextareaContainer",h.displayName="StyledTextareaContainer";var f=(0,a.zo)("textarea",(function(e){return c(c({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=x(e);if(t){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===m(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}(this,r)}}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function P(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}f.displayName="StyledTextarea",f.displayName="StyledTextarea";var C=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(u,e);var t,r,a,l=w(u);function u(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P(j(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),P(j(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),P(j(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=u,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o.jb)(t.Root,p),2),a=r[0],l=r[1],u=(0,o.aO)({Input:{component:f},InputContainer:{component:h}},t);return n.createElement(a,y({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.Z,y({},this.props,{type:s.iB.textarea,overrides:u,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),a&&v(t,a),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);P(C,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:s.NO.default});const F=C},70479:(e,t,r)=>{var n=r(38145),o=0;e.exports=function(e){var t=++o;return n(e)+t}}}]);
@@ -0,0 +1,5 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[6013],{79986:(e,t,r)=>{r.d(t,{Z:()=>c});r(66845);var n=r(50641),o=r(86659),i=r(1515);const a=r(7865).F4`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,s=(0,i.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:n}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${a}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(40864);const c=e=>{let{dirty:t,value:r,maxLength:i,className:a,type:c="single",inForm:u}=e;const d=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(s,{includeDot:d.length>0,shouldBlink:t,children:e},d.length))};if(t){const e=u?"submit form":"apply";if("multiline"===c){p(`Press ${(0,n.Ge)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===c&&p(`Press Enter to ${e}`)}return i&&("chat"!==c||t)&&p(`${r.length}/${i}`,t&&r.length>=i),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:a,children:d})}},46013:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n=r(66845),o=r(25621),i=r(25773),a=r(69),s=n.forwardRef((function(e,t){return n.createElement(a.D,(0,i.Z)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),n.createElement("rect",{width:24,height:24,fill:"none"}),n.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))}));s.displayName="Send";var l=r(118),c=r(46927),u=r(79986),d=r(27466),p=r(1515);const f=(0,p.Z)("div",{target:"e1d2x3se4"})((e=>{var t;let{theme:r,width:n}=e;return{borderRadius:r.radii.default,display:"flex",backgroundColor:null!==(t=r.colors.widgetBackgroundColor)&&void 0!==t?t:r.colors.secondaryBg,width:`${n}px`}}),""),h=(0,p.Z)("div",{target:"e1d2x3se3"})((e=>{let{theme:t}=e;return{backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.default,display:"flex",alignItems:"center"}}),""),y=(0,p.Z)("button",{target:"e1d2x3se2"})((e=>{let{theme:t,disabled:r,extended:n}=e;const o=(0,d.Iy)(t),[i,a]=o?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:n?t.radii.none:t.radii.default,borderTopLeftRadius:n?t.radii.default:t.radii.none,borderBottomRightRadius:t.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:0,padding:t.spacing.sm,color:r?i:a,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:o?t.colors.gray10:t.colors.gray90},"&:hover":{backgroundColor:t.colors.primary,color:t.colors.white},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),""),g=(0,p.Z)("div",{target:"e1d2x3se1"})((()=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:"0px",pointerEvents:"none"})),""),b=(0,p.Z)("div",{target:"e1d2x3se0"})({name:"1lm6gnd",styles:"position:absolute;bottom:0px;right:3rem"});var m=r(40864);const v=function(e){let{width:t,element:r,widgetMgr:i,fragmentId:a}=e;const p=(0,o.u)(),[v,x]=(0,n.useState)(!1),[w,O]=(0,n.useState)(r.default),[j,C]=(0,n.useState)(0),S=(0,n.useRef)(null),k=(0,n.useRef)({minHeight:0,maxHeight:0}),P=()=>{S.current&&S.current.focus(),w&&(i.setStringTriggerValue(r,w,{fromUi:!0},a),x(!1),O(""),C(0))};(0,n.useEffect)((()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";O(e),x(""!==e)}}),[r]),(0,n.useEffect)((()=>{if(S.current){const{offsetHeight:e}=S.current;k.current.minHeight=e,k.current.maxHeight=6.5*e}}),[S]);const{disabled:R,placeholder:$,maxChars:E}=r,I=(0,d.Iy)(p),{minHeight:z,maxHeight:B}=k.current,T=I?p.colors.gray70:p.colors.gray80,H=!!(j>0&&S.current)&&Math.abs(j-z)>1;return(0,m.jsx)(f,{className:"stChatInput","data-testid":"stChatInput",width:t,children:(0,m.jsxs)(h,{children:[(0,m.jsx)(l.Z,{inputRef:S,value:w,placeholder:$,onChange:e=>{const{value:t}=e.target,{maxChars:n}=r;0!==n&&t.length>n||(x(""!==t),O(t),C((()=>{let e=0;const{current:t}=S;if(t){const r=t.placeholder;t.placeholder="",t.style.height="auto",e=t.scrollHeight,t.placeholder=r,t.style.height=""}return e})()))},onKeyDown:e=>{const{metaKey:t,ctrlKey:r,shiftKey:n}=e;(e=>{var t;const{keyCode:r,key:n}=e;return("Enter"===n||13===r||10===r)&&!(!0===(null===(t=e.nativeEvent)||void 0===t?void 0:t.isComposing))})(e)&&!n&&!r&&!t&&(e.preventDefault(),P())},"aria-label":$,disabled:R,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",backgroundColor:p.colors.transparent,borderLeftWidth:p.sizes.borderWidth,borderRightWidth:p.sizes.borderWidth,borderTopWidth:p.sizes.borderWidth,borderBottomWidth:p.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:p.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,backgroundColor:p.colors.transparent,"::placeholder":{color:T},height:H?`${j+1}px`:"auto",maxHeight:B?`${B}px`:"none",paddingRight:"3rem",paddingLeft:p.spacing.sm,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm}}}}),t>p.breakpoints.hideWidgetDetails&&(0,m.jsx)(b,{children:(0,m.jsx)(u.Z,{dirty:v,value:w,maxLength:E,type:"chat",inForm:!1})}),(0,m.jsx)(g,{children:(0,m.jsx)(y,{onClick:P,disabled:!v||R,extended:H,"data-testid":"stChatInputSubmitButton",children:(0,m.jsx)(c.Z,{content:s,size:"xl",color:"inherit"})})})]})})}},118:(e,t,r)=>{r.d(t,{Z:()=>k});var n=r(66845),o=r(80318),i=r(9656),a=r(38254),s=r(80745),l=r(98479);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=(0,s.zo)("div",(function(e){return u(u({},(0,l.d5)(u(u({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})}));p.displayName="StyledTextAreaRoot",p.displayName="StyledTextAreaRoot";var f=(0,s.zo)("div",(function(e){return(0,l.hB)(u({$positive:!1},e))}));f.displayName="StyledTextareaContainer",f.displayName="StyledTextareaContainer";var h=(0,s.zo)("textarea",(function(e){return u(u({},(0,l.Hx)(e)),{},{resize:e.$resize||"none"})}));function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g.apply(this,arguments)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j(e);if(t){var o=j(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===y(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}(this,r)}}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.displayName="StyledTextarea",h.displayName="StyledTextarea";var S=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(c,e);var t,r,s,l=w(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(O(e=l.call.apply(l,[this].concat(r))),"state",{isFocused:e.props.autoFocus||!1}),C(O(e),"onFocus",(function(t){e.setState({isFocused:!0}),e.props.onFocus(t)})),C(O(e),"onBlur",(function(t){e.setState({isFocused:!1}),e.props.onBlur(t)})),e}return t=c,(r=[{key:"render",value:function(){var e=this.props.overrides,t=void 0===e?{}:e,r=b((0,o.jb)(t.Root,p),2),s=r[0],l=r[1],c=(0,o.aO)({Input:{component:h},InputContainer:{component:f}},t);return n.createElement(s,g({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},l),n.createElement(i.Z,g({},this.props,{type:a.iB.textarea,overrides:c,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}])&&v(t.prototype,r),s&&v(t,s),Object.defineProperty(t,"prototype",{writable:!1}),c}(n.Component);C(S,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:a.NO.default});const k=S}}]);
@@ -0,0 +1,5 @@
1
+ "use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[7175],{79986:(e,t,r)=>{r.d(t,{Z:()=>d});r(66845);var o=r(50641),l=r(86659),i=r(1515);const n=r(7865).F4`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,a=(0,i.Z)("span",{target:"edlqvik0"})((e=>{let{includeDot:t,shouldBlink:r,theme:o}=e;return{...t?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:o.colors.gray,margin:"0 5px"}}:{},...r?{color:o.colors.red,animationName:`${n}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var s=r(40864);const d=e=>{let{dirty:t,value:r,maxLength:i,className:n,type:d="single",inForm:u}=e;const c=[],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];c.push((0,s.jsx)(a,{includeDot:c.length>0,shouldBlink:t,children:e},c.length))};if(t){const e=u?"submit form":"apply";if("multiline"===d){p(`Press ${(0,o.Ge)()?"\u2318":"Ctrl"}+Enter to ${e}`)}else"single"===d&&p(`Press Enter to ${e}`)}return i&&("chat"!==d||t)&&p(`${r.length}/${i}`,t&&r.length>=i),(0,s.jsx)(l.X7,{"data-testid":"InputInstructions",className:n,children:c})}},87814:(e,t,r)=>{r.d(t,{K:()=>l});var o=r(50641);class l{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,t,r){(0,o.bb)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===t||(this.disconnect(),(0,o.bM)(t)&&(this.formClearListener=e.addFormClearedListener(t,r),this.lastWidgetMgr=e,this.lastFormId=t))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},67175:(e,t,r)=>{r.r(t),r.d(t,{default:()=>N});var o=r(66845),l=r(20607),i=r(89997),n=r(25621),a=r(52347),s=r(82534),d=r(70479),u=r.n(d),c=r(50641),p=r(87814),m=r(23849),b=r(16295),g=r(8879),h=r(68411),f=r(46927),v=r(79986),y=r(98478),I=r(86659),x=r(1515);const k=(0,x.Z)("div",{target:"e116k4er3"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor||t.colors.widgetBackgroundColor||t.colors.bgColor,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}}}),""),w=(0,x.Z)("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),C=(0,x.Z)("button",{target:"e116k4er1"})((e=>{let{theme:t}=e;return{margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:"32px",justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.widgetBackgroundColor||t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}}}),""),T=(0,x.Z)("div",{target:"e116k4er0"})((e=>{let{theme:t,clearable:r}=e;return{position:"absolute",marginRight:t.spacing.twoXS,left:0,right:64+(r?12:0)+"px"}}),"");var R=r(40864);const D=e=>{let{step:t,dataType:r}=e;return t||(r===b.Y2.DataType.INT?1:.01)},F=e=>{let{value:t,format:r,step:o,dataType:l}=e;if((0,c.le)(t))return null;let i=function(e){return(0,c.le)(e)||""===e?void 0:e}(r);if((0,c.le)(i)&&(0,c.bb)(o)){const e=o.toString();if(l===b.Y2.DataType.FLOAT&&0!==o&&e.includes(".")){i=`%0.${e.split(".")[1].length}f`}}if((0,c.le)(i))return t.toString();try{return(0,a.sprintf)(i,t)}catch(n){return(0,m.KE)(`Error in sprintf(${i}, ${t}): ${n}`),String(t)}},N=(0,n.b)((e=>{var t;let{disabled:r,element:n,widgetMgr:a,width:d,theme:m,fragmentId:x}=e;const{dataType:N,id:j,formId:W,default:L,format:S}=n,B=n.hasMin?n.min:-1/0,M=n.hasMax?n.max:1/0,[$,Z]=o.useState(D(n)),E=(e=>{var t;const r=e.element.dataType===b.Y2.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element);return null!==(t=null!==r&&void 0!==r?r:e.element.default)&&void 0!==t?t:null})({element:n,widgetMgr:a}),[V,U]=o.useState(!1),[z,_]=o.useState(E),[A,Y]=o.useState(F({value:E,...n,step:$})),[K,O]=o.useState(!1),P=o.useRef(null),H=o.useRef(new p.K),G=o.useRef(u()("number_input_")),X=((e,t,r)=>!(0,c.le)(e)&&e-t>=r)(z,$,B),q=((e,t,r)=>!(0,c.le)(e)&&e+t<=r)(z,$,M);o.useEffect((()=>{Z(D({step:n.step,dataType:n.dataType}))}),[n.dataType,n.step]);const J=o.useCallback((e=>{let{value:t,source:r}=e;if((0,c.bb)(t)&&(B>t||t>M)){var o;null===(o=P.current)||void 0===o||o.reportValidity()}else{var l;const e=null!==(l=null!==t&&void 0!==t?t:L)&&void 0!==l?l:null;switch(N){case b.Y2.DataType.INT:a.setIntValue({id:j,formId:W},e,r,x);break;case b.Y2.DataType.FLOAT:a.setDoubleValue({id:j,formId:W},e,r,x);break;default:throw new Error("Invalid data type")}U(!1),_(e),Y(F({value:e,dataType:N,format:S,step:$}))}}),[B,M,P,a,x,$,N,j,W,L,S]),Q=()=>{const{value:e}=n;n.setValue=!1,_(null!==e&&void 0!==e?e:null),Y(F({value:null!==e&&void 0!==e?e:null,...n,step:$})),J({value:null!==e&&void 0!==e?e:null,source:{fromUi:!1}})};o.useEffect((()=>{const e=H.current;return n.setValue?Q():J({value:z,source:{fromUi:!1}}),()=>{e.disconnect()}}),[]),n.setValue&&Q();const ee=(0,c.le)(n.default)&&!r;H.current.manageFormClearListener(a,n.formId,(()=>{var e;_(null!==(e=n.default)&&void 0!==e?e:null),J({value:z,source:{fromUi:!0}})}));const te=o.useCallback((()=>{q&&(U(!0),J({value:(null!==z&&void 0!==z?z:B)+$,source:{fromUi:!0}}))}),[z,B,$,q]),re=o.useCallback((()=>{X&&(U(!0),J({value:(null!==z&&void 0!==z?z:M)-$,source:{fromUi:!0}}))}),[z,M,$,X]),oe=o.useCallback((e=>{const{key:t}=e;switch(t){case"ArrowUp":e.preventDefault(),te();break;case"ArrowDown":e.preventDefault(),re()}}),[te,re]),le=o.useCallback((e=>{"Enter"===e.key&&(V&&J({value:z,source:{fromUi:!0}}),(0,c.$b)({formId:W})&&a.submitForm(W,x))}),[V,z,J,a,W,x]);return(0,R.jsxs)("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:d},children:[(0,R.jsx)(y.O,{label:n.label,disabled:r,labelVisibility:(0,c.iF)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:G.current,children:n.help&&(0,R.jsx)(I.dT,{children:(0,R.jsx)(g.Z,{content:n.help,placement:h.u.TOP_RIGHT})})}),(0,R.jsxs)(k,{className:K?"focused":"","data-testid":"stNumberInputContainer",children:[(0,R.jsx)(s.Z,{type:"number",inputRef:P,value:null!==A&&void 0!==A?A:"",placeholder:n.placeholder,onBlur:()=>(V&&J({value:z,source:{fromUi:!0}}),void O(!1)),onFocus:()=>{O(!0)},onChange:e=>(e=>{const{value:t}=e.target;if(""===t)U(!0),_(null),Y(null);else{let e;e=n.dataType===b.Y2.DataType.INT?parseInt(t,10):parseFloat(t),U(!0),_(e),Y(t)}})(e),onKeyPress:e=>le(e),onKeyDown:e=>oe(e),clearable:ee,clearOnEscape:ee,disabled:r,"aria-label":n.label,id:G.current,overrides:{ClearIcon:{props:{overrides:{Svg:{style:{color:m.colors.darkGray,transform:"scale(1.4)",width:m.spacing.twoXL,marginRight:"-1.25em",":hover":{fill:m.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInput-Input",step:$,min:B,max:M},style:{lineHeight:m.lineHeights.inputWidget,paddingRight:m.spacing.sm,paddingLeft:m.spacing.sm,paddingBottom:m.spacing.sm,paddingTop:m.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0})}}}),d>m.breakpoints.hideNumberInputControls&&(0,R.jsxs)(w,{children:[(0,R.jsx)(C,{className:"step-down","data-testid":"stNumberInput-StepDown",onClick:re,disabled:!X||r,tabIndex:-1,children:(0,R.jsx)(f.Z,{content:l.W,size:"xs",color:X?"inherit":"disabled"})}),(0,R.jsx)(C,{className:"step-up","data-testid":"stNumberInput-StepUp",onClick:te,disabled:!q||r,tabIndex:-1,children:(0,R.jsx)(f.Z,{content:i.v,size:"xs",color:q?"inherit":"disabled"})})]})]}),d>m.breakpoints.hideWidgetDetails&&(0,R.jsx)(T,{clearable:ee,children:(0,R.jsx)(v.Z,{dirty:V,value:null!==A&&void 0!==A?A:"",inForm:(0,c.$b)({formId:n.formId})})})]})}))}}]);
@@ -0,0 +1,5 @@
1
+ (self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8691],{79986:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});r(66845);var n=r(50641),o=r(86659),i=r(1515);const s=r(7865).F4`
2
+ 50% {
3
+ color: rgba(0, 0, 0, 0);
4
+ }
5
+ `,a=(0,i.Z)("span",{target:"edlqvik0"})((t=>{let{includeDot:e,shouldBlink:r,theme:n}=t;return{...e?{"&::before":{opacity:1,content:'"\u2022"',animation:"none",color:n.colors.gray,margin:"0 5px"}}:{},...r?{color:n.colors.red,animationName:`${s}`,animationDuration:"0.5s",animationIterationCount:5}:{}}}),"");var l=r(40864);const u=t=>{let{dirty:e,value:r,maxLength:i,className:s,type:u="single",inForm:c}=t;const d=[],p=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.push((0,l.jsx)(a,{includeDot:d.length>0,shouldBlink:e,children:t},d.length))};if(e){const t=c?"submit form":"apply";if("multiline"===u){p(`Press ${(0,n.Ge)()?"\u2318":"Ctrl"}+Enter to ${t}`)}else"single"===u&&p(`Press Enter to ${t}`)}return i&&("chat"!==u||e)&&p(`${r.length}/${i}`,e&&r.length>=i),(0,l.jsx)(o.X7,{"data-testid":"InputInstructions",className:s,children:d})}},87814:(t,e,r)=>{"use strict";r.d(e,{K:()=>o});var n=r(50641);class o{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(t,e,r){(0,n.bb)(this.formClearListener)&&this.lastWidgetMgr===t&&this.lastFormId===e||(this.disconnect(),(0,n.bM)(e)&&(this.formClearListener=t.addFormClearedListener(e,r),this.lastWidgetMgr=t,this.lastFormId=e))}disconnect(){var t;null===(t=this.formClearListener)||void 0===t||t.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}},58691:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(66845),o=r(70479),i=r.n(o),s=r(82534),a=r(25621),l=r(16295),u=r(87814),c=r(79986),d=r(98478),p=r(86659),h=r(8879),f=r(68411),m=r(50641);const y=(0,r(1515).Z)("div",{target:"e11y4ecf0"})((t=>{let{width:e}=t;return{position:"relative",width:e}}),"");var b=r(40864);class g extends n.PureComponent{constructor(t){var e;super(t),e=this,this.formClearHelper=new u.K,this.id=void 0,this.state={dirty:!1,value:this.initialValue},this.commitWidgetValue=function(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{widgetMgr:n,element:o,fragmentId:i}=e.props;n.setStringValue(o,e.state.value,t,i),r&&e.setState({dirty:!1})},this.onFormCleared=()=>{this.setState(((t,e)=>{var r;return{value:null!==(r=e.element.default)&&void 0!==r?r:null}}),(()=>this.commitWidgetValue({fromUi:!0})))},this.onBlur=()=>{this.state.dirty&&this.commitWidgetValue({fromUi:!0})},this.onChange=t=>{const{value:e}=t.target,{element:r}=this.props,{maxChars:n}=r;0!==n&&e.length>n||((0,m.$b)(this.props.element)?this.setState({dirty:!0,value:e},(()=>{this.commitWidgetValue({fromUi:!0},!1)})):this.setState({dirty:!0,value:e}))},this.onKeyPress=t=>{"Enter"===t.key&&(this.state.dirty&&this.commitWidgetValue({fromUi:!0}),(0,m.$b)(this.props.element)&&this.props.widgetMgr.submitForm(this.props.element.formId,this.props.fragmentId))},this.id=i()("text_input_")}get initialValue(){var t;const e=this.props.widgetMgr.getStringValue(this.props.element);return null!==(t=null!==e&&void 0!==e?e:this.props.element.default)&&void 0!==t?t:null}componentDidMount(){this.props.element.setValue?this.updateFromProtobuf():this.commitWidgetValue({fromUi:!1})}componentDidUpdate(){this.maybeUpdateFromProtobuf()}componentWillUnmount(){this.formClearHelper.disconnect()}maybeUpdateFromProtobuf(){const{setValue:t}=this.props.element;t&&this.updateFromProtobuf()}updateFromProtobuf(){const{value:t}=this.props.element;this.props.element.setValue=!1,this.setState({value:null!==t&&void 0!==t?t:null},(()=>{this.commitWidgetValue({fromUi:!1})}))}getTypeString(){return this.props.element.type===l.oi.Type.PASSWORD?"password":"text"}render(){var t;const{dirty:e,value:r}=this.state,{element:n,width:o,disabled:i,widgetMgr:a,theme:l}=this.props,{placeholder:u}=n;return this.formClearHelper.manageFormClearListener(a,n.formId,this.onFormCleared),(0,b.jsxs)(y,{className:"row-widget stTextInput","data-testid":"stTextInput",width:o,children:[(0,b.jsx)(d.O,{label:n.label,disabled:i,labelVisibility:(0,m.iF)(null===(t=n.labelVisibility)||void 0===t?void 0:t.value),htmlFor:this.id,children:n.help&&(0,b.jsx)(p.dT,{children:(0,b.jsx)(h.Z,{content:n.help,placement:f.u.TOP_RIGHT})})}),(0,b.jsx)(s.Z,{value:null!==r&&void 0!==r?r:"",placeholder:u,onBlur:this.onBlur,onChange:this.onChange,onKeyPress:this.onKeyPress,"aria-label":n.label,disabled:i,id:this.id,type:this.getTypeString(),autoComplete:n.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:l.lineHeights.inputWidget,paddingRight:l.spacing.sm,paddingLeft:l.spacing.sm,paddingBottom:l.spacing.sm,paddingTop:l.spacing.sm}},Root:{props:{"data-testid":"stTextInput-RootElement"},style:{height:l.sizes.minElementHeight,borderLeftWidth:l.sizes.borderWidth,borderRightWidth:l.sizes.borderWidth,borderTopWidth:l.sizes.borderWidth,borderBottomWidth:l.sizes.borderWidth}}}}),o>l.breakpoints.hideWidgetDetails&&(0,b.jsx)(c.Z,{dirty:e,value:null!==r&&void 0!==r?r:"",maxLength:n.maxChars,inForm:(0,m.$b)({formId:n.formId})})]})}}const v=(0,a.b)(g)},82534:(t,e,r)=>{"use strict";r.d(e,{Z:()=>S});var n=r(66845),o=r(80318),i=r(32510),s=r(9656),a=r(98479),l=r(38254);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}var c=["Root","StartEnhancer","EndEnhancer"],d=["startEnhancer","endEnhancer","overrides"];function p(){return p=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},p.apply(this,arguments)}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],s=!0,a=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(l){a=!0,o=l}finally{try{s||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function m(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function g(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(t,e){if(e&&("object"===u(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}(this,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var O=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(w,t);var e,r,u,f=g(w);function w(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return j(v(t=f.call.apply(f,[this].concat(r))),"state",{isFocused:t.props.autoFocus||!1}),j(v(t),"onFocus",(function(e){t.setState({isFocused:!0}),t.props.onFocus(e)})),j(v(t),"onBlur",(function(e){t.setState({isFocused:!1}),t.props.onBlur(e)})),t}return e=w,(r=[{key:"render",value:function(){var t=this.props,e=t.startEnhancer,r=t.endEnhancer,u=t.overrides,f=u.Root,y=u.StartEnhancer,b=u.EndEnhancer,g=m(u,c),v=m(t,d),w=h((0,o.jb)(f,a.fC),2),j=w[0],O=w[1],S=h((0,o.jb)(y,a.Fp),2),E=S[0],P=S[1],x=h((0,o.jb)(b,a.Fp),2),W=x[0],I=x[1],T=(0,i.t)(this.props,this.state);return n.createElement(j,p({"data-baseweb":"input"},T,O,{$adjoined:F(e,r),$hasIconTrailing:this.props.clearable||"password"==this.props.type}),C(e)&&n.createElement(E,p({},T,P,{$position:l.Xf.start}),"function"===typeof e?e(T):e),n.createElement(s.Z,p({},v,{overrides:g,adjoined:F(e,r),onFocus:this.onFocus,onBlur:this.onBlur})),C(r)&&n.createElement(W,p({},T,I,{$position:l.Xf.end}),"function"===typeof r?r(T):r))}}])&&y(e.prototype,r),u&&y(e,u),Object.defineProperty(e,"prototype",{writable:!1}),w}(n.Component);function F(t,e){return C(t)&&C(e)?l.y4.both:C(t)?l.y4.left:C(e)?l.y4.right:l.y4.none}function C(t){return Boolean(t||0===t)}j(O,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:l.NO.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});const S=O},70479:(t,e,r)=>{var n=r(38145),o=0;t.exports=function(t){var e=++o;return n(t)+e}}}]);