streamlit-nightly 1.52.3.dev20260110__py3-none-any.whl → 1.52.3.dev20260111__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 (97) hide show
  1. streamlit/static/index.html +1 -1
  2. streamlit/static/manifest.json +296 -296
  3. streamlit/static/static/js/{ErrorOutline.esm.BcqUpfNe.js → ErrorOutline.esm.D0HiUB0L.js} +1 -1
  4. streamlit/static/static/js/{FileDownload.esm.CtJWBuub.js → FileDownload.esm.BuUS-pfi.js} +1 -1
  5. streamlit/static/static/js/{FileHelper.D0dQPhOs.js → FileHelper.Pf8URFng.js} +5 -5
  6. streamlit/static/static/js/{FormClearHelper.Cm3GDSk6.js → FormClearHelper.By4vKj6A.js} +1 -1
  7. streamlit/static/static/js/{InputInstructions.D7Hxdzwv.js → InputInstructions.BiaGyIXk.js} +1 -1
  8. streamlit/static/static/js/{Particles.vAUDtAR8.js → Particles.2-EdjYhR.js} +1 -1
  9. streamlit/static/static/js/{ProgressBar.Dp2CGRba.js → ProgressBar.Dgbh0B0d.js} +1 -1
  10. streamlit/static/static/js/{StreamlitSyntaxHighlighter.DC0000nJ.js → StreamlitSyntaxHighlighter.DSl8Wr3R.js} +1 -1
  11. streamlit/static/static/js/{TableChart.esm.DDVoSKOT.js → TableChart.esm.MOwyTUPh.js} +1 -1
  12. streamlit/static/static/js/{Toolbar.CuMH-Gqe.js → Toolbar.CowuXIFr.js} +1 -1
  13. streamlit/static/static/js/{WidgetLabelHelpIconInline.WAReecol.js → WidgetLabelHelpIconInline.BdGIJQe4.js} +1 -1
  14. streamlit/static/static/js/{base-input.BX9Jll5o.js → base-input.CHPo5oJ1.js} +1 -1
  15. streamlit/static/static/js/{checkbox.BzMHUSz1.js → checkbox.Dkt2TQVS.js} +1 -1
  16. streamlit/static/static/js/{createDownloadLinkElement.CviG5BQx.js → createDownloadLinkElement.BaE-_v8I.js} +1 -1
  17. streamlit/static/static/js/{data-grid-overlay-editor.Dzo9A4l6.js → data-grid-overlay-editor.C1ncL-Nr.js} +1 -1
  18. streamlit/static/static/js/{downloader.DIDvj0d5.js → downloader.yaq2AzD9.js} +1 -1
  19. streamlit/static/static/js/{embed.C8qeQ38b.js → embed.DJJvCVz2.js} +1 -1
  20. streamlit/static/static/js/{es6.Dpcc-U7U.js → es6.D2jK98VU.js} +2 -2
  21. streamlit/static/static/js/{formatNumber.CPvuaBa8.js → formatNumber.Cxr2q_Sk.js} +1 -1
  22. streamlit/static/static/js/{iconPosition.y0q-Rqem.js → iconPosition.5dHEZYw2.js} +1 -1
  23. streamlit/static/static/js/{iframeResizer.contentWindow.DblExdXF.js → iframeResizer.contentWindow.Cedt4qbc.js} +1 -1
  24. streamlit/static/static/js/{index.BZBWLU1C.js → index.01VsD2h1.js} +4 -4
  25. streamlit/static/static/js/{index.BDb0PRvK.js → index.1djeb6e0.js} +1 -1
  26. streamlit/static/static/js/{index.BXYgO5B8.js → index.6_D2Y2jA.js} +1 -1
  27. streamlit/static/static/js/{index.gr6yGiCL.js → index.B0GsKOuI.js} +1 -1
  28. streamlit/static/static/js/{index.BVN9cI-k.js → index.B2TDaHdI.js} +1 -1
  29. streamlit/static/static/js/{index.DaU1ayM7.js → index.B4x2O71H.js} +1 -1
  30. streamlit/static/static/js/{index.DppScppA.js → index.B6EliwN_.js} +1 -1
  31. streamlit/static/static/js/{index.DB4MbQ40.js → index.B6Uhb_NP.js} +1 -1
  32. streamlit/static/static/js/{index.BfZdZpv-.js → index.B7EzT2pL.js} +1 -1
  33. streamlit/static/static/js/{index.DTK-btqV.js → index.B9DrCSR6.js} +1 -1
  34. streamlit/static/static/js/{index.kKkHk9Mc.js → index.BCCeRfnu.js} +1 -1
  35. streamlit/static/static/js/{index.pMvzHC7z.js → index.BFopzcDu.js} +1 -1
  36. streamlit/static/static/js/{index.D42y-GeO.js → index.BHMoYAbd.js} +1 -1
  37. streamlit/static/static/js/{index.B6vCS66f.js → index.BMPclSge.js} +5 -5
  38. streamlit/static/static/js/{index.CCDejIvL.js → index.BVit6ClT.js} +1 -1
  39. streamlit/static/static/js/{index.BItU4jMo.js → index.BXCQzqUL.js} +1 -1
  40. streamlit/static/static/js/{index.u2AvcQQT.js → index.Ba6hzYdl.js} +1 -1
  41. streamlit/static/static/js/{index.DmQqT9OM.js → index.Bb9kjc_v.js} +1 -1
  42. streamlit/static/static/js/{index.VSsf6tsu.js → index.BgVtKHgk.js} +1 -1
  43. streamlit/static/static/js/{index.DZEQ0G7H.js → index.BkDplL5I.js} +1 -1
  44. streamlit/static/static/js/{index.BWOP7HFT.js → index.C8PH2B2k.js} +1 -1
  45. streamlit/static/static/js/{index.RRAKXgBZ.js → index.CAobVzMK.js} +1 -1
  46. streamlit/static/static/js/{index.BPMqWDef.js → index.CD8IIWcc.js} +1 -1
  47. streamlit/static/static/js/{index.C1ElSZEy.js → index.CIlqaESj.js} +1 -1
  48. streamlit/static/static/js/{index.BTHi5W25.js → index.CT9jvPcD.js} +1 -1
  49. streamlit/static/static/js/{index.D69ULFWq.js → index.CcHnYd9w.js} +1 -1
  50. streamlit/static/static/js/{index.C7lwRBvF.js → index.CcJEaOpw.js} +1 -1
  51. streamlit/static/static/js/{index.B-g6lwYa.js → index.CjQo7CUO.js} +1 -1
  52. streamlit/static/static/js/{index.DRFJgBf-.js → index.D2EVLt1U.js} +1 -1
  53. streamlit/static/static/js/{index.F-NmmwfK.js → index.D2v1x0i_.js} +1 -1
  54. streamlit/static/static/js/{index.DvQ7-afx.js → index.D6ea3OJl.js} +1 -1
  55. streamlit/static/static/js/{index.eweE9HKU.js → index.DKUtJ1wC.js} +1 -1
  56. streamlit/static/static/js/{index.w2_VrtVw.js → index.DLB_Wwth.js} +1 -1
  57. streamlit/static/static/js/{index.aEeM0ekc.js → index.DaITTdfQ.js} +1 -1
  58. streamlit/static/static/js/{index.Dr8b3Vn6.js → index.DbTMA1_Q.js} +1 -1
  59. streamlit/static/static/js/{index.Dla9XiNe.js → index.DcKOiCiE.js} +1 -1
  60. streamlit/static/static/js/{index.C26ZOVFL.js → index.DeGjj5Xy.js} +1 -1
  61. streamlit/static/static/js/{index.B10MmI2m.js → index.Dewn3Ni9.js} +1 -1
  62. streamlit/static/static/js/{index.wv1DYVsn.js → index.DozBVd6-.js} +1 -1
  63. streamlit/static/static/js/{index.x4j6nnNb.js → index.DredtYc0.js} +1 -1
  64. streamlit/static/static/js/{index.CcMmNHAq.js → index.Dt0Psatx.js} +1 -1
  65. streamlit/static/static/js/{index.B9TG5Ah8.js → index.DtGneC7j.js} +1 -1
  66. streamlit/static/static/js/{index.pgifwCIr.js → index.P-CMMGUY.js} +1 -1
  67. streamlit/static/static/js/{index.BGufEmCz.js → index.TO9vodwr.js} +1 -1
  68. streamlit/static/static/js/{index.Bxe7fKbw.js → index._nL4Yjdr.js} +1 -1
  69. streamlit/static/static/js/index.i_eQw7NS.js +1 -0
  70. streamlit/static/static/js/{index.C93QGPyk.js → index.qzz9PjCO.js} +1 -1
  71. streamlit/static/static/js/{index.MKI8t7l2.js → index.wLJVkoPD.js} +1 -1
  72. streamlit/static/static/js/{input.BoJqOS7a.js → input.27t-DftI.js} +1 -1
  73. streamlit/static/static/js/{main.B5XmUwmQ.js → main.BEfv2Y8-.js} +1 -1
  74. streamlit/static/static/js/{memory.9izgq54V.js → memory.CaZBVQ_1.js} +1 -1
  75. streamlit/static/static/js/{number-overlay-editor.PqOGQcLn.js → number-overlay-editor.CAIp-3oo.js} +1 -1
  76. streamlit/static/static/js/{pandasStylerUtils.DUtF2t3R.js → pandasStylerUtils.BY9qaz81.js} +1 -1
  77. streamlit/static/static/js/{sandbox.DgKTHPLO.js → sandbox.BJUaaWFJ.js} +1 -1
  78. streamlit/static/static/js/{styled-components.D4x8jmOI.js → styled-components.DQsMkvXn.js} +1 -1
  79. streamlit/static/static/js/{throttle.DxEHIIp7.js → throttle.DSR3q89S.js} +1 -1
  80. streamlit/static/static/js/{timepicker.CDks5DWI.js → timepicker.gie5YwtP.js} +1 -1
  81. streamlit/static/static/js/{toConsumableArray.CvTQRsV-.js → toConsumableArray.C9lVwnAo.js} +1 -1
  82. streamlit/static/static/js/uniqueId.BdEQNrWF.js +1 -0
  83. streamlit/static/static/js/{useBasicWidgetState.D6_b0IqA.js → useBasicWidgetState.DrTKs46R.js} +1 -1
  84. streamlit/static/static/js/{useIntlLocale.Ctz17A7g.js → useIntlLocale.CmSionuT.js} +1 -1
  85. streamlit/static/static/js/{useTextInputAutoExpand.PAFB5o1T.js → useTextInputAutoExpand.D7lViJSu.js} +1 -1
  86. streamlit/static/static/js/{useUpdateUiValue.CcTvmGlb.js → useUpdateUiValue.Ct3CJQBQ.js} +1 -1
  87. streamlit/static/static/js/{useWaveformController.vLi36Ir4.js → useWaveformController.D-KQLpLI.js} +1 -1
  88. streamlit/static/static/js/{withCalculatedWidth.BtA2jL5-.js → withCalculatedWidth.CD0pPoZr.js} +1 -1
  89. streamlit/static/static/js/{withFullScreenWrapper.CeeoYBpc.js → withFullScreenWrapper.Ch22PgdD.js} +1 -1
  90. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260111.dist-info}/METADATA +1 -1
  91. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260111.dist-info}/RECORD +95 -95
  92. streamlit/static/static/js/index.q83b8_8b.js +0 -1
  93. streamlit/static/static/js/uniqueId.RScLN3St.js +0 -1
  94. {streamlit_nightly-1.52.3.dev20260110.data → streamlit_nightly-1.52.3.dev20260111.data}/scripts/streamlit.cmd +0 -0
  95. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260111.dist-info}/WHEEL +0 -0
  96. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260111.dist-info}/entry_points.txt +0 -0
  97. {streamlit_nightly-1.52.3.dev20260110.dist-info → streamlit_nightly-1.52.3.dev20260111.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{p as W,aC as O,F as _,r as i,k as $,l as q,aa as S,ab as G,o as M,j as c,ac as N,ad as J,af as Q}from"./index.BZBWLU1C.js";import{I as X}from"./InputInstructions.D7Hxdzwv.js";import{u as Y}from"./useBasicWidgetState.D6_b0IqA.js";import{u as Z,a as tt,b as et}from"./useUpdateUiValue.CcTvmGlb.js";import{u as ot,T as at}from"./useTextInputAutoExpand.PAFB5o1T.js";import{u as it}from"./uniqueId.RScLN3St.js";import"./FormClearHelper.Cm3GDSk6.js";import"./inputUtils.CptNuJwn.js";import"./base-input.BX9Jll5o.js";const st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===O.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},rt=_("div",{target:"e1tmb1p40"})({height:"100%",display:"flex",flexDirection:"column"}),T=(e,t)=>e.getStringValue(t)??t.default??null,lt=e=>e.default??null,nt=e=>e.value??null,dt=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ut=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(it("text_area_")).current,{width:y,elementRef:V}=$(),[r,g]=i.useState(!1),[I,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,v=l.heightConfig?.useStretch??!1,F=st(l,t),C=i.useRef(null),[d,p]=i.useState(()=>T(a,t)??null),A=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Y({getStateFromWidgetMgr:T,getDefaultStateFromProto:lt,getCurrStateFromProto:nt,updateWidgetMgrState:dt,element:t,widgetMgr:a,fragmentId:s,onFormCleared:A});Z(R,d,p,r);const o=q(),{height:k,maxHeight:L,updateScrollHeight:H}=ot({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),z=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),B=i.useCallback(()=>{x(!0)},[]),D=i.useCallback(()=>{n&&H()},[n,H]),E=tt({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:D}),U=et(t.formId,m,r,a,s,!0),{placeholder:P,formId:b}=t,j=S({formId:b})?a.allowFormEnterToSubmit(b):r,w=I&&y>G(o.breakpoints.hideWidgetDetails);return M(rt,{className:"stTextArea","data-testid":"stTextArea",ref:V,children:[c(J,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&c(N,{content:t.help,label:t.label})}),c(at,{inputRef:n?C:void 0,value:d??"",placeholder:P,onBlur:z,onFocus:B,onChange:E,onKeyDown:U,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?k:F,maxHeight:n?L:"",minHeight:o.sizes.largestElementHeight,resize:v?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:K})=>{const u=Q(o.colors,K);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),w&&c(X,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:S({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ut);export{Ht as default};
1
+ import{p as W,aC as O,F as _,r as i,k as $,l as q,aa as S,ab as G,o as M,j as c,ac as N,ad as J,af as Q}from"./index.01VsD2h1.js";import{I as X}from"./InputInstructions.BiaGyIXk.js";import{u as Y}from"./useBasicWidgetState.DrTKs46R.js";import{u as Z,a as tt,b as et}from"./useUpdateUiValue.Ct3CJQBQ.js";import{u as ot,T as at}from"./useTextInputAutoExpand.D7lViJSu.js";import{u as it}from"./uniqueId.BdEQNrWF.js";import"./FormClearHelper.By4vKj6A.js";import"./inputUtils.CptNuJwn.js";import"./base-input.CHPo5oJ1.js";const st=(e,t)=>{let a="auto";if(e.heightConfig?.useStretch)a="100%";else if(e.heightConfig?.pixelHeight&&e.heightConfig.pixelHeight>0){const s=W(t.labelVisibility?.value)===O.Collapsed?2:30,l=e.heightConfig.pixelHeight-s;a=`${Math.max(0,l)}px`}return a},rt=_("div",{target:"e1tmb1p40"})({height:"100%",display:"flex",flexDirection:"column"}),T=(e,t)=>e.getStringValue(t)??t.default??null,lt=e=>e.default??null,nt=e=>e.value??null,dt=(e,t,a,s)=>{t.setStringValue(e,a.value,{fromUi:a.fromUi},s)},ut=({disabled:e,element:t,widgetMgr:a,fragmentId:s,outerElement:l})=>{const h=i.useRef(it("text_area_")).current,{width:y,elementRef:V}=$(),[r,g]=i.useState(!1),[I,x]=i.useState(!1),n=l.heightConfig?.useContent??!1,v=l.heightConfig?.useStretch??!1,F=st(l,t),C=i.useRef(null),[d,p]=i.useState(()=>T(a,t)??null),A=i.useCallback(()=>{p(t.default??null),g(!0)},[t]),[R,f]=Y({getStateFromWidgetMgr:T,getDefaultStateFromProto:lt,getCurrStateFromProto:nt,updateWidgetMgrState:dt,element:t,widgetMgr:a,fragmentId:s,onFormCleared:A});Z(R,d,p,r);const o=q(),{height:k,maxHeight:L,updateScrollHeight:H}=ot({textareaRef:C,dependencies:[t.placeholder]}),m=i.useCallback(()=>{g(!1),f({value:d,fromUi:!0})},[d,f]),z=i.useCallback(()=>{r&&m(),x(!1)},[r,m]),B=i.useCallback(()=>{x(!0)},[]),D=i.useCallback(()=>{n&&H()},[n,H]),E=tt({formId:t.formId,maxChars:t.maxChars,setDirty:g,setUiValue:p,setValueWithSource:f,additionalAction:D}),U=et(t.formId,m,r,a,s,!0),{placeholder:P,formId:b}=t,j=S({formId:b})?a.allowFormEnterToSubmit(b):r,w=I&&y>G(o.breakpoints.hideWidgetDetails);return M(rt,{className:"stTextArea","data-testid":"stTextArea",ref:V,children:[c(J,{label:t.label,disabled:e,labelVisibility:W(t.labelVisibility?.value),htmlFor:h,children:t.help&&c(N,{content:t.help,label:t.label})}),c(at,{inputRef:n?C:void 0,value:d??"",placeholder:P,onBlur:z,onFocus:B,onChange:E,onKeyDown:U,"aria-label":t.label,disabled:e,id:h,overrides:{Input:{style:{fontWeight:o.fontWeights.normal,lineHeight:o.lineHeights.inputWidget,height:n?k:F,maxHeight:n?L:"",minHeight:o.sizes.largestElementHeight,resize:v?"none":"vertical",paddingRight:o.spacing.md,paddingLeft:o.spacing.md,paddingBottom:o.spacing.md,paddingTop:o.spacing.md,"::placeholder":{color:o.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:K})=>{const u=Q(o.colors,K);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),w&&c(X,{dirty:r,value:d??"",maxLength:t.maxChars,type:"multiline",inForm:S({formId:b}),allowEnterToSubmit:j})]})},Ht=i.memo(ut);export{Ht as default};
@@ -1,4 +1,4 @@
1
- import{W as Q,e as Z,bw as me,bx as ge,F as he,r as d,l as ye,by as V,al as _,j as A,aO as pe,bz as H,bA as Ee,a1 as be,a2 as Fe,o as Ce,a0 as we,aN as Se,n as Ne,S as Oe}from"./index.BZBWLU1C.js";import{bB as nr}from"./index.BZBWLU1C.js";import{w as Ae}from"./withCalculatedWidth.BtA2jL5-.js";import{C as W,a as Y}from"./urls.BwSlolu9.js";import{D as Re,a as Ie}from"./IFrameUtil.DefezniK.js";const v="%[a-f0-9]{2}",G=new RegExp("("+v+")|([^%]+?)","gi"),B=new RegExp("("+v+")+","gi");function T(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;const t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],T(t),T(n))}function _e(e){try{return decodeURIComponent(e)}catch{let r=e.match(G)||[];for(let t=1;t<r.length;t++)e=T(r,t).join(""),r=e.match(G)||[];return e}}function Te(e){const r={"%FE%FF":"��","%FF%FE":"��"};let t=B.exec(e);for(;t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{const a=_e(t[0]);a!==t[0]&&(r[t[0]]=a)}t=B.exec(e)}r["%C2"]="�";const n=Object.keys(r);for(const a of n)e=e.replace(new RegExp(a,"g"),r[a]);return e}function xe(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return Te(e)}}function Ue(e,r){const t={};if(Array.isArray(r))for(const n of r){const a=Object.getOwnPropertyDescriptor(e,n);a?.enumerable&&Object.defineProperty(t,n,a)}else for(const n of Reflect.ownKeys(e)){const a=Object.getOwnPropertyDescriptor(e,n);if(a.enumerable){const s=e[n];r(n,s,e)&&Object.defineProperty(t,n,a)}}return t}function ee(e,r){if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||r==="")return[];const t=e.indexOf(r);return t===-1?[]:[e.slice(0,t),e.slice(t+r.length)]}const $e=e=>e==null,Me=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),x=Symbol("encodeFragmentIdentifier");function Le(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const a=t.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[",a,"]"].join("")]:[...t,[c(r,e),"[",c(a,e),"]=",c(n,e)].join("")]};case"bracket":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[]"].join("")]:[...t,[c(r,e),"[]=",c(n,e)].join("")];case"colon-list-separator":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),":list="].join("")]:[...t,[c(r,e),":list=",c(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const r=e.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,a)=>a===void 0||e.skipNull&&a===null||e.skipEmptyString&&a===""?n:(a=a===null?"":a,n.length===0?[[c(t,e),r,c(a,e)].join("")]:[[n,c(a,e)].join(e.arrayFormatSeparator)])}default:return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,c(r,e)]:[...t,[c(r,e),"=",c(n,e)].join("")]}}function je(e){let r;switch(e.arrayFormat){case"index":return(t,n,a)=>{if(r=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!r){a[t]=n;return}a[t]===void 0&&(a[t]={}),a[t][r[1]]=n};case"bracket":return(t,n,a)=>{if(r=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"colon-list-separator":return(t,n,a)=>{if(r=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"comma":case"separator":return(t,n,a)=>{const o=typeof n=="string"&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(i=>h(i,e)):n===null?n:h(n,e);a[t]=o};case"bracket-separator":return(t,n,a)=>{const s=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!s){a[t]=n&&h(n,e);return}const o=n===null?[]:h(n,e).split(e.arrayFormatSeparator);if(a[t]===void 0){a[t]=o;return}a[t]=[...a[t],...o]};default:return(t,n,a)=>{if(a[t]===void 0){a[t]=n;return}a[t]=[...[a[t]].flat(),n]}}}function re(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,r){return r.encode?r.strict?Me(e):encodeURIComponent(e):e}function h(e,r){return r.decode?xe(e):e}function te(e){return Array.isArray(e)?e.sort():typeof e=="object"?te(Object.keys(e)).sort((r,t)=>Number(r)-Number(t)).map(r=>e[r]):e}function ne(e){const r=e.indexOf("#");return r!==-1&&(e=e.slice(0,r)),e}function De(e){let r="";const t=e.indexOf("#");return t!==-1&&(r=e.slice(t)),r}function q(e,r,t){return t==="string"&&typeof e=="string"?e:typeof t=="function"&&typeof e=="string"?t(e):t==="boolean"&&e===null?!0:t==="boolean"&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":t==="boolean"&&e!==null&&(e.toLowerCase()==="1"||e.toLowerCase()==="0")?e.toLowerCase()==="1":t==="string[]"&&r.arrayFormat!=="none"&&typeof e=="string"?[e]:t==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?[Number(e)]:t==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):r.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function U(e){e=ne(e);const r=e.indexOf("?");return r===-1?"":e.slice(r+1)}function $(e,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},re(r.arrayFormatSeparator);const t=je(r),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(const a of e.split("&")){if(a==="")continue;const s=r.decode?a.replaceAll("+"," "):a;let[o,i]=ee(s,"=");o===void 0&&(o=s),i=i===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?i:h(i,r),t(h(o,r),i,n)}for(const[a,s]of Object.entries(n))if(typeof s=="object"&&s!==null&&r.types[a]!=="string")for(const[o,i]of Object.entries(s)){const l=r.types[a],f=typeof l=="function"?l:l?l.replace("[]",""):void 0;s[o]=q(i,r,f)}else typeof s=="object"&&s!==null&&r.types[a]==="string"?n[a]=Object.values(s).join(r.arrayFormatSeparator):n[a]=q(s,r,r.types[a]);return r.sort===!1?n:(r.sort===!0?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((a,s)=>{const o=n[s];return a[s]=o&&typeof o=="object"&&!Array.isArray(o)?te(o):o,a},Object.create(null))}function ae(e,r){if(!e)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},re(r.arrayFormatSeparator);const t=o=>r.skipNull&&$e(e[o])||r.skipEmptyString&&e[o]==="",n=Le(r),a={};for(const[o,i]of Object.entries(e))t(o)||(a[o]=i);const s=Object.keys(a);return r.sort!==!1&&s.sort(r.sort),s.map(o=>{let i=e[o];if(r.replacer&&(i=r.replacer(o,i),i===void 0)||i===void 0)return"";if(i===null)return c(o,r);if(Array.isArray(i)){if(i.length===0&&r.arrayFormat==="bracket-separator")return c(o,r)+"[]";let l=i;return r.replacer&&(l=i.map((f,u)=>r.replacer(`${o}[${u}]`,f)).filter(f=>f!==void 0)),l.reduce(n(o),[]).join("&")}return c(o,r)+"="+c(i,r)}).filter(o=>o.length>0).join("&")}function se(e,r){r={decode:!0,...r};let[t,n]=ee(e,"#");return t===void 0&&(t=e),{url:t?.split("?")?.[0]??"",query:$(U(e),r),...r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,r)}:{}}}function oe(e,r){r={encode:!0,strict:!0,[x]:!0,...r};const t=ne(e.url).split("?")[0]||"",n=U(e.url),a={...$(n,{sort:!1,...r}),...e.query};let s=ae(a,r);s&&=`?${s}`;let o=De(e.url);if(typeof e.fragmentIdentifier=="string"){const i=new URL(t);i.hash=e.fragmentIdentifier,o=r[x]?i.hash:`#${e.fragmentIdentifier}`}return`${t}${s}${o}`}function ie(e,r,t){t={parseFragmentIdentifier:!0,[x]:!1,...t};const{url:n,query:a,fragmentIdentifier:s}=se(e,t);return oe({url:n,query:Ue(a,r),fragmentIdentifier:s},t)}function Pe(e,r,t){const n=Array.isArray(r)?a=>!r.includes(a):(a,s)=>!r(a,s);return ie(e,n,t)}const ke=Object.freeze(Object.defineProperty({__proto__:null,exclude:Pe,extract:U,parse:$,parseUrl:se,pick:ie,stringify:ae,stringifyUrl:oe},Symbol.toStringTag,{value:"Module"}));var S=(function(e){return e.COMPONENT_READY="streamlit:componentReady",e.SET_COMPONENT_VALUE="streamlit:setComponentValue",e.SET_FRAME_HEIGHT="streamlit:setFrameHeight",e})({}),Ve=(function(e){return e.RENDER="streamlit:render",e})({});const He=1,F=Q.getLogger("componentUtils");function We(e){return(r,t)=>{if(!e.current)return;const{isReady:n,element:a,widgetMgr:s,setComponentError:o,componentReadyCallback:i,frameHeightCallback:l,fragmentId:f}=e.current,u=n();switch(r){case S.COMPONENT_READY:{const{apiVersion:y}=t;y!==He?o(new Error(`Unrecognized component API version: '${y}'`)):i();break}case S.SET_COMPONENT_VALUE:u?Ge(K(t,"value"),t.dataType,{fromUi:!0},a,s,f):F.warn(`Got ${r} before ${S.COMPONENT_READY}!`);break;case S.SET_FRAME_HEIGHT:u?l(K(t,"height")):F.warn(`Got ${r} before ${S.COMPONENT_READY}!`);break;default:F.warn(`Unrecognized ComponentBackMsgType: ${r}`)}}}function Ye(e,r){const t=JSON.parse(e),n=[];for(const a of r){const{key:s}=a;switch(a.value?.toLowerCase()){case"arrowdataframe":n.push({key:s,value:ge.toObject(a.arrowDataframe)});break;case"bytes":t[s]=a.bytes;break;default:throw new Error(`Unrecognized SpecialArg type: ${a.value}`)}}return[t,n]}function z(e,r,t,n,a){if(!a){F.warn("Can't send ForwardMsg; missing our iframe!");return}if(Z(a.contentWindow)){F.warn("Can't send ForwardMsg; iframe has no contentWindow!");return}a.contentWindow.postMessage({type:Ve.RENDER,args:e,dfs:r,disabled:t,theme:{...me(n),font:n.genericFonts.bodyFont}},"*")}function Ge(e,r,t,n,a,s){if(e===void 0){F.warn("handleSetComponentValue: missing 'value' prop");return}switch(r){case"dataframe":a.setArrowValue(n,e,t,s);break;case"bytes":a.setBytesValue(n,e,t,s);break;default:a.setJsonValue(n,e,t,s)}}function K(e,r,t=void 0){return Object.hasOwn(e,r)?e[r]:t}const Be=he("iframe",{target:"edxyb2x0"})(({theme:e,componentReady:r})=>({colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,display:r?"initial":"none"})),R=Q.getLogger("ComponentInstance"),J=6e4;function qe(e,r,t){let n;Ne(t)&&t!==""?n=t:n=r.getComponentURL(e,"index.html");const a=Oe.CUSTOM_COMPONENT_CLIENT_ID,s=new URL(window.location.href);return n=ke.stringifyUrl({url:n,query:{streamlitUrl:s.origin+s.pathname,...a&&{__streamlit_parent_client_id:a}}}),n}function X(e,r){let t;return r&&r!==""?t=`Your app is having trouble loading the **${e}** component.
1
+ import{W as Q,e as Z,bw as me,bx as ge,F as he,r as d,l as ye,by as V,al as _,j as A,aO as pe,bz as H,bA as Ee,a1 as be,a2 as Fe,o as Ce,a0 as we,aN as Se,n as Ne,S as Oe}from"./index.01VsD2h1.js";import{bB as nr}from"./index.01VsD2h1.js";import{w as Ae}from"./withCalculatedWidth.CD0pPoZr.js";import{C as W,a as Y}from"./urls.BwSlolu9.js";import{D as Re,a as Ie}from"./IFrameUtil.DefezniK.js";const v="%[a-f0-9]{2}",G=new RegExp("("+v+")|([^%]+?)","gi"),B=new RegExp("("+v+")+","gi");function T(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;const t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],T(t),T(n))}function _e(e){try{return decodeURIComponent(e)}catch{let r=e.match(G)||[];for(let t=1;t<r.length;t++)e=T(r,t).join(""),r=e.match(G)||[];return e}}function Te(e){const r={"%FE%FF":"��","%FF%FE":"��"};let t=B.exec(e);for(;t;){try{r[t[0]]=decodeURIComponent(t[0])}catch{const a=_e(t[0]);a!==t[0]&&(r[t[0]]=a)}t=B.exec(e)}r["%C2"]="�";const n=Object.keys(r);for(const a of n)e=e.replace(new RegExp(a,"g"),r[a]);return e}function xe(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch{return Te(e)}}function Ue(e,r){const t={};if(Array.isArray(r))for(const n of r){const a=Object.getOwnPropertyDescriptor(e,n);a?.enumerable&&Object.defineProperty(t,n,a)}else for(const n of Reflect.ownKeys(e)){const a=Object.getOwnPropertyDescriptor(e,n);if(a.enumerable){const s=e[n];r(n,s,e)&&Object.defineProperty(t,n,a)}}return t}function ee(e,r){if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||r==="")return[];const t=e.indexOf(r);return t===-1?[]:[e.slice(0,t),e.slice(t+r.length)]}const $e=e=>e==null,Me=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),x=Symbol("encodeFragmentIdentifier");function Le(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const a=t.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[",a,"]"].join("")]:[...t,[c(r,e),"[",c(a,e),"]=",c(n,e)].join("")]};case"bracket":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),"[]"].join("")]:[...t,[c(r,e),"[]=",c(n,e)].join("")];case"colon-list-separator":return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,[c(r,e),":list="].join("")]:[...t,[c(r,e),":list=",c(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const r=e.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,a)=>a===void 0||e.skipNull&&a===null||e.skipEmptyString&&a===""?n:(a=a===null?"":a,n.length===0?[[c(t,e),r,c(a,e)].join("")]:[[n,c(a,e)].join(e.arrayFormatSeparator)])}default:return r=>(t,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?t:n===null?[...t,c(r,e)]:[...t,[c(r,e),"=",c(n,e)].join("")]}}function je(e){let r;switch(e.arrayFormat){case"index":return(t,n,a)=>{if(r=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!r){a[t]=n;return}a[t]===void 0&&(a[t]={}),a[t][r[1]]=n};case"bracket":return(t,n,a)=>{if(r=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"colon-list-separator":return(t,n,a)=>{if(r=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!r){a[t]=n;return}if(a[t]===void 0){a[t]=[n];return}a[t]=[...a[t],n]};case"comma":case"separator":return(t,n,a)=>{const o=typeof n=="string"&&n.includes(e.arrayFormatSeparator)?n.split(e.arrayFormatSeparator).map(i=>h(i,e)):n===null?n:h(n,e);a[t]=o};case"bracket-separator":return(t,n,a)=>{const s=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!s){a[t]=n&&h(n,e);return}const o=n===null?[]:h(n,e).split(e.arrayFormatSeparator);if(a[t]===void 0){a[t]=o;return}a[t]=[...a[t],...o]};default:return(t,n,a)=>{if(a[t]===void 0){a[t]=n;return}a[t]=[...[a[t]].flat(),n]}}}function re(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,r){return r.encode?r.strict?Me(e):encodeURIComponent(e):e}function h(e,r){return r.decode?xe(e):e}function te(e){return Array.isArray(e)?e.sort():typeof e=="object"?te(Object.keys(e)).sort((r,t)=>Number(r)-Number(t)).map(r=>e[r]):e}function ne(e){const r=e.indexOf("#");return r!==-1&&(e=e.slice(0,r)),e}function De(e){let r="";const t=e.indexOf("#");return t!==-1&&(r=e.slice(t)),r}function q(e,r,t){return t==="string"&&typeof e=="string"?e:typeof t=="function"&&typeof e=="string"?t(e):t==="boolean"&&e===null?!0:t==="boolean"&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":t==="boolean"&&e!==null&&(e.toLowerCase()==="1"||e.toLowerCase()==="0")?e.toLowerCase()==="1":t==="string[]"&&r.arrayFormat!=="none"&&typeof e=="string"?[e]:t==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?[Number(e)]:t==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):r.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function U(e){e=ne(e);const r=e.indexOf("?");return r===-1?"":e.slice(r+1)}function $(e,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},re(r.arrayFormatSeparator);const t=je(r),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(const a of e.split("&")){if(a==="")continue;const s=r.decode?a.replaceAll("+"," "):a;let[o,i]=ee(s,"=");o===void 0&&(o=s),i=i===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?i:h(i,r),t(h(o,r),i,n)}for(const[a,s]of Object.entries(n))if(typeof s=="object"&&s!==null&&r.types[a]!=="string")for(const[o,i]of Object.entries(s)){const l=r.types[a],f=typeof l=="function"?l:l?l.replace("[]",""):void 0;s[o]=q(i,r,f)}else typeof s=="object"&&s!==null&&r.types[a]==="string"?n[a]=Object.values(s).join(r.arrayFormatSeparator):n[a]=q(s,r,r.types[a]);return r.sort===!1?n:(r.sort===!0?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce((a,s)=>{const o=n[s];return a[s]=o&&typeof o=="object"&&!Array.isArray(o)?te(o):o,a},Object.create(null))}function ae(e,r){if(!e)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},re(r.arrayFormatSeparator);const t=o=>r.skipNull&&$e(e[o])||r.skipEmptyString&&e[o]==="",n=Le(r),a={};for(const[o,i]of Object.entries(e))t(o)||(a[o]=i);const s=Object.keys(a);return r.sort!==!1&&s.sort(r.sort),s.map(o=>{let i=e[o];if(r.replacer&&(i=r.replacer(o,i),i===void 0)||i===void 0)return"";if(i===null)return c(o,r);if(Array.isArray(i)){if(i.length===0&&r.arrayFormat==="bracket-separator")return c(o,r)+"[]";let l=i;return r.replacer&&(l=i.map((f,u)=>r.replacer(`${o}[${u}]`,f)).filter(f=>f!==void 0)),l.reduce(n(o),[]).join("&")}return c(o,r)+"="+c(i,r)}).filter(o=>o.length>0).join("&")}function se(e,r){r={decode:!0,...r};let[t,n]=ee(e,"#");return t===void 0&&(t=e),{url:t?.split("?")?.[0]??"",query:$(U(e),r),...r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,r)}:{}}}function oe(e,r){r={encode:!0,strict:!0,[x]:!0,...r};const t=ne(e.url).split("?")[0]||"",n=U(e.url),a={...$(n,{sort:!1,...r}),...e.query};let s=ae(a,r);s&&=`?${s}`;let o=De(e.url);if(typeof e.fragmentIdentifier=="string"){const i=new URL(t);i.hash=e.fragmentIdentifier,o=r[x]?i.hash:`#${e.fragmentIdentifier}`}return`${t}${s}${o}`}function ie(e,r,t){t={parseFragmentIdentifier:!0,[x]:!1,...t};const{url:n,query:a,fragmentIdentifier:s}=se(e,t);return oe({url:n,query:Ue(a,r),fragmentIdentifier:s},t)}function Pe(e,r,t){const n=Array.isArray(r)?a=>!r.includes(a):(a,s)=>!r(a,s);return ie(e,n,t)}const ke=Object.freeze(Object.defineProperty({__proto__:null,exclude:Pe,extract:U,parse:$,parseUrl:se,pick:ie,stringify:ae,stringifyUrl:oe},Symbol.toStringTag,{value:"Module"}));var S=(function(e){return e.COMPONENT_READY="streamlit:componentReady",e.SET_COMPONENT_VALUE="streamlit:setComponentValue",e.SET_FRAME_HEIGHT="streamlit:setFrameHeight",e})({}),Ve=(function(e){return e.RENDER="streamlit:render",e})({});const He=1,F=Q.getLogger("componentUtils");function We(e){return(r,t)=>{if(!e.current)return;const{isReady:n,element:a,widgetMgr:s,setComponentError:o,componentReadyCallback:i,frameHeightCallback:l,fragmentId:f}=e.current,u=n();switch(r){case S.COMPONENT_READY:{const{apiVersion:y}=t;y!==He?o(new Error(`Unrecognized component API version: '${y}'`)):i();break}case S.SET_COMPONENT_VALUE:u?Ge(K(t,"value"),t.dataType,{fromUi:!0},a,s,f):F.warn(`Got ${r} before ${S.COMPONENT_READY}!`);break;case S.SET_FRAME_HEIGHT:u?l(K(t,"height")):F.warn(`Got ${r} before ${S.COMPONENT_READY}!`);break;default:F.warn(`Unrecognized ComponentBackMsgType: ${r}`)}}}function Ye(e,r){const t=JSON.parse(e),n=[];for(const a of r){const{key:s}=a;switch(a.value?.toLowerCase()){case"arrowdataframe":n.push({key:s,value:ge.toObject(a.arrowDataframe)});break;case"bytes":t[s]=a.bytes;break;default:throw new Error(`Unrecognized SpecialArg type: ${a.value}`)}}return[t,n]}function z(e,r,t,n,a){if(!a){F.warn("Can't send ForwardMsg; missing our iframe!");return}if(Z(a.contentWindow)){F.warn("Can't send ForwardMsg; iframe has no contentWindow!");return}a.contentWindow.postMessage({type:Ve.RENDER,args:e,dfs:r,disabled:t,theme:{...me(n),font:n.genericFonts.bodyFont}},"*")}function Ge(e,r,t,n,a,s){if(e===void 0){F.warn("handleSetComponentValue: missing 'value' prop");return}switch(r){case"dataframe":a.setArrowValue(n,e,t,s);break;case"bytes":a.setBytesValue(n,e,t,s);break;default:a.setJsonValue(n,e,t,s)}}function K(e,r,t=void 0){return Object.hasOwn(e,r)?e[r]:t}const Be=he("iframe",{target:"edxyb2x0"})(({theme:e,componentReady:r})=>({colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,display:r?"initial":"none"})),R=Q.getLogger("ComponentInstance"),J=6e4;function qe(e,r,t){let n;Ne(t)&&t!==""?n=t:n=r.getComponentURL(e,"index.html");const a=Oe.CUSTOM_COMPONENT_CLIENT_ID,s=new URL(window.location.href);return n=ke.stringifyUrl({url:n,query:{streamlitUrl:s.origin+s.pathname,...a&&{__streamlit_parent_client_id:a}}}),n}function X(e,r){let t;return r&&r!==""?t=`Your app is having trouble loading the **${e}** component.
2
2
  The app is attempting to load the component from **${r}**,
3
3
  and hasn't received its \`Streamlit.setComponentReady()\` message.
4
4
 
@@ -1 +1 @@
1
- import{r as o,E as L,_ as k,F as p,ab as Ue,o as S,j as l,az as I,b as V,c as ve,B as M,h as ze,a0 as be,k as Ce,al as ee,bj as Ie,e as D,bX as Ee,p as Be,ac as De,ad as Le,bS as ke,bT as Ve}from"./index.BZBWLU1C.js";import{u as Me}from"./FormClearHelper.Cm3GDSk6.js";import{g as oe,F as R,a as Re,D as Ae,I as Pe,s as Ne,b as Te}from"./FileHelper.D0dQPhOs.js";import{S as qe,P as We}from"./ProgressBar.Dp2CGRba.js";import{U as $}from"./UploadFileInfo.Dr-zDST7.js";const He=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var re=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});re.displayName="ChevronRight";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});ae.displayName="Clear";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});le.displayName="CloudUpload";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});se.displayName="Error";const ie=p("section",{target:"e7fhruq0"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${t.colors.primary}`},cursor:e?"not-allowed":"pointer"})),$e=p("div",{target:"e7fhruq1"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"e7fhruq2"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"e7fhruq3"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),je=p("span",{target:"e7fhruq4"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Xe=p("div",{target:"e7fhruq5"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),Oe=p("span",{target:"e7fhruq6"})({whiteSpace:"nowrap"}),pe=p("div",{target:"e7fhruq7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),_e=p("ul",{target:"e7fhruq8"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"e7fhruq9"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"e7fhruq10"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"e7fhruq11"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"e7fhruq12"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Ke=p("span",{target:"e7fhruq13"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Ye=p("div",{target:"e7fhruq14"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"e7fhruq15"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"e7fhruq16"})({}),Ge=e=>({[ie]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Je=p("div",{target:"e7fhruq17"})(({theme:e,width:t})=>{if(t<Ue("23rem"))return Ge(e)}),Qe=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:s=!1,disabled:d})=>{const x=()=>s?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(y=>y.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,R.Byte,0)} per file`;return S($e,{"data-testid":"stFileUploaderDropzoneInstructions",children:[l(ce,{children:l(I,{content:le,size:"threeXL"})}),S(Xe,{children:[S(de,{disabled:d,children:["Drag and drop ",x()," here"]}),S(je,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Qe),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:s,disabled:d,label:x,acceptDirectory:c=!1})=>l(Ae,{onDrop:e,multiple:t,accept:Re(n),maxSize:s,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:y})=>{const v=y({multiple:t||!!c});return S(ie,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":x,"aria-disabled":d,children:[l("input",{"data-testid":"stFileUploaderDropzoneInput",...v,...c&&{webkitdirectory:""}}),l(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:s,acceptDirectory:c,disabled:d}),l(Oe,{children:l(V,{kind:M.SECONDARY,disabled:d,size:ve.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),ye=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:s,fadedText60:d,fadedText40:x}=n.colors;let c=d;return t&&(c=x),e==="danger"&&(c=s),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?l(We,{value:e.status.progress,size:qe.SMALL}):e.status.type==="error"?S(Fe,{children:[l(Ke,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),l(me,{children:l(I,{content:se,size:"lg"})})]}):e.status.type==="uploaded"?l(ye,{disabled:t,children:oe(e.size,R.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>S(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[l(Ye,{disabled:n,children:l(I,{content:Pe,size:"twoXL"})}),S(ge,{className:"stFileUploaderFileData",children:[l(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),l(ot,{fileInfo:e,disabled:n})]}),l("div",{"data-testid":"stFileUploaderDeleteBtn",children:l(V,{onClick:()=>t(e.id),kind:M.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:l(I,{content:ae,size:"lg"})})})]}),rt=o.memo(nt),at=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),lt=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),st=({currentPage:e,totalPages:t,onNext:n,onPrevious:s})=>S(at,{"data-testid":"stFileUploaderPagination",children:[l(ye,{children:`Showing page ${e} of ${t}`}),S(lt,{children:[l(V,{onClick:s,kind:M.MINIMAL,children:l(I,{content:ne,size:"xl"})}),l(V,{onClick:n,kind:M.MINIMAL,children:l(I,{content:re,size:"xl"})})]})]}),it=o.memo(st),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ze(({pageSize:n,items:s,resetOnAdd:d,...x})=>{const[c,F]=o.useState(0),[y,v]=o.useState(()=>te(s,n)),u=He(s);o.useEffect(()=>{u&&u.length!==s.length&&v(te(s,n)),u&&u.length<s.length?d&&F(0):c+1>=y&&F(y-1)},[s,c,n,u,d,y]);const E=()=>{F(Math.min(c+1,y-1))},z=()=>{F(Math.max(0,c-1))},A=s.slice(c*n,c*n+n);return S(be,{children:[l(e,{items:A,...x}),s.length>n?l(it,{pageSize:n,totalPages:y,currentPage:c+1,onNext:E,onPrevious:z}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>l(_e,{children:e.map(s=>l(ue,{children:l(rt,{fileInfo:s,onDelete:t,disabled:n})},s.id))}),pt=ct(dt),ut=e=>l(pe,{children:l(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:s}=n;if(D(s)||s.length===0)return{files:[],nextLocalId:1};let d=1;return{files:s.map(c=>{const F=c.name,y=c.size,v=c.fileId,u=c.fileUrls,E=new $(F,y,d,{type:"uploaded",fileId:v,fileUrls:u});return d+=1,E}),nextLocalId:d}},H=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:s,size:d,status:x}=n,{fileId:c,fileUrls:F}=x;return new ke({fileId:c,fileUrls:F,name:s,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:s,fragmentId:d})=>{const{width:x,elementRef:c}=Ce(),{files:F,nextLocalId:y}=o.useMemo(()=>ft(t,n),[t,n]),v=o.useRef(y),[u,E]=o.useState(()=>F),z=o.useRef(u);o.useEffect(()=>{z.current=u},[u]);const[A,j]=o.useState(!1),B=o.useCallback(()=>{const r=v.current;return v.current+=1,r},[]),P=o.useMemo(()=>{const r=t.maxUploadSizeMb;return Ne(r,R.Megabyte,R.Byte)},[t.maxUploadSizeMb]),U=o.useCallback(r=>{ee.flushSync(()=>{E(a=>{const i=typeof r=="function"?r(a):r;return z.current=i,i})})},[]),N=o.useCallback(r=>{ee.flushSync(()=>{j(r)})},[j]),X=o.useCallback(r=>{U(a=>[...a,r])},[U]),T=o.useCallback(r=>{r.length!==0&&U(a=>[...a,...r])},[U]),O=o.useCallback(r=>{U(a=>a.filter(i=>i.id!==r))},[U]),b=o.useCallback((r,a)=>{U(i=>i.map(g=>g.id===r?a:g))},[U]),C=o.useCallback(r=>z.current.find(a=>a.id===r),[]),_=u.some(r=>r.status.type==="uploading")||A?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,H(z.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(_!=="ready")return;const r=H(u),a=n.getFileUploaderStateValue(t);Ie(r,a)||n.setFileUploaderStateValue(t,r,{fromUi:!0},d)},[_,u,n,t,d]);const xe=o.useCallback(()=>{U(()=>[]);const r=H([]);n.setFileUploaderStateValue(t,r,{fromUi:!0},d)},[t,d,U,n]);Me({element:t,widgetMgr:n,onFormCleared:xe});const K=o.useCallback(r=>{const a=t.type;if(!a||a.length===0)return!0;const i=r.name.toLowerCase();return a.some(g=>i.endsWith(g.toLowerCase()))},[t.type]),Y=o.useCallback(r=>{const a=[],i=[];return r.forEach(g=>{K(g)?a.push(g):i.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:a,rejected:i}},[K]),G=o.useCallback((r,a)=>{const i=C(r);D(i)||i.status.type!=="uploading"||b(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}))},[C,b]),J=o.useCallback((r,a)=>{const i=C(a);if(D(i)||i.status.type!=="uploading")return;const g=Math.round(r.loaded*100/r.total);i.status.progress!==g&&b(a,i.setStatus({type:"uploading",abortController:i.status.abortController,progress:g}))},[C,b]),Q=o.useCallback((r,a)=>{const i=new AbortController,g=a.webkitRelativePath||a.name,f=new $(g,a.size,B(),{type:"uploading",abortController:i,progress:1});X(f),s.uploadFile(t,r.uploadUrl,a,h=>J(h,f.id),i.signal).then(()=>G(f.id,r)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[X,t,B,G,J,b,s]),q=o.useCallback(r=>{if(e)return;const a=C(r);D(a)||(a.status.type==="uploading"&&a.status.abortController.abort(),a.status.type==="uploaded"&&a.status.fileUrls.deleteUrl&&s.deleteFile(a.status.fileUrls.deleteUrl),O(r))},[e,C,O,s]),Se=o.useCallback((r,a)=>{const{multipleFiles:i}=t,g=!!t.acceptDirectory;let f=[...r],h=[...a];if(g&&f.length>0){const{accepted:w,rejected:m}=Y(f);f=w,h=[...h,...m]}if(!i&&f.length===0&&h.length>1){const w=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");w>=0&&(f.push(h[w].file),h.splice(w,1))}if(s.fetchFileURLs(f).then(w=>{if(!i&&f.length>0){const m=z.current.find(W=>W.status.type!=="error");if(m){N(!0);try{q(m.id)}finally{N(!1)}}}Ee(w,f).forEach(([m,W])=>{Q(m,W)})}).catch(w=>{T(f.map(m=>new $(m.name,m.size,B(),{type:"error",errorMessage:w})))}),h.length>0){const w=h.map(m=>Te(m,B(),P));T(w)}},[T,q,t,Y,P,B,s,Q,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),we=t.type;return S(Je,{className:"stFileUploader","data-testid":"stFileUploader",width:x,ref:c,children:[l(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&l(De,{content:t.help,label:t.label})}),l(tt,{onDrop:Se,multiple:t.multipleFiles,acceptedExtensions:we,maxSizeBytes:P,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&l(gt,{items:Z,pageSize:3,onDelete:q,resetOnAdd:!0,disabled:e})]})},wt=o.memo(ht);export{wt as default};
1
+ import{r as o,E as L,_ as k,F as p,ab as Ue,o as S,j as l,az as I,b as V,c as ve,B as M,h as ze,a0 as be,k as Ce,al as ee,bj as Ie,e as D,bX as Ee,p as Be,ac as De,ad as Le,bS as ke,bT as Ve}from"./index.01VsD2h1.js";import{u as Me}from"./FormClearHelper.By4vKj6A.js";import{g as oe,F as R,a as Re,D as Ae,I as Pe,s as Ne,b as Te}from"./FileHelper.Pf8URFng.js";import{S as qe,P as We}from"./ProgressBar.Dgbh0B0d.js";import{U as $}from"./UploadFileInfo.Dr-zDST7.js";const He=e=>{const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current};var ne=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z"}))});ne.displayName="ChevronLeft";var re=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"}))});re.displayName="ChevronRight";var ae=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});ae.displayName="Clear";var le=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0012 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 000 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95A5.469 5.469 0 0112 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11A2.98 2.98 0 0122 15c0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"}))});le.displayName="CloudUpload";var se=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(L,k({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))});se.displayName="Error";const ie=p("section",{target:"e7fhruq0"})(({isDisabled:e,theme:t})=>({display:"flex",gap:t.spacing.lg,alignItems:"center",padding:t.spacing.lg,backgroundColor:t.colors.secondaryBg,borderRadius:t.radii.default,border:t.colors.widgetBorderColor?`${t.sizes.borderWidth} solid ${t.colors.widgetBorderColor}`:void 0,height:t.sizes.largestElementHeight,":focus":{outline:"none"},":focus-visible":{boxShadow:`0 0 0 1px ${t.colors.primary}`},cursor:e?"not-allowed":"pointer"})),$e=p("div",{target:"e7fhruq1"})(({theme:e})=>({marginRight:"auto",alignItems:"center",display:"flex",gap:e.spacing.lg,minWidth:0,width:"100%"})),ce=p("span",{target:"e7fhruq2"})(({theme:e})=>({color:e.colors.darkenedBgMix100})),de=p("span",{target:"e7fhruq3"})(({theme:e,disabled:t})=>({color:t?e.colors.fadedText40:e.colors.bodyText})),je=p("span",{target:"e7fhruq4"})(({theme:e,disabled:t})=>({fontSize:e.fontSizes.sm,color:t?e.colors.fadedText40:e.colors.fadedText60,display:"block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",maxWidth:"100%"})),Xe=p("div",{target:"e7fhruq5"})({display:"flex",flexDirection:"column",minWidth:0,maxWidth:"100%"}),Oe=p("span",{target:"e7fhruq6"})({whiteSpace:"nowrap"}),pe=p("div",{target:"e7fhruq7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingTop:e.spacing.md,paddingLeft:e.spacing.lg,paddingRight:e.spacing.lg})),_e=p("ul",{target:"e7fhruq8"})(({theme:e})=>({listStyleType:"none",margin:e.spacing.none,padding:e.spacing.none})),ue=p("li",{target:"e7fhruq9"})(({theme:e})=>({margin:e.spacing.none,padding:e.spacing.none})),ge=p("div",{target:"e7fhruq10"})(({theme:e})=>({display:"flex",alignItems:"baseline",flex:1,paddingLeft:e.spacing.lg,overflow:"hidden"})),fe=p("div",{target:"e7fhruq11"})(({theme:e,disabled:t})=>({marginRight:e.spacing.sm,marginBottom:e.spacing.twoXS,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t?e.colors.fadedText40:e.colors.bodyText})),he=p("div",{target:"e7fhruq12"})(({theme:e})=>({display:"flex",alignItems:"center",marginBottom:e.spacing.twoXS})),Ke=p("span",{target:"e7fhruq13"})(({theme:e})=>({marginRight:e.spacing.twoXS})),Ye=p("div",{target:"e7fhruq14"})(({theme:e,disabled:t})=>({display:"flex",padding:e.spacing.twoXS,color:t?e.colors.fadedText40:e.colors.darkenedBgMix100})),Fe=p("small",{target:"e7fhruq15"})(({theme:e})=>({color:e.colors.redTextColor,fontSize:e.fontSizes.sm,height:e.fontSizes.sm,lineHeight:e.fontSizes.sm,display:"flex",alignItems:"center",whiteSpace:"nowrap"})),me=p("span",{target:"e7fhruq16"})({}),Ge=e=>({[ie]:{display:"flex",flexDirection:"column",alignItems:"flex-start",height:"auto",gap:e.spacing.sm},[ce]:{display:"none"},[de]:{marginBottom:e.spacing.twoXS},[pe]:{paddingRight:e.spacing.lg},[he]:{maxWidth:"inherit",flex:1,alignItems:"flex-start",marginBottom:e.spacing.sm},[fe]:{width:e.sizes.full},[ge]:{flexDirection:"column"},[Fe]:{height:"auto",whiteSpace:"initial"},[me]:{display:"none"},[ue]:{margin:e.spacing.none,padding:e.spacing.none}}),Je=p("div",{target:"e7fhruq17"})(({theme:e,width:t})=>{if(t<Ue("23rem"))return Ge(e)}),Qe=({multiple:e,acceptedExtensions:t,maxSizeBytes:n,acceptDirectory:s=!1,disabled:d})=>{const x=()=>s?"directories":e?"files":"file",c=()=>t.length?` • ${t.map(y=>y.replace(/^\./,"").toUpperCase()).join(", ")}`:null,F=()=>`Limit ${oe(n,R.Byte,0)} per file`;return S($e,{"data-testid":"stFileUploaderDropzoneInstructions",children:[l(ce,{children:l(I,{content:le,size:"threeXL"})}),S(Xe,{children:[S(de,{disabled:d,children:["Drag and drop ",x()," here"]}),S(je,{disabled:d,children:[F(),c()]})]})]})},Ze=o.memo(Qe),et=({onDrop:e,multiple:t,acceptedExtensions:n,maxSizeBytes:s,disabled:d,label:x,acceptDirectory:c=!1})=>l(Ae,{onDrop:e,multiple:t,accept:Re(n),maxSize:s,disabled:d,useFsAccessApi:!1,children:({getRootProps:F,getInputProps:y})=>{const v=y({multiple:t||!!c});return S(ie,{...F(),"data-testid":"stFileUploaderDropzone",isDisabled:d,"aria-label":x,"aria-disabled":d,children:[l("input",{"data-testid":"stFileUploaderDropzoneInput",...v,...c&&{webkitdirectory:""}}),l(Ze,{multiple:t,acceptedExtensions:n,maxSizeBytes:s,acceptDirectory:c,disabled:d}),l(Oe,{children:l(V,{kind:M.SECONDARY,disabled:d,size:ve.SMALL,children:c?"Browse directories":"Browse files"})})]})}}),tt=o.memo(et),ye=p("small",{target:"e1xq3mgd0"})(({kind:e,disabled:t,theme:n})=>{const{redTextColor:s,fadedText60:d,fadedText40:x}=n.colors;let c=d;return t&&(c=x),e==="danger"&&(c=s),{color:c,fontSize:n.fontSizes.sm,lineHeight:n.lineHeights.tight}}),ot=({fileInfo:e,disabled:t})=>e.status.type==="uploading"?l(We,{value:e.status.progress,size:qe.SMALL}):e.status.type==="error"?S(Fe,{children:[l(Ke,{"data-testid":"stFileUploaderFileErrorMessage",children:e.status.errorMessage}),l(me,{children:l(I,{content:se,size:"lg"})})]}):e.status.type==="uploaded"?l(ye,{disabled:t,children:oe(e.size,R.Byte)}):null,nt=({fileInfo:e,onDelete:t,disabled:n})=>S(he,{className:"stFileUploaderFile","data-testid":"stFileUploaderFile",children:[l(Ye,{disabled:n,children:l(I,{content:Pe,size:"twoXL"})}),S(ge,{className:"stFileUploaderFileData",children:[l(fe,{className:"stFileUploaderFileName","data-testid":"stFileUploaderFileName",title:e.name,disabled:n,children:e.name}),l(ot,{fileInfo:e,disabled:n})]}),l("div",{"data-testid":"stFileUploaderDeleteBtn",children:l(V,{onClick:()=>t(e.id),kind:M.MINIMAL,disabled:n,"aria-label":`Remove ${e.name}`,children:l(I,{content:ae,size:"lg"})})})]}),rt=o.memo(nt),at=p("div",{target:"e1o0u1j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:e.spacing.twoXS,marginBottom:e.spacing.twoXS})),lt=p("div",{target:"e1o0u1j1"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",color:e.colors.fadedText40})),st=({currentPage:e,totalPages:t,onNext:n,onPrevious:s})=>S(at,{"data-testid":"stFileUploaderPagination",children:[l(ye,{children:`Showing page ${e} of ${t}`}),S(lt,{children:[l(V,{onClick:s,kind:M.MINIMAL,children:l(I,{content:ne,size:"xl"})}),l(V,{onClick:n,kind:M.MINIMAL,children:l(I,{content:re,size:"xl"})})]})]}),it=o.memo(st),te=(e,t)=>Math.ceil(e.length/t),ct=e=>ze(({pageSize:n,items:s,resetOnAdd:d,...x})=>{const[c,F]=o.useState(0),[y,v]=o.useState(()=>te(s,n)),u=He(s);o.useEffect(()=>{u&&u.length!==s.length&&v(te(s,n)),u&&u.length<s.length?d&&F(0):c+1>=y&&F(y-1)},[s,c,n,u,d,y]);const E=()=>{F(Math.min(c+1,y-1))},z=()=>{F(Math.max(0,c-1))},A=s.slice(c*n,c*n+n);return S(be,{children:[l(e,{items:A,...x}),s.length>n?l(it,{pageSize:n,totalPages:y,currentPage:c+1,onNext:E,onPrevious:z}):null]})},e),dt=({items:e,onDelete:t,disabled:n})=>l(_e,{children:e.map(s=>l(ue,{children:l(rt,{fileInfo:s,onDelete:t,disabled:n})},s.id))}),pt=ct(dt),ut=e=>l(pe,{children:l(pt,{...e})}),gt=o.memo(ut),ft=(e,t)=>{const n=t.getFileUploaderStateValue(e);if(D(n))return{files:[],nextLocalId:1};const{uploadedFileInfo:s}=n;if(D(s)||s.length===0)return{files:[],nextLocalId:1};let d=1;return{files:s.map(c=>{const F=c.name,y=c.size,v=c.fileId,u=c.fileUrls,E=new $(F,y,d,{type:"uploaded",fileId:v,fileUrls:u});return d+=1,E}),nextLocalId:d}},H=e=>{const t=e.filter(n=>n.status.type==="uploaded").map(n=>{const{name:s,size:d,status:x}=n,{fileId:c,fileUrls:F}=x;return new ke({fileId:c,fileUrls:F,name:s,size:d})});return new Ve({uploadedFileInfo:t})},ht=({disabled:e,element:t,widgetMgr:n,uploadClient:s,fragmentId:d})=>{const{width:x,elementRef:c}=Ce(),{files:F,nextLocalId:y}=o.useMemo(()=>ft(t,n),[t,n]),v=o.useRef(y),[u,E]=o.useState(()=>F),z=o.useRef(u);o.useEffect(()=>{z.current=u},[u]);const[A,j]=o.useState(!1),B=o.useCallback(()=>{const r=v.current;return v.current+=1,r},[]),P=o.useMemo(()=>{const r=t.maxUploadSizeMb;return Ne(r,R.Megabyte,R.Byte)},[t.maxUploadSizeMb]),U=o.useCallback(r=>{ee.flushSync(()=>{E(a=>{const i=typeof r=="function"?r(a):r;return z.current=i,i})})},[]),N=o.useCallback(r=>{ee.flushSync(()=>{j(r)})},[j]),X=o.useCallback(r=>{U(a=>[...a,r])},[U]),T=o.useCallback(r=>{r.length!==0&&U(a=>[...a,...r])},[U]),O=o.useCallback(r=>{U(a=>a.filter(i=>i.id!==r))},[U]),b=o.useCallback((r,a)=>{U(i=>i.map(g=>g.id===r?a:g))},[U]),C=o.useCallback(r=>z.current.find(a=>a.id===r),[]),_=u.some(r=>r.status.type==="uploading")||A?"updating":"ready";o.useEffect(()=>{n.getFileUploaderStateValue(t)===void 0&&n.setFileUploaderStateValue(t,H(z.current),{fromUi:!1},d)},[n,t,d]),o.useEffect(()=>{if(_!=="ready")return;const r=H(u),a=n.getFileUploaderStateValue(t);Ie(r,a)||n.setFileUploaderStateValue(t,r,{fromUi:!0},d)},[_,u,n,t,d]);const xe=o.useCallback(()=>{U(()=>[]);const r=H([]);n.setFileUploaderStateValue(t,r,{fromUi:!0},d)},[t,d,U,n]);Me({element:t,widgetMgr:n,onFormCleared:xe});const K=o.useCallback(r=>{const a=t.type;if(!a||a.length===0)return!0;const i=r.name.toLowerCase();return a.some(g=>i.endsWith(g.toLowerCase()))},[t.type]),Y=o.useCallback(r=>{const a=[],i=[];return r.forEach(g=>{K(g)?a.push(g):i.push({file:g,errors:[{code:"file-invalid-type",message:`${g.type} files are not allowed.`}]})}),{accepted:a,rejected:i}},[K]),G=o.useCallback((r,a)=>{const i=C(r);D(i)||i.status.type!=="uploading"||b(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}))},[C,b]),J=o.useCallback((r,a)=>{const i=C(a);if(D(i)||i.status.type!=="uploading")return;const g=Math.round(r.loaded*100/r.total);i.status.progress!==g&&b(a,i.setStatus({type:"uploading",abortController:i.status.abortController,progress:g}))},[C,b]),Q=o.useCallback((r,a)=>{const i=new AbortController,g=a.webkitRelativePath||a.name,f=new $(g,a.size,B(),{type:"uploading",abortController:i,progress:1});X(f),s.uploadFile(t,r.uploadUrl,a,h=>J(h,f.id),i.signal).then(()=>G(f.id,r)).catch(h=>{h instanceof DOMException&&h.name==="AbortError"||b(f.id,f.setStatus({type:"error",errorMessage:h?h.toString():"Unknown error"}))})},[X,t,B,G,J,b,s]),q=o.useCallback(r=>{if(e)return;const a=C(r);D(a)||(a.status.type==="uploading"&&a.status.abortController.abort(),a.status.type==="uploaded"&&a.status.fileUrls.deleteUrl&&s.deleteFile(a.status.fileUrls.deleteUrl),O(r))},[e,C,O,s]),Se=o.useCallback((r,a)=>{const{multipleFiles:i}=t,g=!!t.acceptDirectory;let f=[...r],h=[...a];if(g&&f.length>0){const{accepted:w,rejected:m}=Y(f);f=w,h=[...h,...m]}if(!i&&f.length===0&&h.length>1){const w=h.findIndex(m=>m.errors.length===1&&m.errors[0].code==="too-many-files");w>=0&&(f.push(h[w].file),h.splice(w,1))}if(s.fetchFileURLs(f).then(w=>{if(!i&&f.length>0){const m=z.current.find(W=>W.status.type!=="error");if(m){N(!0);try{q(m.id)}finally{N(!1)}}}Ee(w,f).forEach(([m,W])=>{Q(m,W)})}).catch(w=>{T(f.map(m=>new $(m.name,m.size,B(),{type:"error",errorMessage:w})))}),h.length>0){const w=h.map(m=>Te(m,B(),P));T(w)}},[T,q,t,Y,P,B,s,Q,N]),Z=o.useMemo(()=>u.slice().reverse(),[u]),we=t.type;return S(Je,{className:"stFileUploader","data-testid":"stFileUploader",width:x,ref:c,children:[l(Le,{label:t.label,disabled:e,labelVisibility:Be(t.labelVisibility?.value),children:t.help&&l(De,{content:t.help,label:t.label})}),l(tt,{onDrop:Se,multiple:t.multipleFiles,acceptedExtensions:we,maxSizeBytes:P,label:t.label,disabled:e,acceptDirectory:!!t.acceptDirectory}),Z.length>0&&l(gt,{items:Z,pageSize:3,onDelete:q,resetOnAdd:!0,disabled:e})]})},wt=o.memo(ht);export{wt as default};
@@ -1 +1 @@
1
- import{ax as j,j as m,ay as U,af as z,P as $,az as _,q as X,aA as q,m as G,e as Z,r as s,l as J,aB as K,L as Q,o as oo,p as to,ac as ro,ad as eo}from"./index.BZBWLU1C.js";import{h as x}from"./moment.C7qA8nIE.js";import{u as no,D as ao,a as so}from"./useIntlLocale.Ctz17A7g.js";import{u as io}from"./useBasicWidgetState.D6_b0IqA.js";import{S as lo}from"./styled-components.D4x8jmOI.js";import{E as co}from"./ErrorOutline.esm.BcqUpfNe.js";import"./timepicker.CDks5DWI.js";import"./input.BoJqOS7a.js";import"./base-input.BX9Jll5o.js";import"./FormClearHelper.Cm3GDSk6.js";const po=({theme:o,isInSidebar:t,step:r,minTime:c,maxTime:u,disabled:p,clearable:g,error:e})=>({Popover:{props:{ignoreBoundary:t,placement:U.bottomLeft,overrides:{Body:{style:{marginTop:o.spacing.px}}}}},CalendarContainer:{style:{fontSize:o.fontSizes.sm,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.none,paddingTop:o.spacing.sm}},Week:{style:{fontSize:o.fontSizes.sm}},Day:{style:({$pseudoHighlighted:i,$pseudoSelected:a,$selected:T,$isHovered:y})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,"::before":{backgroundColor:T||a||i||y?`${o.colors.darkenedBgMix15} !important`:o.colors.transparent},"::after":{borderColor:o.colors.transparent},...G(o)&&y&&a&&!T?{color:o.colors.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},NextButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},Input:{props:{maskChar:null,endEnhancer:e&&m(q,{content:m(X,{source:e,allowHTML:!1}),placement:$.TOP_RIGHT,error:!0,children:m(_,{content:co,size:"lg"})}),overrides:{EndEnhancer:{style:{color:e?o.colors.redTextColor:o.colors.grayTextColor,backgroundColor:o.colors.transparent}},Root:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,paddingRight:o.spacing.twoXS,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a,...e&&{backgroundColor:o.colors.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:o.fontWeights.normal,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,lineHeight:o.lineHeights.inputWidget,"::placeholder":{color:o.colors.fadedText60},...e&&{color:o.colors.redTextColor}},props:{"data-testid":"stDateTimeInputField"}}}}},TimeSelectContainer:{style:{paddingTop:o.spacing.none,paddingBottom:o.spacing.none}},TimeSelectFormControl:{style:{marginBottom:o.spacing.none},props:{overrides:{Label:{component:()=>null}}}},TimeSelect:{props:{step:r,format:"24",disabled:p,nullable:g,minTime:c,maxTime:u,overrides:{Select:{props:{disabled:p,overrides:{ControlContainer:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ValueContainer:{style:()=>({lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm})},SingleValue:{style:{fontWeight:o.fontWeights.normal},props:{"data-testid":"stDateTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:o.spacing.none,paddingBottom:o.spacing.none,boxShadow:"none",maxHeight:o.sizes.maxDropdownHeight})},DropdownListItem:{component:lo},Popover:{props:{ignoreBoundary:t,overrides:{Body:{style:()=>({marginTop:o.spacing.px})}}}},Placeholder:{style:()=>({color:o.colors.fadedText60})},SelectArrow:{component:j,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}}}}}}}}}),h="YYYY/MM/DD, HH:mm",go=(o,t)=>{const r=o.getStringArrayValue(t);return r&&r.length>0?r[0]:null},uo=o=>o.default?.length?o.default[0]:null,fo=o=>o.value?.length?o.value[0]:null,k=o=>{let t;if(Array.isArray(o)?t=o.find(c=>c instanceof Date):t=o,!t||Number.isNaN(t.getTime()))return null;const r=new Date(t.getTime());return r.setSeconds(0,0),r},b=o=>{if(Z(o)||o==="")return null;const t=x(o,h,!0);return t.isValid()?k(t.toDate()):null},B=(o,t)=>o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()&&o.getDate()===t.getDate(),I=(o,t)=>{const r=new Date(o.getTime());return r.setHours(t.getHours(),t.getMinutes(),0,0),r},mo=(o,t,r,c)=>{const u=b(o.min),p=b(o.max),g=e=>{t.setStringArrayValue(o,e?[e]:[],{fromUi:r.fromUi},c)};if(r.value){const e=b(r.value);if(e){u&&e<u||p&&e>p||g(r.value);return}}g(r.value)};function bo({disabled:o,element:t,widgetMgr:r,fragmentId:c}){const u=J(),p=s.useContext(K),g=s.useRef(null),[e,i]=io({getStateFromWidgetMgr:go,getDefaultStateFromProto:uo,getCurrStateFromProto:fo,updateWidgetMgrState:mo,element:t,widgetMgr:r,fragmentId:c}),{locale:a}=s.useContext(Q),T=no(a),y=t.step?Number(t.step):900,l=s.useMemo(()=>b(t.min),[t.min]),d=s.useMemo(()=>b(t.max),[t.max]),C=s.useMemo(()=>b(e),[e]),[n,v]=s.useState(C),[M,L]=s.useState(C);C!==M&&(v(C),L(C));const H=l??void 0,V=d??void 0,A=s.useMemo(()=>{if(!(!n||!l))return B(n,l)?I(n,l):void 0},[n,l]),E=s.useMemo(()=>{if(!(!n||!d))return B(n,d)?I(n,d):void 0},[n,d]),P=t.format.replaceAll(/[a-zA-Z]/g,"9"),D=`${t.format.replaceAll("Y","y").replaceAll("D","d")}, HH:mm`,R=`${P}, 99:99`,w=`${t.format}, HH:MM`,W=(t.default&&t.default.length>0?t.default[0]:"").length===0&&!o,F=s.useMemo(()=>{if(!n)return null;if(l&&n<l||d&&n>d){const f=x(l).format(D),S=x(d).format(D);return`**Error**: Date and time set outside allowed range. Please select a date and time between ${f} and ${S}.`}return null},[n,l,d,D]),O=s.useCallback(({date:f})=>{const S=k(f);v(S),g.current?.open?.()},[]),N=s.useCallback(()=>{const f=n?x(n).format(h):null;f!==e&&i({value:f,fromUi:!0})},[n,e,i]),Y=po({theme:u,isInSidebar:p,step:y,minTime:A,maxTime:E,disabled:o,clearable:W,error:F});return oo("div",{className:"stDateTimeInput","data-testid":"stDateTimeInput",children:[m(eo,{label:t.label,disabled:o,labelVisibility:to(t.labelVisibility?.value),children:t.help&&m(ro,{content:t.help,label:t.label})}),m(so,{ref:g,locale:T,density:ao.high,value:n,onChange:O,onClose:N,minDate:H,maxDate:V,disabled:o,timeSelectStart:!0,formatString:D,mask:R,placeholder:w,clearable:W,overrides:Y,"aria-label":t.label})]})}const ko=s.memo(bo);export{ko as default};
1
+ import{ax as j,j as m,ay as U,af as z,P as $,az as _,q as X,aA as q,m as G,e as Z,r as s,l as J,aB as K,L as Q,o as oo,p as to,ac as ro,ad as eo}from"./index.01VsD2h1.js";import{h as x}from"./moment.C7qA8nIE.js";import{u as no,D as ao,a as so}from"./useIntlLocale.CmSionuT.js";import{u as io}from"./useBasicWidgetState.DrTKs46R.js";import{S as lo}from"./styled-components.DQsMkvXn.js";import{E as co}from"./ErrorOutline.esm.D0HiUB0L.js";import"./timepicker.gie5YwtP.js";import"./input.27t-DftI.js";import"./base-input.CHPo5oJ1.js";import"./FormClearHelper.By4vKj6A.js";const po=({theme:o,isInSidebar:t,step:r,minTime:c,maxTime:u,disabled:p,clearable:g,error:e})=>({Popover:{props:{ignoreBoundary:t,placement:U.bottomLeft,overrides:{Body:{style:{marginTop:o.spacing.px}}}}},CalendarContainer:{style:{fontSize:o.fontSizes.sm,paddingRight:o.spacing.sm,paddingLeft:o.spacing.sm,paddingBottom:o.spacing.none,paddingTop:o.spacing.sm}},Week:{style:{fontSize:o.fontSizes.sm}},Day:{style:({$pseudoHighlighted:i,$pseudoSelected:a,$selected:T,$isHovered:y})=>({fontSize:o.fontSizes.sm,lineHeight:o.lineHeights.base,"::before":{backgroundColor:T||a||i||y?`${o.colors.darkenedBgMix15} !important`:o.colors.transparent},"::after":{borderColor:o.colors.transparent},...G(o)&&y&&a&&!T?{color:o.colors.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},NextButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:o.colors.transparent},":focus":{backgroundColor:o.colors.transparent,outline:0}})},Input:{props:{maskChar:null,endEnhancer:e&&m(q,{content:m(X,{source:e,allowHTML:!1}),placement:$.TOP_RIGHT,error:!0,children:m(_,{content:co,size:"lg"})}),overrides:{EndEnhancer:{style:{color:e?o.colors.redTextColor:o.colors.grayTextColor,backgroundColor:o.colors.transparent}},Root:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,paddingRight:o.spacing.twoXS,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a,...e&&{backgroundColor:o.colors.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.grayTextColor,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:o.fontWeights.normal,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,lineHeight:o.lineHeights.inputWidget,"::placeholder":{color:o.colors.fadedText60},...e&&{color:o.colors.redTextColor}},props:{"data-testid":"stDateTimeInputField"}}}}},TimeSelectContainer:{style:{paddingTop:o.spacing.none,paddingBottom:o.spacing.none}},TimeSelectFormControl:{style:{marginBottom:o.spacing.none},props:{overrides:{Label:{component:()=>null}}}},TimeSelect:{props:{step:r,format:"24",disabled:p,nullable:g,minTime:c,maxTime:u,overrides:{Select:{props:{disabled:p,overrides:{ControlContainer:{style:({$isFocused:i})=>{const a=z(o.colors,i);return{height:o.sizes.minElementHeight,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,borderTopColor:a,borderRightColor:a,borderBottomColor:a,borderLeftColor:a}}},IconsContainer:{style:()=>({paddingRight:o.spacing.sm})},ValueContainer:{style:()=>({lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm})},SingleValue:{style:{fontWeight:o.fontWeights.normal},props:{"data-testid":"stDateTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:o.spacing.none,paddingBottom:o.spacing.none,boxShadow:"none",maxHeight:o.sizes.maxDropdownHeight})},DropdownListItem:{component:lo},Popover:{props:{ignoreBoundary:t,overrides:{Body:{style:()=>({marginTop:o.spacing.px})}}}},Placeholder:{style:()=>({color:o.colors.fadedText60})},SelectArrow:{component:j,props:{overrides:{Svg:{style:()=>({width:o.iconSizes.xl,height:o.iconSizes.xl})}}}}}}}}}}}),h="YYYY/MM/DD, HH:mm",go=(o,t)=>{const r=o.getStringArrayValue(t);return r&&r.length>0?r[0]:null},uo=o=>o.default?.length?o.default[0]:null,fo=o=>o.value?.length?o.value[0]:null,k=o=>{let t;if(Array.isArray(o)?t=o.find(c=>c instanceof Date):t=o,!t||Number.isNaN(t.getTime()))return null;const r=new Date(t.getTime());return r.setSeconds(0,0),r},b=o=>{if(Z(o)||o==="")return null;const t=x(o,h,!0);return t.isValid()?k(t.toDate()):null},B=(o,t)=>o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()&&o.getDate()===t.getDate(),I=(o,t)=>{const r=new Date(o.getTime());return r.setHours(t.getHours(),t.getMinutes(),0,0),r},mo=(o,t,r,c)=>{const u=b(o.min),p=b(o.max),g=e=>{t.setStringArrayValue(o,e?[e]:[],{fromUi:r.fromUi},c)};if(r.value){const e=b(r.value);if(e){u&&e<u||p&&e>p||g(r.value);return}}g(r.value)};function bo({disabled:o,element:t,widgetMgr:r,fragmentId:c}){const u=J(),p=s.useContext(K),g=s.useRef(null),[e,i]=io({getStateFromWidgetMgr:go,getDefaultStateFromProto:uo,getCurrStateFromProto:fo,updateWidgetMgrState:mo,element:t,widgetMgr:r,fragmentId:c}),{locale:a}=s.useContext(Q),T=no(a),y=t.step?Number(t.step):900,l=s.useMemo(()=>b(t.min),[t.min]),d=s.useMemo(()=>b(t.max),[t.max]),C=s.useMemo(()=>b(e),[e]),[n,v]=s.useState(C),[M,L]=s.useState(C);C!==M&&(v(C),L(C));const H=l??void 0,V=d??void 0,A=s.useMemo(()=>{if(!(!n||!l))return B(n,l)?I(n,l):void 0},[n,l]),E=s.useMemo(()=>{if(!(!n||!d))return B(n,d)?I(n,d):void 0},[n,d]),P=t.format.replaceAll(/[a-zA-Z]/g,"9"),D=`${t.format.replaceAll("Y","y").replaceAll("D","d")}, HH:mm`,R=`${P}, 99:99`,w=`${t.format}, HH:MM`,W=(t.default&&t.default.length>0?t.default[0]:"").length===0&&!o,F=s.useMemo(()=>{if(!n)return null;if(l&&n<l||d&&n>d){const f=x(l).format(D),S=x(d).format(D);return`**Error**: Date and time set outside allowed range. Please select a date and time between ${f} and ${S}.`}return null},[n,l,d,D]),O=s.useCallback(({date:f})=>{const S=k(f);v(S),g.current?.open?.()},[]),N=s.useCallback(()=>{const f=n?x(n).format(h):null;f!==e&&i({value:f,fromUi:!0})},[n,e,i]),Y=po({theme:u,isInSidebar:p,step:y,minTime:A,maxTime:E,disabled:o,clearable:W,error:F});return oo("div",{className:"stDateTimeInput","data-testid":"stDateTimeInput",children:[m(eo,{label:t.label,disabled:o,labelVisibility:to(t.labelVisibility?.value),children:t.help&&m(ro,{content:t.help,label:t.label})}),m(so,{ref:g,locale:T,density:ao.high,value:n,onChange:O,onClose:N,minDate:H,maxDate:V,disabled:o,timeSelectStart:!0,formatString:D,mask:R,placeholder:w,clearable:W,overrides:Y,"aria-label":t.label})]})}const ko=s.memo(bo);export{ko as default};
@@ -1 +1 @@
1
- import{F as u,r as L,X as C,o as x,j as i,V as E,q as b,W as v}from"./index.BZBWLU1C.js";import{w as y,E as W}from"./withFullScreenWrapper.CeeoYBpc.js";import{S as p,T}from"./Toolbar.CuMH-Gqe.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),j=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),H=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),M=v.getLogger("ImageList");function R(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(j,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(H,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=R(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;M.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};
1
+ import{F as u,r as L,X as C,o as x,j as i,V as E,q as b,W as v}from"./index.01VsD2h1.js";import{w as y,E as W}from"./withFullScreenWrapper.Ch22PgdD.js";import{S as p,T}from"./Toolbar.CowuXIFr.js";const F=u("div",{target:"e1xt4yf90"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"})),j=u("div",{target:"e1xt4yf91"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}})),H=u("div",{target:"e1xt4yf92"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS})),M=v.getLogger("ImageList");function R(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const G=({itemKey:e,image:t,imgStyle:r,buildMediaURL:l,handleImageError:s,shouldStretch:d})=>{const o=E(t.url);return x(j,{"data-testid":"stImageContainer",shouldStretch:d,children:[i("img",{style:r,src:l(t.url),alt:e,onError:s,crossOrigin:o}),t.caption&&i(H,{"data-testid":"stImageCaption",style:r,children:i(b,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:l}){const{expanded:s,width:d,height:o,expand:f,collapse:h}=C(W),g=d||0,I=R(r,e.width,g),m=r?.useStretch||e.width===-5,a={};o&&s?(a.maxHeight=o,a.objectFit="contain",a.width="100%"):(a.width=I??"100%",a.maxWidth="100%");const w=c=>{const n=c.currentTarget.src;M.error(`Client Error: Image source error - ${n}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",n)};return x(p,{width:g,height:o,useContainerWidth:s,topCentered:!0,children:[i(T,{target:p,isFullScreen:s,onExpand:f,onCollapse:h,disableFullscreenMode:l}),i(F,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:e.imgs.map((c,n)=>i(G,{itemKey:n.toString(),image:c,imgStyle:a,buildMediaURL:S=>t.buildMediaURL(S),handleImageError:w,shouldStretch:m},n))})]})}const U=y(O),D=L.memo(U);export{D as default};
@@ -1 +1 @@
1
- import{r as o,L,I as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,J as Y}from"./index.BZBWLU1C.js";import{m as z}from"./iconPosition.y0q-Rqem.js";import{c as R}from"./createDownloadLinkElement.CviG5BQx.js";function F(S){const{disabled:i,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:I,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[l,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(L),{requestDeferredFile:D}=o.useContext(M);let m=w.SECONDARY;p==="primary"?m=w.PRIMARY:p==="tertiary"&&(m=w.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const a=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(a,"Download Button"),R({filename:"",url:a,enforceDownloadInNewTab:d}).click()}catch(e){const a=e instanceof Error?e.message:"Download failed";s(a)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(i)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[i,h,B,r,g,n,E,c,d]);return T({shortcut:b,disabled:i,onActivate:y}),o.useEffect(()=>{if(l){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[l]),U("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:m,size:P.SMALL,disabled:i||C,onClick:y,containerWidth:!0,children:u(j,{icon:C?"spinner":I,iconPosition:z(r.iconPosition),label:x,shortcut:b})})}),l&&u(Y,{"data-testid":"stDownloadButtonError",children:l})]})}const O=o.memo(F);export{O as default};
1
+ import{r as o,L,I as M,B as w,u as T,o as U,j as u,b as A,c as P,D as j,a as N,J as Y}from"./index.01VsD2h1.js";import{m as z}from"./iconPosition.5dHEZYw2.js";import{c as R}from"./createDownloadLinkElement.BaE-_v8I.js";function F(S){const{disabled:i,element:r,widgetMgr:B,endpoints:t,fragmentId:g}=S,{help:v,label:x,icon:I,ignoreRerun:h,type:p,url:k,deferredFileId:n}=r,b=r.shortcut?r.shortcut:void 0,[C,f]=o.useState(!1),[l,s]=o.useState(null),{enforceDownloadInNewTab:d=!1}=o.useContext(L),{requestDeferredFile:D}=o.useContext(M);let m=w.SECONDARY;p==="primary"?m=w.PRIMARY:p==="tertiary"&&(m=w.TERTIARY);const c=o.useMemo(()=>t.buildDownloadUrl(k),[t,k]);o.useEffect(()=>{n?.length||t.checkSourceUrlResponse(c,"Download Button")},[c,t,n]);const E=o.useCallback(async()=>{if(!D||!n){s("Deferred download not properly configured");return}f(!0),s(null);try{const e=await D(n);if(e.errorMsg){s(e.errorMsg),f(!1);return}const a=t.buildDownloadUrl(e.url);t.checkSourceUrlResponse(a,"Download Button"),R({filename:"",url:a,enforceDownloadInNewTab:d}).click()}catch(e){const a=e instanceof Error?e.message:"Download failed";s(a)}finally{f(!1)}},[D,n,t,d]),y=o.useCallback(()=>{if(i)return;h||B.setTriggerValue(r,{fromUi:!0},g),!!n?.length?E():R({filename:"",url:c,enforceDownloadInNewTab:d}).click()},[i,h,B,r,g,n,E,c,d]);return T({shortcut:b,disabled:i,onActivate:y}),o.useEffect(()=>{if(l){const e=setTimeout(()=>s(null),5e3);return()=>clearTimeout(e)}},[l]),U("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:[u(N,{help:v,containerWidth:!0,children:u(A,{kind:m,size:P.SMALL,disabled:i||C,onClick:y,containerWidth:!0,children:u(j,{icon:C?"spinner":I,iconPosition:z(r.iconPosition),label:x,shortcut:b})})}),l&&u(Y,{"data-testid":"stDownloadButtonError",children:l})]})}const O=o.memo(F);export{O as default};
@@ -1 +1 @@
1
- import{F as f,r as o,V as g,j as l,W as v}from"./index.BZBWLU1C.js";const T=f("div",{target:"e1z085g90"})(()=>({lineHeight:0})),y=f("audio",{target:"e1z085g91"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0})),h=v.getLogger("Audio");function L({element:t,endpoints:a,elementMgr:s}){const i=o.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,E=o.useMemo(()=>{if(!t.id)return!0;const e=s.getElementState(t.id,"preventAutoplay");return e||s.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,s]);o.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),o.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),o.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const c=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",c),()=>{e&&d>0&&e.removeEventListener("timeupdate",c)}},[d,u,n]),o.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const m=g(t.url),A=a.buildMediaURL(t.url);return l(T,{children:l(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:A,onError:e=>{const r=e.currentTarget.src;h.error(`Client Error: Audio source error - ${r}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",r)},crossOrigin:m})})}const C=o.memo(L);export{C as default};
1
+ import{F as f,r as o,V as g,j as l,W as v}from"./index.01VsD2h1.js";const T=f("div",{target:"e1z085g90"})(()=>({lineHeight:0})),y=f("audio",{target:"e1z085g91"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0})),h=v.getLogger("Audio");function L({element:t,endpoints:a,elementMgr:s}){const i=o.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,E=o.useMemo(()=>{if(!t.id)return!0;const e=s.getElementState(t.id,"preventAutoplay");return e||s.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,s]);o.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),o.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),o.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const c=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",c),()=>{e&&d>0&&e.removeEventListener("timeupdate",c)}},[d,u,n]),o.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const m=g(t.url),A=a.buildMediaURL(t.url);return l(T,{children:l(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!E,src:A,onError:e=>{const r=e.currentTarget.src;h.error(`Client Error: Audio source error - ${r}`),a.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",r)},crossOrigin:m})})}const C=o.memo(L);export{C as default};
@@ -1 +1 @@
1
- import{get as O}from"./index.C1ElSZEy.js";import{M as P}from"./index.BZBWLU1C.js";const s=[{description:"angry face",emoji:"😠",emoticons:[">:(",">:[",">:-(",">:-[",">=(",">=[",">=-(",">=-["],name:"angry",tags:["mad","annoyed"]},{description:"smiling face with smiling eyes",emoji:"😊",emoticons:[':")',':"]',':"D',':-")',':-"]',':-"D','=")','="]','="D','=-")','=-"]','=-"D'],name:"blush",tags:["proud"]},{description:"broken heart",emoji:"💔",emoticons:["<\\3","</3"],name:"broken_heart",tags:[]},{description:"confused face",emoji:"😕",emoticons:[":/",":\\",":-/",":-\\","=/","=\\","=-/","=-\\"],name:"confused",tags:[]},{description:"crying face",emoji:"😢",emoticons:[":,(",":,[",":,|",":,-(",":,-[",":,-|",":'(",":'[",":'|",":'-(",":'-[",":'-|","=,(","=,[","=,|","=,-(","=,-[","=,-|","='(","='[","='|","='-(","='-[","='-|","T-T"],name:"cry",tags:["sad","tear"]},{description:"frowning face with open mouth",emoji:"😦",emoticons:[":(",":[",":-(",":-[","=(","=[","=-(","=-["],name:"frowning",tags:[]},{description:"red heart",emoji:"❤️",emoticons:["<3"],name:"heart",tags:["love"]},{description:"angry face with horns",emoji:"👿",emoticons:["]:(","]:[","]:-(","]:-[","]=(","]=[","]=-(","]=-["],name:"imp",tags:["angry","devil","evil","horns"]},{description:"smiling face with halo",emoji:"😇",emoticons:["o:)","o:]","o:D","o:-)","o:-]","o:-D","o=)","o=]","o=D","o=-)","o=-]","o=-D","O:)","O:]","O:D","O:-)","O:-]","O:-D","O=)","O=]","O=D","O=-)","O=-]","O=-D","0:)","0:]","0:D","0:-)","0:-]","0:-D","0=)","0=]","0=D","0=-)","0=-]","0=-D"],name:"innocent",tags:["angel"]},{description:"face with tears of joy",emoji:"😂",emoticons:[":,)",":,]",":,D",":,-)",":,-]",":,-D",":')",":']",":'D",":'-)",":'-]",":'-D","=,)","=,]","=,D","=,-)","=,-]","=,-D","=')","=']","='D","='-)","='-]","='-D"],name:"joy",tags:["tears"]},{description:"kissing face",emoji:"😗",emoticons:[":*",":-*","=*","=-*"],name:"kissing",tags:[]},{description:"grinning squinting face",emoji:"😆",emoticons:["x)","x]","xD","x-)","x-]","x-D","X)","X]","X-)","X-]","X-D"],name:"laughing",tags:["happy","haha"]},{description:"man",emoji:"👨",emoticons:[":3",":-3","=3","=-3",";3",";-3","x3","x-3","X3","X-3"],name:"man",tags:["mustache","father","dad"]},{description:"neutral face",emoji:"😐",emoticons:[":|",":-|","=|","=-|"],name:"neutral_face",tags:["meh"]},{description:"face without mouth",emoji:"😶",emoticons:[":-"],name:"no_mouth",tags:["mute","silence"]},{description:"face with open mouth",emoji:"😮",emoticons:[":o",":O",":0",":-o",":-O",":-0","=o","=O","=0","=-o","=-O","=-0"],name:"open_mouth",tags:["surprise","impressed","wow"]},{description:"enraged face",emoji:"😡",emoticons:[":@",":-@","=@","=-@"],name:"rage",tags:["angry"]},{description:"grinning face with smiling eyes",emoji:"😄",emoticons:[":D",":-D","=D","=-D"],name:"smile",tags:["happy","joy","laugh","pleased"]},{description:"grinning face with big eyes",emoji:"😃",emoticons:[":)",":]",":-)",":-]","=)","=]","=-)","=-]"],name:"smiley",tags:["happy","joy","haha"]},{description:"smiling face with horns",emoji:"😈",emoticons:["]:)","]:]","]:D","]:-)","]:-]","]:-D","]=)","]=]","]=D","]=-)","]=-]","]=-D"],name:"smiling_imp",tags:["devil","evil","horns"]},{description:"loudly crying face",emoji:"😭",emoticons:[":,'(",":,'[",":,'-(",":,'-[",":',(",":',[",":',-(",":',-[","=,'(","=,'[","=,'-(","=,'-[","=',(","=',[","=',-(","=',-["],name:"sob",tags:["sad","cry","bawling"]},{description:"face with tongue",emoji:"😛",emoticons:[":p",":P",":d",":-p",":-P",":-d","=p","=P","=d","=-p","=-P","=-d"],name:"stuck_out_tongue",tags:[]},{description:"squinting face with tongue",emoji:"😝",emoticons:["xP","x-p","x-P","x-d","Xp","Xd","X-p","X-P","X-d"],name:"stuck_out_tongue_closed_eyes",tags:["prank"]},{description:"winking face with tongue",emoji:"😜",emoticons:[";p",";P",";d",";-p",";-P",";-d"],name:"stuck_out_tongue_winking_eye",tags:["prank","silly"]},{description:"smiling face with sunglasses",emoji:"😎",emoticons:["8)","8]","8D","8-)","8-]","8-D","B)","B]","B-)","B-]","B-D"],name:"sunglasses",tags:["cool"]},{description:"downcast face with sweat",emoji:"😓",emoticons:[",:(",",:[",",:-(",",:-[",",=(",",=[",",=-(",",=-[","':(","':[","':-(","':-[","'=(","'=[","'=-(","'=-["],name:"sweat",tags:[]},{description:"grinning face with sweat",emoji:"😅",emoticons:[",:)",",:]",",:D",",:-)",",:-]",",:-D",",=)",",=]",",=D",",=-)",",=-]",",=-D","':)","':]","':D","':-)","':-]","':-D","'=)","'=]","'=D","'=-)","'=-]","'=-D"],name:"sweat_smile",tags:["hot"]},{description:"unamused face",emoji:"😒",emoticons:[":$",":s",":z",":S",":Z",":-$",":-s",":-z",":-S",":-Z","=$","=s","=z","=S","=Z","=-$","=-s","=-z","=-S","=-Z"],name:"unamused",tags:["meh"]},{description:"winking face",emoji:"😉",emoticons:[";)",";]",";D",";-)",";-]",";-D"],name:"wink",tags:["flirt"]}],x=/:\+1:|:-1:|:[\w-]+:/g,b=/(^|\s)[@$|*'",;.=:\-)([\]\\/<>038BOopPsSdDxXzZ]{2,5}/g,k=/(?:_|-(?!1))/g,X={padSpaceAfter:!1,emoticon:!1,accessible:!1},T=f=>{const t=Object.assign({},X,f),r=!!t.padSpaceAfter,u=!!t.emoticon,g=!!t.accessible;function d(e,i){return{type:"text",value:e,data:{hName:"span",hProperties:{role:"img",ariaLabel:i},hChildren:[{type:"text",value:e}]}}}function D(e){const i=s.find(o=>o.emoticons.includes(e)),n=s.find(o=>o.emoticons.includes(e.slice(0,-1))),a=s.find(o=>o.emoticons.includes(e.slice(1))),c=s.find(o=>o.emoticons.includes(e.slice(1,-1))),m=i||n||a||c;if(!m)return!1;const w=!(i||a)&&(c||n)?e.slice(-1):"",y=!(i||n)&&(c||a)?e.slice(0,1):"",_=r?" ":"",l=y+m.emoji+_+w;return g?d(l,m.name+" emoticon"):l}function h(e){let i=O(e);if(typeof i>"u")return!1;if(r&&(i=i+" "),g){const n=e.slice(1,-1).replace(k," ")+" emoji";return d(i,n)}return i}const p=[[x,h]];u&&p.push([b,D]);function j(e){P(e,p)}return j};export{T as default};
1
+ import{get as O}from"./index.CIlqaESj.js";import{M as P}from"./index.01VsD2h1.js";const s=[{description:"angry face",emoji:"😠",emoticons:[">:(",">:[",">:-(",">:-[",">=(",">=[",">=-(",">=-["],name:"angry",tags:["mad","annoyed"]},{description:"smiling face with smiling eyes",emoji:"😊",emoticons:[':")',':"]',':"D',':-")',':-"]',':-"D','=")','="]','="D','=-")','=-"]','=-"D'],name:"blush",tags:["proud"]},{description:"broken heart",emoji:"💔",emoticons:["<\\3","</3"],name:"broken_heart",tags:[]},{description:"confused face",emoji:"😕",emoticons:[":/",":\\",":-/",":-\\","=/","=\\","=-/","=-\\"],name:"confused",tags:[]},{description:"crying face",emoji:"😢",emoticons:[":,(",":,[",":,|",":,-(",":,-[",":,-|",":'(",":'[",":'|",":'-(",":'-[",":'-|","=,(","=,[","=,|","=,-(","=,-[","=,-|","='(","='[","='|","='-(","='-[","='-|","T-T"],name:"cry",tags:["sad","tear"]},{description:"frowning face with open mouth",emoji:"😦",emoticons:[":(",":[",":-(",":-[","=(","=[","=-(","=-["],name:"frowning",tags:[]},{description:"red heart",emoji:"❤️",emoticons:["<3"],name:"heart",tags:["love"]},{description:"angry face with horns",emoji:"👿",emoticons:["]:(","]:[","]:-(","]:-[","]=(","]=[","]=-(","]=-["],name:"imp",tags:["angry","devil","evil","horns"]},{description:"smiling face with halo",emoji:"😇",emoticons:["o:)","o:]","o:D","o:-)","o:-]","o:-D","o=)","o=]","o=D","o=-)","o=-]","o=-D","O:)","O:]","O:D","O:-)","O:-]","O:-D","O=)","O=]","O=D","O=-)","O=-]","O=-D","0:)","0:]","0:D","0:-)","0:-]","0:-D","0=)","0=]","0=D","0=-)","0=-]","0=-D"],name:"innocent",tags:["angel"]},{description:"face with tears of joy",emoji:"😂",emoticons:[":,)",":,]",":,D",":,-)",":,-]",":,-D",":')",":']",":'D",":'-)",":'-]",":'-D","=,)","=,]","=,D","=,-)","=,-]","=,-D","=')","=']","='D","='-)","='-]","='-D"],name:"joy",tags:["tears"]},{description:"kissing face",emoji:"😗",emoticons:[":*",":-*","=*","=-*"],name:"kissing",tags:[]},{description:"grinning squinting face",emoji:"😆",emoticons:["x)","x]","xD","x-)","x-]","x-D","X)","X]","X-)","X-]","X-D"],name:"laughing",tags:["happy","haha"]},{description:"man",emoji:"👨",emoticons:[":3",":-3","=3","=-3",";3",";-3","x3","x-3","X3","X-3"],name:"man",tags:["mustache","father","dad"]},{description:"neutral face",emoji:"😐",emoticons:[":|",":-|","=|","=-|"],name:"neutral_face",tags:["meh"]},{description:"face without mouth",emoji:"😶",emoticons:[":-"],name:"no_mouth",tags:["mute","silence"]},{description:"face with open mouth",emoji:"😮",emoticons:[":o",":O",":0",":-o",":-O",":-0","=o","=O","=0","=-o","=-O","=-0"],name:"open_mouth",tags:["surprise","impressed","wow"]},{description:"enraged face",emoji:"😡",emoticons:[":@",":-@","=@","=-@"],name:"rage",tags:["angry"]},{description:"grinning face with smiling eyes",emoji:"😄",emoticons:[":D",":-D","=D","=-D"],name:"smile",tags:["happy","joy","laugh","pleased"]},{description:"grinning face with big eyes",emoji:"😃",emoticons:[":)",":]",":-)",":-]","=)","=]","=-)","=-]"],name:"smiley",tags:["happy","joy","haha"]},{description:"smiling face with horns",emoji:"😈",emoticons:["]:)","]:]","]:D","]:-)","]:-]","]:-D","]=)","]=]","]=D","]=-)","]=-]","]=-D"],name:"smiling_imp",tags:["devil","evil","horns"]},{description:"loudly crying face",emoji:"😭",emoticons:[":,'(",":,'[",":,'-(",":,'-[",":',(",":',[",":',-(",":',-[","=,'(","=,'[","=,'-(","=,'-[","=',(","=',[","=',-(","=',-["],name:"sob",tags:["sad","cry","bawling"]},{description:"face with tongue",emoji:"😛",emoticons:[":p",":P",":d",":-p",":-P",":-d","=p","=P","=d","=-p","=-P","=-d"],name:"stuck_out_tongue",tags:[]},{description:"squinting face with tongue",emoji:"😝",emoticons:["xP","x-p","x-P","x-d","Xp","Xd","X-p","X-P","X-d"],name:"stuck_out_tongue_closed_eyes",tags:["prank"]},{description:"winking face with tongue",emoji:"😜",emoticons:[";p",";P",";d",";-p",";-P",";-d"],name:"stuck_out_tongue_winking_eye",tags:["prank","silly"]},{description:"smiling face with sunglasses",emoji:"😎",emoticons:["8)","8]","8D","8-)","8-]","8-D","B)","B]","B-)","B-]","B-D"],name:"sunglasses",tags:["cool"]},{description:"downcast face with sweat",emoji:"😓",emoticons:[",:(",",:[",",:-(",",:-[",",=(",",=[",",=-(",",=-[","':(","':[","':-(","':-[","'=(","'=[","'=-(","'=-["],name:"sweat",tags:[]},{description:"grinning face with sweat",emoji:"😅",emoticons:[",:)",",:]",",:D",",:-)",",:-]",",:-D",",=)",",=]",",=D",",=-)",",=-]",",=-D","':)","':]","':D","':-)","':-]","':-D","'=)","'=]","'=D","'=-)","'=-]","'=-D"],name:"sweat_smile",tags:["hot"]},{description:"unamused face",emoji:"😒",emoticons:[":$",":s",":z",":S",":Z",":-$",":-s",":-z",":-S",":-Z","=$","=s","=z","=S","=Z","=-$","=-s","=-z","=-S","=-Z"],name:"unamused",tags:["meh"]},{description:"winking face",emoji:"😉",emoticons:[";)",";]",";D",";-)",";-]",";-D"],name:"wink",tags:["flirt"]}],x=/:\+1:|:-1:|:[\w-]+:/g,b=/(^|\s)[@$|*'",;.=:\-)([\]\\/<>038BOopPsSdDxXzZ]{2,5}/g,k=/(?:_|-(?!1))/g,X={padSpaceAfter:!1,emoticon:!1,accessible:!1},T=f=>{const t=Object.assign({},X,f),r=!!t.padSpaceAfter,u=!!t.emoticon,g=!!t.accessible;function d(e,i){return{type:"text",value:e,data:{hName:"span",hProperties:{role:"img",ariaLabel:i},hChildren:[{type:"text",value:e}]}}}function D(e){const i=s.find(o=>o.emoticons.includes(e)),n=s.find(o=>o.emoticons.includes(e.slice(0,-1))),a=s.find(o=>o.emoticons.includes(e.slice(1))),c=s.find(o=>o.emoticons.includes(e.slice(1,-1))),m=i||n||a||c;if(!m)return!1;const w=!(i||a)&&(c||n)?e.slice(-1):"",y=!(i||n)&&(c||a)?e.slice(0,1):"",_=r?" ":"",l=y+m.emoji+_+w;return g?d(l,m.name+" emoticon"):l}function h(e){let i=O(e);if(typeof i>"u")return!1;if(r&&(i=i+" "),g){const n=e.slice(1,-1).replace(k," ")+" emoji";return d(i,n)}return i}const p=[[x,h]];u&&p.push([b,D]);function j(e){P(e,p)}return j};export{T as default};