{"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 { isString, extend, map, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { formatTplSimple } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getLocaleModel } from '../../core/locale.js';\nvar CalendarView = /** @class */function (_super) {\n __extends(CalendarView, _super);\n function CalendarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarView.type;\n return _this;\n }\n CalendarView.prototype.render = function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem;\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n // locale\n var localeModel = ecModel.getLocaleModel();\n this._renderDayRect(calendarModel, rangeData, group);\n // _renderLines must be called prior to following function\n this._renderLines(calendarModel, rangeData, orient, group);\n this._renderYearText(calendarModel, rangeData, orient, group);\n this._renderMonthText(calendarModel, localeModel, orient, group);\n this._renderWeekText(calendarModel, localeModel, rangeData, orient, group);\n };\n // render day rect\n CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToRect([i], false).tl;\n // every rect\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n };\n // render separate line\n CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle();\n var show = calendarModel.get(['splitLine', 'show']);\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n self._firstDayPoints.push(coordSys.dataToRect([date], false).tl);\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n self._tlpoints.push(points[0]);\n self._blpoints.push(points[points.length - 1]);\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n };\n // get points at both ends\n CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1;\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n };\n // render split line\n CalendarView.prototype._drawSplitline = function (points, lineStyle, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyle\n });\n group.add(poyline);\n };\n // render month line of one week points\n CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n var parsedDate = coordSys.getDateInfo(date);\n var points = [];\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(parsedDate.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n return points;\n };\n CalendarView.prototype._formatterLabel = function (formatter, params) {\n if (isString(formatter) && formatter) {\n return formatTplSimple(formatter, params);\n }\n if (isFunction(formatter)) {\n return formatter(params);\n }\n return params.nameMap;\n };\n CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) {\n var x = point[0];\n var y = point[1];\n var aligns = ['center', 'bottom'];\n if (position === 'bottom') {\n y += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n x -= margin;\n } else if (position === 'right') {\n x += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n y -= margin;\n }\n var rotate = 0;\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n return {\n rotation: rotate,\n x: x,\n y: y,\n style: {\n align: aligns[0],\n verticalAlign: aligns[1]\n }\n };\n };\n // render year\n CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n if (!yearLabel.get('show')) {\n return;\n }\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n var content = this._formatterLabel(formatter, params);\n var yearText = new graphic.Text({\n z2: 30,\n style: createTextStyle(yearLabel, {\n text: content\n }),\n silent: yearLabel.get('silent')\n });\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n };\n CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n if (orient === 'horizontal') {\n y = y + margin;\n if (isCenter) {\n align = 'center';\n }\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n if (isCenter) {\n vAlign = 'middle';\n }\n if (position === 'start') {\n align = 'right';\n }\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render month and year text\n CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n if (!monthLabel.get('show')) {\n return;\n }\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // PENDING\n // for ZH locale, original form is `一月` but current form is `1月`\n nameMap = localeModel.get(['time', 'monthAbbr']) || [];\n }\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n var labelSilent = monthLabel.get('silent');\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n var formatter = monthLabel.get('formatter');\n var name_1 = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name_1\n };\n var content = this._formatterLabel(formatter, params);\n var monthText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),\n silent: labelSilent\n });\n group.add(monthText);\n }\n };\n CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render weeks\n CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n if (!dayLabel.get('show')) {\n return;\n }\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file\n var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);\n nameMap = dayOfWeekShort || map(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) {\n return val[0];\n });\n }\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = parsePercent(margin, Math.min(cellSize[1], cellSize[0]));\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n var labelSilent = dayLabel.get('silent');\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToRect([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),\n silent: labelSilent\n });\n group.add(weekText);\n }\n };\n CalendarView.type = 'calendar';\n return CalendarView;\n}(ComponentView);\nexport default CalendarView;","map":{"version":3,"names":["__extends","isString","extend","map","isFunction","graphic","createTextStyle","formatTplSimple","parsePercent","ComponentView","getLocaleModel","CalendarView","_super","_this","apply","arguments","type","prototype","render","calendarModel","ecModel","api","group","removeAll","coordSys","coordinateSystem","rangeData","getRangeInfo","orient","getOrient","localeModel","_renderDayRect","_renderLines","_renderYearText","_renderMonthText","_renderWeekText","itemRectStyleModel","getModel","getItemStyle","sw","getCellWidth","sh","getCellHeight","i","start","time","end","getNextNDay","point","dataToRect","tl","rect","Rect","shape","x","y","width","height","cursor","style","add","self","lineStyleModel","getLineStyle","show","get","lineWidth","_tlpoints","_blpoints","_firstDayOfMonth","_firstDayPoints","firstDay","addPoints","formatedDate","getDateInfo","m","date","setMonth","getMonth","push","points","_getLinePointsOfOneWeek","length","_drawSplitline","_getEdgesPoints","rs","slice","idx","lineStyle","poyline","Polyline","z2","parsedDate","tmpD","day","_formatterLabel","formatter","params","nameMap","_yearTextPositionControl","textEl","position","margin","aligns","rotate","Math","PI","rotation","align","verticalAlign","yearLabel","pos","xc","yc","posPoints","top","bottom","left","right","name","content","yearText","Text","text","silent","attr","_monthTextPositionControl","isCenter","vAlign","monthLabel","termPoints","axis","labelSilent","tmp","firstDayPoints","name_1","yyyy","yy","MM","M","monthText","_weekTextPositionControl","cellSize","isStart","dayLabel","firstDayOfWeek","getFirstDayOfWeek","dayOfWeekShort","val","lweek","min","fweek","center","abs","weekText"],"sources":["/data/jenkins/workspace/badp-bcxin-web-access/node_modules/echarts/lib/component/calendar/CalendarView.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 { isString, extend, map, isFunction } from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { formatTplSimple } from '../../util/format.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getLocaleModel } from '../../core/locale.js';\nvar CalendarView = /** @class */function (_super) {\n __extends(CalendarView, _super);\n function CalendarView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = CalendarView.type;\n return _this;\n }\n CalendarView.prototype.render = function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem;\n // range info\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n // locale\n var localeModel = ecModel.getLocaleModel();\n this._renderDayRect(calendarModel, rangeData, group);\n // _renderLines must be called prior to following function\n this._renderLines(calendarModel, rangeData, orient, group);\n this._renderYearText(calendarModel, rangeData, orient, group);\n this._renderMonthText(calendarModel, localeModel, orient, group);\n this._renderWeekText(calendarModel, localeModel, rangeData, orient, group);\n };\n // render day rect\n CalendarView.prototype._renderDayRect = function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToRect([i], false).tl;\n // every rect\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n };\n // render separate line\n CalendarView.prototype._renderLines = function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel(['splitLine', 'lineStyle']).getLineStyle();\n var show = calendarModel.get(['splitLine', 'show']);\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n self._firstDayPoints.push(coordSys.dataToRect([date], false).tl);\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n self._tlpoints.push(points[0]);\n self._blpoints.push(points[points.length - 1]);\n show && self._drawSplitline(points, lineStyleModel, group);\n }\n // render top/left line\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group);\n // render bottom/right line\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n };\n // get points at both ends\n CalendarView.prototype._getEdgesPoints = function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1;\n // both ends of the line are extend half lineWidth\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n };\n // render split line\n CalendarView.prototype._drawSplitline = function (points, lineStyle, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyle\n });\n group.add(poyline);\n };\n // render month line of one week points\n CalendarView.prototype._getLinePointsOfOneWeek = function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n var parsedDate = coordSys.getDateInfo(date);\n var points = [];\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(parsedDate.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n return points;\n };\n CalendarView.prototype._formatterLabel = function (formatter, params) {\n if (isString(formatter) && formatter) {\n return formatTplSimple(formatter, params);\n }\n if (isFunction(formatter)) {\n return formatter(params);\n }\n return params.nameMap;\n };\n CalendarView.prototype._yearTextPositionControl = function (textEl, point, orient, position, margin) {\n var x = point[0];\n var y = point[1];\n var aligns = ['center', 'bottom'];\n if (position === 'bottom') {\n y += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n x -= margin;\n } else if (position === 'right') {\n x += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n y -= margin;\n }\n var rotate = 0;\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n return {\n rotation: rotate,\n x: x,\n y: y,\n style: {\n align: aligns[0],\n verticalAlign: aligns[1]\n }\n };\n };\n // render year\n CalendarView.prototype._renderYearText = function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n if (!yearLabel.get('show')) {\n return;\n }\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n var content = this._formatterLabel(formatter, params);\n var yearText = new graphic.Text({\n z2: 30,\n style: createTextStyle(yearLabel, {\n text: content\n }),\n silent: yearLabel.get('silent')\n });\n yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n };\n CalendarView.prototype._monthTextPositionControl = function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n if (orient === 'horizontal') {\n y = y + margin;\n if (isCenter) {\n align = 'center';\n }\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n if (isCenter) {\n vAlign = 'middle';\n }\n if (position === 'start') {\n align = 'right';\n }\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render month and year text\n CalendarView.prototype._renderMonthText = function (calendarModel, localeModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n if (!monthLabel.get('show')) {\n return;\n }\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // PENDING\n // for ZH locale, original form is `一月` but current form is `1月`\n nameMap = localeModel.get(['time', 'monthAbbr']) || [];\n }\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n var labelSilent = monthLabel.get('silent');\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n var formatter = monthLabel.get('formatter');\n var name_1 = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name_1\n };\n var content = this._formatterLabel(formatter, params);\n var monthText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin)),\n silent: labelSilent\n });\n group.add(monthText);\n }\n };\n CalendarView.prototype._weekTextPositionControl = function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n return {\n x: x,\n y: y,\n align: align,\n verticalAlign: vAlign\n };\n };\n // render weeks\n CalendarView.prototype._renderWeekText = function (calendarModel, localeModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n if (!dayLabel.get('show')) {\n return;\n }\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n if (!nameMap || isString(nameMap)) {\n if (nameMap) {\n // case-sensitive\n localeModel = getLocaleModel(nameMap) || localeModel;\n }\n // Use the first letter of `dayOfWeekAbbr` if `dayOfWeekShort` doesn't exist in the locale file\n var dayOfWeekShort = localeModel.get(['time', 'dayOfWeekShort']);\n nameMap = dayOfWeekShort || map(localeModel.get(['time', 'dayOfWeekAbbr']), function (val) {\n return val[0];\n });\n }\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = parsePercent(margin, Math.min(cellSize[1], cellSize[0]));\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n var labelSilent = dayLabel.get('silent');\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToRect([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30,\n style: extend(createTextStyle(dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize)),\n silent: labelSilent\n });\n group.add(weekText);\n }\n };\n CalendarView.type = 'calendar';\n return CalendarView;\n}(ComponentView);\nexport default CalendarView;"],"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,QAAQ,EAAEC,MAAM,EAAEC,GAAG,EAAEC,UAAU,QAAQ,0BAA0B;AAC5E,OAAO,KAAKC,OAAO,MAAM,uBAAuB;AAChD,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,YAA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