1 line
33 KiB
JSON
1 line
33 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.fill.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\n\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Becuse custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan' // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\n\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\n\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n } // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n\n\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\n\n\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl; // See `custom.ts`, a trick to set extra `textPosition` firstly.\n\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || '#000';\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || '#fff';\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || '#000';\n }\n\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\n\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\n\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/util/styleCompat.js"],"names":["each","hasOwn","deprecatedLogs","isEC4CompatibleStyle","style","elType","hasOwnTextContentOption","hasOwnTextConfig","legacy","convertFromEC4CompatibleStyle","hostStyle","isNormal","srcStyle","textConfig","textContent","textContentStyle","text","rich","fill","textFill","stroke","textStroke","fontFamily","fontSize","fontStyle","fontWeight","type","silent","hasOwnPos","position","textPosition","offset","textOffset","rotation","textRotation","distance","textDistance","convertEC4CompatibleRichItem","richItem","out","font","textFont","lineWidth","textStrokeWidth","align","textAlign","verticalAlign","textVerticalAlign","lineHeight","textLineHeight","width","textWidth","height","textHeight","backgroundColor","textBackgroundColor","padding","textPadding","borderColor","textBorderColor","borderWidth","textBorderWidth","borderRadius","textBorderRadius","shadowColor","textBoxShadowColor","shadowBlur","textBoxShadowBlur","shadowOffsetX","textBoxShadowOffsetX","shadowOffsetY","textBoxShadowOffsetY","convertToEC4StyleForCustomSerise","itemStl","txStl","txCfg","isInside","indexOf","hostFill","convertToEC4RichItem","textFillNotSet","insideFill","insideStroke","outsideFill","outsideStroke","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","warnDeprecated","deprecated","insteadApproach","process","env","NODE_ENV","key","console","warn"],"mappings":";;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,MAAf,QAA6B,0BAA7B;AACA,IAAIC,cAAc,GAAG,EAArB;AACA;AACA;AACA;;AA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AAnB,EAA0B;AACxBC,MAAAA,OAAO,CAACC,IAAR,CAAa,6BAA6BP,UAA7B,GAA0C,0BAA1C,GAAuEC,eAApF;AACAzF,MAAAA,cAAc,CAAC6F,GAAD,CAAd,GAAsB,IAAtB;AACD;AACF;AACF","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { each, hasOwn } from 'zrender/lib/core/util.js';\nvar deprecatedLogs = {};\n/**\n * Whether need to call `convertEC4CompatibleStyle`.\n */\n\nexport function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) {\n // Since echarts5, `RectText` is separated from its host element and style.text\n // does not exist any more. The compat work brings some extra burden on performance.\n // So we provide:\n // `legacy: true` force make compat.\n // `legacy: false`, force do not compat.\n // `legacy` not set: auto detect whether legacy.\n // But in this case we do not compat (difficult to detect and rare case):\n // Becuse custom series and graphic component support \"merge\", users may firstly\n // only set `textStrokeWidth` style or secondly only set `text`.\n return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan' // Difficult to detect whether legacy for a \"text\" el.\n && (elType === 'text' || hasOwn(style, 'text')));\n}\n/**\n * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format.\n * @param hostStyle The properties might be modified.\n * @return If be text el, `textContentStyle` and `textConfig` will not be returned.\n * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area\n * retried from the `hostStyle`.\n */\n\nexport function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) {\n var srcStyle = hostStyle;\n var textConfig;\n var textContent;\n var textContentStyle;\n\n if (elType === 'text') {\n textContentStyle = srcStyle;\n } else {\n textContentStyle = {};\n hasOwn(srcStyle, 'text') && (textContentStyle.text = srcStyle.text);\n hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);\n hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);\n hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);\n hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);\n hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);\n hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);\n hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);\n textContent = {\n type: 'text',\n style: textContentStyle,\n // ec4 does not support rectText trigger.\n // And when text position is different in normal and emphasis\n // => hover text trigger emphasis;\n // => text position changed, leave mouse pointer immediately;\n // That might cause incorrect state.\n silent: true\n };\n textConfig = {};\n var hasOwnPos = hasOwn(srcStyle, 'textPosition');\n\n if (isNormal) {\n textConfig.position = hasOwnPos ? srcStyle.textPosition : 'inside';\n } else {\n hasOwnPos && (textConfig.position = srcStyle.textPosition);\n }\n\n hasOwn(srcStyle, 'textPosition') && (textConfig.position = srcStyle.textPosition);\n hasOwn(srcStyle, 'textOffset') && (textConfig.offset = srcStyle.textOffset);\n hasOwn(srcStyle, 'textRotation') && (textConfig.rotation = srcStyle.textRotation);\n hasOwn(srcStyle, 'textDistance') && (textConfig.distance = srcStyle.textDistance);\n }\n\n convertEC4CompatibleRichItem(textContentStyle, hostStyle);\n each(textContentStyle.rich, function (richItem) {\n convertEC4CompatibleRichItem(richItem, richItem);\n });\n return {\n textConfig: textConfig,\n textContent: textContent\n };\n}\n/**\n * The result will be set to `out`.\n */\n\nfunction convertEC4CompatibleRichItem(out, richItem) {\n if (!richItem) {\n return;\n } // (1) For simplicity, make textXXX properties (deprecated since ec5) has\n // higher priority. For example, consider in ec4 `borderColor: 5, textBorderColor: 10`\n // on a rect means `borderColor: 4` on the rect and `borderColor: 10` on an attached\n // richText in ec5.\n // (2) `out === richItem` if and only if `out` is text el or rich item.\n // So we can overwrite existing props in `out` since textXXX has higher priority.\n\n\n richItem.font = richItem.textFont || richItem.font;\n hasOwn(richItem, 'textStrokeWidth') && (out.lineWidth = richItem.textStrokeWidth);\n hasOwn(richItem, 'textAlign') && (out.align = richItem.textAlign);\n hasOwn(richItem, 'textVerticalAlign') && (out.verticalAlign = richItem.textVerticalAlign);\n hasOwn(richItem, 'textLineHeight') && (out.lineHeight = richItem.textLineHeight);\n hasOwn(richItem, 'textWidth') && (out.width = richItem.textWidth);\n hasOwn(richItem, 'textHeight') && (out.height = richItem.textHeight);\n hasOwn(richItem, 'textBackgroundColor') && (out.backgroundColor = richItem.textBackgroundColor);\n hasOwn(richItem, 'textPadding') && (out.padding = richItem.textPadding);\n hasOwn(richItem, 'textBorderColor') && (out.borderColor = richItem.textBorderColor);\n hasOwn(richItem, 'textBorderWidth') && (out.borderWidth = richItem.textBorderWidth);\n hasOwn(richItem, 'textBorderRadius') && (out.borderRadius = richItem.textBorderRadius);\n hasOwn(richItem, 'textBoxShadowColor') && (out.shadowColor = richItem.textBoxShadowColor);\n hasOwn(richItem, 'textBoxShadowBlur') && (out.shadowBlur = richItem.textBoxShadowBlur);\n hasOwn(richItem, 'textBoxShadowOffsetX') && (out.shadowOffsetX = richItem.textBoxShadowOffsetX);\n hasOwn(richItem, 'textBoxShadowOffsetY') && (out.shadowOffsetY = richItem.textBoxShadowOffsetY);\n}\n/**\n * Convert to pure echarts4 format style.\n * `itemStyle` will be modified, added with ec4 style properties from\n * `textStyle` and `textConfig`.\n *\n * [Caveat]: For simplicity, `insideRollback` in ec4 does not compat, where\n * `styleEmphasis: {textFill: 'red'}` will remove the normal auto added stroke.\n */\n\n\nexport function convertToEC4StyleForCustomSerise(itemStl, txStl, txCfg) {\n var out = itemStl; // See `custom.ts`, a trick to set extra `textPosition` firstly.\n\n out.textPosition = out.textPosition || txCfg.position || 'inside';\n txCfg.offset != null && (out.textOffset = txCfg.offset);\n txCfg.rotation != null && (out.textRotation = txCfg.rotation);\n txCfg.distance != null && (out.textDistance = txCfg.distance);\n var isInside = out.textPosition.indexOf('inside') >= 0;\n var hostFill = itemStl.fill || '#000';\n convertToEC4RichItem(out, txStl);\n var textFillNotSet = out.textFill == null;\n\n if (isInside) {\n if (textFillNotSet) {\n out.textFill = txCfg.insideFill || '#fff';\n !out.textStroke && txCfg.insideStroke && (out.textStroke = txCfg.insideStroke);\n !out.textStroke && (out.textStroke = hostFill);\n out.textStrokeWidth == null && (out.textStrokeWidth = 2);\n }\n } else {\n if (textFillNotSet) {\n out.textFill = itemStl.fill || txCfg.outsideFill || '#000';\n }\n\n !out.textStroke && txCfg.outsideStroke && (out.textStroke = txCfg.outsideStroke);\n }\n\n out.text = txStl.text;\n out.rich = txStl.rich;\n each(txStl.rich, function (richItem) {\n convertToEC4RichItem(richItem, richItem);\n });\n return out;\n}\n\nfunction convertToEC4RichItem(out, richItem) {\n if (!richItem) {\n return;\n }\n\n hasOwn(richItem, 'fill') && (out.textFill = richItem.fill);\n hasOwn(richItem, 'stroke') && (out.textStroke = richItem.fill);\n hasOwn(richItem, 'lineWidth') && (out.textStrokeWidth = richItem.lineWidth);\n hasOwn(richItem, 'font') && (out.font = richItem.font);\n hasOwn(richItem, 'fontStyle') && (out.fontStyle = richItem.fontStyle);\n hasOwn(richItem, 'fontWeight') && (out.fontWeight = richItem.fontWeight);\n hasOwn(richItem, 'fontSize') && (out.fontSize = richItem.fontSize);\n hasOwn(richItem, 'fontFamily') && (out.fontFamily = richItem.fontFamily);\n hasOwn(richItem, 'align') && (out.textAlign = richItem.align);\n hasOwn(richItem, 'verticalAlign') && (out.textVerticalAlign = richItem.verticalAlign);\n hasOwn(richItem, 'lineHeight') && (out.textLineHeight = richItem.lineHeight);\n hasOwn(richItem, 'width') && (out.textWidth = richItem.width);\n hasOwn(richItem, 'height') && (out.textHeight = richItem.height);\n hasOwn(richItem, 'backgroundColor') && (out.textBackgroundColor = richItem.backgroundColor);\n hasOwn(richItem, 'padding') && (out.textPadding = richItem.padding);\n hasOwn(richItem, 'borderColor') && (out.textBorderColor = richItem.borderColor);\n hasOwn(richItem, 'borderWidth') && (out.textBorderWidth = richItem.borderWidth);\n hasOwn(richItem, 'borderRadius') && (out.textBorderRadius = richItem.borderRadius);\n hasOwn(richItem, 'shadowColor') && (out.textBoxShadowColor = richItem.shadowColor);\n hasOwn(richItem, 'shadowBlur') && (out.textBoxShadowBlur = richItem.shadowBlur);\n hasOwn(richItem, 'shadowOffsetX') && (out.textBoxShadowOffsetX = richItem.shadowOffsetX);\n hasOwn(richItem, 'shadowOffsetY') && (out.textBoxShadowOffsetY = richItem.shadowOffsetY);\n hasOwn(richItem, 'textShadowColor') && (out.textShadowColor = richItem.textShadowColor);\n hasOwn(richItem, 'textShadowBlur') && (out.textShadowBlur = richItem.textShadowBlur);\n hasOwn(richItem, 'textShadowOffsetX') && (out.textShadowOffsetX = richItem.textShadowOffsetX);\n hasOwn(richItem, 'textShadowOffsetY') && (out.textShadowOffsetY = richItem.textShadowOffsetY);\n}\n\nexport function warnDeprecated(deprecated, insteadApproach) {\n if (process.env.NODE_ENV !== 'production') {\n var key = deprecated + '^_^' + insteadApproach;\n\n if (!deprecatedLogs[key]) {\n console.warn(\"[ECharts] DEPRECATED: \\\"\" + deprecated + \"\\\" has been deprecated. \" + insteadApproach);\n deprecatedLogs[key] = true;\n }\n }\n}"]},"metadata":{},"sourceType":"module"} |