@lotte-innovate/ui-component-test 0.2.26 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/dist/globals.css +3 -3
  2. package/dist/lib/components/Calendar/index.js +1 -1
  3. package/dist/lib/components/Datepicker/index.js +1 -1
  4. package/dist/lib/components/Dialog/DialogAction.js +3 -2
  5. package/dist/lib/components/Dialog/DialogCancel.js +2 -1
  6. package/dist/lib/components/Modal/ModalAction.d.ts +2 -0
  7. package/dist/lib/components/Modal/ModalAction.js +30 -0
  8. package/dist/lib/components/Modal/ModalCancel.d.ts +2 -0
  9. package/dist/lib/components/Modal/ModalCancel.js +30 -0
  10. package/dist/lib/components/Modal/ModalContent.d.ts +7 -0
  11. package/dist/lib/components/Modal/ModalContent.js +47 -0
  12. package/dist/lib/components/Modal/ModalDescription.d.ts +5 -0
  13. package/dist/lib/components/Modal/ModalDescription.js +46 -0
  14. package/dist/lib/components/Modal/ModalFooter.d.ts +2 -0
  15. package/dist/lib/components/Modal/ModalFooter.js +30 -0
  16. package/dist/lib/components/Modal/ModalRoot.d.ts +16 -0
  17. package/dist/lib/components/Modal/ModalRoot.js +34 -0
  18. package/dist/lib/components/Modal/ModalTitle.d.ts +5 -0
  19. package/dist/lib/components/Modal/ModalTitle.js +32 -0
  20. package/dist/lib/components/Modal/ModalTrigger.d.ts +2 -0
  21. package/dist/lib/components/Modal/ModalTrigger.js +30 -0
  22. package/dist/lib/components/Modal/index.d.ts +15 -0
  23. package/dist/lib/components/Modal/index.js +19 -0
  24. package/dist/lib/components/SideBar/index.js +31 -2
  25. package/dist/lib/components/Tabs/DynamicTabs.js +1 -0
  26. package/dist/lib/components/Tabs/index.d.ts +2 -2
  27. package/dist/lib/components/index.d.ts +1 -0
  28. package/dist/lib/components/index.js +1 -0
  29. package/dist/lib/dist/lib/color/alpha.mjs +1 -1
  30. package/dist/lib/dist/lib/color/alpha.mjs.map +1 -1
  31. package/dist/lib/dist/lib/components/Calendar/index.mjs +1 -1
  32. package/dist/lib/dist/lib/components/Datepicker/index.mjs +1 -1
  33. package/dist/lib/dist/lib/components/Dialog/DialogAction.mjs +1 -1
  34. package/dist/lib/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
  35. package/dist/lib/dist/lib/components/Modal/ModalAction.mjs +2 -0
  36. package/dist/lib/dist/lib/components/Modal/ModalAction.mjs.map +1 -0
  37. package/dist/lib/dist/lib/components/Modal/ModalCancel.mjs +2 -0
  38. package/dist/lib/dist/lib/components/Modal/ModalCancel.mjs.map +1 -0
  39. package/dist/lib/dist/lib/components/Modal/ModalContent.mjs +2 -0
  40. package/dist/lib/dist/lib/components/Modal/ModalContent.mjs.map +1 -0
  41. package/dist/lib/dist/lib/components/Modal/ModalDescription.mjs +2 -0
  42. package/dist/lib/dist/lib/components/Modal/ModalDescription.mjs.map +1 -0
  43. package/dist/lib/dist/lib/components/Modal/ModalFooter.mjs +2 -0
  44. package/dist/lib/dist/lib/components/Modal/ModalFooter.mjs.map +1 -0
  45. package/dist/lib/dist/lib/components/Modal/ModalRoot.mjs +2 -0
  46. package/dist/lib/dist/lib/components/Modal/ModalRoot.mjs.map +1 -0
  47. package/dist/lib/dist/lib/components/Modal/ModalTitle.mjs +2 -0
  48. package/dist/lib/dist/lib/components/Modal/ModalTitle.mjs.map +1 -0
  49. package/dist/lib/dist/lib/components/Modal/ModalTrigger.mjs +2 -0
  50. package/dist/lib/dist/lib/components/Modal/ModalTrigger.mjs.map +1 -0
  51. package/dist/lib/dist/lib/components/Modal/index.mjs +2 -0
  52. package/dist/lib/dist/lib/components/Modal/index.mjs.map +1 -0
  53. package/dist/lib/dist/lib/components/SideBar/index.mjs +1 -1
  54. package/dist/lib/dist/lib/components/Tabs/DynamicTabs.mjs +1 -0
  55. package/dist/lib/dist/lib/components/Tabs/DynamicTabs.mjs.map +1 -1
  56. package/dist/lib/dist/lib/index.mjs +1 -1
  57. package/dist/lib/node_modules/date-fns/esm/locale/en-US/index.mjs.map +1 -1
  58. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  59. package/dist/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +1 -1
  61. package/dist/lib/node_modules/date-fns/esm/addDays/index.mjs +0 -2
  62. package/dist/lib/node_modules/date-fns/esm/addDays/index.mjs.map +0 -1
  63. package/dist/lib/node_modules/date-fns/esm/addMonths/index.mjs +0 -2
  64. package/dist/lib/node_modules/date-fns/esm/addMonths/index.mjs.map +0 -1
  65. package/dist/lib/node_modules/date-fns/esm/addWeeks/index.mjs +0 -2
  66. package/dist/lib/node_modules/date-fns/esm/addWeeks/index.mjs.map +0 -1
  67. package/dist/lib/node_modules/date-fns/esm/addYears/index.mjs +0 -2
  68. package/dist/lib/node_modules/date-fns/esm/addYears/index.mjs.map +0 -1
  69. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarDays/index.mjs +0 -2
  70. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarDays/index.mjs.map +0 -1
  71. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarMonths/index.mjs +0 -2
  72. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarMonths/index.mjs.map +0 -1
  73. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarWeeks/index.mjs +0 -2
  74. package/dist/lib/node_modules/date-fns/esm/differenceInCalendarWeeks/index.mjs.map +0 -1
  75. package/dist/lib/node_modules/date-fns/esm/endOfISOWeek/index.mjs +0 -2
  76. package/dist/lib/node_modules/date-fns/esm/endOfISOWeek/index.mjs.map +0 -1
  77. package/dist/lib/node_modules/date-fns/esm/endOfMonth/index.mjs +0 -2
  78. package/dist/lib/node_modules/date-fns/esm/endOfMonth/index.mjs.map +0 -1
  79. package/dist/lib/node_modules/date-fns/esm/endOfWeek/index.mjs +0 -2
  80. package/dist/lib/node_modules/date-fns/esm/endOfWeek/index.mjs.map +0 -1
  81. package/dist/lib/node_modules/date-fns/esm/getDaysInMonth/index.mjs +0 -2
  82. package/dist/lib/node_modules/date-fns/esm/getDaysInMonth/index.mjs.map +0 -1
  83. package/dist/lib/node_modules/date-fns/esm/getISOWeek/index.mjs +0 -2
  84. package/dist/lib/node_modules/date-fns/esm/getISOWeek/index.mjs.map +0 -1
  85. package/dist/lib/node_modules/date-fns/esm/getISOWeekYear/index.mjs +0 -2
  86. package/dist/lib/node_modules/date-fns/esm/getISOWeekYear/index.mjs.map +0 -1
  87. package/dist/lib/node_modules/date-fns/esm/getTime/index.mjs +0 -2
  88. package/dist/lib/node_modules/date-fns/esm/getTime/index.mjs.map +0 -1
  89. package/dist/lib/node_modules/date-fns/esm/getUnixTime/index.mjs +0 -2
  90. package/dist/lib/node_modules/date-fns/esm/getUnixTime/index.mjs.map +0 -1
  91. package/dist/lib/node_modules/date-fns/esm/getWeek/index.mjs +0 -2
  92. package/dist/lib/node_modules/date-fns/esm/getWeek/index.mjs.map +0 -1
  93. package/dist/lib/node_modules/date-fns/esm/getWeekYear/index.mjs +0 -2
  94. package/dist/lib/node_modules/date-fns/esm/getWeekYear/index.mjs.map +0 -1
  95. package/dist/lib/node_modules/date-fns/esm/getWeeksInMonth/index.mjs +0 -2
  96. package/dist/lib/node_modules/date-fns/esm/getWeeksInMonth/index.mjs.map +0 -1
  97. package/dist/lib/node_modules/date-fns/esm/isAfter/index.mjs +0 -2
  98. package/dist/lib/node_modules/date-fns/esm/isAfter/index.mjs.map +0 -1
  99. package/dist/lib/node_modules/date-fns/esm/isBefore/index.mjs +0 -2
  100. package/dist/lib/node_modules/date-fns/esm/isBefore/index.mjs.map +0 -1
  101. package/dist/lib/node_modules/date-fns/esm/isSameDay/index.mjs +0 -2
  102. package/dist/lib/node_modules/date-fns/esm/isSameDay/index.mjs.map +0 -1
  103. package/dist/lib/node_modules/date-fns/esm/isSameMonth/index.mjs +0 -2
  104. package/dist/lib/node_modules/date-fns/esm/isSameMonth/index.mjs.map +0 -1
  105. package/dist/lib/node_modules/date-fns/esm/isSameYear/index.mjs +0 -2
  106. package/dist/lib/node_modules/date-fns/esm/isSameYear/index.mjs.map +0 -1
  107. package/dist/lib/node_modules/date-fns/esm/lastDayOfMonth/index.mjs +0 -2
  108. package/dist/lib/node_modules/date-fns/esm/lastDayOfMonth/index.mjs.map +0 -1
  109. package/dist/lib/node_modules/date-fns/esm/max/index.mjs +0 -2
  110. package/dist/lib/node_modules/date-fns/esm/max/index.mjs.map +0 -1
  111. package/dist/lib/node_modules/date-fns/esm/min/index.mjs +0 -2
  112. package/dist/lib/node_modules/date-fns/esm/min/index.mjs.map +0 -1
  113. package/dist/lib/node_modules/date-fns/esm/setMonth/index.mjs +0 -2
  114. package/dist/lib/node_modules/date-fns/esm/setMonth/index.mjs.map +0 -1
  115. package/dist/lib/node_modules/date-fns/esm/setYear/index.mjs +0 -2
  116. package/dist/lib/node_modules/date-fns/esm/setYear/index.mjs.map +0 -1
  117. package/dist/lib/node_modules/date-fns/esm/startOfDay/index.mjs +0 -2
  118. package/dist/lib/node_modules/date-fns/esm/startOfDay/index.mjs.map +0 -1
  119. package/dist/lib/node_modules/date-fns/esm/startOfISOWeek/index.mjs +0 -2
  120. package/dist/lib/node_modules/date-fns/esm/startOfISOWeek/index.mjs.map +0 -1
  121. package/dist/lib/node_modules/date-fns/esm/startOfISOWeekYear/index.mjs +0 -2
  122. package/dist/lib/node_modules/date-fns/esm/startOfISOWeekYear/index.mjs.map +0 -1
  123. package/dist/lib/node_modules/date-fns/esm/startOfMonth/index.mjs +0 -2
  124. package/dist/lib/node_modules/date-fns/esm/startOfMonth/index.mjs.map +0 -1
  125. package/dist/lib/node_modules/date-fns/esm/startOfWeek/index.mjs +0 -2
  126. package/dist/lib/node_modules/date-fns/esm/startOfWeek/index.mjs.map +0 -1
  127. package/dist/lib/node_modules/date-fns/esm/startOfWeekYear/index.mjs +0 -2
  128. package/dist/lib/node_modules/date-fns/esm/startOfWeekYear/index.mjs.map +0 -1
  129. package/dist/lib/node_modules/date-fns/esm/startOfYear/index.mjs +0 -2
  130. package/dist/lib/node_modules/date-fns/esm/startOfYear/index.mjs.map +0 -1
  131. package/dist/lib/node_modules/date-fns/esm/subDays/index.mjs +0 -2
  132. package/dist/lib/node_modules/date-fns/esm/subDays/index.mjs.map +0 -1
  133. package/dist/lib/node_modules/react-day-picker/dist/index.esm.mjs +0 -2
  134. package/dist/lib/node_modules/react-day-picker/dist/index.esm.mjs.map +0 -1
@@ -1,2 +0,0 @@
1
- import*as e from"react";import t,{createContext as n,forwardRef as r,useContext as o,useState as a,useEffect as l,useRef as i}from"react";import s from"../../date-fns/esm/isSameDay/index.mjs";import d from"../../date-fns/esm/subDays/index.mjs";import c from"../../date-fns/esm/addDays/index.mjs";import u from"../../date-fns/esm/differenceInCalendarDays/index.mjs";import f from"../../date-fns/esm/startOfMonth/index.mjs";import m from"../../date-fns/esm/endOfMonth/index.mjs";import p from"../../date-fns/esm/startOfDay/index.mjs";import v from"../../date-fns/esm/addMonths/index.mjs";import y from"../../date-fns/esm/differenceInCalendarMonths/index.mjs";import h from"../../date-fns/esm/isSameMonth/index.mjs";import b from"../../date-fns/esm/isBefore/index.mjs";import w from"../../date-fns/esm/isAfter/index.mjs";import E from"../../date-fns/esm/getUnixTime/index.mjs";import _ from"../../date-fns/esm/getWeeksInMonth/index.mjs";import g from"../../date-fns/esm/addWeeks/index.mjs";import k from"../../date-fns/esm/locale/en-US/index.mjs";import M from"../../date-fns/esm/isSameYear/index.mjs";import D from"../../date-fns/esm/setMonth/index.mjs";import N from"../../date-fns/esm/setYear/index.mjs";import x from"../../date-fns/esm/startOfYear/index.mjs";import C from"../../date-fns/esm/max/index.mjs";import O from"../../date-fns/esm/min/index.mjs";import P from"../../date-fns/esm/endOfISOWeek/index.mjs";import j from"../../date-fns/esm/endOfWeek/index.mjs";import W from"../../date-fns/esm/startOfISOWeek/index.mjs";import S from"../../date-fns/esm/startOfWeek/index.mjs";import L from"../../date-fns/esm/getISOWeek/index.mjs";import B from"../../date-fns/esm/getWeek/index.mjs";import I from"../../date-fns/esm/format/index.mjs";import F from"../../date-fns/esm/isDate/index.mjs";import T from"../../date-fns/esm/addYears/index.mjs";var Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Y.apply(this,arguments)};function A(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function R(e){return"multiple"===e.mode}function H(e){return"range"===e.mode}function K(e){return"single"===e.mode}var U={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};var z=Object.freeze({__proto__:null,formatCaption:function(e,t){return I(e,"LLLL y",t)},formatDay:function(e,t){return I(e,"d",t)},formatMonthCaption:function(e,t){return I(e,"LLLL",t)},formatWeekNumber:function(e){return"".concat(e)},formatWeekdayName:function(e,t){return I(e,"cccccc",t)},formatYearCaption:function(e,t){return I(e,"yyyy",t)}}),Z=Object.freeze({__proto__:null,labelDay:function(e,t,n){return I(e,"do MMMM (EEEE)",n)},labelMonthDropdown:function(){return"Month: "},labelNext:function(){return"Go to next month"},labelPrevious:function(){return"Go to previous month"},labelWeekNumber:function(e){return"Week n. ".concat(e)},labelWeekday:function(e,t){return I(e,"cccc",t)},labelYearDropdown:function(){return"Year: "}});var G=n(void 0);function q(e){var n,r,o,a,l,i=e.initialProps,s=(r=U,o=k,a=new Date,{captionLayout:"buttons",classNames:r,formatters:z,labels:Z,locale:o,modifiersClassNames:{},modifiers:{},numberOfMonths:1,styles:{},today:a,mode:"default"}),d=function(e){var t=e.fromYear,n=e.toYear,r=e.fromMonth,o=e.toMonth,a=e.fromDate,l=e.toDate;return r?a=f(r):t&&(a=new Date(t,0,1)),o?l=m(o):n&&(l=new Date(n,11,31)),{fromDate:a?p(a):void 0,toDate:l?p(l):void 0}}(i),c=d.fromDate,u=d.toDate,v=null!==(n=i.captionLayout)&&void 0!==n?n:s.captionLayout;"buttons"===v||c&&u||(v="buttons"),(K(i)||R(i)||H(i))&&(l=i.onSelect);var y=Y(Y(Y({},s),i),{captionLayout:v,classNames:Y(Y({},s.classNames),i.classNames),components:Y({},i.components),formatters:Y(Y({},s.formatters),i.formatters),fromDate:c,labels:Y(Y({},s.labels),i.labels),mode:i.mode||s.mode,modifiers:Y(Y({},s.modifiers),i.modifiers),modifiersClassNames:Y(Y({},s.modifiersClassNames),i.modifiersClassNames),onSelect:l,styles:Y(Y({},s.styles),i.styles),toDate:u});return t.createElement(G.Provider,{value:y},e.children)}function J(){var e=o(G);if(!e)throw new Error("useDayPicker must be used within a DayPickerProvider.");return e}function Q(e){var n=J(),r=n.locale,o=n.classNames,a=n.styles,l=n.formatters.formatCaption;return t.createElement("div",{className:o.caption_label,style:a.caption_label,"aria-live":"polite",role:"presentation",id:e.id},l(e.displayMonth,{locale:r}))}function V(e){return t.createElement("svg",Y({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},e),t.createElement("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"}))}function X(e){var n,r,o=e.onChange,a=e.value,l=e.children,i=e.caption,s=e.className,d=e.style,c=J(),u=null!==(r=null===(n=c.components)||void 0===n?void 0:n.IconDropdown)&&void 0!==r?r:V;return t.createElement("div",{className:s,style:d},t.createElement("span",{className:c.classNames.vhidden},e["aria-label"]),t.createElement("select",{name:e.name,"aria-label":e["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:a,onChange:o},l),t.createElement("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true"},i,t.createElement(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})))}function $(e){var n,r=J(),o=r.fromDate,a=r.toDate,l=r.styles,i=r.locale,s=r.formatters.formatMonthCaption,d=r.classNames,c=r.components,u=r.labels.labelMonthDropdown;if(!o)return t.createElement(t.Fragment,null);if(!a)return t.createElement(t.Fragment,null);var m=[];if(M(o,a))for(var p=f(o),v=o.getMonth();v<=a.getMonth();v++)m.push(D(p,v));else for(p=f(new Date),v=0;v<=11;v++)m.push(D(p,v));var y=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:X;return t.createElement(y,{name:"months","aria-label":u(),className:d.dropdown_month,style:l.dropdown_month,onChange:function(t){var n=Number(t.target.value),r=D(f(e.displayMonth),n);e.onChange(r)},value:e.displayMonth.getMonth(),caption:s(e.displayMonth,{locale:i})},m.map((function(e){return t.createElement("option",{key:e.getMonth(),value:e.getMonth()},s(e,{locale:i}))})))}function ee(e){var n,r=e.displayMonth,o=J(),a=o.fromDate,l=o.toDate,i=o.locale,s=o.styles,d=o.classNames,c=o.components,u=o.formatters.formatYearCaption,m=o.labels.labelYearDropdown,p=[];if(!a)return t.createElement(t.Fragment,null);if(!l)return t.createElement(t.Fragment,null);for(var v=a.getFullYear(),y=l.getFullYear(),h=v;h<=y;h++)p.push(N(x(new Date),h));var b=null!==(n=null==c?void 0:c.Dropdown)&&void 0!==n?n:X;return t.createElement(b,{name:"years","aria-label":m(),className:d.dropdown_year,style:s.dropdown_year,onChange:function(t){var n=N(f(r),Number(t.target.value));e.onChange(n)},value:r.getFullYear(),caption:u(r,{locale:i})},p.map((function(e){return t.createElement("option",{key:e.getFullYear(),value:e.getFullYear()},u(e,{locale:i}))})))}function te(){var e=J(),t=function(e){var t=e.month,n=e.defaultMonth,r=e.today,o=t||n||r||new Date,a=e.toDate,l=e.fromDate,i=e.numberOfMonths,s=void 0===i?1:i;return a&&y(a,o)<0&&(o=v(a,-1*(s-1))),l&&y(o,l)<0&&(o=l),f(o)}(e),n=function(e,t){var n=a(e),r=n[0];return[void 0===t?r:t,n[1]]}(t,e.month),r=n[0],o=n[1];return[r,function(t){var n;if(!e.disableNavigation){var r=f(t);o(r),null===(n=e.onMonthChange)||void 0===n||n.call(e,r)}}]}var ne=n(void 0);function re(e){var n=J(),r=te(),o=r[0],a=r[1],l=function(e,t){for(var n=t.reverseMonths,r=t.numberOfMonths,o=f(e),a=f(v(o,r)),l=y(a,o),i=[],s=0;s<l;s++){var d=v(o,s);i.push(d)}return n&&(i=i.reverse()),i}(o,n),i=function(e,t){if(!t.disableNavigation){var n=t.toDate,r=t.pagedNavigation,o=t.numberOfMonths,a=void 0===o?1:o,l=r?a:1,i=f(e);if(!n)return v(i,l);if(!(y(n,e)<a))return v(i,l)}}(o,n),s=function(e,t){if(!t.disableNavigation){var n=t.fromDate,r=t.pagedNavigation,o=t.numberOfMonths,a=r?void 0===o?1:o:1,l=f(e);if(!n)return v(l,-a);if(!(y(l,n)<=0))return v(l,-a)}}(o,n),d=function(e){return l.some((function(t){return h(e,t)}))},c={currentMonth:o,displayMonths:l,goToMonth:a,goToDate:function(e,t){d(e)||(t&&b(e,t)?a(v(e,1+-1*n.numberOfMonths)):a(e))},previousMonth:s,nextMonth:i,isDateDisplayed:d};return t.createElement(ne.Provider,{value:c},e.children)}function oe(){var e=o(ne);if(!e)throw new Error("useNavigation must be used within a NavigationProvider");return e}function ae(e){var n,r=J(),o=r.classNames,a=r.styles,l=r.components,i=oe().goToMonth,s=function(e){i(e)},d=null!==(n=null==l?void 0:l.CaptionLabel)&&void 0!==n?n:Q,c=t.createElement(d,{id:e.id,displayMonth:e.displayMonth});return t.createElement("div",{className:o.caption_dropdowns,style:a.caption_dropdowns},t.createElement("div",{className:o.vhidden},c),t.createElement($,{onChange:s,displayMonth:e.displayMonth}),t.createElement(ee,{onChange:s,displayMonth:e.displayMonth}))}function le(e){return t.createElement("svg",Y({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"}))}function ie(e){return t.createElement("svg",Y({width:"16px",height:"16px",viewBox:"0 0 120 120"},e),t.createElement("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"}))}var se=r((function(e,n){var r=J(),o=r.classNames,a=r.styles,l=[o.button_reset,o.button];e.className&&l.push(e.className);var i=l.join(" "),s=Y(Y({},a.button_reset),a.button);return e.style&&Object.assign(s,e.style),t.createElement("button",Y({},e,{ref:n,type:"button",className:i,style:s}))}));function de(e){var n,r,o=J(),a=o.dir,l=o.locale,i=o.classNames,s=o.styles,d=o.labels,c=d.labelPrevious,u=d.labelNext,f=o.components;if(!e.nextMonth&&!e.previousMonth)return t.createElement(t.Fragment,null);var m=c(e.previousMonth,{locale:l}),p=[i.nav_button,i.nav_button_previous].join(" "),v=u(e.nextMonth,{locale:l}),y=[i.nav_button,i.nav_button_next].join(" "),h=null!==(n=null==f?void 0:f.IconRight)&&void 0!==n?n:ie,b=null!==(r=null==f?void 0:f.IconLeft)&&void 0!==r?r:le;return t.createElement("div",{className:i.nav,style:s.nav},!e.hidePrevious&&t.createElement(se,{name:"previous-month","aria-label":m,className:p,style:s.nav_button_previous,disabled:!e.previousMonth,onClick:e.onPreviousClick},"rtl"===a?t.createElement(h,{className:i.nav_icon,style:s.nav_icon}):t.createElement(b,{className:i.nav_icon,style:s.nav_icon})),!e.hideNext&&t.createElement(se,{name:"next-month","aria-label":v,className:y,style:s.nav_button_next,disabled:!e.nextMonth,onClick:e.onNextClick},"rtl"===a?t.createElement(b,{className:i.nav_icon,style:s.nav_icon}):t.createElement(h,{className:i.nav_icon,style:s.nav_icon})))}function ce(e){var n=J().numberOfMonths,r=oe(),o=r.previousMonth,a=r.nextMonth,l=r.goToMonth,i=r.displayMonths,s=i.findIndex((function(t){return h(e.displayMonth,t)})),d=0===s,c=s===i.length-1,u=n>1&&(d||!c),f=n>1&&(c||!d);return t.createElement(de,{displayMonth:e.displayMonth,hideNext:u,hidePrevious:f,nextMonth:a,previousMonth:o,onPreviousClick:function(){o&&l(o)},onNextClick:function(){a&&l(a)}})}function ue(e){var n,r,o=J(),a=o.classNames,l=o.disableNavigation,i=o.styles,s=o.captionLayout,d=o.components,c=null!==(n=null==d?void 0:d.CaptionLabel)&&void 0!==n?n:Q;return r=l?t.createElement(c,{id:e.id,displayMonth:e.displayMonth}):"dropdown"===s?t.createElement(ae,{displayMonth:e.displayMonth,id:e.id}):"dropdown-buttons"===s?t.createElement(t.Fragment,null,t.createElement(ae,{displayMonth:e.displayMonth,id:e.id}),t.createElement(ce,{displayMonth:e.displayMonth,id:e.id})):t.createElement(t.Fragment,null,t.createElement(c,{id:e.id,displayMonth:e.displayMonth}),t.createElement(ce,{displayMonth:e.displayMonth,id:e.id})),t.createElement("div",{className:a.caption,style:i.caption},r)}function fe(e){var n=J(),r=n.footer,o=n.styles,a=n.classNames.tfoot;return r?t.createElement("tfoot",{className:a,style:o.tfoot},t.createElement("tr",null,t.createElement("td",{colSpan:8},r))):t.createElement(t.Fragment,null)}function me(){var e=J(),n=e.classNames,r=e.styles,o=e.showWeekNumber,a=e.locale,l=e.weekStartsOn,i=e.ISOWeek,s=e.formatters.formatWeekdayName,d=e.labels.labelWeekday,u=function(e,t,n){for(var r=n?W(new Date):S(new Date,{locale:e,weekStartsOn:t}),o=[],a=0;a<7;a++){var l=c(r,a);o.push(l)}return o}(a,l,i);return t.createElement("tr",{style:r.head_row,className:n.head_row},o&&t.createElement("td",{style:r.head_cell,className:n.head_cell}),u.map((function(e,o){return t.createElement("th",{key:o,scope:"col",className:n.head_cell,style:r.head_cell,"aria-label":d(e,{locale:a})},s(e,{locale:a}))})))}function pe(){var e,n=J(),r=n.classNames,o=n.styles,a=n.components,l=null!==(e=null==a?void 0:a.HeadRow)&&void 0!==e?e:me;return t.createElement("thead",{style:o.head,className:r.head},t.createElement(l,null))}function ve(e){var n=J(),r=n.locale,o=n.formatters.formatDay;return t.createElement(t.Fragment,null,o(e.date,{locale:r}))}var ye=n(void 0);function he(e){if(!R(e.initialProps)){var n={selected:void 0,modifiers:{disabled:[]}};return t.createElement(ye.Provider,{value:n},e.children)}return t.createElement(be,{initialProps:e.initialProps,children:e.children})}function be(e){var n=e.initialProps,r=e.children,o=n.selected,a=n.min,l=n.max,i={disabled:[]};o&&i.disabled.push((function(e){var t=l&&o.length>l-1,n=o.some((function(t){return s(t,e)}));return Boolean(t&&!n)}));var d={selected:o,onDayClick:function(e,t,r){var i,d;if((null===(i=n.onDayClick)||void 0===i||i.call(n,e,t,r),!Boolean(t.selected&&a&&(null==o?void 0:o.length)===a))&&!Boolean(!t.selected&&l&&(null==o?void 0:o.length)===l)){var c=o?A([],o,!0):[];if(t.selected){var u=c.findIndex((function(t){return s(e,t)}));c.splice(u,1)}else c.push(e);null===(d=n.onSelect)||void 0===d||d.call(n,c,e,t,r)}},modifiers:i};return t.createElement(ye.Provider,{value:d},r)}function we(){var e=o(ye);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Ee(e,t){var n=t||{},r=n.from,o=n.to;if(!r)return{from:e,to:void 0};if(!o&&s(r,e))return{from:r,to:e};if(!o&&b(e,r))return{from:e,to:r};if(!o)return{from:r,to:e};if(!s(o,e)||!s(r,e)){if(s(o,e))return{from:o,to:void 0};if(!s(r,e))return w(r,e)?{from:e,to:o}:{from:r,to:e}}}var _e,ge=n(void 0);function ke(e){if(!H(e.initialProps)){var n={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return t.createElement(ge.Provider,{value:n},e.children)}return t.createElement(Me,{initialProps:e.initialProps,children:e.children})}function Me(e){var n=e.initialProps,r=e.children,o=n.selected,a=o||{},l=a.from,i=a.to,f=n.min,m=n.max,p={range_start:[],range_end:[],range_middle:[],disabled:[]};if(l&&(p.range_start=[l],i?(p.range_end=[i],s(l,i)||(p.range_middle=[{after:l,before:i}])):p.range_end=[l]),f&&(l&&!i&&p.disabled.push({after:d(l,f-1),before:c(l,f-1)}),l&&i&&p.disabled.push({after:l,before:c(l,f-1)})),m&&(l&&!i&&(p.disabled.push({before:c(l,1-m)}),p.disabled.push({after:c(l,m-1)})),l&&i)){var v=m-(u(i,l)+1);p.disabled.push({before:d(l,v)}),p.disabled.push({after:c(i,v)})}return t.createElement(ge.Provider,{value:{selected:o,onDayClick:function(e,t,r){var a,l;null===(a=n.onDayClick)||void 0===a||a.call(n,e,t,r);var i=Ee(e,o);null===(l=n.onSelect)||void 0===l||l.call(n,i,e,t,r)},modifiers:p}},r)}function De(){var e=o(ge);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Ne(e){return Array.isArray(e)?A([],e,!0):void 0!==e?[e]:[]}!function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"}(_e||(_e={}));var xe=_e.Selected,Ce=_e.Disabled,Oe=_e.Hidden,Pe=_e.Today,je=_e.RangeEnd,We=_e.RangeMiddle,Se=_e.RangeStart,Le=_e.Outside;var Be=n(void 0);function Ie(e){var n=J(),r=function(e,t,n){var r,o=((r={})[xe]=Ne(e.selected),r[Ce]=Ne(e.disabled),r[Oe]=Ne(e.hidden),r[Pe]=[e.today],r[je]=[],r[We]=[],r[Se]=[],r[Le]=[],r);return e.fromDate&&o[Ce].push({before:e.fromDate}),e.toDate&&o[Ce].push({after:e.toDate}),R(e)?o[Ce]=o[Ce].concat(t.modifiers[Ce]):H(e)&&(o[Ce]=o[Ce].concat(n.modifiers[Ce]),o[Se]=n.modifiers[Se],o[We]=n.modifiers[We],o[je]=n.modifiers[je]),o}(n,we(),De()),o=function(e){var t={};return Object.entries(e).forEach((function(e){var n=e[0],r=e[1];t[n]=Ne(r)})),t}(n.modifiers),a=Y(Y({},r),o);return t.createElement(Be.Provider,{value:a},e.children)}function Fe(){var e=o(Be);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Te(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function Ye(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function Ae(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function Re(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function He(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function Ke(e,t){return t.some((function(t){if("boolean"==typeof t)return t;if(F(t))return s(e,t);var n,r,o,a,l;if(function(e){return Array.isArray(e)&&e.every(F)}(t))return t.includes(e);if(Ye(t))return n=e,a=(r=t).from,l=r.to,!!a&&(!(l||!s(a,n))||!!l&&(u(l,a)<0&&(a=(o=[l,a])[0],l=o[1]),u(n,a)>=0&&u(l,n)>=0));if(He(t))return t.dayOfWeek.includes(e.getDay());if(Te(t)){var i=u(t.before,e)>0,d=u(t.after,e)<0;return w(t.before,t.after)?d&&i:i||d}return Ae(t)?u(e,t.after)>0:Re(t)?u(t.before,e)>0:"function"==typeof t&&t(e)}))}function Ue(e,t,n){var r=Object.keys(t).reduce((function(n,r){var o=t[r];return Ke(e,o)&&n.push(r),n}),[]),o={};return r.forEach((function(e){return o[e]=!0})),n&&!h(e,n)&&(o.outside=!0),o}var ze=365;function Ze(e,t){var n=t.moveBy,r=t.direction,o=t.context,a=t.modifiers,l=t.retry,i=void 0===l?{count:0,lastFocused:e}:l,s=o.weekStartsOn,d=o.fromDate,u=o.toDate,f=o.locale,m={day:c,week:g,month:v,year:T,startOfWeek:function(e){return o.ISOWeek?W(e):S(e,{locale:f,weekStartsOn:s})},endOfWeek:function(e){return o.ISOWeek?P(e):j(e,{locale:f,weekStartsOn:s})}}[n](e,"after"===r?1:-1);"before"===r&&d?m=C([d,m]):"after"===r&&u&&(m=O([u,m]));var p=!0;if(a){var y=Ue(m,a);p=!y.disabled&&!y.hidden}return p?m:i.count>ze?i.lastFocused:Ze(m,{moveBy:n,direction:r,context:o,modifiers:a,retry:Y(Y({},i),{count:i.count+1})})}var Ge=n(void 0);function qe(e){var n=oe(),r=Fe(),o=a(),l=o[0],i=o[1],d=a(),u=d[0],p=d[1],v=function(e,t){for(var n,r,o=f(e[0]),a=m(e[e.length-1]),l=o;l<=a;){var i=Ue(l,t);if(i.disabled||i.hidden)l=c(l,1);else{if(i.selected)return l;i.today&&!r&&(r=l),n||(n=l),l=c(l,1)}}return r||n}(n.displayMonths,r),y=(null!=l?l:u&&n.isDateDisplayed(u))?u:v,h=function(e){i(e)},b=J(),w=function(e,t){if(l){var o=Ze(l,{moveBy:e,direction:t,context:b,modifiers:r});s(l,o)||(n.goToDate(o,l),h(o))}},E={focusedDay:l,focusTarget:y,blur:function(){p(l),i(void 0)},focus:h,focusDayAfter:function(){return w("day","after")},focusDayBefore:function(){return w("day","before")},focusWeekAfter:function(){return w("week","after")},focusWeekBefore:function(){return w("week","before")},focusMonthBefore:function(){return w("month","before")},focusMonthAfter:function(){return w("month","after")},focusYearBefore:function(){return w("year","before")},focusYearAfter:function(){return w("year","after")},focusStartOfWeek:function(){return w("startOfWeek","before")},focusEndOfWeek:function(){return w("endOfWeek","after")}};return t.createElement(Ge.Provider,{value:E},e.children)}function Je(){var e=o(Ge);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function Qe(e,t){return Ue(e,Fe(),t)}var Ve=n(void 0);function Xe(e){if(!K(e.initialProps)){var n={selected:void 0};return t.createElement(Ve.Provider,{value:n},e.children)}return t.createElement($e,{initialProps:e.initialProps,children:e.children})}function $e(e){var n=e.initialProps,r=e.children,o={selected:n.selected,onDayClick:function(e,t,r){var o,a,l;null===(o=n.onDayClick)||void 0===o||o.call(n,e,t,r),!t.selected||n.required?null===(l=n.onSelect)||void 0===l||l.call(n,e,e,t,r):null===(a=n.onSelect)||void 0===a||a.call(n,void 0,e,t,r)}};return t.createElement(Ve.Provider,{value:o},r)}function et(){var e=o(Ve);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function tt(e,t){var n=[e.classNames.day];return Object.keys(t).forEach((function(t){var r=e.modifiersClassNames[t];if(r)n.push(r);else if(function(e){return Object.values(_e).includes(e)}(t)){var o=e.classNames["day_".concat(t)];o&&n.push(o)}})),n}function nt(e,n,r){var o,a,i,d=J(),c=Je(),u=Qe(e,n),f=function(e,t){var n=J(),r=et(),o=we(),a=De(),l=Je(),i=l.focusDayAfter,s=l.focusDayBefore,d=l.focusWeekAfter,c=l.focusWeekBefore,u=l.blur,f=l.focus,m=l.focusMonthBefore,p=l.focusMonthAfter,v=l.focusYearBefore,y=l.focusYearAfter,h=l.focusStartOfWeek,b=l.focusEndOfWeek,w={onClick:function(l){var i,s,d,c;K(n)?null===(i=r.onDayClick)||void 0===i||i.call(r,e,t,l):R(n)?null===(s=o.onDayClick)||void 0===s||s.call(o,e,t,l):H(n)?null===(d=a.onDayClick)||void 0===d||d.call(a,e,t,l):null===(c=n.onDayClick)||void 0===c||c.call(n,e,t,l)},onFocus:function(r){var o;f(e),null===(o=n.onDayFocus)||void 0===o||o.call(n,e,t,r)},onBlur:function(r){var o;u(),null===(o=n.onDayBlur)||void 0===o||o.call(n,e,t,r)},onKeyDown:function(r){var o;switch(r.key){case"ArrowLeft":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?i():s();break;case"ArrowRight":r.preventDefault(),r.stopPropagation(),"rtl"===n.dir?s():i();break;case"ArrowDown":r.preventDefault(),r.stopPropagation(),d();break;case"ArrowUp":r.preventDefault(),r.stopPropagation(),c();break;case"PageUp":r.preventDefault(),r.stopPropagation(),r.shiftKey?v():m();break;case"PageDown":r.preventDefault(),r.stopPropagation(),r.shiftKey?y():p();break;case"Home":r.preventDefault(),r.stopPropagation(),h();break;case"End":r.preventDefault(),r.stopPropagation(),b()}null===(o=n.onDayKeyDown)||void 0===o||o.call(n,e,t,r)},onKeyUp:function(r){var o;null===(o=n.onDayKeyUp)||void 0===o||o.call(n,e,t,r)},onMouseEnter:function(r){var o;null===(o=n.onDayMouseEnter)||void 0===o||o.call(n,e,t,r)},onMouseLeave:function(r){var o;null===(o=n.onDayMouseLeave)||void 0===o||o.call(n,e,t,r)},onPointerEnter:function(r){var o;null===(o=n.onDayPointerEnter)||void 0===o||o.call(n,e,t,r)},onPointerLeave:function(r){var o;null===(o=n.onDayPointerLeave)||void 0===o||o.call(n,e,t,r)},onTouchCancel:function(r){var o;null===(o=n.onDayTouchCancel)||void 0===o||o.call(n,e,t,r)},onTouchEnd:function(r){var o;null===(o=n.onDayTouchEnd)||void 0===o||o.call(n,e,t,r)},onTouchMove:function(r){var o;null===(o=n.onDayTouchMove)||void 0===o||o.call(n,e,t,r)},onTouchStart:function(r){var o;null===(o=n.onDayTouchStart)||void 0===o||o.call(n,e,t,r)}};return w}(e,u),m=function(){var e=J(),t=et(),n=we(),r=De();return K(e)?t.selected:R(e)?n.selected:H(e)?r.selected:void 0}(),p=Boolean(d.onDayClick||"default"!==d.mode);l((function(){var t;u.outside||c.focusedDay&&p&&s(c.focusedDay,e)&&(null===(t=r.current)||void 0===t||t.focus())}),[c.focusedDay,e,r,p,u.outside]);var v=tt(d,u).join(" "),y=function(e,t){var n=Y({},e.styles.day);return Object.keys(t).forEach((function(t){var r;n=Y(Y({},n),null===(r=e.modifiersStyles)||void 0===r?void 0:r[t])})),n}(d,u),h=Boolean(u.outside&&!d.showOutsideDays||u.hidden),b=null!==(i=null===(a=d.components)||void 0===a?void 0:a.DayContent)&&void 0!==i?i:ve,w={style:y,className:v,children:t.createElement(b,{date:e,displayMonth:n,activeModifiers:u}),role:"gridcell"},E=c.focusTarget&&s(c.focusTarget,e)&&!u.outside,_=c.focusedDay&&s(c.focusedDay,e),g=Y(Y(Y({},w),((o={disabled:u.disabled,role:"gridcell"})["aria-selected"]=u.selected,o.tabIndex=_||E?0:-1,o)),f);return{isButton:p,isHidden:h,activeModifiers:u,selectedDays:m,buttonProps:g,divProps:w}}function rt(e){var n=i(null),r=nt(e.date,e.displayMonth,n);return r.isHidden?t.createElement("div",{role:"gridcell"}):r.isButton?t.createElement(se,Y({name:"day",ref:n},r.buttonProps)):t.createElement("div",Y({},r.divProps))}function ot(e){var n=e.number,r=e.dates,o=J(),a=o.onWeekNumberClick,l=o.styles,i=o.classNames,s=o.locale,d=o.labels.labelWeekNumber,c=(0,o.formatters.formatWeekNumber)(Number(n),{locale:s});if(!a)return t.createElement("span",{className:i.weeknumber,style:l.weeknumber},c);var u=d(Number(n),{locale:s});return t.createElement(se,{name:"week-number","aria-label":u,className:i.weeknumber,style:l.weeknumber,onClick:function(e){a(n,r,e)}},c)}function at(e){var n,r,o,a=J(),l=a.styles,i=a.classNames,s=a.showWeekNumber,d=a.components,c=null!==(n=null==d?void 0:d.Day)&&void 0!==n?n:rt,u=null!==(r=null==d?void 0:d.WeekNumber)&&void 0!==r?r:ot;return s&&(o=t.createElement("td",{className:i.cell,style:l.cell},t.createElement(u,{number:e.weekNumber,dates:e.dates}))),t.createElement("tr",{className:i.row,style:l.row},o,e.dates.map((function(n){return t.createElement("td",{className:i.cell,style:l.cell,key:E(n),role:"presentation"},t.createElement(c,{displayMonth:e.displayMonth,date:n}))})))}function lt(e,t,n){for(var r=(null==n?void 0:n.ISOWeek)?P(t):j(t,n),o=(null==n?void 0:n.ISOWeek)?W(e):S(e,n),a=u(r,o),l=[],i=0;i<=a;i++)l.push(c(o,i));return l.reduce((function(e,t){var r=(null==n?void 0:n.ISOWeek)?L(t):B(t,n),o=e.find((function(e){return e.weekNumber===r}));return o?(o.dates.push(t),e):(e.push({weekNumber:r,dates:[t]}),e)}),[])}function it(e){var n,r,o,a=J(),l=a.locale,i=a.classNames,s=a.styles,d=a.hideHead,c=a.fixedWeeks,u=a.components,p=a.weekStartsOn,v=a.firstWeekContainsDate,y=a.ISOWeek,h=function(e,t){var n=lt(f(e),m(e),t);if(null==t?void 0:t.useFixedWeeks){var r=_(e,t);if(r<6){var o=n[n.length-1],a=o.dates[o.dates.length-1],l=g(a,6-r),i=lt(g(a,1),l,t);n.push.apply(n,i)}}return n}(e.displayMonth,{useFixedWeeks:Boolean(c),ISOWeek:y,locale:l,weekStartsOn:p,firstWeekContainsDate:v}),b=null!==(n=null==u?void 0:u.Head)&&void 0!==n?n:pe,w=null!==(r=null==u?void 0:u.Row)&&void 0!==r?r:at,E=null!==(o=null==u?void 0:u.Footer)&&void 0!==o?o:fe;return t.createElement("table",{className:i.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!d&&t.createElement(b,null),t.createElement("tbody",{className:i.tbody,style:s.tbody,role:"rowgroup"},h.map((function(n){return t.createElement(w,{displayMonth:e.displayMonth,key:n.weekNumber,dates:n.dates,weekNumber:n.weekNumber})}))),t.createElement(E,{displayMonth:e.displayMonth}))}var st="undefined"!=typeof window&&window.document&&window.document.createElement?e.useLayoutEffect:e.useEffect,dt=!1,ct=0;function ut(){return"react-day-picker-".concat(++ct)}function ft(n){var r,o,a=J(),l=a.dir,i=a.classNames,s=a.styles,d=a.components,c=oe().displayMonths,u=function(t){var n,r=null!=t?t:dt?ut():null,o=e.useState(r),a=o[0],l=o[1];return st((function(){null===a&&l(ut())}),[]),e.useEffect((function(){!1===dt&&(dt=!0)}),[]),null!==(n=null!=t?t:a)&&void 0!==n?n:void 0}(a.id?"".concat(a.id,"-").concat(n.displayIndex):void 0),f=[i.month],m=s.month,p=0===n.displayIndex,v=n.displayIndex===c.length-1,y=!p&&!v;"rtl"===l&&(v=(r=[p,v])[0],p=r[1]),p&&(f.push(i.caption_start),m=Y(Y({},m),s.caption_start)),v&&(f.push(i.caption_end),m=Y(Y({},m),s.caption_end)),y&&(f.push(i.caption_between),m=Y(Y({},m),s.caption_between));var h=null!==(o=null==d?void 0:d.Caption)&&void 0!==o?o:ue;return t.createElement("div",{key:n.displayIndex,className:f.join(" "),style:m},t.createElement(h,{id:u,displayMonth:n.displayMonth}),t.createElement(it,{"aria-labelledby":u,displayMonth:n.displayMonth}))}function mt(e){var n=e.initialProps,r=J(),o=Je(),i=oe(),s=a(!1),d=s[0],c=s[1];l((function(){r.initialFocus&&o.focusTarget&&(d||(o.focus(o.focusTarget),c(!0)))}),[r.initialFocus,d,o.focus,o.focusTarget,o]);var u=[r.classNames.root,r.className];r.numberOfMonths>1&&u.push(r.classNames.multiple_months),r.showWeekNumber&&u.push(r.classNames.with_weeknumber);var f=Y(Y({},r.styles.root),r.style),m=Object.keys(n).filter((function(e){return e.startsWith("data-")})).reduce((function(e,t){var r;return Y(Y({},e),((r={})[t]=n[t],r))}),{});return t.createElement("div",Y({className:u.join(" "),style:f,dir:r.dir,id:r.id},m),t.createElement("div",{className:r.classNames.months,style:r.styles.months},i.displayMonths.map((function(e,n){return t.createElement(ft,{key:n,displayIndex:n,displayMonth:e})}))))}function pt(e){var n=e.children,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["children"]);return t.createElement(q,{initialProps:r},t.createElement(re,null,t.createElement(Xe,{initialProps:r},t.createElement(he,{initialProps:r},t.createElement(ke,{initialProps:r},t.createElement(Ie,null,t.createElement(qe,null,n)))))))}function vt(e){return t.createElement(pt,Y({},e),t.createElement(mt,{initialProps:e}))}export{se as Button,ue as Caption,ae as CaptionDropdowns,Q as CaptionLabel,ce as CaptionNavigation,rt as Day,ve as DayContent,vt as DayPicker,G as DayPickerContext,q as DayPickerProvider,X as Dropdown,Ge as FocusContext,qe as FocusProvider,fe as Footer,pe as Head,me as HeadRow,V as IconDropdown,le as IconLeft,ie as IconRight,_e as InternalModifier,ne as NavigationContext,re as NavigationProvider,pt as RootProvider,at as Row,ye as SelectMultipleContext,he as SelectMultipleProvider,be as SelectMultipleProviderInternal,ge as SelectRangeContext,ke as SelectRangeProvider,Me as SelectRangeProviderInternal,Ve as SelectSingleContext,Xe as SelectSingleProvider,$e as SelectSingleProviderInternal,ot as WeekNumber,Ee as addToRange,Ae as isDateAfterType,Re as isDateBeforeType,Te as isDateInterval,Ye as isDateRange,He as isDayOfWeekType,R as isDayPickerMultiple,H as isDayPickerRange,K as isDayPickerSingle,Ke as isMatch,Qe as useActiveModifiers,J as useDayPicker,nt as useDayRender,Je as useFocusContext,oe as useNavigation,we as useSelectMultiple,De as useSelectRange,et as useSelectSingle};
2
- //# sourceMappingURL=index.esm.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.esm.mjs","sources":["../../../../../node_modules/react-day-picker/dist/index.esm.js"],"sourcesContent":["import * as React from 'react';\nimport React__default, { createContext, useContext, useState, forwardRef, useEffect, useRef } from 'react';\nimport { enUS } from 'date-fns/locale';\nimport { format, startOfMonth, endOfMonth, startOfDay, isSameYear, setMonth, setYear, startOfYear, differenceInCalendarMonths, addMonths, isSameMonth, isBefore, startOfISOWeek, startOfWeek, addDays, isSameDay, isAfter, subDays, differenceInCalendarDays, isDate, max, min, addWeeks, addYears, endOfISOWeek, endOfWeek, getUnixTime, getISOWeek, getWeek, getWeeksInMonth, parse } from 'date-fns';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\n/** Returns true when the props are of type {@link DayPickerMultipleProps}. */\nfunction isDayPickerMultiple(props) {\n return props.mode === 'multiple';\n}\n\n/** Returns true when the props are of type {@link DayPickerRangeProps}. */\nfunction isDayPickerRange(props) {\n return props.mode === 'range';\n}\n\n/** Returns true when the props are of type {@link DayPickerSingleProps}. */\nfunction isDayPickerSingle(props) {\n return props.mode === 'single';\n}\n\n/**\n * The name of the default CSS classes.\n */\nvar defaultClassNames = {\n root: 'rdp',\n multiple_months: 'rdp-multiple_months',\n with_weeknumber: 'rdp-with_weeknumber',\n vhidden: 'rdp-vhidden',\n button_reset: 'rdp-button_reset',\n button: 'rdp-button',\n caption: 'rdp-caption',\n caption_start: 'rdp-caption_start',\n caption_end: 'rdp-caption_end',\n caption_between: 'rdp-caption_between',\n caption_label: 'rdp-caption_label',\n caption_dropdowns: 'rdp-caption_dropdowns',\n dropdown: 'rdp-dropdown',\n dropdown_month: 'rdp-dropdown_month',\n dropdown_year: 'rdp-dropdown_year',\n dropdown_icon: 'rdp-dropdown_icon',\n months: 'rdp-months',\n month: 'rdp-month',\n table: 'rdp-table',\n tbody: 'rdp-tbody',\n tfoot: 'rdp-tfoot',\n head: 'rdp-head',\n head_row: 'rdp-head_row',\n head_cell: 'rdp-head_cell',\n nav: 'rdp-nav',\n nav_button: 'rdp-nav_button',\n nav_button_previous: 'rdp-nav_button_previous',\n nav_button_next: 'rdp-nav_button_next',\n nav_icon: 'rdp-nav_icon',\n row: 'rdp-row',\n weeknumber: 'rdp-weeknumber',\n cell: 'rdp-cell',\n day: 'rdp-day',\n day_today: 'rdp-day_today',\n day_outside: 'rdp-day_outside',\n day_selected: 'rdp-day_selected',\n day_disabled: 'rdp-day_disabled',\n day_hidden: 'rdp-day_hidden',\n day_range_start: 'rdp-day_range_start',\n day_range_end: 'rdp-day_range_end',\n day_range_middle: 'rdp-day_range_middle'\n};\n\n/**\n * The default formatter for the caption.\n */\nfunction formatCaption(month, options) {\n return format(month, 'LLLL y', options);\n}\n\n/**\n * The default formatter for the Day button.\n */\nfunction formatDay(day, options) {\n return format(day, 'd', options);\n}\n\n/**\n * The default formatter for the Month caption.\n */\nfunction formatMonthCaption(month, options) {\n return format(month, 'LLLL', options);\n}\n\n/**\n * The default formatter for the week number.\n */\nfunction formatWeekNumber(weekNumber) {\n return \"\".concat(weekNumber);\n}\n\n/**\n * The default formatter for the name of the weekday.\n */\nfunction formatWeekdayName(weekday, options) {\n return format(weekday, 'cccccc', options);\n}\n\n/**\n * The default formatter for the Year caption.\n */\nfunction formatYearCaption(year, options) {\n return format(year, 'yyyy', options);\n}\n\nvar formatters = /*#__PURE__*/Object.freeze({\n __proto__: null,\n formatCaption: formatCaption,\n formatDay: formatDay,\n formatMonthCaption: formatMonthCaption,\n formatWeekNumber: formatWeekNumber,\n formatWeekdayName: formatWeekdayName,\n formatYearCaption: formatYearCaption\n});\n\n/**\n * The default ARIA label for the day button.\n */\nvar labelDay = function (day, activeModifiers, options) {\n return format(day, 'do MMMM (EEEE)', options);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelMonthDropdown = function () {\n return 'Month: ';\n};\n\n/**\n * The default ARIA label for next month button in navigation\n */\nvar labelNext = function () {\n return 'Go to next month';\n};\n\n/**\n * The default ARIA label for previous month button in navigation\n */\nvar labelPrevious = function () {\n return 'Go to previous month';\n};\n\n/**\n * The default ARIA label for the Weekday element.\n */\nvar labelWeekday = function (day, options) {\n return format(day, 'cccc', options);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelWeekNumber = function (n) {\n return \"Week n. \".concat(n);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelYearDropdown = function () {\n return 'Year: ';\n};\n\nvar labels = /*#__PURE__*/Object.freeze({\n __proto__: null,\n labelDay: labelDay,\n labelMonthDropdown: labelMonthDropdown,\n labelNext: labelNext,\n labelPrevious: labelPrevious,\n labelWeekNumber: labelWeekNumber,\n labelWeekday: labelWeekday,\n labelYearDropdown: labelYearDropdown\n});\n\n/**\n * Returns the default values to use in the DayPickerContext, in case they are\n * not passed down with the DayPicker initial props.\n */\nfunction getDefaultContextValues() {\n var captionLayout = 'buttons';\n var classNames = defaultClassNames;\n var locale = enUS;\n var modifiersClassNames = {};\n var modifiers = {};\n var numberOfMonths = 1;\n var styles = {};\n var today = new Date();\n return {\n captionLayout: captionLayout,\n classNames: classNames,\n formatters: formatters,\n labels: labels,\n locale: locale,\n modifiersClassNames: modifiersClassNames,\n modifiers: modifiers,\n numberOfMonths: numberOfMonths,\n styles: styles,\n today: today,\n mode: 'default'\n };\n}\n\n/** Return the `fromDate` and `toDate` prop values values parsing the DayPicker props. */\nfunction parseFromToProps(props) {\n var fromYear = props.fromYear, toYear = props.toYear, fromMonth = props.fromMonth, toMonth = props.toMonth;\n var fromDate = props.fromDate, toDate = props.toDate;\n if (fromMonth) {\n fromDate = startOfMonth(fromMonth);\n }\n else if (fromYear) {\n fromDate = new Date(fromYear, 0, 1);\n }\n if (toMonth) {\n toDate = endOfMonth(toMonth);\n }\n else if (toYear) {\n toDate = new Date(toYear, 11, 31);\n }\n return {\n fromDate: fromDate ? startOfDay(fromDate) : undefined,\n toDate: toDate ? startOfDay(toDate) : undefined\n };\n}\n\n/**\n * The DayPicker context shares the props passed to DayPicker within internal\n * and custom components. It is used to set the default values and perform\n * one-time calculations required to render the days.\n *\n * Access to this context from the {@link useDayPicker} hook.\n */\nvar DayPickerContext = createContext(undefined);\n/**\n * The provider for the {@link DayPickerContext}, assigning the defaults from the\n * initial DayPicker props.\n */\nfunction DayPickerProvider(props) {\n var _a;\n var initialProps = props.initialProps;\n var defaultContextValues = getDefaultContextValues();\n var _b = parseFromToProps(initialProps), fromDate = _b.fromDate, toDate = _b.toDate;\n var captionLayout = (_a = initialProps.captionLayout) !== null && _a !== void 0 ? _a : defaultContextValues.captionLayout;\n if (captionLayout !== 'buttons' && (!fromDate || !toDate)) {\n // When no from/to dates are set, the caption is always buttons\n captionLayout = 'buttons';\n }\n var onSelect;\n if (isDayPickerSingle(initialProps) ||\n isDayPickerMultiple(initialProps) ||\n isDayPickerRange(initialProps)) {\n onSelect = initialProps.onSelect;\n }\n var value = __assign(__assign(__assign({}, defaultContextValues), initialProps), { captionLayout: captionLayout, classNames: __assign(__assign({}, defaultContextValues.classNames), initialProps.classNames), components: __assign({}, initialProps.components), formatters: __assign(__assign({}, defaultContextValues.formatters), initialProps.formatters), fromDate: fromDate, labels: __assign(__assign({}, defaultContextValues.labels), initialProps.labels), mode: initialProps.mode || defaultContextValues.mode, modifiers: __assign(__assign({}, defaultContextValues.modifiers), initialProps.modifiers), modifiersClassNames: __assign(__assign({}, defaultContextValues.modifiersClassNames), initialProps.modifiersClassNames), onSelect: onSelect, styles: __assign(__assign({}, defaultContextValues.styles), initialProps.styles), toDate: toDate });\n return (React__default.createElement(DayPickerContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link DayPickerContextValue}.\n *\n * Use the DayPicker context to access to the props passed to DayPicker inside\n * internal or custom components.\n */\nfunction useDayPicker() {\n var context = useContext(DayPickerContext);\n if (!context) {\n throw new Error(\"useDayPicker must be used within a DayPickerProvider.\");\n }\n return context;\n}\n\n/** Render the caption for the displayed month. This component is used when `captionLayout=\"buttons\"`. */\nfunction CaptionLabel(props) {\n var _a = useDayPicker(), locale = _a.locale, classNames = _a.classNames, styles = _a.styles, formatCaption = _a.formatters.formatCaption;\n return (React__default.createElement(\"div\", { className: classNames.caption_label, style: styles.caption_label, \"aria-live\": \"polite\", role: \"presentation\", id: props.id }, formatCaption(props.displayMonth, { locale: locale })));\n}\n\n/**\n * Render the icon in the styled drop-down.\n */\nfunction IconDropdown(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"8px\", height: \"8px\", viewBox: \"0 0 120 120\", \"data-testid\": \"iconDropdown\" }, props),\n React__default.createElement(\"path\", { d: \"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\n}\n\n/**\n * Render a styled select component – displaying a caption and a custom\n * drop-down icon.\n */\nfunction Dropdown(props) {\n var _a, _b;\n var onChange = props.onChange, value = props.value, children = props.children, caption = props.caption, className = props.className, style = props.style;\n var dayPicker = useDayPicker();\n var IconDropdownComponent = (_b = (_a = dayPicker.components) === null || _a === void 0 ? void 0 : _a.IconDropdown) !== null && _b !== void 0 ? _b : IconDropdown;\n return (React__default.createElement(\"div\", { className: className, style: style },\n React__default.createElement(\"span\", { className: dayPicker.classNames.vhidden }, props['aria-label']),\n React__default.createElement(\"select\", { name: props.name, \"aria-label\": props['aria-label'], className: dayPicker.classNames.dropdown, style: dayPicker.styles.dropdown, value: value, onChange: onChange }, children),\n React__default.createElement(\"div\", { className: dayPicker.classNames.caption_label, style: dayPicker.styles.caption_label, \"aria-hidden\": \"true\" },\n caption,\n React__default.createElement(IconDropdownComponent, { className: dayPicker.classNames.dropdown_icon, style: dayPicker.styles.dropdown_icon }))));\n}\n\n/** Render the dropdown to navigate between months. */\nfunction MonthsDropdown(props) {\n var _a;\n var _b = useDayPicker(), fromDate = _b.fromDate, toDate = _b.toDate, styles = _b.styles, locale = _b.locale, formatMonthCaption = _b.formatters.formatMonthCaption, classNames = _b.classNames, components = _b.components, labelMonthDropdown = _b.labels.labelMonthDropdown;\n // Dropdown should appear only when both from/toDate is set\n if (!fromDate)\n return React__default.createElement(React__default.Fragment, null);\n if (!toDate)\n return React__default.createElement(React__default.Fragment, null);\n var dropdownMonths = [];\n if (isSameYear(fromDate, toDate)) {\n // only display the months included in the range\n var date = startOfMonth(fromDate);\n for (var month = fromDate.getMonth(); month <= toDate.getMonth(); month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n else {\n // display all the 12 months\n var date = startOfMonth(new Date()); // Any date should be OK, as we just need the year\n for (var month = 0; month <= 11; month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n var handleChange = function (e) {\n var selectedMonth = Number(e.target.value);\n var newMonth = setMonth(startOfMonth(props.displayMonth), selectedMonth);\n props.onChange(newMonth);\n };\n var DropdownComponent = (_a = components === null || components === void 0 ? void 0 : components.Dropdown) !== null && _a !== void 0 ? _a : Dropdown;\n return (React__default.createElement(DropdownComponent, { name: \"months\", \"aria-label\": labelMonthDropdown(), className: classNames.dropdown_month, style: styles.dropdown_month, onChange: handleChange, value: props.displayMonth.getMonth(), caption: formatMonthCaption(props.displayMonth, { locale: locale }) }, dropdownMonths.map(function (m) { return (React__default.createElement(\"option\", { key: m.getMonth(), value: m.getMonth() }, formatMonthCaption(m, { locale: locale }))); })));\n}\n\n/**\n * Render a dropdown to change the year. Take in account the `nav.fromDate` and\n * `toDate` from context.\n */\nfunction YearsDropdown(props) {\n var _a;\n var displayMonth = props.displayMonth;\n var _b = useDayPicker(), fromDate = _b.fromDate, toDate = _b.toDate, locale = _b.locale, styles = _b.styles, classNames = _b.classNames, components = _b.components, formatYearCaption = _b.formatters.formatYearCaption, labelYearDropdown = _b.labels.labelYearDropdown;\n var years = [];\n // Dropdown should appear only when both from/toDate is set\n if (!fromDate)\n return React__default.createElement(React__default.Fragment, null);\n if (!toDate)\n return React__default.createElement(React__default.Fragment, null);\n var fromYear = fromDate.getFullYear();\n var toYear = toDate.getFullYear();\n for (var year = fromYear; year <= toYear; year++) {\n years.push(setYear(startOfYear(new Date()), year));\n }\n var handleChange = function (e) {\n var newMonth = setYear(startOfMonth(displayMonth), Number(e.target.value));\n props.onChange(newMonth);\n };\n var DropdownComponent = (_a = components === null || components === void 0 ? void 0 : components.Dropdown) !== null && _a !== void 0 ? _a : Dropdown;\n return (React__default.createElement(DropdownComponent, { name: \"years\", \"aria-label\": labelYearDropdown(), className: classNames.dropdown_year, style: styles.dropdown_year, onChange: handleChange, value: displayMonth.getFullYear(), caption: formatYearCaption(displayMonth, { locale: locale }) }, years.map(function (year) { return (React__default.createElement(\"option\", { key: year.getFullYear(), value: year.getFullYear() }, formatYearCaption(year, { locale: locale }))); })));\n}\n\n/**\n * Helper hook for using controlled/uncontrolled values from a component props.\n *\n * When the value is not controlled, pass `undefined` as `controlledValue` and\n * use the returned setter to update it.\n *\n * When the value is controlled, pass the controlled value as second\n * argument, which will be always returned as `value`.\n */\nfunction useControlledValue(defaultValue, controlledValue) {\n var _a = useState(defaultValue), uncontrolledValue = _a[0], setValue = _a[1];\n var value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n return [value, setValue];\n}\n\n/** Return the initial month according to the given options. */\nfunction getInitialMonth(context) {\n var month = context.month, defaultMonth = context.defaultMonth, today = context.today;\n var initialMonth = month || defaultMonth || today || new Date();\n var toDate = context.toDate, fromDate = context.fromDate, _a = context.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n // Fix the initialMonth if is after the to-date\n if (toDate && differenceInCalendarMonths(toDate, initialMonth) < 0) {\n var offset = -1 * (numberOfMonths - 1);\n initialMonth = addMonths(toDate, offset);\n }\n // Fix the initialMonth if is before the from-date\n if (fromDate && differenceInCalendarMonths(initialMonth, fromDate) < 0) {\n initialMonth = fromDate;\n }\n return startOfMonth(initialMonth);\n}\n\n/** Controls the navigation state. */\nfunction useNavigationState() {\n var context = useDayPicker();\n var initialMonth = getInitialMonth(context);\n var _a = useControlledValue(initialMonth, context.month), month = _a[0], setMonth = _a[1];\n var goToMonth = function (date) {\n var _a;\n if (context.disableNavigation)\n return;\n var month = startOfMonth(date);\n setMonth(month);\n (_a = context.onMonthChange) === null || _a === void 0 ? void 0 : _a.call(context, month);\n };\n return [month, goToMonth];\n}\n\n/**\n * Return the months to display in the component according to the number of\n * months and the from/to date.\n */\nfunction getDisplayMonths(month, _a) {\n var reverseMonths = _a.reverseMonths, numberOfMonths = _a.numberOfMonths;\n var start = startOfMonth(month);\n var end = startOfMonth(addMonths(start, numberOfMonths));\n var monthsDiff = differenceInCalendarMonths(end, start);\n var months = [];\n for (var i = 0; i < monthsDiff; i++) {\n var nextMonth = addMonths(start, i);\n months.push(nextMonth);\n }\n if (reverseMonths)\n months = months.reverse();\n return months;\n}\n\n/**\n * Returns the next month the user can navigate to according to the given\n * options.\n *\n * Please note that the next month is not always the next calendar month:\n *\n * - if after the `toDate` range, is undefined;\n * - if the navigation is paged, is the number of months displayed ahead.\n *\n */\nfunction getNextMonth(startingMonth, options) {\n if (options.disableNavigation) {\n return undefined;\n }\n var toDate = options.toDate, pagedNavigation = options.pagedNavigation, _a = options.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n var offset = pagedNavigation ? numberOfMonths : 1;\n var month = startOfMonth(startingMonth);\n if (!toDate) {\n return addMonths(month, offset);\n }\n var monthsDiff = differenceInCalendarMonths(toDate, startingMonth);\n if (monthsDiff < numberOfMonths) {\n return undefined;\n }\n // Jump forward as the number of months when paged navigation\n return addMonths(month, offset);\n}\n\n/**\n * Returns the next previous the user can navigate to, according to the given\n * options.\n *\n * Please note that the previous month is not always the previous calendar\n * month:\n *\n * - if before the `fromDate` date, is `undefined`;\n * - if the navigation is paged, is the number of months displayed before.\n *\n */\nfunction getPreviousMonth(startingMonth, options) {\n if (options.disableNavigation) {\n return undefined;\n }\n var fromDate = options.fromDate, pagedNavigation = options.pagedNavigation, _a = options.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n var offset = pagedNavigation ? numberOfMonths : 1;\n var month = startOfMonth(startingMonth);\n if (!fromDate) {\n return addMonths(month, -offset);\n }\n var monthsDiff = differenceInCalendarMonths(month, fromDate);\n if (monthsDiff <= 0) {\n return undefined;\n }\n // Jump back as the number of months when paged navigation\n return addMonths(month, -offset);\n}\n\n/**\n * The Navigation context shares details and methods to navigate the months in DayPicker.\n * Access this context from the {@link useNavigation} hook.\n */\nvar NavigationContext = createContext(undefined);\n/** Provides the values for the {@link NavigationContext}. */\nfunction NavigationProvider(props) {\n var dayPicker = useDayPicker();\n var _a = useNavigationState(), currentMonth = _a[0], goToMonth = _a[1];\n var displayMonths = getDisplayMonths(currentMonth, dayPicker);\n var nextMonth = getNextMonth(currentMonth, dayPicker);\n var previousMonth = getPreviousMonth(currentMonth, dayPicker);\n var isDateDisplayed = function (date) {\n return displayMonths.some(function (displayMonth) {\n return isSameMonth(date, displayMonth);\n });\n };\n var goToDate = function (date, refDate) {\n if (isDateDisplayed(date)) {\n return;\n }\n if (refDate && isBefore(date, refDate)) {\n goToMonth(addMonths(date, 1 + dayPicker.numberOfMonths * -1));\n }\n else {\n goToMonth(date);\n }\n };\n var value = {\n currentMonth: currentMonth,\n displayMonths: displayMonths,\n goToMonth: goToMonth,\n goToDate: goToDate,\n previousMonth: previousMonth,\n nextMonth: nextMonth,\n isDateDisplayed: isDateDisplayed\n };\n return (React__default.createElement(NavigationContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link NavigationContextValue}. Use this hook to navigate\n * between months or years in DayPicker.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useNavigation() {\n var context = useContext(NavigationContext);\n if (!context) {\n throw new Error('useNavigation must be used within a NavigationProvider');\n }\n return context;\n}\n\n/**\n * Render a caption with the dropdowns to navigate between months and years.\n */\nfunction CaptionDropdowns(props) {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, styles = _b.styles, components = _b.components;\n var goToMonth = useNavigation().goToMonth;\n var handleMonthChange = function (newMonth) {\n goToMonth(newMonth);\n };\n var CaptionLabelComponent = (_a = components === null || components === void 0 ? void 0 : components.CaptionLabel) !== null && _a !== void 0 ? _a : CaptionLabel;\n var captionLabel = (React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }));\n return (React__default.createElement(\"div\", { className: classNames.caption_dropdowns, style: styles.caption_dropdowns },\n React__default.createElement(\"div\", { className: classNames.vhidden }, captionLabel),\n React__default.createElement(MonthsDropdown, { onChange: handleMonthChange, displayMonth: props.displayMonth }),\n React__default.createElement(YearsDropdown, { onChange: handleMonthChange, displayMonth: props.displayMonth })));\n}\n\n/**\n * Render the \"previous month\" button in the navigation.\n */\nfunction IconLeft(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"16px\", height: \"16px\", viewBox: \"0 0 120 120\" }, props),\n React__default.createElement(\"path\", { d: \"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\n}\n\n/**\n * Render the \"next month\" button in the navigation.\n */\nfunction IconRight(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"16px\", height: \"16px\", viewBox: \"0 0 120 120\" }, props),\n React__default.createElement(\"path\", { d: \"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z\", fill: \"currentColor\" })));\n}\n\n/** Render a button HTML element applying the reset class name. */\nvar Button = forwardRef(function (props, ref) {\n var _a = useDayPicker(), classNames = _a.classNames, styles = _a.styles;\n var classNamesArr = [classNames.button_reset, classNames.button];\n if (props.className) {\n classNamesArr.push(props.className);\n }\n var className = classNamesArr.join(' ');\n var style = __assign(__assign({}, styles.button_reset), styles.button);\n if (props.style) {\n Object.assign(style, props.style);\n }\n return (React__default.createElement(\"button\", __assign({}, props, { ref: ref, type: \"button\", className: className, style: style })));\n});\n\n/** A component rendering the navigation buttons or the drop-downs. */\nfunction Navigation(props) {\n var _a, _b;\n var _c = useDayPicker(), dir = _c.dir, locale = _c.locale, classNames = _c.classNames, styles = _c.styles, _d = _c.labels, labelPrevious = _d.labelPrevious, labelNext = _d.labelNext, components = _c.components;\n if (!props.nextMonth && !props.previousMonth) {\n return React__default.createElement(React__default.Fragment, null);\n }\n var previousLabel = labelPrevious(props.previousMonth, { locale: locale });\n var previousClassName = [\n classNames.nav_button,\n classNames.nav_button_previous\n ].join(' ');\n var nextLabel = labelNext(props.nextMonth, { locale: locale });\n var nextClassName = [\n classNames.nav_button,\n classNames.nav_button_next\n ].join(' ');\n var IconRightComponent = (_a = components === null || components === void 0 ? void 0 : components.IconRight) !== null && _a !== void 0 ? _a : IconRight;\n var IconLeftComponent = (_b = components === null || components === void 0 ? void 0 : components.IconLeft) !== null && _b !== void 0 ? _b : IconLeft;\n return (React__default.createElement(\"div\", { className: classNames.nav, style: styles.nav },\n !props.hidePrevious && (React__default.createElement(Button, { name: \"previous-month\", \"aria-label\": previousLabel, className: previousClassName, style: styles.nav_button_previous, disabled: !props.previousMonth, onClick: props.onPreviousClick }, dir === 'rtl' ? (React__default.createElement(IconRightComponent, { className: classNames.nav_icon, style: styles.nav_icon })) : (React__default.createElement(IconLeftComponent, { className: classNames.nav_icon, style: styles.nav_icon })))),\n !props.hideNext && (React__default.createElement(Button, { name: \"next-month\", \"aria-label\": nextLabel, className: nextClassName, style: styles.nav_button_next, disabled: !props.nextMonth, onClick: props.onNextClick }, dir === 'rtl' ? (React__default.createElement(IconLeftComponent, { className: classNames.nav_icon, style: styles.nav_icon })) : (React__default.createElement(IconRightComponent, { className: classNames.nav_icon, style: styles.nav_icon }))))));\n}\n\n/**\n * Render a caption with a button-based navigation.\n */\nfunction CaptionNavigation(props) {\n var numberOfMonths = useDayPicker().numberOfMonths;\n var _a = useNavigation(), previousMonth = _a.previousMonth, nextMonth = _a.nextMonth, goToMonth = _a.goToMonth, displayMonths = _a.displayMonths;\n var displayIndex = displayMonths.findIndex(function (month) {\n return isSameMonth(props.displayMonth, month);\n });\n var isFirst = displayIndex === 0;\n var isLast = displayIndex === displayMonths.length - 1;\n var hideNext = numberOfMonths > 1 && (isFirst || !isLast);\n var hidePrevious = numberOfMonths > 1 && (isLast || !isFirst);\n var handlePreviousClick = function () {\n if (!previousMonth)\n return;\n goToMonth(previousMonth);\n };\n var handleNextClick = function () {\n if (!nextMonth)\n return;\n goToMonth(nextMonth);\n };\n return (React__default.createElement(Navigation, { displayMonth: props.displayMonth, hideNext: hideNext, hidePrevious: hidePrevious, nextMonth: nextMonth, previousMonth: previousMonth, onPreviousClick: handlePreviousClick, onNextClick: handleNextClick }));\n}\n\n/**\n * Render the caption of a month. The caption has a different layout when\n * setting the {@link DayPickerBase.captionLayout} prop.\n */\nfunction Caption(props) {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, disableNavigation = _b.disableNavigation, styles = _b.styles, captionLayout = _b.captionLayout, components = _b.components;\n var CaptionLabelComponent = (_a = components === null || components === void 0 ? void 0 : components.CaptionLabel) !== null && _a !== void 0 ? _a : CaptionLabel;\n var caption;\n if (disableNavigation) {\n caption = (React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }));\n }\n else if (captionLayout === 'dropdown') {\n caption = (React__default.createElement(CaptionDropdowns, { displayMonth: props.displayMonth, id: props.id }));\n }\n else if (captionLayout === 'dropdown-buttons') {\n caption = (React__default.createElement(React__default.Fragment, null,\n React__default.createElement(CaptionDropdowns, { displayMonth: props.displayMonth, id: props.id }),\n React__default.createElement(CaptionNavigation, { displayMonth: props.displayMonth, id: props.id })));\n }\n else {\n caption = (React__default.createElement(React__default.Fragment, null,\n React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }),\n React__default.createElement(CaptionNavigation, { displayMonth: props.displayMonth, id: props.id })));\n }\n return (React__default.createElement(\"div\", { className: classNames.caption, style: styles.caption }, caption));\n}\n\n/** Render the Footer component (empty as default).*/\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction Footer(props) {\n var _a = useDayPicker(), footer = _a.footer, styles = _a.styles, tfoot = _a.classNames.tfoot;\n if (!footer)\n return React__default.createElement(React__default.Fragment, null);\n return (React__default.createElement(\"tfoot\", { className: tfoot, style: styles.tfoot },\n React__default.createElement(\"tr\", null,\n React__default.createElement(\"td\", { colSpan: 8 }, footer))));\n}\n\n/**\n * Generate a series of 7 days, starting from the week, to use for formatting\n * the weekday names (Monday, Tuesday, etc.).\n */\nfunction getWeekdays(locale, \n/** The index of the first day of the week (0 - Sunday). */\nweekStartsOn, \n/** Use ISOWeek instead of locale/ */\nISOWeek) {\n var start = ISOWeek\n ? startOfISOWeek(new Date())\n : startOfWeek(new Date(), { locale: locale, weekStartsOn: weekStartsOn });\n var days = [];\n for (var i = 0; i < 7; i++) {\n var day = addDays(start, i);\n days.push(day);\n }\n return days;\n}\n\n/**\n * Render the HeadRow component - i.e. the table head row with the weekday names.\n */\nfunction HeadRow() {\n var _a = useDayPicker(), classNames = _a.classNames, styles = _a.styles, showWeekNumber = _a.showWeekNumber, locale = _a.locale, weekStartsOn = _a.weekStartsOn, ISOWeek = _a.ISOWeek, formatWeekdayName = _a.formatters.formatWeekdayName, labelWeekday = _a.labels.labelWeekday;\n var weekdays = getWeekdays(locale, weekStartsOn, ISOWeek);\n return (React__default.createElement(\"tr\", { style: styles.head_row, className: classNames.head_row },\n showWeekNumber && (React__default.createElement(\"td\", { style: styles.head_cell, className: classNames.head_cell })),\n weekdays.map(function (weekday, i) { return (React__default.createElement(\"th\", { key: i, scope: \"col\", className: classNames.head_cell, style: styles.head_cell, \"aria-label\": labelWeekday(weekday, { locale: locale }) }, formatWeekdayName(weekday, { locale: locale }))); })));\n}\n\n/** Render the table head. */\nfunction Head() {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, styles = _b.styles, components = _b.components;\n var HeadRowComponent = (_a = components === null || components === void 0 ? void 0 : components.HeadRow) !== null && _a !== void 0 ? _a : HeadRow;\n return (React__default.createElement(\"thead\", { style: styles.head, className: classNames.head },\n React__default.createElement(HeadRowComponent, null)));\n}\n\n/** Render the content of the day cell. */\nfunction DayContent(props) {\n var _a = useDayPicker(), locale = _a.locale, formatDay = _a.formatters.formatDay;\n return React__default.createElement(React__default.Fragment, null, formatDay(props.date, { locale: locale }));\n}\n\n/**\n * The SelectMultiple context shares details about the selected days when in\n * multiple selection mode.\n *\n * Access this context from the {@link useSelectMultiple} hook.\n */\nvar SelectMultipleContext = createContext(undefined);\n/** Provides the values for the {@link SelectMultipleContext}. */\nfunction SelectMultipleProvider(props) {\n if (!isDayPickerMultiple(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined,\n modifiers: {\n disabled: []\n }\n };\n return (React__default.createElement(SelectMultipleContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectMultipleProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectMultipleProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var selected = initialProps.selected, min = initialProps.min, max = initialProps.max;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n var isMinSelected = Boolean(activeModifiers.selected && min && (selected === null || selected === void 0 ? void 0 : selected.length) === min);\n if (isMinSelected) {\n return;\n }\n var isMaxSelected = Boolean(!activeModifiers.selected && max && (selected === null || selected === void 0 ? void 0 : selected.length) === max);\n if (isMaxSelected) {\n return;\n }\n var selectedDays = selected ? __spreadArray([], selected, true) : [];\n if (activeModifiers.selected) {\n var index = selectedDays.findIndex(function (selectedDay) {\n return isSameDay(day, selectedDay);\n });\n selectedDays.splice(index, 1);\n }\n else {\n selectedDays.push(day);\n }\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, selectedDays, day, activeModifiers, e);\n };\n var modifiers = {\n disabled: []\n };\n if (selected) {\n modifiers.disabled.push(function (day) {\n var isMaxSelected = max && selected.length > max - 1;\n var isSelected = selected.some(function (selectedDay) {\n return isSameDay(selectedDay, day);\n });\n return Boolean(isMaxSelected && !isSelected);\n });\n }\n var contextValue = {\n selected: selected,\n onDayClick: onDayClick,\n modifiers: modifiers\n };\n return (React__default.createElement(SelectMultipleContext.Provider, { value: contextValue }, children));\n}\n/**\n * Hook to access the {@link SelectMultipleContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectMultiple() {\n var context = useContext(SelectMultipleContext);\n if (!context) {\n throw new Error('useSelectMultiple must be used within a SelectMultipleProvider');\n }\n return context;\n}\n\n/**\n * Add a day to an existing range.\n *\n * The returned range takes in account the `undefined` values and if the added\n * day is already present in the range.\n */\nfunction addToRange(day, range) {\n var _a = range || {}, from = _a.from, to = _a.to;\n if (!from) {\n return { from: day, to: undefined };\n }\n if (!to && isSameDay(from, day)) {\n return { from: from, to: day };\n }\n if (!to && isBefore(day, from)) {\n return { from: day, to: from };\n }\n if (!to) {\n return { from: from, to: day };\n }\n if (isSameDay(to, day) && isSameDay(from, day)) {\n return undefined;\n }\n if (isSameDay(to, day)) {\n return { from: to, to: undefined };\n }\n if (isSameDay(from, day)) {\n return undefined;\n }\n if (isAfter(from, day)) {\n return { from: day, to: to };\n }\n return { from: from, to: day };\n}\n\n/**\n * The SelectRange context shares details about the selected days when in\n * range selection mode.\n *\n * Access this context from the {@link useSelectRange} hook.\n */\nvar SelectRangeContext = createContext(undefined);\n/** Provides the values for the {@link SelectRangeProvider}. */\nfunction SelectRangeProvider(props) {\n if (!isDayPickerRange(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined,\n modifiers: {\n range_start: [],\n range_end: [],\n range_middle: [],\n disabled: []\n }\n };\n return (React__default.createElement(SelectRangeContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectRangeProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectRangeProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var selected = initialProps.selected;\n var _b = selected || {}, selectedFrom = _b.from, selectedTo = _b.to;\n var min = initialProps.min;\n var max = initialProps.max;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n var newRange = addToRange(day, selected);\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, newRange, day, activeModifiers, e);\n };\n var modifiers = {\n range_start: [],\n range_end: [],\n range_middle: [],\n disabled: []\n };\n if (selectedFrom) {\n modifiers.range_start = [selectedFrom];\n if (!selectedTo) {\n modifiers.range_end = [selectedFrom];\n }\n else {\n modifiers.range_end = [selectedTo];\n if (!isSameDay(selectedFrom, selectedTo)) {\n modifiers.range_middle = [\n {\n after: selectedFrom,\n before: selectedTo\n }\n ];\n }\n }\n }\n if (min) {\n if (selectedFrom && !selectedTo) {\n modifiers.disabled.push({\n after: subDays(selectedFrom, min - 1),\n before: addDays(selectedFrom, min - 1)\n });\n }\n if (selectedFrom && selectedTo) {\n modifiers.disabled.push({\n after: selectedFrom,\n before: addDays(selectedFrom, min - 1)\n });\n }\n }\n if (max) {\n if (selectedFrom && !selectedTo) {\n modifiers.disabled.push({\n before: addDays(selectedFrom, -max + 1)\n });\n modifiers.disabled.push({\n after: addDays(selectedFrom, max - 1)\n });\n }\n if (selectedFrom && selectedTo) {\n var selectedCount = differenceInCalendarDays(selectedTo, selectedFrom) + 1;\n var offset = max - selectedCount;\n modifiers.disabled.push({\n before: subDays(selectedFrom, offset)\n });\n modifiers.disabled.push({\n after: addDays(selectedTo, offset)\n });\n }\n }\n return (React__default.createElement(SelectRangeContext.Provider, { value: { selected: selected, onDayClick: onDayClick, modifiers: modifiers } }, children));\n}\n/**\n * Hook to access the {@link SelectRangeContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectRange() {\n var context = useContext(SelectRangeContext);\n if (!context) {\n throw new Error('useSelectRange must be used within a SelectRangeProvider');\n }\n return context;\n}\n\n/** Normalize to array a matcher input. */\nfunction matcherToArray(matcher) {\n if (Array.isArray(matcher)) {\n return __spreadArray([], matcher, true);\n }\n else if (matcher !== undefined) {\n return [matcher];\n }\n else {\n return [];\n }\n}\n\n/** Create CustomModifiers from dayModifiers */\nfunction getCustomModifiers(dayModifiers) {\n var customModifiers = {};\n Object.entries(dayModifiers).forEach(function (_a) {\n var modifier = _a[0], matcher = _a[1];\n customModifiers[modifier] = matcherToArray(matcher);\n });\n return customModifiers;\n}\n\n/** The name of the modifiers that are used internally by DayPicker. */\nvar InternalModifier;\n(function (InternalModifier) {\n InternalModifier[\"Outside\"] = \"outside\";\n /** Name of the modifier applied to the disabled days, using the `disabled` prop. */\n InternalModifier[\"Disabled\"] = \"disabled\";\n /** Name of the modifier applied to the selected days using the `selected` prop). */\n InternalModifier[\"Selected\"] = \"selected\";\n /** Name of the modifier applied to the hidden days using the `hidden` prop). */\n InternalModifier[\"Hidden\"] = \"hidden\";\n /** Name of the modifier applied to the day specified using the `today` prop). */\n InternalModifier[\"Today\"] = \"today\";\n /** The modifier applied to the day starting a selected range, when in range selection mode. */\n InternalModifier[\"RangeStart\"] = \"range_start\";\n /** The modifier applied to the day ending a selected range, when in range selection mode. */\n InternalModifier[\"RangeEnd\"] = \"range_end\";\n /** The modifier applied to the days between the start and the end of a selected range, when in range selection mode. */\n InternalModifier[\"RangeMiddle\"] = \"range_middle\";\n})(InternalModifier || (InternalModifier = {}));\n\nvar Selected = InternalModifier.Selected, Disabled = InternalModifier.Disabled, Hidden = InternalModifier.Hidden, Today = InternalModifier.Today, RangeEnd = InternalModifier.RangeEnd, RangeMiddle = InternalModifier.RangeMiddle, RangeStart = InternalModifier.RangeStart, Outside = InternalModifier.Outside;\n/** Return the {@link InternalModifiers} from the DayPicker and select contexts. */\nfunction getInternalModifiers(dayPicker, selectMultiple, selectRange) {\n var _a;\n var internalModifiers = (_a = {},\n _a[Selected] = matcherToArray(dayPicker.selected),\n _a[Disabled] = matcherToArray(dayPicker.disabled),\n _a[Hidden] = matcherToArray(dayPicker.hidden),\n _a[Today] = [dayPicker.today],\n _a[RangeEnd] = [],\n _a[RangeMiddle] = [],\n _a[RangeStart] = [],\n _a[Outside] = [],\n _a);\n if (dayPicker.fromDate) {\n internalModifiers[Disabled].push({ before: dayPicker.fromDate });\n }\n if (dayPicker.toDate) {\n internalModifiers[Disabled].push({ after: dayPicker.toDate });\n }\n if (isDayPickerMultiple(dayPicker)) {\n internalModifiers[Disabled] = internalModifiers[Disabled].concat(selectMultiple.modifiers[Disabled]);\n }\n else if (isDayPickerRange(dayPicker)) {\n internalModifiers[Disabled] = internalModifiers[Disabled].concat(selectRange.modifiers[Disabled]);\n internalModifiers[RangeStart] = selectRange.modifiers[RangeStart];\n internalModifiers[RangeMiddle] = selectRange.modifiers[RangeMiddle];\n internalModifiers[RangeEnd] = selectRange.modifiers[RangeEnd];\n }\n return internalModifiers;\n}\n\n/** The Modifiers context store the modifiers used in DayPicker. To access the value of this context, use {@link useModifiers}. */\nvar ModifiersContext = createContext(undefined);\n/** Provide the value for the {@link ModifiersContext}. */\nfunction ModifiersProvider(props) {\n var dayPicker = useDayPicker();\n var selectMultiple = useSelectMultiple();\n var selectRange = useSelectRange();\n var internalModifiers = getInternalModifiers(dayPicker, selectMultiple, selectRange);\n var customModifiers = getCustomModifiers(dayPicker.modifiers);\n var modifiers = __assign(__assign({}, internalModifiers), customModifiers);\n return (React__default.createElement(ModifiersContext.Provider, { value: modifiers }, props.children));\n}\n/**\n * Return the modifiers used by DayPicker.\n *\n * This hook is meant to be used inside internal or custom components.\n * Requires to be wrapped into {@link ModifiersProvider}.\n *\n */\nfunction useModifiers() {\n var context = useContext(ModifiersContext);\n if (!context) {\n throw new Error('useModifiers must be used within a ModifiersProvider');\n }\n return context;\n}\n\n/** Returns true if `matcher` is of type {@link DateInterval}. */\nfunction isDateInterval(matcher) {\n return Boolean(matcher &&\n typeof matcher === 'object' &&\n 'before' in matcher &&\n 'after' in matcher);\n}\n/** Returns true if `value` is a {@link DateRange} type. */\nfunction isDateRange(value) {\n return Boolean(value && typeof value === 'object' && 'from' in value);\n}\n/** Returns true if `value` is of type {@link DateAfter}. */\nfunction isDateAfterType(value) {\n return Boolean(value && typeof value === 'object' && 'after' in value);\n}\n/** Returns true if `value` is of type {@link DateBefore}. */\nfunction isDateBeforeType(value) {\n return Boolean(value && typeof value === 'object' && 'before' in value);\n}\n/** Returns true if `value` is a {@link DayOfWeek} type. */\nfunction isDayOfWeekType(value) {\n return Boolean(value && typeof value === 'object' && 'dayOfWeek' in value);\n}\n\n/** Return `true` whether `date` is inside `range`. */\nfunction isDateInRange(date, range) {\n var _a;\n var from = range.from, to = range.to;\n if (!from) {\n return false;\n }\n if (!to && isSameDay(from, date)) {\n return true;\n }\n if (!to) {\n return false;\n }\n var isRangeInverted = differenceInCalendarDays(to, from) < 0;\n if (isRangeInverted) {\n _a = [to, from], from = _a[0], to = _a[1];\n }\n var isInRange = differenceInCalendarDays(date, from) >= 0 &&\n differenceInCalendarDays(to, date) >= 0;\n return isInRange;\n}\n\n/** Returns true if `value` is a Date type. */\nfunction isDateType(value) {\n return isDate(value);\n}\n/** Returns true if `value` is an array of valid dates. */\nfunction isArrayOfDates(value) {\n return Array.isArray(value) && value.every(isDate);\n}\n/**\n * Returns whether a day matches against at least one of the given Matchers.\n *\n * ```\n * const day = new Date(2022, 5, 19);\n * const matcher1: DateRange = {\n * from: new Date(2021, 12, 21),\n * to: new Date(2021, 12, 30)\n * }\n * const matcher2: DateRange = {\n * from: new Date(2022, 5, 1),\n * to: new Date(2022, 5, 23)\n * }\n *\n * const isMatch(day, [matcher1, matcher2]); // true, since day is in the matcher1 range.\n * ```\n * */\nfunction isMatch(day, matchers) {\n return matchers.some(function (matcher) {\n if (typeof matcher === 'boolean') {\n return matcher;\n }\n if (isDateType(matcher)) {\n return isSameDay(day, matcher);\n }\n if (isArrayOfDates(matcher)) {\n return matcher.includes(day);\n }\n if (isDateRange(matcher)) {\n return isDateInRange(day, matcher);\n }\n if (isDayOfWeekType(matcher)) {\n return matcher.dayOfWeek.includes(day.getDay());\n }\n if (isDateInterval(matcher)) {\n var diffBefore = differenceInCalendarDays(matcher.before, day);\n var diffAfter = differenceInCalendarDays(matcher.after, day);\n var isDayBefore = diffBefore > 0;\n var isDayAfter = diffAfter < 0;\n var isClosedInterval = isAfter(matcher.before, matcher.after);\n if (isClosedInterval) {\n return isDayAfter && isDayBefore;\n }\n else {\n return isDayBefore || isDayAfter;\n }\n }\n if (isDateAfterType(matcher)) {\n return differenceInCalendarDays(day, matcher.after) > 0;\n }\n if (isDateBeforeType(matcher)) {\n return differenceInCalendarDays(matcher.before, day) > 0;\n }\n if (typeof matcher === 'function') {\n return matcher(day);\n }\n return false;\n });\n}\n\n/** Return the active modifiers for the given day. */\nfunction getActiveModifiers(day, \n/** The modifiers to match for the given date. */\nmodifiers, \n/** The month where the day is displayed, to add the \"outside\" modifiers. */\ndisplayMonth) {\n var matchedModifiers = Object.keys(modifiers).reduce(function (result, key) {\n var modifier = modifiers[key];\n if (isMatch(day, modifier)) {\n result.push(key);\n }\n return result;\n }, []);\n var activeModifiers = {};\n matchedModifiers.forEach(function (modifier) { return (activeModifiers[modifier] = true); });\n if (displayMonth && !isSameMonth(day, displayMonth)) {\n activeModifiers.outside = true;\n }\n return activeModifiers;\n}\n\n/**\n * Returns the day that should be the target of the focus when DayPicker is\n * rendered the first time.\n *\n * TODO: this function doesn't consider if the day is outside the month. We\n * implemented this check in `useDayRender` but it should probably go here. See\n * https://github.com/gpbl/react-day-picker/pull/1576\n */\nfunction getInitialFocusTarget(displayMonths, modifiers) {\n var firstDayInMonth = startOfMonth(displayMonths[0]);\n var lastDayInMonth = endOfMonth(displayMonths[displayMonths.length - 1]);\n // TODO: cleanup code\n var firstFocusableDay;\n var today;\n var date = firstDayInMonth;\n while (date <= lastDayInMonth) {\n var activeModifiers = getActiveModifiers(date, modifiers);\n var isFocusable = !activeModifiers.disabled && !activeModifiers.hidden;\n if (!isFocusable) {\n date = addDays(date, 1);\n continue;\n }\n if (activeModifiers.selected) {\n return date;\n }\n if (activeModifiers.today && !today) {\n today = date;\n }\n if (!firstFocusableDay) {\n firstFocusableDay = date;\n }\n date = addDays(date, 1);\n }\n if (today) {\n return today;\n }\n else {\n return firstFocusableDay;\n }\n}\n\nvar MAX_RETRY = 365;\n/** Return the next date to be focused. */\nfunction getNextFocus(focusedDay, options) {\n var moveBy = options.moveBy, direction = options.direction, context = options.context, modifiers = options.modifiers, _a = options.retry, retry = _a === void 0 ? { count: 0, lastFocused: focusedDay } : _a;\n var weekStartsOn = context.weekStartsOn, fromDate = context.fromDate, toDate = context.toDate, locale = context.locale;\n var moveFns = {\n day: addDays,\n week: addWeeks,\n month: addMonths,\n year: addYears,\n startOfWeek: function (date) {\n return context.ISOWeek\n ? startOfISOWeek(date)\n : startOfWeek(date, { locale: locale, weekStartsOn: weekStartsOn });\n },\n endOfWeek: function (date) {\n return context.ISOWeek\n ? endOfISOWeek(date)\n : endOfWeek(date, { locale: locale, weekStartsOn: weekStartsOn });\n }\n };\n var newFocusedDay = moveFns[moveBy](focusedDay, direction === 'after' ? 1 : -1);\n if (direction === 'before' && fromDate) {\n newFocusedDay = max([fromDate, newFocusedDay]);\n }\n else if (direction === 'after' && toDate) {\n newFocusedDay = min([toDate, newFocusedDay]);\n }\n var isFocusable = true;\n if (modifiers) {\n var activeModifiers = getActiveModifiers(newFocusedDay, modifiers);\n isFocusable = !activeModifiers.disabled && !activeModifiers.hidden;\n }\n if (isFocusable) {\n return newFocusedDay;\n }\n else {\n if (retry.count > MAX_RETRY) {\n return retry.lastFocused;\n }\n return getNextFocus(newFocusedDay, {\n moveBy: moveBy,\n direction: direction,\n context: context,\n modifiers: modifiers,\n retry: __assign(__assign({}, retry), { count: retry.count + 1 })\n });\n }\n}\n\n/**\n * The Focus context shares details about the focused day for the keyboard\n *\n * Access this context from the {@link useFocusContext} hook.\n */\nvar FocusContext = createContext(undefined);\n/** The provider for the {@link FocusContext}. */\nfunction FocusProvider(props) {\n var navigation = useNavigation();\n var modifiers = useModifiers();\n var _a = useState(), focusedDay = _a[0], setFocusedDay = _a[1];\n var _b = useState(), lastFocused = _b[0], setLastFocused = _b[1];\n var initialFocusTarget = getInitialFocusTarget(navigation.displayMonths, modifiers);\n // TODO: cleanup and test obscure code below\n var focusTarget = (focusedDay !== null && focusedDay !== void 0 ? focusedDay : (lastFocused && navigation.isDateDisplayed(lastFocused)))\n ? lastFocused\n : initialFocusTarget;\n var blur = function () {\n setLastFocused(focusedDay);\n setFocusedDay(undefined);\n };\n var focus = function (date) {\n setFocusedDay(date);\n };\n var context = useDayPicker();\n var moveFocus = function (moveBy, direction) {\n if (!focusedDay)\n return;\n var nextFocused = getNextFocus(focusedDay, {\n moveBy: moveBy,\n direction: direction,\n context: context,\n modifiers: modifiers\n });\n if (isSameDay(focusedDay, nextFocused))\n return undefined;\n navigation.goToDate(nextFocused, focusedDay);\n focus(nextFocused);\n };\n var value = {\n focusedDay: focusedDay,\n focusTarget: focusTarget,\n blur: blur,\n focus: focus,\n focusDayAfter: function () { return moveFocus('day', 'after'); },\n focusDayBefore: function () { return moveFocus('day', 'before'); },\n focusWeekAfter: function () { return moveFocus('week', 'after'); },\n focusWeekBefore: function () { return moveFocus('week', 'before'); },\n focusMonthBefore: function () { return moveFocus('month', 'before'); },\n focusMonthAfter: function () { return moveFocus('month', 'after'); },\n focusYearBefore: function () { return moveFocus('year', 'before'); },\n focusYearAfter: function () { return moveFocus('year', 'after'); },\n focusStartOfWeek: function () { return moveFocus('startOfWeek', 'before'); },\n focusEndOfWeek: function () { return moveFocus('endOfWeek', 'after'); }\n };\n return (React__default.createElement(FocusContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link FocusContextValue}. Use this hook to handle the\n * focus state of the elements.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useFocusContext() {\n var context = useContext(FocusContext);\n if (!context) {\n throw new Error('useFocusContext must be used within a FocusProvider');\n }\n return context;\n}\n\n/**\n * Return the active modifiers for the specified day.\n *\n * This hook is meant to be used inside internal or custom components.\n *\n * @param day\n * @param displayMonth\n */\nfunction useActiveModifiers(day, \n/**\n * The month where the date is displayed. If not the same as `date`, the day\n * is an \"outside day\".\n */\ndisplayMonth) {\n var modifiers = useModifiers();\n var activeModifiers = getActiveModifiers(day, modifiers, displayMonth);\n return activeModifiers;\n}\n\n/**\n * The SelectSingle context shares details about the selected days when in\n * single selection mode.\n *\n * Access this context from the {@link useSelectSingle} hook.\n */\nvar SelectSingleContext = createContext(undefined);\n/** Provides the values for the {@link SelectSingleProvider}. */\nfunction SelectSingleProvider(props) {\n if (!isDayPickerSingle(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined\n };\n return (React__default.createElement(SelectSingleContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectSingleProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectSingleProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b, _c;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n if (activeModifiers.selected && !initialProps.required) {\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, undefined, day, activeModifiers, e);\n return;\n }\n (_c = initialProps.onSelect) === null || _c === void 0 ? void 0 : _c.call(initialProps, day, day, activeModifiers, e);\n };\n var contextValue = {\n selected: initialProps.selected,\n onDayClick: onDayClick\n };\n return (React__default.createElement(SelectSingleContext.Provider, { value: contextValue }, children));\n}\n/**\n * Hook to access the {@link SelectSingleContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectSingle() {\n var context = useContext(SelectSingleContext);\n if (!context) {\n throw new Error('useSelectSingle must be used within a SelectSingleProvider');\n }\n return context;\n}\n\n/**\n * This hook returns details about the content to render in the day cell.\n *\n *\n * When a day cell is rendered in the table, DayPicker can either:\n *\n * - render nothing: when the day is outside the month or has matched the\n * \"hidden\" modifier.\n * - render a button when `onDayClick` or a selection mode is set.\n * - render a non-interactive element: when no selection mode is set, the day\n * cell shouldn’t respond to any interaction. DayPicker should render a `div`\n * or a `span`.\n *\n * ### Usage\n *\n * Use this hook to customize the behavior of the {@link Day} component. Create a\n * new `Day` component using this hook and pass it to the `components` prop.\n * The source of {@link Day} can be a good starting point.\n *\n */\nfunction useDayEventHandlers(date, activeModifiers) {\n var dayPicker = useDayPicker();\n var single = useSelectSingle();\n var multiple = useSelectMultiple();\n var range = useSelectRange();\n var _a = useFocusContext(), focusDayAfter = _a.focusDayAfter, focusDayBefore = _a.focusDayBefore, focusWeekAfter = _a.focusWeekAfter, focusWeekBefore = _a.focusWeekBefore, blur = _a.blur, focus = _a.focus, focusMonthBefore = _a.focusMonthBefore, focusMonthAfter = _a.focusMonthAfter, focusYearBefore = _a.focusYearBefore, focusYearAfter = _a.focusYearAfter, focusStartOfWeek = _a.focusStartOfWeek, focusEndOfWeek = _a.focusEndOfWeek;\n var onClick = function (e) {\n var _a, _b, _c, _d;\n if (isDayPickerSingle(dayPicker)) {\n (_a = single.onDayClick) === null || _a === void 0 ? void 0 : _a.call(single, date, activeModifiers, e);\n }\n else if (isDayPickerMultiple(dayPicker)) {\n (_b = multiple.onDayClick) === null || _b === void 0 ? void 0 : _b.call(multiple, date, activeModifiers, e);\n }\n else if (isDayPickerRange(dayPicker)) {\n (_c = range.onDayClick) === null || _c === void 0 ? void 0 : _c.call(range, date, activeModifiers, e);\n }\n else {\n (_d = dayPicker.onDayClick) === null || _d === void 0 ? void 0 : _d.call(dayPicker, date, activeModifiers, e);\n }\n };\n var onFocus = function (e) {\n var _a;\n focus(date);\n (_a = dayPicker.onDayFocus) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onBlur = function (e) {\n var _a;\n blur();\n (_a = dayPicker.onDayBlur) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onMouseEnter = function (e) {\n var _a;\n (_a = dayPicker.onDayMouseEnter) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onMouseLeave = function (e) {\n var _a;\n (_a = dayPicker.onDayMouseLeave) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onPointerEnter = function (e) {\n var _a;\n (_a = dayPicker.onDayPointerEnter) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onPointerLeave = function (e) {\n var _a;\n (_a = dayPicker.onDayPointerLeave) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchCancel = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchCancel) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchEnd = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchEnd) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchMove = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchMove) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchStart = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchStart) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onKeyUp = function (e) {\n var _a;\n (_a = dayPicker.onDayKeyUp) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onKeyDown = function (e) {\n var _a;\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault();\n e.stopPropagation();\n dayPicker.dir === 'rtl' ? focusDayAfter() : focusDayBefore();\n break;\n case 'ArrowRight':\n e.preventDefault();\n e.stopPropagation();\n dayPicker.dir === 'rtl' ? focusDayBefore() : focusDayAfter();\n break;\n case 'ArrowDown':\n e.preventDefault();\n e.stopPropagation();\n focusWeekAfter();\n break;\n case 'ArrowUp':\n e.preventDefault();\n e.stopPropagation();\n focusWeekBefore();\n break;\n case 'PageUp':\n e.preventDefault();\n e.stopPropagation();\n e.shiftKey ? focusYearBefore() : focusMonthBefore();\n break;\n case 'PageDown':\n e.preventDefault();\n e.stopPropagation();\n e.shiftKey ? focusYearAfter() : focusMonthAfter();\n break;\n case 'Home':\n e.preventDefault();\n e.stopPropagation();\n focusStartOfWeek();\n break;\n case 'End':\n e.preventDefault();\n e.stopPropagation();\n focusEndOfWeek();\n break;\n }\n (_a = dayPicker.onDayKeyDown) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var eventHandlers = {\n onClick: onClick,\n onFocus: onFocus,\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onPointerEnter: onPointerEnter,\n onPointerLeave: onPointerLeave,\n onTouchCancel: onTouchCancel,\n onTouchEnd: onTouchEnd,\n onTouchMove: onTouchMove,\n onTouchStart: onTouchStart\n };\n return eventHandlers;\n}\n\n/**\n * Return the current selected days when DayPicker is in selection mode. Days\n * selected by the custom selection mode are not returned.\n *\n * This hook is meant to be used inside internal or custom components.\n *\n */\nfunction useSelectedDays() {\n var dayPicker = useDayPicker();\n var single = useSelectSingle();\n var multiple = useSelectMultiple();\n var range = useSelectRange();\n var selectedDays = isDayPickerSingle(dayPicker)\n ? single.selected\n : isDayPickerMultiple(dayPicker)\n ? multiple.selected\n : isDayPickerRange(dayPicker)\n ? range.selected\n : undefined;\n return selectedDays;\n}\n\nfunction isInternalModifier(modifier) {\n return Object.values(InternalModifier).includes(modifier);\n}\n/**\n * Return the class names for the Day element, according to the given active\n * modifiers.\n *\n * Custom class names are set via `modifiersClassNames` or `classNames`,\n * where the first have the precedence.\n */\nfunction getDayClassNames(dayPicker, activeModifiers) {\n var classNames = [dayPicker.classNames.day];\n Object.keys(activeModifiers).forEach(function (modifier) {\n var customClassName = dayPicker.modifiersClassNames[modifier];\n if (customClassName) {\n classNames.push(customClassName);\n }\n else if (isInternalModifier(modifier)) {\n var internalClassName = dayPicker.classNames[\"day_\".concat(modifier)];\n if (internalClassName) {\n classNames.push(internalClassName);\n }\n }\n });\n return classNames;\n}\n\n/** Return the style for the Day element, according to the given active modifiers. */\nfunction getDayStyle(dayPicker, activeModifiers) {\n var style = __assign({}, dayPicker.styles.day);\n Object.keys(activeModifiers).forEach(function (modifier) {\n var _a;\n style = __assign(__assign({}, style), (_a = dayPicker.modifiersStyles) === null || _a === void 0 ? void 0 : _a[modifier]);\n });\n return style;\n}\n\n/**\n * Return props and data used to render the {@link Day} component.\n *\n * Use this hook when creating a component to replace the built-in `Day`\n * component.\n */\nfunction useDayRender(\n/** The date to render. */\nday, \n/** The month where the date is displayed (if not the same as `date`, it means it is an \"outside\" day). */\ndisplayMonth, \n/** A ref to the button element that will be target of focus when rendered (if required). */\nbuttonRef) {\n var _a;\n var _b, _c;\n var dayPicker = useDayPicker();\n var focusContext = useFocusContext();\n var activeModifiers = useActiveModifiers(day, displayMonth);\n var eventHandlers = useDayEventHandlers(day, activeModifiers);\n var selectedDays = useSelectedDays();\n var isButton = Boolean(dayPicker.onDayClick || dayPicker.mode !== 'default');\n // Focus the button if the day is focused according to the focus context\n useEffect(function () {\n var _a;\n if (activeModifiers.outside)\n return;\n if (!focusContext.focusedDay)\n return;\n if (!isButton)\n return;\n if (isSameDay(focusContext.focusedDay, day)) {\n (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n }, [\n focusContext.focusedDay,\n day,\n buttonRef,\n isButton,\n activeModifiers.outside\n ]);\n var className = getDayClassNames(dayPicker, activeModifiers).join(' ');\n var style = getDayStyle(dayPicker, activeModifiers);\n var isHidden = Boolean((activeModifiers.outside && !dayPicker.showOutsideDays) ||\n activeModifiers.hidden);\n var DayContentComponent = (_c = (_b = dayPicker.components) === null || _b === void 0 ? void 0 : _b.DayContent) !== null && _c !== void 0 ? _c : DayContent;\n var children = (React__default.createElement(DayContentComponent, { date: day, displayMonth: displayMonth, activeModifiers: activeModifiers }));\n var divProps = {\n style: style,\n className: className,\n children: children,\n role: 'gridcell'\n };\n var isFocusTarget = focusContext.focusTarget &&\n isSameDay(focusContext.focusTarget, day) &&\n !activeModifiers.outside;\n var isFocused = focusContext.focusedDay && isSameDay(focusContext.focusedDay, day);\n var buttonProps = __assign(__assign(__assign({}, divProps), (_a = { disabled: activeModifiers.disabled, role: 'gridcell' }, _a['aria-selected'] = activeModifiers.selected, _a.tabIndex = isFocused || isFocusTarget ? 0 : -1, _a)), eventHandlers);\n var dayRender = {\n isButton: isButton,\n isHidden: isHidden,\n activeModifiers: activeModifiers,\n selectedDays: selectedDays,\n buttonProps: buttonProps,\n divProps: divProps\n };\n return dayRender;\n}\n\n/**\n * The content of a day cell – as a button or span element according to its\n * modifiers.\n */\nfunction Day(props) {\n var buttonRef = useRef(null);\n var dayRender = useDayRender(props.date, props.displayMonth, buttonRef);\n if (dayRender.isHidden) {\n return React__default.createElement(\"div\", { role: \"gridcell\" });\n }\n if (!dayRender.isButton) {\n return React__default.createElement(\"div\", __assign({}, dayRender.divProps));\n }\n return React__default.createElement(Button, __assign({ name: \"day\", ref: buttonRef }, dayRender.buttonProps));\n}\n\n/**\n * Render the week number element. If `onWeekNumberClick` is passed to DayPicker, it\n * renders a button, otherwise a span element.\n */\nfunction WeekNumber(props) {\n var weekNumber = props.number, dates = props.dates;\n var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles = _a.styles, classNames = _a.classNames, locale = _a.locale, labelWeekNumber = _a.labels.labelWeekNumber, formatWeekNumber = _a.formatters.formatWeekNumber;\n var content = formatWeekNumber(Number(weekNumber), { locale: locale });\n if (!onWeekNumberClick) {\n return (React__default.createElement(\"span\", { className: classNames.weeknumber, style: styles.weeknumber }, content));\n }\n var label = labelWeekNumber(Number(weekNumber), { locale: locale });\n var handleClick = function (e) {\n onWeekNumberClick(weekNumber, dates, e);\n };\n return (React__default.createElement(Button, { name: \"week-number\", \"aria-label\": label, className: classNames.weeknumber, style: styles.weeknumber, onClick: handleClick }, content));\n}\n\n/** Render a row in the calendar, with the days and the week number. */\nfunction Row(props) {\n var _a, _b;\n var _c = useDayPicker(), styles = _c.styles, classNames = _c.classNames, showWeekNumber = _c.showWeekNumber, components = _c.components;\n var DayComponent = (_a = components === null || components === void 0 ? void 0 : components.Day) !== null && _a !== void 0 ? _a : Day;\n var WeeknumberComponent = (_b = components === null || components === void 0 ? void 0 : components.WeekNumber) !== null && _b !== void 0 ? _b : WeekNumber;\n var weekNumberCell;\n if (showWeekNumber) {\n weekNumberCell = (React__default.createElement(\"td\", { className: classNames.cell, style: styles.cell },\n React__default.createElement(WeeknumberComponent, { number: props.weekNumber, dates: props.dates })));\n }\n return (React__default.createElement(\"tr\", { className: classNames.row, style: styles.row },\n weekNumberCell,\n props.dates.map(function (date) { return (React__default.createElement(\"td\", { className: classNames.cell, style: styles.cell, key: getUnixTime(date), role: \"presentation\" },\n React__default.createElement(DayComponent, { displayMonth: props.displayMonth, date: date }))); })));\n}\n\n/** Return the weeks between two dates. */\nfunction daysToMonthWeeks(fromDate, toDate, options) {\n var toWeek = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? endOfISOWeek(toDate)\n : endOfWeek(toDate, options);\n var fromWeek = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? startOfISOWeek(fromDate)\n : startOfWeek(fromDate, options);\n var nOfDays = differenceInCalendarDays(toWeek, fromWeek);\n var days = [];\n for (var i = 0; i <= nOfDays; i++) {\n days.push(addDays(fromWeek, i));\n }\n var weeksInMonth = days.reduce(function (result, date) {\n var weekNumber = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? getISOWeek(date)\n : getWeek(date, options);\n var existingWeek = result.find(function (value) { return value.weekNumber === weekNumber; });\n if (existingWeek) {\n existingWeek.dates.push(date);\n return result;\n }\n result.push({\n weekNumber: weekNumber,\n dates: [date]\n });\n return result;\n }, []);\n return weeksInMonth;\n}\n\n/**\n * Return the weeks belonging to the given month, adding the \"outside days\" to\n * the first and last week.\n */\nfunction getMonthWeeks(month, options) {\n var weeksInMonth = daysToMonthWeeks(startOfMonth(month), endOfMonth(month), options);\n if (options === null || options === void 0 ? void 0 : options.useFixedWeeks) {\n // Add extra weeks to the month, up to 6 weeks\n var nrOfMonthWeeks = getWeeksInMonth(month, options);\n if (nrOfMonthWeeks < 6) {\n var lastWeek = weeksInMonth[weeksInMonth.length - 1];\n var lastDate = lastWeek.dates[lastWeek.dates.length - 1];\n var toDate = addWeeks(lastDate, 6 - nrOfMonthWeeks);\n var extraWeeks = daysToMonthWeeks(addWeeks(lastDate, 1), toDate, options);\n weeksInMonth.push.apply(weeksInMonth, extraWeeks);\n }\n }\n return weeksInMonth;\n}\n\n/** Render the table with the calendar. */\nfunction Table(props) {\n var _a, _b, _c;\n var _d = useDayPicker(), locale = _d.locale, classNames = _d.classNames, styles = _d.styles, hideHead = _d.hideHead, fixedWeeks = _d.fixedWeeks, components = _d.components, weekStartsOn = _d.weekStartsOn, firstWeekContainsDate = _d.firstWeekContainsDate, ISOWeek = _d.ISOWeek;\n var weeks = getMonthWeeks(props.displayMonth, {\n useFixedWeeks: Boolean(fixedWeeks),\n ISOWeek: ISOWeek,\n locale: locale,\n weekStartsOn: weekStartsOn,\n firstWeekContainsDate: firstWeekContainsDate\n });\n var HeadComponent = (_a = components === null || components === void 0 ? void 0 : components.Head) !== null && _a !== void 0 ? _a : Head;\n var RowComponent = (_b = components === null || components === void 0 ? void 0 : components.Row) !== null && _b !== void 0 ? _b : Row;\n var FooterComponent = (_c = components === null || components === void 0 ? void 0 : components.Footer) !== null && _c !== void 0 ? _c : Footer;\n return (React__default.createElement(\"table\", { className: classNames.table, style: styles.table, role: \"grid\", \"aria-labelledby\": props['aria-labelledby'] },\n !hideHead && React__default.createElement(HeadComponent, null),\n React__default.createElement(\"tbody\", { className: classNames.tbody, style: styles.tbody, role: \"rowgroup\" }, weeks.map(function (week) { return (React__default.createElement(RowComponent, { displayMonth: props.displayMonth, key: week.weekNumber, dates: week.dates, weekNumber: week.weekNumber })); })),\n React__default.createElement(FooterComponent, { displayMonth: props.displayMonth })));\n}\n\n/*\nThe MIT License (MIT)\n\nCopyright (c) 2018-present, React Training LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\nfunction canUseDOM() {\n return !!(typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement);\n}\n/**\n * React currently throws a warning when using useLayoutEffect on the server. To\n * get around it, we can conditionally useEffect on the server (no-op) and\n * useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also\n * need affected components to render on the server. One example is when setting\n * a component's descendants to retrieve their index values.\n *\n * Important to note that using this hook as an escape hatch will break the\n * eslint dependency warnings unless you rename the import to `useLayoutEffect`.\n * Use sparingly only when the effect won't effect the rendered HTML to avoid\n * any server/client mismatch.\n *\n * If a useLayoutEffect is needed and the result would create a mismatch, it's\n * likely that the component in question shouldn't be rendered on the server at\n * all, so a better approach would be to lazily render those in a parent\n * component after client-side hydration.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n *\n * @param effect\n * @param deps\n */\nvar useIsomorphicLayoutEffect = canUseDOM()\n ? React.useLayoutEffect\n : React.useEffect;\nvar serverHandoffComplete = false;\nvar id = 0;\nfunction genId() {\n return \"react-day-picker-\".concat(++id);\n}\nfunction useId(providedId) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n var _a;\n // If this instance isn't part of the initial render, we don't have to do the\n // double render/patch-up dance. We can just generate the ID and return it.\n var initialId = providedId !== null && providedId !== void 0 ? providedId : (serverHandoffComplete ? genId() : null);\n var _b = React.useState(initialId), id = _b[0], setId = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (id === null) {\n // Patch the ID after render. We do this in `useLayoutEffect` to avoid any\n // rendering flicker, though it'll make the first render slower (unlikely\n // to matter, but you're welcome to measure your app and let us know if\n // it's a problem).\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n if (serverHandoffComplete === false) {\n // Flag all future uses of `useId` to skip the update dance. This is in\n // `useEffect` because it goes after `useLayoutEffect`, ensuring we don't\n // accidentally bail out of the patch-up dance prematurely.\n serverHandoffComplete = true;\n }\n }, []);\n return (_a = providedId !== null && providedId !== void 0 ? providedId : id) !== null && _a !== void 0 ? _a : undefined;\n}\n\n/** Render a month. */\nfunction Month(props) {\n var _a;\n var _b;\n var dayPicker = useDayPicker();\n var dir = dayPicker.dir, classNames = dayPicker.classNames, styles = dayPicker.styles, components = dayPicker.components;\n var displayMonths = useNavigation().displayMonths;\n var captionId = useId(dayPicker.id ? \"\".concat(dayPicker.id, \"-\").concat(props.displayIndex) : undefined);\n var className = [classNames.month];\n var style = styles.month;\n var isStart = props.displayIndex === 0;\n var isEnd = props.displayIndex === displayMonths.length - 1;\n var isCenter = !isStart && !isEnd;\n if (dir === 'rtl') {\n _a = [isStart, isEnd], isEnd = _a[0], isStart = _a[1];\n }\n if (isStart) {\n className.push(classNames.caption_start);\n style = __assign(__assign({}, style), styles.caption_start);\n }\n if (isEnd) {\n className.push(classNames.caption_end);\n style = __assign(__assign({}, style), styles.caption_end);\n }\n if (isCenter) {\n className.push(classNames.caption_between);\n style = __assign(__assign({}, style), styles.caption_between);\n }\n var CaptionComponent = (_b = components === null || components === void 0 ? void 0 : components.Caption) !== null && _b !== void 0 ? _b : Caption;\n return (React__default.createElement(\"div\", { key: props.displayIndex, className: className.join(' '), style: style },\n React__default.createElement(CaptionComponent, { id: captionId, displayMonth: props.displayMonth }),\n React__default.createElement(Table, { \"aria-labelledby\": captionId, displayMonth: props.displayMonth })));\n}\n\n/** Render the container with the months according to the number of months to display. */\nfunction Root(_a) {\n var initialProps = _a.initialProps;\n var dayPicker = useDayPicker();\n var focusContext = useFocusContext();\n var navigation = useNavigation();\n var _b = useState(false), hasInitialFocus = _b[0], setHasInitialFocus = _b[1];\n // Focus the focus target when initialFocus is passed in\n useEffect(function () {\n if (!dayPicker.initialFocus)\n return;\n if (!focusContext.focusTarget)\n return;\n if (hasInitialFocus)\n return;\n focusContext.focus(focusContext.focusTarget);\n setHasInitialFocus(true);\n }, [\n dayPicker.initialFocus,\n hasInitialFocus,\n focusContext.focus,\n focusContext.focusTarget,\n focusContext\n ]);\n // Apply classnames according to props\n var classNames = [dayPicker.classNames.root, dayPicker.className];\n if (dayPicker.numberOfMonths > 1) {\n classNames.push(dayPicker.classNames.multiple_months);\n }\n if (dayPicker.showWeekNumber) {\n classNames.push(dayPicker.classNames.with_weeknumber);\n }\n var style = __assign(__assign({}, dayPicker.styles.root), dayPicker.style);\n var dataAttributes = Object.keys(initialProps)\n .filter(function (key) { return key.startsWith('data-'); })\n .reduce(function (attrs, key) {\n var _a;\n return __assign(__assign({}, attrs), (_a = {}, _a[key] = initialProps[key], _a));\n }, {});\n return (React__default.createElement(\"div\", __assign({ className: classNames.join(' '), style: style, dir: dayPicker.dir, id: dayPicker.id }, dataAttributes),\n React__default.createElement(\"div\", { className: dayPicker.classNames.months, style: dayPicker.styles.months }, navigation.displayMonths.map(function (month, i) { return (React__default.createElement(Month, { key: i, displayIndex: i, displayMonth: month })); }))));\n}\n\n/** Provide the value for all the context providers. */\nfunction RootProvider(props) {\n var children = props.children, initialProps = __rest(props, [\"children\"]);\n return (React__default.createElement(DayPickerProvider, { initialProps: initialProps },\n React__default.createElement(NavigationProvider, null,\n React__default.createElement(SelectSingleProvider, { initialProps: initialProps },\n React__default.createElement(SelectMultipleProvider, { initialProps: initialProps },\n React__default.createElement(SelectRangeProvider, { initialProps: initialProps },\n React__default.createElement(ModifiersProvider, null,\n React__default.createElement(FocusProvider, null, children))))))));\n}\n\n/**\n * DayPicker render a date picker component to let users pick dates from a\n * calendar. See http://react-day-picker.js.org for updated documentation and\n * examples.\n *\n * ### Customization\n *\n * DayPicker offers different customization props. For example,\n *\n * - show multiple months using `numberOfMonths`\n * - display a dropdown to navigate the months via `captionLayout`\n * - display the week numbers with `showWeekNumbers`\n * - disable or hide days with `disabled` or `hidden`\n *\n * ### Controlling the months\n *\n * Change the initially displayed month using the `defaultMonth` prop. The\n * displayed months are controlled by DayPicker and stored in its internal\n * state. To control the months yourself, use `month` instead of `defaultMonth`\n * and use the `onMonthChange` event to set it.\n *\n * To limit the months the user can navigate to, use\n * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.\n *\n * ### Selection modes\n *\n * DayPicker supports different selection mode that can be toggled using the\n * `mode` prop:\n *\n * - `mode=\"single\"`: only one day can be selected. Use `required` to make the\n * selection required. Use the `onSelect` event handler to get the selected\n * days.\n * - `mode=\"multiple\"`: users can select one or more days. Limit the amount of\n * days that can be selected with the `min` or the `max` props.\n * - `mode=\"range\"`: users can select a range of days. Limit the amount of days\n * in the range with the `min` or the `max` props.\n * - `mode=\"default\"` (default): the built-in selections are disabled. Implement\n * your own selection mode with `onDayClick`.\n *\n * The selection modes should cover the most common use cases. In case you\n * need a more refined way of selecting days, use `mode=\"default\"`. Use the\n * `selected` props and add the day event handlers to add/remove days from the\n * selection.\n *\n * ### Modifiers\n *\n * A _modifier_ represents different styles or states for the days displayed in\n * the calendar (like \"selected\" or \"disabled\"). Define custom modifiers using\n * the `modifiers` prop.\n *\n * ### Formatters and custom component\n *\n * You can customize how the content is displayed in the date picker by using\n * either the formatters or replacing the internal components.\n *\n * For the most common cases you want to use the `formatters` prop to change how\n * the content is formatted in the calendar. Use the `components` prop to\n * replace the internal components, like the navigation icons.\n *\n * ### Styling\n *\n * DayPicker comes with a default, basic style in `react-day-picker/style` – use\n * it as template for your own style.\n *\n * If you are using CSS modules, pass the imported styles object the\n * `classNames` props.\n *\n * You can also style the elements via inline styles using the `styles` prop.\n *\n * ### Form fields\n *\n * If you need to bind the date picker to a form field, you can use the\n * `useInput` hooks for a basic behavior. See the `useInput` source as an\n * example to bind the date picker with form fields.\n *\n * ### Localization\n *\n * To localize DayPicker, import the locale from `date-fns` package and use the\n * `locale` prop.\n *\n * For example, to use Spanish locale:\n *\n * ```\n * import { es } from 'date-fns/locale';\n * <DayPicker locale={es} />\n * ```\n */\nfunction DayPicker(props) {\n return (React__default.createElement(RootProvider, __assign({}, props),\n React__default.createElement(Root, { initialProps: props })));\n}\n\n/** @private */\nfunction isValidDate(day) {\n return !isNaN(day.getTime());\n}\n\n/** Return props and setters for binding an input field to DayPicker. */\nfunction useInput(options) {\n if (options === void 0) { options = {}; }\n var _a = options.locale, locale = _a === void 0 ? enUS : _a, required = options.required, _b = options.format, format$1 = _b === void 0 ? 'PP' : _b, defaultSelected = options.defaultSelected, _c = options.today, today = _c === void 0 ? new Date() : _c;\n var _d = parseFromToProps(options), fromDate = _d.fromDate, toDate = _d.toDate;\n // Shortcut to the DateFns functions\n var parseValue = function (value) { return parse(value, format$1, today, { locale: locale }); };\n // Initialize states\n var _e = useState(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : today), month = _e[0], setMonth = _e[1];\n var _f = useState(defaultSelected), selectedDay = _f[0], setSelectedDay = _f[1];\n var defaultInputValue = defaultSelected\n ? format(defaultSelected, format$1, { locale: locale })\n : '';\n var _g = useState(defaultInputValue), inputValue = _g[0], setInputValue = _g[1];\n var reset = function () {\n setSelectedDay(defaultSelected);\n setMonth(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : today);\n setInputValue(defaultInputValue !== null && defaultInputValue !== void 0 ? defaultInputValue : '');\n };\n var setSelected = function (date) {\n setSelectedDay(date);\n setMonth(date !== null && date !== void 0 ? date : today);\n setInputValue(date ? format(date, format$1, { locale: locale }) : '');\n };\n var handleDayClick = function (day, _a) {\n var selected = _a.selected;\n if (!required && selected) {\n setSelectedDay(undefined);\n setInputValue('');\n return;\n }\n setSelectedDay(day);\n setInputValue(day ? format(day, format$1, { locale: locale }) : '');\n };\n var handleMonthChange = function (month) {\n setMonth(month);\n };\n // When changing the input field, save its value in state and check if the\n // string is a valid date. If it is a valid day, set it as selected and update\n // the calendar’s month.\n var handleChange = function (e) {\n setInputValue(e.target.value);\n var day = parseValue(e.target.value);\n var isBefore = fromDate && differenceInCalendarDays(fromDate, day) > 0;\n var isAfter = toDate && differenceInCalendarDays(day, toDate) > 0;\n if (!isValidDate(day) || isBefore || isAfter) {\n setSelectedDay(undefined);\n return;\n }\n setSelectedDay(day);\n setMonth(day);\n };\n // Special case for _required_ fields: on blur, if the value of the input is not\n // a valid date, reset the calendar and the input value.\n var handleBlur = function (e) {\n var day = parseValue(e.target.value);\n if (!isValidDate(day)) {\n reset();\n }\n };\n // When focusing, make sure DayPicker visualizes the month of the date in the\n // input field.\n var handleFocus = function (e) {\n if (!e.target.value) {\n reset();\n return;\n }\n var day = parseValue(e.target.value);\n if (isValidDate(day)) {\n setMonth(day);\n }\n };\n var dayPickerProps = {\n month: month,\n onDayClick: handleDayClick,\n onMonthChange: handleMonthChange,\n selected: selectedDay,\n locale: locale,\n fromDate: fromDate,\n toDate: toDate,\n today: today\n };\n var inputProps = {\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus,\n value: inputValue,\n placeholder: format(new Date(), format$1, { locale: locale })\n };\n return { dayPickerProps: dayPickerProps, inputProps: inputProps, reset: reset, setSelected: setSelected };\n}\n\n/** Returns true when the props are of type {@link DayPickerDefaultProps}. */\nfunction isDayPickerDefault(props) {\n return props.mode === undefined || props.mode === 'default';\n}\n\nexport { Button, Caption, CaptionDropdowns, CaptionLabel, CaptionNavigation, Day, DayContent, DayPicker, DayPickerContext, DayPickerProvider, Dropdown, FocusContext, FocusProvider, Footer, Head, HeadRow, IconDropdown, IconLeft, IconRight, InternalModifier, NavigationContext, NavigationProvider, RootProvider, Row, SelectMultipleContext, SelectMultipleProvider, SelectMultipleProviderInternal, SelectRangeContext, SelectRangeProvider, SelectRangeProviderInternal, SelectSingleContext, SelectSingleProvider, SelectSingleProviderInternal, WeekNumber, addToRange, isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType, isDayPickerDefault, isDayPickerMultiple, isDayPickerRange, isDayPickerSingle, isMatch, useActiveModifiers, useDayPicker, useDayRender, useFocusContext, useInput, useNavigation, useSelectMultiple, useSelectRange, useSelectSingle };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__spreadArray","to","from","pack","ar","l","Array","slice","concat","isDayPickerMultiple","props","mode","isDayPickerRange","isDayPickerSingle","defaultClassNames","root","multiple_months","with_weeknumber","vhidden","button_reset","button","caption","caption_start","caption_end","caption_between","caption_label","caption_dropdowns","dropdown","dropdown_month","dropdown_year","dropdown_icon","months","month","table","tbody","tfoot","head","head_row","head_cell","nav","nav_button","nav_button_previous","nav_button_next","nav_icon","row","weeknumber","cell","day","day_today","day_outside","day_selected","day_disabled","day_hidden","day_range_start","day_range_end","day_range_middle","formatters","freeze","__proto__","formatCaption","options","format","formatDay","formatMonthCaption","formatWeekNumber","weekNumber","formatWeekdayName","weekday","formatYearCaption","year","labels","labelDay","activeModifiers","labelMonthDropdown","labelNext","labelPrevious","labelWeekNumber","labelWeekday","labelYearDropdown","DayPickerContext","createContext","undefined","DayPickerProvider","_a","classNames","locale","today","onSelect","initialProps","defaultContextValues","enUS","Date","captionLayout","modifiersClassNames","modifiers","numberOfMonths","styles","_b","fromYear","toYear","fromMonth","toMonth","fromDate","toDate","startOfMonth","endOfMonth","startOfDay","parseFromToProps","value","components","React__default","createElement","Provider","children","useDayPicker","context","useContext","Error","CaptionLabel","className","style","role","id","displayMonth","IconDropdown","width","height","viewBox","d","fill","fillRule","Dropdown","onChange","dayPicker","IconDropdownComponent","name","MonthsDropdown","Fragment","dropdownMonths","isSameYear","date","getMonth","push","setMonth","DropdownComponent","e","selectedMonth","Number","target","newMonth","map","m","key","YearsDropdown","years","getFullYear","setYear","startOfYear","useNavigationState","initialMonth","defaultMonth","differenceInCalendarMonths","addMonths","getInitialMonth","defaultValue","controlledValue","useState","uncontrolledValue","useControlledValue","disableNavigation","onMonthChange","NavigationContext","NavigationProvider","currentMonth","goToMonth","displayMonths","reverseMonths","start","end","monthsDiff","nextMonth","reverse","getDisplayMonths","startingMonth","pagedNavigation","offset","getNextMonth","previousMonth","getPreviousMonth","isDateDisplayed","some","isSameMonth","goToDate","refDate","isBefore","useNavigation","CaptionDropdowns","handleMonthChange","CaptionLabelComponent","captionLabel","IconLeft","IconRight","Button","forwardRef","ref","classNamesArr","join","type","Navigation","_c","dir","_d","previousLabel","previousClassName","nextLabel","nextClassName","IconRightComponent","IconLeftComponent","hidePrevious","disabled","onClick","onPreviousClick","hideNext","onNextClick","CaptionNavigation","displayIndex","findIndex","isFirst","isLast","Caption","Footer","footer","colSpan","HeadRow","showWeekNumber","weekStartsOn","ISOWeek","weekdays","startOfISOWeek","startOfWeek","days","addDays","getWeekdays","scope","Head","HeadRowComponent","DayContent","SelectMultipleContext","SelectMultipleProvider","emptyContextValue","selected","SelectMultipleProviderInternal","min","max","isMaxSelected","isSelected","selectedDay","isSameDay","Boolean","contextValue","onDayClick","selectedDays","index","splice","useSelectMultiple","addToRange","range","isAfter","InternalModifier","SelectRangeContext","SelectRangeProvider","range_start","range_end","range_middle","SelectRangeProviderInternal","selectedFrom","selectedTo","after","before","subDays","differenceInCalendarDays","newRange","useSelectRange","matcherToArray","matcher","isArray","Selected","Disabled","Hidden","Today","RangeEnd","RangeMiddle","RangeStart","Outside","ModifiersContext","ModifiersProvider","internalModifiers","selectMultiple","selectRange","hidden","getInternalModifiers","customModifiers","dayModifiers","entries","forEach","modifier","getCustomModifiers","useModifiers","isDateInterval","isDateRange","isDateAfterType","isDateBeforeType","isDayOfWeekType","isMatch","matchers","isDate","every","isArrayOfDates","includes","dayOfWeek","getDay","isDayBefore","isDayAfter","getActiveModifiers","matchedModifiers","keys","reduce","result","outside","MAX_RETRY","getNextFocus","focusedDay","moveBy","direction","retry","count","lastFocused","newFocusedDay","week","addWeeks","addYears","endOfWeek","endOfISOWeek","isFocusable","FocusContext","FocusProvider","navigation","setFocusedDay","setLastFocused","initialFocusTarget","firstFocusableDay","firstDayInMonth","lastDayInMonth","getInitialFocusTarget","focusTarget","focus","moveFocus","nextFocused","blur","focusDayAfter","focusDayBefore","focusWeekAfter","focusWeekBefore","focusMonthBefore","focusMonthAfter","focusYearBefore","focusYearAfter","focusStartOfWeek","focusEndOfWeek","useFocusContext","useActiveModifiers","SelectSingleContext","SelectSingleProvider","SelectSingleProviderInternal","required","useSelectSingle","getDayClassNames","customClassName","values","isInternalModifier","internalClassName","useDayRender","buttonRef","focusContext","eventHandlers","single","multiple","onFocus","onDayFocus","onBlur","onDayBlur","onKeyDown","preventDefault","stopPropagation","shiftKey","onDayKeyDown","onKeyUp","onDayKeyUp","onMouseEnter","onDayMouseEnter","onMouseLeave","onDayMouseLeave","onPointerEnter","onDayPointerEnter","onPointerLeave","onDayPointerLeave","onTouchCancel","onDayTouchCancel","onTouchEnd","onDayTouchEnd","onTouchMove","onDayTouchMove","onTouchStart","onDayTouchStart","useDayEventHandlers","useSelectedDays","isButton","useEffect","current","modifiersStyles","getDayStyle","isHidden","showOutsideDays","DayContentComponent","divProps","isFocusTarget","isFocused","buttonProps","tabIndex","Day","useRef","dayRender","WeekNumber","number","dates","onWeekNumberClick","content","label","Row","weekNumberCell","DayComponent","WeeknumberComponent","getUnixTime","daysToMonthWeeks","toWeek","fromWeek","nOfDays","getISOWeek","getWeek","existingWeek","find","Table","hideHead","fixedWeeks","firstWeekContainsDate","weeks","weeksInMonth","useFixedWeeks","nrOfMonthWeeks","getWeeksInMonth","lastWeek","lastDate","extraWeeks","getMonthWeeks","HeadComponent","RowComponent","FooterComponent","useIsomorphicLayoutEffect","window","document","React","useLayoutEffect","serverHandoffComplete","genId","Month","captionId","providedId","initialId","setId","useId","isStart","isEnd","isCenter","CaptionComponent","Root","hasInitialFocus","setHasInitialFocus","initialFocus","dataAttributes","filter","startsWith","attrs","RootProvider","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","DayPicker"],"mappings":"ozDAoBA,IAAIA,EAAW,WAQX,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACf,EACWH,EAASa,MAAMC,KAAMP,UAChC,EAcA,SAASQ,EAAcC,EAAIC,EAAMC,GAC7B,GAAIA,GAA6B,IAArBX,UAAUC,OAAc,IAAK,IAA4BW,EAAxBd,EAAI,EAAGe,EAAIH,EAAKT,OAAYH,EAAIe,EAAGf,KACxEc,GAAQd,KAAKY,IACRE,IAAIA,EAAKE,MAAMX,UAAUY,MAAMV,KAAKK,EAAM,EAAGZ,IAClDc,EAAGd,GAAKY,EAAKZ,IAGrB,OAAOW,EAAGO,OAAOJ,GAAME,MAAMX,UAAUY,MAAMV,KAAKK,GACtD,CAGA,SAASO,EAAoBC,GACzB,MAAsB,aAAfA,EAA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