{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\@jiaminghi\\data-view\\lib\\components\\capsuleChart\\src\\main.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\@jiaminghi\\data-view\\lib\\components\\capsuleChart\\src\\main.vue","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.array.fill\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.set\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport _toConsumableArray from \"D:/jenkins/workspace/xq-web-fvue/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { deepMerge } from '@jiaminghi/charts/lib/util/index';\nimport { deepClone } from '@jiaminghi/c-render/lib/plugin/util';\nexport default {\n  name: 'DvCapsuleChart',\n  props: {\n    config: {\n      type: Object,\n      default: function _default() {\n        return {};\n      }\n    }\n  },\n  data: function data() {\n    return {\n      defaultConfig: {\n        /**\n         * @description Capsule chart data\n         * @type {Array<Object>}\n         * @default data = []\n         * @example data = [{ name: 'foo1', value: 100 }, { name: 'foo2', value: 100 }]\n         */\n        data: [],\n\n        /**\n         * @description Colors (hex|rgb|rgba|color keywords)\n         * @type {Array<String>}\n         * @default color = ['#37a2da', '#32c5e9', '#67e0e3', '#9fe6b8', '#ffdb5c', '#ff9f7f', '#fb7293']\n         * @example color = ['#000', 'rgb(0, 0, 0)', 'rgba(0, 0, 0, 1)', 'red']\n         */\n        colors: ['#37a2da', '#32c5e9', '#67e0e3', '#9fe6b8', '#ffdb5c', '#ff9f7f', '#fb7293'],\n\n        /**\n         * @description Chart unit\n         * @type {String}\n         * @default unit = ''\n         */\n        unit: '',\n\n        /**\n         * @description Show item value\n         * @type {Boolean}\n         * @default showValue = false\n         */\n        showValue: false\n      },\n      mergedConfig: null,\n      capsuleLength: [],\n      capsuleValue: [],\n      labelData: [],\n      labelDataLength: []\n    };\n  },\n  watch: {\n    config: function config() {\n      var calcData = this.calcData;\n      calcData();\n    }\n  },\n  methods: {\n    calcData: function calcData() {\n      var mergeConfig = this.mergeConfig,\n          calcCapsuleLengthAndLabelData = this.calcCapsuleLengthAndLabelData;\n      mergeConfig();\n      calcCapsuleLengthAndLabelData();\n    },\n    mergeConfig: function mergeConfig() {\n      var config = this.config,\n          defaultConfig = this.defaultConfig;\n      this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {});\n    },\n    calcCapsuleLengthAndLabelData: function calcCapsuleLengthAndLabelData() {\n      var data = this.mergedConfig.data;\n      if (!data.length) return;\n      var capsuleValue = data.map(function (_ref) {\n        var value = _ref.value;\n        return value;\n      });\n      var maxValue = Math.max.apply(Math, _toConsumableArray(capsuleValue));\n      this.capsuleValue = capsuleValue;\n      this.capsuleLength = capsuleValue.map(function (v) {\n        return maxValue ? v / maxValue : 0;\n      });\n      var oneFifth = maxValue / 5;\n      var labelData = Array.from(new Set(new Array(6).fill(0).map(function (v, i) {\n        return Math.ceil(i * oneFifth);\n      })));\n      this.labelData = labelData;\n      this.labelDataLength = Array.from(labelData).map(function (v) {\n        return maxValue ? v / maxValue : 0;\n      });\n    }\n  },\n  mounted: function mounted() {\n    var calcData = this.calcData;\n    calcData();\n  }\n};",null]}