(this.webpackJsonpstreamlit_antd_tag=this.webpackJsonpstreamlit_antd_tag||[]).push([[0],{103:function(t,e,n){"use strict";n.r(e);var a=n(0),s=n.n(a),i=n(31),u=n.n(i),l=n(9),r=n(2),c=n(3),o=n(4),p=n(5),d=n(50),b=n(112),j=n(111),g=n(108),f=n(110),h=n(109),x=n(28),v=function(t){Object(o.a)(n,t);var e=Object(p.a)(n);function n(){var t;Object(r.a)(this,n);for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return(t=e.call.apply(e,[this].concat(s))).state={tags:t.props.args.tag_list,inputVisible:!1,inputValue:"",editInputIndex:-1,editInputValue:"",inputRef:null,editInputRef:null},t.new_tag_name=t.props.args.new_tag_name,t.removable_start_idx=t.props.args.removable_start_idx,t.render=function(){var e=function(){t.state.inputValue&&-1===t.state.tags.indexOf(t.state.inputValue)&&t.setState({tags:[].concat(Object(l.a)(t.state.tags),[t.state.inputValue])},(function(){d.a.setComponentValue(t.state.tags)})),t.setState({inputVisible:!1,inputValue:""})},n=function(e){t.setState({editInputValue:e.target.value})},a=function(){var e=Object(l.a)(t.state.tags);e[t.state.editInputIndex]=t.state.editInputValue,t.setState({tags:e,editInputIndex:-1,editInputValue:""},(function(){d.a.setComponentValue(t.state.tags)}))},s={width:78,verticalAlign:"top"};return Object(x.jsxs)(j.b,{size:[0,8],wrap:!0,children:[Object(x.jsx)(j.b,{size:[0,8],wrap:!0,children:t.state.tags.map((function(e,i){if(t.state.editInputIndex===i)return Object(x.jsx)(g.a,{ref:t.state.editInputRef,size:"small",style:s,value:t.state.editInputValue,onChange:n,onBlur:a,onPressEnter:a},e);var u=e.length>20,l=Object(x.jsx)(f.a,{closable:i>=t.removable_start_idx,style:{userSelect:"none"},onClose:function(){return function(e){var n=t.state.tags.filter((function(t){return t!==e}));t.setState({tags:n},(function(){d.a.setComponentValue(t.state.tags)}))}(e)},children:Object(x.jsx)("span",{onDoubleClick:function(n){0!==i&&(t.setState({editInputIndex:i,editInputValue:e}),n.preventDefault())},children:u?"".concat(e.slice(0,20),"..."):e})},e);return u?Object(x.jsx)(h.a,{title:e,children:l},e):l}))}),t.state.inputVisible?Object(x.jsx)(g.a,{ref:t.state.inputRef,type:"text",size:"small",style:s,value:t.state.inputValue,onChange:function(e){t.setState({inputValue:e.target.value})},onBlur:e,onPressEnter:e}):Object(x.jsxs)(f.a,{style:{borderStyle:"dashed"},onClick:function(){t.setState({inputVisible:!0})},children:[Object(x.jsx)(b.a,{}),t.new_tag_name]})]})},t}return Object(c.a)(n,[{key:"ajustHeight",value:function(){setTimeout((function(){d.a.setFrameHeight()}),0)}},{key:"componentDidMount",value:function(){this.ajustHeight()}},{key:"componentDidUpdate",value:function(){this.ajustHeight()}}]),n}(d.b),m=Object(d.c)(v);u.a.render(Object(x.jsx)(s.a.StrictMode,{children:Object(x.jsx)("div",{children:Object(x.jsx)(m,{})})}),document.getElementById("root"))}},[[103,1,2]]]);
//# sourceMappingURL=main.d920a735.chunk.js.map