| 1 |
- {"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\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/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { __extends } from \"tslib\";\n/**\r\n * Caution: If the mechanism should be changed some day, these cases\r\n * should be considered:\r\n *\r\n * (1) In `merge option` mode, if using the same option to call `setOption`\r\n * many times, the result should be the same (try our best to ensure that).\r\n * (2) In `merge option` mode, if a component has no id/name specified, it\r\n * will be merged by index, and the result sequence of the components is\r\n * consistent to the original sequence.\r\n * (3) In `replaceMerge` mode, keep the result sequence of the components is\r\n * consistent to the original sequence, even though there might result in \"hole\".\r\n * (4) `reset` feature (in toolbox). Find detailed info in comments about\r\n * `mergeOption` in module:echarts/model/OptionManager.\r\n */\nimport { each, filter, isArray, isObject, isString, createHashMap, assert, clone, merge, extend, mixin, isFunction } from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../util/model.js';\nimport Model from './Model.js';\nimport ComponentModel from './Component.js';\nimport globalDefault from './globalDefault.js';\nimport { resetSourceDefaulter } from '../data/helper/sourceHelper.js';\nimport { concatInternalOptions } from './internalComponentCreator.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { error, warn } from '../util/log.js';\n// -----------------------\n// Internal method names:\n// -----------------------\nvar reCreateSeriesIndices;\nvar assertSeriesInitialized;\nvar initBase;\nvar OPTION_INNER_KEY = '\\0_ec_inner';\nvar OPTION_INNER_VALUE = 1;\nvar BUITIN_COMPONENTS_MAP = {\n grid: 'GridComponent',\n polar: 'PolarComponent',\n geo: 'GeoComponent',\n singleAxis: 'SingleAxisComponent',\n parallel: 'ParallelComponent',\n calendar: 'CalendarComponent',\n graphic: 'GraphicComponent',\n toolbox: 'ToolboxComponent',\n tooltip: 'TooltipComponent',\n axisPointer: 'AxisPointerComponent',\n brush: 'BrushComponent',\n title: 'TitleComponent',\n timeline: 'TimelineComponent',\n markPoint: 'MarkPointComponent',\n markLine: 'MarkLineComponent',\n markArea: 'MarkAreaComponent',\n legend: 'LegendComponent',\n dataZoom: 'DataZoomComponent',\n visualMap: 'VisualMapComponent',\n // aria: 'AriaComponent',\n // dataset: 'DatasetComponent',\n // Dependencies\n xAxis: 'GridComponent',\n yAxis: 'GridComponent',\n angleAxis: 'PolarComponent',\n radiusAxis: 'PolarComponent'\n};\nvar BUILTIN_CHARTS_MAP = {\n line: 'LineChart',\n bar: 'BarChart',\n pie: 'PieChart',\n scatter: 'ScatterChart',\n radar: 'RadarChart',\n map: 'MapChart',\n tree: 'TreeChart',\n treemap: 'TreemapChart',\n graph: 'GraphChart',\n gauge: 'GaugeChart',\n funnel: 'FunnelChart',\n parallel: 'ParallelChart',\n sankey: 'SankeyChart',\n boxplot: 'BoxplotChart',\n candlestick: 'CandlestickChart',\n effectScatter: 'EffectScatterChart',\n lines: 'LinesChart',\n heatmap: 'HeatmapChart',\n pictorialBar: 'PictorialBarChart',\n themeRiver: 'ThemeRiverChart',\n sunburst: 'SunburstChart',\n custom: 'CustomChart'\n};\nvar componetsMissingLogPrinted = {};\nfunction checkMissingComponents(option) {\n each(option, function (componentOption, mainType) {\n if (!ComponentModel.hasClass(mainType)) {\n var componentImportName = BUITIN_COMPONENTS_MAP[mainType];\n if (componentImportName && !componetsMissingLogPrinted[componentImportName]) {\n error(\"Component \" + mainType + \" is used but not imported.\\nimport { \" + componentImportName + \" } from 'echarts/components';\\necharts.use([\" + componentImportName + \"]);\");\n componetsMissingLogPrinted[componentImportName] = true;\n }\n }\n });\n}\nvar GlobalModel = /** @class */function (_super) {\n __extends(GlobalModel, _super);\n function GlobalModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n this._theme = new Model(theme);\n this._locale = new Model(locale);\n this._optionManager = optionManager;\n };\n GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) {\n if (process.env.NODE_ENV !== 'production') {\n assert(option != null, 'option is null/undefined');\n assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()');\n }\n var innerOpt = normalizeSetOptionInput(opts);\n this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt);\n this._resetOption(null, innerOpt);\n };\n /**\r\n * @param type null/undefined: reset all.\r\n * 'recreate': force recreate all.\r\n * 'timeline': only reset timeline option\r\n * 'media': only reset media query option\r\n * @return Whether option changed.\r\n */\n GlobalModel.prototype.resetOption = function (type, opt) {\n return this._resetOption(type, normalizeSetOptionInput(opt));\n };\n GlobalModel.prototype._resetOption = function (type, opt) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n if (process.env.NODE_ENV !== 'production') {\n checkMissingComponents(baseOption);\n }\n if (!this.option || type === 'recreate') {\n initBase(this, baseOption);\n } else {\n this.restoreData();\n this._mergeOption(baseOption, opt);\n }\n optionChanged = true;\n }\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n }\n // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`,\n // it should better not have the same props with `MediaUnit['option']`.\n // Because either `option2` or `MediaUnit['option']` will be always merged to \"current option\"\n // rather than original \"baseOption\". If they both override a prop, the result might be\n // unexpected when media state changed after `setOption` called.\n // If we really need to modify a props in each `MediaUnit['option']`, use the full version\n // (`{baseOption, media}`) in `setOption`.\n // For `timeline`, the case is the same.\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n if (timelineOption) {\n optionChanged = true;\n this._mergeOption(timelineOption, opt);\n }\n }\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this);\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n optionChanged = true;\n this._mergeOption(mediaOption, opt);\n }, this);\n }\n }\n return optionChanged;\n };\n GlobalModel.prototype.mergeOption = function (option) {\n this._mergeOption(option, null);\n };\n GlobalModel.prototype._mergeOption = function (newOption, opt) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var componentsCount = this._componentsCount;\n var newCmptTypes = [];\n var newCmptTypeMap = createHashMap();\n var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap;\n resetSourceDefaulter(this);\n // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCmptTypes.push(mainType);\n newCmptTypeMap.set(mainType, true);\n }\n });\n if (replaceMergeMainTypeMap) {\n // If there is a mainType `xxx` in `replaceMerge` but not declared in option,\n // we trade it as it is declared in option as `{xxx: []}`. Because:\n // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`.\n // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`.\n replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) {\n if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) {\n newCmptTypes.push(mainTypeInReplaceMerge);\n newCmptTypeMap.set(mainTypeInReplaceMerge, true);\n }\n });\n }\n ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n function visitComponent(mainType) {\n var newCmptOptionList = concatInternalOptions(this, mainType, modelUtil.normalizeToArray(newOption[mainType]));\n var oldCmptList = componentsMap.get(mainType);\n var mergeMode =\n // `!oldCmptList` means init. See the comment in `mappingToExists`\n !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge';\n var mappingResult = modelUtil.mappingToExists(oldCmptList, newCmptOptionList, mergeMode);\n // Set mainType and complete subType.\n modelUtil.setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel);\n // Empty it before the travel, in order to prevent `this._componentsMap`\n // from being used in the `init`/`mergeOption`/`optionUpdated` of some\n // components, which is probably incorrect logic.\n option[mainType] = null;\n componentsMap.set(mainType, null);\n componentsCount.set(mainType, 0);\n var optionsByMainType = [];\n var cmptsByMainType = [];\n var cmptsCountByMainType = 0;\n var tooltipExists;\n var tooltipWarningLogged;\n each(mappingResult, function (resultItem, index) {\n var componentModel = resultItem.existing;\n var newCmptOption = resultItem.newOption;\n if (!newCmptOption) {\n if (componentModel) {\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n }\n // If no both `resultItem.exist` and `resultItem.option`,\n // either it is in `replaceMerge` and not matched by any id,\n // or it has been removed in previous `replaceMerge` and left a \"hole\" in this component index.\n } else {\n var isSeriesType = mainType === 'series';\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists\n );\n if (!ComponentModelClass) {\n if (process.env.NODE_ENV !== 'production') {\n var subType = resultItem.keyInfo.subType;\n var seriesImportName = BUILTIN_CHARTS_MAP[subType];\n if (!componetsMissingLogPrinted[subType]) {\n componetsMissingLogPrinted[subType] = true;\n if (seriesImportName) {\n error(\"Series \" + subType + \" is used but not imported.\\nimport { \" + seriesImportName + \" } from 'echarts/charts';\\necharts.use([\" + seriesImportName + \"]);\");\n } else {\n error(\"Unknown series \" + subType);\n }\n }\n }\n return;\n }\n // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception.\n if (mainType === 'tooltip') {\n if (tooltipExists) {\n if (process.env.NODE_ENV !== 'production') {\n if (!tooltipWarningLogged) {\n warn('Currently only one tooltip component is allowed.');\n tooltipWarningLogged = true;\n }\n }\n return;\n }\n tooltipExists = true;\n }\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name;\n // componentModel.settingTask && componentModel.settingTask.dirty();\n componentModel.mergeOption(newCmptOption, this);\n componentModel.optionUpdated(newCmptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt);\n // Assign `keyInfo`\n extend(componentModel, extraOpt);\n if (resultItem.brandNew) {\n componentModel.__requireNewView = true;\n }\n componentModel.init(newCmptOption, this, this);\n // Call optionUpdated after init.\n // newCmptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n componentModel.optionUpdated(null, true);\n }\n }\n if (componentModel) {\n optionsByMainType.push(componentModel.option);\n cmptsByMainType.push(componentModel);\n cmptsCountByMainType++;\n } else {\n // Always do assign to avoid elided item in array.\n optionsByMainType.push(void 0);\n cmptsByMainType.push(void 0);\n }\n }, this);\n option[mainType] = optionsByMainType;\n componentsMap.set(mainType, cmptsByMainType);\n componentsCount.set(mainType, cmptsCountByMainType);\n // Backup series for filtering.\n if (mainType === 'series') {\n reCreateSeriesIndices(this);\n }\n }\n // If no series declared, ensure `_seriesIndices` initialized.\n if (!this._seriesIndices) {\n reCreateSeriesIndices(this);\n }\n };\n /**\r\n * Get option for output (cloned option and inner info removed)\r\n */\n GlobalModel.prototype.getOption = function () {\n var option = clone(this.option);\n each(option, function (optInMainType, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(optInMainType);\n // Inner cmpts need to be removed.\n // Inner cmpts might not be at last since ec5.0, but still\n // compatible for users: if inner cmpt at last, splice the returned array.\n var realLen = opts.length;\n var metNonInner = false;\n for (var i = realLen - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (opts[i] && !modelUtil.isComponentIdInternal(opts[i])) {\n metNonInner = true;\n } else {\n opts[i] = null;\n !metNonInner && realLen--;\n }\n }\n opts.length = realLen;\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n };\n GlobalModel.prototype.getTheme = function () {\n return this._theme;\n };\n GlobalModel.prototype.getLocaleModel = function () {\n return this._locale;\n };\n GlobalModel.prototype.setUpdatePayload = function (payload) {\n this._payload = payload;\n };\n GlobalModel.prototype.getUpdatePayload = function () {\n return this._payload;\n };\n /**\r\n * @param idx If not specified, return the first one.\r\n */\n GlobalModel.prototype.getComponent = function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n if (list) {\n var cmpt = list[idx || 0];\n if (cmpt) {\n return cmpt;\n } else if (idx == null) {\n for (var i = 0; i < list.length; i++) {\n if (list[i]) {\n return list[i];\n }\n }\n }\n }\n };\n /**\r\n * @return Never be null/undefined.\r\n */\n GlobalModel.prototype.queryComponents = function (condition) {\n var mainType = condition.mainType;\n if (!mainType) {\n return [];\n }\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n var cmpts = this._componentsMap.get(mainType);\n if (!cmpts || !cmpts.length) {\n return [];\n }\n var result;\n if (index != null) {\n result = [];\n each(modelUtil.normalizeToArray(index), function (idx) {\n cmpts[idx] && result.push(cmpts[idx]);\n });\n } else if (id != null) {\n result = queryByIdOrName('id', id, cmpts);\n } else if (name != null) {\n result = queryByIdOrName('name', name, cmpts);\n } else {\n // Return all non-empty components in that mainType\n result = filter(cmpts, function (cmpt) {\n return !!cmpt;\n });\n }\n return filterBySubType(result, condition);\n };\n /**\r\n * The interface is different from queryComponents,\r\n * which is convenient for inner usage.\r\n *\r\n * @usage\r\n * let result = findComponents(\r\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\r\n * );\r\n * let result = findComponents(\r\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\r\n * );\r\n * let result = findComponents(\r\n * {mainType: 'series',\r\n * filter: function (model, index) {...}}\r\n * );\r\n * // result like [component0, componnet1, ...]\r\n */\n GlobalModel.prototype.findComponents = function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond)\n // Retrieve all non-empty components.\n : filter(this._componentsMap.get(mainType), function (cmpt) {\n return !!cmpt;\n });\n return doFilter(filterBySubType(result, condition));\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n };\n GlobalModel.prototype.eachComponent = function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n if (isFunction(mainType)) {\n var ctxForAll_1 = cb;\n var cbForAll_1 = mainType;\n componentsMap.each(function (cmpts, componentType) {\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex);\n }\n });\n } else {\n var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null;\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cb.call(context, cmpt, cmpt.componentIndex);\n }\n }\n };\n /**\r\n * Get series list before filtered by name.\r\n */\n GlobalModel.prototype.getSeriesByName = function (name) {\n var nameStr = modelUtil.convertOptionIdName(name, null);\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && nameStr != null && oneSeries.name === nameStr;\n });\n };\n /**\r\n * Get series list before filtered by index.\r\n */\n GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n };\n /**\r\n * Get series list before filtered by type.\r\n * FIXME: rename to getRawSeriesByType?\r\n */\n GlobalModel.prototype.getSeriesByType = function (subType) {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && oneSeries.subType === subType;\n });\n };\n /**\r\n * Get all series before filtered.\r\n */\n GlobalModel.prototype.getSeries = function () {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries;\n });\n };\n /**\r\n * Count series before filtered.\r\n */\n GlobalModel.prototype.getSeriesCount = function () {\n return this._componentsCount.get('series');\n };\n /**\r\n * After filtering, series may be different\r\n * from raw series.\r\n */\n GlobalModel.prototype.eachSeries = function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n cb.call(context, series, rawSeriesIndex);\n }, this);\n };\n /**\r\n * Iterate raw series before filtered.\r\n *\r\n * @param {Function} cb\r\n * @param {*} context\r\n */\n GlobalModel.prototype.eachRawSeries = function (cb, context) {\n each(this._componentsMap.get('series'), function (series) {\n series && cb.call(context, series, series.componentIndex);\n });\n };\n /**\r\n * After filtering, series may be different.\r\n * from raw series.\r\n */\n GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n };\n /**\r\n * Iterate raw series before filtered of given type.\r\n */\n GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n };\n GlobalModel.prototype.isSeriesFiltered = function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n };\n GlobalModel.prototype.getCurrentSeriesIndices = function () {\n return (this._seriesIndices || []).slice();\n };\n GlobalModel.prototype.filterSeries = function (cb, context) {\n assertSeriesInitialized(this);\n var newSeriesIndices = [];\n each(this._seriesIndices, function (seriesRawIdx) {\n var series = this._componentsMap.get('series')[seriesRawIdx];\n cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx);\n }, this);\n this._seriesIndices = newSeriesIndices;\n this._seriesIndicesMap = createHashMap(newSeriesIndices);\n };\n GlobalModel.prototype.restoreData = function (payload) {\n reCreateSeriesIndices(this);\n var componentsMap = this._componentsMap;\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n if (ComponentModel.hasClass(componentType)) {\n componentTypes.push(componentType);\n }\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) {\n each(componentsMap.get(componentType), function (component) {\n if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) {\n component.restoreData();\n }\n });\n });\n };\n GlobalModel.internalField = function () {\n reCreateSeriesIndices = function (ecModel) {\n var seriesIndices = ecModel._seriesIndices = [];\n each(ecModel._componentsMap.get('series'), function (series) {\n // series may have been removed by `replaceMerge`.\n series && seriesIndices.push(series.componentIndex);\n });\n ecModel._seriesIndicesMap = createHashMap(seriesIndices);\n };\n assertSeriesInitialized = function (ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (process.env.NODE_ENV !== 'production') {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n };\n initBase = function (ecModel, baseOption) {\n // Using OPTION_INNER_KEY to mark that this option cannot be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbidden.\n ecModel.option = {};\n ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE;\n // Init with series: [], in case of calling findSeries method\n // before series initialized.\n ecModel._componentsMap = createHashMap({\n series: []\n });\n ecModel._componentsCount = createHashMap();\n // If user spefied `option.aria`, aria will be enable. This detection should be\n // performed before theme and globalDefault merge.\n var airaOption = baseOption.aria;\n if (isObject(airaOption) && airaOption.enabled == null) {\n airaOption.enabled = true;\n }\n mergeTheme(baseOption, ecModel._theme.option);\n // TODO Needs clone when merging to the unexisted property\n merge(baseOption, globalDefault, false);\n ecModel._mergeOption(baseOption, null);\n };\n }();\n return GlobalModel;\n}(Model);\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seriesIndex;\n var id = payload.seriesId;\n var name_1 = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1;\n }\n}\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n }\n // If it is component model mainType, the model handles that merge later.\n // otherwise, merge them here.\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\nfunction queryByIdOrName(attr, idOrName, cmpts) {\n // Here is a break from echarts4: string and number are\n // treated as equal.\n if (isArray(idOrName)) {\n var keyMap_1 = createHashMap();\n each(idOrName, function (idOrNameItem) {\n if (idOrNameItem != null) {\n var idName = modelUtil.convertOptionIdName(idOrNameItem, null);\n idName != null && keyMap_1.set(idOrNameItem, true);\n }\n });\n return filter(cmpts, function (cmpt) {\n return cmpt && keyMap_1.get(cmpt[attr]);\n });\n } else {\n var idName_1 = modelUtil.convertOptionIdName(idOrName, null);\n return filter(cmpts, function (cmpt) {\n return cmpt && idName_1 != null && cmpt[attr] === idName_1;\n });\n }\n}\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) {\n return cmpt && cmpt.subType === condition.subType;\n }) : components;\n}\nfunction normalizeSetOptionInput(opts) {\n var replaceMergeMainTypeMap = createHashMap();\n opts && each(modelUtil.normalizeToArray(opts.replaceMerge), function (mainType) {\n if (process.env.NODE_ENV !== 'production') {\n assert(ComponentModel.hasClass(mainType), '\"' + mainType + '\" is not valid component main type in \"replaceMerge\"');\n }\n replaceMergeMainTypeMap.set(mainType, true);\n });\n return {\n replaceMergeMainTypeMap: replaceMergeMainTypeMap\n };\n}\nmixin(GlobalModel, PaletteMixin);\nexport default GlobalModel;","map":{"version":3,"names":["__extends","each","filter","isArray","isObject","isString","createHashMap","assert","clone","merge","extend","mixin","isFunction","modelUtil","Model","ComponentModel","globalDefault","resetSourceDefaulter","concatInternalOptions","PaletteMixin","error","warn","reCreateSeriesIndices","assertSeriesInitialized","initBase","OPTION_INNER_KEY","OPTION_INNER_VALUE","BUITIN_COMPONENTS_MAP","grid","polar","geo","singleAxis","parallel","calendar","graphic","toolbox","tooltip","axisPointer","brush","title","timeline","markPoint","markLine","markArea","legend","dataZoom","visualMap","xAxis","yAxis","angleAxis","radiusAxis","BUILTIN_CHARTS_MAP","line","bar","pie","scatter","radar","map","tree","treemap","graph","gauge","funnel","sankey","boxplot","candlestick","effectScatter","lines","heatmap","pictorialBar","themeRiver","sunburst","custom","componetsMissingLogPrinted","checkMissingComponents","option","componentOption","mainType","hasClass","componentImportName","GlobalModel","_super","apply","arguments","prototype","init","parentModel","ecModel","theme","locale","optionManager","_theme","_locale","_optionManager","setOption","opts","optionPreprocessorFuncs","process","env","NODE_ENV","innerOpt","normalizeSetOptionInput","_resetOption","resetOption","type","opt","optionChanged","baseOption","mountOption","restoreData","_mergeOption","timelineOption","getTimelineOption","mediaOptions","getMediaOption","length","mediaOption","mergeOption","newOption","componentsMap","_componentsMap","componentsCount","_componentsCount","newCmptTypes","newCmptTypeMap","replaceMergeMainTypeMap","push","set","val","mainTypeInReplaceMerge","get","topologicalTravel","getAllClassMainTypes","visitComponent","newCmptOptionList","normalizeToArray","oldCmptList","mergeMode","mappingResult","mappingToExists","setComponentTypeToKeyInfo","optionsByMainType","cmptsByMainType","cmptsCountByMainType","tooltipExists","tooltipWarningLogged","resultItem","index","componentModel","existing","newCmptOption","optionUpdated","isSeriesType","ComponentModelClass","getClass","keyInfo","subType","seriesImportName","constructor","name","extraOpt","componentIndex","brandNew","__requireNewView","_seriesIndices","getOption","optInMainType","realLen","metNonInner","i","isComponentIdInternal","getTheme","getLocaleModel","setUpdatePayload","payload","_payload","getUpdatePayload","getComponent","idx","list","cmpt","queryComponents","condition","id","cmpts","result","queryByIdOrName","filterBySubType","findComponents","query","queryCond","getQueryCond","doFilter","q","indexAttr","idAttr","nameAttr","res","eachComponent","cb","context","ctxForAll_1","cbForAll_1","componentType","call","getSeriesByName","nameStr","convertOptionIdName","oneSeries","getSeriesByIndex","seriesIndex","getSeriesByType","getSeries","getSeriesCount","eachSeries","rawSeriesIndex","series","eachRawSeries","eachSeriesByType","eachRawSeriesByType","isSeriesFiltered","seriesModel","_seriesIndicesMap","getCurrentSeriesIndices","slice","filterSeries","newSeriesIndices","seriesRawIdx","componentTypes","components","component","isNotTargetSeries","internalField","seriesIndices","Error","airaOption","aria","enabled","mergeTheme","seriesId","name_1","seriesName","notMergeColorLayer","color","colorLayer","themeItem","attr","idOrName","keyMap_1","idOrNameItem","idName","idName_1","hasOwnProperty","replaceMerge"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/model/Global.js"],"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/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { __extends } from \"tslib\";\n/**\r\n * Caution: If the mechanism should be changed some day, these cases\r\n * should be considered:\r\n *\r\n * (1) In `merge option` mode, if using the same option to call `setOption`\r\n * many times, the result should be the same (try our best to ensure that).\r\n * (2) In `merge option` mode, if a component has no id/name specified, it\r\n * will be merged by index, and the result sequence of the components is\r\n * consistent to the original sequence.\r\n * (3) In `replaceMerge` mode, keep the result sequence of the components is\r\n * consistent to the original sequence, even though there might result in \"hole\".\r\n * (4) `reset` feature (in toolbox). Find detailed info in comments about\r\n * `mergeOption` in module:echarts/model/OptionManager.\r\n */\nimport { each, filter, isArray, isObject, isString, createHashMap, assert, clone, merge, extend, mixin, isFunction } from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../util/model.js';\nimport Model from './Model.js';\nimport ComponentModel from './Component.js';\nimport globalDefault from './globalDefault.js';\nimport { resetSourceDefaulter } from '../data/helper/sourceHelper.js';\nimport { concatInternalOptions } from './internalComponentCreator.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { error, warn } from '../util/log.js';\n// -----------------------\n// Internal method names:\n// -----------------------\nvar reCreateSeriesIndices;\nvar assertSeriesInitialized;\nvar initBase;\nvar OPTION_INNER_KEY = '\\0_ec_inner';\nvar OPTION_INNER_VALUE = 1;\nvar BUITIN_COMPONENTS_MAP = {\n grid: 'GridComponent',\n polar: 'PolarComponent',\n geo: 'GeoComponent',\n singleAxis: 'SingleAxisComponent',\n parallel: 'ParallelComponent',\n calendar: 'CalendarComponent',\n graphic: 'GraphicComponent',\n toolbox: 'ToolboxComponent',\n tooltip: 'TooltipComponent',\n axisPointer: 'AxisPointerComponent',\n brush: 'BrushComponent',\n title: 'TitleComponent',\n timeline: 'TimelineComponent',\n markPoint: 'MarkPointComponent',\n markLine: 'MarkLineComponent',\n markArea: 'MarkAreaComponent',\n legend: 'LegendComponent',\n dataZoom: 'DataZoomComponent',\n visualMap: 'VisualMapComponent',\n // aria: 'AriaComponent',\n // dataset: 'DatasetComponent',\n // Dependencies\n xAxis: 'GridComponent',\n yAxis: 'GridComponent',\n angleAxis: 'PolarComponent',\n radiusAxis: 'PolarComponent'\n};\nvar BUILTIN_CHARTS_MAP = {\n line: 'LineChart',\n bar: 'BarChart',\n pie: 'PieChart',\n scatter: 'ScatterChart',\n radar: 'RadarChart',\n map: 'MapChart',\n tree: 'TreeChart',\n treemap: 'TreemapChart',\n graph: 'GraphChart',\n gauge: 'GaugeChart',\n funnel: 'FunnelChart',\n parallel: 'ParallelChart',\n sankey: 'SankeyChart',\n boxplot: 'BoxplotChart',\n candlestick: 'CandlestickChart',\n effectScatter: 'EffectScatterChart',\n lines: 'LinesChart',\n heatmap: 'HeatmapChart',\n pictorialBar: 'PictorialBarChart',\n themeRiver: 'ThemeRiverChart',\n sunburst: 'SunburstChart',\n custom: 'CustomChart'\n};\nvar componetsMissingLogPrinted = {};\nfunction checkMissingComponents(option) {\n each(option, function (componentOption, mainType) {\n if (!ComponentModel.hasClass(mainType)) {\n var componentImportName = BUITIN_COMPONENTS_MAP[mainType];\n if (componentImportName && !componetsMissingLogPrinted[componentImportName]) {\n error(\"Component \" + mainType + \" is used but not imported.\\nimport { \" + componentImportName + \" } from 'echarts/components';\\necharts.use([\" + componentImportName + \"]);\");\n componetsMissingLogPrinted[componentImportName] = true;\n }\n }\n });\n}\nvar GlobalModel = /** @class */function (_super) {\n __extends(GlobalModel, _super);\n function GlobalModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n this._theme = new Model(theme);\n this._locale = new Model(locale);\n this._optionManager = optionManager;\n };\n GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) {\n if (process.env.NODE_ENV !== 'production') {\n assert(option != null, 'option is null/undefined');\n assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()');\n }\n var innerOpt = normalizeSetOptionInput(opts);\n this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt);\n this._resetOption(null, innerOpt);\n };\n /**\r\n * @param type null/undefined: reset all.\r\n * 'recreate': force recreate all.\r\n * 'timeline': only reset timeline option\r\n * 'media': only reset media query option\r\n * @return Whether option changed.\r\n */\n GlobalModel.prototype.resetOption = function (type, opt) {\n return this._resetOption(type, normalizeSetOptionInput(opt));\n };\n GlobalModel.prototype._resetOption = function (type, opt) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n if (process.env.NODE_ENV !== 'production') {\n checkMissingComponents(baseOption);\n }\n if (!this.option || type === 'recreate') {\n initBase(this, baseOption);\n } else {\n this.restoreData();\n this._mergeOption(baseOption, opt);\n }\n optionChanged = true;\n }\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n }\n // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`,\n // it should better not have the same props with `MediaUnit['option']`.\n // Because either `option2` or `MediaUnit['option']` will be always merged to \"current option\"\n // rather than original \"baseOption\". If they both override a prop, the result might be\n // unexpected when media state changed after `setOption` called.\n // If we really need to modify a props in each `MediaUnit['option']`, use the full version\n // (`{baseOption, media}`) in `setOption`.\n // For `timeline`, the case is the same.\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n if (timelineOption) {\n optionChanged = true;\n this._mergeOption(timelineOption, opt);\n }\n }\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this);\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n optionChanged = true;\n this._mergeOption(mediaOption, opt);\n }, this);\n }\n }\n return optionChanged;\n };\n GlobalModel.prototype.mergeOption = function (option) {\n this._mergeOption(option, null);\n };\n GlobalModel.prototype._mergeOption = function (newOption, opt) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var componentsCount = this._componentsCount;\n var newCmptTypes = [];\n var newCmptTypeMap = createHashMap();\n var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap;\n resetSourceDefaulter(this);\n // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCmptTypes.push(mainType);\n newCmptTypeMap.set(mainType, true);\n }\n });\n if (replaceMergeMainTypeMap) {\n // If there is a mainType `xxx` in `replaceMerge` but not declared in option,\n // we trade it as it is declared in option as `{xxx: []}`. Because:\n // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`.\n // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`.\n replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) {\n if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) {\n newCmptTypes.push(mainTypeInReplaceMerge);\n newCmptTypeMap.set(mainTypeInReplaceMerge, true);\n }\n });\n }\n ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n function visitComponent(mainType) {\n var newCmptOptionList = concatInternalOptions(this, mainType, modelUtil.normalizeToArray(newOption[mainType]));\n var oldCmptList = componentsMap.get(mainType);\n var mergeMode =\n // `!oldCmptList` means init. See the comment in `mappingToExists`\n !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge';\n var mappingResult = modelUtil.mappingToExists(oldCmptList, newCmptOptionList, mergeMode);\n // Set mainType and complete subType.\n modelUtil.setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel);\n // Empty it before the travel, in order to prevent `this._componentsMap`\n // from being used in the `init`/`mergeOption`/`optionUpdated` of some\n // components, which is probably incorrect logic.\n option[mainType] = null;\n componentsMap.set(mainType, null);\n componentsCount.set(mainType, 0);\n var optionsByMainType = [];\n var cmptsByMainType = [];\n var cmptsCountByMainType = 0;\n var tooltipExists;\n var tooltipWarningLogged;\n each(mappingResult, function (resultItem, index) {\n var componentModel = resultItem.existing;\n var newCmptOption = resultItem.newOption;\n if (!newCmptOption) {\n if (componentModel) {\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n }\n // If no both `resultItem.exist` and `resultItem.option`,\n // either it is in `replaceMerge` and not matched by any id,\n // or it has been removed in previous `replaceMerge` and left a \"hole\" in this component index.\n } else {\n var isSeriesType = mainType === 'series';\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists\n );\n if (!ComponentModelClass) {\n if (process.env.NODE_ENV !== 'production') {\n var subType = resultItem.keyInfo.subType;\n var seriesImportName = BUILTIN_CHARTS_MAP[subType];\n if (!componetsMissingLogPrinted[subType]) {\n componetsMissingLogPrinted[subType] = true;\n if (seriesImportName) {\n error(\"Series \" + subType + \" is used but not imported.\\nimport { \" + seriesImportName + \" } from 'echarts/charts';\\necharts.use([\" + seriesImportName + \"]);\");\n } else {\n error(\"Unknown series \" + subType);\n }\n }\n }\n return;\n }\n // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception.\n if (mainType === 'tooltip') {\n if (tooltipExists) {\n if (process.env.NODE_ENV !== 'production') {\n if (!tooltipWarningLogged) {\n warn('Currently only one tooltip component is allowed.');\n tooltipWarningLogged = true;\n }\n }\n return;\n }\n tooltipExists = true;\n }\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name;\n // componentModel.settingTask && componentModel.settingTask.dirty();\n componentModel.mergeOption(newCmptOption, this);\n componentModel.optionUpdated(newCmptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt);\n // Assign `keyInfo`\n extend(componentModel, extraOpt);\n if (resultItem.brandNew) {\n componentModel.__requireNewView = true;\n }\n componentModel.init(newCmptOption, this, this);\n // Call optionUpdated after init.\n // newCmptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n componentModel.optionUpdated(null, true);\n }\n }\n if (componentModel) {\n optionsByMainType.push(componentModel.option);\n cmptsByMainType.push(componentModel);\n cmptsCountByMainType++;\n } else {\n // Always do assign to avoid elided item in array.\n optionsByMainType.push(void 0);\n cmptsByMainType.push(void 0);\n }\n }, this);\n option[mainType] = optionsByMainType;\n componentsMap.set(mainType, cmptsByMainType);\n componentsCount.set(mainType, cmptsCountByMainType);\n // Backup series for filtering.\n if (mainType === 'series') {\n reCreateSeriesIndices(this);\n }\n }\n // If no series declared, ensure `_seriesIndices` initialized.\n if (!this._seriesIndices) {\n reCreateSeriesIndices(this);\n }\n };\n /**\r\n * Get option for output (cloned option and inner info removed)\r\n */\n GlobalModel.prototype.getOption = function () {\n var option = clone(this.option);\n each(option, function (optInMainType, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(optInMainType);\n // Inner cmpts need to be removed.\n // Inner cmpts might not be at last since ec5.0, but still\n // compatible for users: if inner cmpt at last, splice the returned array.\n var realLen = opts.length;\n var metNonInner = false;\n for (var i = realLen - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (opts[i] && !modelUtil.isComponentIdInternal(opts[i])) {\n metNonInner = true;\n } else {\n opts[i] = null;\n !metNonInner && realLen--;\n }\n }\n opts.length = realLen;\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n };\n GlobalModel.prototype.getTheme = function () {\n return this._theme;\n };\n GlobalModel.prototype.getLocaleModel = function () {\n return this._locale;\n };\n GlobalModel.prototype.setUpdatePayload = function (payload) {\n this._payload = payload;\n };\n GlobalModel.prototype.getUpdatePayload = function () {\n return this._payload;\n };\n /**\r\n * @param idx If not specified, return the first one.\r\n */\n GlobalModel.prototype.getComponent = function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n if (list) {\n var cmpt = list[idx || 0];\n if (cmpt) {\n return cmpt;\n } else if (idx == null) {\n for (var i = 0; i < list.length; i++) {\n if (list[i]) {\n return list[i];\n }\n }\n }\n }\n };\n /**\r\n * @return Never be null/undefined.\r\n */\n GlobalModel.prototype.queryComponents = function (condition) {\n var mainType = condition.mainType;\n if (!mainType) {\n return [];\n }\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n var cmpts = this._componentsMap.get(mainType);\n if (!cmpts || !cmpts.length) {\n return [];\n }\n var result;\n if (index != null) {\n result = [];\n each(modelUtil.normalizeToArray(index), function (idx) {\n cmpts[idx] && result.push(cmpts[idx]);\n });\n } else if (id != null) {\n result = queryByIdOrName('id', id, cmpts);\n } else if (name != null) {\n result = queryByIdOrName('name', name, cmpts);\n } else {\n // Return all non-empty components in that mainType\n result = filter(cmpts, function (cmpt) {\n return !!cmpt;\n });\n }\n return filterBySubType(result, condition);\n };\n /**\r\n * The interface is different from queryComponents,\r\n * which is convenient for inner usage.\r\n *\r\n * @usage\r\n * let result = findComponents(\r\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\r\n * );\r\n * let result = findComponents(\r\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\r\n * );\r\n * let result = findComponents(\r\n * {mainType: 'series',\r\n * filter: function (model, index) {...}}\r\n * );\r\n * // result like [component0, componnet1, ...]\r\n */\n GlobalModel.prototype.findComponents = function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond)\n // Retrieve all non-empty components.\n : filter(this._componentsMap.get(mainType), function (cmpt) {\n return !!cmpt;\n });\n return doFilter(filterBySubType(result, condition));\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n };\n GlobalModel.prototype.eachComponent = function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n if (isFunction(mainType)) {\n var ctxForAll_1 = cb;\n var cbForAll_1 = mainType;\n componentsMap.each(function (cmpts, componentType) {\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex);\n }\n });\n } else {\n var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null;\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cb.call(context, cmpt, cmpt.componentIndex);\n }\n }\n };\n /**\r\n * Get series list before filtered by name.\r\n */\n GlobalModel.prototype.getSeriesByName = function (name) {\n var nameStr = modelUtil.convertOptionIdName(name, null);\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && nameStr != null && oneSeries.name === nameStr;\n });\n };\n /**\r\n * Get series list before filtered by index.\r\n */\n GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n };\n /**\r\n * Get series list before filtered by type.\r\n * FIXME: rename to getRawSeriesByType?\r\n */\n GlobalModel.prototype.getSeriesByType = function (subType) {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && oneSeries.subType === subType;\n });\n };\n /**\r\n * Get all series before filtered.\r\n */\n GlobalModel.prototype.getSeries = function () {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries;\n });\n };\n /**\r\n * Count series before filtered.\r\n */\n GlobalModel.prototype.getSeriesCount = function () {\n return this._componentsCount.get('series');\n };\n /**\r\n * After filtering, series may be different\r\n * from raw series.\r\n */\n GlobalModel.prototype.eachSeries = function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n cb.call(context, series, rawSeriesIndex);\n }, this);\n };\n /**\r\n * Iterate raw series before filtered.\r\n *\r\n * @param {Function} cb\r\n * @param {*} context\r\n */\n GlobalModel.prototype.eachRawSeries = function (cb, context) {\n each(this._componentsMap.get('series'), function (series) {\n series && cb.call(context, series, series.componentIndex);\n });\n };\n /**\r\n * After filtering, series may be different.\r\n * from raw series.\r\n */\n GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n };\n /**\r\n * Iterate raw series before filtered of given type.\r\n */\n GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n };\n GlobalModel.prototype.isSeriesFiltered = function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n };\n GlobalModel.prototype.getCurrentSeriesIndices = function () {\n return (this._seriesIndices || []).slice();\n };\n GlobalModel.prototype.filterSeries = function (cb, context) {\n assertSeriesInitialized(this);\n var newSeriesIndices = [];\n each(this._seriesIndices, function (seriesRawIdx) {\n var series = this._componentsMap.get('series')[seriesRawIdx];\n cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx);\n }, this);\n this._seriesIndices = newSeriesIndices;\n this._seriesIndicesMap = createHashMap(newSeriesIndices);\n };\n GlobalModel.prototype.restoreData = function (payload) {\n reCreateSeriesIndices(this);\n var componentsMap = this._componentsMap;\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n if (ComponentModel.hasClass(componentType)) {\n componentTypes.push(componentType);\n }\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) {\n each(componentsMap.get(componentType), function (component) {\n if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) {\n component.restoreData();\n }\n });\n });\n };\n GlobalModel.internalField = function () {\n reCreateSeriesIndices = function (ecModel) {\n var seriesIndices = ecModel._seriesIndices = [];\n each(ecModel._componentsMap.get('series'), function (series) {\n // series may have been removed by `replaceMerge`.\n series && seriesIndices.push(series.componentIndex);\n });\n ecModel._seriesIndicesMap = createHashMap(seriesIndices);\n };\n assertSeriesInitialized = function (ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (process.env.NODE_ENV !== 'production') {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n };\n initBase = function (ecModel, baseOption) {\n // Using OPTION_INNER_KEY to mark that this option cannot be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbidden.\n ecModel.option = {};\n ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE;\n // Init with series: [], in case of calling findSeries method\n // before series initialized.\n ecModel._componentsMap = createHashMap({\n series: []\n });\n ecModel._componentsCount = createHashMap();\n // If user spefied `option.aria`, aria will be enable. This detection should be\n // performed before theme and globalDefault merge.\n var airaOption = baseOption.aria;\n if (isObject(airaOption) && airaOption.enabled == null) {\n airaOption.enabled = true;\n }\n mergeTheme(baseOption, ecModel._theme.option);\n // TODO Needs clone when merging to the unexisted property\n merge(baseOption, globalDefault, false);\n ecModel._mergeOption(baseOption, null);\n };\n }();\n return GlobalModel;\n}(Model);\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seriesIndex;\n var id = payload.seriesId;\n var name_1 = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1;\n }\n}\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n }\n // If it is component model mainType, the model handles that merge later.\n // otherwise, merge them here.\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\nfunction queryByIdOrName(attr, idOrName, cmpts) {\n // Here is a break from echarts4: string and number are\n // treated as equal.\n if (isArray(idOrName)) {\n var keyMap_1 = createHashMap();\n each(idOrName, function (idOrNameItem) {\n if (idOrNameItem != null) {\n var idName = modelUtil.convertOptionIdName(idOrNameItem, null);\n idName != null && keyMap_1.set(idOrNameItem, true);\n }\n });\n return filter(cmpts, function (cmpt) {\n return cmpt && keyMap_1.get(cmpt[attr]);\n });\n } else {\n var idName_1 = modelUtil.convertOptionIdName(idOrName, null);\n return filter(cmpts, function (cmpt) {\n return cmpt && idName_1 != null && cmpt[attr] === idName_1;\n });\n }\n}\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) {\n return cmpt && cmpt.subType === condition.subType;\n }) : components;\n}\nfunction normalizeSetOptionInput(opts) {\n var replaceMergeMainTypeMap = createHashMap();\n opts && each(modelUtil.normalizeToArray(opts.replaceMerge), function (mainType) {\n if (process.env.NODE_ENV !== 'production') {\n assert(ComponentModel.hasClass(mainType), '\"' + mainType + '\" is not valid component main type in \"replaceMerge\"');\n }\n replaceMergeMainTypeMap.set(mainType, true);\n });\n return {\n replaceMergeMainTypeMap: replaceMergeMainTypeMap\n };\n}\nmixin(GlobalModel, PaletteMixin);\nexport default GlobalModel;"],"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,SAAS,QAAQ,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EA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