text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports["default"] = void 0;
  
  var _react = _interopRequireWildcard(require("react"));
  
  var _reactJsonTree = _interopRequireDefault(require("react-json-tree"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
  
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
  
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
  
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
  
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
  
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  
  var styles = {
    actionBar: {
      paddingTop: 8,
      paddingBottom: 7,
      paddingLeft: 16
    },
    payload: {
      margin: 0,
      paddingLeft: 16,
      overflow: 'auto'
    }
  };
  
  var LogMonitorAction = /*#__PURE__*/function (_Component) {
    _inherits(LogMonitorAction, _Component);
  
    var _super = _createSuper(LogMonitorAction);
  
    function LogMonitorAction() {
      var _this;
  
      _classCallCheck(this, LogMonitorAction);
  
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      _this = _super.call.apply(_super, [this].concat(args));
  
      _defineProperty(_assertThisInitialized(_this), "shouldExpandNode", function (keyPath, data, level) {
        return _this.props.expandActionRoot && level === 0;
      });
  
      return _this;
    }
  
    _createClass(LogMonitorAction, [{
      key: "renderPayload",
      value: function renderPayload(payload) {
        return /*#__PURE__*/_react["default"].createElement("div", {
          style: _objectSpread(_objectSpread({}, styles.payload), {}, {
            backgroundColor: this.props.theme.base00
          })
        }, Object.keys(payload).length > 0 ? /*#__PURE__*/_react["default"].createElement(_reactJsonTree["default"], {
          theme: this.props.theme,
          invertTheme: false,
          keyPath: ['action'],
          data: payload,
          shouldExpandNode: this.shouldExpandNode
        }) : '');
      }
    }, {
      key: "render",
      value: function render() {
        var _this$props$action = this.props.action,
            type = _this$props$action.type,
            payload = _objectWithoutProperties(_this$props$action, ["type"]);
  
        return /*#__PURE__*/_react["default"].createElement("div", {
          style: _objectSpread({
            backgroundColor: this.props.theme.base02,
            color: this.props.theme.base06
          }, this.props.style)
        }, /*#__PURE__*/_react["default"].createElement("div", {
          style: styles.actionBar,
          onClick: this.props.onClick
        }, type !== null && type.toString()), !this.props.collapsed ? this.renderPayload(payload) : '');
      }
    }]);
  
    return LogMonitorAction;
  }(_react.Component);
  
  exports["default"] = LogMonitorAction;
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Mb2dNb25pdG9yRW50cnlBY3Rpb24udHN4Il0sIm5hbWVzIjpbInN0eWxlcyIsImFjdGlvbkJhciIsInBhZGRpbmdUb3AiLCJwYWRkaW5nQm90dG9tIiwicGFkZGluZ0xlZnQiLCJwYXlsb2FkIiwibWFyZ2luIiwib3ZlcmZsb3ciLCJMb2dNb25pdG9yQWN0aW9uIiwia2V5UGF0aCIsImRhdGEiLCJsZXZlbCIsInByb3BzIiwiZXhwYW5kQWN0aW9uUm9vdCIsImJhY2tncm91bmRDb2xvciIsInRoZW1lIiwiYmFzZTAwIiwiT2JqZWN0Iiwia2V5cyIsImxlbmd0aCIsInNob3VsZEV4cGFuZE5vZGUiLCJhY3Rpb24iLCJ0eXBlIiwiYmFzZTAyIiwiY29sb3IiLCJiYXNlMDYiLCJzdHlsZSIsIm9uQ2xpY2siLCJ0b1N0cmluZyIsImNvbGxhcHNlZCIsInJlbmRlclBheWxvYWQiLCJDb21wb25lbnQ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tZT17dGhpcy5wcm9wcy50aGVtZX1cbiAgICAgICAgICAgIGludmVydFRoZW1lPXtmYWxzZX1cbiAgICAgICAgICAgIGtleVBhdGg9e1snYWN0aW9uJ119XG4gICAgICAgICAgICBkYXRhPXtwYXlsb2FkfVxuICAgICAgICAgICAgc2hvdWxkRXhwYW5kTm9kZT17dGhpcy5zaG91bGRFeHBhbmROb2RlfVxuICAgICAgICAgIC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgJydcbiAgICAgICAgKX1cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cblxuICBzaG91bGRFeHBhbmROb2RlID0gKFxuICAgIGtleVBhdGg6IChzdHJpbmcgfCBudW1iZXIpW10sXG4gICAgZGF0YTogYW55LFxuICAgIGxldmVsOiBudW1iZXJcbiAgKSA9PiB7XG4gICAgcmV0dXJuIHRoaXMucHJvcHMuZXhwYW5kQWN0aW9uUm9vdCAmJiBsZXZlbCA9PT0gMDtcbiAgfTtcblxuICByZW5kZXIoKSB7XG4gICAgY29uc3QgeyB0eXBlLCAuLi5wYXlsb2FkIH0gPSB0aGlzLnByb3BzLmFjdGlvbjtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdlxuICAgICAgICBzdHlsZT17e1xuICAgICAgICAgIGJhY2tncm91bmRDb2xvcjogdGhpcy5wcm9wcy50aGVtZS5iYXNlMDIsXG4gICAgICAgICAgY29sb3I6IHRoaXMucHJvcHMudGhlbWUuYmFzZTA2LFxuICAgICAgICAgIC4uLnRoaXMucHJvcHMuc3R5bGUsXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIDxkaXYgc3R5bGU9e3N0eWxlcy5hY3Rpb25CYXJ9IG9uQ2xpY2s9e3RoaXMucHJvcHMub25DbGlja30+XG4gICAgICAgICAge3R5cGUgIT09IG51bGwgJiYgKHR5cGUgYXMgc3RyaW5nKS50b1N0cmluZygpfVxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgeyF0aGlzLnByb3BzLmNvbGxhcHNlZCA/IHRoaXMucmVuZGVyUGF5bG9hZChwYXlsb2FkKSA6ICcnfVxuICAgICAgPC9kaXY+XG4gICAgKTtcbiAgfVxufVxuIl19