streamlit-nightly 1.42.2.dev20250218__py2.py3-none-any.whl → 1.42.2.dev20250219__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/static/js/{FileDownload.esm.DU-1rCSB.js → FileDownload.esm.gA2YL2Ws.js} +1 -1
  3. streamlit/static/static/js/{FileDropzone.BI3MGDdT.js → FileDropzone.CFdsfZRc.js} +1 -1
  4. streamlit/static/static/js/{FormClearHelper.DzU-mNjk.js → FormClearHelper.CUy5uXTm.js} +1 -1
  5. streamlit/static/static/js/{Hooks.qUbVZL-A.js → Hooks.DK2XYjwG.js} +1 -1
  6. streamlit/static/static/js/{InputInstructions.CpNPMMpX.js → InputInstructions.BliBOyQ3.js} +1 -1
  7. streamlit/static/static/js/{ProgressBar.4yIafGOA.js → ProgressBar.x1Isa69D.js} +1 -1
  8. streamlit/static/static/js/{RenderInPortalIfExists.31NYBozH.js → RenderInPortalIfExists.BAeceYUy.js} +1 -1
  9. streamlit/static/static/js/{Toolbar.lnT7wtEH.js → Toolbar.CT8DybSu.js} +1 -1
  10. streamlit/static/static/js/{base-input.DYDwDBVN.js → base-input.DCz9tkLd.js} +1 -1
  11. streamlit/static/static/js/{createSuper.CP_bqXkl.js → createSuper.C7LhI0EH.js} +1 -1
  12. streamlit/static/static/js/{data-grid-overlay-editor.Bw6S-08j.js → data-grid-overlay-editor.BCdg4YOG.js} +1 -1
  13. streamlit/static/static/js/{downloader.DZpOwdni.js → downloader.vdos0sUi.js} +1 -1
  14. streamlit/static/static/js/{es6.D670kkuw.js → es6.DwFVXqV3.js} +2 -2
  15. streamlit/static/static/js/{iframeResizer.contentWindow.CBWvp4oS.js → iframeResizer.contentWindow.RYpo13Tx.js} +1 -1
  16. streamlit/static/static/js/{index.0jzSLI-x.js → index.B6ax18R8.js} +1 -1
  17. streamlit/static/static/js/{index.Bif_gpeX.js → index.B7_aOrfa.js} +1 -1
  18. streamlit/static/static/js/{index.CrYKK91g.js → index.BGAu9NKr.js} +1 -1
  19. streamlit/static/static/js/{index.CD53GuKN.js → index.BZeSmopR.js} +1 -1
  20. streamlit/static/static/js/{index.8M0nMTyK.js → index.BdXu9OaH.js} +1 -1
  21. streamlit/static/static/js/{index.D3VdaBwP.js → index.BkCG7aTj.js} +1 -1
  22. streamlit/static/static/js/{index.DHBu5iL6.js → index.BpjiEyUX.js} +1 -1
  23. streamlit/static/static/js/{index.C5VAa8DZ.js → index.C-qg2uWr.js} +1 -1
  24. streamlit/static/static/js/{index.DJF89pFO.js → index.C1c-PWwv.js} +1 -1
  25. streamlit/static/static/js/{index.D6UL3iMZ.js → index.C53pKB0j.js} +1 -1
  26. streamlit/static/static/js/{index.BkURA4Nq.js → index.C5SUBN7c.js} +1 -1
  27. streamlit/static/static/js/{index.B6KnC7nW.js → index.C5Vmgs5Q.js} +1 -1
  28. streamlit/static/static/js/{index.DdeHhk74.js → index.CO-uFT7b.js} +1 -1
  29. streamlit/static/static/js/{index.BMlBBPxY.js → index.CP5mPDkY.js} +1 -1
  30. streamlit/static/static/js/{index.CLsHMaqe.js → index.CTtluRFB.js} +5 -5
  31. streamlit/static/static/js/{index.CA6bEd5D.js → index.CYAXfbfU.js} +1 -1
  32. streamlit/static/static/js/{index.DRJutLeV.js → index.CYBSRaVx.js} +1 -1
  33. streamlit/static/static/js/{index.DNEGP5ih.js → index.CaA1VIZR.js} +1 -1
  34. streamlit/static/static/js/{index.De5HitMn.js → index.CbM0IQPr.js} +1 -1
  35. streamlit/static/static/js/{index.B-Bz2NGO.js → index.CpJnG_8d.js} +1 -1
  36. streamlit/static/static/js/{index.DsvnAu-2.js → index.D0h2TgPB.js} +1 -1
  37. streamlit/static/static/js/{index.Du4f6P1i.js → index.D8iwKK7d.js} +1 -1
  38. streamlit/static/static/js/{index.-wGNsvT9.js → index.DA71zvn-.js} +1 -1
  39. streamlit/static/static/js/{index.D8aCPmhr.js → index.DCnVdrNR.js} +1 -1
  40. streamlit/static/static/js/{index.Ch1c3KR1.js → index.DFovZsvy.js} +1 -1
  41. streamlit/static/static/js/{index.ChIZFRw0.js → index.DGog6RGy.js} +1 -1
  42. streamlit/static/static/js/{index.B9mk7o4G.js → index.DSORXUAZ.js} +1 -1
  43. streamlit/static/static/js/{index.DS38XxzV.js → index.DTMcwebh.js} +1 -1
  44. streamlit/static/static/js/{index.Byj6qntv.js → index.DTik05yh.js} +1 -1
  45. streamlit/static/static/js/{index.edlGQJ3v.js → index.Dc1YdleN.js} +5 -5
  46. streamlit/static/static/js/{index.C0O8ISw8.js → index.DgLxA-9p.js} +1 -1
  47. streamlit/static/static/js/index.Dh8M84uS.js +1 -0
  48. streamlit/static/static/js/{index.XAUdgEdp.js → index.DuxM9Tnh.js} +1 -1
  49. streamlit/static/static/js/{index.HCbHLWBq.js → index.XBfbnu7R.js} +1 -1
  50. streamlit/static/static/js/{index.CKT6gwZG.js → index.Ya6ZDkVG.js} +1 -1
  51. streamlit/static/static/js/{index.BhTUDBBK.js → index.rOQjzSJF.js} +1 -1
  52. streamlit/static/static/js/{index.BCorV1AX.js → index.zBfRJuNm.js} +1 -1
  53. streamlit/static/static/js/{input.e-37_Dj1.js → input.DI1DKx6K.js} +1 -1
  54. streamlit/static/static/js/{memory.B5p-2jga.js → memory.Bys8G1q2.js} +1 -1
  55. streamlit/static/static/js/{mergeWith.D8nk5iJa.js → mergeWith.CQCg1Krv.js} +1 -1
  56. streamlit/static/static/js/{number-overlay-editor.DLD5-9zx.js → number-overlay-editor.C7xqWB6m.js} +1 -1
  57. streamlit/static/static/js/{possibleConstructorReturn.eeV6HB6T.js → possibleConstructorReturn.CoBITkSn.js} +1 -1
  58. streamlit/static/static/js/{sandbox.ChKquq8J.js → sandbox.DhWaUNlZ.js} +1 -1
  59. streamlit/static/static/js/{textarea.ZI_0MUsX.js → textarea.BBYT1EyU.js} +1 -1
  60. streamlit/static/static/js/{timepicker.C8N66VUc.js → timepicker.BNm3w13Y.js} +1 -1
  61. streamlit/static/static/js/{toConsumableArray.DKg00cRh.js → toConsumableArray.CdvkF-LC.js} +1 -1
  62. streamlit/static/static/js/{uniqueId.fc9w8X88.js → uniqueId.C4bthDRw.js} +1 -1
  63. streamlit/static/static/js/{useBasicWidgetState.CySX_BlM.js → useBasicWidgetState.B8drr2-Z.js} +1 -1
  64. streamlit/static/static/js/{useOnInputChange.BF6Trlh5.js → useOnInputChange.DxZMmV5y.js} +1 -1
  65. streamlit/static/static/js/{withFullScreenWrapper.x2WsM7iA.js → withFullScreenWrapper.KpXeL4S_.js} +1 -1
  66. {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.2.dev20250219.dist-info}/METADATA +1 -1
  67. {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.2.dev20250219.dist-info}/RECORD +71 -71
  68. streamlit/static/static/js/index.Cvgj5_qB.js +0 -1
  69. {streamlit_nightly-1.42.2.dev20250218.data → streamlit_nightly-1.42.2.dev20250219.data}/scripts/streamlit.cmd +0 -0
  70. {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.2.dev20250219.dist-info}/WHEEL +0 -0
  71. {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.2.dev20250219.dist-info}/entry_points.txt +0 -0
  72. {streamlit_nightly-1.42.2.dev20250218.dist-info → streamlit_nightly-1.42.2.dev20250219.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- import{r as s,E as N,_ as $,n as g,D as ht,y as q,j as n,b7 as J,bs as ft,C as w,bn as Q,b2 as Z,bm as U,aY as mt,bD as yt,bh as Ct,bE as b,bq as vt,F as tt,be as bt,bF as It,K as B,bj as xt,bi as wt}from"./index.CLsHMaqe.js";import{g as St,F as Ft,C as Et,I as zt,E as Ut,u as Ht,a as Tt}from"./FileDropzone.BI3MGDdT.js";import{I as Dt}from"./InputInstructions.CpNPMMpX.js";import{i as kt}from"./inputUtils.CQWz5UKz.js";import{a as j}from"./index.DW_MHI2K.js";import{U as V}from"./UploadFileInfo.C-jY39rj.js";import{T as Bt}from"./textarea.ZI_0MUsX.js";import"./base-input.DYDwDBVN.js";var et=s.forwardRef(function(t,e){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(N,$({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});et.displayName="AttachFile";var ot=s.forwardRef(function(t,e){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(N,$({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});ot.displayName="ErrorOutline";var nt=s.forwardRef(function(t,e){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(N,$({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("rect",{width:24,height:24,fill:"none"}),s.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});nt.displayName="Send";const Rt=g("div",{target:"e126hk1x0"})("border:none;position:relative;display:flex;"),Lt=g("div",{target:"e126hk1x1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),Mt=g("button",{target:"e126hk1x2"})(({theme:t,disabled:e,extended:l})=>{const d=ht(t),[c,h]=d?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:l?"0":t.radii.chatInput,borderTopLeftRadius:l?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?c:h,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:d?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),Vt=g("div",{target:"e126hk1x3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),Nt=g("div",{target:"e126hk1x4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),$t=g("div",{target:"e1hhpaco0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),At=g("div",{target:"e1hhpaco1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Wt=g("div",{target:"e1hhpaco2"})(({theme:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`})),Pt=g("div",{target:"e1hhpaco3"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Kt=g("div",{target:"e1hhpaco4"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Ot=g("div",{target:"e1hhpaco5"})(({})=>({display:"flex"})),_t=g("div",{target:"e1hhpaco6"})(({})=>({flex:"0 0 auto"})),Xt=g("div",{target:"e1hhpaco7"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Gt=g("div",{target:"e1hhpaco8"})(({theme:t})=>({color:t.colors.fadedText60})),Yt=g("div",{target:"e1hhpaco9"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),jt=g("div",{target:"e1hhpaco10"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),qt=g("small",{target:"e1hhpaco11"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function Jt({children:t,content:e}){const l=q();return n(ft,{content:e,placement:J.TOP,overrides:{Body:{style:{top:`-${l.sizes.minElementHeight}`}}},children:t})}const Qt=({fileInfo:t})=>{const{type:e}=t.status;switch(e){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(Jt,{content:t.status.errorMessage,children:n(U,{content:ot,size:"lg"})});case"uploaded":return n(U,{content:zt,size:"lg"});default:return mt(e),null}},Zt=({fileInfo:t,onDelete:e})=>w(Xt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(Gt,{children:n(Qt,{fileInfo:t})}),n(Yt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(jt,{children:St(t.size,Ft.Byte)}),n(qt,{"data-testid":"stChatInputDeleteBtn",children:n(Q,{onClick:()=>e(t.id),kind:Z.MINIMAL,children:n(U,{content:Et,size:"lg"})})})]}),te=({items:t,onDelete:e})=>n(Kt,{"data-testid":"stChatUploadedFiles",children:n(Ot,{children:t.map(l=>n(_t,{children:n(Zt,{fileInfo:l,onDelete:e})},l.id))})}),ee=({getNextLocalFileId:t,addFiles:e,updateFile:l,uploadClient:d,element:c,onUploadProgress:h,onUploadComplete:S})=>(f,y)=>{const m=j.CancelToken.source(),p=new V(y.name,y.size,t(),{type:"uploading",cancelToken:m,progress:1});e([p]),d.uploadFile({formId:"",...c},f.uploadUrl,y,u=>h(u,p.id),m.token).then(()=>S(p.id,f)).catch(u=>{j.isCancel(u)||l(p.id,p.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})},oe=({acceptMultipleFiles:t,uploadClient:e,uploadFile:l,addFiles:d,getNextLocalFileId:c,deleteExistingFiles:h,onUploadComplete:S})=>(f,y)=>{if(!t&&f.length===0&&y.length>1){const m=y.findIndex(p=>{var u;return((u=p.errors)==null?void 0:u[0].code)===Ut.TooManyFiles});m>=0&&(f.push(y[m].file),y.splice(m,1))}if(!t&&f.length>0&&h(),e.fetchFileURLs(f).then(m=>{Ct(m,f).forEach(([p,u])=>{l(p,u)})}).catch(m=>{d(f.map(p=>new V(p.name,p.size,c(),{type:"error",errorMessage:m})))}),y.length>0){const m=y.map(p=>new V(p.file.name,p.file.size,c(),{type:"error",errorMessage:p.errors.map(u=>u.message).filter(u=>!!u).join(", ")}));d(m)}S()},ne=({getRootProps:t,getInputProps:e,acceptFile:l,disabled:d,theme:c})=>w(Wt,{children:[w("div",{"data-testid":"stChatInputFileUploadButton",...t(),children:[n("input",{...e()}),n(vt,{content:`Upload or drag and drop ${l===b.Multiple?"files":"a file"}`,placement:J.TOP,onMouseEnterDelay:500,children:n(Q,{kind:Z.MINIMAL,disabled:d,children:n(U,{content:et,size:"lg",color:c.colors.fadedText60})})})]}),n(Pt,{})]}),ae=({getRootProps:t,getInputProps:e,acceptFile:l,inputHeight:d})=>w(tt,{children:[n($t,{height:d,...t(),children:n("input",{...e()})}),n(At,{height:d,children:`Drag and drop ${l===b.Multiple?"files":"a file"} here`})]}),re=6.5,R=1,L=(t,e,l)=>l.map(d=>d.id===t?e:d),M=(t,e)=>e.find(l=>l.id===t);function ie({element:t,widgetMgr:e,fragmentId:l,uploadClient:d}){const c=q(),h=s.useRef(null),S=s.useRef(0),f=s.useRef({minHeight:0,maxHeight:0}),{values:[y],elementRef:m}=bt(s.useMemo(()=>["width"],[])),[p,u]=s.useState(!1),[F,T]=s.useState(t.default),[E,A]=s.useState(0),[H,at]=s.useState(!1),[I,x]=s.useState([]),[z,D]=s.useState(!1),v=It(t.acceptFile),W=s.useCallback(o=>x(a=>[...a,...o]),[]),P=s.useCallback(o=>{x(a=>{const i=M(o,a);return B(i)?a:(i.status.type==="uploading"&&i.status.cancelToken.cancel(),i.status.type==="uploaded"&&i.status.fileUrls.deleteUrl&&d.deleteFile(i.status.fileUrls.deleteUrl),a.filter(r=>r.id!==o))})},[d]),rt=()=>{const o=I.filter(a=>a.status.type==="uploaded").map(a=>{const{name:i,size:r,status:C}=a,{fileId:ut,fileUrls:gt}=C;return new xt({fileId:ut,fileUrls:gt,name:i,size:r})});return new wt({uploadedFileInfo:o})},K=()=>S.current++,it=oe({acceptMultipleFiles:v===b.Multiple,uploadClient:d,uploadFile:ee({getNextLocalFileId:K,addFiles:W,updateFile:(o,a)=>{x(i=>L(o,a,i))},uploadClient:d,element:t,onUploadProgress:(o,a)=>{x(i=>{const r=M(a,i);if(B(r)||r.status.type!=="uploading")return i;const C=Math.round(o.loaded*100/o.total);return r.status.progress===C?i:L(a,r.setStatus({type:"uploading",cancelToken:r.status.cancelToken,progress:C}),i)})},onUploadComplete:(o,a)=>{x(i=>{const r=M(o,i);return B(r)||r.status.type!=="uploading"?i:L(r.id,r.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),i)})}}),addFiles:W,getNextLocalFileId:K,deleteExistingFiles:()=>I.forEach(o=>P(o.id)),onUploadComplete:()=>{h.current&&h.current.focus()}}),{getRootProps:O,getInputProps:_}=Ht({onDrop:it,multiple:v===b.Multiple,accept:Tt(t.fileType)}),st=()=>{let o=0;const{current:a}=h;if(a){const i=a.placeholder;a.placeholder="",a.style.height="auto",o=a.scrollHeight,a.placeholder=i,a.style.height=""}return o},X=()=>{if(h.current&&h.current.focus(),!p||t.disabled)return;const o={data:F,fileUploaderState:rt()};e.setChatInputValue(t,o,{fromUi:!0},l),u(!1),x([]),T(""),A(0)},lt=o=>{const{metaKey:a,ctrlKey:i,shiftKey:r}=o;kt(o)&&!r&&!i&&!a&&(o.preventDefault(),X())},dt=o=>{const{value:a}=o.target,{maxChars:i}=t;i!==0&&a.length>i||(T(a),A(st()))};s.useEffect(()=>I.some(o=>o.status.type==="uploading")?u(!1):u(F!==""||I.length>0),[I,F]),s.useEffect(()=>{if(t.setValue){t.setValue=!1;const o=t.value||"";T(o)}},[t]),s.useEffect(()=>{if(h.current){const{offsetHeight:o}=h.current;f.current.minHeight=o,f.current.maxHeight=o*re}},[h]),s.useEffect(()=>{const o=r=>{var C;r.preventDefault(),r.stopPropagation(),!z&&((C=r.dataTransfer)!=null&&C.types.includes("Files"))&&D(!0)},a=r=>{r.preventDefault(),r.stopPropagation(),z&&(r.clientX<=0&&r.clientY<=0||r.clientX>=window.innerWidth&&r.clientY>=window.innerHeight)&&D(!1)},i=r=>{r.preventDefault(),r.stopPropagation(),z&&D(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",i),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",i),window.removeEventListener("dragleave",a)}},[z]),s.useEffect(()=>{const{minHeight:o}=f.current;at(E>0&&h.current?Math.abs(E-o)>R:!1)},[E]);const{disabled:k,placeholder:G,maxChars:ct}=t,{maxHeight:Y}=f.current,pt=v!==b.None&&z;return w(tt,{children:[v===b.None?null:n(te,{items:[...I],onDelete:P}),n(Rt,{className:"stChatInput","data-testid":"stChatInput",ref:m,children:pt?n(ae,{getRootProps:O,getInputProps:_,acceptFile:v,inputHeight:H?`${E+R}px`:c.sizes.minElementHeight}):w(Lt,{extended:H,children:[v===b.None?null:n(ne,{getRootProps:O,getInputProps:_,acceptFile:v,disabled:k,theme:c}),n(Bt,{inputRef:h,value:F,placeholder:G,onChange:dt,onKeyDown:lt,"aria-label":G,disabled:k,rows:1,overrides:{Root:{style:{minHeight:c.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:c.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:H?`${E+R}px`:"auto",maxHeight:Y?`${Y}px`:"none",paddingLeft:c.spacing.none,paddingBottom:c.spacing.sm,paddingTop:c.spacing.sm,paddingRight:`calc(${c.iconSizes.xl} + 2 * ${c.spacing.sm} + ${c.spacing.sm})`}}}}),y>c.breakpoints.hideWidgetDetails&&n(Nt,{children:n(Dt,{dirty:p,value:F,maxLength:ct,type:"chat",inForm:!1})}),n(Vt,{children:n(Mt,{onClick:X,disabled:!p||k,extended:H,"data-testid":"stChatInputSubmitButton",children:n(U,{content:nt,size:"xl",color:"inherit"})})})]})})]})}const fe=s.memo(ie);export{fe as default};