streamlit-nightly 1.42.1.dev20250206__py2.py3-none-any.whl → 1.42.1.dev20250209__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.
- streamlit/auth_util.py +8 -0
- streamlit/config.py +18 -1
- streamlit/proto/NewSession_pb2.pyi +4 -1
- streamlit/runtime/app_session.py +35 -15
- streamlit/runtime/caching/cache_utils.py +1 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.DwBO4CPU.js → FileDownload.esm.D9415avj.js} +1 -1
- streamlit/static/static/js/FileDropzone.Cd515bsy.js +5 -0
- streamlit/static/static/js/{FormClearHelper.LI0uGKXr.js → FormClearHelper.BBpErIGP.js} +1 -1
- streamlit/static/static/js/{Hooks.Dic60qKO.js → Hooks.CeSTXIj2.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BVSrSzyM.js → InputInstructions.BU5Td5cJ.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CiuIhn-j.js → ProgressBar.J2QhvKtD.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.DXoPwgJm.js → RenderInPortalIfExists.BbbrvJaa.js} +1 -1
- streamlit/static/static/js/{Toolbar.Bws727nN.js → Toolbar.D-hUr0RX.js} +1 -1
- streamlit/static/static/js/{base-input.BG3_mR5a.js → base-input.CNkkCv4B.js} +1 -1
- streamlit/static/static/js/{createSuper.BF6PuRKW.js → createSuper.DHhKMTIx.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Bv759UXp.js → data-grid-overlay-editor.CRylpesE.js} +1 -1
- streamlit/static/static/js/{downloader.CVHmveIJ.js → downloader.D_08g5mI.js} +1 -1
- streamlit/static/static/js/{es6.CKbvqIhx.js → es6.B-Rq6ajt.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.BkEeeo8L.js → iframeResizer.contentWindow.CFL3MAVr.js} +1 -1
- streamlit/static/static/js/{index.C583HQPW.js → index.-SmXSkUY.js} +1 -1
- streamlit/static/static/js/{index.gthzAzzy.js → index.9wBA4A4f.js} +5 -5
- streamlit/static/static/js/{index.D0P1HMA1.js → index.B-4MHYvl.js} +1 -1
- streamlit/static/static/js/{index.DRYIN7K5.js → index.B0xfT3p4.js} +1 -1
- streamlit/static/static/js/{index.BKVJ1VBu.js → index.B2evntzQ.js} +1 -1
- streamlit/static/static/js/{index.DMae4Z-0.js → index.B9q8XlSH.js} +1 -1
- streamlit/static/static/js/{index.BOaiJM1y.js → index.BA5ubsQA.js} +1 -1
- streamlit/static/static/js/{index.DC0pyGdw.js → index.BCYuLMdi.js} +1 -1
- streamlit/static/static/js/{index.DI1n7tF5.js → index.BNrZwkh1.js} +1 -1
- streamlit/static/static/js/{index.C7ShUXWu.js → index.BVbWPXFU.js} +1 -1
- streamlit/static/static/js/{index.DET-MvNj.js → index.BevO9CYu.js} +2 -2
- streamlit/static/static/js/{index.BOWcB5X0.js → index.BlcNB-sY.js} +1 -1
- streamlit/static/static/js/{index.UxOzm9KZ.js → index.BpmrfDoR.js} +1 -1
- streamlit/static/static/js/{index.DC2ac6Nk.js → index.BqePTNWb.js} +1 -1
- streamlit/static/static/js/{index.ezIYG9hW.js → index.Bw9RDCaH.js} +2 -2
- streamlit/static/static/js/{index.CLsR30iv.js → index.C-_AHUSz.js} +1 -1
- streamlit/static/static/js/{index.y9PB-mTp.js → index.CEWcZMdD.js} +1 -1
- streamlit/static/static/js/{index.C07oOjJI.js → index.CEj-S3PF.js} +1 -1
- streamlit/static/static/js/{index.e9DSvZ6b.js → index.CFtAnwvU.js} +1 -1
- streamlit/static/static/js/{index.Cs3niYHd.js → index.CMcCB4vg.js} +1 -1
- streamlit/static/static/js/{index.VkiSji1p.js → index.CQ_wmqnz.js} +1 -1
- streamlit/static/static/js/{index.TDbcj-aD.js → index.CuNiy4LB.js} +1 -1
- streamlit/static/static/js/{index.C4CvtPIA.js → index.CvADzqCD.js} +1 -1
- streamlit/static/static/js/{index.CYyMatnb.js → index.D94jjl7_.js} +1 -1
- streamlit/static/static/js/{index.CIUGbfN-.js → index.D9M0iUu5.js} +1 -1
- streamlit/static/static/js/{index.Gdr5urlE.js → index.DPs04g4h.js} +1 -1
- streamlit/static/static/js/{index.--2AyPrU.js → index.DWIf4xZP.js} +1 -1
- streamlit/static/static/js/{index.D4zWkike.js → index.DYHaq5Cw.js} +22 -22
- streamlit/static/static/js/{index.BkPpT8KL.js → index.DfCewjMv.js} +1 -1
- streamlit/static/static/js/{index.C_i45xvQ.js → index.DgwklVRJ.js} +1 -1
- streamlit/static/static/js/{index.DZhFuLsM.js → index.DwWMkgFE.js} +1 -1
- streamlit/static/static/js/{index.B5Uxprvt.js → index.JSS70wsq.js} +1 -1
- streamlit/static/static/js/{index.CfBMTPce.js → index.Yr32ts47.js} +1 -1
- streamlit/static/static/js/{index.BImYg1mO.js → index.i2uLxrqv.js} +1 -1
- streamlit/static/static/js/{index.DvjJSBT_.js → index.joQNIDux.js} +1 -1
- streamlit/static/static/js/{index.DCUW0b-w.js → index.pzjWTi64.js} +1 -1
- streamlit/static/static/js/{index.lxFhX6K1.js → index.zzxJWhBg.js} +1 -1
- streamlit/static/static/js/{input.ekQXAXS2.js → input.Dbc83Str.js} +1 -1
- streamlit/static/static/js/{memory.CzhWwr8k.js → memory.BzHgTb9i.js} +1 -1
- streamlit/static/static/js/{mergeWith.CjWtfLVK.js → mergeWith.BCa1_PWb.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CFFRhwzv.js → number-overlay-editor.CtUWknLp.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BiMrneUm.js → possibleConstructorReturn.DGVrr2j8.js} +1 -1
- streamlit/static/static/js/{sandbox.B1Cwdby0.js → sandbox.C20zasAf.js} +1 -1
- streamlit/static/static/js/{textarea.BYQOUi7u.js → textarea.BeRVLTOp.js} +1 -1
- streamlit/static/static/js/{timepicker.BbVkXpKf.js → timepicker.DyU-jgSC.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.eNZZBqsg.js → toConsumableArray.D4FxxWIg.js} +1 -1
- streamlit/static/static/js/{uniqueId.Ci60uueL.js → uniqueId.CAAlIP1-.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BJ0FCAzu.js → useBasicWidgetState.C207Y3_O.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.xhIvlf7z.js → useOnInputChange.CsqRc0X0.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CKNKx70m.js → withFullScreenWrapper.DwHjQb3H.js} +1 -1
- {streamlit_nightly-1.42.1.dev20250206.dist-info → streamlit_nightly-1.42.1.dev20250209.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.42.1.dev20250206.dist-info → streamlit_nightly-1.42.1.dev20250209.dist-info}/RECORD +76 -76
- streamlit/static/static/js/FileDropzone.l_rm_qyP.js +0 -5
- {streamlit_nightly-1.42.1.dev20250206.data → streamlit_nightly-1.42.1.dev20250209.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.42.1.dev20250206.dist-info → streamlit_nightly-1.42.1.dev20250209.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.42.1.dev20250206.dist-info → streamlit_nightly-1.42.1.dev20250209.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.42.1.dev20250206.dist-info → streamlit_nightly-1.42.1.dev20250209.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{r as l,E as k,_ as M,n as g,C as ht,y as q,j as a,bc as J,bv as ft,z as w,bq as Q,b8 as Z,bp as E,b2 as mt,bG as yt,bH as S,bt as vt,bk as Ct,bI as wt,J as L,F as X,bm as It,bl as bt}from"./index.gthzAzzy.js";import{g as xt,F as St,C as Ft,I as Et,E as zt,u as Ut,a as Ht}from"./FileDropzone.l_rm_qyP.js";import{I as Tt}from"./InputInstructions.BVSrSzyM.js";import{i as Dt}from"./inputUtils.CQWz5UKz.js";import{a as G}from"./axios.upsvKRUO.js";import{U as V}from"./UploadFileInfo.C-jY39rj.js";import{T as Lt}from"./textarea.BYQOUi7u.js";import"./base-input.BG3_mR5a.js";var tt=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});tt.displayName="AttachFile";var et=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});et.displayName="ErrorOutline";var ot=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});ot.displayName="Send";const Bt=g("div",{target:"e1w2ot2t0"})(({theme:t,width:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.secondaryBg,width:`${e}px`,overflow:"hidden",":focus-within":{borderColor:t.colors.primary},"&.dropzone":{borderColor:t.colors.primary,borderRadius:t.radii.full,height:t.sizes.emptyDropdownHeight}})),Rt=g("div",{target:"e1w2ot2t1"})(({theme:t})=>({position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,gap:t.spacing.sm})),Vt=g("button",{target:"e1w2ot2t2"})(({theme:t,disabled:e,extended:s})=>{const h=ht(t),[y,p]=h?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:s?"0":t.radii.chatInput,borderTopLeftRadius:s?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?y:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:h?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),kt=g("div",{target:"e1w2ot2t3"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),Mt=g("div",{target:"e1w2ot2t4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),Nt=g("div",{target:"e12v7o8j0"})(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",margin:"auto",height:"100%",width:"100%",color:t.colors.primary,fontWeight:t.fontWeights.bold})),At=g("div",{target:"e12v7o8j1"})(({})=>({display:"flex",alignItems:"top",height:"100%"})),$t=g("div",{target:"e12v7o8j2"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Wt=g("div",{target:"e12v7o8j3"})(({theme:t})=>({left:0,right:0,border:`${t.sizes.borderWidth} solid ${t.colors.transparent}`,minHeight:t.sizes.minChatInputFileListHeight,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),jt=g("div",{target:"e12v7o8j4"})(({})=>({display:"flex"})),Pt=g("div",{target:"e12v7o8j5"})(({})=>({flex:"0 0 auto"})),Kt=g("div",{target:"e12v7o8j6"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Ot=g("div",{target:"e12v7o8j7"})(({theme:t})=>({color:t.colors.fadedText60})),_t=g("div",{target:"e12v7o8j8"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Xt=g("div",{target:"e12v7o8j9"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Gt=g("small",{target:"e12v7o8j10"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function Yt({children:t,content:e}){const s=q();return a(ft,{content:e,placement:J.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:t})}const qt=({fileInfo:t})=>{const{type:e}=t.status;switch(e){case"uploading":return a(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return a(Yt,{content:t.status.errorMessage,children:a(E,{content:et,size:"lg"})});case"uploaded":return a(E,{content:Et,size:"lg"});default:return mt(e),null}},Jt=({fileInfo:t,onDelete:e})=>w(Kt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[a(Ot,{children:a(qt,{fileInfo:t})}),a(_t,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),a(Xt,{children:xt(t.size,St.Byte)}),a(Gt,{"data-testid":"stChatInputDeleteBtn",children:a(Q,{onClick:()=>e(t.id),kind:Z.MINIMAL,children:a(E,{content:Ft,size:"lg"})})})]}),Qt=({items:t,onDelete:e})=>a(Wt,{"data-testid":"stChatUploadedFiles",children:a(jt,{children:t.map(s=>a(Pt,{children:a(Jt,{fileInfo:s,onDelete:e})},s.id))})}),Zt=({getRootProps:t,getInputProps:e,acceptFile:s,showDropzone:h,disabled:y,theme:p})=>h?w(Nt,{...t(),children:[a("input",{...e()}),"Drag and drop files here"]}):w(At,{children:[w("div",{"data-testid":"stChatInputFileUploadButton",...t(),children:[a("input",{...e()}),a(vt,{content:`Upload or drag and drop ${s===S.Multiple?"files":"a file"}`,placement:J.TOP,children:a(Q,{kind:Z.MINIMAL,disabled:y,children:a(E,{content:tt,size:"lg",color:p.colors.fadedText60})})})]}),a($t,{})]}),te=({getNextLocalFileId:t,addFiles:e,updateFile:s,uploadClient:h,element:y,onUploadProgress:p,onUploadComplete:f})=>(v,m)=>{const u=G.CancelToken.source(),d=new V(m.name,m.size,t(),{type:"uploading",cancelToken:u,progress:1});e([d]),h.uploadFile({formId:"",...y},v.uploadUrl,m,c=>p(c,d.id),u.token).then(()=>f(d.id,v)).catch(c=>{G.isCancel(c)||s(d.id,d.setStatus({type:"error",errorMessage:c?c.toString():"Unknown error"}))})},ee=({acceptMultipleFiles:t,uploadClient:e,uploadFile:s,addFiles:h,getNextLocalFileId:y,deleteExistingFiles:p,onUploadComplete:f})=>(v,m)=>{if(!t&&v.length===0&&m.length>1){const u=m.findIndex(d=>{var c;return((c=d.errors)==null?void 0:c[0].code)===zt.TooManyFiles});u>=0&&(v.push(m[u].file),m.splice(u,1))}if(!t&&v.length>0&&p(),e.fetchFileURLs(v).then(u=>{Ct(u,v).forEach(([d,c])=>{s(d,c)})}).catch(u=>{h(v.map(d=>new V(d.name,d.size,y(),{type:"error",errorMessage:u})))}),m.length>0){const u=m.map(d=>new V(d.file.name,d.file.size,y(),{type:"error",errorMessage:d.errors.map(c=>c.message).filter(c=>!!c).join(", ")}));h(u)}f()},oe=6.5,Y=1,B=(t,e,s)=>s.map(h=>h.id===t?e:h),R=(t,e)=>e.find(s=>s.id===t);function pe({width:t,element:e,widgetMgr:s,fragmentId:h,uploadClient:y}){const p=q(),f=l.useRef(null),v=l.useRef(0),m=l.useRef({minHeight:0,maxHeight:0}),[u,d]=l.useState(!1),[c,z]=l.useState(e.default),[U,N]=l.useState(0),[I,b]=l.useState([]),[F,H]=l.useState(!1),x=wt(e.acceptFile),A=l.useCallback(o=>b(n=>[...n,...o]),[]),$=l.useCallback(o=>{b(n=>{const i=R(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]),nt=()=>{const o=I.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:r,status:C}=n,{fileId:ut,fileUrls:gt}=C;return new It({fileId:ut,fileUrls:gt,name:i,size:r})});return new bt({uploadedFileInfo:o})},W=()=>v.current++,at=ee({acceptMultipleFiles:x===S.Multiple,uploadClient:y,uploadFile:te({getNextLocalFileId:W,addFiles:A,updateFile:(o,n)=>{b(i=>B(o,n,i))},uploadClient:y,element:e,onUploadProgress:(o,n)=>{b(i=>{const r=R(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)=>{b(i=>{const r=R(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:W,deleteExistingFiles:()=>I.forEach(o=>$(o.id)),onUploadComplete:()=>{f.current&&f.current.focus()}}),{getRootProps:rt,getInputProps:it}=Ut({onDrop:at,multiple:x===S.Multiple,accept:Ht(e.fileType)}),st=()=>{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},j=()=>{if(f.current&&f.current.focus(),!u||e.disabled)return;const o={data:c,fileUploaderState:nt()};s.setChatInputValue(e,o,{fromUi:!0},h),d(!1),b([]),z(""),N(0)},lt=o=>{const{metaKey:n,ctrlKey:i,shiftKey:r}=o;Dt(o)&&!r&&!i&&!n&&(o.preventDefault(),j())},dt=o=>{const{value:n}=o.target,{maxChars:i}=e;i!==0&&n.length>i||(z(n),N(st()))};l.useEffect(()=>I.some(o=>o.status.type==="uploading")?d(!1):d(c!==""||I.length>0),[I,c]),l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";z(o)}},[e]),l.useEffect(()=>{if(f.current){const{offsetHeight:o}=f.current;m.current.minHeight=o,m.current.maxHeight=o*oe}},[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:P,maxChars:ct}=e,{minHeight:pt,maxHeight:K}=m.current,O=U>0&&f.current?Math.abs(U-pt)>Y:!1,D=x!==S.None&&F,_="stChatInput";return w(X,{children:[x===S.None?null:a(Qt,{items:[...I],onDelete:$}),a(Bt,{className:D?`${_} dropzone`:_,"data-testid":"stChatInput",width:t,children:w(Rt,{children:[x===S.None?null:a(Zt,{getRootProps:rt,getInputProps:it,acceptFile:x,showDropzone:D,disabled:T,theme:p}),D?null:w(X,{children:[a(Lt,{inputRef:f,value:c,placeholder:P,onChange:dt,onKeyDown:lt,"aria-label":P,disabled:T,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:O?`${U+Y}px`:"auto",maxHeight:K?`${K}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})`}}}}),t>p.breakpoints.hideWidgetDetails&&a(Mt,{children:a(Tt,{dirty:u,value:c,maxLength:ct,type:"chat",inForm:!1})}),a(kt,{children:a(Vt,{onClick:j,disabled:!u||T,extended:O,"data-testid":"stChatInputSubmitButton",children:a(E,{content:ot,size:"xl",color:"inherit"})})})]})]})})]})}export{pe as default};
|
1
|
+
import{r as l,E as k,_ as M,n as g,G as ht,y as q,j as a,bc as J,bv as ft,z as w,bq as Q,b8 as Z,bp as E,b2 as mt,bG as yt,bH as S,bt as vt,bk as Ct,bI as wt,K as L,F as G,bm as It,bl as bt}from"./index.9wBA4A4f.js";import{g as xt,F as St,C as Ft,I as Et,E as zt,u as Ut,a as Ht}from"./FileDropzone.Cd515bsy.js";import{I as Tt}from"./InputInstructions.BU5Td5cJ.js";import{i as Dt}from"./inputUtils.CQWz5UKz.js";import{a as X}from"./axios.upsvKRUO.js";import{U as V}from"./UploadFileInfo.C-jY39rj.js";import{T as Lt}from"./textarea.BeRVLTOp.js";import"./base-input.CNkkCv4B.js";var tt=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});tt.displayName="AttachFile";var et=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});et.displayName="ErrorOutline";var ot=l.forwardRef(function(t,e){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(k,M({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),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"}))});ot.displayName="Send";const Bt=g("div",{target:"e1w2ot2t0"})(({theme:t,width:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.secondaryBg,width:`${e}px`,overflow:"hidden",":focus-within":{borderColor:t.colors.primary},"&.dropzone":{borderColor:t.colors.primary,borderRadius:t.radii.full,height:t.sizes.emptyDropdownHeight}})),Rt=g("div",{target:"e1w2ot2t1"})(({theme:t})=>({position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,gap:t.spacing.sm})),Vt=g("button",{target:"e1w2ot2t2"})(({theme:t,disabled:e,extended:s})=>{const h=ht(t),[y,p]=h?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:s?"0":t.radii.chatInput,borderTopLeftRadius:s?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?y:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:h?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),kt=g("div",{target:"e1w2ot2t3"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),Mt=g("div",{target:"e1w2ot2t4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),Nt=g("div",{target:"e12v7o8j0"})(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",margin:"auto",height:"100%",width:"100%",color:t.colors.primary,fontWeight:t.fontWeights.bold})),At=g("div",{target:"e12v7o8j1"})(({})=>({display:"flex",alignItems:"top",height:"100%"})),$t=g("div",{target:"e12v7o8j2"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),Wt=g("div",{target:"e12v7o8j3"})(({theme:t})=>({left:0,right:0,border:`${t.sizes.borderWidth} solid ${t.colors.transparent}`,minHeight:t.sizes.minChatInputFileListHeight,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),jt=g("div",{target:"e12v7o8j4"})(({})=>({display:"flex"})),Pt=g("div",{target:"e12v7o8j5"})(({})=>({flex:"0 0 auto"})),Kt=g("div",{target:"e12v7o8j6"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Ot=g("div",{target:"e12v7o8j7"})(({theme:t})=>({color:t.colors.fadedText60})),_t=g("div",{target:"e12v7o8j8"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Gt=g("div",{target:"e12v7o8j9"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Xt=g("small",{target:"e12v7o8j10"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function Yt({children:t,content:e}){const s=q();return a(ft,{content:e,placement:J.TOP,overrides:{Body:{style:{top:`-${s.sizes.minElementHeight}`}}},children:t})}const qt=({fileInfo:t})=>{const{type:e}=t.status;switch(e){case"uploading":return a(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return a(Yt,{content:t.status.errorMessage,children:a(E,{content:et,size:"lg"})});case"uploaded":return a(E,{content:Et,size:"lg"});default:return mt(e),null}},Jt=({fileInfo:t,onDelete:e})=>w(Kt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[a(Ot,{children:a(qt,{fileInfo:t})}),a(_t,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),a(Gt,{children:xt(t.size,St.Byte)}),a(Xt,{"data-testid":"stChatInputDeleteBtn",children:a(Q,{onClick:()=>e(t.id),kind:Z.MINIMAL,children:a(E,{content:Ft,size:"lg"})})})]}),Qt=({items:t,onDelete:e})=>a(Wt,{"data-testid":"stChatUploadedFiles",children:a(jt,{children:t.map(s=>a(Pt,{children:a(Jt,{fileInfo:s,onDelete:e})},s.id))})}),Zt=({getRootProps:t,getInputProps:e,acceptFile:s,showDropzone:h,disabled:y,theme:p})=>h?w(Nt,{...t(),children:[a("input",{...e()}),"Drag and drop files here"]}):w(At,{children:[w("div",{"data-testid":"stChatInputFileUploadButton",...t(),children:[a("input",{...e()}),a(vt,{content:`Upload or drag and drop ${s===S.Multiple?"files":"a file"}`,placement:J.TOP,children:a(Q,{kind:Z.MINIMAL,disabled:y,children:a(E,{content:tt,size:"lg",color:p.colors.fadedText60})})})]}),a($t,{})]}),te=({getNextLocalFileId:t,addFiles:e,updateFile:s,uploadClient:h,element:y,onUploadProgress:p,onUploadComplete:f})=>(v,m)=>{const u=X.CancelToken.source(),d=new V(m.name,m.size,t(),{type:"uploading",cancelToken:u,progress:1});e([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"}))})},ee=({acceptMultipleFiles:t,uploadClient:e,uploadFile:s,addFiles:h,getNextLocalFileId:y,deleteExistingFiles:p,onUploadComplete:f})=>(v,m)=>{if(!t&&v.length===0&&m.length>1){const u=m.findIndex(d=>{var c;return((c=d.errors)==null?void 0:c[0].code)===zt.TooManyFiles});u>=0&&(v.push(m[u].file),m.splice(u,1))}if(!t&&v.length>0&&p(),e.fetchFileURLs(v).then(u=>{Ct(u,v).forEach(([d,c])=>{s(d,c)})}).catch(u=>{h(v.map(d=>new V(d.name,d.size,y(),{type:"error",errorMessage:u})))}),m.length>0){const u=m.map(d=>new V(d.file.name,d.file.size,y(),{type:"error",errorMessage:d.errors.map(c=>c.message).filter(c=>!!c).join(", ")}));h(u)}f()},oe=6.5,Y=1,B=(t,e,s)=>s.map(h=>h.id===t?e:h),R=(t,e)=>e.find(s=>s.id===t);function pe({width:t,element:e,widgetMgr:s,fragmentId:h,uploadClient:y}){const p=q(),f=l.useRef(null),v=l.useRef(0),m=l.useRef({minHeight:0,maxHeight:0}),[u,d]=l.useState(!1),[c,z]=l.useState(e.default),[U,N]=l.useState(0),[I,b]=l.useState([]),[F,H]=l.useState(!1),x=wt(e.acceptFile),A=l.useCallback(o=>b(n=>[...n,...o]),[]),$=l.useCallback(o=>{b(n=>{const i=R(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]),nt=()=>{const o=I.filter(n=>n.status.type==="uploaded").map(n=>{const{name:i,size:r,status:C}=n,{fileId:ut,fileUrls:gt}=C;return new It({fileId:ut,fileUrls:gt,name:i,size:r})});return new bt({uploadedFileInfo:o})},W=()=>v.current++,at=ee({acceptMultipleFiles:x===S.Multiple,uploadClient:y,uploadFile:te({getNextLocalFileId:W,addFiles:A,updateFile:(o,n)=>{b(i=>B(o,n,i))},uploadClient:y,element:e,onUploadProgress:(o,n)=>{b(i=>{const r=R(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)=>{b(i=>{const r=R(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:W,deleteExistingFiles:()=>I.forEach(o=>$(o.id)),onUploadComplete:()=>{f.current&&f.current.focus()}}),{getRootProps:rt,getInputProps:it}=Ut({onDrop:at,multiple:x===S.Multiple,accept:Ht(e.fileType)}),st=()=>{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},j=()=>{if(f.current&&f.current.focus(),!u||e.disabled)return;const o={data:c,fileUploaderState:nt()};s.setChatInputValue(e,o,{fromUi:!0},h),d(!1),b([]),z(""),N(0)},lt=o=>{const{metaKey:n,ctrlKey:i,shiftKey:r}=o;Dt(o)&&!r&&!i&&!n&&(o.preventDefault(),j())},dt=o=>{const{value:n}=o.target,{maxChars:i}=e;i!==0&&n.length>i||(z(n),N(st()))};l.useEffect(()=>I.some(o=>o.status.type==="uploading")?d(!1):d(c!==""||I.length>0),[I,c]),l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";z(o)}},[e]),l.useEffect(()=>{if(f.current){const{offsetHeight:o}=f.current;m.current.minHeight=o,m.current.maxHeight=o*oe}},[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:P,maxChars:ct}=e,{minHeight:pt,maxHeight:K}=m.current,O=U>0&&f.current?Math.abs(U-pt)>Y:!1,D=x!==S.None&&F,_="stChatInput";return w(G,{children:[x===S.None?null:a(Qt,{items:[...I],onDelete:$}),a(Bt,{className:D?`${_} dropzone`:_,"data-testid":"stChatInput",width:t,children:w(Rt,{children:[x===S.None?null:a(Zt,{getRootProps:rt,getInputProps:it,acceptFile:x,showDropzone:D,disabled:T,theme:p}),D?null:w(G,{children:[a(Lt,{inputRef:f,value:c,placeholder:P,onChange:dt,onKeyDown:lt,"aria-label":P,disabled:T,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:O?`${U+Y}px`:"auto",maxHeight:K?`${K}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})`}}}}),t>p.breakpoints.hideWidgetDetails&&a(Mt,{children:a(Tt,{dirty:u,value:c,maxLength:ct,type:"chat",inForm:!1})}),a(kt,{children:a(Vt,{onClick:j,disabled:!u||T,extended:O,"data-testid":"stChatInputSubmitButton",children:a(E,{content:ot,size:"xl",color:"inherit"})})})]})]})})]})}export{pe as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as f,r as a,j as c}from"./index.
|
1
|
+
import{n as f,r as a,j as c}from"./index.9wBA4A4f.js";const E=f("div",{target:"ea9qfvi0"})(()=>({lineHeight:0})),y=f("audio",{target:"ea9qfvi1"})(({theme:t})=>({width:"100%",height:t.sizes.minElementHeight,margin:0,padding:0}));function A({element:t,endpoints:l,elementMgr:o}){const i=a.useRef(null),{startTime:n,endTime:d,loop:u,autoplay:p}=t,m=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):r||(r=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",s),()=>{e&&d>0&&e.removeEventListener("timeupdate",s)}},[d,u,n]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[u,n]);const v=l.buildMediaURL(t.url);return c(E,{children:c(y,{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!m,src:v})})}export{A 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.gthzAzzy.js";import{S as yE,T as fL}from"./Toolbar.Bws727nN.js";import{u as Dk,E as Ok,w as dL}from"./withFullScreenWrapper.CKNKx70m.js";import{m as hL}from"./mergeWith.CjWtfLVK.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.LI0uGKXr.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{az as J6,n as Q6,aH as ga,aI as Od,C as jn,aJ as Z6,aK as eL,aL as dE,aM as tL,L as nL,y as iL,r as xt,K as Hy,g as rL,a6 as oL,ai as sL,ae as hE,af as pE,Q as aL,am as Mk,aN as uL,N as gE,aC as mE,z as lL,j as hm,aO as cL}from"./index.9wBA4A4f.js";import{S as yE,T as fL}from"./Toolbar.D-hUr0RX.js";import{u as Dk,E as Ok,w as dL}from"./withFullScreenWrapper.DwHjQb3H.js";import{m as hL}from"./mergeWith.BCa1_PWb.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.BBpErIGP.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 c,b6 as v,
|
1
|
+
import{n as c,b6 as v,az as y,b7 as l,b8 as t,j as s,b9 as C,ba as S}from"./index.9wBA4A4f.js";function k(o,i){switch(o){case l.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case l.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case l.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const g=c("a",{target:"efj1jhq0"})(({fluidWidth:o,size:i,theme:r})=>{const a=typeof o=="number"?`${o}px`:"100%";return{display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?a:"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${y(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...k(i,r)}}),B=c(g,{target:"efj1jhq1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),x=c(g,{target:"efj1jhq2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=c(g,{target:"efj1jhq3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${y(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function L({kind:o,size:i,disabled:r,fluidWidth:a,children:d,autoFocus:n,href:e,rel:u,target:b,onClick:f}){let p=B;return o===t.SECONDARY?p=x:o===t.TERTIARY&&(p=$),s(p,{kind:o,size:i||l.MEDIUM,fluidWidth:a||!1,disabled:r||!1,autoFocus:n||!1,href:e,target:b,rel:u,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}function T(o){const{disabled:i,element:r,width:a}=o,d={width:a};let n=t.SECONDARY;r.type==="primary"?n=t.PRIMARY:r.type==="tertiary"&&(n=t.TERTIARY);const e=r.help?a:!0,u=b=>{o.disabled&&b.preventDefault()};return s("div",{className:"stLinkButton","data-testid":"stLinkButton",style:d,children:s(C,{help:r.help,children:s(L,{kind:n,size:l.SMALL,disabled:i,onClick:u,fluidWidth:r.useContainerWidth?e:!1,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:s(S,{icon:r.icon,label:r.label})})})})}export{T as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as s,k as r,r as i,j as n}from"./index.
|
1
|
+
import{n as s,k as r,r as i,j as n}from"./index.9wBA4A4f.js";import{P as m,R as c}from"./RenderInPortalIfExists.BbbrvJaa.js";const p=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,f=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,d=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,B=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,L=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,h=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,t=300,a=121,e=20,g=80,u=1e3,x=r("from{transform:translateY(calc(100vh + ",t,"px));}to{transform:translateY(0);}"),_=s("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:`${-t}px`,marginLeft:`${-a/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-e)+e}vw`,animationDelay:`${Math.random()*u}ms`,height:`${t}px`,width:`${a}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,l=[p,f,d,B,L,h],A=l.length,I=({particleType:o})=>n(_,{src:l[o]}),M=({scriptRunId:o})=>n(c,{children:n(m,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=i.memo(M);export{w as NUM_BALLOONS,S as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as o,E as
|
1
|
+
import{r as o,E as M,_ as X,n as x,aR as lt,am as ut,cq as ct,N as J,cB as I,K as f,z,j as c,bs as dt,bF as pt,bt as ft,bc as bt,bu as mt,bp as K}from"./index.9wBA4A4f.js";import{s as gt}from"./sprintf.C-r3gIuM.js";import{u as yt}from"./uniqueId.CAAlIP1-.js";import{u as It}from"./FormClearHelper.BBpErIGP.js";import{I as ht}from"./InputInstructions.BU5Td5cJ.js";import{I as Tt}from"./input.Dbc83Str.js";import"./base-input.CNkkCv4B.js";var Q=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(M,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=o.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(M,X({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),o.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Ct=x("div",{target:"e5tuigk0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),wt=x("div",{target:"e5tuigk1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),q=x("button",{target:"e5tuigk2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),St=x("div",{target:"e5tuigk3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Vt=ut.getLogger("NumberInput");function vt(t){return f(t)||t===""?void 0:t}const kt=t=>(t.element.dataType===I.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,G=({step:t,dataType:e})=>t||(e===I.DataType.INT?1:.01),B=({value:t,format:e,step:r,dataType:h})=>{if(f(t))return null;let n=vt(e);if(f(n)&&J(r)){const l=r.toString();h===I.DataType.FLOAT&&r!==0&&l.includes(".")&&(n=`%0.${l.split(".")[1].length}f`)}if(f(n))return t.toString();try{return gt.sprintf(n,t)}catch(l){return Vt.warn(`Error in sprintf(${n}, ${t}): ${l}`),String(t)}},xt=(t,e,r)=>f(t)?!1:t-e>=r,Rt=(t,e,r)=>f(t)?!1:t+e<=r,Dt=({disabled:t,element:e,widgetMgr:r,width:h,theme:n,fragmentId:l})=>{var O;const{dataType:w,id:R,formId:p,default:W,format:A}=e,b=e.hasMin?e.min:-1/0,m=e.hasMax?e.max:1/0,[s,Z]=o.useState(G(e)),H=kt({element:e,widgetMgr:r}),[g,T]=o.useState(!1),[i,C]=o.useState(H),[P,S]=o.useState(B({value:H,...e,step:s})),[L,U]=o.useState(!1),D=o.useRef(null),$=o.useRef(yt("number_input_")),V=xt(i,s,b),v=Rt(i,s,m),_=ct({formId:p}),tt=_?r.allowFormEnterToSubmit(p):g,et=L&&h>n.breakpoints.hideWidgetDetails;o.useEffect(()=>{Z(G({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=o.useCallback(({value:a,source:d})=>{var y;if(J(a)&&(b>a||a>m))(y=D.current)==null||y.reportValidity();else{const k=a??W??null;switch(w){case I.DataType.INT:r.setIntValue({id:R,formId:p},k,d,l);break;case I.DataType.FLOAT:r.setDoubleValue({id:R,formId:p},k,d,l);break;default:throw new Error("Invalid data type")}T(!1),C(k),S(B({value:k,dataType:w,format:A,step:s}))}},[b,m,D,r,l,s,w,R,p,W,A]),ot=o.useCallback(()=>{g&&u({value:i,source:{fromUi:!0}}),U(!1)},[g,i,u]),rt=o.useCallback(()=>{U(!0)},[]),j=o.useCallback(()=>{const{value:a}=e;e.setValue=!1,C(a??null),S(B({value:a??null,...e,step:s})),u({value:a??null,source:{fromUi:!1}})},[e,s,u]);o.useEffect(()=>{e.setValue?j():u({value:i,source:{fromUi:!1}})},[]),e.setValue&&j();const F=f(e.default)&&!t,nt=o.useCallback(()=>{const a=e.default??null;C(a),u({value:a,source:{fromUi:!0}})},[e]);It({element:e,widgetMgr:r,onFormCleared:nt});const at=a=>{const{value:d}=a.target;if(d==="")T(!0),C(null),S(null);else{let y;e.dataType===I.DataType.INT?y=parseInt(d,10):y=parseFloat(d),T(!0),C(y),S(d)}},N=o.useCallback(()=>{v&&(T(!0),u({value:(i??b)+s,source:{fromUi:!0}}))},[i,b,s,v]),E=o.useCallback(()=>{V&&(T(!0),u({value:(i??m)-s,source:{fromUi:!0}}))},[i,m,s,V]),st=o.useCallback(a=>{const{key:d}=a;switch(d){case"ArrowUp":a.preventDefault(),N();break;case"ArrowDown":a.preventDefault(),E();break}},[N,E]),it=o.useCallback(a=>{a.key==="Enter"&&(g&&u({value:i,source:{fromUi:!0}}),r.allowFormEnterToSubmit(p)&&r.submitForm(p,l))},[g,i,u,r,p,l]);return z("div",{className:"stNumberInput","data-testid":"stNumberInput",style:{width:h},children:[c(mt,{label:e.label,disabled:t,labelVisibility:dt((O=e.labelVisibility)==null?void 0:O.value),htmlFor:$.current,children:e.help&&c(pt,{children:c(ft,{content:e.help,placement:bt.TOP_RIGHT})})}),z(Ct,{className:L?"focused":"","data-testid":"stNumberInputContainer",children:[c(Tt,{type:"number",inputRef:D,value:P??"",placeholder:e.placeholder,onBlur:ot,onFocus:rt,onChange:at,onKeyPress:it,onKeyDown:st,clearable:F,clearOnEscape:F,disabled:t,"aria-label":e.label,id:$.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:n.colors.darkGray,padding:n.spacing.threeXS,height:n.sizes.clearIconSize,width:n.sizes.clearIconSize,":hover":{fill:n.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:b,max:m,type:"number",inputMode:""},style:{lineHeight:n.lineHeights.inputWidget,paddingRight:n.spacing.sm,paddingLeft:n.spacing.sm,paddingBottom:n.spacing.sm,paddingTop:n.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0}}}}),h>n.breakpoints.hideNumberInputControls&&z(wt,{children:[c(q,{"data-testid":"stNumberInputStepDown",onClick:E,disabled:!V||t,tabIndex:-1,children:c(K,{content:Q,size:"xs",color:V?"inherit":n.colors.disabled})}),c(q,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!v||t,tabIndex:-1,children:c(K,{content:Y,size:"xs",color:v?"inherit":n.colors.disabled})})]})]}),et&&c(St,{clearable:F,children:c(ht,{dirty:g,value:P??"",inForm:_,allowEnterToSubmit:tt})})]})},Ht=lt(Dt);export{Ht as default};
|