(this.webpackJsonpstreamlit_lang_tts=this.webpackJsonpstreamlit_lang_tts||[]).push([[0],{24:function(e,t,n){"use strict";n.r(t);var s=n(5),r=n.n(s),o=n(15),i=n.n(o),c=n(0),a=n(1),l=n(2),p=n(3),d=n(13),u=n(6),h=function(e){Object(l.a)(n,e);var t=Object(p.a)(n);function n(){var e;Object(a.a)(this,n);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))).state={textToSpeak:e.props.args.name,isFocused:!1},e.render=function(){var t=e.props.args.name,n=e.props.args.translation,s=e.props.theme,r={};if(s){var o="0px solid ".concat(e.state.isFocused?s.primaryColor:"gray");r.border=o,r.outline=o,r.border="1px solid gray",r.fontSize="20px",r.padding="3px",r.background="lightgray",r.borderRadius="5px",r.width="70px",r.height="70px",r.marginLeft="10px"}return Object(u.jsx)("div",{children:Object(u.jsxs)("div",{style:{display:"flex"},children:[Object(u.jsxs)("div",{children:[Object(u.jsxs)("p",{children:[Object(u.jsx)("span",{style:{fontWeight:"bold"},children:"AI:"})," ",t," \xa0"]}),Object(u.jsx)("p",{style:{fontStyle:"italic"},children:n})]}),Object(u.jsx)("button",{style:r,onClick:e.onClicked,disabled:e.props.disabled,onFocus:e._onFocus,onBlur:e._onBlur,children:"\ud83d\udde3"})]})})},e.onClicked=function(){e.state.textToSpeak;var t=new window.SpeechSynthesisUtterance,n=window.speechSynthesis.getVoices().filter((function(e){return"com.apple.voice.compact.es-ES.Monica"===e.voiceURI}))[0];t.text=e.props.args.name,t.voice=n,t.rate=.8,window.speechSynthesis.speak(t)},e._onFocus=function(){e.setState({isFocused:!0})},e._onBlur=function(){e.setState({isFocused:!1})},e}return Object(c.a)(n)}(d.a),b=Object(d.b)(h);i.a.render(Object(u.jsx)(r.a.StrictMode,{children:Object(u.jsx)(b,{})}),document.getElementById("root"))}},[[24,1,2]]]);
//# sourceMappingURL=main.2cce2544.chunk.js.map