269658f3e09b0c9d3ea3699dee2f4cdc312e01f1609add1c81bae9bd28485d80.json 100 KB

1
  1. {"ast":null,"code":"import \"core-js/modules/es.array.push.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\";\nimport { bind, each, indexOf, curry, extend, normalizeCssArray, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isHighDownDispatcher, setAsHighDownDispatcher, setDefaultStateProxy, enableHoverFocus, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as helper from '../helper/treeHelper.js';\nimport Breadcrumb from './Breadcrumb.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as animationUtil from '../../util/animation.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport ChartView from '../../view/Chart.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner, convertOptionIdName } from '../../util/model.js';\nimport { windowOpen } from '../../util/format.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = 'label';\nvar PATH_UPPERLABEL_NORMAL = 'upperLabel';\n// Should larger than emphasis states lift z\nvar Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2.\nvar Z2_BG = Z2_EMPHASIS_LIFT * 2;\nvar Z2_CONTENT = Z2_EMPHASIS_LIFT * 3;\nvar getStateItemStyle = makeStyleMapper([['fill', 'color'],\n// `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n]);\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getStateItemStyle(model);\n // Clear styles set by emphasis.\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\nvar inner = makeInner();\nvar TreemapView = /** @class */function (_super) {\n __extends(TreemapView, _super);\n function TreemapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapView.type;\n _this._state = 'ready';\n _this._storage = createStorage();\n return _this;\n }\n /**\r\n * @override\r\n */\n TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n if (indexOf(models, seriesModel) < 0) {\n return;\n }\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage;\n // Mark new root when action is treemapRootToNode.\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n var containerGroup = this._giveContainerGroup(layoutInfo);\n var hasAnimation = seriesModel.get('animation');\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n hasAnimation && !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n this._resetController(api);\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n };\n TreemapView.prototype._giveContainerGroup = function (layoutInfo) {\n var containerGroup = this._containerGroup;\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n this._initEvents(containerGroup);\n this.group.add(containerGroup);\n }\n containerGroup.x = layoutInfo.x;\n containerGroup.y = layoutInfo.y;\n return containerGroup;\n };\n TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree;\n // Clear last shape records.\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n function doRenderNode(thisNode, oldNode, parentGroup, depth) {\n return renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth);\n }\n // Notice: When thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we cannot find all of the old graphic\n // elements from tree. So we use this strategy: make element storage, move\n // from old storage to new storage, clear old storage.\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0);\n // Process all removing.\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n if (this._controllerHost) {\n var _oldRootLayout = this.seriesModel.layoutInfo;\n var rootLayout = thisTree.root.getLayout();\n if (rootLayout.width === _oldRootLayout.width && rootLayout.height === _oldRootLayout.height) {\n this._controllerHost.zoom = 1;\n }\n }\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n }\n // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute();\n }\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), inner(el).willDelete = true);\n });\n });\n return willDeleteEls;\n }\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true;\n // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n el.dirty();\n });\n }\n };\n TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) {\n var durationOption = seriesModel.get('animationDurationUpdate');\n var easingOption = seriesModel.get('animationEasing');\n // TODO: do not support function until necessary.\n var duration = (isFunction(durationOption) ? 0 : durationOption) || 0;\n var easing = (isFunction(easingOption) ? null : easingOption) || 'cubicOut';\n var animationWrap = animationUtil.createWrap();\n // Make delete animations.\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n var target;\n var innerStore = inner(parent);\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup\n // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: innerStore.nodeWidth,\n height: innerStore.nodeHeight\n },\n style: {\n opacity: 0\n }\n }\n // Others.\n : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n if (!innerStore.willDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = innerStore.nodeWidth / 2;\n targetY = innerStore.nodeHeight / 2;\n }\n target = storageName === 'nodeGroup' ? {\n x: targetX,\n y: targetY,\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n // TODO: do not support delay until necessary.\n target && animationWrap.add(el, target, duration, 0, easing);\n });\n });\n // Make other animations\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n if (!last) {\n return;\n }\n if (el instanceof graphic.Group) {\n if (last.oldX != null) {\n target.x = el.x;\n target.y = el.y;\n el.x = last.oldX;\n el.y = last.oldY;\n }\n } else {\n if (last.oldShape) {\n target.shape = extend({}, el.shape);\n el.setShape(last.oldShape);\n }\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n }\n // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n animationWrap.add(el, target, duration, 0, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.finished(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n };\n TreemapView.prototype._resetController = function (api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n if (!controllerHost) {\n this._controllerHost = {\n target: this.group\n };\n controllerHost = this._controllerHost;\n }\n // Init controller.\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controllerHost.zoomLimit = this.seriesModel.get('scaleLimit');\n controllerHost.zoom = this.seriesModel.get('zoom');\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n };\n TreemapView.prototype._clearController = function () {\n var controller = this._controller;\n this._controllerHost = null;\n if (controller) {\n controller.dispose();\n controller = null;\n }\n };\n TreemapView.prototype._onPan = function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n };\n TreemapView.prototype._onZoom = function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n var zoomDelta = e.scale;\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n // scaleLimit\n var zoomLimit = null;\n var _controllerHost = this._controllerHost;\n zoomLimit = _controllerHost.zoomLimit;\n var newZoom = _controllerHost.zoom = _controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / _controllerHost.zoom;\n _controllerHost.zoom = newZoom;\n var layoutInfo = this.seriesModel.layoutInfo;\n // Transform mouse coord from global to containerGroup.\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y;\n // Scale root bounding rect.\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [zoomScale, zoomScale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n };\n TreemapView.prototype._initEvents = function (containerGroup) {\n var _this = this;\n containerGroup.on('click', function (e) {\n if (_this._state !== 'ready') {\n return;\n }\n var nodeClick = _this.seriesModel.get('nodeClick', true);\n if (!nodeClick) {\n return;\n }\n var targetInfo = _this.findTarget(e.offsetX, e.offsetY);\n if (!targetInfo) {\n return;\n }\n var node = targetInfo.node;\n if (node.getLayout().isLeafRoot) {\n _this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n _this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n };\n TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) {\n var _this = this;\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot()\n }\n // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) {\n if (_this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({\n node: node\n }) : _this._zoomToNode({\n node: node\n });\n }\n });\n };\n /**\r\n * @override\r\n */\n TreemapView.prototype.remove = function () {\n this._clearController();\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n };\n TreemapView.prototype.dispose = function () {\n this._clearController();\n };\n TreemapView.prototype._zoomToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n TreemapView.prototype._rootToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n /**\r\n * @public\r\n * @param {number} x Global coord x.\r\n * @param {number} y Global coord y.\r\n * @return {Object} info If not found, return undefined;\r\n * @return {number} info.node Target node.\r\n * @return {number} info.offsetX x refer to target node.\r\n * @return {number} info.offsetY y refer to target node.\r\n */\n TreemapView.prototype.findTarget = function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()];\n // If invisible, there might be no element.\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape;\n // For performance consideration, don't use 'getBoundingRect'.\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n };\n TreemapView.type = 'treemap';\n return TreemapView;\n}(ChartView);\n/**\r\n * @inner\r\n */\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\r\n * @inner\r\n * @return Return undefined means do not travel further.\r\n */\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n }\n // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData();\n var nodeModel = thisNode.getModel();\n // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n data.setItemGraphicEl(thisNode.dataIndex, null);\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = nodeModel.getModel('itemStyle');\n var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']);\n var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']);\n var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']);\n var borderRadius = itemStyleNormalModel.get('borderRadius') || 0;\n // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n var group = giveGraphic('nodeGroup', Group);\n if (!group) {\n return;\n }\n parentGroup.add(group);\n // x,y are not set when el is above view root.\n group.x = thisLayout.x || 0;\n group.y = thisLayout.y || 0;\n group.markRedraw();\n inner(group).nodeWidth = thisWidth;\n inner(group).nodeHeight = thisHeight;\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n // Background\n var bg = giveGraphic('background', Rect, depth, Z2_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);\n var emphasisModel = nodeModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var isDisabled = emphasisModel.get('disabled');\n var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus;\n // No children, render content.\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (isHighDownDispatcher(group)) {\n setAsHighDownDispatcher(group, false);\n }\n if (bg) {\n setAsHighDownDispatcher(bg, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n enableHoverFocus(bg, focusOrIndices, blurScope);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z2_CONTENT);\n content && renderContent(group, content);\n bg.disableMorphing = true;\n if (bg && isHighDownDispatcher(bg)) {\n setAsHighDownDispatcher(bg, false);\n }\n setAsHighDownDispatcher(group, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, group);\n var cursorStyle = nodeModel.getShallow('cursor');\n cursorStyle && content.attr('cursor', cursorStyle);\n enableHoverFocus(group, focusOrIndices, blurScope);\n }\n return group;\n // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n function renderBackground(group, bg, useUpperLabel) {\n var ecData = getECData(bg);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var style = thisNode.getVisual('style');\n var visualBorderColor = style.stroke;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor');\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n blurStyle.fill = itemStyleBlurModel.get('borderColor');\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n selectStyle.fill = itemStyleSelectModel.get('borderColor');\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(\n // PENDING: convert ZRColor to ColorString for text.\n bg, visualBorderColor, style.opacity, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n }\n // For old bg.\n else {\n bg.removeTextContent();\n }\n bg.setStyle(normalStyle);\n bg.ensureState('emphasis').style = emphasisStyle;\n bg.ensureState('blur').style = blurStyle;\n bg.ensureState('select').style = selectStyle;\n setDefaultStateProxy(bg);\n }\n group.add(bg);\n }\n function renderContent(group, content) {\n var ecData = getECData(content);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var nodeStyle = thisNode.getVisual('style');\n var visualColor = nodeStyle.fill;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n normalStyle.decal = nodeStyle.decal;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n // PENDING: convert ZRColor to ColorString for text.\n prepareText(content, visualColor, nodeStyle.opacity, null);\n content.setStyle(normalStyle);\n content.ensureState('emphasis').style = emphasisStyle;\n content.ensureState('blur').style = blurStyle;\n content.ensureState('select').style = selectStyle;\n setDefaultStateProxy(content);\n }\n group.add(content);\n }\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n function prepareText(rectEl, visualColor, visualOpacity,\n // Can be null/undefined\n upperLabelRect) {\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var defaultText = convertOptionIdName(nodeModel.get('name'), null);\n var isShow = normalLabelModel.getShallow('show');\n setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), {\n defaultText: isShow ? defaultText : null,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex\n });\n var textEl = rectEl.getTextContent();\n if (!textEl) {\n return;\n }\n var textStyle = textEl.style;\n var textPadding = normalizeCssArray(textStyle.padding || 0);\n if (upperLabelRect) {\n rectEl.setTextConfig({\n layoutRect: upperLabelRect\n });\n textEl.disableLabelLayout = true;\n }\n textEl.beforeUpdate = function () {\n var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0);\n var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0);\n if (textStyle.width !== width || textStyle.height !== height) {\n textEl.setStyle({\n width: width,\n height: height\n });\n }\n };\n textStyle.truncateMinChar = 2;\n textStyle.lineOverflow = 'truncate';\n addDrillDownIcon(textStyle, upperLabelRect, thisLayout);\n var textEmphasisState = textEl.getState('emphasis');\n addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout);\n }\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style ? style.text : null;\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element);\n }\n // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor();\n if (element instanceof Displayable) {\n element.z2 = calculateZ2(depth, z);\n }\n prepareAnimationWhenNoOld(lasts, element);\n }\n // Set to thisStorage\n return thisStorage[storageName][thisRawIndex] = element;\n }\n function prepareAnimationWhenHasOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n if (element instanceof Group) {\n lastCfg.oldX = element.x;\n lastCfg.oldY = element.y;\n } else {\n lastCfg.oldShape = extend({}, element.shape);\n }\n }\n // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n function prepareAnimationWhenNoOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n var isGroup = element instanceof graphic.Group;\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0;\n // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n if (!reRoot && parentOldBg && parentOldBg.oldShape) {\n parentOldX = parentOldBg.oldShape.width;\n parentOldY = parentOldBg.oldShape.height;\n }\n // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n if (isGroup) {\n lastCfg.oldX = 0;\n lastCfg.oldY = parentOldY;\n } else {\n lastCfg.oldShape = {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n }\n }\n // Fade in, user can be aware that these nodes are new.\n lastCfg.fadein = !isGroup;\n }\n}\n// We cannot set all background with the same z, because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause lower background elements to overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\nfunction calculateZ2(depth, z2InLevel) {\n return depth * Z2_BASE + z2InLevel;\n}\nexport default TreemapView;","map":{"version":3,"names":["__extends","bind","each","indexOf","curry","extend","normalizeCssArray","isFunction","graphic","getECData","isHighDownDispatcher","setAsHighDownDispatcher","setDefaultStateProxy","enableHoverFocus","Z2_EMPHASIS_LIFT","DataDiffer","helper","Breadcrumb","RoamController","BoundingRect","matrix","animationUtil","makeStyleMapper","ChartView","Displayable","makeInner","convertOptionIdName","windowOpen","setLabelStyle","getLabelStatesModels","Group","Rect","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_UPPERLABEL_NORMAL","Z2_BASE","Z2_BG","Z2_CONTENT","getStateItemStyle","getItemStyleNormal","model","itemStyle","stroke","fill","lineWidth","inner","TreemapView","_super","_this","apply","arguments","type","_state","_storage","createStorage","prototype","render","seriesModel","ecModel","api","payload","models","findComponents","mainType","subType","query","types","targetInfo","retrieveTargetInfo","payloadType","layoutInfo","isInit","_oldTree","thisStorage","reRoot","rootNodeGroup","nodeGroup","node","getRawIndex","direction","containerGroup","_giveContainerGroup","hasAnimation","get","renderResult","_doRender","_doAnimation","renderFinally","_resetController","_renderBreadcrumb","_containerGroup","_initEvents","group","add","x","y","thisTree","getData","tree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","doRenderNode","thisNode","oldNode","parentGroup","depth","renderNode","dualTravel","root","willDeleteEls","clearStorage","_controllerHost","_oldRootLayout","rootLayout","getLayout","width","height","zoom","thisViewChildren","oldViewChildren","sameTree","child","index","isRemoved","processNode","getKey","update","remove","execute","getId","newIndex","oldIndex","viewChildren","storage","store","storageName","delEls","el","push","willDelete","els","parent","invisible","dirty","durationOption","easingOption","duration","easing","animationWrap","createWrap","rawIndex","target","innerStore","shape","nodeWidth","nodeHeight","style","opacity","targetX","targetY","last","oldX","oldY","oldShape","setShape","fadein","setStyle","finished","start","controller","_controller","controllerHost","getZr","enable","zoomLimit","on","_onPan","_onZoom","rect","getWidth","getHeight","setPointerChecker","e","contain","_clearController","dispose","Math","abs","dx","dy","dispatchAction","from","uid","seriesId","id","rootRect","mouseX","originX","mouseY","originY","zoomDelta","scale","newZoom","zoomMin","min","zoomMax","max","Infinity","zoomScale","m","create","translate","applyTransform","nodeClick","findTarget","offsetX","offsetY","isLeafRoot","_rootToNode","_zoomToNode","itemModel","hostTree","data","getItemModel","dataIndex","link","linkTarget","getViewRoot","_breadcrumb","aboveViewRoot","removeAll","targetNode","viewRoot","eachNode","attr","order","bgEl","background","point","transformCoordToLocal","content","thisLayout","nodeModel","getModel","setItemGraphicEl","isInView","thisWidth","thisHeight","borderWidth","thisInvisible","thisRawIndex","oldRawIndex","upperHeight","isParent","length","itemStyleNormalModel","itemStyleEmphasisModel","itemStyleBlurModel","itemStyleSelectModel","borderRadius","giveGraphic","markRedraw","isAboveViewRoot","bg","renderBackground","upperLabelHeight","emphasisModel","focus","blurScope","isDisabled","focusOrIndices","getAncestorsIndices","getDescendantIndices","renderContent","disableMorphing","cursorStyle","getShallow","useUpperLabel","ecData","seriesIndex","r","processInvisible","getVisual","visualBorderColor","normalStyle","emphasisStyle","blurStyle","selectStyle","upperLabelWidth","prepareText","removeTextContent","ensureState","contentWidth","contentHeight","culling","nodeStyle","visualColor","decal","element","rectEl","visualOpacity","upperLabelRect","normalLabelModel","defaultText","isShow","inheritColor","defaultOpacity","labelFetcher","labelDataIndex","textEl","getTextContent","textStyle","textPadding","padding","setTextConfig","layoutRect","disableLabelLayout","beforeUpdate","truncateMinChar","lineOverflow","addDrillDownIcon","textEmphasisState","getState","text","iconChar","Ctor","z","lasts","prepareAnimationWhenHasOld","z2","calculateZ2","prepareAnimationWhenNoOld","lastCfg","parentNode","isGroup","parentOldX","parentOldY","parentOldBg","z2InLevel"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/chart/treemap/TreemapView.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\";\nimport { bind, each, indexOf, curry, extend, normalizeCssArray, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isHighDownDispatcher, setAsHighDownDispatcher, setDefaultStateProxy, enableHoverFocus, Z2_EMPHASIS_LIFT } from '../../util/states.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as helper from '../helper/treeHelper.js';\nimport Breadcrumb from './Breadcrumb.js';\nimport RoamController from '../../component/helper/RoamController.js';\nimport BoundingRect from 'zrender/lib/core/BoundingRect.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport * as animationUtil from '../../util/animation.js';\nimport makeStyleMapper from '../../model/mixin/makeStyleMapper.js';\nimport ChartView from '../../view/Chart.js';\nimport Displayable from 'zrender/lib/graphic/Displayable.js';\nimport { makeInner, convertOptionIdName } from '../../util/model.js';\nimport { windowOpen } from '../../util/format.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = 'label';\nvar PATH_UPPERLABEL_NORMAL = 'upperLabel';\n// Should larger than emphasis states lift z\nvar Z2_BASE = Z2_EMPHASIS_LIFT * 10; // Should bigger than every z2.\nvar Z2_BG = Z2_EMPHASIS_LIFT * 2;\nvar Z2_CONTENT = Z2_EMPHASIS_LIFT * 3;\nvar getStateItemStyle = makeStyleMapper([['fill', 'color'],\n// `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']\n// Option decal is in `DecalObject` but style.decal is in `PatternObject`.\n// So do not transfer decal directly.\n]);\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getStateItemStyle(model);\n // Clear styles set by emphasis.\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\nvar inner = makeInner();\nvar TreemapView = /** @class */function (_super) {\n __extends(TreemapView, _super);\n function TreemapView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = TreemapView.type;\n _this._state = 'ready';\n _this._storage = createStorage();\n return _this;\n }\n /**\r\n * @override\r\n */\n TreemapView.prototype.render = function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n if (indexOf(models, seriesModel) < 0) {\n return;\n }\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage;\n // Mark new root when action is treemapRootToNode.\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n var containerGroup = this._giveContainerGroup(layoutInfo);\n var hasAnimation = seriesModel.get('animation');\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n hasAnimation && !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n this._resetController(api);\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n };\n TreemapView.prototype._giveContainerGroup = function (layoutInfo) {\n var containerGroup = this._containerGroup;\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n this._initEvents(containerGroup);\n this.group.add(containerGroup);\n }\n containerGroup.x = layoutInfo.x;\n containerGroup.y = layoutInfo.y;\n return containerGroup;\n };\n TreemapView.prototype._doRender = function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree;\n // Clear last shape records.\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n function doRenderNode(thisNode, oldNode, parentGroup, depth) {\n return renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth);\n }\n // Notice: When thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we cannot find all of the old graphic\n // elements from tree. So we use this strategy: make element storage, move\n // from old storage to new storage, clear old storage.\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0);\n // Process all removing.\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n if (this._controllerHost) {\n var _oldRootLayout = this.seriesModel.layoutInfo;\n var rootLayout = thisTree.root.getLayout();\n if (rootLayout.width === _oldRootLayout.width && rootLayout.height === _oldRootLayout.height) {\n this._controllerHost.zoom = 1;\n }\n }\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n }\n // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(curry(processNode, null)).execute();\n }\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), inner(el).willDelete = true);\n });\n });\n return willDeleteEls;\n }\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true;\n // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n el.dirty();\n });\n }\n };\n TreemapView.prototype._doAnimation = function (containerGroup, renderResult, seriesModel, reRoot) {\n var durationOption = seriesModel.get('animationDurationUpdate');\n var easingOption = seriesModel.get('animationEasing');\n // TODO: do not support function until necessary.\n var duration = (isFunction(durationOption) ? 0 : durationOption) || 0;\n var easing = (isFunction(easingOption) ? null : easingOption) || 'cubicOut';\n var animationWrap = animationUtil.createWrap();\n // Make delete animations.\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n var target;\n var innerStore = inner(parent);\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup\n // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: innerStore.nodeWidth,\n height: innerStore.nodeHeight\n },\n style: {\n opacity: 0\n }\n }\n // Others.\n : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n if (!innerStore.willDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = innerStore.nodeWidth / 2;\n targetY = innerStore.nodeHeight / 2;\n }\n target = storageName === 'nodeGroup' ? {\n x: targetX,\n y: targetY,\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n // TODO: do not support delay until necessary.\n target && animationWrap.add(el, target, duration, 0, easing);\n });\n });\n // Make other animations\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n if (!last) {\n return;\n }\n if (el instanceof graphic.Group) {\n if (last.oldX != null) {\n target.x = el.x;\n target.y = el.y;\n el.x = last.oldX;\n el.y = last.oldY;\n }\n } else {\n if (last.oldShape) {\n target.shape = extend({}, el.shape);\n el.setShape(last.oldShape);\n }\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n }\n // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n animationWrap.add(el, target, duration, 0, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.finished(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n };\n TreemapView.prototype._resetController = function (api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n if (!controllerHost) {\n this._controllerHost = {\n target: this.group\n };\n controllerHost = this._controllerHost;\n }\n // Init controller.\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controllerHost.zoomLimit = this.seriesModel.get('scaleLimit');\n controllerHost.zoom = this.seriesModel.get('zoom');\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n };\n TreemapView.prototype._clearController = function () {\n var controller = this._controller;\n this._controllerHost = null;\n if (controller) {\n controller.dispose();\n controller = null;\n }\n };\n TreemapView.prototype._onPan = function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n };\n TreemapView.prototype._onZoom = function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n var zoomDelta = e.scale;\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n if (!root) {\n return;\n }\n var rootLayout = root.getLayout();\n if (!rootLayout) {\n return;\n }\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n // scaleLimit\n var zoomLimit = null;\n var _controllerHost = this._controllerHost;\n zoomLimit = _controllerHost.zoomLimit;\n var newZoom = _controllerHost.zoom = _controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n var zoomScale = newZoom / _controllerHost.zoom;\n _controllerHost.zoom = newZoom;\n var layoutInfo = this.seriesModel.layoutInfo;\n // Transform mouse coord from global to containerGroup.\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y;\n // Scale root bounding rect.\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [zoomScale, zoomScale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n };\n TreemapView.prototype._initEvents = function (containerGroup) {\n var _this = this;\n containerGroup.on('click', function (e) {\n if (_this._state !== 'ready') {\n return;\n }\n var nodeClick = _this.seriesModel.get('nodeClick', true);\n if (!nodeClick) {\n return;\n }\n var targetInfo = _this.findTarget(e.offsetX, e.offsetY);\n if (!targetInfo) {\n return;\n }\n var node = targetInfo.node;\n if (node.getLayout().isLeafRoot) {\n _this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n _this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n };\n TreemapView.prototype._renderBreadcrumb = function (seriesModel, api, targetInfo) {\n var _this = this;\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot()\n }\n // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, function (node) {\n if (_this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? _this._rootToNode({\n node: node\n }) : _this._zoomToNode({\n node: node\n });\n }\n });\n };\n /**\r\n * @override\r\n */\n TreemapView.prototype.remove = function () {\n this._clearController();\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n };\n TreemapView.prototype.dispose = function () {\n this._clearController();\n };\n TreemapView.prototype._zoomToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n TreemapView.prototype._rootToNode = function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n };\n /**\r\n * @public\r\n * @param {number} x Global coord x.\r\n * @param {number} y Global coord y.\r\n * @return {Object} info If not found, return undefined;\r\n * @return {number} info.node Target node.\r\n * @return {number} info.offsetX x refer to target node.\r\n * @return {number} info.offsetY y refer to target node.\r\n */\n TreemapView.prototype.findTarget = function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()];\n // If invisible, there might be no element.\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape;\n // For performance consideration, don't use 'getBoundingRect'.\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n };\n TreemapView.type = 'treemap';\n return TreemapView;\n}(ChartView);\n/**\r\n * @inner\r\n */\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\r\n * @inner\r\n * @return Return undefined means do not travel further.\r\n */\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n }\n // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData();\n var nodeModel = thisNode.getModel();\n // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n data.setItemGraphicEl(thisNode.dataIndex, null);\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = nodeModel.getModel('itemStyle');\n var itemStyleEmphasisModel = nodeModel.getModel(['emphasis', 'itemStyle']);\n var itemStyleBlurModel = nodeModel.getModel(['blur', 'itemStyle']);\n var itemStyleSelectModel = nodeModel.getModel(['select', 'itemStyle']);\n var borderRadius = itemStyleNormalModel.get('borderRadius') || 0;\n // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n var group = giveGraphic('nodeGroup', Group);\n if (!group) {\n return;\n }\n parentGroup.add(group);\n // x,y are not set when el is above view root.\n group.x = thisLayout.x || 0;\n group.y = thisLayout.y || 0;\n group.markRedraw();\n inner(group).nodeWidth = thisWidth;\n inner(group).nodeHeight = thisHeight;\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n // Background\n var bg = giveGraphic('background', Rect, depth, Z2_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight);\n var emphasisModel = nodeModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var isDisabled = emphasisModel.get('disabled');\n var focusOrIndices = focus === 'ancestor' ? thisNode.getAncestorsIndices() : focus === 'descendant' ? thisNode.getDescendantIndices() : focus;\n // No children, render content.\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (isHighDownDispatcher(group)) {\n setAsHighDownDispatcher(group, false);\n }\n if (bg) {\n setAsHighDownDispatcher(bg, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n enableHoverFocus(bg, focusOrIndices, blurScope);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z2_CONTENT);\n content && renderContent(group, content);\n bg.disableMorphing = true;\n if (bg && isHighDownDispatcher(bg)) {\n setAsHighDownDispatcher(bg, false);\n }\n setAsHighDownDispatcher(group, !isDisabled);\n // Only for enabling highlight/downplay.\n data.setItemGraphicEl(thisNode.dataIndex, group);\n var cursorStyle = nodeModel.getShallow('cursor');\n cursorStyle && content.attr('cursor', cursorStyle);\n enableHoverFocus(group, focusOrIndices, blurScope);\n }\n return group;\n // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n function renderBackground(group, bg, useUpperLabel) {\n var ecData = getECData(bg);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var style = thisNode.getVisual('style');\n var visualBorderColor = style.stroke;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n emphasisStyle.fill = itemStyleEmphasisModel.get('borderColor');\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n blurStyle.fill = itemStyleBlurModel.get('borderColor');\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n selectStyle.fill = itemStyleSelectModel.get('borderColor');\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(\n // PENDING: convert ZRColor to ColorString for text.\n bg, visualBorderColor, style.opacity, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n }\n // For old bg.\n else {\n bg.removeTextContent();\n }\n bg.setStyle(normalStyle);\n bg.ensureState('emphasis').style = emphasisStyle;\n bg.ensureState('blur').style = blurStyle;\n bg.ensureState('select').style = selectStyle;\n setDefaultStateProxy(bg);\n }\n group.add(bg);\n }\n function renderContent(group, content) {\n var ecData = getECData(content);\n // For tooltip.\n ecData.dataIndex = thisNode.dataIndex;\n ecData.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight,\n r: borderRadius\n });\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var nodeStyle = thisNode.getVisual('style');\n var visualColor = nodeStyle.fill;\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n normalStyle.decal = nodeStyle.decal;\n var emphasisStyle = getStateItemStyle(itemStyleEmphasisModel);\n var blurStyle = getStateItemStyle(itemStyleBlurModel);\n var selectStyle = getStateItemStyle(itemStyleSelectModel);\n // PENDING: convert ZRColor to ColorString for text.\n prepareText(content, visualColor, nodeStyle.opacity, null);\n content.setStyle(normalStyle);\n content.ensureState('emphasis').style = emphasisStyle;\n content.ensureState('blur').style = blurStyle;\n content.ensureState('select').style = selectStyle;\n setDefaultStateProxy(content);\n }\n group.add(content);\n }\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n function prepareText(rectEl, visualColor, visualOpacity,\n // Can be null/undefined\n upperLabelRect) {\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var defaultText = convertOptionIdName(nodeModel.get('name'), null);\n var isShow = normalLabelModel.getShallow('show');\n setLabelStyle(rectEl, getLabelStatesModels(nodeModel, upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL), {\n defaultText: isShow ? defaultText : null,\n inheritColor: visualColor,\n defaultOpacity: visualOpacity,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex\n });\n var textEl = rectEl.getTextContent();\n if (!textEl) {\n return;\n }\n var textStyle = textEl.style;\n var textPadding = normalizeCssArray(textStyle.padding || 0);\n if (upperLabelRect) {\n rectEl.setTextConfig({\n layoutRect: upperLabelRect\n });\n textEl.disableLabelLayout = true;\n }\n textEl.beforeUpdate = function () {\n var width = Math.max((upperLabelRect ? upperLabelRect.width : rectEl.shape.width) - textPadding[1] - textPadding[3], 0);\n var height = Math.max((upperLabelRect ? upperLabelRect.height : rectEl.shape.height) - textPadding[0] - textPadding[2], 0);\n if (textStyle.width !== width || textStyle.height !== height) {\n textEl.setStyle({\n width: width,\n height: height\n });\n }\n };\n textStyle.truncateMinChar = 2;\n textStyle.lineOverflow = 'truncate';\n addDrillDownIcon(textStyle, upperLabelRect, thisLayout);\n var textEmphasisState = textEl.getState('emphasis');\n addDrillDownIcon(textEmphasisState ? textEmphasisState.style : null, upperLabelRect, thisLayout);\n }\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style ? style.text : null;\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element);\n }\n // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor();\n if (element instanceof Displayable) {\n element.z2 = calculateZ2(depth, z);\n }\n prepareAnimationWhenNoOld(lasts, element);\n }\n // Set to thisStorage\n return thisStorage[storageName][thisRawIndex] = element;\n }\n function prepareAnimationWhenHasOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n if (element instanceof Group) {\n lastCfg.oldX = element.x;\n lastCfg.oldY = element.y;\n } else {\n lastCfg.oldShape = extend({}, element.shape);\n }\n }\n // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n function prepareAnimationWhenNoOld(lasts, element) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n var isGroup = element instanceof graphic.Group;\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0;\n // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n if (!reRoot && parentOldBg && parentOldBg.oldShape) {\n parentOldX = parentOldBg.oldShape.width;\n parentOldY = parentOldBg.oldShape.height;\n }\n // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n if (isGroup) {\n lastCfg.oldX = 0;\n lastCfg.oldY = parentOldY;\n } else {\n lastCfg.oldShape = {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n }\n }\n // Fade in, user can be aware that these nodes are new.\n lastCfg.fadein = !isGroup;\n }\n}\n// We cannot set all background with the same z, because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause lower background elements to overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\nfunction calculateZ2(depth, z2InLevel) {\n return depth * Z2_BASE + z2InLevel;\n}\nexport default TreemapView;"],"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,SAASC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAEC,iBAAiB,EAAEC,UAAU,QAAQ,0BAA0B;AAC5G,OAAO,KAAKC,OAAO,MAAM,uBAAuB;AAChD,SAASC,SAAS,QAAQ,0BAA0B;AACpD,SAASC,oBAAoB,EAAEC,uBAAuB,EAAEC,oBAAoB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,sBAAsB;AAC9I,OAAOC,UAAU,MAAM,0BAA0B;AACjD,OAAO,KAAKC,MAAM,MAAM,yBAAyB;AACjD,OAAOC,UAAU,MAAM,iBAAiB;AACxC,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,YAAY,MAAM,kCAAkC;AAC3D,OAAO,KAAKC,MAAM,MAAM,4BAA4B;AACpD,OAAO,KAAKC,aAAa,MAAM,yBAAyB;AACxD,OAAOC,eAAe,MAAM,sCAAsC;AAClE,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,WAAW,MAAM,oCAAoC;AAC5D,SAASC,SAAS,EAAEC,mBAAmB,QAAQ,qBAAqB;AACpE,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,aAAa,EAAEC,oBAAoB,QAAQ,2BAA2B;AAC/E,IAAIC,KAAK,GAAGtB,OAAO,CAACsB,KAAK;AACzB,IAAIC,IAAI,GAAGvB,OAAO,CAACuB,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