(this["webpackJsonpstreamlit-browser"]=this["webpackJsonpstreamlit-browser"]||[]).push([[24],{1180:function(e,t,n){"use strict";var a=n(5),r=n.n(a),o=r()("label",{target:"effi0qh0"})((function(e){var t=e.theme;return{fontSize:t.fontSizes.smDefault,color:t.colors.bodyText,marginBottom:t.fontSizes.halfSmDefault}}),""),i=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 i})),n.d(t,"b",(function(){return o}))},1516:function(e,t,n){"use strict";var a=n(144),r=n(0),o=n.n(r),i=n(99),l=n(1753),s=n(5),u=n.n(s),c=n(235),p=n.n(c),f=n(1384);var h=u()("span",{target:"e1sjeeqh0"})({name:"1d0tddh",styles:"overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"}),d=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 m(e){var t=e.data,n=e.index,r=e.style,i=t[n].props,l=i.item,s=(i.overrides,Object(a.a)(i,["item","overrides"]));return o.a.createElement(d,Object.assign({key:l.value,style:r},s),o.a.createElement(h,null,l.label))}var v=o.a.forwardRef((function(e,t){var n=o.a.Children.toArray(e.children);if(!n[0]||!n[0].props.item){var a=n[0]?n[0].props:{};return o.a.createElement(i.b,{$style:{height:"".concat(90,"px")},ref:t},o.a.createElement(i.a,a))}var r=Math.min(300,40*n.length);return o.a.createElement(i.b,{ref:t},o.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},m))}));v.displayName="VirtualDropdown";var g=v;n.d(t,"a",(function(){return g}))},3842:function(e,t,n){"use strict";n.r(t);var a=n(9),r=n(13),o=n(20),i=n(21),l=n(0),s=n.n(l),u=n(2476),c=n.n(u),p=n(38),f=n(3821),h=n(1383),d=n(1516),m=n(1180),v=function(e){Object(o.a)(n,e);var t=Object(i.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];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.setIntArrayValue(n,e.state.value,t)},e.onChange=function(t){var n=e.generateNewState(t);e.setState(n,(function(){return e.setWidgetValue({fromUi:!0})}))},e}return Object(r.a)(n,[{key:"componentDidMount",value:function(){this.setWidgetValue({fromUi:!1})}},{key:"generateNewState",value:function(e){var t=function(){var t=e.option.value;return parseInt(t,10)};switch(e.type){case"remove":return{value:c()(this.state.value,t())};case"clear":return{value:[]};case"select":return{value:this.state.value.concat([t()])};default:throw new Error("State transition is unkonwn: {data.type}")}}},{key:"render",value:function(){var e=this.props,t=e.element,n=e.theme,a={width:e.width},r=t.options,o=0===r.length||this.props.disabled,i=0===r.length?"No options to select.":"Choose an option",l=r.map((function(e,t){return{label:e,value:t.toString()}}));return s.a.createElement("div",{className:"row-widget stMultiSelect",style:a},s.a.createElement(m.b,null,t.label),s.a.createElement(f.a,{options:l,labelKey:"label",valueKey:"value",placeholder:i,type:h.b.select,multi:!0,onChange:this.onChange,value:this.valueFromState,disabled:o,size:"compact",overrides:{ValueContainer:{style:function(){return{minHeight:"44px"}}},ClearIcon:{style:{color:n.colors.darkGray}},SearchIcon:{style:{color:n.colors.darkGray}},MultiValue:{props:{overrides:{Root:{style:{fontSize:n.fontSizes.sm}}}}},Dropdown:{component:d.a}}}))}},{key:"initialValue",get:function(){var e=this.props.element.id,t=this.props.widgetMgr.getIntArrayValue(e);return void 0!==t?t:this.props.element.default}},{key:"valueFromState",get:function(){var e=this;return this.state.value.map((function(t){var n=e.props.element.options[t];return{value:t.toString(),label:n}}))}}]),n}(s.a.PureComponent),g=Object(p.withTheme)(v);n.d(t,"default",(function(){return g}))}}]);
//# sourceMappingURL=24.5224d52c.chunk.js.map