(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{14:function(e,t,n){e.exports=n(22)},21:function(e,t,n){},22:function(e,t,n){"use strict";n.r(t);var a=n(5),o=n.n(a),s=n(12),i=n.n(s),r=n(0),l=n(1),c=n(2),u=n(3),v=n(8),d=(n(21),function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(e){var a;Object(l.a)(this,n),(a=t.call(this,e)).render=function(){var e,t,n,s,i=!0,r=function(){};if("SpeechRecognition"in window||"webkitSpeechRecognition"in window){var l=new(0,window.webkitSpeechRecognition);l.interimResults=!0,l.onresult=function(e){var t=Array.from(e.results).map((function(e){return e[0]})).map((function(e){return e.transcript})).join("");a.setState({value:t})},l.onend=function(){a.onSearch(),a.setState({isListening:!1})},r=function(){var e;(null===(e=a.state)||void 0===e?void 0:e.isListening)||l.start(),a.setState({isListening:!0})}}else i=!1;var c=a.props.args.subtext,u=a.props.args.suggestions,v=a.props.args.value,d=a.props.args.width;return v&&a.setState({value:v}),o.a.createElement("span",null,o.a.createElement("div",{className:"search-form"},o.a.createElement("input",{type:"text",onFocus:a.onFocus,onBlur:a.onBlur,value:null===(e=a.state)||void 0===e?void 0:e.value,placeholder:c,onKeyPress:a._handleKeyDown,onChange:a.onChange,className:"search-input",style:{width:d}}),o.a.createElement("button",{type:"button",className:"search-button",onClick:a.onSearch},o.a.createElement("svg",{className:"submit-button"},o.a.createElement("use",{xmlnsXlink:"http://www.w3.org/1999/xlink",xlinkHref:"#search"}))),o.a.createElement("div",{className:"search-option"},o.a.createElement("div",{className:i?"":"hidden"},o.a.createElement("button",{type:"button",onFocus:a.onFocus,onBlur:a.onBlur,onClick:r},o.a.createElement("svg",{id:"record-button",className:(null===(t=a.state)||void 0===t?void 0:t.isListening)?"recording":""},o.a.createElement("use",{xmlnsXlink:"http://www.w3.org/1999/xlink",xlinkHref:"#user"}))))),o.a.createElement("div",{className:"dropdown",style:{backgroundColor:"white",boxShadow:"0 6px 8px rgba(0, 0, 0, 0.15)"}},o.a.createElement("div",{className:"scroll",style:{maxHeight:(null===(n=a.state)||void 0===n?void 0:n.isActive)?100:"initial",overflowY:(null===(s=a.state)||void 0===s?void 0:s.isActive)?"scroll":"hidden"}},null===u||void 0===u?void 0:u.filter((function(e){var t,n;if(null===(t=a.state)||void 0===t?void 0:t.isActive){if(null!=(null===(n=a.state)||void 0===n?void 0:n.value)&&""!=a.state.value){var o=a.state.value.toLowerCase(),s=e.toLowerCase();return o&&s.startsWith(o)&&s!==o}return e}return""})).map((function(e){return o.a.createElement("div",{className:"dropdown-row",onMouseDown:function(){return a.setSuggestion(e)}},e)})))),o.a.createElement("div",{className:"dropdown"},"\xa0")),o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0",height:"0",display:"none"},o.a.createElement("symbol",{id:"search",viewBox:"0 0 32 32"},o.a.createElement("path",{d:"M 19.5 3 C 14.26514 3 10 7.2651394 10 12.5 C 10 14.749977 10.810825 16.807458 12.125 18.4375 L 3.28125 27.28125 L 4.71875 28.71875 L 13.5625 19.875 C 15.192542 21.189175 17.250023 22 19.5 22 C 24.73486 22 29 17.73486 29 12.5 C 29 7.2651394 24.73486 3 19.5 3 z M 19.5 5 C 23.65398 5 27 8.3460198 27 12.5 C 27 16.65398 23.65398 20 19.5 20 C 15.34602 20 12 16.65398 12 12.5 C 12 8.3460198 15.34602 5 19.5 5 z"})),o.a.createElement("symbol",{id:"user",viewBox:"0 0 18 18"},o.a.createElement("path",{d:"M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z"}),o.a.createElement("path",{d:"M10 8a2 2 0 1 1-4 0V3a2 2 0 1 1 4 0v5zM8 0a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V3a3 3 0 0 0-3-3z"}))))},a.onChange=function(e){a.setState({value:e.target.value})},a.setSuggestion=function(e){a.setState({value:e},(function(){var e;return v.a.setComponentValue(null===(e=a.state)||void 0===e?void 0:e.value)}))},a.onFocus=function(e){a.setState({isActive:!0})},a.onBlur=function(e){a.setState({isActive:!1})},a.onSearch=function(){a.setState((function(){var e;return v.a.setComponentValue(null===(e=a.state)||void 0===e?void 0:e.value)}))},a._handleKeyDown=function(e){"Enter"===e.key&&a.setState((function(){return v.a.setComponentValue(a.state.value)}))};var s=a.props.args.default;return null!=s&&(a.state={value:s,isListening:!1,isActive:!1}),console.log(s),a}return Object(r.a)(n)}(v.b)),m=Object(v.c)(d);i.a.render(o.a.createElement(o.a.StrictMode,null,o.a.createElement(m,null)),document.getElementById("root"))}},[[14,1,2]]]);
//# sourceMappingURL=main.bf54b1a2.chunk.js.map