streamlit-nightly 1.44.2.dev20250415__py3-none-any.whl → 1.44.2.dev20250416__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/__init__.py +5 -1
- streamlit/elements/lib/file_uploader_utils.py +3 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.DpSDsEwX.js → ErrorOutline.esm.BYHxp3m6.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DRAkCta9.js → FileDownload.esm.ApdK5yXz.js} +1 -1
- streamlit/static/static/js/{FileHelper.B8weo4vC.js → FileHelper.GdWJakHI.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D-LphorD.js → FormClearHelper.DJyHVHSH.js} +1 -1
- streamlit/static/static/js/{Hooks.Bi7tTkGd.js → Hooks.ChGPcfs_.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CfaxjFap.js → InputInstructions.BXUos__H.js} +1 -1
- streamlit/static/static/js/{ProgressBar.B4UgMGDS.js → ProgressBar.OOqvhQG5.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.Cyv8zNLx.js → RenderInPortalIfExists.CyUrss_J.js} +1 -1
- streamlit/static/static/js/{Toolbar.CCh_4t83.js → Toolbar.BHMuD9RK.js} +1 -1
- streamlit/static/static/js/{base-input.DQIDgbB-.js → base-input.DDkkgpGf.js} +1 -1
- streamlit/static/static/js/{checkbox.CFH_6mHD.js → checkbox.MhC8ubRB.js} +1 -1
- streamlit/static/static/js/{createSuper.D4-ztb_I.js → createSuper.CqhU4QuZ.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Bh5xenBN.js → data-grid-overlay-editor.BBwX0oOt.js} +1 -1
- streamlit/static/static/js/{downloader.BLirGk7N.js → downloader.DXPcTUFo.js} +1 -1
- streamlit/static/static/js/{es6.an6cInSd.js → es6.CEXDu3sA.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.BqW3H8tT.js → iframeResizer.contentWindow.DWm0kUUF.js} +1 -1
- streamlit/static/static/js/{index.B4mz1g3p.js → index.6b1mTySV.js} +1 -1
- streamlit/static/static/js/{index.Czs3SnEY.js → index.B-O_wE0K.js} +1 -1
- streamlit/static/static/js/{index.DN_iIZPM.js → index.B06gV0xU.js} +1 -1
- streamlit/static/static/js/{index.BX7m08G2.js → index.B09m8ltk.js} +1 -1
- streamlit/static/static/js/{index.BNrCbTAI.js → index.B1th2sQW.js} +1 -1
- streamlit/static/static/js/{index.Bh4ilwGH.js → index.BN-Cqjtr.js} +1 -1
- streamlit/static/static/js/{index.BBeK6_p7.js → index.BU77_yo5.js} +1 -1
- streamlit/static/static/js/{index.DlLtTPOa.js → index.BYF0MjVi.js} +1 -1
- streamlit/static/static/js/{index.BqDL9XdN.js → index.BghhhCL1.js} +2 -2
- streamlit/static/static/js/{index.DPHQ-k-c.js → index.BlpjlGOL.js} +1 -1
- streamlit/static/static/js/{index.D84g5Ioc.js → index.BmtdqFfB.js} +1 -1
- streamlit/static/static/js/{index.BEVtO2Ts.js → index.C6wX31--.js} +1 -1
- streamlit/static/static/js/{index.Bg2Se7Yz.js → index.CPLoBLa6.js} +1 -1
- streamlit/static/static/js/index.Ch1zIHG2.js +1 -0
- streamlit/static/static/js/{index.RaDZFZ7O.js → index.CsUhYot_.js} +1 -1
- streamlit/static/static/js/{index.ONaU2JWb.js → index.Cwa6nJdn.js} +1 -1
- streamlit/static/static/js/{index.DIzecMyl.js → index.CwjEdNBc.js} +1 -1
- streamlit/static/static/js/{index.fQ7ekjBK.js → index.Cy9Ir-PP.js} +1 -1
- streamlit/static/static/js/{index.j2U8rE_N.js → index.D0O2ysfC.js} +1 -1
- streamlit/static/static/js/{index.BP4BAODr.js → index.D3-O5hIV.js} +1 -1
- streamlit/static/static/js/{index.B1VulLzc.js → index.DCKU7zCS.js} +49 -49
- streamlit/static/static/js/{index.BLr_rSka.js → index.DEkTRzl5.js} +1 -1
- streamlit/static/static/js/{index.Byb6VTEN.js → index.DY1To1KX.js} +1 -1
- streamlit/static/static/js/{index.DeV1lu7_.js → index.DcRGK1Fw.js} +1 -1
- streamlit/static/static/js/{index.BGqvY5qt.js → index.DqnbRXDR.js} +1 -1
- streamlit/static/static/js/{index.Dx6BIgX5.js → index.DvU9hkdF.js} +1 -1
- streamlit/static/static/js/{index.VmnqRsXk.js → index.DzihNvNB.js} +1 -1
- streamlit/static/static/js/{index.BiulHWQY.js → index.F3n9jlGK.js} +1 -1
- streamlit/static/static/js/{index.Woz42eYH.js → index.HNkSYNRg.js} +1 -1
- streamlit/static/static/js/{index.7EHeCBEL.js → index.W-ibDLkH.js} +1 -1
- streamlit/static/static/js/{index.CTgm0tf2.js → index.XtneMYik.js} +1 -1
- streamlit/static/static/js/{index.DxkrGZ4c.js → index.YLN-j6r-.js} +1 -1
- streamlit/static/static/js/{index.XbFLAb00.js → index.a9NsHJhQ.js} +1 -1
- streamlit/static/static/js/{index.BFGrALdH.js → index.b1kLMo8r.js} +1 -1
- streamlit/static/static/js/{index.BC2K_mou.js → index.iO67MDAb.js} +1 -1
- streamlit/static/static/js/{index.B4f6JJgu.js → index.mAm8TEUm.js} +1 -1
- streamlit/static/static/js/{index.B7TWpGOg.js → index.xQw12X8c.js} +5 -5
- streamlit/static/static/js/{input.BlFR_aSs.js → input.D00LElK2.js} +1 -1
- streamlit/static/static/js/{memory.CIFxKzYD.js → memory.CGCErNWl.js} +1 -1
- streamlit/static/static/js/{mergeWith.DkWqXWlC.js → mergeWith.DPocir3h.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.C_GJSWmK.js → number-overlay-editor.C9aaVRxu.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.6fU7Ey-A.js → possibleConstructorReturn.DXXsz__z.js} +1 -1
- streamlit/static/static/js/{sandbox.sXki2ZXo.js → sandbox.Br2VBN1F.js} +1 -1
- streamlit/static/static/js/{textarea.7d3kK4wj.js → textarea.CQnqAl1g.js} +1 -1
- streamlit/static/static/js/{timepicker.x_jFErWh.js → timepicker.BmIoDoBw.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.BPJIfTVP.js → toConsumableArray.CfCqHWaY.js} +1 -1
- streamlit/static/static/js/{uniqueId.wPSWLsMO.js → uniqueId._zK6ugwW.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BGHxUZDu.js → useBasicWidgetState.C_V8mPrP.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.l7dUdah_.js → useOnInputChange.5wieT2fD.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BkB-qCNh.js → withFullScreenWrapper.mszDqn7s.js} +1 -1
- streamlit/type_util.py +0 -1
- streamlit/user_info.py +44 -5
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250416.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250416.dist-info}/RECORD +77 -77
- streamlit/static/static/js/index.2o-NgFGe.js +0 -1
- {streamlit_nightly-1.44.2.dev20250415.data → streamlit_nightly-1.44.2.dev20250416.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250416.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250416.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250415.dist-info → streamlit_nightly-1.44.2.dev20250416.dist-info}/top_level.txt +0 -0
streamlit/user_info.py
CHANGED
@@ -29,6 +29,10 @@ from streamlit.auth_util import (
|
|
29
29
|
is_authlib_installed,
|
30
30
|
validate_auth_credentials,
|
31
31
|
)
|
32
|
+
from streamlit.deprecation_util import (
|
33
|
+
make_deprecated_name_warning,
|
34
|
+
show_deprecation_warning,
|
35
|
+
)
|
32
36
|
from streamlit.errors import StreamlitAPIException, StreamlitAuthError
|
33
37
|
from streamlit.proto.ForwardMsg_pb2 import ForwardMsg
|
34
38
|
from streamlit.runtime.metrics_util import gather_metrics
|
@@ -55,14 +59,14 @@ def login(provider: str | None = None) -> None:
|
|
55
59
|
the user authenticates their identity, they are redirected back to the
|
56
60
|
home page of your app. Streamlit stores a cookie with the user's identity
|
57
61
|
information in the user's browser . You can access the identity information
|
58
|
-
through |st.
|
62
|
+
through |st.user|_. Call ``st.logout()`` to remove the cookie
|
59
63
|
and start a new session.
|
60
64
|
|
61
65
|
You can use any OIDC provider, including Google, Microsoft, Okta, and more.
|
62
66
|
You must configure the provider through secrets management. Although OIDC
|
63
67
|
is an extension of OAuth 2.0, you can't use generic OAuth providers.
|
64
68
|
Streamlit parses the user's identity token and surfaces its attributes in
|
65
|
-
``st.
|
69
|
+
``st.user``. If the provider returns an access token, that
|
66
70
|
token is ignored. Therefore, this command will not allow your app to act on
|
67
71
|
behalf of a user in a secure system.
|
68
72
|
|
@@ -491,10 +495,10 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
491
495
|
raise AttributeError(f'st.experimental_user has no attribute "{key}".')
|
492
496
|
|
493
497
|
def __setattr__(self, name: str, value: str | None) -> NoReturn:
|
494
|
-
raise StreamlitAPIException("st.
|
498
|
+
raise StreamlitAPIException("st.user cannot be modified")
|
495
499
|
|
496
500
|
def __setitem__(self, name: str, value: str | None) -> NoReturn:
|
497
|
-
raise StreamlitAPIException("st.
|
501
|
+
raise StreamlitAPIException("st.user cannot be modified")
|
498
502
|
|
499
503
|
def __iter__(self) -> Iterator[str]:
|
500
504
|
return iter(_get_user_info())
|
@@ -507,7 +511,7 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
507
511
|
Get user info as a dictionary.
|
508
512
|
|
509
513
|
This method primarily exists for internal use and is not needed for
|
510
|
-
most cases. ``st.
|
514
|
+
most cases. ``st.user`` returns an object that inherits from
|
511
515
|
``dict`` by default.
|
512
516
|
|
513
517
|
Returns
|
@@ -516,3 +520,38 @@ class UserInfoProxy(Mapping[str, Union[str, bool, None]]):
|
|
516
520
|
A dictionary of the current user's information.
|
517
521
|
"""
|
518
522
|
return _get_user_info()
|
523
|
+
|
524
|
+
|
525
|
+
has_shown_experimental_user_warning = False
|
526
|
+
|
527
|
+
|
528
|
+
def maybe_show_deprecated_user_warning() -> None:
|
529
|
+
"""Show a deprecation warning for the experimental_user alias."""
|
530
|
+
global has_shown_experimental_user_warning # noqa: PLW0603
|
531
|
+
|
532
|
+
if not has_shown_experimental_user_warning:
|
533
|
+
has_shown_experimental_user_warning = True
|
534
|
+
show_deprecation_warning(
|
535
|
+
make_deprecated_name_warning(
|
536
|
+
"experimental_user",
|
537
|
+
"user",
|
538
|
+
"2025-11-06",
|
539
|
+
)
|
540
|
+
)
|
541
|
+
|
542
|
+
|
543
|
+
class DeprecatedUserInfoProxy(UserInfoProxy):
|
544
|
+
"""
|
545
|
+
A deprecated alias for UserInfoProxy.
|
546
|
+
|
547
|
+
This class is deprecated and will be removed in a future version of
|
548
|
+
Streamlit.
|
549
|
+
"""
|
550
|
+
|
551
|
+
def __getattribute__(self, name: str):
|
552
|
+
maybe_show_deprecated_user_warning()
|
553
|
+
return super().__getattribute__(name)
|
554
|
+
|
555
|
+
def __getitem__(self, key: str):
|
556
|
+
maybe_show_deprecated_user_warning()
|
557
|
+
return super().__getitem__(key)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
streamlit/__init__.py,sha256=
|
1
|
+
streamlit/__init__.py,sha256=JPvwMAOUrMAXccsBG_MJ6omYFdfw614c9J2kcmR03ZA,9817
|
2
2
|
streamlit/__main__.py,sha256=G3Ka6wgeICpC1gI872L7jGQhY4ukAFo3lgnYIqtoBIo,868
|
3
3
|
streamlit/auth_util.py,sha256=T_fe3wXFOoAGNyrxhS8r-SeXMqvWGtU3j9EvQvES8Pc,8496
|
4
4
|
streamlit/cli_util.py,sha256=usVophgZtkDBxqYfiGx07W8NA_d4RUJ7P_EFTgSP-jQ,3383
|
@@ -27,9 +27,9 @@ streamlit/source_util.py,sha256=6xnOW5DC12W2kFep0e7bA8JbqkLX03zMk9JeFHsaEPU,3099
|
|
27
27
|
streamlit/string_util.py,sha256=k6lEDr6HTEsFkVwPJJRlecnHcNMAed-rtdXyWETyspA,6546
|
28
28
|
streamlit/temporary_directory.py,sha256=otAeky0FY-Y8MQtKkFo7QoG6oBclz6IkPUl1hS4gRAc,1627
|
29
29
|
streamlit/time_util.py,sha256=YgsoqQbFPxRhfeWko2C_ah7XkaWrAAE5wjQewQyS92g,2493
|
30
|
-
streamlit/type_util.py,sha256=
|
30
|
+
streamlit/type_util.py,sha256=Tb9huUrKRw5nFIEr5NVeqnH7OLYMGwYh1l7BTR6YWkg,12810
|
31
31
|
streamlit/url_util.py,sha256=akEWwAXTr3D8vyI1CyRcYQPUrMRJvFBWqB8bfIoteY4,3465
|
32
|
-
streamlit/user_info.py,sha256=
|
32
|
+
streamlit/user_info.py,sha256=4xaceJOnnlhJUFQfrnZvUCgO-ddfA2fvzoZj9-MYhFg,21065
|
33
33
|
streamlit/util.py,sha256=AW1Dl076JlnO6oSbDhYnoMJ46QWatqns3jffPHY0znU,2349
|
34
34
|
streamlit/version.py,sha256=Id-r1xqJGJ5ptTPF-_XZpuCIXLqIq5hb8yKOX4IA1Dg,763
|
35
35
|
streamlit/commands/__init__.py,sha256=M4sIyiinWL04bSC-QUcfYDB8Gr-h0uXGjTmL6o2v8jc,616
|
@@ -96,7 +96,7 @@ streamlit/elements/lib/column_types.py,sha256=vxskqk8muMGDkQpR-ZGHnDwd-qEyNeo3Jj
|
|
96
96
|
streamlit/elements/lib/dialog.py,sha256=nRFvrVwKZhORJROu0NcjSHcAP0pukj664WcXU66TJGs,5357
|
97
97
|
streamlit/elements/lib/dicttools.py,sha256=L_WZK_88z_AfVKxRJaSTTD6B3BBr00zZzoxW0FSBX-w,3887
|
98
98
|
streamlit/elements/lib/event_utils.py,sha256=bDmxX4N43uUZXz-b_qJgyYYTAbNNAQqQvSuozQwPr9c,1544
|
99
|
-
streamlit/elements/lib/file_uploader_utils.py,sha256=
|
99
|
+
streamlit/elements/lib/file_uploader_utils.py,sha256=QK0-QuugpUfSLwLg1vuIDIZ4gLWujt5vD2jW09sFEPM,2248
|
100
100
|
streamlit/elements/lib/form_utils.py,sha256=jAJIUrWEddiGw4HEQZvOh-NH7MMxcCrN5J7p4w1HJMY,2587
|
101
101
|
streamlit/elements/lib/image_utils.py,sha256=C3N0PXF6S4gTP5_kiLUW3LJHsIvX0mffgyWe09P4Rqg,15737
|
102
102
|
streamlit/elements/lib/js_number.py,sha256=zxILTUy3ePrTwxxIFEpIudb1OfSvzyxz1fT_Q8T0jMY,3524
|
@@ -355,84 +355,84 @@ streamlit/runtime/state/session_state.py,sha256=GPKLjSShq4iUOvNcMNV8HfECSR251R1g
|
|
355
355
|
streamlit/runtime/state/session_state_proxy.py,sha256=Z_Hw4214J1l7SjrnrFnCwul7p32yaKK2wpFtrghKEAQ,5585
|
356
356
|
streamlit/runtime/state/widgets.py,sha256=ofGjJppIwiqFN9DpBtXQakQifNpxZOVYNPCSyvCWo8Y,5319
|
357
357
|
streamlit/static/favicon.png,sha256=if5cVgw7azxKOvV5FpGixga7JLn23rfnHcy1CdWI1-E,1019
|
358
|
-
streamlit/static/index.html,sha256=
|
358
|
+
streamlit/static/index.html,sha256=uHxkgNews-ezQWITDm5dDyXVWrgAcaUxQNwu_LHTXvM,1837
|
359
359
|
streamlit/static/static/css/index.C5t3M85E.css,sha256=PtcvtHSL-nWJWgVsI19C3yv4M-FvjXSxlSvGCUlpVvY,18462
|
360
360
|
streamlit/static/static/css/index.DqDwtg6_.css,sha256=Hpm4hV8BU7p5GSEu5gjVFkYdQv7qXM4LPiQDKp7vPMA,31692
|
361
361
|
streamlit/static/static/css/index.DzuxGC_t.css,sha256=1D1iN9VtJEU7H_zye_YV2guXskYkxI7PXbq1YXw5JOw,35092
|
362
|
-
streamlit/static/static/js/ErrorOutline.esm.
|
363
|
-
streamlit/static/static/js/FileDownload.esm.
|
364
|
-
streamlit/static/static/js/FileHelper.
|
365
|
-
streamlit/static/static/js/FormClearHelper.
|
366
|
-
streamlit/static/static/js/Hooks.
|
367
|
-
streamlit/static/static/js/InputInstructions.
|
368
|
-
streamlit/static/static/js/ProgressBar.
|
369
|
-
streamlit/static/static/js/RenderInPortalIfExists.
|
370
|
-
streamlit/static/static/js/Toolbar.
|
362
|
+
streamlit/static/static/js/ErrorOutline.esm.BYHxp3m6.js,sha256=FoFxhpXWvU_M6VBQbKeLhiGVE72D6Ga5w-LkgaX4EfQ,499
|
363
|
+
streamlit/static/static/js/FileDownload.esm.ApdK5yXz.js,sha256=fwqTA5F-Sk7RDXL9lqv-dd5d1r1AMtTIjITpF-9XfFo,918
|
364
|
+
streamlit/static/static/js/FileHelper.GdWJakHI.js,sha256=ivwgJo4QIrxMc2mG8M3NIk4deEr2ERolz-fuec5qB44,61609
|
365
|
+
streamlit/static/static/js/FormClearHelper.DJyHVHSH.js,sha256=-wYd4JjCEtjYyL3U_3KWS7Ou9AcRxslathTwyQVf1jE,631
|
366
|
+
streamlit/static/static/js/Hooks.ChGPcfs_.js,sha256=vmWGbQva6JBW0CvIzkLanYyfJwp4V-XUAUyuGwaS2zE,140
|
367
|
+
streamlit/static/static/js/InputInstructions.BXUos__H.js,sha256=-zIYvr_0vWCA_0AVc2KPE-BzgB-kAbhhjzxo51ydJDE,899
|
368
|
+
streamlit/static/static/js/ProgressBar.OOqvhQG5.js,sha256=FaTeJ8pFqNYLoznAJpoOoWiStQJSn-lKmvKQ0XYY3zM,13318
|
369
|
+
streamlit/static/static/js/RenderInPortalIfExists.CyUrss_J.js,sha256=yuH_H9eq6rlu28Icw77vY_9nZ9xMTTaDcG58V2J6q_o,523
|
370
|
+
streamlit/static/static/js/Toolbar.BHMuD9RK.js,sha256=7m_pv7sUGczB54wnwpL0AW2ilUsLylOfO_EX57iVJB0,2817
|
371
371
|
streamlit/static/static/js/UploadFileInfo.C-jY39rj.js,sha256=Z_hcytEoaAX1saJgsfX1UoComwwlMcjCUZ8ldwuQJI8,151
|
372
|
-
streamlit/static/static/js/base-input.
|
373
|
-
streamlit/static/static/js/checkbox.
|
372
|
+
streamlit/static/static/js/base-input.DDkkgpGf.js,sha256=rN_lF7NJeO3qEMPB_D01_WoFLz_A4RX0nsroyhzOAEE,21774
|
373
|
+
streamlit/static/static/js/checkbox.MhC8ubRB.js,sha256=goR84xrPyjRJmK78yn3Bfyny-H7M46BOHQIxRPHIMA4,11243
|
374
374
|
streamlit/static/static/js/createDownloadLinkElement.DZMwyjvU.js,sha256=uB4db2cbWB2KYpRbQKK6xi-mLBiUQXQtsL5I3N6rMcU,242
|
375
|
-
streamlit/static/static/js/createSuper.
|
376
|
-
streamlit/static/static/js/data-grid-overlay-editor.
|
377
|
-
streamlit/static/static/js/downloader.
|
378
|
-
streamlit/static/static/js/es6.
|
379
|
-
streamlit/static/static/js/iframeResizer.contentWindow.
|
380
|
-
streamlit/static/static/js/index.
|
381
|
-
streamlit/static/static/js/index.
|
382
|
-
streamlit/static/static/js/index.
|
383
|
-
streamlit/static/static/js/index.
|
384
|
-
streamlit/static/static/js/index.
|
385
|
-
streamlit/static/static/js/index.
|
386
|
-
streamlit/static/static/js/index.
|
387
|
-
streamlit/static/static/js/index.
|
388
|
-
streamlit/static/static/js/index.
|
389
|
-
streamlit/static/static/js/index.
|
390
|
-
streamlit/static/static/js/index.
|
391
|
-
streamlit/static/static/js/index.
|
392
|
-
streamlit/static/static/js/index.
|
393
|
-
streamlit/static/static/js/index.
|
394
|
-
streamlit/static/static/js/index.
|
395
|
-
streamlit/static/static/js/index.
|
396
|
-
streamlit/static/static/js/index.
|
397
|
-
streamlit/static/static/js/index.
|
398
|
-
streamlit/static/static/js/index.
|
399
|
-
streamlit/static/static/js/index.
|
400
|
-
streamlit/static/static/js/index.
|
401
|
-
streamlit/static/static/js/index.
|
402
|
-
streamlit/static/static/js/index.
|
403
|
-
streamlit/static/static/js/index.
|
404
|
-
streamlit/static/static/js/index.
|
405
|
-
streamlit/static/static/js/index.
|
406
|
-
streamlit/static/static/js/index.
|
407
|
-
streamlit/static/static/js/index.
|
408
|
-
streamlit/static/static/js/index.
|
409
|
-
streamlit/static/static/js/index.
|
410
|
-
streamlit/static/static/js/index.
|
411
|
-
streamlit/static/static/js/index.
|
412
|
-
streamlit/static/static/js/index.
|
413
|
-
streamlit/static/static/js/index.
|
414
|
-
streamlit/static/static/js/index.
|
415
|
-
streamlit/static/static/js/index.
|
416
|
-
streamlit/static/static/js/index.j2U8rE_N.js,sha256=dg4v9XF8eOrec_XhX6O2mZeYgS0evr85TwYY9gFbrOo,890
|
375
|
+
streamlit/static/static/js/createSuper.CqhU4QuZ.js,sha256=_oTmgM8dJ6TppDiEM7helM_JUQJrRDU5QTRwi1DmtG4,394
|
376
|
+
streamlit/static/static/js/data-grid-overlay-editor.BBwX0oOt.js,sha256=Y--mdMYVUTPZpJgoIbvZviaUe2Gia_njs7oU5rox_y0,4142
|
377
|
+
streamlit/static/static/js/downloader.DXPcTUFo.js,sha256=iXbTKo-YaTbYsWCOud1IuuF0qDgjcZCvi2-aqXIuLQY,2535
|
378
|
+
streamlit/static/static/js/es6.CEXDu3sA.js,sha256=X7mwr3LTIvZrkxEj8EH6kA8IyqEEwrpb2bx1ruj0q8M,15321
|
379
|
+
streamlit/static/static/js/iframeResizer.contentWindow.DWm0kUUF.js,sha256=tLFv6-UFHykWaYjxno0kfamZ0FtfMFDUCgXC4oK-8eA,14406
|
380
|
+
streamlit/static/static/js/index.6b1mTySV.js,sha256=XMNbXsnLksvLaGGFTU_88J7h9vXl1be_14dGkKV_1NY,128139
|
381
|
+
streamlit/static/static/js/index.B-O_wE0K.js,sha256=I7oE4qmmV6d0QZCU7gJC3t16ODVRYIUTM08keB_OLZw,617
|
382
|
+
streamlit/static/static/js/index.B06gV0xU.js,sha256=jmBpoh0Tq_IF8wboRfC3FufKccId1th70qHRKJRSn3M,2573
|
383
|
+
streamlit/static/static/js/index.B09m8ltk.js,sha256=Jzggbn8mFWYWAgl7JT3ZpY_ghwwaynYp0PmRX3A3P0s,12037
|
384
|
+
streamlit/static/static/js/index.B1th2sQW.js,sha256=9OtFV9xYF8VVspr5zU4da5F692QLEi-bmAIB26lpvfo,9077
|
385
|
+
streamlit/static/static/js/index.BN-Cqjtr.js,sha256=JWU79cNj4pHioBCNxTpVCGngyZ4Mpax1XgML7Bu3PxQ,3385535
|
386
|
+
streamlit/static/static/js/index.BU77_yo5.js,sha256=PEL1B1BG6h1rpHnEd9FwY759mt8fONqLRMatJkwyWyQ,22557
|
387
|
+
streamlit/static/static/js/index.BYF0MjVi.js,sha256=JeiIfNkplgAESGs-9dppM5pH6jXhH7kS_TKCLEFcSiE,12825
|
388
|
+
streamlit/static/static/js/index.BghhhCL1.js,sha256=jlGMVJviTN91qxBxZ-tCqxCXt1IAee-F5fRCQE0Tx4Q,50259
|
389
|
+
streamlit/static/static/js/index.BlpjlGOL.js,sha256=3K6YD1FOksvWbmb9_53VQrZuWvvrQCndrKSPjYk8cGw,2432
|
390
|
+
streamlit/static/static/js/index.BmtdqFfB.js,sha256=ChyIpBIsm0I7hlbIcCb_Cdprv0ZaTp2_ekO1NMPqqYo,718
|
391
|
+
streamlit/static/static/js/index.C6wX31--.js,sha256=ewWlihj4V9B81e9xqeVHzzJDB1itqRN6cDnyz_3-9KQ,852044
|
392
|
+
streamlit/static/static/js/index.CPLoBLa6.js,sha256=xVVK2l5iPL1-KIO9dqNDChyfg3IcQbvlKv49DvScym8,34827
|
393
|
+
streamlit/static/static/js/index.Ch1zIHG2.js,sha256=Z73DTHT7MC5sTVAw79KfA7PDQSVVIeZTJ2EyPhq0IRA,19678
|
394
|
+
streamlit/static/static/js/index.CsUhYot_.js,sha256=gv-QIoJHpCvG6zuqGCTnsc2aCDq_QGZzcehxZeBEfdw,4692503
|
395
|
+
streamlit/static/static/js/index.Cwa6nJdn.js,sha256=xgvsCdUjDy9iFUPIoJZL1LYH4QiEevoQp66Kbux7rx8,2837
|
396
|
+
streamlit/static/static/js/index.CwjEdNBc.js,sha256=EH_vmx8IfLpX3Fsh5-sYSXUFgxh0OWoLtKeblVmWdDs,443
|
397
|
+
streamlit/static/static/js/index.Cy9Ir-PP.js,sha256=xoi_x756j6m-XNGJSP5Yri2PbfqG8hu0QRQAsqUc99s,1612
|
398
|
+
streamlit/static/static/js/index.D0O2ysfC.js,sha256=gGi1xEXUnmmSnhYKmBQBXt4CO-p7FwMi2w00WuzcSEs,890
|
399
|
+
streamlit/static/static/js/index.D3-O5hIV.js,sha256=xUDxi66jZbIHy93qmp-2iaw2jHJanJ3z9ziEdWDWo0o,954
|
400
|
+
streamlit/static/static/js/index.DCKU7zCS.js,sha256=8uUKCTle0UgBrTMnbpHGxIuWSU07v_xR947MfvivV7A,6825714
|
401
|
+
streamlit/static/static/js/index.DEkTRzl5.js,sha256=1pIRY4M3cF6yCf78pG-fC-BxZN3WdrFeZ8rtLrzSTzY,7623
|
402
|
+
streamlit/static/static/js/index.DY1To1KX.js,sha256=_VWMX8V95SH0Q7daUdP9E9517otFc6i63wd1PpC0XhA,3619
|
403
|
+
streamlit/static/static/js/index.DcRGK1Fw.js,sha256=8-hIMkVaFdmUhBaT78LclaHZGxVYxJZpZ7zxJkMlK60,19017
|
404
|
+
streamlit/static/static/js/index.DqnbRXDR.js,sha256=pq61dn4qzKHOq4iU0JKfKt3CCm4_2h-SndOj8keTuQM,1333
|
405
|
+
streamlit/static/static/js/index.DvU9hkdF.js,sha256=hsv8F8TjIfu7gvj3l3NOBl5Xn089nNfggWxoMnLCgPU,2396
|
406
|
+
streamlit/static/static/js/index.DzihNvNB.js,sha256=cpms0Ygnmk1jf4J53o0ZQrY9P7M3kAQOCj8iKF72YQk,2876
|
407
|
+
streamlit/static/static/js/index.F3n9jlGK.js,sha256=cgLdOTdeMLp2cQcN_2VRyRrQbywBrZlCzICduBVfVHY,1571
|
408
|
+
streamlit/static/static/js/index.HNkSYNRg.js,sha256=2Wbfq9hwKV7mAyjRBWaXBWf6o2twtSNUVtyy_uaGvB8,1277
|
409
|
+
streamlit/static/static/js/index.W-ibDLkH.js,sha256=d4kUQWXCHBAJkIHwUbc5QG_x-SHQlzNK4Q_90DCdDos,583
|
410
|
+
streamlit/static/static/js/index.XtneMYik.js,sha256=zG7qgHC-pSUFLm961OuRQXi2ab3WmnJG2HNlj9xAEX8,852494
|
411
|
+
streamlit/static/static/js/index.YLN-j6r-.js,sha256=Q2es7aCeSV2nGxZufU2YnUwsaHiXl5Ebmc3hS7SKnls,2043
|
412
|
+
streamlit/static/static/js/index.a9NsHJhQ.js,sha256=ZOqVET0GSFlP9Tu84ThOFyKlf_P_DXpGloCPr-Qe5Mk,2861
|
413
|
+
streamlit/static/static/js/index.b1kLMo8r.js,sha256=i09tB9MAnfBkKVaFu1xpLnNRm12UdPCLUmE6-8vNQh4,24380
|
414
|
+
streamlit/static/static/js/index.iO67MDAb.js,sha256=m8hxuWKBcWnhnsXM-1taWlpLIXT8Q7pqNeE6yf_lApI,3951
|
415
|
+
streamlit/static/static/js/index.mAm8TEUm.js,sha256=68zkOwFZuIS0cE6vaZk3-DiAW6fcOBkGCVq59sjfTf0,2599059
|
417
416
|
streamlit/static/static/js/index.t--hEgTQ.js,sha256=x8bkF-D3ssO38DU9Rs19R_4n30Te6uzH9Vq8hVJ2EJ0,34982
|
418
|
-
streamlit/static/static/js/
|
417
|
+
streamlit/static/static/js/index.xQw12X8c.js,sha256=_98KveyM-1MIvD8rJ9HZzWDbUowmx3iD6yMO5PDL2mc,434808
|
418
|
+
streamlit/static/static/js/input.D00LElK2.js,sha256=sYJWHULo9e3GISHuEIk9MqBFWW9tS9pUThLH9-8i0tc,5244
|
419
419
|
streamlit/static/static/js/inputUtils.CQWz5UKz.js,sha256=-kt6oYYgvhFS0t0EV2qJE6f43GUao6rNeipUmv3RuV8,150
|
420
|
-
streamlit/static/static/js/memory.
|
421
|
-
streamlit/static/static/js/mergeWith.
|
422
|
-
streamlit/static/static/js/number-overlay-editor.
|
423
|
-
streamlit/static/static/js/possibleConstructorReturn.
|
424
|
-
streamlit/static/static/js/sandbox.
|
420
|
+
streamlit/static/static/js/memory.CGCErNWl.js,sha256=dOUOxMUlazXUitP0EDkhUaEjwtkjE6Z3rLG58k5TyGI,3041
|
421
|
+
streamlit/static/static/js/mergeWith.DPocir3h.js,sha256=YrDDep_12GILbYL0sywRZKgk4sdYOaos3dBW58WXZfk,198
|
422
|
+
streamlit/static/static/js/number-overlay-editor.C9aaVRxu.js,sha256=XnbmbAuU9bkpvTEq0dAJPe02Ubcfe4mrCS2MFSAMSyI,16550
|
423
|
+
streamlit/static/static/js/possibleConstructorReturn.DXXsz__z.js,sha256=6m-9xYVWBtBjJbtKG5gb5_3_AXav4tM2a_tOIwgCeeI,1451
|
424
|
+
streamlit/static/static/js/sandbox.Br2VBN1F.js,sha256=fgMcJv6Y31MGF1n_2GrCJv7tDhD7YlYsHQprTaOAYuM,2960
|
425
425
|
streamlit/static/static/js/sprintf.D7DtBTRn.js,sha256=dLZEkTCGwWgkxMOITY-fqjbGVuUO9nFw7MwCANBdisk,3434
|
426
|
-
streamlit/static/static/js/textarea.
|
426
|
+
streamlit/static/static/js/textarea.CQnqAl1g.js,sha256=wNq0E8xkW1_9cFBtwIT1jJRV4T3kXbBXJXS6JkRjKYw,5761
|
427
427
|
streamlit/static/static/js/threshold.DjX0wlsa.js,sha256=ToJ7upF_PGcC41-Cfe0gGTVgWb0yjhBbHTQrd4GD4gg,5693
|
428
|
-
streamlit/static/static/js/timepicker.
|
428
|
+
streamlit/static/static/js/timepicker.BmIoDoBw.js,sha256=jxRb_tCi6xB5KVB4w-9TVBAV6Ecf41khGGqpLN_xO4c,89416
|
429
429
|
streamlit/static/static/js/timer.CAwTRJ_g.js,sha256=aNjItH3iW2RuvnLaZ54iUi50rhEiW93-1Rel2EyaRlQ,7408
|
430
|
-
streamlit/static/static/js/toConsumableArray.
|
431
|
-
streamlit/static/static/js/uniqueId.
|
432
|
-
streamlit/static/static/js/useBasicWidgetState.
|
433
|
-
streamlit/static/static/js/useOnInputChange.
|
430
|
+
streamlit/static/static/js/toConsumableArray.CfCqHWaY.js,sha256=8bYD1_o6o19Je6q_7GdvupQ6OOvKP8QghYXQ_7ddxYQ,1587
|
431
|
+
streamlit/static/static/js/uniqueId._zK6ugwW.js,sha256=slWp3JtLYJz89W0E8-Q_Abu7UdZV2ssRGZr-HX8T2pA,190
|
432
|
+
streamlit/static/static/js/useBasicWidgetState.C_V8mPrP.js,sha256=XQ7P2QpxqH_DvX2uiWE_xmpRmVzqi44-KwywYdJ2DGA,960
|
433
|
+
streamlit/static/static/js/useOnInputChange.5wieT2fD.js,sha256=QazeqlMCIpDTVQVu7G7JrYpAWG1DtUy3jlVV0sAka3I,587
|
434
434
|
streamlit/static/static/js/value.CgPGBV_l.js,sha256=7g4Owjf_hP16pkcLYPvARUlzIjBgl9APVNw2hnHYtWY,15042
|
435
|
-
streamlit/static/static/js/withFullScreenWrapper.
|
435
|
+
streamlit/static/static/js/withFullScreenWrapper.mszDqn7s.js,sha256=ZlACx_aHL4eetDe-7NDLy0i1bLPwpRjb2mH-vT9aJNg,1655
|
436
436
|
streamlit/static/static/media/KaTeX_AMS-Regular.BQhdFMY1.woff2,sha256=DN04fJWQoan5eUVgAi27WWVKfYbxh6oMgUla1C06cwg,28076
|
437
437
|
streamlit/static/static/media/KaTeX_AMS-Regular.DMm9YOAa.woff,sha256=MNqR6EyJP4deJSaJ-uvcWQsocRReitx_mp1NvYzgslE,33516
|
438
438
|
streamlit/static/static/media/KaTeX_AMS-Regular.DRggAlZN.ttf,sha256=aFNIQLz90r_7bw6N60hoTdAefwTqKBMmdXevuQbeHRM,63632
|
@@ -556,9 +556,9 @@ streamlit/web/server/server_util.py,sha256=JXtdozKzvDP4dfqlV73PMDxSqhtRokpDpEFvt
|
|
556
556
|
streamlit/web/server/stats_request_handler.py,sha256=vMRWGfqItfI6OaqVyo3LIX3HjQ-OB6Y-LHOXPiihlGY,3641
|
557
557
|
streamlit/web/server/upload_file_request_handler.py,sha256=NvjQpUt7HWi5DE08tLig_UWevKcC7nA7PFOJ-aSkxwk,5033
|
558
558
|
streamlit/web/server/websocket_headers.py,sha256=FCzUc-829kNY5hgy2wGNZT0k4XgCw_nlLCdnb7pnNO4,2232
|
559
|
-
streamlit_nightly-1.44.2.
|
560
|
-
streamlit_nightly-1.44.2.
|
561
|
-
streamlit_nightly-1.44.2.
|
562
|
-
streamlit_nightly-1.44.2.
|
563
|
-
streamlit_nightly-1.44.2.
|
564
|
-
streamlit_nightly-1.44.2.
|
559
|
+
streamlit_nightly-1.44.2.dev20250416.data/scripts/streamlit.cmd,sha256=k9768SaQCkiYAPaTp7JtkhAHEHflNQfu6fAM4pri6zo,676
|
560
|
+
streamlit_nightly-1.44.2.dev20250416.dist-info/METADATA,sha256=q0RxA9abVl5znn5BcREIdaMom1NIGFTvNims2G2A7gk,8933
|
561
|
+
streamlit_nightly-1.44.2.dev20250416.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
562
|
+
streamlit_nightly-1.44.2.dev20250416.dist-info/entry_points.txt,sha256=uNJ4DwGNXEhOK0USwSNanjkYyR-Bk7eYQbJFDrWyOgY,53
|
563
|
+
streamlit_nightly-1.44.2.dev20250416.dist-info/top_level.txt,sha256=V3FhKbm7G2LnR0s4SytavrjIPNIhvcsAGXfYHAwtQzw,10
|
564
|
+
streamlit_nightly-1.44.2.dev20250416.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as y,E as T,_ as O,n as I,J as K,C as P,j as f,bu as Y,ba as A,bp as Z,b5 as ee,bo as j,bB as z,d as te,g as re,aL as ie,z as ae,bC as ne,bD as oe,bE as se,R as le,l as de,aA as ce,M as x,bl as ue,bk as pe,br as he,bF as fe,bs as ge,bt as me,F as ve}from"./index.B1VulLzc.js";import{a as V}from"./index.t--hEgTQ.js";import{F as Se}from"./FormClearHelper.D-LphorD.js";import{U as L}from"./UploadFileInfo.C-jY39rj.js";import{P as ye,S as be}from"./ProgressBar.B4UgMGDS.js";var N=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),y.createElement("path",{d:"M.5 1c-.28 0-.5.23-.5.5v4c0 .28.23.5.5.5h5c.28 0 .5-.22.5-.5V4l1 1h1V2H7L6 3V1.5c0-.28-.22-.5-.5-.5h-5z"}))});N.displayName="Video";var D=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:l}),y.createElement("path",{d:"M1.41 0L0 1.41l.72.72L2.5 3.94.72 5.72 0 6.41l1.41 1.44.72-.72 1.81-1.81 1.78 1.81.69.72 1.44-1.44-.72-.69-1.81-1.78 1.81-1.81.72-.72L6.41 0l-.69.72L3.94 2.5 2.13.72 1.41 0z"}))});D.displayName="X";var H=y.forwardRef(function(t,l){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return y.createElement(T,O({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:l}),y.createElement("rect",{width:24,height:24,fill:"none"}),y.createElement("path",{d:"M20 5h-3.17l-1.24-1.35A1.99 1.99 0 0014.12 3H9.88c-.56 0-1.1.24-1.48.65L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-1.35 8.35l-2.79 2.79c-.32.32-.86.1-.86-.35v-1.75H9v1.75c0 .45-.54.67-.85.35l-2.79-2.79c-.2-.2-.2-.51 0-.71l2.79-2.79a.5.5 0 01.85.36v1.83h6v-1.83c0-.45.54-.67.85-.35l2.79 2.79c.2.19.2.51.01.7z"}))});H.displayName="SwitchCamera";var k;(function(t){t.XSMALL="xsmall",t.SMALL="small",t.MEDIUM="medium",t.LARGE="large"})(k||(k={}));function Me(t,l){switch(t){case"xsmall":return{padding:`${l.spacing.twoXS} ${l.spacing.sm}`,fontSize:l.fontSizes.sm};case"small":return{padding:`${l.spacing.twoXS} ${l.spacing.md}`};case"large":return{padding:`${l.spacing.md} ${l.spacing.md}`};default:return{padding:`${l.spacing.xs} ${l.spacing.md}`}}}const G=I("div",{target:"e47j7ja0"})({position:"relative",overflow:"hidden",width:"100%",objectFit:"contain"}),W=I("div",{target:"e47j7ja1"})(({theme:t,width:l})=>({backgroundColor:t.colors.secondaryBg,borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,width:"100%",height:l*9/16,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"})),we=I("p",{target:"e47j7ja2"})(({theme:t})=>({marginTop:t.spacing.sm,textAlign:"center"})),Ce=I("img",{target:"e47j7ja3"})(({theme:t,opacity:l})=>({borderRadius:`${t.radii.default} ${t.radii.default} 0 0`,objectFit:"contain",opacity:l})),Ue=I("a",{target:"e47j7ja4"})(({theme:t})=>({color:t.colors.primary,display:"block",textDecoration:"none"})),Ie=I("span",{target:"e47j7ja5"})({display:"flex",alignItems:"center"}),Ee=I("div",{target:"e47j7ja6"})(({theme:t})=>({position:"absolute",top:t.spacing.lg,right:t.spacing.lg,zIndex:t.zIndices.priority,color:t.colors.fadedText40,mixBlendMode:"difference",opacity:.6})),Fe=I("div",{target:"e47j7ja8"})({height:"fit-content",width:"100%",position:"absolute",bottom:0}),Pe=I("button",{target:"e47j7ja9"})(({theme:t})=>({position:"relative",display:"inline-flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:t.colors.lightenedBg05,border:`${t.sizes.borderWidth} solid ${t.colors.borderColor}`,borderRadius:`0 0 ${t.radii.default} ${t.radii.default}`,"&:hover":{borderColor:t.colors.primary,color:t.colors.primary},"&:active":{color:t.colors.white,borderColor:t.colors.primary,backgroundColor:t.colors.primary},"&:focus:not(:active)":{borderColor:t.colors.primary,color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{color:t.colors.fadedText40},fontWeight:t.fontWeights.normal,padding:`${t.spacing.xs} ${t.spacing.md}`,margin:t.spacing.none,lineHeight:t.lineHeights.base,color:"inherit",width:"100%",userSelect:"none","&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${K(t.colors.primary,.5)}`},...Me("medium",t)}));function Re({disabled:t,onClick:l,children:r,progress:n}){return P(Pe,{disabled:t||!1,onClick:l||(()=>{}),progress:n||null,"data-testid":"stCameraInputButton",children:[r,n?f(Fe,{children:f(ye,{value:n,size:be.EXTRASMALL,overrides:{Bar:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarProgress:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}},BarContainer:{style:{borderTopLeftRadius:0,borderTopRightRadius:0}}}})}):null]})}const q=y.memo(Re);var F;(function(t){t.USER="user",t.ENVIRONMENT="environment"})(F||(F={}));const xe=({switchFacingMode:t})=>f(Ee,{"data-testid":"stCameraInputSwitchButton",children:f(Y,{content:"Switch camera",placement:A.TOP_RIGHT,children:f(Z,{kind:ee.MINIMAL,onClick:t,children:f(j,{content:H,size:"twoXL",color:z.white})})})}),_e=y.memo(xe);var _={exports:{}},Te=_.exports,B;function Oe(){return B||(B=1,function(t,l){(function(n,a){t.exports=a(te())})(Te,function(r){return function(n){var a={};function o(s){if(a[s])return a[s].exports;var p=a[s]={i:s,l:!1,exports:{}};return n[s].call(p.exports,p,p.exports,o),p.l=!0,p.exports}return o.m=n,o.c=a,o.d=function(s,p,g){o.o(s,p)||Object.defineProperty(s,p,{enumerable:!0,get:g})},o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},o.t=function(s,p){if(p&1&&(s=o(s)),p&8||p&4&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(o.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),p&2&&typeof s!="string")for(var U in s)o.d(g,U,(function(C){return s[C]}).bind(null,U));return g},o.n=function(s){var p=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(p,"a",p),p},o.o=function(s,p){return Object.prototype.hasOwnProperty.call(s,p)},o.p="",o(o.s="./src/react-webcam.tsx")}({"./src/react-webcam.tsx":function(n,a,o){o.r(a);var s=o("react"),p=function(){var m=function(u,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,d){i.__proto__=d}||function(i,d){for(var c in d)d.hasOwnProperty(c)&&(i[c]=d[c])},m(u,e)};return function(u,e){m(u,e);function i(){this.constructor=u}u.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}}(),g=function(){return g=Object.assign||function(m){for(var u,e=1,i=arguments.length;e<i;e++){u=arguments[e];for(var d in u)Object.prototype.hasOwnProperty.call(u,d)&&(m[d]=u[d])}return m},g.apply(this,arguments)},U=function(m,u){var e={};for(var i in m)Object.prototype.hasOwnProperty.call(m,i)&&u.indexOf(i)<0&&(e[i]=m[i]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,i=Object.getOwnPropertySymbols(m);d<i.length;d++)u.indexOf(i[d])<0&&Object.prototype.propertyIsEnumerable.call(m,i[d])&&(e[i[d]]=m[i[d]]);return e};(function(){typeof window>"u"||(navigator.mediaDevices===void 0&&(navigator.mediaDevices={}),navigator.mediaDevices.getUserMedia===void 0&&(navigator.mediaDevices.getUserMedia=function(u){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return e?new Promise(function(i,d){e.call(navigator,u,i,d)}):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}))})();function C(){return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}var E=function(m){p(u,m);function u(e){var i=m.call(this,e)||this;return i.canvas=null,i.ctx=null,i.requestUserMediaId=0,i.unmounted=!1,i.state={hasUserMedia:!1},i}return u.prototype.componentDidMount=function(){var e=this,i=e.state,d=e.props;if(this.unmounted=!1,!C()){d.onUserMediaError("getUserMedia not supported");return}i.hasUserMedia||this.requestUserMedia(),d.children&&typeof d.children!="function"&&console.warn("children must be a function")},u.prototype.componentDidUpdate=function(e){var i=this.props;if(!C()){i.onUserMediaError("getUserMedia not supported");return}var d=JSON.stringify(e.audioConstraints)!==JSON.stringify(i.audioConstraints),c=JSON.stringify(e.videoConstraints)!==JSON.stringify(i.videoConstraints),M=e.minScreenshotWidth!==i.minScreenshotWidth,S=e.minScreenshotHeight!==i.minScreenshotHeight;(c||M||S)&&(this.canvas=null,this.ctx=null),(d||c)&&(this.stopAndCleanup(),this.requestUserMedia())},u.prototype.componentWillUnmount=function(){this.unmounted=!0,this.stopAndCleanup()},u.stopMediaStream=function(e){e&&(e.getVideoTracks&&e.getAudioTracks?(e.getVideoTracks().map(function(i){e.removeTrack(i),i.stop()}),e.getAudioTracks().map(function(i){e.removeTrack(i),i.stop()})):e.stop())},u.prototype.stopAndCleanup=function(){var e=this.state;e.hasUserMedia&&(u.stopMediaStream(this.stream),e.src&&window.URL.revokeObjectURL(e.src))},u.prototype.getScreenshot=function(e){var i=this,d=i.state,c=i.props;if(!d.hasUserMedia)return null;var M=this.getCanvas(e);return M&&M.toDataURL(c.screenshotFormat,c.screenshotQuality)},u.prototype.getCanvas=function(e){var i=this,d=i.state,c=i.props;if(!this.video||!d.hasUserMedia||!this.video.videoHeight)return null;if(!this.ctx){var M=this.video.videoWidth,S=this.video.videoHeight;if(!this.props.forceScreenshotSourceSize){var v=M/S;M=c.minScreenshotWidth||this.video.clientWidth,S=M/v,c.minScreenshotHeight&&S<c.minScreenshotHeight&&(S=c.minScreenshotHeight,M=S*v)}this.canvas=document.createElement("canvas"),this.canvas.width=(e==null?void 0:e.width)||M,this.canvas.height=(e==null?void 0:e.height)||S,this.ctx=this.canvas.getContext("2d")}var w=this,b=w.ctx,h=w.canvas;return b&&h&&(h.width=(e==null?void 0:e.width)||h.width,h.height=(e==null?void 0:e.height)||h.height,c.mirrored&&(b.translate(h.width,0),b.scale(-1,1)),b.imageSmoothingEnabled=c.imageSmoothing,b.drawImage(this.video,0,0,(e==null?void 0:e.width)||h.width,(e==null?void 0:e.height)||h.height),c.mirrored&&(b.scale(-1,1),b.translate(-h.width,0))),h},u.prototype.requestUserMedia=function(){var e=this,i=this.props,d=function(S,v){var w={video:typeof v<"u"?v:!0};i.audio&&(w.audio=typeof S<"u"?S:!0),e.requestUserMediaId++;var b=e.requestUserMediaId;navigator.mediaDevices.getUserMedia(w).then(function(h){e.unmounted||b!==e.requestUserMediaId?u.stopMediaStream(h):e.handleUserMedia(null,h)}).catch(function(h){e.handleUserMedia(h)})};if("mediaDevices"in navigator)d(i.audioConstraints,i.videoConstraints);else{var c=function(S){return{optional:[{sourceId:S}]}},M=function(S){var v=S.deviceId;return typeof v=="string"?v:Array.isArray(v)&&v.length>0?v[0]:typeof v=="object"&&v.ideal?v.ideal:null};MediaStreamTrack.getSources(function(S){var v=null,w=null;S.forEach(function(R){R.kind==="audio"?v=R.id:R.kind==="video"&&(w=R.id)});var b=M(i.audioConstraints);b&&(v=b);var h=M(i.videoConstraints);h&&(w=h),d(c(v),c(w))})}},u.prototype.handleUserMedia=function(e,i){var d=this.props;if(e||!i){this.setState({hasUserMedia:!1}),d.onUserMediaError(e);return}this.stream=i;try{this.video&&(this.video.srcObject=i),this.setState({hasUserMedia:!0})}catch{this.setState({hasUserMedia:!0,src:window.URL.createObjectURL(i)})}d.onUserMedia(i)},u.prototype.render=function(){var e=this,i=this,d=i.state,c=i.props,M=c.audio;c.forceScreenshotSourceSize;var S=c.disablePictureInPicture;c.onUserMedia,c.onUserMediaError,c.screenshotFormat,c.screenshotQuality,c.minScreenshotWidth,c.minScreenshotHeight,c.audioConstraints,c.videoConstraints,c.imageSmoothing;var v=c.mirrored,w=c.style,b=w===void 0?{}:w,h=c.children,R=U(c,["audio","forceScreenshotSourceSize","disablePictureInPicture","onUserMedia","onUserMediaError","screenshotFormat","screenshotQuality","minScreenshotWidth","minScreenshotHeight","audioConstraints","videoConstraints","imageSmoothing","mirrored","style","children"]),X=v?g(g({},b),{transform:(b.transform||"")+" scaleX(-1)"}):b,J={getScreenshot:this.getScreenshot.bind(this)};return s.createElement(s.Fragment,null,s.createElement("video",g({autoPlay:!0,disablePictureInPicture:S,src:d.src,muted:!M,playsInline:!0,ref:function(Q){e.video=Q},style:X},R)),h&&h(J))},u.defaultProps={audio:!1,disablePictureInPicture:!1,forceScreenshotSourceSize:!1,imageSmoothing:!0,mirrored:!1,onUserMedia:function(){},onUserMediaError:function(){},screenshotFormat:"image/webp",screenshotQuality:.92},u}(s.Component);a.default=E},react:function(n,a){n.exports=r}}).default})}(_)),_.exports}var je=Oe();const We=re(je);var $;(function(t){t.PENDING="pending",t.SUCCESS="success",t.ERROR="error"})($||($={}));const Ve=({width:t})=>P(W,{width:t,children:[f(j,{size:"threeXL",color:z.gray60,content:N}),P(we,{children:["This app would like to use your camera.",f(Ue,{href:oe,rel:"noopener noreferrer",target:"_blank",children:"Learn how to allow access."})]})]}),Le=({handleCapture:t,width:l,disabled:r,clearPhotoInProgress:n,setClearPhotoInProgress:a,facingMode:o,setFacingMode:s,testOverride:p})=>{const[g,U]=y.useState(p||"pending"),C=y.useRef(null),[E,m]=y.useState(l),u=y.useCallback(ie(1e3,m),[]);y.useEffect(()=>{u(l)},[l,u]);function e(){if(C.current!==null){const d=C.current.getScreenshot();t(d)}}const i=ae();return P(G,{"data-testid":"stCameraInputWebcamComponent",children:[g!=="success"&&!r&&!n?f(Ve,{width:E}):ne.isMobile&&f(_e,{switchFacingMode:s}),f(W,{"data-testid":"stCameraInputWebcamStyledBox",hidden:g!=="success"&&!r&&!n,width:E,children:!r&&f(We,{audio:!1,ref:C,screenshotFormat:"image/jpeg",screenshotQuality:1,width:E,height:E*9/16,style:{borderRadius:`${i.radii.default} ${i.radii.default} 0 0`},onUserMediaError:()=>{U("error")},onUserMedia:()=>{U("success"),a(!1)},videoConstraints:{width:{ideal:E},facingMode:o}})}),f(q,{onClick:e,disabled:g!=="success"||r||n,children:"Take Photo"})]})},ke=y.memo(Le),Be=150,$e=de.getLogger("CameraInput");class Ae extends le.PureComponent{constructor(l){super(l),this.localFileIdCounter=1,this.RESTORED_FROM_WIDGET_STRING="RESTORED_FROM_WIDGET",this.formClearHelper=new Se,this.getProgress=()=>{if(this.state.files.length>0&&this.state.files[this.state.files.length-1].status.type==="uploading")return this.state.files[this.state.files.length-1].status.progress},this.setClearPhotoInProgress=r=>{this.setState({clearPhotoInProgress:r})},this.setFacingMode=()=>{this.setState(r=>({facingMode:r.facingMode===F.USER?F.ENVIRONMENT:F.USER}))},this.handleCapture=r=>{if(r===null)return Promise.resolve();this.setState({imgSrc:r,shutter:!0,minShutterEffectPassed:!1});const n=a=>new Promise(o=>setTimeout(o,a));return ze(r,`camera-input-${new Date().toISOString().replace(/:/g,"_")}.jpg`).then(a=>this.props.uploadClient.fetchFileURLs([a]).then(o=>({file:a,fileUrls:o[0]}))).then(({file:a,fileUrls:o})=>this.uploadFile(o,a)).then(()=>n(Be)).then(()=>{this.setState((a,o)=>({imgSrc:r,shutter:a.shutter,minShutterEffectPassed:!0}))}).catch(a=>{$e.error(a)})},this.removeCapture=()=>{this.state.files.length!==0&&(this.state.files.forEach(r=>this.deleteFile(r.id)),this.setState({imgSrc:null,clearPhotoInProgress:!0}))},this.componentDidUpdate=()=>{if(this.status!=="ready")return;const r=this.createWidgetValue(),{element:n,widgetMgr:a,fragmentId:o}=this.props,s=a.getFileUploaderStateValue(n);ce(r,s)||a.setFileUploaderStateValue(n,r,{fromUi:!0},o)},this.onFormCleared=()=>{this.setState({files:[]},()=>{const r=this.createWidgetValue();if(x(r))return;this.setState({imgSrc:null});const{widgetMgr:n,element:a,fragmentId:o}=this.props;n.setFileUploaderStateValue(a,r,{fromUi:!0},o)})},this.deleteFile=r=>{const n=this.getFile(r);x(n)||(n.status.type==="uploading"&&n.status.cancelToken.cancel(),n.status.type==="uploaded"&&n.status.fileUrls.deleteUrl&&this.props.uploadClient.deleteFile(n.status.fileUrls.deleteUrl),this.removeFile(r))},this.addFile=r=>{this.setState(n=>({files:[...n.files,r]}))},this.removeFile=r=>{this.setState(n=>({files:n.files.filter(a=>a.id!==r)}))},this.getFile=r=>this.state.files.find(n=>n.id===r),this.updateFile=(r,n)=>{this.setState(a=>({files:a.files.map(o=>o.id===r?n:o)}))},this.onUploadComplete=(r,n)=>{this.setState(()=>({shutter:!1}));const a=this.getFile(r);x(a)||a.status.type!=="uploading"||this.updateFile(a.id,a.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}))},this.onUploadProgress=(r,n)=>{const a=this.getFile(n);if(x(a)||a.status.type!=="uploading")return;const o=Math.round(r.loaded*100/r.total);a.status.progress!==o&&this.updateFile(n,a.setStatus({type:"uploading",cancelToken:a.status.cancelToken,progress:o}))},this.reset=()=>{this.setState({files:[],imgSrc:null})},this.uploadFile=(r,n)=>{const a=V.CancelToken.source(),o=new L(n.name,n.size,this.nextLocalFileId(),{type:"uploading",cancelToken:a,progress:1});this.addFile(o),this.props.uploadClient.uploadFile(this.props.element,r.uploadUrl,n,s=>this.onUploadProgress(s,o.id),a.token).then(()=>this.onUploadComplete(o.id,r)).catch(s=>{V.isCancel(s)||this.updateFile(o.id,o.setStatus({type:"error",errorMessage:s?s.toString():"Unknown error"}))})},this.state=this.initialValue}get initialValue(){const l={files:[],imgSrc:null,shutter:!1,minShutterEffectPassed:!0,clearPhotoInProgress:!1,facingMode:F.USER},{widgetMgr:r,element:n}=this.props,a=r.getFileUploaderStateValue(n);if(x(a))return l;const{uploadedFileInfo:o}=a;return x(o)||o.length===0?l:{files:o.map(s=>{const p=s.name,g=s.size,U=s.fileId,C=s.fileUrls;return new L(p,g,this.nextLocalFileId(),{type:"uploaded",fileId:U,fileUrls:C})}),imgSrc:o.length===0?"":this.RESTORED_FROM_WIDGET_STRING,shutter:!1,minShutterEffectPassed:!1,clearPhotoInProgress:!1,facingMode:F.USER}}componentWillUnmount(){this.formClearHelper.disconnect()}get status(){const l=r=>r.status.type==="uploading";return this.state.files.some(l)?"updating":"ready"}componentDidMount(){const l=this.createWidgetValue(),{element:r,widgetMgr:n,fragmentId:a}=this.props;n.getFileUploaderStateValue(r)===void 0&&n.setFileUploaderStateValue(r,l,{fromUi:!1},a)}createWidgetValue(){const l=this.state.files.filter(r=>r.status.type==="uploaded").map(r=>{const{name:n,size:a,status:o}=r;return new ue({fileId:o.fileId,fileUrls:o.fileUrls,name:n,size:a})});return new pe({uploadedFileInfo:l})}render(){var o;const{element:l,widgetMgr:r,disabled:n,width:a}=this.props;return this.formClearHelper.manageFormClearListener(r,l.formId,this.onFormCleared),P(G,{className:"stCameraInput","data-testid":"stCameraInput",children:[f(me,{label:l.label,disabled:n,labelVisibility:he((o=l.labelVisibility)==null?void 0:o.value),children:l.help&&f(fe,{children:f(ge,{content:l.help,placement:A.TOP_RIGHT})})}),this.state.imgSrc?P(ve,{children:[f(W,{width:a,children:this.state.imgSrc!==this.RESTORED_FROM_WIDGET_STRING&&f(Ce,{src:this.state.imgSrc,alt:"Snapshot",opacity:this.state.shutter||!this.state.minShutterEffectPassed?"50%":"100%",width:a,height:a*9/16})}),f(q,{onClick:this.removeCapture,progress:this.getProgress(),disabled:!!this.getProgress()||n,children:this.getProgress()?"Uploading...":P(Ie,{children:[f(j,{content:D,margin:"0 xs 0 0",size:"sm"})," Clear photo"]})})]}):f(ke,{handleCapture:this.handleCapture,width:a,disabled:n,clearPhotoInProgress:this.state.clearPhotoInProgress,setClearPhotoInProgress:this.setClearPhotoInProgress,facingMode:this.state.facingMode,setFacingMode:this.setFacingMode,testOverride:this.props.testOverride})]})}nextLocalFileId(){return this.localFileIdCounter++}}function ze(t,l){return fetch(t).then(r=>r.arrayBuffer()).then(r=>new File([r],l,{type:"image/jpeg"}))}const Xe=se(Ae);export{Xe as default};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|