(this["webpackJsonpstreamlit-browser"]=this["webpackJsonpstreamlit-browser"]||[]).push([[25],{1180:function(e,t,n){"use strict";var a=n(5),r=n.n(a),i=r()("label",{target:"effi0qh0"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.bodyText,marginBottom:t.fontSizes.halfSmDefault}}),""),o=r()("div",{target:"effi0qh1"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.gray,margin:t.spacing.none,textAlign:"right",position:"absolute",bottom:0,right:t.fontSizes.halfSmDefault}}),"");n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}))},1516:function(e,t,n){"use strict";var a=n(144),r=n(0),i=n.n(r),o=n(99),l=n(1753),s=n(5),u=n.n(s),c=n(235),p=n.n(c),f=n(1384);var d=u()("span",{target:"e1sjeeqh0"})({name:"1d0tddh",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"}),m=u()(f.e,{shouldForwardProp:p.a,target:"e1sjeeqh1"})((function(e){var t=e.theme;return{display:"flex",alignItems:"center",paddingTop:t.spacing.none,paddingBottom:t.spacing.none}}),"");function v(e){var t=e.data,n=e.index,r=e.style,o=t[n].props,l=o.item,s=(o.overrides,Object(a.a)(o,["item","overrides"]));return i.a.createElement(m,Object.assign({key:l.value,style:r},s),i.a.createElement(d,null,l.label))}var h=i.a.forwardRef((function(e,t){var n=i.a.Children.toArray(e.children);if(!n[0]||!n[0].props.item){var a=n[0]?n[0].props:{};return i.a.createElement(o.b,{$style:{height:"".concat(90,"px")},ref:t},i.a.createElement(o.a,a))}var r=Math.min(300,40*n.length);return i.a.createElement(o.b,{ref:t},i.a.createElement(l.FixedSizeList,{width:"100%",height:r,itemCount:n.length,itemData:n,itemKey:function(e,t){return t[e].props.item.value},itemSize:40},v))}));h.displayName="VirtualDropdown";var g=h;n.d(t,"a",(function(){return g}))},3844:function(e,t,n){"use strict";n.r(t);var a=n(44),r=n(9),i=n(13),o=n(20),l=n(21),s=n(0),u=n.n(s),c=n(3821),p=n(10),f=n(1516),d=n(1180),m=function(e){Object(o.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(r.a)(this,n);for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return(e=t.call.apply(t,[this].concat(o))).state={value:e.initialValue},e.setWidgetValue=function(t){var n=e.props.element.id;e.props.widgetMgr.setIntValue(n,e.state.value,t)},e.onChange=function(t){if(0!==t.value.length){var n=Object(a.a)(t.value,1)[0];e.setState({value:parseInt(n.value,10)},(function(){return e.setWidgetValue({fromUi:!0})}))}else Object(p.d)("No value selected!")},e.filterOptions=function(e,t){return e.filter((function(e){return e.label.toLowerCase().includes(t.toString().toLowerCase())}))},e.render=function(){var t={width:e.props.width},n=e.props.element.options,a=e.props.disabled,r=[{label:n.length>0?n[e.state.value]:"No options to select.",value:e.state.value.toString()}];0===n.length&&(n=["No options to select."],a=!0);var i=[];return n.forEach((function(e,t){return i.push({label:e,value:t.toString()})})),u.a.createElement("div",{className:"row-widget stSelectbox",style:t},u.a.createElement(d.b,null,e.props.element.label),u.a.createElement(c.a,{clearable:!1,disabled:a,labelKey:"label",onChange:e.onChange,options:i,filterOptions:e.filterOptions,value:r,valueKey:"value",overrides:{Dropdown:{component:f.a}}}))},e}return Object(i.a)(n,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}},{key:"initialValue",get:function(){var e=this.props.element.id,t=this.props.widgetMgr.getIntValue(e);return void 0!==t?t:this.props.element.default}}]),n}(u.a.PureComponent);n.d(t,"default",(function(){return m}))}}]);
//# sourceMappingURL=25.73e23cde.chunk.js.map