(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{23:function(t,e,a){t.exports=a(35)},35:function(t,e,a){"use strict";a.r(e);var n=a(5),r=a.n(n),o=a(19),s=a.n(o),l=a(7),c=a(6),u=a(0),i=a(1),p=a(2),d=a(3),f=a(15),v=a(21),g=a(22),m=function(t){Object(p.a)(a,t);var e=Object(d.a)(a);function a(){var t;Object(i.a)(this,a);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(t=e.call.apply(e,[this].concat(o))).state={tag:"",isFocused:!1},t.render=function(){var e=t.props.args.annotations,a=t.props.args.colors,n=t.props.args.labels,o=t.props.args.text,s=t.props.args.selected_label,l=t.props.args.show_label_selector,u=t.props.theme,i={};if(u){var p="1px solid ".concat(t.state.isFocused?u.primaryColor:"gray");i.border=p,i.outline=p}return r.a.createElement(g.a,{initial:{value:e,tag:s}},(function(e){var s=e.state,u=e.setState;return r.a.createElement("span",null,l&&r.a.createElement("select",{onChange:function(t){return u({tag:t.target.value})},value:s.tag},n.map((function(t){return r.a.createElement("option",{key:t,value:t},t)}))),r.a.createElement(v.TextAnnotator,{style:{maxWidth:500,lineHeight:1.5},content:o,value:s.value,onChange:function(e){return t.updateState(e,u)},getSpan:function(t){return Object(c.a)(Object(c.a)({},t),{},{tag:s.tag,color:a[n.indexOf(s.tag)]})}}))}))},t.mergeAnnotations=function(t){t=t.filter((function(t){return!isNaN(t.start)&&!isNaN(t.end)}));var e,a=Object(l.a)(t);try{for(a.s();!(e=a.n()).done;){var n,r=e.value,o=!1,s=null,c=Object(l.a)(t);try{for(c.s();!(n=c.n()).done;){var u=n.value;if((r.start!==u.start||r.end!==u.end)&&(u.start<=r.start&&u.end>=r.start||u.start<=r.end&&u.end>=r.end)){o=!0,s=u;break}}}catch(m){c.e(m)}finally{c.f()}if(o){var i,p=[],d=Object(l.a)(t);try{for(d.s();!(i=d.n()).done;){var f,v,g=i.value;g.start!==r.start&&g.end!==r.end&&g.start!==(null===(f=s)||void 0===f?void 0:f.start)&&g.end!==(null===(v=s)||void 0===v?void 0:v.end)&&p.push(g)}}catch(m){d.e(m)}finally{d.f()}return p}}}catch(m){a.e(m)}finally{a.f()}return t},t.updateState=function(e,a){a({value:e=t.mergeAnnotations(e)}),f.a.setComponentValue(e)},t._onFocus=function(){t.setState({isFocused:!0})},t._onBlur=function(){t.setState({isFocused:!1})},t}return Object(u.a)(a)}(f.b),b=Object(f.c)(m);s.a.render(r.a.createElement(b,null),document.getElementById("root"))}},[[23,1,2]]]);
//# sourceMappingURL=main.20f0490c.chunk.js.map