streamlit-nightly 1.41.2.dev20250130__py2.py3-none-any.whl → 1.41.2.dev20250131__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. streamlit/elements/lib/utils.py +16 -0
  2. streamlit/elements/widgets/chat.py +159 -12
  3. streamlit/proto/ChatInput_pb2.py +6 -4
  4. streamlit/proto/ChatInput_pb2.pyi +27 -1
  5. streamlit/proto/Common_pb2.py +3 -1
  6. streamlit/proto/Common_pb2.pyi +24 -0
  7. streamlit/proto/WidgetStates_pb2.py +2 -2
  8. streamlit/proto/WidgetStates_pb2.pyi +7 -3
  9. streamlit/runtime/scriptrunner_utils/script_requests.py +2 -0
  10. streamlit/runtime/state/common.py +1 -0
  11. streamlit/runtime/state/session_state.py +6 -0
  12. streamlit/static/index.html +1 -1
  13. streamlit/static/static/js/{FileDownload.esm.BW2GD_iE.js → FileDownload.esm.Cf3bITtP.js} +1 -1
  14. streamlit/static/static/js/FileDropzone.B8wCqKiM.js +5 -0
  15. streamlit/static/static/js/{FormClearHelper.DZ1scmYc.js → FormClearHelper.BgwPD1tD.js} +1 -1
  16. streamlit/static/static/js/{Hooks.DPFxqsrt.js → Hooks.BMaXaj11.js} +1 -1
  17. streamlit/static/static/js/{InputInstructions.kmEglyPj.js → InputInstructions.qlsk9gvt.js} +1 -1
  18. streamlit/static/static/js/{ProgressBar.DlpiRykl.js → ProgressBar.Di2oT-20.js} +2 -2
  19. streamlit/static/static/js/{RenderInPortalIfExists.Io9TPjT5.js → RenderInPortalIfExists.Blpdplqk.js} +1 -1
  20. streamlit/static/static/js/{Toolbar.CsJK79V5.js → Toolbar.DMhyNpv2.js} +1 -1
  21. streamlit/static/static/js/{base-input.BUELT8YC.js → base-input.DyTEaESI.js} +4 -4
  22. streamlit/static/static/js/{createSuper.CborHI-x.js → createSuper.B3rIhdpQ.js} +1 -1
  23. streamlit/static/static/js/{data-grid-overlay-editor.BpRK_Fjy.js → data-grid-overlay-editor.C9Q9Gy4e.js} +1 -1
  24. streamlit/static/static/js/{downloader.BL7woS2R.js → downloader.BAMiKd1n.js} +1 -1
  25. streamlit/static/static/js/{es6.BLJirovP.js → es6.D82pr6dy.js} +2 -2
  26. streamlit/static/static/js/{iframeResizer.contentWindow.CsDiWEwe.js → iframeResizer.contentWindow.CJwxqR7x.js} +1 -1
  27. streamlit/static/static/js/{index.CZ_IlLc4.js → index.5JFTbX2J.js} +1 -1
  28. streamlit/static/static/js/{index.BcDqsbhj.js → index.8Q56Jjmk.js} +1 -1
  29. streamlit/static/static/js/{index.BnfnxD0E.js → index.B3Wxz7wG.js} +1 -1
  30. streamlit/static/static/js/{index.DqAa92Lj.js → index.B79cf7gS.js} +1 -1
  31. streamlit/static/static/js/{index.7ACWibTY.js → index.B7J6suR-.js} +59 -59
  32. streamlit/static/static/js/index.BBPZ3wsr.js +1 -0
  33. streamlit/static/static/js/{index.D1dEn4mm.js → index.BKahTKEx.js} +2 -2
  34. streamlit/static/static/js/{index.DkKHo5zC.js → index.BLCqXxIG.js} +1 -1
  35. streamlit/static/static/js/{index.C_NO_6ev.js → index.BM_J1KkD.js} +1 -1
  36. streamlit/static/static/js/{index.CozJANOl.js → index.BZvQkTCS.js} +1 -1
  37. streamlit/static/static/js/{index.DRX-oomt.js → index.BcAjRRAZ.js} +10 -10
  38. streamlit/static/static/js/{index.DBlRI9-8.js → index.BdEYCAFh.js} +1 -1
  39. streamlit/static/static/js/{index.DLNHCVdY.js → index.BdlaxG49.js} +1 -1
  40. streamlit/static/static/js/{index.DRw2m5d2.js → index.C4kPuKr4.js} +1 -1
  41. streamlit/static/static/js/{index.CsBE1tR7.js → index.CC5oiyoV.js} +2 -2
  42. streamlit/static/static/js/{index.DtJw0w2z.js → index.CF4stbIZ.js} +1 -1
  43. streamlit/static/static/js/{index.CUHtehzq.js → index.CSGfgCnQ.js} +1 -1
  44. streamlit/static/static/js/{index.BShMn81Q.js → index.CYMgsYSm.js} +1 -1
  45. streamlit/static/static/js/{index.HWM8Jo0D.js → index.CZjnqbcd.js} +1 -1
  46. streamlit/static/static/js/{index.8xuJfNGL.js → index.C_4BuzGH.js} +1 -1
  47. streamlit/static/static/js/{index.DUQzVbMl.js → index.CjFbbEE0.js} +1 -1
  48. streamlit/static/static/js/index.CjiPq39N.js +1 -0
  49. streamlit/static/static/js/{index.CuHtZ9Dm.js → index.CjuTYYFG.js} +1 -1
  50. streamlit/static/static/js/{index.Bkuwp1nX.js → index.CoE1gpPQ.js} +1 -1
  51. streamlit/static/static/js/{index.CJNFcs5M.js → index.CqGcWpm5.js} +2 -2
  52. streamlit/static/static/js/{index.BL_l30n0.js → index.CuH7mftz.js} +1 -1
  53. streamlit/static/static/js/{index.CmIDjHns.js → index.D9yF6cxC.js} +1 -1
  54. streamlit/static/static/js/{index.CQHr3YZb.js → index.DFJg1zHB.js} +1 -1
  55. streamlit/static/static/js/{index.GPnu42nG.js → index.DiZyaYeV.js} +3 -3
  56. streamlit/static/static/js/{index.Yz4zfxAi.js → index.Dm3nmdhh.js} +1 -1
  57. streamlit/static/static/js/{index.51fCwYSO.js → index.NbimJbgq.js} +5 -5
  58. streamlit/static/static/js/{index.CFagjgA1.js → index.P5kx9um8.js} +67 -67
  59. streamlit/static/static/js/{index.k2qCiWKR.js → index.TPHsScPF.js} +1 -1
  60. streamlit/static/static/js/{index.YT8U9SBb.js → index.Y84nTPW2.js} +1 -1
  61. streamlit/static/static/js/{index.CoZfJLg6.js → index.rrDohWOh.js} +1 -1
  62. streamlit/static/static/js/{index.BmCbxpl1.js → index.yp4f0OMe.js} +2 -2
  63. streamlit/static/static/js/{index.ChEJ9NpI.js → index.zlHOKWDA.js} +1 -1
  64. streamlit/static/static/js/{input.Cc_gque8.js → input.DRyjjTTH.js} +2 -2
  65. streamlit/static/static/js/{memory.dOywlvNB.js → memory.C98yjNkk.js} +1 -1
  66. streamlit/static/static/js/{mergeWith.B3UEYpBK.js → mergeWith.CLihEflw.js} +1 -1
  67. streamlit/static/static/js/{number-overlay-editor.vtZ5cHrO.js → number-overlay-editor.DozQhDJj.js} +1 -1
  68. streamlit/static/static/js/{possibleConstructorReturn.C28aC5bE.js → possibleConstructorReturn.DJ7-JsJc.js} +1 -1
  69. streamlit/static/static/js/{sandbox.Bu9R-BjJ.js → sandbox.0Tj4C46D.js} +1 -1
  70. streamlit/static/static/js/{textarea.BuehYUL9.js → textarea.CUrV8-V3.js} +2 -2
  71. streamlit/static/static/js/{timepicker.BoUQqla6.js → timepicker.DEu3fwJe.js} +4 -4
  72. streamlit/static/static/js/{toConsumableArray.1TsnLTQZ.js → toConsumableArray.C71OtXzK.js} +1 -1
  73. streamlit/static/static/js/{uniqueId.DWzkKvg-.js → uniqueId.CndDhnid.js} +1 -1
  74. streamlit/static/static/js/{useBasicWidgetState.S-yUfhr7.js → useBasicWidgetState.DXLMTaiS.js} +1 -1
  75. streamlit/static/static/js/{useOnInputChange.z9TKe1o4.js → useOnInputChange.CvHbHWmy.js} +1 -1
  76. streamlit/static/static/js/{withFullScreenWrapper.DNSRZFsQ.js → withFullScreenWrapper.BLLyDFUF.js} +1 -1
  77. {streamlit_nightly-1.41.2.dev20250130.dist-info → streamlit_nightly-1.41.2.dev20250131.dist-info}/METADATA +1 -1
  78. {streamlit_nightly-1.41.2.dev20250130.dist-info → streamlit_nightly-1.41.2.dev20250131.dist-info}/RECORD +82 -81
  79. streamlit/static/static/js/index.BB4dPXdd.js +0 -5
  80. streamlit/static/static/js/index.BrgcQXer.js +0 -1
  81. {streamlit_nightly-1.41.2.dev20250130.data → streamlit_nightly-1.41.2.dev20250131.data}/scripts/streamlit.cmd +0 -0
  82. {streamlit_nightly-1.41.2.dev20250130.dist-info → streamlit_nightly-1.41.2.dev20250131.dist-info}/WHEEL +0 -0
  83. {streamlit_nightly-1.41.2.dev20250130.dist-info → streamlit_nightly-1.41.2.dev20250131.dist-info}/entry_points.txt +0 -0
  84. {streamlit_nightly-1.41.2.dev20250130.dist-info → streamlit_nightly-1.41.2.dev20250131.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ import{r as l,E as R,_ as M,n as g,C as he,y as J,j as a,bd as q,bw as fe,z as I,br as Q,b9 as Z,bq as E,b3 as me,bH as ye,bI as S,bu as ve,aY as X,bl as Ce,bJ as Ie,J as L,F as G,bn as be,bm as we}from"./index.B7J6suR-.js";import{g as xe,F as Se,C as Fe,I as Ee,E as ze,u as Ue,a as He}from"./FileDropzone.B8wCqKiM.js";import{I as Te}from"./InputInstructions.qlsk9gvt.js";import{i as De}from"./inputUtils.CQWz5UKz.js";import{U as k}from"./UploadFileInfo.C-jY39rj.js";import{T as Le}from"./textarea.CUrV8-V3.js";import"./base-input.DyTEaESI.js";var ee=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(R,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ee.displayName="AttachFile";var te=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(R,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});te.displayName="ErrorOutline";var oe=l.forwardRef(function(e,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(R,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});oe.displayName="Send";const Be=g("div",{target:"epbvcmu0"})(({theme:e,width:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.transparent,borderRadius:e.radii.chatInput,display:"flex",backgroundColor:e.colors.widgetBackgroundColor??e.colors.secondaryBg,width:`${t}px`,overflow:"hidden",":focus-within":{borderColor:e.colors.primary},"&.dropzone":{borderColor:e.colors.primary,borderRadius:e.radii.full,height:e.sizes.emptyDropdownHeight}})),Ve=g("div",{target:"epbvcmu1"})(({theme:e})=>({position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:e.spacing.lg,gap:e.spacing.sm})),ke=g("button",{target:"epbvcmu2"})(({theme:e,disabled:t,extended:s})=>{const h=he(e),[y,p]=h?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40];return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:s?"0":e.radii.chatInput,borderTopLeftRadius:s?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:t?y:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:h?e.colors.gray10:e.colors.gray90},"&:hover":{color:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray}}}),Re=g("div",{target:"epbvcmu3"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),Me=g("div",{target:"epbvcmu4"})(({theme:e})=>({position:"absolute",bottom:"0px",right:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`})),Ne=g("div",{target:"e12v7o8j0"})(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",margin:"auto",height:"100%",width:"100%",color:e.colors.primary,fontWeight:e.fontWeights.bold})),Ae=g("div",{target:"e12v7o8j1"})(({})=>({display:"flex",alignItems:"top",height:"100%"})),$e=g("div",{target:"e12v7o8j2"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20})),je=g("div",{target:"e12v7o8j3"})(({theme:e})=>({left:0,right:0,border:`${e.sizes.borderWidth} solid ${e.colors.transparent}`,minHeight:e.sizes.minChatInputFileListHeight,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"})),Pe=g("div",{target:"e12v7o8j4"})(({})=>({display:"flex"})),We=g("div",{target:"e12v7o8j5"})(({})=>({flex:"0 0 auto"})),Oe=g("div",{target:"e12v7o8j6"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS})),Ke=g("div",{target:"e12v7o8j7"})(({theme:e})=>({color:e.colors.fadedText60})),_e=g("div",{target:"e12v7o8j8"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60})),Xe=g("div",{target:"e12v7o8j9"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60})),Ge=g("small",{target:"e12v7o8j10"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}));function Ye({children:e,content:t}){const s=J();return a(fe,{content:t,placement:q.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:e})}const Je=({fileInfo:e})=>{const{type:t}=e.status;switch(t){case"uploading":return a(ye,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return a(Ye,{content:e.status.errorMessage,children:a(E,{content:te,size:"lg"})});case"uploaded":return a(E,{content:Ee,size:"lg"});default:return me(t),null}},qe=({fileInfo:e,onDelete:t})=>I(Oe,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[a(Ke,{children:a(Je,{fileInfo:e})}),a(_e,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),a(Xe,{children:xe(e.size,Se.Byte)}),a(Ge,{"data-testid":"stChatInputDeleteBtn",children:a(Q,{onClick:()=>t(e.id),kind:Z.MINIMAL,children:a(E,{content:Fe,size:"lg"})})})]}),Qe=({items:e,onDelete:t})=>a(je,{"data-testid":"stChatUploadedFiles",children:a(Pe,{children:e.map(s=>a(We,{children:a(qe,{fileInfo:s,onDelete:t})},s.id))})}),Ze=({getRootProps:e,getInputProps:t,acceptFile:s,showDropzone:h,disabled:y,theme:p})=>h?I(Ne,{...e(),children:[a("input",{...t()}),"Drag and drop files here"]}):I(Ae,{children:[I("div",{"data-testid":"stChatInputFileUploadButton",...e(),children:[a("input",{...t()}),a(ve,{content:`Upload or drag and drop ${s===S.Multiple?"files":"a file"}`,placement:q.TOP,children:a(Q,{kind:Z.MINIMAL,disabled:y,children:a(E,{content:ee,size:"lg",color:p.colors.fadedText60})})})]}),a($e,{})]}),et=({getNextLocalFileId:e,addFiles:t,updateFile:s,uploadClient:h,element:y,onUploadProgress:p,onUploadComplete:f})=>(v,m)=>{const u=X.CancelToken.source(),d=new k(m.name,m.size,e(),{type:"uploading",cancelToken:u,progress:1});t([d]),h.uploadFile({formId:"",...y},v.uploadUrl,m,c=>p(c,d.id),u.token).then(()=>f(d.id,v)).catch(c=>{X.isCancel(c)||s(d.id,d.setStatus({type:"error",errorMessage:c?c.toString():"Unknown error"}))})},tt=({acceptMultipleFiles:e,uploadClient:t,uploadFile:s,addFiles:h,getNextLocalFileId:y,deleteExistingFiles:p,onUploadComplete:f})=>(v,m)=>{if(!e&&v.length===0&&m.length>1){const u=m.findIndex(d=>{var c;return((c=d.errors)==null?void 0:c[0].code)===ze.TooManyFiles});u>=0&&(v.push(m[u].file),m.splice(u,1))}if(!e&&v.length>0&&p(),t.fetchFileURLs(v).then(u=>{Ce(u,v).forEach(([d,c])=>{s(d,c)})}).catch(u=>{h(v.map(d=>new k(d.name,d.size,y(),{type:"error",errorMessage:u})))}),m.length>0){const u=m.map(d=>new k(d.file.name,d.file.size,y(),{type:"error",errorMessage:d.errors.map(c=>c.message).filter(c=>!!c).join(", ")}));h(u)}f()},ot=6.5,Y=1,B=(e,t,s)=>s.map(h=>h.id===e?t:h),V=(e,t)=>t.find(s=>s.id===e);function ct({width:e,element:t,widgetMgr:s,fragmentId:h,uploadClient:y}){const p=J(),f=l.useRef(null),v=l.useRef(0),m=l.useRef({minHeight:0,maxHeight:0}),[u,d]=l.useState(!1),[c,z]=l.useState(t.default),[U,N]=l.useState(0),[b,w]=l.useState([]),[F,H]=l.useState(!1),x=Ie(t.acceptFile),A=l.useCallback(o=>w(n=>[...n,...o]),[]),$=l.useCallback(o=>{w(n=>{const i=V(o,n);return L(i)?n:(i.status.type==="uploading"&&i.status.cancelToken.cancel(),i.status.type==="uploaded"&&i.status.fileUrls.deleteUrl&&y.deleteFile(i.status.fileUrls.deleteUrl),n.filter(r=>r.id!==o))})},[y]),ne=()=>{const o=b.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:r,status:C}=n,{fileId:ue,fileUrls:ge}=C;return new be({fileId:ue,fileUrls:ge,name:i,size:r})});return new we({uploadedFileInfo:o})},j=()=>v.current++,ae=tt({acceptMultipleFiles:x===S.Multiple,uploadClient:y,uploadFile:et({getNextLocalFileId:j,addFiles:A,updateFile:(o,n)=>{w(i=>B(o,n,i))},uploadClient:y,element:t,onUploadProgress:(o,n)=>{w(i=>{const r=V(n,i);if(L(r)||r.status.type!=="uploading")return i;const C=Math.round(o.loaded*100/o.total);return r.status.progress===C?i:B(n,r.setStatus({type:"uploading",cancelToken:r.status.cancelToken,progress:C}),i)})},onUploadComplete:(o,n)=>{w(i=>{const r=V(o,i);return L(r)||r.status.type!=="uploading"?i:B(r.id,r.setStatus({type:"uploaded",fileId:n.fileId,fileUrls:n}),i)})}}),addFiles:A,getNextLocalFileId:j,deleteExistingFiles:()=>b.forEach(o=>$(o.id)),onUploadComplete:()=>{f.current&&f.current.focus()}}),{getRootProps:re,getInputProps:ie}=Ue({onDrop:ae,multiple:x===S.Multiple,accept:He(t.fileType)}),se=()=>{let o=0;const{current:n}=f;if(n){const i=n.placeholder;n.placeholder="",n.style.height="auto",o=n.scrollHeight,n.placeholder=i,n.style.height=""}return o},P=()=>{if(f.current&&f.current.focus(),!u||t.disabled)return;const o={data:c,fileUploaderState:ne()};s.setChatInputValue(t,o,{fromUi:!0},h),d(!1),w([]),z(""),N(0)},le=o=>{const{metaKey:n,ctrlKey:i,shiftKey:r}=o;De(o)&&!r&&!i&&!n&&(o.preventDefault(),P())},de=o=>{const{value:n}=o.target,{maxChars:i}=t;i!==0&&n.length>i||(z(n),N(se()))};l.useEffect(()=>b.some(o=>o.status.type==="uploading")?d(!1):d(c!==""||b.length>0),[b,c]),l.useEffect(()=>{if(t.setValue){t.setValue=!1;const o=t.value||"";z(o)}},[t]),l.useEffect(()=>{if(f.current){const{offsetHeight:o}=f.current;m.current.minHeight=o,m.current.maxHeight=o*ot}},[f]),l.useEffect(()=>{const o=r=>{var C;r.preventDefault(),r.stopPropagation(),!F&&((C=r.dataTransfer)!=null&&C.types.includes("Files"))&&H(!0)},n=r=>{r.preventDefault(),r.stopPropagation(),F&&(r.clientX<=0&&r.clientY<=0||r.clientX>=window.innerWidth&&r.clientY>=window.innerHeight)&&H(!1)},i=r=>{r.preventDefault(),r.stopPropagation(),F&&H(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",i),window.addEventListener("dragleave",n),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",i),window.removeEventListener("dragleave",n)}},[F]);const{disabled:T,placeholder:W,maxChars:ce}=t,{minHeight:pe,maxHeight:O}=m.current,K=U>0&&f.current?Math.abs(U-pe)>Y:!1,D=x!==S.None&&F,_="stChatInput";return I(G,{children:[x===S.None?null:a(Qe,{items:[...b],onDelete:$}),a(Be,{className:D?`${_} dropzone`:_,"data-testid":"stChatInput",width:e,children:I(Ve,{children:[x===S.None?null:a(Ze,{getRootProps:re,getInputProps:ie,acceptFile:x,showDropzone:D,disabled:T,theme:p}),D?null:I(G,{children:[a(Le,{inputRef:f,value:c,placeholder:W,onChange:de,onKeyDown:le,"aria-label":W,disabled:T,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",border:"none"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:K?`${U+Y}px`:"auto",maxHeight:O?`${O}px`:"none",paddingLeft:p.spacing.none,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm,paddingRight:`calc(${p.iconSizes.xl} + 2 * ${p.spacing.sm} + ${p.spacing.sm})`}}}}),e>p.breakpoints.hideWidgetDetails&&a(Me,{children:a(Te,{dirty:u,value:c,maxLength:ce,type:"chat",inForm:!1})}),a(Re,{children:a(ke,{onClick:P,disabled:!u||T,extended:K,"data-testid":"stChatInputSubmitButton",children:a(E,{content:oe,size:"xl",color:"inherit"})})})]})]})})]})}export{ct as default};
@@ -1,3 +1,3 @@
1
- import{bw as P,bG as me,bx as R,r as u,y as ve,z as oe,j as O,bB as ye,bt as $e,bc as Re,bu as Oe,aE as ie,bs as _e}from"./index.7ACWibTY.js";import{a as Pe}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";var ae={vertical:"vertical",horizontal:"horizontal"};function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?se(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=0,L=1,T=2;function C(e){return e.$isActive?T:e.$isHovered?L:I}function we(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(C(e)){case I:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(C(e)){case I:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(C(e)){case I:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(C(e)){case I:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var K=P("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});K.displayName="RadioGroupRoot";K.displayName="RadioGroupRoot";var J=P("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",b=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},_(t,"margin".concat(b),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});J.displayName="Root";J.displayName="Root";var Q=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});Q.displayName="RadioMarkInner";Q.displayName="RadioMarkInner";var Y=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:we(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=P("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var ee=P("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});ee.displayName="Input";ee.displayName="Input";var te=P("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});te.displayName="Description";te.displayName="Description";function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e,t){if(e){if(typeof e=="string")return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function je(e,t,n){return t&&xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function De(e){var t=ze();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){Be(n,e);var t=De(n);function n(){var r;Ae(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),B(j(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),B(j(r),"handleFocus",function(a,c){me(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),B(j(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return je(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=R(s.RadioGroupRoot,K),c=Fe(a,2),b=c[0],m=c[1];return u.createElement(b,G({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},m),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(h){return o.handleBlur(h,f)},onFocus:function(h){return o.handleFocus(h,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);B(ce,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function q(e){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function k(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bx as P,bK as me,by as R,r as u,y as ve,z as oe,j as O,bC as ye,bu as $e,bd as Re,bv as Oe,aE as ie,bt as _e}from"./index.B7J6suR-.js";import{a as Pe}from"./useBasicWidgetState.DXLMTaiS.js";import"./FormClearHelper.BgwPD1tD.js";var ae={vertical:"vertical",horizontal:"horizontal"};function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?se(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=0,L=1,T=2;function C(e){return e.$isActive?T:e.$isHovered?L:I}function we(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(C(e)){case I:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(C(e)){case I:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(C(e)){case I:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(C(e)){case I:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var K=P("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});K.displayName="RadioGroupRoot";K.displayName="RadioGroupRoot";var J=P("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",b=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},_(t,"margin".concat(b),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});J.displayName="Root";J.displayName="Root";var Q=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});Q.displayName="RadioMarkInner";Q.displayName="RadioMarkInner";var Y=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:we(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=P("div",function(e){var t=e.$theme.typography;return B(B({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var ee=P("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});ee.displayName="Input";ee.displayName="Input";var te=P("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return B(B({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});te.displayName="Description";te.displayName="Description";function U(e){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(e)}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e,t){if(e){if(typeof e=="string")return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function je(e,t,n){return t&&xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Be(e){var t=ze();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){De(n,e);var t=Be(n);function n(){var r;Ae(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),D(j(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),D(j(r),"handleFocus",function(a,c){me(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),D(j(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return je(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=R(s.RadioGroupRoot,K),c=Fe(a,2),b=c[0],m=c[1];return u.createElement(b,G({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},m),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(h){return o.handleBlur(h,f)},onFocus:function(h){return o.handleFocus(h,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);D(ce,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function q(e){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function k(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ue(e){if(Array.isArray(e))return e}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t,n){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},X(e,t)}function Ke(e){var t=Qe();return function(){var r=H(e),o;if(t){var i=H(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},H(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},pe=function(e){Xe(n,e);var t=Ke(n);function n(){var r;Ge(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),E(F(r),"state",{isActive:!1,isHovered:!1}),E(F(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),E(F(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),E(F(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),E(F(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=R(i.Root,J),a=k(s,2),c=a[0],b=a[1],m=R(i.Label,Z),p=k(m,2),f=p[0],l=p[1],d=R(i.Input,ee),h=k(d,2),N=h[0],w=h[1],A=R(i.Description,te),x=k(A,2),S=x[0],V=x[1],v=R(i.RadioMarkInner,Q),g=k(v,2),y=g[0],fe=g[1],de=R(i.RadioMarkOuter,Y),re=k(de,2),he=re[0],be=re[1],M={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},ne=u.createElement(f,$({},M,l),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ge){return ge.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,b),Ye(this.props.labelPlacement)&&ne,u.createElement(he,$({},M,be),u.createElement(y,$({},M,fe))),u.createElement(N,$({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},M,w)),Ze(this.props.labelPlacement)&&ne),!!this.props.description&&u.createElement(S,$({},M,V),this.props.description))}}]),n}(u.Component);E(pe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt({disabled:e,horizontal:t,width:n,value:r,onChange:o,options:i,captions:s,label:a,labelVisibility:c,help:b}){const[m,p]=u.useState(r??null);u.useEffect(()=>{r!==m&&p(r??null)},[r]);const f=u.useCallback(v=>{const g=parseInt(v.target.value,10);p(g),o(g)},[o]),l=ve(),{colors:d,radii:h}=l,N={width:n},w=s.length>0,A=i.length>0,x=A?i:["No options to select."],S=e||!A,V=v=>v==""&&t&&w?"&nbsp;":v;return oe("div",{className:"stRadio","data-testid":"stRadio",style:N,children:[O(Oe,{label:a,disabled:S,labelVisibility:c,children:b&&O(ye,{children:O($e,{content:b,placement:Re.TOP_RIGHT})})}),O(ce,{onChange:f,value:m!==null?m.toString():void 0,disabled:S,align:t?ae.horizontal:ae.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:w?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:x.map((v,g)=>oe(pe,{value:g.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:w?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?d.darkenedBgMix25:"",borderTopLeftRadius:h.md,borderTopRightRadius:h.md,borderBottomLeftRadius:h.md,borderBottomRightRadius:h.md})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?d.primary:d.fadedText40})},RadioMarkInner:{style:({$checked:y})=>({height:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?d.fadedText40:d.bodyText,position:"relative",top:l.spacing.px}}},children:[O(ie,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),w&&O(ie,{source:V(s[g]),allowHTML:!1,isCaption:!0,isLabel:!0})]},g))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:n,width:r,fragmentId:o}){const[i,s]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:n,fragmentId:o}),a=u.useCallback(d=>{s({value:d,fromUi:!0})},[s]),{horizontal:c,options:b,captions:m,label:p,labelVisibility:f,help:l}=t;return O(rt,{label:p,onChange:a,options:b,captions:m,width:r,disabled:e,horizontal:c,labelVisibility:_e(f==null?void 0:f.value),value:i??null,help:l})}function ot(e,t){return e.getIntValue(t)}function it(e){return e.default??null}function at(e){return e.value??null}function st(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const ft=u.memo(nt);export{ft as default};
@@ -1,2 +1,2 @@
1
- import{r as re,j as ct,F as jt}from"./index.7ACWibTY.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gt,setPrototypeOf:ft,isFrozen:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:A,seal:O,create:ht}=Object,{apply:Ce,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(n){return n});O||(O=function(n){return n});Ce||(Ce=function(n,s,r){return n.apply(s,r)});Me||(Me=function(n,s){return new n(...s)});const se=L(Array.prototype.forEach),ut=L(Array.prototype.pop),$=L(Array.prototype.push),ce=L(String.prototype.toLowerCase),Oe=L(String.prototype.toString),mt=L(String.prototype.match),q=L(String.prototype.replace),Kt=L(String.prototype.indexOf),Zt=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),h=L(RegExp.prototype.test),K=Jt(TypeError);function L(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return Ce(a,n,r)}}function Jt(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Me(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ft&&ft(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const S=s(u);S!==u&&(Vt(n)||(n[r]=S),u=S)}a[u]=!0}return a}function Qt(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[s,r]of gt(a))y(a,s)&&(Array.isArray(r)?n[s]=Qt(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=x(r):n[s]=r);return n}function Z(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return L(r.get);if(typeof r.value=="function")return L(r.value)}a=$t(a)}function s(){return null}return s}const pt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),en=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),De=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),tn=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=A(["#text"]),Tt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ne=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=O(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=O(/<%[\w\W]*|[\w\W]*%>/gm),an=O(/\${[\w\W]*}/gm),rn=O(/^data-[\-\w.\u00B7-\uFFFF]/),sn=O(/^aria-[\-\w]+$/),At=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=O(/^(?:\w+script|data):/i),cn=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=O(/^html$/i),fn=O(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,MUSTACHE_EXPR:nn,ERB_EXPR:on,TMPLIT_EXPR:an,DATA_ATTR:rn,ARIA_ATTR:sn,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:cn,DOCTYPE_NAME:St,CUSTOM_ELEMENT:fn});const J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=function(){return typeof window>"u"?null:window},mn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const S="dompurify"+(r?"#"+r:"");try{return n.createPolicy(S,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const n=i=>Rt(i);if(n.version="3.1.7",n.removed=[],!a||!a.document||a.document.nodeType!==J.document)return n.isSupported=!1,n;let{document:s}=a;const r=s,u=r.currentScript,{DocumentFragment:S,HTMLTemplateElement:I,Node:P,Element:Pe,NodeFilter:W,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Ot,DOMParser:yt,trustedTypes:Q}=a,G=Pe.prototype,bt=Z(G,"cloneNode"),Dt=Z(G,"remove"),Nt=Z(G,"nextSibling"),It=Z(G,"childNodes"),ee=Z(G,"parentNode");if(typeof I=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,B="";const{implementation:fe,createNodeIterator:Ct,createDocumentFragment:Mt,getElementsByTagName:wt}=s,{importNode:xt}=r;let b={};n.isSupported=typeof gt=="function"&&typeof ee=="function"&&fe&&fe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Ut}=_t;let{IS_ALLOWED_URI:ve}=_t,m=null;const Ue=l({},[...pt,...ye,...be,...De,...dt]);let p=null;const Fe=l({},[...Tt,...Ne,...Et,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,de=null,He=!0,Te=!0,ze=!1,We=!0,k=!1,Ee=!0,w=!1,_e=!1,ge=!1,v=!1,te=!1,ne=!1,Ge=!0,Be=!1;const Ft="user-content-";let he=!0,X=!1,U={},F=null;const Ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ve=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let H=C,Se=!1,Re=null;const Ht=l({},[oe,ie,C],Oe);let j=null;const zt=["application/xhtml+xml","text/html"],Wt="text/html";let d=null,z=null;const Gt=s.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(z&&z===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),j=zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,d=j==="application/xhtml+xml"?Oe:ce,m=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Ue,p=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Fe,Re=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Oe):Ht,Ae=y(e,"ADD_URI_SAFE_ATTR")?l(x(Ve),e.ADD_URI_SAFE_ATTR,d):Ve,Xe=y(e,"ADD_DATA_URI_TAGS")?l(x(je),e.ADD_DATA_URI_TAGS,d):je,F=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ye,Y=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):{},de=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):{},U=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,We=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ge=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||At,H=e.NAMESPACE||C,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),k&&(Te=!1),te&&(v=!0),U&&(m=l({},dt),p=[],U.html===!0&&(l(m,pt),l(p,Tt)),U.svg===!0&&(l(m,ye),l(p,Ne),l(p,le)),U.svgFilters===!0&&(l(m,be),l(p,Ne),l(p,le)),U.mathMl===!0&&(l(m,De),l(p,Et),l(p,le))),e.ADD_TAGS&&(m===Ue&&(m=x(m)),l(m,e.ADD_TAGS,d)),e.ADD_ATTR&&(p===Fe&&(p=x(p)),l(p,e.ADD_ATTR,d)),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(F===Ye&&(F=x(F)),l(F,e.FORBID_CONTENTS,d)),he&&(m["#text"]=!0),w&&l(m,["html","head","body"]),m.table&&(l(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,B=_.createHTML("")}else _===void 0&&(_=mn(Q,u)),_!==null&&typeof B=="string"&&(B=_.createHTML(""));A&&A(e),z=e}},qe=l({},["mi","mo","mn","ms","mtext"]),Ke=l({},["annotation-xml"]),Bt=l({},["title","style","font","a","script"]),Ze=l({},[...ye,...be,...en]),Je=l({},[...De,...tn]),Yt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:H,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===C?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||qe[c]):!!Ze[o]:e.namespaceURI===oe?t.namespaceURI===C?o==="math":t.namespaceURI===ie?o==="math"&&Ke[c]:!!Je[o]:e.namespaceURI===C?t.namespaceURI===ie&&!Ke[c]||t.namespaceURI===oe&&!qe[c]?!1:!Je[o]&&(Bt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},D=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},ae=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!p[e])if(v||te)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(ge)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}j==="application/xhtml+xml"&&H===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(H===C)try{t=new yt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=fe.createDocument(H,"template",null);try{t.documentElement.innerHTML=Se?B:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),H===C?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Ct.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof Ot&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof P=="function"&&e instanceof P},M=function(e,t,o){b[e]&&se(b[e],c=>{c.call(n,t,o,z)})},ot=function(e){let t=null;if(M("beforeSanitizeElements",e,null),tt(e))return D(e),!0;const o=d(e.nodeName);if(M("uponSanitizeElement",e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===J.progressingInstruction||Ee&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&at(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!F[o]){const c=ee(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let R=T-1;R>=0;--R){const N=bt(E[R],!0);N.__removalCount=(e.__removalCount||0)+1,c.insertBefore(N,Nt(e))}}}return D(e),!0}return e instanceof Pe&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(k&&e.nodeType===J.text&&(t=e.textContent,se([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),M("afterSanitizeElements",e,null),!1)},it=function(e,t,o){if(Ge&&(t==="id"||t==="name")&&(o in s||o in Gt))return!1;if(!(Te&&!de[t]&&h(Pt,t))){if(!(He&&h(kt,t))){if(!p[t]||de[t]){if(!(at(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Ae[t]){if(!h(ve,q(o,ke,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Kt(o,"data:")===0&&Xe[e])){if(!(ze&&!h(vt,q(o,ke,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ut)},rt=function(e){M("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:R,value:N}=E,V=d(T);let g=T==="value"?N:Zt(N);if(o.attrName=V,o.attrValue=g,o.keepAttr=!0,o.forceKeepAttr=void 0,M("uponSanitizeAttribute",e,o),g=o.attrValue,o.forceKeepAttr||(ae(T,e),!o.keepAttr))continue;if(!We&&h(/\/>/i,g)){ae(T,e);continue}k&&se([ue,me,pe],lt=>{g=q(g,lt," ")});const st=d(e.nodeName);if(it(st,V,g)){if(Be&&(V==="id"||V==="name")&&(ae(T,e),g=Ft+g),Ee&&h(/((--!?|])>)|<\/(style|title)/i,g)){ae(T,e);continue}if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!R)switch(Q.getAttributeType(st,V)){case"TrustedHTML":{g=_.createHTML(g);break}case"TrustedScriptURL":{g=_.createScriptURL(g);break}}try{R?e.setAttributeNS(R,T,g):e.setAttribute(T,g),tt(e)?D(e):ut(n.removed)}catch{}}}M("afterSanitizeAttributes",e,null)},Xt=function i(e){let t=null;const o=et(e);for(M("beforeSanitizeShadowDOM",e,null);t=o.nextNode();)M("uponSanitizeShadowNode",t,null),!ot(t)&&(t.content instanceof S&&i(t.content),rt(t));M("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Se=!i,Se&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(_e||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const N=d(i.nodeName);if(!m[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof P)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!v&&!k&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=Qe(i),!t)return v?null:ne?B:""}t&&ge&&D(t.firstChild);const T=et(X?i:t);for(;c=T.nextNode();)ot(c)||(c.content instanceof S&&Xt(c.content),rt(c));if(X)return i;if(v){if(te)for(E=Mt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(p.shadowroot||p.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let R=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{r as re,j as ct,F as jt}from"./index.B7J6suR-.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gt,setPrototypeOf:ft,isFrozen:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:A,seal:O,create:ht}=Object,{apply:Ce,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(n){return n});O||(O=function(n){return n});Ce||(Ce=function(n,s,r){return n.apply(s,r)});Me||(Me=function(n,s){return new n(...s)});const se=L(Array.prototype.forEach),ut=L(Array.prototype.pop),$=L(Array.prototype.push),ce=L(String.prototype.toLowerCase),Oe=L(String.prototype.toString),mt=L(String.prototype.match),q=L(String.prototype.replace),Kt=L(String.prototype.indexOf),Zt=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),h=L(RegExp.prototype.test),K=Jt(TypeError);function L(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return Ce(a,n,r)}}function Jt(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Me(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ft&&ft(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const S=s(u);S!==u&&(Vt(n)||(n[r]=S),u=S)}a[u]=!0}return a}function Qt(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[s,r]of gt(a))y(a,s)&&(Array.isArray(r)?n[s]=Qt(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=x(r):n[s]=r);return n}function Z(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return L(r.get);if(typeof r.value=="function")return L(r.value)}a=$t(a)}function s(){return null}return s}const pt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),en=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),De=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),tn=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=A(["#text"]),Tt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ne=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=O(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=O(/<%[\w\W]*|[\w\W]*%>/gm),an=O(/\${[\w\W]*}/gm),rn=O(/^data-[\-\w.\u00B7-\uFFFF]/),sn=O(/^aria-[\-\w]+$/),At=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=O(/^(?:\w+script|data):/i),cn=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=O(/^html$/i),fn=O(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,MUSTACHE_EXPR:nn,ERB_EXPR:on,TMPLIT_EXPR:an,DATA_ATTR:rn,ARIA_ATTR:sn,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:cn,DOCTYPE_NAME:St,CUSTOM_ELEMENT:fn});const J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=function(){return typeof window>"u"?null:window},mn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const S="dompurify"+(r?"#"+r:"");try{return n.createPolicy(S,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const n=i=>Rt(i);if(n.version="3.1.7",n.removed=[],!a||!a.document||a.document.nodeType!==J.document)return n.isSupported=!1,n;let{document:s}=a;const r=s,u=r.currentScript,{DocumentFragment:S,HTMLTemplateElement:I,Node:P,Element:Pe,NodeFilter:W,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Ot,DOMParser:yt,trustedTypes:Q}=a,G=Pe.prototype,bt=Z(G,"cloneNode"),Dt=Z(G,"remove"),Nt=Z(G,"nextSibling"),It=Z(G,"childNodes"),ee=Z(G,"parentNode");if(typeof I=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,B="";const{implementation:fe,createNodeIterator:Ct,createDocumentFragment:Mt,getElementsByTagName:wt}=s,{importNode:xt}=r;let b={};n.isSupported=typeof gt=="function"&&typeof ee=="function"&&fe&&fe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Ut}=_t;let{IS_ALLOWED_URI:ve}=_t,m=null;const Ue=l({},[...pt,...ye,...be,...De,...dt]);let p=null;const Fe=l({},[...Tt,...Ne,...Et,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,de=null,He=!0,Te=!0,ze=!1,We=!0,k=!1,Ee=!0,w=!1,_e=!1,ge=!1,v=!1,te=!1,ne=!1,Ge=!0,Be=!1;const Ft="user-content-";let he=!0,X=!1,U={},F=null;const Ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ve=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let H=C,Se=!1,Re=null;const Ht=l({},[oe,ie,C],Oe);let j=null;const zt=["application/xhtml+xml","text/html"],Wt="text/html";let d=null,z=null;const Gt=s.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(z&&z===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),j=zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,d=j==="application/xhtml+xml"?Oe:ce,m=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Ue,p=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Fe,Re=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Oe):Ht,Ae=y(e,"ADD_URI_SAFE_ATTR")?l(x(Ve),e.ADD_URI_SAFE_ATTR,d):Ve,Xe=y(e,"ADD_DATA_URI_TAGS")?l(x(je),e.ADD_DATA_URI_TAGS,d):je,F=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ye,Y=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):{},de=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):{},U=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,We=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ge=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||At,H=e.NAMESPACE||C,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),k&&(Te=!1),te&&(v=!0),U&&(m=l({},dt),p=[],U.html===!0&&(l(m,pt),l(p,Tt)),U.svg===!0&&(l(m,ye),l(p,Ne),l(p,le)),U.svgFilters===!0&&(l(m,be),l(p,Ne),l(p,le)),U.mathMl===!0&&(l(m,De),l(p,Et),l(p,le))),e.ADD_TAGS&&(m===Ue&&(m=x(m)),l(m,e.ADD_TAGS,d)),e.ADD_ATTR&&(p===Fe&&(p=x(p)),l(p,e.ADD_ATTR,d)),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(F===Ye&&(F=x(F)),l(F,e.FORBID_CONTENTS,d)),he&&(m["#text"]=!0),w&&l(m,["html","head","body"]),m.table&&(l(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,B=_.createHTML("")}else _===void 0&&(_=mn(Q,u)),_!==null&&typeof B=="string"&&(B=_.createHTML(""));A&&A(e),z=e}},qe=l({},["mi","mo","mn","ms","mtext"]),Ke=l({},["annotation-xml"]),Bt=l({},["title","style","font","a","script"]),Ze=l({},[...ye,...be,...en]),Je=l({},[...De,...tn]),Yt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:H,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===C?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||qe[c]):!!Ze[o]:e.namespaceURI===oe?t.namespaceURI===C?o==="math":t.namespaceURI===ie?o==="math"&&Ke[c]:!!Je[o]:e.namespaceURI===C?t.namespaceURI===ie&&!Ke[c]||t.namespaceURI===oe&&!qe[c]?!1:!Je[o]&&(Bt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},D=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},ae=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!p[e])if(v||te)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(ge)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}j==="application/xhtml+xml"&&H===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(H===C)try{t=new yt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=fe.createDocument(H,"template",null);try{t.documentElement.innerHTML=Se?B:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),H===C?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Ct.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof Ot&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof P=="function"&&e instanceof P},M=function(e,t,o){b[e]&&se(b[e],c=>{c.call(n,t,o,z)})},ot=function(e){let t=null;if(M("beforeSanitizeElements",e,null),tt(e))return D(e),!0;const o=d(e.nodeName);if(M("uponSanitizeElement",e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===J.progressingInstruction||Ee&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&at(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!F[o]){const c=ee(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let R=T-1;R>=0;--R){const N=bt(E[R],!0);N.__removalCount=(e.__removalCount||0)+1,c.insertBefore(N,Nt(e))}}}return D(e),!0}return e instanceof Pe&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(k&&e.nodeType===J.text&&(t=e.textContent,se([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),M("afterSanitizeElements",e,null),!1)},it=function(e,t,o){if(Ge&&(t==="id"||t==="name")&&(o in s||o in Gt))return!1;if(!(Te&&!de[t]&&h(Pt,t))){if(!(He&&h(kt,t))){if(!p[t]||de[t]){if(!(at(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Ae[t]){if(!h(ve,q(o,ke,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Kt(o,"data:")===0&&Xe[e])){if(!(ze&&!h(vt,q(o,ke,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ut)},rt=function(e){M("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:R,value:N}=E,V=d(T);let g=T==="value"?N:Zt(N);if(o.attrName=V,o.attrValue=g,o.keepAttr=!0,o.forceKeepAttr=void 0,M("uponSanitizeAttribute",e,o),g=o.attrValue,o.forceKeepAttr||(ae(T,e),!o.keepAttr))continue;if(!We&&h(/\/>/i,g)){ae(T,e);continue}k&&se([ue,me,pe],lt=>{g=q(g,lt," ")});const st=d(e.nodeName);if(it(st,V,g)){if(Be&&(V==="id"||V==="name")&&(ae(T,e),g=Ft+g),Ee&&h(/((--!?|])>)|<\/(style|title)/i,g)){ae(T,e);continue}if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!R)switch(Q.getAttributeType(st,V)){case"TrustedHTML":{g=_.createHTML(g);break}case"TrustedScriptURL":{g=_.createScriptURL(g);break}}try{R?e.setAttributeNS(R,T,g):e.setAttribute(T,g),tt(e)?D(e):ut(n.removed)}catch{}}}M("afterSanitizeAttributes",e,null)},Xt=function i(e){let t=null;const o=et(e);for(M("beforeSanitizeShadowDOM",e,null);t=o.nextNode();)M("uponSanitizeShadowNode",t,null),!ot(t)&&(t.content instanceof S&&i(t.content),rt(t));M("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Se=!i,Se&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(_e||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const N=d(i.nodeName);if(!m[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof P)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!v&&!k&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=Qe(i),!t)return v?null:ne?B:""}t&&ge&&D(t.firstChild);const T=et(X?i:t);for(;c=T.nextNode();)ot(c)||(c.content instanceof S&&Xt(c.content),rt(c));if(X)return i;if(v){if(te)for(E=Mt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(p.shadowroot||p.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let R=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+R),k&&se([ue,me,pe],N=>{R=q(R,N," ")}),_&&ne?_.createHTML(R):R},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),_e=!0},n.clearConfig=function(){z=null,_e=!1},n.isValidAttribute=function(i,e,t){z||Le({});const o=d(i),c=d(e);return it(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&(b[i]=b[i]||[],$(b[i],e))},n.removeHook=function(i){if(b[i])return ut(b[i])},n.removeHooks=function(i){b[i]&&(b[i]=[])},n.removeAllHooks=function(){b={}},n}var xe=Rt();const we="data-temp-href-target";xe.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(we,"_blank")});xe.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(we)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(we))});const Ie=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return xe.sanitize(a,n)};function dn({element:a,width:n}){const{body:s}=a,[r,u]=re.useState(Ie(s)),S=re.useRef(null);return re.useEffect(()=>{Ie(s)!==r&&u(Ie(s))},[s]),re.useEffect(()=>{var I,P;((I=S.current)==null?void 0:I.clientHeight)===0&&((P=S.current.parentElement)==null?void 0:P.childElementCount)===1&&S.current.parentElement.classList.add("stHtml-empty")}),ct(jt,{children:r&&ct("div",{className:"stHtml","data-testid":"stHtml",ref:S,style:{width:n},dangerouslySetInnerHTML:{__html:r}})})}export{dn as default};
@@ -1,4 +1,4 @@
1
- import{ay as J6,n as Q6,aH as ga,aI as Od,az as jn,aJ as Z6,aK as eL,aL as dE,aM as tL,K as nL,y as iL,r as xt,J as Hy,g as rL,a5 as oL,ah as sL,ad as hE,ae as pE,O as aL,al as Mk,aN as uL,M as gE,aC as mE,z as lL,j as hm,aO as cL}from"./index.7ACWibTY.js";import{S as yE,T as fL}from"./Toolbar.CsJK79V5.js";import{u as Dk,E as Ok,w as dL}from"./withFullScreenWrapper.DNSRZFsQ.js";import{m as hL}from"./mergeWith.B3UEYpBK.js";import{a as rc,n as pL,b as gL,c as up,t as Os,p as mL,d as yL,e as bL,i as Wo,f as lp,g as bE,l as ku,h as Gy,j as cp,k as vE,m as po,o as Va,q as vL,r as qo,s as xL,u as wL,v as EL,w as SL}from"./threshold.B8r8f5kt.js";import{f as _L,a as z0,b as Rk,c as $L,d as Vy,e as Xy,R as fp,C as Yy,r as Nk,g as xE,h as wE,i as dp,j as I0,n as zt,k as Oc,l as AL,m as kL,o as CL,p as FL,q as TL,s as ML,t as DL,u as OL,v as RL,w as NL,x as LL,y as Rd}from"./value.iufjd77T.js";import{P as PL,i as zL,a as IL,b as BL,p as Ky,n as UL,T as jL,t as WL,d as qL}from"./timer.RueuYoQV.js";import{u as HL}from"./FormClearHelper.DZ1scmYc.js";const GL=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:J6(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.popup,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),VL=Q6("div",{target:"e1xm3y80"})(({theme:e,useContainerWidth:t,isFullScreen:n})=>({width:t||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,zIndex:e.zIndices.popup,top:`calc(${e.iconSizes.md} + 2 * ${e.spacing.xs} + ${e.spacing.xs})`,right:0,backgroundColor:e.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${e.sizes.borderWidth} solid ${e.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:e.radii.default,a:{fontFamily:e.genericFonts.bodyFont,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,margin:0,padding:`${e.spacing.twoXS} ${e.spacing.twoXL}`,color:e.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:e.colors.secondaryBg,color:e.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",cursor:"pointer",display:"list-item",padding:e.spacing.xs,height:"auto",zIndex:e.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:e.radii.default,color:e.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:e.colors.bodyText,opacity:"1 !important",background:e.colors.darkenedBgMix25},svg:{width:e.iconSizes.md,height:e.iconSizes.md}}}}));function EE(e,t){const n={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.mdPx,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:ga(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:ga(t),titleFontStyle:"normal",ticks:!1,gridColor:Od(t),domain:!1,domainWidth:1,domainColor:Od(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:jn(t.spacing.lg),labelPadding:jn(t.spacing.lg),labelSeparation:jn(t.spacing.twoXS),labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:ga(t),titlePadding:5,labelPadding:jn(t.spacing.lg),columnPadding:jn(t.spacing.sm),rowPadding:jn(t.spacing.twoXS),padding:7,symbolStrokeWidth:jn(t.spacing.twoXS)},range:{category:Z6(t),diverging:eL(t),ramp:dE(t),heatmap:dE(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:jn(t.sizes.defaultChartHeight),continuousWidth:jn(t.sizes.defaultChartWidth)},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,color:tL(t)},bar:{binSpacing:jn(t.spacing.twoXS),discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?hL({},n,e,(i,r)=>Array.isArray(r)?r:void 0):n}function XL(e,t){const{colors:n,fontSizes:i,genericFonts:r}=t,o={labelFont:r.bodyFont,titleFont:r.bodyFont,labelFontSize:i.twoSmPx,titleFontSize:i.twoSmPx},s={background:n.bgColor,axis:{labelColor:n.bodyText,titleColor:n.bodyText,gridColor:Od(t),...o},legend:{labelColor:n.bodyText,titleColor:n.bodyText,...o},title:{color:n.bodyText,subtitleColor:n.bodyText,...o},header:{labelColor:n.bodyText,titleColor:n.bodyText,...o},view:{stroke:Od(t),continuousHeight:jn(t.sizes.defaultChartHeight),continuousWidth:jn(t.sizes.defaultChartWidth)},mark:{tooltip:!0}};return e?nL({},s,e):s}const YL=20;function KL(e){"params"in e&&"encoding"in e&&e.params.forEach(t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&t.select.type==="point"&&!("encodings"in t.select)&&Hy(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))})}const JL=(e,t,n,i,r,o,s,a)=>{var l,c;const u=JSON.parse(e);if(n==="streamlit"?u.config=EE(u.config,r):((c=(l=u.usermeta)==null?void 0:l.embedOptions)==null?void 0:c.theme)==="streamlit"?(u.config=EE(u.config,r),u.usermeta.embedOptions.theme=void 0):u.config=XL(u.config,r),o?(u.width=s,u.height=a,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})):t&&(u.width=s,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})),u.padding||(u.padding={}),Hy(u.padding.bottom)&&(u.padding.bottom=YL),u.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.length>0&&KL(u),u},QL=e=>{const t=iL(),{expanded:n,width:i,height:r}=Dk(Ok),{id:o,formId:s,spec:a,data:u,datasets:l,useContainerWidth:c,vegaLiteTheme:f,selectionMode:d}=e,h=xt.useMemo(()=>d,[JSON.stringify(d)]),p=xt.useMemo(()=>JL(a,c,f,h,t,n,i,r),[a,c,f,h,t,n,i,r]);return{id:o,formId:s,vegaLiteTheme:f,spec:p,selectionMode:h,data:u,datasets:l,useContainerWidth:c}};function Sn(e,t,n){return e.fields=t||[],e.fname=n,e}function Je(e){return e==null?null:e.fname}function Ut(e){return e==null?null:e.fields}function Lk(e){return e.length===1?ZL(e[0]):eP(e)}const ZL=e=>function(t){return t[e]},eP=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function N(e){throw Error(e)}function ur(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||N("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&N("Access path missing closing bracket: "+e),i&&N("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Jn(e,t,n){const i=ur(e);return e=i.length===1?i[0]:e,Sn((n&&n.get||Lk)(i),[e],t||e)}const Rc=Jn("id"),Ht=Sn(e=>e,[],"identity"),ho=Sn(()=>0,[],"zero"),Cu=Sn(()=>1,[],"one"),Nn=Sn(()=>!0,[],"true"),ro=Sn(()=>!1,[],"false");function tP(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const Pk=0,Jy=1,Qy=2,zk=3,Ik=4;function Zy(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tP,i=e||Pk;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Jy&&n(t||"error","ERROR",arguments),this},warn(){return i>=Qy&&n(t||"warn","WARN",arguments),this},info(){return i>=zk&&n(t||"log","INFO",arguments),this},debug(){return i>=Ik&&n(t||"log","DEBUG",arguments),this}}}var L=Array.isArray;function X(e){return e===Object(e)}const SE=e=>e!=="__proto__";function Fu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=nP(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;Tu(i,o,r[o],s)}return i},{})}function Tu(e,t,n,i){if(!SE(t))return;let r,o;if(X(n)&&!L(n)){o=X(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?Tu(o,r,n[r]):SE(r)&&(o[r]=n[r])}else e[t]=n}function nP(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function xe(e){return e[e.length-1]}function It(e){return e==null||e===""?null:+e}const Bk=e=>t=>e*Math.exp(t),Uk=e=>t=>Math.log(e*t),jk=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Wk=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Nd=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function hp(e,t,n,i){const r=n(e[0]),o=n(xe(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function qk(e,t){return hp(e,t,It,Ht)}function Hk(e,t){var n=Math.sign(e[0]);return hp(e,t,Uk(n),Bk(n))}function Gk(e,t,n){return hp(e,t,Nd(n),Nd(1/n))}function Vk(e,t,n){return hp(e,t,jk(n),Wk(n))}function pp(e,t,n,i,r){const o=i(e[0]),s=i(xe(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function eb(e,t,n){return pp(e,t,n,It,Ht)}function tb(e,t,n){const i=Math.sign(e[0]);return pp(e,t,n,Uk(i),Bk(i))}function Ld(e,t,n,i){return pp(e,t,n,Nd(i),Nd(1/i))}function nb(e,t,n,i){return pp(e,t,n,jk(i),Wk(i))}function Xk(e){return 1+~~(new Date(e).getMonth()/3)}function Yk(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Y(e){return e!=null?L(e)?e:[e]:[]}function Kk(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function fe(e){return typeof e=="function"}const iP="descending";function ib(e,t,n){n=n||{},t=Y(t)||[];const i=[],r=[],o={},s=n.comparator||rP;return Y(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===iP?-1:1),r.push(a=fe(a)?a:Jn(a,null,n)),(Ut(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:Sn(s(r,i),Object.keys(o))}const gp=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),rP=(e,t)=>e.length===1?oP(e[0],t[0]):sP(e,t,e.length),oP=(e,t)=>function(n,i){return gp(e(n),e(i))*t},sP=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=gp(o(i),o(r));return s*t[a]});function Gt(e){return fe(e)?e:()=>e}function rb(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function ce(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function Zi(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function Jk(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}const aP=Object.prototype.hasOwnProperty;function J(e,t){return aP.call(e,t)}const $f={};function Mu(e){let t={},n;function i(o){return J(t,o)&&t[o]!==$f}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===$f&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=$f),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==$f&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function Qk(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=xe(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function G(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),ce(i,n)}function Ma(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function Ho(e){return typeof e=="boolean"}function _o(e){return Object.prototype.toString.call(e)==="[object Date]"}function Zk(e){return e&&fe(e[Symbol.iterator])}function $e(e){return typeof e=="number"}function eC(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function K(e){return typeof e=="string"}function ob(e,t,n){e&&(e=t?Y(e).map(a=>a.replace(/\\(.)/g,"$1")):Y(e));const i=e&&e.length,r=n&&n.get||Lk,o=a=>r(t?[a]:ur(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return Sn(s,e,"key")}function tC(e,t){const n=e[0],i=xe(e),r=+t;return r?r===1?i:n+r*(i-n):n}const uP=1e4;function nC(e){e=+e||uP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>J(t,s)||J(n,s),get:s=>J(t,s)?t[s]:J(n,s)?o(s,n[s]):void 0,set:(s,a)=>J(t,s)?t[s]=a:o(s,a)}}function iC(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function El(e,t){let n="";for(;--t>=0;)n+=e;return n}function rC(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?El(r,s)+o:i==="center"?El(r,~~(s/2))+o+El(r,Math.ceil(s/2)):o+El(r,s)}function Nc(e){return e&&xe(e)-e[0]||0}function H(e){return L(e)?"["+e.map(H)+"]":X(e)||K(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function sb(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const lP=e=>$e(e)||_o(e)?e:Date.parse(e);function ab(e,t){return t=t||lP,e==null||e===""?null:t(e)}function ub(e){return e==null||e===""?null:e+""}function vi(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function oC(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function ao(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}var _E={},pm={},gm=34,Qu=10,mm=13;function sC(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function cP(e,t){var n=sC(e);return function(i,r){return t(n(i),r,e)}}function $E(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function fn(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function fP(e){return e<0?"-"+fn(-e,6):e>9999?"+"+fn(e,6):fn(e,4)}function dP(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":fP(e.getUTCFullYear())+"-"+fn(e.getUTCMonth()+1,2)+"-"+fn(e.getUTCDate(),2)+(r?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"."+fn(r,3)+"Z":i?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"Z":n||t?"T"+fn(t,2)+":"+fn(n,2)+"Z":"")}function hP(e){var t=new RegExp('["'+e+`
1
+ import{ay as J6,n as Q6,aH as ga,aI as Od,az as jn,aJ as Z6,aK as eL,aL as dE,aM as tL,K as nL,y as iL,r as xt,J as Hy,g as rL,a5 as oL,ah as sL,ad as hE,ae as pE,O as aL,al as Mk,aN as uL,M as gE,aC as mE,z as lL,j as hm,aO as cL}from"./index.B7J6suR-.js";import{S as yE,T as fL}from"./Toolbar.DMhyNpv2.js";import{u as Dk,E as Ok,w as dL}from"./withFullScreenWrapper.BLLyDFUF.js";import{m as hL}from"./mergeWith.CLihEflw.js";import{a as rc,n as pL,b as gL,c as up,t as Os,p as mL,d as yL,e as bL,i as Wo,f as lp,g as bE,l as ku,h as Gy,j as cp,k as vE,m as po,o as Va,q as vL,r as qo,s as xL,u as wL,v as EL,w as SL}from"./threshold.B8r8f5kt.js";import{f as _L,a as z0,b as Rk,c as $L,d as Vy,e as Xy,R as fp,C as Yy,r as Nk,g as xE,h as wE,i as dp,j as I0,n as zt,k as Oc,l as AL,m as kL,o as CL,p as FL,q as TL,s as ML,t as DL,u as OL,v as RL,w as NL,x as LL,y as Rd}from"./value.iufjd77T.js";import{P as PL,i as zL,a as IL,b as BL,p as Ky,n as UL,T as jL,t as WL,d as qL}from"./timer.RueuYoQV.js";import{u as HL}from"./FormClearHelper.BgwPD1tD.js";const GL=e=>({"#vg-tooltip-element":{visibility:"hidden",position:"fixed",fontFamily:e.genericFonts.bodyFont,color:e.colors.bodyText,border:`${e.sizes.borderWidth} solid ${e.colors.borderColor}`,backgroundColor:J6(e.colors.bgColor,.05),fontSize:e.fontSizes.twoSm,boxShadow:"rgb(0 0 0 / 16%) 0px 1px 4px",maxWidth:e.sizes.maxChartTooltipWidth,padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radii.default,zIndex:e.zIndices.popup,"&.visible":{visibility:"visible"},h2:{marginTop:e.spacing.none,marginBottom:e.spacing.sm,fontSize:e.fontSizes.sm},td:{border:"none"},table:{borderSpacing:0,tr:{border:"none",td:{overflow:"hidden",textOverflow:"ellipsis",paddingTop:e.spacing.threeXS,paddingBottom:e.spacing.threeXS},"td.key":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.4)`,textAlign:"right",color:e.colors.fadedText60,whiteSpace:"nowrap",paddingRight:e.spacing.twoXS},"td.value":{maxWidth:`calc((${e.sizes.maxChartTooltipWidth} - 2 * ${e.spacing.md}) * 0.6)`,textAlign:"left",display:"-webkit-box",WebkitLineClamp:"5",WebkitBoxOrient:"vertical",lineClamp:"5",wordWrap:"break-word"}}}}}),VL=Q6("div",{target:"e1xm3y80"})(({theme:e,useContainerWidth:t,isFullScreen:n})=>({width:t||n?"100%":"auto",height:n?"100%":"auto","&.vega-embed":{position:"relative",display:"inline-block",boxSizing:"border-box","details:not([open]) > :not(summary)":{display:"none !important"},"details[open] summary":{opacity:.7},"&:hover summary, .vega-embed:focus summary":{background:"transparent"},"&:hover summary, &:focus-within summary":{opacity:"1 !important",transition:"opacity 0.2s ease"},"&.has-actions":{paddingRight:0},".vega-actions":{position:"absolute",display:"flex",flexDirection:"column",paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm,zIndex:e.zIndices.popup,top:`calc(${e.iconSizes.md} + 2 * ${e.spacing.xs} + ${e.spacing.xs})`,right:0,backgroundColor:e.colors.bgColor,boxShadow:"rgb(0 0 0 / 16%) 0px 4px 16px",border:`${e.sizes.borderWidth} solid ${e.colors.fadedText10}`,animationDuration:"0.15s",animationName:"scale-in",animationTimingFunction:"cubic-bezier(0.2, 0, 0.13, 1.5)",textAlign:"left",borderRadius:e.radii.default,a:{fontFamily:e.genericFonts.bodyFont,fontWeight:e.fontWeights.normal,fontSize:e.fontSizes.md,margin:0,padding:`${e.spacing.twoXS} ${e.spacing.twoXL}`,color:e.colors.bodyText,whiteSpace:"nowrap",textDecoration:"none"},"a:hover, a:focus":{backgroundColor:e.colors.secondaryBg,color:e.colors.bodyText},":before":{content:"none"},":after":{content:"none"}},"@keyframes scale-in":{from:{opacity:0,transform:"scale(0.6)"},to:{opacity:1,transform:"scale(1)"}},".chart-wrapper":{"&.fit-x":{width:"100%"},"&.fit-y":{height:"100%"}},summary:{position:"absolute",top:0,right:0,opacity:0,listStyle:"none",cursor:"pointer",display:"list-item",padding:e.spacing.xs,height:"auto",zIndex:e.zIndices.menuButton,border:"none",boxShadow:"none",borderRadius:e.radii.default,color:e.colors.fadedText10,backgroundColor:"transparent",transition:"opacity 300ms 150ms,transform 300ms 150ms",lineHeight:0,"&::-webkit-details-marker":{display:"none"},"&:active, &:focus-visible, &:hover":{border:"none",boxShadow:"none",color:e.colors.bodyText,opacity:"1 !important",background:e.colors.darkenedBgMix25},svg:{width:e.iconSizes.md,height:e.iconSizes.md}}}}));function EE(e,t){const n={font:t.genericFonts.bodyFont,background:t.colors.bgColor,fieldTitle:"verbal",autosize:{type:"fit",contains:"padding"},title:{align:"left",anchor:"start",color:t.colors.headingColor,titleFontStyle:"normal",fontWeight:t.fontWeights.bold,fontSize:t.fontSizes.mdPx,orient:"top",offset:26},header:{titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.mdPx,titleColor:ga(t),titleFontStyle:"normal",labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),labelFontStyle:"normal"},axis:{labelFontSize:t.fontSizes.twoSmPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),labelFontStyle:"normal",titleFontWeight:t.fontWeights.normal,titleFontSize:t.fontSizes.smPx,titleColor:ga(t),titleFontStyle:"normal",ticks:!1,gridColor:Od(t),domain:!1,domainWidth:1,domainColor:Od(t),labelFlush:!0,labelFlushOffset:1,labelBound:!1,labelLimit:100,titlePadding:jn(t.spacing.lg),labelPadding:jn(t.spacing.lg),labelSeparation:jn(t.spacing.twoXS),labelOverlap:!0},legend:{labelFontSize:t.fontSizes.smPx,labelFontWeight:t.fontWeights.normal,labelColor:ga(t),titleFontSize:t.fontSizes.smPx,titleFontWeight:t.fontWeights.normal,titleFontStyle:"normal",titleColor:ga(t),titlePadding:5,labelPadding:jn(t.spacing.lg),columnPadding:jn(t.spacing.sm),rowPadding:jn(t.spacing.twoXS),padding:7,symbolStrokeWidth:jn(t.spacing.twoXS)},range:{category:Z6(t),diverging:eL(t),ramp:dE(t),heatmap:dE(t)},view:{columns:1,strokeWidth:0,stroke:"transparent",continuousHeight:jn(t.sizes.defaultChartHeight),continuousWidth:jn(t.sizes.defaultChartWidth)},concat:{columns:1},facet:{columns:1},mark:{tooltip:!0,color:tL(t)},bar:{binSpacing:jn(t.spacing.twoXS),discreteBandSize:{band:.85}},axisDiscrete:{grid:!1},axisXPoint:{grid:!1},axisTemporal:{grid:!1},axisXBand:{grid:!1}};return e?hL({},n,e,(i,r)=>Array.isArray(r)?r:void 0):n}function XL(e,t){const{colors:n,fontSizes:i,genericFonts:r}=t,o={labelFont:r.bodyFont,titleFont:r.bodyFont,labelFontSize:i.twoSmPx,titleFontSize:i.twoSmPx},s={background:n.bgColor,axis:{labelColor:n.bodyText,titleColor:n.bodyText,gridColor:Od(t),...o},legend:{labelColor:n.bodyText,titleColor:n.bodyText,...o},title:{color:n.bodyText,subtitleColor:n.bodyText,...o},header:{labelColor:n.bodyText,titleColor:n.bodyText,...o},view:{stroke:Od(t),continuousHeight:jn(t.sizes.defaultChartHeight),continuousWidth:jn(t.sizes.defaultChartWidth)},mark:{tooltip:!0}};return e?nL({},s,e):s}const YL=20;function KL(e){"params"in e&&"encoding"in e&&e.params.forEach(t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&t.select.type==="point"&&!("encodings"in t.select)&&Hy(t.select.encodings)&&(t.select.encodings=Object.keys(e.encoding)))})}const JL=(e,t,n,i,r,o,s,a)=>{var l,c;const u=JSON.parse(e);if(n==="streamlit"?u.config=EE(u.config,r):((c=(l=u.usermeta)==null?void 0:l.embedOptions)==null?void 0:c.theme)==="streamlit"?(u.config=EE(u.config,r),u.usermeta.embedOptions.theme=void 0):u.config=XL(u.config,r),o?(u.width=s,u.height=a,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})):t&&(u.width=s,"vconcat"in u&&u.vconcat.forEach(f=>{f.width=s})),u.padding||(u.padding={}),Hy(u.padding.bottom)&&(u.padding.bottom=YL),u.datasets)throw new Error("Datasets should not be passed as part of the spec");return i.length>0&&KL(u),u},QL=e=>{const t=iL(),{expanded:n,width:i,height:r}=Dk(Ok),{id:o,formId:s,spec:a,data:u,datasets:l,useContainerWidth:c,vegaLiteTheme:f,selectionMode:d}=e,h=xt.useMemo(()=>d,[JSON.stringify(d)]),p=xt.useMemo(()=>JL(a,c,f,h,t,n,i,r),[a,c,f,h,t,n,i,r]);return{id:o,formId:s,vegaLiteTheme:f,spec:p,selectionMode:h,data:u,datasets:l,useContainerWidth:c}};function Sn(e,t,n){return e.fields=t||[],e.fname=n,e}function Je(e){return e==null?null:e.fname}function Ut(e){return e==null?null:e.fields}function Lk(e){return e.length===1?ZL(e[0]):eP(e)}const ZL=e=>function(t){return t[e]},eP=e=>{const t=e.length;return function(n){for(let i=0;i<t;++i)n=n[e[i]];return n}};function N(e){throw Error(e)}function ur(e){const t=[],n=e.length;let i=null,r=0,o="",s,a,u;e=e+"";function l(){t.push(o+e.substring(s,a)),o="",s=a+1}for(s=a=0;a<n;++a)if(u=e[a],u==="\\")o+=e.substring(s,a++),s=a;else if(u===i)l(),i=null,r=-1;else{if(i)continue;s===r&&u==='"'||s===r&&u==="'"?(s=a+1,i=u):u==="."&&!r?a>s?l():s=a+1:u==="["?(a>s&&l(),r=s=a+1):u==="]"&&(r||N("Access path missing open bracket: "+e),r>0&&l(),r=0,s=a+1)}return r&&N("Access path missing closing bracket: "+e),i&&N("Access path missing closing quote: "+e),a>s&&(a++,l()),t}function Jn(e,t,n){const i=ur(e);return e=i.length===1?i[0]:e,Sn((n&&n.get||Lk)(i),[e],t||e)}const Rc=Jn("id"),Ht=Sn(e=>e,[],"identity"),ho=Sn(()=>0,[],"zero"),Cu=Sn(()=>1,[],"one"),Nn=Sn(()=>!0,[],"true"),ro=Sn(()=>!1,[],"false");function tP(e,t,n){const i=[t].concat([].slice.call(n));console[e].apply(console,i)}const Pk=0,Jy=1,Qy=2,zk=3,Ik=4;function Zy(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tP,i=e||Pk;return{level(r){return arguments.length?(i=+r,this):i},error(){return i>=Jy&&n(t||"error","ERROR",arguments),this},warn(){return i>=Qy&&n(t||"warn","WARN",arguments),this},info(){return i>=zk&&n(t||"log","INFO",arguments),this},debug(){return i>=Ik&&n(t||"log","DEBUG",arguments),this}}}var L=Array.isArray;function X(e){return e===Object(e)}const SE=e=>e!=="__proto__";function Fu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((i,r)=>{for(const o in r)if(o==="signals")i.signals=nP(i.signals,r.signals);else{const s=o==="legend"?{layout:1}:o==="style"?!0:null;Tu(i,o,r[o],s)}return i},{})}function Tu(e,t,n,i){if(!SE(t))return;let r,o;if(X(n)&&!L(n)){o=X(e[t])?e[t]:e[t]={};for(r in n)i&&(i===!0||i[r])?Tu(o,r,n[r]):SE(r)&&(o[r]=n[r])}else e[t]=n}function nP(e,t){if(e==null)return t;const n={},i=[];function r(o){n[o.name]||(n[o.name]=1,i.push(o))}return t.forEach(r),e.forEach(r),i}function xe(e){return e[e.length-1]}function It(e){return e==null||e===""?null:+e}const Bk=e=>t=>e*Math.exp(t),Uk=e=>t=>Math.log(e*t),jk=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),Wk=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,Nd=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function hp(e,t,n,i){const r=n(e[0]),o=n(xe(e)),s=(o-r)*t;return[i(r-s),i(o-s)]}function qk(e,t){return hp(e,t,It,Ht)}function Hk(e,t){var n=Math.sign(e[0]);return hp(e,t,Uk(n),Bk(n))}function Gk(e,t,n){return hp(e,t,Nd(n),Nd(1/n))}function Vk(e,t,n){return hp(e,t,jk(n),Wk(n))}function pp(e,t,n,i,r){const o=i(e[0]),s=i(xe(e)),a=t!=null?i(t):(o+s)/2;return[r(a+(o-a)*n),r(a+(s-a)*n)]}function eb(e,t,n){return pp(e,t,n,It,Ht)}function tb(e,t,n){const i=Math.sign(e[0]);return pp(e,t,n,Uk(i),Bk(i))}function Ld(e,t,n,i){return pp(e,t,n,Nd(i),Nd(1/i))}function nb(e,t,n,i){return pp(e,t,n,jk(i),Wk(i))}function Xk(e){return 1+~~(new Date(e).getMonth()/3)}function Yk(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Y(e){return e!=null?L(e)?e:[e]:[]}function Kk(e,t,n){let i=e[0],r=e[1],o;return r<i&&(o=r,r=i,i=o),o=r-i,o>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-o),i+o]}function fe(e){return typeof e=="function"}const iP="descending";function ib(e,t,n){n=n||{},t=Y(t)||[];const i=[],r=[],o={},s=n.comparator||rP;return Y(e).forEach((a,u)=>{a!=null&&(i.push(t[u]===iP?-1:1),r.push(a=fe(a)?a:Jn(a,null,n)),(Ut(a)||[]).forEach(l=>o[l]=1))}),r.length===0?null:Sn(s(r,i),Object.keys(o))}const gp=(e,t)=>(e<t||e==null)&&t!=null?-1:(e>t||t==null)&&e!=null?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0),rP=(e,t)=>e.length===1?oP(e[0],t[0]):sP(e,t,e.length),oP=(e,t)=>function(n,i){return gp(e(n),e(i))*t},sP=(e,t,n)=>(t.push(0),function(i,r){let o,s=0,a=-1;for(;s===0&&++a<n;)o=e[a],s=gp(o(i),o(r));return s*t[a]});function Gt(e){return fe(e)?e:()=>e}function rb(e,t){let n;return i=>{n&&clearTimeout(n),n=setTimeout(()=>(t(i),n=null),e)}}function ce(e){for(let t,n,i=1,r=arguments.length;i<r;++i){t=arguments[i];for(n in t)e[n]=t[n]}return e}function Zi(e,t){let n=0,i,r,o,s;if(e&&(i=e.length))if(t==null){for(r=e[n];n<i&&(r==null||r!==r);r=e[++n]);for(o=s=r;n<i;++n)r=e[n],r!=null&&(r<o&&(o=r),r>s&&(s=r))}else{for(r=t(e[n]);n<i&&(r==null||r!==r);r=t(e[++n]));for(o=s=r;n<i;++n)r=t(e[n]),r!=null&&(r<o&&(o=r),r>s&&(s=r))}return[o,s]}function Jk(e,t){const n=e.length;let i=-1,r,o,s,a,u;if(t==null){for(;++i<n;)if(o=e[i],o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=e[i],o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}else{for(;++i<n;)if(o=t(e[i],i,e),o!=null&&o>=o){r=s=o;break}if(i===n)return[-1,-1];for(a=u=i;++i<n;)o=t(e[i],i,e),o!=null&&(r>o&&(r=o,a=i),s<o&&(s=o,u=i))}return[a,u]}const aP=Object.prototype.hasOwnProperty;function J(e,t){return aP.call(e,t)}const $f={};function Mu(e){let t={},n;function i(o){return J(t,o)&&t[o]!==$f}const r={size:0,empty:0,object:t,has:i,get(o){return i(o)?t[o]:void 0},set(o,s){return i(o)||(++r.size,t[o]===$f&&--r.empty),t[o]=s,this},delete(o){return i(o)&&(--r.size,++r.empty,t[o]=$f),this},clear(){r.size=r.empty=0,r.object=t={}},test(o){return arguments.length?(n=o,r):n},clean(){const o={};let s=0;for(const a in t){const u=t[a];u!==$f&&(!n||!n(u))&&(o[a]=u,++s)}r.size=s,r.empty=0,r.object=t=o}};return e&&Object.keys(e).forEach(o=>{r.set(o,e[o])}),r}function Qk(e,t,n,i,r,o){if(!n&&n!==0)return o;const s=+n;let a=e[0],u=xe(e),l;u<a&&(l=a,a=u,u=l),l=Math.abs(t-a);const c=Math.abs(u-t);return l<c&&l<=s?i:c<=s?r:o}function G(e,t,n){const i=e.prototype=Object.create(t.prototype);return Object.defineProperty(i,"constructor",{value:e,writable:!0,enumerable:!0,configurable:!0}),ce(i,n)}function Ma(e,t,n,i){let r=t[0],o=t[t.length-1],s;return r>o&&(s=r,r=o,o=s),n=n===void 0||n,i=i===void 0||i,(n?r<=e:r<e)&&(i?e<=o:e<o)}function Ho(e){return typeof e=="boolean"}function _o(e){return Object.prototype.toString.call(e)==="[object Date]"}function Zk(e){return e&&fe(e[Symbol.iterator])}function $e(e){return typeof e=="number"}function eC(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function K(e){return typeof e=="string"}function ob(e,t,n){e&&(e=t?Y(e).map(a=>a.replace(/\\(.)/g,"$1")):Y(e));const i=e&&e.length,r=n&&n.get||Lk,o=a=>r(t?[a]:ur(a));let s;if(!i)s=function(){return""};else if(i===1){const a=o(e[0]);s=function(u){return""+a(u)}}else{const a=e.map(o);s=function(u){let l=""+a[0](u),c=0;for(;++c<i;)l+="|"+a[c](u);return l}}return Sn(s,e,"key")}function tC(e,t){const n=e[0],i=xe(e),r=+t;return r?r===1?i:n+r*(i-n):n}const uP=1e4;function nC(e){e=+e||uP;let t,n,i;const r=()=>{t={},n={},i=0},o=(s,a)=>(++i>e&&(n=t,t={},i=1),t[s]=a);return r(),{clear:r,has:s=>J(t,s)||J(n,s),get:s=>J(t,s)?t[s]:J(n,s)?o(s,n[s]):void 0,set:(s,a)=>J(t,s)?t[s]=a:o(s,a)}}function iC(e,t,n,i){const r=t.length,o=n.length;if(!o)return t;if(!r)return n;const s=i||new t.constructor(r+o);let a=0,u=0,l=0;for(;a<r&&u<o;++l)s[l]=e(t[a],n[u])>0?n[u++]:t[a++];for(;a<r;++a,++l)s[l]=t[a];for(;u<o;++u,++l)s[l]=n[u];return s}function El(e,t){let n="";for(;--t>=0;)n+=e;return n}function rC(e,t,n,i){const r=n||" ",o=e+"",s=t-o.length;return s<=0?o:i==="left"?El(r,s)+o:i==="center"?El(r,~~(s/2))+o+El(r,Math.ceil(s/2)):o+El(r,s)}function Nc(e){return e&&xe(e)-e[0]||0}function H(e){return L(e)?"["+e.map(H)+"]":X(e)||K(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function sb(e){return e==null||e===""?null:!e||e==="false"||e==="0"?!1:!!e}const lP=e=>$e(e)||_o(e)?e:Date.parse(e);function ab(e,t){return t=t||lP,e==null||e===""?null:t(e)}function ub(e){return e==null||e===""?null:e+""}function vi(e){const t={},n=e.length;for(let i=0;i<n;++i)t[e[i]]=!0;return t}function oC(e,t,n,i){const r=i??"…",o=e+"",s=o.length,a=Math.max(0,t-r.length);return s<=t?o:n==="left"?r+o.slice(s-a):n==="center"?o.slice(0,Math.ceil(a/2))+r+o.slice(s-~~(a/2)):o.slice(0,a)+r}function ao(e,t,n){if(e)if(t){const i=e.length;for(let r=0;r<i;++r){const o=t(e[r]);o&&n(o,r,e)}}else e.forEach(n)}var _E={},pm={},gm=34,Qu=10,mm=13;function sC(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function cP(e,t){var n=sC(e);return function(i,r){return t(n(i),r,e)}}function $E(e){var t=Object.create(null),n=[];return e.forEach(function(i){for(var r in i)r in t||n.push(t[r]=r)}),n}function fn(e,t){var n=e+"",i=n.length;return i<t?new Array(t-i+1).join(0)+n:n}function fP(e){return e<0?"-"+fn(-e,6):e>9999?"+"+fn(e,6):fn(e,4)}function dP(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),i=e.getUTCSeconds(),r=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":fP(e.getUTCFullYear())+"-"+fn(e.getUTCMonth()+1,2)+"-"+fn(e.getUTCDate(),2)+(r?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"."+fn(r,3)+"Z":i?"T"+fn(t,2)+":"+fn(n,2)+":"+fn(i,2)+"Z":n||t?"T"+fn(t,2)+":"+fn(n,2)+"Z":"")}function hP(e){var t=new RegExp('["'+e+`
2
2
  \r]`),n=e.charCodeAt(0);function i(f,d){var h,p,g=r(f,function(m,y){if(h)return h(m,y-1);p=m,h=d?cP(m,d):sC(m)});return g.columns=p||[],g}function r(f,d){var h=[],p=f.length,g=0,m=0,y,b=p<=0,v=!1;f.charCodeAt(p-1)===Qu&&--p,f.charCodeAt(p-1)===mm&&--p;function x(){if(b)return pm;if(v)return v=!1,_E;var S,w=g,_;if(f.charCodeAt(w)===gm){for(;g++<p&&f.charCodeAt(g)!==gm||f.charCodeAt(++g)===gm;);return(S=g)>=p?b=!0:(_=f.charCodeAt(g++))===Qu?v=!0:_===mm&&(v=!0,f.charCodeAt(g)===Qu&&++g),f.slice(w+1,S-1).replace(/""/g,'"')}for(;g<p;){if((_=f.charCodeAt(S=g++))===Qu)v=!0;else if(_===mm)v=!0,f.charCodeAt(g)===Qu&&++g;else if(_!==n)continue;return f.slice(w,S)}return b=!0,f.slice(w,p)}for(;(y=x())!==pm;){for(var E=[];y!==_E&&y!==pm;)E.push(y),y=x();d&&(E=d(E,m++))==null||h.push(E)}return h}function o(f,d){return f.map(function(h){return d.map(function(p){return c(h[p])}).join(e)})}function s(f,d){return d==null&&(d=$E(f)),[d.map(c).join(e)].concat(o(f,d)).join(`
3
3
  `)}function a(f,d){return d==null&&(d=$E(f)),o(f,d).join(`
4
4
  `)}function u(f){return f.map(l).join(`
@@ -1 +1 @@
1
- import{n as T,r,y as W,bZ as C,b_ as V,z as L,j as l,bs as O,bF as P,bt as $,bc as k,bu as N,bY as B,b$ as E,bU as F,bD as A,c0 as D}from"./index.7ACWibTY.js";import{a as H}from"./useBasicWidgetState.S-yUfhr7.js";import"./FormClearHelper.DZ1scmYc.js";const U=T("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),j=(s,t)=>s.getIntArrayValue(t),G=s=>s.default??null,K=s=>s.value??null,Y=(s,t,a,u)=>{t.setIntArrayValue(s,a.value,{fromUi:a.fromUi},u)},_=s=>{var S;const{element:t,widgetMgr:a,width:u,fragmentId:y}=s,e=W(),[n,g]=H({getStateFromWidgetMgr:j,getDefaultStateFromProto:G,getCurrStateFromProto:K,updateWidgetMgrState:Y,element:t,widgetMgr:a,fragmentId:y}),m=t.maxSelections>0&&n.length>=t.maxSelections,f=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(n.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,n.length]),v=r.useMemo(()=>n.map(o=>{const i=t.options[o];return{value:o.toString(),label:i}}),[t.options,n]),h=r.useCallback(o=>{const i=()=>{var d;const p=(d=o.option)==null?void 0:d.value;return parseInt(p,10)};switch(o.type){case"remove":return C(n,i());case"clear":return[];case"select":return n.concat([i()]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[n]),x=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&n.length>=t.maxSelections||g({value:h(o),fromUi:!0})},[t.maxSelections,h,g,n.length]),z=r.useCallback((o,i)=>{if(m)return[];const p=o.filter(d=>!n.includes(Number(d.value)));return V(p,i)},[m,n]),w={width:u},{options:c}=t,b=c.length===0?!0:s.disabled,I=c.length===0?"No options to select.":t.placeholder,R=c.map((o,i)=>({label:o,value:i.toString()})),M=c.length>10;return L("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:w,children:[l(N,{label:t.label,disabled:b,labelVisibility:O((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(P,{children:l($,{content:t.help,placement:k.TOP_RIGHT})})}),l(U,{children:l(B,{options:R,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:I,type:E.select,multi:!0,onChange:x,value:v,disabled:b,size:"compact",noResultsMsg:f,filterOptions:z,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:F,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:A&&M===!1?"readonly":null}},Dropdown:{component:D}}})})]})},J=r.memo(_);export{J as default};
1
+ import{n as T,r,y as W,c1 as C,c2 as V,z as L,j as l,bt as O,bG as P,bu as k,bd as E,bv as N,c0 as $,c3 as B,bY as A,bE as F,c4 as H}from"./index.B7J6suR-.js";import{a as D}from"./useBasicWidgetState.DXLMTaiS.js";import"./FormClearHelper.BgwPD1tD.js";const G=T("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),U=(s,t)=>s.getIntArrayValue(t),j=s=>s.default??null,K=s=>s.value??null,Y=(s,t,a,u)=>{t.setIntArrayValue(s,a.value,{fromUi:a.fromUi},u)},_=s=>{var S;const{element:t,widgetMgr:a,width:u,fragmentId:y}=s,e=W(),[n,g]=D({getStateFromWidgetMgr:U,getDefaultStateFromProto:j,getCurrStateFromProto:K,updateWidgetMgrState:Y,element:t,widgetMgr:a,fragmentId:y}),m=t.maxSelections>0&&n.length>=t.maxSelections,f=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(n.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,n.length]),v=r.useMemo(()=>n.map(o=>{const i=t.options[o];return{value:o.toString(),label:i}}),[t.options,n]),h=r.useCallback(o=>{const i=()=>{var d;const p=(d=o.option)==null?void 0:d.value;return parseInt(p,10)};switch(o.type){case"remove":return C(n,i());case"clear":return[];case"select":return n.concat([i()]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[n]),x=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&n.length>=t.maxSelections||g({value:h(o),fromUi:!0})},[t.maxSelections,h,g,n.length]),z=r.useCallback((o,i)=>{if(m)return[];const p=o.filter(d=>!n.includes(Number(d.value)));return V(p,i)},[m,n]),w={width:u},{options:c}=t,b=c.length===0?!0:s.disabled,I=c.length===0?"No options to select.":t.placeholder,R=c.map((o,i)=>({label:o,value:i.toString()})),M=c.length>10;return L("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:w,children:[l(N,{label:t.label,disabled:b,labelVisibility:O((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(P,{children:l(k,{content:t.help,placement:E.TOP_RIGHT})})}),l(G,{children:l($,{options:R,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:I,type:B.select,multi:!0,onChange:x,value:v,disabled:b,size:"compact",noResultsMsg:f,filterOptions:z,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:A,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:F&&M===!1?"readonly":null}},Dropdown:{component:H}}})})]})},Q=r.memo(_);export{Q as default};