{"version":3,"sources":["webpack:///./node_modules/echarts/lib/chart/helper/sectorHelper.js","webpack:///./node_modules/echarts/lib/component/legend/LegendModel.js","webpack:///./node_modules/echarts/lib/component/helper/listComponent.js","webpack:///./node_modules/echarts/lib/component/legend/LegendView.js","webpack:///./node_modules/echarts/lib/component/legend/legendFilter.js","webpack:///./node_modules/echarts/lib/component/legend/legendAction.js","webpack:///./node_modules/echarts/lib/component/legend/installLegendPlain.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack:///./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack:///./node_modules/echarts/lib/component/legend/installLegendScroll.js","webpack:///./node_modules/echarts/lib/component/legend/install.js"],"names":["getSectorCornerRadius","model","shape","zeroIfNull","cornerRadius","get","dr","Math","abs","r","r0","cr","getDefaultSelectorOptions","ecModel","type","title","getLocaleModel","_super","LegendModel","_this","apply","this","arguments","layoutMode","ignoreSize","prototype","init","option","parentModel","mergeDefaultAndTheme","selected","_updateSelector","mergeOption","call","selector","item","index","optionUpdated","_updateData","legendData","_data","hasSelected","i","length","name_1","isSelected","select","potentialData","availableNames","eachRawSeries","seriesModel","isPotential","seriesName","name","push","legendVisualProvider","provider","names","getAllNames","isSeriesFiltered","concat","_availableNames","rawData","legendNameMap","dataItem","set","Model","getData","selectedMode","data","unSelect","toggleSelected","hasOwnProperty","allSelect","inverseSelect","getOrient","dependencies","defaultOption","z","show","orient","left","top","align","backgroundColor","borderColor","borderRadius","borderWidth","padding","itemGap","itemWidth","itemHeight","symbolRotate","symbolKeepAspect","inactiveColor","inactiveBorderColor","inactiveBorderWidth","itemStyle","color","opacity","borderCap","borderJoin","borderDashOffset","borderMiterLimit","lineStyle","width","inactiveWidth","cap","join","dashOffset","miterLimit","textStyle","selectorLabel","fontSize","fontFamily","emphasis","selectorPosition","selectorItemGap","selectorButtonGap","tooltip","Component","makeBackground","rect","componentModel","format","style","getItemStyle","fill","x","y","height","silent","z2","curry","each","LegendView","newlineDisabled","group","add","_contentGroup","_selectorGroup","_isFirstRender","getContentGroup","getSelectorGroup","render","legendModel","api","isFirstRender","resetInner","itemAlign","renderInner","positionInfo","getBoxLayoutParams","viewportSize","getWidth","getHeight","maxSize","layout","mainRect","layoutInner","layoutRect","markRedraw","_backgroundEl","removeAll","remove","contentGroup","legendDrawnMap","selectMode","excludeSeriesId","id","legendItemModel","dataIndex","g","newline","getSeriesByName","lineVisualStyle","getVisual","legendIcon","itemGroup","_createItem","on","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","ssr","eachChild","child","ecData","seriesIndex","ssrType","containName","idx","indexOfName","getItemVisual","colorArr","_createSelector","selectorGroup","selectorItem","labelText","verticalAlign","onclick","dispatchAction","labelModel","getModel","emphasisLabelModel","normal","defaultText","itemVisualStyle","drawType","visualDrawType","iconRotate","legendIconType","getLegendStyle","textStyleModel","getLegendIcon","rotate","getDefaultLegendIcon","icon","textX","textAlign","formatter","content","replace","textColor","getTextColor","text","inheritColor","hitRect","getBoundingRect","tooltipModel","graphic","el","itemName","itemTooltipOption","__legendDataIndex","contentRect","contentPos","selectorRect","selectorPos","orientIdx","wh","hw","yx","max","min","iconType","handleCommonProps","visualStyle","lineWidth","propVal","propName","itemStyleModel","iconBrushType","lastIndexOf","decalStyle","getShallow","decal","stroke","legendLineModel","getLineStyle","visualHasBorder","opt","symboType","setStyle","rotation","PI","setOrigin","indexOf","dataName","isUseHoverLayer","emphasisState","list","getZr","storage","getDisplayList","len","states","hoverLayer","legendFilter","legendModels","findComponents","mainType","filterSeries","series","legendSelectActionHandler","methodName","payload","selectedMap","isToggleSelect","eachComponent","isItemSelected","installLegendAction","registers","registerAction","install","registerComponentModel","registerComponentView","registerProcessor","PRIORITY","PROCESSOR","SERIES_FILTER","registerSubTypeDefaulter","ScrollableLegendModel","setScrollDataIndex","scrollDataIndex","inputPositionParams","mergeAndNormalizeLayoutParams","pageButtonItemGap","pageButtonGap","pageButtonPosition","pageFormatter","pageIcons","horizontal","vertical","pageIconColor","pageIconInactiveColor","pageIconSize","pageTextStyle","animationDurationUpdate","target","raw","WH","XY","ScrollableLegendView","_currentIndex","_containerGroup","_controllerGroup","removeClipPath","__rectSize","self","controllerGroup","pageIconSizeArr","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","_pageGo","font","getFont","xy","processMaxSize","_layoutContentAndController","offset","containerGroup","controllerRect","showController","_showController","containerPos","controllerPos","setPosition","clipShape","setClipPath","attr","invisible","pageInfo","_getPageInfo","pageIndex","contentPosition","_updatePageInfoView","to","legendId","key","canJump","childOfName","cursor","pageText","current","total","pageCount","containerRectSize","targetItemIndex","_findTargetItemIndex","children","targetItem","itemCount","pCount","result","pagePrevDataIndex","pageNextDataIndex","targetItemInfo","getItemInfo","s","winStartItemInfo","winEndItemInfo","currItemInfo","e","intersect","itemRect","start","itemInfo","winStart","targetDataIndex","defaultIndex","legendDataIdx","installScrollableLegendAction","subType","query"],"mappings":"8KA6CO,SAASA,EAAsBC,EAAOC,EAAOC,GAClD,IAAIC,EAAeH,EAAMI,IAAI,gBAC7B,GAAoB,MAAhBD,EACF,OAAOD,EAAa,CAClBC,aAAc,GACZ,KAED,eAAQA,KACXA,EAAe,CAACA,EAAcA,EAAcA,EAAcA,IAE5D,IAAIE,EAAKC,KAAKC,IAAIN,EAAMO,GAAK,EAAIP,EAAMQ,IAAM,GAC7C,MAAO,CACLN,aAAc,eAAIA,GAAc,SAAUO,GACxC,OAAO,eAAaA,EAAIL,S,gJCV1BM,EAA4B,SAAUC,EAASC,GACjD,MAAa,QAATA,EACK,CACLA,KAAM,MACNC,MAAOF,EAAQG,iBAAiBX,IAAI,CAAC,SAAU,WAAY,SAE3C,YAATS,EACF,CACLA,KAAM,UACNC,MAAOF,EAAQG,iBAAiBX,IAAI,CAAC,SAAU,WAAY,kBAHxD,GAOL,EAA2B,SAAUY,GAEvC,SAASC,IACP,IAAIC,EAAmB,OAAXF,GAAmBA,EAAOG,M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E,EAErB,OAAOR,EACP,SAASI,EAAYrJ,GACnB,GAAIA,EAAI,CACN,IAAI4J,EAAW5J,EAAGH,kBACdgK,EAAQD,EAAShD,GAAM5G,EAAG4G,GAC9B,MAAO,CACL0C,EAAGO,EACHH,EAAGG,EAAQD,EAASnJ,GACpBtM,EAAG6L,EAAGG,oBAIZ,SAASwJ,EAAUG,EAAUC,GAC3B,OAAOD,EAASJ,GAAKK,GAAYD,EAASR,GAAKS,EAAWrB,IAG9D9C,EAAqB1S,UAAU0V,qBAAuB,SAAUoB,GAC9D,IAAKlX,KAAKqU,gBACR,OAAO,EAET,IAAItT,EAEAoW,EADAnO,EAAehJ,KAAKyH,kBAgBxB,OAdAuB,EAAaoB,WAAU,SAAUC,EAAOK,GACtC,IAAI0M,EAAgB/M,EAAMgD,kBAMN,MAAhB8J,GAAyC,MAAjBC,IAC1BD,EAAezM,GAEb0M,IAAkBF,IACpBnW,EAAQ2J,MAGI,MAAT3J,EAAgBA,EAAQoW,GAEjCrE,EAAqBrT,KAAO,gBACrBqT,EAxV+B,CAyVtC,GACa,ICrWA,SAASuE,EAA8BtG,GAOpDA,EAAUC,eAAe,eAAgB,gBAAgB,SAAUP,EAASjR,GAC1E,IAAImS,EAAkBlB,EAAQkB,gBACX,MAAnBA,GAA2BnS,EAAQoR,cAAc,CAC/CR,SAAU,SACVkH,QAAS,SACTC,MAAO9G,IACN,SAAU7I,GACXA,EAAY8J,mBAAmBC,SCT9B,SAAS,EAAQZ,GACtB,eAAIE,GACJF,EAAUG,uBAAuB,GACjCH,EAAUI,sBAAsB,GAChCkG,EAA8BtG,GCNzB,SAAS,EAAQA,GACtB,eAAIE,GACJ,eAAI","file":"js/chunk-481bc1ba.25021936.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/*\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 { isArray, map } from 'zrender/lib/core/util.js';\nimport { parsePercent } from 'zrender/lib/contain/text.js';\nexport function getSectorCornerRadius(model, shape, zeroIfNull) {\n var cornerRadius = model.get('borderRadius');\n if (cornerRadius == null) {\n return zeroIfNull ? {\n cornerRadius: 0\n } : null;\n }\n if (!isArray(cornerRadius)) {\n cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius];\n }\n var dr = Math.abs(shape.r || 0 - shape.r0 || 0);\n return {\n cornerRadius: map(cornerRadius, function (cr) {\n return parsePercent(cr, dr);\n })\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*/\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 { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from '../../model/Model.js';\nimport { isNameSpecified } from '../../util/model.js';\nimport ComponentModel from '../../model/Component.js';\nvar getDefaultSelectorOptions = function (ecModel, type) {\n if (type === 'all') {\n return {\n type: 'all',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'all'])\n };\n } else if (type === 'inverse') {\n return {\n type: 'inverse',\n title: ecModel.getLocaleModel().get(['legend', 'selector', 'inverse'])\n };\n }\n};\nvar LegendModel = /** @class */function (_super) {\n __extends(LegendModel, _super);\n function LegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendModel.type;\n _this.layoutMode = {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas real width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n };\n return _this;\n }\n LegendModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n this._updateSelector(option);\n };\n LegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n this._updateSelector(option);\n };\n LegendModel.prototype._updateSelector = function (option) {\n var selector = option.selector;\n var ecModel = this.ecModel;\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, getDefaultSelectorOptions(ecModel, item.type));\n });\n }\n };\n LegendModel.prototype.optionUpdated = function () {\n this._updateData(this.ecModel);\n var legendData = this._data;\n // If selectedMode is single, try to select one\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false;\n // If has any selected in option.selected\n for (var i = 0; i < legendData.length; i++) {\n var name_1 = legendData[i].get('name');\n if (this.isSelected(name_1)) {\n // Force to unselect others\n this.select(name_1);\n hasSelected = true;\n break;\n }\n }\n // Try select the first if selectedMode is single\n !hasSelected && this.select(legendData[0].get('name'));\n }\n };\n LegendModel.prototype._updateData = function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n this._availableNames = availableNames;\n // If legend.data is not specified in option, use availableNames as data,\n // which is convenient for user preparing option.\n var rawData = this.get('data') || potentialData;\n var legendNameMap = zrUtil.createHashMap();\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (zrUtil.isString(dataItem) || zrUtil.isNumber(dataItem)) {\n dataItem = {\n name: dataItem\n };\n }\n if (legendNameMap.get(dataItem.name)) {\n // remove legend name duplicate\n return null;\n }\n legendNameMap.set(dataItem.name, true);\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n this._data = zrUtil.filter(legendData, function (item) {\n return !!item;\n });\n };\n LegendModel.prototype.getData = function () {\n return this._data;\n };\n LegendModel.prototype.select = function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n selected[name] = true;\n };\n LegendModel.prototype.unSelect = function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n };\n LegendModel.prototype.toggleSelected = function (name) {\n var selected = this.option.selected;\n // Default is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n this[selected[name] ? 'unSelect' : 'select'](name);\n };\n LegendModel.prototype.allSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n };\n LegendModel.prototype.inverseSelect = function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true);\n // Initially, default value is true\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n selected[name] = !selected[name];\n });\n };\n LegendModel.prototype.isSelected = function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n };\n LegendModel.prototype.getOrient = function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n };\n LegendModel.type = 'legend.plain';\n LegendModel.dependencies = ['series'];\n LegendModel.defaultOption = {\n // zlevel: 0,\n z: 4,\n show: true,\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemGap: 10,\n itemWidth: 25,\n itemHeight: 14,\n symbolRotate: 'inherit',\n symbolKeepAspect: true,\n inactiveColor: '#ccc',\n inactiveBorderColor: '#ccc',\n inactiveBorderWidth: 'auto',\n itemStyle: {\n color: 'inherit',\n opacity: 'inherit',\n borderColor: 'inherit',\n borderWidth: 'auto',\n borderCap: 'inherit',\n borderJoin: 'inherit',\n borderDashOffset: 'inherit',\n borderMiterLimit: 'inherit'\n },\n lineStyle: {\n width: 'auto',\n color: 'inherit',\n inactiveColor: '#ccc',\n inactiveWidth: 2,\n opacity: 'inherit',\n type: 'inherit',\n cap: 'inherit',\n join: 'inherit',\n dashOffset: 'inherit',\n miterLimit: 'inherit'\n },\n textStyle: {\n color: '#333'\n },\n selectedMode: true,\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: 'sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n tooltip: {\n show: false\n }\n };\n return LegendModel;\n}(ComponentModel);\nexport default LegendModel;","\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*/\n// @ts-nocheck\nimport { getLayoutRect, box as layoutBox, positionElement } from '../../util/layout.js';\nimport * as formatUtil from '../../util/format.js';\nimport * as graphic from '../../util/graphic.js';\n/**\n * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\nexport function layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\nexport function makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n });\n // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n return rect;\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/**\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 { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\n * @protected\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\n * @protected\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\n * @override\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\n * `data.getVisual('style')` may be the color from the register\n * in series. For example, for line series,\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\n * @protected\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\n * Use series style if is inherit;\n * elsewise, use legend style\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\n * Series with visualDrawType as 'stroke' should have\n * series stroke as legend fill\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\n * icon type with \"emptyXXX\" should use fill color\n * in visual style\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\n * Use lineStyle.opacity if drawType is stroke\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\n * Since stroke is set to be inactiveBorderColor, it may occur that\n * there is no border in series but border in legend, so we need to\n * use border only when series has border if is set to be auto\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","\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*/\nexport default function legendFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n return true;\n });\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*/\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*/\n// @ts-nocheck\nimport { curry, each } from 'zrender/lib/core/util.js';\nfunction legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected;\n // Update all legend components\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n var legendData = legendModel.getData();\n each(legendData, function (model) {\n var name = model.get('name');\n // Wrap element\n if (name === '\\n' || name === '') {\n return;\n }\n var isItemSelected = legendModel.isSelected(name);\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n });\n // Return the event explicitly\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\nexport function installLegendAction(registers) {\n /**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected'));\n registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect'));\n registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect'));\n /**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select'));\n /**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect'));\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/**\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 LegendModel from './LegendModel.js';\nimport LegendView from './LegendView.js';\nimport legendFilter from './legendFilter.js';\nimport { installLegendAction } from './legendAction.js';\nexport function install(registers) {\n registers.registerComponentModel(LegendModel);\n registers.registerComponentView(LegendView);\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\n registers.registerSubTypeDefaulter('legend', function () {\n return 'plain';\n });\n installLegendAction(registers);\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/**\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 { __extends } from \"tslib\";\nimport LegendModel from './LegendModel.js';\nimport { mergeLayoutParam, getLayoutParams } from '../../util/layout.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar ScrollableLegendModel = /** @class */function (_super) {\n __extends(ScrollableLegendModel, _super);\n function ScrollableLegendModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendModel.type;\n return _this;\n }\n /**\n * @param {number} scrollDataIndex\n */\n ScrollableLegendModel.prototype.setScrollDataIndex = function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n };\n ScrollableLegendModel.prototype.init = function (option, parentModel, ecModel) {\n var inputPositionParams = getLayoutParams(option);\n _super.prototype.init.call(this, option, parentModel, ecModel);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n };\n /**\n * @override\n */\n ScrollableLegendModel.prototype.mergeOption = function (option, ecModel) {\n _super.prototype.mergeOption.call(this, option, ecModel);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n };\n ScrollableLegendModel.type = 'legend.scroll';\n ScrollableLegendModel.defaultOption = inheritDefaultOption(LegendModel.defaultOption, {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n pageFormatter: '{current}/{total}',\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n });\n return ScrollableLegendModel;\n}(LegendModel);\n;\n// Do not `ignoreSize` to enable setting {left: 10, right: 10}.\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: !!ignoreSize\n });\n}\nexport default ScrollableLegendModel;","\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 { __extends } from \"tslib\";\n/**\n * Separate legend and scrollable legend to reduce package size.\n */\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport LegendView from './LegendView.js';\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = /** @class */function (_super) {\n __extends(ScrollableLegendView, _super);\n function ScrollableLegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = ScrollableLegendView.type;\n _this.newlineDisabled = true;\n _this._currentIndex = 0;\n return _this;\n }\n ScrollableLegendView.prototype.init = function () {\n _super.prototype.init.call(this);\n this.group.add(this._containerGroup = new Group());\n this._containerGroup.add(this.getContentGroup());\n this.group.add(this._controllerGroup = new Group());\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.resetInner = function () {\n _super.prototype.resetInner.call(this);\n this._controllerGroup.removeAll();\n this._containerGroup.removeClipPath();\n this._containerGroup.__rectSize = null;\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var self = this;\n // Render content items.\n _super.prototype.renderInner.call(this, itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup;\n // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n var pageIconSize = legendModel.get('pageIconSize', true);\n var pageIconSizeArr = zrUtil.isArray(pageIconSize) ? pageIconSize : [pageIconSize, pageIconSize];\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n // Placeholder to calculate a proper layout.\n text: 'xx/xx',\n fill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n verticalAlign: 'middle',\n align: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(self._pageGo, self, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSizeArr[0] / 2,\n y: -pageIconSizeArr[1] / 2,\n width: pageIconSizeArr[0],\n height: pageIconSizeArr[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n };\n /**\n * @override\n */\n ScrollableLegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx, xy);\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n selectorGroup.markRedraw();\n }\n return mainRect;\n };\n ScrollableLegendView.prototype._layoutContentAndController = function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx, xy) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup;\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box(\n // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n // In case that the inner elements of contentGroup layout do not based on [0, 0]\n var contentPos = [-contentRect.x, -contentRect.y];\n // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup[xy];\n }\n // Layout container group based on 0.\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true));\n // Place containerGroup and controllerGroup and contentGroup.\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true);\n // controller is on the right / bottom.\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n }\n // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n }\n // Always align controller to content as 'middle'.\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.setPosition(contentPos);\n containerGroup.setPosition(containerPos);\n controllerGroup.setPosition(controllerPos);\n // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n var mainRect = {\n x: 0,\n y: 0\n };\n // Consider content may be overflow (should be clipped).\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]);\n // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n }));\n // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n }\n // Content translate animation.\n var pageInfo = this._getPageInfo(legendModel);\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n x: pageInfo.contentPosition[0],\n y: pageInfo.contentPosition[1]\n },\n // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : null);\n this._updatePageInfoView(legendModel, pageInfo);\n return mainRect;\n };\n ScrollableLegendView.prototype._pageGo = function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n };\n ScrollableLegendView.prototype._updatePageInfoView = function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var key = name + 'DataIndex';\n var canJump = pageInfo[key] != null;\n var icon = controllerGroup.childOfName(name);\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current == null ? '' : current + '').replace('{total}', total == null ? '' : total + '') : pageFormatter({\n current: current,\n total: total\n }));\n };\n /**\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n ScrollableLegendView.prototype._getPageInfo = function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: [contentGroup.x, contentGroup.y],\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n if (!targetItem) {\n return result;\n }\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s;\n // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize\n // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n || currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n }\n }\n winEndItemInfo = currItemInfo;\n }\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n if (\n // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)\n // e.g., when page size is smaller than item size.\n ) && winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n ++result.pageCount;\n ++result.pageIndex;\n }\n winStartItemInfo = currItemInfo;\n }\n return result;\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el[xy];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n };\n ScrollableLegendView.prototype._findTargetItemIndex = function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex;\n // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n };\n ScrollableLegendView.type = 'legend.scroll';\n return ScrollableLegendView;\n}(LegendView);\nexport default ScrollableLegendView;","\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*/\nexport default function installScrollableLegendAction(registers) {\n /**\n * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\n registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\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*/\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 { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport ScrollableLegendModel from './ScrollableLegendModel.js';\nimport ScrollableLegendView from './ScrollableLegendView.js';\nimport installScrollableLegendAction from './scrollableLegendAction.js';\nexport function install(registers) {\n use(installLegendPlain);\n registers.registerComponentModel(ScrollableLegendModel);\n registers.registerComponentView(ScrollableLegendView);\n installScrollableLegendAction(registers);\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/**\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 { use } from '../../extension.js';\nimport { install as installLegendPlain } from './installLegendPlain.js';\nimport { install as installLegendScroll } from './installLegendScroll.js';\nexport function install(registers) {\n use(installLegendPlain);\n use(installLegendScroll);\n}"],"sourceRoot":""}