@stlite/desktop 0.98.1 → 0.99.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bin/dump_artifacts.js +36 -36
  3. package/build/assets/ArrowVegaLiteChart-B-Kd_jPH-Biiko0Ef.js +1 -0
  4. package/build/assets/Audio-B5gtg70U-Bh9tGjUY.js +1 -0
  5. package/build/assets/AudioInput-CgFzLi-y-C8cmY_cr.js +1 -0
  6. package/build/assets/{index-CKw_lXVb-3dsfAMaj.js → Balloons-CqQICrNd-BGoQrXhe.js} +2 -2
  7. package/build/assets/BidiComponent-CkI6DfPr-CbrqDKKX.js +2 -0
  8. package/build/assets/Button-BOmzB5Yb-Bpnf-WZl.js +1 -0
  9. package/build/assets/ButtonGroup-C5sVTynN-DPa0Tx1x.js +2 -0
  10. package/build/assets/CameraInput-C1f0GN0n-Bo12mEPo.js +1 -0
  11. package/build/assets/ChatInput-ClqoaQw2-PqG4grVV.js +1 -0
  12. package/build/assets/Checkbox-ClzElazy-D-AYf8eH.js +1 -0
  13. package/build/assets/{index-BXKF9Na4-e8_T7zol.js → ColorPicker-mCkrAGPa-CtUHNwYp.js} +3 -3
  14. package/build/assets/ComponentInstance-B_1vn-IY-BM9ElpU6.js +11 -0
  15. package/build/assets/DataFrame-CXPcdw96-Crfv7wfu.js +198 -0
  16. package/build/assets/DateInput-DzaFFasw-CiMjvLKg.js +1 -0
  17. package/build/assets/DateTimeInput-WmD8vSCU-K1wv6LRy.js +1 -0
  18. package/build/assets/{index-Dxtfs80M-s0TmhiEk.js → DeckGlJsonChart-CDmFrnUQ-CKLXTmyf.js} +217 -215
  19. package/build/assets/{index-D52Jf8Ey-SgTlRv8T.js → DownloadButton-g54AS0W2-qOKvF9wp.js} +1 -1
  20. package/build/assets/{ErrorOutline.esm-DV80JhHP-XkDmlp3T.js → ErrorOutline.esm-B1NqpuZN-D4cKYVYX.js} +1 -1
  21. package/build/assets/Feedback-DTXGrEzp-Dd_SGEH7.js +1 -0
  22. package/build/assets/{FileDownload.esm-Bg0DSX1Z-tYB-VhDd.js → FileDownload.esm-B_usFfyI-DvbGAuNe.js} +1 -1
  23. package/build/assets/FileUploader-CzCdIxed-CWWB6xZB.js +1 -0
  24. package/build/assets/FormSubmitContent-CstMuKlS-CwJlipqn.js +1 -0
  25. package/build/assets/{index-DuuHtz-x-Caurorud.js → GraphVizChart-nJ8rg3sZ-B_FsOCth.js} +2 -2
  26. package/build/assets/{index-B0C1EJi--C9vASPz3.js → Html-CkFoh4ns-BXVZGZ2C.js} +1 -1
  27. package/build/assets/IFrame-BklekJPV-_sg-kw0j.js +49 -0
  28. package/build/assets/ImageList-l3ue-eW1-CIwYKSdj.js +1 -0
  29. package/build/assets/{InputInstructions-GG_DznKT-BTS6NlIa.js → InputInstructions-C3LBp4_M-BIHPK8ho.js} +1 -1
  30. package/build/assets/Json-DmaVI2eK-CplwjZhb.js +2 -0
  31. package/build/assets/LinkButton-D87rEwzB-C31w_f7c.js +1 -0
  32. package/build/assets/MenuButton-DCWYT9Sm-Cjs_mH64.js +1 -0
  33. package/build/assets/Metric-B85kD6qx-D6Bt_A2_.js +1 -0
  34. package/build/assets/Multiselect-Dj9HMUjc-C1tpZV37.js +1 -0
  35. package/build/assets/NumberInput-Bz1Z4Olo-HwfUQwvD.js +1 -0
  36. package/build/assets/PageLink-DxIPOlCu-CAX1QvMp.js +1 -0
  37. package/build/assets/{Particles-ByFZ9kUC-B_aeMYcp.js → Particles-CgV8FzZe-CZFoM1Ot.js} +1 -1
  38. package/build/assets/{index-DlNfwH7j-Ciae2OLh.js → PlotlyChart-DApJXgoh-msWOSLU2.js} +105 -105
  39. package/build/assets/{index-CzaX93h_-B-_1QLd4.js → Progress-DXRywIcj-D00Siwwp.js} +1 -1
  40. package/build/assets/{ProgressBar-uLtuFXoi-C547ZD3U.js → ProgressBar-By08lmvS-BN2oE7g_.js} +2 -2
  41. package/build/assets/{index-C2tfS9CH-BRrFBwHT.js → Radio-DZEQy4hT-Cx0uGU2K.js} +3 -3
  42. package/build/assets/Selectbox-BywNaXj9-EovVNC_I.js +1 -0
  43. package/build/assets/Slider-sLEYxDUG-Bby7yVsF.js +2 -0
  44. package/build/assets/{index-DnMeTGk7-X2HPuQXI.js → Snow-MxXLnUX_-CCUTgEUd.js} +2 -2
  45. package/build/assets/{index-CxYiRuXO-CRK1FQiS.js → Spinner-D-YJYPV5-qoM-yuRL.js} +1 -1
  46. package/build/assets/{StreamlitSyntaxHighlighter-0BOUSobY-CgsoE1gN.js → StreamlitSyntaxHighlighter-y_BJ441X-Do55UoZC.js} +1 -1
  47. package/build/assets/Table-ah-SFAz4-BuzfN8wv.js +1 -0
  48. package/build/assets/{TableChart.esm-CoMoidiP-DrT_rrb0.js → TableChart.esm-x67iDGlj-hZSJidLi.js} +1 -1
  49. package/build/assets/TextArea-COwbG28l-yfu63ssv.js +1 -0
  50. package/build/assets/TextInput-CPqz-18c-DPGxqoCs.js +1 -0
  51. package/build/assets/TimeInput-BQ-fP8Yi-FMCqKedu.js +3 -0
  52. package/build/assets/{index-CrKJRmJv-Bg5NDALn.js → Toast-CGUHIZQI-39x9j5Rs.js} +1 -1
  53. package/build/assets/Video-CWomx7KF-nGUBPGaY.js +1 -0
  54. package/build/assets/{WidgetLabel-CoLw86qs-CNbX-e3H.js → WidgetLabel-DUaobbKW-DD-xWyXR.js} +1 -1
  55. package/build/assets/WidgetLabelHelpIcon-Dk_Qm9_8-CtMOr4fX.js +1 -0
  56. package/build/assets/WidgetLabelHelpIconInline-CkTH9muE-i_BwkvTR.js +1 -0
  57. package/build/assets/{_baseAssignValue-DQhmkaDt-Bl1quFU6.js → _baseAssignValue-DbpQ8D1L-D2c_-zPN.js} +1 -1
  58. package/build/assets/b1c37dc02f43b345-BK8hQpFn.woff2 +0 -0
  59. package/build/assets/{base-input-BdLA32iO-A9B9vy_-.js → base-input-CUlWnT-V-BhBQbzWk.js} +2 -2
  60. package/build/assets/{checkbox-DFREjf9t-Bj1xZr4O.js → checkbox-CEu7IJmq-3LmskyhR.js} +2 -2
  61. package/build/assets/{constants-Dj7RTpUo-BGkidDJo.js → constants-BFZIinC9-BhIl5GAK.js} +2 -2
  62. package/build/assets/{createDownloadLinkElement-DdPyJxB4-BwUogbJk.js → createDownloadLinkElement-CO9Q-pa0-BNUtAwjF.js} +1 -1
  63. package/build/assets/{createSuper-BZpABwIl-CzqIX_hj.js → createSuper-CPupKoXU-C5x8b8jJ.js} +1 -1
  64. package/build/assets/data-grid-overlay-editor-D7_bQukB-DqAp5wnt.js +1 -0
  65. package/build/assets/{downloader-DcCTL3Wz-BV_PV8FK.js → downloader-CZ7qD7NY-DGAnDDXL.js} +1 -1
  66. package/build/assets/{embed-DsUNNyuf-iklb31Eb.js → embed-Dc8baQ26-DAsqJZrc.js} +4 -4
  67. package/build/assets/{es6--XPcqeHG-CHWR2W_o.js → es6-BxevHr5y-DDD2E1qH.js} +2 -2
  68. package/build/assets/{formatNumber-C0_e-CAH-GlcLbdL6.js → formatNumber-DxMjoq14-D-XVTuz9.js} +1 -1
  69. package/build/assets/iconPosition-9UgvX_TD-BzkVt95G.js +1 -0
  70. package/build/assets/iframeResizer.contentWindow-CCqu70r3-2dQhJjwY.js +1 -0
  71. package/build/assets/{index-D8-_3_8b-1KPkAAUR.js → index-BV2WTlzI-BDu7x5w-.js} +1 -1
  72. package/build/assets/{index-rCmWIVzf.css → index-Bdx5V1kE.css} +1 -1
  73. package/build/assets/index-BoaYS_fk-BOYhDwkq.js +1 -0
  74. package/build/assets/{index-D84Izf2I-C_zQnNB2.js → index-CDNzkMOW-Ci5P-rfD.js} +1 -1
  75. package/build/assets/{index-DuHJMwJD-Bsr8Y8w7.js → index-CJ4tMOMA-DwN410du.js} +1 -1
  76. package/build/assets/{index-DXEnufEK-CPeh905k.js → index-Co96_X1M-Dl06Rnsd.js} +1 -1
  77. package/build/assets/index-DJf52eor.js +192 -0
  78. package/build/assets/{input-vJKt6Tqs-D1h27UxA.js → input-HUYzfsf9-BxmLV7Ek.js} +1 -1
  79. package/build/assets/{memory-B3L1Fctl-Cn5y4VWL.js → memory-C-LDMFc2-DmYLyk9H.js} +1 -1
  80. package/build/assets/{moment-CU6QKNej-DcQX_LE0.js → moment-C29_LcvN-BY3oO1nk.js} +1 -1
  81. package/build/assets/number-overlay-editor-BQXyYsVn-Dh7S4LVs.js +9 -0
  82. package/build/assets/{numbro-CBbENDeu-C6X7Pww4.js → numbro-CDdPhOTG-s-4vlRUZ.js} +1 -1
  83. package/build/assets/{pandasStylerUtils-GHHHScPD-CTKMoUtV.js → pandasStylerUtils-BVB-ECxE-CDURxvwo.js} +1 -1
  84. package/build/assets/{possibleConstructorReturn-E3G46ZYb-Lz9Rlt8w.js → possibleConstructorReturn-YeRoNy63-B2FGD3ja.js} +1 -1
  85. package/build/assets/reactJsonViewCompat-CeSrJm8p-le930912.js +13 -0
  86. package/build/assets/resolveDefaultExport-Cy5TTESD-D1yDGtVx.js +1 -0
  87. package/build/assets/{sandbox-ChAzL-i--BIq4nttm.js → sandbox-DbnteG5V-yqy_7sO8.js} +1 -1
  88. package/build/assets/select-haj_e3M_-P2nevO2w.js +11 -0
  89. package/build/assets/{sprintfjs-BB1ejNgh-D_XlFCD8.js → sprintfjs-DwuHM96D-Dbm-A0ro.js} +1 -1
  90. package/build/assets/stateful-menu-DhWFcRsJ-hkmyKt6q.js +4 -0
  91. package/build/assets/{styled-components-UJ_u5XUO-B68esmwJ.js → styled-components-BwoIjXty-eQCTyKeV.js} +1 -1
  92. package/build/assets/{styled-components-BF-9yHWP-Fq0Myn8O.js → styled-components-CRl5ROSi-CaifWlLZ.js} +1 -1
  93. package/build/assets/{styled-components-BPyosp2h-CHa8nolL.js → styled-components-CggDa8xh-DRn7YfuV.js} +1 -1
  94. package/build/assets/{threshold-eWsxmMyL-jpRnj60B.js → threshold-C_rop_uq-CSTNJaOo.js} +1 -1
  95. package/build/assets/timepicker-t1TdfIJG-CM4-XB8w.js +4 -0
  96. package/build/assets/{timer-DAAwtI0i-CB52lra-.js → timer-CuhnLtz1-DD8qTMUW.js} +1 -1
  97. package/build/assets/{toConsumableArray-fI4JT57_-CqtYDc1p.js → toConsumableArray-DtFGUM3A-BLxO6YGd.js} +1 -1
  98. package/build/assets/useBasicWidgetState-Bd8NTj87-Cqs9ZQAV.js +1 -0
  99. package/build/assets/{useIntlLocale-CYWMTZ3s-Bfz8l4j_.js → useIntlLocale-CXWYgGQX-B2q3sAu2.js} +9 -9
  100. package/build/assets/useSelectCommon-O2yZsfjb-6cuQoolB.js +1 -0
  101. package/build/assets/{useTextInputAutoExpand-DKFPNBDa-Cb0YY3m0.js → useTextInputAutoExpand-BTuNAk3V-5wcrsLsu.js} +2 -2
  102. package/build/assets/useUpdateUiValue-B574r2my-B36XHNQq.js +1 -0
  103. package/build/assets/useWaveformController-EemjKAv5-CT3VAgB8.js +1 -0
  104. package/build/assets/utils-DNbZWtPr-BHo82ec1.js +5 -0
  105. package/build/assets/{value-DwxUZIyI-CNuykc50.js → value-FXychKGJ-DfnNAqu8.js} +1 -1
  106. package/build/assets/wavesurfer.esm-BdCEnQA2-Cb5Yveqj.js +74 -0
  107. package/build/assets/withCalculatedWidth-CswVJ4Re-BeXEmgBt.js +1 -0
  108. package/build/assets/withFullScreenWrapper-CKo__VbV-B1HqecCF.js +1 -0
  109. package/build/assets/worker-DSGzx9v2-CeEZF0Hz.js +773 -0
  110. package/build/index.html +2 -2
  111. package/package.json +7 -7
  112. package/wheels/streamlit-1.56.0-cp313-none-any.whl +0 -0
  113. package/build/assets/9897c61aa169e10d-BSbTZIlv.woff2 +0 -0
  114. package/build/assets/FileHelper-6E1AHofU-qrMXF9BJ.js +0 -5
  115. package/build/assets/FormClearHelper-CbmTijuR-BhfBTvx4.js +0 -1
  116. package/build/assets/WidgetLabelHelpIcon-DGQ_r-QQ-BpBcjxpA.js +0 -1
  117. package/build/assets/WidgetLabelHelpIconInline-CBvJmNo2-CLxNkiVd.js +0 -1
  118. package/build/assets/data-grid-overlay-editor-QHhShSfm-3TuDDPoi.js +0 -1
  119. package/build/assets/iconPosition-DC20xXN5-Dq1FtUtw.js +0 -1
  120. package/build/assets/iframeResizer.contentWindow-CK2JqAeV-DqbaJEzN.js +0 -1
  121. package/build/assets/index-9BL32MjC-d0WHvbzb.js +0 -1
  122. package/build/assets/index-B4B1qPeD-B4iZ3Hle.js +0 -1
  123. package/build/assets/index-B5UL-R7r-CWJT9KeA.js +0 -1
  124. package/build/assets/index-BGnBFvx7-CovA4PPU.js +0 -1
  125. package/build/assets/index-BLF4SOe9-BATezQGi.js +0 -1
  126. package/build/assets/index-BVqn7psP-DOIOIfGO.js +0 -1
  127. package/build/assets/index-BWq44yej-BLlqoxJR.js +0 -2
  128. package/build/assets/index-BYY96E5j-Bp1H9cgU.js +0 -1
  129. package/build/assets/index-BZJBZSAA-DFqiOZai.js +0 -2
  130. package/build/assets/index-BjrlCNX2-LTYqrHHV.js +0 -1
  131. package/build/assets/index-BmK3aM70-BtZtyb9b.js +0 -2
  132. package/build/assets/index-BuOHAFyU-CgkpNrjG.js +0 -1
  133. package/build/assets/index-BwVivyUp-BMVGZ9_Q.js +0 -1
  134. package/build/assets/index-CDQEgcT1-DtNnQE5Q.js +0 -3
  135. package/build/assets/index-CSHbNsrd-CaeMETbK.js +0 -1
  136. package/build/assets/index-CStypS2h-ZcgczjKg.js +0 -1
  137. package/build/assets/index-CTUrfAxj--v8quZkn.js +0 -2
  138. package/build/assets/index-CYGEb27Q-2USI782v.js +0 -1
  139. package/build/assets/index-CZIHO3Hi-CIp8gy8I.js +0 -1
  140. package/build/assets/index-Cqst7YJT-C9v2_kdG.js +0 -1
  141. package/build/assets/index-DCNthJH_-DBm0ode_.js +0 -1
  142. package/build/assets/index-DKp3_2FO-qvF0epur.js +0 -1
  143. package/build/assets/index-Dd99Pbav-BGjrs667.js +0 -1
  144. package/build/assets/index-DegoUuPm.js +0 -171
  145. package/build/assets/index-DpazIH3n-D6BMkmZF.js +0 -1
  146. package/build/assets/index-LfSwL_C3-BhFtSxQv.js +0 -1
  147. package/build/assets/index-SfqmeEwF-Dq9F6PRu.js +0 -1
  148. package/build/assets/index-Zh4mTo6Q-BW_atvXh.js +0 -1
  149. package/build/assets/index-dDzvj0X4-DcwcRJ2U.js +0 -1
  150. package/build/assets/index-ebIdPrk5-uPj-BdYi.js +0 -1
  151. package/build/assets/index-glyZT6vh-DgW3Iulb.js +0 -11
  152. package/build/assets/index-hpzROwMA-mo9c0M0y.js +0 -1
  153. package/build/assets/index-t2JVnYeR-CxNAko6c.js +0 -198
  154. package/build/assets/main-B1Ej7gwo-CcTKNe5S.js +0 -13
  155. package/build/assets/number-overlay-editor-DJYV-edd-B_O-Ktcq.js +0 -9
  156. package/build/assets/select-Pj-68ff--fhVXPkd8.js +0 -14
  157. package/build/assets/timepicker-BJ4MpQyD-d8465QWp.js +0 -4
  158. package/build/assets/uniqueId-DvP0IaTe-DffbsNAr.js +0 -1
  159. package/build/assets/useBasicWidgetState-JbPrIror-Bu87DmaN.js +0 -1
  160. package/build/assets/useSelectCommon-DTdQ2TWs-DMezB-1T.js +0 -1
  161. package/build/assets/useUpdateUiValue-DMih0kWV-BWZ6Saew.js +0 -1
  162. package/build/assets/useWaveformController-BeUcMXLl-DLfXFMqt.js +0 -1
  163. package/build/assets/wavesurfer.esm-idh1jvYE-D4Wwdy60.js +0 -74
  164. package/build/assets/withCalculatedWidth-Du6RrD8E-CIxv0z4S.js +0 -1
  165. package/build/assets/withFullScreenWrapper-uh7txjJc-CYEgnXN4.js +0 -1
  166. package/build/assets/worker-DAN7Os1o-BP8Vk1l7.js +0 -106
  167. package/wheels/streamlit-1.55.0-cp313-none-any.whl +0 -0
  168. /package/build/assets/{index-BWXbSx5b-3ZGL6YOx.js → index-BKiUojFK-3ZGL6YOx.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r as i,N as ot,G as at,cy as st,cS as lt,i as oe,aY as Te,aX as ct,cT as m,w as Be,j as n,cO as ce,av as de,ax as E,am as dt,B as ut,aW as pt,x as y,E as H,_ as D,a7 as ht}from"./index-DJf52eor.js";import{k as gt,Y as He,_ as Pe,U as ae,j as ft,J as ue,S as mt,z as xt,L as wt}from"./utils-DNbZWtPr-BHo82ec1.js";import{c as bt}from"./useWaveformController-EemjKAv5-CT3VAgB8.js";import{m as De}from"./InputInstructions-C3LBp4_M-BIHPK8ho.js";import{y as yt,r as vt}from"./useTextInputAutoExpand-BTuNAk3V-5wcrsLsu.js";import{r as Ct}from"./inputUtils-DCYiajnz-DsrlAoKH.js";import{t as Ne}from"./UploadFileInfo-DdcsXhjv-m2CBXl3F.js";import"./TableChart.esm-x67iDGlj-hZSJidLi.js";import"./ErrorOutline.esm-B1NqpuZN-D4cKYVYX.js";import"./styled-components-BwoIjXty-eQCTyKeV.js";import"./base-input-CUlWnT-V-BhBQbzWk.js";import"./constants-BFZIinC9-BhIl5GAK.js";var pe=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm-1-9c0-.55.45-1 1-1s1 .45 1 1v6c0 .55-.45 1-1 1s-1-.45-1-1V5zm6 6c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});pe.displayName="MicNone";var $e=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}))});$e.displayName="Add";var he=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M13 19V7.83l4.88 4.88c.39.39 1.03.39 1.42 0a.996.996 0 000-1.41l-6.59-6.59a.996.996 0 00-1.41 0l-6.6 6.58a.996.996 0 101.41 1.41L11 7.83V19c0 .55.45 1 1 1s1-.45 1-1z"}))});he.displayName="ArrowUpward";var We=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M18 6.7l-8.48 8.48-3.54-3.54a.996.996 0 10-1.41 1.41l4.24 4.24c.39.39 1.02.39 1.41 0l9.18-9.18a.999.999 0 00-.01-1.42c-.37-.38-1-.38-1.39.01z"}))});We.displayName="Check";var Oe=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),i.createElement("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}))});Oe.displayName="Close";var ge=i.forwardRef(function(e,t){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(H,D({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm0 4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}))});ge.displayName="ErrorOutline";const X=ut.getLogger("ChatInput"),zt=y("div",{target:"e1d2x3se11"})(({isStretchHeight:e})=>({position:"relative",display:"flex",flexDirection:"column",...e&&{height:"100%"}}),""),St=y("div",{target:"e1d2x3se10"})(({theme:e,isStretchHeight:t})=>({backgroundColor:e.colors.secondaryBg,border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,position:"relative",display:"flex",flexDirection:"column",alignItems:"stretch",flex:1,paddingTop:e.spacing.md,paddingBottom:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg,gap:e.spacing.sm,borderRadius:e.radii.default,boxSizing:"border-box",...t&&{height:"100%"},":focus-within":{borderColor:e.colors.primary}}),""),jt=y("div",{target:"e1d2x3se9"})(({theme:e})=>({display:"flex",flexWrap:"wrap",gap:e.spacing.sm}),""),Et=y("div",{target:"e1d2x3se8"})(({theme:e,isStacked:t,hasExpandedHeight:a})=>({display:"flex",flexDirection:a?"column":"row",alignItems:a?"stretch":"center",justifyContent:a?"flex-start":"space-between",width:"100%",gap:e.spacing.sm,flexWrap:!a&&t?"wrap":"nowrap",...a&&{flex:1}}),""),Rt=y("div",{target:"e1d2x3se7"})(({isStacked:e,hasExpandedHeight:t})=>({flex:e&&!t?"none":1,width:e||t?"100%":"auto",order:e&&!t?-1:0,display:"flex",alignItems:t?"stretch":"center",minWidth:0}),""),Le=y("div",{target:"e1d2x3se6"})(({theme:e,hasExpandedHeight:t})=>({display:"flex",flexDirection:"row",flexShrink:0,gap:e.spacing.sm,alignItems:"center",order:t?0:-1}),""),Ue=y("div",{target:"e1d2x3se5"})(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing.sm,alignItems:"center"}),""),Ft=y("div",{target:"e1d2x3se4"})(({theme:e})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",gap:e.spacing.sm}),""),Ve=y("div",{target:"e1d2x3se3"})(({theme:e})=>({color:e.colors.fadedText60,fontSize:e.fontSizes.twoSm,textAlign:"right",whiteSpace:"nowrap",pointerEvents:"auto",cursor:"text","& .stChatInputInstructions":{position:"static"}}),""),R=y("button",{target:"e1d2x3se2"})(({theme:e,disabled:t,hasError:a,primary:g})=>{if(g)return{border:"none",backgroundColor:t?e.colors.darkenedBgMix15:e.colors.primary,borderRadius:e.radii.button,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.xs,width:e.sizes.chatInputPrimaryButtonSize,height:e.sizes.chatInputPrimaryButtonSize,color:t?e.colors.fadedText40:e.colors.white,cursor:t?"not-allowed":"pointer",transition:"background-color 200ms ease","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{boxShadow:e.shadows.focusRing},"&:hover":{backgroundColor:t?e.colors.darkenedBgMix15:e.colors.primary}};const d=()=>a?e.colors.redTextColor:t?e.colors.fadedText40:e.colors.fadedText60;return{border:"none",backgroundColor:e.colors.transparent,borderRadius:e.radii.default,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.none,color:d(),pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{boxShadow:e.shadows.focusRing},"&:hover":{color:a?e.colors.redColor:e.colors.bodyText},"&:active":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"},"& svg":{width:e.iconSizes.lg,height:e.iconSizes.lg}}},""),kt=y("div",{target:"e1d2x3se1"})(({isRecording:e})=>({display:e?"flex":"none",flex:1,alignItems:"center",minWidth:0}),""),Mt=y("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"relative",width:"100%",height:e.sizes.chatInputPrimaryButtonSize,borderRadius:e.radii.default,overflow:"hidden","& > div":{position:"absolute",inset:0}}),""),Ye=(e,t)=>t===m.Directory?{...e,webkitdirectory:"",multiple:!0}:e,It=(e,t)=>xt(e,t)?{isValid:!0}:{isValid:!1,errorMessage:`${e.type||"This type of"} files are not allowed.`},fe=e=>{switch(e){case m.None:return"a file";case m.Single:return"a file";case m.Multiple:return"files";case m.Directory:return"a directory";default:return ht(e),"a file"}},Tt=y("div",{target:"e3id6jz2"})(({theme:e})=>({backgroundColor:e.colors.transparent,position:"absolute",inset:0,zIndex:e.zIndices.priority,borderRadius:e.radii.chatInput}),""),Bt=y("div",{target:"e3id6jz1"})(({theme:e})=>({position:"absolute",inset:0,border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:e.fontWeights.bold,pointerEvents:"none",zIndex:e.zIndices.priority}),""),Ht=y("div",{target:"e3id6jz0"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),Dt=({onDrop:e,multiple:t,accept:a,maxSize:g,acceptFile:d,disabled:p,fileTypes:f})=>{const{getRootProps:C,getInputProps:x}=Pe({onDrop:e,multiple:t,accept:a,maxSize:g,useFsAccessApi:!1}),w=Ye(x(),d),c=C({tabIndex:-1}),h=()=>{const u=`Upload or drag and drop ${fe(d)}`;return f&&f.length>0?`${u} (${wt(f)})`:u};return n.jsxs(Ht,{"data-testid":"stChatInputFileUploadButton",disabled:p,...c,children:[n.jsx("input",{...w}),n.jsx(ce,{content:h(),placement:de.TOP,onMouseEnterDelay:500,children:n.jsx(R,{type:"button",disabled:p,"aria-label":`Upload ${fe(d)}`,children:n.jsx(E,{content:$e,size:"xl",color:"inherit"})})})]})},Ae=i.memo(Dt),Lt=({getRootProps:e,getInputProps:t,acceptFile:a})=>{const g=Ye(t(),a);return n.jsxs(n.Fragment,{children:[n.jsx(Tt,{...e(),children:n.jsx("input",{...g})}),n.jsx(Bt,{children:`Drag and drop ${fe(a)} here`})]})},Ut=i.memo(Lt),Vt=(e,t,a)=>{const g=[],d=[];return e.forEach(p=>{if(p.size>a){d.push({file:p,errors:[{code:ue.FileTooLarge,message:`File is too large. Maximum size is ${a} bytes.`}]});return}const f=It(p,t.fileType);if(!f.isValid){d.push({file:p,errors:[{code:ue.FileInvalidType,message:f.errorMessage||"File type not allowed."}]});return}g.push(p)}),{accepted:g,rejected:d}},At=({acceptMultipleFiles:e,maxFileSize:t,uploadClient:a,uploadFile:g,addFiles:d,getNextLocalFileId:p,deleteExistingFiles:f,onUploadComplete:C,element:x})=>(w,c)=>{if(w.length>0){const{accepted:h,rejected:u}=Vt(w,x,t);w=h,c=[...c,...u]}if(!e&&w.length===0&&c.length>1){const h=c.findIndex(u=>u.errors?.[0].code===ue.TooManyFiles);h>=0&&(w.push(c[h].file),c.splice(h,1))}if(!e&&w.length>0&&f(),a.fetchFileURLs(w).then(h=>{pt(h,w).forEach(([u,I])=>{g(u,I)})}).catch(h=>{d(w.map(u=>new Ne(u.name,u.size,p(),{type:"error",errorMessage:h},u)))}),c.length>0){const h=c.map(u=>mt(u,p(),t));d(h)}C()},Pt=({getNextLocalFileId:e,addFiles:t,updateFile:a,uploadClient:g,element:d,onUploadProgress:p,onUploadComplete:f})=>(C,x)=>{const w=x.webkitRelativePath||x.name,c=new AbortController,h=new Ne(w,x.size,e(),{type:"uploading",abortController:c,progress:1},x);t([h]),g.uploadFile({formId:"",...d},C.uploadUrl,x,u=>p(u,h.id),c.signal).then(()=>f(h.id,C)).catch(u=>{u instanceof DOMException&&u.name==="AbortError"||a(h.id,h.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})};function Nt(e,t,a,g,d){return{Root:{style:{minHeight:g??e.sizes.chatInputTextareaMinHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0",...a}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:e.fontWeights.normal,lineHeight:e.lineHeights.inputWidget,"::placeholder":{color:e.colors.fadedText60},height:d?"100%":t.isExtended?t.height:"auto",maxHeight:d?"none":t.maxHeight,overflowY:"auto",paddingLeft:e.spacing.none,paddingRight:e.spacing.none,paddingBottom:e.spacing.twoXS,paddingTop:e.spacing.twoXS,width:"100%"}}}}const se=(e,t,a)=>a.map(g=>g.id===e?t:g),le=(e,t)=>t.find(a=>a.id===e);function $t({disabled:e,element:t,widgetMgr:a,fragmentId:g,uploadClient:d,heightConfig:p}){const f=ot(),{placeholder:C,maxChars:x}=t,w=i.useRef(0),c=i.useRef(null),h=i.useRef(!1),u=i.useRef(null),I=i.useRef(null),{width:Ke,elementRef:_e}=at(),{innerWidth:me,innerHeight:xe}=st(),[z,G]=i.useState(t.default),[S,k]=i.useState([]),[L,Q]=i.useState(!1),[F,we]=i.useState(!1),[U,V]=i.useState(null),[T,q]=i.useState(!1),[be,ye]=i.useState(0),N=t.acceptAudio??!1;i.useEffect(()=>()=>{I.current&&I.current.abort()},[]);const A=yt({textareaRef:c,dependencies:[C,T]}),$=i.useRef(""),W=i.useRef(0),Z=i.useRef(null),ve=i.useRef(null),P=i.useCallback(r=>{const o=getComputedStyle(r);$.current=`${o.fontWeight} ${o.fontSize} ${o.fontFamily}`;const l=parseFloat(o.paddingLeft)||0,s=parseFloat(o.paddingRight)||0;W.current=r.clientWidth-l-s},[]);i.useLayoutEffect(()=>{const r=c.current;if(!r)return;P(r);const o=new ResizeObserver(()=>P(r));return o.observe(r),()=>o.disconnect()},[P,T]),i.useEffect(()=>{if(z===""){q(!1);return}if(T)return;const r=c.current;if(!r||((W.current<=0||!$.current)&&P(r),W.current<=0||!$.current))return;Z.current||(Z.current=document.createElement("canvas"),ve.current=Z.current.getContext("2d"));const o=ve.current;o&&(o.font=$.current,o.measureText(z).width>W.current-10&&q(!0))},[z,T,P]);const B=i.useMemo(()=>S.some(r=>r.status.type==="uploading")?!1:z!==""||S.length>0,[S,z]),b=lt(t.acceptFile),O=gt(t.maxUploadSizeMb,He.Megabyte,He.Byte),Ce=i.useCallback(r=>k(o=>[...o,...r]),[]),ze=i.useCallback(r=>{r.status.type==="uploading"&&r.status.abortController.abort(),r.status.type==="uploaded"&&r.status.fileUrls.deleteUrl&&d.deleteFile(r.status.fileUrls.deleteUrl).catch(o=>{X.error("Failed to delete file from server:",o)})},[d]),Se=i.useCallback(r=>{k(o=>{const l=le(r,o);if(oe(l))return o;ze(l);const s=o.filter(v=>v.id!==r);return s.length===0&&ye(v=>v+1),s})},[ze]),ee=i.useRef(null),Je=i.useCallback(r=>{!r.file||r.status.type!=="error"||(k(o=>o.filter(l=>l.id!==r.id)),ee.current&&ee.current([r.file],[]))},[]),je=i.useCallback(()=>{const r=S.filter(o=>o.status.type==="uploaded").map(o=>{const{name:l,size:s,status:v}=o,{fileId:ne,fileUrls:nt}=v;return new Te({fileId:ne,fileUrls:nt,name:l,size:s})});return new ct({uploadedFileInfo:r})},[S]),Ee=()=>w.current++,Y=At({acceptMultipleFiles:b===m.Multiple||b===m.Directory,maxFileSize:O,uploadClient:d,uploadFile:Pt({getNextLocalFileId:Ee,addFiles:Ce,updateFile:(r,o)=>{k(l=>se(r,o,l))},uploadClient:d,element:t,onUploadProgress:(r,o)=>{k(l=>{const s=le(o,l);if(oe(s)||s.status.type!=="uploading")return l;const v=r.total?Math.round(r.loaded*100/r.total):0;return s.status.progress===v?l:se(o,s.setStatus({type:"uploading",abortController:s.status.abortController,progress:v}),l)})},onUploadComplete:(r,o)=>{k(l=>{const s=le(r,l);return oe(s)||s.status.type!=="uploading"?l:se(s.id,s.setStatus({type:"uploaded",fileId:o.fileId,fileUrls:o}),l)})}}),addFiles:Ce,getNextLocalFileId:Ee,deleteExistingFiles:()=>S.forEach(r=>Se(r.id)),onUploadComplete:()=>{c.current&&c.current.focus()},element:t});ee.current=Y;const{getRootProps:Xe,getInputProps:Ge}=Pe({onDrop:Y,multiple:b===m.Multiple||b===m.Directory,accept:ae(t.fileType),maxSize:O,useFsAccessApi:!1}),K=i.useCallback(r=>{if(c.current&&c.current.focus(),!B&&!r||e)return;const o=je(),l={data:z,fileUploaderState:o,audioFileInfo:r};a.setChatInputValue(t,l,{fromUi:!0},g),S.length>0&&ye(s=>s+1),k([]),G(""),q(!1),A.clearScrollHeight()},[B,e,z,S.length,je,a,t,g,A]),Re=i.useCallback(async r=>{const o=new Date().toISOString().replace(/[:.]/g,"-"),l=new File([r],`audio-${o}.wav`,{type:"audio/wav"});try{we(!0);const s=await d.fetchFileURLs([l]);if(s.length===0)throw new Error("Failed to get upload URL for audio file");const v=s[0];I.current=new AbortController,await d.uploadFile({formId:"",...t},v.uploadUrl,l,()=>{},I.current.signal);const ne=new Te({fileId:v.fileId,fileUrls:v,name:l.name,size:l.size});K(ne)}catch(s){X.error("Audio upload failed:",s),V("Recording failed"),c.current&&c.current.focus()}finally{we(!1)}},[d,t,K]),Qe=i.useMemo(()=>({onApprove:Re,onPermissionDenied:()=>{const r="Microphone access denied";V(r),X.error("Permission denied:",r)},onError:r=>{V("Recording failed"),X.error("Recording error:",r)},onRecordStart:()=>{V(null)}}),[Re]),j=bt({containerRef:u,sampleRate:t.audioSampleRate??void 0,events:Qe}),te=i.useCallback(()=>{K()},[K]),qe=r=>{const{metaKey:o,ctrlKey:l,shiftKey:s}=r;Ct(r)&&!s&&!l&&!o&&(r.preventDefault(),te())},Ze=r=>{const{value:o}=r.target;x!==0&&o.length>x||(G(o),A.updateScrollHeight(),U&&V(null))},Fe=i.useCallback(async r=>{r.preventDefault(),r.stopPropagation(),!(!N||e||j.state==="recording")&&await j.start()},[N,e,j]),et=i.useCallback(()=>{j.cancel(),c.current&&c.current.focus()},[j]),ke=i.useCallback(async()=>{const{blob:r}=await j.stop();await j.approve(r)},[j]),_=i.useCallback(r=>{Fe(r)},[Fe]),tt=i.useCallback(()=>{ke()},[ke]),Me=i.useCallback(()=>{c.current&&c.current.focus()},[]);i.useEffect(()=>{if(t.setValue&&!h.current){h.current=!0;const r=t.value||"";G(r)}},[t.setValue,t.value]),i.useEffect(()=>{h.current=!1},[t]),i.useEffect(()=>{const r=s=>{s.preventDefault(),s.stopPropagation(),!L&&s.dataTransfer?.types.includes("Files")&&Q(!0)},o=s=>{s.preventDefault(),s.stopPropagation(),L&&(s.clientX<=0&&s.clientY<=0||s.clientX>=me&&s.clientY>=xe)&&Q(!1)},l=s=>{s.preventDefault(),s.stopPropagation(),L&&Q(!1)};return window.addEventListener("dragover",r),window.addEventListener("drop",l),window.addEventListener("dragleave",o),()=>{window.removeEventListener("dragover",r),window.removeEventListener("drop",l),window.removeEventListener("dragleave",o)}},[L,me,xe]);const rt=b!==m.None&&L,M=j.state==="recording",re=!M&&Ke>Be(f.breakpoints.hideWidgetDetails)&&x>0,it=i.useMemo(()=>{if(!(!p||p.useContent)){if(p.useStretch)return"100%";if(p.pixelHeight&&p.pixelHeight>0){const r=parseInt(f.sizes.borderWidth,10)||1,o=Be(f.spacing.md)*2+r*2;return`${Math.max(0,p.pixelHeight-o)}px`}}},[p,f.sizes.borderWidth,f.spacing.md]),ie=p?.useStretch??!1,Ie=ie||(p?.pixelHeight??0)>0,J=Ie||A.isExtended;return n.jsx(zt,{className:"stChatInput","data-testid":"stChatInput",ref:_e,isStretchHeight:ie,children:n.jsxs(St,{isStretchHeight:ie,children:[rt&&n.jsx(Ut,{getRootProps:Xe,getInputProps:Ge,acceptFile:b}),b!==m.None&&S.length>0&&n.jsx(jt,{children:n.jsx(ft,{items:[...S],onDelete:Se,onRetry:Je})}),n.jsxs(Et,{isStacked:T,hasExpandedHeight:J&&!M,children:[!M&&n.jsx(Rt,{isStacked:T,hasExpandedHeight:J,children:n.jsx(vt,{inputRef:c,value:z,placeholder:C,onChange:Ze,onKeyDown:qe,"aria-label":C,disabled:e,rows:1,"aria-describedby":re?"stChatInputInstructions":void 0,overrides:Nt(f,A,{width:"100%",...J?{flex:1}:{}},it,Ie)})}),J&&!M?n.jsxs(Ft,{children:[n.jsx(Le,{hasExpandedHeight:!0,children:b!==m.None&&n.jsx(Ae,{onDrop:Y,multiple:b===m.Multiple||b===m.Directory,accept:ae(t.fileType),maxSize:O,acceptFile:b,disabled:e,fileTypes:t.fileType},be)}),n.jsxs(Ue,{children:[re&&n.jsx(Ve,{onClick:Me,id:"stChatInputInstructions",children:n.jsx(De,{dirty:B,value:z,maxLength:x,type:"chat",inForm:!1,className:"stChatInputInstructions"})}),N&&n.jsx(n.Fragment,{children:U?n.jsx(ce,{content:U,placement:de.TOP,error:!0,children:n.jsx(R,{onClick:_,disabled:e||F,hasError:!0,"data-testid":"stChatInputMicButton","aria-label":"Start recording",children:n.jsx(E,{content:ge,size:"xl",color:"inherit"})})}):n.jsx(R,{onClick:_,disabled:e||F,"data-testid":"stChatInputMicButton","aria-label":"Start recording",children:n.jsx(E,{content:pe,size:"xl",color:"inherit"})})}),n.jsx(R,{onClick:te,disabled:!B||e||F,"data-testid":"stChatInputSubmitButton","aria-label":"Send message",primary:!0,children:n.jsx(E,{content:he,size:"lg",color:"inherit"})})]})]}):n.jsxs(n.Fragment,{children:[n.jsx(Le,{hasExpandedHeight:!1,children:b!==m.None&&!M&&n.jsx(Ae,{onDrop:Y,multiple:b===m.Multiple||b===m.Directory,accept:ae(t.fileType),maxSize:O,acceptFile:b,disabled:e,fileTypes:t.fileType},be)}),n.jsx(kt,{isRecording:M,children:n.jsx(Mt,{ref:u})}),n.jsx(Ue,{children:M?n.jsxs(n.Fragment,{children:[n.jsx(R,{onClick:et,disabled:e,"data-testid":"stChatInputCancelButton","aria-label":"Cancel recording",children:n.jsx(E,{content:Oe,size:"lg",color:"inherit"})}),n.jsx(R,{onClick:tt,disabled:e||F,"data-testid":"stChatInputApproveButton","aria-label":"Submit recording",children:F?n.jsx(dt,{size:"lg",iconValue:"spinner"}):n.jsx(E,{content:We,size:"lg",color:"inherit"})})]}):n.jsxs(n.Fragment,{children:[re&&n.jsx(Ve,{onClick:Me,id:"stChatInputInstructions",children:n.jsx(De,{dirty:B,value:z,maxLength:x,type:"chat",inForm:!1,className:"stChatInputInstructions"})}),N&&n.jsx(n.Fragment,{children:U?n.jsx(ce,{content:U,placement:de.TOP,error:!0,children:n.jsx(R,{onClick:_,disabled:e||F,hasError:!0,"data-testid":"stChatInputMicButton","aria-label":"Start recording",children:n.jsx(E,{content:ge,size:"xl",color:"inherit"})})}):n.jsx(R,{onClick:_,disabled:e||F,"data-testid":"stChatInputMicButton","aria-label":"Start recording",children:n.jsx(E,{content:pe,size:"xl",color:"inherit"})})}),n.jsx(R,{onClick:te,disabled:!B||e||F,"data-testid":"stChatInputSubmitButton","aria-label":"Send message",primary:!0,children:n.jsx(E,{content:he,size:"lg",color:"inherit"})})]})})]})]})]})})}const tr=i.memo($t);export{tr as default};
@@ -0,0 +1 @@
1
+ import{r as u,N as y,a6 as T,j as s,cU as C,cV as w,z as S,av as $,aw as v,cW as L}from"./index-DJf52eor.js";import{d as B}from"./WidgetLabelHelpIconInline-CkTH9muE-i_BwkvTR.js";import{N as R}from"./useBasicWidgetState-Bd8NTj87-Cqs9ZQAV.js";import{v as W,y as V,T as b}from"./checkbox-CEu7IJmq-3LmskyhR.js";import"./styled-components-BwoIjXty-eQCTyKeV.js";function M({element:e,disabled:a,widgetMgr:c,fragmentId:n}){const f=e.queryParamKey?{paramKey:e.queryParamKey,valueType:"bool_value",clearable:!1}:void 0,[p,g]=R({getStateFromWidgetMgr:P,getDefaultStateFromProto:X,getCurrStateFromProto:j,updateWidgetMgrState:H,element:e,widgetMgr:c,fragmentId:n,formClearBehavior:"resetValueOnly",queryParamBinding:f}),k=u.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=y(),{colors:r,spacing:h,sizes:o}=t,m=T(t),x=a?r.fadedText40:r.bodyText;return s.jsx(C,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:s.jsx(W,{checked:p,disabled:a,onChange:k,"aria-label":e.label,checkmarkType:e.type===L.StyleType.TOGGLE?b.toggle:b.default,labelPlacement:V.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?r.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=m?r.bgColor:r.bodyText;return a&&(d=m?r.gray70:r.gray90),{width:`calc(${o.checkbox} - ${t.spacing.twoXS})`,height:`calc(${o.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${o.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=r.borderColor;return d&&!a&&(l=r.darkenedBgMix15),i&&!a&&(l=r.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${o.checkbox})`,minWidth:`calc(2 * ${o.checkbox})`,height:o.checkbox,minHeight:o.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?r.primary:r.borderColor;return{outline:0,width:o.checkbox,height:o.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?t.shadows.focusRing:"",borderLeftWidth:o.borderWidth,borderRightWidth:o.borderWidth,borderTopWidth:o.borderWidth,borderBottomWidth:o.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:x}}},children:s.jsxs(w,{visibility:v(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[s.jsx(S,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&s.jsx(B,{content:e.help,placement:$.TOP_RIGHT,label:e.label})]})})})}function P(e,a){return e.getBoolValue(a)}function X(e){return e.default??!1}function j(e){return e.value??!1}function H(e,a,c,n){a.setBoolValue(e,c.value,{fromUi:c.fromUi},n)}const q=u.memo(M);export{q as default};