@adyen/bento-vue3 1.57.1 → 1.58.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.
Files changed (181) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/index.d.ts +190 -51
  3. package/dist/action-bar.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/data-grid-template.css +1 -1
  9. package/dist/assets/data-grid.css +1 -1
  10. package/dist/assets/date-range-picker.css +1 -1
  11. package/dist/assets/dialog-page.css +1 -1
  12. package/dist/assets/file-uploader.css +1 -1
  13. package/dist/assets/filter-bar.css +1 -1
  14. package/dist/assets/input-field-password.css +1 -1
  15. package/dist/assets/inspector.css +1 -1
  16. package/dist/assets/menu.css +1 -1
  17. package/dist/assets/modal-fullscreen.css +1 -1
  18. package/dist/assets/popover.css +1 -1
  19. package/dist/assets/sidepanel.css +1 -1
  20. package/dist/button.js +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/checkbox.js +2 -2
  23. package/dist/chunks/{action-bar.BOCrfaHz.js → action-bar.C3YC7Cvq.js} +4 -4
  24. package/dist/chunks/{action-bar.BOCrfaHz.js.map → action-bar.C3YC7Cvq.js.map} +1 -1
  25. package/dist/chunks/{base-modal.DhzWPnD5.js → base-modal.C9t8wOxU.js} +2 -2
  26. package/dist/chunks/{base-modal.DhzWPnD5.js.map → base-modal.C9t8wOxU.js.map} +1 -1
  27. package/dist/chunks/{button-actions-with-menu.CkyIwzNi.js → button-actions-with-menu.DVvlTcnv.js} +4 -4
  28. package/dist/chunks/{button-actions-with-menu.CkyIwzNi.js.map → button-actions-with-menu.DVvlTcnv.js.map} +1 -1
  29. package/dist/chunks/{button-actions.DWGBFisz.js → button-actions.WnxN4KnV.js} +2 -2
  30. package/dist/chunks/{button-actions.DWGBFisz.js.map → button-actions.WnxN4KnV.js.map} +1 -1
  31. package/dist/chunks/calendar.DzwpAB0z.js +1288 -0
  32. package/dist/chunks/calendar.DzwpAB0z.js.map +1 -0
  33. package/dist/chunks/{card.DguoAMcm.js → card.PFtc1o__.js} +2 -2
  34. package/dist/chunks/{card.DguoAMcm.js.map → card.PFtc1o__.js.map} +1 -1
  35. package/dist/chunks/{checkbox-group.1mSIt71A.js → checkbox-group.tAmTjBdy.js} +4 -4
  36. package/dist/chunks/{checkbox-group.1mSIt71A.js.map → checkbox-group.tAmTjBdy.js.map} +1 -1
  37. package/dist/chunks/{checkbox.CTRZeppg.js → checkbox.H3fMdGno.js} +3 -3
  38. package/dist/chunks/{checkbox.CTRZeppg.js.map → checkbox.H3fMdGno.js.map} +1 -1
  39. package/dist/chunks/{code-snippet.Du9MXOnX.js → code-snippet.EAwTnNST.js} +5 -5
  40. package/dist/chunks/{code-snippet.Du9MXOnX.js.map → code-snippet.EAwTnNST.js.map} +1 -1
  41. package/dist/chunks/{controls-group.DsGEDyTw.js → controls-group.CQZTslGW.js} +2 -2
  42. package/dist/chunks/{controls-group.DsGEDyTw.js.map → controls-group.CQZTslGW.js.map} +1 -1
  43. package/dist/chunks/{copy.QuF9bDfT.js → copy.Ce8Mdpir.js} +2 -2
  44. package/dist/chunks/{copy.QuF9bDfT.js.map → copy.Ce8Mdpir.js.map} +1 -1
  45. package/dist/chunks/{dashboard-section.fZiEAres.js → dashboard-section.D5fPiyCI.js} +2 -2
  46. package/dist/chunks/{dashboard-section.fZiEAres.js.map → dashboard-section.D5fPiyCI.js.map} +1 -1
  47. package/dist/chunks/{dashed-underline.BZ_oZeHs.js → dashed-underline.CMScTPOb.js} +3 -3
  48. package/dist/chunks/{dashed-underline.BZ_oZeHs.js.map → dashed-underline.CMScTPOb.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.Cw-0-al0.js → data-grid-template.Qig0zkMz.js} +2 -2
  50. package/dist/chunks/{data-grid-template.Cw-0-al0.js.map → data-grid-template.Qig0zkMz.js.map} +1 -1
  51. package/dist/chunks/data-grid.C98jzhfU.js +3611 -0
  52. package/dist/chunks/data-grid.C98jzhfU.js.map +1 -0
  53. package/dist/chunks/{date-picker.CWGFy7Hb.js → date-picker.Bmkc0eYL.js} +17 -17
  54. package/dist/chunks/{date-picker.CWGFy7Hb.js.map → date-picker.Bmkc0eYL.js.map} +1 -1
  55. package/dist/chunks/date-range-picker.D-_e1W8W.js +1171 -0
  56. package/dist/chunks/date-range-picker.D-_e1W8W.js.map +1 -0
  57. package/dist/chunks/{dropdown-tag.Bkb16azm.js → dropdown-tag.9Uuos_mS.js} +3 -3
  58. package/dist/chunks/{dropdown-tag.Bkb16azm.js.map → dropdown-tag.9Uuos_mS.js.map} +1 -1
  59. package/dist/chunks/{dropdown.BXnoEP7s.js → dropdown.CnMnzXc2.js} +29 -29
  60. package/dist/chunks/{dropdown.BXnoEP7s.js.map → dropdown.CnMnzXc2.js.map} +1 -1
  61. package/dist/chunks/{error-message.CjdvgIAh.js → error-message.KTNWtFyf.js} +2 -2
  62. package/dist/chunks/{error-message.CjdvgIAh.js.map → error-message.KTNWtFyf.js.map} +1 -1
  63. package/dist/chunks/{es6.BtaxuP0b.js → es6.BA9GH7QZ.js} +2 -2
  64. package/dist/chunks/{es6.BtaxuP0b.js.map → es6.BA9GH7QZ.js.map} +1 -1
  65. package/dist/chunks/{file-uploader.faOTOytJ.js → file-uploader.DzGfFhY9.js} +3 -3
  66. package/dist/chunks/{file-uploader.faOTOytJ.js.map → file-uploader.DzGfFhY9.js.map} +1 -1
  67. package/dist/chunks/{filter-bar.BFuCWywL.js → filter-bar.CY2ZlyD4.js} +1015 -959
  68. package/dist/chunks/filter-bar.CY2ZlyD4.js.map +1 -0
  69. package/dist/chunks/{footer-actions.CQARYj4Q.js → footer-actions.DqKdjjjh.js} +2 -2
  70. package/dist/chunks/{footer-actions.CQARYj4Q.js.map → footer-actions.DqKdjjjh.js.map} +1 -1
  71. package/dist/chunks/{header-with-views.D8VE_Y0j.js → header-with-views.B-d7Y1qK.js} +10 -10
  72. package/dist/chunks/{header-with-views.D8VE_Y0j.js.map → header-with-views.B-d7Y1qK.js.map} +1 -1
  73. package/dist/chunks/{header.DAuIurUM.js → header.Nh7Jph4R.js} +4 -4
  74. package/dist/chunks/{header.DAuIurUM.js.map → header.Nh7Jph4R.js.map} +1 -1
  75. package/dist/chunks/{info-icon-with-popover.J10ERGQ2.js → info-icon-with-popover.CZGbqWFt.js} +2 -2
  76. package/dist/chunks/{info-icon-with-popover.J10ERGQ2.js.map → info-icon-with-popover.CZGbqWFt.js.map} +1 -1
  77. package/dist/chunks/{info-icon.71yYfuEc.js → info-icon.DOH8zIvI.js} +2 -2
  78. package/dist/chunks/{info-icon.71yYfuEc.js.map → info-icon.DOH8zIvI.js.map} +1 -1
  79. package/dist/chunks/input-field-password.B5uy0EiK.js +366 -0
  80. package/dist/chunks/input-field-password.B5uy0EiK.js.map +1 -0
  81. package/dist/chunks/{input-field-phone-number.LCqRBv8l.js → input-field-phone-number.Ck6XS73k.js} +3 -3
  82. package/dist/chunks/{input-field-phone-number.LCqRBv8l.js.map → input-field-phone-number.Ck6XS73k.js.map} +1 -1
  83. package/dist/chunks/{input-field.D40UNDF6.js → input-field.CUfSQLYO.js} +3 -3
  84. package/dist/chunks/{input-field.D40UNDF6.js.map → input-field.CUfSQLYO.js.map} +1 -1
  85. package/dist/chunks/{listbox-option-tag.DsnH9Q9j.js → listbox-option-tag.v1qrgVav.js} +2 -2
  86. package/dist/chunks/{listbox-option-tag.DsnH9Q9j.js.map → listbox-option-tag.v1qrgVav.js.map} +1 -1
  87. package/dist/chunks/{menu.BOj630ue.js → menu.BmSWTWp2.js} +2 -2
  88. package/dist/chunks/{menu.BOj630ue.js.map → menu.BmSWTWp2.js.map} +1 -1
  89. package/dist/chunks/{modal-fullscreen.D1hncuS7.js → modal-fullscreen.B73FGuMI.js} +2 -2
  90. package/dist/chunks/{modal-fullscreen.D1hncuS7.js.map → modal-fullscreen.B73FGuMI.js.map} +1 -1
  91. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js → modal.vue_vue_type_script_setup_true_lang.hMWefloS.js} +4 -4
  92. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.y7pMBxB0.js.map → modal.vue_vue_type_script_setup_true_lang.hMWefloS.js.map} +1 -1
  93. package/dist/chunks/{pagination.FJtrl32O.js → pagination.BfA6pOGB.js} +2 -2
  94. package/dist/chunks/{pagination.FJtrl32O.js.map → pagination.BfA6pOGB.js.map} +1 -1
  95. package/dist/chunks/{popover.BzzdIK19.js → popover.DiIZe9RM.js} +2 -2
  96. package/dist/chunks/{popover.BzzdIK19.js.map → popover.DiIZe9RM.js.map} +1 -1
  97. package/dist/chunks/{radio-group.seLW9WC9.js → radio-group.DG_SxGuf.js} +4 -4
  98. package/dist/chunks/{radio-group.seLW9WC9.js.map → radio-group.DG_SxGuf.js.map} +1 -1
  99. package/dist/chunks/rich-text-editor.zXIxJKs8.js +6221 -0
  100. package/dist/chunks/rich-text-editor.zXIxJKs8.js.map +1 -0
  101. package/dist/chunks/{search-bar.BBpxVYpP.js → search-bar.BUG88A0q.js} +3 -3
  102. package/dist/chunks/{search-bar.BBpxVYpP.js.map → search-bar.BUG88A0q.js.map} +1 -1
  103. package/dist/chunks/{secondary-nav.oi1cuic-.js → secondary-nav.igRQouwn.js} +3 -3
  104. package/dist/chunks/{secondary-nav.oi1cuic-.js.map → secondary-nav.igRQouwn.js.map} +1 -1
  105. package/dist/chunks/{segmented-control.B2cS73wG.js → segmented-control.ClJS7gzl.js} +2 -2
  106. package/dist/chunks/{segmented-control.B2cS73wG.js.map → segmented-control.ClJS7gzl.js.map} +1 -1
  107. package/dist/chunks/{selection-card-group.7tDu9-RI.js → selection-card-group.CdRPwD-M.js} +4 -4
  108. package/dist/chunks/{selection-card-group.7tDu9-RI.js.map → selection-card-group.CdRPwD-M.js.map} +1 -1
  109. package/dist/chunks/{sidepanel.9wJbIvIS.js → sidepanel.C4z6LXMz.js} +2 -2
  110. package/dist/chunks/{sidepanel.9wJbIvIS.js.map → sidepanel.C4z6LXMz.js.map} +1 -1
  111. package/dist/chunks/{structured-list-item.CzzWSj5s.js → structured-list-item.BDps9Y9e.js} +4 -4
  112. package/dist/chunks/{structured-list-item.CzzWSj5s.js.map → structured-list-item.BDps9Y9e.js.map} +1 -1
  113. package/dist/chunks/{summary-grid.types.IZdK-Mvh.js → summary-grid.types.DMCKjGMN.js} +5 -5
  114. package/dist/chunks/{summary-grid.types.IZdK-Mvh.js.map → summary-grid.types.DMCKjGMN.js.map} +1 -1
  115. package/dist/chunks/{tag.iiCQSgG9.js → tag.uRkpY4u1.js} +2 -2
  116. package/dist/chunks/{tag.iiCQSgG9.js.map → tag.uRkpY4u1.js.map} +1 -1
  117. package/dist/chunks/{textarea.DY0kNx0r.js → textarea.Dzy0cs2N.js} +2 -2
  118. package/dist/chunks/{textarea.DY0kNx0r.js.map → textarea.Dzy0cs2N.js.map} +1 -1
  119. package/dist/chunks/{timeline-item.dleRa6Yu.js → timeline-item.CuSRjcnT.js} +5 -5
  120. package/dist/chunks/{timeline-item.dleRa6Yu.js.map → timeline-item.CuSRjcnT.js.map} +1 -1
  121. package/dist/chunks/{tooltip.Di6i0aTd.js → tooltip.CFgesodr.js} +71 -71
  122. package/dist/chunks/{tooltip.Di6i0aTd.js.map → tooltip.CFgesodr.js.map} +1 -1
  123. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js → tutorial.vue_vue_type_script_setup_true_lang.s21s5Oso.js} +4 -4
  124. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.A0Wcwr8f.js.map → tutorial.vue_vue_type_script_setup_true_lang.s21s5Oso.js.map} +1 -1
  125. package/dist/chunks/{use-cached-selected-values.Bf8yZB6S.js → use-cached-selected-values.CE98s5Ai.js} +3 -3
  126. package/dist/chunks/{use-cached-selected-values.Bf8yZB6S.js.map → use-cached-selected-values.CE98s5Ai.js.map} +1 -1
  127. package/dist/code-snippet.js +1 -1
  128. package/dist/dashboard-template.js +1 -1
  129. package/dist/dashed-underline.js +1 -1
  130. package/dist/data-grid-template.js +1 -1
  131. package/dist/data-grid.js +1 -1
  132. package/dist/date-picker.js +2 -2
  133. package/dist/date-range-picker.js +2 -2
  134. package/dist/dropdown.js +3 -3
  135. package/dist/file-uploader.js +1 -1
  136. package/dist/filter-bar.js +1 -1
  137. package/dist/header-with-views.js +1 -1
  138. package/dist/header.js +1 -1
  139. package/dist/index.js +156 -154
  140. package/dist/index.js.map +1 -1
  141. package/dist/info-icon.js +1 -1
  142. package/dist/input-field-password.js +1 -1
  143. package/dist/input-field-phone-number.js +1 -1
  144. package/dist/input-field.js +1 -1
  145. package/dist/internal.js +10 -10
  146. package/dist/menu.js +1 -1
  147. package/dist/modal-fullscreen.js +1 -1
  148. package/dist/modal.js +2 -2
  149. package/dist/pagination.js +1 -1
  150. package/dist/popover.js +1 -1
  151. package/dist/radio-group.js +1 -1
  152. package/dist/rich-text-editor.js +2 -6218
  153. package/dist/rich-text-editor.js.map +1 -1
  154. package/dist/search-bar.js +2 -2
  155. package/dist/secondary-nav.js +1 -1
  156. package/dist/segmented-control.js +1 -1
  157. package/dist/selection-card.js +1 -1
  158. package/dist/sidepanel.js +1 -1
  159. package/dist/structured-list.js +1 -1
  160. package/dist/styles/bento-dark.css +15 -15
  161. package/dist/styles/bento-light.css +95 -95
  162. package/dist/styles/bento.css +95 -95
  163. package/dist/styles/legacy.css +96 -96
  164. package/dist/styles/styleguide.css +96 -96
  165. package/dist/styles/utility.css +64 -64
  166. package/dist/summary-grid.js +1 -1
  167. package/dist/tag.js +1 -1
  168. package/dist/textarea.js +1 -1
  169. package/dist/timeline.js +1 -1
  170. package/dist/tutorial.js +1 -1
  171. package/dist/web-types.json +1 -1
  172. package/package.json +2 -2
  173. package/dist/chunks/calendar.D61aBwg1.js +0 -1249
  174. package/dist/chunks/calendar.D61aBwg1.js.map +0 -1
  175. package/dist/chunks/data-grid.D7BSWJB3.js +0 -3519
  176. package/dist/chunks/data-grid.D7BSWJB3.js.map +0 -1
  177. package/dist/chunks/date-range-picker.BcUpQUhh.js +0 -1110
  178. package/dist/chunks/date-range-picker.BcUpQUhh.js.map +0 -1
  179. package/dist/chunks/filter-bar.BFuCWywL.js.map +0 -1
  180. package/dist/chunks/input-field-password.BZMZ5uLb.js +0 -348
  181. package/dist/chunks/input-field-password.BZMZ5uLb.js.map +0 -1
@@ -0,0 +1,1288 @@
1
+ import { defineComponent as De, computed as _, resolveComponent as ne, createElementBlock as Y, openBlock as T, withKeys as oe, normalizeClass as Re, createElementVNode as F, createVNode as K, ref as z, watch as se, nextTick as it, toRef as H, resolveDirective as dt, withDirectives as qe, mergeProps as xe, toHandlers as Ke, createBlock as ee, createCommentVNode as ce, withCtx as J, createTextVNode as Se, toDisplayString as Ie, Fragment as ue, renderList as le, unref as p, reactive as Qe, resolveDynamicComponent as ct } from "vue";
2
+ import { r as w, t as O, a as Fe, g as vt } from "./get-date-locale.BN8xEjY0.js";
3
+ import { t as k, B as Xe, a as ze, f as Be } from "./date.CKXySBQv.js";
4
+ import { d as Ce, a as be } from "./index.BDuTpjD8.js";
5
+ import { B as Te } from "./button.CVZJTZv0.js";
6
+ import { B as Je } from "./typography.DN5eC5ch.js";
7
+ import { _ as me } from "./_plugin-vue_export-helper.CHgC5LLL.js";
8
+ import { a as Ze, C as et } from "./chevron-left.BF63HtOH.js";
9
+ import "./events.FNmSWp_P.js";
10
+ import { a as tt } from "./keyboard-navigation.CqgGzfZQ.js";
11
+ import { g as at } from "./generate-uid.NJ8tVoha.js";
12
+ import { u as nt } from "./i18n.B6g5VX0q.js";
13
+ import { h as ft } from "./index.CVpo3mlK.js";
14
+ import { g as Dt } from "./_commonjsHelpers.C6fGbg64.js";
15
+ import "../assets/calendar.css";
16
+ function fe(e, t) {
17
+ w(2, arguments);
18
+ var a = O(e), n = k(t);
19
+ return isNaN(n) ? /* @__PURE__ */ new Date(NaN) : (n && a.setDate(a.getDate() + n), a);
20
+ }
21
+ function te(e, t) {
22
+ w(2, arguments);
23
+ var a = O(e), n = k(t);
24
+ if (isNaN(n))
25
+ return /* @__PURE__ */ new Date(NaN);
26
+ if (!n)
27
+ return a;
28
+ var o = a.getDate(), s = new Date(a.getTime());
29
+ s.setMonth(a.getMonth() + n + 1, 0);
30
+ var l = s.getDate();
31
+ return o >= l ? s : (a.setFullYear(s.getFullYear(), s.getMonth(), o), a);
32
+ }
33
+ function ge(e, t) {
34
+ w(1, arguments);
35
+ var a = t || {}, n = a.locale, o = n && n.options && n.options.weekStartsOn, s = o == null ? 0 : k(o), l = a.weekStartsOn == null ? s : k(a.weekStartsOn);
36
+ if (!(l >= 0 && l <= 6))
37
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
38
+ var u = O(e), f = u.getDay(), h = (f < l ? 7 : 0) + f - l;
39
+ return u.setDate(u.getDate() - h), u.setHours(0, 0, 0, 0), u;
40
+ }
41
+ function ae(e) {
42
+ w(1, arguments);
43
+ var t = O(e);
44
+ return t.setHours(0, 0, 0, 0), t;
45
+ }
46
+ var mt = 864e5;
47
+ function ht(e, t) {
48
+ w(2, arguments);
49
+ var a = ae(e), n = ae(t), o = a.getTime() - Fe(a), s = n.getTime() - Fe(n);
50
+ return Math.round((o - s) / mt);
51
+ }
52
+ function ot(e, t) {
53
+ w(2, arguments);
54
+ var a = k(t);
55
+ return te(e, a * 12);
56
+ }
57
+ function he(e, t) {
58
+ w(2, arguments);
59
+ var a = ae(e), n = ae(t);
60
+ return a.getTime() === n.getTime();
61
+ }
62
+ function Ue(e, t) {
63
+ var a = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
64
+ return a < 0 ? -1 : a > 0 ? 1 : a;
65
+ }
66
+ function yt(e, t) {
67
+ w(2, arguments);
68
+ var a = O(e), n = O(t), o = Ue(a, n), s = Math.abs(ht(a, n));
69
+ a.setDate(a.getDate() - o * s);
70
+ var l = +(Ue(a, n) === -o), u = o * (s - l);
71
+ return u === 0 ? 0 : u;
72
+ }
73
+ function Oe(e) {
74
+ w(1, arguments);
75
+ var t = O(e), a = t.getMonth(), n = a - a % 3;
76
+ return t.setMonth(n, 1), t.setHours(0, 0, 0, 0), t;
77
+ }
78
+ function Me(e) {
79
+ w(1, arguments);
80
+ var t = O(e);
81
+ return t.setDate(1), t.setHours(0, 0, 0, 0), t;
82
+ }
83
+ function Ge(e) {
84
+ w(1, arguments);
85
+ var t = O(e), a = /* @__PURE__ */ new Date(0);
86
+ return a.setFullYear(t.getFullYear(), 0, 1), a.setHours(0, 0, 0, 0), a;
87
+ }
88
+ function Ee(e, t) {
89
+ w(1, arguments);
90
+ var a = t || {}, n = a.locale, o = n && n.options && n.options.weekStartsOn, s = o == null ? 0 : k(o), l = a.weekStartsOn == null ? s : k(a.weekStartsOn);
91
+ if (!(l >= 0 && l <= 6))
92
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
93
+ var u = O(e), f = u.getDay(), h = (f < l ? -7 : 0) + 6 - (f - l);
94
+ return u.setDate(u.getDate() + h), u.setHours(23, 59, 59, 999), u;
95
+ }
96
+ function we(e) {
97
+ w(1, arguments);
98
+ var t = O(e), a = t.getMonth(), n = a - a % 3 + 3;
99
+ return t.setMonth(n, 0), t.setHours(23, 59, 59, 999), t;
100
+ }
101
+ function gt(e) {
102
+ w(1, arguments);
103
+ var t = O(e), a = t.getFullYear(), n = t.getMonth(), o = /* @__PURE__ */ new Date(0);
104
+ return o.setFullYear(a, n + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
105
+ }
106
+ function Mt(e, t) {
107
+ w(2, arguments);
108
+ var a = k(t);
109
+ return fe(e, -a);
110
+ }
111
+ function ve(e, t) {
112
+ w(2, arguments);
113
+ var a = k(t);
114
+ return te(e, -a);
115
+ }
116
+ function Et(e, t) {
117
+ w(2, arguments);
118
+ var a = O(e), n = O(t);
119
+ return a.getTime() > n.getTime();
120
+ }
121
+ function Nt(e, t) {
122
+ w(2, arguments);
123
+ var a = O(e), n = O(t);
124
+ return a.getTime() < n.getTime();
125
+ }
126
+ function ye(e, t) {
127
+ w(2, arguments);
128
+ var a = O(e), n = O(t);
129
+ return a.getFullYear() === n.getFullYear() && a.getMonth() === n.getMonth();
130
+ }
131
+ function Ne(e, t) {
132
+ w(2, arguments);
133
+ var a = O(e).getTime(), n = O(t.start).getTime(), o = O(t.end).getTime();
134
+ if (!(n <= o))
135
+ throw new RangeError("Invalid interval");
136
+ return a >= n && a <= o;
137
+ }
138
+ function bt(e, t) {
139
+ w(2, arguments);
140
+ var a = O(e), n = k(t), o = a.getFullYear(), s = a.getDate(), l = /* @__PURE__ */ new Date(0);
141
+ l.setFullYear(o, n, 15), l.setHours(0, 0, 0, 0);
142
+ var u = gt(l);
143
+ return a.setMonth(n, Math.min(s, u)), a;
144
+ }
145
+ function Ot(e, t) {
146
+ if (w(2, arguments), typeof t != "object" || t === null)
147
+ throw new RangeError("values parameter must be an object");
148
+ var a = O(e);
149
+ return isNaN(a.getTime()) ? /* @__PURE__ */ new Date(NaN) : (t.year != null && a.setFullYear(t.year), t.month != null && (a = bt(a, t.month)), t.date != null && a.setDate(k(t.date)), t.hours != null && a.setHours(k(t.hours)), t.minutes != null && a.setMinutes(k(t.minutes)), t.seconds != null && a.setSeconds(k(t.seconds)), t.milliseconds != null && a.setMilliseconds(k(t.milliseconds)), a);
150
+ }
151
+ function wt(e, t, a) {
152
+ w(2, arguments);
153
+ var n = {}, o = n.locale, s = o && o.options && o.options.weekStartsOn, l = s == null ? 0 : k(s), u = n.weekStartsOn == null ? l : k(n.weekStartsOn);
154
+ if (!(u >= 0 && u <= 6))
155
+ throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
156
+ var f = O(e), h = k(t), D = f.getDay(), g = h % 7, v = (g + 7) % 7, c = 7 - u, r = h < 0 || h > 6 ? h - (D + c) % 7 : (v + c) % 7 - (D + c) % 7;
157
+ return fe(f, r);
158
+ }
159
+ function St(e, t) {
160
+ w(2, arguments);
161
+ var a = k(t);
162
+ return ot(e, -a);
163
+ }
164
+ var G = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(G || {}), q = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_DAY = "current-day", e.DISABLED = "disabled", e))(q || {}), de = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(de || {});
165
+ const It = {
166
+ /**
167
+ * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
168
+ */
169
+ day: { type: Date, required: !0 },
170
+ /**
171
+ * Indicate if a date should be disabled or not
172
+ */
173
+ disabled: { type: Boolean, default: !1 },
174
+ /**
175
+ * Changes the state of the calendar day to selected.
176
+ */
177
+ selected: { type: Boolean, default: !1 },
178
+ /**
179
+ * When the day is selected, this indicates if the selection is a single date or part of a range.
180
+ * If it's a range it can be at the beginning, middle or end of the selection.
181
+ */
182
+ variant: {
183
+ type: String,
184
+ default: G.SINGLE,
185
+ validator: (e) => Object.values(G).includes(e)
186
+ }
187
+ }, Tt = De({
188
+ name: "calendar-month-day",
189
+ components: { BentoDate: Xe },
190
+ inheritAttrs: !0,
191
+ props: It,
192
+ emits: [de.CLICK, de.MOUSE_OVER],
193
+ setup(e, { emit: t }) {
194
+ const a = _(() => {
195
+ const s = /* @__PURE__ */ new Date();
196
+ return e.day.getDate() === s.getDate() && e.day.getMonth() === s.getMonth() && e.day.getFullYear() === s.getFullYear();
197
+ });
198
+ return {
199
+ // Values
200
+ conditionalClasses: _(() => ({
201
+ // Variants
202
+ [`b-calendar-month-day--${q.BEGINNING}`]: e.variant === G.BEGINNING,
203
+ [`b-calendar-month-day--${q.MIDDLE}`]: e.variant === G.MIDDLE,
204
+ [`b-calendar-month-day--${q.END}`]: e.variant === G.END,
205
+ [`b-calendar-month-day--${q.SINGLE}`]: e.variant === G.SINGLE,
206
+ // Selected
207
+ [`b-calendar-month-day--${q.UNSELECTED}`]: !e.selected,
208
+ [`b-calendar-month-day--${q.SELECTED}`]: e.selected,
209
+ // Current Day
210
+ [`b-calendar-month-day--${q.CURRENT_DAY}`]: a.value,
211
+ // Disabled
212
+ [`b-calendar-month-day--${q.DISABLED}`]: e.disabled
213
+ })),
214
+ // Enums
215
+ BentoDateFormat: ze,
216
+ CalendarMonthDayEvent: de,
217
+ // Events
218
+ onClick: (s, l) => {
219
+ e.disabled ? (s.preventDefault(), s.stopPropagation()) : t(de.CLICK, l, e.day);
220
+ }
221
+ };
222
+ }
223
+ }), kt = ["tabindex", "aria-selected", "aria-disabled", "data-date"], _t = { class: "b-calendar-month-day__wrapper" };
224
+ function pt(e, t, a, n, o, s) {
225
+ const l = ne("bento-date");
226
+ return T(), Y("td", {
227
+ class: Re(["b-calendar-month-day", e.conditionalClasses]),
228
+ tabindex: e.selected ? "0" : "-1",
229
+ "aria-selected": e.selected ? e.selected : void 0,
230
+ "aria-disabled": e.disabled,
231
+ "data-date": e.day.toDateString(),
232
+ onClick: t[0] || (t[0] = (u) => e.onClick(u, e.day)),
233
+ onMouseover: t[1] || (t[1] = (u) => e.$emit(e.CalendarMonthDayEvent.MOUSE_OVER)),
234
+ onKeydown: t[2] || (t[2] = oe((u) => e.onClick(u, e.day), ["space", "enter"]))
235
+ }, [
236
+ F("div", _t, [
237
+ K(l, {
238
+ class: "b-calendar-month-day__label",
239
+ date: e.day,
240
+ format: e.BentoDateFormat.DAY_OF_MONTH
241
+ }, null, 8, ["date", "format"])
242
+ ])
243
+ ], 42, kt);
244
+ }
245
+ const Lt = /* @__PURE__ */ me(Tt, [["render", pt], ["__scopeId", "data-v-76b748b6"]]);
246
+ var U = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.CHANGE_DAY = "changeDay", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(U || {}), Z = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(Z || {}), Q = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(Q || {}), re = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(re || {}), ke = /* @__PURE__ */ ((e) => (e.DAY = "day", e.MONTH = "month", e))(ke || {}), _e = { exports: {} }, pe = { exports: {} };
247
+ (function(e, t) {
248
+ Object.defineProperty(t, "__esModule", {
249
+ value: !0
250
+ }), t.default = a;
251
+ function a(n) {
252
+ if (n === null || n === !0 || n === !1)
253
+ return NaN;
254
+ var o = Number(n);
255
+ return isNaN(o) ? o : o < 0 ? Math.ceil(o) : Math.floor(o);
256
+ }
257
+ e.exports = t.default;
258
+ })(pe, pe.exports);
259
+ var rt = pe.exports, Le = { exports: {} }, $e = { exports: {} }, Ae = { exports: {} };
260
+ (function(e, t) {
261
+ Object.defineProperty(t, "__esModule", {
262
+ value: !0
263
+ }), t.default = a;
264
+ function a(n, o) {
265
+ if (o.length < n)
266
+ throw new TypeError(n + " argument" + (n > 1 ? "s" : "") + " required, but only " + o.length + " present");
267
+ }
268
+ e.exports = t.default;
269
+ })(Ae, Ae.exports);
270
+ var Pe = Ae.exports;
271
+ (function(e, t) {
272
+ Object.defineProperty(t, "__esModule", {
273
+ value: !0
274
+ }), t.default = o;
275
+ var a = n(Pe);
276
+ function n(s) {
277
+ return s && s.__esModule ? s : { default: s };
278
+ }
279
+ function o(s) {
280
+ (0, a.default)(1, arguments);
281
+ var l = Object.prototype.toString.call(s);
282
+ return s instanceof Date || typeof s == "object" && l === "[object Date]" ? new Date(s.getTime()) : typeof s == "number" || l === "[object Number]" ? new Date(s) : ((typeof s == "string" || l === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
283
+ }
284
+ e.exports = t.default;
285
+ })($e, $e.exports);
286
+ var $t = $e.exports;
287
+ (function(e, t) {
288
+ Object.defineProperty(t, "__esModule", {
289
+ value: !0
290
+ }), t.default = l;
291
+ var a = s(rt), n = s($t), o = s(Pe);
292
+ function s(u) {
293
+ return u && u.__esModule ? u : { default: u };
294
+ }
295
+ function l(u, f) {
296
+ (0, o.default)(2, arguments);
297
+ var h = (0, n.default)(u), D = (0, a.default)(f);
298
+ return isNaN(D) ? /* @__PURE__ */ new Date(NaN) : (D && h.setDate(h.getDate() + D), h);
299
+ }
300
+ e.exports = t.default;
301
+ })(Le, Le.exports);
302
+ var At = Le.exports;
303
+ (function(e, t) {
304
+ Object.defineProperty(t, "__esModule", {
305
+ value: !0
306
+ }), t.default = l;
307
+ var a = s(rt), n = s(At), o = s(Pe);
308
+ function s(u) {
309
+ return u && u.__esModule ? u : { default: u };
310
+ }
311
+ function l(u, f) {
312
+ (0, o.default)(2, arguments);
313
+ var h = (0, a.default)(f);
314
+ return (0, n.default)(u, -h);
315
+ }
316
+ e.exports = t.default;
317
+ })(_e, _e.exports);
318
+ var Yt = _e.exports;
319
+ const je = /* @__PURE__ */ Dt(Yt), st = ({ currentSelectedDate: e, month: t, isDateDisabled: a, firstDayOfWeek: n }, o) => {
320
+ const s = z(new Date(t.value));
321
+ se(
322
+ t,
323
+ () => {
324
+ s.value = t.value;
325
+ },
326
+ { immediate: !0 }
327
+ );
328
+ const l = z(new Date(e.value));
329
+ se(e, () => {
330
+ l.value = new Date(e.value);
331
+ });
332
+ const u = ft(), f = z(l.value);
333
+ se(u, (d) => {
334
+ const E = d.getAttribute("data-date");
335
+ f.value = E ? new Date(E) : l.value;
336
+ });
337
+ const h = z({}), D = (d) => (E) => {
338
+ h.value[d.toDateString()] = E;
339
+ }, g = () => {
340
+ h.value = {};
341
+ }, v = (d = 1) => {
342
+ s.value = te(s.value, d), o(U.NEXT_MONTH, d), g();
343
+ }, c = (d = 1) => {
344
+ s.value = ve(s.value, d), o(U.PREVIOUS_MONTH, d), g();
345
+ }, r = (d) => {
346
+ const E = !!h.value[d == null ? void 0 : d.toDateString()];
347
+ d && E && h.value[d.toDateString()].$el.focus();
348
+ }, i = (d) => {
349
+ d.preventDefault(), d.stopImmediatePropagation(), d.stopPropagation();
350
+ }, m = ({ nextDate: d, isIncreasingDays: E, amountOfMonths: A, isCalendarButtonsNav: V }) => {
351
+ if (!V && a && a(d))
352
+ return;
353
+ d.getMonth() === l.value.getMonth() && d.getFullYear() === l.value.getFullYear() ? (l.value = d, r(d)) : (E ? v(A) : c(A), it(() => {
354
+ const I = d.getMonth() === s.value.getMonth() && d.getFullYear() === s.value.getFullYear();
355
+ a && a(d) || !I || V || (l.value = d, r(d));
356
+ }));
357
+ };
358
+ return {
359
+ // Calendar days ref
360
+ calendarRef: h,
361
+ addDayRef: D,
362
+ /**
363
+ * Month navigation
364
+ */
365
+ showNextMonth: v,
366
+ showPreviousMonth: c,
367
+ /**
368
+ * Focus method
369
+ */
370
+ focusOnDate: r,
371
+ /**
372
+ * Day navigation
373
+ */
374
+ // ArrowRight
375
+ moveToNextDay: (d) => {
376
+ i(d), m({ nextDate: fe(f.value, 1), isIncreasingDays: !0 });
377
+ },
378
+ // ArrowLeft
379
+ moveToPreviousDay: (d) => {
380
+ i(d), m({ nextDate: je(f.value, 1), isIncreasingDays: !1 });
381
+ },
382
+ // ArrowUp
383
+ moveToPreviousWeek: (d) => {
384
+ i(d), m({ nextDate: je(f.value, 7), isIncreasingDays: !1 });
385
+ },
386
+ // ArrowDown
387
+ moveToNextWeek: (d) => {
388
+ i(d), m({ nextDate: fe(f.value, 7), isIncreasingDays: !0 });
389
+ },
390
+ // Home
391
+ moveToFirstDayOfWeek: (d) => {
392
+ i(d), m({
393
+ nextDate: ge(f.value, { weekStartsOn: n }),
394
+ isIncreasingDays: !1
395
+ });
396
+ },
397
+ moveToFirstMonthOfYear: (d) => {
398
+ i(d);
399
+ const E = Ce(l.value, Ge(l.value));
400
+ m({
401
+ nextDate: Ge(l.value),
402
+ isIncreasingDays: !1,
403
+ amountOfMonths: E
404
+ });
405
+ },
406
+ // End
407
+ moveToLastDayOfWeek: (d) => {
408
+ i(d), m({
409
+ nextDate: Ee(f.value, { weekStartsOn: n }),
410
+ isIncreasingDays: !0
411
+ });
412
+ },
413
+ moveToLastMonthOfYear: (d) => {
414
+ i(d);
415
+ const E = Ot(l.value, { month: 11, date: 1 }), A = Ce(E, l.value);
416
+ m({
417
+ nextDate: E,
418
+ isIncreasingDays: !0,
419
+ amountOfMonths: A
420
+ });
421
+ },
422
+ // PageUp
423
+ moveToPreviousMonth: (d, E = !1, A = 1) => {
424
+ i(d);
425
+ const V = A;
426
+ m({
427
+ nextDate: ve(f.value, V),
428
+ isIncreasingDays: !1,
429
+ amountOfMonths: V,
430
+ isCalendarButtonsNav: E
431
+ });
432
+ },
433
+ // Shift+PageUp
434
+ moveToPreviousYear: (d, E = !1) => {
435
+ i(d);
436
+ const A = 12;
437
+ m({
438
+ nextDate: ve(f.value, A),
439
+ isIncreasingDays: !1,
440
+ amountOfMonths: A,
441
+ isCalendarButtonsNav: E
442
+ });
443
+ },
444
+ // PageDown
445
+ moveToNextMonth: (d, E = !1, A = 1) => {
446
+ i(d);
447
+ const V = A;
448
+ m({
449
+ nextDate: te(f.value, V),
450
+ isIncreasingDays: !0,
451
+ amountOfMonths: V,
452
+ isCalendarButtonsNav: E
453
+ });
454
+ },
455
+ // Shift-PageDown
456
+ moveToNextYear: (d, E = !1) => {
457
+ i(d);
458
+ const A = 12;
459
+ m({
460
+ nextDate: te(f.value, A),
461
+ isIncreasingDays: !0,
462
+ amountOfMonths: A,
463
+ isCalendarButtonsNav: E
464
+ });
465
+ },
466
+ // Values
467
+ internalDate: l,
468
+ baseDate: s
469
+ };
470
+ }, He = {
471
+ "en-US": {
472
+ nextMonth: "Next month",
473
+ previousMonth: "Previous month"
474
+ }
475
+ }, Rt = De({
476
+ i18n: { messages: He },
477
+ name: "calendar-month",
478
+ components: {
479
+ BentoButton: Te,
480
+ BentoTypography: Je,
481
+ CalendarMonthDay: Lt,
482
+ ChevronLeftIcon: et,
483
+ ChevronRightIcon: Ze
484
+ },
485
+ directives: { BentoKeyboardNavigationDirective: tt },
486
+ props: {
487
+ /**
488
+ * end of the selected range
489
+ */
490
+ endDate: { type: Date, default: null },
491
+ /**
492
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
493
+ */
494
+ firstDayOfWeek: {
495
+ type: Number,
496
+ default: Z.MONDAY,
497
+ validator: (e) => Object.values(Z).includes(e)
498
+ },
499
+ /**
500
+ * Indicate if a date should be disabled or not
501
+ */
502
+ isDateDisabled: { type: Function, default: void 0 },
503
+ /**
504
+ * Indicates if the calendar is part of a range date picker or a sigle date picker
505
+ */
506
+ isRange: { type: Boolean, default: !1 },
507
+ /**
508
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
509
+ */
510
+ min: { type: Date, default: null },
511
+ /**
512
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
513
+ */
514
+ max: { type: Date, default: null },
515
+ /**
516
+ * Month of the year to be displayed in the calendar
517
+ */
518
+ month: { type: Date, required: !0 },
519
+ /**
520
+ * When rendering multiple calendars, this property allows to render the
521
+ * Next and Previous calendar buttons to the right, left or not at all
522
+ * depending on the position: Unique (only 1), First, Middle or Last
523
+ */
524
+ position: {
525
+ type: String,
526
+ default: "unique",
527
+ validator: (e) => Object.values(re).includes(e)
528
+ },
529
+ /**
530
+ * start of the selected range
531
+ */
532
+ startDate: { type: Date, default: null }
533
+ // can be undefined, eslint complains without default
534
+ },
535
+ emits: [
536
+ U.CHANGE_DAY,
537
+ U.INPUT,
538
+ U.NEXT_MONTH,
539
+ U.PREVIOUS_MONTH,
540
+ U.MOUSE_OVER
541
+ ],
542
+ setup(e, { emit: t }) {
543
+ const { locale: a, t: n } = nt({ messages: He }), o = vt(), s = at("bento-date-picker-month-label"), l = _(
544
+ () => (I) => {
545
+ var j;
546
+ return e.min && I < e.min || e.max && I > e.max || ((j = e.isDateDisabled) == null ? void 0 : j.call(e, I));
547
+ }
548
+ ), {
549
+ internalDate: u,
550
+ baseDate: f,
551
+ // Calendar refs
552
+ addDayRef: h,
553
+ // Month navigation
554
+ showNextMonth: D,
555
+ showPreviousMonth: g,
556
+ // Day navigation
557
+ moveToNextDay: v,
558
+ moveToPreviousDay: c,
559
+ moveToPreviousWeek: r,
560
+ moveToNextWeek: i,
561
+ moveToFirstDayOfWeek: m,
562
+ moveToLastDayOfWeek: R,
563
+ moveToPreviousMonth: y,
564
+ moveToPreviousYear: N,
565
+ moveToNextMonth: B,
566
+ moveToNextYear: $,
567
+ focusOnDate: L
568
+ } = st(
569
+ {
570
+ currentSelectedDate: H(e, "startDate"),
571
+ month: H(e, "month"),
572
+ isDateDisabled: l.value,
573
+ firstDayOfWeek: e.firstDayOfWeek
574
+ },
575
+ t
576
+ ), P = _(
577
+ () => Object.values(Z).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : Z.MONDAY
578
+ ), M = _(() => ["first", "unique"].includes(e.position)), b = _(() => ["last", "unique"].includes(e.position)), S = _(
579
+ () => Be(f.value, "MMMM yyyy", {
580
+ locale: o[a.value.substring(0, 2)] || o.enUS
581
+ })
582
+ ), X = _(
583
+ () => new Array(7).fill(/* @__PURE__ */ new Date()).map((I, j) => {
584
+ const ie = wt(I, P.value + j);
585
+ return Be(ie, "EEE", {
586
+ locale: o[a.value.substring(0, 2)] || o.enUS
587
+ });
588
+ })
589
+ ), C = _(() => {
590
+ const I = [], j = Me(e.month);
591
+ let ie = I[I.push([]) - 1];
592
+ for (; j.getMonth() === e.month.getMonth(); )
593
+ j.getDay() - P.value === 0 && ie.length > 0 && (ie = I[I.push([]) - 1]), ie.push(ae(j)), j.setDate(j.getDate() + 1);
594
+ return I;
595
+ });
596
+ return {
597
+ // Refs
598
+ addDayRef: h,
599
+ // Values
600
+ computedIsDateDisabled: l,
601
+ daysOfWeek: X,
602
+ weeksOfMonth: C,
603
+ formattedMonthDate: S,
604
+ shouldShowNextMonthButton: b,
605
+ shouldShowPreviousMonthButton: M,
606
+ monthLabelId: s,
607
+ // Enums
608
+ CalendarMonthEvent: U,
609
+ // Functions
610
+ isSelectedDate: (I) => u.value && he(u.value, I) && !e.endDate ? !0 : e.startDate && e.endDate && Ne(I, { start: e.startDate, end: e.endDate }),
611
+ showNextMonth: D,
612
+ showPreviousMonth: g,
613
+ dayVariant: (I) => {
614
+ if (!e.isRange || he(e.startDate, e.endDate))
615
+ return G.SINGLE;
616
+ if (e.startDate && he(e.startDate, I))
617
+ return G.BEGINNING;
618
+ if (e.endDate && he(e.endDate, I))
619
+ return G.END;
620
+ if (e.startDate && e.endDate && Ne(I, { start: e.startDate, end: e.endDate }))
621
+ return G.MIDDLE;
622
+ },
623
+ confirmNavigationDate: () => {
624
+ t(U.INPUT, u);
625
+ },
626
+ // Events
627
+ onDayClicked: (I) => {
628
+ t(U.INPUT, I);
629
+ },
630
+ listeners: {
631
+ "keydown:arrow-right": v,
632
+ "keydown:arrow-left": c,
633
+ "keydown:arrow-up": r,
634
+ "keydown:arrow-down": i,
635
+ "keydown:home": m,
636
+ "keydown:end": R,
637
+ "keydown:page-up": y,
638
+ "keydown:shift-page-up": N,
639
+ "keydown:page-down": B,
640
+ "keydown:shift-page-down": $
641
+ },
642
+ // Exposed methods
643
+ focusOnDate: L,
644
+ moveToNextDay: v,
645
+ moveToPreviousDay: c,
646
+ moveToPreviousWeek: r,
647
+ moveToNextWeek: i,
648
+ moveToFirstDayOfWeek: m,
649
+ moveToLastDayOfWeek: R,
650
+ moveToPreviousMonth: y,
651
+ moveToPreviousYear: N,
652
+ moveToNextMonth: B,
653
+ moveToNextYear: $,
654
+ // Translations
655
+ t: n
656
+ };
657
+ }
658
+ }), Pt = { class: "b-calendar-month__month-selector" }, Ft = { class: "b-calendar-month__previous" }, Bt = { class: "b-calendar-month__next" }, Ct = ["aria-labelledby"], Ut = { class: "b-calendar-month__week-header" }, Gt = ["colspan"];
659
+ function jt(e, t, a, n, o, s) {
660
+ const l = ne("chevron-left-icon"), u = ne("bento-button"), f = ne("bento-typography"), h = ne("chevron-right-icon"), D = ne("calendar-month-day"), g = dt("bento-keyboard-navigation-directive");
661
+ return qe((T(), Y("div", xe({ class: "b-calendar-month" }, Ke(e.listeners, !0)), [
662
+ F("div", Pt, [
663
+ F("div", Ft, [
664
+ e.shouldShowPreviousMonthButton ? (T(), ee(u, {
665
+ key: 0,
666
+ variant: "tertiary",
667
+ onClick: t[0] || (t[0] = (v) => e.moveToPreviousMonth(v, !0))
668
+ }, {
669
+ iconLeft: J(() => [
670
+ K(l, {
671
+ "svg-title": e.t("previousMonth")
672
+ }, null, 8, ["svg-title"])
673
+ ]),
674
+ _: 1
675
+ })) : ce("", !0)
676
+ ]),
677
+ K(f, {
678
+ id: e.monthLabelId,
679
+ el: "h2",
680
+ variant: "title",
681
+ "aria-live": "polite"
682
+ }, {
683
+ default: J(() => [
684
+ Se(Ie(e.formattedMonthDate), 1)
685
+ ]),
686
+ _: 1
687
+ }, 8, ["id"]),
688
+ F("div", Bt, [
689
+ e.shouldShowNextMonthButton ? (T(), ee(u, {
690
+ key: 0,
691
+ variant: "tertiary",
692
+ onClick: t[1] || (t[1] = (v) => e.moveToNextMonth(v, !0))
693
+ }, {
694
+ iconLeft: J(() => [
695
+ K(h, {
696
+ "svg-title": e.t("nextMonth")
697
+ }, null, 8, ["svg-title"])
698
+ ]),
699
+ _: 1
700
+ })) : ce("", !0)
701
+ ])
702
+ ]),
703
+ F("table", {
704
+ class: "b-calendar-month__month-container",
705
+ role: "grid",
706
+ "aria-labelledby": e.monthLabelId
707
+ }, [
708
+ F("thead", null, [
709
+ F("tr", Ut, [
710
+ (T(!0), Y(ue, null, le(e.daysOfWeek, (v, c) => (T(), Y("th", {
711
+ key: c,
712
+ class: "b-calendar-month__day-of-week"
713
+ }, [
714
+ K(f, {
715
+ class: "b-calendar-month__day-of-week-font",
716
+ el: "span",
717
+ variant: "caption"
718
+ }, {
719
+ default: J(() => [
720
+ Se(Ie(v), 1)
721
+ ]),
722
+ _: 2
723
+ }, 1024)
724
+ ]))), 128))
725
+ ])
726
+ ]),
727
+ F("tbody", null, [
728
+ (T(!0), Y(ue, null, le(e.weeksOfMonth, (v, c) => (T(), Y("tr", { key: c }, [
729
+ c === 0 && v.length < 7 ? (T(), Y("td", {
730
+ key: 0,
731
+ colspan: 7 - v.length
732
+ }, null, 8, Gt)) : ce("", !0),
733
+ (T(!0), Y(ue, null, le(v, (r, i) => (T(), ee(D, {
734
+ ref_for: !0,
735
+ ref: e.addDayRef(r),
736
+ key: `calendar-day-${i}`,
737
+ day: r,
738
+ disabled: e.computedIsDateDisabled(r),
739
+ selected: e.isSelectedDate(r),
740
+ variant: e.dayVariant(r),
741
+ onClick: e.onDayClicked,
742
+ onMouseover: (m) => e.$emit(e.CalendarMonthEvent.MOUSE_OVER, r),
743
+ onKeyup: [
744
+ oe((m) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, r), ["up", "native"]),
745
+ oe((m) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, r), ["down", "native"]),
746
+ oe((m) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, r), ["left", "native"]),
747
+ oe((m) => e.$emit(e.CalendarMonthEvent.CHANGE_DAY, r), ["right", "native"])
748
+ ]
749
+ }, null, 8, ["day", "disabled", "selected", "variant", "onClick", "onMouseover", "onKeyup"]))), 128))
750
+ ]))), 128))
751
+ ])
752
+ ], 8, Ct)
753
+ ], 16)), [
754
+ [g]
755
+ ]);
756
+ }
757
+ const We = /* @__PURE__ */ me(Rt, [["render", jt], ["__scopeId", "data-v-780ba24e"]]);
758
+ var W = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(W || {}), x = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_MONTH = "current-month", e.DISABLED = "disabled", e))(x || {}), Ye = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(Ye || {});
759
+ const Ht = ["tabindex", "aria-selected"], Wt = { class: "b-calendar-year-month__wrapper" }, Vt = {}, qt = /* @__PURE__ */ De({
760
+ ...Vt,
761
+ __name: "calendar-year-month",
762
+ props: {
763
+ month: {},
764
+ disabled: { type: Boolean, default: !1 },
765
+ selected: { type: Boolean, default: !1 },
766
+ variant: { default: W.SINGLE }
767
+ },
768
+ emits: ["click", "mouseover"],
769
+ setup(e, { emit: t }) {
770
+ const a = e, n = t, o = _(() => {
771
+ const u = /* @__PURE__ */ new Date();
772
+ return a.month.getMonth() === u.getMonth() && a.month.getFullYear() === u.getFullYear();
773
+ }), s = _(() => ({
774
+ // Variants
775
+ [`b-calendar-year-month--${x.BEGINNING}`]: a.variant === W.BEGINNING,
776
+ [`b-calendar-year-month--${x.MIDDLE}`]: a.variant === W.MIDDLE,
777
+ [`b-calendar-year-month--${x.END}`]: a.variant === W.END,
778
+ [`b-calendar-year-month--${x.SINGLE}`]: a.variant === W.SINGLE,
779
+ // Selected
780
+ [`b-calendar-year-month--${x.UNSELECTED}`]: !a.selected,
781
+ [`b-calendar-year-month--${x.SELECTED}`]: a.selected,
782
+ // Current month
783
+ [`b-calendar-year-month--${x.CURRENT_MONTH}`]: o.value,
784
+ // Disabled
785
+ [`b-calendar-year-month--${x.DISABLED}`]: a.disabled
786
+ })), l = (u, f) => {
787
+ a.disabled ? (u.preventDefault(), u.stopPropagation()) : n(Ye.CLICK, f, a.month);
788
+ };
789
+ return (u, f) => (T(), Y("td", {
790
+ class: Re(["b-calendar-year-month", s.value]),
791
+ tabindex: u.selected ? "0" : "-1",
792
+ "aria-selected": u.selected ? u.selected : void 0,
793
+ onClick: f[0] || (f[0] = (h) => l(h, u.month)),
794
+ onMouseover: f[1] || (f[1] = (h) => n(p(Ye).MOUSE_OVER)),
795
+ onKeydown: f[2] || (f[2] = oe((h) => l(h, u.month), ["space", "enter"]))
796
+ }, [
797
+ F("div", Wt, [
798
+ K(p(Xe), {
799
+ class: "b-calendar-year-month__label",
800
+ date: u.month,
801
+ format: p(ze).SHORT_MONTH
802
+ }, null, 8, ["date", "format"])
803
+ ])
804
+ ], 42, Ht));
805
+ }
806
+ }), xt = /* @__PURE__ */ me(qt, [["__scopeId", "data-v-c3eabd57"]]), ut = {
807
+ "en-US": {
808
+ nextYear: "Next year",
809
+ previousYear: "Previous year"
810
+ },
811
+ "ja-JP": {
812
+ nextYear: "来年",
813
+ previousYear: "前年"
814
+ },
815
+ "pt-BR": {
816
+ nextYear: "Ano seguinte",
817
+ previousYear: "Ano anterior"
818
+ }
819
+ }, Kt = { class: "b-calendar-year__year-selector" }, Qt = { class: "b-calendar-year__previous" }, Xt = { class: "b-calendar-year__next" }, zt = ["aria-labelledby"], Jt = {
820
+ i18n: { messages: ut }
821
+ }, Zt = /* @__PURE__ */ De({
822
+ ...Jt,
823
+ __name: "calendar-year",
824
+ props: {
825
+ endDate: { default: null },
826
+ isDateDisabled: { type: Function, default: void 0 },
827
+ isRange: { type: Boolean, default: !1 },
828
+ min: { default: null },
829
+ max: { default: null },
830
+ position: { default: "unique" },
831
+ startDate: { default: null },
832
+ year: {}
833
+ },
834
+ emits: ["input", "mouseover", "nextMonth", "previousMonth"],
835
+ setup(e, { expose: t, emit: a }) {
836
+ const n = at("bento-date-picker-year-label"), o = e, s = a, { t: l } = nt({ messages: ut }), u = (M) => {
837
+ var b;
838
+ return o.min && M < o.min || o.max && M > o.max || ((b = o.isDateDisabled) == null ? void 0 : b.call(o, M));
839
+ }, f = _(() => ["first", "unique"].includes(o.position)), h = _(() => ["last", "unique"].includes(o.position)), {
840
+ internalDate: D,
841
+ // Calendar refs
842
+ addDayRef: g,
843
+ // Day navigation
844
+ moveToPreviousMonth: v,
845
+ moveToPreviousYear: c,
846
+ moveToNextMonth: r,
847
+ moveToNextYear: i,
848
+ moveToFirstMonthOfYear: m,
849
+ moveToLastMonthOfYear: R,
850
+ focusOnDate: y
851
+ } = st(
852
+ {
853
+ currentSelectedDate: H(o, "startDate"),
854
+ month: H(o, "year"),
855
+ isDateDisabled: u
856
+ },
857
+ s
858
+ );
859
+ t({ focusOnDate: y });
860
+ const N = _(() => {
861
+ const M = [];
862
+ let b = 0;
863
+ for (let S = 0; S < 3; S++) {
864
+ const X = [];
865
+ for (let C = 0; C < 4; C++)
866
+ X.push(new Date(o.year.getFullYear(), b++, 1));
867
+ M.push(X);
868
+ }
869
+ return M;
870
+ }), B = (M) => !o.isRange || ye(o.startDate, o.endDate) ? W.SINGLE : o.startDate && ye(o.startDate, M) ? W.BEGINNING : o.endDate && ye(o.endDate, M) ? W.END : o.startDate && o.endDate && Ne(M, { start: o.startDate, end: o.endDate }) ? W.MIDDLE : null, $ = (M) => D.value && ye(D.value, M) ? !0 : o.startDate && o.endDate && Ne(M, { start: o.startDate, end: o.endDate }), L = (M) => {
871
+ s("input", M);
872
+ }, P = o.isRange ? {} : {
873
+ "keydown:arrow-right": r,
874
+ "keydown:arrow-left": v,
875
+ "keydown:arrow-up": (M) => v(M, !1, 4),
876
+ "keydown:arrow-down": (M) => r(M, !1, 4),
877
+ "keydown:home": m,
878
+ "keydown:end": R,
879
+ "keydown:page-up": c,
880
+ "keydown:page-down": i
881
+ };
882
+ return (M, b) => qe((T(), Y("div", xe({ class: "b-calendar-year" }, Ke(p(P), !0)), [
883
+ F("div", Kt, [
884
+ F("div", Qt, [
885
+ f.value ? (T(), ee(p(Te), {
886
+ key: 0,
887
+ variant: "tertiary",
888
+ onClick: b[0] || (b[0] = (S) => p(c)(S, !0))
889
+ }, {
890
+ iconLeft: J(() => [
891
+ K(p(et), {
892
+ "svg-title": p(l)("previousYear")
893
+ }, null, 8, ["svg-title"])
894
+ ]),
895
+ _: 1
896
+ })) : ce("", !0)
897
+ ]),
898
+ K(p(Je), {
899
+ id: p(n),
900
+ el: "h2",
901
+ variant: "title",
902
+ "aria-live": "polite"
903
+ }, {
904
+ default: J(() => [
905
+ Se(Ie(M.year.getFullYear()), 1)
906
+ ]),
907
+ _: 1
908
+ }, 8, ["id"]),
909
+ F("div", Xt, [
910
+ h.value ? (T(), ee(p(Te), {
911
+ key: 0,
912
+ variant: "tertiary",
913
+ onClick: b[1] || (b[1] = (S) => p(i)(S, !0))
914
+ }, {
915
+ iconLeft: J(() => [
916
+ K(p(Ze), {
917
+ "svg-title": p(l)("nextYear")
918
+ }, null, 8, ["svg-title"])
919
+ ]),
920
+ _: 1
921
+ })) : ce("", !0)
922
+ ])
923
+ ]),
924
+ F("table", {
925
+ class: "b-calendar-year__year-container",
926
+ role: "grid",
927
+ "aria-labelledby": p(n)
928
+ }, [
929
+ F("tbody", null, [
930
+ (T(!0), Y(ue, null, le(N.value, (S, X) => (T(), Y("tr", { key: X }, [
931
+ (T(!0), Y(ue, null, le(S, (C, d) => (T(), ee(xt, {
932
+ ref_for: !0,
933
+ ref: p(g)(C),
934
+ key: `calendar-month-${d}`,
935
+ month: C,
936
+ disabled: u(C),
937
+ selected: $(C),
938
+ variant: B(C),
939
+ onClick: L,
940
+ onMouseover: (E) => s("mouseover", C)
941
+ }, null, 8, ["month", "disabled", "selected", "variant", "onMouseover"]))), 128))
942
+ ]))), 128))
943
+ ])
944
+ ], 8, zt)
945
+ ], 16)), [
946
+ [p(tt)]
947
+ ]);
948
+ }
949
+ }), Ve = /* @__PURE__ */ me(Zt, [["__scopeId", "data-v-0a67988c"]]), ea = ({ selectedDate: e }, t) => {
950
+ const a = Qe({
951
+ startDate: null,
952
+ endDate: null
953
+ });
954
+ return se(
955
+ () => e.value,
956
+ () => {
957
+ a.startDate = e.value, a.endDate = void 0;
958
+ },
959
+ { immediate: !0 }
960
+ ), {
961
+ internalValue: a,
962
+ onDateInput: (o) => {
963
+ t(Q.INPUT, o);
964
+ },
965
+ // Empty function to prevent the listeners from throwing a warning
966
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
967
+ onMouseOver: () => {
968
+ }
969
+ };
970
+ }, ta = (e) => {
971
+ const t = (D, g, v, c) => {
972
+ let r = ge(D, { weekStartsOn: e }), i = Ee(g || D, { weekStartsOn: e });
973
+ const m = v && r < v, R = c && i > c;
974
+ return m && (r = ge(v, { weekStartsOn: e })), R && (i = Ee(c, { weekStartsOn: e })), r > i && (m ? i = Ee(r, { weekStartsOn: e }) : r = ge(i, { weekStartsOn: e })), { startDate: r, endDate: i };
975
+ }, a = (D, g, v, c) => {
976
+ let r = Me(D), i = be(g || D);
977
+ const m = r < v, R = i > c;
978
+ return m && (r = Me(v)), R && (i = be(c)), r > i && (m ? i = be(r) : r = Me(i)), { startDate: r, endDate: i };
979
+ }, n = (D, g, v, c) => {
980
+ let r = Oe(D), i = we(g || D);
981
+ const m = v instanceof Date && r < v, R = c instanceof Date && i > c;
982
+ return m && (r = Oe(v)), R && (i = we(c)), r > i && (m ? i = we(r) : r = Oe(i)), { startDate: r, endDate: i };
983
+ };
984
+ return {
985
+ adjustDateForWeekly: t,
986
+ adjustDateForMonthly: a,
987
+ adjustDateForQuarterly: n,
988
+ adjustStartDateInputForWeekly: (D, g, v, c) => {
989
+ const { startDate: r } = t(new Date(D), null, v, c);
990
+ return g(r);
991
+ },
992
+ adjustEndDateInputForWeekly: (D, g, v, c) => {
993
+ const { endDate: r } = t(new Date(D), null, v, c);
994
+ return g(r);
995
+ },
996
+ adjustStartDateInputForMonthly: (D, g, v, c) => {
997
+ const { startDate: r } = a(new Date(D), null, v, c);
998
+ return g(r);
999
+ },
1000
+ adjustEndDateInputForMonthly: (D, g, v, c) => {
1001
+ const { endDate: r } = a(new Date(D), null, v, c);
1002
+ return g(r);
1003
+ },
1004
+ adjustStartDateInputForQuarterly: (D, g, v, c) => {
1005
+ const { startDate: r } = n(new Date(D), null, v, c);
1006
+ return g(r);
1007
+ },
1008
+ adjustEndDateInputForQuarterly: (D, g, v, c) => {
1009
+ const { endDate: r } = n(new Date(D), null, v, c);
1010
+ return g(r);
1011
+ }
1012
+ };
1013
+ }, aa = ({ selectedDate: e, isDateDisabled: t, maxRange: a, granularity: n, firstDayOfWeek: o, min: s, max: l }, u) => {
1014
+ const { adjustDateForWeekly: D, adjustDateForMonthly: g, adjustDateForQuarterly: v } = ta(o), c = Qe({
1015
+ startDate: null,
1016
+ endDate: null
1017
+ }), r = z(null);
1018
+ se(
1019
+ () => e.value,
1020
+ () => {
1021
+ let { startDate: y = null, endDate: N = null } = e.value || {};
1022
+ y && (y = ae(y)), N && (N = ae(N)), !(y && t && t(y) || N && t && t(N) || y && N && Et(y, N)) && (c.startDate = y, c.endDate = N);
1023
+ },
1024
+ { immediate: !0, deep: !0 }
1025
+ );
1026
+ const i = (y, N, B) => {
1027
+ if (c.startDate = y, c.endDate = N, a.value) {
1028
+ const $ = yt(N, y) - a.value;
1029
+ $ > 0 && (B < 1 ? (c.startDate = y, c.endDate = Mt(N, $)) : (c.startDate = fe(y, $), c.endDate = N));
1030
+ }
1031
+ u(Q.START_DATE_SELECTED, c.startDate), u(Q.END_DATE_SELECTED, c.endDate);
1032
+ }, m = (y) => {
1033
+ var N, B, $, L, P, M;
1034
+ if (!(!r.value || t && t(y)))
1035
+ if (Nt(y, r.value)) {
1036
+ if (((N = n == null ? void 0 : n.value) == null ? void 0 : N.type) === "weekly") {
1037
+ const { startDate: b, endDate: S } = D(y, r.value, s.value, l.value);
1038
+ i(b, S, -1);
1039
+ return;
1040
+ }
1041
+ if (((B = n == null ? void 0 : n.value) == null ? void 0 : B.type) === "monthly") {
1042
+ const { startDate: b, endDate: S } = g(y, r.value, s.value, l.value);
1043
+ i(b, S, -1);
1044
+ return;
1045
+ }
1046
+ if ((($ = n == null ? void 0 : n.value) == null ? void 0 : $.type) === "quarterly") {
1047
+ const { startDate: b, endDate: S } = v(y, r.value, s.value, l.value);
1048
+ i(b, S, -1);
1049
+ return;
1050
+ }
1051
+ i(y, r.value, -1);
1052
+ } else {
1053
+ if (((L = n == null ? void 0 : n.value) == null ? void 0 : L.type) === "weekly") {
1054
+ const { startDate: b, endDate: S } = D(r.value, y, s.value, l.value);
1055
+ i(b, S, 1);
1056
+ return;
1057
+ }
1058
+ if (((P = n == null ? void 0 : n.value) == null ? void 0 : P.type) === "monthly") {
1059
+ const { startDate: b, endDate: S } = g(r.value, y, s.value, l.value);
1060
+ i(b, S, 1);
1061
+ return;
1062
+ }
1063
+ if (((M = n == null ? void 0 : n.value) == null ? void 0 : M.type) === "quarterly") {
1064
+ const { startDate: b, endDate: S } = v(r.value, y, s.value, l.value);
1065
+ i(b, S, 1);
1066
+ return;
1067
+ }
1068
+ i(r.value, y, 1);
1069
+ }
1070
+ };
1071
+ return {
1072
+ internalValue: c,
1073
+ onDateInput: (y) => {
1074
+ var N, B, $;
1075
+ if (r.value)
1076
+ r.value = null, u(Q.INPUT, c);
1077
+ else {
1078
+ let L = y;
1079
+ if (((N = n == null ? void 0 : n.value) == null ? void 0 : N.type) === "weekly") {
1080
+ const { startDate: P, endDate: M } = D(y);
1081
+ L = P, i(L, M);
1082
+ }
1083
+ if (((B = n == null ? void 0 : n.value) == null ? void 0 : B.type) === "monthly") {
1084
+ const { startDate: P, endDate: M } = g(y);
1085
+ L = P, i(L, M);
1086
+ }
1087
+ if ((($ = n == null ? void 0 : n.value) == null ? void 0 : $.type) === "quarterly") {
1088
+ const { startDate: P, endDate: M } = v(y);
1089
+ L = P, i(L, M);
1090
+ }
1091
+ r.value = L, m(L);
1092
+ }
1093
+ },
1094
+ onMouseOver: m
1095
+ };
1096
+ }, na = De({
1097
+ name: "calendar",
1098
+ components: { CalendarMonth: We, CalendarYear: Ve },
1099
+ props: {
1100
+ /**
1101
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
1102
+ */
1103
+ firstDayOfWeek: {
1104
+ type: Number,
1105
+ default: Z.MONDAY,
1106
+ validator: (e) => Object.values(Z).includes(e)
1107
+ },
1108
+ /**
1109
+ * The selected granularity configuration
1110
+ */
1111
+ granularity: {
1112
+ type: Object,
1113
+ default: null
1114
+ },
1115
+ /**
1116
+ * Indicate if a date should be disabled or not
1117
+ */
1118
+ isDateDisabled: { type: Function, default: void 0 },
1119
+ /**
1120
+ * Enables the Date Range calendar
1121
+ */
1122
+ isRange: { type: Boolean, default: !1 },
1123
+ /**
1124
+ * Set a maximum number of dates to be selectable by the range.
1125
+ */
1126
+ maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
1127
+ /**
1128
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
1129
+ */
1130
+ min: { type: Date, default: null },
1131
+ /**
1132
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
1133
+ */
1134
+ max: { type: Date, default: null },
1135
+ /**
1136
+ * Number of months rendered on pane
1137
+ */
1138
+ numberOfMonths: {
1139
+ type: Number,
1140
+ default: 3,
1141
+ validator: (e) => e >= 1
1142
+ },
1143
+ /**
1144
+ * Upon opening date range picker, end date's month will be pre-selected.
1145
+ */
1146
+ showEndDateOnOpen: { type: Boolean, default: !1 },
1147
+ /**
1148
+ * Selected date. Can be a single Date or a CalendarRangeDate
1149
+ * instance that contains startDate and endDate attributes.
1150
+ */
1151
+ value: { type: [Date, Object], default: void 0 },
1152
+ /**
1153
+ * Default start date for the calendar pane
1154
+ */
1155
+ defaultDisplayMonth: {
1156
+ type: String,
1157
+ default: null,
1158
+ validator: (e) => /^\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/.test(e)
1159
+ },
1160
+ /**
1161
+ * The type of calendar to display. Defaults to showing days.
1162
+ */
1163
+ variant: {
1164
+ type: String,
1165
+ default: "day",
1166
+ validator: (e) => Object.values(ke).includes(e)
1167
+ }
1168
+ },
1169
+ emit: [Q.INPUT, Q.START_DATE_SELECTED, Q.END_DATE_SELECTED],
1170
+ setup(e, { emit: t }) {
1171
+ const a = z(null), n = z();
1172
+ se(
1173
+ () => e.value,
1174
+ () => {
1175
+ var r, i, m;
1176
+ if (e.isRange)
1177
+ n.value = e != null && e.showEndDateOnOpen && ((r = e.value) != null && r.endDate) ? (i = e.value) == null ? void 0 : i.endDate : ((m = e.value) == null ? void 0 : m.startDate) || /* @__PURE__ */ new Date();
1178
+ else {
1179
+ const R = e.defaultDisplayMonth && new Date(e.defaultDisplayMonth).getTime() ? new Date(e.defaultDisplayMonth) : /* @__PURE__ */ new Date();
1180
+ n.value = e.value || R;
1181
+ }
1182
+ },
1183
+ { immediate: !0 }
1184
+ );
1185
+ const o = _(
1186
+ () => e.variant === ke.MONTH ? Ve : We
1187
+ ), s = _(() => ({
1188
+ "b-calendar__range": e.isRange
1189
+ })), {
1190
+ internalValue: l,
1191
+ onDateInput: u,
1192
+ onMouseOver: f
1193
+ } = e.isRange ? aa(
1194
+ {
1195
+ selectedDate: H(e, "value"),
1196
+ isDateDisabled: e.isDateDisabled,
1197
+ maxRange: H(e, "maxRange"),
1198
+ granularity: H(e, "granularity"),
1199
+ firstDayOfWeek: e.firstDayOfWeek,
1200
+ min: H(e, "min"),
1201
+ max: H(e, "max")
1202
+ },
1203
+ t
1204
+ ) : ea(
1205
+ {
1206
+ selectedDate: H(e, "value"),
1207
+ firstDayOfWeek: e.firstDayOfWeek
1208
+ },
1209
+ t
1210
+ ), h = (r) => e.numberOfMonths === 1 ? re.UNIQUE : r === 0 ? re.FIRST : r === e.numberOfMonths - 1 ? re.LAST : re.MIDDLE, D = _(() => (r) => {
1211
+ const i = e != null && e.showEndDateOnOpen && e.isRange ? ve(n.value, e.numberOfMonths - 1) : n.value;
1212
+ return te(i, r);
1213
+ }), g = _(() => (r) => {
1214
+ const i = e != null && e.showEndDateOnOpen ? St(n.value, e.numberOfMonths - 1) : n.value;
1215
+ return ot(i, r);
1216
+ });
1217
+ return {
1218
+ // Refs
1219
+ calendarRef: a,
1220
+ // Values
1221
+ baseDate: n,
1222
+ calendarComponent: o,
1223
+ conditionalClasses: s,
1224
+ internalValue: l,
1225
+ // Methods
1226
+ calculateOffsetMonth: D,
1227
+ calculateOffsetYear: g,
1228
+ calendarPosition: h,
1229
+ // Events
1230
+ onDateInput: u,
1231
+ onMouseOver: f,
1232
+ calculateNextMonths: (r = 1) => {
1233
+ n.value = te(n.value, r);
1234
+ },
1235
+ calculatePreviousMonths: (r = 1) => {
1236
+ n.value = ve(n.value, r);
1237
+ }
1238
+ };
1239
+ }
1240
+ });
1241
+ function oa(e, t, a, n, o, s) {
1242
+ return T(), Y("div", {
1243
+ class: Re(["b-calendar", e.conditionalClasses])
1244
+ }, [
1245
+ (T(!0), Y(ue, null, le(e.numberOfMonths, (l, u) => (T(), ee(ct(e.calendarComponent), {
1246
+ ref_for: !0,
1247
+ ref: e.numberOfMonths === 1 ? "calendarRef" : null,
1248
+ key: `calendar-${u}`,
1249
+ "first-day-of-week": e.firstDayOfWeek,
1250
+ "is-date-disabled": e.isDateDisabled,
1251
+ month: e.calculateOffsetMonth(u),
1252
+ year: e.calculateOffsetYear(u),
1253
+ position: e.calendarPosition(u),
1254
+ min: e.min,
1255
+ max: e.max,
1256
+ "is-range": e.isRange,
1257
+ "start-date": e.internalValue.startDate,
1258
+ "end-date": e.internalValue.endDate,
1259
+ granularity: e.granularity,
1260
+ onInput: e.onDateInput,
1261
+ onMouseover: e.onMouseOver,
1262
+ onChangeDay: e.onMouseOver,
1263
+ onNextMonth: e.calculateNextMonths,
1264
+ onPreviousMonth: e.calculatePreviousMonths
1265
+ }, null, 40, ["first-day-of-week", "is-date-disabled", "month", "year", "position", "min", "max", "is-range", "start-date", "end-date", "granularity", "onInput", "onMouseover", "onChangeDay", "onNextMonth", "onPreviousMonth"]))), 128))
1266
+ ], 2);
1267
+ }
1268
+ const Ma = /* @__PURE__ */ me(na, [["render", oa], ["__scopeId", "data-v-71902e62"]]);
1269
+ export {
1270
+ Z as C,
1271
+ Ma as a,
1272
+ Q as b,
1273
+ re as c,
1274
+ ke as d,
1275
+ te as e,
1276
+ Oe as f,
1277
+ ae as g,
1278
+ ge as h,
1279
+ he as i,
1280
+ fe as j,
1281
+ Ee as k,
1282
+ Mt as l,
1283
+ ve as m,
1284
+ we as n,
1285
+ Me as s,
1286
+ ta as u
1287
+ };
1288
+ //# sourceMappingURL=calendar.DzwpAB0z.js.map