/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

import { h as helper } from '../../chunks/helper.js';
import dayjs from 'dayjs';
import { c as commonjsGlobal } from '../../chunks/_commonjsHelpers.js';
import { g as getIEVersion } from '../../chunks/helper2.js';
import mixins from '../../utils/mixins.js';
import getConfigReceiverMixins from '../config-provider/config-receiver.js';
import { emitEvent } from '../../utils/event.js';
import { Select, Option } from '../select/index.js';
import { RadioGroup, RadioButton } from '../radio/index.js';
import { Button } from '../button/index.js';
import { CheckTag } from '../tag/index.js';
import RenderComponent from '../../utils/render-component.js';
import { renderLNodeJSX, renderLNodeJSXDefault } from '../../utils/render-node.js';
import CalendarCellItem from './calendar-cell.js';
import { MIN_YEAR, FIRST_MONTH_OF_YEAR, LAST_MONTH_OF_YEAR, DEFAULT_YEAR_CELL_NUMINROW } from './const.js';
import { createMonthCellsData, createYearCellsData, getDayCn } from './utils.js';
import props from './props.js';
import '../../chunks/defineProperty-838e4192.js';
import 'vue';
import 'lodash/mergeWith';
import 'lodash';
import '../config-provider/context.js';
import '../../chunks/zh_CN.js';
import '../config-provider/type.js';
import '../../utils/helper.js';
import 'lodash/camelCase';
import '@vue/composition-api';
import '../../utils/with-install.js';
import '../../config.js';
import '../select/select.js';
import 'lodash/isFunction';
import 'lodash/debounce';
import 'lodash/get';
import 'lodash/cloneDeep';
import 'lodash/isArray';
import 'lodash/isObject';
import '../../chunks/index.js';
import '../../chunks/log.js';
import '../../chunks/_commonjsHelpers-2e6815bd.js';
import '../../hooks/use-default-value.js';
import '../../hooks/use-vmodel.js';
import 'lodash/kebabCase';
import '../../hooks/lnode.js';
import 'lodash/isEmpty';
import '../../hooks/render-lnode.js';
import '../config-provider/useConfig.js';
import '../loading/index.js';
import '../loading/loading.js';
import '../../utils/dom.js';
import 'raf';
import 'lodash/isString';
import '../../utils/easing.js';
import '../../utils/transfer-dom.js';
import '../loading/props.js';
import '../loading/icon/gradient.js';
import '../../chunks/set-style.js';
import '../loading/style';
import '../loading/type.js';
import '../loading/plugin.js';
import '../popup/index.js';
import '../../utils/map-props.js';
import '../popup/popup.js';
import '@popperjs/core';
import '../popup/props.js';
import '../popup/container.js';
import '../popup/style';
import '../popup/type.js';
import '../input/index.js';
import '../input/input.js';
import '@ldesign/icons-vue';
import '../input/props.js';
import '../input/group.js';
import '../input/style';
import '../input/type.js';
import '../select-input/index.js';
import '../select-input/select-input.js';
import '../select-input/props.js';
import '../select-input/hooks/use-single.js';
import 'lodash/pick';
import '../../hooks/use-config.js';
import '../select-input/hooks/use-multiple.js';
import '../tag-input/index.js';
import '../tag-input/tag-input.js';
import '../../hooks/use-global-icon.js';
import '../tag-input/props.js';
import '../tag-input/hooks/use-tag-scroll.js';
import '../tag-input/hooks/use-tag-list.js';
import '../tag-input/hooks/use-hover.js';
import '../tag-input/hooks/use-drag-sorter.js';
import '../tag/tag.js';
import '../tag/props.js';
import '../tag/check-tag.js';
import '../tag/style';
import '../tag/type.js';
import '../tag-input/style';
import '../tag-input/type.js';
import '../select-input/hooks/use-overlay-innerstyle.js';
import '../select-input/style';
import '../select-input/type.js';
import '../common/fake-arrow.js';
import '../../hooks/use-form-disabled.js';
import '../select/option.js';
import '../../utils/ripple.js';
import '../checkbox/index.js';
import '../checkbox/group.js';
import 'lodash/intersection';
import '../checkbox/checkbox.js';
import '../checkbox/props.js';
import '../checkbox/style';
import '../checkbox/type.js';
import '../../hooks/use-lazy-load.js';
import '../../chunks/observe.js';
import '../../hooks/use-common-classname.js';
import '../select/utils.js';
import '../select/props.js';
import '../select/select-panel.js';
import '../../hooks/use-virtual-scroll.js';
import '../select/hooks/use-select-options.js';
import '../select/option-group.js';
import '../select/style';
import '../select/type.js';
import '../radio/radio.js';
import '../radio/props.js';
import '../radio/group.js';
import 'lodash/isNumber';
import '../radio/radio-button.js';
import '../radio/style';
import '../radio/type.js';
import '../button/button.js';
import '../button/props.js';
import '../button/style';
import '../button/type.js';

var calendar$1 = {exports: {}};

(function (module, exports) {
  !function (e, t) {
    "object" == 'object' && "undefined" != 'object' ? module.exports = t() : "function" == typeof undefined && undefined.amd ? undefined(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_calendar = t();
  }(commonjsGlobal, function () {
    "use strict";

    return function (e, t, a) {
      var n = "h:mm A",
        d = {
          lastDay: "[Yesterday at] " + n,
          sameDay: "[Today at] " + n,
          nextDay: "[Tomorrow at] " + n,
          nextWeek: "dddd [at] " + n,
          lastWeek: "[Last] dddd [at] " + n,
          sameElse: "MM/DD/YYYY"
        };
      t.prototype.calendar = function (e, t) {
        var n = t || this.$locale().calendar || d,
          o = a(e || void 0).startOf("d"),
          s = this.diff(o, "d", !0),
          i = "sameElse",
          f = s < -6 ? i : s < -1 ? "lastWeek" : s < 0 ? "lastDay" : s < 1 ? "sameDay" : s < 2 ? "nextDay" : s < 7 ? "nextWeek" : i,
          l = n[f] || d[f];
        return "function" == typeof l ? l.call(this, a()) : this.format(l);
      };
    };
  });
})(calendar$1, calendar$1.exports);
var calendar = calendar$1.exports;

dayjs.extend(calendar);
const createDefaultCurDate = () => dayjs(dayjs().format("YYYY-MM-DD"));
const getDefaultControllerConfigData = function () {
  let visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
  return {
    visible,
    disabled: false,
    mode: {
      visible: true,
      radioGroupProps: {}
    },
    year: {
      visible: true,
      selectProps: {}
    },
    month: {
      visible: true,
      selectProps: {}
    },
    weekend: {
      visible: true,
      showWeekendButtonProps: {},
      hideWeekendButtonProps: {}
    },
    current: {
      visible: true,
      currentDayButtonProps: {},
      currentMonthButtonProps: {}
    }
  };
};
var _Calendar = mixins(getConfigReceiverMixins("calendar")).extend({
  name: "LCalendar",
  components: {
    TCheckTag: CheckTag,
    TSelect: Select,
    TOption: Option,
    TRadioGroup: RadioGroup,
    TRadioButton: RadioButton,
    TButton: Button,
    CalendarCellItem,
    RenderComponent
  },
  props: {
    ...props
  },
  data() {
    return {
      curDate: null,
      curSelectedYear: null,
      curSelectedMonth: null,
      curSelectedMode: null,
      isShowWeekend: true,
      controlSize: "medium"
    };
  },
  computed: {
    realFirstDayOfWeek() {
      return this.firstDayOfWeek ?? this.global.firstDayOfWeek ?? 1;
    },
    TEXT_MAP() {
      const {
        t,
        global
      } = this;
      const r = {
        showWeekend: t(global.showWeekend),
        hideWeekend: t(global.hideWeekend),
        today: t(global.today),
        thisMonth: t(global.thisMonth)
      };
      return r;
    },
    weekDipalyText() {
      return this.week || this.t(this.global.week).split(",");
    },
    calendarCls() {
      return [`${this.componentName}`, `${this.componentName}--${this.theme}`];
    },
    calendarPanelCls() {
      return [`${this.componentName}__panel`, `${this.componentName}__panel--${this.curSelectedMode}`];
    },
    isWeekRender() {
      return typeof this.week === "function";
    },
    rangeFromTo() {
      if (!this.range || this.range.length < 2) return null;
      const [v1, v2] = this.range;
      if (dayjs(v1).isBefore(dayjs(v2))) {
        return {
          from: v1,
          to: v2
        };
      }
      return {
        from: v2,
        to: v1
      };
    },
    controllerOptions() {
      const dayJsFilterDate = dayjs(`${this.curSelectedYear}-${this.curSelectedMonth}`);
      const re = {
        isShowWeekend: this.isShowWeekend,
        filterDate: dayJsFilterDate.toDate(),
        formattedFilterDate: dayJsFilterDate.format(this.format),
        mode: this.curSelectedMode
      };
      return re;
    },
    cellColHeaders() {
      const re = [];
      const min = 1;
      const max = 7;
      for (let i = this.realFirstDayOfWeek; i <= max; i++) {
        re.push({
          num: i,
          display: this.getWeekDisplay(i)
        });
      }
      if (this.realFirstDayOfWeek > min) {
        for (let i = min; i < this.realFirstDayOfWeek; i++) {
          re.push({
            num: i,
            display: this.getWeekDisplay(i)
          });
        }
      }
      return re;
    },
    yearSelectOptionList() {
      const re = [];
      let begin = this.curSelectedYear - 10;
      let end = this.curSelectedYear + 10;
      if (this.rangeFromTo && this.rangeFromTo.from && this.rangeFromTo.to) {
        begin = dayjs(this.rangeFromTo.from).year();
        end = dayjs(this.rangeFromTo.to).year();
      }
      if (begin < MIN_YEAR) begin = MIN_YEAR;
      if (end < MIN_YEAR) end = MIN_YEAR;
      for (let i = begin; i <= end; i++) {
        const disabled = this.checkMonthAndYearSelecterDisabled(i, this.curSelectedMonth);
        re.push({
          value: i,
          label: this.t(this.global.yearSelection, {
            year: i
          }),
          disabled
        });
      }
      return re;
    },
    monthSelectOptionList() {
      const re = [];
      for (let i = FIRST_MONTH_OF_YEAR; i <= LAST_MONTH_OF_YEAR; i++) {
        const disabled = this.checkMonthAndYearSelecterDisabled(this.curSelectedYear, i);
        re.push({
          value: i,
          label: this.t(this.global.monthSelection, {
            month: i
          }),
          disabled
        });
      }
      return re;
    },
    modeSelectOptionList() {
      return [{
        value: "month",
        label: this.t(this.global.monthRadio)
      }, {
        value: "year",
        label: this.t(this.global.yearRadio)
      }];
    },
    monthCellsData() {
      const {
        realFirstDayOfWeek
      } = this;
      const daysArr = createMonthCellsData(this.curSelectedYear, this.curSelectedMonth, realFirstDayOfWeek, this.curDate, this.format);
      return daysArr;
    },
    yearCellsData() {
      const re = [];
      const monthsArr = createYearCellsData(this.curSelectedYear, this.curDate, this.format);
      const rowCount = Math.ceil(monthsArr.length / DEFAULT_YEAR_CELL_NUMINROW);
      let index = 0;
      for (let i = 1; i <= rowCount; i++) {
        const row = [];
        for (let j = 1; j <= DEFAULT_YEAR_CELL_NUMINROW; j++) {
          row.push(monthsArr[index]);
          index += 1;
        }
        re.push(row);
      }
      return re;
    },
    controllerConfigData() {
      const controllerConfig = this.controllerConfig ?? this.global.controllerConfig ?? true;
      if (typeof controllerConfig === "boolean") return getDefaultControllerConfigData(controllerConfig);
      return {
        ...getDefaultControllerConfigData(),
        ...controllerConfig
      };
    },
    isControllerVisible() {
      return this.controllerConfigData && this.controllerConfigData.visible;
    },
    weekendBtnText() {
      return this.isShowWeekend ? this.TEXT_MAP.hideWeekend : this.TEXT_MAP.showWeekend;
    },
    weekendBtnVBind() {
      const c = this.controllerConfigData.weekend;
      return this.isShowWeekend ? c.hideWeekendButtonProps : c.showWeekendButtonProps;
    },
    currentBtnText() {
      return this.curSelectedMode === "month" ? this.TEXT_MAP.today : this.TEXT_MAP.thisMonth;
    },
    currentBtnVBind() {
      const c = this.controllerConfigData.current;
      return this.curSelectedMode === "month" ? c.currentDayButtonProps : c.currentMonthButtonProps;
    },
    isModeVisible() {
      return this.checkControllerVisible("mode");
    },
    isYearVisible() {
      return this.checkControllerVisible("year");
    },
    isMonthVisible() {
      return this.checkControllerVisible("month");
    },
    isWeekendToggleVisible() {
      return this.checkControllerVisible("weekend");
    },
    isCurrentBtnVisible() {
      return this.checkControllerVisible("current");
    },
    isModeDisabled() {
      return this.checkControllerDisabled("mode", "radioGroupProps");
    },
    isYearDisabled() {
      return this.checkControllerDisabled("year", "selectProps");
    },
    isMonthDisabled() {
      return this.checkControllerDisabled("month", "selectProps");
    },
    isWeekendToggleDisabled() {
      const p = this.isShowWeekend ? "hideWeekendButtonProps" : "showWeekendButtonProps";
      return this.checkControllerDisabled("weekend", p);
    },
    isCurrentBtnDisabled() {
      const p = this.curSelectedMode === "month" ? "currentDayButtonProps" : "currentMonthButtonProps";
      return this.checkControllerDisabled("current", p);
    },
    filterYearStr() {
      return `${this.controllerOptions.filterDate.getFullYear()}`;
    },
    filterMonthStr() {
      return `${this.controllerOptions.filterDate.getMonth() + 1}`;
    },
    filterYearMonth() {
      return {
        year: this.filterYearStr,
        month: this.filterMonthStr
      };
    }
  },
  watch: {
    value: {
      handler(v) {
        this.setCurrentDate(v);
      },
      immediate: true
    },
    year: {
      handler(v) {
        this.setCurSelectedYear(v);
      },
      immediate: true
    },
    month: {
      handler(v) {
        this.setCurSelectedMonth(v);
      },
      immediate: true
    },
    mode: {
      handler(v) {
        this.curSelectedMode = v;
      },
      immediate: true
    },
    isShowWeekendDefault: {
      handler(v) {
        this.isShowWeekend = v;
      },
      immediate: true
    },
    filterYearMonth: {
      handler(v) {
        emitEvent(this, "month-change", v);
        this.controllerChange();
      }
    },
    curSelectedMode() {
      this.handleIE();
    },
    isShowWeekend() {
      this.handleIE();
    },
    isControllerVisible() {
      this.handleIE();
    }
  },
  mounted() {
    this.handleIE();
  },
  methods: {
    handleIE() {
      if (getIEVersion() <= 9) {
        this.$nextTick(() => {
          const element = this.$el.children[this.isControllerVisible ? 1 : 0];
          if (this.curSelectedMode === "month") element.setAttribute("is-show-weekend", `${this.isShowWeekend}`);else element.removeAttribute("is-show-weekend");
        });
      }
    },
    getCalendarWeekSlotData(item) {
      return {
        day: item.num
      };
    },
    getWeekDisplay(weekNum) {
      const weekText = this.weekDipalyText;
      return typeof weekText === "object" && weekText[weekNum - 1] ? weekText[weekNum - 1] : getDayCn(weekNum);
    },
    checkMonthCellItemShowed(cellData) {
      return this.isShowWeekend || cellData.day < 6;
    },
    createCalendarCell(cellData) {
      return {
        ...cellData,
        ...this.controllerOptions
      };
    },
    clickCell(e, cellData) {
      this.curDate = dayjs(cellData.date);
      const options = this.getCellClickEventOptions(e, cellData);
      emitEvent(this, "cell-click", options);
    },
    doubleClickCell(e, cellData) {
      const options = this.getCellClickEventOptions(e, cellData);
      emitEvent(this, "cell-double-click", options);
    },
    rightClickCell(e, cellData) {
      if (this.preventCellContextmenu) e.preventDefault();
      const options = this.getCellClickEventOptions(e, cellData);
      emitEvent(this, "cell-right-click", options);
    },
    getCellClickEventOptions(e, cellData) {
      return {
        cell: this.createCalendarCell(cellData),
        e
      };
    },
    controllerChange() {
      const options = this.controllerOptions;
      emitEvent(this, "controller-change", options);
    },
    onWeekendToggleClick() {
      this.isShowWeekend = !this.isShowWeekend;
      this.controllerChange();
    },
    checkMonthCellColHeaderVisibled(item) {
      let re = true;
      if (!this.isShowWeekend) re = item.num !== 6 && item.num !== 7;
      return re;
    },
    checkControllerDisabled(name, propsName) {
      let re = false;
      const conf = this.controllerConfigData;
      if (conf && (conf.disabled || conf[name] && conf[name][propsName] && conf[name][propsName].disabled)) re = true;
      return re;
    },
    checkControllerVisible(name) {
      let re = true;
      const conf = this.controllerConfigData;
      if (!conf || !conf.visible || conf[name] === false || conf[name] && !conf[name].visible) re = false;
      return re;
    },
    toToday() {
      const currentSelectDate = createDefaultCurDate();
      this.curSelectedYear = currentSelectDate.year();
      this.curSelectedMonth = parseInt(currentSelectDate.format("M"), 10);
    },
    setCurSelectedYear(year) {
      const curSelectedYear = year ? parseInt(`${year}`, 10) : createDefaultCurDate().year();
      if (!isNaN(curSelectedYear) && curSelectedYear > 0) this.curSelectedYear = curSelectedYear;
    },
    setCurSelectedMonth(month) {
      const curSelectedMonth = month ? parseInt(`${month}`, 10) : parseInt(createDefaultCurDate().format("M"), 10);
      if (!isNaN(curSelectedMonth) && curSelectedMonth > 0 && curSelectedMonth <= 12) this.curSelectedMonth = curSelectedMonth;
    },
    setCurrentDate(value) {
      this.curDate = value ? dayjs(value) : createDefaultCurDate();
    },
    checkMonthAndYearSelecterDisabled(year, month) {
      let disabled = false;
      if (this.rangeFromTo && this.rangeFromTo.from && this.rangeFromTo.to) {
        const beginYear = dayjs(this.rangeFromTo.from).year();
        const endYear = dayjs(this.rangeFromTo.to).year();
        if (year === beginYear) {
          const beginMon = parseInt(dayjs(this.rangeFromTo.from).format("M"), 10);
          disabled = month < beginMon;
        } else if (year === endYear) {
          const endMon = parseInt(dayjs(this.rangeFromTo.to).format("M"), 10);
          disabled = month > endMon;
        }
      }
      return disabled;
    },
    renderControl() {
      const h = this.$createElement;
      const {
        controllerOptions
      } = this;
      return h("div", {
        "class": `${this.componentName}__control`
      }, [h("div", {
        "class": `${this.componentName}__title`
      }, [renderLNodeJSX(this, "head", {
        params: controllerOptions
      })]), h("div", {
        "class": `${this.componentName}__control-section`
      }, [this.isYearVisible && h("div", {
        "class": `${this.componentName}__control-section-cell`
      }, [h("t-select", helper([{
        "attrs": {
          "size": this.controlSize,
          "disabled": this.isYearDisabled,
          "autoWidth": true
        }
      }, {
        "props": {
          ...this.controllerConfigData.year.selectProps
        }
      }, {
        "model": {
          value: this.curSelectedYear,
          callback: $$v => {
            this.curSelectedYear = $$v;
          }
        }
      }]), [this.yearSelectOptionList.map(item => h("t-option", {
        "key": item.value,
        "attrs": {
          "value": item.value,
          "label": item.label,
          "disabled": item.disabled
        }
      }, [item.label]))])]), this.curSelectedMode === "month" && this.isMonthVisible && h("div", {
        "class": `${this.componentName}__control-section-cell`
      }, [h("t-select", helper([{
        "attrs": {
          "size": this.controlSize,
          "disabled": this.isMonthDisabled,
          "autoWidth": true
        }
      }, {
        "props": {
          ...this.controllerConfigData.month.selectProps
        }
      }, {
        "model": {
          value: this.curSelectedMonth,
          callback: $$v => {
            this.curSelectedMonth = $$v;
          }
        }
      }]), [this.monthSelectOptionList.map(item => h("t-option", {
        "key": item.value,
        "attrs": {
          "value": item.value,
          "label": item.label,
          "disabled": item.disabled
        }
      }, [item.label]))])]), this.isModeVisible && h("div", {
        "class": `${this.componentName}__control-section-cell`,
        "style": "height: auto"
      }, [h("t-radio-group", helper([{
        "attrs": {
          "variant": "default-filled",
          "size": this.controlSize,
          "disabled": this.isModeDisabled
        }
      }, {
        "props": {
          ...this.controllerConfigData.mode.radioGroupProps
        }
      }, {
        "on": {
          "change": this.controllerChange
        },
        "model": {
          value: this.curSelectedMode,
          callback: $$v => {
            this.curSelectedMode = $$v;
          }
        }
      }]), [this.modeSelectOptionList.map(item => h("t-radio-button", {
        "key": item.value,
        "attrs": {
          "value": item.value
        }
      }, [item.label]))])]), this.theme === "full" && this.curSelectedMode === "month" && this.isWeekendToggleVisible && h("div", {
        "class": `${this.componentName}__control-section-cell`
      }, [h("t-check-tag", helper([{
        "class": `${this.componentName}__control-tag`,
        "attrs": {
          "defaultChecked": !this.isShowWeekend,
          "disabled": this.isWeekendToggleDisabled
        },
        "on": {
          "click": this.onWeekendToggleClick
        }
      }, {
        "props": {
          ...this.weekendBtnVBind
        }
      }]), [this.weekendBtnText])]), this.theme === "full" && this.isCurrentBtnVisible && h("div", {
        "class": `${this.componentName}__control-section-cell`
      }, [h("t-button", helper([{
        "attrs": {
          "size": this.controlSize,
          "disabled": this.isCurrentBtnDisabled
        },
        "on": {
          "click": () => {
            this.toToday();
          }
        }
      }, {
        "props": {
          ...this.currentBtnVBind
        }
      }]), [this.currentBtnText])])])]);
    }
  },
  render() {
    const h = arguments[0];
    const {
      calendarCls,
      calendarPanelCls,
      isControllerVisible,
      cellColHeaders,
      checkMonthCellColHeaderVisibled
    } = this;
    const monthBody = () => h("table", {
      "class": `${this.componentName}__table`
    }, [h("thead", {
      "class": `${this.componentName}__table-head`
    }, [h("tr", {
      "class": `${this.componentName}__table-head-row`
    }, [cellColHeaders.map((item, index) => checkMonthCellColHeaderVisibled(item) && h("th", {
      "class": `${this.componentName}__table-head-cell`
    }, [Array.isArray(this.week) ? this.week[index] : renderLNodeJSXDefault(this, "week", {
      defaultNode: h("span", [item.display]),
      params: this.getCalendarWeekSlotData(item)
    })]))])]), h("tbody", {
      "class": `${this.componentName}__table-body`
    }, [this.monthCellsData.map((week, weekIndex) => h("tr", {
      "class": `${this.componentName}__table-body-row`
    }, [week.map((item, itemIndex) => this.checkMonthCellItemShowed(item) && h("calendar-cell-item", {
      "key": `d-${weekIndex}-${itemIndex}`,
      "attrs": {
        "item": item,
        "theme": this.theme,
        "t": this.t,
        "global": this.global,
        "cell": this.cell,
        "fillWithZero": this.fillWithZero
      },
      "on": {
        "click": e => this.clickCell(e, item),
        "dblclick": e => this.doubleClickCell(e, item),
        "rightclick": e => this.rightClickCell(e, item)
      },
      "scopedSlots": {
        ...this.$scopedSlots
      }
    }))]))])]);
    const yearBody = () => h("table", {
      "class": `${this.componentName}__table`
    }, [h("tbody", {
      "class": `${this.componentName}__table-body`
    }, [this.yearCellsData.map((cell, cellIndex) => h("tr", {
      "class": `${this.componentName}__table-body-row`
    }, [cell.map((item, itemIndex) => h("calendar-cell-item", {
      "key": `m-${cellIndex}-${itemIndex}`,
      "attrs": {
        "item": item,
        "theme": this.theme,
        "t": this.t,
        "global": this.global,
        "cell": this.cell,
        "fillWithZero": this.fillWithZero
      },
      "on": {
        "click": e => this.clickCell(e, item),
        "dblclick": e => this.doubleClickCell(e, item),
        "rightclick": e => this.rightClickCell(e, item)
      },
      "scopedSlots": {
        ...this.$scopedSlots
      }
    }))]))])]);
    return h("div", {
      "class": calendarCls
    }, [isControllerVisible && this.renderControl(), h("div", {
      "class": calendarPanelCls
    }, [this.curSelectedMode === "month" ? monthBody() : yearBody()])]);
  }
});

export { _Calendar as default };
//# sourceMappingURL=calendar.js.map
