"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkfluxtore"] = self["webpackChunkfluxtore"] || []).push([["src_pages_EditFlowPage_components_Sections_AnalyticsSection_FlowChart_js"],{

/***/ "./src/components/charts/BarChart/index.js":
/*!*************************************************!*\
  !*** ./src/components/charts/BarChart/index.js ***!
  \*************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _nivo_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nivo/bar */ \"./node_modules/@nivo/bar/dist/nivo-bar.es.js\");\nfunction _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; }\n\n\n\n\nvar BarChart = function BarChart(props) {\n  var _React$createElement;\n\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_nivo_bar__WEBPACK_IMPORTED_MODULE_1__.ResponsiveBar, (_React$createElement = {\n    data: props.data,\n    keys: props.keys,\n    indexBy: props.indexBy,\n    margin: {\n      top: 50,\n      right: 130,\n      bottom: 50,\n      left: 60\n    },\n    padding: 0.3 //   groupMode=\"grouped\"\n    ,\n    valueFormat: props.valueFormat,\n    axisRight: function axisRight(v) {\n      return \"\".concat(Math.abs(v));\n    },\n    valueScale: {\n      type: \"linear\"\n    },\n    indexScale: {\n      type: \"band\",\n      round: true\n    },\n    colors: {\n      scheme: \"nivo\"\n    },\n    tooltip: function tooltip(_ref) {\n      var id = _ref.id,\n          value = _ref.value,\n          color = _ref.color;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n        style: {\n          padding: 12,\n          color: color,\n          background: \"#222222\"\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"strong\", null, id, \": \", value));\n    },\n    defs: [{\n      id: \"dots\",\n      type: \"patternDots\",\n      background: \"inherit\",\n      color: \"#38bcb2\",\n      size: 4,\n      padding: 1,\n      stagger: true\n    }, {\n      id: \"lines\",\n      type: \"patternLines\",\n      background: \"inherit\",\n      color: \"#eed312\",\n      rotation: -45,\n      lineWidth: 6,\n      spacing: 10\n    }],\n    borderColor: {\n      from: \"color\",\n      modifiers: [[\"darker\", 1.6]]\n    } // theme={{\n    //   axis: {\n    //     fontSize: \"14px\",\n    //     tickColor: \"#eee\",\n    //     ticks: {\n    //       line: {\n    //         stroke: \"#ffffff\",\n    //       },\n    //       text: {\n    //         fill: \"#ffffff\",\n    //       },\n    //     },\n    //     legend: {\n    //       text: {\n    //         fill: \"#fff\",\n    //       },\n    //     },\n    //   },\n    // }}\n    ,\n    axisTop: null\n  }, _defineProperty(_React$createElement, \"axisRight\", null), _defineProperty(_React$createElement, \"labelSkipWidth\", 12), _defineProperty(_React$createElement, \"labelSkipHeight\", 12), _defineProperty(_React$createElement, \"labelTextColor\", \"#000\"), _defineProperty(_React$createElement, \"legends\", [{\n    dataFrom: \"keys\",\n    anchor: \"bottom-right\",\n    direction: \"column\",\n    justify: false,\n    translateX: 120,\n    translateY: 0,\n    itemsSpacing: 2,\n    itemWidth: 100,\n    itemHeight: 20,\n    itemDirection: \"left-to-right\",\n    itemOpacity: 0.85,\n    itemTextColor: \"#333\",\n    symbolSize: 20,\n    effects: [{\n      on: \"hover\",\n      style: {\n        itemOpacity: 1\n      }\n    }]\n  }]), _defineProperty(_React$createElement, \"role\", \"application\"), _defineProperty(_React$createElement, \"barAriaLabel\", function barAriaLabel(e) {\n    return e.id + \": \" + e.formattedValue + \" in country: \" + e.indexValue;\n  }), _defineProperty(_React$createElement, \"markers\", [{\n    axis: \"y\",\n    value: 0,\n    lineStyle: {\n      strokeOpacity: 0\n    },\n    textStyle: {\n      fill: \"#2ebca6\"\n    },\n    legend: \"2022\",\n    legendPosition: \"top-left\",\n    legendOrientation: \"vertical\",\n    legendOffsetY: 120\n  }, {\n    axis: \"y\",\n    value: 0,\n    lineStyle: {\n      stroke: \"#f47560\",\n      strokeWidth: 1\n    },\n    textStyle: {\n      fill: \"#e25c3b\"\n    },\n    legend: \"2021\",\n    legendPosition: \"bottom-left\",\n    legendOrientation: \"vertical\",\n    legendOffsetY: 120\n  }]), _React$createElement));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BarChart);\n\n//# sourceURL=webpack://fluxtore/./src/components/charts/BarChart/index.js?");

/***/ }),

/***/ "./src/components/charts/ChartPlaceholder.js":
/*!***************************************************!*\
  !*** ./src/components/charts/ChartPlaceholder.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nvar ChartPlaceholder = function ChartPlaceholder(props) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"woocommerce-chart-placeholder h-96\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChartPlaceholder);\n\n//# sourceURL=webpack://fluxtore/./src/components/charts/ChartPlaceholder.js?");

/***/ }),

/***/ "./src/components/charts/LineChart/index.js":
/*!**************************************************!*\
  !*** ./src/components/charts/LineChart/index.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _nivo_line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @nivo/line */ \"./node_modules/@nivo/line/dist/nivo-line.es.js\");\n\n // make sure parent container have a defined height when using\n// responsive component, otherwise height will be 0 and\n// no chart will be rendered.\n// website examples showcase many properties,\n// you'll often use just a few of them.\n\nvar LineChart = function LineChart(props) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_nivo_line__WEBPACK_IMPORTED_MODULE_1__.ResponsiveLine, {\n    data: props.data,\n    margin: {\n      top: 50,\n      right: 110,\n      bottom: 50,\n      left: 60\n    },\n    xScale: {\n      type: \"point\"\n    },\n    yScale: {\n      type: \"linear\",\n      min: \"auto\",\n      max: \"auto\",\n      stacked: true,\n      reverse: false\n    },\n    yFormat: \" >-.2f\",\n    axisTop: null,\n    axisRight: null,\n    axisBottom: {\n      orient: \"bottom\",\n      tickSize: 5,\n      tickPadding: 5,\n      tickRotation: 0,\n      legend: \"transportation\",\n      legendOffset: 36,\n      legendPosition: \"middle\"\n    },\n    axisLeft: {\n      orient: \"left\",\n      tickSize: 5,\n      tickPadding: 5,\n      tickRotation: 0,\n      legend: \"count\",\n      legendOffset: -40,\n      legendPosition: \"middle\"\n    },\n    pointSize: 10,\n    pointColor: {\n      theme: \"background\"\n    },\n    pointBorderWidth: 2,\n    pointBorderColor: {\n      from: \"serieColor\"\n    },\n    pointLabelYOffset: -12,\n    useMesh: true,\n    legends: [{\n      anchor: \"bottom-right\",\n      direction: \"column\",\n      justify: false,\n      translateX: 100,\n      translateY: 0,\n      itemsSpacing: 0,\n      itemDirection: \"left-to-right\",\n      itemWidth: 80,\n      itemHeight: 20,\n      itemOpacity: 0.75,\n      symbolSize: 12,\n      symbolShape: \"circle\",\n      symbolBorderColor: \"rgba(0, 0, 0, .5)\",\n      effects: [{\n        on: \"hover\",\n        style: {\n          itemBackground: \"rgba(0, 0, 0, .03)\",\n          itemOpacity: 1\n        }\n      }]\n    }]\n  });\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (LineChart);\n\n//# sourceURL=webpack://fluxtore/./src/components/charts/LineChart/index.js?");

/***/ }),

/***/ "./src/pages/EditFlowPage/components/Sections/AnalyticsSection/FlowChart.js":
/*!**********************************************************************************!*\
  !*** ./src/pages/EditFlowPage/components/Sections/AnalyticsSection/FlowChart.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../store */ \"./src/store.js\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ \"@wordpress/components\");\n/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/components */ \"@woocommerce/components\");\n/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_components__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _components_charts_BarChart__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../components/charts/BarChart */ \"./src/components/charts/BarChart/index.js\");\n/* harmony import */ var _components_charts_LineChart__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../components/charts/LineChart */ \"./src/components/charts/LineChart/index.js\");\n/* harmony import */ var _components_charts_ChartPlaceholder_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../components/charts/ChartPlaceholder.js */ \"./src/components/charts/ChartPlaceholder.js\");\n/* harmony import */ var _service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./service */ \"./src/pages/EditFlowPage/components/Sections/AnalyticsSection/service.js\");\nfunction 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; }\n\nfunction _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; }\n\nfunction _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; }\n\n\n\n\n\n\n\n\n\n\n\n\nvar FlowChart = function FlowChart(props) {\n  var query = props.query,\n      title = props.title,\n      primaryRequesting = props.primaryRequesting,\n      secondaryRequesting = props.secondaryRequesting,\n      primaryData = props.primaryData,\n      secondaryData = props.secondaryData;\n  console.log((0,_service__WEBPACK_IMPORTED_MODULE_9__.getChartValues)(primaryData, secondaryData, query));\n  var isOverview = !query.hasOwnProperty(\"chart\");\n\n  if (primaryRequesting || secondaryRequesting) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_charts_ChartPlaceholder_js__WEBPACK_IMPORTED_MODULE_8__.default, null);\n  }\n\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_woocommerce_components__WEBPACK_IMPORTED_MODULE_5__.SectionHeader, {\n    title: title\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"grid grid-cols-1\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"h-96\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Card, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CardHeader, null, \"Header\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CardBody, {\n    size: null,\n    className: \"h-96\",\n    style: {\n      height: \"24rem\"\n    }\n  }, isOverview ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_charts_BarChart__WEBPACK_IMPORTED_MODULE_6__.default, {\n    data: (0,_service__WEBPACK_IMPORTED_MODULE_9__.getChartValues)(primaryData, secondaryData, query),\n    keys: [\"orders >\", \"orders <\", \"bumps >\", \"bumps <\", \"upsells >\", \"upsells <\"],\n    indexBy: \"date\",\n    valueFormat: function valueFormat(value) {\n      return \"\".concat(Math.abs(value));\n    }\n  }) :\n  /*#__PURE__*/\n  // <div></div>\n  react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_charts_LineChart__WEBPACK_IMPORTED_MODULE_7__.default, {\n    data: (0,_service__WEBPACK_IMPORTED_MODULE_9__.getChartValues)(primaryData, secondaryData, query)\n  }))))));\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__.compose)((0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.withSelect)(function (select, props) {\n  var query = props.query,\n      filters = props.filters,\n      defaultDateRange = props.defaultDateRange;\n  var data = (0,_service__WEBPACK_IMPORTED_MODULE_9__.getChartData)(select, query, filters, defaultDateRange, _store__WEBPACK_IMPORTED_MODULE_2__.default.getState().flow_id);\n  return _objectSpread({}, data);\n}))(FlowChart));\n\n//# sourceURL=webpack://fluxtore/./src/pages/EditFlowPage/components/Sections/AnalyticsSection/FlowChart.js?");

/***/ })

}]);