/*!
 * Copyright © 2024 Splunk Inc.
 * SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
 * in part without a valid written license from Splunk Inc. is PROHIBITED.
 */
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 82);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ (function(module, exports) {

module.exports = require("react");

/***/ }),

/***/ 1:
/***/ (function(module, exports) {

module.exports = require("prop-types");

/***/ }),

/***/ 10:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/defineProperty");

/***/ }),

/***/ 11:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/extends");

/***/ }),

/***/ 17:
/***/ (function(module, exports) {

module.exports = require("@splunk/react-ui/Markdown");

/***/ }),

/***/ 2:
/***/ (function(module, exports) {

module.exports = require("styled-components");

/***/ }),

/***/ 4:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/classCallCheck");

/***/ }),

/***/ 6:
/***/ (function(module, exports) {

module.exports = require("@splunk/react-ui/Heading");

/***/ }),

/***/ 60:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/inherits");

/***/ }),

/***/ 61:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/getPrototypeOf");

/***/ }),

/***/ 66:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/assertThisInitialized");

/***/ }),

/***/ 67:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/possibleConstructorReturn");

/***/ }),

/***/ 68:
/***/ (function(module, exports) {

module.exports = require("@splunk/react-ui/JSONTree");

/***/ }),

/***/ 7:
/***/ (function(module, exports) {

module.exports = require("@babel/runtime/helpers/createClass");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66);
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(60);
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(67);
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(61);
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(0);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(6);
/* harmony import */ var _splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17);
/* harmony import */ var _splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(68);
/* harmony import */ var _splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2);
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_13__);









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) {
        _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(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 _createSuper(Derived) {
  var hasNativeReflectConstruct = _isNativeReflectConstruct();

  return function _createSuperInternal() {
    var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(Derived),
        result;

    if (hasNativeReflectConstruct) {
      var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(this).constructor;

      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }

    return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, result);
  };
}

function _isNativeReflectConstruct() {
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  if (Reflect.construct.sham) return false;
  if (typeof Proxy === "function") return true;

  try {
    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
    return true;
  } catch (e) {
    return false;
  }
}
/* eslint-disable react/no-multi-comp */

/* eslint-disable max-classes-per-file */








var EventTester = styled_components__WEBPACK_IMPORTED_MODULE_13___default.a.div.withConfig({
  displayName: "EventsDoc__EventTester",
  componentId: "dc0pgb-0"
})(["margin-top:50px;"]);
var Event = styled_components__WEBPACK_IMPORTED_MODULE_13___default.a.div.withConfig({
  displayName: "EventsDoc__Event",
  componentId: "dc0pgb-1"
})(["margin-top:20px;"]);
var EventName = styled_components__WEBPACK_IMPORTED_MODULE_13___default.a.div.withConfig({
  displayName: "EventsDoc__EventName",
  componentId: "dc0pgb-2"
})(["color:#5ca300;padding-bottom:5px;"]);

var EventItem = function EventItem(_ref) {
  var name = _ref.name,
      desc = _ref.desc;
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(Event, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventName, null, name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default.a, {
    style: {
      marginLeft: 40
    },
    text: desc
  }));
};

EventItem.propTypes = {
  name: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string,
  desc: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string
};

var EventsDesc = function EventsDesc(_ref2) {
  var events = _ref2.events,
      vizType = _ref2.vizType;
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
    level: 4
  }, Object.keys(events).length !== 0 || vizType === 'splunk.events' ? 'Events' : 'No Events'), vizType === 'splunk.events' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Markdown__WEBPACK_IMPORTED_MODULE_11___default.a, {
    text: "Events are dynamically added via the `eventActions` and `fieldActions` options for the Events visualization."
  }), Object.keys(events).map(function (eventName) {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventItem, {
      key: eventName,
      name: eventName,
      desc: events[eventName].description
    });
  }));
};

EventsDesc.propTypes = {
  events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object.isRequired,
  vizType: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.string
};

var VisExample = /*#__PURE__*/function (_PureComponent) {
  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(VisExample, _PureComponent);

  var _super = _createSuper(VisExample);

  function VisExample() {
    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, VisExample);

    return _super.apply(this, arguments);
  }

  _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(VisExample, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          _this$props$options = _this$props.options,
          options = _this$props$options === void 0 ? {} : _this$props$options,
          Visualization = _this$props.Visualization,
          dsState = _this$props.dsState,
          onEventTrigger = _this$props.onEventTrigger,
          height = _this$props.height,
          width = _this$props.width;
      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventTester, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
        level: 4
      }, "Test Visualization"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(Visualization, {
        options: options,
        dataSources: dsState,
        onEventTrigger: onEventTrigger,
        hasEventHandlers: true,
        height: height,
        width: width
      }));
    }
  }]);

  return VisExample;
}(react__WEBPACK_IMPORTED_MODULE_8__["PureComponent"]);

VisExample.propTypes = {
  options: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
  Visualization: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any,
  dsState: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
  onEventTrigger: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.func,
  height: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number,
  width: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.number
};

var EventExample = function EventExample(_ref3) {
  var event = _ref3.event;

  var eventToDisplay = _objectSpread({}, event);

  if (eventToDisplay.originalEvent != null) {
    eventToDisplay.originalEvent = '...Original Event instance...';
  }

  var content = Object(react__WEBPACK_IMPORTED_MODULE_8__["useMemo"])(function () {
    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_JSONTree__WEBPACK_IMPORTED_MODULE_12___default.a, {
      key: JSON.stringify(eventToDisplay),
      json: eventToDisplay,
      expandChildren: true
    });
  }, [eventToDisplay]);
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_8___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_splunk_react_ui_Heading__WEBPACK_IMPORTED_MODULE_10___default.a, {
    level: 4
  }, "Event Monitor"), content);
};

EventExample.propTypes = {
  event: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object
};

var EventsDoc = /*#__PURE__*/function (_Component) {
  _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(EventsDoc, _Component);

  var _super2 = _createSuper(EventsDoc);

  function EventsDoc(props, context) {
    var _this;

    _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, EventsDoc);

    _this = _super2.call(this, props, context);

    _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1___default()(_this), "handleEvent", function (e) {
      _this.setState({
        e: e
      });
    });

    _this.state = {
      e: null
    };
    return _this;
  }

  _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(EventsDoc, [{
    key: "render",
    value: function render() {
      var _this$props2, _this$props2$Visualiz, _this$props2$Visualiz2;

      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventsDesc, {
        events: this.props.events,
        vizType: (_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$Visualiz = _this$props2.Visualization) === null || _this$props2$Visualiz === void 0 ? void 0 : (_this$props2$Visualiz2 = _this$props2$Visualiz.config) === null || _this$props2$Visualiz2 === void 0 ? void 0 : _this$props2$Visualiz2.key
      }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(VisExample, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props, {
        onEventTrigger: this.handleEvent
      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(EventExample, {
        event: this.state.e
      }));
    }
  }]);

  return EventsDoc;
}(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);

EventsDoc.propTypes = {
  options: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
  events: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
  dsState: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.object,
  Visualization: prop_types__WEBPACK_IMPORTED_MODULE_9___default.a.any
};
/* harmony default export */ __webpack_exports__["default"] = (EventsDoc);

/***/ })

/******/ });
//# sourceMappingURL=EventsDoc.js.map