@adyen/bento-vue2 1.78.2 → 1.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +77 -28
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/ai-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/checkbox-group.css +1 -1
- package/dist/assets/dashboard-section.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/date-range-picker.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/form-layout-title.css +1 -1
- package/dist/assets/header-with-views.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/input-field-password.css +1 -1
- package/dist/assets/input-field-phone-number.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/layout-row.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/search-bar.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/step.css +1 -1
- package/dist/assets/structured-list-item.css +1 -1
- package/dist/assets/summary-grid.css +1 -1
- package/dist/assets/tab.css +1 -1
- package/dist/assets/teleport.css +1 -0
- package/dist/assets/toast.css +1 -1
- package/dist/assets/tooltip.css +1 -1
- package/dist/assets/tutorial.css +1 -1
- package/dist/assets/use-cached-selected-values.css +1 -1
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/chunks/{accordion-item.nQhXD2tV.js → accordion-item.G1q4zgBG.js} +2 -2
- package/dist/chunks/{accordion-item.nQhXD2tV.js.map → accordion-item.G1q4zgBG.js.map} +1 -1
- package/dist/chunks/{action-bar.MXZTIUNk.js → action-bar.DOaFj-A2.js} +3 -3
- package/dist/chunks/{action-bar.MXZTIUNk.js.map → action-bar.DOaFj-A2.js.map} +1 -1
- package/dist/chunks/{base-modal.BMdlCSd0.js → base-modal.BJ6315kP.js} +13 -13
- package/dist/chunks/{base-modal.BMdlCSd0.js.map → base-modal.BJ6315kP.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js → button-actions-with-menu.DPKvfKJY.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BFRkPi6g.js.map → button-actions-with-menu.DPKvfKJY.js.map} +1 -1
- package/dist/chunks/{button-actions.B81vY51z.js → button-actions.C3cP-anb.js} +228 -347
- package/dist/chunks/button-actions.C3cP-anb.js.map +1 -0
- package/dist/chunks/{calendar.Fm_dfQC5.js → calendar.Bhj58zR3.js} +4 -43
- package/dist/chunks/{calendar.Fm_dfQC5.js.map → calendar.Bhj58zR3.js.map} +1 -1
- package/dist/chunks/{card.VOCKI7Ad.js → card.XfRuWGfC.js} +2 -2
- package/dist/chunks/{card.VOCKI7Ad.js.map → card.XfRuWGfC.js.map} +1 -1
- package/dist/chunks/{checkbox-group.tm9zLXkK.js → checkbox-group.CGxWh-no.js} +35 -34
- package/dist/chunks/checkbox-group.CGxWh-no.js.map +1 -0
- package/dist/chunks/{checkbox.itbBlXev.js → checkbox.C6NSiW_I.js} +18 -18
- package/dist/chunks/{checkbox.itbBlXev.js.map → checkbox.C6NSiW_I.js.map} +1 -1
- package/dist/chunks/{code-snippet.trioWquF.js → code-snippet.bzFOFUj4.js} +5 -5
- package/dist/chunks/{code-snippet.trioWquF.js.map → code-snippet.bzFOFUj4.js.map} +1 -1
- package/dist/chunks/{codemirror.Zv80n3Z2.js → codemirror.Cy7iSLbd.js} +12 -12
- package/dist/chunks/{codemirror.Zv80n3Z2.js.map → codemirror.Cy7iSLbd.js.map} +1 -1
- package/dist/chunks/constructNow.BhymNmy5.js +8 -0
- package/dist/chunks/{constructNow.CHWWeLPc.js.map → constructNow.BhymNmy5.js.map} +1 -1
- package/dist/chunks/{controls-group.82mB_GDw.js → controls-group.D62vSDSk.js} +2 -2
- package/dist/chunks/{controls-group.82mB_GDw.js.map → controls-group.D62vSDSk.js.map} +1 -1
- package/dist/chunks/{copy.WQDLcs_T.js → copy.Hu3DFJwv.js} +2 -2
- package/dist/chunks/{copy.WQDLcs_T.js.map → copy.Hu3DFJwv.js.map} +1 -1
- package/dist/chunks/{country.CGn5WjFx.js → country.B3z3-QRY.js} +2 -2
- package/dist/chunks/{country.CGn5WjFx.js.map → country.B3z3-QRY.js.map} +1 -1
- package/dist/chunks/{dashboard-section.D1l7wDX3.js → dashboard-section.BvGMr9Vl.js} +4 -4
- package/dist/chunks/{dashboard-section.D1l7wDX3.js.map → dashboard-section.BvGMr9Vl.js.map} +1 -1
- package/dist/chunks/{dashed-underline.K-l-7bDq.js → dashed-underline.D107w00E.js} +13 -12
- package/dist/chunks/{dashed-underline.K-l-7bDq.js.map → dashed-underline.D107w00E.js.map} +1 -1
- package/dist/chunks/{data-grid-template.DGUDqzjj.js → data-grid-template.DShJunDa.js} +4 -4
- package/dist/chunks/{data-grid-template.DGUDqzjj.js.map → data-grid-template.DShJunDa.js.map} +1 -1
- package/dist/chunks/data-grid-template.keys.VezYtHtM.js +5 -0
- package/dist/chunks/{data-grid-template.keys.2_AkxuNT.js.map → data-grid-template.keys.VezYtHtM.js.map} +1 -1
- package/dist/chunks/{data-grid.CS7Q8EWs.js → data-grid.BzHb4GUA.js} +18 -18
- package/dist/chunks/{data-grid.CS7Q8EWs.js.map → data-grid.BzHb4GUA.js.map} +1 -1
- package/dist/chunks/{date-picker.DK-ndVN9.js → date-picker.Dvx50znw.js} +7 -7
- package/dist/chunks/{date-picker.DK-ndVN9.js.map → date-picker.Dvx50znw.js.map} +1 -1
- package/dist/chunks/{date-range-picker.BkZBhOfu.js → date-range-picker.DYYyE_e2.js} +313 -305
- package/dist/chunks/date-range-picker.DYYyE_e2.js.map +1 -0
- package/dist/chunks/{dialog-page.D23qNwKW.js → dialog-page.krM2wQpm.js} +2 -2
- package/dist/chunks/{dialog-page.D23qNwKW.js.map → dialog-page.krM2wQpm.js.map} +1 -1
- package/dist/chunks/{differenceInMonths.C8FyCrav.js → differenceInMonths.Cab3nOsb.js} +2 -2
- package/dist/chunks/{differenceInMonths.C8FyCrav.js.map → differenceInMonths.Cab3nOsb.js.map} +1 -1
- package/dist/chunks/{divider.CFbtmKeQ.js → divider.DX5gwN7p.js} +2 -2
- package/dist/chunks/{divider.CFbtmKeQ.js.map → divider.DX5gwN7p.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js → dropdown-default-textbox.uWZMxeI7.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.BCOVaw-a.js.map → dropdown-default-textbox.uWZMxeI7.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.DUP4wYAW.js → dropdown-tag.Ctn5KMFU.js} +4 -4
- package/dist/chunks/{dropdown-tag.DUP4wYAW.js.map → dropdown-tag.Ctn5KMFU.js.map} +1 -1
- package/dist/chunks/{dropdown.BiA1YOYJ.js → dropdown.BpT6ct8O.js} +28 -28
- package/dist/chunks/{dropdown.BiA1YOYJ.js.map → dropdown.BpT6ct8O.js.map} +1 -1
- package/dist/chunks/es6.MoTTyETW.js.map +1 -1
- package/dist/chunks/{events.CMzGybJJ.js → events.BQOQSSb7.js} +2 -5
- package/dist/chunks/{events.CMzGybJJ.js.map → events.BQOQSSb7.js.map} +1 -1
- package/dist/chunks/{field-label.Auq-Pzho.js → field-label.C3h8Q8Xd.js} +2 -2
- package/dist/chunks/{field-label.Auq-Pzho.js.map → field-label.C3h8Q8Xd.js.map} +1 -1
- package/dist/chunks/{file-uploader.DsvADlNb.js → file-uploader.CK6dhx8T.js} +109 -106
- package/dist/chunks/file-uploader.CK6dhx8T.js.map +1 -0
- package/dist/chunks/{filter-bar.F5drAPol.js → filter-bar.DpjD5bZe.js} +111 -115
- package/dist/chunks/filter-bar.DpjD5bZe.js.map +1 -0
- package/dist/chunks/{footer-actions.CLq_kBwY.js → footer-actions.DPjWGWhJ.js} +2 -2
- package/dist/chunks/{footer-actions.CLq_kBwY.js.map → footer-actions.DPjWGWhJ.js.map} +1 -1
- package/dist/chunks/{form-layout-title.DoF6ovPB.js → form-layout-title.B_oVSX5b.js} +2 -2
- package/dist/chunks/{form-layout-title.DoF6ovPB.js.map → form-layout-title.B_oVSX5b.js.map} +1 -1
- package/dist/chunks/form-layout.types.bZW9iR6_.js +5 -0
- package/dist/chunks/{form-layout.types.D3EKzbE7.js.map → form-layout.types.bZW9iR6_.js.map} +1 -1
- package/dist/chunks/get-slot-text.Bjb9dTSV.js.map +1 -1
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js → getTimezoneOffsetInMilliseconds.B7sxiukN.js} +2 -2
- package/dist/chunks/{getTimezoneOffsetInMilliseconds.BW7U6PxE.js.map → getTimezoneOffsetInMilliseconds.B7sxiukN.js.map} +1 -1
- package/dist/chunks/{header-meta.D-6dL1Vg.js → header-meta.qT3_T35I.js} +5 -5
- package/dist/chunks/{header-meta.D-6dL1Vg.js.map → header-meta.qT3_T35I.js.map} +1 -1
- package/dist/chunks/{header-with-views.CG5FKoC1.js → header-with-views.BSYbvDyP.js} +13 -13
- package/dist/chunks/{header-with-views.CG5FKoC1.js.map → header-with-views.BSYbvDyP.js.map} +1 -1
- package/dist/chunks/{header.DoWKsA15.js → header.CLDtv3Ir.js} +3 -3
- package/dist/chunks/{header.DoWKsA15.js.map → header.CLDtv3Ir.js.map} +1 -1
- package/dist/chunks/{info-icon.Bhka3oGh.js → info-icon.DGrrXpIY.js} +2 -2
- package/dist/chunks/{info-icon.Bhka3oGh.js.map → info-icon.DGrrXpIY.js.map} +1 -1
- package/dist/chunks/{input-field-password.FvLueqmb.js → input-field-password.uhQuUzyj.js} +103 -95
- package/dist/chunks/input-field-password.uhQuUzyj.js.map +1 -0
- package/dist/chunks/{input-field-phone-number.B-dlJc27.js → input-field-phone-number.BdbaTJwH.js} +1170 -1168
- package/dist/chunks/{input-field-phone-number.B-dlJc27.js.map → input-field-phone-number.BdbaTJwH.js.map} +1 -1
- package/dist/chunks/{input-field.B1MHu987.js → input-field.C4XJ53Cn.js} +87 -79
- package/dist/chunks/input-field.C4XJ53Cn.js.map +1 -0
- package/dist/chunks/{keyboard-navigation.pB8weElW.js → keyboard-navigation.DWmhelVv.js} +2 -2
- package/dist/chunks/{keyboard-navigation.pB8weElW.js.map → keyboard-navigation.DWmhelVv.js.map} +1 -1
- package/dist/chunks/{layout-row.BP3lZAOh.js → layout-row.DwdZbpVG.js} +2 -2
- package/dist/chunks/{layout-row.BP3lZAOh.js.map → layout-row.DwdZbpVG.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.DkPz3wPc.js → listbox-option-tag.B94BtpSU.js} +2 -2
- package/dist/chunks/{listbox-option-tag.DkPz3wPc.js.map → listbox-option-tag.B94BtpSU.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.BSKm6yn_.js → modal-fullscreen.B3Xx-Hoc.js} +33 -32
- package/dist/chunks/modal-fullscreen.B3Xx-Hoc.js.map +1 -0
- package/dist/chunks/{modal.Bp5twyjz.js → modal.D3OSxMF6.js} +4 -4
- package/dist/chunks/{modal.Bp5twyjz.js.map → modal.D3OSxMF6.js.map} +1 -1
- package/dist/chunks/{pagination.D1C0cURM.js → pagination.Bvhpu21H.js} +2 -2
- package/dist/chunks/{pagination.D1C0cURM.js.map → pagination.Bvhpu21H.js.map} +1 -1
- package/dist/chunks/{payment-method.CcASYR3B.js → payment-method.C8Ie97qE.js} +2 -2
- package/dist/chunks/{payment-method.CcASYR3B.js.map → payment-method.C8Ie97qE.js.map} +1 -1
- package/dist/chunks/promo-banner.DikQcQU2.js.map +1 -1
- package/dist/chunks/{radio-group.DmKiTjS8.js → radio-group.BTu23ZgN.js} +5 -5
- package/dist/chunks/{radio-group.DmKiTjS8.js.map → radio-group.BTu23ZgN.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.DzH-Z5oi.js → rich-text-editor.BtcSjFpF.js} +12 -12
- package/dist/chunks/{rich-text-editor.DzH-Z5oi.js.map → rich-text-editor.BtcSjFpF.js.map} +1 -1
- package/dist/chunks/{search-bar.Cvw_nY5M.js → search-bar.BcHoTrjP.js} +11 -11
- package/dist/chunks/search-bar.BcHoTrjP.js.map +1 -0
- package/dist/chunks/{secondary-nav.CUF6QWjI.js → secondary-nav.DEThy9WH.js} +3 -3
- package/dist/chunks/{secondary-nav.CUF6QWjI.js.map → secondary-nav.DEThy9WH.js.map} +1 -1
- package/dist/chunks/{segmented-control.Cma_nu0G.js → segmented-control.Dj_ZKhmU.js} +2 -2
- package/dist/chunks/{segmented-control.Cma_nu0G.js.map → segmented-control.Dj_ZKhmU.js.map} +1 -1
- package/dist/chunks/{selection-card-group.Ddli4Llk.js → selection-card-group.Rz_rTBRp.js} +11 -11
- package/dist/chunks/{selection-card-group.Ddli4Llk.js.map → selection-card-group.Rz_rTBRp.js.map} +1 -1
- package/dist/chunks/{sidepanel.A9yG4FP_.js → sidepanel.ClG3dhHf.js} +4 -4
- package/dist/chunks/{sidepanel.A9yG4FP_.js.map → sidepanel.ClG3dhHf.js.map} +1 -1
- package/dist/chunks/{step.TzzZSA9f.js → step.Cnqr8i4V.js} +3 -3
- package/dist/chunks/{step.TzzZSA9f.js.map → step.Cnqr8i4V.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CMsVwwA6.js → structured-list-item.zoY-ATTu.js} +5 -5
- package/dist/chunks/{structured-list-item.CMsVwwA6.js.map → structured-list-item.zoY-ATTu.js.map} +1 -1
- package/dist/chunks/summary-grid.keys.Xx-W5a2w.js +6 -0
- package/dist/chunks/{summary-grid.keys.CxTf_FOc.js.map → summary-grid.keys.Xx-W5a2w.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.CaYrtyVO.js → summary-grid.types.BA0XCVKK.js} +21 -21
- package/dist/chunks/summary-grid.types.BA0XCVKK.js.map +1 -0
- package/dist/chunks/{tab.CTui3j3e.js → tab.DXE68qVf.js} +2 -2
- package/dist/chunks/{tab.CTui3j3e.js.map → tab.DXE68qVf.js.map} +1 -1
- package/dist/chunks/tabs.keys.B4qGhjp2.js +7 -0
- package/dist/chunks/{tabs.keys.Cb4Vw5Jh.js.map → tabs.keys.B4qGhjp2.js.map} +1 -1
- package/dist/chunks/{tag.BltIbSh3.js → tag.BdCP2CN_.js} +2 -2
- package/dist/chunks/{tag.BltIbSh3.js.map → tag.BdCP2CN_.js.map} +1 -1
- package/dist/chunks/teleport.dQFcCuAw.js +128 -0
- package/dist/chunks/teleport.dQFcCuAw.js.map +1 -0
- package/dist/chunks/{textarea.CLWZRnAt.js → textarea.DaNiOOJ7.js} +3 -3
- package/dist/chunks/{textarea.CLWZRnAt.js.map → textarea.DaNiOOJ7.js.map} +1 -1
- package/dist/chunks/{timeline-item.HbtUj1j_.js → timeline-item.D2HsuNh-.js} +7 -7
- package/dist/chunks/{timeline-item.HbtUj1j_.js.map → timeline-item.D2HsuNh-.js.map} +1 -1
- package/dist/chunks/toast.CA5H8vr9.js +174 -0
- package/dist/chunks/toast.CA5H8vr9.js.map +1 -0
- package/dist/chunks/{tooltip.D3SDcRef.js → tooltip.Dt87KVh2.js} +2 -2
- package/dist/chunks/{tooltip.D3SDcRef.js.map → tooltip.Dt87KVh2.js.map} +1 -1
- package/dist/chunks/{tutorial.B32GMtIj.js → tutorial.C-q4mxUb.js} +4 -4
- package/dist/chunks/{tutorial.B32GMtIj.js.map → tutorial.C-q4mxUb.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js → use-bento-toast-controller.BhtohoS1.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.BKHU1qBv.js.map → use-bento-toast-controller.BhtohoS1.js.map} +1 -1
- package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js → use-cached-selected-values.FoXcm49J.js} +3 -3
- package/dist/chunks/{use-cached-selected-values.BZd3CTeP.js.map → use-cached-selected-values.FoXcm49J.js.map} +1 -1
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js → use-form-layout-loading.CWbjZiwP.js} +2 -2
- package/dist/chunks/{use-form-layout-loading.D3lALhtC.js.map → use-form-layout-loading.CWbjZiwP.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/country.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +289 -288
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +1 -1
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/internal.js +27 -26
- package/dist/internal.js.map +1 -1
- package/dist/layout.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/pagination.js +1 -1
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/segmented-control.js +1 -1
- package/dist/selection-card.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/styles/bento-dark.css +4 -1
- package/dist/styles/bento-light.css +4 -1
- package/dist/styles/bento.css +4 -1
- package/dist/styles/legacy.css +4 -1
- package/dist/styles/styleguide.css +4 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/use-form-v4.js +8 -8
- package/dist/use-form-v4.js.map +1 -1
- package/dist/web-types.json +105 -5
- package/package.json +8 -7
- package/dist/chunks/button-actions.B81vY51z.js.map +0 -1
- package/dist/chunks/checkbox-group.tm9zLXkK.js.map +0 -1
- package/dist/chunks/constructNow.CHWWeLPc.js +0 -8
- package/dist/chunks/data-grid-template.keys.2_AkxuNT.js +0 -5
- package/dist/chunks/date-range-picker.BkZBhOfu.js.map +0 -1
- package/dist/chunks/file-uploader.DsvADlNb.js.map +0 -1
- package/dist/chunks/filter-bar.F5drAPol.js.map +0 -1
- package/dist/chunks/form-layout.types.D3EKzbE7.js +0 -5
- package/dist/chunks/input-field-password.FvLueqmb.js.map +0 -1
- package/dist/chunks/input-field.B1MHu987.js.map +0 -1
- package/dist/chunks/modal-fullscreen.BSKm6yn_.js.map +0 -1
- package/dist/chunks/search-bar.Cvw_nY5M.js.map +0 -1
- package/dist/chunks/summary-grid.keys.CxTf_FOc.js +0 -6
- package/dist/chunks/summary-grid.types.CaYrtyVO.js.map +0 -1
- package/dist/chunks/tabs.keys.Cb4Vw5Jh.js +0 -7
- package/dist/chunks/toast.B4J4V6n-.js +0 -171
- package/dist/chunks/toast.B4J4V6n-.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.Fm_dfQC5.js","sources":["../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.types.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.props.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js","../../src/components/internal/calendar/components/calendar-month/calendar-month.types.ts","../../src/components/internal/calendar/components/calendar-year/calendar-year.types.ts","../../src/components/internal/calendar/calendar.types.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addMonths.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDaysInMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/setMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/set.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subMonths.js","../../src/components/internal/calendar/components/calendar-month/composables/move-calendar-date.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/setDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isWithinInterval.js","../../src/components/internal/calendar/components/calendar-month/calendar-month.vue","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameMonth.js","../../src/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.types.ts","../../src/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.vue","../../src/components/internal/calendar/components/calendar-year/calendar-year.vue","../../src/components/internal/calendar/composables/use-single-pane.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isBefore.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isAfter.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfQuarter.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfQuarter.js","../../src/components/internal/calendar/composables/use-granularity-adjustments.ts","../../src/components/internal/calendar/composables/use-range-pane.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addYears.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subYears.js","../../src/components/internal/calendar/calendar.vue"],"sourcesContent":["export enum CalendarMonthDayVariant {\n SINGLE = 'single',\n MIDDLE = 'middle',\n BEGINNING = 'beginning',\n END = 'end',\n}\n\nexport enum CalendarMonthDayClass {\n // Variant\n SINGLE = CalendarMonthDayVariant.SINGLE,\n MIDDLE = CalendarMonthDayVariant.MIDDLE,\n BEGINNING = CalendarMonthDayVariant.BEGINNING,\n END = CalendarMonthDayVariant.END,\n\n // Selected\n SELECTED = 'selected',\n UNSELECTED = 'unselected',\n\n // Current day\n CURRENT_DAY = 'current-day',\n\n // Disabled\n DISABLED = 'disabled',\n}\n\nexport enum CalendarMonthDayEvent {\n CLICK = 'click',\n MOUSE_OVER = 'mouseover',\n}\n","import { type PropType } from 'vue';\nimport { CalendarMonthDayVariant } from './calendar-month-day.types';\n\nexport const CalendarMonthDateProps = {\n /**\n * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)\n */\n day: { type: Date, required: true },\n\n /**\n * Indicate if a date should be disabled or not\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Changes the state of the calendar day to selected.\n */\n selected: { type: Boolean, default: false },\n\n /**\n * When the day is selected, this indicates if the selection is a single date or part of a range.\n * If it's a range it can be at the beginning, middle or end of the selection.\n */\n variant: {\n type: String as PropType<CalendarMonthDayVariant>,\n default: CalendarMonthDayVariant.SINGLE,\n validator: (value: CalendarMonthDayVariant) => Object.values(CalendarMonthDayVariant).includes(value),\n },\n};\n","<template>\n <td\n class=\"b-calendar-month-day\"\n :class=\"conditionalClasses\"\n :tabindex=\"selected ? '0' : '-1'\"\n :aria-selected=\"selected ? selected : undefined\"\n :aria-disabled=\"disabled\"\n :aria-current=\"isCurrentDay ? 'date' : undefined\"\n :data-date=\"day.toDateString()\"\n @click=\"e => onClick(e, day)\"\n @mouseover=\"$emit(CalendarMonthDayEvent.MOUSE_OVER)\"\n @keydown.space.enter=\"e => onClick(e, day)\"\n >\n <div class=\"b-calendar-month-day__wrapper\">\n <bento-date class=\"b-calendar-month-day__label\" :date=\"day\" :format=\"BentoDateFormat.DAY_OF_MONTH\" />\n </div>\n </td>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoDate, BentoDateFormat } from '@/components/date';\n import { CalendarMonthDayClass, CalendarMonthDayEvent, CalendarMonthDayVariant } from './calendar-month-day.types';\n import { CalendarMonthDateProps } from './calendar-month-day.props';\n\n /**\n * Handles the styles and states of the individual dates of the calendar.\n *\n * @example\n * import { CalendarMonthDay, CalendarMonthDayVariant } from './calendar-day';\n *\n * export default {\n * components: { CalendarMonthDay },\n * template: `\n * <table>\n * <tbody>\n * <tr>\n * <calendar-day\n * :day=\"new Date()\"\n * disabled\n * selected\n * :variant=\"CalendarMonthDayVariant.MIDDLE\"\n * />\n * </tr>\n * </tbody>\n * </table>\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar-month-day',\n components: { BentoDate },\n inheritAttrs: true,\n props: CalendarMonthDateProps,\n emits: [CalendarMonthDayEvent.CLICK, CalendarMonthDayEvent.MOUSE_OVER],\n setup(props, { emit }) {\n const isCurrentDay = computed(() => {\n const today = new Date();\n return (\n props.day.getDate() === today.getDate() &&\n props.day.getMonth() === today.getMonth() &&\n props.day.getFullYear() === today.getFullYear()\n );\n });\n\n const conditionalClasses = computed(() => ({\n // Variants\n [`b-calendar-month-day--${CalendarMonthDayClass.BEGINNING}`]:\n props.variant === CalendarMonthDayVariant.BEGINNING,\n [`b-calendar-month-day--${CalendarMonthDayClass.MIDDLE}`]:\n props.variant === CalendarMonthDayVariant.MIDDLE,\n [`b-calendar-month-day--${CalendarMonthDayClass.END}`]: props.variant === CalendarMonthDayVariant.END,\n [`b-calendar-month-day--${CalendarMonthDayClass.SINGLE}`]:\n props.variant === CalendarMonthDayVariant.SINGLE,\n\n // Selected\n [`b-calendar-month-day--${CalendarMonthDayClass.UNSELECTED}`]: !props.selected,\n [`b-calendar-month-day--${CalendarMonthDayClass.SELECTED}`]: props.selected,\n\n // Current Day\n [`b-calendar-month-day--${CalendarMonthDayClass.CURRENT_DAY}`]: isCurrentDay.value,\n\n // Disabled\n [`b-calendar-month-day--${CalendarMonthDayClass.DISABLED}`]: props.disabled,\n }));\n\n const onClick = (e: MouseEvent | KeyboardEvent, selectedDay: Date) => {\n if (!props.disabled) {\n emit(CalendarMonthDayEvent.CLICK, selectedDay, props.day);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return {\n // Values\n conditionalClasses,\n isCurrentDay,\n\n // Enums\n BentoDateFormat,\n CalendarMonthDayEvent,\n\n // Events\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month-day.scss\" />\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","export enum CalendarMonthEvent {\n INPUT = 'input',\n MOUSE_OVER = 'mouseover',\n CHANGE_DAY = 'changeDay',\n NEXT_MONTH = 'nextMonth',\n PREVIOUS_MONTH = 'previousMonth',\n}\n\nexport enum CalendarMonthFirstDayOfWeek {\n MONDAY = 1,\n SATURDAY = 6,\n SUNDAY = 0,\n}\n\nexport type CalendarMonthIsDateDisabled = (date: Date) => boolean;\n","export enum CalendarYearPosition {\n FIRST = 'first',\n LAST = 'last',\n MIDDLE = 'middle',\n UNIQUE = 'unique',\n}\n\n/**\n * Private types\n */\nexport interface CalendarYearProps {\n /**\n * end of the selected range\n */\n endDate?: Date;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: (date: Date) => boolean;\n\n /**\n * Indicates if the calendar is part of a range date picker or a single date picker\n */\n isRange?: boolean;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min?: Date;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max?: Date;\n\n /**\n * When rendering multiple calendars, this property allows to render the\n * Next and Previous calendar buttons to the right, left or not at all\n * depending on the position: Unique (only 1), First, Middle or Last\n */\n position?: `${CalendarYearPosition}`;\n\n /**\n * start of the selected range\n */\n startDate?: Date;\n\n /**\n * Year to be displayed in the calendar\n */\n year: Date;\n}\n","import { type Ref, type UnwrapNestedRefs } from 'vue';\nimport type { Day } from 'date-fns';\n\nexport { CalendarMonthFirstDayOfWeek as CalendarFirstDayOfWeek } from './components/calendar-month/calendar-month.types';\nexport type { CalendarMonthIsDateDisabled as CalendarIsDateDisabled } from './components/calendar-month/calendar-month.types';\n\nexport { CalendarYearPosition as CalendarPosition } from './components/calendar-year/calendar-year.types';\n\nexport type CalendarGranularityType = 'daily' | 'weekly' | 'monthly' | 'quarterly';\n\nexport interface CalendarGranularityConfig<T extends CalendarGranularityType = CalendarGranularityType> {\n type: T;\n earliest?: Date;\n latest?: Date;\n disabled?: boolean;\n}\n\nexport interface CalendarRangeDateValue {\n startDate: Date;\n endDate: Date;\n granularity?: CalendarGranularityType;\n range?: string;\n}\n\nexport type CalendarSingleDateValue = Date;\nexport type CalendarValue = CalendarSingleDateValue | CalendarRangeDateValue;\n\ninterface UseCalendarPaneProps {\n isDateDisabled?: (date: Date) => boolean;\n maxRange?: Ref<number>;\n selectedDate: Ref<CalendarValue>;\n granularity?: Ref<CalendarGranularityConfig>;\n firstDayOfWeek: Day;\n min?: Ref<Date>;\n max?: Ref<Date>;\n}\n\nexport type UseCalendarPane = (\n propRefs: UseCalendarPaneProps,\n emit\n) => {\n internalValue: UnwrapNestedRefs<CalendarRangeDateValue>;\n onDateInput: (date: Date) => void;\n onMouseOver: (date: Date) => void;\n};\n\nexport enum CalendarEvent {\n INPUT = 'input',\n START_DATE_SELECTED = 'start-date-selected',\n END_DATE_SELECTED = 'end-date-selected',\n}\n\n/**\n * Private types\n */\nexport enum CalendarVariant {\n DAY = 'day',\n MONTH = 'month',\n}\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { setMonth } from \"./setMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link set} function options.\n */\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n * @param options - The options\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport function set(date, values, options) {\n let _date = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) return constructFrom(options?.in || date, NaN);\n\n if (values.year != null) _date.setFullYear(values.year);\n if (values.month != null) _date = setMonth(_date, values.month);\n if (values.date != null) _date.setDate(values.date);\n if (values.hours != null) _date.setHours(values.hours);\n if (values.minutes != null) _date.setMinutes(values.minutes);\n if (values.seconds != null) _date.setSeconds(values.seconds);\n if (values.milliseconds != null) _date.setMilliseconds(values.milliseconds);\n\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { nextTick, type Ref, ref, watch } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { CalendarMonthEvent, type CalendarMonthFirstDayOfWeek } from '../calendar-month.types';\nimport type { SetupContext } from 'vue/types/v3-setup-context';\nimport { addDays } from 'date-fns/addDays';\nimport { addMonths } from 'date-fns/addMonths';\nimport { differenceInMonths } from 'date-fns/differenceInMonths';\nimport { endOfWeek } from 'date-fns/endOfWeek';\nimport { set } from 'date-fns/set';\nimport { startOfWeek } from 'date-fns/startOfWeek';\nimport { startOfYear } from 'date-fns/startOfYear';\nimport { subDays } from 'date-fns/subDays';\nimport { subMonths } from 'date-fns/subMonths';\n\ninterface UseMoveCalendarDate {\n currentSelectedDate: Ref<Date>;\n month: Ref<Date>;\n isDateDisabled?: (currentDate: Date) => boolean;\n firstDayOfWeek?:\n | CalendarMonthFirstDayOfWeek.MONDAY\n | CalendarMonthFirstDayOfWeek.SATURDAY\n | CalendarMonthFirstDayOfWeek.SUNDAY;\n}\n\nexport const useMoveCalendarDate = (\n { currentSelectedDate, month, isDateDisabled, firstDayOfWeek }: UseMoveCalendarDate,\n emit: SetupContext['emit']\n) => {\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop\n const baseDate = ref(new Date(month.value));\n watch(\n month,\n () => {\n baseDate.value = month.value;\n },\n { immediate: true }\n );\n\n /**\n * Internal date used to actvate the dates through keyboard without\n * selecting it. This allows to easily move around the dates.\n */\n const internalDate = ref(new Date(currentSelectedDate.value));\n\n watch(currentSelectedDate, () => {\n internalDate.value = new Date(currentSelectedDate.value);\n });\n\n /**\n * For ranged dates, we need to keep track of the date that is currently being focused.\n * The first click is always to set the start date and the next click is for the end date.\n * Hence, to increment/decrement dates, we identify via `[data-date]` attribute as we need it to effectively +/-1 day for keyboard navigation.\n */\n const activeElement = useActiveElement();\n const focusedDate = ref<Date>(internalDate.value);\n\n watch(activeElement, el => {\n const currentDate = el.getAttribute('data-date');\n\n focusedDate.value = currentDate ? new Date(currentDate) : internalDate.value;\n });\n\n // Refs for calendar days\n const calendarRef = ref({});\n /**\n * High order function that maps each day in the calendar to their resopective Vue element ref.\n * Adds a day reference into \"calendarRef\" to be allow calendar navigation.\n * Each item is a key-value pair, where the key is the date in string form and\n * the value is the ref to the element.\n *\n *\n * @param {Date} day - Date to be added to the ref\n * @returns {Function} Maps the element ref to a date\n */\n const addDayRef = (day: Date) => enteringRef => {\n calendarRef.value[day.toDateString()] = enteringRef;\n };\n\n /**\n * Reset calendar references of each day of the month\n */\n const clearCalendarRefs = () => {\n calendarRef.value = {};\n };\n\n /**\n * Calculates what the next month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showNextMonth = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.NEXT_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Calculates what the previous month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showPreviousMonth = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.PREVIOUS_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Changes focus to the indicated date.\n * Exposed to the component to set the initial focused date, which can also be null.\n * @param dateToBeFocusedOn - Date to be focused on\n * @param getFocusedElement - Get the element to be focused on instead of automatically focusing on it\n */\n const focusOnDate = (dateToBeFocusedOn: Date, getFocusedElement?: boolean): Element | null => {\n const dateExistsInCalendar = !!calendarRef.value[dateToBeFocusedOn?.toDateString()];\n\n // Focus only if the date exists\n if (!dateToBeFocusedOn || !dateExistsInCalendar) {\n return null;\n }\n\n if (getFocusedElement) {\n return calendarRef.value[dateToBeFocusedOn.toDateString()].$el;\n }\n\n calendarRef.value[dateToBeFocusedOn.toDateString()].$el.focus();\n\n return null;\n };\n\n /**\n * Prevents the event from bubbling\n * @param {Event} event - Triggered event\n */\n const stopPropagation = (event: Event) => {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n };\n\n // Keyboard Navigation events\n interface ChangeDate {\n nextDate: Date;\n isIncreasingDays: boolean;\n amountOfMonths?: number;\n isCalendarButtonsNav?: boolean;\n }\n /**\n * Activates the date passed in \"nextDate\".\n * Doesn't trigger the emit event to select the date, given this is only done\n * when the \"Enter\" key is pressed.\n *\n * The date passed is evaluated to check if it's the same month and year,\n * if not then a new month is rendered through {@see showNextMonth} or {@see showPreviousMonth}.\n *\n * If the date passed is disabled no action is taken.\n *\n * @param {Date} nextDate - Date to be processed and if it's not disabled it should make it active.\n * @param {Boolean} isIncreasinDays - Indicates if the date before or after the currently selected date.\n * @param {Number} amountOfMonths - Amount of months it's increasing or decreasing. Used to calculate the month to be rendered\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const changeDate = ({ nextDate, isIncreasingDays, amountOfMonths, isCalendarButtonsNav }: ChangeDate) => {\n // Do not change date if nextDay is disabled\n if (!isCalendarButtonsNav && isDateDisabled && isDateDisabled(nextDate)) {\n return;\n }\n\n const isNextDaySameMonthAndYear =\n nextDate.getMonth() === internalDate.value.getMonth() &&\n nextDate.getFullYear() === internalDate.value.getFullYear();\n // If it's in the same month, make \"nextDate\" the active date (not selected)\n if (isNextDaySameMonthAndYear) {\n internalDate.value = nextDate;\n focusOnDate(nextDate);\n } else {\n // Show next/previous month\n // and waits for the refs to be re-populated\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n isIncreasingDays ? showNextMonth(amountOfMonths) : showPreviousMonth(amountOfMonths);\n nextTick(() => {\n const isNextDateInTheDisplayedMonthAndYear =\n nextDate.getMonth() === baseDate.value.getMonth() &&\n nextDate.getFullYear() === baseDate.value.getFullYear();\n\n if ((isDateDisabled && isDateDisabled(nextDate)) || !isNextDateInTheDisplayedMonthAndYear) {\n return;\n }\n\n if (!isCalendarButtonsNav) {\n internalDate.value = nextDate;\n\n focusOnDate(nextDate);\n }\n });\n }\n };\n\n /**\n * Move the current date to the next calendar day\n * @param {Event} event - Triggered event\n */\n const moveToNextDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 1;\n changeDate({ nextDate: addDays(focusedDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the previous calendar day\n * @param {Event} event - Triggered event\n */\n const moveToPreviousDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 1;\n changeDate({ nextDate: subDays(focusedDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the previous week\n * @param {Event} event - Triggered event\n */\n const moveToPreviousWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 7;\n changeDate({ nextDate: subDays(focusedDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the next week\n * @param {Event} event - Triggered event\n */\n const moveToNextWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 7;\n changeDate({ nextDate: addDays(focusedDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the first day of the week\n * @param {Event} event - Triggered event\n */\n const moveToFirstDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: startOfWeek(focusedDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: false,\n });\n };\n\n /**\n * Move the current date to the last day of the week\n * @param {Event} event - Triggered event\n */\n const moveToLastDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: endOfWeek(focusedDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: true,\n });\n };\n\n /**\n * Move the current date to the same day in the previous year\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const moveToPreviousYear = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToSubstract = 12;\n changeDate({\n nextDate: subMonths(focusedDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the previous month.\n * If the date doesn't exists, moves to the last day of th month.\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n * @param {number} amount - The amount of months to move to\n */\n const moveToPreviousMonth = (event: Event, isCalendarButtonsNav = false, amount = 1) => {\n stopPropagation(event);\n\n const monthsToSubstract = amount;\n\n changeDate({\n nextDate: subMonths(focusedDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the next year\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const moveToNextYear = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToAdd = 12;\n changeDate({\n nextDate: addMonths(focusedDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the next month.\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n * @param {number} amount - The amount of months to move to\n */\n const moveToNextMonth = (event: Event, isCalendarButtonsNav = false, amount = 1) => {\n stopPropagation(event);\n\n const monthsToAdd = amount;\n\n changeDate({\n nextDate: addMonths(focusedDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the first month of the year\n * @param {Event} event - Triggered event\n */\n const moveToFirstMonthOfYear = (event: Event) => {\n stopPropagation(event);\n\n const monthsShifting = differenceInMonths(internalDate.value, startOfYear(internalDate.value));\n\n changeDate({\n nextDate: startOfYear(internalDate.value),\n isIncreasingDays: false,\n amountOfMonths: monthsShifting,\n });\n };\n\n /**\n * Move the current date to the first month of the year\n * @param {Event} event - Triggered event\n */\n const moveToLastMonthOfYear = (event: Event) => {\n stopPropagation(event);\n\n // First day of last year, so that focusOnDate finds the target\n const lastMonth = set(internalDate.value, { month: 11, date: 1 });\n const monthsShifting = differenceInMonths(lastMonth, internalDate.value);\n\n changeDate({\n nextDate: lastMonth,\n isIncreasingDays: true,\n amountOfMonths: monthsShifting,\n });\n };\n\n return {\n // Calendar days ref\n calendarRef,\n addDayRef,\n\n /**\n * Month navigation\n */\n showNextMonth,\n showPreviousMonth,\n\n /**\n * Focus method\n */\n focusOnDate,\n\n /**\n * Day navigation\n */\n\n // ArrowRight\n moveToNextDay,\n // ArrowLeft\n moveToPreviousDay,\n // ArrowUp\n moveToPreviousWeek,\n // ArrowDown\n moveToNextWeek,\n // Home\n moveToFirstDayOfWeek,\n moveToFirstMonthOfYear,\n // End\n moveToLastDayOfWeek,\n moveToLastMonthOfYear,\n // PageUp\n moveToPreviousMonth,\n // Shift+PageUp\n moveToPreviousYear,\n // PageDown\n moveToNextMonth,\n // Shift-PageDown\n moveToNextYear,\n\n // Values\n internalDate,\n baseDate,\n };\n};\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { addDays } from \"./addDays.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDay} function options.\n */\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the week of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the day of the week set\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * const result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setDay(date, day, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const date_ = toDate(date, options?.in);\n const currentDay = date_.getDay();\n\n const remainder = day % 7;\n const dayIndex = (remainder + 7) % 7;\n\n const delta = 7 - weekStartsOn;\n const diff =\n day < 0 || day > 6\n ? day - ((currentDay + delta) % 7)\n : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link isWithinInterval} function options.\n */\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * @param date - The date to check\n * @param interval - The interval to check\n * @param options - An object with options\n *\n * @returns The date is within the interval\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => false\n *\n * @example\n * // For date equal to the interval start:\n * isWithinInterval(date, { start, end: date })\n * // => true\n *\n * @example\n * // For date equal to the interval end:\n * isWithinInterval(date, { start: date, end })\n * // => true\n */\nexport function isWithinInterval(date, interval, options) {\n const time = +toDate(date, options?.in);\n const [startTime, endTime] = [\n +toDate(interval.start, options?.in),\n +toDate(interval.end, options?.in),\n ].sort((a, b) => a - b);\n\n return time >= startTime && time <= endTime;\n}\n\n// Fallback for modularized imports:\nexport default isWithinInterval;\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-calendar-month\" v-on=\"listeners\">\n <div class=\"b-calendar-month__month-selector\">\n <!-- go to previous month -->\n <div class=\"b-calendar-month__previous\">\n <bento-button\n v-if=\"shouldShowPreviousMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToPreviousMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-left-icon :svg-title=\"t('previousMonth')\" />\n </template>\n </bento-button>\n </div>\n\n <!-- month's name -->\n <bento-typography :id=\"monthLabelId\" el=\"h2\" variant=\"title\" aria-live=\"polite\">\n {{ formattedMonthDate }}\n </bento-typography>\n\n <!-- go to next month -->\n <div class=\"b-calendar-month__next\">\n <bento-button\n v-if=\"shouldShowNextMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToNextMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-right-icon :svg-title=\"t('nextMonth')\" />\n </template>\n </bento-button>\n </div>\n </div>\n <table class=\"b-calendar-month__month-container\" role=\"grid\" :aria-labelledby=\"monthLabelId\">\n <thead>\n <tr class=\"b-calendar-month__week-header\">\n <th\n v-for=\"(dayOfWeekFormatted, index) in daysOfWeek\"\n :key=\"index\"\n class=\"b-calendar-month__day-of-week\"\n scope=\"col\"\n >\n <bento-typography class=\"b-calendar-month__day-of-week-font\" el=\"span\" variant=\"caption\">\n {{ dayOfWeekFormatted }}\n </bento-typography>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(week, index) in weeksOfMonth\" :key=\"index\">\n <td v-if=\"index === 0 && week.length < 7\" :colspan=\"7 - week.length\"> </td>\n <calendar-month-day\n v-for=\"(day, dayIndex) in week\"\n :ref=\"addDayRef(day)\"\n :key=\"`calendar-day-${dayIndex}`\"\n :day=\"day\"\n :disabled=\"computedIsDateDisabled(day)\"\n :selected=\"isSelectedDate(day)\"\n :variant=\"dayVariant(day)\"\n @click=\"onDayClicked\"\n @mouseover=\"$emit(CalendarMonthEvent.MOUSE_OVER, day)\"\n @keyup.up.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.down.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.left.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.right.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n />\n </tr>\n <template v-if=\"weeksOfMonth?.length < 6\">\n <tr v-for=\"n in 6 - weeksOfMonth?.length\" :key=\"`calendar month filler row ${n}`\">\n <td aria-hidden=\"true\" class=\"b-calendar-month__empty-cell-filler\" :colspan=\"7\"></td>\n </tr>\n </template>\n </tbody>\n </table>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, toRef } from 'vue';\n import BentoButton from '@/components/button/button.vue';\n import { CalendarMonthDay, CalendarMonthDayVariant } from './components/calendar-month-day';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import {\n CalendarMonthEvent,\n CalendarMonthFirstDayOfWeek,\n type CalendarMonthIsDateDisabled,\n } from './calendar-month.types';\n import { CalendarPosition } from '@/internal/calendar/calendar.types';\n import { generateUid } from '@/core/utils/ts';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { useMoveCalendarDate } from './composables/move-calendar-date';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { setDay } from 'date-fns/setDay';\n import { startOfMonth } from 'date-fns/startOfMonth';\n import { startOfDay } from 'date-fns/startOfDay';\n import { format } from 'date-fns/format';\n import { isSameDay } from 'date-fns/isSameDay';\n import { isWithinInterval } from 'date-fns/isWithinInterval';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * CalendarMonth that displays all the days of a given month and allows\n * to move back and forth the visible month with the Next and Previous buttons\n *\n * @example\n * import { CalendarMonthMonth, CalendarMonthFirstDayOfWeek, CalendarPosition } from '@/internal/calendar';\n *\n * export default {\n * components: { CalendarMonthMonth },\n * template: `\n * <calendar\n * :first-day-of-week=\"CalendarMonthFirstDayOfWeek.SUNDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :month=\"new Date()\"\n * :position=\"CalendarPosition.LAST\"\n * is-range\n * :start-date=\"new Date()\"\n * :end-date=\"new Date()\"\n * @input=\"(selectedDate: Date) => void\"\n * @mouseover=\"(event: Event) => void\"\n * @nextMonth=\"() => void\"\n * @previousMonth=\"() => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'calendar-month',\n components: {\n BentoButton,\n BentoTypography,\n CalendarMonthDay,\n ChevronLeftIcon,\n ChevronRightIcon,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * end of the selected range\n */\n endDate: { type: Date, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: {\n type: Number as PropType<CalendarMonthFirstDayOfWeek>,\n default: CalendarMonthFirstDayOfWeek.MONDAY,\n validator: (value: CalendarMonthFirstDayOfWeek) =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(value),\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: { type: Function as PropType<CalendarMonthIsDateDisabled>, default: undefined },\n\n /**\n * Indicates if the calendar is part of a range date picker or a sigle date picker\n */\n isRange: { type: Boolean, default: false },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: { type: Date, default: null },\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: { type: Date, default: null },\n\n /**\n * Month of the year to be displayed in the calendar\n */\n month: { type: Date, required: true },\n\n /**\n * When rendering multiple calendars, this property allows to render the\n * Next and Previous calendar buttons to the right, left or not at all\n * depending on the position: Unique (only 1), First, Middle or Last\n */\n position: {\n type: String as PropType<`${CalendarPosition}`>,\n default: 'unique',\n validator: (value: CalendarPosition) => Object.values(CalendarPosition).includes(value),\n },\n\n /**\n * start of the selected range\n */\n startDate: { type: Date, default: null }, // can be undefined, eslint complains without default\n },\n emits: [\n CalendarMonthEvent.CHANGE_DAY,\n CalendarMonthEvent.INPUT,\n CalendarMonthEvent.NEXT_MONTH,\n CalendarMonthEvent.PREVIOUS_MONTH,\n CalendarMonthEvent.MOUSE_OVER,\n ],\n setup(props, { emit }) {\n // Date formatter locale options\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = getDateLocale();\n const monthLabelId = generateUid('bento-date-picker-month-label');\n\n const computedIsDateDisabled = computed(\n () => (date: Date) =>\n (props.min && date < props.min) || (props.max && date > props.max) || props.isDateDisabled?.(date)\n );\n\n const {\n internalDate,\n baseDate,\n // Calendar refs\n addDayRef,\n // Month navigation\n showNextMonth,\n showPreviousMonth,\n // Day navigation\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n focusOnDate,\n } = useMoveCalendarDate(\n {\n currentSelectedDate: toRef(props, 'startDate'),\n month: toRef(props, 'month'),\n isDateDisabled: computedIsDateDisabled.value,\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Default to Monday if the value passed in is not part of the defined Enum\n */\n const fallbackFirstDayOfWeek = computed(() =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(props.firstDayOfWeek)\n ? props.firstDayOfWeek\n : CalendarMonthFirstDayOfWeek.MONDAY\n );\n\n /**\n * Renders the previous month button if it's Unique or First calendar\n */\n const shouldShowPreviousMonthButton = computed(() => ['first', 'unique'].includes(props.position));\n\n /**\n * Renders the next month button if it's Unique or Last calendar\n */\n const shouldShowNextMonthButton = computed(() => ['last', 'unique'].includes(props.position));\n\n /**\n * Formats the month date to the name of the month and the year\n */\n const formattedMonthDate = computed(() =>\n format(baseDate.value, 'MMMM yyyy', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })\n );\n\n /**\n * Formats all the days of the week to their day name\n */\n const daysOfWeek = computed(() =>\n new Array(7).fill(new Date()).map((date, index) => {\n const dayOfWeekDate = setDay(date, fallbackFirstDayOfWeek.value + index);\n\n return format(dayOfWeekDate, 'EEE', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n });\n })\n );\n\n /**\n * Calculates all the weeks of the current \"props.month\"\n * and adds the respective day number to each column and week\n */\n const weeksOfMonth = computed(() => {\n const weeks = [];\n const date = startOfMonth(props.month);\n let week = weeks[weeks.push([]) - 1];\n\n while (date.getMonth() === props.month.getMonth()) {\n if (date.getDay() - fallbackFirstDayOfWeek.value === 0 && week.length > 0) {\n week = weeks[weeks.push([]) - 1];\n }\n\n week.push(startOfDay(date));\n date.setDate(date.getDate() + 1);\n }\n\n return weeks;\n });\n\n const onDayClicked = (selectedDate: Date) => {\n emit(CalendarMonthEvent.INPUT, selectedDate);\n };\n\n /**\n * Calculates the variation of the days selected.\n * For single select it's always SINGLE\n * For ranges:\n * - Start & End is the same: SINGLE\n * - Start: BEGINNING\n * - End: END\n * - Within the range: MIDDLE\n * @param {Date} day Current day\n */\n // eslint-disable-next-line consistent-return\n const dayVariant = (day: Date) => {\n if (!props.isRange || isSameDay(props.startDate, props.endDate)) {\n return CalendarMonthDayVariant.SINGLE;\n }\n\n if (props.startDate && isSameDay(props.startDate, day)) {\n return CalendarMonthDayVariant.BEGINNING;\n }\n if (props.endDate && isSameDay(props.endDate, day)) {\n return CalendarMonthDayVariant.END;\n }\n if (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n ) {\n return CalendarMonthDayVariant.MIDDLE;\n }\n };\n\n /**\n * Checks every date in the calendar to see if it's selected.\n * @param day Current day in the calendar\n */\n const isSelectedDate = (day: Date) => {\n // Single selection\n if (internalDate.value && isSameDay(internalDate.value, day) && !props.endDate) {\n return true;\n }\n\n // Range\n return (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n );\n };\n\n const confirmNavigationDate = () => {\n emit(CalendarMonthEvent.INPUT, internalDate);\n };\n\n const listeners = {\n 'keydown:arrow-right': moveToNextDay,\n 'keydown:arrow-left': moveToPreviousDay,\n 'keydown:arrow-up': moveToPreviousWeek,\n 'keydown:arrow-down': moveToNextWeek,\n 'keydown:home': moveToFirstDayOfWeek,\n 'keydown:end': moveToLastDayOfWeek,\n 'keydown:page-up': moveToPreviousMonth,\n 'keydown:shift-page-up': moveToPreviousYear,\n 'keydown:page-down': moveToNextMonth,\n 'keydown:shift-page-down': moveToNextYear,\n };\n\n return {\n // Refs\n addDayRef,\n\n // Values\n computedIsDateDisabled,\n daysOfWeek,\n weeksOfMonth,\n formattedMonthDate,\n shouldShowNextMonthButton,\n shouldShowPreviousMonthButton,\n monthLabelId,\n\n // Enums\n CalendarMonthEvent,\n\n // Functions\n isSelectedDate,\n showNextMonth,\n showPreviousMonth,\n dayVariant,\n confirmNavigationDate,\n\n // Events\n onDayClicked,\n listeners,\n\n // Exposed methods\n focusOnDate,\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month.scss\" />\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","export interface CalendarYearMonthProps {\n /**\n * Date to be displayed as the calendar month. From 1st to 12th.\n */\n month: Date;\n\n /**\n * Indicate if a date should be disabled or not\n */\n disabled?: boolean;\n\n /**\n * Changes the state of the calendar month to selected.\n */\n selected?: boolean;\n\n /**\n * When the month is selected, this indicates if the selection is a single month or part of a range.\n * If it's a range it can be at the beginning, middle or end of the selection.\n */\n variant?: `${CalendarYearMonthVariant}`;\n}\n\n/**\n * Private types\n */\nexport enum CalendarYearMonthVariant {\n SINGLE = 'single',\n MIDDLE = 'middle',\n BEGINNING = 'beginning',\n END = 'end',\n}\n\nexport enum CalendarYearMonthClass {\n // Variant\n SINGLE = CalendarYearMonthVariant.SINGLE,\n MIDDLE = CalendarYearMonthVariant.MIDDLE,\n BEGINNING = CalendarYearMonthVariant.BEGINNING,\n END = CalendarYearMonthVariant.END,\n\n // Selected\n SELECTED = 'selected',\n UNSELECTED = 'unselected',\n\n // Current month\n CURRENT_MONTH = 'current-month',\n\n // Disabled\n DISABLED = 'disabled',\n}\n\nexport enum CalendarYearMonthEvent {\n CLICK = 'click',\n MOUSE_OVER = 'mouseover',\n}\n","<template>\n <td\n class=\"b-calendar-year-month\"\n :class=\"conditionalClasses\"\n :tabindex=\"selected ? '0' : '-1'\"\n :aria-selected=\"selected ? selected : undefined\"\n @click=\"e => onClick(e, month)\"\n @mouseover=\"emit(CalendarYearMonthEvent.MOUSE_OVER)\"\n @keydown.space.enter=\"e => onClick(e, month)\"\n >\n <div class=\"b-calendar-year-month__wrapper\">\n <bento-date class=\"b-calendar-year-month__label\" :date=\"month\" :format=\"BentoDateFormat.SHORT_MONTH\" />\n </div>\n </td>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDate, BentoDateFormat } from '@/components/date';\n import {\n CalendarYearMonthClass,\n CalendarYearMonthEvent,\n type CalendarYearMonthProps,\n CalendarYearMonthVariant,\n } from './calendar-year-month.types';\n\n const props = defineProps({\n month: null,\n disabled: { type: Boolean, default: false },\n selected: { type: Boolean, default: false },\n variant: { default: CalendarYearMonthVariant.SINGLE }\n});\n\n const emit = defineEmits([\"click\", \"mouseover\"]);\n\n const isCurrentMonth = computed(() => {\n const today = new Date();\n return props.month.getMonth() === today.getMonth() && props.month.getFullYear() === today.getFullYear();\n });\n\n const conditionalClasses = computed(() => ({\n // Variants\n [`b-calendar-year-month--${CalendarYearMonthClass.BEGINNING}`]:\n props.variant === CalendarYearMonthVariant.BEGINNING,\n [`b-calendar-year-month--${CalendarYearMonthClass.MIDDLE}`]: props.variant === CalendarYearMonthVariant.MIDDLE,\n [`b-calendar-year-month--${CalendarYearMonthClass.END}`]: props.variant === CalendarYearMonthVariant.END,\n [`b-calendar-year-month--${CalendarYearMonthClass.SINGLE}`]: props.variant === CalendarYearMonthVariant.SINGLE,\n\n // Selected\n [`b-calendar-year-month--${CalendarYearMonthClass.UNSELECTED}`]: !props.selected,\n [`b-calendar-year-month--${CalendarYearMonthClass.SELECTED}`]: props.selected,\n\n // Current month\n [`b-calendar-year-month--${CalendarYearMonthClass.CURRENT_MONTH}`]: isCurrentMonth.value,\n\n // Disabled\n [`b-calendar-year-month--${CalendarYearMonthClass.DISABLED}`]: props.disabled,\n }));\n\n const onClick = (e: MouseEvent | KeyboardEvent, selectedDay: Date) => {\n if (!props.disabled) {\n emit(CalendarYearMonthEvent.CLICK, selectedDay, props.month);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Handles the styles and states of the individual months of the calendar.\n *\n * @example\n * import { CalendarYearMonth, CalendarYearMonthVariant } from './calendar-year-month';\n *\n * export default {\n * components: { CalendarYearMonth },\n * template: `\n * <table>\n * <tbody>\n * <tr>\n * <calendar-year-month\n * :month=\"new Date()\"\n * disabled\n * selected\n * :variant=\"CalendarYearMonthVariant.MIDDLE\"\n * />\n * </tr>\n * </tbody>\n * </table>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-year-month.scss\" />\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-calendar-year\" v-on=\"listeners\">\n <div class=\"b-calendar-year__year-selector\">\n <!-- go to previous year -->\n <div class=\"b-calendar-year__previous\">\n <bento-button\n v-if=\"shouldShowPreviousYearButton\"\n variant=\"tertiary\"\n @click=\"moveToPreviousYear($event, true)\"\n >\n <template #iconLeft>\n <chevron-left-icon :svg-title=\"t('previousYear')\" />\n </template>\n </bento-button>\n </div>\n\n <!-- year -->\n <bento-typography :id=\"yearLabelId\" el=\"h2\" variant=\"title\" aria-live=\"polite\">\n {{ year.getFullYear() }}\n </bento-typography>\n\n <!-- go to next year -->\n <div class=\"b-calendar-year__next\">\n <bento-button v-if=\"shouldShowNextYearButton\" variant=\"tertiary\" @click=\"moveToNextYear($event, true)\">\n <template #iconLeft>\n <chevron-right-icon :svg-title=\"t('nextYear')\" />\n </template>\n </bento-button>\n </div>\n </div>\n\n <table class=\"b-calendar-year__year-container\" role=\"grid\" :aria-labelledby=\"yearLabelId\">\n <tbody>\n <tr v-for=\"(row, index) in monthRows\" :key=\"index\">\n <calendar-year-month\n v-for=\"(month, monthIndex) in row\"\n :ref=\"addDayRef(month)\"\n :key=\"`calendar-month-${monthIndex}`\"\n :month=\"month\"\n :disabled=\"isDateDisabled(month)\"\n :selected=\"isSelectedDate(month)\"\n :variant=\"monthVariant(month)\"\n @click=\"onMonthClicked\"\n @mouseover=\"emit('mouseover', month)\"\n />\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRef } from 'vue';\n import { isSameMonth } from 'date-fns/isSameMonth';\n import { isWithinInterval } from 'date-fns/isWithinInterval';\n\n import BentoButton from '@/components/button/button.vue';\n import { BentoTypography } from '@/components/typography';\n import CalendarYearMonth from './components/calendar-year-month/calendar-year-month.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useMoveCalendarDate } from '@/internal/calendar/components/calendar-month/composables/move-calendar-date';\n\n import { type CalendarYearProps } from './calendar-year.types';\n import { CalendarYearMonthVariant } from './components/calendar-year-month/calendar-year-month.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const yearLabelId = generateUid('bento-date-picker-year-label');\n\n const props = defineProps({\n endDate: { default: null },\n isDateDisabled: { type: Function, default: undefined },\n isRange: { type: Boolean, default: false },\n min: { default: null },\n max: { default: null },\n position: { default: 'unique' },\n startDate: { default: null },\n year: null\n});\n\n const emit = defineEmits([\"input\", \"mouseover\", \"nextMonth\", \"previousMonth\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isDateDisabled = (date: Date) =>\n (props.min && date < props.min) || (props.max && date > props.max) || props.isDateDisabled?.(date);\n\n /**\n * Renders the previous year button if it's Unique or First calendar\n */\n const shouldShowPreviousYearButton = computed(() => ['first', 'unique'].includes(props.position));\n\n /**\n * Renders the next year button if it's Unique or Last calendar\n */\n const shouldShowNextYearButton = computed(() => ['last', 'unique'].includes(props.position));\n\n const {\n internalDate,\n // Calendar refs\n addDayRef,\n\n // Day navigation\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n moveToFirstMonthOfYear,\n moveToLastMonthOfYear,\n focusOnDate,\n } = useMoveCalendarDate(\n {\n currentSelectedDate: toRef(props, 'startDate'),\n month: toRef(props, 'year'),\n isDateDisabled,\n },\n emit\n );\n\n defineExpose({ focusOnDate });\n\n /**\n * Calculates all the months of the current \"props.month\"\n * and adds the respective day number to each column and week\n */\n const monthRows = computed(() => {\n const rows = [];\n let count = 0;\n\n for (let i = 0; i < 3; i++) {\n const innerArray = [];\n for (let j = 0; j < 4; j++) {\n innerArray.push(new Date(props.year.getFullYear(), count++, 1));\n }\n rows.push(innerArray);\n }\n\n return rows;\n });\n\n /**\n * Calculates the variation of the days selected.\n * For single select it's always SINGLE\n * For ranges:\n * - Start & End is the same: SINGLE\n * - Start: BEGINNING\n * - End: END\n * - Within the range: MIDDLE\n * @param {Date} day Current day\n */\n const monthVariant = (day: Date) => {\n if (!props.isRange || isSameMonth(props.startDate, props.endDate)) {\n return CalendarYearMonthVariant.SINGLE;\n }\n\n if (props.startDate && isSameMonth(props.startDate, day)) {\n return CalendarYearMonthVariant.BEGINNING;\n }\n if (props.endDate && isSameMonth(props.endDate, day)) {\n return CalendarYearMonthVariant.END;\n }\n if (props.startDate && props.endDate && isWithinInterval(day, { start: props.startDate, end: props.endDate })) {\n return CalendarYearMonthVariant.MIDDLE;\n }\n return null;\n };\n\n /**\n * Checks every date in the calendar to see if it's selected.\n * @param date Current date in the calendar\n */\n const isSelectedDate = (date: Date) => {\n // Single selection\n if (internalDate.value && isSameMonth(internalDate.value, date)) {\n return true;\n }\n\n // Range\n return (\n props.startDate && props.endDate && isWithinInterval(date, { start: props.startDate, end: props.endDate })\n );\n };\n\n const onMonthClicked = (selectedDate: Date) => {\n emit('input', selectedDate);\n };\n\n const listeners = !props.isRange\n ? {\n 'keydown:arrow-right': moveToNextMonth,\n 'keydown:arrow-left': moveToPreviousMonth,\n 'keydown:arrow-up': (ev: Event) => moveToPreviousMonth(ev, false, 4),\n 'keydown:arrow-down': (ev: Event) => moveToNextMonth(ev, false, 4),\n 'keydown:home': moveToFirstMonthOfYear,\n 'keydown:end': moveToLastMonthOfYear,\n 'keydown:page-up': moveToPreviousYear,\n 'keydown:page-down': moveToNextYear,\n }\n : {};\n</script>\n\n<script lang=\"ts\">\n /**\n * CalendarYear that displays all the months of a given year and allows\n * to move back and forth the visible year with the Next and Previous buttons\n *\n * @example\n * import { CalendarYear } from '@/internal/calendar';\n *\n * export default {\n * components: { CalendarYear },\n * template: `\n * <calendar-year\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :year=\"new Date()\"\n * is-range\n * :start-date=\"new Date()\"\n * :end-date=\"new Date()\"\n * @input=\"(selectedDate: Date) => void\"\n * @mouseover=\"(event: Event) => void\"\n * @nextMonth=\"() => void\"\n * @previousMonth=\"() => void\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-year.scss\" />\n","import { reactive, watch } from 'vue';\nimport { CalendarEvent, type UseCalendarPane } from '../calendar.types';\n\nexport const useSinglePane: UseCalendarPane = ({ selectedDate }, emit) => {\n /**\n * Internal date manipulation.\n */\n const internalValue = reactive({\n startDate: null,\n endDate: null,\n });\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n internalValue.startDate = selectedDate.value;\n internalValue.endDate = undefined;\n },\n { immediate: true }\n );\n\n /**\n * Called when a date is selected.\n *\n * Emits the selected date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n emit(CalendarEvent.INPUT, date);\n };\n\n return {\n internalValue,\n\n onDateInput,\n // Empty function to prevent the listeners from throwing a warning\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onMouseOver: () => {},\n };\n};\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\n\n/**\n * The {@link differenceInDays} function options.\n */\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const sign = compareLocalAsc(laterDate_, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarDays(laterDate_, earlierDate_),\n );\n\n laterDate_.setDate(laterDate_.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n const isLastDayNotFull = Number(\n compareLocalAsc(laterDate_, earlierDate_) === -sign,\n );\n\n const result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(laterDate, earlierDate) {\n const diff =\n laterDate.getFullYear() - earlierDate.getFullYear() ||\n laterDate.getMonth() - earlierDate.getMonth() ||\n laterDate.getDate() - earlierDate.getDate() ||\n laterDate.getHours() - earlierDate.getHours() ||\n laterDate.getMinutes() - earlierDate.getMinutes() ||\n laterDate.getSeconds() - earlierDate.getSeconds() ||\n laterDate.getMilliseconds() - earlierDate.getMilliseconds();\n\n if (diff < 0) return -1;\n if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfQuarter} function options.\n */\n\n/**\n * @name endOfQuarter\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3) + 3;\n _date.setMonth(month, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfQuarter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfQuarter} function options.\n */\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3);\n _date.setMonth(month, 1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n","import { endOfMonth } from 'date-fns/endOfMonth';\nimport { endOfQuarter } from 'date-fns/endOfQuarter';\nimport { endOfWeek } from 'date-fns/endOfWeek';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { startOfQuarter } from 'date-fns/startOfQuarter';\nimport { startOfWeek } from 'date-fns/startOfWeek';\n\nimport type { UseGranularityAdjustments } from './use-granularity-adjustments.types';\n\n/**\n * Provides utility function to adjust date range selections according to the selected granularity.\n * @param firstDayOfWeek The day a week starts on\n * @param min Minimum selectable date\n * @param max Maximum selectable date\n * @returns A set of functions to adjust date range objects and date strings to a specific granularity.\n */\nexport const useGranularityAdjustments: UseGranularityAdjustments = firstDayOfWeek => {\n /**\n * Adjusts a given date or date range to the weekly granularity.\n * Always returns full weeks.\n */\n const adjustDateForWeekly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfWeek(date, { weekStartsOn: firstDayOfWeek });\n let end = endOfWeek(endDate || date, { weekStartsOn: firstDayOfWeek });\n\n const isStartOutOfBounds = min && start < min;\n const isEndOutOfBounds = max && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n }\n\n if (isEndOutOfBounds) {\n end = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full week\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfWeek(start, { weekStartsOn: firstDayOfWeek });\n } else {\n start = startOfWeek(end, { weekStartsOn: firstDayOfWeek });\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a given date or date range to the monthly granularity.\n * Always returns full months.\n */\n const adjustDateForMonthly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfMonth(date);\n let end = endOfMonth(endDate || date);\n\n const isStartOutOfBounds = min && start < min;\n const isEndOutOfBounds = max && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfMonth(min);\n }\n\n if (isEndOutOfBounds) {\n end = endOfMonth(max);\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full month\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfMonth(start);\n } else {\n start = startOfMonth(end);\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a given date or date range to the quarterly granularity.\n * Always returns full quarters (Q1, Q2, Q3, Q4).\n */\n const adjustDateForQuarterly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfQuarter(date);\n let end = endOfQuarter(endDate || date);\n\n const isStartOutOfBounds = min instanceof Date && start < min;\n const isEndOutOfBounds = max instanceof Date && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfQuarter(min);\n }\n\n if (isEndOutOfBounds) {\n end = endOfQuarter(max);\n }\n\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfQuarter(start);\n } else {\n start = startOfQuarter(end);\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a text start date for weekly granularity (start of that week)\n */\n const adjustStartDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for weekly granularity (end of that week)\n */\n const adjustEndDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n /**\n * Adjusts a text start date for monthly granularity (start of that month)\n */\n const adjustStartDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for monthly granularity (end of that month)\n */\n const adjustEndDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n /**\n * Adjusts a text start date for quarterly granularity (start of that quarter)\n */\n const adjustStartDateInputForQuarterly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForQuarterly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for quarterly granularity (end of that quarter)\n */\n const adjustEndDateInputForQuarterly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForQuarterly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n return {\n adjustDateForWeekly,\n adjustDateForMonthly,\n adjustDateForQuarterly,\n adjustStartDateInputForWeekly,\n adjustEndDateInputForWeekly,\n adjustStartDateInputForMonthly,\n adjustEndDateInputForMonthly,\n adjustStartDateInputForQuarterly,\n adjustEndDateInputForQuarterly,\n };\n};\n","import { reactive, ref, watch } from 'vue';\nimport { CalendarEvent, type CalendarRangeDateValue, type UseCalendarPane } from '../calendar.types';\nimport { isBefore } from 'date-fns/isBefore';\nimport { startOfDay } from 'date-fns/startOfDay';\nimport { isAfter } from 'date-fns/isAfter';\nimport { addDays } from 'date-fns/addDays';\nimport { differenceInDays } from 'date-fns/differenceInDays';\nimport { subDays } from 'date-fns/subDays';\n\nimport { useGranularityAdjustments } from './use-granularity-adjustments';\n\n/**\n * Provides event handler logic to correctly display date range selection, as a user clicks calendar dates.\n * @param props Calendar properties and current date selection\n * @param emit The Vue event `emit` function\n * @returns A date range internal value, and a set of handlers for date mouse input.\n */\nexport const useRangePane: UseCalendarPane = (\n { selectedDate, isDateDisabled, maxRange, granularity, firstDayOfWeek, min, max },\n emit\n) => {\n const backwardsDirection = -1;\n const forwardDirection = 1;\n\n const { adjustDateForWeekly, adjustDateForMonthly, adjustDateForQuarterly } =\n useGranularityAdjustments(firstDayOfWeek);\n\n /**\n * Internal date manipulation.\n * This allows to change the dates with the form.\n */\n const internalValue = reactive<CalendarRangeDateValue>({\n startDate: null,\n endDate: null,\n });\n\n /**\n * First clicked date to calculate the ranges with\n */\n const clickedDate = ref<Date | null>(null);\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n let { startDate = null, endDate = null } = (selectedDate.value as CalendarRangeDateValue) || {};\n\n if (startDate) {\n startDate = startOfDay(startDate);\n }\n\n if (endDate) {\n endDate = startOfDay(endDate);\n }\n\n if (\n (startDate && isDateDisabled && isDateDisabled(startDate)) ||\n (endDate && isDateDisabled && isDateDisabled(endDate)) ||\n (startDate && endDate && isAfter(startDate, endDate))\n ) {\n // Disabled dates do nothing\n return;\n }\n\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n },\n { immediate: true, deep: true }\n );\n\n const setDates = (startDate: Date, endDate: Date, direction?: number) => {\n // Set new initial dates to internal state\n // For the form manual input to be registered, null values are allowed\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n\n // Selects a range of dates not bigger than the maxRange value\n if (maxRange.value) {\n const difference = differenceInDays(endDate, startDate) - maxRange.value;\n if (difference > 0) {\n if (direction < 1) {\n internalValue.startDate = startDate;\n internalValue.endDate = subDays(endDate, difference);\n } else {\n internalValue.startDate = addDays(startDate, difference);\n internalValue.endDate = endDate;\n }\n }\n }\n\n emit(CalendarEvent.START_DATE_SELECTED, internalValue.startDate);\n emit(CalendarEvent.END_DATE_SELECTED, internalValue.endDate);\n };\n\n /**\n * When the mouse moves over the days it recalculates the\n * range and moves it to the next range.\n *\n * If it's before the intial date it switches the range (start becomes end and vice versa)\n * If it's after it sets the new end date.\n * @param date - Hovered date\n */\n const onMouseOver = (date: Date) => {\n if (!clickedDate.value || (isDateDisabled && isDateDisabled(date))) {\n return;\n }\n\n if (isBefore(date, clickedDate.value)) {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n // For quarterly granularity, set date selection to the respective full quarter\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n setDates(date, clickedDate.value, backwardsDirection);\n } else {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n // For quarterly granularity, set date selection to the respective full quarter\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n setDates(clickedDate.value, date, forwardDirection);\n }\n };\n\n /**\n * Called when a date is selected.\n *\n * - Initial click: Sets the selected date\n * - Second click: Selects the date range. Emits the Start date & End date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n // Second click\n if (clickedDate.value) {\n // Reset clicked date after second click\n clickedDate.value = null;\n\n // Set the end date in our internal value which will be emitted\n // Emit when the second date (endDate) is selected\n emit(CalendarEvent.INPUT, internalValue);\n } else {\n // First click\n let correctedDate = date;\n\n // Correct the selected date to the start of the respective week and apply it\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // Correct the selected date to the start of the respective month and apply it\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // Correct the selected date to the start of the respective quarter and apply it\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // For daily, manually trigger `onMouseOver` so that the full behavior is\n // replicated if the user clicks the same day twice\n clickedDate.value = correctedDate;\n\n onMouseOver(correctedDate);\n }\n };\n\n return {\n internalValue,\n\n onDateInput,\n onMouseOver,\n };\n};\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","<template>\n <div class=\"b-calendar\" :class=\"conditionalClasses\">\n <component\n :is=\"calendarComponent\"\n v-for=\"(_, index) in numberOfMonths\"\n :ref=\"numberOfMonths === 1 ? 'calendarRef' : null\"\n :key=\"`calendar-${index}`\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :month=\"calculateOffsetMonth(index)\"\n :year=\"calculateOffsetYear(index)\"\n :position=\"calendarPosition(index)\"\n :min=\"min\"\n :max=\"max\"\n :is-range=\"isRange\"\n :start-date=\"internalValue.startDate\"\n :end-date=\"internalValue.endDate\"\n :granularity=\"granularity\"\n @input=\"onDateInput\"\n @mouseover=\"onMouseOver\"\n @changeDay=\"onMouseOver\"\n @nextMonth=\"calculateNextMonths\"\n @previousMonth=\"calculatePreviousMonths\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef, watch } from 'vue';\n import CalendarMonth from './components/calendar-month/calendar-month.vue';\n import CalendarYear from './components/calendar-year/calendar-year.vue';\n import { CalendarMonthFirstDayOfWeek } from './components/calendar-month';\n import type { CalendarMonthIsDateDisabled } from './components/calendar-month';\n import {\n CalendarEvent,\n type CalendarGranularityConfig,\n CalendarPosition,\n type CalendarRangeDateValue,\n type CalendarValue,\n CalendarVariant,\n } from './calendar.types';\n import { useSinglePane } from './composables/use-single-pane';\n import { useRangePane } from './composables/use-range-pane';\n import { addMonths } from 'date-fns/addMonths';\n import { subMonths } from 'date-fns/subMonths';\n import { addYears } from 'date-fns/addYears';\n import { subYears } from 'date-fns/subYears';\n\n /**\n * Handles the calendar logic to change visible months for Single calendar\n * and Range calendar, as well as the selection logic for range.\n * All the processing necessary for the calendar to select dates\n *\n * @example\n * import { Calendar } from '@/internal/bento-vue2';\n *\n * export default {\n * components: { Calendar },\n * template: `\n * <calendar\n * :value=\"value\"\n * :first-day-of-week=\"CalendarFirstDayOfWeek.Monday\"\n * :is-date-disabled=\"(day: Date) => boolean\"\n * :number-of-months=\"2\"\n * is-range\n * @input=\"(selectedDate) => void\"\n * @start-date-selected=\"(startDate: Date) => void\"\n * @end-date-selected=\"(endDate: Date) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar',\n components: { CalendarMonth, CalendarYear },\n props: {\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: {\n type: Number as PropType<CalendarMonthFirstDayOfWeek>,\n default: CalendarMonthFirstDayOfWeek.MONDAY,\n validator: (value: CalendarMonthFirstDayOfWeek) =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(value),\n },\n\n /**\n * The selected granularity configuration\n */\n granularity: {\n type: Object as PropType<CalendarGranularityConfig>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: { type: Function as PropType<CalendarMonthIsDateDisabled>, default: undefined },\n\n /**\n * Enables the Date Range calendar\n */\n isRange: { type: Boolean, default: false },\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: { type: Number, default: null, validator: (value: number) => !value || value > 0 },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: { type: Date, default: null },\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: { type: Date, default: null },\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: {\n type: Number,\n default: 3,\n validator: (n: number) => n >= 1,\n },\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Selected date. Can be a single Date or a CalendarRangeDate\n * instance that contains startDate and endDate attributes.\n */\n value: { type: [Date, Object] as PropType<CalendarValue>, default: undefined },\n\n /**\n * Default start date for the calendar pane\n */\n defaultDisplayMonth: {\n type: String,\n default: null,\n validator: (value: string) => {\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/;\n const isValidDate = dateRegex.test(value);\n\n return isValidDate;\n },\n },\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant: {\n type: String as PropType<`${CalendarVariant}`>,\n default: 'day',\n validator: (value: string) => Object.values(CalendarVariant).includes(value as CalendarVariant),\n },\n },\n emit: [CalendarEvent.INPUT, CalendarEvent.START_DATE_SELECTED, CalendarEvent.END_DATE_SELECTED],\n setup(props, { emit }) {\n // Single date calendar ref\n const calendarRef = ref(null);\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop \"value\"\n const baseDate = ref();\n watch(\n () => props.value,\n () => {\n if (props.isRange) {\n baseDate.value =\n props?.showEndDateOnOpen && (props.value as CalendarRangeDateValue)?.endDate\n ? (props.value as CalendarRangeDateValue)?.endDate\n : (props.value as CalendarRangeDateValue)?.startDate || new Date();\n } else {\n const defaultDate =\n props.defaultDisplayMonth && new Date(props.defaultDisplayMonth).getTime()\n ? new Date(props.defaultDisplayMonth)\n : new Date();\n baseDate.value = (props.value as Date) || defaultDate;\n }\n },\n { immediate: true, deep: true }\n );\n\n const calendarComponent = computed(() =>\n props.variant === CalendarVariant.MONTH ? CalendarYear : CalendarMonth\n );\n\n const conditionalClasses = computed(() => ({\n 'b-calendar__range': props.isRange,\n }));\n\n const { internalValue, onDateInput, onMouseOver } = props.isRange\n ? useRangePane(\n {\n selectedDate: toRef(props, 'value'),\n isDateDisabled: props.isDateDisabled as (date: Date) => boolean,\n maxRange: toRef(props, 'maxRange'),\n granularity: toRef(props, 'granularity'),\n firstDayOfWeek: props.firstDayOfWeek,\n min: toRef(props, 'min'),\n max: toRef(props, 'max'),\n },\n emit\n )\n : useSinglePane(\n {\n selectedDate: toRef(props, 'value'),\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Calculate the current month calendar.\n * This is used to render/hide the Previous & Next buttons on each calendar.\n * @param {number} calendarIndex - Number to offset the calendar position\n */\n const calendarPosition = (calendarIndex: number): `${CalendarPosition}` => {\n if (props.numberOfMonths === 1) {\n return CalendarPosition.UNIQUE;\n }\n\n if (calendarIndex === 0) {\n return CalendarPosition.FIRST;\n }\n\n return calendarIndex === props.numberOfMonths - 1 ? CalendarPosition.LAST : CalendarPosition.MIDDLE;\n };\n\n /**\n * Calculates in relation to the amount of months defined in \"numberOfMonths\"\n * which calendar month should be render starting from the first (leftmost)\n * rendered calendar.\n * If showEndDateOnOpen is set to true, the last pane should be the baseDate month i.e. the end date\n * @param offsetMonth - Amount of months to add after the first month was rendered\n */\n const calculateOffsetMonth = computed(() => (offsetMonth: number) => {\n const monthOffset =\n props?.showEndDateOnOpen && props.isRange\n ? subMonths(baseDate.value, props.numberOfMonths - 1)\n : baseDate.value;\n\n return addMonths(monthOffset, offsetMonth);\n });\n\n const calculateOffsetYear = computed(() => (offsetYear: number) => {\n const yearOffset = props?.showEndDateOnOpen\n ? subYears(baseDate.value, props.numberOfMonths - 1)\n : baseDate.value;\n\n return addYears(yearOffset, offsetYear);\n });\n\n /**\n * By default shows the following month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to skip a year\n */\n const calculateNextMonths = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n };\n\n /**\n * By default shows the previous month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to go back a year\n */\n const calculatePreviousMonths = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n };\n\n return {\n // Refs\n calendarRef,\n\n // Values\n baseDate,\n calendarComponent,\n conditionalClasses,\n internalValue,\n\n // Methods\n calculateOffsetMonth,\n calculateOffsetYear,\n calendarPosition,\n\n // Events\n onDateInput,\n onMouseOver,\n calculateNextMonths,\n calculatePreviousMonths,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar.scss\" />\n"],"names":["CalendarMonthDayVariant","CalendarMonthDayVariant2","CalendarMonthDayClass","CalendarMonthDayClass2","CalendarMonthDayEvent","CalendarMonthDayEvent2","CalendarMonthDateProps","value","_sfc_main$4","defineComponent","BentoDate","props","emit","isCurrentDay","computed","today","BentoDateFormat","e","selectedDay","startOfWeek","date","options","defaultOptions","getDefaultOptions","weekStartsOn","_b","_a","_d","_c","_date","toDate","day","diff","CalendarMonthEvent","CalendarMonthEvent2","CalendarMonthFirstDayOfWeek","CalendarMonthFirstDayOfWeek2","CalendarYearPosition","CalendarYearPosition2","CalendarEvent","CalendarEvent2","CalendarVariant","CalendarVariant2","addDays","amount","constructFrom","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","endOfWeek","getDaysInMonth","year","monthIndex","lastDayOfMonth","setMonth","month","midMonth","set","values","startOfYear","date_","subDays","subMonths","useMoveCalendarDate","currentSelectedDate","isDateDisabled","firstDayOfWeek","baseDate","ref","watch","internalDate","activeElement","useActiveElement","focusedDate","el","currentDate","calendarRef","addDayRef","enteringRef","clearCalendarRefs","showNextMonth","amountOfMonths","showPreviousMonth","focusOnDate","dateToBeFocusedOn","getFocusedElement","dateExistsInCalendar","stopPropagation","event","changeDate","nextDate","isIncreasingDays","isCalendarButtonsNav","nextTick","isNextDateInTheDisplayedMonthAndYear","monthsShifting","differenceInMonths","lastMonth","monthsToSubstract","monthsToAdd","setDay","currentDay","dayIndex","delta","startOfMonth","startOfDay","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","normalizeDates","laterStartOfDay","earlierStartOfDay","laterTimestamp","getTimezoneOffsetInMilliseconds","earlierTimestamp","millisecondsInDay","getDayOfYear","startOfISOWeek","getISOWeekYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfISOWeekYear","fourthOfJanuary","getISOWeek","millisecondsInWeek","getWeekYear","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","number","targetLength","sign","output","lightFormatters","token","signedYear","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","localize","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","quarter","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","absOffset","minutes","dateLongFormatter","pattern","formatLong","timeLongFormatter","dateTimeLongFormatter","matchResult","datePattern","timePattern","dateTimeFormat","longFormatters","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","format","input","_message","message","subject","isDate","isValid","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","formatStr","locale","enUS","_f","_e","_h","_g","originalDate","parts","substring","firstCharacter","longFormatter","cleanEscapedString","formatterOptions","part","formatter","matched","isSameDay","dateLeft_","dateRight_","isWithinInterval","interval","time","startTime","endTime","a","b","_sfc_main$3","messages$1","BentoButton","BentoTypography","CalendarMonthDay","ChevronLeftIcon","ChevronRightIcon","BentoKeyboardNavigationDirective","t","useI18n","locales","getDateLocale","monthLabelId","generateUid","computedIsDateDisabled","moveToNextDay","moveToPreviousDay","moveToPreviousWeek","moveToNextWeek","moveToFirstDayOfWeek","moveToLastDayOfWeek","moveToPreviousMonth","moveToPreviousYear","moveToNextMonth","moveToNextYear","toRef","fallbackFirstDayOfWeek","shouldShowPreviousMonthButton","shouldShowNextMonthButton","formattedMonthDate","daysOfWeek","index","dayOfWeekDate","weeksOfMonth","weeks","selectedDate","isSameMonth","CalendarYearMonthVariant","CalendarYearMonthVariant2","CalendarYearMonthClass","CalendarYearMonthClass2","CalendarYearMonthEvent","CalendarYearMonthEvent2","__default__$1","isCurrentMonth","conditionalClasses","__default__","messages","yearLabelId","shouldShowPreviousYearButton","shouldShowNextYearButton","moveToFirstMonthOfYear","moveToLastMonthOfYear","expose","monthRows","rows","count","i","innerArray","j","monthVariant","isSelectedDate","onMonthClicked","listeners","ev","useSinglePane","internalValue","reactive","isBefore","dateToCompare","isAfter","differenceInDays","compareLocalAsc","difference","isLastDayNotFull","result","endOfQuarter","currentMonth","startOfQuarter","useGranularityAdjustments","adjustDateForWeekly","endDate","min","max","start","end","isStartOutOfBounds","isEndOutOfBounds","adjustDateForMonthly","endOfMonth","adjustDateForQuarterly","formatDate","startDate","useRangePane","maxRange","granularity","clickedDate","setDates","direction","onMouseOver","correctedDate","addYears","subYears","_sfc_main","CalendarMonth","CalendarYear","n","defaultDate","calendarComponent","onDateInput","calendarPosition","calendarIndex","calculateOffsetMonth","offsetMonth","monthOffset","calculateOffsetYear","offsetYear","yearOffset"],"mappings":";;;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,SAAA,UACAA,EAAA,YA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|
|
1
|
+
{"version":3,"file":"calendar.Bhj58zR3.js","sources":["../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.types.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.props.ts","../../src/components/internal/calendar/components/calendar-month/components/calendar-month-day/calendar-month-day.vue","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js","../../src/components/internal/calendar/components/calendar-month/calendar-month.types.ts","../../src/components/internal/calendar/components/calendar-year/calendar-year.types.ts","../../src/components/internal/calendar/calendar.types.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addMonths.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDaysInMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/setMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/set.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subMonths.js","../../src/components/internal/calendar/components/calendar-month/composables/move-calendar-date.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/setDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfMonth.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameDay.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isWithinInterval.js","../../src/components/internal/calendar/components/calendar-month/calendar-month.vue","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameMonth.js","../../src/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.types.ts","../../src/components/internal/calendar/components/calendar-year/components/calendar-year-month/calendar-year-month.vue","../../src/components/internal/calendar/components/calendar-year/calendar-year.vue","../../src/components/internal/calendar/composables/use-single-pane.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isBefore.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isAfter.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInDays.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/endOfQuarter.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfQuarter.js","../../src/components/internal/calendar/composables/use-granularity-adjustments.ts","../../src/components/internal/calendar/composables/use-range-pane.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/addYears.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/subYears.js","../../src/components/internal/calendar/calendar.vue"],"sourcesContent":["export enum CalendarMonthDayVariant {\n SINGLE = 'single',\n MIDDLE = 'middle',\n BEGINNING = 'beginning',\n END = 'end',\n}\n\nexport enum CalendarMonthDayClass {\n // Variant\n SINGLE = CalendarMonthDayVariant.SINGLE,\n MIDDLE = CalendarMonthDayVariant.MIDDLE,\n BEGINNING = CalendarMonthDayVariant.BEGINNING,\n END = CalendarMonthDayVariant.END,\n\n // Selected\n SELECTED = 'selected',\n UNSELECTED = 'unselected',\n\n // Current day\n CURRENT_DAY = 'current-day',\n\n // Disabled\n DISABLED = 'disabled',\n}\n\nexport enum CalendarMonthDayEvent {\n CLICK = 'click',\n MOUSE_OVER = 'mouseover',\n}\n","import { type PropType } from 'vue';\nimport { CalendarMonthDayVariant } from './calendar-month-day.types';\n\nexport const CalendarMonthDateProps = {\n /**\n * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)\n */\n day: { type: Date, required: true },\n\n /**\n * Indicate if a date should be disabled or not\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Changes the state of the calendar day to selected.\n */\n selected: { type: Boolean, default: false },\n\n /**\n * When the day is selected, this indicates if the selection is a single date or part of a range.\n * If it's a range it can be at the beginning, middle or end of the selection.\n */\n variant: {\n type: String as PropType<CalendarMonthDayVariant>,\n default: CalendarMonthDayVariant.SINGLE,\n validator: (value: CalendarMonthDayVariant) => Object.values(CalendarMonthDayVariant).includes(value),\n },\n};\n","<template>\n <td\n class=\"b-calendar-month-day\"\n :class=\"conditionalClasses\"\n :tabindex=\"selected ? '0' : '-1'\"\n :aria-selected=\"selected ? selected : undefined\"\n :aria-disabled=\"disabled\"\n :aria-current=\"isCurrentDay ? 'date' : undefined\"\n :data-date=\"day.toDateString()\"\n @click=\"e => onClick(e, day)\"\n @mouseover=\"$emit(CalendarMonthDayEvent.MOUSE_OVER)\"\n @keydown.space.enter=\"e => onClick(e, day)\"\n >\n <div class=\"b-calendar-month-day__wrapper\">\n <bento-date class=\"b-calendar-month-day__label\" :date=\"day\" :format=\"BentoDateFormat.DAY_OF_MONTH\" />\n </div>\n </td>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoDate, BentoDateFormat } from '@/components/date';\n import { CalendarMonthDayClass, CalendarMonthDayEvent, CalendarMonthDayVariant } from './calendar-month-day.types';\n import { CalendarMonthDateProps } from './calendar-month-day.props';\n\n /**\n * Handles the styles and states of the individual dates of the calendar.\n *\n * @example\n * import { CalendarMonthDay, CalendarMonthDayVariant } from './calendar-day';\n *\n * export default {\n * components: { CalendarMonthDay },\n * template: `\n * <table>\n * <tbody>\n * <tr>\n * <calendar-day\n * :day=\"new Date()\"\n * disabled\n * selected\n * :variant=\"CalendarMonthDayVariant.MIDDLE\"\n * />\n * </tr>\n * </tbody>\n * </table>\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar-month-day',\n components: { BentoDate },\n inheritAttrs: true,\n props: CalendarMonthDateProps,\n emits: [CalendarMonthDayEvent.CLICK, CalendarMonthDayEvent.MOUSE_OVER],\n setup(props, { emit }) {\n const isCurrentDay = computed(() => {\n const today = new Date();\n return (\n props.day.getDate() === today.getDate() &&\n props.day.getMonth() === today.getMonth() &&\n props.day.getFullYear() === today.getFullYear()\n );\n });\n\n const conditionalClasses = computed(() => ({\n // Variants\n [`b-calendar-month-day--${CalendarMonthDayClass.BEGINNING}`]:\n props.variant === CalendarMonthDayVariant.BEGINNING,\n [`b-calendar-month-day--${CalendarMonthDayClass.MIDDLE}`]:\n props.variant === CalendarMonthDayVariant.MIDDLE,\n [`b-calendar-month-day--${CalendarMonthDayClass.END}`]: props.variant === CalendarMonthDayVariant.END,\n [`b-calendar-month-day--${CalendarMonthDayClass.SINGLE}`]:\n props.variant === CalendarMonthDayVariant.SINGLE,\n\n // Selected\n [`b-calendar-month-day--${CalendarMonthDayClass.UNSELECTED}`]: !props.selected,\n [`b-calendar-month-day--${CalendarMonthDayClass.SELECTED}`]: props.selected,\n\n // Current Day\n [`b-calendar-month-day--${CalendarMonthDayClass.CURRENT_DAY}`]: isCurrentDay.value,\n\n // Disabled\n [`b-calendar-month-day--${CalendarMonthDayClass.DISABLED}`]: props.disabled,\n }));\n\n const onClick = (e: MouseEvent | KeyboardEvent, selectedDay: Date) => {\n if (!props.disabled) {\n emit(CalendarMonthDayEvent.CLICK, selectedDay, props.day);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return {\n // Values\n conditionalClasses,\n isCurrentDay,\n\n // Enums\n BentoDateFormat,\n CalendarMonthDayEvent,\n\n // Events\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month-day.scss\" />\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","export enum CalendarMonthEvent {\n INPUT = 'input',\n MOUSE_OVER = 'mouseover',\n CHANGE_DAY = 'changeDay',\n NEXT_MONTH = 'nextMonth',\n PREVIOUS_MONTH = 'previousMonth',\n}\n\nexport enum CalendarMonthFirstDayOfWeek {\n MONDAY = 1,\n SATURDAY = 6,\n SUNDAY = 0,\n}\n\nexport type CalendarMonthIsDateDisabled = (date: Date) => boolean;\n","export enum CalendarYearPosition {\n FIRST = 'first',\n LAST = 'last',\n MIDDLE = 'middle',\n UNIQUE = 'unique',\n}\n\n/**\n * Private types\n */\nexport interface CalendarYearProps {\n /**\n * end of the selected range\n */\n endDate?: Date;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: (date: Date) => boolean;\n\n /**\n * Indicates if the calendar is part of a range date picker or a single date picker\n */\n isRange?: boolean;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min?: Date;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max?: Date;\n\n /**\n * When rendering multiple calendars, this property allows to render the\n * Next and Previous calendar buttons to the right, left or not at all\n * depending on the position: Unique (only 1), First, Middle or Last\n */\n position?: `${CalendarYearPosition}`;\n\n /**\n * start of the selected range\n */\n startDate?: Date;\n\n /**\n * Year to be displayed in the calendar\n */\n year: Date;\n}\n","import { type Ref, type UnwrapNestedRefs } from 'vue';\nimport type { Day } from 'date-fns';\n\nexport { CalendarMonthFirstDayOfWeek as CalendarFirstDayOfWeek } from './components/calendar-month/calendar-month.types';\nexport type { CalendarMonthIsDateDisabled as CalendarIsDateDisabled } from './components/calendar-month/calendar-month.types';\n\nexport { CalendarYearPosition as CalendarPosition } from './components/calendar-year/calendar-year.types';\n\nexport type CalendarGranularityType = 'daily' | 'weekly' | 'monthly' | 'quarterly';\n\nexport interface CalendarGranularityConfig<T extends CalendarGranularityType = CalendarGranularityType> {\n type: T;\n earliest?: Date;\n latest?: Date;\n disabled?: boolean;\n}\n\nexport interface CalendarRangeDateValue {\n startDate: Date;\n endDate: Date;\n granularity?: CalendarGranularityType;\n range?: string;\n}\n\nexport type CalendarSingleDateValue = Date;\nexport type CalendarValue = CalendarSingleDateValue | CalendarRangeDateValue;\n\ninterface UseCalendarPaneProps {\n isDateDisabled?: (date: Date) => boolean;\n maxRange?: Ref<number>;\n selectedDate: Ref<CalendarValue>;\n granularity?: Ref<CalendarGranularityConfig>;\n firstDayOfWeek: Day;\n min?: Ref<Date>;\n max?: Ref<Date>;\n}\n\nexport type UseCalendarPane = (\n propRefs: UseCalendarPaneProps,\n emit\n) => {\n internalValue: UnwrapNestedRefs<CalendarRangeDateValue>;\n onDateInput: (date: Date) => void;\n onMouseOver: (date: Date) => void;\n};\n\nexport enum CalendarEvent {\n INPUT = 'input',\n START_DATE_SELECTED = 'start-date-selected',\n END_DATE_SELECTED = 'end-date-selected',\n}\n\n/**\n * Private types\n */\nexport enum CalendarVariant {\n DAY = 'day',\n MONTH = 'month',\n}\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { setMonth } from \"./setMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link set} function options.\n */\n\n/**\n * @name set\n * @category Common Helpers\n * @summary Set date values to a given date.\n *\n * @description\n * Set date values to a given date.\n *\n * Sets time values to date from object `values`.\n * A value is not set if it is undefined or null or doesn't exist in `values`.\n *\n * Note about bundle size: `set` does not internally use `setX` functions from date-fns but instead opts\n * to use native `Date#setX` methods. If you use this function, you may not want to include the\n * other `setX` functions that date-fns provides if you are concerned about the bundle size.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param values - The date values to be set\n * @param options - The options\n *\n * @returns The new date with options set\n *\n * @example\n * // Transform 1 September 2014 into 20 October 2015 in a single line:\n * const result = set(new Date(2014, 8, 20), { year: 2015, month: 9, date: 20 })\n * //=> Tue Oct 20 2015 00:00:00\n *\n * @example\n * // Set 12 PM to 1 September 2014 01:23:45 to 1 September 2014 12:00:00:\n * const result = set(new Date(2014, 8, 1, 1, 23, 45), { hours: 12 })\n * //=> Mon Sep 01 2014 12:23:45\n */\nexport function set(date, values, options) {\n let _date = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+_date)) return constructFrom(options?.in || date, NaN);\n\n if (values.year != null) _date.setFullYear(values.year);\n if (values.month != null) _date = setMonth(_date, values.month);\n if (values.date != null) _date.setDate(values.date);\n if (values.hours != null) _date.setHours(values.hours);\n if (values.minutes != null) _date.setMinutes(values.minutes);\n if (values.seconds != null) _date.setSeconds(values.seconds);\n if (values.milliseconds != null) _date.setMilliseconds(values.milliseconds);\n\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default set;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { nextTick, type Ref, ref, watch } from 'vue';\nimport { useActiveElement } from '@vueuse/core';\nimport { CalendarMonthEvent, type CalendarMonthFirstDayOfWeek } from '../calendar-month.types';\nimport type { SetupContext } from 'vue/types/v3-setup-context';\nimport { addDays } from 'date-fns/addDays';\nimport { addMonths } from 'date-fns/addMonths';\nimport { differenceInMonths } from 'date-fns/differenceInMonths';\nimport { endOfWeek } from 'date-fns/endOfWeek';\nimport { set } from 'date-fns/set';\nimport { startOfWeek } from 'date-fns/startOfWeek';\nimport { startOfYear } from 'date-fns/startOfYear';\nimport { subDays } from 'date-fns/subDays';\nimport { subMonths } from 'date-fns/subMonths';\n\ninterface UseMoveCalendarDate {\n currentSelectedDate: Ref<Date>;\n month: Ref<Date>;\n isDateDisabled?: (currentDate: Date) => boolean;\n firstDayOfWeek?:\n | CalendarMonthFirstDayOfWeek.MONDAY\n | CalendarMonthFirstDayOfWeek.SATURDAY\n | CalendarMonthFirstDayOfWeek.SUNDAY;\n}\n\nexport const useMoveCalendarDate = (\n { currentSelectedDate, month, isDateDisabled, firstDayOfWeek }: UseMoveCalendarDate,\n emit: SetupContext['emit']\n) => {\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop\n const baseDate = ref(new Date(month.value));\n watch(\n month,\n () => {\n baseDate.value = month.value;\n },\n { immediate: true }\n );\n\n /**\n * Internal date used to actvate the dates through keyboard without\n * selecting it. This allows to easily move around the dates.\n */\n const internalDate = ref(new Date(currentSelectedDate.value));\n\n watch(currentSelectedDate, () => {\n internalDate.value = new Date(currentSelectedDate.value);\n });\n\n /**\n * For ranged dates, we need to keep track of the date that is currently being focused.\n * The first click is always to set the start date and the next click is for the end date.\n * Hence, to increment/decrement dates, we identify via `[data-date]` attribute as we need it to effectively +/-1 day for keyboard navigation.\n */\n const activeElement = useActiveElement();\n const focusedDate = ref<Date>(internalDate.value);\n\n watch(activeElement, el => {\n const currentDate = el.getAttribute('data-date');\n\n focusedDate.value = currentDate ? new Date(currentDate) : internalDate.value;\n });\n\n // Refs for calendar days\n const calendarRef = ref({});\n /**\n * High order function that maps each day in the calendar to their resopective Vue element ref.\n * Adds a day reference into \"calendarRef\" to be allow calendar navigation.\n * Each item is a key-value pair, where the key is the date in string form and\n * the value is the ref to the element.\n *\n *\n * @param {Date} day - Date to be added to the ref\n * @returns {Function} Maps the element ref to a date\n */\n const addDayRef = (day: Date) => enteringRef => {\n calendarRef.value[day.toDateString()] = enteringRef;\n };\n\n /**\n * Reset calendar references of each day of the month\n */\n const clearCalendarRefs = () => {\n calendarRef.value = {};\n };\n\n /**\n * Calculates what the next month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showNextMonth = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.NEXT_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Calculates what the previous month's date will be and clears the calendar refs\n * @param {Number} amountOfMonths - Number of months that will be added\n */\n const showPreviousMonth = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n emit(CalendarMonthEvent.PREVIOUS_MONTH, amountOfMonths);\n clearCalendarRefs();\n };\n\n /**\n * Changes focus to the indicated date.\n * Exposed to the component to set the initial focused date, which can also be null.\n * @param dateToBeFocusedOn - Date to be focused on\n * @param getFocusedElement - Get the element to be focused on instead of automatically focusing on it\n */\n const focusOnDate = (dateToBeFocusedOn: Date, getFocusedElement?: boolean): Element | null => {\n const dateExistsInCalendar = !!calendarRef.value[dateToBeFocusedOn?.toDateString()];\n\n // Focus only if the date exists\n if (!dateToBeFocusedOn || !dateExistsInCalendar) {\n return null;\n }\n\n if (getFocusedElement) {\n return calendarRef.value[dateToBeFocusedOn.toDateString()].$el;\n }\n\n calendarRef.value[dateToBeFocusedOn.toDateString()].$el.focus();\n\n return null;\n };\n\n /**\n * Prevents the event from bubbling\n * @param {Event} event - Triggered event\n */\n const stopPropagation = (event: Event) => {\n event.preventDefault();\n event.stopImmediatePropagation();\n event.stopPropagation();\n };\n\n // Keyboard Navigation events\n interface ChangeDate {\n nextDate: Date;\n isIncreasingDays: boolean;\n amountOfMonths?: number;\n isCalendarButtonsNav?: boolean;\n }\n /**\n * Activates the date passed in \"nextDate\".\n * Doesn't trigger the emit event to select the date, given this is only done\n * when the \"Enter\" key is pressed.\n *\n * The date passed is evaluated to check if it's the same month and year,\n * if not then a new month is rendered through {@see showNextMonth} or {@see showPreviousMonth}.\n *\n * If the date passed is disabled no action is taken.\n *\n * @param {Date} nextDate - Date to be processed and if it's not disabled it should make it active.\n * @param {Boolean} isIncreasinDays - Indicates if the date before or after the currently selected date.\n * @param {Number} amountOfMonths - Amount of months it's increasing or decreasing. Used to calculate the month to be rendered\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const changeDate = ({ nextDate, isIncreasingDays, amountOfMonths, isCalendarButtonsNav }: ChangeDate) => {\n // Do not change date if nextDay is disabled\n if (!isCalendarButtonsNav && isDateDisabled && isDateDisabled(nextDate)) {\n return;\n }\n\n const isNextDaySameMonthAndYear =\n nextDate.getMonth() === internalDate.value.getMonth() &&\n nextDate.getFullYear() === internalDate.value.getFullYear();\n // If it's in the same month, make \"nextDate\" the active date (not selected)\n if (isNextDaySameMonthAndYear) {\n internalDate.value = nextDate;\n focusOnDate(nextDate);\n } else {\n // Show next/previous month\n // and waits for the refs to be re-populated\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n isIncreasingDays ? showNextMonth(amountOfMonths) : showPreviousMonth(amountOfMonths);\n nextTick(() => {\n const isNextDateInTheDisplayedMonthAndYear =\n nextDate.getMonth() === baseDate.value.getMonth() &&\n nextDate.getFullYear() === baseDate.value.getFullYear();\n\n if ((isDateDisabled && isDateDisabled(nextDate)) || !isNextDateInTheDisplayedMonthAndYear) {\n return;\n }\n\n if (!isCalendarButtonsNav) {\n internalDate.value = nextDate;\n\n focusOnDate(nextDate);\n }\n });\n }\n };\n\n /**\n * Move the current date to the next calendar day\n * @param {Event} event - Triggered event\n */\n const moveToNextDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 1;\n changeDate({ nextDate: addDays(focusedDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the previous calendar day\n * @param {Event} event - Triggered event\n */\n const moveToPreviousDay = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 1;\n changeDate({ nextDate: subDays(focusedDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the previous week\n * @param {Event} event - Triggered event\n */\n const moveToPreviousWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToSubstract = 7;\n changeDate({ nextDate: subDays(focusedDate.value, daysToSubstract), isIncreasingDays: false });\n };\n\n /**\n * Move the current date to the same week day in the next week\n * @param {Event} event - Triggered event\n */\n const moveToNextWeek = (event: Event) => {\n stopPropagation(event);\n\n const daysToAdd = 7;\n changeDate({ nextDate: addDays(focusedDate.value, daysToAdd), isIncreasingDays: true });\n };\n\n /**\n * Move the current date to the first day of the week\n * @param {Event} event - Triggered event\n */\n const moveToFirstDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: startOfWeek(focusedDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: false,\n });\n };\n\n /**\n * Move the current date to the last day of the week\n * @param {Event} event - Triggered event\n */\n const moveToLastDayOfWeek = (event: Event) => {\n stopPropagation(event);\n\n changeDate({\n nextDate: endOfWeek(focusedDate.value, { weekStartsOn: firstDayOfWeek }),\n isIncreasingDays: true,\n });\n };\n\n /**\n * Move the current date to the same day in the previous year\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const moveToPreviousYear = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToSubstract = 12;\n changeDate({\n nextDate: subMonths(focusedDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the previous month.\n * If the date doesn't exists, moves to the last day of th month.\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n * @param {number} amount - The amount of months to move to\n */\n const moveToPreviousMonth = (event: Event, isCalendarButtonsNav = false, amount = 1) => {\n stopPropagation(event);\n\n const monthsToSubstract = amount;\n\n changeDate({\n nextDate: subMonths(focusedDate.value, monthsToSubstract),\n isIncreasingDays: false,\n amountOfMonths: monthsToSubstract,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the next year\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n */\n const moveToNextYear = (event: Event, isCalendarButtonsNav = false) => {\n stopPropagation(event);\n\n const monthsToAdd = 12;\n changeDate({\n nextDate: addMonths(focusedDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the same day in the next month.\n * @param {Event} event - Triggered event\n * @param {boolean} isCalendarButtonsNav - Indicates whether this action is triggered by the calendar navigation\n * @param {number} amount - The amount of months to move to\n */\n const moveToNextMonth = (event: Event, isCalendarButtonsNav = false, amount = 1) => {\n stopPropagation(event);\n\n const monthsToAdd = amount;\n\n changeDate({\n nextDate: addMonths(focusedDate.value, monthsToAdd),\n isIncreasingDays: true,\n amountOfMonths: monthsToAdd,\n isCalendarButtonsNav,\n });\n };\n\n /**\n * Move the current date to the first month of the year\n * @param {Event} event - Triggered event\n */\n const moveToFirstMonthOfYear = (event: Event) => {\n stopPropagation(event);\n\n const monthsShifting = differenceInMonths(internalDate.value, startOfYear(internalDate.value));\n\n changeDate({\n nextDate: startOfYear(internalDate.value),\n isIncreasingDays: false,\n amountOfMonths: monthsShifting,\n });\n };\n\n /**\n * Move the current date to the first month of the year\n * @param {Event} event - Triggered event\n */\n const moveToLastMonthOfYear = (event: Event) => {\n stopPropagation(event);\n\n // First day of last year, so that focusOnDate finds the target\n const lastMonth = set(internalDate.value, { month: 11, date: 1 });\n const monthsShifting = differenceInMonths(lastMonth, internalDate.value);\n\n changeDate({\n nextDate: lastMonth,\n isIncreasingDays: true,\n amountOfMonths: monthsShifting,\n });\n };\n\n return {\n // Calendar days ref\n calendarRef,\n addDayRef,\n\n /**\n * Month navigation\n */\n showNextMonth,\n showPreviousMonth,\n\n /**\n * Focus method\n */\n focusOnDate,\n\n /**\n * Day navigation\n */\n\n // ArrowRight\n moveToNextDay,\n // ArrowLeft\n moveToPreviousDay,\n // ArrowUp\n moveToPreviousWeek,\n // ArrowDown\n moveToNextWeek,\n // Home\n moveToFirstDayOfWeek,\n moveToFirstMonthOfYear,\n // End\n moveToLastDayOfWeek,\n moveToLastMonthOfYear,\n // PageUp\n moveToPreviousMonth,\n // Shift+PageUp\n moveToPreviousYear,\n // PageDown\n moveToNextMonth,\n // Shift-PageDown\n moveToNextYear,\n\n // Values\n internalDate,\n baseDate,\n };\n};\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { addDays } from \"./addDays.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDay} function options.\n */\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the week of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the day of the week set\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * const result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setDay(date, day, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const date_ = toDate(date, options?.in);\n const currentDay = date_.getDay();\n\n const remainder = day % 7;\n const dayIndex = (remainder + 7) % 7;\n\n const delta = 7 - weekStartsOn;\n const diff =\n day < 0 || day > 6\n ? day - ((currentDay + delta) % 7)\n : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link isWithinInterval} function options.\n */\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * @param date - The date to check\n * @param interval - The interval to check\n * @param options - An object with options\n *\n * @returns The date is within the interval\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => false\n *\n * @example\n * // For date equal to the interval start:\n * isWithinInterval(date, { start, end: date })\n * // => true\n *\n * @example\n * // For date equal to the interval end:\n * isWithinInterval(date, { start: date, end })\n * // => true\n */\nexport function isWithinInterval(date, interval, options) {\n const time = +toDate(date, options?.in);\n const [startTime, endTime] = [\n +toDate(interval.start, options?.in),\n +toDate(interval.end, options?.in),\n ].sort((a, b) => a - b);\n\n return time >= startTime && time <= endTime;\n}\n\n// Fallback for modularized imports:\nexport default isWithinInterval;\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-calendar-month\" v-on=\"listeners\">\n <div class=\"b-calendar-month__month-selector\">\n <!-- go to previous month -->\n <div class=\"b-calendar-month__previous\">\n <bento-button\n v-if=\"shouldShowPreviousMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToPreviousMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-left-icon :svg-title=\"t('previousMonth')\" />\n </template>\n </bento-button>\n </div>\n\n <!-- month's name -->\n <bento-typography :id=\"monthLabelId\" el=\"h2\" variant=\"title\" aria-live=\"polite\">\n {{ formattedMonthDate }}\n </bento-typography>\n\n <!-- go to next month -->\n <div class=\"b-calendar-month__next\">\n <bento-button\n v-if=\"shouldShowNextMonthButton\"\n variant=\"tertiary\"\n @click=\"moveToNextMonth($event, true)\"\n >\n <template #iconLeft>\n <chevron-right-icon :svg-title=\"t('nextMonth')\" />\n </template>\n </bento-button>\n </div>\n </div>\n <table class=\"b-calendar-month__month-container\" role=\"grid\" :aria-labelledby=\"monthLabelId\">\n <thead>\n <tr class=\"b-calendar-month__week-header\">\n <th\n v-for=\"(dayOfWeekFormatted, index) in daysOfWeek\"\n :key=\"index\"\n class=\"b-calendar-month__day-of-week\"\n scope=\"col\"\n >\n <bento-typography class=\"b-calendar-month__day-of-week-font\" el=\"span\" variant=\"caption\">\n {{ dayOfWeekFormatted }}\n </bento-typography>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(week, index) in weeksOfMonth\" :key=\"index\">\n <td v-if=\"index === 0 && week.length < 7\" :colspan=\"7 - week.length\"> </td>\n <calendar-month-day\n v-for=\"(day, dayIndex) in week\"\n :ref=\"addDayRef(day)\"\n :key=\"`calendar-day-${dayIndex}`\"\n :day=\"day\"\n :disabled=\"computedIsDateDisabled(day)\"\n :selected=\"isSelectedDate(day)\"\n :variant=\"dayVariant(day)\"\n @click=\"onDayClicked\"\n @mouseover=\"$emit(CalendarMonthEvent.MOUSE_OVER, day)\"\n @keyup.up.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.down.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.left.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n @keyup.right.native=\"$emit(CalendarMonthEvent.CHANGE_DAY, day)\"\n />\n </tr>\n <template v-if=\"weeksOfMonth?.length < 6\">\n <tr v-for=\"n in 6 - weeksOfMonth?.length\" :key=\"`calendar month filler row ${n}`\">\n <td aria-hidden=\"true\" class=\"b-calendar-month__empty-cell-filler\" :colspan=\"7\"></td>\n </tr>\n </template>\n </tbody>\n </table>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, toRef } from 'vue';\n import BentoButton from '@/components/button/button.vue';\n import { CalendarMonthDay, CalendarMonthDayVariant } from './components/calendar-month-day';\n import { BentoTypography } from '@/components/typography';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import {\n CalendarMonthEvent,\n CalendarMonthFirstDayOfWeek,\n type CalendarMonthIsDateDisabled,\n } from './calendar-month.types';\n import { CalendarPosition } from '@/internal/calendar/calendar.types';\n import { generateUid } from '@/core/utils/ts';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { useMoveCalendarDate } from './composables/move-calendar-date';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { setDay } from 'date-fns/setDay';\n import { startOfMonth } from 'date-fns/startOfMonth';\n import { startOfDay } from 'date-fns/startOfDay';\n import { format } from 'date-fns/format';\n import { isSameDay } from 'date-fns/isSameDay';\n import { isWithinInterval } from 'date-fns/isWithinInterval';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * CalendarMonth that displays all the days of a given month and allows\n * to move back and forth the visible month with the Next and Previous buttons\n *\n * @example\n * import { CalendarMonthMonth, CalendarMonthFirstDayOfWeek, CalendarPosition } from '@/internal/calendar';\n *\n * export default {\n * components: { CalendarMonthMonth },\n * template: `\n * <calendar\n * :first-day-of-week=\"CalendarMonthFirstDayOfWeek.SUNDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :month=\"new Date()\"\n * :position=\"CalendarPosition.LAST\"\n * is-range\n * :start-date=\"new Date()\"\n * :end-date=\"new Date()\"\n * @input=\"(selectedDate: Date) => void\"\n * @mouseover=\"(event: Event) => void\"\n * @nextMonth=\"() => void\"\n * @previousMonth=\"() => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'calendar-month',\n components: {\n BentoButton,\n BentoTypography,\n CalendarMonthDay,\n ChevronLeftIcon,\n ChevronRightIcon,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * end of the selected range\n */\n endDate: { type: Date, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: {\n type: Number as PropType<CalendarMonthFirstDayOfWeek>,\n default: CalendarMonthFirstDayOfWeek.MONDAY,\n validator: (value: CalendarMonthFirstDayOfWeek) =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(value),\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: { type: Function as PropType<CalendarMonthIsDateDisabled>, default: undefined },\n\n /**\n * Indicates if the calendar is part of a range date picker or a sigle date picker\n */\n isRange: { type: Boolean, default: false },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: { type: Date, default: null },\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: { type: Date, default: null },\n\n /**\n * Month of the year to be displayed in the calendar\n */\n month: { type: Date, required: true },\n\n /**\n * When rendering multiple calendars, this property allows to render the\n * Next and Previous calendar buttons to the right, left or not at all\n * depending on the position: Unique (only 1), First, Middle or Last\n */\n position: {\n type: String as PropType<`${CalendarPosition}`>,\n default: 'unique',\n validator: (value: CalendarPosition) => Object.values(CalendarPosition).includes(value),\n },\n\n /**\n * start of the selected range\n */\n startDate: { type: Date, default: null }, // can be undefined, eslint complains without default\n },\n emits: [\n CalendarMonthEvent.CHANGE_DAY,\n CalendarMonthEvent.INPUT,\n CalendarMonthEvent.NEXT_MONTH,\n CalendarMonthEvent.PREVIOUS_MONTH,\n CalendarMonthEvent.MOUSE_OVER,\n ],\n setup(props, { emit }) {\n // Date formatter locale options\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = getDateLocale();\n const monthLabelId = generateUid('bento-date-picker-month-label');\n\n const computedIsDateDisabled = computed(\n () => (date: Date) =>\n (props.min && date < props.min) || (props.max && date > props.max) || props.isDateDisabled?.(date)\n );\n\n const {\n internalDate,\n baseDate,\n // Calendar refs\n addDayRef,\n // Month navigation\n showNextMonth,\n showPreviousMonth,\n // Day navigation\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n focusOnDate,\n } = useMoveCalendarDate(\n {\n currentSelectedDate: toRef(props, 'startDate'),\n month: toRef(props, 'month'),\n isDateDisabled: computedIsDateDisabled.value,\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Default to Monday if the value passed in is not part of the defined Enum\n */\n const fallbackFirstDayOfWeek = computed(() =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(props.firstDayOfWeek)\n ? props.firstDayOfWeek\n : CalendarMonthFirstDayOfWeek.MONDAY\n );\n\n /**\n * Renders the previous month button if it's Unique or First calendar\n */\n const shouldShowPreviousMonthButton = computed(() => ['first', 'unique'].includes(props.position));\n\n /**\n * Renders the next month button if it's Unique or Last calendar\n */\n const shouldShowNextMonthButton = computed(() => ['last', 'unique'].includes(props.position));\n\n /**\n * Formats the month date to the name of the month and the year\n */\n const formattedMonthDate = computed(() =>\n format(baseDate.value, 'MMMM yyyy', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })\n );\n\n /**\n * Formats all the days of the week to their day name\n */\n const daysOfWeek = computed(() =>\n new Array(7).fill(new Date()).map((date, index) => {\n const dayOfWeekDate = setDay(date, fallbackFirstDayOfWeek.value + index);\n\n return format(dayOfWeekDate, 'EEE', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n });\n })\n );\n\n /**\n * Calculates all the weeks of the current \"props.month\"\n * and adds the respective day number to each column and week\n */\n const weeksOfMonth = computed(() => {\n const weeks = [];\n const date = startOfMonth(props.month);\n let week = weeks[weeks.push([]) - 1];\n\n while (date.getMonth() === props.month.getMonth()) {\n if (date.getDay() - fallbackFirstDayOfWeek.value === 0 && week.length > 0) {\n week = weeks[weeks.push([]) - 1];\n }\n\n week.push(startOfDay(date));\n date.setDate(date.getDate() + 1);\n }\n\n return weeks;\n });\n\n const onDayClicked = (selectedDate: Date) => {\n emit(CalendarMonthEvent.INPUT, selectedDate);\n };\n\n /**\n * Calculates the variation of the days selected.\n * For single select it's always SINGLE\n * For ranges:\n * - Start & End is the same: SINGLE\n * - Start: BEGINNING\n * - End: END\n * - Within the range: MIDDLE\n * @param {Date} day Current day\n */\n // eslint-disable-next-line consistent-return\n const dayVariant = (day: Date) => {\n if (!props.isRange || isSameDay(props.startDate, props.endDate)) {\n return CalendarMonthDayVariant.SINGLE;\n }\n\n if (props.startDate && isSameDay(props.startDate, day)) {\n return CalendarMonthDayVariant.BEGINNING;\n }\n if (props.endDate && isSameDay(props.endDate, day)) {\n return CalendarMonthDayVariant.END;\n }\n if (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n ) {\n return CalendarMonthDayVariant.MIDDLE;\n }\n };\n\n /**\n * Checks every date in the calendar to see if it's selected.\n * @param day Current day in the calendar\n */\n const isSelectedDate = (day: Date) => {\n // Single selection\n if (internalDate.value && isSameDay(internalDate.value, day) && !props.endDate) {\n return true;\n }\n\n // Range\n return (\n props.startDate &&\n props.endDate &&\n isWithinInterval(day, { start: props.startDate, end: props.endDate })\n );\n };\n\n const confirmNavigationDate = () => {\n emit(CalendarMonthEvent.INPUT, internalDate);\n };\n\n const listeners = {\n 'keydown:arrow-right': moveToNextDay,\n 'keydown:arrow-left': moveToPreviousDay,\n 'keydown:arrow-up': moveToPreviousWeek,\n 'keydown:arrow-down': moveToNextWeek,\n 'keydown:home': moveToFirstDayOfWeek,\n 'keydown:end': moveToLastDayOfWeek,\n 'keydown:page-up': moveToPreviousMonth,\n 'keydown:shift-page-up': moveToPreviousYear,\n 'keydown:page-down': moveToNextMonth,\n 'keydown:shift-page-down': moveToNextYear,\n };\n\n return {\n // Refs\n addDayRef,\n\n // Values\n computedIsDateDisabled,\n daysOfWeek,\n weeksOfMonth,\n formattedMonthDate,\n shouldShowNextMonthButton,\n shouldShowPreviousMonthButton,\n monthLabelId,\n\n // Enums\n CalendarMonthEvent,\n\n // Functions\n isSelectedDate,\n showNextMonth,\n showPreviousMonth,\n dayVariant,\n confirmNavigationDate,\n\n // Events\n onDayClicked,\n listeners,\n\n // Exposed methods\n focusOnDate,\n moveToNextDay,\n moveToPreviousDay,\n moveToPreviousWeek,\n moveToNextWeek,\n moveToFirstDayOfWeek,\n moveToLastDayOfWeek,\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-month.scss\" />\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","export interface CalendarYearMonthProps {\n /**\n * Date to be displayed as the calendar month. From 1st to 12th.\n */\n month: Date;\n\n /**\n * Indicate if a date should be disabled or not\n */\n disabled?: boolean;\n\n /**\n * Changes the state of the calendar month to selected.\n */\n selected?: boolean;\n\n /**\n * When the month is selected, this indicates if the selection is a single month or part of a range.\n * If it's a range it can be at the beginning, middle or end of the selection.\n */\n variant?: `${CalendarYearMonthVariant}`;\n}\n\n/**\n * Private types\n */\nexport enum CalendarYearMonthVariant {\n SINGLE = 'single',\n MIDDLE = 'middle',\n BEGINNING = 'beginning',\n END = 'end',\n}\n\nexport enum CalendarYearMonthClass {\n // Variant\n SINGLE = CalendarYearMonthVariant.SINGLE,\n MIDDLE = CalendarYearMonthVariant.MIDDLE,\n BEGINNING = CalendarYearMonthVariant.BEGINNING,\n END = CalendarYearMonthVariant.END,\n\n // Selected\n SELECTED = 'selected',\n UNSELECTED = 'unselected',\n\n // Current month\n CURRENT_MONTH = 'current-month',\n\n // Disabled\n DISABLED = 'disabled',\n}\n\nexport enum CalendarYearMonthEvent {\n CLICK = 'click',\n MOUSE_OVER = 'mouseover',\n}\n","<template>\n <td\n class=\"b-calendar-year-month\"\n :class=\"conditionalClasses\"\n :tabindex=\"selected ? '0' : '-1'\"\n :aria-selected=\"selected ? selected : undefined\"\n @click=\"e => onClick(e, month)\"\n @mouseover=\"emit(CalendarYearMonthEvent.MOUSE_OVER)\"\n @keydown.space.enter=\"e => onClick(e, month)\"\n >\n <div class=\"b-calendar-year-month__wrapper\">\n <bento-date class=\"b-calendar-year-month__label\" :date=\"month\" :format=\"BentoDateFormat.SHORT_MONTH\" />\n </div>\n </td>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDate, BentoDateFormat } from '@/components/date';\n import {\n CalendarYearMonthClass,\n CalendarYearMonthEvent,\n type CalendarYearMonthProps,\n CalendarYearMonthVariant,\n } from './calendar-year-month.types';\n\n const props = defineProps({\n month: null,\n disabled: { type: Boolean, default: false },\n selected: { type: Boolean, default: false },\n variant: { default: CalendarYearMonthVariant.SINGLE }\n});\n\n const emit = defineEmits([\"click\", \"mouseover\"]);\n\n const isCurrentMonth = computed(() => {\n const today = new Date();\n return props.month.getMonth() === today.getMonth() && props.month.getFullYear() === today.getFullYear();\n });\n\n const conditionalClasses = computed(() => ({\n // Variants\n [`b-calendar-year-month--${CalendarYearMonthClass.BEGINNING}`]:\n props.variant === CalendarYearMonthVariant.BEGINNING,\n [`b-calendar-year-month--${CalendarYearMonthClass.MIDDLE}`]: props.variant === CalendarYearMonthVariant.MIDDLE,\n [`b-calendar-year-month--${CalendarYearMonthClass.END}`]: props.variant === CalendarYearMonthVariant.END,\n [`b-calendar-year-month--${CalendarYearMonthClass.SINGLE}`]: props.variant === CalendarYearMonthVariant.SINGLE,\n\n // Selected\n [`b-calendar-year-month--${CalendarYearMonthClass.UNSELECTED}`]: !props.selected,\n [`b-calendar-year-month--${CalendarYearMonthClass.SELECTED}`]: props.selected,\n\n // Current month\n [`b-calendar-year-month--${CalendarYearMonthClass.CURRENT_MONTH}`]: isCurrentMonth.value,\n\n // Disabled\n [`b-calendar-year-month--${CalendarYearMonthClass.DISABLED}`]: props.disabled,\n }));\n\n const onClick = (e: MouseEvent | KeyboardEvent, selectedDay: Date) => {\n if (!props.disabled) {\n emit(CalendarYearMonthEvent.CLICK, selectedDay, props.month);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Handles the styles and states of the individual months of the calendar.\n *\n * @example\n * import { CalendarYearMonth, CalendarYearMonthVariant } from './calendar-year-month';\n *\n * export default {\n * components: { CalendarYearMonth },\n * template: `\n * <table>\n * <tbody>\n * <tr>\n * <calendar-year-month\n * :month=\"new Date()\"\n * disabled\n * selected\n * :variant=\"CalendarYearMonthVariant.MIDDLE\"\n * />\n * </tr>\n * </tbody>\n * </table>\n * `\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-year-month.scss\" />\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-calendar-year\" v-on=\"listeners\">\n <div class=\"b-calendar-year__year-selector\">\n <!-- go to previous year -->\n <div class=\"b-calendar-year__previous\">\n <bento-button\n v-if=\"shouldShowPreviousYearButton\"\n variant=\"tertiary\"\n @click=\"moveToPreviousYear($event, true)\"\n >\n <template #iconLeft>\n <chevron-left-icon :svg-title=\"t('previousYear')\" />\n </template>\n </bento-button>\n </div>\n\n <!-- year -->\n <bento-typography :id=\"yearLabelId\" el=\"h2\" variant=\"title\" aria-live=\"polite\">\n {{ year.getFullYear() }}\n </bento-typography>\n\n <!-- go to next year -->\n <div class=\"b-calendar-year__next\">\n <bento-button v-if=\"shouldShowNextYearButton\" variant=\"tertiary\" @click=\"moveToNextYear($event, true)\">\n <template #iconLeft>\n <chevron-right-icon :svg-title=\"t('nextYear')\" />\n </template>\n </bento-button>\n </div>\n </div>\n\n <table class=\"b-calendar-year__year-container\" role=\"grid\" :aria-labelledby=\"yearLabelId\">\n <tbody>\n <tr v-for=\"(row, index) in monthRows\" :key=\"index\">\n <calendar-year-month\n v-for=\"(month, monthIndex) in row\"\n :ref=\"addDayRef(month)\"\n :key=\"`calendar-month-${monthIndex}`\"\n :month=\"month\"\n :disabled=\"isDateDisabled(month)\"\n :selected=\"isSelectedDate(month)\"\n :variant=\"monthVariant(month)\"\n @click=\"onMonthClicked\"\n @mouseover=\"emit('mouseover', month)\"\n />\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, toRef } from 'vue';\n import { isSameMonth } from 'date-fns/isSameMonth';\n import { isWithinInterval } from 'date-fns/isWithinInterval';\n\n import BentoButton from '@/components/button/button.vue';\n import { BentoTypography } from '@/components/typography';\n import CalendarYearMonth from './components/calendar-year-month/calendar-year-month.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n\n import { BentoKeyboardNavigationDirective as vBentoKeyboardNavigationDirective } from '@/directives';\n import { generateUid } from '@/core/utils/ts';\n import { useI18n } from '@/utils/ts/i18n';\n import { useMoveCalendarDate } from '@/internal/calendar/components/calendar-month/composables/move-calendar-date';\n\n import { type CalendarYearProps } from './calendar-year.types';\n import { CalendarYearMonthVariant } from './components/calendar-year-month/calendar-year-month.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const yearLabelId = generateUid('bento-date-picker-year-label');\n\n const props = defineProps({\n endDate: { default: null },\n isDateDisabled: { type: Function, default: undefined },\n isRange: { type: Boolean, default: false },\n min: { default: null },\n max: { default: null },\n position: { default: 'unique' },\n startDate: { default: null },\n year: null\n});\n\n const emit = defineEmits([\"input\", \"mouseover\", \"nextMonth\", \"previousMonth\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const isDateDisabled = (date: Date) =>\n (props.min && date < props.min) || (props.max && date > props.max) || props.isDateDisabled?.(date);\n\n /**\n * Renders the previous year button if it's Unique or First calendar\n */\n const shouldShowPreviousYearButton = computed(() => ['first', 'unique'].includes(props.position));\n\n /**\n * Renders the next year button if it's Unique or Last calendar\n */\n const shouldShowNextYearButton = computed(() => ['last', 'unique'].includes(props.position));\n\n const {\n internalDate,\n // Calendar refs\n addDayRef,\n\n // Day navigation\n moveToPreviousMonth,\n moveToPreviousYear,\n moveToNextMonth,\n moveToNextYear,\n moveToFirstMonthOfYear,\n moveToLastMonthOfYear,\n focusOnDate,\n } = useMoveCalendarDate(\n {\n currentSelectedDate: toRef(props, 'startDate'),\n month: toRef(props, 'year'),\n isDateDisabled,\n },\n emit\n );\n\n defineExpose({ focusOnDate });\n\n /**\n * Calculates all the months of the current \"props.month\"\n * and adds the respective day number to each column and week\n */\n const monthRows = computed(() => {\n const rows = [];\n let count = 0;\n\n for (let i = 0; i < 3; i++) {\n const innerArray = [];\n for (let j = 0; j < 4; j++) {\n innerArray.push(new Date(props.year.getFullYear(), count++, 1));\n }\n rows.push(innerArray);\n }\n\n return rows;\n });\n\n /**\n * Calculates the variation of the days selected.\n * For single select it's always SINGLE\n * For ranges:\n * - Start & End is the same: SINGLE\n * - Start: BEGINNING\n * - End: END\n * - Within the range: MIDDLE\n * @param {Date} day Current day\n */\n const monthVariant = (day: Date) => {\n if (!props.isRange || isSameMonth(props.startDate, props.endDate)) {\n return CalendarYearMonthVariant.SINGLE;\n }\n\n if (props.startDate && isSameMonth(props.startDate, day)) {\n return CalendarYearMonthVariant.BEGINNING;\n }\n if (props.endDate && isSameMonth(props.endDate, day)) {\n return CalendarYearMonthVariant.END;\n }\n if (props.startDate && props.endDate && isWithinInterval(day, { start: props.startDate, end: props.endDate })) {\n return CalendarYearMonthVariant.MIDDLE;\n }\n return null;\n };\n\n /**\n * Checks every date in the calendar to see if it's selected.\n * @param date Current date in the calendar\n */\n const isSelectedDate = (date: Date) => {\n // Single selection\n if (internalDate.value && isSameMonth(internalDate.value, date)) {\n return true;\n }\n\n // Range\n return (\n props.startDate && props.endDate && isWithinInterval(date, { start: props.startDate, end: props.endDate })\n );\n };\n\n const onMonthClicked = (selectedDate: Date) => {\n emit('input', selectedDate);\n };\n\n const listeners = !props.isRange\n ? {\n 'keydown:arrow-right': moveToNextMonth,\n 'keydown:arrow-left': moveToPreviousMonth,\n 'keydown:arrow-up': (ev: Event) => moveToPreviousMonth(ev, false, 4),\n 'keydown:arrow-down': (ev: Event) => moveToNextMonth(ev, false, 4),\n 'keydown:home': moveToFirstMonthOfYear,\n 'keydown:end': moveToLastMonthOfYear,\n 'keydown:page-up': moveToPreviousYear,\n 'keydown:page-down': moveToNextYear,\n }\n : {};\n</script>\n\n<script lang=\"ts\">\n /**\n * CalendarYear that displays all the months of a given year and allows\n * to move back and forth the visible year with the Next and Previous buttons\n *\n * @example\n * import { CalendarYear } from '@/internal/calendar';\n *\n * export default {\n * components: { CalendarYear },\n * template: `\n * <calendar-year\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :year=\"new Date()\"\n * is-range\n * :start-date=\"new Date()\"\n * :end-date=\"new Date()\"\n * @input=\"(selectedDate: Date) => void\"\n * @mouseover=\"(event: Event) => void\"\n * @nextMonth=\"() => void\"\n * @previousMonth=\"() => void\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar-year.scss\" />\n","import { reactive, watch } from 'vue';\nimport { CalendarEvent, type UseCalendarPane } from '../calendar.types';\n\nexport const useSinglePane: UseCalendarPane = ({ selectedDate }, emit) => {\n /**\n * Internal date manipulation.\n */\n const internalValue = reactive({\n startDate: null,\n endDate: null,\n });\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n internalValue.startDate = selectedDate.value;\n internalValue.endDate = undefined;\n },\n { immediate: true }\n );\n\n /**\n * Called when a date is selected.\n *\n * Emits the selected date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n emit(CalendarEvent.INPUT, date);\n };\n\n return {\n internalValue,\n\n onDateInput,\n // Empty function to prevent the listeners from throwing a warning\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onMouseOver: () => {},\n };\n};\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\n\n/**\n * The {@link differenceInDays} function options.\n */\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const sign = compareLocalAsc(laterDate_, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarDays(laterDate_, earlierDate_),\n );\n\n laterDate_.setDate(laterDate_.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n const isLastDayNotFull = Number(\n compareLocalAsc(laterDate_, earlierDate_) === -sign,\n );\n\n const result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(laterDate, earlierDate) {\n const diff =\n laterDate.getFullYear() - earlierDate.getFullYear() ||\n laterDate.getMonth() - earlierDate.getMonth() ||\n laterDate.getDate() - earlierDate.getDate() ||\n laterDate.getHours() - earlierDate.getHours() ||\n laterDate.getMinutes() - earlierDate.getMinutes() ||\n laterDate.getSeconds() - earlierDate.getSeconds() ||\n laterDate.getMilliseconds() - earlierDate.getMilliseconds();\n\n if (diff < 0) return -1;\n if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfQuarter} function options.\n */\n\n/**\n * @name endOfQuarter\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a quarter\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3) + 3;\n _date.setMonth(month, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfQuarter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfQuarter} function options.\n */\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3);\n _date.setMonth(month, 1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n","import { endOfMonth } from 'date-fns/endOfMonth';\nimport { endOfQuarter } from 'date-fns/endOfQuarter';\nimport { endOfWeek } from 'date-fns/endOfWeek';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { startOfQuarter } from 'date-fns/startOfQuarter';\nimport { startOfWeek } from 'date-fns/startOfWeek';\n\nimport type { UseGranularityAdjustments } from './use-granularity-adjustments.types';\n\n/**\n * Provides utility function to adjust date range selections according to the selected granularity.\n * @param firstDayOfWeek The day a week starts on\n * @param min Minimum selectable date\n * @param max Maximum selectable date\n * @returns A set of functions to adjust date range objects and date strings to a specific granularity.\n */\nexport const useGranularityAdjustments: UseGranularityAdjustments = firstDayOfWeek => {\n /**\n * Adjusts a given date or date range to the weekly granularity.\n * Always returns full weeks.\n */\n const adjustDateForWeekly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfWeek(date, { weekStartsOn: firstDayOfWeek });\n let end = endOfWeek(endDate || date, { weekStartsOn: firstDayOfWeek });\n\n const isStartOutOfBounds = min && start < min;\n const isEndOutOfBounds = max && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n }\n\n if (isEndOutOfBounds) {\n end = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full week\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfWeek(start, { weekStartsOn: firstDayOfWeek });\n } else {\n start = startOfWeek(end, { weekStartsOn: firstDayOfWeek });\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a given date or date range to the monthly granularity.\n * Always returns full months.\n */\n const adjustDateForMonthly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfMonth(date);\n let end = endOfMonth(endDate || date);\n\n const isStartOutOfBounds = min && start < min;\n const isEndOutOfBounds = max && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfMonth(min);\n }\n\n if (isEndOutOfBounds) {\n end = endOfMonth(max);\n }\n\n // If min/max adjustments caused invalid range, set to first/last available full month\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfMonth(start);\n } else {\n start = startOfMonth(end);\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a given date or date range to the quarterly granularity.\n * Always returns full quarters (Q1, Q2, Q3, Q4).\n */\n const adjustDateForQuarterly = (date: Date, endDate?: Date, min?: Date, max?: Date) => {\n let start = startOfQuarter(date);\n let end = endOfQuarter(endDate || date);\n\n const isStartOutOfBounds = min instanceof Date && start < min;\n const isEndOutOfBounds = max instanceof Date && end > max;\n\n if (isStartOutOfBounds) {\n start = startOfQuarter(min);\n }\n\n if (isEndOutOfBounds) {\n end = endOfQuarter(max);\n }\n\n if (start > end) {\n if (isStartOutOfBounds) {\n end = endOfQuarter(start);\n } else {\n start = startOfQuarter(end);\n }\n }\n\n return { startDate: start, endDate: end };\n };\n\n /**\n * Adjusts a text start date for weekly granularity (start of that week)\n */\n const adjustStartDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for weekly granularity (end of that week)\n */\n const adjustEndDateInputForWeekly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForWeekly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n /**\n * Adjusts a text start date for monthly granularity (start of that month)\n */\n const adjustStartDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for monthly granularity (end of that month)\n */\n const adjustEndDateInputForMonthly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForMonthly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n /**\n * Adjusts a text start date for quarterly granularity (start of that quarter)\n */\n const adjustStartDateInputForQuarterly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { startDate } = adjustDateForQuarterly(new Date(date), null, min, max);\n return formatDate(startDate);\n };\n\n /**\n * Adjusts a text end date for quarterly granularity (end of that quarter)\n */\n const adjustEndDateInputForQuarterly = (\n date: string,\n formatDate: (dateToFormat?: Date) => string,\n min?: Date,\n max?: Date\n ) => {\n const { endDate } = adjustDateForQuarterly(new Date(date), null, min, max);\n return formatDate(endDate);\n };\n\n return {\n adjustDateForWeekly,\n adjustDateForMonthly,\n adjustDateForQuarterly,\n adjustStartDateInputForWeekly,\n adjustEndDateInputForWeekly,\n adjustStartDateInputForMonthly,\n adjustEndDateInputForMonthly,\n adjustStartDateInputForQuarterly,\n adjustEndDateInputForQuarterly,\n };\n};\n","import { reactive, ref, watch } from 'vue';\nimport { CalendarEvent, type CalendarRangeDateValue, type UseCalendarPane } from '../calendar.types';\nimport { isBefore } from 'date-fns/isBefore';\nimport { startOfDay } from 'date-fns/startOfDay';\nimport { isAfter } from 'date-fns/isAfter';\nimport { addDays } from 'date-fns/addDays';\nimport { differenceInDays } from 'date-fns/differenceInDays';\nimport { subDays } from 'date-fns/subDays';\n\nimport { useGranularityAdjustments } from './use-granularity-adjustments';\n\n/**\n * Provides event handler logic to correctly display date range selection, as a user clicks calendar dates.\n * @param props Calendar properties and current date selection\n * @param emit The Vue event `emit` function\n * @returns A date range internal value, and a set of handlers for date mouse input.\n */\nexport const useRangePane: UseCalendarPane = (\n { selectedDate, isDateDisabled, maxRange, granularity, firstDayOfWeek, min, max },\n emit\n) => {\n const backwardsDirection = -1;\n const forwardDirection = 1;\n\n const { adjustDateForWeekly, adjustDateForMonthly, adjustDateForQuarterly } =\n useGranularityAdjustments(firstDayOfWeek);\n\n /**\n * Internal date manipulation.\n * This allows to change the dates with the form.\n */\n const internalValue = reactive<CalendarRangeDateValue>({\n startDate: null,\n endDate: null,\n });\n\n /**\n * First clicked date to calculate the ranges with\n */\n const clickedDate = ref<Date | null>(null);\n\n /**\n * Set \"internalValue\" to the initial date and kept in sync for when\n * the date is changed outside of the component while the component is mounted\n */\n watch(\n () => selectedDate.value,\n () => {\n let { startDate = null, endDate = null } = (selectedDate.value as CalendarRangeDateValue) || {};\n\n if (startDate) {\n startDate = startOfDay(startDate);\n }\n\n if (endDate) {\n endDate = startOfDay(endDate);\n }\n\n if (\n (startDate && isDateDisabled && isDateDisabled(startDate)) ||\n (endDate && isDateDisabled && isDateDisabled(endDate)) ||\n (startDate && endDate && isAfter(startDate, endDate))\n ) {\n // Disabled dates do nothing\n return;\n }\n\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n },\n { immediate: true, deep: true }\n );\n\n const setDates = (startDate: Date, endDate: Date, direction?: number) => {\n // Set new initial dates to internal state\n // For the form manual input to be registered, null values are allowed\n internalValue.startDate = startDate;\n internalValue.endDate = endDate;\n\n // Selects a range of dates not bigger than the maxRange value\n if (maxRange.value) {\n const difference = differenceInDays(endDate, startDate) - maxRange.value;\n if (difference > 0) {\n if (direction < 1) {\n internalValue.startDate = startDate;\n internalValue.endDate = subDays(endDate, difference);\n } else {\n internalValue.startDate = addDays(startDate, difference);\n internalValue.endDate = endDate;\n }\n }\n }\n\n emit(CalendarEvent.START_DATE_SELECTED, internalValue.startDate);\n emit(CalendarEvent.END_DATE_SELECTED, internalValue.endDate);\n };\n\n /**\n * When the mouse moves over the days it recalculates the\n * range and moves it to the next range.\n *\n * If it's before the intial date it switches the range (start becomes end and vice versa)\n * If it's after it sets the new end date.\n * @param date - Hovered date\n */\n const onMouseOver = (date: Date) => {\n if (!clickedDate.value || (isDateDisabled && isDateDisabled(date))) {\n return;\n }\n\n if (isBefore(date, clickedDate.value)) {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n // For quarterly granularity, set date selection to the respective full quarter\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(date, clickedDate.value, min.value, max.value);\n setDates(startDate, endDate, backwardsDirection);\n return;\n }\n\n setDates(date, clickedDate.value, backwardsDirection);\n } else {\n // For weekly granularity, set date selection to the respective full week\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n // For monthly granularity, set date selection to the respective full month\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n // For quarterly granularity, set date selection to the respective full quarter\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(clickedDate.value, date, min.value, max.value);\n setDates(startDate, endDate, forwardDirection);\n return;\n }\n\n setDates(clickedDate.value, date, forwardDirection);\n }\n };\n\n /**\n * Called when a date is selected.\n *\n * - Initial click: Sets the selected date\n * - Second click: Selects the date range. Emits the Start date & End date\n *\n * @param date - Date clicked\n */\n const onDateInput = (date: Date) => {\n // Second click\n if (clickedDate.value) {\n // Reset clicked date after second click\n clickedDate.value = null;\n\n // Set the end date in our internal value which will be emitted\n // Emit when the second date (endDate) is selected\n emit(CalendarEvent.INPUT, internalValue);\n } else {\n // First click\n let correctedDate = date;\n\n // Correct the selected date to the start of the respective week and apply it\n if (granularity?.value?.type === 'weekly') {\n const { startDate, endDate } = adjustDateForWeekly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // Correct the selected date to the start of the respective month and apply it\n if (granularity?.value?.type === 'monthly') {\n const { startDate, endDate } = adjustDateForMonthly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // Correct the selected date to the start of the respective quarter and apply it\n if (granularity?.value?.type === 'quarterly') {\n const { startDate, endDate } = adjustDateForQuarterly(date);\n correctedDate = startDate;\n setDates(correctedDate, endDate);\n }\n\n // For daily, manually trigger `onMouseOver` so that the full behavior is\n // replicated if the user clicks the same day twice\n clickedDate.value = correctedDate;\n\n onMouseOver(correctedDate);\n }\n };\n\n return {\n internalValue,\n\n onDateInput,\n onMouseOver,\n };\n};\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","<template>\n <div class=\"b-calendar\" :class=\"conditionalClasses\">\n <component\n :is=\"calendarComponent\"\n v-for=\"(_, index) in numberOfMonths\"\n :ref=\"numberOfMonths === 1 ? 'calendarRef' : null\"\n :key=\"`calendar-${index}`\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :month=\"calculateOffsetMonth(index)\"\n :year=\"calculateOffsetYear(index)\"\n :position=\"calendarPosition(index)\"\n :min=\"min\"\n :max=\"max\"\n :is-range=\"isRange\"\n :start-date=\"internalValue.startDate\"\n :end-date=\"internalValue.endDate\"\n :granularity=\"granularity\"\n @input=\"onDateInput\"\n @mouseover=\"onMouseOver\"\n @changeDay=\"onMouseOver\"\n @nextMonth=\"calculateNextMonths\"\n @previousMonth=\"calculatePreviousMonths\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, toRef, watch } from 'vue';\n import CalendarMonth from './components/calendar-month/calendar-month.vue';\n import CalendarYear from './components/calendar-year/calendar-year.vue';\n import { CalendarMonthFirstDayOfWeek } from './components/calendar-month';\n import type { CalendarMonthIsDateDisabled } from './components/calendar-month';\n import {\n CalendarEvent,\n type CalendarGranularityConfig,\n CalendarPosition,\n type CalendarRangeDateValue,\n type CalendarValue,\n CalendarVariant,\n } from './calendar.types';\n import { useSinglePane } from './composables/use-single-pane';\n import { useRangePane } from './composables/use-range-pane';\n import { addMonths } from 'date-fns/addMonths';\n import { subMonths } from 'date-fns/subMonths';\n import { addYears } from 'date-fns/addYears';\n import { subYears } from 'date-fns/subYears';\n\n /**\n * Handles the calendar logic to change visible months for Single calendar\n * and Range calendar, as well as the selection logic for range.\n * All the processing necessary for the calendar to select dates\n *\n * @example\n * import { Calendar } from '@/internal/bento-vue2';\n *\n * export default {\n * components: { Calendar },\n * template: `\n * <calendar\n * :value=\"value\"\n * :first-day-of-week=\"CalendarFirstDayOfWeek.Monday\"\n * :is-date-disabled=\"(day: Date) => boolean\"\n * :number-of-months=\"2\"\n * is-range\n * @input=\"(selectedDate) => void\"\n * @start-date-selected=\"(startDate: Date) => void\"\n * @end-date-selected=\"(endDate: Date) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'calendar',\n components: { CalendarMonth, CalendarYear },\n props: {\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: {\n type: Number as PropType<CalendarMonthFirstDayOfWeek>,\n default: CalendarMonthFirstDayOfWeek.MONDAY,\n validator: (value: CalendarMonthFirstDayOfWeek) =>\n Object.values(CalendarMonthFirstDayOfWeek).includes(value),\n },\n\n /**\n * The selected granularity configuration\n */\n granularity: {\n type: Object as PropType<CalendarGranularityConfig>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: { type: Function as PropType<CalendarMonthIsDateDisabled>, default: undefined },\n\n /**\n * Enables the Date Range calendar\n */\n isRange: { type: Boolean, default: false },\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: { type: Number, default: null, validator: (value: number) => !value || value > 0 },\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: { type: Date, default: null },\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: { type: Date, default: null },\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: {\n type: Number,\n default: 3,\n validator: (n: number) => n >= 1,\n },\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Selected date. Can be a single Date or a CalendarRangeDate\n * instance that contains startDate and endDate attributes.\n */\n value: { type: [Date, Object] as PropType<CalendarValue>, default: undefined },\n\n /**\n * Default start date for the calendar pane\n */\n defaultDisplayMonth: {\n type: String,\n default: null,\n validator: (value: string) => {\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/;\n const isValidDate = dateRegex.test(value);\n\n return isValidDate;\n },\n },\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant: {\n type: String as PropType<`${CalendarVariant}`>,\n default: 'day',\n validator: (value: string) => Object.values(CalendarVariant).includes(value as CalendarVariant),\n },\n },\n emit: [CalendarEvent.INPUT, CalendarEvent.START_DATE_SELECTED, CalendarEvent.END_DATE_SELECTED],\n setup(props, { emit }) {\n // Single date calendar ref\n const calendarRef = ref(null);\n // Use a duplicate of \"month\" to move back and\n // forth with the arrows. Maintained in sync with the prop \"value\"\n const baseDate = ref();\n watch(\n () => props.value,\n () => {\n if (props.isRange) {\n baseDate.value =\n props?.showEndDateOnOpen && (props.value as CalendarRangeDateValue)?.endDate\n ? (props.value as CalendarRangeDateValue)?.endDate\n : (props.value as CalendarRangeDateValue)?.startDate || new Date();\n } else {\n const defaultDate =\n props.defaultDisplayMonth && new Date(props.defaultDisplayMonth).getTime()\n ? new Date(props.defaultDisplayMonth)\n : new Date();\n baseDate.value = (props.value as Date) || defaultDate;\n }\n },\n { immediate: true, deep: true }\n );\n\n const calendarComponent = computed(() =>\n props.variant === CalendarVariant.MONTH ? CalendarYear : CalendarMonth\n );\n\n const conditionalClasses = computed(() => ({\n 'b-calendar__range': props.isRange,\n }));\n\n const { internalValue, onDateInput, onMouseOver } = props.isRange\n ? useRangePane(\n {\n selectedDate: toRef(props, 'value'),\n isDateDisabled: props.isDateDisabled as (date: Date) => boolean,\n maxRange: toRef(props, 'maxRange'),\n granularity: toRef(props, 'granularity'),\n firstDayOfWeek: props.firstDayOfWeek,\n min: toRef(props, 'min'),\n max: toRef(props, 'max'),\n },\n emit\n )\n : useSinglePane(\n {\n selectedDate: toRef(props, 'value'),\n firstDayOfWeek: props.firstDayOfWeek,\n },\n emit\n );\n\n /**\n * Calculate the current month calendar.\n * This is used to render/hide the Previous & Next buttons on each calendar.\n * @param {number} calendarIndex - Number to offset the calendar position\n */\n const calendarPosition = (calendarIndex: number): `${CalendarPosition}` => {\n if (props.numberOfMonths === 1) {\n return CalendarPosition.UNIQUE;\n }\n\n if (calendarIndex === 0) {\n return CalendarPosition.FIRST;\n }\n\n return calendarIndex === props.numberOfMonths - 1 ? CalendarPosition.LAST : CalendarPosition.MIDDLE;\n };\n\n /**\n * Calculates in relation to the amount of months defined in \"numberOfMonths\"\n * which calendar month should be render starting from the first (leftmost)\n * rendered calendar.\n * If showEndDateOnOpen is set to true, the last pane should be the baseDate month i.e. the end date\n * @param offsetMonth - Amount of months to add after the first month was rendered\n */\n const calculateOffsetMonth = computed(() => (offsetMonth: number) => {\n const monthOffset =\n props?.showEndDateOnOpen && props.isRange\n ? subMonths(baseDate.value, props.numberOfMonths - 1)\n : baseDate.value;\n\n return addMonths(monthOffset, offsetMonth);\n });\n\n const calculateOffsetYear = computed(() => (offsetYear: number) => {\n const yearOffset = props?.showEndDateOnOpen\n ? subYears(baseDate.value, props.numberOfMonths - 1)\n : baseDate.value;\n\n return addYears(yearOffset, offsetYear);\n });\n\n /**\n * By default shows the following month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to skip a year\n */\n const calculateNextMonths = (amountOfMonths = 1) => {\n baseDate.value = addMonths(baseDate.value, amountOfMonths);\n };\n\n /**\n * By default shows the previous month\n * Can skip multiple months by passing an additional param\n * Used for keyboard nav to be able to go back a year\n */\n const calculatePreviousMonths = (amountOfMonths = 1) => {\n baseDate.value = subMonths(baseDate.value, amountOfMonths);\n };\n\n return {\n // Refs\n calendarRef,\n\n // Values\n baseDate,\n calendarComponent,\n conditionalClasses,\n internalValue,\n\n // Methods\n calculateOffsetMonth,\n calculateOffsetYear,\n calendarPosition,\n\n // Events\n onDateInput,\n onMouseOver,\n calculateNextMonths,\n calculatePreviousMonths,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./calendar.scss\" />\n"],"names":["CalendarMonthDayVariant","CalendarMonthDayVariant2","CalendarMonthDayClass","CalendarMonthDayClass2","CalendarMonthDayEvent","CalendarMonthDayEvent2","CalendarMonthDateProps","value","_sfc_main$4","defineComponent","BentoDate","props","emit","isCurrentDay","computed","today","BentoDateFormat","e","selectedDay","startOfWeek","date","options","defaultOptions","getDefaultOptions","weekStartsOn","_b","_a","_d","_c","_date","toDate","day","diff","CalendarMonthEvent","CalendarMonthEvent2","CalendarMonthFirstDayOfWeek","CalendarMonthFirstDayOfWeek2","CalendarYearPosition","CalendarYearPosition2","CalendarEvent","CalendarEvent2","CalendarVariant","CalendarVariant2","addDays","amount","constructFrom","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","endOfWeek","getDaysInMonth","year","monthIndex","lastDayOfMonth","setMonth","month","midMonth","set","values","startOfYear","date_","subDays","subMonths","useMoveCalendarDate","currentSelectedDate","isDateDisabled","firstDayOfWeek","baseDate","ref","watch","internalDate","activeElement","useActiveElement","focusedDate","el","currentDate","calendarRef","addDayRef","enteringRef","clearCalendarRefs","showNextMonth","amountOfMonths","showPreviousMonth","focusOnDate","dateToBeFocusedOn","getFocusedElement","dateExistsInCalendar","stopPropagation","event","changeDate","nextDate","isIncreasingDays","isCalendarButtonsNav","nextTick","isNextDateInTheDisplayedMonthAndYear","monthsShifting","differenceInMonths","lastMonth","monthsToSubstract","monthsToAdd","setDay","currentDay","dayIndex","delta","startOfMonth","startOfDay","differenceInCalendarDays","laterDate","earlierDate","laterDate_","earlierDate_","normalizeDates","laterStartOfDay","earlierStartOfDay","laterTimestamp","getTimezoneOffsetInMilliseconds","earlierTimestamp","millisecondsInDay","getDayOfYear","startOfISOWeek","getISOWeekYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfISOWeekYear","fourthOfJanuary","getISOWeek","millisecondsInWeek","getWeekYear","firstWeekContainsDate","firstWeekOfNextYear","firstWeekOfThisYear","startOfWeekYear","firstWeek","getWeek","addLeadingZeros","number","targetLength","sign","output","lightFormatters","token","signedYear","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","localize","era","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","quarter","week","isoWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","absOffset","minutes","dateLongFormatter","pattern","formatLong","timeLongFormatter","dateTimeLongFormatter","matchResult","datePattern","timePattern","dateTimeFormat","longFormatters","dayOfYearTokenRE","weekYearTokenRE","throwTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","warnOrThrowProtectedError","format","input","_message","message","subject","isDate","isValid","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","formatStr","locale","enUS","_f","_e","_h","_g","originalDate","parts","substring","firstCharacter","longFormatter","cleanEscapedString","formatterOptions","part","formatter","matched","isSameDay","dateLeft_","dateRight_","isWithinInterval","interval","time","startTime","endTime","a","b","_sfc_main$3","messages$1","BentoButton","BentoTypography","CalendarMonthDay","ChevronLeftIcon","ChevronRightIcon","BentoKeyboardNavigationDirective","t","useI18n","locales","getDateLocale","monthLabelId","generateUid","computedIsDateDisabled","moveToNextDay","moveToPreviousDay","moveToPreviousWeek","moveToNextWeek","moveToFirstDayOfWeek","moveToLastDayOfWeek","moveToPreviousMonth","moveToPreviousYear","moveToNextMonth","moveToNextYear","toRef","fallbackFirstDayOfWeek","shouldShowPreviousMonthButton","shouldShowNextMonthButton","formattedMonthDate","daysOfWeek","index","dayOfWeekDate","weeksOfMonth","weeks","selectedDate","isSameMonth","CalendarYearMonthVariant","CalendarYearMonthVariant2","CalendarYearMonthClass","CalendarYearMonthClass2","CalendarYearMonthEvent","CalendarYearMonthEvent2","__default__$1","isCurrentMonth","conditionalClasses","__default__","messages","yearLabelId","shouldShowPreviousYearButton","shouldShowNextYearButton","moveToFirstMonthOfYear","moveToLastMonthOfYear","expose","monthRows","rows","count","i","innerArray","j","monthVariant","isSelectedDate","onMonthClicked","listeners","ev","useSinglePane","internalValue","reactive","isBefore","dateToCompare","isAfter","differenceInDays","compareLocalAsc","difference","isLastDayNotFull","result","endOfQuarter","currentMonth","startOfQuarter","useGranularityAdjustments","adjustDateForWeekly","endDate","min","max","start","end","isStartOutOfBounds","isEndOutOfBounds","adjustDateForMonthly","endOfMonth","adjustDateForQuarterly","formatDate","startDate","useRangePane","maxRange","granularity","clickedDate","setDates","direction","onMouseOver","correctedDate","addYears","subYears","_sfc_main","CalendarMonth","CalendarYear","n","defaultDate","calendarComponent","onDateInput","calendarPosition","calendarIndex","calculateOffsetMonth","offsetMonth","monthOffset","calculateOffsetYear","offsetYear","yearOffset"],"mappings":";;;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,SAAA,UACAA,EAAA,YAAA,aACAA,EAAA,MAAA,OAJQA,IAAAD,KAAA,CAAA,CAAA,GAOAE,IAAA,kBAAAC,OAERA,EAAA,SAAA,UACAA,EAAA,SAAA,UACAA,EAAA,YAAA,aACAA,EAAA,MAAA,OAGAA,EAAA,WAAA,YACAA,EAAA,aAAA,cAGAA,EAAA,cAAA,eAGAA,EAAA,WAAA,YAfQA,IAAAD,KAAA,CAAA,CAAA,GAkBAE,KAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,aAAA,aAFQA,IAAAD,MAAA,CAAA,CAAA;ACtBL,MAAAE,KAAA;AAAA;AAAA;AAAA;AAAA,EAA+B,KAAA,EAAA,MAAA,MAAA,UAAA,GAAA;AAAA;AAAA;AAAA;AAAA,EAIA,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA,EAKQ,UAAA,EAAA,MAAA,SAAA,SAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,SAAA;AAAA,IAMjC,MAAA;AAAA,IACC,SAAAN,EAAA;AAAA,IAC2B,WAAA,CAAAO,MAAA,OAAA,OAAAP,CAAA,EAAA,SAAAO,CAAA;AAAA,EACmE;AAE5G,GCqBAC,KAAAC,GAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA;AAAA,EACA,cAAA;AAAA,EACA,OAAAJ;AAAA,EACA,OAAA,CAAAF,GAAA,OAAAA,GAAA,UAAA;AAAA,EACA,MAAAO,GA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