qauMaWeb/node_modules/.cache/babel-loader/01eb3c59f50376df3579a536c9d...

1 line
76 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.error.cause.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.match.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isObject, isArray, createHashMap, map, assert, isString, indexOf, isStringSafe, isNumber } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { isNumeric, getRandomIdBase, getPrecision, round } from './number.js';\nimport { warn } from './log.js';\n\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\n/**\n * Make the name displayable. But we should\n * make sure it is not duplicated with user\n * specified name, so use '\\0';\n */\n\n\nvar DUMMY_COMPONENT_NAME_PREFIX = 'series\\0';\nvar INTERNAL_COMPONENT_ID_PREFIX = '\\0_ec_\\0';\n/**\n * If value is not array, then translate it to array.\n * @param {*} value\n * @return {Array} [value] or value\n */\n\nexport function normalizeToArray(value) {\n return value instanceof Array ? value : value == null ? [] : [value];\n}\n/**\n * Sync default option between normal and emphasis like `position` and `show`\n * In case some one will write code like\n * label: {\n * show: false,\n * position: 'outside',\n * fontSize: 18\n * },\n * emphasis: {\n * label: { show: true }\n * }\n */\n\nexport function defaultEmphasis(opt, key, subOpts) {\n // Caution: performance sensitive.\n if (opt) {\n opt[key] = opt[key] || {};\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[key] = opt.emphasis[key] || {}; // Default emphasis option from normal\n\n for (var i = 0, len = subOpts.length; i < len; i++) {\n var subOptName = subOpts[i];\n\n if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) {\n opt.emphasis[key][subOptName] = opt[key][subOptName];\n }\n }\n }\n}\nexport var TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding']; // modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([\n// 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter',\n// 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily',\n// // FIXME: deprecated, check and remove it.\n// 'textStyle'\n// ]);\n\n/**\n * The method does not ensure performance.\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method retrieves value from data.\n */\n\nexport function getDataItemValue(dataItem) {\n return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem;\n}\n/**\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method determine if dataItem has extra option besides value\n */\n\nexport function isDataItemOption(dataItem) {\n return isObject(dataItem) && !(dataItem instanceof Array); // // markLine data can be array\n // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array));\n}\n;\n/**\n * Mapping to existings for merge.\n *\n * Mode \"normalMege\":\n * The mapping result (merge result) will keep the order of the existing\n * component, rather than the order of new option. Because we should ensure\n * some specified index reference (like xAxisIndex) keep work.\n * And in most cases, \"merge option\" is used to update partial option but not\n * be expected to change the order.\n *\n * Mode \"replaceMege\":\n * (1) Only the id mapped components will be merged.\n * (2) Other existing components (except internal components) will be removed.\n * (3) Other new options will be used to create new component.\n * (4) The index of the existing components will not be modified.\n * That means their might be \"hole\" after the removal.\n * The new components are created first at those available index.\n *\n * Mode \"replaceAll\":\n * This mode try to support that reproduce an echarts instance from another\n * echarts instance (via `getOption`) in some simple cases.\n * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`,\n * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is,\n * the \"hole\" in `newCmptOptions` will also be kept.\n * On the contrary, other modes try best to eliminate holes.\n * PENDING: This is an experimental mode yet.\n *\n * @return See the comment of <MappingResult>.\n */\n\nexport function mappingToExists(existings, newCmptOptions, mode) {\n var isNormalMergeMode = mode === 'normalMerge';\n var isReplaceMergeMode = mode === 'replaceMerge';\n var isReplaceAllMode = mode === 'replaceAll';\n existings = existings || [];\n newCmptOptions = (newCmptOptions || []).slice();\n var existingIdIdxMap = createHashMap(); // Validate id and name on user input option.\n\n each(newCmptOptions, function (cmptOption, index) {\n if (!isObject(cmptOption)) {\n newCmptOptions[index] = null;\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // There is some legacy case that name is set as `false`.\n // But should work normally rather than throw error.\n if (cmptOption.id != null && !isValidIdOrName(cmptOption.id)) {\n warnInvalidateIdOrName(cmptOption.id);\n }\n\n if (cmptOption.name != null && !isValidIdOrName(cmptOption.name)) {\n warnInvalidateIdOrName(cmptOption.name);\n }\n }\n });\n var result = prepareResult(existings, existingIdIdxMap, mode);\n\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingById(result, existings, existingIdIdxMap, newCmptOptions);\n }\n\n if (isNormalMergeMode) {\n mappingByName(result, newCmptOptions);\n }\n\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingByIndex(result, newCmptOptions, isReplaceMergeMode);\n } else if (isReplaceAllMode) {\n mappingInReplaceAllMode(result, newCmptOptions);\n }\n\n makeIdAndName(result); // The array `result` MUST NOT contain elided items, otherwise the\n // forEach will omit those items and result in incorrect result.\n\n return result;\n}\n\nfunction prepareResult(existings, existingIdIdxMap, mode) {\n var result = [];\n\n if (mode === 'replaceAll') {\n return result;\n } // Do not use native `map` to in case that the array `existings`\n // contains elided items, which will be omitted.\n\n\n for (var index = 0; index < existings.length; index++) {\n var existing = existings[index]; // Because of replaceMerge, `existing` may be null/undefined.\n\n if (existing && existing.id != null) {\n existingIdIdxMap.set(existing.id, index);\n } // For non-internal-componnets:\n // Mode \"normalMerge\": all existings kept.\n // Mode \"replaceMerge\": all existing removed unless mapped by id.\n // For internal-components:\n // go with \"replaceMerge\" approach in both mode.\n\n\n result.push({\n existing: mode === 'replaceMerge' || isComponentIdInternal(existing) ? null : existing,\n newOption: null,\n keyInfo: null,\n brandNew: null\n });\n }\n\n return result;\n}\n\nfunction mappingById(result, existings, existingIdIdxMap, newCmptOptions) {\n // Mapping by id if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.id == null) {\n return;\n }\n\n var optionId = makeComparableKey(cmptOption.id);\n var existingIdx = existingIdIdxMap.get(optionId);\n\n if (existingIdx != null) {\n var resultItem = result[existingIdx];\n assert(!resultItem.newOption, 'Duplicated option on id \"' + optionId + '\".');\n resultItem.newOption = cmptOption; // In both mode, if id matched, new option will be merged to\n // the existings rather than creating new component model.\n\n resultItem.existing = existings[existingIdx];\n newCmptOptions[index] = null;\n }\n });\n}\n\nfunction mappingByName(result, newCmptOptions) {\n // Mapping by name if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.name == null) {\n return;\n }\n\n for (var i = 0; i < result.length; i++) {\n var existing = result[i].existing;\n\n if (!result[i].newOption // Consider name: two map to one.\n // Can not match when both ids existing but different.\n && existing && (existing.id == null || cmptOption.id == null) && !isComponentIdInternal(cmptOption) && !isComponentIdInternal(existing) && keyExistAndEqual('name', existing, cmptOption)) {\n result[i].newOption = cmptOption;\n newCmptOptions[index] = null;\n return;\n }\n }\n });\n}\n\nfunction mappingByIndex(result, newCmptOptions, brandNew) {\n each(newCmptOptions, function (cmptOption) {\n if (!cmptOption) {\n return;\n } // Find the first place that not mapped by id and not internal component (consider the \"hole\").\n\n\n var resultItem;\n var nextIdx = 0;\n\n while ( // Be `!resultItem` only when `nextIdx >= result.length`.\n (resultItem = result[nextIdx]) && ( // (1) Existing models that already have id should be able to mapped to. Because\n // after mapping performed, model will always be assigned with an id if user not given.\n // After that all models have id.\n // (2) If new option has id, it can only set to a hole or append to the last. It should\n // not be merged to the existings with different id. Because id should not be overwritten.\n // (3) Name can be overwritten, because axis use name as 'show label text'.\n resultItem.newOption || isComponentIdInternal(resultItem.existing) || // In mode \"replaceMerge\", here no not-mapped-non-internal-existing.\n resultItem.existing && cmptOption.id != null && !keyExistAndEqual('id', cmptOption, resultItem.existing))) {\n nextIdx++;\n }\n\n if (resultItem) {\n resultItem.newOption = cmptOption;\n resultItem.brandNew = brandNew;\n } else {\n result.push({\n newOption: cmptOption,\n brandNew: brandNew,\n existing: null,\n keyInfo: null\n });\n }\n\n nextIdx++;\n });\n}\n\nfunction mappingInReplaceAllMode(result, newCmptOptions) {\n each(newCmptOptions, function (cmptOption) {\n // The feature \"reproduce\" requires \"hole\" will also reproduced\n // in case that component index referring are broken.\n result.push({\n newOption: cmptOption,\n brandNew: true,\n existing: null,\n keyInfo: null\n });\n });\n}\n/**\n * Make id and name for mapping result (result of mappingToExists)\n * into `keyInfo` field.\n */\n\n\nfunction makeIdAndName(mapResult) {\n // We use this id to hash component models and view instances\n // in echarts. id can be specified by user, or auto generated.\n // The id generation rule ensures new view instance are able\n // to mapped to old instance when setOption are called in\n // no-merge mode. So we generate model id by name and plus\n // type in view id.\n // name can be duplicated among components, which is convenient\n // to specify multi components (like series) by one name.\n // Ensure that each id is distinct.\n var idMap = createHashMap();\n each(mapResult, function (item) {\n var existing = item.existing;\n existing && idMap.set(existing.id, item);\n });\n each(mapResult, function (item) {\n var opt = item.newOption; // Force ensure id not duplicated.\n\n assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id));\n opt && opt.id != null && idMap.set(opt.id, item);\n !item.keyInfo && (item.keyInfo = {});\n }); // Make name and id.\n\n each(mapResult, function (item, index) {\n var existing = item.existing;\n var opt = item.newOption;\n var keyInfo = item.keyInfo;\n\n if (!isObject(opt)) {\n return;\n } // Name can be overwritten. Consider case: axis.name = '20km'.\n // But id generated by name will not be changed, which affect\n // only in that case: setOption with 'not merge mode' and view\n // instance will be recreated, which can be accepted.\n\n\n keyInfo.name = opt.name != null ? makeComparableKey(opt.name) : existing ? existing.name // Avoid that different series has the same name,\n // because name may be used like in color pallet.\n : DUMMY_COMPONENT_NAME_PREFIX + index;\n\n if (existing) {\n keyInfo.id = makeComparableKey(existing.id);\n } else if (opt.id != null) {\n keyInfo.id = makeComparableKey(opt.id);\n } else {\n // Consider this situatoin:\n // optionA: [{name: 'a'}, {name: 'a'}, {..}]\n // optionB [{..}, {name: 'a'}, {name: 'a'}]\n // Series with the same name between optionA and optionB\n // should be mapped.\n var idNum = 0;\n\n do {\n keyInfo.id = '\\0' + keyInfo.name + '\\0' + idNum++;\n } while (idMap.get(keyInfo.id));\n }\n\n idMap.set(keyInfo.id, item);\n });\n}\n\nfunction keyExistAndEqual(attr, obj1, obj2) {\n var key1 = convertOptionIdName(obj1[attr], null);\n var key2 = convertOptionIdName(obj2[attr], null); // See `MappingExistingItem`. `id` and `name` trade string equals to number.\n\n return key1 != null && key2 != null && key1 === key2;\n}\n/**\n * @return return null if not exist.\n */\n\n\nfunction makeComparableKey(val) {\n if (process.env.NODE_ENV !== 'production') {\n if (val == null) {\n throw new Error();\n }\n }\n\n return convertOptionIdName(val, '');\n}\n\nexport function convertOptionIdName(idOrName, defaultValue) {\n if (idOrName == null) {\n return defaultValue;\n }\n\n return isString(idOrName) ? idOrName : isNumber(idOrName) || isStringSafe(idOrName) ? idOrName + '' : defaultValue;\n}\n\nfunction warnInvalidateIdOrName(idOrName) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`' + idOrName + '` is invalid id or name. Must be a string or number.');\n }\n}\n\nfunction isValidIdOrName(idOrName) {\n return isStringSafe(idOrName) || isNumeric(idOrName);\n}\n\nexport function isNameSpecified(componentModel) {\n var name = componentModel.name; // Is specified when `indexOf` get -1 or > 0.\n\n return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX));\n}\n/**\n * @public\n * @param {Object} cmptOption\n * @return {boolean}\n */\n\nexport function isComponentIdInternal(cmptOption) {\n return cmptOption && cmptOption.id != null && makeComparableKey(cmptOption.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX) === 0;\n}\nexport function makeInternalComponentId(idSuffix) {\n return INTERNAL_COMPONENT_ID_PREFIX + idSuffix;\n}\nexport function setComponentTypeToKeyInfo(mappingResult, mainType, componentModelCtor) {\n // Set mainType and complete subType.\n each(mappingResult, function (item) {\n var newOption = item.newOption;\n\n if (isObject(newOption)) {\n item.keyInfo.mainType = mainType;\n item.keyInfo.subType = determineSubType(mainType, newOption, item.existing, componentModelCtor);\n }\n });\n}\n\nfunction determineSubType(mainType, newCmptOption, existComponent, componentModelCtor) {\n var subType = newCmptOption.type ? newCmptOption.type : existComponent ? existComponent.subType // Use determineSubType only when there is no existComponent.\n : componentModelCtor.determineSubType(mainType, newCmptOption); // tooltip, markline, markpoint may always has no subType\n\n return subType;\n}\n/**\n * A helper for removing duplicate items between batchA and batchB,\n * and in themselves, and categorize by series.\n *\n * @param batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @param batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @return result: [resultBatchA, resultBatchB]\n */\n\n\nexport function compressBatches(batchA, batchB) {\n var mapA = {};\n var mapB = {};\n makeMap(batchA || [], mapA);\n makeMap(batchB || [], mapB, mapA);\n return [mapToArray(mapA), mapToArray(mapB)];\n\n function makeMap(sourceBatch, map, otherMap) {\n for (var i = 0, len = sourceBatch.length; i < len; i++) {\n var seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);\n\n if (seriesId == null) {\n return;\n }\n\n var dataIndices = normalizeToArray(sourceBatch[i].dataIndex);\n var otherDataIndices = otherMap && otherMap[seriesId];\n\n for (var j = 0, lenj = dataIndices.length; j < lenj; j++) {\n var dataIndex = dataIndices[j];\n\n if (otherDataIndices && otherDataIndices[dataIndex]) {\n otherDataIndices[dataIndex] = null;\n } else {\n (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;\n }\n }\n }\n }\n\n function mapToArray(map, isData) {\n var result = [];\n\n for (var i in map) {\n if (map.hasOwnProperty(i) && map[i] != null) {\n if (isData) {\n result.push(+i);\n } else {\n var dataIndices = mapToArray(map[i], true);\n dataIndices.length && result.push({\n seriesId: i,\n dataIndex: dataIndices\n });\n }\n }\n }\n\n return result;\n }\n}\n/**\n * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name\n * each of which can be Array or primary type.\n * @return dataIndex If not found, return undefined/null.\n */\n\nexport function queryDataIndex(data, payload) {\n if (payload.dataIndexInside != null) {\n return payload.dataIndexInside;\n } else if (payload.dataIndex != null) {\n return isArray(payload.dataIndex) ? map(payload.dataIndex, function (value) {\n return data.indexOfRawIndex(value);\n }) : data.indexOfRawIndex(payload.dataIndex);\n } else if (payload.name != null) {\n return isArray(payload.name) ? map(payload.name, function (value) {\n return data.indexOfName(value);\n }) : data.indexOfName(payload.name);\n }\n}\n/**\n * Enable property storage to any host object.\n * Notice: Serialization is not supported.\n *\n * For example:\n * let inner = zrUitl.makeInner();\n *\n * function some1(hostObj) {\n * inner(hostObj).someProperty = 1212;\n * ...\n * }\n * function some2() {\n * let fields = inner(this);\n * fields.someProperty1 = 1212;\n * fields.someProperty2 = 'xx';\n * ...\n * }\n *\n * @return {Function}\n */\n\nexport function makeInner() {\n var key = '__ec_inner_' + innerUniqueIndex++;\n return function (hostObj) {\n return hostObj[key] || (hostObj[key] = {});\n };\n}\nvar innerUniqueIndex = getRandomIdBase();\n/**\n * The same behavior as `component.getReferringComponents`.\n */\n\nexport function parseFinder(ecModel, finderInput, opt) {\n var _a = preParseFinder(finderInput, opt),\n mainTypeSpecified = _a.mainTypeSpecified,\n queryOptionMap = _a.queryOptionMap,\n others = _a.others;\n\n var result = others;\n var defaultMainType = opt ? opt.defaultMainType : null;\n\n if (!mainTypeSpecified && defaultMainType) {\n queryOptionMap.set(defaultMainType, {});\n }\n\n queryOptionMap.each(function (queryOption, mainType) {\n var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {\n useDefault: defaultMainType === mainType,\n enableAll: opt && opt.enableAll != null ? opt.enableAll : true,\n enableNone: opt && opt.enableNone != null ? opt.enableNone : true\n });\n result[mainType + 'Models'] = queryResult.models;\n result[mainType + 'Model'] = queryResult.models[0];\n });\n return result;\n}\nexport function preParseFinder(finderInput, opt) {\n var finder;\n\n if (isString(finderInput)) {\n var obj = {};\n obj[finderInput + 'Index'] = 0;\n finder = obj;\n } else {\n finder = finderInput;\n }\n\n var queryOptionMap = createHashMap();\n var others = {};\n var mainTypeSpecified = false;\n each(finder, function (value, key) {\n // Exclude 'dataIndex' and other illgal keys.\n if (key === 'dataIndex' || key === 'dataIndexInside') {\n others[key] = value;\n return;\n }\n\n var parsedKey = key.match(/^(\\w+)(Index|Id|Name)$/) || [];\n var mainType = parsedKey[1];\n var queryType = (parsedKey[2] || '').toLowerCase();\n\n if (!mainType || !queryType || opt && opt.includeMainTypes && indexOf(opt.includeMainTypes, mainType) < 0) {\n return;\n }\n\n mainTypeSpecified = mainTypeSpecified || !!mainType;\n var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {});\n queryOption[queryType] = value;\n });\n return {\n mainTypeSpecified: mainTypeSpecified,\n queryOptionMap: queryOptionMap,\n others: others\n };\n}\nexport var SINGLE_REFERRING = {\n useDefault: true,\n enableAll: false,\n enableNone: false\n};\nexport var MULTIPLE_REFERRING = {\n useDefault: false,\n enableAll: true,\n enableNone: true\n};\nexport function queryReferringComponents(ecModel, mainType, userOption, opt) {\n opt = opt || SINGLE_REFERRING;\n var indexOption = userOption.index;\n var idOption = userOption.id;\n var nameOption = userOption.name;\n var result = {\n models: null,\n specified: indexOption != null || idOption != null || nameOption != null\n };\n\n if (!result.specified) {\n // Use the first as default if `useDefault`.\n var firstCmpt = void 0;\n result.models = opt.useDefault && (firstCmpt = ecModel.getComponent(mainType)) ? [firstCmpt] : [];\n return result;\n }\n\n if (indexOption === 'none' || indexOption === false) {\n assert(opt.enableNone, '`\"none\"` or `false` is not a valid value on index option.');\n result.models = [];\n return result;\n } // `queryComponents` will return all components if\n // both all of index/id/name are null/undefined.\n\n\n if (indexOption === 'all') {\n assert(opt.enableAll, '`\"all\"` is not a valid value on index option.');\n indexOption = idOption = nameOption = null;\n }\n\n result.models = ecModel.queryComponents({\n mainType: mainType,\n index: indexOption,\n id: idOption,\n name: nameOption\n });\n return result;\n}\nexport function setAttribute(dom, key, value) {\n dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value;\n}\nexport function getAttribute(dom, key) {\n return dom.getAttribute ? dom.getAttribute(key) : dom[key];\n}\nexport function getTooltipRenderMode(renderModeOption) {\n if (renderModeOption === 'auto') {\n // Using html when `document` exists, use richText otherwise\n return env.domSupported ? 'html' : 'richText';\n } else {\n return renderModeOption || 'html';\n }\n}\n/**\n * Group a list by key.\n */\n\nexport function groupData(array, getKey // return key\n) {\n var buckets = createHashMap();\n var keys = [];\n each(array, function (item) {\n var key = getKey(item);\n (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item);\n });\n return {\n keys: keys,\n buckets: buckets\n };\n}\n/**\n * Interpolate raw values of a series with percent\n *\n * @param data data\n * @param labelModel label model of the text element\n * @param sourceValue start value. May be null/undefined when init.\n * @param targetValue end value\n * @param percent 0~1 percentage; 0 uses start value while 1 uses end value\n * @return interpolated values\n * If `sourceValue` and `targetValue` are `number`, return `number`.\n * If `sourceValue` and `targetValue` are `string`, return `string`.\n * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`.\n * Other cases do not supported.\n */\n\nexport function interpolateRawValues(data, precision, sourceValue, targetValue, percent) {\n var isAutoPrecision = precision == null || precision === 'auto';\n\n if (targetValue == null) {\n return targetValue;\n }\n\n if (isNumber(targetValue)) {\n var value = interpolateNumber(sourceValue || 0, targetValue, percent);\n return round(value, isAutoPrecision ? Math.max(getPrecision(sourceValue || 0), getPrecision(targetValue)) : precision);\n } else if (isString(targetValue)) {\n return percent < 1 ? sourceValue : targetValue;\n } else {\n var interpolated = [];\n var leftArr = sourceValue;\n var rightArr = targetValue;\n var length_1 = Math.max(leftArr ? leftArr.length : 0, rightArr.length);\n\n for (var i = 0; i < length_1; ++i) {\n var info = data.getDimensionInfo(i); // Don't interpolate ordinal dims\n\n if (info && info.type === 'ordinal') {\n // In init, there is no `sourceValue`, but should better not to get undefined result.\n interpolated[i] = (percent < 1 && leftArr ? leftArr : rightArr)[i];\n } else {\n var leftVal = leftArr && leftArr[i] ? leftArr[i] : 0;\n var rightVal = rightArr[i];\n var value = interpolateNumber(leftVal, rightVal, percent);\n interpolated[i] = round(value, isAutoPrecision ? Math.max(getPrecision(leftVal), getPrecision(rightVal)) : precision);\n }\n }\n\n return interpolated;\n }\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/util/model.js"],"names":["each","isObject","isArray","createHashMap","map","assert","isString","indexOf","isStringSafe","isNumber","env","isNumeric","getRandomIdBase","getPrecision","round","warn","interpolateNumber","p0","p1","percent","DUMMY_COMPONENT_NAME_PREFIX","INTERNAL_COMPONENT_ID_PREFIX","normalizeToArray","value","Array","defaultEmphasis","opt","key","subOpts","emphasis","i","len","length","subOptName","hasOwnProperty","TEXT_STYLE_OPTIONS","getDataItemValue","dataItem","Date","isDataItemOption","mappingToExists","existings","newCmptOptions","mode","isNormalMergeMode","isReplaceMergeMode","isReplaceAllMode","slice","existingIdIdxMap","cmptOption","index","process","NODE_ENV","id","isValidIdOrName","warnInvalidateIdOrName","name","result","prepareResult","mappingById","mappingByName","mappingByIndex","mappingInReplaceAllMode","makeIdAndName","existing","set","push","isComponentIdInternal","newOption","keyInfo","brandNew","optionId","makeComparableKey","existingIdx","get","resultItem","keyExistAndEqual","nextIdx","mapResult","idMap","item","idNum","attr","obj1","obj2","key1","convertOptionIdName","key2","val","Error","idOrName","defaultValue","isNameSpecified","componentModel","makeInternalComponentId","idSuffix","setComponentTypeToKeyInfo","mappingResult","mainType","componentModelCtor","subType","determineSubType","newCmptOption","existComponent","type","compressBatches","batchA","batchB","mapA","mapB","makeMap","mapToArray","sourceBatch","otherMap","seriesId","dataIndices","dataIndex","otherDataIndices","j","lenj","isData","queryDataIndex","data","payload","dataIndexInside","indexOfRawIndex","indexOfName","makeInner","innerUniqueIndex","hostObj","parseFinder","ecModel","finderInput","_a","preParseFinder","mainTypeSpecified","queryOptionMap","others","defaultMainType","queryOption","queryResult","queryReferringComponents","useDefault","enableAll","enableNone","models","finder","obj","parsedKey","match","queryType","toLowerCase","includeMainTypes","SINGLE_REFERRING","MULTIPLE_REFERRING","userOption","indexOption","idOption","nameOption","specified","firstCmpt","getComponent","queryComponents","setAttribute","dom","getAttribute","getTooltipRenderMode","renderModeOption","domSupported","groupData","array","getKey","buckets","keys","interpolateRawValues","precision","sourceValue","targetValue","isAutoPrecision","Math","max","interpolated","leftArr","rightArr","length_1","info","getDimensionInfo","leftVal","rightVal"],"mappings":";;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,QAAf,EAAyBC,OAAzB,EAAkCC,aAAlC,EAAiDC,GAAjD,EAAsDC,MAAtD,EAA8DC,QAA9D,EAAwEC,OAAxE,EAAiFC,YAAjF,EAA+FC,QAA/F,QAA+G,0BAA/G;AACA,OAAOC,GAAP,MAAgB,yBAAhB;AACA,SAASC,SAAT,EAAoBC,eAApB,EAAqCC,YAArC,EAAmDC,KAAnD,QAAgE,aAAhE;AACA,SAASC,IAAT,QAAqB,UAArB;;AAEA,SAASC,iBAAT,CAA2BC,EAA3B,EAA+BC,EAA/B,EAAmCC,OAAnC,EAA4C;AAC1C,SAAO,CAACD,EAAE,GAAGD,EAAN,IAAYE,OAAZ,GAAsBF,EAA7B;AACD;AACD;AACA;AACA;AACA;AACA;;;AAGA,IAAIG,2BAA2B,GAAG,UAAlC;AACA,IAAIC,4BAA4B,GAAG,UAAnC;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASC,gBAAT,CAA0BC,KAA1B,EAAiC;AACtC,SAAOA,KAAK,YAAYC,KAAjB,GAAyBD,KAAzB,GAAiCA,KAAK,IAAI,IAAT,GAAgB,EAAhB,GAAqB,CAACA,KAAD,CAA7D;AACD;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASE,eAAT,CAAyBC,GAAzB,EAA8BC,GAA9B,EAAmCC,OAAnC,EA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AI,CAACgE,gBAAL,CAAsB5J,CAAtB,CAAX,CADiC,CACI;;AAErC,UAAI2J,IAAI,IAAIA,IAAI,CAACjF,IAAL,KAAc,SAA1B,EAAqC;AACnC;AACA6E,QAAAA,YAAY,CAACvJ,CAAD,CAAZ,GAAkB,CAACX,OAAO,GAAG,CAAV,IAAemK,OAAf,GAAyBA,OAAzB,GAAmCC,QAApC,EAA8CzJ,CAA9C,CAAlB;AACD,OAHD,MAGO;AACL,YAAI6J,OAAO,GAAGL,OAAO,IAAIA,OAAO,CAACxJ,CAAD,CAAlB,GAAwBwJ,OAAO,CAACxJ,CAAD,CAA/B,GAAqC,CAAnD;AACA,YAAI8J,QAAQ,GAAGL,QAAQ,CAACzJ,CAAD,CAAvB;AACA,YAAIP,KAAK,GAAGP,iBAAiB,CAAC2K,OAAD,EAAUC,QAAV,EAAoBzK,OAApB,CAA7B;AACAkK,QAAAA,YAAY,CAACvJ,CAAD,CAAZ,GAAkBhB,KAAK,CAACS,KAAD,EAAQ2J,eAAe,GAAGC,IAAI,CAACC,GAAL,CAASvK,YAAY,CAAC8K,OAAD,CAArB,EAAgC9K,YAAY,CAAC+K,QAAD,CAA5C,CAAH,GAA6Db,SAApF,CAAvB;AACD;AACF;;AAED,WAAOM,YAAP;AACD;AACF","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, isObject, isArray, createHashMap, map, assert, isString, indexOf, isStringSafe, isNumber } from 'zrender/lib/core/util.js';\nimport env from 'zrender/lib/core/env.js';\nimport { isNumeric, getRandomIdBase, getPrecision, round } from './number.js';\nimport { warn } from './log.js';\n\nfunction interpolateNumber(p0, p1, percent) {\n return (p1 - p0) * percent + p0;\n}\n/**\n * Make the name displayable. But we should\n * make sure it is not duplicated with user\n * specified name, so use '\\0';\n */\n\n\nvar DUMMY_COMPONENT_NAME_PREFIX = 'series\\0';\nvar INTERNAL_COMPONENT_ID_PREFIX = '\\0_ec_\\0';\n/**\n * If value is not array, then translate it to array.\n * @param {*} value\n * @return {Array} [value] or value\n */\n\nexport function normalizeToArray(value) {\n return value instanceof Array ? value : value == null ? [] : [value];\n}\n/**\n * Sync default option between normal and emphasis like `position` and `show`\n * In case some one will write code like\n * label: {\n * show: false,\n * position: 'outside',\n * fontSize: 18\n * },\n * emphasis: {\n * label: { show: true }\n * }\n */\n\nexport function defaultEmphasis(opt, key, subOpts) {\n // Caution: performance sensitive.\n if (opt) {\n opt[key] = opt[key] || {};\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[key] = opt.emphasis[key] || {}; // Default emphasis option from normal\n\n for (var i = 0, len = subOpts.length; i < len; i++) {\n var subOptName = subOpts[i];\n\n if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) {\n opt.emphasis[key][subOptName] = opt[key][subOptName];\n }\n }\n }\n}\nexport var TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding']; // modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([\n// 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter',\n// 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily',\n// // FIXME: deprecated, check and remove it.\n// 'textStyle'\n// ]);\n\n/**\n * The method does not ensure performance.\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method retrieves value from data.\n */\n\nexport function getDataItemValue(dataItem) {\n return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem;\n}\n/**\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method determine if dataItem has extra option besides value\n */\n\nexport function isDataItemOption(dataItem) {\n return isObject(dataItem) && !(dataItem instanceof Array); // // markLine data can be array\n // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array));\n}\n;\n/**\n * Mapping to existings for merge.\n *\n * Mode \"normalMege\":\n * The mapping result (merge result) will keep the order of the existing\n * component, rather than the order of new option. Because we should ensure\n * some specified index reference (like xAxisIndex) keep work.\n * And in most cases, \"merge option\" is used to update partial option but not\n * be expected to change the order.\n *\n * Mode \"replaceMege\":\n * (1) Only the id mapped components will be merged.\n * (2) Other existing components (except internal components) will be removed.\n * (3) Other new options will be used to create new component.\n * (4) The index of the existing components will not be modified.\n * That means their might be \"hole\" after the removal.\n * The new components are created first at those available index.\n *\n * Mode \"replaceAll\":\n * This mode try to support that reproduce an echarts instance from another\n * echarts instance (via `getOption`) in some simple cases.\n * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`,\n * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is,\n * the \"hole\" in `newCmptOptions` will also be kept.\n * On the contrary, other modes try best to eliminate holes.\n * PENDING: This is an experimental mode yet.\n *\n * @return See the comment of <MappingResult>.\n */\n\nexport function mappingToExists(existings, newCmptOptions, mode) {\n var isNormalMergeMode = mode === 'normalMerge';\n var isReplaceMergeMode = mode === 'replaceMerge';\n var isReplaceAllMode = mode === 'replaceAll';\n existings = existings || [];\n newCmptOptions = (newCmptOptions || []).slice();\n var existingIdIdxMap = createHashMap(); // Validate id and name on user input option.\n\n each(newCmptOptions, function (cmptOption, index) {\n if (!isObject(cmptOption)) {\n newCmptOptions[index] = null;\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // There is some legacy case that name is set as `false`.\n // But should work normally rather than throw error.\n if (cmptOption.id != null && !isValidIdOrName(cmptOption.id)) {\n warnInvalidateIdOrName(cmptOption.id);\n }\n\n if (cmptOption.name != null && !isValidIdOrName(cmptOption.name)) {\n warnInvalidateIdOrName(cmptOption.name);\n }\n }\n });\n var result = prepareResult(existings, existingIdIdxMap, mode);\n\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingById(result, existings, existingIdIdxMap, newCmptOptions);\n }\n\n if (isNormalMergeMode) {\n mappingByName(result, newCmptOptions);\n }\n\n if (isNormalMergeMode || isReplaceMergeMode) {\n mappingByIndex(result, newCmptOptions, isReplaceMergeMode);\n } else if (isReplaceAllMode) {\n mappingInReplaceAllMode(result, newCmptOptions);\n }\n\n makeIdAndName(result); // The array `result` MUST NOT contain elided items, otherwise the\n // forEach will omit those items and result in incorrect result.\n\n return result;\n}\n\nfunction prepareResult(existings, existingIdIdxMap, mode) {\n var result = [];\n\n if (mode === 'replaceAll') {\n return result;\n } // Do not use native `map` to in case that the array `existings`\n // contains elided items, which will be omitted.\n\n\n for (var index = 0; index < existings.length; index++) {\n var existing = existings[index]; // Because of replaceMerge, `existing` may be null/undefined.\n\n if (existing && existing.id != null) {\n existingIdIdxMap.set(existing.id, index);\n } // For non-internal-componnets:\n // Mode \"normalMerge\": all existings kept.\n // Mode \"replaceMerge\": all existing removed unless mapped by id.\n // For internal-components:\n // go with \"replaceMerge\" approach in both mode.\n\n\n result.push({\n existing: mode === 'replaceMerge' || isComponentIdInternal(existing) ? null : existing,\n newOption: null,\n keyInfo: null,\n brandNew: null\n });\n }\n\n return result;\n}\n\nfunction mappingById(result, existings, existingIdIdxMap, newCmptOptions) {\n // Mapping by id if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.id == null) {\n return;\n }\n\n var optionId = makeComparableKey(cmptOption.id);\n var existingIdx = existingIdIdxMap.get(optionId);\n\n if (existingIdx != null) {\n var resultItem = result[existingIdx];\n assert(!resultItem.newOption, 'Duplicated option on id \"' + optionId + '\".');\n resultItem.newOption = cmptOption; // In both mode, if id matched, new option will be merged to\n // the existings rather than creating new component model.\n\n resultItem.existing = existings[existingIdx];\n newCmptOptions[index] = null;\n }\n });\n}\n\nfunction mappingByName(result, newCmptOptions) {\n // Mapping by name if specified.\n each(newCmptOptions, function (cmptOption, index) {\n if (!cmptOption || cmptOption.name == null) {\n return;\n }\n\n for (var i = 0; i < result.length; i++) {\n var existing = result[i].existing;\n\n if (!result[i].newOption // Consider name: two map to one.\n // Can not match when both ids existing but different.\n && existing && (existing.id == null || cmptOption.id == null) && !isComponentIdInternal(cmptOption) && !isComponentIdInternal(existing) && keyExistAndEqual('name', existing, cmptOption)) {\n result[i].newOption = cmptOption;\n newCmptOptions[index] = null;\n return;\n }\n }\n });\n}\n\nfunction mappingByIndex(result, newCmptOptions, brandNew) {\n each(newCmptOptions, function (cmptOption) {\n if (!cmptOption) {\n return;\n } // Find the first place that not mapped by id and not internal component (consider the \"hole\").\n\n\n var resultItem;\n var nextIdx = 0;\n\n while ( // Be `!resultItem` only when `nextIdx >= result.length`.\n (resultItem = result[nextIdx]) && ( // (1) Existing models that already have id should be able to mapped to. Because\n // after mapping performed, model will always be assigned with an id if user not given.\n // After that all models have id.\n // (2) If new option has id, it can only set to a hole or append to the last. It should\n // not be merged to the existings with different id. Because id should not be overwritten.\n // (3) Name can be overwritten, because axis use name as 'show label text'.\n resultItem.newOption || isComponentIdInternal(resultItem.existing) || // In mode \"replaceMerge\", here no not-mapped-non-internal-existing.\n resultItem.existing && cmptOption.id != null && !keyExistAndEqual('id', cmptOption, resultItem.existing))) {\n nextIdx++;\n }\n\n if (resultItem) {\n resultItem.newOption = cmptOption;\n resultItem.brandNew = brandNew;\n } else {\n result.push({\n newOption: cmptOption,\n brandNew: brandNew,\n existing: null,\n keyInfo: null\n });\n }\n\n nextIdx++;\n });\n}\n\nfunction mappingInReplaceAllMode(result, newCmptOptions) {\n each(newCmptOptions, function (cmptOption) {\n // The feature \"reproduce\" requires \"hole\" will also reproduced\n // in case that component index referring are broken.\n result.push({\n newOption: cmptOption,\n brandNew: true,\n existing: null,\n keyInfo: null\n });\n });\n}\n/**\n * Make id and name for mapping result (result of mappingToExists)\n * into `keyInfo` field.\n */\n\n\nfunction makeIdAndName(mapResult) {\n // We use this id to hash component models and view instances\n // in echarts. id can be specified by user, or auto generated.\n // The id generation rule ensures new view instance are able\n // to mapped to old instance when setOption are called in\n // no-merge mode. So we generate model id by name and plus\n // type in view id.\n // name can be duplicated among components, which is convenient\n // to specify multi components (like series) by one name.\n // Ensure that each id is distinct.\n var idMap = createHashMap();\n each(mapResult, function (item) {\n var existing = item.existing;\n existing && idMap.set(existing.id, item);\n });\n each(mapResult, function (item) {\n var opt = item.newOption; // Force ensure id not duplicated.\n\n assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id));\n opt && opt.id != null && idMap.set(opt.id, item);\n !item.keyInfo && (item.keyInfo = {});\n }); // Make name and id.\n\n each(mapResult, function (item, index) {\n var existing = item.existing;\n var opt = item.newOption;\n var keyInfo = item.keyInfo;\n\n if (!isObject(opt)) {\n return;\n } // Name can be overwritten. Consider case: axis.name = '20km'.\n // But id generated by name will not be changed, which affect\n // only in that case: setOption with 'not merge mode' and view\n // instance will be recreated, which can be accepted.\n\n\n keyInfo.name = opt.name != null ? makeComparableKey(opt.name) : existing ? existing.name // Avoid that different series has the same name,\n // because name may be used like in color pallet.\n : DUMMY_COMPONENT_NAME_PREFIX + index;\n\n if (existing) {\n keyInfo.id = makeComparableKey(existing.id);\n } else if (opt.id != null) {\n keyInfo.id = makeComparableKey(opt.id);\n } else {\n // Consider this situatoin:\n // optionA: [{name: 'a'}, {name: 'a'}, {..}]\n // optionB [{..}, {name: 'a'}, {name: 'a'}]\n // Series with the same name between optionA and optionB\n // should be mapped.\n var idNum = 0;\n\n do {\n keyInfo.id = '\\0' + keyInfo.name + '\\0' + idNum++;\n } while (idMap.get(keyInfo.id));\n }\n\n idMap.set(keyInfo.id, item);\n });\n}\n\nfunction keyExistAndEqual(attr, obj1, obj2) {\n var key1 = convertOptionIdName(obj1[attr], null);\n var key2 = convertOptionIdName(obj2[attr], null); // See `MappingExistingItem`. `id` and `name` trade string equals to number.\n\n return key1 != null && key2 != null && key1 === key2;\n}\n/**\n * @return return null if not exist.\n */\n\n\nfunction makeComparableKey(val) {\n if (process.env.NODE_ENV !== 'production') {\n if (val == null) {\n throw new Error();\n }\n }\n\n return convertOptionIdName(val, '');\n}\n\nexport function convertOptionIdName(idOrName, defaultValue) {\n if (idOrName == null) {\n return defaultValue;\n }\n\n return isString(idOrName) ? idOrName : isNumber(idOrName) || isStringSafe(idOrName) ? idOrName + '' : defaultValue;\n}\n\nfunction warnInvalidateIdOrName(idOrName) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`' + idOrName + '` is invalid id or name. Must be a string or number.');\n }\n}\n\nfunction isValidIdOrName(idOrName) {\n return isStringSafe(idOrName) || isNumeric(idOrName);\n}\n\nexport function isNameSpecified(componentModel) {\n var name = componentModel.name; // Is specified when `indexOf` get -1 or > 0.\n\n return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX));\n}\n/**\n * @public\n * @param {Object} cmptOption\n * @return {boolean}\n */\n\nexport function isComponentIdInternal(cmptOption) {\n return cmptOption && cmptOption.id != null && makeComparableKey(cmptOption.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX) === 0;\n}\nexport function makeInternalComponentId(idSuffix) {\n return INTERNAL_COMPONENT_ID_PREFIX + idSuffix;\n}\nexport function setComponentTypeToKeyInfo(mappingResult, mainType, componentModelCtor) {\n // Set mainType and complete subType.\n each(mappingResult, function (item) {\n var newOption = item.newOption;\n\n if (isObject(newOption)) {\n item.keyInfo.mainType = mainType;\n item.keyInfo.subType = determineSubType(mainType, newOption, item.existing, componentModelCtor);\n }\n });\n}\n\nfunction determineSubType(mainType, newCmptOption, existComponent, componentModelCtor) {\n var subType = newCmptOption.type ? newCmptOption.type : existComponent ? existComponent.subType // Use determineSubType only when there is no existComponent.\n : componentModelCtor.determineSubType(mainType, newCmptOption); // tooltip, markline, markpoint may always has no subType\n\n return subType;\n}\n/**\n * A helper for removing duplicate items between batchA and batchB,\n * and in themselves, and categorize by series.\n *\n * @param batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @param batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @return result: [resultBatchA, resultBatchB]\n */\n\n\nexport function compressBatches(batchA, batchB) {\n var mapA = {};\n var mapB = {};\n makeMap(batchA || [], mapA);\n makeMap(batchB || [], mapB, mapA);\n return [mapToArray(mapA), mapToArray(mapB)];\n\n function makeMap(sourceBatch, map, otherMap) {\n for (var i = 0, len = sourceBatch.length; i < len; i++) {\n var seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);\n\n if (seriesId == null) {\n return;\n }\n\n var dataIndices = normalizeToArray(sourceBatch[i].dataIndex);\n var otherDataIndices = otherMap && otherMap[seriesId];\n\n for (var j = 0, lenj = dataIndices.length; j < lenj; j++) {\n var dataIndex = dataIndices[j];\n\n if (otherDataIndices && otherDataIndices[dataIndex]) {\n otherDataIndices[dataIndex] = null;\n } else {\n (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;\n }\n }\n }\n }\n\n function mapToArray(map, isData) {\n var result = [];\n\n for (var i in map) {\n if (map.hasOwnProperty(i) && map[i] != null) {\n if (isData) {\n result.push(+i);\n } else {\n var dataIndices = mapToArray(map[i], true);\n dataIndices.length && result.push({\n seriesId: i,\n dataIndex: dataIndices\n });\n }\n }\n }\n\n return result;\n }\n}\n/**\n * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name\n * each of which can be Array or primary type.\n * @return dataIndex If not found, return undefined/null.\n */\n\nexport function queryDataIndex(data, payload) {\n if (payload.dataIndexInside != null) {\n return payload.dataIndexInside;\n } else if (payload.dataIndex != null) {\n return isArray(payload.dataIndex) ? map(payload.dataIndex, function (value) {\n return data.indexOfRawIndex(value);\n }) : data.indexOfRawIndex(payload.dataIndex);\n } else if (payload.name != null) {\n return isArray(payload.name) ? map(payload.name, function (value) {\n return data.indexOfName(value);\n }) : data.indexOfName(payload.name);\n }\n}\n/**\n * Enable property storage to any host object.\n * Notice: Serialization is not supported.\n *\n * For example:\n * let inner = zrUitl.makeInner();\n *\n * function some1(hostObj) {\n * inner(hostObj).someProperty = 1212;\n * ...\n * }\n * function some2() {\n * let fields = inner(this);\n * fields.someProperty1 = 1212;\n * fields.someProperty2 = 'xx';\n * ...\n * }\n *\n * @return {Function}\n */\n\nexport function makeInner() {\n var key = '__ec_inner_' + innerUniqueIndex++;\n return function (hostObj) {\n return hostObj[key] || (hostObj[key] = {});\n };\n}\nvar innerUniqueIndex = getRandomIdBase();\n/**\n * The same behavior as `component.getReferringComponents`.\n */\n\nexport function parseFinder(ecModel, finderInput, opt) {\n var _a = preParseFinder(finderInput, opt),\n mainTypeSpecified = _a.mainTypeSpecified,\n queryOptionMap = _a.queryOptionMap,\n others = _a.others;\n\n var result = others;\n var defaultMainType = opt ? opt.defaultMainType : null;\n\n if (!mainTypeSpecified && defaultMainType) {\n queryOptionMap.set(defaultMainType, {});\n }\n\n queryOptionMap.each(function (queryOption, mainType) {\n var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {\n useDefault: defaultMainType === mainType,\n enableAll: opt && opt.enableAll != null ? opt.enableAll : true,\n enableNone: opt && opt.enableNone != null ? opt.enableNone : true\n });\n result[mainType + 'Models'] = queryResult.models;\n result[mainType + 'Model'] = queryResult.models[0];\n });\n return result;\n}\nexport function preParseFinder(finderInput, opt) {\n var finder;\n\n if (isString(finderInput)) {\n var obj = {};\n obj[finderInput + 'Index'] = 0;\n finder = obj;\n } else {\n finder = finderInput;\n }\n\n var queryOptionMap = createHashMap();\n var others = {};\n var mainTypeSpecified = false;\n each(finder, function (value, key) {\n // Exclude 'dataIndex' and other illgal keys.\n if (key === 'dataIndex' || key === 'dataIndexInside') {\n others[key] = value;\n return;\n }\n\n var parsedKey = key.match(/^(\\w+)(Index|Id|Name)$/) || [];\n var mainType = parsedKey[1];\n var queryType = (parsedKey[2] || '').toLowerCase();\n\n if (!mainType || !queryType || opt && opt.includeMainTypes && indexOf(opt.includeMainTypes, mainType) < 0) {\n return;\n }\n\n mainTypeSpecified = mainTypeSpecified || !!mainType;\n var queryOption = queryOptionMap.get(mainType) || queryOptionMap.set(mainType, {});\n queryOption[queryType] = value;\n });\n return {\n mainTypeSpecified: mainTypeSpecified,\n queryOptionMap: queryOptionMap,\n others: others\n };\n}\nexport var SINGLE_REFERRING = {\n useDefault: true,\n enableAll: false,\n enableNone: false\n};\nexport var MULTIPLE_REFERRING = {\n useDefault: false,\n enableAll: true,\n enableNone: true\n};\nexport function queryReferringComponents(ecModel, mainType, userOption, opt) {\n opt = opt || SINGLE_REFERRING;\n var indexOption = userOption.index;\n var idOption = userOption.id;\n var nameOption = userOption.name;\n var result = {\n models: null,\n specified: indexOption != null || idOption != null || nameOption != null\n };\n\n if (!result.specified) {\n // Use the first as default if `useDefault`.\n var firstCmpt = void 0;\n result.models = opt.useDefault && (firstCmpt = ecModel.getComponent(mainType)) ? [firstCmpt] : [];\n return result;\n }\n\n if (indexOption === 'none' || indexOption === false) {\n assert(opt.enableNone, '`\"none\"` or `false` is not a valid value on index option.');\n result.models = [];\n return result;\n } // `queryComponents` will return all components if\n // both all of index/id/name are null/undefined.\n\n\n if (indexOption === 'all') {\n assert(opt.enableAll, '`\"all\"` is not a valid value on index option.');\n indexOption = idOption = nameOption = null;\n }\n\n result.models = ecModel.queryComponents({\n mainType: mainType,\n index: indexOption,\n id: idOption,\n name: nameOption\n });\n return result;\n}\nexport function setAttribute(dom, key, value) {\n dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value;\n}\nexport function getAttribute(dom, key) {\n return dom.getAttribute ? dom.getAttribute(key) : dom[key];\n}\nexport function getTooltipRenderMode(renderModeOption) {\n if (renderModeOption === 'auto') {\n // Using html when `document` exists, use richText otherwise\n return env.domSupported ? 'html' : 'richText';\n } else {\n return renderModeOption || 'html';\n }\n}\n/**\n * Group a list by key.\n */\n\nexport function groupData(array, getKey // return key\n) {\n var buckets = createHashMap();\n var keys = [];\n each(array, function (item) {\n var key = getKey(item);\n (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item);\n });\n return {\n keys: keys,\n buckets: buckets\n };\n}\n/**\n * Interpolate raw values of a series with percent\n *\n * @param data data\n * @param labelModel label model of the text element\n * @param sourceValue start value. May be null/undefined when init.\n * @param targetValue end value\n * @param percent 0~1 percentage; 0 uses start value while 1 uses end value\n * @return interpolated values\n * If `sourceValue` and `targetValue` are `number`, return `number`.\n * If `sourceValue` and `targetValue` are `string`, return `string`.\n * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`.\n * Other cases do not supported.\n */\n\nexport function interpolateRawValues(data, precision, sourceValue, targetValue, percent) {\n var isAutoPrecision = precision == null || precision === 'auto';\n\n if (targetValue == null) {\n return targetValue;\n }\n\n if (isNumber(targetValue)) {\n var value = interpolateNumber(sourceValue || 0, targetValue, percent);\n return round(value, isAutoPrecision ? Math.max(getPrecision(sourceValue || 0), getPrecision(targetValue)) : precision);\n } else if (isString(targetValue)) {\n return percent < 1 ? sourceValue : targetValue;\n } else {\n var interpolated = [];\n var leftArr = sourceValue;\n var rightArr = targetValue;\n var length_1 = Math.max(leftArr ? leftArr.length : 0, rightArr.length);\n\n for (var i = 0; i < length_1; ++i) {\n var info = data.getDimensionInfo(i); // Don't interpolate ordinal dims\n\n if (info && info.type === 'ordinal') {\n // In init, there is no `sourceValue`, but should better not to get undefined result.\n interpolated[i] = (percent < 1 && leftArr ? leftArr : rightArr)[i];\n } else {\n var leftVal = leftArr && leftArr[i] ? leftArr[i] : 0;\n var rightVal = rightArr[i];\n var value = interpolateNumber(leftVal, rightVal, percent);\n interpolated[i] = round(value, isAutoPrecision ? Math.max(getPrecision(leftVal), getPrecision(rightVal)) : precision);\n }\n }\n\n return interpolated;\n }\n}"]},"metadata":{},"sourceType":"module"}