streamlit-nightly 1.41.2.dev20250113__py2.py3-none-any.whl → 1.41.2.dev20250115__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.
- streamlit/commands/navigation.py +15 -14
- streamlit/connections/snowflake_connection.py +30 -49
- streamlit/elements/widgets/button.py +8 -7
- streamlit/navigation/page.py +6 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.nDxE1uhe.js → FileDownload.esm.2W3WeZp2.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CI0WOi1j.js → FormClearHelper.BouJUO4t.js} +1 -1
- streamlit/static/static/js/{Hooks.BJ9wR0AU.js → Hooks.BsCM2VRj.js} +1 -1
- streamlit/static/static/js/{InputInstructions.D3geEFNa.js → InputInstructions.Czb180Te.js} +1 -1
- streamlit/static/static/js/{ProgressBar.COmW3GV1.js → ProgressBar.DiAR_iBM.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.BThihgkd.js → RenderInPortalIfExists.DrsDyygs.js} +1 -1
- streamlit/static/static/js/{Toolbar.CEvzQ96S.js → Toolbar.Bl4mqr4u.js} +1 -1
- streamlit/static/static/js/{base-input.BP5TsyYO.js → base-input.BHMnVAOr.js} +4 -4
- streamlit/static/static/js/{createSuper.BmuFLMtM.js → createSuper.BftCasOC.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BI4k6rKR.js → data-grid-overlay-editor.C_AfZV80.js} +1 -1
- streamlit/static/static/js/{downloader.BFBCg3lC.js → downloader.CkXPXM6R.js} +1 -1
- streamlit/static/static/js/{es6.DtixDmn0.js → es6.D2MIDSER.js} +2 -2
- streamlit/static/static/js/{getPrototypeOf.q2WOIOs_.js → getPrototypeOf.8KqRDNXH.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.DLr5MCWa.js → iframeResizer.contentWindow.DzzdqD8t.js} +1 -1
- streamlit/static/static/js/{index.BbqzVelh.js → index.2gId-hkY.js} +1 -1
- streamlit/static/static/js/{index.CSU4ah-Z.js → index.B3hBEIu8.js} +1 -1
- streamlit/static/static/js/{index.Bs1A0Yz9.js → index.B56k54Px.js} +2 -2
- streamlit/static/static/js/{index.CdISilgA.js → index.B7TErKDq.js} +1 -1
- streamlit/static/static/js/{index.Bjj8dbrN.js → index.BBMRAwlY.js} +1 -1
- streamlit/static/static/js/{index.D-Axxgw0.js → index.BOaF1pd3.js} +1 -1
- streamlit/static/static/js/{index.DnHxDAnh.js → index.BSBaMBDf.js} +1 -1
- streamlit/static/static/js/{index.Dy-_rPOY.js → index.BWKboqrD.js} +1 -1
- streamlit/static/static/js/{index.PvXferS3.js → index.BZACNIPy.js} +1 -1
- streamlit/static/static/js/{index.DcDlCutW.js → index.Bomzp8ws.js} +9 -9
- streamlit/static/static/js/{index.DGisaPeN.js → index.BpkKw-EE.js} +1 -1
- streamlit/static/static/js/{index.CqdRxVGu.js → index.BvFiU2Cj.js} +1 -1
- streamlit/static/static/js/{index.BFQMhsjo.js → index.C3hZcowl.js} +1 -1
- streamlit/static/static/js/{index.C8GKMyxG.js → index.CGcb6vEw.js} +1 -1
- streamlit/static/static/js/{index.Cm3Q2clw.js → index.CIKFC12n.js} +1 -1
- streamlit/static/static/js/{index.Cm0XvfNt.js → index.CQ7Y6jj1.js} +1 -1
- streamlit/static/static/js/{index.DMUcVhPY.js → index.CWnLDBO4.js} +1 -1
- streamlit/static/static/js/{index.-XYuQlg3.js → index.CbXquzx4.js} +2 -2
- streamlit/static/static/js/{index.BDtzkwhv.js → index.CcAtzCnX.js} +59 -59
- streamlit/static/static/js/{index.CSXsntDd.js → index.CdD4T5ia.js} +1 -1
- streamlit/static/static/js/{index.DyhG13mI.js → index.CxVERd8N.js} +1 -1
- streamlit/static/static/js/{index.BHnfxjsW.js → index.CyixjHVj.js} +1 -1
- streamlit/static/static/js/{index.C5llicCl.js → index.DCPA8CBQ.js} +3 -3
- streamlit/static/static/js/{index.KrDy5y3p.js → index.DHthJf6z.js} +1 -1
- streamlit/static/static/js/{index.CSnqL7FE.js → index.DOp8WWEB.js} +1 -1
- streamlit/static/static/js/{index.Ba_7Au_r.js → index.Dc5AjA6K.js} +1 -1
- streamlit/static/static/js/{index.B5B5DAsT.js → index.DdMp70lp.js} +1 -1
- streamlit/static/static/js/{index.CeOuM3pB.js → index.DoxwX9TA.js} +1 -1
- streamlit/static/static/js/{index.BHNK3GF6.js → index.DqFVIXyV.js} +1 -1
- streamlit/static/static/js/{index.Cn4twLJI.js → index.DqwYtic0.js} +1 -1
- streamlit/static/static/js/{index.BDK4X_d2.js → index.DuBLm9ul.js} +1 -1
- streamlit/static/static/js/{index.BLSTSv7f.js → index.DxAYNSu8.js} +1 -1
- streamlit/static/static/js/{index.BiQBtTGP.js → index.UG0Sy7w3.js} +1 -1
- streamlit/static/static/js/{index.BjNnwU0F.js → index.d8-RPUlf.js} +1 -1
- streamlit/static/static/js/{index.BXIDmZYJ.js → index.qmgXiJ18.js} +1 -1
- streamlit/static/static/js/{index.B_91y3ES.js → index.s016NW7I.js} +3 -3
- streamlit/static/static/js/{index.CqNQZi9B.js → index.xmd7bHOh.js} +2 -2
- streamlit/static/static/js/{input.nXqoMhZv.js → input.D0WJMWBG.js} +1 -1
- streamlit/static/static/js/{memory.gpz43-um.js → memory.BujUvzJS.js} +1 -1
- streamlit/static/static/js/{mergeWith.Bdf-VJ8P.js → mergeWith.D78ew9Q8.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DaFTPEew.js → number-overlay-editor.p4lzzkCV.js} +1 -1
- streamlit/static/static/js/{sandbox.axae7ePg.js → sandbox.DlA1rBd1.js} +1 -1
- streamlit/static/static/js/{slicedToArray.CkAkmYZy.js → slicedToArray.CJDXlgcX.js} +1 -1
- streamlit/static/static/js/{textarea.BaAknq-y.js → textarea.DfgNwmCV.js} +2 -2
- streamlit/static/static/js/{timepicker.DaL-07Js.js → timepicker.Dk2D15sb.js} +1 -1
- streamlit/static/static/js/{uniqueId.BXhjhO5X.js → uniqueId.BfX7No7I.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BuJZ1h2y.js → useBasicWidgetState.Dg6_MitK.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.BlJ_4Sll.js → useOnInputChange.ZLxV0UFG.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.K9D84vUj.js → withFullScreenWrapper.D8pjpwtz.js} +1 -1
- streamlit/watcher/util.py +86 -20
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/RECORD +75 -75
- {streamlit_nightly-1.41.2.dev20250113.data → streamlit_nightly-1.41.2.dev20250115.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250113.dist-info → streamlit_nightly-1.41.2.dev20250115.dist-info}/top_level.txt +0 -0
streamlit/commands/navigation.py
CHANGED
@@ -228,9 +228,7 @@ def navigation(
|
|
228
228
|
default_page = None
|
229
229
|
pagehash_to_pageinfo: dict[PageHash, PageInfo] = {}
|
230
230
|
|
231
|
-
#
|
232
|
-
# 1. the default page
|
233
|
-
# 2. the pagehash to pageinfo mapping
|
231
|
+
# Get the default page.
|
234
232
|
for section_header in nav_sections:
|
235
233
|
for page in nav_sections[section_header]:
|
236
234
|
if page._default:
|
@@ -241,6 +239,20 @@ def navigation(
|
|
241
239
|
)
|
242
240
|
default_page = page
|
243
241
|
|
242
|
+
if default_page is None:
|
243
|
+
default_page = page_list[0]
|
244
|
+
default_page._default = True
|
245
|
+
|
246
|
+
ctx = get_script_run_ctx()
|
247
|
+
if not ctx:
|
248
|
+
# This should never run in Streamlit, but we want to make sure that
|
249
|
+
# the function always returns a page
|
250
|
+
default_page._can_be_called = True
|
251
|
+
return default_page
|
252
|
+
|
253
|
+
# Build the pagehash-to-pageinfo mapping.
|
254
|
+
for section_header in nav_sections:
|
255
|
+
for page in nav_sections[section_header]:
|
244
256
|
if isinstance(page._page, Path):
|
245
257
|
script_path = str(page._page)
|
246
258
|
else:
|
@@ -264,10 +276,6 @@ def navigation(
|
|
264
276
|
"url_pathname": page.url_path,
|
265
277
|
}
|
266
278
|
|
267
|
-
if default_page is None:
|
268
|
-
default_page = page_list[0]
|
269
|
-
default_page._default = True
|
270
|
-
|
271
279
|
msg = ForwardMsg()
|
272
280
|
if position == "hidden":
|
273
281
|
msg.navigation.position = NavigationProto.Position.HIDDEN
|
@@ -288,13 +296,6 @@ def navigation(
|
|
288
296
|
p.section_header = section_header
|
289
297
|
p.url_pathname = page.url_path
|
290
298
|
|
291
|
-
ctx = get_script_run_ctx()
|
292
|
-
if not ctx:
|
293
|
-
# This should never run in Streamlit, but we want to make sure that
|
294
|
-
# the function always returns a page
|
295
|
-
default_page._can_be_called = True
|
296
|
-
return default_page
|
297
|
-
|
298
299
|
# Inform our page manager about the set of pages we have
|
299
300
|
ctx.pages_manager.set_pages(pagehash_to_pageinfo)
|
300
301
|
found_page = ctx.pages_manager.get_page_script(
|
@@ -20,13 +20,16 @@
|
|
20
20
|
|
21
21
|
from __future__ import annotations
|
22
22
|
|
23
|
-
from typing import TYPE_CHECKING, cast
|
23
|
+
from typing import TYPE_CHECKING, Final, cast
|
24
24
|
|
25
|
+
from streamlit import logger
|
25
26
|
from streamlit.connections import BaseConnection
|
26
27
|
from streamlit.connections.util import running_in_sis
|
27
28
|
from streamlit.errors import StreamlitAPIException
|
28
29
|
from streamlit.runtime.caching import cache_data
|
29
30
|
|
31
|
+
_LOGGER: Final = logger.get_logger(__name__)
|
32
|
+
|
30
33
|
if TYPE_CHECKING:
|
31
34
|
from datetime import timedelta
|
32
35
|
|
@@ -112,7 +115,11 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
112
115
|
|
113
116
|
>>> import streamlit as st
|
114
117
|
>>> conn = st.connection(
|
115
|
-
...
|
118
|
+
... connection_name,
|
119
|
+
... type="snowflake",
|
120
|
+
... account="xxx-xxx",
|
121
|
+
... user="xxx",
|
122
|
+
... authenticator="externalbrowser",
|
116
123
|
... )
|
117
124
|
>>> df = conn.query("SELECT * FROM my_table")
|
118
125
|
|
@@ -157,7 +164,12 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
157
164
|
>>> conn = st.connection("snowflake")
|
158
165
|
>>> df = conn.query("SELECT * FROM my_table")
|
159
166
|
|
160
|
-
**
|
167
|
+
**Snowflake Default Connection**
|
168
|
+
If you don't have Streamlit secret `[connections.snowflake]` and just use
|
169
|
+
`st.connection("snowflake")`, Streamlit will use the default connection behavior as documented in
|
170
|
+
https://docs.snowflake.cn/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection
|
171
|
+
|
172
|
+
***Example 5: Default connection with an environment variable***
|
161
173
|
|
162
174
|
If you have a Snowflake configuration file with a connection named
|
163
175
|
``my_connection`` as in Example 3, you can set an environment variable to
|
@@ -171,7 +183,7 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
171
183
|
>>> conn = st.connection("snowflake")
|
172
184
|
>>> df = conn.query("SELECT * FROM my_table")
|
173
185
|
|
174
|
-
|
186
|
+
***Example 6: Default connection in Snowflake's connection configuration file***
|
175
187
|
|
176
188
|
If you have a Snowflake configuration file that defines your ``default``
|
177
189
|
connection, Streamlit will automatically use it if no other connection is
|
@@ -224,32 +236,20 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
224
236
|
try:
|
225
237
|
st_secrets = self._secrets.to_dict()
|
226
238
|
if len(st_secrets):
|
239
|
+
_LOGGER.info(
|
240
|
+
"Connect to Snowflake using the Streamlit secret defined under "
|
241
|
+
"[connections.snowflake]."
|
242
|
+
)
|
227
243
|
conn_kwargs = {**st_secrets, **kwargs}
|
228
244
|
return snowflake.connector.connect(**conn_kwargs)
|
229
245
|
|
230
|
-
#
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
default_connection_name = "default"
|
236
|
-
try:
|
237
|
-
default_connection_name = config_mgr["default_connection_name"]
|
238
|
-
except snowflake.connector.errors.ConfigSourceError:
|
239
|
-
# Similarly, config_mgr["default_connection_name"] only exists in even
|
240
|
-
# later versions of recent versions. if it doesn't, we just use
|
241
|
-
# "default" as the default connection name.
|
242
|
-
pass
|
243
|
-
|
244
|
-
connection_name = (
|
245
|
-
default_connection_name
|
246
|
-
if self._connection_name == "snowflake"
|
247
|
-
else self._connection_name
|
248
|
-
)
|
249
|
-
return snowflake.connector.connect(
|
250
|
-
connection_name=connection_name,
|
251
|
-
**kwargs,
|
246
|
+
# Use the default configuration as defined in https://docs.snowflake.cn/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection
|
247
|
+
if self._connection_name == "snowflake":
|
248
|
+
_LOGGER.info(
|
249
|
+
"Connect to Snowflake using the default configuration as defined "
|
250
|
+
"in https://docs.snowflake.cn/en/developer-guide/python-connector/python-connector-connect#setting-a-default-connection"
|
252
251
|
)
|
252
|
+
return snowflake.connector.connect()
|
253
253
|
|
254
254
|
return snowflake.connector.connect(**kwargs)
|
255
255
|
except SnowflakeError as e:
|
@@ -321,28 +321,10 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
321
321
|
>>> st.dataframe(df)
|
322
322
|
|
323
323
|
"""
|
324
|
-
from snowflake.connector.errors import ProgrammingError # type: ignore[import]
|
325
|
-
from snowflake.connector.network import ( # type: ignore[import]
|
326
|
-
BAD_REQUEST_GS_CODE,
|
327
|
-
ID_TOKEN_EXPIRED_GS_CODE,
|
328
|
-
MASTER_TOKEN_EXPIRED_GS_CODE,
|
329
|
-
MASTER_TOKEN_INVALD_GS_CODE,
|
330
|
-
MASTER_TOKEN_NOTFOUND_GS_CODE,
|
331
|
-
SESSION_EXPIRED_GS_CODE,
|
332
|
-
)
|
333
324
|
from tenacity import retry, retry_if_exception, stop_after_attempt, wait_fixed
|
334
325
|
|
335
|
-
|
336
|
-
|
337
|
-
for code in (
|
338
|
-
ID_TOKEN_EXPIRED_GS_CODE,
|
339
|
-
SESSION_EXPIRED_GS_CODE,
|
340
|
-
MASTER_TOKEN_NOTFOUND_GS_CODE,
|
341
|
-
MASTER_TOKEN_EXPIRED_GS_CODE,
|
342
|
-
MASTER_TOKEN_INVALD_GS_CODE,
|
343
|
-
BAD_REQUEST_GS_CODE,
|
344
|
-
)
|
345
|
-
}
|
326
|
+
# the ANSI-compliant SQL code for "connection was not established" (see docs: https://docs.snowflake.com/en/developer-guide/python-connector/python-connector-api#id6)
|
327
|
+
SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED = "08001"
|
346
328
|
|
347
329
|
@retry(
|
348
330
|
after=lambda _: self.reset(),
|
@@ -352,9 +334,8 @@ class SnowflakeConnection(BaseConnection["InternalSnowflakeConnection"]):
|
|
352
334
|
# `snowflake-connector-python` library already implements retries for
|
353
335
|
# retryable HTTP errors.
|
354
336
|
retry=retry_if_exception(
|
355
|
-
lambda e:
|
356
|
-
and
|
357
|
-
and e.errno in retryable_error_codes
|
337
|
+
lambda e: hasattr(e, "sqlstate")
|
338
|
+
and e.sqlstate == SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED
|
358
339
|
),
|
359
340
|
wait=wait_fixed(1),
|
360
341
|
)
|
@@ -804,6 +804,11 @@ class ButtonMixin:
|
|
804
804
|
use_container_width: bool | None = None,
|
805
805
|
) -> DeltaGenerator:
|
806
806
|
page_link_proto = PageLinkProto()
|
807
|
+
|
808
|
+
ctx = get_script_run_ctx()
|
809
|
+
if not ctx:
|
810
|
+
return self.dg._enqueue("page_link", page_link_proto)
|
811
|
+
|
807
812
|
page_link_proto.disabled = disabled
|
808
813
|
|
809
814
|
if label is not None:
|
@@ -837,12 +842,10 @@ class ButtonMixin:
|
|
837
842
|
page_link_proto.external = True
|
838
843
|
return self.dg._enqueue("page_link", page_link_proto)
|
839
844
|
|
840
|
-
ctx = get_script_run_ctx()
|
841
845
|
ctx_main_script = ""
|
842
846
|
all_app_pages = {}
|
843
|
-
|
844
|
-
|
845
|
-
all_app_pages = ctx.pages_manager.get_pages()
|
847
|
+
ctx_main_script = ctx.main_script_path
|
848
|
+
all_app_pages = ctx.pages_manager.get_pages()
|
846
849
|
|
847
850
|
main_script_directory = get_main_script_directory(ctx_main_script)
|
848
851
|
requested_page = os.path.realpath(
|
@@ -862,9 +865,7 @@ class ButtonMixin:
|
|
862
865
|
|
863
866
|
if page_link_proto.page_script_hash == "":
|
864
867
|
is_mpa_v2 = (
|
865
|
-
ctx is not None
|
866
|
-
and ctx.pages_manager is not None
|
867
|
-
and ctx.pages_manager.mpa_version == 2
|
868
|
+
ctx.pages_manager is not None and ctx.pages_manager.mpa_version == 2
|
868
869
|
)
|
869
870
|
|
870
871
|
raise StreamlitPageNotFoundError(
|
streamlit/navigation/page.py
CHANGED
@@ -121,8 +121,8 @@ def Page(
|
|
121
121
|
>>> st.title("Second page")
|
122
122
|
>>>
|
123
123
|
>>> pg = st.navigation([
|
124
|
-
>>>
|
125
|
-
>>>
|
124
|
+
>>> st.Page("page1.py", title="First page", icon="🔥"),
|
125
|
+
>>> st.Page(page2, title="Second page", icon=":material/favorite:"),
|
126
126
|
>>> ])
|
127
127
|
>>> pg.run()
|
128
128
|
"""
|
@@ -174,6 +174,10 @@ class StreamlitPage:
|
|
174
174
|
url_path: str | None = None,
|
175
175
|
default: bool = False,
|
176
176
|
):
|
177
|
+
# Must appear before the return so all pages, even if running in bare Python,
|
178
|
+
# have a _default property. This way we can always tell which script needs to run.
|
179
|
+
self._default: bool = default
|
180
|
+
|
177
181
|
ctx = get_script_run_ctx()
|
178
182
|
if not ctx:
|
179
183
|
return
|
@@ -230,7 +234,6 @@ class StreamlitPage:
|
|
230
234
|
if self._icon:
|
231
235
|
validate_icon_or_emoji(self._icon)
|
232
236
|
|
233
|
-
self._default: bool = default
|
234
237
|
# used by st.navigation to ordain a page as runnable
|
235
238
|
self._can_be_called: bool = False
|
236
239
|
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.Bomzp8ws.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.ZIJkhegp.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.Bomzp8ws.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|
@@ -1 +1 @@
|
|
1
|
-
import{D as a,
|
1
|
+
import{D as a,b$ as i,r as o}from"./index.Bomzp8ws.js";class l{manageFormClearListener(r,s,t){a(this.formClearListener)&&this.lastWidgetMgr===r&&this.lastFormId===s||(this.disconnect(),i(s)&&(this.formClearListener=r.addFormClearedListener(s,t),this.lastWidgetMgr=r,this.lastFormId=s))}disconnect(){var r;(r=this.formClearListener)==null||r.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function d({element:e,widgetMgr:r,onFormCleared:s}){o.useEffect(()=>{if(!i(e.formId))return;const t=r.addFormClearedListener(e.formId,s);return()=>{t.disconnect()}},[e,r,s])}export{l as F,d as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t}from"./index.
|
1
|
+
import{r as t}from"./index.Bomzp8ws.js";const o=r=>{const e=t.useRef();return t.useEffect(()=>{e.current=r},[r]),e.current};export{o as u};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as g,k as d,j as l,
|
1
|
+
import{n as g,k as d,j as l,c4 as p,c5 as f}from"./index.Bomzp8ws.js";const I=d("50%{color:rgba(0,0,0,0);}"),$=g("span",{target:"eva3uk20"})(({includeDot:n,shouldBlink:s,theme:t})=>({...n?{"&::before":{opacity:1,content:'"•"',animation:"none",color:t.colors.gray,margin:`0 ${t.spacing.twoXS}`}}:{},...s?{color:t.colors.red,animationName:`${I}`,animationDuration:"0.5s",animationIterationCount:5}:{}})),b=({dirty:n,value:s,inForm:t,maxLength:a,className:m,type:i="single",allowEnterToSubmit:u=!0})=>{const o=[],r=(e,c=!1)=>{o.push(l($,{includeDot:o.length>0,shouldBlink:c,children:e},o.length))};if(u){const e=t?"submit form":"apply";if(i==="multiline"){const c=f()?"⌘":"Ctrl";r(`Press ${c}+Enter to ${e}`)}else i==="single"&&r(`Press Enter to ${e}`)}return a&&(i!=="chat"||n)&&r(`${s.length}/${a}`,n&&s.length>=a),l(p,{"data-testid":"InputInstructions",className:m,children:o})};export{b as I};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,r){if(e){if(typeof e=="string")return oe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oe(e,r)}}function oe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function Xe(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a=[],n=!0,o=!1,i,s;try{for(t=t.call(e);!(n=(i=t.next()).done)&&(a.push(i.value),!(r&&a.length===r));n=!0);}catch(l){o=!0,s=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw s}}return a}}function Ve(e){if(Array.isArray(e))return e}function Ie(e,r){if(e==null)return{};var t=Ae(e,r),a,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}function Ae(e,r){if(e==null)return{};var t={},a=Object.keys(e),n,o;for(o=0;o<a.length;o++)n=a[o],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function Me(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function De(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function He(e,r,t){return r&&De(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function We(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&V(e,r)}function V(e,r){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},V(e,r)}function Fe(e){var r=Ze();return function(){var a=E(e),n;if(r){var o=E(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return Ge(this,n)}}function Ge(e,r){if(r&&(X(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ue(e)}function Ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(e)}function
|
1
|
+
import{br as g,c2 as Le,c3 as I,R as C,r as d,bs as O,ab as xe,ax as Te,bY as ke,j as ze,bO as Ee}from"./index.Bomzp8ws.js";var y={small:"small",medium:"medium",large:"large"},_;function L(){return L=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},L.apply(this,arguments)}function ae(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,a)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ae(Object(t),!0).forEach(function(a){v(e,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ae(Object(t)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))})}return e}function v(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function se(e){var r;return(r={},v(r,y.small,"2px"),v(r,y.medium,"4px"),v(r,y.large,"8px"),r)[e]}var A=g("div",function(e){return{width:"100%"}});A.displayName="StyledRoot";A.displayName="StyledRoot";var M=g("div",function(e){var r=e.$theme,t=r.sizing;return{display:"flex",marginLeft:t.scale500,marginRight:t.scale500,marginTop:t.scale500,marginBottom:t.scale500}});M.displayName="StyledBarContainer";M.displayName="StyledBarContainer";var D=g("div",function(e){var r=e.$theme,t=e.$size,a=e.$steps,n=r.colors,o=r.sizing,i=r.borders,s=i.useRoundedCorners?o.scale0:0;return P({borderTopLeftRadius:s,borderTopRightRadius:s,borderBottomRightRadius:s,borderBottomLeftRadius:s,backgroundColor:Le(n.progressbarTrackFill,"0.16"),height:se(t),flex:1,overflow:"hidden"},a<2?{}:{marginLeft:o.scale300,":first-child":{marginLeft:"0"}})});D.displayName="StyledBar";D.displayName="StyledBar";var H=g("div",function(e){var r=e.$theme,t=e.$value,a=e.$successValue,n=e.$steps,o=e.$index,i=e.$maxValue,s=e.$minValue,l=s===void 0?0:s,u=i||a,R=r.colors,B=r.sizing,$=r.borders,x="".concat(100-(t-l)*100/(u-l),"%"),m={default:"default",awaits:"awaits",inProgress:"inProgress",completed:"completed"},c=m.default;if(n>1){var T=(u-l)/n,j=(t-l)/(u-l)*100,k=Math.floor(j/T);o<k?c=m.completed:o===k?c=m.inProgress:c=m.awaits}var S=$.useRoundedCorners?B.scale0:0,b={transform:"translateX(-".concat(x,")")},N=c===m.inProgress?{animationDuration:"2.1s",animationIterationCount:"infinite",animationTimingFunction:r.animation.linearCurve,animationName:{"0%":{transform:"translateX(-102%)",opacity:1},"50%":{transform:"translateX(0%)",opacity:1},"100%":{transform:"translateX(0%)",opacity:0}}}:c===m.completed?{transform:"translateX(0%)"}:{transform:"translateX(-102%)"};return P({borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,backgroundColor:R.accent,height:"100%",width:"100%",transform:"translateX(-102%)",transition:"transform 0.5s"},n>1?N:b)});H.displayName="StyledBarProgress";H.displayName="StyledBarProgress";var W=g("div",function(e){var r=e.$theme,t=e.$isLeft,a=t===void 0?!1:t,n=e.$size,o=n===void 0?y.medium:n,i=r.colors,s=r.sizing,l=r.borders,u=l.useRoundedCorners?s.scale0:0,R=se(o),B={display:"inline-block",flex:1,marginLeft:"auto",marginRight:"auto",transitionProperty:"background-position",animationDuration:"1.5s",animationIterationCount:"infinite",animationTimingFunction:r.animation.linearCurve,backgroundSize:"300% auto",backgroundRepeat:"no-repeat",backgroundPositionX:a?"-50%":"150%",backgroundImage:"linear-gradient(".concat(a?"90":"270","deg, transparent 0%, ").concat(i.accent," 25%, ").concat(i.accent," 75%, transparent 100%)"),animationName:a?{"0%":{backgroundPositionX:"-50%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"150%"}}:{"0%":{backgroundPositionX:"150%"},"33%":{backgroundPositionX:"50%"},"66%":{backgroundPositionX:"50%"},"100%":{backgroundPositionX:"-50%"}}};return P(P({},a?{borderTopLeftRadius:u,borderBottomLeftRadius:u}:{borderTopRightRadius:u,borderBottomRightRadius:u}),{},{height:R},B)});W.displayName="StyledInfiniteBar";W.displayName="StyledInfiniteBar";var F=g("div",function(e){return P(P({textAlign:"center"},e.$theme.typography.font150),{},{color:e.$theme.colors.contentTertiary})});F.displayName="StyledLabel";F.displayName="StyledLabel";var f=(_={},v(_,y.large,{d:"M47.5 4H71.5529C82.2933 4 91 12.9543 91 24C91 35.0457 82.2933 44 71.5529 44H23.4471C12.7067 44 4 35.0457 4 24C4 12.9543 12.7067 4 23.4471 4H47.5195",width:95,height:48,strokeWidth:8,typography:"LabelLarge"}),v(_,y.medium,{d:"M39 2H60.5833C69.0977 2 76 9.16344 76 18C76 26.8366 69.0977 34 60.5833 34H17.4167C8.90228 34 2 26.8366 2 18C2 9.16344 8.90228 2 17.4167 2H39.0195",width:78,height:36,strokeWidth:4,typography:"LabelMedium"}),v(_,y.small,{d:"M32 1H51.6271C57.9082 1 63 6.37258 63 13C63 19.6274 57.9082 25 51.6271 25H12.3729C6.09181 25 1 19.6274 1 13C1 6.37258 6.09181 1 12.3729 1H32.0195",width:64,height:26,strokeWidth:2,typography:"LabelSmall"}),_),le=g("div",function(e){var r=e.$size,t=e.$inline;return{width:f[r].width+"px",height:f[r].height+"px",position:"relative",display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}});le.displayName="StyledProgressBarRoundedRoot";le.displayName="StyledProgressBarRoundedRoot";var G=g("svg",function(e){var r=e.$size;return{width:f[r].width+"px",height:f[r].height+"px",position:"absolute",fill:"none"}});G.displayName="_StyledProgressBarRoundedSvg";G.displayName="_StyledProgressBarRoundedSvg";I(G,function(e){return function(t){return C.createElement(e,L({viewBox:"0 0 ".concat(f[t.$size].width," ").concat(f[t.$size].height),xmlns:"http://www.w3.org/2000/svg"},t))}});var U=g("path",function(e){var r=e.$theme,t=e.$size;return{stroke:r.colors.backgroundTertiary,strokeWidth:f[t].strokeWidth+"px"}});U.displayName="_StyledProgressBarRoundedTrackBackground";U.displayName="_StyledProgressBarRoundedTrackBackground";I(U,function(e){return function(t){return C.createElement(e,L({d:f[t.$size].d},t))}});var Z=g("path",function(e){var r=e.$theme,t=e.$size,a=e.$visible,n=e.$pathLength,o=e.$pathProgress;return{visibility:a?"visible":"hidden",stroke:r.colors.borderAccent,strokeWidth:f[t].strokeWidth+"px",strokeDasharray:n,strokeDashoffset:n*(1-o)+""}});Z.displayName="_StyledProgressBarRoundedTrackForeground";Z.displayName="_StyledProgressBarRoundedTrackForeground";I(Z,function(e){return function(t){return C.createElement(e,L({d:f[t.$size].d},t))}});var ue=g("div",function(e){var r=e.$theme,t=e.$size;return P({color:r.colors.contentPrimary},r.typography[f[t].typography])});ue.displayName="StyledProgressBarRoundedText";ue.displayName="StyledProgressBarRoundedText";function X(e){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},X(e)}var Ce=["overrides","getProgressLabel","value","size","steps","successValue","minValue","maxValue","showLabel","infinite","errorMessage","forwardedRef"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},p.apply(this,arguments)}function w(e,r){return Ve(e)||Xe(e,r)||Ne(e,r)||je()}function je(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,r){if(e){if(typeof e=="string")return oe(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return oe(e,r)}}function oe(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function Xe(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var a=[],n=!0,o=!1,i,s;try{for(t=t.call(e);!(n=(i=t.next()).done)&&(a.push(i.value),!(r&&a.length===r));n=!0);}catch(l){o=!0,s=l}finally{try{!n&&t.return!=null&&t.return()}finally{if(o)throw s}}return a}}function Ve(e){if(Array.isArray(e))return e}function Ie(e,r){if(e==null)return{};var t=Ae(e,r),a,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)a=o[n],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}function Ae(e,r){if(e==null)return{};var t={},a=Object.keys(e),n,o;for(o=0;o<a.length;o++)n=a[o],!(r.indexOf(n)>=0)&&(t[n]=e[n]);return t}function Me(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function De(e,r){for(var t=0;t<r.length;t++){var a=r[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function He(e,r,t){return r&&De(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function We(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&V(e,r)}function V(e,r){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},V(e,r)}function Fe(e){var r=Ze();return function(){var a=E(e),n;if(r){var o=E(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return Ge(this,n)}}function Ge(e,r){if(r&&(X(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ue(e)}function Ue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(e)}function Ke(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var de=function(e){We(t,e);var r=Fe(t);function t(){return Me(this,t),r.apply(this,arguments)}return He(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var n=this.props,o=n.overrides,i=o===void 0?{}:o,s=n.getProgressLabel,l=n.value,u=n.size,R=n.steps,B=n.successValue,$=n.minValue,x=n.maxValue,m=n.showLabel,c=n.infinite,T=n.errorMessage,j=n.forwardedRef,k=Ie(n,Ce),S=this.props["aria-label"]||this.props.ariaLabel,b=x!==100?x:B,N=O(i.Root,A),K=w(N,2),fe=K[0],ge=K[1],pe=O(i.BarContainer,M),Y=w(pe,2),me=Y[0],ye=Y[1],be=O(i.Bar,D),q=w(be,2),he=q[0],ve=q[1],Pe=O(i.BarProgress,H),J=w(Pe,2),Re=J[0],$e=J[1],Se=O(i.Label,F),Q=w(Se,2),Oe=Q[0],we=Q[1],Be=O(i.InfiniteBar,W),ee=w(Be,2),re=ee[0],te=ee[1],h={$infinite:c,$size:u,$steps:R,$successValue:b,$minValue:$,$maxValue:b,$value:l};function _e(){for(var ne=[],z=0;z<R;z++)ne.push(d.createElement(he,p({key:z},h,ve),d.createElement(Re,p({$index:z},h,$e))));return ne}return d.createElement(fe,p({ref:j,"data-baseweb":"progress-bar",role:"progressbar","aria-label":S||s(l,b,$),"aria-valuenow":c?null:l,"aria-valuemin":c?null:$,"aria-valuemax":c?null:b,"aria-invalid":T?!0:null,"aria-errormessage":T},k,h,ge),d.createElement(me,p({},h,ye),c?d.createElement(d.Fragment,null,d.createElement(re,p({$isLeft:!0,$size:h.$size},te)),d.createElement(re,p({$size:h.$size},te))):_e()),m&&d.createElement(Oe,p({},h,we),s(l,b,$)))}}]),t}(d.Component);Ke(de,"defaultProps",{getProgressLabel:function(r,t,a){return"".concat(Math.round((r-a)/(t-a)*100),"% Loaded")},infinite:!1,overrides:{},showLabel:!1,size:y.medium,steps:1,successValue:100,minValue:0,maxValue:100,value:0});var ce=d.forwardRef(function(e,r){return d.createElement(de,p({forwardedRef:r},e))});ce.displayName="ProgressBar";var ie;(function(e){e.EXTRASMALL="xs",e.SMALL="sm",e.MEDIUM="md",e.LARGE="lg",e.EXTRALARGE="xl"})(ie||(ie={}));function qe({value:e,width:r,size:t="sm",overrides:a}){const n=xe(),o={xs:n.spacing.twoXS,sm:n.spacing.sm,md:n.spacing.lg,lg:n.spacing.xl,xl:n.spacing.twoXL},{activeTheme:i}=C.useContext(Te),s=!ke(i),l={BarContainer:{style:{marginTop:n.spacing.none,marginBottom:n.spacing.none,marginRight:n.spacing.none,marginLeft:n.spacing.none}},Bar:{style:({$theme:u})=>({width:r?r.toString():void 0,marginTop:n.spacing.none,marginBottom:n.spacing.none,marginRight:n.spacing.none,marginLeft:n.spacing.none,height:o[t],backgroundColor:u.colors.progressbarTrackFill,borderTopLeftRadius:n.spacing.twoXS,borderTopRightRadius:n.spacing.twoXS,borderBottomLeftRadius:n.spacing.twoXS,borderBottomRightRadius:n.spacing.twoXS})},BarProgress:{style:()=>({backgroundColor:s?n.colors.primary:n.colors.blue70,borderTopLeftRadius:n.spacing.twoXS,borderTopRightRadius:n.spacing.twoXS,borderBottomLeftRadius:n.spacing.twoXS,borderBottomRightRadius:n.spacing.twoXS})}};return ze(ce,{value:e,overrides:Ee(l,a)})}export{qe as P,ie as S};
|
streamlit/static/static/js/{RenderInPortalIfExists.BThihgkd.js → RenderInPortalIfExists.DrsDyygs.js}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
import{n as i,r as s,j as r,a as d,P as m,b as p,F as P}from"./index.
|
1
|
+
import{n as i,r as s,j as r,a as d,P as m,b as p,F as P}from"./index.Bomzp8ws.js";const x=i("div",{target:"e1swy67l0"})({"@media print":{display:"none"}}),y=({className:t,scriptRunId:a,numParticles:e,numParticleTypes:o,ParticleComponent:n})=>r(x,{className:t,"data-testid":t,children:d(e).map(l=>{const c=Math.floor(Math.random()*o);return r(n,{particleType:c},a+l)})}),E=s.memo(y),f=({children:t})=>{var e;const a=(e=s.useContext(m))==null?void 0:e();return a?p.createPortal(t,a):r(P,{children:t})};export{E as P,f as R};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as a,E as
|
1
|
+
import{r as a,E as m,_ as p,n as d,av as b,ab as x,j as n,bq as g,as as y,b7 as E,ay as h,b3 as T,bk as w,bl as z}from"./index.Bomzp8ws.js";var f=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});f.displayName="Fullscreen";var u=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(m,p({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});u.displayName="FullscreenExit";const c="-2.4rem",B=d("div",{target:"esvuqrb0"})(({theme:t,locked:o,target:e})=>({padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:o?c:"-1rem",right:t.spacing.none,transition:"none",...!o&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c},...e&&{[`${e}:hover &, ${e}:active &, ${e}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c}}}})),V=d("div",{target:"esvuqrb1"})(({theme:t})=>({color:b(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1})),H=d("div",{target:"esvuqrb2"})(({width:t,height:o,useContainerWidth:e,topCentered:s})=>({position:"relative",height:e&&o?o:"fit-content",width:e?t:"fit-content",maxWidth:"100%",...s?{display:"flex",justifyContent:"center"}:{}}));function v({label:t,show_label:o,icon:e,onClick:s}){const l=x(),i=o?t:"";return n("div",{"data-testid":"stElementToolbarButton",children:n(g,{content:n(y,{source:t,allowHTML:!1,style:{fontSize:l.fontSizes.sm}}),placement:E.TOP,onMouseEnterDelay:1e3,inline:!0,children:h(z,{onClick:r=>{s&&s(),r.stopPropagation()},kind:T.ELEMENT_TOOLBAR,"aria-label":t,children:[e&&n(w,{content:e,size:"md",testid:"stElementToolbarButtonIcon"}),i&&n("span",{children:i})]})})})}const M=({onExpand:t,onCollapse:o,isFullScreen:e,locked:s,children:l,target:i,disableFullscreenMode:r})=>n(B,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:s||e,target:i,children:h(V,{children:[l,t&&!r&&!e&&n(v,{label:"Fullscreen",icon:f,onClick:()=>t()}),o&&!r&&e&&n(v,{label:"Close fullscreen",icon:u,onClick:()=>o()})]})});export{H as S,M as T,v as a};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as y,
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(e,t){if(e){if(typeof e=="string")return
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Te(e){if(Array.isArray(e))return e}function ke(e,t){var r=oe(),n=Ie(r,2),o=n[1],i=e.title,a=i===void 0?"Show":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,g=Se(e,Ce),b=ie({component:o.icons&&o.icons.Show?o.icons.Show:null},d&&d.Svg?ae(d.Svg):{});return y.createElement(le,K({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},g),y.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Re=y.forwardRef(ke);function ee(e,t){var r=e.disabled,n=e.error,o=e.positive,i=e.adjoined,a=e.size,l=e.required,u=e.resize,c=e.readOnly,d=t.isFocused;return{$isFocused:d,$disabled:r,$error:n,$positive:o,$adjoined:i,$size:a,$required:l,$resize:u,$isReadOnly:c}}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?te(Object(r),!0).forEach(function(n){p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return 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}var W=F("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},p(t,s.mini,r.sizing.scale400),p(t,s.compact,r.sizing.scale400),p(t,s.default,r.sizing.scale300),p(t,s.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});W.displayName="StyledMaskToggleButton";W.displayName="StyledMaskToggleButton";var
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
1
|
+
import{r as y,bI as oe,bJ as ie,bK as ae,bL as le,br as F,c7 as s,c8 as de,c9 as w,bB as J,c6 as z,bs as C,bR as Y,bS as G}from"./index.Bomzp8ws.js";var pe=["title","size","color","overrides"];function D(){return D=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},D.apply(this,arguments)}function fe(e,t){if(e==null)return{};var r=ye(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ye(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function ge(e,t){return me(e)||ve(e,t)||he(e,t)||be()}function be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function he(e,t){if(e){if(typeof e=="string")return Q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q(e,t)}}function Q(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function me(e){if(Array.isArray(e))return e}function $e(e,t){var r=oe(),n=ge(r,2),o=n[1],i=e.title,a=i===void 0?"Hide":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,g=fe(e,pe),b=ie({component:o.icons&&o.icons.Hide?o.icons.Hide:null},d&&d.Svg?ae(d.Svg):{});return y.createElement(le,D({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},g),y.createElement("path",{d:"M12.81 4.36l-1.77 1.78a4 4 0 00-4.9 4.9l-2.76 2.75C2.06 12.79.96 11.49.2 10a11 11 0 0112.6-5.64zm3.8 1.85c1.33 1 2.43 2.3 3.2 3.79a11 11 0 01-12.62 5.64l1.77-1.78a4 4 0 004.9-4.9l2.76-2.75zm-.25-3.99l1.42 1.42L3.64 17.78l-1.42-1.42L16.36 2.22z"}))}const Oe=y.forwardRef($e);var Ce=["title","size","color","overrides"];function K(){return K=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},K.apply(this,arguments)}function Se(e,t){if(e==null)return{};var r=_e(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function _e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ie(e,t){return Te(e)||Fe(e,t)||we(e,t)||Pe()}function Pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Fe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Te(e){if(Array.isArray(e))return e}function ke(e,t){var r=oe(),n=Ie(r,2),o=n[1],i=e.title,a=i===void 0?"Show":i,l=e.size,u=e.color,c=e.overrides,d=c===void 0?{}:c,g=Se(e,Ce),b=ie({component:o.icons&&o.icons.Show?o.icons.Show:null},d&&d.Svg?ae(d.Svg):{});return y.createElement(le,K({viewBox:"0 0 20 20",ref:t,title:a,size:l,color:u,overrides:{Svg:b}},g),y.createElement("path",{d:"M.2 10a11 11 0 0119.6 0A11 11 0 01.2 10zm9.8 4a4 4 0 100-8 4 4 0 000 8zm0-2a2 2 0 110-4 2 2 0 010 4z"}))}const Re=y.forwardRef(ke);function ee(e,t){var r=e.disabled,n=e.error,o=e.positive,i=e.adjoined,a=e.size,l=e.required,u=e.resize,c=e.readOnly,d=t.isFocused;return{$isFocused:d,$disabled:r,$error:n,$positive:o,$adjoined:i,$size:a,$required:l,$resize:u,$isReadOnly:c}}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?te(Object(r),!0).forEach(function(n){p(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return 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}var W=F("button",function(e){var t,r=e.$theme,n=e.$size,o=e.$isFocusVisible,i=(t={},p(t,s.mini,r.sizing.scale400),p(t,s.compact,r.sizing.scale400),p(t,s.default,r.sizing.scale300),p(t,s.large,r.sizing.scale200),t)[n];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:i,paddingRight:i,outline:o?"solid 3px ".concat(r.colors.accent):"none",color:r.colors.contentPrimary}});W.displayName="StyledMaskToggleButton";W.displayName="StyledMaskToggleButton";var Z=F("div",function(e){var t,r=e.$alignTop,n=r===void 0?!1:r,o=e.$size,i=e.$theme,a=(t={},p(t,s.mini,i.sizing.scale200),p(t,s.compact,i.sizing.scale200),p(t,s.default,i.sizing.scale100),p(t,s.large,i.sizing.scale0),t)[o];return{display:"flex",alignItems:n?"flex-start":"center",paddingLeft:a,paddingRight:a,paddingTop:n?i.sizing.scale500:"0px",color:i.colors.contentPrimary}});Z.displayName="StyledClearIconContainer";Z.displayName="StyledClearIconContainer";var H=F(de,function(e){var t=e.$theme,r=e.$isFocusVisible;return{cursor:"pointer",outline:r?"solid 3px ".concat(t.colors.accent):"none"}});H.displayName="StyledClearIcon";H.displayName="StyledClearIcon";function Ee(e,t){var r;return(r={},p(r,s.mini,{paddingTop:t.scale100,paddingBottom:t.scale100,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.compact,{paddingTop:t.scale200,paddingBottom:t.scale200,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.default,{paddingTop:t.scale400,paddingBottom:t.scale400,paddingLeft:t.scale550,paddingRight:t.scale550}),p(r,s.large,{paddingTop:t.scale550,paddingBottom:t.scale550,paddingLeft:t.scale550,paddingRight:t.scale550}),r)[e]}function xe(e,t,r,n,o){var i=e===w.both||e===w.left&&n!=="rtl"||e===w.right&&n==="rtl"||o&&n==="rtl",a=e===w.both||e===w.right&&n!=="rtl"||e===w.left&&n==="rtl"||o&&n!=="rtl";return{paddingLeft:i?r.scale550:"0px",paddingRight:a?r.scale550:"0px"}}function A(e,t){var r;return(r={},p(r,s.mini,t.font100),p(r,s.compact,t.font200),p(r,s.default,t.font300),p(r,s.large,t.font400),r)[e]}function Be(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:o.inputFillDisabled,borderRightColor:o.inputFillDisabled,borderTopColor:o.inputFillDisabled,borderBottomColor:o.inputFillDisabled,backgroundColor:o.inputFillDisabled}:t?{borderLeftColor:o.borderSelected,borderRightColor:o.borderSelected,borderTopColor:o.borderSelected,borderBottomColor:o.borderSelected,backgroundColor:o.inputFillActive}:r?{borderLeftColor:o.inputBorderError,borderRightColor:o.inputBorderError,borderTopColor:o.inputBorderError,borderBottomColor:o.inputBorderError,backgroundColor:o.inputFillError}:n?{borderLeftColor:o.inputBorderPositive,borderRightColor:o.inputBorderPositive,borderTopColor:o.inputBorderPositive,borderBottomColor:o.inputBorderPositive,backgroundColor:o.inputFillPositive}:{borderLeftColor:o.inputBorder,borderRightColor:o.inputBorder,borderTopColor:o.inputBorder,borderBottomColor:o.inputBorder,backgroundColor:o.inputFill}}function je(e,t){var r=t.inputBorderRadius;return e===s.mini&&(r=t.inputBorderRadiusMini),{borderTopLeftRadius:r,borderBottomLeftRadius:r,borderTopRightRadius:r,borderBottomRightRadius:r}}var Ae=function(t){var r=t.$isFocused,n=t.$adjoined,o=t.$error,i=t.$disabled,a=t.$positive,l=t.$size,u=t.$theme,c=t.$theme,d=c.borders,g=c.colors,b=c.sizing,I=c.typography,$=c.animation,_=t.$hasIconTrailing;return h(h(h(h({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:$.timing200,transitionTimingFunction:$.easeOutCurve},je(l,d)),A(l,I)),Be(i,r,o,a,g)),xe(n,l,b,u.direction,_))},se=F("div",Ae);se.displayName="Root";se.displayName="Root";function Me(e,t){var r;return(r={},p(r,s.mini,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.compact,{paddingRight:t.scale400,paddingLeft:t.scale400}),p(r,s.default,{paddingRight:t.scale300,paddingLeft:t.scale300}),p(r,s.large,{paddingRight:t.scale200,paddingLeft:t.scale200}),r)[e]}function Le(e,t,r,n,o){return e?{color:o.inputEnhancerTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var ue=F("div",function(e){var t=e.$size,r=e.$disabled,n=e.$isFocused,o=e.$error,i=e.$positive,a=e.$theme,l=a.colors,u=a.sizing,c=a.typography,d=a.animation;return h(h(h({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},A(t,c)),Me(t,u)),Le(r,n,o,i,l))});ue.displayName="InputEnhancer";ue.displayName="InputEnhancer";function ze(e,t,r,n,o){return e?{color:o.inputTextDisabled,backgroundColor:o.inputFillDisabled}:t?{color:o.contentPrimary,backgroundColor:o.inputFillActive}:r?{color:o.contentPrimary,backgroundColor:o.inputFillError}:n?{color:o.contentPrimary,backgroundColor:o.inputFillPositive}:{color:o.contentPrimary,backgroundColor:o.inputFill}}var De=function(t){var r=t.$isFocused,n=t.$error,o=t.$disabled,i=t.$positive,a=t.$size,l=t.$theme,u=l.colors,c=l.typography,d=l.animation;return h(h({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:d.timing200,transitionTimingFunction:d.easeOutCurve},A(a,c)),ze(o,r,n,i,u))},U=F("div",De);U.displayName="InputContainer";U.displayName="InputContainer";function Ke(e,t,r,n){return e?{color:n.inputTextDisabled,"-webkit-text-fill-color":n.inputTextDisabled,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholderDisabled}}:{color:n.contentPrimary,caretColor:n.contentPrimary,"::placeholder":{color:n.inputPlaceholder}}}var Ne=function(t){var r=t.$disabled,n=t.$isFocused,o=t.$error,i=t.$size,a=t.$theme,l=a.colors,u=a.sizing,c=a.typography;return h(h(h({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:r?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},A(i,c)),Ee(i,u)),Ke(r,n,o,l))},q=F("input",Ne);q.displayName="Input";q.displayName="Input";function Ve(e){var t;return typeof window.Event=="function"?t=new window.Event(e,{bubbles:!0,cancelable:!0}):(t=document.createEvent("Event"),t.initEvent(e,!0,!0)),t}function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function m(){return m=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},m.apply(this,arguments)}function S(e,t){return Ue(e)||He(e,t)||Ze(e,t)||We()}function We(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){if(e){if(typeof e=="string")return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return re(e,t)}}function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function He(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,l;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw l}}return n}}function Ue(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(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 Ye(e,t,r){return t&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ge(e,t){if(typeof t!="function"&&t!==null)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&&V(e,t)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},V(e,t)}function Qe(e){var t=et();return function(){var n=j(e),o;if(t){var i=j(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Xe(this,o)}}function Xe(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function et(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},j(e)}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ne=function(){return null},tt=function(e){Ge(r,e);var t=Qe(r);function r(){var n;qe(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),f(v(n),"inputRef",n.props.inputRef||y.createRef()),f(v(n),"state",{isFocused:n.props.autoFocus||!1,isMasked:n.props.type==="password",initialType:n.props.type,isFocusVisibleForClear:!1,isFocusVisibleForMaskToggle:!1}),f(v(n),"onInputKeyDown",function(l){n.props.clearOnEscape&&l.key==="Escape"&&n.inputRef.current&&!n.props.readOnly&&(n.clearValue(),l.stopPropagation())}),f(v(n),"onClearIconClick",function(){n.inputRef.current&&n.clearValue(),n.inputRef.current&&n.inputRef.current.focus()}),f(v(n),"onFocus",function(l){n.setState({isFocused:!0}),n.props.onFocus(l)}),f(v(n),"onBlur",function(l){n.setState({isFocused:!1}),n.props.onBlur(l)}),f(v(n),"handleFocusForMaskToggle",function(l){J(l)&&n.setState({isFocusVisibleForMaskToggle:!0})}),f(v(n),"handleBlurForMaskToggle",function(l){n.state.isFocusVisibleForMaskToggle!==!1&&n.setState({isFocusVisibleForMaskToggle:!1})}),f(v(n),"handleFocusForClear",function(l){J(l)&&n.setState({isFocusVisibleForClear:!0})}),f(v(n),"handleBlurForClear",function(l){n.state.isFocusVisibleForClear!==!1&&n.setState({isFocusVisibleForClear:!1})}),n}return Ye(r,[{key:"componentDidMount",value:function(){var o=this.props,i=o.autoFocus,a=o.clearable;this.inputRef.current&&(i&&this.inputRef.current.focus(),a&&this.inputRef.current.addEventListener("keydown",this.onInputKeyDown))}},{key:"componentWillUnmount",value:function(){var o=this.props.clearable;o&&this.inputRef.current&&this.inputRef.current.removeEventListener("keydown",this.onInputKeyDown)}},{key:"clearValue",value:function(){var o=this.inputRef.current;if(o){var i=Object.getOwnPropertyDescriptor(this.props.type===z.textarea?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,"value");if(i){var a=i.set;if(a){a.call(o,"");var l=Ve("input");o.dispatchEvent(l)}}}}},{key:"getInputType",value:function(){return this.props.type==="password"?this.state.isMasked?"password":"text":this.props.type}},{key:"renderMaskToggle",value:function(){var o,i=this;if(this.props.type!=="password")return null;var a=C(this.props.overrides.MaskToggleButton,W),l=S(a,2),u=l[0],c=l[1],d=C(this.props.overrides.MaskToggleShowIcon,Re),g=S(d,2),b=g[0],I=g[1],$=C(this.props.overrides.MaskToggleHideIcon,Oe),_=S($,2),T=_[0],x=_[1],O=this.state.isMasked?"Show password text":"Hide password text",k=(o={},f(o,s.mini,"12px"),f(o,s.compact,"16px"),f(o,s.default,"20px"),f(o,s.large,"24px"),o)[this.props.size];return y.createElement(u,m({$size:this.props.size,$isFocusVisible:this.state.isFocusVisibleForMaskToggle,"aria-label":O,onClick:function(){return i.setState(function(R){return{isMasked:!R.isMasked}})},title:O,type:"button"},c,{onFocus:Y(c,this.handleFocusForMaskToggle),onBlur:G(c,this.handleBlurForMaskToggle)}),this.state.isMasked?y.createElement(b,m({size:k,title:O},I)):y.createElement(T,m({size:k,title:O},x)))}},{key:"renderClear",value:function(){var o,i=this,a=this.props,l=a.clearable,u=a.value,c=a.disabled,d=a.readOnly,g=a.overrides,b=g===void 0?{}:g;if(c||d||!l||u==null||typeof u=="string"&&u.length===0)return null;var I=C(b.ClearIconContainer,Z),$=S(I,2),_=$[0],T=$[1],x=C(b.ClearIcon,H),O=S(x,2),k=O[0],P=O[1],R="Clear value",B=ee(this.props,this.state),M=(o={},f(o,s.mini,"14px"),f(o,s.compact,"14px"),f(o,s.default,"16px"),f(o,s.large,"22px"),o)[this.props.size];return y.createElement(_,m({$alignTop:this.props.type===z.textarea},B,T),y.createElement(k,m({size:M,tabIndex:0,title:R,"aria-label":R,onClick:this.onClearIconClick,onKeyDown:function(E){E.key&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),i.onClearIconClick())},role:"button",$isFocusVisible:this.state.isFocusVisibleForClear},B,P,{onFocus:Y(P,this.handleFocusForClear),onBlur:G(P,this.handleBlurForClear)})))}},{key:"render",value:function(){var o=this.props.overrides,i=o.InputContainer,a=o.Input,l=o.Before,u=o.After,c=this.state.initialType==="password"&&this.props.autoComplete===r.defaultProps.autoComplete?"new-password":this.props.autoComplete,d=ee(this.props,this.state),g=C(i,U),b=S(g,2),I=b[0],$=b[1],_=C(a,q),T=S(_,2),x=T[0],O=T[1],k=C(l,ne),P=S(k,2),R=P[0],B=P[1],M=C(u,ne),L=S(M,2),E=L[0],ce=L[1];return y.createElement(I,m({"data-baseweb":this.props["data-baseweb"]||"base-input"},d,$),y.createElement(R,m({},d,B)),y.createElement(x,m({ref:this.inputRef,"aria-activedescendant":this.props["aria-activedescendant"],"aria-autocomplete":this.props["aria-autocomplete"],"aria-controls":this.props["aria-controls"],"aria-errormessage":this.props["aria-errormessage"],"aria-haspopup":this.props["aria-haspopup"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-invalid":this.props.error,"aria-required":this.props.required,autoComplete:c,disabled:this.props.disabled,readOnly:this.props.readOnly,id:this.props.id,inputMode:this.props.inputMode,maxLength:this.props.maxLength,name:this.props.name,onBlur:this.onBlur,onChange:this.props.onChange,onFocus:this.onFocus,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onKeyUp:this.props.onKeyUp,pattern:this.props.pattern,placeholder:this.props.placeholder,type:this.getInputType(),required:this.props.required,role:this.props.role,value:this.props.value,min:this.props.min,max:this.props.max,step:this.props.step,rows:this.props.type===z.textarea?this.props.rows:null},d,O)),this.renderClear(),this.renderMaskToggle(),y.createElement(E,m({},d,ce)))}}]),r}(y.Component);f(tt,"defaultProps",{"aria-activedescendant":null,"aria-autocomplete":null,"aria-controls":null,"aria-errormessage":null,"aria-haspopup":null,"aria-label":null,"aria-labelledby":null,"aria-describedby":null,adjoined:w.none,autoComplete:"on",autoFocus:!1,disabled:!1,error:!1,positive:!1,name:"",inputMode:"text",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},onClear:function(){},clearable:!1,clearOnEscape:!0,overrides:{},pattern:null,placeholder:"",required:!1,role:null,size:s.default,type:"text",readOnly:!1});export{tt as B,q as I,se as R,De as a,Ne as b,ue as c,ee as d,Ae as g};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as n,d as s}from"./getPrototypeOf.
|
1
|
+
import{c as n,d as s}from"./getPrototypeOf.8KqRDNXH.js";function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c=function(){return!!t})()}function i(t){var r=c();return function(){var e,o=n(t);if(r){var u=n(this).constructor;e=Reflect.construct(o,arguments,u)}else e=o.apply(this,arguments);return s(this,e)}}export{i as _};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,b as $}from"./index.
|
1
|
+
import{r,b as $}from"./index.Bomzp8ws.js";import{s as z,i as w,a as J,b as Q,T as U,C as Z,m as ee}from"./index.CcAtzCnX.js";import"./FormClearHelper.BouJUO4t.js";import"./withFullScreenWrapper.D8pjpwtz.js";import"./Toolbar.Bl4mqr4u.js";import"./mergeWith.D78ew9Q8.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.CJDXlgcX.js";import"./getPrototypeOf.8KqRDNXH.js";import"./createSuper.BftCasOC.js";import"./FileDownload.esm.2W3WeZp2.js";const te=()=>t=>t.targetX,re=()=>t=>t.targetY,ie=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,se=()=>t=>t.targetY+10,ae=()=>t=>Math.max(0,(t.targetHeight-28)/2),oe=z("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[re(),"px"],"d19meir1-1":[te(),"px"],"d19meir1-2":[ie(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[se(),"px"],"d19meir1-5":[ae(),"px"]}});function de(){const[t,s]=r.useState();return[t??void 0,s]}function le(){const[t,s]=de(),[n,y]=r.useState(0),[g,x]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(o=>{o.length!==0&&x(o[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const o=()=>{const{right:S}=t.getBoundingClientRect();y(p=>Math.min(p+window.innerWidth-S-10,0)),a=requestAnimationFrame(o)};return a=requestAnimationFrame(o),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const O=r.useMemo(()=>({transform:`translateX(${n}px)`}),[n]);return{ref:s,style:O}}const Oe=t=>{const{target:s,content:n,onFinishEditing:y,forceEditMode:g,initialValue:x,imageEditorOverride:O,markdownDivCreateNode:a,highlight:o,className:S,theme:p,id:H,cell:v,bloom:c,validateCell:d,getCellRenderer:F,provideEditor:h,isOutsideClick:X}=t,[l,A]=r.useState(g?n:void 0),k=r.useRef(l??n);k.current=l??n;const[E,R]=r.useState(()=>d===void 0?!0:!(w(n)&&(d==null?void 0:d(v,n,k.current))===!1)),f=r.useCallback((e,i)=>{y(E?e:void 0,i)},[E,y]),K=r.useCallback(e=>{if(d!==void 0&&e!==void 0&&w(e)){const i=d(v,e,k.current);i===!1?R(!1):(typeof i=="object"&&(e=i),R(!0))}A(e)},[v,d]),C=r.useRef(!1),m=r.useRef(void 0),W=r.useCallback(()=>{f(l,[0,0]),C.current=!0},[l,f]),Y=r.useCallback((e,i)=>{f(e,i??m.current??[0,0]),C.current=!0},[f]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!C.current&&m.current!==void 0&&(f(i?l:void 0,m.current),C.current=!0)},0)},[f,l]),D=l??n,[u,q]=r.useMemo(()=>{var i,G;if(J(n))return[];const e=h==null?void 0:h(n);return e!==void 0?[e,!1]:[(G=(i=F(n))==null?void 0:i.provideEditor)==null?void 0:G.call(i,n),!1]},[n,F,h]),{ref:B,style:L}=le();let P=!0,M,_=!0,b;if(u!==void 0){P=u.disablePadding!==!0,_=u.disableStyling!==!0;const e=Q(u);e&&(b=u.styleOverride);const i=e?u.editor:u;M=r.createElement(i,{isHighlighted:o,onChange:K,value:D,initialValue:x,onFinishedEditing:Y,validatedSelection:w(D)?D.selectionRange:void 0,forceEditMode:g,target:s,imageEditorOverride:O,markdownDivCreateNode:a,isValid:E,theme:p})}b={...b,...L};const N=document.getElementById("portal");if(N===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let I=_?"gdg-style":"gdg-unstyle";E||(I+=" gdg-invalid"),P&&(I+=" gdg-pad");const T=(c==null?void 0:c[0])??1,V=(c==null?void 0:c[1])??1;return $.createPortal(r.createElement(U.Provider,{value:p},r.createElement(Z,{style:ee(p),className:S,onClickOutside:W,isOutsideClick:X},r.createElement(oe,{ref:B,id:H,className:I,style:b,as:q===!0?"label":void 0,targetX:s.x-T,targetY:s.y-V,targetWidth:s.width+T*2,targetHeight:s.height+V*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},M)))),N)};export{Oe as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{c as b,e as P}from"./es6.
|
1
|
+
import{c as b,e as P}from"./es6.D2MIDSER.js";import"./index.Bomzp8ws.js";const{WritableStream:y,TransformStream:_,DOMException:v,Blob:u}=b,{GONE:E}=P,M=/constructor/i.test(window.HTMLElement);class F{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new v(...E)}async isSameEntry(e){return this===e}async createWritable(e={}){var d;const t=await((d=navigator.serviceWorker)==null?void 0:d.getRegistration()),o=document.createElement("a"),n=new _,R=n.writable;if(o.download=this.name,M||!t){let r=[];n.readable.pipeTo(new y({write(s){r.push(new u([s]))},close(){const s=new u(r,{type:"application/octet-stream; charset=utf-8"});r=[],o.href=URL.createObjectURL(s),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:r,readablePort:s}=new j(y),a=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),f={"content-disposition":"attachment; filename*=UTF-8''"+a,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},g=setTimeout(()=>t.active.postMessage(0),1e4);n.readable.pipeThrough(new _({transform(c,h){if(c instanceof Uint8Array)return h.enqueue(c);const w=new Response(c).body.getReader(),p=W=>w.read().then(m=>m.done?0:p(h.enqueue(m.value)));return p()}})).pipeTo(r).finally(()=>{clearInterval(g)}),t.active.postMessage({url:t.scope+a,headers:f,readablePort:s},[s]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+a,document.body.appendChild(i)}return R.getWriter()}}const T=0,L=0,O=1,U=1,k=2;class S{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:T,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:k}),this._port.close()}abort(e){this._port.postMessage({type:U,reason:e}),this._port.close()}_onMessage(e){e.type===L&&this._resolveReady(),e.type===O&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class j{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new S(t.port2))}}export{F as FileHandle};
|