webpackHotUpdate(0,{

/***/ 210:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(223);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_css__ = __webpack_require__(211);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__input_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__input_css__);\n\n\n\n\n\nclass Input extends __WEBPACK_IMPORTED_MODULE_0_react___default.a.Component {\n\n  constructor(props) {\n    super(props);\n    this.state = { value: '' };\n  }\n\n  onChange(value) {\n    this.setState({ value });\n  }\n\n  onKeyPress(e) {\n    if (e.charCode === 13 || e.keyCode === 13) {\n      // 'enter' key\n      this.onSend();\n    }\n  }\n\n  onSend() {\n    this.props.instance[`in_${this.props.port.name}`](this.state.value);\n    this.setState({ value: '' });\n  }\n\n  render() {\n    const key = `input-${this.props.port.name}`;\n\n    return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n      'div',\n      { className: 'input' },\n      __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n        'label',\n        { htmlFor: key },\n        this.props.port.name,\n        ':'\n      ),\n      __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n        'div',\n        { className: 'group' },\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('input', {\n          type: 'text',\n          name: key,\n          value: this.state.value,\n          onChange: e => this.onChange(e.target.value),\n          onKeyPress: e => this.onKeyPress(e) }),\n        __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(\n          'button',\n          { onClick: () => this.onSend() },\n          'Send'\n        )\n      )\n    );\n  }\n}\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = Input;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEwLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL2Jyb3dzZXItdGVzdGVyL3NyYy9jb21wb25lbnRzL0lucHV0L2luZGV4LmpzP2JmNDkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5cbmltcG9ydCAnLi9pbnB1dC5jc3MnO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBJbnB1dCBleHRlbmRzIFJlYWN0LkNvbXBvbmVudCB7XG5cbiAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICBzdXBlcihwcm9wcyk7XG4gICAgdGhpcy5zdGF0ZSA9IHsgdmFsdWU6ICcnIH07XG4gIH1cblxuICBvbkNoYW5nZSh2YWx1ZSkge1xuICAgIHRoaXMuc2V0U3RhdGUoeyB2YWx1ZSB9KTtcbiAgfVxuXG4gIG9uS2V5UHJlc3MoZSkge1xuICAgIGlmIChlLmNoYXJDb2RlID09PSAxMyB8fCBlLmtleUNvZGUgPT09IDEzKSB7IC8vICdlbnRlcicga2V5XG4gICAgICB0aGlzLm9uU2VuZCgpO1xuICAgIH1cbiAgfVxuXG4gIG9uU2VuZCgpIHtcbiAgICB0aGlzLnByb3BzLmluc3RhbmNlW2Bpbl8ke3RoaXMucHJvcHMucG9ydC5uYW1lfWBdKHRoaXMuc3RhdGUudmFsdWUpO1xuICAgIHRoaXMuc2V0U3RhdGUoeyB2YWx1ZTogJycgfSk7XG4gIH1cblxuICByZW5kZXIoKSB7XG4gICAgY29uc3Qga2V5ID0gYGlucHV0LSR7dGhpcy5wcm9w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