/*!
 * Copyright © 2018 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 = 67);
/******/ })
/************************************************************************/
/******/ ({

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

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

/***/ }),

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

module.exports = require("react");

/***/ }),

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return propsConvert; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return propsDeprecate; });
/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_0__);

/**
 * convert the old props to new props for pure visualization based on propsMapping
 * @param {Object} oldProps   props used by react visualizations
 * @param {Object} propsMapping
 * @return {Object} newprops    props used by pure visualizations
 */

var propsConvert = function propsConvert(oldProps, propsMapping) {
  var newProps = {};
  Object.keys(oldProps).forEach(function (propKey) {
    var key = propsMapping[propKey] || propKey;
    newProps[key] = oldProps[propKey];
  });
  return newProps;
};
/**
 * omit the deprecated props for pure visualization
 * @param {Object} props   props used by react visualizations
 * @param {Array} deprecatedProps
 * @return {Object} newprops    props used by pure visualizations
 */

var propsDeprecate = function propsDeprecate(props, deprecatedProps) {
  return lodash_omit__WEBPACK_IMPORTED_MODULE_0___default()(props, deprecatedProps);
};

/***/ }),

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

module.exports = require("@splunk/visualizations/SingleValue");

/***/ }),

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

module.exports = require("@splunk/visualizations-shared/SanitizeProps");

/***/ }),

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

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

/***/ }),

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

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

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28);
/* harmony import */ var _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _splunk_visualizations_shared_SanitizeProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
/* harmony import */ var _splunk_visualizations_shared_SanitizeProps__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_splunk_visualizations_shared_SanitizeProps__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _utils_propUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(20);



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_0___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;
}






 // This propsMapping is for React SingleValue to use PureSingleValue.

var propsMapping = {
  value: 'majorValue',
  deltaValue: 'trendValue',
  deltaColor: 'trendColor',
  deltaFontSize: 'trendFontSize',
  graphData: 'sparklineValues',
  useTrendUnits: 'shouldAbbreviateTrendValue',
  useThousandSeparators: 'shouldUseThousandSeparators',
  sparklineAcceptNullData: 'shouldSparklineAcceptNullData',
  sparklineAreaGraph: 'showSparklineAreaGraph',
  sparklineFillColor: 'sparklineAreaColor'
};
var deprecatedProps = ['showTrendIndicator', 'trendDisplayMode', 'showSparkline', 'sparklinePosition'];

var ReactSingleValue = function ReactSingleValue(_ref) {
  var props = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, _ref);

  var newProps = Object(_utils_propUtils__WEBPACK_IMPORTED_MODULE_7__[/* propsConvert */ "a"])(props, propsMapping); // change props

  var trendDisplay = newProps.showTrendIndicator ? newProps.trendDisplayMode : 'off';
  var sparklineDisplay = newProps.showSparkline ? newProps.sparklinePosition : 'off';
  var defaultColors = {
    defaultFontColor: _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["config"].themes.defaultFontColor(props),
    defaultBackgroundColor: _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["config"].themes.defaultBackgroundColor(props),
    defaultBlockFontColor: _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["config"].themes.defaultBlockFontColor(props),
    sparklineSeverityColors: JSON.parse(_splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["config"].themes.sparklineSeverityColors(props))
  };
  var sparklineAreaColor = newProps.sparklineAreaColor || _splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["config"].themes.sparklineFillColor(props);
  newProps = _objectSpread(_objectSpread(_objectSpread({}, Object(_utils_propUtils__WEBPACK_IMPORTED_MODULE_7__[/* propsDeprecate */ "b"])(newProps, deprecatedProps)), defaultColors), {}, {
    sparklineAreaColor: sparklineAreaColor,
    trendDisplay: trendDisplay,
    sparklineDisplay: sparklineDisplay
  });
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_splunk_visualizations_SingleValue__WEBPACK_IMPORTED_MODULE_5__["PureSingleValue"], newProps);
};

ReactSingleValue.propTypes = {
  width: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]),
  height: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]),
  style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,
  graphData: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number])),
  value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]),
  majorColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  majorFontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  deltaValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]),
  deltaColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  deltaFontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  trendDisplayMode: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  useTrendUnits: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  showTrendIndicator: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  backgroundColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  unit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  unitPosition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  underLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  underLabelFontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  numberPrecision: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  useThousandSeparators: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  showSparkline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  showSparklineTooltip: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  sparklineAreaGraph: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  sparklinePosition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  sparklineFillColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  sparklineStrokeColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,
  sparklineAcceptNullData: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,
  sparklineHighlightSegments: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  sparklineHighlightDots: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,
  onValueClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func
};
ReactSingleValue.defaultProps = {
  width: '100%',
  height: 250,
  trendDisplayMode: 'absolute',
  useTrendUnits: false,
  showTrendIndicator: true,
  unitPosition: 'after',
  underLabelFontSize: 12,
  numberPrecision: 0,
  useThousandSeparators: true,
  showSparkline: true,
  showSparklineTooltip: false,
  sparklineAreaGraph: false,
  sparklinePosition: 'below',
  sparklineAcceptNullData: true,
  sparklineHighlightSegments: 0,
  sparklineHighlightDots: 0,
  onValueClick: function onValueClick() {}
};
/* harmony default export */ __webpack_exports__["default"] = (Object(styled_components__WEBPACK_IMPORTED_MODULE_4__["withTheme"])(Object(_splunk_visualizations_shared_SanitizeProps__WEBPACK_IMPORTED_MODULE_6__["withSanitizedProps"])(ReactSingleValue)));

/***/ }),

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

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

/***/ }),

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

module.exports = require("lodash/omit");

/***/ })

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