streamlit-nightly 1.39.1.dev20241009__py2.py3-none-any.whl → 1.39.1.dev20241011__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/__init__.py +1 -0
- streamlit/elements/widgets/button_group.py +125 -1
- streamlit/runtime/caching/cache_utils.py +8 -1
- streamlit/static/asset-manifest.json +13 -14
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/223.8bd97055.chunk.js +1 -0
- streamlit/static/static/js/3224.fb4ce2a4.chunk.js +1 -0
- streamlit/static/static/js/4856.03868952.chunk.js +2 -0
- streamlit/static/static/js/5849.e92568db.chunk.js +1 -0
- streamlit/static/static/js/6073.192808c1.chunk.js +1 -0
- streamlit/static/static/js/6141.d2879825.chunk.js +1 -0
- streamlit/static/static/js/8148.aed4a6f0.chunk.js +1 -0
- streamlit/static/static/js/8237.5de71f48.chunk.js +1 -0
- streamlit/static/static/js/{8460.3529d92b.chunk.js → 8460.40cba8ba.chunk.js} +1 -1
- streamlit/static/static/js/9923.21b1d895.chunk.js +1 -0
- streamlit/static/static/js/9943.d54fcda3.chunk.js +1 -0
- streamlit/static/static/js/main.7269acf4.js +28 -0
- {streamlit_nightly-1.39.1.dev20241009.dist-info → streamlit_nightly-1.39.1.dev20241011.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.39.1.dev20241009.dist-info → streamlit_nightly-1.39.1.dev20241011.dist-info}/RECORD +25 -26
- streamlit/static/static/js/1780.3f47c955.chunk.js +0 -1
- streamlit/static/static/js/2133.68768c00.chunk.js +0 -1
- streamlit/static/static/js/223.7f001ddb.chunk.js +0 -1
- streamlit/static/static/js/238.8d3a7d25.chunk.js +0 -1
- streamlit/static/static/js/6141.43a8fda3.chunk.js +0 -1
- streamlit/static/static/js/7612.3f409b56.chunk.js +0 -2
- streamlit/static/static/js/8148.0afeecaa.chunk.js +0 -1
- streamlit/static/static/js/8237.b58252d4.chunk.js +0 -1
- streamlit/static/static/js/8776.4a234e13.chunk.js +0 -1
- streamlit/static/static/js/9923.50362c7d.chunk.js +0 -1
- streamlit/static/static/js/9943.29cd4b6c.chunk.js +0 -1
- streamlit/static/static/js/main.250379ed.js +0 -28
- /streamlit/static/static/js/{7612.3f409b56.chunk.js.LICENSE.txt → 4856.03868952.chunk.js.LICENSE.txt} +0 -0
- /streamlit/static/static/js/{main.250379ed.js.LICENSE.txt → main.7269acf4.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.39.1.dev20241009.data → streamlit_nightly-1.39.1.dev20241011.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.39.1.dev20241009.dist-info → streamlit_nightly-1.39.1.dev20241011.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.39.1.dev20241009.dist-info → streamlit_nightly-1.39.1.dev20241011.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.39.1.dev20241009.dist-info → streamlit_nightly-1.39.1.dev20241011.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8148],{67163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var s=n(58878),o=n(68262),i=n(13170),r=n(84996),d=n(22044);const l=(0,n(89653).A)("div",{target:"e1uym6o70"})((e=>{let{theme:t,isFullScreen:n}=e;return{"& *":{fontFamily:t.genericFonts.bodyFont,fontSize:`calc(${t.fontSizes.twoSm} * 0.8)`},"& svg":{maxWidth:"100%",width:n?"100%":"auto",height:n?"100%":"auto"},width:n?"100%":"auto",height:n?"100%":"auto"}}),"");var a=n(90782);const c=(0,d.A)((function(e){let{element:t,isFullScreen:n}=e;const d=`st-graphviz-chart-${t.elementId}`;return(0,s.useEffect)((()=>{try{if((0,i.graphviz)(`#${d}`).zoom(!1).fit(!0).scale(1).engine(t.engine).renderDot(t.spec),n||t.useContainerWidth){const e=(0,o.Ltv)(`#${d} > svg`).node();e.removeAttribute("width"),e.removeAttribute("height")}}catch(e){(0,r.vV)(e)}}),[d,t.engine,t.spec,t.useContainerWidth,n]),(0,a.jsx)(l,{className:"stGraphVizChart","data-testid":"stGraphVizChart",id:d,isFullScreen:n})}))},22044:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var s=n(58878),o=n(53124),i=n.n(o),r=n(8151),d=n(41514),l=n(67214),a=n(64611),c=n(84152),h=n(89653);const u=(0,h.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const s=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...s,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),p=(0,h.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=n(90782);class g extends s.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:s,width:o,height:i,disableFullscreenMode:r}=this.props;let c=d.u,h=this.zoomIn,g="View fullscreen";return e&&(c=l.Q,h=this.zoomOut,g="Exit fullscreen"),(0,m.jsxs)(p,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,m.jsx)(a.A,{content:c})}),s(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.n;const x=(0,r.b)(g);const f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends s.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:s,disableFullscreenMode:o}=this.props;return(0,m.jsx)(x,{width:n,height:s,disableFullscreenMode:t||o,children:t=>{let{width:n,height:s,expanded:o,expand:i,collapse:r}=t;return(0,m.jsx)(e,{...this.props,width:n,height:s,isFullScreen:o,expand:i,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(n,e)}},34654:()=>{},7908:()=>{},62292:()=>{}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8237],{78237:(e,o,t)=>{t.r(o),t.d(o,{default:()=>w});var l=t(58878),n=t(8151),i=t(43978),r=t(29669),s=t(22044),c=t(25571),a=t(34752),d=t(37638),p=t.n(d),u=t(58144),h=t(67253),m=t(84996);function f(e,o,t){return e=function(e,o){return(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll("#000032",(0,u.$E)(o))).replaceAll("#000033",(0,u.pf)(o))).replaceAll("#000034",(0,u.h7)(o))).replaceAll("#000035",(0,u.V9)(o))).replaceAll("#000036",(0,u.lH)(o))).replaceAll("#000037",(0,u.ZA)(o))).replaceAll("#000038",o.colors.bgColor)).replaceAll("#000039",o.colors.fadedText05)).replaceAll("#000040",o.colors.bgMix)}(e,o),e=function(e,o,t){const l="#000001",n="#000002",i="#000003",r="#000004",s="#000005",c="#000006",a="#000007",d="#000008",p="#000009",h="#000010";if("streamlit"===t){const t=(0,u.c6)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#636efa")).replaceAll(n,"#EF553B")).replaceAll(i,"#00cc96")).replaceAll(r,"#ab63fa")).replaceAll(s,"#FFA15A")).replaceAll(c,"#19d3f3")).replaceAll(a,"#FF6692")).replaceAll(d,"#B6E880")).replaceAll(p,"#FF97FF")).replaceAll(h,"#FECB52");return e}(e,o,t),e=function(e,o,t){const l="#000011",n="#000012",i="#000013",r="#000014",s="#000015",c="#000016",a="#000017",d="#000018",p="#000019",h="#000020";if("streamlit"===t){const t=(0,u.rp)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#0d0887")).replaceAll(n,"#46039f")).replaceAll(i,"#7201a8")).replaceAll(r,"#9c179e")).replaceAll(s,"#bd3786")).replaceAll(c,"#d8576b")).replaceAll(a,"#ed7953")).replaceAll(d,"#fb9f3a")).replaceAll(p,"#fdca26")).replaceAll(h,"#f0f921");return e}(e,o,t),e=function(e,o,t){const l="#000021",n="#000022",i="#000023",r="#000024",s="#000025",c="#000026",a="#000027",d="#000028",p="#000029",h="#000030",m="#000031";if("streamlit"===t){const t=(0,u.vk)(o);e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,t[0])).replaceAll(n,t[1])).replaceAll(i,t[2])).replaceAll(r,t[3])).replaceAll(s,t[4])).replaceAll(c,t[5])).replaceAll(a,t[6])).replaceAll(d,t[7])).replaceAll(p,t[8])).replaceAll(h,t[9])).replaceAll(m,t[10])}else e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(l,"#8e0152")).replaceAll(n,"#c51b7d")).replaceAll(i,"#de77ae")).replaceAll(r,"#f1b6da")).replaceAll(s,"#fde0ef")).replaceAll(c,"#f7f7f7")).replaceAll(a,"#e6f5d0")).replaceAll(d,"#b8e186")).replaceAll(p,"#7fbc41")).replaceAll(h,"#4d9221")).replaceAll(m,"#276419");return e}(e,o,t),e}function g(e,o){try{!function(e,o){const{genericFonts:t,colors:l,fontSizes:n}=o,i={font:{color:(0,u.lH)(o),family:t.bodyFont,size:n.twoSmPx},title:{color:l.headingColor,subtitleColor:l.bodyText,font:{family:t.headingFont,size:n.mdPx,color:l.headingColor},pad:{l:o.spacing.twoXSPx},xanchor:"left",x:0},legend:{title:{font:{size:n.twoSmPx,color:(0,u.lH)(o)},side:"top"},valign:"top",bordercolor:l.transparent,borderwidth:o.spacing.nonePx,font:{size:n.twoSmPx,color:(0,u.ZA)(o)}},paper_bgcolor:l.bgColor,plot_bgcolor:l.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:(0,u.V9)(o),title:{font:{color:(0,u.lH)(o),size:n.smPx},standoff:o.spacing.twoXLPx},tickcolor:(0,u.V9)(o),tickfont:{color:(0,u.lH)(o),size:n.twoSmPx},gridcolor:(0,u.V9)(o),minor:{gridcolor:(0,u.V9)(o)},automargin:!0},xaxis:{zerolinecolor:(0,u.V9)(o),gridcolor:(0,u.V9)(o),showgrid:!1,tickfont:{color:(0,u.lH)(o),size:n.twoSmPx},tickcolor:(0,u.V9)(o),title:{font:{color:(0,u.lH)(o),size:n.smPx},standoff:o.spacing.xlPx},minor:{gridcolor:(0,u.V9)(o)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:l.bgColor,bordercolor:(0,u.V9)(o),borderwidth:1,x:0}},margin:{pad:o.spacing.smPx,r:o.spacing.nonePx,l:o.spacing.nonePx},hoverlabel:{bgcolor:l.bgColor,bordercolor:l.borderColor,font:{color:(0,u.lH)(o),family:t.bodyFont,size:n.twoSmPx}},coloraxis:{colorbar:{thickness:16,xpad:o.spacing.twoXLPx,ticklabelposition:"outside",outlinecolor:l.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:(0,u.lH)(o),size:n.smPx}},tickfont:{color:(0,u.lH)(o),size:n.twoSmPx}}},ternary:{gridcolor:(0,u.lH)(o),bgcolor:l.bgColor,title:{font:{family:t.bodyFont,size:n.smPx}},color:(0,u.lH)(o),aaxis:{gridcolor:(0,u.lH)(o),linecolor:(0,u.lH)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},baxis:{linecolor:(0,u.lH)(o),gridcolor:(0,u.lH)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}},caxis:{linecolor:(0,u.lH)(o),gridcolor:(0,u.lH)(o),tickfont:{family:t.bodyFont,size:n.twoSmPx}}}};p()(e,i)}(e.layout.template.layout,o)}catch(t){const e=(0,h.$)(t);(0,m.vV)(e)}"title"in e.layout&&(e.layout.title=p()(e.layout.title,{text:`<b>${e.layout.title.text}</b>`}))}var y=t(90782);const x={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},v={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function A(e,o,t){const l=JSON.parse(f(JSON.stringify(e),t,o));return"streamlit"===o?g(l,t):l.layout=function(e,o){const{colors:t,genericFonts:l}=o,n={font:{color:t.bodyText,family:l.bodyFont},paper_bgcolor:t.bgColor,plot_bgcolor:t.secondaryBg};return{...e,font:{...n.font,...e.font},paper_bgcolor:e.paper_bgcolor||n.paper_bgcolor,plot_bgcolor:e.plot_bgcolor||n.plot_bgcolor}}(l.layout,t),l}function b(e,o,t,l){if(!e)return;const n={selection:{points:[],point_indices:[],box:[],lasso:[]}},i=new Set,s=[],a=[],d=[],{selections:p,points:u}=e;if(u&&u.forEach((function(e){d.push({...e,legendgroup:e.data.legendgroup||void 0,data:void 0,fullData:void 0}),(0,c.se)(e.pointIndex)&&i.add(e.pointIndex),(0,c.se)(e.pointIndices)&&e.pointIndices.length>0&&e.pointIndices.forEach((e=>i.add(e)))})),p&&p.forEach((e=>{if("rect"===e.type){const o=function(e){return"x0"in e&&"x1"in e&&"y0"in e&&"y1"in e?{x:[e.x0,e.x1],y:[e.y0,e.y1]}:{x:[],y:[]}}(e),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};s.push(t)}if("path"===e.type){const o=function(e){if(""===e)return{x:[],y:[]};const o=e.replace("M","").replace("Z","").split("L"),t=[],l=[];return o.forEach((e=>{const[o,n]=e.split(",").map(Number);t.push(o),l.push(n)})),{x:t,y:l}}(e.path),t={xref:e.xref,yref:e.yref,x:o.x,y:o.y};a.push(t)}})),n.selection.point_indices=Array.from(i),n.selection.points=d.map((e=>(0,c.wJ)(e))),n.selection.box=s,n.selection.lasso=a,n.selection.box.length>0&&!t.selectionMode.includes(r.P_.SelectionMode.BOX))return;if(n.selection.lasso.length>0&&!t.selectionMode.includes(r.P_.SelectionMode.LASSO))return;const h=o.getStringValue(t),m=JSON.stringify(n);h!==m&&o.setStringValue(t,m,{fromUi:!0},l)}const w=(0,s.A)((function(e){var o,t,s,c,d;let{element:p,width:u,height:h,widgetMgr:m,disabled:f,fragmentId:g,isFullScreen:w,expand:S,collapse:z,disableFullscreenMode:F}=e;const C=(0,n.u)(),M=(0,l.useMemo)((()=>p.spec?JSON.parse(p.spec):{layout:{},data:[],frames:void 0}),[p.id,p.spec]),[P,H]=(0,l.useState)((()=>{const e=m.getElementState(p.id,"figure");return e||A(M,p.theme,C)})),k=p.selectionMode.length>0&&!f,I=k&&p.selectionMode.includes(r.P_.SelectionMode.LASSO),V=k&&p.selectionMode.includes(r.P_.SelectionMode.BOX),E=k&&p.selectionMode.includes(r.P_.SelectionMode.POINTS),_=(0,l.useMemo)((()=>{if(!p.config)return{};const e=JSON.parse(p.config);var o;F||(e.modeBarButtonsToAdd=[{name:w?"Close fullscreen":"Fullscreen",icon:w?v:x,click:()=>{w&&z?z():S&&S()}},...null!==(o=e.modeBarButtonsToAdd)&&void 0!==o?o:[]]);if(!e.modeBarButtonsToRemove){e.displaylogo=!1;const o=["sendDataToCloud"];k?(I||o.push("lasso2d"),V||o.push("select2d")):o.push("lasso2d","select2d"),e.modeBarButtonsToRemove=o}return e}),[p.id,p.config,w,F,k,I,V,z,S]);(0,l.useEffect)((()=>{H((e=>A(e,p.theme,C)))}),[p.id,C,p.theme]),(0,l.useEffect)((()=>{let e=M.layout.clickmode,o=M.layout.hovermode,t=M.layout.dragmode;f?(e="none",t="pan"):k&&(M.layout.clickmode||(e=E?"event+select":"none"),M.layout.hovermode||(o="closest"),M.layout.dragmode||(t=E?"pan":V?"select":I?"lasso":"pan")),H((l=>l.layout.clickmode===e&&l.layout.hovermode===o&&l.layout.dragmode===t?l:{...l,layout:{...l.layout,clickmode:e,hovermode:o,dragmode:t}}))}),[p.id,k,E,V,I,f]);let L=-1===u?null===(o=P.layout)||void 0===o?void 0:o.width:Math.max(p.useContainerWidth?u:Math.min(null!==(t=M.layout.width)&&void 0!==t?t:u,u),150),T=M.layout.height;w&&(L=u,T=h),P.layout.height===T&&P.layout.width===L||H((e=>({...e,layout:{...e.layout,height:T,width:L}})));const W=(0,l.useCallback)((e=>{b(e,m,p,g)}),[p.id,m,g]),B=(0,l.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!function(e,o,t){const l=e.getStringValue(o),n=JSON.stringify({selection:{points:[],point_indices:[],box:[],lasso:[]}});l!==n&&e.setStringValue(o,n,{fromUi:!0},t)}(m,p,g),e&&setTimeout((()=>{H((e=>({...e,data:e.data.map((e=>({...e,selectedpoints:null}))),layout:{...e.layout,selections:[]}})))}),50)}),[p.id,m,g]);return(0,l.useEffect)((()=>{if(!p.formId||!k)return;const e=new a.o;return e.manageFormClearListener(m,p.formId,B),()=>{e.disconnect()}}),[p.formId,m,k,B]),(0,l.useEffect)((()=>{var e,o,t;if(!k)return;let l;l="select"===(null===(e=P.layout)||void 0===e?void 0:e.dragmode)||"lasso"===(null===(o=P.layout)||void 0===o?void 0:o.dragmode)?"event":E?"event+select":"none",(null===(t=P.layout)||void 0===t?void 0:t.clickmode)!==l&&H((e=>({...e,layout:{...e.layout,clickmode:l}})))}),[null===(s=P.layout)||void 0===s?void 0:s.dragmode]),(0,y.jsx)("div",{className:"stPlotlyChart","data-testid":"stPlotlyChart",children:(0,y.jsx)(i.A,{data:P.data,layout:P.layout,config:_,frames:null!==(c=P.frames)&&void 0!==c?c:void 0,style:{visibility:void 0===(null===(d=P.layout)||void 0===d?void 0:d.width)?"hidden":void 0},onSelected:k?W:()=>{},onDoubleClick:k?()=>B():void 0,onDeselect:k?()=>{B(!1)}:void 0,onInitialized:e=>{m.setElementState(p.id,"figure",e)},onUpdate:e=>{m.setElementState(p.id,"figure",e),H(e)}},w?"fullscreen":"original")})}),!0)},22044:(e,o,t)=>{t.d(o,{A:()=>y});var l=t(58878),n=t(53124),i=t.n(n),r=t(8151),s=t(41514),c=t(67214),a=t(64611),d=t(84152),p=t(89653);const u=(0,p.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:o,theme:t}=e;const l=o?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:t.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:t.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:t.colors.fadedText60,borderRadius:"50%",...l,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:t.colors.bodyText,transition:"none"}}}),""),h=(0,p.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:o,isExpanded:t}=e;return{"&:hover":{[u]:{opacity:1,transform:"scale(1)",transition:"none"}},...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:o.colors.bgColor,zIndex:o.zIndices.fullscreenWrapper,padding:o.spacing.md,paddingTop:o.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var m=t(90782);class f extends l.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:o}=this.state;27===e.keyCode&&o&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),o=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+o)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:o,fullHeight:t}=this.state,{children:l,width:n,height:i,disableFullscreenMode:r}=this.props;let d=s.u,p=this.zoomIn,f="View fullscreen";return e&&(d=c.Q,p=this.zoomOut,f="Exit fullscreen"),(0,m.jsxs)(h,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,m.jsx)(u,{"data-testid":"StyledFullScreenButton",onClick:p,title:f,isExpanded:e,children:(0,m.jsx)(a.A,{content:d})}),l(e?{width:o,height:t,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:n,height:i,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}f.contextType=d.n;const g=(0,r.b)(f);const y=function(e){let o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class t extends l.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:t,height:l,disableFullscreenMode:n}=this.props;return(0,m.jsx)(g,{width:t,height:l,disableFullscreenMode:o||n,children:o=>{let{width:t,height:l,expanded:n,expand:i,collapse:r}=o;return(0,m.jsx)(e,{...this.props,width:t,height:l,isFullScreen:n,expand:i,collapse:r})}})}}}return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,i()(t,e)}},34752:(e,o,t)=>{t.d(o,{X:()=>r,o:()=>i});var l=t(58878),n=t(25571);class i{constructor(){this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}manageFormClearListener(e,o,t){(0,n.se)(this.formClearListener)&&this.lastWidgetMgr===e&&this.lastFormId===o||(this.disconnect(),(0,n._L)(o)&&(this.formClearListener=e.addFormClearedListener(o,t),this.lastWidgetMgr=e,this.lastFormId=o))}disconnect(){var e;null===(e=this.formClearListener)||void 0===e||e.disconnect(),this.formClearListener=void 0,this.lastWidgetMgr=void 0,this.lastFormId=void 0}}function r(e){let{element:o,widgetMgr:t,onFormCleared:i}=e;(0,l.useEffect)((()=>{if(!(0,n._L)(o.formId))return;const e=t.addFormClearedListener(o.formId,i);return()=>{e.disconnect()}}),[o,t,i])}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[8776],{95241:(t,e,i)=>{i.d(e,{e:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))}));o.displayName="Delete"},12274:(t,e,i)=>{i.d(e,{g:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))}));o.displayName="Fullscreen"},63186:(t,e,i)=>{i.d(e,{Q:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))}));o.displayName="FullscreenExit"},96626:(t,e,i)=>{i.d(e,{G:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("g",{fill:"none"},s.createElement("rect",{width:24,height:24}),s.createElement("rect",{width:24,height:24}),s.createElement("rect",{width:24,height:24})),s.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),s.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))}));o.displayName="Mic"},37789:(t,e,i)=>{i.d(e,{v:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("rect",{width:24,height:24,fill:"none"}),s.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))}));o.displayName="Pause"},14757:(t,e,i)=>{i.d(e,{S:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("rect",{width:24,height:24,fill:"none"}),s.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))}));o.displayName="PlayArrow"},88685:(t,e,i)=>{i.d(e,{C:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))}));o.displayName="Refresh"},34783:(t,e,i)=>{i.d(e,{X:()=>o});var r=i(68102),s=i(58878),n=i(68622),o=s.forwardRef((function(t,e){return s.createElement(n.I,(0,r.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),s.createElement("g",{fill:"none"},s.createElement("rect",{width:24,height:24}),s.createElement("rect",{width:24,height:24})),s.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))}));o.displayName="StopCircle"},56146:(t,e,i)=>{function r(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{h(r.next(t))}catch(t){n(t)}}function a(t){try{h(r.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((r=r.apply(t,e||[])).next())}))}i.d(e,{A:()=>h}),"function"==typeof SuppressedError&&SuppressedError;class s{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),null==i?void 0:i.once){const i=()=>{this.un(t,i),this.un(t,e)};return this.on(t,i),i}return()=>this.un(t,e)}un(t,e){var i;null===(i=this.listeners[t])||void 0===i||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];this.listeners[t]&&this.listeners[t].forEach((t=>t(...i)))}}class n extends s{constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((t=>t()))}}class o extends s{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}const a=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class h extends n{constructor(t){var e,i,r,s,n;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:null!==(e=t.audioBitsPerSecond)&&void 0!==e?e:128e3,scrollingWaveform:null!==(i=t.scrollingWaveform)&&void 0!==i&&i,scrollingWaveformWindow:null!==(r=t.scrollingWaveformWindow)&&void 0!==r?r:5,renderRecordedAudio:null===(s=t.renderRecordedAudio)||void 0===s||s,mediaRecorderTimeslice:null!==(n=t.mediaRecorderTimeslice)&&void 0!==n?n:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.timer=new o,this.subscriptions.push(this.timer.on("tick",(()=>{const t=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+t,this.emit("record-progress",this.duration)})))}static create(t){return new h(t||{})}renderMicStream(t){const e=new AudioContext,i=e.createMediaStreamSource(t),r=e.createAnalyser();i.connect(r);const s=r.frequencyBinCount,n=new Float32Array(s);let o;const a=Math.floor((this.options.scrollingWaveformWindow||0)*e.sampleRate),h=()=>{var t;if(this.isWaveformPaused)return void(o=requestAnimationFrame(h));if(r.getFloatTimeDomainData(n),this.options.scrollingWaveform){const t=Math.min(a,this.dataWindow?this.dataWindow.length+s:s),e=new Float32Array(a);if(this.dataWindow){const i=Math.max(0,a-this.dataWindow.length);e.set(this.dataWindow.slice(-t+s),i)}e.set(n,a-s),this.dataWindow=e}else this.dataWindow=n;const e=this.options.scrollingWaveformWindow;this.wavesurfer&&(null!==(t=this.originalOptions)&&void 0!==t||(this.originalOptions={cursorWidth:this.wavesurfer.options.cursorWidth,interact:this.wavesurfer.options.interact}),this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.interact=!1,this.wavesurfer.load("",[this.dataWindow],e)),o=requestAnimationFrame(h)};return h(),{onDestroy:()=>{cancelAnimationFrame(o),null==i||i.disconnect(),null==e||e.close()},onEnd:()=>{this.isWaveformPaused=!0,cancelAnimationFrame(o),this.stopMic()}}}startMic(t){return r(this,void 0,void 0,(function*(){let e;try{e=yield navigator.mediaDevices.getUserMedia({audio:!(null==t?void 0:t.deviceId)||{deviceId:t.deviceId}})}catch(e){throw new Error("Error accessing the microphone: "+e.message)}const{onDestroy:i,onEnd:r}=this.renderMicStream(e);return this.subscriptions.push(this.once("destroy",i)),this.subscriptions.push(this.once("record-end",r)),this.stream=e,e}))}stopMic(){this.stream&&(this.stream.getTracks().forEach((t=>t.stop())),this.stream=null,this.mediaRecorder=null)}startRecording(t){return r(this,void 0,void 0,(function*(){const e=this.stream||(yield this.startMic(t));this.dataWindow=null;const i=this.mediaRecorder||new MediaRecorder(e,{mimeType:this.options.mimeType||a.find((t=>MediaRecorder.isTypeSupported(t))),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=i,this.stopRecording();const r=[];i.ondataavailable=t=>{t.data.size>0&&r.push(t.data),this.emit("record-data-available",t.data)};const s=t=>{var e;const s=new Blob(r,{type:i.mimeType});this.emit(t,s),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),null===(e=this.wavesurfer)||void 0===e||e.load(URL.createObjectURL(s)))};i.onpause=()=>s("record-pause"),i.onstop=()=>s("record-end"),i.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")}))}getDuration(){return this.duration}isRecording(){var t;return"recording"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isPaused(){var t;return"paused"===(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}isActive(){var t;return"inactive"!==(null===(t=this.mediaRecorder)||void 0===t?void 0:t.state)}stopRecording(){var t;this.isActive()&&(null===(t=this.mediaRecorder)||void 0===t||t.stop(),this.timer.stop())}pauseRecording(){var t,e;this.isRecording()&&(this.isWaveformPaused=!0,null===(t=this.mediaRecorder)||void 0===t||t.requestData(),null===(e=this.mediaRecorder)||void 0===e||e.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,null===(t=this.mediaRecorder)||void 0===t||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return r(this,void 0,void 0,(function*(){return navigator.mediaDevices.enumerateDevices().then((t=>t.filter((t=>"audioinput"===t.kind))))}))}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic()}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.options.cursorWidth=this.originalOptions.cursorWidth,this.wavesurfer.options.interact=this.originalOptions.interact,delete this.originalOptions)}}},19613:(t,e,i)=>{function r(t,e,i,r){return new(i||(i=Promise))((function(s,n){function o(t){try{h(r.next(t))}catch(t){n(t)}}function a(t){try{h(r.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?s(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,a)}h((r=r.apply(t,e||[])).next())}))}i.d(e,{A:()=>v}),"function"==typeof SuppressedError&&SuppressedError;class s{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),null==i?void 0:i.once){const i=()=>{this.un(t,i),this.un(t,e)};return this.on(t,i),i}return()=>this.un(t,e)}un(t,e){var i;null===(i=this.listeners[t])||void 0===i||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];this.listeners[t]&&this.listeners[t].forEach((t=>t(...i)))}}const n={decode:function(t,e){return r(this,void 0,void 0,(function*(){const i=new AudioContext({sampleRate:e});return i.decodeAudioData(t).finally((()=>i.close()))}))},createBuffer:function(t,e){return"number"==typeof t[0]&&(t=[t]),function(t){const e=t[0];if(e.some((t=>t>1||t<-1))){const i=e.length;let r=0;for(let t=0;t<i;t++){const i=Math.abs(e[t]);i>r&&(r=i)}for(const e of t)for(let t=0;t<i;t++)e[t]/=r}}(t),{duration:e,length:t[0].length,sampleRate:t[0].length/e,numberOfChannels:t.length,getChannelData:e=>null==t?void 0:t[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function o(t,e){const i=e.xmlns?document.createElementNS(e.xmlns,t):document.createElement(t);for(const[r,s]of Object.entries(e))if("children"===r)for(const[t,n]of Object.entries(e))"string"==typeof n?i.appendChild(document.createTextNode(n)):i.appendChild(o(t,n));else"style"===r?Object.assign(i.style,s):"textContent"===r?i.textContent=s:i.setAttribute(r,s.toString());return i}function a(t,e,i){const r=o(t,e||{});return null==i||i.appendChild(r),r}var h=Object.freeze({__proto__:null,createElement:a,default:a});const l={fetchBlob:function(t,e,i){return r(this,void 0,void 0,(function*(){const s=yield fetch(t,i);if(s.status>=400)throw new Error(`Failed to fetch ${t}: ${s.status} (${s.statusText})`);return function(t,e){r(this,void 0,void 0,(function*(){if(!t.body||!t.headers)return;const i=t.body.getReader(),s=Number(t.headers.get("Content-Length"))||0;let n=0;const o=t=>r(this,void 0,void 0,(function*(){n+=(null==t?void 0:t.length)||0;const i=Math.round(n/s*100);e(i)})),a=()=>r(this,void 0,void 0,(function*(){let t;try{t=yield i.read()}catch(t){return}t.done||(o(t.value),yield a())}));a()}))}(s.clone(),e),s.blob()}))}};class d extends s{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),null!=t.playbackRate&&this.onMediaEvent("canplay",(()=>{null!=t.playbackRate&&(this.media.playbackRate=t.playbackRate)}),{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return""!==this.media.canPlayType(t)}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;try{this.media.src=r}catch(e){this.media.src=t}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return r(this,void 0,void 0,(function*(){return this.media.play()}))}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=t}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){null!=e&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class c extends s{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[r,s]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=s.querySelector(".scroll"),this.wrapper=s.querySelector(".wrapper"),this.canvasWrapper=s.querySelector(".canvases"),this.progressWrapper=s.querySelector(".progress"),this.cursor=s.querySelector(".cursor"),e&&s.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if("string"==typeof t?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=t=>{const e=this.wrapper.getBoundingClientRect(),i=t.clientX-e.left,r=t.clientY-e.top;return[i/e.width,r/e.height]};if(this.wrapper.addEventListener("click",(e=>{const[i,r]=t(e);this.emit("click",i,r)})),this.wrapper.addEventListener("dblclick",(e=>{const[i,r]=t(e);this.emit("dblclick",i,r)})),!0!==this.options.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollContainer,r=t/e,s=(t+i)/e;this.emit("scroll",r,s,t,t+i)})),"function"==typeof ResizeObserver){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{t().then((()=>this.onContainerResize())).catch((()=>{}))})),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&"auto"!==this.options.height||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,r){let s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:3,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:100;if(!t)return()=>{};const a=matchMedia("(pointer: coarse)").matches;let h=()=>{};const l=l=>{if(l.button!==n)return;l.preventDefault(),l.stopPropagation();let d=l.clientX,c=l.clientY,u=!1;const p=Date.now(),m=r=>{if(r.preventDefault(),r.stopPropagation(),a&&Date.now()-p<o)return;const n=r.clientX,h=r.clientY,l=n-d,m=h-c;if(u||Math.abs(l)>s||Math.abs(m)>s){const r=t.getBoundingClientRect(),{left:s,top:o}=r;u||(null==i||i(d-s,c-o),u=!0),e(l,m,n-s,h-o),d=n,c=h}},v=e=>{if(u){const i=e.clientX,s=e.clientY,n=t.getBoundingClientRect(),{left:o,top:a}=n;null==r||r(i-o,s-a)}h()},f=t=>{t.relatedTarget&&t.relatedTarget!==document.documentElement||v(t)},g=t=>{u&&(t.stopPropagation(),t.preventDefault())},b=t=>{u&&t.preventDefault()};document.addEventListener("pointermove",m),document.addEventListener("pointerup",v),document.addEventListener("pointerout",f),document.addEventListener("pointercancel",f),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("click",g,{capture:!0}),h=()=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",v),document.removeEventListener("pointerout",f),document.removeEventListener("pointercancel",f),document.removeEventListener("touchmove",b),setTimeout((()=>{document.removeEventListener("click",g,{capture:!0})}),10)}};return t.addEventListener("pointerdown",l),()=>{h(),t.removeEventListener("pointerdown",l)}}(this.wrapper,((t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))}),(t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}),(t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))})))}getHeight(t,e){var i;const r=(null===(i=this.audioData)||void 0===i?void 0:i.numberOfChannels)||1;if(null==t)return 128;if(!isNaN(Number(t)))return Number(t);if("auto"===t){const t=this.parent.clientHeight||128;return(null==e?void 0:e.every((t=>!t.overlay)))?t/r:t}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"});return e.innerHTML=`\n <style>\n :host {\n user-select: none;\n min-width: 1px;\n }\n :host audio {\n display: block;\n width: 100%;\n }\n :host .scroll {\n overflow-x: auto;\n overflow-y: hidden;\n width: 100%;\n position: relative;\n }\n :host .noScrollbar {\n scrollbar-color: transparent;\n scrollbar-width: none;\n }\n :host .noScrollbar::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n :host .wrapper {\n position: relative;\n overflow: visible;\n z-index: 2;\n }\n :host .canvases {\n min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;\n }\n :host .canvases > div {\n position: relative;\n }\n :host canvas {\n display: block;\n position: absolute;\n top: 0;\n image-rendering: pixelated;\n }\n :host .progress {\n pointer-events: none;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n overflow: hidden;\n }\n :host .progress > div {\n position: relative;\n }\n :host .cursor {\n pointer-events: none;\n position: absolute;\n z-index: 5;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: 2px;\n }\n </style>\n\n <div class="scroll" part="scroll">\n <div class="wrapper" part="wrapper">\n <div class="canvases" part="canvases"></div>\n <div class="progress" part="progress"></div>\n <div class="cursor" part="cursor"></div>\n </div>\n </div>\n `,[t,e]}setOptions(t){if(this.options.container!==t.container){const e=this.parentFromOptionsContainer(t.container);e.appendChild(this.container),this.parent=e}!0!==t.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:e}=this.scrollContainer,i=e*t;this.setScroll(i)}destroy(){var t,e;this.subscriptions.forEach((t=>t())),this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(e=this.unsubscribeOnScroll)||void 0===e||e.call(this)}createDelay(){let t,e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;const r=()=>{t&&clearTimeout(t),e&&e()};return this.timeouts.push(r),()=>new Promise(((s,n)=>{r(),e=n,t=setTimeout((()=>{t=void 0,e=void 0,s()}),i)}))}convertColorValues(t){if(!Array.isArray(t))return t||"";if(t.length<2)return t[0]||"";const e=document.createElement("canvas"),i=e.getContext("2d"),r=e.height*(window.devicePixelRatio||1),s=i.createLinearGradient(0,0,0,r),n=1/(t.length-1);return t.forEach(((t,e)=>{const i=e*n;s.addColorStop(i,t)})),s}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,e,i,r){const s=t[0],n=t[1]||t[0],o=s.length,{width:a,height:h}=i.canvas,l=h/2,d=this.getPixelRatio(),c=e.barWidth?e.barWidth*d:1,u=e.barGap?e.barGap*d:e.barWidth?c/2:0,p=e.barRadius||0,m=a/(c+u)/o,v=p&&"roundRect"in i?"roundRect":"rect";i.beginPath();let f=0,g=0,b=0;for(let y=0;y<=o;y++){const t=Math.round(y*m);if(t>f){const s=Math.round(g*l*r),n=s+Math.round(b*l*r)||1;let o=l-s;"top"===e.barAlign?o=0:"bottom"===e.barAlign&&(o=h-n),i[v](f*(c+u),o,c,n,p),f=t,g=0,b=0}const o=Math.abs(s[y]||0),a=Math.abs(n[y]||0);o>g&&(g=o),a>b&&(b=a)}i.fill(),i.closePath()}renderLineWaveform(t,e,i,r){const s=e=>{const s=t[e]||t[0],n=s.length,{height:o}=i.canvas,a=o/2,h=i.canvas.width/n;i.moveTo(0,a);let l=0,d=0;for(let t=0;t<=n;t++){const n=Math.round(t*h);if(n>l){const t=a+(Math.round(d*a*r)||1)*(0===e?-1:1);i.lineTo(l,t),l=n,d=0}const o=Math.abs(s[t]||0);o>d&&(d=o)}i.lineTo(l,a)};i.beginPath(),s(0),s(1),i.fill(),i.closePath()}renderWaveform(t,e,i){if(i.fillStyle=this.convertColorValues(e.waveColor),e.renderFunction)return void e.renderFunction(t,i);let r=e.barHeight||1;if(e.normalize){const e=Array.from(t[0]).reduce(((t,e)=>Math.max(t,Math.abs(e))),0);r=e?1/e:1}e.barWidth||e.barGap||e.barAlign?this.renderBarWaveform(t,e,i,r):this.renderLineWaveform(t,e,i,r)}renderSingleCanvas(t,e,i,r,s,n,o){const a=this.getPixelRatio(),h=document.createElement("canvas");h.width=Math.round(i*a),h.height=Math.round(r*a),h.style.width=`${i}px`,h.style.height=`${r}px`,h.style.left=`${Math.round(s)}px`,n.appendChild(h);const l=h.getContext("2d");if(this.renderWaveform(t,e,l),h.width>0&&h.height>0){const t=h.cloneNode(),i=t.getContext("2d");i.drawImage(h,0,0),i.globalCompositeOperation="source-in",i.fillStyle=this.convertColorValues(e.progressColor),i.fillRect(0,0,h.width,h.height),o.appendChild(t)}}renderMultiCanvas(t,e,i,r,s,n){const o=this.getPixelRatio(),{clientWidth:a}=this.scrollContainer;if(a*o>=i)return void this.renderSingleCanvas(t,e,a,r,0,s,n);const h=i/o;let l=Math.min(c.MAX_CANVAS_WIDTH,a,h),d={};if(e.barWidth||e.barGap){const t=e.barWidth||.5,i=t+(e.barGap||t/2);l%i!=0&&(l=Math.floor(l/i)*i)}const u=i=>{if(i<0||i>=p)return;if(d[i])return;d[i]=!0;const o=i*l,a=Math.min(h-o,l);if(a<=0)return;const c=t.map((t=>{const e=Math.floor(o/h*t.length),i=Math.floor((o+a)/h*t.length);return t.slice(e,i)}));this.renderSingleCanvas(c,e,a,r,o,s,n)},p=Math.ceil(h/l),m=this.scrollContainer.scrollLeft/h,v=Math.floor(m*p);u(v-1),u(v),u(v+1),p>1&&(this.unsubscribeOnScroll=this.on("scroll",(()=>{const{scrollLeft:t}=this.scrollContainer,e=Math.floor(t/h*p);Object.keys(d).length>c.MAX_NODES&&(s.innerHTML="",n.innerHTML="",d={}),u(e-1),u(e),u(e+1)})))}renderChannel(t,e,i,r){var{overlay:s}=e,n=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(i[r[s]]=t[r[s]])}return i}(e,["overlay"]);const o=document.createElement("div"),a=this.getHeight(n.height,n.splitChannels);o.style.height=`${a}px`,s&&r>0&&(o.style.marginTop=`-${a}px`),this.canvasWrapper.style.minHeight=`${a}px`,this.canvasWrapper.appendChild(o);const h=o.cloneNode();this.progressWrapper.appendChild(h),this.renderMultiCanvas(t,n,i,a,o,h)}render(t){return r(this,void 0,void 0,(function*(){var e;this.timeouts.forEach((t=>t())),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",null!=this.options.width&&(this.scrollContainer.style.width="number"==typeof this.options.width?`${this.options.width}px`:this.options.width);const i=this.getPixelRatio(),r=this.scrollContainer.clientWidth,s=Math.ceil(t.duration*(this.options.minPxPerSec||0));this.isScrollable=s>r;const n=this.options.fillParent&&!this.isScrollable,o=(n?r:s)*i;if(this.wrapper.style.width=n?"100%":`${s}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let a=0;a<t.numberOfChannels;a++){const i=Object.assign(Object.assign({},this.options),null===(e=this.options.splitChannels)||void 0===e?void 0:e[a]);this.renderChannel([t.getChannelData(a)],i,o,a)}else{const e=[t.getChannelData(0)];t.numberOfChannels>1&&e.push(t.getChannelData(1)),this.renderChannel(e,this.options,o,0)}Promise.resolve().then((()=>this.emit("rendered")))}))}reRender(){var t;if(null===(t=this.unsubscribeOnScroll)||void 0===t||t.call(this),delete this.unsubscribeOnScroll,!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:i}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:t}=this.progressWrapper.getBoundingClientRect();let e=t-i;e*=2,e=e<0?Math.floor(e):Math.ceil(e),e/=2,this.scrollContainer.scrollLeft+=e}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{scrollLeft:i,scrollWidth:r,clientWidth:s}=this.scrollContainer,n=t*r,o=i,a=i+s,h=s/2;if(this.isDragging){const t=30;n+t>a?this.scrollContainer.scrollLeft+=t:n-t<o&&(this.scrollContainer.scrollLeft-=t)}else{(n<o||n>a)&&(this.scrollContainer.scrollLeft=n-(this.options.autoCenter?h:0));const t=n-i-h;e&&this.options.autoCenter&&t>0&&(this.scrollContainer.scrollLeft+=Math.min(t,10))}{const t=this.scrollContainer.scrollLeft,e=t/r,i=(t+s)/r;this.emit("scroll",e,i,t,t+s)}}renderProgress(t,e){if(isNaN(t))return;const i=100*t;this.canvasWrapper.style.clipPath=`polygon(${i}% 0, 100% 0, 100% 100%, ${i}% 100%)`,this.progressWrapper.style.width=`${i}%`,this.cursor.style.left=`${i}%`,this.cursor.style.transform=`translateX(-${100===Math.round(i)?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,e)}exportImage(t,e,i){return r(this,void 0,void 0,(function*(){const r=this.canvasWrapper.querySelectorAll("canvas");if(!r.length)throw new Error("No waveform data");if("dataURL"===i){const i=Array.from(r).map((i=>i.toDataURL(t,e)));return Promise.resolve(i)}return Promise.all(Array.from(r).map((i=>new Promise(((r,s)=>{i.toBlob((t=>{t?r(t):s(new Error("Could not export image"))}),t,e)})))))}))}}c.MAX_CANVAS_WIDTH=8e3,c.MAX_NODES=10;class u extends s{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class p extends s{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new AudioContext;super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return r(this,void 0,void 0,(function*(){}))}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then((e=>{if(e.status>=400)throw new Error(`Failed to fetch ${t}: ${e.status} (${e.statusText})`);return e.arrayBuffer()})).then((e=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(e))).then((e=>{this.currentSrc===t&&(this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}))}_play(){var t;if(!this.paused)return;this.paused=!1,null===(t=this.bufferNode)||void 0===t||t.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let e=this.playedDuration*this._playbackRate;e>=this.duration&&(e=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,e),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,null===(t=this.bufferNode)||void 0===t||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return r(this,void 0,void 0,(function*(){this.paused&&(this._play(),this.emit("play"))}))}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){var e,i;const r=t-this.currentTime;null===(e=this.bufferNode)||void 0===e||e.stop(this.audioContext.currentTime+r),null===(i=this.bufferNode)||void 0===i||i.addEventListener("ended",(()=>{this.bufferNode=null,this.pause()}),{once:!0})}setSinkId(t){return r(this,void 0,void 0,(function*(){return this.audioContext.setSinkId(t)}))}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const e=!this.paused;e&&this._pause(),this.playedDuration=t/this._playbackRate,e&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,e;return null!==(t=this._duration)&&void 0!==t?t:(null===(e=this.buffer)||void 0===e?void 0:e.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const e=this.buffer.numberOfChannels;for(let i=0;i<e;i++)t.push(this.buffer.getChannelData(i));return t}}const m={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class v extends d{static create(t){return new v(t)}constructor(t){const e=t.media||("WebAudio"===t.backend?new p:void 0);super({media:e,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},m,t),this.timer=new u;const i=e?void 0:this.getMediaElement();this.renderer=new c(this.options,i),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const r=this.options.url||this.getSrc()||"";Promise.resolve().then((()=>{this.emit("init");const{peaks:t,duration:e}=this.options;(r||t&&e)&&this.load(r,t,e).catch((()=>null))}))}updateProgress(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getCurrentTime();return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",(()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t)}})))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",(()=>{const t=this.updateProgress();this.emit("timeupdate",t)})),this.onMediaEvent("play",(()=>{this.emit("play"),this.timer.start()})),this.onMediaEvent("pause",(()=>{this.emit("pause"),this.timer.stop()})),this.onMediaEvent("emptied",(()=>{this.timer.stop()})),this.onMediaEvent("ended",(()=>{this.emit("finish")})),this.onMediaEvent("seeking",(()=>{this.emit("seeking",this.getCurrentTime())})),this.onMediaEvent("error",(t=>{this.emit("error",t.error)})))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",((t,e)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,e))})),this.renderer.on("dblclick",((t,e)=>{this.emit("dblclick",t,e)})),this.renderer.on("scroll",((t,e,i,r)=>{const s=this.getDuration();this.emit("scroll",t*s,e*s,i,r)})),this.renderer.on("render",(()=>{this.emit("redraw")})),this.renderer.on("rendered",(()=>{this.emit("redrawcomplete")})),this.renderer.on("dragstart",(t=>{this.emit("dragstart",t)})),this.renderer.on("dragend",(t=>{this.emit("dragend",t)})));{let t;this.subscriptions.push(this.renderer.on("drag",(e=>{if(!this.options.interact)return;let i;this.renderer.renderProgress(e),clearTimeout(t),this.isPlaying()?i=0:!0===this.options.dragToSeek?i=200:"object"==typeof this.options.dragToSeek&&void 0!==this.options.dragToSeek&&(i=this.options.dragToSeek.debounceTime),t=setTimeout((()=>{this.seekTo(e)}),i),this.emit("interaction",e*this.getDuration()),this.emit("drag",e)})))}}initPlugins(){var t;(null===(t=this.options.plugins)||void 0===t?void 0:t.length)&&this.options.plugins.forEach((t=>{this.registerPlugin(t)}))}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach((t=>t())),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),null!=t.mediaControls&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){return t._init(this),this.plugins.push(t),this.subscriptions.push(t.once("destroy",(()=>{this.plugins=this.plugins.filter((e=>e!==t))}))),t}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const e=t/this.getDuration();this.renderer.setScrollPercentage(e)}getActivePlugins(){return this.plugins}loadAudio(t,e,i,s){return r(this,void 0,void 0,(function*(){var r;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,!e&&!i){const i=this.options.fetchParams||{};window.AbortController&&!i.signal&&(this.abortController=new AbortController,i.signal=null===(r=this.abortController)||void 0===r?void 0:r.signal);const s=t=>this.emit("loading",t);e=yield l.fetchBlob(t,s,i)}this.setSrc(t,e);const o=yield new Promise((t=>{const e=s||this.getDuration();e?t(e):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",(()=>t(this.getDuration())),{once:!0}))}));if(!t&&!e){const t=this.getMediaElement();t instanceof p&&(t.duration=o)}if(i)this.decodedData=n.createBuffer(i,o||0);else if(e){const t=yield e.arrayBuffer();this.decodedData=yield n.decode(t,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())}))}load(t,e,i){return r(this,void 0,void 0,(function*(){try{return yield this.loadAudio(t,void 0,e,i)}catch(r){throw this.emit("error",r),r}}))}loadBlob(t,e,i){return r(this,void 0,void 0,(function*(){try{return yield this.loadAudio("",t,e,i)}catch(r){throw this.emit("error",r),r}}))}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks(){let{channels:t=2,maxLength:e=8e3,precision:i=1e4}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.decodedData)throw new Error("The audio has not been decoded yet");const r=Math.min(t,this.decodedData.numberOfChannels),s=[];for(let n=0;n<r;n++){const t=this.decodedData.getChannelData(n),r=[],o=t.length/e;for(let s=0;s<e;s++){const e=t.slice(Math.floor(s*o),Math.ceil((s+1)*o));let n=0;for(let t=0;t<e.length;t++){const i=e[t];Math.abs(i)>Math.abs(n)&&(n=i)}r.push(Math.round(n*i)/i)}s.push(r)}return s}getDuration(){let t=super.getDuration()||0;return 0!==t&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const e=this.getDuration()*t;this.setTime(e)}playPause(){return r(this,void 0,void 0,(function*(){return this.isPlaying()?this.pause():this.play()}))}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return r(this,arguments,void 0,(function(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"dataURL";return function*(){return t.renderer.exportImage(e,i,r)}()}))}destroy(){var t;this.emit("destroy"),null===(t=this.abortController)||void 0===t||t.abort(),this.plugins.forEach((t=>t.destroy())),this.subscriptions.forEach((t=>t())),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}v.BasePlugin=class extends s{constructor(t){super(),this.subscriptions=[],this.options=t}onInit(){}_init(t){this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((t=>t()))}},v.dom=h}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9923],{19923:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});n(58878);var i=n(22044),o=n(89653);const s=(0,o.A)("div",{target:"e115fcil2"})((e=>{let{theme:t}=e;return{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg}}),""),r=(0,o.A)("div",{target:"e115fcil1"})({name:"1xf0csu",styles:"display:flex;flex-direction:column;align-items:stretch;width:auto;flex-grow:0"}),l=(0,o.A)("div",{target:"e115fcil0"})((e=>{let{theme:t}=e;return{fontFamily:t.genericFonts.bodyFont,fontSize:t.fontSizes.sm,color:t.colors.fadedText60,textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}}),"");var a,d=n(90782);!function(e){e[e.OriginalWidth=-1]="OriginalWidth",e[e.ColumnWidth=-2]="ColumnWidth",e[e.AutoWidth=-3]="AutoWidth",e[e.MinImageOrContainer=-4]="MinImageOrContainer",e[e.MaxImageOrContainer=-5]="MaxImageOrContainer"}(a||(a={}));const c=(0,i.A)((function(e){let t,{width:n,isFullScreen:i,element:o,height:c,endpoints:h}=e;const m=o.width;if([a.OriginalWidth,a.AutoWidth,a.MinImageOrContainer].includes(m))t=void 0;else if([a.ColumnWidth,a.MaxImageOrContainer].includes(m))t=n;else{if(!(m>0))throw Error(`Invalid image width: ${m}`);t=m}const u={};return c&&i?(u.maxHeight=c,u.objectFit="contain"):(u.width=t,u.maxWidth="100%"),(0,d.jsx)(s,{className:"stImage","data-testid":"stImage",style:{width:n},children:o.imgs.map(((e,t)=>{const n=e;return(0,d.jsxs)(r,{"data-testid":"stImageContainer",children:[(0,d.jsx)("img",{style:u,src:h.buildMediaURL(n.url),alt:t.toString()}),n.caption&&(0,d.jsx)(l,{"data-testid":"stImageCaption",style:u,children:` ${n.caption} `})]},t)}))})}))},22044:(e,t,n)=>{n.d(t,{A:()=>f});var i=n(58878),o=n(53124),s=n.n(o),r=n(8151),l=n(41514),a=n(67214),d=n(64611),c=n(84152),h=n(89653);const m=(0,h.A)("button",{target:"e1vs0wn31"})((e=>{let{isExpanded:t,theme:n}=e;const i=t?{right:"0.4rem",top:"0.5rem",backgroundColor:"transparent"}:{right:"-3.0rem",top:"-0.375rem",opacity:0,transform:"scale(0)",backgroundColor:n.colors.lightenedBg05};return{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",zIndex:n.zIndices.sidebar+1,height:"2.5rem",width:"2.5rem",transition:"opacity 300ms 150ms, transform 300ms 150ms",border:"none",color:n.colors.fadedText60,borderRadius:"50%",...i,"&:focus":{outline:"none"},"&:active, &:focus-visible, &:hover":{opacity:1,outline:"none",transform:"scale(1)",color:n.colors.bodyText,transition:"none"}}}),""),u=(0,h.A)("div",{target:"e1vs0wn30"})((e=>{let{theme:t,isExpanded:n}=e;return{"&:hover":{[m]:{opacity:1,transform:"scale(1)",transition:"none"}},...n?{position:"fixed",top:0,left:0,bottom:0,right:0,background:t.colors.bgColor,zIndex:t.zIndices.fullscreenWrapper,padding:t.spacing.md,paddingTop:t.sizes.fullScreenHeaderHeight,overflow:["auto","overlay"],display:"flex",alignItems:"center",justifyContent:"center"}:{}}}),"");var p=n(90782);class g extends i.PureComponent{constructor(e){super(e),this.context=void 0,this.controlKeys=e=>{const{expanded:t}=this.state;27===e.keyCode&&t&&this.zoomOut()},this.zoomIn=()=>{document.body.style.overflow="hidden",this.context.setFullScreen(!0),this.setState({expanded:!0})},this.zoomOut=()=>{document.body.style.overflow="unset",this.context.setFullScreen(!1),this.setState({expanded:!1})},this.convertScssRemValueToPixels=e=>parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),this.getWindowDimensions=()=>{const e=this.convertScssRemValueToPixels(this.props.theme.spacing.md),t=this.convertScssRemValueToPixels(this.props.theme.sizes.fullScreenHeaderHeight);return{fullWidth:window.innerWidth-2*e,fullHeight:window.innerHeight-(e+t)}},this.updateWindowDimensions=()=>{this.setState(this.getWindowDimensions())},this.state={expanded:!1,...this.getWindowDimensions()}}componentDidMount(){window.addEventListener("resize",this.updateWindowDimensions),document.addEventListener("keydown",this.controlKeys,!1)}componentWillUnmount(){window.removeEventListener("resize",this.updateWindowDimensions),document.removeEventListener("keydown",this.controlKeys,!1)}render(){const{expanded:e,fullWidth:t,fullHeight:n}=this.state,{children:i,width:o,height:s,disableFullscreenMode:r}=this.props;let c=l.u,h=this.zoomIn,g="View fullscreen";return e&&(c=a.Q,h=this.zoomOut,g="Exit fullscreen"),(0,p.jsxs)(u,{isExpanded:e,"data-testid":"stFullScreenFrame",children:[!r&&(0,p.jsx)(m,{"data-testid":"StyledFullScreenButton",onClick:h,title:g,isExpanded:e,children:(0,p.jsx)(d.A,{content:c})}),i(e?{width:t,height:n,expanded:e,expand:this.zoomIn,collapse:this.zoomOut}:{width:o,height:s,expanded:e,expand:this.zoomIn,collapse:this.zoomOut})]})}}g.contextType=c.n;const x=(0,r.b)(g);const f=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];class n extends i.PureComponent{constructor(){super(...arguments),this.render=()=>{const{width:n,height:i,disableFullscreenMode:o}=this.props;return(0,p.jsx)(x,{width:n,height:i,disableFullscreenMode:t||o,children:t=>{let{width:n,height:i,expanded:o,expand:s,collapse:r}=t;return(0,p.jsx)(e,{...this.props,width:n,height:i,isFullScreen:o,expand:s,collapse:r})}})}}}return n.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,s()(n,e)}},41514:(e,t,n)=>{n.d(t,{u:()=>r});var i=n(68102),o=n(58878),s=n(68622),r=o.forwardRef((function(e,t){return o.createElement(s.I,(0,i.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M0 0v4l1.5-1.5L3 4l1-1-1.5-1.5L4 0H0zm5 4L4 5l1.5 1.5L4 8h4V4L6.5 5.5 5 4z"}))}));r.displayName="FullscreenEnter"},67214:(e,t,n)=>{n.d(t,{Q:()=>r});var i=n(68102),o=n(58878),s=n(68622),r=o.forwardRef((function(e,t){return o.createElement(s.I,(0,i.A)({iconAttrs:{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),o.createElement("path",{d:"M1 0L0 1l1.5 1.5L0 4h4V0L2.5 1.5 1 0zm3 4v4l1.5-1.5L7 8l1-1-1.5-1.5L8 4H4z"}))}));r.displayName="FullscreenExit"}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_streamlit_app=self.webpackChunk_streamlit_app||[]).push([[9943],{251:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Tt});var i=n(58878),o=n(35753),r=n(79104),l=n(52583),a=n(68994),s=n(95241),d=n(61730),u=n(18364),c=n(2128),m=n(34752),h=n(22044),g=n(29669),f=n(25571),p=n(85850),v=n(84152),y=n(37638),b=n.n(y),w=n(30136),x=n.n(w),C=n(17643),M=n.n(C),S=(n(20641),n(91381)),E=n.n(S),R=n(37904),k=n.n(R),T=n(34694),N=n(85729);const I=["true","t","yes","y","on","1"],_=["false","f","no","n","off","0"];function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=`\u26a0\ufe0f ${e}`,{kind:o.dd.Text,readonly:!0,allowOverlay:!0,data:e+(t?`\n\n${t}\n`:""),displayData:e,isError:!0}}function D(e){return e.hasOwnProperty("isError")&&e.isError}function A(e){return e.hasOwnProperty("isMissingValue")&&e.isMissingValue}function F(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?{kind:o.dd.Loading,allowOverlay:!1,isMissingValue:!0}:{kind:o.dd.Loading,allowOverlay:!1}}function $(e,t){const n=t?"faded":"normal";return{kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,readonly:e,style:n}}function V(e){return{id:e.id,title:e.title,hasMenu:!1,themeOverride:e.themeOverride,icon:e.icon,group:e.group,...e.isStretched&&{grow:e.isIndex?1:3},...e.width&&{width:e.width}}}function X(e,t){return(0,f.hX)(e)?t||{}:(0,f.hX)(t)?e||{}:b()(e,t)}function H(e){if((0,f.hX)(e))return[];if("number"===typeof e||"boolean"===typeof e)return[e];if("string"===typeof e){if(""===e)return[];if(!e.trim().startsWith("[")||!e.trim().endsWith("]"))return e.split(",");try{return JSON.parse(e)}catch(t){return[e]}}try{const t=JSON.parse(JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t)));return Array.isArray(t)?t.map((e=>["string","number","boolean","null"].includes(typeof e)?e:L(e))):[L(t)]}catch(t){return[L(e)]}}function L(e){try{try{return x()(e)}catch(t){return JSON.stringify(e,((e,t)=>"bigint"===typeof t?Number(t):t))}}catch(t){return`[${typeof e}]`}}function z(e){if((0,f.hX)(e))return null;if("boolean"===typeof e)return e;const t=L(e).toLowerCase().trim();return""===t?null:!!I.includes(t)||!_.includes(t)&&void 0}function W(e){if((0,f.hX)(e))return null;if(Array.isArray(e))return NaN;if("string"===typeof e){if(0===e.trim().length)return null;try{const t=k().unformat(e.trim());if((0,f.se)(t))return t}catch(t){}}else if(e instanceof Int32Array)return Number(e[0]);return Number(e)}function j(e,t,n){return Number.isNaN(e)||!Number.isFinite(e)?"":(0,f.hX)(t)||""===t?(0===n&&(e=Math.round(e)),k()(e).format((0,f.se)(n)?`0,0.${"0".repeat(n)}`:"0,0.[0000]")):"percent"===t?new Intl.NumberFormat(void 0,{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e):["compact","scientific","engineering"].includes(t)?new Intl.NumberFormat(void 0,{notation:t}).format(e):"duration[ns]"===t?M().duration(e/1e6,"milliseconds").humanize():t.startsWith("period[")?N.D0.formatPeriodType(BigInt(e),t):(0,T.sprintf)(t,e)}function B(e,t){return"locale"===t?new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"medium"}).format(e.toDate()):"distance"===t?e.fromNow():"relative"===t?e.calendar():e.format(t)}function Y(e){if((0,f.hX)(e))return null;if(e instanceof Date)return isNaN(e.getTime())?void 0:e;if("string"===typeof e&&0===e.trim().length)return null;try{const t=Number(e);if(!isNaN(t)){let e=t;t>=10**18?e=t/1e3**3:t>=10**15?e=t/1e6:t>=10**12&&(e=t/1e3);const n=M().unix(e).utc();if(n.isValid())return n.toDate()}if("string"===typeof e){const t=M().utc(e);if(t.isValid())return t.toDate();const n=M().utc(e,[M().HTML5_FMT.TIME_MS,M().HTML5_FMT.TIME_SECONDS,M().HTML5_FMT.TIME]);if(n.isValid())return n.toDate()}}catch(t){return}}function P(e){if(e%1===0)return 0;let t=e.toString();return-1!==t.indexOf("e")&&(t=e.toLocaleString("fullwide",{useGrouping:!1,maximumFractionDigits:20})),-1===t.indexOf(".")?0:t.split(".")[1].length}const U=new RegExp(/(\r\n|\n|\r)/gm);function q(e){return-1!==e.indexOf("\n")?e.replace(U," "):e}var J=n(8151),G=n(84996);function K(e){const t={kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!0,style:e.isIndex?"faded":"normal"};return{...e,kind:"object",sortMode:"default",isEditable:!1,getCell(e){try{const n=(0,f.se)(e)?L(e):null,i=(0,f.se)(n)?q(n):"";return{...t,data:n,displayData:i,isMissingValue:(0,f.hX)(e)}}catch(n){return O(L(e),`The value cannot be interpreted as a string. Error: ${n}`)}},getCellValue:e=>void 0===e.data?null:e.data}}K.isEditableType=!1;const Z=K;function Q(e){const t=e.columnTypeOptions||{};let n;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(l){n=`Invalid validate regex: ${t.validate}.\nError: ${l}`}const i={kind:o.dd.Text,data:"",displayData:"",allowOverlay:!0,contentAlignment:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"},r=i=>{if((0,f.hX)(i))return!e.isRequired;let o=L(i),r=!1;return t.max_chars&&o.length>t.max_chars&&(o=o.slice(0,t.max_chars),r=!0),!(n instanceof RegExp&&!1===n.test(o))&&(!r||o)};return{...e,kind:"text",sortMode:"default",validateInput:r,getCell(e,t){if("string"===typeof n)return O(L(e),n);if(t){const t=r(e);if(!1===t)return O(L(e),"Invalid input.");"string"===typeof t&&(e=t)}try{const t=(0,f.se)(e)?L(e):null,n=(0,f.se)(t)?q(t):"";return{...i,isMissingValue:(0,f.hX)(t),data:t,displayData:n}}catch(l){return O("Incompatible value",`The value cannot be interpreted as string. Error: ${l}`)}},getCellValue:e=>void 0===e.data?null:e.data}}Q.isEditableType=!0;const ee=Q;function te(e,t){return e=t.startsWith("+")||t.startsWith("-")?e.utcOffset(t,!1):e.tz(t)}function ne(e,t,n,i,r,l,a){var s;const d=X({format:n,step:i,timezone:a},t.columnTypeOptions);let u,c,m;if((0,f.se)(d.timezone))try{var h;u=(null===(h=te(E()(),d.timezone))||void 0===h?void 0:h.utcOffset())||void 0}catch(v){}(0,f.se)(d.min_value)&&(c=Y(d.min_value)||void 0),(0,f.se)(d.max_value)&&(m=Y(d.max_value)||void 0);const g={kind:o.dd.Custom,allowOverlay:!0,copyData:"",readonly:!t.isEditable,contentAlign:t.contentAlignment,style:t.isIndex?"faded":"normal",data:{kind:"date-picker-cell",date:void 0,displayDate:"",step:(null===(s=d.step)||void 0===s?void 0:s.toString())||"1",format:r,min:c,max:m}},p=e=>{const n=Y(e);return null===n?!t.isRequired:void 0!==n&&(!((0,f.se)(c)&&l(n)<l(c))&&!((0,f.se)(m)&&l(n)>l(m)))};return{...t,kind:e,sortMode:"default",validateInput:p,getCell(e,t){if(!0===t){const t=p(e);if(!1===t)return O(L(e),"Invalid input.");t instanceof Date&&(e=t)}const i=Y(e);let o="",r="",l=u;if(void 0===i)return O(L(e),"The value cannot be interpreted as a datetime object.");if(null!==i){let e=E().utc(i);if(!e.isValid())return O(L(i),`This should never happen. Please report this bug. \nError: ${e.toString()}`);if(d.timezone){try{e=te(e,d.timezone)}catch(v){return O(e.toISOString(),`Failed to adjust to the provided timezone: ${d.timezone}. \nError: ${v}`)}l=e.utcOffset()}try{r=B(e,d.format||n)}catch(v){return O(e.toISOString(),`Failed to format the date for rendering with: ${d.format}. \nError: ${v}`)}o=B(e,n)}return{...g,copyData:o,isMissingValue:(0,f.hX)(i),data:{...g.data,date:i,displayDate:r,timezoneOffset:l}}},getCellValue(e){var t;return(0,f.hX)(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.date)?null:l(e.data.date)}}}function ie(e){var t,n,i,o,r;let l="YYYY-MM-DD HH:mm:ss";(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?l="YYYY-MM-DD HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(l="YYYY-MM-DD HH:mm:ss.SSS");const a=null===(i=e.arrowType)||void 0===i||null===(o=i.meta)||void 0===o?void 0:o.timezone,s=(0,f.se)(a)||(0,f.se)(null===e||void 0===e||null===(r=e.columnTypeOptions)||void 0===r?void 0:r.timezone);return ne("datetime",e,s?l+"Z":l,1,"datetime-local",(e=>s?e.toISOString():e.toISOString().replace("Z","")),a)}function oe(e){var t,n;let i="HH:mm:ss";return(null===(t=e.columnTypeOptions)||void 0===t?void 0:t.step)>=60?i="HH:mm":(null===(n=e.columnTypeOptions)||void 0===n?void 0:n.step)<1&&(i="HH:mm:ss.SSS"),ne("time",e,i,1,"time",(e=>e.toISOString().split("T")[1].replace("Z","")))}function re(e){return ne("date",e,"YYYY-MM-DD",1,"date",(e=>e.toISOString().split("T")[0]))}function le(e){const t={kind:o.dd.Boolean,data:!1,allowOverlay:!1,contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal"};return{...e,kind:"checkbox",sortMode:"default",getCell(e){let n=null;return n=z(e),void 0===n?O(L(e),"The value cannot be interpreted as boolean."):{...t,data:n,isMissingValue:(0,f.hX)(n)}},getCellValue:e=>void 0===e.data?null:e.data}}ie.isEditableType=!0,oe.isEditableType=!0,re.isEditableType=!0,le.isEditableType=!0;const ae=le;function se(e){return e.startsWith("int")&&!e.startsWith("interval")||"range"===e||e.startsWith("uint")}function de(e){const t=N.D0.getTypeName(e.arrowType);let n;"timedelta64[ns]"===t?n="duration[ns]":t.startsWith("period[")&&(n=t);const i=X({step:se(t)?1:void 0,min_value:t.startsWith("uint")?0:void 0,format:n},e.columnTypeOptions),r=(0,f.hX)(i.min_value)||i.min_value<0,l=(0,f.se)(i.step)&&!Number.isNaN(i.step)?P(i.step):void 0,a={kind:o.dd.Number,data:void 0,displayData:"",readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment||"right",style:e.isIndex?"faded":"normal",allowNegative:r,fixedDecimals:l,thousandSeparator:""},s=t=>{let n=W(t);if((0,f.hX)(n))return!e.isRequired;if(Number.isNaN(n))return!1;let o=!1;return(0,f.se)(i.max_value)&&n>i.max_value&&(n=i.max_value,o=!0),!((0,f.se)(i.min_value)&&n<i.min_value)&&(!o||n)};return{...e,kind:"number",sortMode:"smart",validateInput:s,getCell(e,t){if(!0===t){const t=s(e);if(!1===t)return O(L(e),"Invalid input.");"number"===typeof t&&(e=t)}let n=W(e),o="";if((0,f.se)(n)){if(Number.isNaN(n))return O(L(e),"The value cannot be interpreted as a number.");if((0,f.se)(l)&&(r=n,n=0===(d=l)?Math.trunc(r):Math.trunc(r*10**d)/10**d),Number.isInteger(n)&&!Number.isSafeInteger(n))return O(L(e),"The value is larger than the maximum supported integer values in number columns (2^53).");try{o=j(n,i.format,l)}catch(u){return O(L(n),(0,f.se)(i.format)?`Failed to format the number based on the provided format configuration: (${i.format}). Error: ${u}`:`Failed to format the number. Error: ${u}`)}}var r,d;return{...a,data:n,displayData:o,isMissingValue:(0,f.hX)(n),copyData:(0,f.hX)(n)?"":L(n)}},getCellValue:e=>void 0===e.data?null:e.data}}de.isEditableType=!0;const ue=de;function ce(e){let t="string";const n=X({options:"bool"===N.D0.getTypeName(e.arrowType)?[!0,!1]:[]},e.columnTypeOptions),i=new Set(n.options.map((e=>typeof e)));1===i.size&&(i.has("number")||i.has("bigint")?t="number":i.has("boolean")&&(t="boolean"));const r={kind:o.dd.Custom,allowOverlay:!0,copyData:"",contentAlign:e.contentAlignment,readonly:!e.isEditable,style:e.isIndex?"faded":"normal",data:{kind:"dropdown-cell",allowedValues:[...!0!==e.isRequired?[null]:[],...n.options.filter((e=>null!==e&&""!==e)).map((e=>L(e)))],value:""}};return{...e,kind:"selectbox",sortMode:"default",getCell(e,t){let n=null;return(0,f.se)(e)&&""!==e&&(n=L(e)),t&&!r.data.allowedValues.includes(n)?O(L(n),"The value is not part of the allowed options."):{...r,isMissingValue:null===n,copyData:n||"",data:{...r.data,value:n}}},getCellValue(e){var n,i,o,r,l,a,s;return(0,f.hX)(null===(n=e.data)||void 0===n?void 0:n.value)||""===(null===(i=e.data)||void 0===i?void 0:i.value)?null:"number"===t?null!==(r=W(null===(l=e.data)||void 0===l?void 0:l.value))&&void 0!==r?r:null:"boolean"===t?null!==(a=z(null===(s=e.data)||void 0===s?void 0:s.value))&&void 0!==a?a:null:null===(o=e.data)||void 0===o?void 0:o.value}}}ce.isEditableType=!0;const me=ce;function he(e){const t={kind:o.dd.Bubble,data:[],allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal"};return{...e,kind:"list",sortMode:"default",isEditable:!1,getCell(e){const n=(0,f.hX)(e)?[]:H(e);return{...t,data:n,isMissingValue:(0,f.hX)(e),copyData:(0,f.hX)(e)?"":L(n.map((e=>"string"===typeof e&&e.includes(",")?e.replace(/,/g," "):e)))}},getCellValue:e=>(0,f.hX)(e.data)||A(e)?null:e.data}}he.isEditableType=!1;const ge=he;function fe(e,t,n){const i=new RegExp(`${e}[,\\s].*{(?:[^}]*[\\s;]{1})?${t}:\\s*([^;}]+)[;]?.*}`,"gm");n=n.replace(/{/g," {");const o=i.exec(n);if(o)return o[1].trim()}function pe(e,t){const n=e.types.index[t],i=e.indexNames[t];let o=!0;return"range"===N.D0.getTypeName(n)&&(o=!1),{id:`index-${t}`,name:i,title:i,isEditable:o,arrowType:n,isIndex:!0,isHidden:!1}}function ve(e,t){const n=e.columns.map((e=>e[t])),i=n.length>0?n[n.length-1]:"",o=n.length>1?n.filter((e=>""!==e)).slice(0,-1).join(" / "):void 0;let r,l=e.types.data[t];if((0,f.hX)(l)&&(l={meta:null,numpy_type:"object",pandas_type:"object"}),"categorical"===N.D0.getTypeName(l)){const n=e.getCategoricalOptions(t);(0,f.se)(n)&&(r={options:n})}return{id:`column-${i}-${t}`,name:i,title:i,isEditable:!0,arrowType:l,columnTypeOptions:r,isIndex:!1,isHidden:!1,group:o}}function ye(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const i=e.arrowType?N.D0.getTypeName(e.arrowType):null;let r;if("object"===e.kind)r=e.getCell((0,f.se)(t.content)?q(N.D0.format(t.content,t.contentType,t.field)):null);else if(["time","date","datetime"].includes(e.kind)&&(0,f.se)(t.content)&&("number"===typeof t.content||"bigint"===typeof t.content)){var l,a;let n;var s,d,u;if("time"===i&&(0,f.se)(null===(l=t.field)||void 0===l||null===(a=l.type)||void 0===a?void 0:a.unit))n=M().unix(N.D0.convertToSeconds(t.content,null!==(s=null===(d=t.field)||void 0===d||null===(u=d.type)||void 0===u?void 0:u.unit)&&void 0!==s?s:0)).utc().toDate();else n=M().utc(Number(t.content)).toDate();r=e.getCell(n)}else if("decimal"===i){const n=(0,f.hX)(t.content)?null:N.D0.format(t.content,t.contentType,t.field);r=e.getCell(n)}else r=e.getCell(t.content);if(D(r))return r;if(!e.isEditable){if((0,f.se)(t.displayContent)){var c,m,h,g;const n=q(t.displayContent);r.kind===o.dd.Text||r.kind===o.dd.Number&&(0,f.hX)(null===(c=e.columnTypeOptions)||void 0===c?void 0:c.format)||r.kind===o.dd.Uri&&(0,f.hX)(null===(m=e.columnTypeOptions)||void 0===m?void 0:m.display_text)?r={...r,displayData:n}:r.kind===o.dd.Custom&&"date-picker-cell"===(null===(h=r.data)||void 0===h?void 0:h.kind)&&(0,f.hX)(null===(g=e.columnTypeOptions)||void 0===g?void 0:g.format)&&(r={...r,data:{...r.data,displayDate:n}})}n&&t.cssId&&(r=function(e,t,n){const i={},o=fe(t,"color",n);o&&(i.textDark=o);const r=fe(t,"background-color",n);return r&&(i.bgCell=r),"yellow"===r&&void 0===o&&(i.textDark="#31333F"),i?{...e,themeOverride:i}:e}(r,t.cssId,n))}return r}function be(e,t,n){const i=X({y_min:0,y_max:1},t.columnTypeOptions),r={kind:o.dd.Custom,allowOverlay:!1,copyData:"",contentAlign:t.contentAlignment,data:{kind:"sparkline-cell",values:[],displayValues:[],graphKind:n,yAxis:[i.y_min,i.y_max]}};return{...t,kind:e,sortMode:"default",isEditable:!1,getCell(e){if((0,f.hX)(i.y_min)||(0,f.hX)(i.y_max)||Number.isNaN(i.y_min)||Number.isNaN(i.y_max)||i.y_min>=i.y_max)return O("Invalid min/max y-axis configuration",`The y_min (${i.y_min}) and y_max (${i.y_max}) configuration options must be valid numbers.`);if((0,f.hX)(e))return F();const t=H(e),n=[];let o=[];if(0===t.length)return F();let l=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER;for(let i=0;i<t.length;i++){const e=W(t[i]);if(Number.isNaN(e)||(0,f.hX)(e))return O(L(t),`The value cannot be interpreted as a numeric array. ${L(e)} is not a number.`);e>l&&(l=e),e<a&&(a=e),n.push(e)}return o=n.length>0&&(l>i.y_max||a<i.y_min)?n.map((e=>l-a===0?l>(i.y_max||1)?i.y_max||1:i.y_min||0:((i.y_max||1)-(i.y_min||0))*((e-a)/(l-a))+(i.y_min||0))):n,{...r,copyData:n.join(","),data:{...r.data,values:o,displayValues:n.map((e=>j(e)))},isMissingValue:(0,f.hX)(e)}},getCellValue(e){var t,n;return e.kind===o.dd.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.values)?null:null===(n=e.data)||void 0===n?void 0:n.values}}}function we(e){return be("line_chart",e,"line")}function xe(e){return be("bar_chart",e,"bar")}function Ce(e){return be("area_chart",e,"area")}function Me(e){const t={kind:o.dd.Image,data:[],displayData:[],readonly:!0,allowOverlay:!0,contentAlign:e.contentAlignment||"center",style:e.isIndex?"faded":"normal"};return{...e,kind:"image",sortMode:"default",isEditable:!1,getCell(e){const n=(0,f.se)(e)?[L(e)]:[];return{...t,data:n,isMissingValue:!(0,f.se)(e),displayData:n}},getCellValue:e=>void 0===e.data||0===e.data.length?null:e.data[0]}}we.isEditableType=!1,xe.isEditableType=!1,Ce.isEditableType=!1,Me.isEditableType=!1;const Se=Me;function Ee(e){const t=e.columnTypeOptions||{};let n,i;if(t.validate)try{n=new RegExp(t.validate,"us")}catch(a){n=`Invalid validate regex: ${t.validate}.\nError: ${a}`}if(!(0,f.hX)(t.display_text)&&t.display_text.includes("(")&&t.display_text.includes(")"))try{i=new RegExp(t.display_text,"us")}catch(a){i=void 0}const r={kind:o.dd.Uri,readonly:!e.isEditable,allowOverlay:!0,contentAlign:e.contentAlignment,style:e.isIndex?"faded":"normal",hoverEffect:!0,data:"",displayData:"",copyData:""},l=i=>{if((0,f.hX)(i))return!e.isRequired;const o=L(i);return!(t.max_chars&&o.length>t.max_chars)&&!(n instanceof RegExp&&!1===n.test(o))};return{...e,kind:"link",sortMode:"default",validateInput:l,getCell(e,o){if((0,f.hX)(e))return{...r,data:null,isMissingValue:!0,onClickUri:()=>{}};const s=e;if("string"===typeof n)return O(L(s),n);if(o){if(!1===l(s))return O(L(s),"Invalid input.")}let d="";return s&&(d=void 0!==i?function(e,t){if((0,f.hX)(t))return"";try{const n=t.match(e);return n&&void 0!==n[1]?decodeURI(n[1]):t}catch(a){return t}}(i,s):t.display_text||s),{...r,data:s,displayData:d,isMissingValue:(0,f.hX)(s),onClickUri:e=>{window.open(s.startsWith("www.")?`https://${s}`:s,"_blank","noopener,noreferrer"),e.preventDefault()},copyData:s}},getCellValue:e=>(0,f.hX)(e.data)?null:e.data}}Ee.isEditableType=!0;const Re=Ee;function ke(e){const t=se(N.D0.getTypeName(e.arrowType)),n=X({min_value:0,max_value:t?100:1,step:t?1:.01,format:t?"%3d%%":"percent"},e.columnTypeOptions);let i;try{i=j(n.max_value,n.format)}catch(a){i=L(n.max_value)}const r=(0,f.hX)(n.step)||Number.isNaN(n.step)?void 0:P(n.step),l={kind:o.dd.Custom,allowOverlay:!1,copyData:"",contentAlign:e.contentAlignment,data:{kind:"range-cell",min:n.min_value,max:n.max_value,step:n.step,value:n.min_value,label:String(n.min_value),measureLabel:i,readonly:!0}};return{...e,kind:"progress",sortMode:"smart",isEditable:!1,getCell(e){if((0,f.hX)(e))return F();if((0,f.hX)(n.min_value)||(0,f.hX)(n.max_value)||Number.isNaN(n.min_value)||Number.isNaN(n.max_value)||n.min_value>=n.max_value)return O("Invalid min/max parameters",`The min_value (${n.min_value}) and max_value (${n.max_value}) parameters must be valid numbers.`);if((0,f.hX)(n.step)||Number.isNaN(n.step))return O("Invalid step parameter",`The step parameter (${n.step}) must be a valid number.`);const t=W(e);if(Number.isNaN(t)||(0,f.hX)(t))return O(L(e),"The value cannot be interpreted as a number.");if(Number.isInteger(t)&&!Number.isSafeInteger(t))return O(L(e),"The value is larger than the maximum supported integer values in number columns (2^53).");let i="";try{i=j(t,n.format,r)}catch(a){return O(L(t),(0,f.se)(n.format)?`Failed to format the number based on the provided format configuration: (${n.format}). Error: ${a}`:`Failed to format the number. Error: ${a}`)}const o=Math.min(n.max_value,Math.max(n.min_value,t));return{...l,isMissingValue:(0,f.hX)(e),copyData:String(t),data:{...l.data,value:o,label:i}}},getCellValue(e){var t,n;return e.kind===o.dd.Loading||void 0===(null===(t=e.data)||void 0===t?void 0:t.value)?null:null===(n=e.data)||void 0===n?void 0:n.value}}}ke.isEditableType=!1;const Te=ke,Ne=new Map(Object.entries({object:Z,text:ee,checkbox:ae,selectbox:me,list:ge,number:ue,link:Re,datetime:ie,date:re,time:oe,line_chart:we,bar_chart:xe,area_chart:Ce,image:Se,progress:Te})),Ie=[],_e="_index",Oe="_pos:",De={small:75,medium:200,large:400};function Ae(e){if(!(0,f.hX)(e))return"number"===typeof e?e:e in De?De[e]:void 0}function Fe(e,t){if(!t)return e;let n;return t.has(e.name)&&e.name!==_e?n=t.get(e.name):t.has(`${Oe}${e.indexNumber}`)?n=t.get(`${Oe}${e.indexNumber}`):e.isIndex&&t.has(_e)&&(n=t.get(_e)),n?b()({...e},{title:n.label,width:Ae(n.width),isEditable:(0,f.se)(n.disabled)?!n.disabled:void 0,isHidden:n.hidden,isRequired:n.required,columnTypeOptions:n.type_config,contentAlignment:n.alignment,defaultValue:n.default,help:n.help}):e}function $e(e){var t;const n=null===(t=e.columnTypeOptions)||void 0===t?void 0:t.type;let i;return(0,f.se)(n)&&(Ne.has(n)?i=Ne.get(n):(0,G.FF)(`Unknown column type configured in column configuration: ${n}`)),(0,f.hX)(i)&&(i=function(e){let t=e?N.D0.getTypeName(e):null;return t?(t=t.toLowerCase().trim(),["unicode","empty","large_string[pyarrow]"].includes(t)?ee:["datetime","datetimetz"].includes(t)?ie:"time"===t?oe:"date"===t?re:["object","bytes"].includes(t)?Z:["bool"].includes(t)?ae:["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float16","float32","float64","float96","float128","range","decimal"].includes(t)?ue:"categorical"===t?me:t.startsWith("list")?ge:Z):Z}(e.arrowType)),i}const Ve=function(e,t,n){const o=(0,J.u)(),r=i.useMemo((()=>function(e){if(!e)return new Map;try{return new Map(Object.entries(JSON.parse(e)))}catch(t){return(0,G.vV)(t),new Map}}(e.columns)),[e.columns]),l=e.useContainerWidth||(0,f.se)(e.width)&&e.width>0;return{columns:i.useMemo((()=>{let i=function(e){const t=[],{dimensions:n}=e,i=n.headerColumns,o=n.dataColumns;if(0===i&&0===o)return t.push({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0}),t;for(let r=0;r<i;r++){const n={...pe(e,r),indexNumber:r};t.push(n)}for(let r=0;r<o;r++){const n={...ve(e,r),indexNumber:r+i};t.push(n)}return t}(t).map((t=>{let i={...t,...Fe(t,r),isStretched:l};const a=$e(i);return(e.editingMode===g.i3.EditingMode.READ_ONLY||n||!1===a.isEditableType)&&(i={...i,isEditable:!1}),e.editingMode!==g.i3.EditingMode.READ_ONLY&&1==i.isEditable&&(i={...i,icon:"editable"},i.isRequired&&e.editingMode===g.i3.EditingMode.DYNAMIC&&(i={...i,isHidden:!1})),a(i,o)})).filter((e=>!e.isHidden));if(e.columnOrder&&e.columnOrder.length>0){const t=[];i.forEach((e=>{e.isIndex&&t.push(e)})),e.columnOrder.forEach((e=>{const n=i.find((t=>t.name===e));n&&!n.isIndex&&t.push(n)})),i=t}return i.length>0?i:[Z({id:"empty-index",title:"",indexNumber:0,isEditable:!1,isIndex:!0})]}),[t,r,l,n,e.editingMode,e.columnOrder,o])}};function Xe(e){return e.isIndex?_e:(0,f.hX)(e.name)?"":e.name}const He=class{constructor(e){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[],this.numRows=0,this.numRows=e}toJson(e){const t=new Map;e.forEach((e=>{t.set(e.indexNumber,e)}));const n={edited_rows:{},added_rows:[],deleted_rows:[]};this.editedCells.forEach(((e,i,o)=>{const r={};e.forEach(((e,n,i)=>{const o=t.get(n);o&&(r[Xe(o)]=o.getCellValue(e))})),n.edited_rows[i]=r})),this.addedRows.forEach((e=>{const i={};let o=!1;e.forEach(((e,n,r)=>{const l=t.get(n);if(l){const t=l.getCellValue(e);l.isRequired&&l.isEditable&&A(e)&&(o=!0),(0,f.se)(t)&&(i[Xe(l)]=t)}})),o||n.added_rows.push(i)})),n.deleted_rows=this.deletedRows;return JSON.stringify(n,((e,t)=>void 0===t?null:t))}fromJson(e,t){this.editedCells=new Map,this.addedRows=[],this.deletedRows=[];const n=JSON.parse(e),i=new Map;t.forEach((e=>{i.set(e.indexNumber,e)}));const o=new Map;t.forEach((e=>{o.set(Xe(e),e)})),Object.keys(n.edited_rows).forEach((e=>{const t=Number(e),i=n.edited_rows[e];Object.keys(i).forEach((e=>{const n=i[e],r=o.get(e);if(r){const e=r.getCell(n);var l;if(e)this.editedCells.has(t)||this.editedCells.set(t,new Map),null===(l=this.editedCells.get(t))||void 0===l||l.set(r.indexNumber,e)}}))})),n.added_rows.forEach((e=>{const n=new Map;t.forEach((e=>{n.set(e.indexNumber,e.getCell(null))})),Object.keys(e).forEach((t=>{const i=e[t],r=o.get(t);if(r){const e=r.getCell(i);e&&n.set(r.indexNumber,e)}})),this.addedRows.push(n)})),this.deletedRows=n.deleted_rows}isAddedRow(e){return e>=this.numRows}getCell(e,t){if(this.isAddedRow(t))return this.addedRows[t-this.numRows].get(e);const n=this.editedCells.get(t);return void 0!==n?n.get(e):void 0}setCell(e,t,n){if(this.isAddedRow(t)){if(t-this.numRows>=this.addedRows.length)return;this.addedRows[t-this.numRows].set(e,n)}else{void 0===this.editedCells.get(t)&&this.editedCells.set(t,new Map);this.editedCells.get(t).set(e,n)}}addRow(e){this.addedRows.push(e)}deleteRows(e){e.sort(((e,t)=>t-e)).forEach((e=>{this.deleteRow(e)}))}deleteRow(e){(0,f.hX)(e)||e<0||(this.isAddedRow(e)?this.addedRows.splice(e-this.numRows,1):(this.deletedRows.includes(e)||(this.deletedRows.push(e),this.deletedRows=this.deletedRows.sort(((e,t)=>e-t))),this.editedCells.delete(e)))}getOriginalRowIndex(e){let t=e;for(let n=0;n<this.deletedRows.length&&!(this.deletedRows[n]>t);n++)t+=1;return t}getNumRows(){return this.numRows+this.addedRows.length-this.deletedRows.length}};var Le=n(32735);const ze=function(){const e=(0,J.u)(),t=i.useMemo((()=>({editable:e=>`<svg xmlns="http://www.w3.org/2000/svg" height="40" viewBox="0 96 960 960" width="40" fill="${e.bgColor}"><path d="m800.641 679.743-64.384-64.384 29-29q7.156-6.948 17.642-6.948 10.485 0 17.742 6.948l29 29q6.948 7.464 6.948 17.95 0 10.486-6.948 17.434l-29 29Zm-310.64 246.256v-64.383l210.82-210.821 64.384 64.384-210.821 210.82h-64.383Zm-360-204.872v-50.254h289.743v50.254H130.001Zm0-162.564v-50.255h454.615v50.255H130.001Zm0-162.307v-50.255h454.615v50.255H130.001Z"/></svg>`})),[]);return{theme:i.useMemo((()=>({accentColor:e.colors.primary,accentFg:e.colors.white,accentLight:(0,Le.No)(e.colors.primary,.9),borderColor:e.colors.borderColorLight,horizontalBorderColor:e.colors.borderColorLight,fontFamily:e.genericFonts.bodyFont,bgSearchResult:(0,Le.No)(e.colors.primary,.9),resizeIndicatorColor:e.colors.primary,bgIconHeader:e.colors.fadedText60,fgIconHeader:e.colors.white,bgHeader:e.colors.bgMix,bgHeaderHasFocus:e.colors.secondaryBg,bgHeaderHovered:e.colors.secondaryBg,textHeader:e.colors.fadedText60,textHeaderSelected:e.colors.white,textGroupHeader:e.colors.fadedText60,headerFontStyle:`${e.fontSizes.sm}`,baseFontStyle:e.fontSizes.sm,editorFontSize:e.fontSizes.sm,textDark:e.colors.bodyText,textMedium:(0,Le.No)(e.colors.bodyText,.2),textLight:e.colors.fadedText40,textBubble:e.colors.fadedText60,bgCell:e.colors.bgColor,bgCellMedium:e.colors.bgColor,cellHorizontalPadding:8,cellVerticalPadding:3,bgBubble:e.colors.secondaryBg,bgBubbleSelected:e.colors.secondaryBg,linkColor:e.colors.linkText,drilldownBorder:e.colors.darkenedBgMix25})),[e]),tableBorderRadius:e.radii.default,headerIcons:t}};const We=function(e,t,n,o){const r=e.columns.length;return{getCellContent:i.useCallback((i=>{let[l,a]=i;if(l>t.length-1)return O("Column index out of bounds.","This should never happen. Please report this bug.");if(a>n-1)return O("Row index out of bounds.","This should never happen. Please report this bug.");const s=t[l],d=s.indexNumber,u=o.current.getOriginalRowIndex(a),c=o.current.isAddedRow(u);if(s.isEditable||c){const e=o.current.getCell(d,u);if((0,f.se)(e))return e;if(c)return O("Error during cell creation.",`This should never happen. Please report this bug. No cell found for an added row: col=${d}; row=${u}`)}try{return ye(s,e.getCell(u+r,d),e.cssStyles)}catch(m){return O("Error during cell creation.",`This should never happen. Please report this bug. \nError: ${m}`)}}),[t,n,e,o,r])}};var je=n(53221);const Be=function(e,t,n){const[o,r]=i.useState(),{getCellContent:l,getOriginalIndex:a}=(0,je.uf)({columns:t.map((e=>V(e))),getCellContent:n,rows:e,sort:o}),s=i.useMemo((()=>function(e,t){return void 0===t?e:e.map((e=>e.id===t.column.id?{...e,title:"asc"===t.direction?`\u2191 ${e.title}`:`\u2193 ${e.title}`}:e))}(t,o)),[t,o]),d=i.useCallback((e=>{let t="asc";const n=s[e];if(o&&o.column.id===n.id){if("asc"!==o.direction)return void r(void 0);t="desc"}r({column:V(n),direction:t,mode:n.sortMode})}),[o,s]);return{columns:s,sortColumn:d,getOriginalIndex:a,getCellContent:l}};var Ye=n(71034),Pe=n.n(Ye);const Ue=function(e,t,n,r,l){const[a,s]=i.useState({columns:o.I1.empty(),rows:o.I1.empty(),current:void 0}),d=!t&&!n&&(e.selectionMode.includes(g.i3.SelectionMode.MULTI_ROW)||e.selectionMode.includes(g.i3.SelectionMode.SINGLE_ROW)),u=d&&e.selectionMode.includes(g.i3.SelectionMode.MULTI_ROW),c=!t&&!n&&(e.selectionMode.includes(g.i3.SelectionMode.SINGLE_COLUMN)||e.selectionMode.includes(g.i3.SelectionMode.MULTI_COLUMN)),m=c&&e.selectionMode.includes(g.i3.SelectionMode.MULTI_COLUMN),h=a.rows.length>0,f=a.columns.length>0,p=void 0!==a.current,v=i.useCallback((e=>{const t=!Pe()(e.rows.toArray(),a.rows.toArray()),n=!Pe()(e.columns.toArray(),a.columns.toArray()),i=!Pe()(e.current,a.current);let o=d&&t||c&&n,u=e;if((d||c)&&void 0!==e.current&&i&&(u={...e,rows:a.rows,columns:a.columns},o=!1),t&&e.rows.length>0&&n&&0===e.columns.length&&(u={...u,columns:a.columns},o=!0),n&&e.columns.length>0&&t&&0===e.rows.length&&(u={...u,rows:a.rows},o=!0),n&&u.columns.length>=0){let e=u.columns;r.forEach(((t,n)=>{t.isIndex&&(e=e.remove(n))})),e.length<u.columns.length&&(u={...u,columns:e})}s(u),o&&l(u)}),[a,d,c,l,r]),y=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={columns:t?a.columns:o.I1.empty(),rows:e?a.rows:o.I1.empty(),current:void 0};s(n),(!e&&d||!t&&c)&&l(n)}),[a,d,c,l]);return{gridSelection:a,isRowSelectionActivated:d,isMultiRowSelectionActivated:u,isColumnSelectionActivated:c,isMultiColumnSelectionActivated:m,isRowSelected:h,isColumnSelected:f,isCellSelected:p,clearSelection:y,processSelectionChange:v}},qe=",",Je='"',Ge='"',Ke="\n",Ze="\ufeff",Qe=new RegExp(`[${[qe,Je,Ke].join("")}]`);function et(e){return e.map((e=>function(e){if((0,f.hX)(e))return"";const t=L(e);if(Qe.test(t))return`${Je}${t.replace(new RegExp(Je,"g"),Ge+Je)}${Je}`;return t}(e))).join(qe)+Ke}async function tt(e,t,n,i){const o=new TextEncoder;await e.write(o.encode(Ze));const r=n.map((e=>e.name));await e.write(o.encode(et(r)));for(let l=0;l<i;l++){const i=[];n.forEach(((e,n,o)=>{i.push(e.getCellValue(t([n,l])))})),await e.write(o.encode(et(i)))}await e.close()}const nt=function(e,t,o,r){return{exportToCsv:i.useCallback((async()=>{const i=`${(new Date).toISOString().slice(0,16).replace(":","-")}_export.csv`;try{const r=await n.e(3966).then(n.bind(n,93966)),l=await r.showSaveFilePicker({suggestedName:i,types:[{accept:{"text/csv":[".csv"]}}],excludeAcceptAllOption:!1}),a=await l.createWritable();await tt(a,e,t,o)}catch(l){if(l instanceof Error&&"AbortError"===l.name)return;try{(0,G.FF)("Failed to export data as CSV with FileSystem API, trying fallback method",l);let n="";const a=new WritableStream({write:async e=>{n+=new TextDecoder("utf-8").decode(e)},close:async()=>{}});await tt(a.getWriter(),e,t,o);const s=new Blob([n],{type:"text/csv;charset=utf-8;"}),d=URL.createObjectURL(s),u=document.createElement("a");r?u.setAttribute("target","_blank"):u.setAttribute("target","_self"),u.style.display="none",u.href=d,u.download=i,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(d)}catch(l){(0,G.vV)("Failed to export data as CSV",l)}}}),[t,o,e,r])}};const it=function(e,t,n,o,r,l,a,s,d){const u=i.useCallback(((t,i)=>{let[l,a]=t;const d=e[l];if(!d.isEditable)return;const u=d.indexNumber,c=n.current.getOriginalRowIndex(r(a)),m=o([l,a]),h=d.getCellValue(m),g=d.getCellValue(i);if(!D(m)&&g===h)return;const f=d.getCell(g,!0);D(f)?(0,G.FF)(`Not applying the cell edit since it causes this error:\n ${f.data}`):(n.current.setCell(u,c,{...f,lastUpdated:performance.now()}),s())}),[e,n,r,o,s]),c=i.useCallback((()=>{if(t)return;const i=new Map;e.forEach((e=>{i.set(e.indexNumber,e.getCell(e.defaultValue))})),n.current.addRow(i),a()}),[e,n,t,a]),m=i.useCallback((()=>{t||(c(),s())}),[c,s,t]),h=i.useCallback((i=>{var o;if(i.rows.length>0){if(t)return!0;const e=i.rows.toArray().map((e=>n.current.getOriginalRowIndex(r(e))));return n.current.deleteRows(e),a(),d(),s(),!1}if(null!==(o=i.current)&&void 0!==o&&o.range){const t=[],n=i.current.range;for(let i=n.y;i<n.y+n.height;i++)for(let o=n.x;o<n.x+n.width;o++){const n=e[o];n.isEditable&&!n.isRequired&&(t.push({cell:[o,i]}),u([o,i],n.getCell(null)))}return t.length>0&&(s(),l(t)),!1}return!0}),[e,n,t,l,r,s,u,d,a]),g=i.useCallback(((i,a)=>{const[d,u]=i,m=[];for(let h=0;h<a.length;h++){const i=a[h];if(h+u>=n.current.getNumRows()){if(t)break;c()}for(let t=0;t<i.length;t++){const l=i[t],a=h+u,s=t+d;if(s>=e.length)break;const c=e[s];if(c.isEditable){const e=c.getCell(l,!0);if((0,f.se)(e)&&!D(e)){const t=c.indexNumber,i=n.current.getOriginalRowIndex(r(a)),l=c.getCellValue(o([s,a]));c.getCellValue(e)!==l&&(n.current.setCell(t,i,{...e,lastUpdated:performance.now()}),m.push({cell:[s,a]}))}}}m.length>0&&(s(),l(m))}return!1}),[e,n,t,r,o,c,s,l]),p=i.useCallback(((t,n)=>{const i=t[0];if(i>=e.length)return!0;const o=e[i];if(o.validateInput){const e=o.validateInput(o.getCellValue(n));return!0===e||!1===e?e:o.getCell(e)}return!0}),[e]);return{onCellEdited:u,onPaste:g,onRowAppended:m,onDelete:h,validateCell:p}};const ot=function(e,t){const[n,o]=i.useState(),r=i.useRef(null),l=i.useCallback((n=>{if(clearTimeout(r.current),r.current=0,o(void 0),("header"===n.kind||"cell"===n.kind)&&n.location){const i=n.location[0],l=n.location[1];let a;if(i<0||i>=e.length)return;const s=e[i];if("header"===n.kind&&(0,f.se)(s))a=s.help;else if("cell"===n.kind){const e=t([i,l]);s.isRequired&&s.isEditable&&A(e)?a="\u26a0\ufe0f Please fill out this cell.":function(e){return e.hasOwnProperty("tooltip")&&""!==e.tooltip}(e)&&(a=e.tooltip)}a&&(r.current=setTimeout((()=>{a&&o({content:a,left:n.bounds.x+n.bounds.width/2,top:n.bounds.y})}),600))}}),[e,t,o,r]);return{tooltip:n,clearTooltip:i.useCallback((()=>{o(void 0)}),[o]),onItemHovered:l}};var rt=n(28873),lt=n(70128),at=n(13914),st=n(43301),dt=n(67338);const ut=function(e){return{drawCell:i.useCallback(((t,n)=>{const{cell:i,theme:o,ctx:r,rect:l}=t,a=t.col;if(A(i)&&a<e.length){const i=e[a];return["checkbox","line_chart","bar_chart","progress"].includes(i.kind)?n():(e=>{const{cell:t,theme:n,ctx:i}=e;(0,rt.lR)({...e,theme:{...n,textDark:n.textLight,headerFontFull:`${n.headerFontStyle} ${n.fontFamily}`,baseFontFull:`${n.baseFontStyle} ${n.fontFamily}`,markerFontFull:`${n.markerFontStyle} ${n.fontFamily}`},spriteManager:{},hyperWrapping:!1},"None",t.contentAlign),i.fillStyle=n.textDark})(t),void(i.isRequired&&i.isEditable&&function(e,t,n){e.save(),e.beginPath(),e.moveTo(t.x+t.width-8,t.y+1),e.lineTo(t.x+t.width,t.y+1),e.lineTo(t.x+t.width,t.y+1+8),e.fillStyle=n.accentColor,e.fill(),e.restore()}(r,l,o))}n()}),[e]),customRenderers:i.useMemo((()=>[lt.A,at.A,st.A,dt.Ay,...Ie]),[])}};const ct=function(e){const[t,n]=(0,i.useState)((()=>new Map)),o=i.useCallback(((e,i,o,r)=>{e.id&&n(new Map(t).set(e.id,r))}),[t]);return{columns:i.useMemo((()=>e.map((e=>e.id&&t.has(e.id)&&void 0!==t.get(e.id)?{...e,width:t.get(e.id),grow:0}:e))),[e,t]),onColumnResize:o}},mt=2,ht=35,gt=50+mt,ft=2*ht+mt;const pt=function(e,t,n,o,r,l){let a=function(e){return Math.max(e*ht+mt,ft)}(t+(n?2:1)+(e.editingMode===g.i3.EditingMode.DYNAMIC?1:0)),s=Math.min(a,400);e.height&&(s=Math.max(e.height,ft),a=Math.max(e.height,a)),r&&(s=Math.min(s,r),a=Math.min(a,r),e.height||(s=a));const d=Math.max(o,gt);let u,c=d;e.useContainerWidth?u=d:e.width&&(u=Math.min(Math.max(e.width,gt),d),c=Math.min(Math.max(e.width,c),d));const[m,h]=i.useState({width:u||"100%",height:s});return i.useLayoutEffect((()=>{e.useContainerWidth&&"100%"===m.width&&h({width:d,height:m.height})}),[d]),i.useLayoutEffect((()=>{h({width:m.width,height:s})}),[t]),i.useLayoutEffect((()=>{h({width:u||"100%",height:m.height})}),[u]),i.useLayoutEffect((()=>{h({width:m.width,height:s})}),[s]),i.useLayoutEffect((()=>{if(l){const t=e.useContainerWidth||(0,f.se)(e.width)&&e.width>0;h({width:t?c:"100%",height:a})}else h({width:u||"100%",height:s})}),[l]),{minHeight:ft,maxHeight:a,minWidth:gt,maxWidth:c,resizableSize:m,setResizableSize:h}};var vt=n(89653),yt=n(90782);const bt=(0,vt.A)("img",{target:"e24uaba0"})({name:"1do33ec",styles:"max-width:100%;max-height:600px;object-fit:scale-down"}),wt=e=>{let{urls:t}=e;const n=t&&t.length>0?t[0]:"";return n.startsWith("http")?(0,yt.jsx)("a",{href:n,target:"_blank",rel:"noreferrer noopener",children:(0,yt.jsx)(bt,{src:n})}):(0,yt.jsx)(bt,{src:n})};var xt=n(3074),Ct=n(41639),Mt=n(34914),St=n(88044),Et=n(58144);const Rt=function(e){let{top:t,left:n,content:o,clearTooltip:r}=e;const[l,a]=i.useState(!0),s=(0,J.u)(),{colors:d,fontSizes:u,radii:c,fontWeights:m}=s,h=i.useCallback((()=>{a(!1),r()}),[r,a]);return(0,yt.jsx)(xt.A,{content:(0,yt.jsx)(St.hW,{"data-testid":"stDataFrameTooltipContent",children:(0,yt.jsx)(Mt.Ay,{style:{fontSize:u.sm},source:o,allowHTML:!1})}),placement:Ct.El.top,accessibilityType:Ct.IP.tooltip,showArrow:!1,popoverMargin:5,onClickOutside:h,onEsc:h,overrides:{Body:{style:{borderTopLeftRadius:c.default,borderTopRightRadius:c.default,borderBottomLeftRadius:c.default,borderBottomRightRadius:c.default,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important",backgroundColor:"transparent"}},Inner:{style:{backgroundColor:(0,Et.iq)(s)?d.bgColor:d.secondaryBg,color:d.bodyText,fontSize:u.sm,fontWeight:m.normal,paddingTop:"0 !important",paddingBottom:"0 !important",paddingLeft:"0 !important",paddingRight:"0 !important"}}},isOpen:l,children:(0,yt.jsx)("div",{"data-testid":"stDataFrameTooltipTarget",style:{position:"fixed",top:t,left:n}})})},kt=(0,vt.A)("div",{target:"e1w7nams0"})((e=>{let{hasCustomizedScrollbars:t,theme:n}=e;return{position:"relative",display:"inline-block","& .stDataFrameGlideDataEditor":{height:"100%",minWidth:"100%",borderRadius:n.radii.default},"& .dvn-scroller":{...!t&&{scrollbarWidth:"thin"},overflowX:"auto !important",overflowY:"auto !important"}}}),"");n(32595),n(1627);const Tt=(0,h.A)((function(e){let{element:t,data:n,width:h,height:y,disabled:b,widgetMgr:w,isFullScreen:x,disableFullscreenMode:C,expand:M,collapse:S,fragmentId:E}=e;const R=i.useRef(null),k=i.useRef(null),T=i.useRef(null),{theme:N,headerIcons:I,tableBorderRadius:_}=ze(),{libConfig:{enforceDownloadInNewTab:O=!1}}=i.useContext(v.n),[D,A]=i.useState(!0),[F,X]=i.useState(!1),[H,L]=i.useState(!1),[z,W]=i.useState(!1),j=i.useMemo((()=>window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),[]),B=i.useMemo((()=>window.navigator.userAgent.includes("Mac OS")&&window.navigator.userAgent.includes("Safari")||window.navigator.userAgent.includes("Chrome")),[]);(0,f.hX)(t.editingMode)&&(t.editingMode=g.i3.EditingMode.READ_ONLY);const{READ_ONLY:Y,DYNAMIC:P}=g.i3.EditingMode,U=n.dimensions,q=Math.max(0,U.dataRows),J=0===q&&!(t.editingMode===P&&U.dataColumns>0),G=q>15e4,K=i.useRef(new He(q)),[Z,Q]=i.useState(K.current.getNumRows());i.useEffect((()=>{K.current=new He(q),Q(K.current.getNumRows())}),[q]);const ee=i.useCallback((()=>{K.current=new He(q),Q(K.current.getNumRows())}),[q]),{columns:te}=Ve(t,n,b);i.useEffect((()=>{if(t.editingMode===Y)return;const e=w.getStringValue({id:t.id,formId:t.formId});e&&(K.current.fromJson(e,te),Q(K.current.getNumRows()))}),[]);const{getCellContent:ne}=We(n,te,Z,K),{columns:ie,sortColumn:oe,getOriginalIndex:re,getCellContent:le}=Be(q,te,ne),ae=i.useCallback((0,f.sg)(150,(e=>{const n={selection:{rows:[],columns:[]}};n.selection.rows=e.rows.toArray().map((e=>re(e))),n.selection.columns=e.columns.toArray().map((e=>Xe(ie[e])));const i=JSON.stringify(n),o=w.getStringValue({id:t.id,formId:t.formId});void 0!==o&&o===i||w.setStringValue({id:t.id,formId:t.formId},i,{fromUi:!0},E)})),[t.id,t.formId,w,E,re,Xe]),{gridSelection:se,isRowSelectionActivated:de,isMultiRowSelectionActivated:ue,isColumnSelectionActivated:ce,isMultiColumnSelectionActivated:me,isRowSelected:he,isColumnSelected:ge,isCellSelected:fe,clearSelection:pe,processSelectionChange:ve}=Ue(t,J,b,ie,ae);i.useEffect((()=>{pe(!0,!0)}),[x]);const ye=i.useCallback((e=>{var t;null===(t=k.current)||void 0===t||t.updateCells(e)}),[]);i.useEffect((()=>{if(!de&&!ce)return;const e=w.getStringValue({id:t.id,formId:t.formId});if(e){var n,i,r,l;const t=ie.map((e=>Xe(e))),a=JSON.parse(e);let s=o.I1.empty(),d=o.I1.empty();if(null===(n=a.selection)||void 0===n||null===(i=n.rows)||void 0===i||i.forEach((e=>{s=s.add(e)})),null===(r=a.selection)||void 0===r||null===(l=r.columns)||void 0===l||l.forEach((e=>{d=d.add(t.indexOf(e))})),s.length>0||d.length>0){ve({rows:s,columns:d,current:void 0})}}}),[]);const be=i.useCallback((()=>{Z!==K.current.getNumRows()&&Q(K.current.getNumRows())}),[Z]),we=i.useCallback((0,f.sg)(150,(()=>{const e=K.current.toJson(ie);let n=w.getStringValue({id:t.id,formId:t.formId});void 0===n&&(n=new He(0).toJson([])),e!==n&&w.setStringValue({id:t.id,formId:t.formId},e,{fromUi:!0},E)})),[t.id,t.formId,w,E,ie,K.current]),{exportToCsv:xe}=nt(le,ie,Z,O),{onCellEdited:Ce,onPaste:Me,onRowAppended:Se,onDelete:Ee,validateCell:Re}=it(ie,t.editingMode!==P,K,le,re,ye,be,we,pe),{tooltip:ke,clearTooltip:Te,onItemHovered:Ne}=ot(ie,le),{drawCell:Ie,customRenderers:_e}=ut(ie),Oe=i.useMemo((()=>ie.map((e=>V(e)))),[ie]),{columns:De,onColumnResize:Ae}=ct(Oe),Fe=n.columns.length>1,{minHeight:$e,maxHeight:Le,minWidth:je,maxWidth:Ye,resizableSize:Pe,setResizableSize:qe}=pt(t,Z,Fe,h,y,x),Je=i.useCallback((e=>{let[t,n]=e;return{...$(!0,!1),displayData:"empty",contentAlign:"center",allowOverlay:!1,themeOverride:{textDark:N.textLight},span:[0,Math.max(ie.length-1,0)]}}),[ie,N.textLight]);i.useEffect((()=>{if(!t.formId)return;const e=new m.o;return e.manageFormClearListener(w,t.formId,(()=>{ee(),pe()})),()=>{e.disconnect()}}),[t.formId,ee,pe,w]);const Ge=!J&&t.editingMode===P&&!b,Ke=J?0:ie.filter((e=>e.isIndex)).length;return i.useEffect((()=>{setTimeout((()=>{if(T.current&&k.current){var e,t;const n=null===(e=T.current)||void 0===e||null===(t=e.querySelector(".dvn-stack"))||void 0===t?void 0:t.getBoundingClientRect();n&&(L(n.height>T.current.clientHeight),W(n.width>T.current.clientWidth))}}),1)}),[Pe,Z,De]),(0,yt.jsxs)(kt,{className:"stDataFrame","data-testid":"stDataFrame",hasCustomizedScrollbars:B,ref:T,onMouseDown:e=>{if(T.current&&B){const t=T.current.getBoundingClientRect();z&&t.height-7<e.clientY-t.top&&e.stopPropagation(),H&&t.width-7<e.clientX-t.left&&e.stopPropagation()}},onBlur:e=>{D||j||e.currentTarget.contains(e.relatedTarget)||pe(!0,!0)},children:[(0,yt.jsxs)(p.A,{isFullScreen:x,disableFullscreenMode:C,locked:he&&!de||fe||j&&D,onExpand:M,onCollapse:S,target:kt,children:[(de&&he||ce&&ge)&&(0,yt.jsx)(p.K,{label:"Clear selection",icon:a.b,onClick:()=>{pe(),Te()}}),Ge&&he&&(0,yt.jsx)(p.K,{label:"Delete row(s)",icon:s.e,onClick:()=>{Ee&&(Ee(se),Te())}}),Ge&&!he&&(0,yt.jsx)(p.K,{label:"Add row",icon:d.O,onClick:()=>{Se&&(A(!0),Se(),Te())}}),!G&&!J&&(0,yt.jsx)(p.K,{label:"Download as CSV",icon:u.n,onClick:()=>xe()}),!J&&(0,yt.jsx)(p.K,{label:"Search",icon:c.v,onClick:()=>{F?X(!1):(A(!0),X(!0)),Te()}})]}),(0,yt.jsx)(l.c,{"data-testid":"stDataFrameResizable",ref:R,defaultSize:Pe,style:{border:`1px solid ${N.borderColor}`,borderRadius:`${_}`},minHeight:$e,maxHeight:Le,minWidth:je,maxWidth:Ye,size:Pe,enable:{top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!0,bottomLeft:!1,topLeft:!1},grid:[1,ht],snapGap:ht/3,onResizeStop:(e,t,n,i)=>{R.current&&qe({width:R.current.size.width,height:Le-R.current.size.height===mt?R.current.size.height+mt:R.current.size.height})},children:(0,yt.jsx)(r.D,{className:"stDataFrameGlideDataEditor","data-testid":"stDataFrameGlideDataEditor",ref:k,columns:De,rows:J?1:Z,minColumnWidth:50,maxColumnWidth:1e3,maxColumnAutoWidth:500,rowHeight:ht,headerHeight:ht,getCellContent:J?Je:le,onColumnResize:j?void 0:Ae,resizeIndicator:"header",freezeColumns:Ke,smoothScrollX:!0,smoothScrollY:!0,verticalBorder:!0,getCellsForSelection:!0,rowMarkers:"none",rangeSelect:j?"cell":"rect",columnSelect:"none",rowSelect:"none",onItemHovered:Ne,keybindings:{downFill:!0},onKeyDown:e=>{(e.ctrlKey||e.metaKey)&&"f"===e.key&&(X((e=>!e)),e.stopPropagation(),e.preventDefault())},showSearch:F,onSearchClose:()=>{X(!1),Te()},onHeaderClicked:(e,t)=>{J||G||ce||(de&&he&&pe(),oe(e))},gridSelection:se,onGridSelectionChange:e=>{(D||j)&&(ve(e),void 0!==ke&&Te())},theme:N,onMouseMove:e=>{"out-of-bounds"===e.kind&&D?A(!1):"out-of-bounds"===e.kind||D||A(!0)},fixedShadowX:!0,fixedShadowY:!0,experimental:{scrollbarWidthOverride:0,...B&&{paddingBottom:z?-6:void 0,paddingRight:H?-6:void 0}},drawCell:Ie,customRenderers:_e,imageEditorOverride:wt,headerIcons:I,validateCell:Re,onPaste:!1,...de&&{rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:N.bgHeader,bgCellMedium:N.bgHeader}},rowSelectionMode:ue?"multi":"auto",rowSelect:b?"none":ue?"multi":"single",rowSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...ce&&{columnSelect:b?"none":me?"multi":"single",columnSelectionBlending:"mixed",rangeSelectionBlending:"exclusive"},...!J&&t.editingMode!==Y&&!b&&{fillHandle:!j,onCellEdited:Ce,onPaste:Me,onDelete:Ee},...!J&&t.editingMode===P&&{trailingRowOptions:{sticky:!1,tint:!0},rowMarkers:{kind:"checkbox",checkboxStyle:"square",theme:{bgCell:N.bgHeader,bgCellMedium:N.bgHeader}},rowSelectionMode:"multi",rowSelect:b?"none":"multi",onRowAppended:b?void 0:Se,onHeaderClicked:void 0}})}),ke&&ke.content&&(0,yt.jsx)(Rt,{top:ke.top,left:ke.left,content:ke.content,clearTooltip:Te})]})}),!0)}}]);
|