@payloadcms/ui 4.0.0-internal.c3ac604 → 4.0.0-internal.c6494b5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1752) hide show
  1. package/dist/css/app.css +2 -1
  2. package/dist/css/forms.css +0 -1
  3. package/dist/css/preflight.css +1 -0
  4. package/dist/css/spacing.css +4 -1
  5. package/dist/css/typography.css +161 -55
  6. package/dist/elements/APIKeyInput/index.css +2 -2
  7. package/dist/elements/APIKeyInput/index.d.ts +2 -0
  8. package/dist/elements/APIKeyInput/index.d.ts.map +1 -1
  9. package/dist/elements/APIKeyInput/index.js +27 -29
  10. package/dist/elements/APIKeyInput/index.js.map +1 -1
  11. package/dist/elements/AddNewRelation/index.css +0 -4
  12. package/dist/elements/AddNewRelation/index.d.ts.map +1 -1
  13. package/dist/elements/AddNewRelation/index.js +3 -2
  14. package/dist/elements/AddNewRelation/index.js.map +1 -1
  15. package/dist/elements/AppHeader/index.css +8 -0
  16. package/dist/elements/AppHeader/index.d.ts +1 -8
  17. package/dist/elements/AppHeader/index.d.ts.map +1 -1
  18. package/dist/elements/AppHeader/index.js +14 -19
  19. package/dist/elements/AppHeader/index.js.map +1 -1
  20. package/dist/elements/ArrayAction/index.d.ts +2 -0
  21. package/dist/elements/ArrayAction/index.d.ts.map +1 -1
  22. package/dist/elements/ArrayAction/index.js +51 -35
  23. package/dist/elements/ArrayAction/index.js.map +1 -1
  24. package/dist/elements/Autosave/index.d.ts.map +1 -1
  25. package/dist/elements/Autosave/index.js +12 -6
  26. package/dist/elements/Autosave/index.js.map +1 -1
  27. package/dist/elements/Banner/index.css +7 -4
  28. package/dist/elements/Banner/index.d.ts.map +1 -1
  29. package/dist/elements/Banner/index.js +1 -0
  30. package/dist/elements/Banner/index.js.map +1 -1
  31. package/dist/elements/BulkUpload/ActionsBar/index.css +1 -0
  32. package/dist/elements/BulkUpload/ActionsBar/index.d.ts.map +1 -1
  33. package/dist/elements/BulkUpload/ActionsBar/index.js +12 -10
  34. package/dist/elements/BulkUpload/ActionsBar/index.js.map +1 -1
  35. package/dist/elements/BulkUpload/AddFilesView/index.css +15 -4
  36. package/dist/elements/BulkUpload/AddFilesView/index.d.ts.map +1 -1
  37. package/dist/elements/BulkUpload/AddFilesView/index.js +111 -50
  38. package/dist/elements/BulkUpload/AddFilesView/index.js.map +1 -1
  39. package/dist/elements/BulkUpload/AddingFilesView/index.css +2 -4
  40. package/dist/elements/BulkUpload/AddingFilesView/index.d.ts.map +1 -1
  41. package/dist/elements/BulkUpload/AddingFilesView/index.js +25 -20
  42. package/dist/elements/BulkUpload/AddingFilesView/index.js.map +1 -1
  43. package/dist/elements/BulkUpload/EditMany/index.css +4 -5
  44. package/dist/elements/BulkUpload/FileSidebar/index.css +1 -1
  45. package/dist/elements/BulkUpload/FileSidebar/index.d.ts.map +1 -1
  46. package/dist/elements/BulkUpload/FileSidebar/index.js +29 -36
  47. package/dist/elements/BulkUpload/FileSidebar/index.js.map +1 -1
  48. package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts +1 -1
  49. package/dist/elements/BulkUpload/FormsManager/createFormData.d.ts.map +1 -1
  50. package/dist/elements/BulkUpload/FormsManager/createFormData.js +7 -3
  51. package/dist/elements/BulkUpload/FormsManager/createFormData.js.map +1 -1
  52. package/dist/elements/BulkUpload/FormsManager/index.d.ts +2 -1
  53. package/dist/elements/BulkUpload/FormsManager/index.d.ts.map +1 -1
  54. package/dist/elements/BulkUpload/FormsManager/index.js +191 -70
  55. package/dist/elements/BulkUpload/FormsManager/index.js.map +1 -1
  56. package/dist/elements/BulkUpload/index.css +2 -0
  57. package/dist/elements/BulkUpload/useUploadCollectionOptions.d.ts +6 -0
  58. package/dist/elements/BulkUpload/useUploadCollectionOptions.d.ts.map +1 -0
  59. package/dist/elements/BulkUpload/useUploadCollectionOptions.js +74 -0
  60. package/dist/elements/BulkUpload/useUploadCollectionOptions.js.map +1 -0
  61. package/dist/elements/Button/index.css +33 -3
  62. package/dist/elements/Button/index.d.ts.map +1 -1
  63. package/dist/elements/Button/index.js +13 -0
  64. package/dist/elements/Button/index.js.map +1 -1
  65. package/dist/elements/Button/types.d.ts +8 -3
  66. package/dist/elements/Button/types.d.ts.map +1 -1
  67. package/dist/elements/Button/types.js.map +1 -1
  68. package/dist/elements/Card/index.css +7 -8
  69. package/dist/elements/CardGrid/index.css +20 -0
  70. package/dist/elements/CardGrid/index.d.ts +13 -0
  71. package/dist/elements/CardGrid/index.d.ts.map +1 -0
  72. package/dist/elements/CardGrid/index.js +23 -0
  73. package/dist/elements/CardGrid/index.js.map +1 -0
  74. package/dist/elements/Chip/index.css +0 -1
  75. package/dist/elements/ClipboardAction/index.d.ts.map +1 -1
  76. package/dist/elements/ClipboardAction/index.js +1 -0
  77. package/dist/elements/ClipboardAction/index.js.map +1 -1
  78. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts +10 -0
  79. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.d.ts.map +1 -1
  80. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js +65 -3
  81. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.js.map +1 -1
  82. package/dist/elements/CodeEditor/CodeEditor.d.ts.map +1 -1
  83. package/dist/elements/CodeEditor/CodeEditor.js +5 -0
  84. package/dist/elements/CodeEditor/CodeEditor.js.map +1 -1
  85. package/dist/elements/CollapseAllToggle/index.d.ts +3 -0
  86. package/dist/elements/CollapseAllToggle/index.d.ts.map +1 -1
  87. package/dist/elements/CollapseAllToggle/index.js +36 -22
  88. package/dist/elements/CollapseAllToggle/index.js.map +1 -1
  89. package/dist/elements/Collapsible/index.css +5 -1
  90. package/dist/elements/Collapsible/index.d.ts +2 -0
  91. package/dist/elements/Collapsible/index.d.ts.map +1 -1
  92. package/dist/elements/Collapsible/index.js +67 -46
  93. package/dist/elements/Collapsible/index.js.map +1 -1
  94. package/dist/elements/ColumnSelection/Popup.css +14 -11
  95. package/dist/elements/ColumnSelection/Popup.d.ts.map +1 -1
  96. package/dist/elements/ColumnSelection/Popup.js +22 -14
  97. package/dist/elements/ColumnSelection/Popup.js.map +1 -1
  98. package/dist/elements/ColumnSelection/index.d.ts.map +1 -1
  99. package/dist/elements/ColumnSelection/index.js +59 -55
  100. package/dist/elements/ColumnSelection/index.js.map +1 -1
  101. package/dist/elements/Combobox/index.d.ts.map +1 -1
  102. package/dist/elements/Combobox/index.js +2 -0
  103. package/dist/elements/Combobox/index.js.map +1 -1
  104. package/dist/elements/CommandPalette/index.css +3 -8
  105. package/dist/elements/CopyLocaleData/index.d.ts.map +1 -1
  106. package/dist/elements/CopyLocaleData/index.js +9 -9
  107. package/dist/elements/CopyLocaleData/index.js.map +1 -1
  108. package/dist/elements/CopyToClipboard/index.d.ts +1 -0
  109. package/dist/elements/CopyToClipboard/index.d.ts.map +1 -1
  110. package/dist/elements/CopyToClipboard/index.js +64 -54
  111. package/dist/elements/CopyToClipboard/index.js.map +1 -1
  112. package/dist/elements/CreateDocumentButton/index.d.ts.map +1 -1
  113. package/dist/elements/CreateDocumentButton/index.js +57 -33
  114. package/dist/elements/CreateDocumentButton/index.js.map +1 -1
  115. package/dist/elements/DatePicker/DatePicker.d.ts.map +1 -1
  116. package/dist/elements/DatePicker/DatePicker.js +188 -85
  117. package/dist/elements/DatePicker/DatePicker.js.map +1 -1
  118. package/dist/elements/DatePicker/hasAmbiguousYearInput.d.ts +8 -0
  119. package/dist/elements/DatePicker/hasAmbiguousYearInput.d.ts.map +1 -0
  120. package/dist/elements/DatePicker/hasAmbiguousYearInput.js +37 -0
  121. package/dist/elements/DatePicker/hasAmbiguousYearInput.js.map +1 -0
  122. package/dist/elements/DatePicker/index.css +34 -17
  123. package/dist/elements/DatePicker/useDatePickerKeyboard.d.ts +18 -0
  124. package/dist/elements/DatePicker/useDatePickerKeyboard.d.ts.map +1 -0
  125. package/dist/elements/DatePicker/useDatePickerKeyboard.js +212 -0
  126. package/dist/elements/DatePicker/useDatePickerKeyboard.js.map +1 -0
  127. package/dist/elements/DefaultListViewTabs/index.d.ts.map +1 -1
  128. package/dist/elements/DefaultListViewTabs/index.js +9 -7
  129. package/dist/elements/DefaultListViewTabs/index.js.map +1 -1
  130. package/dist/elements/DeleteMany/index.d.ts.map +1 -1
  131. package/dist/elements/DeleteMany/index.js +2 -3
  132. package/dist/elements/DeleteMany/index.js.map +1 -1
  133. package/dist/elements/Dialog/DialogModal/index.d.ts +1 -1
  134. package/dist/elements/Dialog/DialogModal/index.d.ts.map +1 -1
  135. package/dist/elements/Dialog/DialogModal/index.js +40 -28
  136. package/dist/elements/Dialog/DialogModal/index.js.map +1 -1
  137. package/dist/elements/Dialog/DialogTitle/index.css +1 -1
  138. package/dist/elements/Dialog/index.css +2 -2
  139. package/dist/elements/DocumentCard/index.css +73 -0
  140. package/dist/elements/DocumentCard/index.d.ts +18 -0
  141. package/dist/elements/DocumentCard/index.d.ts.map +1 -0
  142. package/dist/elements/DocumentCard/index.js +182 -0
  143. package/dist/elements/DocumentCard/index.js.map +1 -0
  144. package/dist/elements/DocumentControls/index.css +15 -15
  145. package/dist/elements/DocumentControls/index.d.ts +4 -2
  146. package/dist/elements/DocumentControls/index.d.ts.map +1 -1
  147. package/dist/elements/DocumentControls/index.js +1 -0
  148. package/dist/elements/DocumentControls/index.js.map +1 -1
  149. package/dist/elements/DocumentDrawer/DrawerHeader/index.css +4 -7
  150. package/dist/elements/DocumentDrawer/DrawerHeader/index.js +2 -2
  151. package/dist/elements/DocumentDrawer/DrawerHeader/index.js.map +1 -1
  152. package/dist/elements/DocumentDrawer/types.d.ts +2 -6
  153. package/dist/elements/DocumentDrawer/types.d.ts.map +1 -1
  154. package/dist/elements/DocumentDrawer/types.js.map +1 -1
  155. package/dist/elements/DocumentFields/RequiredFieldsInfo/index.css +40 -0
  156. package/dist/elements/DocumentFields/RequiredFieldsInfo/index.d.ts +4 -0
  157. package/dist/elements/DocumentFields/RequiredFieldsInfo/index.d.ts.map +1 -0
  158. package/dist/elements/DocumentFields/RequiredFieldsInfo/index.js +88 -0
  159. package/dist/elements/DocumentFields/RequiredFieldsInfo/index.js.map +1 -0
  160. package/dist/elements/DocumentFields/index.css +7 -5
  161. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts +1 -0
  162. package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -1
  163. package/dist/elements/DocumentHeader/Tabs/Tab/index.js +3 -3
  164. package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
  165. package/dist/elements/DocumentHeader/Tabs/index.css +1 -0
  166. package/dist/elements/DocumentHeader/Tabs/index.d.ts +1 -0
  167. package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -1
  168. package/dist/elements/DocumentHeader/Tabs/index.js +5 -3
  169. package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
  170. package/dist/elements/DocumentHeader/index.css +2 -1
  171. package/dist/elements/DocumentHeader/index.d.ts +1 -0
  172. package/dist/elements/DocumentHeader/index.d.ts.map +1 -1
  173. package/dist/elements/DocumentHeader/index.js +4 -2
  174. package/dist/elements/DocumentHeader/index.js.map +1 -1
  175. package/dist/elements/DraggableSortable/DraggableSortableItem/types.d.ts +1 -1
  176. package/dist/elements/DraggableSortable/DraggableSortableItem/types.d.ts.map +1 -1
  177. package/dist/elements/DraggableSortable/DraggableSortableItem/types.js.map +1 -1
  178. package/dist/elements/DraggableSortable/index.d.ts.map +1 -1
  179. package/dist/elements/DraggableSortable/index.js +13 -10
  180. package/dist/elements/DraggableSortable/index.js.map +1 -1
  181. package/dist/elements/DraggableSortable/types.d.ts +1 -0
  182. package/dist/elements/DraggableSortable/types.d.ts.map +1 -1
  183. package/dist/elements/DraggableSortable/types.js.map +1 -1
  184. package/dist/elements/DraggableSortable/useDraggableSortable/index.d.ts.map +1 -1
  185. package/dist/elements/DraggableSortable/useDraggableSortable/index.js +11 -8
  186. package/dist/elements/DraggableSortable/useDraggableSortable/index.js.map +1 -1
  187. package/dist/elements/DraggableSortable/useDraggableSortable/types.d.ts +1 -0
  188. package/dist/elements/DraggableSortable/useDraggableSortable/types.d.ts.map +1 -1
  189. package/dist/elements/DraggableSortable/useDraggableSortable/types.js.map +1 -1
  190. package/dist/elements/Drawer/index.css +14 -9
  191. package/dist/elements/Drawer/index.d.ts.map +1 -1
  192. package/dist/elements/Drawer/index.js +3 -1
  193. package/dist/elements/Drawer/index.js.map +1 -1
  194. package/dist/elements/Drawer/types.d.ts +2 -2
  195. package/dist/elements/Drawer/types.d.ts.map +1 -1
  196. package/dist/elements/Drawer/types.js.map +1 -1
  197. package/dist/elements/Dropzone/index.css +10 -4
  198. package/dist/elements/Dropzone/index.d.ts +2 -1
  199. package/dist/elements/Dropzone/index.d.ts.map +1 -1
  200. package/dist/elements/Dropzone/index.js +9 -10
  201. package/dist/elements/Dropzone/index.js.map +1 -1
  202. package/dist/elements/DuplicateDocument/SelectLocalesDrawer/index.js +3 -2
  203. package/dist/elements/DuplicateDocument/SelectLocalesDrawer/index.js.map +1 -1
  204. package/dist/elements/DuplicateDocument/index.d.ts.map +1 -1
  205. package/dist/elements/DuplicateDocument/index.js +2 -3
  206. package/dist/elements/DuplicateDocument/index.js.map +1 -1
  207. package/dist/elements/EditMany/DrawerContent.d.ts.map +1 -1
  208. package/dist/elements/EditMany/DrawerContent.js +2 -3
  209. package/dist/elements/EditMany/DrawerContent.js.map +1 -1
  210. package/dist/elements/EditMany/index.css +4 -5
  211. package/dist/elements/EditUpload/index.css +5 -5
  212. package/dist/elements/EditUpload/index.d.ts.map +1 -1
  213. package/dist/elements/EditUpload/index.js +66 -14
  214. package/dist/elements/EditUpload/index.js.map +1 -1
  215. package/dist/elements/EditUpload/library.css +6 -13
  216. package/dist/elements/ErrorPill/index.css +0 -1
  217. package/dist/elements/FieldDiffContainer/index.css +1 -1
  218. package/dist/elements/FieldDiffContainer/index.js +1 -1
  219. package/dist/elements/FieldDiffContainer/index.js.map +1 -1
  220. package/dist/elements/FieldDiffLabel/index.css +5 -5
  221. package/dist/elements/FieldSelect/index.d.ts.map +1 -1
  222. package/dist/elements/FieldSelect/index.js +41 -24
  223. package/dist/elements/FieldSelect/index.js.map +1 -1
  224. package/dist/elements/FieldSelect/reduceFieldOptions.d.ts +5 -1
  225. package/dist/elements/FieldSelect/reduceFieldOptions.d.ts.map +1 -1
  226. package/dist/elements/FieldSelect/reduceFieldOptions.js +24 -4
  227. package/dist/elements/FieldSelect/reduceFieldOptions.js.map +1 -1
  228. package/dist/elements/FileDetails/DraggableFileDetails/index.d.ts +1 -1
  229. package/dist/elements/FileDetails/DraggableFileDetails/index.d.ts.map +1 -1
  230. package/dist/elements/FileDetails/DraggableFileDetails/index.js.map +1 -1
  231. package/dist/elements/FileDetails/FileMeta/index.d.ts +1 -1
  232. package/dist/elements/FileDetails/FileMeta/index.d.ts.map +1 -1
  233. package/dist/elements/FileDetails/FileMeta/index.js +41 -21
  234. package/dist/elements/FileDetails/FileMeta/index.js.map +1 -1
  235. package/dist/elements/FileDetails/StaticFileDetails/index.css +2 -0
  236. package/dist/elements/FileDetails/StaticFileDetails/index.d.ts +1 -1
  237. package/dist/elements/FileDetails/StaticFileDetails/index.d.ts.map +1 -1
  238. package/dist/elements/FileDetails/StaticFileDetails/index.js.map +1 -1
  239. package/dist/elements/FileDetails/index.d.ts +1 -1
  240. package/dist/elements/FileDetails/index.d.ts.map +1 -1
  241. package/dist/elements/FileDetails/index.js.map +1 -1
  242. package/dist/elements/FileManager/FilePreview/index.css +2 -3
  243. package/dist/elements/FileManager/FilePreview/index.js +4 -4
  244. package/dist/elements/FileManager/FilePreview/index.js.map +1 -1
  245. package/dist/elements/FileManager/FileToolbar/index.css +2 -3
  246. package/dist/elements/FileManager/FileToolbar/index.d.ts.map +1 -1
  247. package/dist/elements/FileManager/FileToolbar/index.js +4 -0
  248. package/dist/elements/FileManager/FileToolbar/index.js.map +1 -1
  249. package/dist/elements/FileManager/index.css +0 -31
  250. package/dist/elements/FileManager/index.d.ts.map +1 -1
  251. package/dist/elements/FileManager/index.js +418 -299
  252. package/dist/elements/FileManager/index.js.map +1 -1
  253. package/dist/elements/FilterTrigger/index.d.ts +5 -1
  254. package/dist/elements/FilterTrigger/index.d.ts.map +1 -1
  255. package/dist/elements/FilterTrigger/index.js +6 -0
  256. package/dist/elements/FilterTrigger/index.js.map +1 -1
  257. package/dist/elements/FormHeader/index.css +0 -2
  258. package/dist/elements/FullscreenModal/index.d.ts.map +1 -1
  259. package/dist/elements/FullscreenModal/index.js +1 -1
  260. package/dist/elements/FullscreenModal/index.js.map +1 -1
  261. package/dist/elements/GroupBy/Popup.css +3 -6
  262. package/dist/elements/GroupBy/Popup.d.ts.map +1 -1
  263. package/dist/elements/GroupBy/Popup.js +74 -45
  264. package/dist/elements/GroupBy/Popup.js.map +1 -1
  265. package/dist/elements/GroupBy/index.d.ts.map +1 -1
  266. package/dist/elements/GroupBy/index.js +2 -0
  267. package/dist/elements/GroupBy/index.js.map +1 -1
  268. package/dist/elements/HTMLDiff/index.css +1 -1
  269. package/dist/elements/HTMLDiff/index.d.ts +3 -1
  270. package/dist/elements/HTMLDiff/index.d.ts.map +1 -1
  271. package/dist/elements/HTMLDiff/index.js +9 -3
  272. package/dist/elements/HTMLDiff/index.js.map +1 -1
  273. package/dist/elements/Hierarchy/ActionsMenu/index.css +18 -0
  274. package/dist/elements/Hierarchy/ActionsMenu/index.d.ts +35 -0
  275. package/dist/elements/Hierarchy/ActionsMenu/index.d.ts.map +1 -0
  276. package/dist/elements/Hierarchy/ActionsMenu/index.js +99 -0
  277. package/dist/elements/Hierarchy/ActionsMenu/index.js.map +1 -0
  278. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.css +3 -0
  279. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.d.ts.map +1 -1
  280. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js +63 -48
  281. package/dist/elements/Hierarchy/ColumnBrowser/Column/index.js.map +1 -1
  282. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.d.ts.map +1 -1
  283. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js +47 -36
  284. package/dist/elements/Hierarchy/ColumnBrowser/ColumnItem/index.js.map +1 -1
  285. package/dist/elements/Hierarchy/ColumnBrowser/index.d.ts.map +1 -1
  286. package/dist/elements/Hierarchy/ColumnBrowser/index.js +15 -58
  287. package/dist/elements/Hierarchy/ColumnBrowser/index.js.map +1 -1
  288. package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts +2 -0
  289. package/dist/elements/Hierarchy/ColumnBrowser/types.d.ts.map +1 -1
  290. package/dist/elements/Hierarchy/ColumnBrowser/types.js.map +1 -1
  291. package/dist/elements/Hierarchy/DocHeaderButton/index.css +12 -0
  292. package/dist/elements/Hierarchy/DocHeaderButton/index.d.ts.map +1 -1
  293. package/dist/elements/Hierarchy/DocHeaderButton/index.js +88 -13
  294. package/dist/elements/Hierarchy/DocHeaderButton/index.js.map +1 -1
  295. package/dist/elements/Hierarchy/EditButton/index.d.ts +8 -0
  296. package/dist/elements/Hierarchy/EditButton/index.d.ts.map +1 -0
  297. package/dist/elements/Hierarchy/EditButton/index.js +93 -0
  298. package/dist/elements/Hierarchy/EditButton/index.js.map +1 -0
  299. package/dist/elements/Hierarchy/Field/getHierarchyFilterOptions.d.ts +9 -0
  300. package/dist/elements/Hierarchy/Field/getHierarchyFilterOptions.d.ts.map +1 -0
  301. package/dist/elements/Hierarchy/Field/getHierarchyFilterOptions.js +41 -0
  302. package/dist/elements/Hierarchy/Field/getHierarchyFilterOptions.js.map +1 -0
  303. package/dist/elements/Hierarchy/Field/index.client.d.ts.map +1 -1
  304. package/dist/elements/Hierarchy/Field/index.client.js +120 -105
  305. package/dist/elements/Hierarchy/Field/index.client.js.map +1 -1
  306. package/dist/elements/Hierarchy/Field/index.css +0 -1
  307. package/dist/elements/Hierarchy/Field/index.server.d.ts +3 -2
  308. package/dist/elements/Hierarchy/Field/index.server.d.ts.map +1 -1
  309. package/dist/elements/Hierarchy/Field/index.server.js.map +1 -1
  310. package/dist/elements/Hierarchy/Modal/Footer/index.css +33 -0
  311. package/dist/elements/Hierarchy/Modal/Footer/index.d.ts +21 -0
  312. package/dist/elements/Hierarchy/Modal/Footer/index.d.ts.map +1 -0
  313. package/dist/elements/Hierarchy/Modal/Footer/index.js +122 -0
  314. package/dist/elements/Hierarchy/Modal/Footer/index.js.map +1 -0
  315. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts +8 -3
  316. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.d.ts.map +1 -1
  317. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js +38 -12
  318. package/dist/elements/Hierarchy/Modal/fetchAncestorPath.js.map +1 -1
  319. package/dist/elements/Hierarchy/Modal/index.css +0 -56
  320. package/dist/elements/Hierarchy/Modal/index.d.ts +5 -3
  321. package/dist/elements/Hierarchy/Modal/index.d.ts.map +1 -1
  322. package/dist/elements/Hierarchy/Modal/index.js +90 -102
  323. package/dist/elements/Hierarchy/Modal/index.js.map +1 -1
  324. package/dist/elements/Hierarchy/Modal/selection.d.ts +12 -0
  325. package/dist/elements/Hierarchy/Modal/selection.d.ts.map +1 -0
  326. package/dist/elements/Hierarchy/Modal/selection.js +40 -0
  327. package/dist/elements/Hierarchy/Modal/selection.js.map +1 -0
  328. package/dist/elements/Hierarchy/Modal/types.d.ts +4 -0
  329. package/dist/elements/Hierarchy/Modal/types.d.ts.map +1 -1
  330. package/dist/elements/Hierarchy/Modal/types.js.map +1 -1
  331. package/dist/elements/Hierarchy/Modal/useHierarchyModal.d.ts.map +1 -1
  332. package/dist/elements/Hierarchy/Modal/useHierarchyModal.js +1 -1
  333. package/dist/elements/Hierarchy/Modal/useHierarchyModal.js.map +1 -1
  334. package/dist/elements/Hierarchy/MoveMany/index.d.ts +3 -3
  335. package/dist/elements/Hierarchy/MoveMany/index.d.ts.map +1 -1
  336. package/dist/elements/Hierarchy/MoveMany/index.js +81 -95
  337. package/dist/elements/Hierarchy/MoveMany/index.js.map +1 -1
  338. package/dist/elements/Hierarchy/Search/index.d.ts.map +1 -1
  339. package/dist/elements/Hierarchy/Search/index.js +17 -7
  340. package/dist/elements/Hierarchy/Search/index.js.map +1 -1
  341. package/dist/elements/Hierarchy/Search/useHierarchySearch.d.ts.map +1 -1
  342. package/dist/elements/Hierarchy/Search/useHierarchySearch.js +2 -3
  343. package/dist/elements/Hierarchy/Search/useHierarchySearch.js.map +1 -1
  344. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.d.ts.map +1 -1
  345. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js +7 -1
  346. package/dist/elements/Hierarchy/Tree/HierarchySidebarTab.js.map +1 -1
  347. package/dist/elements/Hierarchy/Tree/TreeFocusContext.d.ts +2 -1
  348. package/dist/elements/Hierarchy/Tree/TreeFocusContext.d.ts.map +1 -1
  349. package/dist/elements/Hierarchy/Tree/TreeFocusContext.js +30 -28
  350. package/dist/elements/Hierarchy/Tree/TreeFocusContext.js.map +1 -1
  351. package/dist/elements/Hierarchy/Tree/TreeNode/index.d.ts.map +1 -1
  352. package/dist/elements/Hierarchy/Tree/TreeNode/index.js +6 -2
  353. package/dist/elements/Hierarchy/Tree/TreeNode/index.js.map +1 -1
  354. package/dist/elements/Hierarchy/Tree/index.css +3 -1
  355. package/dist/elements/Hierarchy/Tree/index.d.ts.map +1 -1
  356. package/dist/elements/Hierarchy/Tree/index.js +25 -26
  357. package/dist/elements/Hierarchy/Tree/index.js.map +1 -1
  358. package/dist/elements/HydratePreferences/index.d.ts +8 -0
  359. package/dist/elements/HydratePreferences/index.d.ts.map +1 -0
  360. package/dist/elements/HydratePreferences/index.js +34 -0
  361. package/dist/elements/HydratePreferences/index.js.map +1 -0
  362. package/dist/elements/IDLabel/index.css +11 -7
  363. package/dist/elements/IDLabel/index.d.ts +1 -1
  364. package/dist/elements/IDLabel/index.d.ts.map +1 -1
  365. package/dist/elements/IDLabel/index.js +16 -21
  366. package/dist/elements/IDLabel/index.js.map +1 -1
  367. package/dist/elements/IframeLoader/index.d.ts.map +1 -1
  368. package/dist/elements/IframeLoader/index.js +34 -6
  369. package/dist/elements/IframeLoader/index.js.map +1 -1
  370. package/dist/elements/ItemsDrawer/ItemSearch/index.css +0 -1
  371. package/dist/elements/ItemsDrawer/index.css +3 -0
  372. package/dist/elements/ItemsDrawer/index.d.ts.map +1 -1
  373. package/dist/elements/ItemsDrawer/index.js +23 -1
  374. package/dist/elements/ItemsDrawer/index.js.map +1 -1
  375. package/dist/elements/LLMInstructionsCell/index.css +11 -0
  376. package/dist/elements/LLMInstructionsCell/index.d.ts +5 -0
  377. package/dist/elements/LLMInstructionsCell/index.d.ts.map +1 -0
  378. package/dist/elements/LLMInstructionsCell/index.js +24 -0
  379. package/dist/elements/LLMInstructionsCell/index.js.map +1 -0
  380. package/dist/elements/LLMInstructionsDescription/index.css +79 -0
  381. package/dist/elements/LLMInstructionsDescription/index.d.ts +6 -0
  382. package/dist/elements/LLMInstructionsDescription/index.d.ts.map +1 -0
  383. package/dist/elements/LLMInstructionsDescription/index.js +40 -0
  384. package/dist/elements/LLMInstructionsDescription/index.js.map +1 -0
  385. package/dist/elements/LLMInstructionsMenuItem/index.d.ts +5 -0
  386. package/dist/elements/LLMInstructionsMenuItem/index.d.ts.map +1 -0
  387. package/dist/elements/LLMInstructionsMenuItem/index.js +46 -0
  388. package/dist/elements/LLMInstructionsMenuItem/index.js.map +1 -0
  389. package/dist/elements/LayoutToggle/index.d.ts +8 -0
  390. package/dist/elements/LayoutToggle/index.d.ts.map +1 -0
  391. package/dist/elements/LayoutToggle/index.js +56 -0
  392. package/dist/elements/LayoutToggle/index.js.map +1 -0
  393. package/dist/elements/Link/index.d.ts.map +1 -1
  394. package/dist/elements/Link/index.js +3 -0
  395. package/dist/elements/Link/index.js.map +1 -1
  396. package/dist/elements/ListControls/index.css +1 -0
  397. package/dist/elements/ListControls/index.d.ts.map +1 -1
  398. package/dist/elements/ListControls/index.js +13 -3
  399. package/dist/elements/ListControls/index.js.map +1 -1
  400. package/dist/elements/ListControls/types.d.ts +4 -11
  401. package/dist/elements/ListControls/types.d.ts.map +1 -1
  402. package/dist/elements/ListControls/types.js.map +1 -1
  403. package/dist/elements/ListControlsBar/index.css +1 -0
  404. package/dist/elements/ListDrawer/DrawerContent.d.ts.map +1 -1
  405. package/dist/elements/ListDrawer/DrawerContent.js +2 -3
  406. package/dist/elements/ListDrawer/DrawerContent.js.map +1 -1
  407. package/dist/elements/ListDrawer/Provider.d.ts +0 -6
  408. package/dist/elements/ListDrawer/Provider.d.ts.map +1 -1
  409. package/dist/elements/ListDrawer/Provider.js.map +1 -1
  410. package/dist/elements/ListDrawer/index.d.ts.map +1 -1
  411. package/dist/elements/ListDrawer/index.js +1 -1
  412. package/dist/elements/ListDrawer/index.js.map +1 -1
  413. package/dist/elements/ListDrawer/types.d.ts +1 -0
  414. package/dist/elements/ListDrawer/types.d.ts.map +1 -1
  415. package/dist/elements/ListDrawer/types.js.map +1 -1
  416. package/dist/elements/ListHeader/DrawerRelationshipSelect/index.d.ts.map +1 -1
  417. package/dist/elements/ListHeader/DrawerRelationshipSelect/index.js +24 -20
  418. package/dist/elements/ListHeader/DrawerRelationshipSelect/index.js.map +1 -1
  419. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.d.ts +6 -0
  420. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.d.ts.map +1 -0
  421. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.js +61 -0
  422. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerConfirmSelectionButton.js.map +1 -0
  423. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerCreateNewDocButton.js +1 -1
  424. package/dist/elements/ListHeader/DrawerTitleActions/ListDrawerCreateNewDocButton.js.map +1 -1
  425. package/dist/elements/ListHeader/DrawerTitleActions/index.d.ts +1 -0
  426. package/dist/elements/ListHeader/DrawerTitleActions/index.d.ts.map +1 -1
  427. package/dist/elements/ListHeader/DrawerTitleActions/index.js +1 -0
  428. package/dist/elements/ListHeader/DrawerTitleActions/index.js.map +1 -1
  429. package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts +1 -7
  430. package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.d.ts.map +1 -1
  431. package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js +26 -32
  432. package/dist/elements/ListHeader/TitleActions/ListBulkUploadButton.js.map +1 -1
  433. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.d.ts.map +1 -1
  434. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js +3 -4
  435. package/dist/elements/ListHeader/TitleActions/ListEmptyTrashButton.js.map +1 -1
  436. package/dist/elements/ListHeader/index.css +4 -5
  437. package/dist/elements/LivePreview/Toolbar/Controls/index.d.ts.map +1 -1
  438. package/dist/elements/LivePreview/Toolbar/Controls/index.js +3 -0
  439. package/dist/elements/LivePreview/Toolbar/Controls/index.js.map +1 -1
  440. package/dist/elements/LivePreview/Window/index.css +1 -0
  441. package/dist/elements/LivePreview/Window/index.js +1 -1
  442. package/dist/elements/LivePreview/Window/index.js.map +1 -1
  443. package/dist/elements/Loading/index.d.ts.map +1 -1
  444. package/dist/elements/Loading/index.js +1 -0
  445. package/dist/elements/Loading/index.js.map +1 -1
  446. package/dist/elements/Localizer/index.d.ts +3 -6
  447. package/dist/elements/Localizer/index.d.ts.map +1 -1
  448. package/dist/elements/Localizer/index.js +20 -12
  449. package/dist/elements/Localizer/index.js.map +1 -1
  450. package/dist/elements/MiniCarousel/index.d.ts +1 -1
  451. package/dist/elements/MiniCarousel/index.d.ts.map +1 -1
  452. package/dist/elements/MiniCarousel/index.js +6 -6
  453. package/dist/elements/MiniCarousel/index.js.map +1 -1
  454. package/dist/elements/Modal/index.d.ts +5 -1
  455. package/dist/elements/Modal/index.d.ts.map +1 -1
  456. package/dist/elements/Modal/index.js +69 -1
  457. package/dist/elements/Modal/index.js.map +1 -1
  458. package/dist/elements/Nav/NavSidebarToggle/index.d.ts.map +1 -1
  459. package/dist/elements/Nav/NavSidebarToggle/index.js +29 -24
  460. package/dist/elements/Nav/NavSidebarToggle/index.js.map +1 -1
  461. package/dist/elements/Nav/NavWrapper/index.d.ts +1 -0
  462. package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -1
  463. package/dist/elements/Nav/NavWrapper/index.js +19 -12
  464. package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
  465. package/dist/elements/Nav/SettingsMenuButton/index.d.ts.map +1 -1
  466. package/dist/elements/Nav/SettingsMenuButton/index.js +1 -0
  467. package/dist/elements/Nav/SettingsMenuButton/index.js.map +1 -1
  468. package/dist/elements/Nav/SidebarTabs/index.client.js +1 -1
  469. package/dist/elements/Nav/SidebarTabs/index.client.js.map +1 -1
  470. package/dist/elements/Nav/SidebarTabs/index.css +3 -3
  471. package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js +3 -2
  472. package/dist/elements/Nav/SidebarTabs/renderTabServerFn.js.map +1 -1
  473. package/dist/elements/Nav/context.d.ts +1 -1
  474. package/dist/elements/Nav/context.d.ts.map +1 -1
  475. package/dist/elements/Nav/context.js +32 -11
  476. package/dist/elements/Nav/context.js.map +1 -1
  477. package/dist/elements/Nav/getNavPrefs.d.ts.map +1 -1
  478. package/dist/elements/Nav/getNavPrefs.js +2 -0
  479. package/dist/elements/Nav/getNavPrefs.js.map +1 -1
  480. package/dist/elements/Nav/index.client.d.ts.map +1 -1
  481. package/dist/elements/Nav/index.client.js +1 -10
  482. package/dist/elements/Nav/index.client.js.map +1 -1
  483. package/dist/elements/Nav/index.css +47 -34
  484. package/dist/elements/Nav/index.d.ts +4 -0
  485. package/dist/elements/Nav/index.d.ts.map +1 -1
  486. package/dist/elements/Nav/index.js +15 -1
  487. package/dist/elements/Nav/index.js.map +1 -1
  488. package/dist/elements/NavGroup/index.css +32 -19
  489. package/dist/elements/NavGroup/index.d.ts.map +1 -1
  490. package/dist/elements/NavGroup/index.js +31 -28
  491. package/dist/elements/NavGroup/index.js.map +1 -1
  492. package/dist/elements/NoListResults/index.css +2 -3
  493. package/dist/elements/PageControls/GroupByPageControls.d.ts +1 -0
  494. package/dist/elements/PageControls/GroupByPageControls.d.ts.map +1 -1
  495. package/dist/elements/PageControls/GroupByPageControls.js +9 -6
  496. package/dist/elements/PageControls/GroupByPageControls.js.map +1 -1
  497. package/dist/elements/PageControls/index.css +5 -1
  498. package/dist/elements/PageControls/index.d.ts +3 -0
  499. package/dist/elements/PageControls/index.d.ts.map +1 -1
  500. package/dist/elements/PageControls/index.js +57 -28
  501. package/dist/elements/PageControls/index.js.map +1 -1
  502. package/dist/elements/Pagination/ClickableArrow/index.d.ts +1 -0
  503. package/dist/elements/Pagination/ClickableArrow/index.d.ts.map +1 -1
  504. package/dist/elements/Pagination/ClickableArrow/index.js +46 -10
  505. package/dist/elements/Pagination/ClickableArrow/index.js.map +1 -1
  506. package/dist/elements/Pagination/SimplePagination/index.css +0 -1
  507. package/dist/elements/Pagination/SimplePagination/index.d.ts +1 -0
  508. package/dist/elements/Pagination/SimplePagination/index.d.ts.map +1 -1
  509. package/dist/elements/Pagination/SimplePagination/index.js +14 -8
  510. package/dist/elements/Pagination/SimplePagination/index.js.map +1 -1
  511. package/dist/elements/Pagination/index.css +0 -2
  512. package/dist/elements/Pagination/index.d.ts +1 -0
  513. package/dist/elements/Pagination/index.d.ts.map +1 -1
  514. package/dist/elements/Pagination/index.js +36 -17
  515. package/dist/elements/Pagination/index.js.map +1 -1
  516. package/dist/elements/PerPage/index.css +0 -1
  517. package/dist/elements/PerPage/index.d.ts +1 -0
  518. package/dist/elements/PerPage/index.d.ts.map +1 -1
  519. package/dist/elements/PerPage/index.js +24 -15
  520. package/dist/elements/PerPage/index.js.map +1 -1
  521. package/dist/elements/Pill/index.css +0 -1
  522. package/dist/elements/PillSelector/index.css +1 -0
  523. package/dist/elements/Popup/PopupButtonList/SubmenuTrigger/index.css +53 -0
  524. package/dist/elements/Popup/PopupButtonList/SubmenuTrigger/index.d.ts +13 -0
  525. package/dist/elements/Popup/PopupButtonList/SubmenuTrigger/index.d.ts.map +1 -0
  526. package/dist/elements/Popup/PopupButtonList/SubmenuTrigger/index.js +44 -0
  527. package/dist/elements/Popup/PopupButtonList/SubmenuTrigger/index.js.map +1 -0
  528. package/dist/elements/Popup/PopupButtonList/index.css +31 -9
  529. package/dist/elements/Popup/PopupButtonList/index.d.ts +10 -0
  530. package/dist/elements/Popup/PopupButtonList/index.d.ts.map +1 -1
  531. package/dist/elements/Popup/PopupButtonList/index.js +55 -6
  532. package/dist/elements/Popup/PopupButtonList/index.js.map +1 -1
  533. package/dist/elements/Popup/PopupGroupLabel/index.css +0 -1
  534. package/dist/elements/Popup/PopupTrigger/index.d.ts +9 -2
  535. package/dist/elements/Popup/PopupTrigger/index.d.ts.map +1 -1
  536. package/dist/elements/Popup/PopupTrigger/index.js +58 -6
  537. package/dist/elements/Popup/PopupTrigger/index.js.map +1 -1
  538. package/dist/elements/Popup/SubmenuScope.d.ts +21 -0
  539. package/dist/elements/Popup/SubmenuScope.d.ts.map +1 -0
  540. package/dist/elements/Popup/SubmenuScope.js +89 -0
  541. package/dist/elements/Popup/SubmenuScope.js.map +1 -0
  542. package/dist/elements/Popup/index.css +9 -2
  543. package/dist/elements/Popup/index.d.ts +9 -27
  544. package/dist/elements/Popup/index.d.ts.map +1 -1
  545. package/dist/elements/Popup/index.js +188 -84
  546. package/dist/elements/Popup/index.js.map +1 -1
  547. package/dist/elements/Popup/useSubmenuPointerIntent.d.ts +13 -0
  548. package/dist/elements/Popup/useSubmenuPointerIntent.d.ts.map +1 -0
  549. package/dist/elements/Popup/useSubmenuPointerIntent.js +42 -0
  550. package/dist/elements/Popup/useSubmenuPointerIntent.js.map +1 -0
  551. package/dist/elements/PreviewSizes/index.css +2 -0
  552. package/dist/elements/PreviewSizes/index.d.ts +1 -1
  553. package/dist/elements/PreviewSizes/index.d.ts.map +1 -1
  554. package/dist/elements/PreviewSizes/index.js +9 -9
  555. package/dist/elements/PreviewSizes/index.js.map +1 -1
  556. package/dist/elements/PublishButton/ScheduleDrawer/index.d.ts.map +1 -1
  557. package/dist/elements/PublishButton/ScheduleDrawer/index.js +9 -31
  558. package/dist/elements/PublishButton/ScheduleDrawer/index.js.map +1 -1
  559. package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts +1 -1
  560. package/dist/elements/PublishButton/ScheduleDrawer/types.d.ts.map +1 -1
  561. package/dist/elements/PublishButton/ScheduleDrawer/types.js.map +1 -1
  562. package/dist/elements/PublishButton/index.css +1 -0
  563. package/dist/elements/PublishButton/index.d.ts.map +1 -1
  564. package/dist/elements/PublishButton/index.js +84 -36
  565. package/dist/elements/PublishButton/index.js.map +1 -1
  566. package/dist/elements/PublishButton/validateAllLocales.d.ts +11 -0
  567. package/dist/elements/PublishButton/validateAllLocales.d.ts.map +1 -0
  568. package/dist/elements/PublishButton/validateAllLocales.js +263 -0
  569. package/dist/elements/PublishButton/validateAllLocales.js.map +1 -0
  570. package/dist/elements/PublishMany/DrawerContent.d.ts.map +1 -1
  571. package/dist/elements/PublishMany/DrawerContent.js +2 -3
  572. package/dist/elements/PublishMany/DrawerContent.js.map +1 -1
  573. package/dist/elements/QueryPresets/QueryPresetBar/index.d.ts.map +1 -1
  574. package/dist/elements/QueryPresets/QueryPresetBar/index.js +19 -5
  575. package/dist/elements/QueryPresets/QueryPresetBar/index.js.map +1 -1
  576. package/dist/elements/QueryPresets/fields/ColumnsField/index.d.ts +3 -2
  577. package/dist/elements/QueryPresets/fields/ColumnsField/index.d.ts.map +1 -1
  578. package/dist/elements/QueryPresets/fields/ColumnsField/index.js.map +1 -1
  579. package/dist/elements/QueryPresets/fields/GroupByField/index.d.ts +3 -2
  580. package/dist/elements/QueryPresets/fields/GroupByField/index.d.ts.map +1 -1
  581. package/dist/elements/QueryPresets/fields/GroupByField/index.js.map +1 -1
  582. package/dist/elements/QueryPresets/fields/Heading/index.css +1 -1
  583. package/dist/elements/QueryPresets/fields/WhereField/index.d.ts +3 -2
  584. package/dist/elements/QueryPresets/fields/WhereField/index.d.ts.map +1 -1
  585. package/dist/elements/QueryPresets/fields/WhereField/index.js.map +1 -1
  586. package/dist/elements/ReactSelect/ClearIndicator/index.css +5 -0
  587. package/dist/elements/ReactSelect/ClearIndicator/index.d.ts.map +1 -1
  588. package/dist/elements/ReactSelect/ClearIndicator/index.js +51 -20
  589. package/dist/elements/ReactSelect/ClearIndicator/index.js.map +1 -1
  590. package/dist/elements/ReactSelect/DefaultMenuPortal.d.ts.map +1 -1
  591. package/dist/elements/ReactSelect/DefaultMenuPortal.js +2 -1
  592. package/dist/elements/ReactSelect/DefaultMenuPortal.js.map +1 -1
  593. package/dist/elements/ReactSelect/DropdownIndicator/index.d.ts +2 -4
  594. package/dist/elements/ReactSelect/DropdownIndicator/index.d.ts.map +1 -1
  595. package/dist/elements/ReactSelect/DropdownIndicator/index.js +16 -21
  596. package/dist/elements/ReactSelect/DropdownIndicator/index.js.map +1 -1
  597. package/dist/elements/ReactSelect/MultiValue/context.d.ts +6 -0
  598. package/dist/elements/ReactSelect/MultiValue/context.d.ts.map +1 -0
  599. package/dist/elements/ReactSelect/MultiValue/context.js +5 -0
  600. package/dist/elements/ReactSelect/MultiValue/context.js.map +1 -0
  601. package/dist/elements/ReactSelect/MultiValue/index.css +5 -0
  602. package/dist/elements/ReactSelect/MultiValue/index.d.ts.map +1 -1
  603. package/dist/elements/ReactSelect/MultiValue/index.js +89 -35
  604. package/dist/elements/ReactSelect/MultiValue/index.js.map +1 -1
  605. package/dist/elements/ReactSelect/MultiValueLabel/index.css +41 -2
  606. package/dist/elements/ReactSelect/MultiValueLabel/index.d.ts +5 -1
  607. package/dist/elements/ReactSelect/MultiValueLabel/index.d.ts.map +1 -1
  608. package/dist/elements/ReactSelect/MultiValueLabel/index.js +49 -4
  609. package/dist/elements/ReactSelect/MultiValueLabel/index.js.map +1 -1
  610. package/dist/elements/ReactSelect/MultiValueRemove/index.css +30 -4
  611. package/dist/elements/ReactSelect/MultiValueRemove/index.d.ts.map +1 -1
  612. package/dist/elements/ReactSelect/MultiValueRemove/index.js +92 -66
  613. package/dist/elements/ReactSelect/MultiValueRemove/index.js.map +1 -1
  614. package/dist/elements/ReactSelect/Option/index.d.ts +6 -0
  615. package/dist/elements/ReactSelect/Option/index.d.ts.map +1 -0
  616. package/dist/elements/ReactSelect/Option/index.js +30 -0
  617. package/dist/elements/ReactSelect/Option/index.js.map +1 -0
  618. package/dist/elements/ReactSelect/ValueContainer/index.d.ts.map +1 -1
  619. package/dist/elements/ReactSelect/ValueContainer/index.js +23 -1
  620. package/dist/elements/ReactSelect/ValueContainer/index.js.map +1 -1
  621. package/dist/elements/ReactSelect/index.css +5 -3
  622. package/dist/elements/ReactSelect/index.d.ts.map +1 -1
  623. package/dist/elements/ReactSelect/index.js +4 -1
  624. package/dist/elements/ReactSelect/index.js.map +1 -1
  625. package/dist/elements/ReactSelect/types.d.ts +10 -1
  626. package/dist/elements/ReactSelect/types.d.ts.map +1 -1
  627. package/dist/elements/ReactSelect/types.js.map +1 -1
  628. package/dist/elements/RelationshipTable/AddNewButton.d.ts.map +1 -1
  629. package/dist/elements/RelationshipTable/AddNewButton.js +4 -0
  630. package/dist/elements/RelationshipTable/AddNewButton.js.map +1 -1
  631. package/dist/elements/RelationshipTable/index.d.ts.map +1 -1
  632. package/dist/elements/RelationshipTable/index.js +66 -59
  633. package/dist/elements/RelationshipTable/index.js.map +1 -1
  634. package/dist/elements/RenderTitle/index.css +10 -7
  635. package/dist/elements/RestoreMany/index.d.ts.map +1 -1
  636. package/dist/elements/RestoreMany/index.js +2 -3
  637. package/dist/elements/RestoreMany/index.js.map +1 -1
  638. package/dist/elements/SaveDraftButton/index.d.ts.map +1 -1
  639. package/dist/elements/SaveDraftButton/index.js +17 -5
  640. package/dist/elements/SaveDraftButton/index.js.map +1 -1
  641. package/dist/elements/Search/ListSearchFilter/index.d.ts +2 -1
  642. package/dist/elements/Search/ListSearchFilter/index.d.ts.map +1 -1
  643. package/dist/elements/Search/ListSearchFilter/index.js +33 -17
  644. package/dist/elements/Search/ListSearchFilter/index.js.map +1 -1
  645. package/dist/elements/Search/SearchInput/index.css +0 -1
  646. package/dist/elements/Search/SearchInput/index.d.ts +1 -0
  647. package/dist/elements/Search/SearchInput/index.d.ts.map +1 -1
  648. package/dist/elements/Search/SearchInput/index.js +24 -21
  649. package/dist/elements/Search/SearchInput/index.js.map +1 -1
  650. package/dist/elements/SegmentedControl/index.css +9 -0
  651. package/dist/elements/SegmentedControl/index.d.ts +20 -0
  652. package/dist/elements/SegmentedControl/index.d.ts.map +1 -0
  653. package/dist/elements/SegmentedControl/index.js +162 -0
  654. package/dist/elements/SegmentedControl/index.js.map +1 -0
  655. package/dist/elements/SelectRow/index.d.ts +1 -0
  656. package/dist/elements/SelectRow/index.d.ts.map +1 -1
  657. package/dist/elements/SelectRow/index.js +35 -27
  658. package/dist/elements/SelectRow/index.js.map +1 -1
  659. package/dist/elements/SidebarRow/index.css +43 -2
  660. package/dist/elements/SidebarToggle/index.css +3 -1
  661. package/dist/elements/SkipToContent/index.css +21 -0
  662. package/dist/elements/SkipToContent/index.d.ts +4 -0
  663. package/dist/elements/SkipToContent/index.d.ts.map +1 -0
  664. package/dist/elements/SkipToContent/index.js +63 -0
  665. package/dist/elements/SkipToContent/index.js.map +1 -0
  666. package/dist/elements/SortColumn/index.css +1 -2
  667. package/dist/elements/SortColumn/index.d.ts.map +1 -1
  668. package/dist/elements/SortColumn/index.js +63 -95
  669. package/dist/elements/SortColumn/index.js.map +1 -1
  670. package/dist/elements/SortHeader/index.d.ts.map +1 -1
  671. package/dist/elements/SortHeader/index.js +34 -49
  672. package/dist/elements/SortHeader/index.js.map +1 -1
  673. package/dist/elements/Spinner/index.css +0 -2
  674. package/dist/elements/Status/index.css +3 -4
  675. package/dist/elements/Status/index.d.ts.map +1 -1
  676. package/dist/elements/Status/index.js +2 -3
  677. package/dist/elements/Status/index.js.map +1 -1
  678. package/dist/elements/StepNav/index.css +77 -21
  679. package/dist/elements/StepNav/index.d.ts.map +1 -1
  680. package/dist/elements/StepNav/index.js +151 -69
  681. package/dist/elements/StepNav/index.js.map +1 -1
  682. package/dist/elements/StepNav/types.d.ts +2 -0
  683. package/dist/elements/StepNav/types.d.ts.map +1 -1
  684. package/dist/elements/StepNav/types.js.map +1 -1
  685. package/dist/elements/Switch/index.css +0 -1
  686. package/dist/elements/Switch/index.d.ts +1 -0
  687. package/dist/elements/Switch/index.d.ts.map +1 -1
  688. package/dist/elements/Switch/index.js +18 -16
  689. package/dist/elements/Switch/index.js.map +1 -1
  690. package/dist/elements/Table/DefaultCell/fields/Checkbox/index.css +0 -1
  691. package/dist/elements/Table/DefaultCell/fields/Code/index.css +0 -1
  692. package/dist/elements/Table/DefaultCell/fields/File/index.css +18 -13
  693. package/dist/elements/Table/DefaultCell/fields/File/index.js +1 -1
  694. package/dist/elements/Table/DefaultCell/fields/File/index.js.map +1 -1
  695. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.css +17 -7
  696. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.d.ts.map +1 -1
  697. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js +101 -44
  698. package/dist/elements/Table/DefaultCell/fields/Hierarchy/index.js.map +1 -1
  699. package/dist/elements/Table/DefaultCell/fields/JSON/index.css +0 -1
  700. package/dist/elements/Table/DefaultCell/fields/Status/index.css +0 -1
  701. package/dist/elements/Table/DefaultCell/index.d.ts.map +1 -1
  702. package/dist/elements/Table/DefaultCell/index.js +9 -12
  703. package/dist/elements/Table/DefaultCell/index.js.map +1 -1
  704. package/dist/elements/Table/GridNavigation/useGridNavigation.d.ts +8 -0
  705. package/dist/elements/Table/GridNavigation/useGridNavigation.d.ts.map +1 -0
  706. package/dist/elements/Table/GridNavigation/useGridNavigation.js +397 -0
  707. package/dist/elements/Table/GridNavigation/useGridNavigation.js.map +1 -0
  708. package/dist/elements/Table/OrderableRow.d.ts +3 -1
  709. package/dist/elements/Table/OrderableRow.d.ts.map +1 -1
  710. package/dist/elements/Table/OrderableRow.js +17 -1
  711. package/dist/elements/Table/OrderableRow.js.map +1 -1
  712. package/dist/elements/Table/OrderableTable.d.ts +1 -0
  713. package/dist/elements/Table/OrderableTable.d.ts.map +1 -1
  714. package/dist/elements/Table/OrderableTable.js +26 -6
  715. package/dist/elements/Table/OrderableTable.js.map +1 -1
  716. package/dist/elements/Table/RelationshipProvider/index.d.ts.map +1 -1
  717. package/dist/elements/Table/RelationshipProvider/index.js +2 -3
  718. package/dist/elements/Table/RelationshipProvider/index.js.map +1 -1
  719. package/dist/elements/Table/TableIdentity.d.ts +10 -0
  720. package/dist/elements/Table/TableIdentity.d.ts.map +1 -0
  721. package/dist/elements/Table/TableIdentity.js +52 -0
  722. package/dist/elements/Table/TableIdentity.js.map +1 -0
  723. package/dist/elements/Table/index.css +24 -3
  724. package/dist/elements/Table/index.d.ts +3 -0
  725. package/dist/elements/Table/index.d.ts.map +1 -1
  726. package/dist/elements/Table/index.js +72 -29
  727. package/dist/elements/Table/index.js.map +1 -1
  728. package/dist/elements/Table/useAriaSort.d.ts +7 -0
  729. package/dist/elements/Table/useAriaSort.d.ts.map +1 -0
  730. package/dist/elements/Table/useAriaSort.js +53 -0
  731. package/dist/elements/Table/useAriaSort.js.map +1 -0
  732. package/dist/elements/TableSection/index.css +5 -5
  733. package/dist/elements/Tabs/index.css +6 -5
  734. package/dist/elements/Tabs/index.d.ts +4 -0
  735. package/dist/elements/Tabs/index.d.ts.map +1 -1
  736. package/dist/elements/Tabs/index.js +30 -1
  737. package/dist/elements/Tabs/index.js.map +1 -1
  738. package/dist/elements/Thumbnail/index.css +1 -0
  739. package/dist/elements/ThumbnailCard/index.css +0 -1
  740. package/dist/elements/ThumbnailCard/index.d.ts.map +1 -1
  741. package/dist/elements/ThumbnailCard/index.js +10 -8
  742. package/dist/elements/ThumbnailCard/index.js.map +1 -1
  743. package/dist/elements/TimezonePicker/index.css +1 -3
  744. package/dist/elements/Tooltip/index.css +9 -2
  745. package/dist/elements/Tooltip/index.d.ts +5 -5
  746. package/dist/elements/Tooltip/index.d.ts.map +1 -1
  747. package/dist/elements/Tooltip/index.js +21 -13
  748. package/dist/elements/Tooltip/index.js.map +1 -1
  749. package/dist/elements/UnpublishButton/index.d.ts.map +1 -1
  750. package/dist/elements/UnpublishButton/index.js +3 -4
  751. package/dist/elements/UnpublishButton/index.js.map +1 -1
  752. package/dist/elements/UnpublishMany/DrawerContent.d.ts.map +1 -1
  753. package/dist/elements/UnpublishMany/DrawerContent.js +2 -3
  754. package/dist/elements/UnpublishMany/DrawerContent.js.map +1 -1
  755. package/dist/elements/Upload/UploadFromURLModal/index.d.ts +1 -1
  756. package/dist/elements/Upload/UploadFromURLModal/index.d.ts.map +1 -1
  757. package/dist/elements/Upload/UploadFromURLModal/index.js.map +1 -1
  758. package/dist/elements/Upload/getEditorFileSrc.d.ts +11 -0
  759. package/dist/elements/Upload/getEditorFileSrc.d.ts.map +1 -0
  760. package/dist/elements/Upload/getEditorFileSrc.js +6 -0
  761. package/dist/elements/Upload/getEditorFileSrc.js.map +1 -0
  762. package/dist/elements/Upload/index.css +41 -35
  763. package/dist/elements/Upload/index.d.ts +1 -1
  764. package/dist/elements/Upload/index.d.ts.map +1 -1
  765. package/dist/elements/Upload/index.js +49 -106
  766. package/dist/elements/Upload/index.js.map +1 -1
  767. package/dist/elements/Upload/usePasteFromClipboard.d.ts +14 -0
  768. package/dist/elements/Upload/usePasteFromClipboard.d.ts.map +1 -0
  769. package/dist/elements/Upload/usePasteFromClipboard.js +93 -0
  770. package/dist/elements/Upload/usePasteFromClipboard.js.map +1 -0
  771. package/dist/elements/Upload/useUploadFromUrl.d.ts +20 -0
  772. package/dist/elements/Upload/useUploadFromUrl.d.ts.map +1 -0
  773. package/dist/elements/Upload/useUploadFromUrl.js +201 -0
  774. package/dist/elements/Upload/useUploadFromUrl.js.map +1 -0
  775. package/dist/elements/UploadDropzoneContent/index.css +31 -0
  776. package/dist/elements/UploadDropzoneContent/index.d.ts +17 -0
  777. package/dist/elements/UploadDropzoneContent/index.d.ts.map +1 -0
  778. package/dist/elements/UploadDropzoneContent/index.js +62 -0
  779. package/dist/elements/UploadDropzoneContent/index.js.map +1 -0
  780. package/dist/elements/UserMenu/LanguageMenu/index.d.ts.map +1 -1
  781. package/dist/elements/UserMenu/LanguageMenu/index.js +15 -30
  782. package/dist/elements/UserMenu/LanguageMenu/index.js.map +1 -1
  783. package/dist/elements/UserMenu/SettingsMenu/index.d.ts.map +1 -1
  784. package/dist/elements/UserMenu/SettingsMenu/index.js +15 -30
  785. package/dist/elements/UserMenu/SettingsMenu/index.js.map +1 -1
  786. package/dist/elements/UserMenu/SubMenuHeader/index.d.ts.map +1 -1
  787. package/dist/elements/UserMenu/SubMenuHeader/index.js +2 -0
  788. package/dist/elements/UserMenu/SubMenuHeader/index.js.map +1 -1
  789. package/dist/elements/UserMenu/ThemeMenu/index.d.ts.map +1 -1
  790. package/dist/elements/UserMenu/ThemeMenu/index.js +15 -30
  791. package/dist/elements/UserMenu/ThemeMenu/index.js.map +1 -1
  792. package/dist/elements/UserMenu/index.css +29 -15
  793. package/dist/elements/UserMenu/index.d.ts +1 -0
  794. package/dist/elements/UserMenu/index.d.ts.map +1 -1
  795. package/dist/elements/UserMenu/index.js +81 -50
  796. package/dist/elements/UserMenu/index.js.map +1 -1
  797. package/dist/elements/WhereBuilder/Condition/Relationship/index.js +1 -1
  798. package/dist/elements/WhereBuilder/Condition/Relationship/index.js.map +1 -1
  799. package/dist/elements/WhereBuilder/Condition/index.css +1 -0
  800. package/dist/elements/WhereBuilder/Condition/index.d.ts.map +1 -1
  801. package/dist/elements/WhereBuilder/Condition/index.js +7 -1
  802. package/dist/elements/WhereBuilder/Condition/index.js.map +1 -1
  803. package/dist/elements/WhereBuilder/conditionValue.d.ts +32 -0
  804. package/dist/elements/WhereBuilder/conditionValue.d.ts.map +1 -0
  805. package/dist/elements/WhereBuilder/conditionValue.js +32 -0
  806. package/dist/elements/WhereBuilder/conditionValue.js.map +1 -0
  807. package/dist/elements/WhereBuilder/index.css +2 -0
  808. package/dist/elements/WhereBuilder/index.d.ts.map +1 -1
  809. package/dist/elements/WhereBuilder/index.js +15 -4
  810. package/dist/elements/WhereBuilder/index.js.map +1 -1
  811. package/dist/exports/client/CodeEditor-I6PL55BF.js +14 -0
  812. package/dist/exports/client/CodeEditor-I6PL55BF.js.map +7 -0
  813. package/dist/exports/client/DatePicker-FHEXFC26.js +14 -0
  814. package/dist/exports/client/DatePicker-FHEXFC26.js.map +7 -0
  815. package/dist/exports/client/chunk-AVJIZPR3.js +14 -0
  816. package/dist/exports/client/chunk-AVJIZPR3.js.map +7 -0
  817. package/dist/exports/client/chunk-R7M6BG75.js +27 -0
  818. package/dist/exports/client/chunk-R7M6BG75.js.map +7 -0
  819. package/dist/exports/client/chunk-RHJMVCBS.js +29 -0
  820. package/dist/exports/client/chunk-RHJMVCBS.js.map +7 -0
  821. package/dist/exports/client/index.d.ts +27 -3
  822. package/dist/exports/client/index.d.ts.map +1 -1
  823. package/dist/exports/client/index.js +100 -1
  824. package/dist/exports/client/index.js.map +4 -4
  825. package/dist/exports/rsc/index.d.ts +3 -0
  826. package/dist/exports/rsc/index.d.ts.map +1 -1
  827. package/dist/exports/rsc/index.js +3 -0
  828. package/dist/exports/rsc/index.js.map +1 -1
  829. package/dist/exports/shared/index.js +2 -2
  830. package/dist/exports/shared/index.js.map +3 -3
  831. package/dist/fields/Array/ArrayRow.d.ts +1 -0
  832. package/dist/fields/Array/ArrayRow.d.ts.map +1 -1
  833. package/dist/fields/Array/ArrayRow.js +3 -0
  834. package/dist/fields/Array/ArrayRow.js.map +1 -1
  835. package/dist/fields/Array/index.css +5 -0
  836. package/dist/fields/Array/index.d.ts +3 -7
  837. package/dist/fields/Array/index.d.ts.map +1 -1
  838. package/dist/fields/Array/index.js +54 -18
  839. package/dist/fields/Array/index.js.map +1 -1
  840. package/dist/fields/Blocks/BlockRow.d.ts +1 -0
  841. package/dist/fields/Blocks/BlockRow.d.ts.map +1 -1
  842. package/dist/fields/Blocks/BlockRow.js +2 -0
  843. package/dist/fields/Blocks/BlockRow.js.map +1 -1
  844. package/dist/fields/Blocks/RowActions.d.ts +1 -0
  845. package/dist/fields/Blocks/RowActions.d.ts.map +1 -1
  846. package/dist/fields/Blocks/RowActions.js +31 -19
  847. package/dist/fields/Blocks/RowActions.js.map +1 -1
  848. package/dist/fields/Blocks/SectionTitle/index.css +3 -5
  849. package/dist/fields/Blocks/index.css +3 -2
  850. package/dist/fields/Blocks/index.d.ts +2 -5
  851. package/dist/fields/Blocks/index.d.ts.map +1 -1
  852. package/dist/fields/Blocks/index.js +57 -21
  853. package/dist/fields/Blocks/index.js.map +1 -1
  854. package/dist/fields/Checkbox/Input.d.ts +2 -2
  855. package/dist/fields/Checkbox/Input.d.ts.map +1 -1
  856. package/dist/fields/Checkbox/Input.js +135 -153
  857. package/dist/fields/Checkbox/Input.js.map +1 -1
  858. package/dist/fields/Checkbox/index.css +189 -155
  859. package/dist/fields/Checkbox/index.d.ts +2 -12
  860. package/dist/fields/Checkbox/index.d.ts.map +1 -1
  861. package/dist/fields/Checkbox/index.js.map +1 -1
  862. package/dist/fields/Code/index.d.ts +2 -8
  863. package/dist/fields/Code/index.d.ts.map +1 -1
  864. package/dist/fields/Code/index.js +20 -3
  865. package/dist/fields/Code/index.js.map +1 -1
  866. package/dist/fields/Collapsible/index.d.ts +2 -3
  867. package/dist/fields/Collapsible/index.d.ts.map +1 -1
  868. package/dist/fields/Collapsible/index.js +1 -0
  869. package/dist/fields/Collapsible/index.js.map +1 -1
  870. package/dist/fields/ConfirmPassword/index.d.ts.map +1 -1
  871. package/dist/fields/ConfirmPassword/index.js +45 -31
  872. package/dist/fields/ConfirmPassword/index.js.map +1 -1
  873. package/dist/fields/DateTime/index.d.ts +3 -7
  874. package/dist/fields/DateTime/index.d.ts.map +1 -1
  875. package/dist/fields/DateTime/index.js +10 -3
  876. package/dist/fields/DateTime/index.js.map +1 -1
  877. package/dist/fields/Email/index.d.ts +2 -7
  878. package/dist/fields/Email/index.d.ts.map +1 -1
  879. package/dist/fields/Email/index.js +11 -0
  880. package/dist/fields/Email/index.js.map +1 -1
  881. package/dist/fields/FieldError/index.css +12 -0
  882. package/dist/fields/FieldError/index.d.ts.map +1 -1
  883. package/dist/fields/FieldError/index.js +4 -1
  884. package/dist/fields/FieldError/index.js.map +1 -1
  885. package/dist/fields/FieldLabel/index.css +5 -4
  886. package/dist/fields/FieldLabel/index.d.ts.map +1 -1
  887. package/dist/fields/FieldLabel/index.js +32 -15
  888. package/dist/fields/FieldLabel/index.js.map +1 -1
  889. package/dist/fields/Group/index.css +6 -8
  890. package/dist/fields/Group/index.d.ts +3 -5
  891. package/dist/fields/Group/index.d.ts.map +1 -1
  892. package/dist/fields/Group/index.js.map +1 -1
  893. package/dist/fields/JSON/index.d.ts +2 -6
  894. package/dist/fields/JSON/index.d.ts.map +1 -1
  895. package/dist/fields/JSON/index.js +15 -1
  896. package/dist/fields/JSON/index.js.map +1 -1
  897. package/dist/fields/Join/index.css +3 -4
  898. package/dist/fields/Join/index.d.ts +2 -6
  899. package/dist/fields/Join/index.d.ts.map +1 -1
  900. package/dist/fields/Join/index.js.map +1 -1
  901. package/dist/fields/Number/index.d.ts +2 -7
  902. package/dist/fields/Number/index.d.ts.map +1 -1
  903. package/dist/fields/Number/index.js.map +1 -1
  904. package/dist/fields/Password/input.d.ts.map +1 -1
  905. package/dist/fields/Password/input.js +73 -95
  906. package/dist/fields/Password/input.js.map +1 -1
  907. package/dist/fields/Point/index.d.ts +3 -8
  908. package/dist/fields/Point/index.d.ts.map +1 -1
  909. package/dist/fields/Point/index.js +15 -2
  910. package/dist/fields/Point/index.js.map +1 -1
  911. package/dist/fields/RadioGroup/Radio/index.css +0 -1
  912. package/dist/fields/RadioGroup/index.js.map +1 -1
  913. package/dist/fields/Relationship/Input.d.ts.map +1 -1
  914. package/dist/fields/Relationship/Input.js +27 -20
  915. package/dist/fields/Relationship/Input.js.map +1 -1
  916. package/dist/fields/Relationship/index.d.ts +2 -6
  917. package/dist/fields/Relationship/index.d.ts.map +1 -1
  918. package/dist/fields/Relationship/index.js.map +1 -1
  919. package/dist/fields/Relationship/optionsReducer.d.ts.map +1 -1
  920. package/dist/fields/Relationship/optionsReducer.js +2 -0
  921. package/dist/fields/Relationship/optionsReducer.js.map +1 -1
  922. package/dist/fields/Relationship/select-components/MultiValueLabel/index.d.ts.map +1 -1
  923. package/dist/fields/Relationship/select-components/MultiValueLabel/index.js +24 -2
  924. package/dist/fields/Relationship/select-components/MultiValueLabel/index.js.map +1 -1
  925. package/dist/fields/Relationship/types.d.ts +8 -0
  926. package/dist/fields/Relationship/types.d.ts.map +1 -1
  927. package/dist/fields/Relationship/types.js.map +1 -1
  928. package/dist/fields/Row/index.css +2 -0
  929. package/dist/fields/Row/index.d.ts +2 -3
  930. package/dist/fields/Row/index.d.ts.map +1 -1
  931. package/dist/fields/Row/index.js.map +1 -1
  932. package/dist/fields/Select/Input.d.ts.map +1 -1
  933. package/dist/fields/Select/Input.js +70 -51
  934. package/dist/fields/Select/Input.js.map +1 -1
  935. package/dist/fields/Select/index.css +7 -0
  936. package/dist/fields/Select/index.d.ts +2 -9
  937. package/dist/fields/Select/index.d.ts.map +1 -1
  938. package/dist/fields/Select/index.js.map +1 -1
  939. package/dist/fields/Slug/index.d.ts.map +1 -1
  940. package/dist/fields/Slug/index.js +2 -3
  941. package/dist/fields/Slug/index.js.map +1 -1
  942. package/dist/fields/Tabs/Tab/index.d.ts +2 -0
  943. package/dist/fields/Tabs/Tab/index.d.ts.map +1 -1
  944. package/dist/fields/Tabs/Tab/index.js +15 -9
  945. package/dist/fields/Tabs/Tab/index.js.map +1 -1
  946. package/dist/fields/Tabs/index.css +15 -14
  947. package/dist/fields/Tabs/index.d.ts +2 -4
  948. package/dist/fields/Tabs/index.d.ts.map +1 -1
  949. package/dist/fields/Tabs/index.js +179 -116
  950. package/dist/fields/Tabs/index.js.map +1 -1
  951. package/dist/fields/Text/Input.d.ts.map +1 -1
  952. package/dist/fields/Text/Input.js +53 -34
  953. package/dist/fields/Text/Input.js.map +1 -1
  954. package/dist/fields/Text/index.d.ts +2 -8
  955. package/dist/fields/Text/index.d.ts.map +1 -1
  956. package/dist/fields/Text/index.js.map +1 -1
  957. package/dist/fields/Textarea/index.d.ts +2 -9
  958. package/dist/fields/Textarea/index.d.ts.map +1 -1
  959. package/dist/fields/Textarea/index.js.map +1 -1
  960. package/dist/fields/Upload/HasMany/index.js +1 -1
  961. package/dist/fields/Upload/HasMany/index.js.map +1 -1
  962. package/dist/fields/Upload/HasOne/index.js +1 -1
  963. package/dist/fields/Upload/HasOne/index.js.map +1 -1
  964. package/dist/fields/Upload/Input.d.ts.map +1 -1
  965. package/dist/fields/Upload/Input.js +59 -23
  966. package/dist/fields/Upload/Input.js.map +1 -1
  967. package/dist/fields/shared/index.d.ts +1 -1
  968. package/dist/fields/shared/index.d.ts.map +1 -1
  969. package/dist/fields/shared/index.js.map +1 -1
  970. package/dist/fields/shared/useRowFocus.d.ts +5 -0
  971. package/dist/fields/shared/useRowFocus.d.ts.map +1 -0
  972. package/dist/fields/shared/useRowFocus.js +50 -0
  973. package/dist/fields/shared/useRowFocus.js.map +1 -0
  974. package/dist/forms/Form/context.d.ts +3 -1
  975. package/dist/forms/Form/context.d.ts.map +1 -1
  976. package/dist/forms/Form/context.js +3 -1
  977. package/dist/forms/Form/context.js.map +1 -1
  978. package/dist/forms/Form/fieldReducer.d.ts.map +1 -1
  979. package/dist/forms/Form/fieldReducer.js +6 -9
  980. package/dist/forms/Form/fieldReducer.js.map +1 -1
  981. package/dist/forms/Form/index.d.ts.map +1 -1
  982. package/dist/forms/Form/index.js +19 -9
  983. package/dist/forms/Form/index.js.map +1 -1
  984. package/dist/forms/Form/types.d.ts +0 -5
  985. package/dist/forms/Form/types.d.ts.map +1 -1
  986. package/dist/forms/Form/types.js.map +1 -1
  987. package/dist/forms/NullifyField/index.d.ts +10 -0
  988. package/dist/forms/NullifyField/index.d.ts.map +1 -1
  989. package/dist/forms/NullifyField/index.js +16 -7
  990. package/dist/forms/NullifyField/index.js.map +1 -1
  991. package/dist/forms/RenderFields/context.d.ts +2 -2
  992. package/dist/forms/RenderFields/context.js +2 -2
  993. package/dist/forms/RenderFields/context.js.map +1 -1
  994. package/dist/forms/RenderFields/index.css +3 -5
  995. package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts +2 -2
  996. package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.d.ts.map +1 -1
  997. package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js +13 -4
  998. package/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js.map +1 -1
  999. package/dist/forms/fieldSchemasToFormState/index.d.ts +2 -2
  1000. package/dist/forms/fieldSchemasToFormState/index.d.ts.map +1 -1
  1001. package/dist/forms/fieldSchemasToFormState/index.js.map +1 -1
  1002. package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts +2 -2
  1003. package/dist/forms/fieldSchemasToFormState/iterateFields.d.ts.map +1 -1
  1004. package/dist/forms/fieldSchemasToFormState/iterateFields.js.map +1 -1
  1005. package/dist/forms/fieldSchemasToFormState/renderField.d.ts.map +1 -1
  1006. package/dist/forms/fieldSchemasToFormState/renderField.js +5 -4
  1007. package/dist/forms/fieldSchemasToFormState/renderField.js.map +1 -1
  1008. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts +12 -0
  1009. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.d.ts.map +1 -0
  1010. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js +42 -0
  1011. package/dist/forms/fieldSchemasToFormState/serverFunctions/mergeAllowedFieldOverrides.js.map +1 -0
  1012. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts +8 -6
  1013. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.d.ts.map +1 -1
  1014. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js +22 -9
  1015. package/dist/forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js.map +1 -1
  1016. package/dist/forms/fieldSchemasToFormState/types.d.ts +3 -2
  1017. package/dist/forms/fieldSchemasToFormState/types.d.ts.map +1 -1
  1018. package/dist/forms/fieldSchemasToFormState/types.js.map +1 -1
  1019. package/dist/forms/useField/types.d.ts +0 -4
  1020. package/dist/forms/useField/types.d.ts.map +1 -1
  1021. package/dist/forms/useField/types.js.map +1 -1
  1022. package/dist/graphics/Logo/index.d.ts.map +1 -1
  1023. package/dist/graphics/Logo/index.js +2 -0
  1024. package/dist/graphics/Logo/index.js.map +1 -1
  1025. package/dist/hooks/useControllableState.js +3 -3
  1026. package/dist/hooks/useControllableState.js.map +1 -1
  1027. package/dist/hooks/usePayloadAPI.d.ts.map +1 -1
  1028. package/dist/hooks/usePayloadAPI.js +2 -3
  1029. package/dist/hooks/usePayloadAPI.js.map +1 -1
  1030. package/dist/icons/Arrow/index.d.ts +1 -1
  1031. package/dist/icons/Arrow/index.d.ts.map +1 -1
  1032. package/dist/icons/Arrow/index.js +7 -1
  1033. package/dist/icons/Arrow/index.js.map +1 -1
  1034. package/dist/icons/Clock/index.d.ts +6 -0
  1035. package/dist/icons/Clock/index.d.ts.map +1 -0
  1036. package/dist/icons/Clock/index.js +18 -0
  1037. package/dist/icons/Clock/index.js.map +1 -0
  1038. package/dist/icons/Edit/index.d.ts +0 -1
  1039. package/dist/icons/Edit/index.d.ts.map +1 -1
  1040. package/dist/icons/Edit/index.js +4 -4
  1041. package/dist/icons/Edit/index.js.map +1 -1
  1042. package/dist/icons/ImageStack/index.d.ts +3 -0
  1043. package/dist/icons/ImageStack/index.d.ts.map +1 -0
  1044. package/dist/icons/ImageStack/index.js +17 -0
  1045. package/dist/icons/ImageStack/index.js.map +1 -0
  1046. package/dist/icons/Pin/index.d.ts +7 -0
  1047. package/dist/icons/Pin/index.d.ts.map +1 -0
  1048. package/dist/icons/Pin/index.js +23 -0
  1049. package/dist/icons/Pin/index.js.map +1 -0
  1050. package/dist/icons/Sidebar/index.d.ts.map +1 -1
  1051. package/dist/icons/Sidebar/index.js +2 -0
  1052. package/dist/icons/Sidebar/index.js.map +1 -1
  1053. package/dist/icons/Table/index.css +1 -0
  1054. package/dist/icons/Table/index.d.ts +7 -0
  1055. package/dist/icons/Table/index.d.ts.map +1 -0
  1056. package/dist/icons/Table/index.js +25 -0
  1057. package/dist/icons/Table/index.js.map +1 -0
  1058. package/dist/layouts/Root/DocumentRoot.d.ts +24 -0
  1059. package/dist/layouts/Root/DocumentRoot.d.ts.map +1 -0
  1060. package/dist/layouts/Root/DocumentRoot.js +40 -0
  1061. package/dist/layouts/Root/DocumentRoot.js.map +1 -0
  1062. package/dist/layouts/Root/ResolveThemeOnClient.d.ts +12 -0
  1063. package/dist/layouts/Root/ResolveThemeOnClient.d.ts.map +1 -0
  1064. package/dist/layouts/Root/ResolveThemeOnClient.js +35 -0
  1065. package/dist/layouts/Root/ResolveThemeOnClient.js.map +1 -0
  1066. package/dist/layouts/Root/RootProviders.d.ts +11 -0
  1067. package/dist/layouts/Root/RootProviders.d.ts.map +1 -0
  1068. package/dist/layouts/Root/RootProviders.js +164 -0
  1069. package/dist/layouts/Root/RootProviders.js.map +1 -0
  1070. package/dist/layouts/Root/getRootLayoutData.d.ts +29 -0
  1071. package/dist/layouts/Root/getRootLayoutData.d.ts.map +1 -0
  1072. package/dist/layouts/Root/getRootLayoutData.js +76 -0
  1073. package/dist/layouts/Root/getRootLayoutData.js.map +1 -0
  1074. package/dist/layouts/Root/index.d.ts +3 -6
  1075. package/dist/layouts/Root/index.d.ts.map +1 -1
  1076. package/dist/layouts/Root/index.js +49 -109
  1077. package/dist/layouts/Root/index.js.map +1 -1
  1078. package/dist/providers/Actions/index.d.ts +1 -0
  1079. package/dist/providers/Actions/index.d.ts.map +1 -1
  1080. package/dist/providers/Actions/index.js +43 -11
  1081. package/dist/providers/Actions/index.js.map +1 -1
  1082. package/dist/providers/Auth/AuthSessionDebug/index.css +48 -0
  1083. package/dist/providers/Auth/AuthSessionDebug/index.d.ts +13 -0
  1084. package/dist/providers/Auth/AuthSessionDebug/index.d.ts.map +1 -0
  1085. package/dist/providers/Auth/AuthSessionDebug/index.js +93 -0
  1086. package/dist/providers/Auth/AuthSessionDebug/index.js.map +1 -0
  1087. package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts +21 -0
  1088. package/dist/providers/Auth/AuthSessionDebug/utilities.d.ts.map +1 -0
  1089. package/dist/providers/Auth/AuthSessionDebug/utilities.js +53 -0
  1090. package/dist/providers/Auth/AuthSessionDebug/utilities.js.map +1 -0
  1091. package/dist/providers/Auth/authSessionRequests.d.ts +27 -0
  1092. package/dist/providers/Auth/authSessionRequests.d.ts.map +1 -0
  1093. package/dist/providers/Auth/authSessionRequests.js +119 -0
  1094. package/dist/providers/Auth/authSessionRequests.js.map +1 -0
  1095. package/dist/providers/Auth/index.d.ts +2 -56
  1096. package/dist/providers/Auth/index.d.ts.map +1 -1
  1097. package/dist/providers/Auth/index.js +283 -135
  1098. package/dist/providers/Auth/index.js.map +1 -1
  1099. package/dist/providers/Auth/sessionActivity.d.ts +23 -0
  1100. package/dist/providers/Auth/sessionActivity.d.ts.map +1 -0
  1101. package/dist/providers/Auth/sessionActivity.js +49 -0
  1102. package/dist/providers/Auth/sessionActivity.js.map +1 -0
  1103. package/dist/providers/Auth/sessionTiming.d.ts +11 -0
  1104. package/dist/providers/Auth/sessionTiming.d.ts.map +1 -0
  1105. package/dist/providers/Auth/sessionTiming.js +18 -0
  1106. package/dist/providers/Auth/sessionTiming.js.map +1 -0
  1107. package/dist/providers/Auth/tabSessionSync/index.d.ts +17 -0
  1108. package/dist/providers/Auth/tabSessionSync/index.d.ts.map +1 -0
  1109. package/dist/providers/Auth/tabSessionSync/index.js +263 -0
  1110. package/dist/providers/Auth/tabSessionSync/index.js.map +1 -0
  1111. package/dist/providers/Auth/tabSessionSync/types.d.ts +107 -0
  1112. package/dist/providers/Auth/tabSessionSync/types.d.ts.map +1 -0
  1113. package/dist/providers/Auth/tabSessionSync/types.js +6 -0
  1114. package/dist/providers/Auth/tabSessionSync/types.js.map +1 -0
  1115. package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts +11 -0
  1116. package/dist/providers/Auth/tabSessionSync/useTabSessionSync.d.ts.map +1 -0
  1117. package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js +90 -0
  1118. package/dist/providers/Auth/tabSessionSync/useTabSessionSync.js.map +1 -0
  1119. package/dist/providers/Auth/tabSessionSync/utilities.d.ts +26 -0
  1120. package/dist/providers/Auth/tabSessionSync/utilities.d.ts.map +1 -0
  1121. package/dist/providers/Auth/tabSessionSync/utilities.js +159 -0
  1122. package/dist/providers/Auth/tabSessionSync/utilities.js.map +1 -0
  1123. package/dist/providers/Auth/types.d.ts +65 -0
  1124. package/dist/providers/Auth/types.d.ts.map +1 -0
  1125. package/dist/providers/Auth/types.js +2 -0
  1126. package/dist/providers/Auth/types.js.map +1 -0
  1127. package/dist/providers/Auth/useAuthSessionTimers.d.ts +26 -0
  1128. package/dist/providers/Auth/useAuthSessionTimers.d.ts.map +1 -0
  1129. package/dist/providers/Auth/useAuthSessionTimers.js +203 -0
  1130. package/dist/providers/Auth/useAuthSessionTimers.js.map +1 -0
  1131. package/dist/providers/DocumentInfo/index.d.ts.map +1 -1
  1132. package/dist/providers/DocumentInfo/index.js +32 -24
  1133. package/dist/providers/DocumentInfo/index.js.map +1 -1
  1134. package/dist/providers/DocumentInfo/types.d.ts +0 -10
  1135. package/dist/providers/DocumentInfo/types.d.ts.map +1 -1
  1136. package/dist/providers/DocumentInfo/types.js.map +1 -1
  1137. package/dist/providers/FormErrorHandler/index.d.ts +5 -1
  1138. package/dist/providers/FormErrorHandler/index.d.ts.map +1 -1
  1139. package/dist/providers/FormErrorHandler/index.js.map +1 -1
  1140. package/dist/providers/ListQuery/getSearchWithListQuery.d.ts +7 -0
  1141. package/dist/providers/ListQuery/getSearchWithListQuery.d.ts.map +1 -0
  1142. package/dist/providers/ListQuery/getSearchWithListQuery.js +22 -0
  1143. package/dist/providers/ListQuery/getSearchWithListQuery.js.map +1 -0
  1144. package/dist/providers/ListQuery/index.d.ts.map +1 -1
  1145. package/dist/providers/ListQuery/index.js +16 -12
  1146. package/dist/providers/ListQuery/index.js.map +1 -1
  1147. package/dist/providers/ListQuery/types.d.ts +4 -4
  1148. package/dist/providers/ListQuery/types.d.ts.map +1 -1
  1149. package/dist/providers/ListQuery/types.js.map +1 -1
  1150. package/dist/providers/LivePreview/index.d.ts.map +1 -1
  1151. package/dist/providers/LivePreview/index.js +13 -6
  1152. package/dist/providers/LivePreview/index.js.map +1 -1
  1153. package/dist/providers/Locale/index.d.ts +1 -5
  1154. package/dist/providers/Locale/index.d.ts.map +1 -1
  1155. package/dist/providers/Locale/index.js +64 -138
  1156. package/dist/providers/Locale/index.js.map +1 -1
  1157. package/dist/providers/ModalAccessibility/index.d.ts +3 -0
  1158. package/dist/providers/ModalAccessibility/index.d.ts.map +1 -0
  1159. package/dist/providers/ModalAccessibility/index.js +102 -0
  1160. package/dist/providers/ModalAccessibility/index.js.map +1 -0
  1161. package/dist/providers/Preferences/index.d.ts +7 -1
  1162. package/dist/providers/Preferences/index.d.ts.map +1 -1
  1163. package/dist/providers/Preferences/index.js +62 -20
  1164. package/dist/providers/Preferences/index.js.map +1 -1
  1165. package/dist/providers/RouteTransition/ProgressBar/index.js +4 -1
  1166. package/dist/providers/RouteTransition/ProgressBar/index.js.map +1 -1
  1167. package/dist/providers/RouteTransition/index.d.ts +2 -0
  1168. package/dist/providers/RouteTransition/index.d.ts.map +1 -1
  1169. package/dist/providers/RouteTransition/index.js +42 -14
  1170. package/dist/providers/RouteTransition/index.js.map +1 -1
  1171. package/dist/providers/Selection/index.d.ts.map +1 -1
  1172. package/dist/providers/Selection/index.js +2 -3
  1173. package/dist/providers/Selection/index.js.map +1 -1
  1174. package/dist/providers/ServerFunctions/index.d.ts +5 -1
  1175. package/dist/providers/ServerFunctions/index.d.ts.map +1 -1
  1176. package/dist/providers/ServerFunctions/index.js +15 -0
  1177. package/dist/providers/ServerFunctions/index.js.map +1 -1
  1178. package/dist/providers/TableColumns/RenderDefaultCell/index.d.ts.map +1 -1
  1179. package/dist/providers/TableColumns/RenderDefaultCell/index.js +1 -2
  1180. package/dist/providers/TableColumns/RenderDefaultCell/index.js.map +1 -1
  1181. package/dist/providers/TableColumns/buildColumnState/index.d.ts +1 -0
  1182. package/dist/providers/TableColumns/buildColumnState/index.d.ts.map +1 -1
  1183. package/dist/providers/TableColumns/buildColumnState/index.js +2 -1
  1184. package/dist/providers/TableColumns/buildColumnState/index.js.map +1 -1
  1185. package/dist/providers/TableColumns/buildColumnState/renderCell.d.ts +2 -1
  1186. package/dist/providers/TableColumns/buildColumnState/renderCell.d.ts.map +1 -1
  1187. package/dist/providers/TableColumns/buildColumnState/renderCell.js +12 -28
  1188. package/dist/providers/TableColumns/buildColumnState/renderCell.js.map +1 -1
  1189. package/dist/providers/TableColumns/types.d.ts +1 -34
  1190. package/dist/providers/TableColumns/types.d.ts.map +1 -1
  1191. package/dist/providers/TableColumns/types.js.map +1 -1
  1192. package/dist/providers/ToastContainer/index.css +6 -7
  1193. package/dist/providers/ToastContainer/index.d.ts.map +1 -1
  1194. package/dist/providers/ToastContainer/index.js +113 -35
  1195. package/dist/providers/ToastContainer/index.js.map +1 -1
  1196. package/dist/providers/Translation/index.d.ts.map +1 -1
  1197. package/dist/providers/Translation/index.js +11 -1
  1198. package/dist/providers/Translation/index.js.map +1 -1
  1199. package/dist/styles.css +167 -58
  1200. package/dist/templates/Default/Wrapper/index.css +22 -5
  1201. package/dist/templates/Default/Wrapper/index.d.ts.map +1 -1
  1202. package/dist/templates/Default/Wrapper/index.js +4 -3
  1203. package/dist/templates/Default/Wrapper/index.js.map +1 -1
  1204. package/dist/templates/Default/index.css +1 -0
  1205. package/dist/templates/Default/index.d.ts +1 -0
  1206. package/dist/templates/Default/index.d.ts.map +1 -1
  1207. package/dist/templates/Default/index.js +21 -14
  1208. package/dist/templates/Default/index.js.map +1 -1
  1209. package/dist/utilities/appendCacheTag.d.ts +1 -0
  1210. package/dist/utilities/appendCacheTag.d.ts.map +1 -1
  1211. package/dist/utilities/appendCacheTag.js +2 -1
  1212. package/dist/utilities/appendCacheTag.js.map +1 -1
  1213. package/dist/utilities/buildClientFieldSchemaMap/index.d.ts.map +1 -1
  1214. package/dist/utilities/buildClientFieldSchemaMap/index.js +9 -4
  1215. package/dist/utilities/buildClientFieldSchemaMap/index.js.map +1 -1
  1216. package/dist/utilities/buildClientFieldSchemaMap/traverseFields.d.ts.map +1 -1
  1217. package/dist/utilities/buildClientFieldSchemaMap/traverseFields.js +32 -6
  1218. package/dist/utilities/buildClientFieldSchemaMap/traverseFields.js.map +1 -1
  1219. package/dist/utilities/buildFormState.d.ts.map +1 -1
  1220. package/dist/utilities/buildFormState.js +6 -2
  1221. package/dist/utilities/buildFormState.js.map +1 -1
  1222. package/dist/utilities/filterLLMInstructionsMenuItems.d.ts +9 -0
  1223. package/dist/utilities/filterLLMInstructionsMenuItems.d.ts.map +1 -0
  1224. package/dist/utilities/filterLLMInstructionsMenuItems.js +37 -0
  1225. package/dist/utilities/filterLLMInstructionsMenuItems.js.map +1 -0
  1226. package/dist/utilities/filterOutUploadFields.js +1 -1
  1227. package/dist/utilities/filterOutUploadFields.js.map +1 -1
  1228. package/dist/utilities/formatAbsoluteURL.d.ts +1 -1
  1229. package/dist/utilities/formatAbsoluteURL.d.ts.map +1 -1
  1230. package/dist/utilities/formatAbsoluteURL.js +18 -8
  1231. package/dist/utilities/formatAbsoluteURL.js.map +1 -1
  1232. package/dist/utilities/formatMetadata.d.ts.map +1 -1
  1233. package/dist/utilities/formatMetadata.js +0 -5
  1234. package/dist/utilities/formatMetadata.js.map +1 -1
  1235. package/dist/utilities/generateFieldID.d.ts +1 -1
  1236. package/dist/utilities/generateFieldID.d.ts.map +1 -1
  1237. package/dist/utilities/generateFieldID.js.map +1 -1
  1238. package/dist/utilities/getActiveModal.d.ts +6 -0
  1239. package/dist/utilities/getActiveModal.d.ts.map +1 -0
  1240. package/dist/utilities/getActiveModal.js +8 -0
  1241. package/dist/utilities/getActiveModal.js.map +1 -0
  1242. package/dist/utilities/getClientConfig.d.ts +5 -1
  1243. package/dist/utilities/getClientConfig.d.ts.map +1 -1
  1244. package/dist/utilities/getClientConfig.js +2 -1
  1245. package/dist/utilities/getClientConfig.js.map +1 -1
  1246. package/dist/utilities/getClientSchemaMap.d.ts.map +1 -1
  1247. package/dist/utilities/getClientSchemaMap.js +2 -1
  1248. package/dist/utilities/getClientSchemaMap.js.map +1 -1
  1249. package/dist/utilities/getDisplayedFieldValue.d.ts +8 -2
  1250. package/dist/utilities/getDisplayedFieldValue.d.ts.map +1 -1
  1251. package/dist/utilities/getDisplayedFieldValue.js +11 -1
  1252. package/dist/utilities/getDisplayedFieldValue.js.map +1 -1
  1253. package/dist/utilities/getDocPreferences.d.ts.map +1 -1
  1254. package/dist/utilities/getDocPreferences.js +1 -0
  1255. package/dist/utilities/getDocPreferences.js.map +1 -1
  1256. package/dist/utilities/getDocumentThumbnail.d.ts +6 -0
  1257. package/dist/utilities/getDocumentThumbnail.d.ts.map +1 -0
  1258. package/dist/utilities/getDocumentThumbnail.js +27 -0
  1259. package/dist/utilities/getDocumentThumbnail.js.map +1 -0
  1260. package/dist/utilities/getDocumentThumbnailPopulate.d.ts +7 -0
  1261. package/dist/utilities/getDocumentThumbnailPopulate.d.ts.map +1 -0
  1262. package/dist/utilities/getDocumentThumbnailPopulate.js +23 -0
  1263. package/dist/utilities/getDocumentThumbnailPopulate.js.map +1 -0
  1264. package/dist/utilities/getDocumentThumbnailSelect.d.ts +7 -0
  1265. package/dist/utilities/getDocumentThumbnailSelect.d.ts.map +1 -0
  1266. package/dist/utilities/getDocumentThumbnailSelect.js +24 -0
  1267. package/dist/utilities/getDocumentThumbnailSelect.js.map +1 -0
  1268. package/dist/utilities/getFilesFromClipboard.d.ts +10 -0
  1269. package/dist/utilities/getFilesFromClipboard.d.ts.map +1 -0
  1270. package/dist/utilities/getFilesFromClipboard.js +49 -0
  1271. package/dist/utilities/getFilesFromClipboard.js.map +1 -0
  1272. package/dist/utilities/getHasScheduledPublish.d.ts +2 -3
  1273. package/dist/utilities/getHasScheduledPublish.d.ts.map +1 -1
  1274. package/dist/utilities/getHasScheduledPublish.js +2 -5
  1275. package/dist/utilities/getHasScheduledPublish.js.map +1 -1
  1276. package/dist/utilities/getPreferences.d.ts.map +1 -1
  1277. package/dist/utilities/getPreferences.js +1 -0
  1278. package/dist/utilities/getPreferences.js.map +1 -1
  1279. package/dist/utilities/getRequestTheme.d.ts +8 -1
  1280. package/dist/utilities/getRequestTheme.d.ts.map +1 -1
  1281. package/dist/utilities/getRequestTheme.js +16 -4
  1282. package/dist/utilities/getRequestTheme.js.map +1 -1
  1283. package/dist/utilities/getVersions.d.ts.map +1 -1
  1284. package/dist/utilities/getVersions.js +8 -0
  1285. package/dist/utilities/getVersions.js.map +1 -1
  1286. package/dist/utilities/handleAuthRedirect.d.ts.map +1 -1
  1287. package/dist/utilities/handleAuthRedirect.js +4 -1
  1288. package/dist/utilities/handleAuthRedirect.js.map +1 -1
  1289. package/dist/utilities/handleServerFunctions.d.ts +9 -9
  1290. package/dist/utilities/handleServerFunctions.d.ts.map +1 -1
  1291. package/dist/utilities/handleServerFunctions.js +7 -5
  1292. package/dist/utilities/handleServerFunctions.js.map +1 -1
  1293. package/dist/utilities/hierarchyCollectionRestrictions.d.ts +15 -0
  1294. package/dist/utilities/hierarchyCollectionRestrictions.d.ts.map +1 -0
  1295. package/dist/utilities/hierarchyCollectionRestrictions.js +17 -0
  1296. package/dist/utilities/hierarchyCollectionRestrictions.js.map +1 -0
  1297. package/dist/utilities/isAbsoluteURL.d.ts +3 -0
  1298. package/dist/utilities/isAbsoluteURL.d.ts.map +1 -0
  1299. package/dist/utilities/isAbsoluteURL.js +15 -0
  1300. package/dist/utilities/isAbsoluteURL.js.map +1 -0
  1301. package/dist/utilities/isHttpURL.d.ts +3 -0
  1302. package/dist/utilities/isHttpURL.d.ts.map +1 -0
  1303. package/dist/utilities/isHttpURL.js +12 -0
  1304. package/dist/utilities/isHttpURL.js.map +1 -0
  1305. package/dist/utilities/isPathMatchingRoute.d.ts.map +1 -1
  1306. package/dist/utilities/isPathMatchingRoute.js +7 -5
  1307. package/dist/utilities/isPathMatchingRoute.js.map +1 -1
  1308. package/dist/utilities/isPublicAdminRoute.d.ts.map +1 -1
  1309. package/dist/utilities/isPublicAdminRoute.js +9 -6
  1310. package/dist/utilities/isPublicAdminRoute.js.map +1 -1
  1311. package/dist/utilities/renderTable.d.ts +2 -1
  1312. package/dist/utilities/renderTable.d.ts.map +1 -1
  1313. package/dist/utilities/renderTable.js +13 -4
  1314. package/dist/utilities/renderTable.js.map +1 -1
  1315. package/dist/utilities/schedulePublishHandler.d.ts +8 -1
  1316. package/dist/utilities/schedulePublishHandler.d.ts.map +1 -1
  1317. package/dist/utilities/schedulePublishHandler.js +77 -5
  1318. package/dist/utilities/schedulePublishHandler.js.map +1 -1
  1319. package/dist/utilities/serverFunctionRegistry.d.ts.map +1 -1
  1320. package/dist/utilities/serverFunctionRegistry.js +4 -1
  1321. package/dist/utilities/serverFunctionRegistry.js.map +1 -1
  1322. package/dist/utilities/slugify.d.ts.map +1 -1
  1323. package/dist/utilities/slugify.js +3 -0
  1324. package/dist/utilities/slugify.js.map +1 -1
  1325. package/dist/utilities/traverseForLocalizedFields.d.ts +7 -2
  1326. package/dist/utilities/traverseForLocalizedFields.d.ts.map +1 -1
  1327. package/dist/utilities/traverseForLocalizedFields.js +22 -8
  1328. package/dist/utilities/traverseForLocalizedFields.js.map +1 -1
  1329. package/dist/utilities/upsertPreferences.d.ts.map +1 -1
  1330. package/dist/utilities/upsertPreferences.js +3 -0
  1331. package/dist/utilities/upsertPreferences.js.map +1 -1
  1332. package/dist/views/API/index.client.d.ts.map +1 -1
  1333. package/dist/views/API/index.client.js +21 -4
  1334. package/dist/views/API/index.client.js.map +1 -1
  1335. package/dist/views/API/index.css +2 -2
  1336. package/dist/views/Account/index.d.ts +1 -1
  1337. package/dist/views/Account/index.d.ts.map +1 -1
  1338. package/dist/views/Account/index.js +8 -5
  1339. package/dist/views/Account/index.js.map +1 -1
  1340. package/dist/views/CreateFirstUser/index.css +0 -2
  1341. package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
  1342. package/dist/views/CreateFirstUser/index.js +4 -2
  1343. package/dist/views/CreateFirstUser/index.js.map +1 -1
  1344. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.d.ts.map +1 -1
  1345. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js +106 -135
  1346. package/dist/views/Dashboard/Default/ModularDashboard/DashboardStepNav.js.map +1 -1
  1347. package/dist/views/Dashboard/Default/ModularDashboard/WidgetContent/index.d.ts +7 -0
  1348. package/dist/views/Dashboard/Default/ModularDashboard/WidgetContent/index.d.ts.map +1 -0
  1349. package/dist/views/Dashboard/Default/ModularDashboard/WidgetContent/index.js +65 -0
  1350. package/dist/views/Dashboard/Default/ModularDashboard/WidgetContent/index.js.map +1 -0
  1351. package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.d.ts +2 -1
  1352. package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.d.ts.map +1 -1
  1353. package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js +14 -8
  1354. package/dist/views/Dashboard/Default/ModularDashboard/WidgetEditControl.js.map +1 -1
  1355. package/dist/views/Dashboard/Default/ModularDashboard/index.client.d.ts.map +1 -1
  1356. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js +190 -115
  1357. package/dist/views/Dashboard/Default/ModularDashboard/index.client.js.map +1 -1
  1358. package/dist/views/Dashboard/Default/ModularDashboard/index.css +43 -145
  1359. package/dist/views/Dashboard/Default/ModularDashboard/index.d.ts.map +1 -1
  1360. package/dist/views/Dashboard/Default/ModularDashboard/index.js +1 -0
  1361. package/dist/views/Dashboard/Default/ModularDashboard/index.js.map +1 -1
  1362. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.d.ts.map +1 -1
  1363. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js +3 -1
  1364. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/getDefaultLayoutServerFn.js.map +1 -1
  1365. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.d.ts.map +1 -1
  1366. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js +2 -0
  1367. package/dist/views/Dashboard/Default/ModularDashboard/renderWidget/renderWidgetServerFn.js.map +1 -1
  1368. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.d.ts +1 -1
  1369. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.d.ts.map +1 -1
  1370. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js +19 -4
  1371. package/dist/views/Dashboard/Default/ModularDashboard/useDashboardLayout.js.map +1 -1
  1372. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.d.ts.map +1 -1
  1373. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js +2 -38
  1374. package/dist/views/Dashboard/Default/ModularDashboard/utils/sensors.js.map +1 -1
  1375. package/dist/views/Dashboard/index.d.ts.map +1 -1
  1376. package/dist/views/Dashboard/index.js +2 -3
  1377. package/dist/views/Dashboard/index.js.map +1 -1
  1378. package/dist/views/Document/handleServerFunction.d.ts.map +1 -1
  1379. package/dist/views/Document/handleServerFunction.js +3 -0
  1380. package/dist/views/Document/handleServerFunction.js.map +1 -1
  1381. package/dist/views/Document/index.d.ts +1 -1
  1382. package/dist/views/Document/index.d.ts.map +1 -1
  1383. package/dist/views/Document/index.js +11 -7
  1384. package/dist/views/Document/index.js.map +1 -1
  1385. package/dist/views/Document/renderDocumentSlots.d.ts +2 -1
  1386. package/dist/views/Document/renderDocumentSlots.d.ts.map +1 -1
  1387. package/dist/views/Document/renderDocumentSlots.js +17 -7
  1388. package/dist/views/Document/renderDocumentSlots.js.map +1 -1
  1389. package/dist/views/Edit/Auth/APIKey.d.ts +1 -1
  1390. package/dist/views/Edit/Auth/APIKey.d.ts.map +1 -1
  1391. package/dist/views/Edit/Auth/APIKey.js +234 -59
  1392. package/dist/views/Edit/Auth/APIKey.js.map +1 -1
  1393. package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts +12 -0
  1394. package/dist/views/Edit/Auth/APIKeyGenerationModal.d.ts.map +1 -0
  1395. package/dist/views/Edit/Auth/APIKeyGenerationModal.js +117 -0
  1396. package/dist/views/Edit/Auth/APIKeyGenerationModal.js.map +1 -0
  1397. package/dist/views/Edit/Auth/index.css +95 -5
  1398. package/dist/views/Edit/Auth/index.d.ts.map +1 -1
  1399. package/dist/views/Edit/Auth/index.js +10 -28
  1400. package/dist/views/Edit/Auth/index.js.map +1 -1
  1401. package/dist/views/Edit/Auth/types.d.ts +3 -1
  1402. package/dist/views/Edit/Auth/types.d.ts.map +1 -1
  1403. package/dist/views/Edit/Auth/types.js.map +1 -1
  1404. package/dist/views/Edit/SetDocumentTitle/index.d.ts.map +1 -1
  1405. package/dist/views/Edit/SetDocumentTitle/index.js +4 -1
  1406. package/dist/views/Edit/SetDocumentTitle/index.js.map +1 -1
  1407. package/dist/views/Edit/index.css +27 -0
  1408. package/dist/views/Edit/index.d.ts.map +1 -1
  1409. package/dist/views/Edit/index.js +4 -3
  1410. package/dist/views/Edit/index.js.map +1 -1
  1411. package/dist/views/ForgotPassword/ForgotPasswordForm/index.css +14 -0
  1412. package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -1
  1413. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +209 -161
  1414. package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
  1415. package/dist/views/ForgotPassword/index.d.ts.map +1 -1
  1416. package/dist/views/ForgotPassword/index.js +3 -14
  1417. package/dist/views/ForgotPassword/index.js.map +1 -1
  1418. package/dist/views/HierarchyList/DocumentListSelection/index.d.ts.map +1 -1
  1419. package/dist/views/HierarchyList/DocumentListSelection/index.js +103 -105
  1420. package/dist/views/HierarchyList/DocumentListSelection/index.js.map +1 -1
  1421. package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts +4 -1
  1422. package/dist/views/HierarchyList/HierarchyListHeader/index.d.ts.map +1 -1
  1423. package/dist/views/HierarchyList/HierarchyListHeader/index.js +26 -14
  1424. package/dist/views/HierarchyList/HierarchyListHeader/index.js.map +1 -1
  1425. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.d.ts.map +1 -1
  1426. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js +20 -48
  1427. package/dist/views/HierarchyList/HierarchyTable/ChildNameCell.js.map +1 -1
  1428. package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.d.ts.map +1 -1
  1429. package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.js +35 -87
  1430. package/dist/views/HierarchyList/HierarchyTable/RelatedNameCell.js.map +1 -1
  1431. package/dist/views/HierarchyList/HierarchyTable/SlotTable.css +1 -101
  1432. package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts +2 -0
  1433. package/dist/views/HierarchyList/HierarchyTable/SlotTable.d.ts.map +1 -1
  1434. package/dist/views/HierarchyList/HierarchyTable/SlotTable.js +45 -32
  1435. package/dist/views/HierarchyList/HierarchyTable/SlotTable.js.map +1 -1
  1436. package/dist/views/HierarchyList/HierarchyTable/index.css +50 -61
  1437. package/dist/views/HierarchyList/HierarchyTable/index.d.ts +3 -1
  1438. package/dist/views/HierarchyList/HierarchyTable/index.d.ts.map +1 -1
  1439. package/dist/views/HierarchyList/HierarchyTable/index.js +80 -6
  1440. package/dist/views/HierarchyList/HierarchyTable/index.js.map +1 -1
  1441. package/dist/views/HierarchyList/TypeFilter/index.d.ts.map +1 -1
  1442. package/dist/views/HierarchyList/TypeFilter/index.js +6 -7
  1443. package/dist/views/HierarchyList/TypeFilter/index.js.map +1 -1
  1444. package/dist/views/HierarchyList/getHierarchyListURL.d.ts +7 -0
  1445. package/dist/views/HierarchyList/getHierarchyListURL.d.ts.map +1 -0
  1446. package/dist/views/HierarchyList/getHierarchyListURL.js +22 -0
  1447. package/dist/views/HierarchyList/getHierarchyListURL.js.map +1 -0
  1448. package/dist/views/HierarchyList/index.css +2 -1
  1449. package/dist/views/HierarchyList/index.d.ts.map +1 -1
  1450. package/dist/views/HierarchyList/index.js +35 -11
  1451. package/dist/views/HierarchyList/index.js.map +1 -1
  1452. package/dist/views/List/DocumentGrid/index.d.ts +17 -0
  1453. package/dist/views/List/DocumentGrid/index.d.ts.map +1 -0
  1454. package/dist/views/List/DocumentGrid/index.js +117 -0
  1455. package/dist/views/List/DocumentGrid/index.js.map +1 -0
  1456. package/dist/views/List/GroupedDocumentGrid/index.css +17 -0
  1457. package/dist/views/List/GroupedDocumentGrid/index.d.ts +14 -0
  1458. package/dist/views/List/GroupedDocumentGrid/index.d.ts.map +1 -0
  1459. package/dist/views/List/GroupedDocumentGrid/index.js +99 -0
  1460. package/dist/views/List/GroupedDocumentGrid/index.js.map +1 -0
  1461. package/dist/views/List/ListHeader/index.css +5 -5
  1462. package/dist/views/List/ListHeader/index.d.ts +4 -12
  1463. package/dist/views/List/ListHeader/index.d.ts.map +1 -1
  1464. package/dist/views/List/ListHeader/index.js +18 -13
  1465. package/dist/views/List/ListHeader/index.js.map +1 -1
  1466. package/dist/views/List/enrichDocsWithVersionStatus.d.ts.map +1 -1
  1467. package/dist/views/List/enrichDocsWithVersionStatus.js +3 -0
  1468. package/dist/views/List/enrichDocsWithVersionStatus.js.map +1 -1
  1469. package/dist/views/List/getDocumentListItemURL.d.ts +9 -0
  1470. package/dist/views/List/getDocumentListItemURL.d.ts.map +1 -0
  1471. package/dist/views/List/getDocumentListItemURL.js +23 -0
  1472. package/dist/views/List/getDocumentListItemURL.js.map +1 -0
  1473. package/dist/views/List/handleGroupBy.d.ts +6 -2
  1474. package/dist/views/List/handleGroupBy.d.ts.map +1 -1
  1475. package/dist/views/List/handleGroupBy.js +13 -3
  1476. package/dist/views/List/handleGroupBy.js.map +1 -1
  1477. package/dist/views/List/handleServerFunction.d.ts.map +1 -1
  1478. package/dist/views/List/handleServerFunction.js +4 -1
  1479. package/dist/views/List/handleServerFunction.js.map +1 -1
  1480. package/dist/views/List/index.client.d.ts.map +1 -1
  1481. package/dist/views/List/index.client.js +118 -46
  1482. package/dist/views/List/index.client.js.map +1 -1
  1483. package/dist/views/List/index.css +8 -2
  1484. package/dist/views/List/index.d.ts.map +1 -1
  1485. package/dist/views/List/index.js +93 -12
  1486. package/dist/views/List/index.js.map +1 -1
  1487. package/dist/views/List/renderListViewSlots.d.ts +3 -2
  1488. package/dist/views/List/renderListViewSlots.d.ts.map +1 -1
  1489. package/dist/views/List/renderListViewSlots.js +12 -4
  1490. package/dist/views/List/renderListViewSlots.js.map +1 -1
  1491. package/dist/views/List/resolveDocumentListItemURL.d.ts +11 -0
  1492. package/dist/views/List/resolveDocumentListItemURL.d.ts.map +1 -0
  1493. package/dist/views/List/resolveDocumentListItemURL.js +30 -0
  1494. package/dist/views/List/resolveDocumentListItemURL.js.map +1 -0
  1495. package/dist/views/NotFound/client.d.ts +2 -0
  1496. package/dist/views/NotFound/client.d.ts.map +1 -0
  1497. package/dist/views/NotFound/client.js +4 -0
  1498. package/dist/views/NotFound/client.js.map +1 -0
  1499. package/dist/views/NotFound/index.css +0 -2
  1500. package/dist/views/NotFound/page.d.ts +4 -11
  1501. package/dist/views/NotFound/page.d.ts.map +1 -1
  1502. package/dist/views/NotFound/page.js +6 -5
  1503. package/dist/views/NotFound/page.js.map +1 -1
  1504. package/dist/views/ResetPassword/index.d.ts.map +1 -1
  1505. package/dist/views/ResetPassword/index.js +1 -3
  1506. package/dist/views/ResetPassword/index.js.map +1 -1
  1507. package/dist/views/Root/getCustomCollectionViewByRoute.d.ts.map +1 -1
  1508. package/dist/views/Root/getCustomCollectionViewByRoute.js.map +1 -1
  1509. package/dist/views/Root/getCustomGlobalViewByRoute.d.ts.map +1 -1
  1510. package/dist/views/Root/getCustomGlobalViewByRoute.js.map +1 -1
  1511. package/dist/views/Root/getCustomViewByKey.d.ts.map +1 -1
  1512. package/dist/views/Root/getCustomViewByKey.js.map +1 -1
  1513. package/dist/views/Root/getRouteData.d.ts +1 -8
  1514. package/dist/views/Root/getRouteData.d.ts.map +1 -1
  1515. package/dist/views/Root/getRouteData.js +3 -12
  1516. package/dist/views/Root/getRouteData.js.map +1 -1
  1517. package/dist/views/Root/index.d.ts +6 -7
  1518. package/dist/views/Root/index.d.ts.map +1 -1
  1519. package/dist/views/Root/index.js +34 -24
  1520. package/dist/views/Root/index.js.map +1 -1
  1521. package/dist/views/Unauthorized/index.css +0 -2
  1522. package/dist/views/Unauthorized/index.d.ts.map +1 -1
  1523. package/dist/views/Unauthorized/index.js +2 -1
  1524. package/dist/views/Unauthorized/index.js.map +1 -1
  1525. package/dist/views/Verify/index.d.ts +1 -1
  1526. package/dist/views/Verify/index.d.ts.map +1 -1
  1527. package/dist/views/Verify/index.js +4 -4
  1528. package/dist/views/Verify/index.js.map +1 -1
  1529. package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
  1530. package/dist/views/Version/Default/SetStepNav.js +10 -13
  1531. package/dist/views/Version/Default/SetStepNav.js.map +1 -1
  1532. package/dist/views/Version/Default/index.css +9 -11
  1533. package/dist/views/Version/Default/index.d.ts.map +1 -1
  1534. package/dist/views/Version/Default/index.js +12 -13
  1535. package/dist/views/Version/Default/index.js.map +1 -1
  1536. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.css +0 -1
  1537. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts +1 -0
  1538. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.d.ts.map +1 -1
  1539. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js +56 -50
  1540. package/dist/views/Version/RenderFieldsToDiff/DiffCollapser/index.js.map +1 -1
  1541. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.d.ts.map +1 -1
  1542. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js +43 -39
  1543. package/dist/views/Version/RenderFieldsToDiff/buildVersionFields.js.map +1 -1
  1544. package/dist/views/Version/RenderFieldsToDiff/fields/Checkbox/index.css +0 -1
  1545. package/dist/views/Version/RenderFieldsToDiff/fields/Checkbox/index.d.ts +3 -2
  1546. package/dist/views/Version/RenderFieldsToDiff/fields/Checkbox/index.d.ts.map +1 -1
  1547. package/dist/views/Version/RenderFieldsToDiff/fields/Checkbox/index.js +2 -2
  1548. package/dist/views/Version/RenderFieldsToDiff/fields/Checkbox/index.js.map +1 -1
  1549. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts +3 -2
  1550. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.d.ts.map +1 -1
  1551. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js +2 -2
  1552. package/dist/views/Version/RenderFieldsToDiff/fields/Collapsible/index.js.map +1 -1
  1553. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.css +8 -0
  1554. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.d.ts +3 -2
  1555. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.d.ts.map +1 -1
  1556. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js +2 -2
  1557. package/dist/views/Version/RenderFieldsToDiff/fields/Date/index.js.map +1 -1
  1558. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts +3 -2
  1559. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.d.ts.map +1 -1
  1560. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js +2 -2
  1561. package/dist/views/Version/RenderFieldsToDiff/fields/Group/index.js.map +1 -1
  1562. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.css +3 -4
  1563. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
  1564. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +12 -2
  1565. package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
  1566. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.d.ts.map +1 -1
  1567. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js +1 -0
  1568. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/generateLabelFromValue.js.map +1 -1
  1569. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.css +1 -1
  1570. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +2 -2
  1571. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
  1572. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +2 -2
  1573. package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
  1574. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts +3 -2
  1575. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.d.ts.map +1 -1
  1576. package/dist/views/Version/RenderFieldsToDiff/fields/Row/index.js.map +1 -1
  1577. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +3 -2
  1578. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
  1579. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +2 -2
  1580. package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
  1581. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +3 -2
  1582. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
  1583. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +8 -8
  1584. package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
  1585. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +3 -2
  1586. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
  1587. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +5 -3
  1588. package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
  1589. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.css +1 -1
  1590. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.d.ts +2 -2
  1591. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.d.ts.map +1 -1
  1592. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js +2 -2
  1593. package/dist/views/Version/RenderFieldsToDiff/fields/Upload/index.js.map +1 -1
  1594. package/dist/views/Version/RenderFieldsToDiff/index.css +2 -0
  1595. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.d.ts.map +1 -1
  1596. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js +33 -1
  1597. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.js.map +1 -1
  1598. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts +8 -2
  1599. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.d.ts.map +1 -1
  1600. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js +17 -19
  1601. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.js.map +1 -1
  1602. package/dist/views/Version/Restore/index.d.ts.map +1 -1
  1603. package/dist/views/Version/Restore/index.js +9 -6
  1604. package/dist/views/Version/Restore/index.js.map +1 -1
  1605. package/dist/views/Version/SelectLocales/index.d.ts.map +1 -1
  1606. package/dist/views/Version/SelectLocales/index.js +1 -0
  1607. package/dist/views/Version/SelectLocales/index.js.map +1 -1
  1608. package/dist/views/Version/generateVersionViewMetadata.js.map +1 -1
  1609. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.d.ts.map +1 -1
  1610. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js +2 -3
  1611. package/dist/views/Versions/VersionPillLabel/VersionPillLabel.js.map +1 -1
  1612. package/dist/views/Versions/VersionPillLabel/index.css +2 -2
  1613. package/dist/views/Versions/generateVersionsViewMetadata.js.map +1 -1
  1614. package/dist/views/Versions/index.client.d.ts.map +1 -1
  1615. package/dist/views/Versions/index.client.js +3 -1
  1616. package/dist/views/Versions/index.client.js.map +1 -1
  1617. package/dist/views/Versions/index.css +2 -1
  1618. package/dist/widgets/CollectionCards/index.client.d.ts.map +1 -1
  1619. package/dist/widgets/CollectionCards/index.client.js +8 -6
  1620. package/dist/widgets/CollectionCards/index.client.js.map +1 -1
  1621. package/dist/widgets/CollectionCards/index.css +30 -34
  1622. package/dist/widgets/CollectionCards/index.d.ts.map +1 -1
  1623. package/dist/widgets/CollectionCards/index.js +7 -5
  1624. package/dist/widgets/CollectionCards/index.js.map +1 -1
  1625. package/dist/widgets/CollectionQuery/SortField/index.d.ts +3 -2
  1626. package/dist/widgets/CollectionQuery/SortField/index.d.ts.map +1 -1
  1627. package/dist/widgets/CollectionQuery/SortField/index.js.map +1 -1
  1628. package/dist/widgets/CollectionQuery/index.css +4 -6
  1629. package/dist/widgets/RecentlyViewed/CollectionsField/index.d.ts +4 -3
  1630. package/dist/widgets/RecentlyViewed/CollectionsField/index.d.ts.map +1 -1
  1631. package/dist/widgets/RecentlyViewed/CollectionsField/index.js +32 -6
  1632. package/dist/widgets/RecentlyViewed/CollectionsField/index.js.map +1 -1
  1633. package/dist/widgets/RecentlyViewed/PinDocumentPicker/index.css +41 -0
  1634. package/dist/widgets/RecentlyViewed/PinDocumentPicker/index.d.ts +19 -0
  1635. package/dist/widgets/RecentlyViewed/PinDocumentPicker/index.d.ts.map +1 -0
  1636. package/dist/widgets/RecentlyViewed/PinDocumentPicker/index.js +121 -0
  1637. package/dist/widgets/RecentlyViewed/PinDocumentPicker/index.js.map +1 -0
  1638. package/dist/widgets/RecentlyViewed/getDocuments.d.ts +20 -0
  1639. package/dist/widgets/RecentlyViewed/getDocuments.d.ts.map +1 -0
  1640. package/dist/widgets/RecentlyViewed/getDocuments.js +254 -0
  1641. package/dist/widgets/RecentlyViewed/getDocuments.js.map +1 -0
  1642. package/dist/widgets/RecentlyViewed/index.client.d.ts +41 -0
  1643. package/dist/widgets/RecentlyViewed/index.client.d.ts.map +1 -0
  1644. package/dist/widgets/RecentlyViewed/index.client.js +409 -0
  1645. package/dist/widgets/RecentlyViewed/index.client.js.map +1 -0
  1646. package/dist/widgets/RecentlyViewed/index.css +352 -0
  1647. package/dist/widgets/RecentlyViewed/index.d.ts +1 -1
  1648. package/dist/widgets/RecentlyViewed/index.d.ts.map +1 -1
  1649. package/dist/widgets/RecentlyViewed/index.js +33 -134
  1650. package/dist/widgets/RecentlyViewed/index.js.map +1 -1
  1651. package/dist/widgets/RecentlyViewed/pinnedPreferences.d.ts +18 -0
  1652. package/dist/widgets/RecentlyViewed/pinnedPreferences.d.ts.map +1 -0
  1653. package/dist/widgets/RecentlyViewed/pinnedPreferences.js +81 -0
  1654. package/dist/widgets/RecentlyViewed/pinnedPreferences.js.map +1 -0
  1655. package/dist/widgets/RecentlyViewed/recents.d.ts +8 -0
  1656. package/dist/widgets/RecentlyViewed/recents.d.ts.map +1 -0
  1657. package/dist/widgets/RecentlyViewed/recents.js +19 -0
  1658. package/dist/widgets/RecentlyViewed/recents.js.map +1 -0
  1659. package/dist/widgets/UploadDropzone/CollectionsField/index.d.ts +4 -0
  1660. package/dist/widgets/UploadDropzone/CollectionsField/index.d.ts.map +1 -0
  1661. package/dist/widgets/UploadDropzone/CollectionsField/index.js +29 -0
  1662. package/dist/widgets/UploadDropzone/CollectionsField/index.js.map +1 -0
  1663. package/dist/widgets/UploadDropzone/index.client.d.ts +10 -0
  1664. package/dist/widgets/UploadDropzone/index.client.d.ts.map +1 -0
  1665. package/dist/widgets/UploadDropzone/index.client.js +78 -0
  1666. package/dist/widgets/UploadDropzone/index.client.js.map +1 -0
  1667. package/dist/widgets/UploadDropzone/index.css +80 -0
  1668. package/dist/widgets/UploadDropzone/index.d.ts +12 -0
  1669. package/dist/widgets/UploadDropzone/index.d.ts.map +1 -0
  1670. package/dist/widgets/UploadDropzone/index.js +58 -0
  1671. package/dist/widgets/UploadDropzone/index.js.map +1 -0
  1672. package/dist/widgets/Welcome/getWelcomeDisplay.d.ts +7 -0
  1673. package/dist/widgets/Welcome/getWelcomeDisplay.d.ts.map +1 -0
  1674. package/dist/widgets/Welcome/getWelcomeDisplay.js +21 -0
  1675. package/dist/widgets/Welcome/getWelcomeDisplay.js.map +1 -0
  1676. package/dist/widgets/Welcome/index.css +25 -0
  1677. package/dist/widgets/Welcome/index.d.ts +5 -0
  1678. package/dist/widgets/Welcome/index.d.ts.map +1 -0
  1679. package/dist/widgets/Welcome/index.js +25 -0
  1680. package/dist/widgets/Welcome/index.js.map +1 -0
  1681. package/dist/widgets/WidgetCard/index.css +4 -8
  1682. package/package.json +41 -10
  1683. package/dist/elements/ClipboardAction/clipboardUtilities.spec.js +0 -120
  1684. package/dist/elements/ClipboardAction/clipboardUtilities.spec.js.map +0 -1
  1685. package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js +0 -144
  1686. package/dist/elements/ClipboardAction/isClipboardDataValid.spec.js.map +0 -1
  1687. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js +0 -541
  1688. package/dist/elements/ClipboardAction/mergeFormStateFromClipboard.spec.js.map +0 -1
  1689. package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js +0 -87
  1690. package/dist/elements/ColumnSelection/matchesColumnSearch.spec.js.map +0 -1
  1691. package/dist/elements/CommandPalette/buildActions.spec.js +0 -158
  1692. package/dist/elements/CommandPalette/buildActions.spec.js.map +0 -1
  1693. package/dist/elements/CommandPalette/highlightLabel.spec.js +0 -78
  1694. package/dist/elements/CommandPalette/highlightLabel.spec.js.map +0 -1
  1695. package/dist/elements/FieldSelect/reduceFieldOptions.spec.js +0 -143
  1696. package/dist/elements/FieldSelect/reduceFieldOptions.spec.js.map +0 -1
  1697. package/dist/elements/Toasts/fieldErrors.spec.js +0 -46
  1698. package/dist/elements/Toasts/fieldErrors.spec.js.map +0 -1
  1699. package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js +0 -152
  1700. package/dist/elements/WhereBuilder/Condition/Relationship/optionsReducer.spec.js.map +0 -1
  1701. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts +0 -2
  1702. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.d.ts.map +0 -1
  1703. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js +0 -67
  1704. package/dist/forms/fieldSchemasToFormState/fieldSchemasToFormState.spec.js.map +0 -1
  1705. package/dist/layouts/Root/index.spec.js +0 -20
  1706. package/dist/layouts/Root/index.spec.js.map +0 -1
  1707. package/dist/providers/Root/index.d.ts +0 -25
  1708. package/dist/providers/Root/index.d.ts.map +0 -1
  1709. package/dist/providers/Root/index.js +0 -155
  1710. package/dist/providers/Root/index.js.map +0 -1
  1711. package/dist/providers/TableColumns/buildColumnState/index.spec.js +0 -40
  1712. package/dist/providers/TableColumns/buildColumnState/index.spec.js.map +0 -1
  1713. package/dist/utilities/appendCacheTag.spec.js +0 -34
  1714. package/dist/utilities/appendCacheTag.spec.js.map +0 -1
  1715. package/dist/utilities/dateLocales.d.ts +0 -30
  1716. package/dist/utilities/dateLocales.d.ts.map +0 -1
  1717. package/dist/utilities/dateLocales.js +0 -57
  1718. package/dist/utilities/dateLocales.js.map +0 -1
  1719. package/dist/utilities/formatMetadata.spec.js +0 -83
  1720. package/dist/utilities/formatMetadata.spec.js.map +0 -1
  1721. package/dist/utilities/fuzzyMatch.spec.js +0 -38
  1722. package/dist/utilities/fuzzyMatch.spec.js.map +0 -1
  1723. package/dist/utilities/getRequestLocale.d.ts +0 -7
  1724. package/dist/utilities/getRequestLocale.d.ts.map +0 -1
  1725. package/dist/utilities/getRequestLocale.js +0 -20
  1726. package/dist/utilities/getRequestLocale.js.map +0 -1
  1727. package/dist/utilities/initReq.d.ts +0 -16
  1728. package/dist/utilities/initReq.d.ts.map +0 -1
  1729. package/dist/utilities/initReq.js +0 -111
  1730. package/dist/utilities/initReq.js.map +0 -1
  1731. package/dist/utilities/isCustomAdminView.spec.js +0 -90
  1732. package/dist/utilities/isCustomAdminView.spec.js.map +0 -1
  1733. package/dist/utilities/isPathMatchingRoute.spec.js +0 -178
  1734. package/dist/utilities/isPathMatchingRoute.spec.js.map +0 -1
  1735. package/dist/utilities/normalizeRelationshipValue.spec.js +0 -373
  1736. package/dist/utilities/normalizeRelationshipValue.spec.js.map +0 -1
  1737. package/dist/utilities/recentlyViewed.spec.js +0 -92
  1738. package/dist/utilities/recentlyViewed.spec.js.map +0 -1
  1739. package/dist/utilities/selectiveCache.d.ts +0 -12
  1740. package/dist/utilities/selectiveCache.d.ts.map +0 -1
  1741. package/dist/utilities/selectiveCache.js +0 -37
  1742. package/dist/utilities/selectiveCache.js.map +0 -1
  1743. package/dist/views/Root/getCustomCollectionViewByRoute.spec.js +0 -168
  1744. package/dist/views/Root/getCustomCollectionViewByRoute.spec.js.map +0 -1
  1745. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js +0 -861
  1746. package/dist/views/Version/RenderFieldsToDiff/utilities/countChangedFields.spec.js.map +0 -1
  1747. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js +0 -47
  1748. package/dist/views/Version/RenderFieldsToDiff/utilities/fieldHasChanges.spec.js.map +0 -1
  1749. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js +0 -135
  1750. package/dist/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.spec.js.map +0 -1
  1751. package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js +0 -100
  1752. package/dist/widgets/CollectionQuery/getCollectionFieldPaths.spec.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/elements/DatePicker/DatePicker.tsx", "../../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addDays.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMonths.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMilliseconds.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addHours.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/defaultOptions.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeekYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfDay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarDays.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfISOWeekYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addMinutes.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addQuarters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addSeconds.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addWeeks.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/addYears.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/max.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/min.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameDay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isValid.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarMonths.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getQuarter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarQuarters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInCalendarYears.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/differenceInDays.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfDay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfQuarter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/endOfWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/localize.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/match.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDayOfYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISOWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeekYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeekYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/longFormatters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/protectedTokens.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/format.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDate.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDaysInMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getDefaultOptions.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getHours.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getISODay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getMinutes.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getSeconds.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getTime.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/getYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isAfter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isBefore.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isEqual.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/transpose.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/Setter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/Parser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/EraParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/constants.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/utils.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/YearParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/MonthParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setISOWeek.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/DateParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setDay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/DayParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setISODay.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/SecondParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse/_lib/parsers.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parse.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameQuarter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isSameYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isWithinInterval.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subDays.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/parseISO.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setMonth.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setHours.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setMinutes.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setQuarter.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setSeconds.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/setYear.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subMonths.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subQuarters.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subWeeks.js", "../../../../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/subYears.js", "../../../../../node_modules/.pnpm/@floating-ui+react@0.27.20_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.mjs", "../../../../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs", "../../../../../node_modules/.pnpm/@floating-ui+react@0.27.20_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs", "../../../../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs", "../../../../../node_modules/.pnpm/tabbable@6.5.0/node_modules/tabbable/src/index.js", "../../../../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs", "../../../../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs", "../../../../../node_modules/.pnpm/@floating-ui+react-dom@2.1.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/node_modules/tslib/tslib.es6.js", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/calendar_container.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/click_outside_wrapper.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/date_utils.ts", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/input_time.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/day.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/week_number.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/week.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/month.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/month_dropdown_options.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/month_dropdown.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/month_year_dropdown_options.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/month_year_dropdown.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/time.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/year.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/year_dropdown_options.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/year_dropdown.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/calendar.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/calendar_icon.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/portal.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/tab_loop.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/with_floating.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/popper_component.tsx", "../../../../../node_modules/.pnpm/react-datepicker@9.1.0_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-datepicker/src/index.tsx", "../../../src/icons/Calendar/index.tsx", "../../../src/icons/Chevron/index.tsx", "../../../src/providers/Translation/index.tsx", "../../../src/providers/ServerFunctions/index.tsx", "../../../src/elements/DatePicker/getFormattedLocale.ts", "../../../src/elements/DatePicker/hasAmbiguousYearInput.ts", "../../../src/elements/DatePicker/useDatePickerKeyboard.ts"],
4
+ "sourcesContent": ["'use client'\nimport type { DatePickerProps } from 'react-datepicker'\n\nimport React from 'react'\nimport ReactDatePickerDefaultImport, { registerLocale, setDefaultLocale } from 'react-datepicker'\nimport { createPortal, flushSync } from 'react-dom'\nconst ReactDatePicker =\n 'default' in ReactDatePickerDefaultImport\n ? ReactDatePickerDefaultImport.default\n : ReactDatePickerDefaultImport\n\nimport type { Props } from './types.js'\n\nimport { CalendarIcon } from '../../icons/Calendar/index.js'\nimport { ChevronIcon } from '../../icons/Chevron/index.js'\nimport { useTranslation } from '../../providers/Translation/index.js'\nimport { getFormattedLocale } from './getFormattedLocale.js'\nimport { hasAmbiguousYearInput } from './hasAmbiguousYearInput.js'\nimport { useDatePickerKeyboard } from './useDatePickerKeyboard.js'\nimport './index.css'\n\nconst baseClass = 'date-time-picker'\n\ntype AccessibleCalendarContainerProps = React.PropsWithChildren<{\n className?: string\n containerRef: React.RefObject<HTMLDivElement | null>\n dialogLabel: string\n monthLabel: string\n onKeyDown: React.KeyboardEventHandler<HTMLDivElement>\n yearLabel: string\n}>\n\nconst AccessibleCalendarContainer: React.FC<AccessibleCalendarContainerProps> = ({\n children,\n className,\n containerRef,\n dialogLabel,\n monthLabel,\n onKeyDown,\n yearLabel,\n}) => {\n React.useLayoutEffect(() => {\n containerRef.current\n ?.querySelector<HTMLSelectElement>('.react-datepicker__month-select')\n ?.setAttribute('aria-label', monthLabel)\n containerRef.current\n ?.querySelector<HTMLSelectElement>('.react-datepicker__year-select')\n ?.setAttribute('aria-label', yearLabel)\n })\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- Handle Escape bubbling from the dialog's interactive children.\n <div\n aria-label={dialogLabel}\n className={className}\n onKeyDown={onKeyDown}\n ref={containerRef}\n role=\"dialog\"\n >\n {children}\n </div>\n )\n}\n\nconst getDateTimeFieldLabel = ({ field, locale }: { field: 'month' | 'year'; locale: string }) => {\n try {\n return new Intl.DisplayNames(locale, { type: 'dateTimeField' }).of(field) || field\n } catch (_error) {\n return field\n }\n}\n\nconst DatePicker: React.FC<Props> = (props) => {\n const {\n id,\n displayFormat: customDisplayFormat,\n maxDate,\n maxTime,\n minDate,\n minTime,\n monthsToShow = 1,\n onChange: onChangeFromProps,\n overrides,\n pickerAppearance = 'default',\n placeholder: placeholderText,\n readOnly,\n timeFormat = 'h:mm aa',\n timeIntervals = 30,\n value,\n } = props\n\n const {\n calendarRef,\n datePickerRef,\n onBlur,\n onCalendarClose,\n onCalendarKeyDown,\n onCalendarOpen,\n onChangeRaw,\n onKeyDown,\n onKeyDownCapture,\n } = useDatePickerKeyboard(props)\n const rejectedInputValueRef = React.useRef<string | undefined>(undefined)\n const [modalContainer, setModalContainer] = React.useState<Element | null>(null)\n const setContainerRef = React.useCallback((element: HTMLDivElement | null) => {\n setModalContainer(element?.closest('dialog, [role=\"dialog\"]') ?? null)\n }, [])\n const popperContainer = React.useCallback<React.FC<React.PropsWithChildren>>(\n ({ children }) => (modalContainer ? createPortal(children, modalContainer) : children),\n [modalContainer],\n )\n\n // Use the user's AdminUI language preference for the locale\n const { i18n, t } = useTranslation()\n const monthLabel = getDateTimeFieldLabel({ field: 'month', locale: i18n.language })\n const yearLabel = getDateTimeFieldLabel({ field: 'year', locale: i18n.language })\n const CustomCalendarContainer = overrides?.calendarContainer\n const calendarContainer = React.useCallback(\n ({ children, className, ...containerProps }) =>\n CustomCalendarContainer ? (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- Handle Escape bubbling from the custom calendar's interactive children.\n <div onKeyDown={onCalendarKeyDown} ref={calendarRef} style={{ display: 'contents' }}>\n <CustomCalendarContainer {...containerProps} className={className}>\n {children}\n </CustomCalendarContainer>\n </div>\n ) : (\n <AccessibleCalendarContainer\n className={className}\n containerRef={calendarRef}\n dialogLabel={`${t('general:selectValue')}: ${monthLabel}, ${yearLabel}`}\n monthLabel={monthLabel}\n onKeyDown={onCalendarKeyDown}\n yearLabel={yearLabel}\n >\n {children}\n </AccessibleCalendarContainer>\n ),\n [CustomCalendarContainer, calendarRef, monthLabel, onCalendarKeyDown, t, yearLabel],\n )\n\n let dateFormat = customDisplayFormat\n\n if (!customDisplayFormat) {\n // when no displayFormat is provided, determine format based on the picker appearance\n if (pickerAppearance === 'default') {\n dateFormat = 'MM/dd/yyyy'\n } else if (pickerAppearance === 'dayAndTime') {\n dateFormat = 'MMM d, yyy h:mm a'\n } else if (pickerAppearance === 'timeOnly') {\n dateFormat = 'h:mm a'\n } else if (pickerAppearance === 'dayOnly') {\n dateFormat = 'MMM dd'\n } else if (pickerAppearance === 'monthOnly') {\n dateFormat = 'MMMM'\n }\n }\n\n const onChange: Extract<\n DatePickerProps,\n { selectsMultiple?: false; selectsRange?: false }\n >['onChange'] = (incomingDate, event) => {\n const newDate = incomingDate\n\n const inputValue =\n event?.target instanceof HTMLInputElement\n ? event.target.value\n : !event\n ? rejectedInputValueRef.current\n : undefined\n\n if (\n hasAmbiguousYearInput({\n date: newDate,\n dateFormat: overrides?.dateFormat ?? dateFormat,\n inputValue,\n locale: overrides?.locale,\n })\n ) {\n const picker = datePickerRef.current\n\n rejectedInputValueRef.current = inputValue\n picker?.setPreSelection(picker.calcInitialState().preSelection)\n return\n }\n rejectedInputValueRef.current = undefined\n\n if (newDate instanceof Date && ['dayOnly', 'default', 'monthOnly'].includes(pickerAppearance)) {\n const tzOffset = incomingDate.getTimezoneOffset() / 60\n newDate.setHours(12 - tzOffset, 0)\n }\n\n if (newDate instanceof Date && !dateFormat.includes('SSS')) {\n // Unless the dateFormat includes milliseconds, set milliseconds to 0\n // This is to ensure that the timestamp is consistent with the displayFormat\n newDate.setMilliseconds(0)\n }\n\n if (typeof onChangeFromProps === 'function') {\n onChangeFromProps(newDate)\n }\n }\n\n const dateTimePickerProps: Extract<\n DatePickerProps,\n { selectsMultiple?: false; selectsRange?: false }\n > = {\n customInputRef: 'ref',\n dateFormat,\n disabled: readOnly,\n maxDate,\n maxTime,\n minDate,\n minTime,\n monthsShown: Math.min(2, monthsToShow),\n nextMonthButtonLabel: <ChevronIcon direction=\"right\" />,\n nextYearButtonLabel: '›',\n onChange,\n placeholderText,\n popperContainer: modalContainer ? popperContainer : undefined,\n popperPlacement: 'bottom-start',\n portalId: modalContainer ? undefined : 'date-time-picker-portal',\n preventOpenOnFocus: true,\n previousMonthButtonLabel: <ChevronIcon direction=\"left\" />,\n previousYearButtonLabel: '‹',\n selected: value && new Date(value),\n shouldCloseOnSelect: false,\n showMonthYearPicker: pickerAppearance === 'monthOnly',\n showPopperArrow: false,\n showTimeSelect: pickerAppearance === 'dayAndTime' || pickerAppearance === 'timeOnly',\n showTimeSelectOnly: pickerAppearance === 'timeOnly',\n timeFormat,\n timeIntervals,\n ...(overrides as Extract<\n DatePickerProps,\n { selectsMultiple?: false; selectsRange?: false } // to satisfy TypeScript. Overrides can enable selectsMultiple or selectsRange but then it's up to the user to ensure they pass in the correct onChange\n >),\n calendarContainer,\n onBlur,\n onCalendarClose,\n onCalendarOpen,\n onChangeRaw,\n onKeyDown,\n }\n\n const onBlurCapture = (event: React.FocusEvent<HTMLDivElement>) => {\n const input = event.target\n\n if (input !== datePickerRef.current?.input || !(input instanceof HTMLInputElement)) {\n return\n }\n\n if (/[a-z0-9]/i.test(input.value) || !/[\\p{L}\\p{N}]/u.test(input.value)) {\n return\n }\n\n // react-datepicker 9.1 treats non-Latin input as an empty mask.\n // Reset raw text synchronously before its blur handler can clear the selected date.\n // eslint-disable-next-line @eslint-react/dom/no-flush-sync -- Programmatic blur also requires the reset before the upstream handler runs.\n flushSync(() => datePickerRef.current?.resetInputValue())\n }\n\n const classes = [baseClass, `${baseClass}__appearance--${pickerAppearance}`]\n .filter(Boolean)\n .join(' ')\n\n React.useEffect(() => {\n if (i18n.dateFNS) {\n try {\n const datepickerLocale = getFormattedLocale(i18n.language)\n registerLocale(datepickerLocale, i18n.dateFNS)\n setDefaultLocale(datepickerLocale)\n } catch (_error) {\n // eslint-disable-next-line no-console\n console.warn(`Could not find DatePicker locale for ${i18n.language}`)\n }\n }\n }, [i18n.language, i18n.dateFNS])\n\n return (\n <div\n className={classes}\n id={id}\n onBlurCapture={onBlurCapture}\n onKeyDownCapture={onKeyDownCapture}\n ref={setContainerRef}\n >\n <div className={`${baseClass}__input-wrapper`}>\n <ReactDatePicker\n ref={datePickerRef}\n {...dateTimePickerProps}\n dropdownMode=\"select\"\n showMonthDropdown={pickerAppearance !== 'monthOnly'}\n showYearDropdown={pickerAppearance !== 'monthOnly'}\n />\n <CalendarIcon />\n </div>\n </div>\n )\n}\n\n// eslint-disable-next-line no-restricted-exports\nexport default DatePicker\n", "function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;", "/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n", "import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n", "import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * **You don't need date-fns\\***:\n *\n * Temporal has a built-in `add` method on all its classes:\n *\n * - [`Temporal.Instant.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)\n * - [`Temporal.PlainDate.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)\n * - [`Temporal.PlainDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)\n * - [`Temporal.PlainTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)\n * - [`Temporal.PlainYearMonth.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)\n * - [`Temporal.ZonedDateTime.prototype.add()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)\n *\n * \\* **Not really**, see: https://date-fns.org/you-dont-need-date-fns\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n *\n * @example\n * // Using Temporal:\n * // Add 10 days to 1 September 2014:\n * Temporal.PlainDate.from(\"2014-09-01\").add({ days: 10 }).toString();\n * //=> \"2014-09-11\"\n */\nexport function addDays(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n if (!amount) return _date;\n\n _date.setDate(_date.getDate() + amount);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMilliseconds} function options.\n */\n\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of milliseconds to be added.\n * @param options - The options object\n *\n * @returns The new date with the milliseconds added\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\nexport function addMilliseconds(date, amount, options) {\n return constructFrom(options?.in || date, +toDate(date) + amount);\n}\n\n// Fallback for modularized imports:\nexport default addMilliseconds;\n", "import { addMilliseconds } from \"./addMilliseconds.js\";\nimport { millisecondsInHour } from \"./constants.js\";\n\n/**\n * The {@link addHours} function options.\n */\n\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of hours to be added\n * @param options - An object with options\n *\n * @returns The new date with the hours added\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\nexport function addHours(date, amount, options) {\n return addMilliseconds(date, amount * millisecondsInHour, options);\n}\n\n// Fallback for modularized imports:\nexport default addHours;\n", "let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n", "import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n", "import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n", "import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n", "import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n", "import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n", "import { millisecondsInMinute } from \"./constants.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMinutes} function options.\n */\n\n/**\n * @name addMinutes\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of minutes to be added.\n * @param options - An object with options\n *\n * @returns The new date with the minutes added\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\nexport function addMinutes(date, amount, options) {\n const _date = toDate(date, options?.in);\n _date.setTime(_date.getTime() + amount * millisecondsInMinute);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default addMinutes;\n", "import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addQuarters} function options.\n */\n\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of quarters to be added.\n * @param options - An object with options\n *\n * @returns The new date with the quarters added\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=; Mon Dec 01 2014 00:00:00\n */\nexport function addQuarters(date, amount, options) {\n return addMonths(date, amount * 3, options);\n}\n\n// Fallback for modularized imports:\nexport default addQuarters;\n", "import { addMilliseconds } from \"./addMilliseconds.js\";\n\n/**\n * The {@link addSeconds} function options.\n */\n\n/**\n * @name addSeconds\n * @category Second Helpers\n * @summary Add the specified number of seconds to the given date.\n *\n * @description\n * Add the specified number of seconds to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of seconds to be added.\n * @param options - An object with options\n *\n * @returns The new date with the seconds added\n *\n * @example\n * // Add 30 seconds to 10 July 2014 12:45:00:\n * const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:45:30\n */\nexport function addSeconds(date, amount, options) {\n return addMilliseconds(date, amount * 1000, options);\n}\n\n// Fallback for modularized imports:\nexport default addSeconds;\n", "import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n", "import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result < date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n let result;\n let context = options?.in;\n\n dates.forEach((date) => {\n // Use the first date object as the context function\n if (!context && typeof date === \"object\")\n context = constructFrom.bind(null, date);\n\n const date_ = toDate(date, context);\n if (!result || result > date_ || isNaN(+date_)) result = date_;\n });\n\n return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n", "/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n", "import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getQuarter} function options.\n */\n\n/**\n * @name getQuarter\n * @category Quarter Helpers\n * @summary Get the year quarter of the given date.\n *\n * @description\n * Get the year quarter of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The quarter\n *\n * @example\n * // Which quarter is 2 July 2014?\n * const result = getQuarter(new Date(2014, 6, 2));\n * //=> 3\n */\nexport function getQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const quarter = Math.trunc(_date.getMonth() / 3) + 1;\n return quarter;\n}\n\n// Fallback for modularized imports:\nexport default getQuarter;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { getQuarter } from \"./getQuarter.js\";\n\n/**\n * The {@link differenceInCalendarQuarters} function options.\n */\n\n/**\n * @name differenceInCalendarQuarters\n * @category Quarter Helpers\n * @summary Get the number of calendar quarters between the given dates.\n *\n * @description\n * Get the number of calendar quarters between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar quarters\n *\n * @example\n * // How many calendar quarters are between 31 December 2013 and 2 July 2014?\n * const result = differenceInCalendarQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 3\n */\nexport function differenceInCalendarQuarters(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n const quartersDiff = getQuarter(laterDate_) - getQuarter(earlierDate_);\n\n return yearsDiff * 4 + quartersDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarQuarters;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarYears} function options.\n */\n\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n\n * @returns The number of calendar years\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * );\n * //=> 2\n */\nexport function differenceInCalendarYears(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() - earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarYears;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\n\n/**\n * The {@link differenceInDays} function options.\n */\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of full days according to the local timezone\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n *\n * @example\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n * //=> 92\n */\nexport function differenceInDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const sign = compareLocalAsc(laterDate_, earlierDate_);\n const difference = Math.abs(\n differenceInCalendarDays(laterDate_, earlierDate_),\n );\n\n laterDate_.setDate(laterDate_.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n const isLastDayNotFull = Number(\n compareLocalAsc(laterDate_, earlierDate_) === -sign,\n );\n\n const result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(laterDate, earlierDate) {\n const diff =\n laterDate.getFullYear() - earlierDate.getFullYear() ||\n laterDate.getMonth() - earlierDate.getMonth() ||\n laterDate.getDate() - earlierDate.getDate() ||\n laterDate.getHours() - earlierDate.getHours() ||\n laterDate.getMinutes() - earlierDate.getMinutes() ||\n laterDate.getSeconds() - earlierDate.getSeconds() ||\n laterDate.getMilliseconds() - earlierDate.getMilliseconds();\n\n if (diff < 0) return -1;\n if (diff > 0) return 1;\n\n // Return 0 if diff is 0; return NaN if diff is NaN\n return diff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInDays;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfDay} function options.\n */\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfQuarter} function options.\n */\n\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a quarter\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\nexport function startOfQuarter(date, options) {\n const _date = toDate(date, options?.in);\n const currentMonth = _date.getMonth();\n const month = currentMonth - (currentMonth % 3);\n _date.setMonth(month, 1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfQuarter;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n _date.setFullYear(year + 1, 0, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n", "import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n", "const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n", "export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n", "import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n", "const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n", "/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n", "import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n", "export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n", "export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n", "import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n", "import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n", "import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n", "import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n", "import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n", "import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n", "import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n", "export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n", "import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n", "import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n", "const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n", "const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n", "import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > \u26A0\uFE0F Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDate} function options.\n */\n\n/**\n * @name getDate\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * const result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\nexport function getDate(date, options) {\n return toDate(date, options?.in).getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDate;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDay} function options.\n */\n\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of week, 0 represents Sunday\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport function getDay(date, options) {\n return toDate(date, options?.in).getDay();\n}\n\n// Fallback for modularized imports:\nexport default getDay;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n", "import { getDefaultOptions as getInternalDefaultOptions } from \"./_lib/defaultOptions.js\";\n\n/**\n * @name getDefaultOptions\n * @category Common Helpers\n * @summary Get default options.\n * @pure false\n *\n * @description\n * Returns an object that contains defaults for\n * `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`\n * arguments for all functions.\n *\n * You can change these with [setDefaultOptions](https://date-fns.org/docs/setDefaultOptions).\n *\n * @returns The default options\n *\n * @example\n * const result = getDefaultOptions()\n * //=> {}\n *\n * @example\n * setDefaultOptions({ weekStarsOn: 1, firstWeekContainsDate: 4 })\n * const result = getDefaultOptions()\n * //=> { weekStarsOn: 1, firstWeekContainsDate: 4 }\n */\nexport function getDefaultOptions() {\n return Object.assign({}, getInternalDefaultOptions());\n}\n\n// Fallback for modularized imports:\nexport default getDefaultOptions;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getHours} function options.\n */\n\n/**\n * @name getHours\n * @category Hour Helpers\n * @summary Get the hours of the given date.\n *\n * @description\n * Get the hours of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The hours\n *\n * @example\n * // Get the hours of 29 February 2012 11:45:00:\n * const result = getHours(new Date(2012, 1, 29, 11, 45))\n * //=> 11\n */\nexport function getHours(date, options) {\n return toDate(date, options?.in).getHours();\n}\n\n// Fallback for modularized imports:\nexport default getHours;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISODay} function options.\n */\n\n/**\n * @name getISODay\n * @category Weekday Helpers\n * @summary Get the day of the ISO week of the given date.\n *\n * @description\n * Get the day of the ISO week of the given date,\n * which is 7 for Sunday, 1 for Monday etc.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The day of ISO week\n *\n * @example\n * // Which day of the ISO week is 26 February 2012?\n * const result = getISODay(new Date(2012, 1, 26))\n * //=> 7\n */\nexport function getISODay(date, options) {\n const day = toDate(date, options?.in).getDay();\n return day === 0 ? 7 : day;\n}\n\n// Fallback for modularized imports:\nexport default getISODay;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMinutes} function options.\n */\n\n/**\n * @name getMinutes\n * @category Minute Helpers\n * @summary Get the minutes of the given date.\n *\n * @description\n * Get the minutes of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The minutes\n *\n * @example\n * // Get the minutes of 29 February 2012 11:45:05:\n * const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 45\n */\nexport function getMinutes(date, options) {\n return toDate(date, options?.in).getMinutes();\n}\n\n// Fallback for modularized imports:\nexport default getMinutes;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * @name getSeconds\n * @category Second Helpers\n * @summary Get the seconds of the given date.\n *\n * @description\n * Get the seconds of the given date.\n *\n * @param date - The given date\n *\n * @returns The seconds\n *\n * @example\n * // Get the seconds of 29 February 2012 11:45:05.123:\n * const result = getSeconds(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 5\n */\nexport function getSeconds(date) {\n return toDate(date).getSeconds();\n}\n\n// Fallback for modularized imports:\nexport default getSeconds;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * @name getTime\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param date - The given date\n *\n * @returns The timestamp\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\nexport function getTime(date) {\n return +toDate(date);\n}\n\n// Fallback for modularized imports:\nexport default getTime;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n return +toDate(leftDate) === +toDate(rightDate);\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n", "import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name transpose\n * @category Generic Helpers\n * @summary Transpose the date to the given constructor.\n *\n * @description\n * The function transposes the date to the given constructor. It helps you\n * to transpose the date in the system time zone to say `UTCDate` or any other\n * date extension.\n *\n * @typeParam InputDate - The input `Date` type derived from the passed argument.\n * @typeParam ResultDate - The result `Date` type derived from the passed constructor.\n *\n * @param date - The date to use values from\n * @param constructor - The date constructor to use\n *\n * @returns Date transposed to the given constructor\n *\n * @example\n * // Create July 10, 2022 00:00 in locale time zone\n * const date = new Date(2022, 6, 10)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'\n *\n * @example\n * // Transpose the date to July 10, 2022 00:00 in UTC\n * transpose(date, UTCDate)\n * //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'\n */\nexport function transpose(date, constructor) {\n const date_ = isConstructor(constructor)\n ? new constructor(0)\n : constructFrom(constructor, 0);\n date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n date_.setHours(\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds(),\n );\n return date_;\n}\n\nfunction isConstructor(constructor) {\n return (\n typeof constructor === \"function\" &&\n constructor.prototype?.constructor === constructor\n );\n}\n\n// Fallback for modularized imports:\nexport default transpose;\n", "import { constructFrom } from \"../../constructFrom.js\";\nimport { transpose } from \"../../transpose.js\";\n\nconst TIMEZONE_UNIT_PRIORITY = 10;\n\nexport class Setter {\n subPriority = 0;\n\n validate(_utcDate, _options) {\n return true;\n }\n}\n\nexport class ValueSetter extends Setter {\n constructor(\n value,\n validateValue,\n\n setValue,\n\n priority,\n subPriority,\n ) {\n super();\n this.value = value;\n this.validateValue = validateValue;\n this.setValue = setValue;\n this.priority = priority;\n if (subPriority) {\n this.subPriority = subPriority;\n }\n }\n\n validate(date, options) {\n return this.validateValue(date, this.value, options);\n }\n\n set(date, flags, options) {\n return this.setValue(date, flags, this.value, options);\n }\n}\n\nexport class DateTimezoneSetter extends Setter {\n priority = TIMEZONE_UNIT_PRIORITY;\n subPriority = -1;\n\n constructor(context, reference) {\n super();\n this.context = context || ((date) => constructFrom(reference, date));\n }\n\n set(date, flags) {\n if (flags.timestampIsSet) return date;\n return constructFrom(date, transpose(date, this.context));\n }\n}\n", "import { ValueSetter } from \"./Setter.js\";\n\nexport class Parser {\n run(dateString, token, match, options) {\n const result = this.parse(dateString, token, match, options);\n if (!result) {\n return null;\n }\n\n return {\n setter: new ValueSetter(\n result.value,\n this.validate,\n this.set,\n this.priority,\n this.subPriority,\n ),\n rest: result.rest,\n };\n }\n\n validate(_utcDate, _value, _options) {\n return true;\n }\n}\n", "import { Parser } from \"../Parser.js\";\n\nexport class EraParser extends Parser {\n priority = 140;\n\n parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return (\n match.era(dateString, { width: \"abbreviated\" }) ||\n match.era(dateString, { width: \"narrow\" })\n );\n\n // A, B\n case \"GGGGG\":\n return match.era(dateString, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return (\n match.era(dateString, { width: \"wide\" }) ||\n match.era(dateString, { width: \"abbreviated\" }) ||\n match.era(dateString, { width: \"narrow\" })\n );\n }\n }\n\n set(date, flags, value) {\n flags.era = value;\n date.setFullYear(value, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"R\", \"u\", \"t\", \"T\"];\n}\n", "export const numericPatterns = {\n month: /^(1[0-2]|0?\\d)/, // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/, // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/, // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/, // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/, // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/, // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/, // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/, // 0 to 12\n minute: /^[0-5]?\\d/, // 0 to 59\n second: /^[0-5]?\\d/, // 0 to 59\n\n singleDigit: /^\\d/, // 0 to 9\n twoDigits: /^\\d{1,2}/, // 0 to 99\n threeDigits: /^\\d{1,3}/, // 0 to 999\n fourDigits: /^\\d{1,4}/, // 0 to 9999\n\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/, // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/, // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/, // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/, // 0 to 9999, -0 to -9999\n};\n\nexport const timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/,\n};\n", "import {\n millisecondsInHour,\n millisecondsInMinute,\n millisecondsInSecond,\n} from \"../../constants.js\";\n\nimport { numericPatterns } from \"./constants.js\";\n\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest,\n };\n}\n\nexport function parseNumericPattern(pattern, dateString) {\n const matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length),\n };\n}\n\nexport function parseTimezonePattern(pattern, dateString) {\n const matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n // Input is 'Z'\n if (matchResult[0] === \"Z\") {\n return {\n value: 0,\n rest: dateString.slice(1),\n };\n }\n\n const sign = matchResult[1] === \"+\" ? 1 : -1;\n const hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n const minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n const seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n\n return {\n value:\n sign *\n (hours * millisecondsInHour +\n minutes * millisecondsInMinute +\n seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length),\n };\n}\n\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\n\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n default:\n return parseNumericPattern(new RegExp(\"^\\\\d{1,\" + n + \"}\"), dateString);\n }\n}\n\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n default:\n return parseNumericPattern(new RegExp(\"^-?\\\\d{1,\" + n + \"}\"), dateString);\n }\n}\n\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case \"morning\":\n return 4;\n case \"evening\":\n return 17;\n case \"pm\":\n case \"noon\":\n case \"afternoon\":\n return 12;\n case \"am\":\n case \"midnight\":\n case \"night\":\n default:\n return 0;\n }\n}\n\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n const isCommonEra = currentYear > 0;\n // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n const absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n\n let result;\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n const rangeEnd = absCurrentYear + 50;\n const rangeEndCentury = Math.trunc(rangeEnd / 100) * 100;\n const isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\n\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport class YearParser extends Parser {\n priority = 130;\n incompatibleTokens = [\"Y\", \"R\", \"u\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n\n parse(dateString, token, match) {\n const valueCallback = (year) => ({\n year,\n isTwoDigitYear: token === \"yy\",\n });\n\n switch (token) {\n case \"y\":\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case \"yo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"year\",\n }),\n valueCallback,\n );\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n\n validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n\n set(date, flags, value) {\n const currentYear = date.getFullYear();\n\n if (value.isTwoDigitYear) {\n const normalizedTwoDigitYear = normalizeTwoDigitYear(\n value.year,\n currentYear,\n );\n date.setFullYear(normalizedTwoDigitYear, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n const year =\n !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setFullYear(year, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n}\n", "import { getWeekYear } from \"../../../getWeekYear.js\";\n\nimport { startOfWeek } from \"../../../startOfWeek.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n\n// Local week-numbering year\nexport class LocalWeekYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token, match) {\n const valueCallback = (year) => ({\n year,\n isTwoDigitYear: token === \"YY\",\n });\n\n switch (token) {\n case \"Y\":\n return mapValue(parseNDigits(4, dateString), valueCallback);\n case \"Yo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"year\",\n }),\n valueCallback,\n );\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n\n validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n\n set(date, flags, value, options) {\n const currentYear = getWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n const normalizedTwoDigitYear = normalizeTwoDigitYear(\n value.year,\n currentYear,\n );\n date.setFullYear(\n normalizedTwoDigitYear,\n 0,\n options.firstWeekContainsDate,\n );\n date.setHours(0, 0, 0, 0);\n return startOfWeek(date, options);\n }\n\n const year =\n !(\"era\" in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setFullYear(year, 0, options.firstWeekContainsDate);\n date.setHours(0, 0, 0, 0);\n return startOfWeek(date, options);\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"Q\",\n \"q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"t\",\n \"T\",\n ];\n}\n", "import { startOfISOWeek } from \"../../../startOfISOWeek.js\";\nimport { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigitsSigned } from \"../utils.js\";\n\n// ISO week-numbering year\nexport class ISOWeekYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token) {\n if (token === \"R\") {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n\n set(date, _flags, value) {\n const firstWeekOfYear = constructFrom(date, 0);\n firstWeekOfYear.setFullYear(value, 0, 4);\n firstWeekOfYear.setHours(0, 0, 0, 0);\n return startOfISOWeek(firstWeekOfYear);\n }\n\n incompatibleTokens = [\n \"G\",\n \"y\",\n \"Y\",\n \"u\",\n \"Q\",\n \"q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { parseNDigitsSigned } from \"../utils.js\";\n\nexport class ExtendedYearParser extends Parser {\n priority = 130;\n\n parse(dateString, token) {\n if (token === \"u\") {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n\n set(date, _flags, value) {\n date.setFullYear(value, 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"G\", \"y\", \"Y\", \"R\", \"w\", \"I\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { parseNDigits } from \"../utils.js\";\n\nexport class QuarterParser extends Parser {\n priority = 120;\n\n parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n case \"QQ\": // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return match.ordinalNumber(dateString, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return (\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return (\n match.quarter(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n\n set(date, _flags, value) {\n date.setMonth((value - 1) * 3, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { parseNDigits } from \"../utils.js\";\n\nexport class StandAloneQuarterParser extends Parser {\n priority = 120;\n\n parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n case \"qq\": // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return match.ordinalNumber(dateString, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return (\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n })\n );\n\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return (\n match.quarter(dateString, {\n width: \"wide\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.quarter(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n\n set(date, _flags, value) {\n date.setMonth((value - 1) * 3, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class MonthParser extends Parser {\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"L\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n\n priority = 110;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => value - 1;\n\n switch (token) {\n // 1, 2, ..., 12\n case \"M\":\n return mapValue(\n parseNumericPattern(numericPatterns.month, dateString),\n valueCallback,\n );\n // 01, 02, ..., 12\n case \"MM\":\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"month\",\n }),\n valueCallback,\n );\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return (\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // J, F, ..., D\n case \"MMMMM\":\n return match.month(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return (\n match.month(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n date.setMonth(value, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class StandAloneMonthParser extends Parser {\n priority = 110;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => value - 1;\n\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return mapValue(\n parseNumericPattern(numericPatterns.month, dateString),\n valueCallback,\n );\n // 01, 02, ..., 12\n case \"LL\":\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"month\",\n }),\n valueCallback,\n );\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return (\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // J, F, ..., D\n case \"LLLLL\":\n return match.month(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return (\n match.month(dateString, { width: \"wide\", context: \"standalone\" }) ||\n match.month(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.month(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n date.setMonth(value, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"M\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { getWeek } from \"./getWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setWeek} function options.\n */\n\n/**\n * @name setWeek\n * @category Week Helpers\n * @summary Set the local week to the given date.\n *\n * @description\n * Set the local week to the given date, saving the weekday number.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param week - The week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the local week set\n *\n * @example\n * // Set the 1st week to 2 January 2005 with default options:\n * const result = setWeek(new Date(2005, 0, 2), 1)\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // Set the 1st week to 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January:\n * const result = setWeek(new Date(2005, 0, 2), 1, {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Sun Jan 4 2004 00:00:00\n */\nexport function setWeek(date, week, options) {\n const date_ = toDate(date, options?.in);\n const diff = getWeek(date_, options) - week;\n date_.setDate(date_.getDate() - diff * 7);\n return toDate(date_, options?.in);\n}\n\n// Fallback for modularized imports:\nexport default setWeek;\n", "import { setWeek } from \"../../../setWeek.js\";\nimport { startOfWeek } from \"../../../startOfWeek.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\n// Local week of year\nexport class LocalWeekParser extends Parser {\n priority = 100;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"w\":\n return parseNumericPattern(numericPatterns.week, dateString);\n case \"wo\":\n return match.ordinalNumber(dateString, { unit: \"week\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n\n set(date, _flags, value, options) {\n return startOfWeek(setWeek(date, value, options), options);\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"i\",\n \"t\",\n \"T\",\n ];\n}\n", "import { getISOWeek } from \"./getISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setISOWeek} function options.\n */\n\n/**\n * @name setISOWeek\n * @category ISO Week Helpers\n * @summary Set the ISO week to the given date.\n *\n * @description\n * Set the ISO week to the given date, saving the weekday number.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The `Date` type of the context function.\n *\n * @param date - The date to be changed\n * @param week - The ISO week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the ISO week set\n *\n * @example\n * // Set the 53rd ISO week to 7 August 2004:\n * const result = setISOWeek(new Date(2004, 7, 7), 53)\n * //=> Sat Jan 01 2005 00:00:00\n */\nexport function setISOWeek(date, week, options) {\n const _date = toDate(date, options?.in);\n const diff = getISOWeek(_date, options) - week;\n _date.setDate(_date.getDate() - diff * 7);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setISOWeek;\n", "import { setISOWeek } from \"../../../setISOWeek.js\";\nimport { startOfISOWeek } from \"../../../startOfISOWeek.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\n// ISO week of year\nexport class ISOWeekParser extends Parser {\n priority = 100;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"I\":\n return parseNumericPattern(numericPatterns.week, dateString);\n case \"Io\":\n return match.ordinalNumber(dateString, { unit: \"week\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n\n set(date, _flags, value) {\n return startOfISOWeek(setISOWeek(date, value));\n }\n\n incompatibleTokens = [\n \"y\",\n \"Y\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport {\n isLeapYearIndex,\n parseNDigits,\n parseNumericPattern,\n} from \"../utils.js\";\n\nconst DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DAYS_IN_MONTH_LEAP_YEAR = [\n 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31,\n];\n\n// Day of the month\nexport class DateParser extends Parser {\n priority = 90;\n subPriority = 1;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"d\":\n return parseNumericPattern(numericPatterns.date, dateString);\n case \"do\":\n return match.ordinalNumber(dateString, { unit: \"date\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(date, value) {\n const year = date.getFullYear();\n const isLeapYear = isLeapYearIndex(year);\n const month = date.getMonth();\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n\n set(date, _flags, value) {\n date.setDate(value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"w\",\n \"I\",\n \"D\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport {\n isLeapYearIndex,\n parseNDigits,\n parseNumericPattern,\n} from \"../utils.js\";\n\nexport class DayOfYearParser extends Parser {\n priority = 90;\n\n subpriority = 1;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"D\":\n case \"DD\":\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n case \"Do\":\n return match.ordinalNumber(dateString, { unit: \"date\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(date, value) {\n const year = date.getFullYear();\n const isLeapYear = isLeapYearIndex(year);\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n\n set(date, _flags, value) {\n date.setMonth(0, value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"Y\",\n \"R\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"I\",\n \"d\",\n \"E\",\n \"i\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { addDays } from \"./addDays.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDay} function options.\n */\n\n/**\n * @name setDay\n * @category Weekday Helpers\n * @summary Set the day of the week to the given date.\n *\n * @description\n * Set the day of the week to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the week of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the day of the week set\n *\n * @example\n * // Set week day to Sunday, with the default weekStartsOn of Sunday:\n * const result = setDay(new Date(2014, 8, 1), 0)\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // Set week day to Sunday, with a weekStartsOn of Monday:\n * const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setDay(date, day, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const date_ = toDate(date, options?.in);\n const currentDay = date_.getDay();\n\n const remainder = day % 7;\n const dayIndex = (remainder + 7) % 7;\n\n const delta = 7 - weekStartsOn;\n const diff =\n day < 0 || day > 6\n ? day - ((currentDay + delta) % 7)\n : ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setDay;\n", "import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\n// Day of week\nexport class DayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match) {\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // T\n case \"EEEEE\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return (\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // Tuesday\n case \"EEEE\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"D\", \"i\", \"e\", \"c\", \"t\", \"T\"];\n}\n", "import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// Local day of week\nexport class LocalDayParser extends Parser {\n priority = 90;\n parse(dateString, token, match, options) {\n const valueCallback = (value) => {\n // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case \"e\":\n case \"ee\": // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case \"eo\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"day\",\n }),\n valueCallback,\n );\n // Tue\n case \"eee\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // T\n case \"eeeee\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return (\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n\n // Tuesday\n case \"eeee\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"formatting\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"formatting\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"formatting\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"E\",\n \"i\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { setDay } from \"../../../setDay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// Stand-alone local day of week\nexport class StandAloneLocalDayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match, options) {\n const valueCallback = (value) => {\n // We want here floor instead of trunc, so we get -7 for value 0 instead of 0\n const wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case \"c\":\n case \"cc\": // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n case \"co\":\n return mapValue(\n match.ordinalNumber(dateString, {\n unit: \"day\",\n }),\n valueCallback,\n );\n // Tue\n case \"ccc\":\n return (\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // T\n case \"ccccc\":\n return match.day(dateString, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return (\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n\n // Tuesday\n case \"cccc\":\n default:\n return (\n match.day(dateString, { width: \"wide\", context: \"standalone\" }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"standalone\",\n }) ||\n match.day(dateString, { width: \"short\", context: \"standalone\" }) ||\n match.day(dateString, { width: \"narrow\", context: \"standalone\" })\n );\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n\n set(date, _flags, value, options) {\n date = setDay(date, value, options);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"R\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"I\",\n \"d\",\n \"D\",\n \"E\",\n \"i\",\n \"e\",\n \"t\",\n \"T\",\n ];\n}\n", "import { addDays } from \"./addDays.js\";\nimport { getISODay } from \"./getISODay.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setISODay} function options.\n */\n\n/**\n * @name setISODay\n * @category Weekday Helpers\n * @summary Set the day of the ISO week to the given date.\n *\n * @description\n * Set the day of the ISO week to the given date.\n * ISO week starts with Monday.\n * 7 is the index of Sunday, 1 is the index of Monday, etc.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param day - The day of the ISO week of the new date\n * @param options - An object with options\n *\n * @returns The new date with the day of the ISO week set\n *\n * @example\n * // Set Sunday to 1 September 2014:\n * const result = setISODay(new Date(2014, 8, 1), 7)\n * //=> Sun Sep 07 2014 00:00:00\n */\nexport function setISODay(date, day, options) {\n const date_ = toDate(date, options?.in);\n const currentDay = getISODay(date_, options);\n const diff = day - currentDay;\n return addDays(date_, diff, options);\n}\n\n// Fallback for modularized imports:\nexport default setISODay;\n", "import { setISODay } from \"../../../setISODay.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\n// ISO day of week\nexport class ISODayParser extends Parser {\n priority = 90;\n\n parse(dateString, token, match) {\n const valueCallback = (value) => {\n if (value === 0) {\n return 7;\n }\n return value;\n };\n\n switch (token) {\n // 2\n case \"i\":\n case \"ii\": // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n case \"io\":\n return match.ordinalNumber(dateString, { unit: \"day\" });\n // Tue\n case \"iii\":\n return mapValue(\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // T\n case \"iiiii\":\n return mapValue(\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // Tu\n case \"iiiiii\":\n return mapValue(\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n // Tuesday\n case \"iiii\":\n default:\n return mapValue(\n match.day(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"short\",\n context: \"formatting\",\n }) ||\n match.day(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n }),\n valueCallback,\n );\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n\n set(date, _flags, value) {\n date = setISODay(date, value);\n date.setHours(0, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\n \"y\",\n \"Y\",\n \"u\",\n \"q\",\n \"Q\",\n \"M\",\n \"L\",\n \"w\",\n \"d\",\n \"D\",\n \"E\",\n \"e\",\n \"c\",\n \"t\",\n \"T\",\n ];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\nexport class AMPMParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"a\":\n case \"aa\":\n case \"aaa\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"aaaaa\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"b\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\nexport class AMPMMidnightParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"b\":\n case \"bb\":\n case \"bbb\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"bbbbb\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"B\", \"H\", \"k\", \"t\", \"T\"];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { dayPeriodEnumToHours } from \"../utils.js\";\n\n// in the morning, in the afternoon, in the evening, at night\nexport class DayPeriodParser extends Parser {\n priority = 80;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return (\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n\n case \"BBBBB\":\n return match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return (\n match.dayPeriod(dateString, {\n width: \"wide\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"abbreviated\",\n context: \"formatting\",\n }) ||\n match.dayPeriod(dateString, {\n width: \"narrow\",\n context: \"formatting\",\n })\n );\n }\n }\n\n set(date, _flags, value) {\n date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour1to12Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"h\":\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n case \"ho\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n\n set(date, _flags, value) {\n const isPM = date.getHours() >= 12;\n if (isPM && value < 12) {\n date.setHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setHours(0, 0, 0, 0);\n } else {\n date.setHours(value, 0, 0, 0);\n }\n return date;\n }\n\n incompatibleTokens = [\"H\", \"K\", \"k\", \"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour0to23Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"H\":\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n case \"Ho\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n\n set(date, _flags, value) {\n date.setHours(value, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"h\", \"K\", \"k\", \"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour0To11Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"K\":\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n case \"Ko\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n\n set(date, _flags, value) {\n const isPM = date.getHours() >= 12;\n if (isPM && value < 12) {\n date.setHours(value + 12, 0, 0, 0);\n } else {\n date.setHours(value, 0, 0, 0);\n }\n return date;\n }\n\n incompatibleTokens = [\"h\", \"H\", \"k\", \"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class Hour1To24Parser extends Parser {\n priority = 70;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"k\":\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n case \"ko\":\n return match.ordinalNumber(dateString, { unit: \"hour\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n\n set(date, _flags, value) {\n const hours = value <= 24 ? value % 24 : value;\n date.setHours(hours, 0, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"a\", \"b\", \"h\", \"H\", \"K\", \"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class MinuteParser extends Parser {\n priority = 60;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"m\":\n return parseNumericPattern(numericPatterns.minute, dateString);\n case \"mo\":\n return match.ordinalNumber(dateString, { unit: \"minute\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n\n set(date, _flags, value) {\n date.setMinutes(value, 0, 0);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n", "import { numericPatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseNDigits, parseNumericPattern } from \"../utils.js\";\n\nexport class SecondParser extends Parser {\n priority = 50;\n\n parse(dateString, token, match) {\n switch (token) {\n case \"s\":\n return parseNumericPattern(numericPatterns.second, dateString);\n case \"so\":\n return match.ordinalNumber(dateString, { unit: \"second\" });\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n\n validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n\n set(date, _flags, value) {\n date.setSeconds(value, 0);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n", "import { Parser } from \"../Parser.js\";\n\nimport { mapValue, parseNDigits } from \"../utils.js\";\n\nexport class FractionOfSecondParser extends Parser {\n priority = 30;\n\n parse(dateString, token) {\n const valueCallback = (value) =>\n Math.trunc(value * Math.pow(10, -token.length + 3));\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n\n set(date, _flags, value) {\n date.setMilliseconds(value);\n return date;\n }\n\n incompatibleTokens = [\"t\", \"T\"];\n}\n", "import { constructFrom } from \"../../../constructFrom.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseTimezonePattern } from \"../utils.js\";\n\n// Timezone (ISO-8601. +00:00 is `'Z'`)\nexport class ISOTimezoneWithZParser extends Parser {\n priority = 10;\n\n parse(dateString, token) {\n switch (token) {\n case \"X\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalMinutes,\n dateString,\n );\n case \"XX\":\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case \"XXXX\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalSeconds,\n dateString,\n );\n case \"XXXXX\":\n return parseTimezonePattern(\n timezonePatterns.extendedOptionalSeconds,\n dateString,\n );\n case \"XXX\":\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n\n set(date, flags, value) {\n if (flags.timestampIsSet) return date;\n return constructFrom(\n date,\n date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n );\n }\n\n incompatibleTokens = [\"t\", \"T\", \"x\"];\n}\n", "import { constructFrom } from \"../../../constructFrom.js\";\nimport { getTimezoneOffsetInMilliseconds } from \"../../../_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseTimezonePattern } from \"../utils.js\";\n\n// Timezone (ISO-8601)\nexport class ISOTimezoneParser extends Parser {\n priority = 10;\n\n parse(dateString, token) {\n switch (token) {\n case \"x\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalMinutes,\n dateString,\n );\n case \"xx\":\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n case \"xxxx\":\n return parseTimezonePattern(\n timezonePatterns.basicOptionalSeconds,\n dateString,\n );\n case \"xxxxx\":\n return parseTimezonePattern(\n timezonePatterns.extendedOptionalSeconds,\n dateString,\n );\n case \"xxx\":\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n\n set(date, flags, value) {\n if (flags.timestampIsSet) return date;\n return constructFrom(\n date,\n date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,\n );\n }\n\n incompatibleTokens = [\"t\", \"T\", \"X\"];\n}\n", "import { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseAnyDigitsSigned } from \"../utils.js\";\n\nexport class TimestampSecondsParser extends Parser {\n priority = 40;\n\n parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n\n set(date, _flags, value) {\n return [constructFrom(date, value * 1000), { timestampIsSet: true }];\n }\n\n incompatibleTokens = \"*\";\n}\n", "import { constructFrom } from \"../../../constructFrom.js\";\nimport { Parser } from \"../Parser.js\";\n\nimport { parseAnyDigitsSigned } from \"../utils.js\";\n\nexport class TimestampMillisecondsParser extends Parser {\n priority = 20;\n\n parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n\n set(date, _flags, value) {\n return [constructFrom(date, value), { timestampIsSet: true }];\n }\n\n incompatibleTokens = \"*\";\n}\n", "import { EraParser } from \"./parsers/EraParser.js\";\nimport { YearParser } from \"./parsers/YearParser.js\";\nimport { LocalWeekYearParser } from \"./parsers/LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./parsers/ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./parsers/ExtendedYearParser.js\";\nimport { QuarterParser } from \"./parsers/QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./parsers/StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./parsers/MonthParser.js\";\nimport { StandAloneMonthParser } from \"./parsers/StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./parsers/LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./parsers/ISOWeekParser.js\";\nimport { DateParser } from \"./parsers/DateParser.js\";\nimport { DayOfYearParser } from \"./parsers/DayOfYearParser.js\";\nimport { DayParser } from \"./parsers/DayParser.js\";\nimport { LocalDayParser } from \"./parsers/LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./parsers/StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./parsers/ISODayParser.js\";\nimport { AMPMParser } from \"./parsers/AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./parsers/AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./parsers/DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./parsers/Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./parsers/Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./parsers/Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./parsers/Hour1To24Parser.js\";\nimport { MinuteParser } from \"./parsers/MinuteParser.js\";\nimport { SecondParser } from \"./parsers/SecondParser.js\";\nimport { FractionOfSecondParser } from \"./parsers/FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./parsers/ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./parsers/ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./parsers/TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./parsers/TimestampMillisecondsParser.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\nexport const parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser(),\n};\n", "import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getDefaultOptions } from \"./getDefaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\nimport { DateTimezoneSetter } from \"./parse/_lib/Setter.js\";\nimport { parsers } from \"./parse/_lib/parsers.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { longFormatters, parsers };\n\n/**\n * The {@link parse} function options.\n */\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\n\nconst notWhitespaceRegExp = /\\S/;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > \u26A0\uFE0F Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangeably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear](https://date-fns.org/docs/setISOWeekYear)\n * and [setWeekYear](https://date-fns.org/docs/setWeekYear)).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dateStr - The string to parse\n * @param formatStr - The string of tokens\n * @param referenceDate - defines values missing from the parsed dateString\n * @param options - An object with options.\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @returns The parsed date\n *\n * @throws `options.locale` must contain `match` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\nexport function parse(dateStr, formatStr, referenceDate, options) {\n const invalidDate = () => constructFrom(options?.in || referenceDate, NaN);\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n if (!formatStr)\n return dateStr ? invalidDate() : toDate(referenceDate, options?.in);\n\n const subFnOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n // If timezone isn't specified, it will try to use the context or\n // the reference date and fallback to the system time zone.\n const setters = [new DateTimezoneSetter(options?.in, referenceDate)];\n\n const tokens = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter in longFormatters) {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp);\n\n const usedTokens = [];\n\n for (let token of tokens) {\n if (\n !options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)\n ) {\n warnOrThrowProtectedError(token, formatStr, dateStr);\n }\n if (\n !options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token)\n ) {\n warnOrThrowProtectedError(token, formatStr, dateStr);\n }\n\n const firstCharacter = token[0];\n const parser = parsers[firstCharacter];\n if (parser) {\n const { incompatibleTokens } = parser;\n if (Array.isArray(incompatibleTokens)) {\n const incompatibleToken = usedTokens.find(\n (usedToken) =>\n incompatibleTokens.includes(usedToken.token) ||\n usedToken.token === firstCharacter,\n );\n if (incompatibleToken) {\n throw new RangeError(\n `The format string mustn't contain \\`${incompatibleToken.fullToken}\\` and \\`${token}\\` at the same time`,\n );\n }\n } else if (parser.incompatibleTokens === \"*\" && usedTokens.length > 0) {\n throw new RangeError(\n `The format string mustn't contain \\`${token}\\` and any other token at the same time`,\n );\n }\n\n usedTokens.push({ token: firstCharacter, fullToken: token });\n\n const parseResult = parser.run(\n dateStr,\n token,\n locale.match,\n subFnOptions,\n );\n\n if (!parseResult) {\n return invalidDate();\n }\n\n setters.push(parseResult.setter);\n\n dateStr = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n // Replace two single quote characters with one single quote character\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n }\n\n // Cut token from string, or, if string doesn't match the token, return Invalid Date\n if (dateStr.indexOf(token) === 0) {\n dateStr = dateStr.slice(token.length);\n } else {\n return invalidDate();\n }\n }\n }\n\n // Check if the remaining input contains something other than whitespace\n if (dateStr.length > 0 && notWhitespaceRegExp.test(dateStr)) {\n return invalidDate();\n }\n\n const uniquePrioritySetters = setters\n .map((setter) => setter.priority)\n .sort((a, b) => b - a)\n .filter((priority, index, array) => array.indexOf(priority) === index)\n .map((priority) =>\n setters\n .filter((setter) => setter.priority === priority)\n .sort((a, b) => b.subPriority - a.subPriority),\n )\n .map((setterArray) => setterArray[0]);\n\n let date = toDate(referenceDate, options?.in);\n\n if (isNaN(+date)) return invalidDate();\n\n const flags = {};\n for (const setter of uniquePrioritySetters) {\n if (!setter.validate(date, subFnOptions)) {\n return invalidDate();\n }\n\n const result = setter.set(date, flags, subFnOptions);\n // Result is tuple (date, flags)\n if (Array.isArray(result)) {\n date = result[0];\n Object.assign(flags, result[1]);\n // Result is date\n } else {\n date = result;\n }\n }\n\n return date;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default parse;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfQuarter } from \"./startOfQuarter.js\";\n\n/**\n * The {@link isSameQuarter} function options.\n */\n\n/**\n * @name isSameQuarter\n * @category Quarter Helpers\n * @summary Are the given dates in the same quarter (and year)?\n *\n * @description\n * Are the given dates in the same quarter (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same quarter (and year)\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))\n * //=> true\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameQuarter(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfQuarter(dateLeft_) === +startOfQuarter(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameQuarter;\n", "import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link isWithinInterval} function options.\n */\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * @param date - The date to check\n * @param interval - The interval to check\n * @param options - An object with options\n *\n * @returns The date is within the interval\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * // => false\n *\n * @example\n * // For date equal to the interval start:\n * isWithinInterval(date, { start, end: date })\n * // => true\n *\n * @example\n * // For date equal to the interval end:\n * isWithinInterval(date, { start: date, end })\n * // => true\n */\nexport function isWithinInterval(date, interval, options) {\n const time = +toDate(date, options?.in);\n const [startTime, endTime] = [\n +toDate(interval.start, options?.in),\n +toDate(interval.end, options?.in),\n ].sort((a, b) => a - b);\n\n return time >= startTime && time <= endTime;\n}\n\n// Fallback for modularized imports:\nexport default isWithinInterval;\n", "import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link subDays} function options.\n */\n\n/**\n * @name subDays\n * @category Day Helpers\n * @summary Subtract the specified number of days from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the days subtracted\n *\n * @example\n * // Subtract 10 days from 1 September 2014:\n * const result = subDays(new Date(2014, 8, 1), 10)\n * //=> Fri Aug 22 2014 00:00:00\n */\nexport function subDays(date, amount, options) {\n return addDays(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subDays;\n", "import {\n millisecondsInHour,\n millisecondsInMinute,\n} from \"./constants.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link parseISO} function options.\n */\n\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n * @param options - An object with options\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function parseISO(argument, options) {\n const invalidDate = () => constructFrom(options?.in, NaN);\n\n const additionalDigits = options?.additionalDigits ?? 2;\n const dateStrings = splitDateString(argument);\n\n let date;\n if (dateStrings.date) {\n const parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(+date)) return invalidDate();\n\n const timestamp = +date;\n let time = 0;\n let offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (isNaN(time)) return invalidDate();\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) return invalidDate();\n } else {\n const tmpDate = new Date(timestamp + time);\n const result = toDate(0, options?.in);\n result.setFullYear(\n tmpDate.getUTCFullYear(),\n tmpDate.getUTCMonth(),\n tmpDate.getUTCDate(),\n );\n result.setHours(\n tmpDate.getUTCHours(),\n tmpDate.getUTCMinutes(),\n tmpDate.getUTCSeconds(),\n tmpDate.getUTCMilliseconds(),\n );\n return result;\n }\n\n return toDate(timestamp + time + offset, options?.in);\n}\n\nconst patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/,\n};\n\nconst dateRegex =\n /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nconst timeRegex =\n /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nconst timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n const dateStrings = {};\n const array = dateString.split(patterns.dateTimeDelimiter);\n let timeString;\n\n // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(\n dateStrings.date.length,\n dateString.length,\n );\n }\n }\n\n if (timeString) {\n const token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], \"\");\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n const regex = new RegExp(\n \"^(?:(\\\\d{4}|[+-]\\\\d{\" +\n (4 + additionalDigits) +\n \"})|(\\\\d{2}|[+-]\\\\d{\" +\n (2 + additionalDigits) +\n \"})$)\",\n );\n\n const captures = dateString.match(regex);\n // Invalid ISO-formatted year\n if (!captures) return { year: NaN, restDateString: \"\" };\n\n const year = captures[1] ? parseInt(captures[1]) : null;\n const century = captures[2] ? parseInt(captures[2]) : null;\n\n // either year or century is null, not both\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length),\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n\n const captures = dateString.match(dateRegex);\n // Invalid ISO-formatted string\n if (!captures) return new Date(NaN);\n\n const isWeekDate = !!captures[4];\n const dayOfYear = parseDateUnit(captures[1]);\n const month = parseDateUnit(captures[2]) - 1;\n const day = parseDateUnit(captures[3]);\n const week = parseDateUnit(captures[4]);\n const dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n const date = new Date(0);\n if (\n !validateDate(year, month, day) ||\n !validateDayOfYearDate(year, dayOfYear)\n ) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n const captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n const hours = parseTimeUnit(captures[1]);\n const minutes = parseTimeUnit(captures[2]);\n const seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return (\n hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000\n );\n}\n\nfunction parseTimeUnit(value) {\n return (value && parseFloat(value.replace(\",\", \".\"))) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === \"Z\") return 0;\n\n const captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n\n const sign = captures[1] === \"+\" ? -1 : 1;\n const hours = parseInt(captures[2]);\n const minutes = (captures[3] && parseInt(captures[3])) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nconst daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n\nfunction validateDate(year, month, date) {\n return (\n month >= 0 &&\n month <= 11 &&\n date >= 1 &&\n date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28))\n );\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return (\n seconds >= 0 &&\n seconds < 60 &&\n minutes >= 0 &&\n minutes < 60 &&\n hours >= 0 &&\n hours < 25\n );\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}\n\n// Fallback for modularized imports:\nexport default parseISO;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setHours} function options.\n */\n\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param hours - The hours of the new date\n * @param options - An object with options\n *\n * @returns The new date with the hours set\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * const result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\nexport function setHours(date, hours, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(hours);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setHours;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMinutes} function options.\n */\n\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, returned from the context function, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param minutes - The minutes of the new date\n * @param options - An object with options\n *\n * @returns The new date with the minutes set\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\nexport function setMinutes(date, minutes, options) {\n const date_ = toDate(date, options?.in);\n date_.setMinutes(minutes);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setMinutes;\n", "import { setMonth } from \"./setMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setQuarter} function options.\n */\n\n/**\n * @name setQuarter\n * @category Quarter Helpers\n * @summary Set the year quarter to the given date.\n *\n * @description\n * Set the year quarter to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param quarter - The quarter of the new date\n * @param options - The options\n *\n * @returns The new date with the quarter set\n *\n * @example\n * // Set the 2nd quarter to 2 July 2014:\n * const result = setQuarter(new Date(2014, 6, 2), 2)\n * //=> Wed Apr 02 2014 00:00:00\n */\nexport function setQuarter(date, quarter, options) {\n const date_ = toDate(date, options?.in);\n const oldQuarter = Math.trunc(date_.getMonth() / 3) + 1;\n const diff = quarter - oldQuarter;\n return setMonth(date_, date_.getMonth() + diff * 3);\n}\n\n// Fallback for modularized imports:\nexport default setQuarter;\n", "import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setSeconds} function options.\n */\n\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date, with context support.\n *\n * @description\n * Set the seconds to the given date, with an optional context for time zone specification.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param seconds - The seconds of the new date\n * @param options - An object with options\n *\n * @returns The new date with the seconds set\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\nexport function setSeconds(date, seconds, options) {\n const _date = toDate(date, options?.in);\n _date.setSeconds(seconds);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setSeconds;\n", "import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n", "import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n", "import { addQuarters } from \"./addQuarters.js\";\n\n/**\n * The {@link subQuarters} function options.\n */\n\n/**\n * @name subQuarters\n * @category Quarter Helpers\n * @summary Subtract the specified number of year quarters from the given date.\n *\n * @description\n * Subtract the specified number of year quarters from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of quarters to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the quarters subtracted\n *\n * @example\n * // Subtract 3 quarters from 1 September 2014:\n * const result = subQuarters(new Date(2014, 8, 1), 3)\n * //=> Sun Dec 01 2013 00:00:00\n */\nexport function subQuarters(date, amount, options) {\n return addQuarters(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subQuarters;\n", "import { addWeeks } from \"./addWeeks.js\";\n\n/**\n * The {@link subWeeks} function options.\n */\n\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nexport function subWeeks(date, amount, options) {\n return addWeeks(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subWeeks;\n", "import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n", "import * as React from 'react';\nimport { useModernLayoutEffect, useEffectEvent, getMinListIndex, getMaxListIndex, createGridCellMap, isListIndexDisabled, getGridNavigatedIndex, getGridCellIndexOfCorner, getGridCellIndices, findNonDisabledListIndex, isIndexOutOfListBounds, useLatestRef, getDocument as getDocument$1, isMouseLikePointerType, contains as contains$1, isSafari, enableFocusInside, isOutsideEvent, getPreviousTabbable, getNextTabbable, disableFocusInside, isTypeableCombobox, getFloatingFocusElement, getTabbableOptions, getNodeAncestors, activeElement, getNodeChildren as getNodeChildren$1, stopEvent, getTarget as getTarget$1, isVirtualClick, isVirtualPointerEvent, getPlatform, isTypeableElement, isReactEvent, isRootElement, isEventTargetWithin, matchesFocusVisible, isMac, getDeepestNode, getUserAgent } from '@floating-ui/react/utils';\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { getComputedStyle, isElement, isShadowRoot, getNodeName, isNode, isHTMLElement, getWindow, isLastTraversableNode, getParentNode, isWebKit } from '@floating-ui/utils/dom';\nimport { tabbable, isTabbable, focusable } from 'tabbable';\nimport * as ReactDOM from 'react-dom';\nimport { getOverflowAncestors, useFloating as useFloating$1, offset } from '@floating-ui/react-dom';\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/react-dom';\nimport { evaluate, max, min, round } from '@floating-ui/utils';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/react-utils#usemergerefs\n */\nfunction useMergeRefs(refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup == null ? void 0 : refCleanup());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\nfunction sortByDocumentPosition(a, b) {\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}\nconst FloatingListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n map: /*#__PURE__*/new Map(),\n elementsRef: {\n current: []\n }\n});\n/**\n * Provides context for a list of items within the floating element.\n * @see https://floating-ui.com/docs/FloatingList\n */\nfunction FloatingList(props) {\n const {\n children,\n elementsRef,\n labelsRef\n } = props;\n const [nodes, setNodes] = React.useState(() => new Set());\n const register = React.useCallback(node => {\n setNodes(prevSet => new Set(prevSet).add(node));\n }, []);\n const unregister = React.useCallback(node => {\n setNodes(prevSet => {\n const set = new Set(prevSet);\n set.delete(node);\n return set;\n });\n }, []);\n const map = React.useMemo(() => {\n const newMap = new Map();\n const sortedNodes = Array.from(nodes.keys()).sort(sortByDocumentPosition);\n sortedNodes.forEach((node, index) => {\n newMap.set(node, index);\n });\n return newMap;\n }, [nodes]);\n return /*#__PURE__*/jsx(FloatingListContext.Provider, {\n value: React.useMemo(() => ({\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n }), [register, unregister, map, elementsRef, labelsRef]),\n children: children\n });\n}\n/**\n * Used to register a list item and its index (DOM position) in the\n * `FloatingList`.\n * @see https://floating-ui.com/docs/FloatingList#uselistitem\n */\nfunction useListItem(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n label\n } = props;\n const {\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n } = React.useContext(FloatingListContext);\n const [index, setIndex] = React.useState(null);\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n var _node$textContent;\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;\n }\n }\n }, [index, elementsRef, labelsRef, label]);\n useModernLayoutEffect(() => {\n const node = componentRef.current;\n if (node) {\n register(node);\n return () => {\n unregister(node);\n };\n }\n }, [register, unregister]);\n useModernLayoutEffect(() => {\n const index = componentRef.current ? map.get(componentRef.current) : null;\n if (index != null) {\n setIndex(index);\n }\n }, [map]);\n return React.useMemo(() => ({\n ref,\n index: index == null ? -1 : index\n }), [index, ref]);\n}\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nconst ACTIVE_KEY = 'active';\nconst SELECTED_KEY = 'selected';\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\n\nfunction renderJsx(render, computedProps) {\n if (typeof render === 'function') {\n return render(computedProps);\n }\n if (render) {\n return /*#__PURE__*/React.cloneElement(render, computedProps);\n }\n return /*#__PURE__*/jsx(\"div\", {\n ...computedProps\n });\n}\nconst CompositeContext = /*#__PURE__*/React.createContext({\n activeIndex: 0,\n onNavigate: () => {}\n});\nconst horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];\nconst verticalKeys = [ARROW_UP, ARROW_DOWN];\nconst allKeys = [...horizontalKeys, ...verticalKeys];\n\n/**\n * Creates a single tab stop whose items are navigated by arrow keys, which\n * provides list navigation outside of floating element contexts.\n *\n * This is useful to enable navigation of a list of items that aren\u2019t part of a\n * floating element. A menubar is an example of a composite, with each reference\n * element being an item.\n * @see https://floating-ui.com/docs/Composite\n */\nconst Composite = /*#__PURE__*/React.forwardRef(function Composite(props, forwardedRef) {\n const {\n render,\n orientation = 'both',\n loop = true,\n rtl = false,\n cols = 1,\n disabledIndices,\n activeIndex: externalActiveIndex,\n onNavigate: externalSetActiveIndex,\n itemSizes,\n dense = false,\n ...domProps\n } = props;\n const [internalActiveIndex, internalSetActiveIndex] = React.useState(0);\n const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;\n const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);\n const elementsRef = React.useRef([]);\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const contextValue = React.useMemo(() => ({\n activeIndex,\n onNavigate\n }), [activeIndex, onNavigate]);\n const isGrid = cols > 1;\n function handleKeyDown(event) {\n if (!allKeys.includes(event.key)) return;\n let nextIndex = activeIndex;\n const minIndex = getMinListIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxListIndex(elementsRef, disabledIndices);\n const horizontalEndKey = rtl ? ARROW_LEFT : ARROW_RIGHT;\n const horizontalStartKey = rtl ? ARROW_RIGHT : ARROW_LEFT;\n if (isGrid) {\n const sizes = itemSizes || Array.from({\n length: elementsRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const maybeNextIndex = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex ? elementsRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || elementsRef.current.map((_, index) => isListIndexDisabled(elementsRef, index, disabledIndices) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(activeIndex > maxIndex ? minIndex : activeIndex, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction we're\n // moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === horizontalEndKey ? 'tr' : 'tl')\n })];\n if (maybeNextIndex != null) {\n nextIndex = maybeNextIndex;\n }\n }\n const toEndKeys = {\n horizontal: [horizontalEndKey],\n vertical: [ARROW_DOWN],\n both: [horizontalEndKey, ARROW_DOWN]\n }[orientation];\n const toStartKeys = {\n horizontal: [horizontalStartKey],\n vertical: [ARROW_UP],\n both: [horizontalStartKey, ARROW_UP]\n }[orientation];\n const preventedKeys = isGrid ? allKeys : {\n horizontal: horizontalKeys,\n vertical: verticalKeys,\n both: allKeys\n }[orientation];\n if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {\n if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {\n nextIndex = minIndex;\n } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(elementsRef, {\n startingIndex: nextIndex,\n decrement: toStartKeys.includes(event.key),\n disabledIndices\n });\n }\n }\n if (nextIndex !== activeIndex && !isIndexOutOfListBounds(elementsRef, nextIndex)) {\n var _elementsRef$current$;\n event.stopPropagation();\n if (preventedKeys.includes(event.key)) {\n event.preventDefault();\n }\n onNavigate(nextIndex);\n (_elementsRef$current$ = elementsRef.current[nextIndex]) == null || _elementsRef$current$.focus();\n }\n }\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: forwardedRef,\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n onKeyDown(e) {\n domProps.onKeyDown == null || domProps.onKeyDown(e);\n renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e);\n handleKeyDown(e);\n }\n };\n return /*#__PURE__*/jsx(CompositeContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/jsx(FloatingList, {\n elementsRef: elementsRef,\n children: renderJsx(render, computedProps)\n })\n });\n});\n/**\n * @see https://floating-ui.com/docs/Composite\n */\nconst CompositeItem = /*#__PURE__*/React.forwardRef(function CompositeItem(props, forwardedRef) {\n const {\n render,\n ...domProps\n } = props;\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const {\n activeIndex,\n onNavigate\n } = React.useContext(CompositeContext);\n const {\n ref,\n index\n } = useListItem();\n const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);\n const isActive = activeIndex === index;\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: mergedRef,\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? '' : undefined,\n onFocus(e) {\n domProps.onFocus == null || domProps.onFocus(e);\n renderElementProps.onFocus == null || renderElementProps.onFocus(e);\n onNavigate(index);\n }\n };\n return renderJsx(render, computedProps);\n});\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => // Ensure the id is unique with multiple independent versions of Floating UI\n// on <React 18\n\"floating-ui-\" + Math.random().toString(36).slice(2, 6) + count++;\nfunction useFloatingId() {\n const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n useModernLayoutEffect(() => {\n if (id == null) {\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n serverHandoffComplete = true;\n }, []);\n return id;\n}\nconst useReactId = SafeReact.useId;\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/react-utils#useid\n */\nconst useId = useReactId || useFloatingId;\n\nlet devMessageSet;\nif (process.env.NODE_ENV !== \"production\") {\n devMessageSet = /*#__PURE__*/new Set();\n}\nfunction warn() {\n var _devMessageSet;\n for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {\n messages[_key] = arguments[_key];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {\n var _devMessageSet2;\n (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);\n console.warn(message);\n }\n}\nfunction error() {\n var _devMessageSet3;\n for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n messages[_key2] = arguments[_key2];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {\n var _devMessageSet4;\n (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);\n console.error(message);\n }\n}\n\n/**\n * Renders a pointing arrow triangle.\n * @see https://floating-ui.com/docs/FloatingArrow\n */\nconst FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props, ref) {\n const {\n context: {\n placement,\n elements: {\n floating\n },\n middlewareData: {\n arrow,\n shift\n }\n },\n width = 14,\n height = 7,\n tipRadius = 0,\n strokeWidth = 0,\n staticOffset,\n stroke,\n d,\n style: {\n transform,\n ...restStyle\n } = {},\n ...rest\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (!ref) {\n warn('The `ref` prop is required for `FloatingArrow`.');\n }\n }\n const clipPathId = useId();\n const [isRTL, setIsRTL] = React.useState(false);\n\n // https://github.com/floating-ui/floating-ui/issues/2932\n useModernLayoutEffect(() => {\n if (!floating) return;\n const isRTL = getComputedStyle(floating).direction === 'rtl';\n if (isRTL) {\n setIsRTL(true);\n }\n }, [floating]);\n if (!floating) {\n return null;\n }\n const [side, alignment] = placement.split('-');\n const isVerticalSide = side === 'top' || side === 'bottom';\n let computedStaticOffset = staticOffset;\n if (isVerticalSide && shift != null && shift.x || !isVerticalSide && shift != null && shift.y) {\n computedStaticOffset = null;\n }\n\n // Strokes must be double the border width, this ensures the stroke's width\n // works as you'd expect.\n const computedStrokeWidth = strokeWidth * 2;\n const halfStrokeWidth = computedStrokeWidth / 2;\n const svgX = width / 2 * (tipRadius / -8 + 1);\n const svgY = height / 2 * tipRadius / 4;\n const isCustomShape = !!d;\n const yOffsetProp = computedStaticOffset && alignment === 'end' ? 'bottom' : 'top';\n let xOffsetProp = computedStaticOffset && alignment === 'end' ? 'right' : 'left';\n if (computedStaticOffset && isRTL) {\n xOffsetProp = alignment === 'end' ? 'left' : 'right';\n }\n const arrowX = (arrow == null ? void 0 : arrow.x) != null ? computedStaticOffset || arrow.x : '';\n const arrowY = (arrow == null ? void 0 : arrow.y) != null ? computedStaticOffset || arrow.y : '';\n const dValue = d || 'M0,0' + (\" H\" + width) + (\" L\" + (width - svgX) + \",\" + (height - svgY)) + (\" Q\" + width / 2 + \",\" + height + \" \" + svgX + \",\" + (height - svgY)) + ' Z';\n const rotation = {\n top: isCustomShape ? 'rotate(180deg)' : '',\n left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',\n bottom: isCustomShape ? '' : 'rotate(180deg)',\n right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'\n }[side];\n return /*#__PURE__*/jsxs(\"svg\", {\n ...rest,\n \"aria-hidden\": true,\n ref: ref,\n width: isCustomShape ? width : width + computedStrokeWidth,\n height: width,\n viewBox: \"0 0 \" + width + \" \" + (height > width ? height : width),\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n [xOffsetProp]: arrowX,\n [yOffsetProp]: arrowY,\n [side]: isVerticalSide || isCustomShape ? '100%' : \"calc(100% - \" + computedStrokeWidth / 2 + \"px)\",\n transform: [rotation, transform].filter(t => !!t).join(' '),\n ...restStyle\n },\n children: [computedStrokeWidth > 0 && /*#__PURE__*/jsx(\"path\", {\n clipPath: \"url(#\" + clipPathId + \")\",\n fill: \"none\",\n stroke: stroke\n // Account for the stroke on the fill path rendered below.\n ,\n strokeWidth: computedStrokeWidth + (d ? 0 : 1),\n d: dValue\n }), /*#__PURE__*/jsx(\"path\", {\n stroke: computedStrokeWidth && !d ? rest.fill : 'none',\n d: dValue\n }), /*#__PURE__*/jsx(\"clipPath\", {\n id: clipPathId,\n children: /*#__PURE__*/jsx(\"rect\", {\n x: -halfStrokeWidth,\n y: halfStrokeWidth * (isCustomShape ? -1 : 1),\n width: width + computedStrokeWidth,\n height: width\n })\n })]\n });\n});\n\nfunction createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n var _map$get;\n (_map$get = map.get(event)) == null || _map$get.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n var _map$get2;\n (_map$get2 = map.get(event)) == null || _map$get2.delete(listener);\n }\n };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nconst useFloatingParentNodeId = () => {\n var _React$useContext;\n return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction useFloatingNodeId(customParentId) {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n useModernLayoutEffect(() => {\n if (!id) return;\n const node = {\n id,\n parentId\n };\n tree == null || tree.addNode(node);\n return () => {\n tree == null || tree.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingTree(props) {\n const {\n children\n } = props;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const [events] = React.useState(() => createEventEmitter());\n return /*#__PURE__*/jsx(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [addNode, removeNode, events]),\n children: children\n });\n}\n\nfunction createAttribute(name) {\n return \"data-floating-ui-\" + name;\n}\n\nfunction clearTimeoutIfSet(timeoutRef) {\n if (timeoutRef.current !== -1) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = -1;\n }\n}\n\nconst safePolygonIdentifier = /*#__PURE__*/createAttribute('safe-polygon');\nfunction getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'function') {\n const result = value();\n if (typeof result === 'number') {\n return result;\n }\n return result == null ? void 0 : result[prop];\n }\n return value == null ? void 0 : value[prop];\n}\nfunction getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nfunction useHover(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements\n } = context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = props;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const openRef = useLatestRef(open);\n const restMsRef = useLatestRef(restMs);\n const pointerTypeRef = React.useRef();\n const timeoutRef = React.useRef(-1);\n const handlerRef = React.useRef();\n const restTimeoutRef = React.useRef(-1);\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const isHoverOpen = useEffectEvent(() => {\n var _dataRef$current$open;\n const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n });\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n open\n } = _ref;\n if (!open) {\n clearTimeoutIfSet(timeoutRef);\n clearTimeoutIfSet(restTimeoutRef);\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [enabled, events]);\n React.useEffect(() => {\n if (!enabled) return;\n if (!handleCloseRef.current) return;\n if (!open) return;\n function onLeave(event) {\n if (isHoverOpen()) {\n onOpenChange(false, event, 'hover');\n }\n }\n const html = getDocument$1(elements.floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [elements.floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n const closeWithDelay = React.useCallback(function (event, runElseBranch, reason) {\n if (runElseBranch === void 0) {\n runElseBranch = true;\n }\n if (reason === void 0) {\n reason = 'hover';\n }\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n clearTimeoutIfSet(timeoutRef);\n timeoutRef.current = window.setTimeout(() => onOpenChange(false, event, reason), closeDelay);\n } else if (runElseBranch) {\n clearTimeoutIfSet(timeoutRef);\n onOpenChange(false, event, reason);\n }\n }, [delayRef, onOpenChange]);\n const cleanupMouseMoveHandler = useEffectEvent(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useEffectEvent(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument$1(elements.floating).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const isClickLikeOpenEvent = useEffectEvent(() => {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) return;\n function onReferenceMouseEnter(event) {\n clearTimeoutIfSet(timeoutRef);\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || getRestMs(restMsRef.current) > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeoutRef.current = window.setTimeout(() => {\n if (!openRef.current) {\n onOpenChange(true, event, 'hover');\n }\n }, openDelay);\n } else if (!open) {\n onOpenChange(true, event, 'hover');\n }\n }\n function onReferenceMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n unbindMouseMoveRef.current();\n const doc = getDocument$1(elements.floating);\n clearTimeoutIfSet(restTimeoutRef);\n restTimeoutPendingRef.current = false;\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n clearTimeoutIfSet(timeoutRef);\n }\n handlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true, 'safe-polygon');\n }\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains$1(elements.floating, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) return;\n if (!dataRef.current.floatingContext) return;\n handleCloseRef.current == null || handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n }\n function onFloatingMouseEnter() {\n clearTimeoutIfSet(timeoutRef);\n }\n function onFloatingMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, false);\n }\n }\n if (isElement(elements.domReference)) {\n const reference = elements.domReference;\n const floating = elements.floating;\n if (open) {\n reference.addEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.addEventListener('mousemove', onReferenceMouseEnter, {\n once: true\n });\n }\n reference.addEventListener('mouseenter', onReferenceMouseEnter);\n reference.addEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.addEventListener('mouseleave', onScrollMouseLeave);\n floating.addEventListener('mouseenter', onFloatingMouseEnter);\n floating.addEventListener('mouseleave', onFloatingMouseLeave);\n }\n return () => {\n if (open) {\n reference.removeEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.removeEventListener('mousemove', onReferenceMouseEnter);\n }\n reference.removeEventListener('mouseenter', onReferenceMouseEnter);\n reference.removeEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.removeEventListener('mouseleave', onScrollMouseLeave);\n floating.removeEventListener('mouseenter', onFloatingMouseEnter);\n floating.removeEventListener('mouseleave', onFloatingMouseLeave);\n }\n };\n }\n }, [elements, enabled, context, mouseOnly, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent, restMsRef]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n useModernLayoutEffect(() => {\n var _handleCloseRef$curre;\n if (!enabled) return;\n if (open && (_handleCloseRef$curre = handleCloseRef.current) != null && (_handleCloseRef$curre = _handleCloseRef$curre.__options) != null && _handleCloseRef$curre.blockPointerEvents && isHoverOpen()) {\n performedPointerEventsMutationRef.current = true;\n const floatingEl = elements.floating;\n if (isElement(elements.domReference) && floatingEl) {\n var _tree$nodesRef$curren;\n const body = getDocument$1(elements.floating).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = elements.domReference;\n const parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n }\n }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]);\n useModernLayoutEffect(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n clearTimeoutIfSet(timeoutRef);\n clearTimeoutIfSet(restTimeoutRef);\n clearPointerEvents();\n };\n }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents]);\n const reference = React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && !openRef.current) {\n onOpenChange(true, nativeEvent, 'hover');\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (open || getRestMs(restMsRef.current) === 0) {\n return;\n }\n\n // Ignore insignificant movements to account for tremors.\n if (restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n clearTimeoutIfSet(restTimeoutRef);\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeoutRef.current = window.setTimeout(handleMouseMove, getRestMs(restMsRef.current));\n }\n }\n };\n }, [mouseOnly, onOpenChange, open, openRef, restMsRef]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst NOOP = () => {};\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n delay: 0,\n initialDelay: 0,\n timeoutMs: 0,\n currentId: null,\n setCurrentId: NOOP,\n setState: NOOP,\n isInstantPhase: false\n});\n\n/**\n * @deprecated\n * Use the return value of `useDelayGroup()` instead.\n */\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction FloatingDelayGroup(props) {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const [state, setState] = React.useReducer((prev, next) => ({\n ...prev,\n ...next\n }), {\n delay,\n timeoutMs,\n initialDelay: delay,\n currentId: null,\n isInstantPhase: false\n });\n const initialCurrentIdRef = React.useRef(null);\n const setCurrentId = React.useCallback(currentId => {\n setState({\n currentId\n });\n }, []);\n useModernLayoutEffect(() => {\n if (state.currentId) {\n if (initialCurrentIdRef.current === null) {\n initialCurrentIdRef.current = state.currentId;\n } else if (!state.isInstantPhase) {\n setState({\n isInstantPhase: true\n });\n }\n } else {\n if (state.isInstantPhase) {\n setState({\n isInstantPhase: false\n });\n }\n initialCurrentIdRef.current = null;\n }\n }, [state.currentId, state.isInstantPhase]);\n return /*#__PURE__*/jsx(FloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n ...state,\n setState,\n setCurrentId\n }), [state, setCurrentId]),\n children: children\n });\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `FloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n id: optionId,\n enabled = true\n } = options;\n const id = optionId != null ? optionId : floatingId;\n const groupContext = useDelayGroupContext();\n const {\n currentId,\n setCurrentId,\n initialDelay,\n setState,\n timeoutMs\n } = groupContext;\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!currentId) return;\n setState({\n delay: {\n open: 1,\n close: getDelay(initialDelay, 'close')\n }\n });\n if (currentId !== id) {\n onOpenChange(false);\n }\n }, [enabled, id, onOpenChange, setState, currentId, initialDelay]);\n useModernLayoutEffect(() => {\n function unset() {\n onOpenChange(false);\n setState({\n delay: initialDelay,\n currentId: null\n });\n }\n if (!enabled) return;\n if (!currentId) return;\n if (!open && currentId === id) {\n if (timeoutMs) {\n const timeout = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeout);\n };\n }\n unset();\n }\n }, [enabled, open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (setCurrentId === NOOP || !open) return;\n setCurrentId(id);\n }, [enabled, open, setCurrentId, id]);\n return groupContext;\n}\n\nconst NextFloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n hasProvider: false,\n timeoutMs: 0,\n delayRef: {\n current: 0\n },\n initialDelayRef: {\n current: 0\n },\n timeoutIdRef: {\n current: -1\n },\n currentIdRef: {\n current: null\n },\n currentContextRef: {\n current: null\n }\n});\n/**\n * Experimental next version of `FloatingDelayGroup` to become the default\n * in the future. This component is not yet stable.\n * Provides context for a group of floating elements that should share a\n * `delay`. Unlike `FloatingDelayGroup`, `useNextDelayGroup` with this\n * component does not cause a re-render of unrelated consumers of the\n * context when the delay changes.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction NextFloatingDelayGroup(props) {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const delayRef = React.useRef(delay);\n const initialDelayRef = React.useRef(delay);\n const currentIdRef = React.useRef(null);\n const currentContextRef = React.useRef(null);\n const timeoutIdRef = React.useRef(-1);\n return /*#__PURE__*/jsx(NextFloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n hasProvider: true,\n delayRef,\n initialDelayRef,\n currentIdRef,\n timeoutMs,\n currentContextRef,\n timeoutIdRef\n }), [timeoutMs]),\n children: children\n });\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `NextFloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useNextDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n enabled = true\n } = options;\n const groupContext = React.useContext(NextFloatingDelayGroupContext);\n const {\n currentIdRef,\n delayRef,\n timeoutMs,\n initialDelayRef,\n currentContextRef,\n hasProvider,\n timeoutIdRef\n } = groupContext;\n const [isInstantPhase, setIsInstantPhase] = React.useState(false);\n useModernLayoutEffect(() => {\n function unset() {\n var _currentContextRef$cu;\n setIsInstantPhase(false);\n (_currentContextRef$cu = currentContextRef.current) == null || _currentContextRef$cu.setIsInstantPhase(false);\n currentIdRef.current = null;\n currentContextRef.current = null;\n delayRef.current = initialDelayRef.current;\n }\n if (!enabled) return;\n if (!currentIdRef.current) return;\n if (!open && currentIdRef.current === floatingId) {\n setIsInstantPhase(false);\n if (timeoutMs) {\n timeoutIdRef.current = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeoutIdRef.current);\n };\n }\n unset();\n }\n }, [enabled, open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeoutIdRef]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!open) return;\n const prevContext = currentContextRef.current;\n const prevId = currentIdRef.current;\n currentContextRef.current = {\n onOpenChange,\n setIsInstantPhase\n };\n currentIdRef.current = floatingId;\n delayRef.current = {\n open: 0,\n close: getDelay(initialDelayRef.current, 'close')\n };\n if (prevId !== null && prevId !== floatingId) {\n clearTimeoutIfSet(timeoutIdRef);\n setIsInstantPhase(true);\n prevContext == null || prevContext.setIsInstantPhase(true);\n prevContext == null || prevContext.onOpenChange(false);\n } else {\n setIsInstantPhase(false);\n prevContext == null || prevContext.setIsInstantPhase(false);\n }\n }, [enabled, open, floatingId, onOpenChange, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeoutIdRef]);\n useModernLayoutEffect(() => {\n return () => {\n currentContextRef.current = null;\n };\n }, [currentContextRef]);\n return React.useMemo(() => ({\n hasProvider,\n delayRef,\n isInstantPhase\n }), [hasProvider, delayRef, isInstantPhase]);\n}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n cancelPrevious && cancelAnimationFrame(rafId);\n const exec = () => el == null ? void 0 : el.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}\n\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\n\n// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nconst counters = {\n inert: /*#__PURE__*/new WeakMap(),\n 'aria-hidden': /*#__PURE__*/new WeakMap(),\n none: /*#__PURE__*/new WeakMap()\n};\nfunction getCounterMap(control) {\n if (control === 'inert') return counters.inert;\n if (control === 'aria-hidden') return counters['aria-hidden'];\n return counters.none;\n}\nlet uncontrolledElementsSet = /*#__PURE__*/new WeakSet();\nlet markerMap = {};\nlet lockCount$1 = 0;\nconst supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nfunction unwrapHost(node) {\n if (!node) {\n return null;\n }\n return isShadowRoot(node) ? node.host : unwrapHost(node.parentNode);\n}\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-floating-ui-inert';\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n el.parentNode && keep(el.parentNode);\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n [].forEach.call(parent.children, node => {\n if (getNodeName(node) === 'script') return;\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterMap = getCounterMap(controlAttribute);\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, controlAttribute === 'inert' ? '' : 'true');\n }\n }\n });\n }\n lockCount$1++;\n return () => {\n hiddenElements.forEach(element => {\n const counterMap = getCounterMap(controlAttribute);\n const currentCounterValue = counterMap.get(element) || 0;\n const counterValue = currentCounterValue - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount$1--;\n if (!lockCount$1) {\n counters.inert = new WeakMap();\n counters['aria-hidden'] = new WeakMap();\n counters.none = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nfunction markOthers(avoidElements, ariaHidden, inert) {\n if (ariaHidden === void 0) {\n ariaHidden = false;\n }\n if (inert === void 0) {\n inert = false;\n }\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live],[role=\"status\"],output'))), body, ariaHidden, inert);\n}\n\nconst HIDDEN_STYLES = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'fixed',\n whiteSpace: 'nowrap',\n width: '1px',\n top: 0,\n left: 0\n};\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useModernLayoutEffect(() => {\n if (isSafari()) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n // button role.\n setRole('button');\n }\n }, []);\n const restProps = {\n ref,\n tabIndex: 0,\n // Role is only for VoiceOver\n role,\n 'aria-hidden': role ? undefined : true,\n [createAttribute('focus-guard')]: '',\n style: HIDDEN_STYLES\n };\n return /*#__PURE__*/jsx(\"span\", {\n ...props,\n ...restProps\n });\n});\n\nconst HIDDEN_OWNER_STYLES = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst attr = /*#__PURE__*/createAttribute('portal');\n/**\n * @see https://floating-ui.com/docs/FloatingPortal#usefloatingportalnode\n */\nfunction useFloatingPortalNode(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n id,\n root\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const [portalNode, setPortalNode] = React.useState(null);\n const portalNodeRef = React.useRef(null);\n useModernLayoutEffect(() => {\n return () => {\n portalNode == null || portalNode.remove();\n // Allow the subsequent layout effects to create a new node on updates.\n // The portal node will still be cleaned up on unmount.\n // https://github.com/floating-ui/floating-ui/issues/2454\n queueMicrotask(() => {\n portalNodeRef.current = null;\n });\n };\n }, [portalNode]);\n useModernLayoutEffect(() => {\n // Wait for the uniqueId to be generated before creating the portal node in\n // React <18 (using `useFloatingId` instead of the native `useId`).\n // https://github.com/floating-ui/floating-ui/issues/2778\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n const existingIdRoot = id ? document.getElementById(id) : null;\n if (!existingIdRoot) return;\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n existingIdRoot.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, uniqueId]);\n useModernLayoutEffect(() => {\n // Wait for the root to exist before creating the portal node. The root must\n // be stored in state, not a ref, for this to work reactively.\n if (root === null) return;\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n let container = root || (portalContext == null ? void 0 : portalContext.portalNode);\n if (container && !isNode(container)) container = container.current;\n container = container || document.body;\n let idWrapper = null;\n if (id) {\n idWrapper = document.createElement('div');\n idWrapper.id = id;\n container.appendChild(idWrapper);\n }\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n container = idWrapper || container;\n container.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, root, uniqueId, portalContext]);\n return portalNode;\n}\n/**\n * Portals the floating element into a given container element \u2014 by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nfunction FloatingPortal(props) {\n const {\n children,\n id,\n root,\n preserveTabOrder = true\n } = props;\n const portalNode = useFloatingPortalNode({\n id,\n root\n });\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const modal = focusManagerState == null ? void 0 : focusManagerState.modal;\n const open = focusManagerState == null ? void 0 : focusManagerState.open;\n const shouldRenderGuards =\n // The FocusManager and therefore floating element are currently open/\n // rendered.\n !!focusManagerState &&\n // Guards are only for non-modal focus management.\n !focusManagerState.modal &&\n // Don't render if unmount is transitioning.\n focusManagerState.open && preserveTabOrder && !!(root || portalNode);\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || !preserveTabOrder || modal) {\n return;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, preserveTabOrder, modal]);\n React.useEffect(() => {\n if (!portalNode) return;\n if (open) return;\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n return /*#__PURE__*/jsxs(PortalContext.Provider, {\n value: React.useMemo(() => ({\n preserveTabOrder,\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [preserveTabOrder, portalNode]),\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _beforeInsideRef$curr;\n (_beforeInsideRef$curr = beforeInsideRef.current) == null || _beforeInsideRef$curr.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable == null || prevTabbable.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: HIDDEN_OWNER_STYLES\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _afterInsideRef$curre;\n (_afterInsideRef$curre = afterInsideRef.current) == null || _afterInsideRef$curre.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable == null || nextTabbable.focus();\n (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false, event.nativeEvent, 'focus-out'));\n }\n }\n })]\n });\n}\nconst usePortalContext = () => React.useContext(PortalContext);\n\nfunction useLiteMergeRefs(refs) {\n return React.useMemo(() => {\n return value => {\n refs.forEach(ref => {\n if (ref) {\n ref.current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(elementRef => {\n var _elementRef$deref;\n return (_elementRef$deref = elementRef.deref()) == null ? void 0 : _elementRef$deref.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n const elementRef = previouslyFocusedElements[previouslyFocusedElements.length - 1];\n return elementRef == null ? void 0 : elementRef.deref();\n}\nfunction getFirstTabbableElement(container) {\n const tabbableOptions = getTabbableOptions();\n if (isTabbable(container, tabbableOptions)) {\n return container;\n }\n return tabbable(container, tabbableOptions)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement, orderRef) {\n var _floatingFocusElement;\n if (!orderRef.current.includes('floating') && !((_floatingFocusElement = floatingFocusElement.getAttribute('role')) != null && _floatingFocusElement.includes('dialog'))) {\n return;\n }\n const options = getTabbableOptions();\n const focusableElements = focusable(floatingFocusElement, options);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element, options) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n return /*#__PURE__*/jsx(\"button\", {\n ...props,\n type: \"button\",\n ref: ref,\n tabIndex: -1,\n style: HIDDEN_STYLES\n });\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n guards: _guards = true,\n initialFocus = 0,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n visuallyHiddenDismiss = false,\n closeOnFocusOut = true,\n outsideElementsInert = false,\n getInsideElements: _getInsideElements = () => []\n } = props;\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements: {\n domReference,\n floating\n }\n } = context;\n const getNodeId = useEffectEvent(() => {\n var _dataRef$current$floa;\n return (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n });\n const getInsideElements = useEffectEvent(_getInsideElements);\n const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n\n // Force the guards to be rendered if the `inert` attribute is not supported.\n const inertSupported = supportsInert();\n const guards = inertSupported ? _guards : true;\n const useInert = !guards || inertSupported && outsideElementsInert;\n const orderRef = useLatestRef(order);\n const initialFocusRef = useLatestRef(initialFocus);\n const returnFocusRef = useLatestRef(returnFocus);\n const tree = useFloatingTree();\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const tabbableIndexRef = React.useRef(-1);\n const blurTimeoutRef = React.useRef(-1);\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useEffectEvent(function (container) {\n if (container === void 0) {\n container = floatingFocusElement;\n }\n return container ? tabbable(container, getTabbableOptions()) : [];\n });\n const getTabbableElements = useEffectEvent(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(type => {\n if (domReference && type === 'reference') {\n return domReference;\n }\n if (floatingFocusElement && type === 'floating') {\n return floatingFocusElement;\n }\n return content;\n }).filter(Boolean).flat();\n });\n React.useEffect(() => {\n if (disabled) return;\n if (!modal) return;\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains$1(floatingFocusElement, activeElement(getDocument$1(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n const els = getTabbableElements();\n const target = getTarget$1(event);\n if (orderRef.current[0] === 'reference' && target === domReference) {\n stopEvent(event);\n if (event.shiftKey) {\n enqueueFocus(els[els.length - 1]);\n } else {\n enqueueFocus(els[1]);\n }\n }\n if (orderRef.current[1] === 'floating' && target === floatingFocusElement && event.shiftKey) {\n stopEvent(event);\n enqueueFocus(els[0]);\n }\n }\n }\n const doc = getDocument$1(floatingFocusElement);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled) return;\n if (!floating) return;\n function handleFocusIn(event) {\n const target = getTarget$1(event);\n const tabbableContent = getTabbableContent();\n const tabbableIndex = tabbableContent.indexOf(target);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n }\n floating.addEventListener('focusin', handleFocusIn);\n return () => {\n floating.removeEventListener('focusin', handleFocusIn);\n };\n }, [disabled, floating, getTabbableContent]);\n React.useEffect(() => {\n if (disabled) return;\n if (!closeOnFocusOut) return;\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n setTimeout(() => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget$1(event);\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const movedToUnrelatedNode = !(contains$1(domReference, relatedTarget) || contains$1(floating, relatedTarget) || contains$1(relatedTarget, floating) || contains$1(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute(createAttribute('focus-guard')) || tree && (getNodeChildren$1(tree.nodesRef.current, nodeId).find(node => {\n var _node$context, _node$context2;\n return contains$1((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains$1((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n }) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => {\n var _node$context3, _node$context4, _node$context5;\n return [(_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating, getFloatingFocusElement((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.floating)].includes(relatedTarget) || ((_node$context5 = node.context) == null ? void 0 : _node$context5.elements.domReference) === relatedTarget;\n })));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement, orderRef);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !(target != null && target.isConnected) && activeElement(getDocument$1(floatingFocusElement)) === getDocument$1(floatingFocusElement).body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n }\n const prevTabbableIndex = tabbableIndexRef.current;\n const tabbableContent = getTabbableContent();\n const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n relatedTarget !== getPreviouslyFocusedElement()) {\n preventReturnFocusRef.current = true;\n onOpenChange(false, event, 'focus-out');\n }\n });\n }\n const shouldHandleBlurCapture = Boolean(!tree && portalContext);\n function markInsideReactTree() {\n clearTimeoutIfSet(blurTimeoutRef);\n dataRef.current.insideReactTree = true;\n blurTimeoutRef.current = window.setTimeout(() => {\n dataRef.current.insideReactTree = false;\n });\n }\n if (floating && isHTMLElement(domReference)) {\n domReference.addEventListener('focusout', handleFocusOutside);\n domReference.addEventListener('pointerdown', handlePointerDown);\n floating.addEventListener('focusout', handleFocusOutside);\n if (shouldHandleBlurCapture) {\n floating.addEventListener('focusout', markInsideReactTree, true);\n }\n return () => {\n domReference.removeEventListener('focusout', handleFocusOutside);\n domReference.removeEventListener('pointerdown', handlePointerDown);\n floating.removeEventListener('focusout', handleFocusOutside);\n if (shouldHandleBlurCapture) {\n floating.removeEventListener('focusout', markInsideReactTree, true);\n }\n };\n }\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, onOpenChange, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef]);\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useLiteMergeRefs([beforeGuardRef, portalContext == null ? void 0 : portalContext.beforeInsideRef]);\n const mergedAfterGuardRef = useLiteMergeRefs([afterGuardRef, portalContext == null ? void 0 : portalContext.afterInsideRef]);\n React.useEffect(() => {\n var _portalContext$portal, _ancestors$find;\n if (disabled) return;\n if (!floating) return;\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from((portalContext == null || (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll(\"[\" + createAttribute('portal') + \"]\")) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = (_ancestors$find = ancestors.find(node => {\n var _node$context6;\n return isTypeableCombobox(((_node$context6 = node.context) == null ? void 0 : _node$context6.elements.domReference) || null);\n })) == null || (_ancestors$find = _ancestors$find.context) == null ? void 0 : _ancestors$find.elements.domReference;\n const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes, ...getInsideElements(), startDismissButtonRef.current, endDismissButtonRef.current, beforeGuardRef.current, afterGuardRef.current, portalContext == null ? void 0 : portalContext.beforeOutsideRef.current, portalContext == null ? void 0 : portalContext.afterOutsideRef.current, orderRef.current.includes('reference') || isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = modal || isUntrappedTypeableCombobox ? markOthers(insideElements, !useInert, useInert) : markOthers(insideElements);\n return () => {\n cleanup();\n };\n }, [disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, guards, useInert, tree, getNodeId, getInsideElements]);\n useModernLayoutEffect(() => {\n if (disabled || !isHTMLElement(floatingFocusElement)) return;\n const doc = getDocument$1(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floatingFocusElement);\n const initialFocusValue = initialFocusRef.current;\n const elToFocus = (typeof initialFocusValue === 'number' ? focusableElements[initialFocusValue] : initialFocusValue.current) || floatingFocusElement;\n const focusAlreadyInsideFloatingEl = contains$1(floatingFocusElement, previouslyFocusedElement);\n if (!ignoreInitialFocus && !focusAlreadyInsideFloatingEl && open) {\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n }\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef]);\n useModernLayoutEffect(() => {\n if (disabled || !floatingFocusElement) return;\n const doc = getDocument$1(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChange(_ref) {\n let {\n reason,\n event,\n nested\n } = _ref;\n if (['hover', 'safe-polygon'].includes(reason) && event.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (reason !== 'outside-press') return;\n if (nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(event) || isVirtualPointerEvent(event)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChange);\n const fallbackEl = doc.createElement('span');\n fallbackEl.setAttribute('tabindex', '-1');\n fallbackEl.setAttribute('aria-hidden', 'true');\n Object.assign(fallbackEl.style, HIDDEN_STYLES);\n if (isInsidePortal && domReference) {\n domReference.insertAdjacentElement('afterend', fallbackEl);\n }\n function getReturnElement() {\n if (typeof returnFocusRef.current === 'boolean') {\n const el = domReference || getPreviouslyFocusedElement();\n return el && el.isConnected ? el : fallbackEl;\n }\n return returnFocusRef.current.current || fallbackEl;\n }\n return () => {\n events.off('openchange', onOpenChange);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains$1(floating, activeEl) || tree && getNodeChildren$1(tree.nodesRef.current, getNodeId(), false).some(node => {\n var _node$context7;\n return contains$1((_node$context7 = node.context) == null ? void 0 : _node$context7.elements.floating, activeEl);\n });\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n fallbackEl.remove();\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, isInsidePortal, domReference, getNodeId]);\n React.useEffect(() => {\n // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n // wait for it to complete before resetting the flag.\n queueMicrotask(() => {\n preventReturnFocusRef.current = false;\n });\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useModernLayoutEffect(() => {\n if (disabled) return;\n if (!portalContext) return;\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, onOpenChange, closeOnFocusOut, domReference]);\n useModernLayoutEffect(() => {\n if (disabled) return;\n if (!floatingFocusElement) return;\n handleTabIndex(floatingFocusElement, orderRef);\n }, [disabled, floatingFocusElement, orderRef]);\n function renderDismissButton(location) {\n if (disabled || !visuallyHiddenDismiss || !modal) {\n return null;\n }\n return /*#__PURE__*/jsx(VisuallyHiddenDismiss, {\n ref: location === 'start' ? startDismissButtonRef : endDismissButtonRef,\n onClick: event => onOpenChange(false, event.nativeEvent),\n children: typeof visuallyHiddenDismiss === 'string' ? visuallyHiddenDismiss : 'Dismiss'\n });\n }\n const shouldRenderGuards = !disabled && guards && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/jsxs(Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(order[0] === 'reference' ? els[0] : els[els.length - 1]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable == null || nextTabbable.focus();\n } else {\n var _portalContext$before;\n (_portalContext$before = portalContext.beforeOutsideRef.current) == null || _portalContext$before.focus();\n }\n }\n }\n }), !isUntrappedTypeableCombobox && renderDismissButton('start'), children, renderDismissButton('end'), shouldRenderGuards && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable == null || prevTabbable.focus();\n } else {\n var _portalContext$afterO;\n (_portalContext$afterO = portalContext.afterOutsideRef.current) == null || _portalContext$afterO.focus();\n }\n }\n }\n })]\n });\n}\n\nlet lockCount = 0;\nconst scrollbarProperty = '--floating-ui-scrollbar-width';\nfunction enableScrollLock() {\n const platform = getPlatform();\n const isIOS = /iP(hone|ad|od)|iOS/.test(platform) ||\n // iPads can claim to be MacIntel\n platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n const bodyStyle = document.body.style;\n // RTL <body> scrollbar\n const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;\n const paddingProp = scrollbarX ? 'paddingLeft' : 'paddingRight';\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.scrollX;\n const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.scrollY;\n bodyStyle.overflow = 'hidden';\n bodyStyle.setProperty(scrollbarProperty, scrollbarWidth + \"px\");\n if (scrollbarWidth) {\n bodyStyle[paddingProp] = scrollbarWidth + \"px\";\n }\n\n // Only iOS doesn't respect `overflow: hidden` on document.body, and this\n // technique has fewer side effects.\n if (isIOS) {\n var _window$visualViewpor, _window$visualViewpor2;\n // iOS 12 does not support `visualViewport`.\n const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;\n const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;\n Object.assign(bodyStyle, {\n position: 'fixed',\n top: -(scrollY - Math.floor(offsetTop)) + \"px\",\n left: -(scrollX - Math.floor(offsetLeft)) + \"px\",\n right: '0'\n });\n }\n return () => {\n Object.assign(bodyStyle, {\n overflow: '',\n [paddingProp]: ''\n });\n bodyStyle.removeProperty(scrollbarProperty);\n if (isIOS) {\n Object.assign(bodyStyle, {\n position: '',\n top: '',\n left: '',\n right: ''\n });\n window.scrollTo(scrollX, scrollY);\n }\n };\n}\nlet cleanup = () => {};\n\n/**\n * Provides base styling for a fixed overlay element to dim content or block\n * pointer events behind a floating element.\n * It's a regular `<div>`, so it can be styled via any CSS solution you prefer.\n * @see https://floating-ui.com/docs/FloatingOverlay\n */\nconst FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(props, ref) {\n const {\n lockScroll = false,\n ...rest\n } = props;\n useModernLayoutEffect(() => {\n if (!lockScroll) return;\n lockCount++;\n if (lockCount === 1) {\n cleanup = enableScrollLock();\n }\n return () => {\n lockCount--;\n if (lockCount === 0) {\n cleanup();\n }\n };\n }, [lockScroll]);\n return /*#__PURE__*/jsx(\"div\", {\n ref: ref,\n ...rest,\n style: {\n position: 'fixed',\n overflow: 'auto',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...rest.style\n }\n });\n});\n\nfunction isButtonTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';\n}\nfunction isAnchorTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'A';\n}\nfunction isSpaceIgnored(element) {\n return isTypeableElement(element);\n}\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nfunction useClick(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n elements: {\n domReference\n }\n } = context;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n keyboardHandlers = true,\n stickIfOpen = true\n } = props;\n const pointerTypeRef = React.useRef();\n const didKeyDownRef = React.useRef(false);\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0) return;\n if (eventOption === 'click') return;\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n // Prevent stealing focus from the floating element\n event.preventDefault();\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onClick(event) {\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerTypeRef.current) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onKeyDown(event) {\n pointerTypeRef.current = undefined;\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {\n return;\n }\n if (event.key === ' ' && !isSpaceIgnored(domReference)) {\n // Prevent scrolling\n event.preventDefault();\n didKeyDownRef.current = true;\n }\n if (isAnchorTarget(event)) {\n return;\n }\n if (event.key === 'Enter') {\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n },\n onKeyUp(event) {\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {\n return;\n }\n if (event.key === ' ' && didKeyDownRef.current) {\n didKeyDownRef.current = false;\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n }\n }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nfunction createVirtualElement(domElement, data) {\n let offsetX = null;\n let offsetY = null;\n let isAutoUpdateEvent = false;\n return {\n contextElement: domElement || undefined,\n getBoundingClientRect() {\n var _data$dataRef$current;\n const domRect = (domElement == null ? void 0 : domElement.getBoundingClientRect()) || {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n const isXAxis = data.axis === 'x' || data.axis === 'both';\n const isYAxis = data.axis === 'y' || data.axis === 'both';\n const canTrackCursorOnAutoUpdate = ['mouseenter', 'mousemove'].includes(((_data$dataRef$current = data.dataRef.current.openEvent) == null ? void 0 : _data$dataRef$current.type) || '') && data.pointerType !== 'touch';\n let width = domRect.width;\n let height = domRect.height;\n let x = domRect.x;\n let y = domRect.y;\n if (offsetX == null && data.x && isXAxis) {\n offsetX = domRect.x - data.x;\n }\n if (offsetY == null && data.y && isYAxis) {\n offsetY = domRect.y - data.y;\n }\n x -= offsetX || 0;\n y -= offsetY || 0;\n width = 0;\n height = 0;\n if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {\n width = data.axis === 'y' ? domRect.width : 0;\n height = data.axis === 'x' ? domRect.height : 0;\n x = isXAxis && data.x != null ? data.x : x;\n y = isYAxis && data.y != null ? data.y : y;\n } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {\n height = data.axis === 'x' ? domRect.height : height;\n width = data.axis === 'y' ? domRect.width : width;\n }\n isAutoUpdateEvent = true;\n return {\n width,\n height,\n x,\n y,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x\n };\n }\n };\n}\nfunction isMouseBasedEvent(event) {\n return event != null && event.clientX != null;\n}\n/**\n * Positions the floating element relative to a client point (in the viewport),\n * such as the mouse position. By default, it follows the mouse cursor.\n * @see https://floating-ui.com/docs/useClientPoint\n */\nfunction useClientPoint(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n dataRef,\n elements: {\n floating,\n domReference\n },\n refs\n } = context;\n const {\n enabled = true,\n axis = 'both',\n x = null,\n y = null\n } = props;\n const initialRef = React.useRef(false);\n const cleanupListenerRef = React.useRef(null);\n const [pointerType, setPointerType] = React.useState();\n const [reactive, setReactive] = React.useState([]);\n const setReference = useEffectEvent((x, y) => {\n if (initialRef.current) return;\n\n // Prevent setting if the open event was not a mouse-like one\n // (e.g. focus to open, then hover over the reference element).\n // Only apply if the event exists.\n if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {\n return;\n }\n refs.setPositionReference(createVirtualElement(domReference, {\n x,\n y,\n axis,\n dataRef,\n pointerType\n }));\n });\n const handleReferenceEnterOrMove = useEffectEvent(event => {\n if (x != null || y != null) return;\n if (!open) {\n setReference(event.clientX, event.clientY);\n } else if (!cleanupListenerRef.current) {\n // If there's no cleanup, there's no listener, but we want to ensure\n // we add the listener if the cursor landed on the floating element and\n // then back on the reference (i.e. it's interactive).\n setReactive([]);\n }\n });\n\n // If the pointer is a mouse-like pointer, we want to continue following the\n // mouse even if the floating element is transitioning out. On touch\n // devices, this is undesirable because the floating element will move to\n // the dismissal touch point.\n const openCheck = isMouseLikePointerType(pointerType) ? floating : open;\n const addListener = React.useCallback(() => {\n // Explicitly specified `x`/`y` coordinates shouldn't add a listener.\n if (!openCheck || !enabled || x != null || y != null) return;\n const win = getWindow(floating);\n function handleMouseMove(event) {\n const target = getTarget$1(event);\n if (!contains$1(floating, target)) {\n setReference(event.clientX, event.clientY);\n } else {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n }\n }\n if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {\n win.addEventListener('mousemove', handleMouseMove);\n const cleanup = () => {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n };\n cleanupListenerRef.current = cleanup;\n return cleanup;\n }\n refs.setPositionReference(domReference);\n }, [openCheck, enabled, x, y, floating, dataRef, refs, domReference, setReference]);\n React.useEffect(() => {\n return addListener();\n }, [addListener, reactive]);\n React.useEffect(() => {\n if (enabled && !floating) {\n initialRef.current = false;\n }\n }, [enabled, floating]);\n React.useEffect(() => {\n if (!enabled && open) {\n initialRef.current = true;\n }\n }, [enabled, open]);\n useModernLayoutEffect(() => {\n if (enabled && (x != null || y != null)) {\n initialRef.current = false;\n setReference(x, y);\n }\n }, [enabled, x, y, setReference]);\n const reference = React.useMemo(() => {\n function setPointerTypeRef(_ref) {\n let {\n pointerType\n } = _ref;\n setPointerType(pointerType);\n }\n return {\n onPointerDown: setPointerTypeRef,\n onPointerEnter: setPointerTypeRef,\n onMouseMove: handleReferenceEnterOrMove,\n onMouseEnter: handleReferenceEnterOrMove\n };\n }, [handleReferenceEnterOrMove]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst bubbleHandlerKeys = {\n pointerdown: 'onPointerDown',\n mousedown: 'onMouseDown',\n click: 'onClick'\n};\nconst captureHandlerKeys = {\n pointerdown: 'onPointerDownCapture',\n mousedown: 'onMouseDownCapture',\n click: 'onClickCapture'\n};\nconst normalizeProp = normalizable => {\n var _normalizable$escapeK, _normalizable$outside;\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : (_normalizable$escapeK = normalizable == null ? void 0 : normalizable.escapeKey) != null ? _normalizable$escapeK : false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : (_normalizable$outside = normalizable == null ? void 0 : normalizable.outsidePress) != null ? _normalizable$outside : true\n };\n};\n/**\n * Closes the floating element when a dismissal is requested \u2014 by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nfunction useDismiss(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n elements,\n dataRef\n } = context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: unstable_outsidePress = true,\n outsidePressEvent = 'pointerdown',\n referencePress = false,\n referencePressEvent = 'pointerdown',\n ancestorScroll = false,\n bubbles,\n capture\n } = props;\n const tree = useFloatingTree();\n const outsidePressFn = useEffectEvent(typeof unstable_outsidePress === 'function' ? unstable_outsidePress : () => false);\n const outsidePress = typeof unstable_outsidePress === 'function' ? outsidePressFn : unstable_outsidePress;\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const {\n escapeKey: escapeKeyCapture,\n outsidePress: outsidePressCapture\n } = normalizeProp(capture);\n const isComposingRef = React.useRef(false);\n const closeOnEscapeKeyDown = useEffectEvent(event => {\n var _dataRef$current$floa;\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n const children = tree ? getNodeChildren$1(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n event.stopPropagation();\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context;\n if ((_child$context = child.context) != null && _child$context.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n });\n const closeOnEscapeKeyDownCapture = useEffectEvent(event => {\n var _getTarget2;\n const callback = () => {\n var _getTarget;\n closeOnEscapeKeyDown(event);\n (_getTarget = getTarget$1(event)) == null || _getTarget.removeEventListener('keydown', callback);\n };\n (_getTarget2 = getTarget$1(event)) == null || _getTarget2.addEventListener('keydown', callback);\n });\n const closeOnPressOutside = useEffectEvent(event => {\n var _dataRef$current$floa2;\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = dataRef.current.insideReactTree;\n dataRef.current.insideReactTree = false;\n\n // When click outside is lazy (`click` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n if (outsidePressEvent === 'click' && endedOrStartedInside) {\n return;\n }\n if (insideReactTree) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget$1(event);\n const inertSelector = \"[\" + createAttribute('inert') + \"]\";\n const markers = getDocument$1(elements.floating).querySelectorAll(inertSelector);\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains$1(target, elements.floating) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains$1(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n if (isHTMLElement(target) && floating) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = (_dataRef$current$floa2 = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa2.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren$1(tree.nodesRef.current, nodeId).some(node => {\n var _node$context;\n return isEventTargetWithin(event, (_node$context = node.context) == null ? void 0 : _node$context.elements.floating);\n });\n if (isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getNodeChildren$1(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context2;\n if ((_child$context2 = child.context) != null && _child$context2.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n onOpenChange(false, event, 'outside-press');\n });\n const closeOnPressOutsideCapture = useEffectEvent(event => {\n var _getTarget4;\n const callback = () => {\n var _getTarget3;\n closeOnPressOutside(event);\n (_getTarget3 = getTarget$1(event)) == null || _getTarget3.removeEventListener(outsidePressEvent, callback);\n };\n (_getTarget4 = getTarget$1(event)) == null || _getTarget4.addEventListener(outsidePressEvent, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n let compositionTimeout = -1;\n function onScroll(event) {\n onOpenChange(false, event, 'ancestor-scroll');\n }\n function handleCompositionStart() {\n window.clearTimeout(compositionTimeout);\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout = window.setTimeout(() => {\n isComposingRef.current = false;\n },\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0);\n }\n const doc = getDocument$1(elements.floating);\n if (escapeKey) {\n doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(elements.domReference)) {\n ancestors = getOverflowAncestors(elements.domReference);\n }\n if (isElement(elements.floating)) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.floating));\n }\n if (!isElement(elements.reference) && elements.reference && elements.reference.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => {\n var _doc$defaultView;\n return ancestor !== ((_doc$defaultView = doc.defaultView) == null ? void 0 : _doc$defaultView.visualViewport);\n });\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll);\n });\n return () => {\n if (escapeKey) {\n doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n window.clearTimeout(compositionTimeout);\n };\n }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);\n React.useEffect(() => {\n dataRef.current.insideReactTree = false;\n }, [dataRef, outsidePress, outsidePressEvent]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n },\n ...(referencePressEvent !== 'click' && {\n onClick(event) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n }\n })\n })\n }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);\n const floating = React.useMemo(() => {\n function setMouseDownOrUpInside(event) {\n if (event.button !== 0) {\n return;\n }\n endedOrStartedInsideRef.current = true;\n }\n return {\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown: setMouseDownOrUpInside,\n onMouseUp: setMouseDownOrUpInside,\n [captureHandlerKeys[outsidePressEvent]]: () => {\n dataRef.current.insideReactTree = true;\n }\n };\n }, [closeOnEscapeKeyDown, outsidePressEvent, dataRef]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange: onOpenChangeProp,\n elements: elementsProp\n } = options;\n const floatingId = useId();\n const dataRef = React.useRef({});\n const [events] = React.useState(() => createEventEmitter());\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== \"production\") {\n const optionDomReference = elementsProp.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n }\n }\n const [positionReference, setPositionReference] = React.useState(elementsProp.reference);\n const onOpenChange = useEffectEvent((open, event, reason) => {\n dataRef.current.openEvent = open ? event : undefined;\n events.emit('openchange', {\n open,\n event,\n reason,\n nested\n });\n onOpenChangeProp == null || onOpenChangeProp(open, event, reason);\n });\n const refs = React.useMemo(() => ({\n setPositionReference\n }), []);\n const elements = React.useMemo(() => ({\n reference: positionReference || elementsProp.reference || null,\n floating: elementsProp.floating || null,\n domReference: elementsProp.reference\n }), [positionReference, elementsProp.reference, elementsProp.floating]);\n return React.useMemo(() => ({\n dataRef,\n open,\n onOpenChange,\n elements,\n events,\n floatingId,\n refs\n }), [open, onOpenChange, elements, events, floatingId, refs]);\n}\n\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(_temp) {\n var _elementsOption$refer, _elementsOption$float;\n let {\n elements: elementsOption,\n ...options\n } = _temp === void 0 ? {} : _temp;\n const {\n nodeId\n } = options;\n const internalRootContext = useFloatingRootContext({\n ...options,\n elements: {\n reference: (_elementsOption$refer = elementsOption == null ? void 0 : elementsOption.reference) != null ? _elementsOption$refer : null,\n floating: (_elementsOption$float = elementsOption == null ? void 0 : elementsOption.floating) != null ? _elementsOption$float : null\n }\n });\n const rootContext = options.rootContext || internalRootContext;\n const computedElements = rootContext.elements;\n const [_domReference, setDomReference] = React.useState(null);\n const [positionReference, _setPositionReference] = React.useState(null);\n const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;\n const domReference = optionDomReference || _domReference;\n const domReferenceRef = React.useRef(null);\n const tree = useFloatingTree();\n useModernLayoutEffect(() => {\n if (domReference) {\n domReferenceRef.current = domReference;\n }\n }, [domReference]);\n const position = useFloating$1({\n ...options,\n elements: {\n ...computedElements,\n ...(positionReference && {\n reference: positionReference\n })\n }\n });\n const setPositionReference = React.useCallback(node => {\n const computedPositionReference = isElement(node) ? {\n getBoundingClientRect: () => node.getBoundingClientRect(),\n getClientRects: () => node.getClientRects(),\n contextElement: node\n } : node;\n // Store the positionReference in state if the DOM reference is specified externally via the\n // `elements.reference` option. This ensures that it won't be overridden on future renders.\n _setPositionReference(computedPositionReference);\n position.refs.setReference(computedPositionReference);\n }, [position.refs]);\n const setReference = React.useCallback(node => {\n if (isElement(node) || node === null) {\n domReferenceRef.current = node;\n setDomReference(node);\n }\n\n // Backwards-compatibility for passing a virtual element to `reference`\n // after it has set the DOM reference.\n if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n // Don't allow setting virtual elements using the old technique back to\n // `null` to support `positionReference` + an unstable `reference`\n // callback ref.\n node !== null && !isElement(node)) {\n position.refs.setReference(node);\n }\n }, [position.refs]);\n const refs = React.useMemo(() => ({\n ...position.refs,\n setReference,\n setPositionReference,\n domReference: domReferenceRef\n }), [position.refs, setReference, setPositionReference]);\n const elements = React.useMemo(() => ({\n ...position.elements,\n domReference: domReference\n }), [position.elements, domReference]);\n const context = React.useMemo(() => ({\n ...position,\n ...rootContext,\n refs,\n elements,\n nodeId\n }), [position, refs, elements, nodeId, rootContext]);\n useModernLayoutEffect(() => {\n rootContext.dataRef.current.floatingContext = context;\n const node = tree == null ? void 0 : tree.nodesRef.current.find(node => node.id === nodeId);\n if (node) {\n node.context = context;\n }\n });\n return React.useMemo(() => ({\n ...position,\n context,\n refs,\n elements\n }), [position, refs, elements, context]);\n}\n\nfunction isMacSafari() {\n return isMac() && isSafari();\n}\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nfunction useFocus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements\n } = context;\n const {\n enabled = true,\n visibleOnly = true\n } = props;\n const blockFocusRef = React.useRef(false);\n const timeoutRef = React.useRef(-1);\n const keyboardModalityRef = React.useRef(true);\n React.useEffect(() => {\n if (!enabled) return;\n const win = getWindow(elements.domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n if (!open && isHTMLElement(elements.domReference) && elements.domReference === activeElement(getDocument$1(elements.domReference))) {\n blockFocusRef.current = true;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n function onPointerDown() {\n keyboardModalityRef.current = false;\n }\n win.addEventListener('blur', onBlur);\n if (isMacSafari()) {\n win.addEventListener('keydown', onKeyDown, true);\n win.addEventListener('pointerdown', onPointerDown, true);\n }\n return () => {\n win.removeEventListener('blur', onBlur);\n if (isMacSafari()) {\n win.removeEventListener('keydown', onKeyDown, true);\n win.removeEventListener('pointerdown', onPointerDown, true);\n }\n };\n }, [elements.domReference, open, enabled]);\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n reason\n } = _ref;\n if (reason === 'reference-press' || reason === 'escape-key') {\n blockFocusRef.current = true;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [events, enabled]);\n React.useEffect(() => {\n return () => {\n clearTimeoutIfSet(timeoutRef);\n };\n }, []);\n const reference = React.useMemo(() => ({\n onMouseLeave() {\n blockFocusRef.current = false;\n },\n onFocus(event) {\n if (blockFocusRef.current) return;\n const target = getTarget$1(event.nativeEvent);\n if (visibleOnly && isElement(target)) {\n // Safari fails to match `:focus-visible` if focus was initially\n // outside the document.\n if (isMacSafari() && !event.relatedTarget) {\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n } else if (!matchesFocusVisible(target)) {\n return;\n }\n }\n onOpenChange(true, event.nativeEvent, 'focus');\n },\n onBlur(event) {\n blockFocusRef.current = false;\n const relatedTarget = event.relatedTarget;\n const nativeEvent = event.nativeEvent;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeoutRef.current = window.setTimeout(() => {\n var _dataRef$current$floa;\n const activeEl = activeElement(elements.domReference ? elements.domReference.ownerDocument : document);\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === elements.domReference) return;\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains$1((_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.refs.floating.current, activeEl) || contains$1(elements.domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n onOpenChange(false, nativeEvent, 'focus');\n });\n }\n }), [dataRef, elements.domReference, onOpenChange, visibleOnly]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nfunction mergeProps(userProps, propsList, elementKey) {\n const map = new Map();\n const isItem = elementKey === 'item';\n let domUserProps = userProps;\n if (isItem && userProps) {\n const {\n [ACTIVE_KEY]: _,\n [SELECTED_KEY]: __,\n ...validProps\n } = userProps;\n domUserProps = validProps;\n }\n return {\n ...(elementKey === 'floating' && {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n }),\n ...domUserProps,\n ...propsList.map(value => {\n const propsOrGetProps = value ? value[elementKey] : null;\n if (typeof propsOrGetProps === 'function') {\n return userProps ? propsOrGetProps(userProps) : null;\n }\n return propsOrGetProps;\n }).concat(userProps).reduce((acc, props) => {\n if (!props) {\n return acc;\n }\n Object.entries(props).forEach(_ref => {\n let [key, value] = _ref;\n if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {\n return;\n }\n if (key.indexOf('on') === 0) {\n if (!map.has(key)) {\n map.set(key, []);\n }\n if (typeof value === 'function') {\n var _map$get;\n (_map$get = map.get(key)) == null || _map$get.push(value);\n acc[key] = function () {\n var _map$get2;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n } else {\n acc[key] = value;\n }\n });\n return acc;\n }, {})\n };\n}\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nfunction useInteractions(propsList) {\n if (propsList === void 0) {\n propsList = [];\n }\n const referenceDeps = propsList.map(key => key == null ? void 0 : key.reference);\n const floatingDeps = propsList.map(key => key == null ? void 0 : key.floating);\n const itemDeps = propsList.map(key => key == null ? void 0 : key.item);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps\n }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\nconst ESCAPE = 'Escape';\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, cols) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && cols && cols > 1) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nfunction useListNavigation(context, props) {\n const {\n open,\n onOpenChange,\n elements,\n floatingId\n } = context;\n const {\n listRef,\n activeIndex,\n onNavigate: unstable_onNavigate = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loop = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n parentOrientation,\n cols = 1,\n scrollItemIntoView = true,\n virtualItemRef,\n itemSizes,\n dense = false\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (allowEscape) {\n if (!loop) {\n warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const floatingFocusElement = getFloatingFocusElement(elements.floating);\n const floatingFocusElementRef = useLatestRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree();\n useModernLayoutEffect(() => {\n context.dataRef.current.orientation = orientation;\n }, [context, orientation]);\n const onNavigate = useEffectEvent(() => {\n unstable_onNavigate(indexRef.current === -1 ? null : indexRef.current);\n });\n const typeableComboboxReference = isTypeableCombobox(elements.domReference);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex != null ? selectedIndex : -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!elements.floating);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useLatestRef(disabledIndices);\n const latestOpenRef = useLatestRef(open);\n const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n const selectedIndexRef = useLatestRef(selectedIndex);\n const [activeId, setActiveId] = React.useState();\n const [virtualId, setVirtualId] = React.useState();\n const focusItem = useEffectEvent(() => {\n function runFocus(item) {\n if (virtual) {\n var _item$id;\n if ((_item$id = item.id) != null && _item$id.endsWith('-fui-option')) {\n item.id = floatingId + \"-\" + Math.random().toString(16).slice(2, 10);\n }\n setActiveId(item.id);\n tree == null || tree.events.emit('virtualfocus', item);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n } else {\n enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? v => v() : requestAnimationFrame;\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) return;\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView = scrollIntoViewOptions && item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView == null || waitedItem.scrollIntoView(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (open && elements.floating) {\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n indexRef.current = selectedIndex;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current();\n }\n }, [enabled, open, elements.floating, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!open) return;\n if (!elements.floating) return;\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs++;\n } else {\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinListIndex(listRef, disabledIndicesRef.current) : getMaxListIndex(listRef, disabledIndicesRef.current);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, elements.floating, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useModernLayoutEffect(() => {\n var _nodes$find;\n if (!enabled || elements.floating || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = (_nodes$find = nodes.find(node => node.id === parentId)) == null || (_nodes$find = _nodes$find.context) == null ? void 0 : _nodes$find.elements.floating;\n const activeEl = activeElement(getDocument$1(elements.floating));\n const treeContainsActiveEl = nodes.some(node => node.context && contains$1(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, elements.floating, tree, parentId, virtual]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!tree) return;\n if (!virtual) return;\n if (parentId) return;\n function handleVirtualFocus(item) {\n setVirtualId(item.id);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n }\n tree.events.on('virtualfocus', handleVirtualFocus);\n return () => {\n tree.events.off('virtualfocus', handleVirtualFocus);\n };\n }, [enabled, tree, virtual, parentId, virtualItemRef]);\n useModernLayoutEffect(() => {\n previousOnNavigateRef.current = onNavigate;\n previousOpenRef.current = open;\n previousMountedRef.current = !!elements.floating;\n });\n useModernLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(currentTarget) {\n if (!latestOpenRef.current) return;\n const index = listRef.current.indexOf(currentTarget);\n if (index !== -1 && indexRef.current !== index) {\n indexRef.current = index;\n onNavigate();\n }\n }\n const props = {\n onFocus(_ref) {\n let {\n currentTarget\n } = _ref;\n forceSyncFocusRef.current = true;\n syncCurrentTarget(currentTarget);\n },\n onClick: _ref2 => {\n let {\n currentTarget\n } = _ref2;\n return currentTarget.focus({\n preventScroll: true\n });\n },\n // Safari\n onMouseMove(_ref3) {\n let {\n currentTarget\n } = _ref3;\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(currentTarget);\n }\n },\n onPointerLeave(_ref4) {\n let {\n pointerType\n } = _ref4;\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n if (!focusItemOnHover) {\n return;\n }\n indexRef.current = -1;\n onNavigate();\n if (!virtual) {\n var _floatingFocusElement;\n (_floatingFocusElement = floatingFocusElementRef.current) == null || _floatingFocusElement.focus({\n preventScroll: true\n });\n }\n }\n };\n return props;\n }, [latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, virtual]);\n const getParentOrientation = React.useCallback(() => {\n var _tree$nodesRef$curren;\n return parentOrientation != null ? parentOrientation : tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.dataRef) == null ? void 0 : _tree$nodesRef$curren.current.orientation;\n }, [parentId, tree, parentOrientation]);\n const commonOnKeyDown = useEffectEvent(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, cols)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(elements.domReference)) {\n if (virtual) {\n tree == null || tree.events.emit('virtualfocus', elements.domReference);\n } else {\n elements.domReference.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate();\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate();\n }\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(listRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(listRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const index = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || listRef.current.map((_, index) => isListIndexDisabled(listRef, index, disabledIndices) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n stopEvent: true\n })];\n if (index != null) {\n indexRef.current = index;\n onNavigate();\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate();\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loop) {\n indexRef.current = currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else {\n if (loop) {\n indexRef.current = currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n }\n if (isIndexOutOfListBounds(listRef, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate();\n }\n });\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': virtualId || activeId\n };\n }, [virtual, open, hasActiveIndex, virtualId, activeId]);\n const floating = React.useMemo(() => {\n return {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown: commonOnKeyDown,\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, orientation, typeableComboboxReference]);\n const reference = React.useMemo(() => {\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n ...ariaActiveDescendantProp,\n onKeyDown(event) {\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isHomeOrEndKey = ['Home', 'End'].includes(event.key);\n const isMoveKey = isArrowKey || isHomeOrEndKey;\n const isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl, cols);\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && open) {\n const rootNode = tree == null ? void 0 : tree.nodesRef.current.find(node => node.parentId == null);\n const deepestNode = tree && rootNode ? getDeepestNode(tree.nodesRef.current, rootNode.id) : null;\n if (isMoveKey && deepestNode && virtualItemRef) {\n const eventObject = new KeyboardEvent('keydown', {\n key: event.key,\n bubbles: true\n });\n if (isCrossOpenKey || isCrossCloseKey) {\n var _deepestNode$context, _deepestNode$context2;\n const isCurrentTarget = ((_deepestNode$context = deepestNode.context) == null ? void 0 : _deepestNode$context.elements.domReference) === event.currentTarget;\n const dispatchItem = isCrossCloseKey && !isCurrentTarget ? (_deepestNode$context2 = deepestNode.context) == null ? void 0 : _deepestNode$context2.elements.domReference : isCrossOpenKey ? listRef.current.find(item => (item == null ? void 0 : item.id) === activeId) : null;\n if (dispatchItem) {\n stopEvent(event);\n dispatchItem.dispatchEvent(eventObject);\n setVirtualId(undefined);\n }\n }\n if ((isMainKey || isHomeOrEndKey) && deepestNode.context) {\n if (deepestNode.context.open && deepestNode.parentId && event.currentTarget !== deepestNode.context.elements.domReference) {\n var _deepestNode$context$;\n stopEvent(event);\n (_deepestNode$context$ = deepestNode.context.elements.domReference) == null || _deepestNode$context$.dispatchEvent(eventObject);\n return;\n }\n }\n }\n return commonOnKeyDown(event);\n }\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!open && !openOnArrowKeyDown && isArrowKey) {\n return;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinListIndex(listRef, disabledIndicesRef.current);\n onNavigate();\n } else {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n }\n }\n return;\n }\n if (isMainKey) {\n if (selectedIndex != null) {\n indexRef.current = selectedIndex;\n }\n stopEvent(event);\n if (!open && openOnArrowKeyDown) {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n } else {\n commonOnKeyDown(event);\n }\n if (open) {\n onNavigate();\n }\n }\n },\n onFocus() {\n if (open && !virtual) {\n indexRef.current = -1;\n onNavigate();\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [activeId, ariaActiveDescendantProp, cols, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, getParentOrientation, rtl, selectedIndex, tree, virtual, virtualItemRef]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\nconst componentRoleToAriaRoleMap = /*#__PURE__*/new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nfunction useRole(context, props) {\n var _elements$domReferenc, _componentRoleToAriaR;\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements,\n floatingId: defaultFloatingId\n } = context;\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const defaultReferenceId = useId();\n const referenceId = ((_elements$domReferenc = elements.domReference) == null ? void 0 : _elements$domReferenc.id) || defaultReferenceId;\n const floatingId = React.useMemo(() => {\n var _getFloatingFocusElem;\n return ((_getFloatingFocusElem = getFloatingFocusElement(elements.floating)) == null ? void 0 : _getFloatingFocusElem.id) || defaultFloatingId;\n }, [elements.floating, defaultFloatingId]);\n const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [\"aria-\" + (role === 'label' ? 'labelledby' : 'describedby')]: open ? floatingId : undefined\n };\n }\n return {\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && {\n id: referenceId\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, floatingId, isNested, open, referenceId, role]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(_ref => {\n let {\n active,\n selected\n } = _ref;\n const commonProps = {\n role: 'option',\n ...(active && {\n id: floatingId + \"-fui-option\"\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n case 'combobox':\n return {\n ...commonProps,\n 'aria-selected': selected\n };\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\n// Converts a JS style key like `backgroundColor` to a CSS transition-property\n// like `background-color`.\nconst camelCaseToKebabCase = str => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());\nfunction execWithArgsOrReturn(valueOrFn, args) {\n return typeof valueOrFn === 'function' ? valueOrFn(args) : valueOrFn;\n}\nfunction useDelayUnmount(open, durationMs) {\n const [isMounted, setIsMounted] = React.useState(open);\n if (open && !isMounted) {\n setIsMounted(true);\n }\n React.useEffect(() => {\n if (!open && isMounted) {\n const timeout = setTimeout(() => setIsMounted(false), durationMs);\n return () => clearTimeout(timeout);\n }\n }, [open, isMounted, durationMs]);\n return isMounted;\n}\n/**\n * Provides a status string to apply CSS transitions to a floating element,\n * correctly handling placement-aware transitions.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstatus\n */\nfunction useTransitionStatus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements: {\n floating\n }\n } = context;\n const {\n duration = 250\n } = props;\n const isNumberDuration = typeof duration === 'number';\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [status, setStatus] = React.useState('unmounted');\n const isMounted = useDelayUnmount(open, closeDuration);\n if (!isMounted && status === 'close') {\n setStatus('unmounted');\n }\n useModernLayoutEffect(() => {\n if (!floating) return;\n if (open) {\n setStatus('initial');\n const frame = requestAnimationFrame(() => {\n // Ensure it opens before paint. With `FloatingDelayGroup`,\n // this avoids a flicker when moving between floating elements\n // to ensure one is always open with no missing frames.\n ReactDOM.flushSync(() => {\n setStatus('open');\n });\n });\n return () => {\n cancelAnimationFrame(frame);\n };\n }\n setStatus('close');\n }, [open, floating]);\n return {\n isMounted,\n status\n };\n}\n/**\n * Provides styles to apply CSS transitions to a floating element, correctly\n * handling placement-aware transitions. Wrapper around `useTransitionStatus`.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstyles\n */\nfunction useTransitionStyles(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n initial: unstable_initial = {\n opacity: 0\n },\n open: unstable_open,\n close: unstable_close,\n common: unstable_common,\n duration = 250\n } = props;\n const placement = context.placement;\n const side = placement.split('-')[0];\n const fnArgs = React.useMemo(() => ({\n side,\n placement\n }), [side, placement]);\n const isNumberDuration = typeof duration === 'number';\n const openDuration = (isNumberDuration ? duration : duration.open) || 0;\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [styles, setStyles] = React.useState(() => ({\n ...execWithArgsOrReturn(unstable_common, fnArgs),\n ...execWithArgsOrReturn(unstable_initial, fnArgs)\n }));\n const {\n isMounted,\n status\n } = useTransitionStatus(context, {\n duration\n });\n const initialRef = useLatestRef(unstable_initial);\n const openRef = useLatestRef(unstable_open);\n const closeRef = useLatestRef(unstable_close);\n const commonRef = useLatestRef(unstable_common);\n useModernLayoutEffect(() => {\n const initialStyles = execWithArgsOrReturn(initialRef.current, fnArgs);\n const closeStyles = execWithArgsOrReturn(closeRef.current, fnArgs);\n const commonStyles = execWithArgsOrReturn(commonRef.current, fnArgs);\n const openStyles = execWithArgsOrReturn(openRef.current, fnArgs) || Object.keys(initialStyles).reduce((acc, key) => {\n acc[key] = '';\n return acc;\n }, {});\n if (status === 'initial') {\n setStyles(styles => ({\n transitionProperty: styles.transitionProperty,\n ...commonStyles,\n ...initialStyles\n }));\n }\n if (status === 'open') {\n setStyles({\n transitionProperty: Object.keys(openStyles).map(camelCaseToKebabCase).join(','),\n transitionDuration: openDuration + \"ms\",\n ...commonStyles,\n ...openStyles\n });\n }\n if (status === 'close') {\n const styles = closeStyles || initialStyles;\n setStyles({\n transitionProperty: Object.keys(styles).map(camelCaseToKebabCase).join(','),\n transitionDuration: closeDuration + \"ms\",\n ...commonStyles,\n ...styles\n });\n }\n }, [closeDuration, closeRef, initialRef, openRef, commonRef, openDuration, status, fnArgs]);\n return {\n isMounted,\n styles\n };\n}\n\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nfunction useTypeahead(context, props) {\n var _ref;\n const {\n open,\n dataRef\n } = context;\n const {\n listRef,\n activeIndex,\n onMatch: unstable_onMatch,\n onTypingChange: unstable_onTypingChange,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = [],\n selectedIndex = null\n } = props;\n const timeoutIdRef = React.useRef(-1);\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef((_ref = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref : -1);\n const matchIndexRef = React.useRef(null);\n const onMatch = useEffectEvent(unstable_onMatch);\n const onTypingChange = useEffectEvent(unstable_onTypingChange);\n const findMatchRef = useLatestRef(findMatch);\n const ignoreKeysRef = useLatestRef(ignoreKeys);\n useModernLayoutEffect(() => {\n if (open) {\n clearTimeoutIfSet(timeoutIdRef);\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open]);\n useModernLayoutEffect(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n var _ref2;\n prevIndexRef.current = (_ref2 = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref2 : -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useEffectEvent(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n } else {\n if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n }\n });\n const onKeyDown = useEffectEvent(event => {\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => (text == null ? void 0 : text.toLocaleLowerCase().indexOf(string.toLocaleLowerCase())) === 0);\n return str ? list.indexOf(str) : -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => {\n var _text$, _text$2;\n return text ? ((_text$ = text[0]) == null ? void 0 : _text$.toLocaleLowerCase()) !== ((_text$2 = text[1]) == null ? void 0 : _text$2.toLocaleLowerCase()) : true;\n });\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n clearTimeoutIfSet(timeoutIdRef);\n timeoutIdRef.current = window.setTimeout(() => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n }, resetMs);\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatch(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const reference = React.useMemo(() => ({\n onKeyDown\n }), [onKeyDown]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n };\n }, [onKeyDown, setTypingChange]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction getArgsWithCustomFloatingHeight(state, height) {\n return {\n ...state,\n rects: {\n ...state.rects,\n floating: {\n ...state.rects.floating,\n height\n }\n }\n };\n}\n/**\n * Positions the floating element such that an inner element inside of it is\n * anchored to the reference element.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nconst inner = props => ({\n name: 'inner',\n options: props,\n async fn(state) {\n const {\n listRef,\n overflowRef,\n onFallbackChange,\n offset: innerOffset = 0,\n index = 0,\n minItemsVisible = 4,\n referenceOverflowThreshold = 0,\n scrollRef,\n ...detectOverflowOptions\n } = evaluate(props, state);\n const {\n rects,\n platform,\n elements: {\n floating\n }\n } = state;\n const item = listRef.current[index];\n const scrollEl = (scrollRef == null ? void 0 : scrollRef.current) || floating;\n\n // Valid combinations:\n // 1. Floating element is the scrollRef and has a border (default)\n // 2. Floating element is not the scrollRef, floating element has a border\n // 3. Floating element is not the scrollRef, scrollRef has a border\n // Floating > {...getFloatingProps()} wrapper > scrollRef > items is not\n // allowed as VoiceOver doesn't work.\n const clientTop = floating.clientTop || scrollEl.clientTop;\n const floatingIsBordered = floating.clientTop !== 0;\n const scrollElIsBordered = scrollEl.clientTop !== 0;\n const floatingIsScrollEl = floating === scrollEl;\n if (process.env.NODE_ENV !== \"production\") {\n if (!state.placement.startsWith('bottom')) {\n warn('`placement` side must be \"bottom\" when using the `inner`', 'middleware.');\n }\n }\n if (!item) {\n return {};\n }\n const nextArgs = {\n ...state,\n ...(await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state))\n };\n const overflow = await platform.detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, scrollEl.scrollHeight + clientTop + floating.clientTop), detectOverflowOptions);\n const refOverflow = await platform.detectOverflow(nextArgs, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const diffY = max(0, overflow.top);\n const nextY = nextArgs.y + diffY;\n const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;\n const rounder = isScrollable ? v => v : round;\n const maxHeight = rounder(max(0, scrollEl.scrollHeight + (floatingIsBordered && floatingIsScrollEl || scrollElIsBordered ? clientTop * 2 : 0) - diffY - max(0, overflow.bottom)));\n scrollEl.style.maxHeight = maxHeight + \"px\";\n scrollEl.scrollTop = diffY;\n\n // There is not enough space, fallback to standard anchored positioning\n if (onFallbackChange) {\n const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;\n ReactDOM.flushSync(() => onFallbackChange(shouldFallback));\n }\n if (overflowRef) {\n overflowRef.current = await platform.detectOverflow(getArgsWithCustomFloatingHeight({\n ...nextArgs,\n y: nextY\n }, scrollEl.offsetHeight + clientTop + floating.clientTop), detectOverflowOptions);\n }\n return {\n y: nextY\n };\n }\n});\n/**\n * Changes the `inner` middleware's `offset` upon a `wheel` event to\n * expand the floating element's height, revealing more list items.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nfunction useInnerOffset(context, props) {\n const {\n open,\n elements\n } = context;\n const {\n enabled = true,\n overflowRef,\n scrollRef,\n onChange: unstable_onChange\n } = props;\n const onChange = useEffectEvent(unstable_onChange);\n const controlledScrollingRef = React.useRef(false);\n const prevScrollTopRef = React.useRef(null);\n const initialOverflowRef = React.useRef(null);\n React.useEffect(() => {\n if (!enabled) return;\n function onWheel(e) {\n if (e.ctrlKey || !el || overflowRef.current == null) {\n return;\n }\n const dY = e.deltaY;\n const isAtTop = overflowRef.current.top >= -0.5;\n const isAtBottom = overflowRef.current.bottom >= -0.5;\n const remainingScroll = el.scrollHeight - el.clientHeight;\n const sign = dY < 0 ? -1 : 1;\n const method = dY < 0 ? 'max' : 'min';\n if (el.scrollHeight <= el.clientHeight) {\n return;\n }\n if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {\n e.preventDefault();\n ReactDOM.flushSync(() => {\n onChange(d => d + Math[method](dY, remainingScroll * sign));\n });\n } else if (/firefox/i.test(getUserAgent())) {\n // Needed to propagate scrolling during momentum scrolling phase once\n // it gets limited by the boundary. UX improvement, not critical.\n el.scrollTop += dY;\n }\n }\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (open && el) {\n el.addEventListener('wheel', onWheel);\n\n // Wait for the position to be ready.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n if (overflowRef.current != null) {\n initialOverflowRef.current = {\n ...overflowRef.current\n };\n }\n });\n return () => {\n prevScrollTopRef.current = null;\n initialOverflowRef.current = null;\n el.removeEventListener('wheel', onWheel);\n };\n }\n }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);\n const floating = React.useMemo(() => ({\n onKeyDown() {\n controlledScrollingRef.current = true;\n },\n onWheel() {\n controlledScrollingRef.current = false;\n },\n onPointerMove() {\n controlledScrollingRef.current = false;\n },\n onScroll() {\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (!overflowRef.current || !el || !controlledScrollingRef.current) {\n return;\n }\n if (prevScrollTopRef.current !== null) {\n const scrollDiff = el.scrollTop - prevScrollTopRef.current;\n if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {\n ReactDOM.flushSync(() => onChange(d => d + scrollDiff));\n }\n }\n\n // [Firefox] Wait for the height change to have been applied.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n });\n }\n }), [elements.floating, onChange, overflowRef, scrollRef]);\n return React.useMemo(() => enabled ? {\n floating\n } : {}, [enabled, floating]);\n}\n\nfunction getNodeChildren(nodes, id, onlyOpenChildren) {\n if (onlyOpenChildren === void 0) {\n onlyOpenChildren = true;\n }\n const directChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && (!onlyOpenChildren || ((_node$context = node.context) == null ? void 0 : _node$context.open));\n });\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nfunction safePolygon(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n const timeoutRef = {\n current: -1\n };\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = _ref => {\n let {\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n } = _ref;\n return function onMouseMove(event) {\n function close() {\n clearTimeoutIfSet(timeoutRef);\n onClose();\n }\n clearTimeoutIfSet(timeoutRef);\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return;\n }\n\n // If any nested child is open, abort.\n if (tree && getNodeChildren(tree.nodesRef.current, nodeId).length) {\n return;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n }\n function getPolygon(_ref2) {\n let [x, y] = _ref2;\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeoutRef.current = window.setTimeout(close, 40);\n }\n };\n };\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}\n\nexport { Composite, CompositeItem, FloatingArrow, FloatingDelayGroup, FloatingFocusManager, FloatingList, FloatingNode, FloatingOverlay, FloatingPortal, FloatingTree, NextFloatingDelayGroup, inner, safePolygon, useClick, useClientPoint, useDelayGroup, useDelayGroupContext, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingPortalNode, useFloatingRootContext, useFloatingTree, useFocus, useHover, useId, useInnerOffset, useInteractions, useListItem, useListNavigation, useMergeRefs, useNextDelayGroup, useRole, useTransitionStatus, useTransitionStyles, useTypeahead };\n", "function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return (node.ownerDocument || node).body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n", "import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport { floor } from '@floating-ui/utils';\nimport { tabbable } from 'tabbable';\n\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n const re = /android/i;\n return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n return getUserAgent().includes('jsdom/');\n}\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n var _activeElement;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction isTypeableCombobox(element) {\n if (!element) return false;\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nfunction matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM()) return true;\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nfunction getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(\"[\" + FOCUSABLE_ATTRIBUTE + \"]\") || floatingElement;\n}\n\nfunction getNodeChildren(nodes, id, onlyOpenChildren) {\n if (onlyOpenChildren === void 0) {\n onlyOpenChildren = true;\n }\n const directChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && (!onlyOpenChildren || ((_node$context = node.context) == null ? void 0 : _node$context.open));\n });\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nfunction getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nfunction getNodeAncestors(nodes, id) {\n var _nodes$find;\n let allAncestors = [];\n let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}\n\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid() && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n if (isJSDOM()) return false;\n return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333\u2022 for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEffectEvent(callback) {\n const ref = React.useRef(() => {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error('Cannot call an event handler while rendering.');\n }\n });\n useSafeInsertionEffect(() => {\n ref.current = callback;\n });\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}\n\nfunction isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nfunction isIndexOutOfListBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nfunction getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n disabledIndices\n });\n}\nfunction getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nfunction findNonDisabledListIndex(listRef, _temp) {\n let {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n } = _temp === void 0 ? {} : _temp;\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= listRef.current.length - 1 && isListIndexDisabled(listRef, index, disabledIndices));\n return index;\n}\nfunction getGridNavigatedIndex(listRef, _ref) {\n let {\n event,\n orientation,\n loop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n } = _ref;\n let nextIndex = prevIndex;\n if (event.key === ARROW_UP) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_DOWN) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loop && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n if (loop && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nfunction createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach((_ref2, index) => {\n let {\n width,\n height\n } = _ref2;\n if (width > cols) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\"[Floating UI]: Invalid grid - item width at index \" + index + \" is greater than grid columns\");\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i++) {\n for (let j = 0; j < height; j++) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex++;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nfunction getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) return -1;\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nfunction getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nfunction isListIndexDisabled(listRef, index, disabledIndices) {\n if (typeof disabledIndices === 'function') {\n return disabledIndices(index);\n } else if (disabledIndices) {\n return disabledIndices.includes(index);\n }\n const element = listRef.current[index];\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}\n\nconst getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container, getTabbableOptions());\n const len = list.length;\n if (len === 0) return;\n const active = activeElement(getDocument(container));\n const index = list.indexOf(active);\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nfunction getNextTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, 1) || referenceElement;\n}\nfunction getPreviousTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nfunction enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}\n\nexport { activeElement, contains, createGridCellMap, disableFocusInside, enableFocusInside, findNonDisabledListIndex, getDeepestNode, getDocument, getFloatingFocusElement, getGridCellIndexOfCorner, getGridCellIndices, getGridNavigatedIndex, getMaxListIndex, getMinListIndex, getNextTabbable, getNodeAncestors, getNodeChildren, getPlatform, getPreviousTabbable, getTabbableOptions, getTarget, getUserAgent, isAndroid, isDifferentGridRow, isEventTargetWithin, isIndexOutOfListBounds, isJSDOM, isListIndexDisabled, isMac, isMouseLikePointerType, isOutsideEvent, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, matchesFocusVisible, stopEvent, useEffectEvent, useLatestRef, index as useModernLayoutEffect };\n", "/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n var _padding$top, _padding$right, _padding$bottom, _padding$left;\n return {\n top: (_padding$top = padding.top) != null ? _padding$top : 0,\n right: (_padding$right = padding.right) != null ? _padding$right : 0,\n bottom: (_padding$bottom = padding.bottom) != null ? _padding$bottom : 0,\n left: (_padding$left = padding.left) != null ? _padding$left : 0\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n", "// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\nconst candidateSelectors = [\n 'input:not([inert]):not([inert] *)',\n 'select:not([inert]):not([inert] *)',\n 'textarea:not([inert]):not([inert] *)',\n 'a[href]:not([inert]):not([inert] *)',\n 'area[href]:not([inert]):not([inert] *)',\n 'button:not([inert]):not([inert] *)',\n '[tabindex]:not(slot):not([inert]):not([inert] *)',\n 'audio[controls]:not([inert]):not([inert] *)',\n 'video[controls]:not([inert]):not([inert] *)',\n '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)',\n 'details>summary:first-of-type:not([inert]):not([inert] *)',\n 'details:not([inert]):not([inert] *)',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n ? function () {}\n : Element.prototype.matches ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n !NoElement && Element.prototype.getRootNode\n ? (element) => element?.getRootNode?.()\n : (element) => element?.ownerDocument;\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Node} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nconst isInert = function (node, lookUp = true) {\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n const inertAtt = node?.getAttribute?.('inert');\n const inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n const result =\n inert ||\n (lookUp &&\n node &&\n // closest does not exist on shadow roots, so we fall back to a manual\n // lookup upward, in case it is not defined.\n (typeof node.closest === 'function'\n ? node.closest('[inert]')\n : isInert(node.parentNode)));\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nconst isContentEditable = function (node) {\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n const attValue = node?.getAttribute?.('contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert (either by itself or via its parent), then all its children are inert\n if (isInert(el)) {\n return [];\n }\n\n let candidates = Array.prototype.slice.apply(\n el.querySelectorAll(candidateSelector)\n );\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nconst getCandidatesIteratively = function (\n elements,\n includeContainer,\n options\n) {\n const candidates = [];\n const elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n const element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n const assigned = element.assignedElements();\n const content = assigned.length ? assigned : element.children;\n const nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push(...nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates,\n });\n }\n } else {\n // check candidate element\n const validCandidate = matches.call(element, candidateSelector);\n if (\n validCandidate &&\n options.filter(element) &&\n (includeContainer || !elements.includes(element))\n ) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n const shadowRoot =\n element.shadowRoot ||\n // check for an undisclosed shadow\n (typeof options.getShadowRoot === 'function' &&\n options.getShadowRoot(element));\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n const validShadowRoot =\n !isInert(shadowRoot, false) &&\n (!options.shadowRootFilter || options.shadowRootFilter(element));\n\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n const nestedCandidates = getCandidatesIteratively(\n shadowRoot === true ? element.children : shadowRoot.children,\n true,\n options\n );\n\n if (options.flatten) {\n candidates.push(...nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates,\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift(...element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nconst hasTabIndex = function (node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nconst getTabIndex = function (node) {\n if (!node) {\n throw new Error('No node provided');\n }\n\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if (\n (/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n isContentEditable(node)) &&\n !hasTabIndex(node)\n ) {\n return 0;\n }\n }\n\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nconst getSortOrderTabIndex = function (node, isScope) {\n const tabIndex = getTabIndex(node);\n\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n\n return tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n return a.tabIndex === b.tabIndex\n ? a.documentOrder - b.documentOrder\n : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n const r =\n node.tagName === 'DETAILS' &&\n Array.prototype.slice\n .apply(node.children)\n .some((child) => child.tagName === 'SUMMARY');\n return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n for (let i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\n\nconst isTabbableRadio = function (node) {\n if (!node.name) {\n return true;\n }\n const radioScope = node.form || getRootNode(node);\n const queryRadios = function (name) {\n return radioScope.querySelectorAll(\n 'input[type=\"radio\"][name=\"' + name + '\"]'\n );\n };\n\n let radioSet;\n if (\n typeof window !== 'undefined' &&\n typeof window.CSS !== 'undefined' &&\n typeof window.CSS.escape === 'function'\n ) {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(\n 'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n err.message\n );\n return false;\n }\n }\n\n const checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nconst isNodeAttached = function (node) {\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n let nodeRoot = node && getRootNode(node);\n let nodeRootHost = nodeRoot?.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n let attached = false;\n if (nodeRoot && nodeRoot !== node) {\n attached = !!(\n nodeRootHost?.ownerDocument?.contains(nodeRootHost) ||\n node?.ownerDocument?.contains(node)\n );\n\n while (!attached && nodeRootHost) {\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = nodeRoot?.host;\n attached = !!nodeRootHost?.ownerDocument?.contains(nodeRootHost);\n }\n }\n\n return attached;\n};\n\nconst isZeroArea = function (node) {\n const { width, height } = node.getBoundingClientRect();\n return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n const visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true,\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n const { visibility } = getComputedStyle(node);\n if (visibility === 'hidden' || visibility === 'collapse') {\n return true;\n }\n\n const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n\n if (\n !displayCheck ||\n displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' ||\n displayCheck === 'legacy-full'\n ) {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n const originalNode = node;\n while (node) {\n const parentElement = node.parentElement;\n const rootNode = getRootNode(node);\n if (\n parentElement &&\n !parentElement.shadowRoot &&\n getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nconst isDisabledFromFieldset = function (node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n let parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (let i = 0; i < parentNode.children.length; i++) {\n const child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *')\n ? true\n : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n if (\n node.disabled ||\n isHiddenInput(node) ||\n isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) ||\n isDisabledFromFieldset(node)\n ) {\n return false;\n }\n return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n if (\n isNonTabbableRadio(node) ||\n getTabIndex(node) < 0 ||\n !isNodeMatchingSelectorFocusable(options, node)\n ) {\n return false;\n }\n return true;\n};\n\nconst isShadowRootTabbable = function (shadowHostNode) {\n const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n const regularTabbables = [];\n const orderedTabbables = [];\n candidates.forEach(function (item, i) {\n const isScope = !!item.scopeParent;\n const element = isScope ? item.scopeParent : item;\n const candidateTabindex = getSortOrderTabIndex(element, isScope);\n const elements = isScope ? sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope\n ? regularTabbables.push(...elements)\n : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements,\n });\n }\n });\n\n return orderedTabbables\n .sort(sortOrderedTabbables)\n .reduce((acc, sortable) => {\n sortable.isScope\n ? acc.push(...sortable.content)\n : acc.push(sortable.content);\n return acc;\n }, [])\n .concat(regularTabbables);\n};\n\nconst tabbable = function (container, options) {\n options = options || {};\n\n let candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively(\n [container],\n options.includeContainer,\n {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable,\n }\n );\n } else {\n candidates = getCandidates(\n container,\n options.includeContainer,\n isNodeMatchingSelectorTabbable.bind(null, options)\n );\n }\n return sortByOrder(candidates);\n};\n\nconst focusable = function (container, options) {\n options = options || {};\n\n let candidates;\n if (options.getShadowRoot) {\n candidates = getCandidatesIteratively(\n [container],\n options.includeContainer,\n {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot,\n }\n );\n } else {\n candidates = getCandidates(\n container,\n options.includeContainer,\n isNodeMatchingSelectorFocusable.bind(null, options)\n );\n }\n\n return candidates;\n};\n\nconst isTabbable = function (node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n .concat('iframe:not([inert]):not([inert] *)')\n .join(',');\n\nconst isFocusable = function (node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable, getTabIndex };\n", "import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n const alignment = getAlignment(placement);\n if (alignment) {\n coords[alignmentAxis] += commonAlign * (alignment === 'end' ? 1 : -1) * (rtl && isVertical ? -1 : 1);\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) && (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(minPadding, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n\n // No rects (e.g. a hidden or detached reference, or a collapsed range) \u2014\n // keep the existing reference rect rather than resetting to an invalid\n // one with non-finite values.\n if (!nativeClientRects.length) {\n return {};\n }\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && (clientRects[0].left > clientRects[1].right || clientRects[1].left > clientRects[0].right) && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n return rectToClientRect({\n x: left,\n y: top,\n width: right - left,\n height: bottom - top\n });\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n return rectToClientRect({\n x: minLeft,\n y: top,\n width: maxRight - minLeft,\n height: bottom - top\n });\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const clampCoord = (axis, coord) => clamp(coord + overflow[axis === 'y' ? 'top' : 'left'], coord, coord - overflow[axis === 'y' ? 'bottom' : 'right']);\n if (checkMainAxis) {\n mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);\n }\n if (checkCrossAxis) {\n crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n var _rawOffset$mainAxis, _rawOffset$crossAxis;\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: (_rawOffset$mainAxis = rawOffset.mainAxis) != null ? _rawOffset$mainAxis : 0,\n crossAxis: (_rawOffset$crossAxis = rawOffset.crossAxis) != null ? _rawOffset$crossAxis : 0\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n// Method syntax keeps callback parameters bivariant, but expressing the\n// explicit `| undefined` required by `exactOptionalPropertyTypes` needs\n// property syntax, which is contravariant under `strictFunctionTypes`.\n// Extracting the function from a method position restores that bivariance so\n// consumers can still assign callbacks with narrower parameter types.\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const shiftData = state.middlewareData.shift;\n const noShift = !shiftData;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (shiftData != null && shiftData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if (shiftData != null && shiftData.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n if (isYAxis) {\n availableWidth = width - 2 * max(overflow.left, overflow.right);\n } else {\n availableHeight = height - 2 * max(overflow.top, overflow.bottom);\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n", "import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement && offsetParent) {\n const win = getWindow(domElement);\n const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return element.getClientRects ? Array.from(element.getClientRects()) : [];\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(html) {\n const scroll = getNodeScroll(html);\n const body = html.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(html);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy, rootBoundary) {\n if (rootBoundary === void 0) {\n rootBoundary = 'viewport';\n }\n const isLayoutViewport = rootBoundary === 'layoutViewport';\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n // Client coordinates are relative to the layout viewport, except in\n // WebKit with an `absolute` strategy, where they are relative to the\n // visual viewport.\n const layoutRelativeClientCoords = !isWebKit() || strategy === 'fixed';\n if (isLayoutViewport) {\n if (!layoutRelativeClientCoords) {\n x = -visualViewport.offsetLeft;\n y = -visualViewport.offsetTop;\n }\n } else {\n width = visualViewport.width;\n height = visualViewport.height;\n if (layoutRelativeClientCoords) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // `scrollbar-gutter: stable` on the <html> reserves gutter space that shrinks\n // the visual width but isn't reflected in `html.clientWidth`, so subtract it.\n // Only the inline-end (right) gutter can hold the scrollbar; `both-edges` also\n // reserves an empty inline-start gutter that clips nothing, so exclude just\n // the one scrollbar-side gutter \u2014 halve the measured (two-gutter) total. A\n // left-side scrollbar (`windowScrollbarX > 0`) is already handled by\n // `getHTMLOffset`/`visualViewport.width`; skip it here.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n const gutter = getComputedStyle(html).scrollbarGutter === 'stable both-edges' ? reservedWidth / 2 : reservedWidth;\n if (gutter <= SCROLLBAR_MAX) {\n width -= gutter;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = getScale(element);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport' || clippingAncestor === 'layoutViewport') {\n rect = getViewportRect(element, strategy, clippingAncestor);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let lastKeptComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n // Position of the containing block chain below the current node. A fixed\n // element whose containing block hasn't been found yet is a fixed chain.\n const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';\n\n // A non-containing ancestor does not clip the element when the chain\n // below it escapes it: a fixed chain escapes all ancestors up to the\n // next containing block, an absolute chain escapes static ancestors.\n const shouldDropCurrentNode = !currentNodeIsContaining && (lastPosition === 'fixed' || lastPosition === 'absolute' && computedStyle.position === 'static');\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // The kept node carries the chain position for the next iteration.\n lastKeptComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n if (!isOffsetParentAnElement && documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove, ancestorResize) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n\n // The entry is a snapshot, so the reference may have moved since the\n // intersection was computed (under performance constraints, or between\n // consecutive frames of a multi-frame layout shift). The reported ratio\n // and the observed area are stale in that case and cannot be trusted to\n // detect subsequent movement, so refresh regardless of the ratio.\n if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n return refresh();\n }\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped in place, the ratio is 0. Throttle\n // the refresh to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n const win = getWindow(element);\n // The window is a resize ancestor, so when `ancestorResize` is enabled its\n // listener already runs the update on resize. Here we only need to rebuild\n // the `IntersectionObserver` for the new root size, skipping a redundant\n // update. When `ancestorResize` is disabled, this becomes the sole update.\n const handleResize = () => refresh(ancestorResize);\n win.addEventListener('resize', handleResize);\n refresh(true);\n return () => {\n win.removeEventListener('resize', handleResize);\n cleanup();\n };\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update);\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = options != null ? options : {};\n const platformWithCache = {\n ...platform,\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n", "import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element \u2014\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\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/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __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\nexport function __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\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __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}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n", "import React, { type HTMLAttributes } from \"react\";\n\nexport interface CalendarContainerProps extends React.PropsWithChildren<\n HTMLAttributes<HTMLDivElement>\n> {\n showTimeSelectOnly?: boolean;\n showTime?: boolean;\n inline?: boolean;\n}\n\nconst CalendarContainer: React.FC<CalendarContainerProps> = function ({\n showTimeSelectOnly = false,\n showTime = false,\n className,\n children,\n inline,\n}: CalendarContainerProps) {\n const ariaLabel = showTimeSelectOnly\n ? \"Choose Time\"\n : `Choose Date${showTime ? \" and Time\" : \"\"}`;\n\n return (\n <div\n className={className}\n aria-label={ariaLabel}\n role={inline ? undefined : \"dialog\"}\n aria-modal={inline ? undefined : \"true\"}\n translate=\"no\"\n >\n {children}\n </div>\n );\n};\n\nexport default CalendarContainer;\n", "import React, { useCallback, useEffect, useRef } from \"react\";\n\nexport type ClickOutsideHandler = (event: MouseEvent) => void;\n\ninterface ClickOutsideWrapperProps {\n onClickOutside: ClickOutsideHandler;\n className?: string;\n children: React.ReactNode;\n containerRef?: React.RefObject<HTMLDivElement | null>;\n style?: React.CSSProperties;\n ignoreClass?: string;\n}\n\nconst useDetectClickOutside = (\n onClickOutside: ClickOutsideHandler,\n ignoreClass?: string,\n) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const onClickOutsideRef = useRef(onClickOutside);\n useEffect(() => {\n onClickOutsideRef.current = onClickOutside;\n }, [onClickOutside]);\n const handleClickOutside = useCallback(\n (event: MouseEvent) => {\n const target =\n (event.composed &&\n event.composedPath &&\n event\n .composedPath()\n .find((eventTarget) => eventTarget instanceof Node)) ||\n event.target;\n if (ref.current && !ref.current.contains(target as Node)) {\n if (\n !(\n ignoreClass &&\n target instanceof HTMLElement &&\n target.classList.contains(ignoreClass)\n )\n ) {\n onClickOutsideRef.current?.(event);\n }\n }\n },\n [ignoreClass],\n );\n useEffect(() => {\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [handleClickOutside]);\n return ref;\n};\n\nexport const ClickOutsideWrapper: React.FC<ClickOutsideWrapperProps> = ({\n children,\n onClickOutside,\n className,\n containerRef,\n style,\n ignoreClass,\n}) => {\n const detectRef = useDetectClickOutside(onClickOutside, ignoreClass);\n return (\n <div\n className={className}\n style={style}\n ref={(node: HTMLDivElement | null) => {\n detectRef.current = node;\n if (containerRef) {\n containerRef.current = node;\n }\n }}\n >\n {children}\n </div>\n );\n};\n", "import {\n addDays,\n addHours,\n addMinutes,\n addMonths,\n addQuarters,\n addSeconds,\n addWeeks,\n addYears,\n isEqual as dfIsEqual,\n isSameDay as dfIsSameDay,\n isSameMonth as dfIsSameMonth,\n isSameQuarter as dfIsSameQuarter,\n isSameYear as dfIsSameYear,\n differenceInCalendarDays,\n differenceInCalendarMonths,\n differenceInCalendarQuarters,\n differenceInCalendarYears,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n format,\n getDate,\n getDay,\n getHours,\n getISOWeek,\n getMinutes,\n getMonth,\n getQuarter,\n getSeconds,\n getTime,\n getYear,\n isAfter,\n isBefore,\n isDate,\n isValid as isValidDate,\n isWithinInterval,\n max,\n min,\n parse,\n parseISO,\n set,\n setHours,\n setMinutes,\n setMonth,\n setQuarter,\n setSeconds,\n setYear,\n startOfDay,\n startOfMonth,\n startOfQuarter,\n startOfWeek,\n startOfYear,\n subDays,\n subMonths,\n subQuarters,\n subWeeks,\n subYears,\n toDate,\n} from \"date-fns\";\n\nimport type { Locale as DateFnsLocale, Day } from \"date-fns\";\n\n// Timezone support types and utilities\n// These are dynamically imported when timeZone prop is used\nexport type TimeZone = string;\n\ninterface DateFnsTz {\n toZonedTime: (date: Date | number | string, timeZone: string) => Date;\n fromZonedTime: (date: Date | number | string, timeZone: string) => Date;\n formatInTimeZone: (\n date: Date | number | string,\n timeZone: string,\n formatStr: string,\n options?: { locale?: DateFnsLocale },\n ) => string;\n}\n\n// Cache for the date-fns-tz module\nlet dateFnsTz: DateFnsTz | null = null;\nlet dateFnsTzLoadAttempted = false;\n\n/**\n * Resets the date-fns-tz module cache. Used for testing.\n * @internal\n */\nexport function __resetDateFnsTzCache(): void {\n dateFnsTz = null;\n dateFnsTzLoadAttempted = false;\n}\n\n/**\n * Sets the date-fns-tz module to null to simulate it not being installed. Used for testing.\n * @internal\n */\nexport function __setDateFnsTzNull(): void {\n dateFnsTz = null;\n dateFnsTzLoadAttempted = true;\n}\n\n/**\n * Attempts to load date-fns-tz module.\n * Returns null if the module is not installed.\n */\nfunction getDateFnsTz(): DateFnsTz | null {\n if (dateFnsTzLoadAttempted) {\n return dateFnsTz;\n }\n\n dateFnsTzLoadAttempted = true;\n\n try {\n // Dynamic require for date-fns-tz\n // Use a variable to prevent webpack from statically analyzing the require\n // and showing warnings when the optional dependency is not installed\n // See: https://github.com/Hacker0x01/react-datepicker/issues/6154\n const dateFnsTzModuleName = \"date-fns-tz\";\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n dateFnsTz = require(dateFnsTzModuleName) as DateFnsTz;\n } catch {\n /* istanbul ignore next - only executes when date-fns-tz is not installed */\n dateFnsTz = null;\n }\n\n return dateFnsTz;\n}\n\n/**\n * Converts a date to the specified timezone.\n * If no timezone is specified or date-fns-tz is not installed, returns the original date.\n *\n * @param date - The date to convert\n * @param timeZone - The IANA timezone identifier (e.g., \"America/New_York\", \"UTC\")\n * @returns The date in the specified timezone\n */\nexport function toZonedTime(date: Date, timeZone?: TimeZone): Date {\n if (!timeZone) {\n return date;\n }\n\n const tz = getDateFnsTz();\n if (!tz) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n 'react-datepicker: timeZone prop requires \"date-fns-tz\" package. ' +\n \"Please install it: npm install date-fns-tz\",\n );\n }\n return date;\n }\n\n return tz.toZonedTime(date, timeZone);\n}\n\n/**\n * Converts a date from the specified timezone to UTC.\n * If no timezone is specified or date-fns-tz is not installed, returns the original date.\n *\n * @param date - The date in the specified timezone\n * @param timeZone - The IANA timezone identifier (e.g., \"America/New_York\", \"UTC\")\n * @returns The date in UTC\n */\nexport function fromZonedTime(date: Date, timeZone?: TimeZone): Date {\n if (!timeZone) {\n return date;\n }\n\n const tz = getDateFnsTz();\n if (!tz) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n 'react-datepicker: timeZone prop requires \"date-fns-tz\" package. ' +\n \"Please install it: npm install date-fns-tz\",\n );\n }\n return date;\n }\n\n return tz.fromZonedTime(date, timeZone);\n}\n\n/**\n * Formats a date in the specified timezone.\n * If no timezone is specified, uses the standard format function.\n *\n * @param date - The date to format\n * @param formatStr - The format string\n * @param timeZone - The IANA timezone identifier\n * @param locale - The locale object\n * @returns The formatted date string\n */\nexport function formatInTimeZone(\n date: Date,\n formatStr: string,\n timeZone?: TimeZone,\n locale?: DateFnsLocale,\n): string {\n if (!timeZone) {\n return format(date, formatStr, {\n locale,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n }\n\n const tz = getDateFnsTz();\n if (!tz) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n 'react-datepicker: timeZone prop requires \"date-fns-tz\" package. ' +\n \"Please install it: npm install date-fns-tz\",\n );\n }\n return format(date, formatStr, {\n locale,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n }\n\n return tz.formatInTimeZone(date, timeZone, formatStr, { locale });\n}\n\n/**\n * Gets the current date/time in the specified timezone.\n *\n * @param timeZone - The IANA timezone identifier\n * @returns The current date in the specified timezone\n */\nexport function nowInTimeZone(timeZone?: TimeZone): Date {\n const now = new Date();\n return toZonedTime(now, timeZone);\n}\n\nexport type DateNumberType = Day;\ninterface LocaleObj extends Pick<\n DateFnsLocale,\n \"options\" | \"formatLong\" | \"localize\" | \"match\"\n> {}\n\nexport type Locale = string | LocaleObj;\n\nexport enum KeyType {\n ArrowUp = \"ArrowUp\",\n ArrowDown = \"ArrowDown\",\n ArrowLeft = \"ArrowLeft\",\n ArrowRight = \"ArrowRight\",\n PageUp = \"PageUp\",\n PageDown = \"PageDown\",\n Home = \"Home\",\n End = \"End\",\n Enter = \"Enter\",\n Space = \" \",\n Tab = \"Tab\",\n Escape = \"Escape\",\n Backspace = \"Backspace\",\n X = \"x\",\n}\n\nfunction getLocaleScope() {\n // Use this cast to avoid messing with users globalThis (like window) and the rest of keys in the globalThis object we don't care about\n const scope = (typeof window !== \"undefined\"\n ? window\n : globalThis) as unknown as {\n __localeId__?: string;\n __localeData__: Record<string, LocaleObj>;\n };\n\n return scope;\n}\n\nexport const DEFAULT_YEAR_ITEM_NUMBER = 12;\n\n// ** Date Constructors **\n\nexport function newDate(value?: string | Date | number | null): Date {\n if (value == null) {\n return new Date();\n }\n\n const d = typeof value === \"string\" ? parseISO(value) : toDate(value);\n return isValid(d) ? d : new Date();\n}\n\n/**\n * Parses a date.\n *\n * @param value - The string representing the Date in a parsable form, e.g., ISO 1861\n * @param dateFormat - The date format.\n * @param locale - The locale.\n * @param strictParsing - The strict parsing flag.\n * @param refDate - The base date to be passed to date-fns parse() function.\n * @returns - The parsed date or null.\n */\nexport function parseDate(\n value: string,\n dateFormat: string | string[],\n locale: Locale | undefined,\n strictParsing: boolean,\n refDate: Date = newDate(),\n): Date | null {\n const localeObject =\n getLocaleObject(locale) || getLocaleObject(getDefaultLocale());\n\n const formats = Array.isArray(dateFormat) ? dateFormat : [dateFormat];\n\n for (const format of formats) {\n const parsedDate = parse(value, format, refDate, {\n locale: localeObject,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n if (\n isValid(parsedDate) &&\n (!strictParsing || value === formatDate(parsedDate, format, locale))\n ) {\n return parsedDate;\n }\n }\n\n // When strictParsing is false, try native Date parsing as a fallback\n // This allows flexible input formats like \"12/05/2025\" or \"2025-12-16\"\n // even when the dateFormat prop specifies a different format.\n // Only attempt this for inputs that look like complete dates (minimum\n // length of 8 characters, e.g., \"1/1/2000\") to avoid parsing partial\n // inputs like \"03/\" or \"2000\" which should be handled by parseDateForNavigation.\n if (!strictParsing && value && value.length >= 8) {\n const nativeDate = new Date(value);\n if (isValidDate(nativeDate)) {\n return nativeDate;\n }\n }\n\n return null;\n}\n\n/**\n * Parses a partial date string for calendar navigation purposes.\n * Unlike parseDate, this function attempts to extract whatever date\n * information is available (year, month) from a partial input,\n * returning a date suitable for navigating the calendar view.\n *\n * @param value - The date string to parse.\n * @param refDate - The reference date to use for missing components.\n * @returns - A date for navigation or null if no date info could be extracted.\n */\nexport function parseDateForNavigation(\n value: string,\n refDate: Date = newDate(),\n): Date | null {\n if (!value) return null;\n\n // Try to extract a 4-digit year from the input\n const yearMatch = value.match(/\\b(1\\d{3}|2\\d{3})\\b/);\n if (!yearMatch || !yearMatch[1]) return null;\n\n const year = parseInt(yearMatch[1], 10);\n\n // Try to extract a month (1-12) from the input\n // Look for patterns like \"03/\", \"/03\", \"03-\", \"-03\" or standalone \"03\" at start\n const monthMatch = value.match(/(?:^|[/\\-\\s])?(0?[1-9]|1[0-2])(?:[/\\-\\s]|$)/);\n const month =\n monthMatch && monthMatch[1]\n ? parseInt(monthMatch[1], 10) - 1\n : refDate.getMonth();\n\n // Return a date with the extracted year and month, using day 1\n return new Date(year, month, 1);\n}\n\n// ** Date \"Reflection\" **\n\nexport { isDate, set };\n\n/**\n * Checks if a given date is a valid Date object.\n * @param date - The date to be checked.\n * @returns A boolean value indicating whether the date is valid.\n */\nexport function isValid(date: Date): boolean {\n return isValidDate(date);\n}\n\n/**\n * Safely returns a valid Date or null.\n * This handles cases where a value might be passed as a string or other\n * invalid type at runtime, even though TypeScript expects a Date.\n * @param date - The value to check (typed as Date but could be anything at runtime)\n * @returns The date if it's a valid Date object, otherwise null\n */\nexport function safeToDate(date: Date | null | undefined): Date | null {\n if (date == null) {\n return null;\n }\n // Check if it's actually a Date object AND is valid\n if (isDate(date) && isValidDate(date)) {\n return date;\n }\n return null;\n}\n\n// ** Date Formatting **\n\n/**\n * Formats a date.\n *\n * @param date - The date.\n * @param formatStr - The format string.\n * @param locale - The locale.\n * @returns - The formatted date.\n */\nexport function formatDate(\n date: Date,\n formatStr: string,\n locale?: Locale,\n): string {\n if (locale === \"en\") {\n return format(date, formatStr, {\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n }\n let localeObj = locale ? getLocaleObject(locale) : undefined;\n if (locale && !localeObj) {\n console.warn(\n `A locale object was not found for the provided string [\"${locale}\"].`,\n );\n }\n localeObj = localeObj || getLocaleObject(getDefaultLocale());\n return format(date, formatStr, {\n locale: localeObj,\n useAdditionalWeekYearTokens: true,\n useAdditionalDayOfYearTokens: true,\n });\n}\n\n/**\n * Safely formats a date.\n *\n * @param date - The date.\n * @param options - An object containing the dateFormat and locale.\n * @returns - The formatted date or an empty string.\n */\nexport function safeDateFormat(\n date: Date | null | undefined,\n { dateFormat, locale }: { dateFormat: string | string[]; locale?: Locale },\n): string {\n const formatStr = (\n Array.isArray(dateFormat) && dateFormat.length > 0\n ? dateFormat[0]\n : dateFormat\n ) as string; // Cast to string because it's impossible to get `string | string[] | undefined` here and typescript doesn't know that\n return (date && formatDate(date, formatStr, locale)) || \"\";\n}\n\n/**\n * Used as a delimiter to separate two dates when formatting a date range\n */\nexport const DATE_RANGE_SEPARATOR = \" - \";\n\n/**\n * Safely formats a date range.\n *\n * @param startDate - The start date.\n * @param endDate - The end date.\n * @param props - The props.\n * @returns - The formatted date range or an empty string.\n */\nexport function safeDateRangeFormat(\n startDate: Date | null | undefined,\n endDate: Date | null | undefined,\n props: {\n dateFormat: string | string[];\n locale?: Locale;\n rangeSeparator?: string;\n },\n): string {\n if (!startDate && !endDate) {\n return \"\";\n }\n\n const formattedStartDate = startDate ? safeDateFormat(startDate, props) : \"\";\n const formattedEndDate = endDate ? safeDateFormat(endDate, props) : \"\";\n const dateRangeSeparator = props.rangeSeparator || DATE_RANGE_SEPARATOR;\n\n return `${formattedStartDate}${dateRangeSeparator}${formattedEndDate}`;\n}\n\n/**\n * Safely formats multiple dates.\n *\n * @param dates - The dates.\n * @param props - The props.\n * @returns - The formatted dates or an empty string.\n */\nexport function safeMultipleDatesFormat(\n dates: Date[],\n props: { dateFormat: string | string[]; locale?: Locale },\n): string {\n if (!dates?.length) {\n return \"\";\n }\n\n const formattedFirstDate = dates[0] ? safeDateFormat(dates[0], props) : \"\";\n if (dates.length === 1) {\n return formattedFirstDate;\n }\n\n if (dates.length === 2 && dates[1]) {\n const formattedSecondDate = safeDateFormat(dates[1], props);\n return `${formattedFirstDate}, ${formattedSecondDate}`;\n }\n\n const extraDatesCount = dates.length - 1;\n return `${formattedFirstDate} (+${extraDatesCount})`;\n}\n// ** Date Setters **\n\n/**\n * Sets the time for a given date.\n *\n * @param date - The date.\n * @param time - An object containing the hour, minute, and second.\n * @returns - The date with the time set.\n */\nexport function setTime(\n date: Date,\n { hour = 0, minute = 0, second = 0 },\n): Date {\n return setHours(setMinutes(setSeconds(date, second), minute), hour);\n}\n\nexport { setHours, setMinutes, setMonth, setQuarter, setYear };\n\n// ** Date Getters **\n\n// getDay Returns day of week, getDate returns day of month\nexport {\n getDate,\n getDay,\n getHours,\n getMinutes,\n getMonth,\n getQuarter,\n getSeconds,\n getTime,\n getYear,\n};\n\n/**\n * Gets the week of the year for a given date.\n *\n * @param date - The date.\n * @returns - The week of the year.\n */\nexport function getWeek(date: Date): number {\n return getISOWeek(date);\n}\n\n/**\n * Gets the day of the week code for a given day.\n *\n * @param day - The day.\n * @param locale - The locale.\n * @returns - The day of the week code.\n */\nexport function getDayOfWeekCode(day: Date, locale?: Locale): string {\n return formatDate(day, \"ddd\", locale);\n}\n\n// *** Start of ***\n\n/**\n * Gets the start of the day for a given date.\n *\n * @param date - The date.\n * @returns - The start of the day.\n */\nexport function getStartOfDay(date: Date): Date {\n return startOfDay(date);\n}\n\n/**\n * Gets the start of the week for a given date.\n *\n * @param date - The date.\n * @param locale - The locale.\n * @param calendarStartDay - The day the calendar starts on.\n * @returns - The start of the week.\n */\nexport function getStartOfWeek(\n date: Date,\n locale?: Locale,\n calendarStartDay?: Day,\n): Date {\n const localeObj = locale\n ? getLocaleObject(locale)\n : getLocaleObject(getDefaultLocale());\n return startOfWeek(date, {\n locale: localeObj,\n weekStartsOn: calendarStartDay,\n });\n}\n\n/**\n * Gets the start of the month for a given date.\n *\n * @param date - The date.\n * @returns - The start of the month.\n */\nexport function getStartOfMonth(date: Date): Date {\n return startOfMonth(date);\n}\n\n/**\n * Gets the start of the year for a given date.\n *\n * @param date - The date.\n * @returns - The start of the year.\n */\nexport function getStartOfYear(date: Date): Date {\n return startOfYear(date);\n}\n\n/**\n * Gets the start of the quarter for a given date.\n *\n * @param date - The date.\n * @returns - The start of the quarter.\n */\nexport function getStartOfQuarter(date: Date): Date {\n return startOfQuarter(date);\n}\n\n/**\n * Gets the start of today.\n *\n * @returns - The start of today.\n */\nexport function getStartOfToday(): Date {\n return startOfDay(newDate());\n}\n\n// *** End of ***\n/**\n * Gets the end of the day for a given date.\n *\n * @param date - The date.\n * @returns - The end of the day.\n */\nexport function getEndOfDay(date: Date): Date {\n return endOfDay(date);\n}\n\n/**\n * Gets the end of the week for a given date.\n *\n * @param date - The date.\n * @returns - The end of the week.\n */\nexport function getEndOfWeek(date: Date): Date {\n return endOfWeek(date);\n}\n\n/**\n * Gets the end of the month for a given date.\n *\n * @param date - The date.\n * @returns - The end of the month.\n */\nexport function getEndOfMonth(date: Date): Date {\n return endOfMonth(date);\n}\n\n// ** Date Math **\n\n// *** Addition ***\n\nexport {\n addDays,\n addMinutes,\n addMonths,\n addQuarters,\n addSeconds,\n addWeeks,\n addYears,\n};\n\n// *** Subtraction ***\n\nexport { addHours, subDays, subMonths, subQuarters, subWeeks, subYears };\n\n// ** Date Comparison **\n\nexport { isAfter, isBefore };\n\n/**\n * Checks if two dates are in the same year.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same year, false otherwise.\n */\nexport function isSameYear(date1: Date | null, date2: Date | null): boolean {\n if (date1 && date2) {\n return dfIsSameYear(date1, date2);\n } else {\n return !date1 && !date2;\n }\n}\n\n/**\n * Checks if two dates are in the same month.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same month, false otherwise.\n */\nexport function isSameMonth(date1: Date | null, date2?: Date | null): boolean {\n if (date1 && date2) {\n return dfIsSameMonth(date1, date2);\n } else {\n return !date1 && !date2;\n }\n}\n\n/**\n * Checks if two dates are in the same quarter.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are in the same quarter, false otherwise.\n */\nexport function isSameQuarter(date1: Date | null, date2: Date | null): boolean {\n if (date1 && date2) {\n return dfIsSameQuarter(date1, date2);\n } else {\n return !date1 && !date2;\n }\n}\n\n/**\n * Checks if two dates are on the same day.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are on the same day, false otherwise.\n */\nexport function isSameDay(date1?: Date | null, date2?: Date | null): boolean {\n if (date1 && date2) {\n return dfIsSameDay(date1, date2);\n } else {\n return !date1 && !date2;\n }\n}\n\n/**\n * Checks if two dates are equal.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - True if the dates are equal, false otherwise.\n */\nexport function isEqual(\n date1: Date | null | undefined,\n date2: Date | null | undefined,\n): boolean {\n if (date1 && date2) {\n return dfIsEqual(date1, date2);\n } else {\n return !date1 && !date2;\n }\n}\n\n/**\n * Checks if a day is within a date range.\n *\n * @param day - The day to check.\n * @param startDate - The start date of the range.\n * @param endDate - The end date of the range.\n * @returns - True if the day is within the range, false otherwise.\n */\nexport function isDayInRange(\n day: Date,\n startDate: Date,\n endDate: Date,\n): boolean {\n let valid;\n const start = startOfDay(startDate);\n const end = endOfDay(endDate);\n\n try {\n valid = isWithinInterval(day, { start, end });\n } catch (err) {\n valid = false;\n }\n return valid;\n}\n\n// *** Diffing ***\n\n/**\n * Gets the difference in days between two dates.\n *\n * @param date1 - The first date.\n * @param date2 - The second date.\n * @returns - The difference in days.\n */\nexport function getDaysDiff(date1: Date, date2: Date): number {\n return differenceInCalendarDays(date1, date2);\n}\n\n// ** Date Localization **\n\n/**\n * Registers a locale.\n *\n * @param localeName - The name of the locale.\n * @param localeData - The data of the locale.\n */\n\nexport function registerLocale(\n localeName: string,\n localeData: LocaleObj,\n): void {\n const scope = getLocaleScope();\n\n if (!scope.__localeData__) {\n scope.__localeData__ = {};\n }\n scope.__localeData__[localeName] = localeData;\n}\n\n/**\n * Sets the default locale.\n *\n * @param localeName - The name of the locale.\n */\nexport function setDefaultLocale(localeName?: string): void {\n const scope = getLocaleScope();\n\n scope.__localeId__ = localeName;\n}\n\n/**\n * Gets the default locale.\n *\n * @returns - The default locale.\n */\nexport function getDefaultLocale(): string | undefined {\n const scope = getLocaleScope();\n\n return scope.__localeId__;\n}\n\n/**\n * Gets the locale object.\n *\n * @param localeSpec - The locale specification.\n * @returns - The locale object.\n */\nexport function getLocaleObject(localeSpec?: Locale): LocaleObj | undefined {\n if (typeof localeSpec === \"string\") {\n // Treat it as a locale name registered by registerLocale\n const scope = getLocaleScope();\n // Null was replaced with undefined to avoid type coercion\n return scope.__localeData__ ? scope.__localeData__[localeSpec] : undefined;\n } else {\n // Treat it as a raw date-fns locale object\n return localeSpec;\n }\n}\n\n/**\n * Formats the weekday in a given locale.\n *\n * @param date - The date to format.\n * @param formatFunc - The formatting function.\n * @param locale - The locale to use for formatting.\n * @returns - The formatted weekday.\n */\nexport function getFormattedWeekdayInLocale(\n date: Date,\n formatFunc: (date: string) => string,\n locale?: Locale,\n): string {\n return formatFunc(formatDate(date, \"EEEE\", locale));\n}\n\n/**\n * Gets the minimum weekday in a given locale.\n *\n * @param date - The date to format.\n * @param locale - The locale to use for formatting.\n * @returns - The minimum weekday.\n */\nexport function getWeekdayMinInLocale(date: Date, locale?: Locale): string {\n return formatDate(date, \"EEEEEE\", locale);\n}\n\n/**\n * Gets the short weekday in a given locale.\n *\n * @param date - The date to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short weekday.\n */\nexport function getWeekdayShortInLocale(date: Date, locale?: Locale): string {\n return formatDate(date, \"EEE\", locale);\n}\n\n/**\n * Gets the month in a given locale.\n *\n * @param month - The month to format.\n * @param locale - The locale to use for formatting.\n * @returns - The month.\n */\nexport function getMonthInLocale(month: number, locale?: Locale): string {\n return formatDate(setMonth(newDate(), month), \"LLLL\", locale);\n}\n\n/**\n * Gets the short month in a given locale.\n *\n * @param month - The month to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short month.\n */\nexport function getMonthShortInLocale(month: number, locale?: Locale): string {\n return formatDate(setMonth(newDate(), month), \"LLL\", locale);\n}\n\n/**\n * Gets the short quarter in a given locale.\n *\n * @param quarter - The quarter to format.\n * @param locale - The locale to use for formatting.\n * @returns - The short quarter.\n */\nexport function getQuarterShortInLocale(\n quarter: number,\n locale?: Locale,\n): string {\n return formatDate(setQuarter(newDate(), quarter), \"QQQ\", locale);\n}\n\n// ** Utils for some components **\n\nexport interface DateFilterOptions {\n minDate?: Date;\n maxDate?: Date;\n excludeDates?: { date: Date; message?: string }[] | Date[];\n excludeDateIntervals?: { start: Date; end: Date }[];\n includeDates?: Date[];\n includeDateIntervals?: { start: Date; end: Date }[];\n filterDate?: (date: Date) => boolean;\n yearItemNumber?: number;\n}\n\nexport type DateFilterOptionsWithDisabled = DateFilterOptions & {\n disabled?: boolean;\n};\n\n/**\n * Checks if a day is disabled.\n *\n * @param day - The day to check.\n * @param options - The options to consider when checking.\n * @returns - Returns true if the day is disabled, false otherwise.\n */\nexport function isDayDisabled(\n day: Date,\n {\n minDate,\n maxDate,\n excludeDates,\n excludeDateIntervals,\n includeDates,\n includeDateIntervals,\n filterDate,\n disabled,\n }: DateFilterOptionsWithDisabled = {},\n): boolean {\n if (disabled) {\n return true;\n }\n\n return (\n isOutOfBounds(day, { minDate, maxDate }) ||\n (excludeDates &&\n excludeDates.some((excludeDate) => {\n if (excludeDate instanceof Date) {\n return isSameDay(day, excludeDate);\n } else {\n return isSameDay(day, excludeDate.date);\n }\n })) ||\n (excludeDateIntervals &&\n excludeDateIntervals.some(({ start, end }) =>\n isWithinInterval(day, { start, end }),\n )) ||\n (includeDates &&\n !includeDates.some((includeDate) => isSameDay(day, includeDate))) ||\n (includeDateIntervals &&\n !includeDateIntervals.some(({ start, end }) =>\n isWithinInterval(day, { start, end }),\n )) ||\n (filterDate && !filterDate(newDate(day))) ||\n false\n );\n}\n\n/**\n * Checks if a day is excluded.\n *\n * @param day - The day to check.\n * @param options - The options to consider when checking.\n * @returns - Returns true if the day is excluded, false otherwise.\n */\nexport function isDayExcluded(\n day: Date,\n {\n excludeDates,\n excludeDateIntervals,\n }: Pick<DateFilterOptions, \"excludeDates\" | \"excludeDateIntervals\"> = {},\n): boolean {\n if (excludeDateIntervals && excludeDateIntervals.length > 0) {\n return excludeDateIntervals.some(({ start, end }) =>\n isWithinInterval(day, { start, end }),\n );\n }\n return (\n (excludeDates &&\n excludeDates.some((excludeDate) => {\n if (excludeDate instanceof Date) {\n return isSameDay(day, excludeDate);\n } else {\n return isSameDay(day, excludeDate.date ?? new Date());\n }\n })) ||\n false\n );\n}\n\nexport function isMonthDisabled(\n month: Date,\n {\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n }: Pick<\n DateFilterOptions,\n \"minDate\" | \"maxDate\" | \"excludeDates\" | \"includeDates\" | \"filterDate\"\n > = {},\n): boolean {\n return (\n isOutOfBounds(month, {\n minDate: minDate ? startOfMonth(minDate) : undefined,\n maxDate: maxDate ? endOfMonth(maxDate) : undefined,\n }) ||\n excludeDates?.some((excludeDate) =>\n isSameMonth(\n month,\n excludeDate instanceof Date ? excludeDate : excludeDate.date,\n ),\n ) ||\n (includeDates &&\n !includeDates.some((includeDate) => isSameMonth(month, includeDate))) ||\n (filterDate && !filterDate(newDate(month))) ||\n false\n );\n}\n\nexport function isMonthInRange(\n startDate: Date,\n endDate: Date,\n m: number,\n day: Date,\n): boolean {\n const startDateYear = getYear(startDate);\n const startDateMonth = getMonth(startDate);\n const endDateYear = getYear(endDate);\n const endDateMonth = getMonth(endDate);\n const dayYear = getYear(day);\n if (startDateYear === endDateYear && startDateYear === dayYear) {\n return startDateMonth <= m && m <= endDateMonth;\n } else if (startDateYear < endDateYear) {\n return (\n (dayYear === startDateYear && startDateMonth <= m) ||\n (dayYear === endDateYear && endDateMonth >= m) ||\n (dayYear < endDateYear && dayYear > startDateYear)\n );\n }\n return false;\n}\n\n/**\n * To check if a date's month and year are disabled/excluded\n * @param date Date to check\n * @returns {boolean} true if month and year are disabled/excluded, false otherwise\n */\nexport function isMonthYearDisabled(\n date: Date,\n {\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n }: Pick<\n DateFilterOptions,\n \"minDate\" | \"maxDate\" | \"excludeDates\" | \"includeDates\"\n > = {},\n): boolean {\n return (\n isOutOfBounds(date, { minDate, maxDate }) ||\n (excludeDates &&\n excludeDates.some((excludedDate) =>\n isSameMonth(\n excludedDate instanceof Date ? excludedDate : excludedDate.date,\n date,\n ),\n )) ||\n (includeDates &&\n !includeDates.some((includedDate) => isSameMonth(includedDate, date))) ||\n false\n );\n}\n\nexport function isQuarterDisabled(\n quarter: Date,\n {\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n disabled,\n }: Pick<\n DateFilterOptionsWithDisabled,\n | \"minDate\"\n | \"maxDate\"\n | \"excludeDates\"\n | \"includeDates\"\n | \"filterDate\"\n | \"disabled\"\n > = {},\n): boolean {\n if (disabled) {\n return true;\n }\n\n return (\n isOutOfBounds(quarter, { minDate, maxDate }) ||\n excludeDates?.some((excludeDate) =>\n isSameQuarter(\n quarter,\n excludeDate instanceof Date ? excludeDate : excludeDate.date,\n ),\n ) ||\n (includeDates &&\n !includeDates.some((includeDate) =>\n isSameQuarter(quarter, includeDate),\n )) ||\n (filterDate && !filterDate(newDate(quarter))) ||\n false\n );\n}\n\nexport function isYearInRange(\n year: number,\n start?: Date | null,\n end?: Date | null,\n): boolean {\n if (!start || !end) return false;\n if (!isValidDate(start) || !isValidDate(end)) return false;\n const startYear = getYear(start);\n const endYear = getYear(end);\n\n return startYear <= year && endYear >= year;\n}\n\nexport function isYearDisabled(\n year: number,\n {\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n disabled,\n }: Pick<\n DateFilterOptionsWithDisabled,\n | \"minDate\"\n | \"maxDate\"\n | \"excludeDates\"\n | \"includeDates\"\n | \"filterDate\"\n | \"disabled\"\n > = {},\n): boolean {\n if (disabled) {\n return true;\n }\n\n const date = new Date(year, 0, 1);\n return (\n isOutOfBounds(date, {\n minDate: minDate ? startOfYear(minDate) : undefined,\n maxDate: maxDate ? endOfYear(maxDate) : undefined,\n }) ||\n excludeDates?.some((excludeDate) =>\n isSameYear(\n date,\n excludeDate instanceof Date ? excludeDate : excludeDate.date,\n ),\n ) ||\n (includeDates &&\n !includeDates.some((includeDate) => isSameYear(date, includeDate))) ||\n (filterDate && !filterDate(newDate(date))) ||\n false\n );\n}\n\nexport function isQuarterInRange(\n startDate: Date,\n endDate: Date,\n q: number,\n day: Date,\n): boolean {\n const startDateYear = getYear(startDate);\n const startDateQuarter = getQuarter(startDate);\n const endDateYear = getYear(endDate);\n const endDateQuarter = getQuarter(endDate);\n const dayYear = getYear(day);\n if (startDateYear === endDateYear && startDateYear === dayYear) {\n return startDateQuarter <= q && q <= endDateQuarter;\n } else if (startDateYear < endDateYear) {\n return (\n (dayYear === startDateYear && startDateQuarter <= q) ||\n (dayYear === endDateYear && endDateQuarter >= q) ||\n (dayYear < endDateYear && dayYear > startDateYear)\n );\n }\n return false;\n}\n\nexport function isOutOfBounds(\n day: Date,\n { minDate, maxDate }: Pick<DateFilterOptions, \"minDate\" | \"maxDate\"> = {},\n): boolean {\n return (\n ((minDate && differenceInCalendarDays(day, minDate) < 0) ||\n (maxDate && differenceInCalendarDays(day, maxDate) > 0)) ??\n false\n );\n}\n\nexport function isTimeInList(time: Date, times: Date[]): boolean {\n return times.some(\n (listTime) =>\n getHours(listTime) === getHours(time) &&\n getMinutes(listTime) === getMinutes(time) &&\n getSeconds(listTime) === getSeconds(time),\n );\n}\n\nexport interface TimeFilterOptions {\n minTime?: Date;\n maxTime?: Date;\n excludeTimes?: Date[];\n includeTimes?: Date[];\n filterTime?: (time: Date) => boolean;\n}\n\nexport function isTimeDisabled(\n time: Date,\n {\n excludeTimes,\n includeTimes,\n filterTime,\n }: Pick<\n TimeFilterOptions,\n \"excludeTimes\" | \"includeTimes\" | \"filterTime\"\n > = {},\n): boolean {\n return (\n (excludeTimes && isTimeInList(time, excludeTimes)) ||\n (includeTimes && !isTimeInList(time, includeTimes)) ||\n (filterTime && !filterTime(time)) ||\n false\n );\n}\n\nexport function isTimeInDisabledRange(\n time: Date,\n { minTime, maxTime }: Pick<TimeFilterOptions, \"minTime\" | \"maxTime\">,\n): boolean {\n if (!minTime || !maxTime) {\n throw new Error(\"Both minTime and maxTime props required\");\n }\n let baseTime = newDate();\n baseTime = setHours(baseTime, getHours(time));\n baseTime = setMinutes(baseTime, getMinutes(time));\n baseTime = setSeconds(baseTime, getSeconds(time));\n\n let min = newDate();\n min = setHours(min, getHours(minTime));\n min = setMinutes(min, getMinutes(minTime));\n min = setSeconds(min, getSeconds(minTime));\n\n let max = newDate();\n max = setHours(max, getHours(maxTime));\n max = setMinutes(max, getMinutes(maxTime));\n max = setSeconds(max, getSeconds(maxTime));\n\n let valid;\n try {\n valid = !isWithinInterval(baseTime, { start: min, end: max });\n } catch (err) {\n /* istanbul ignore next - date-fns historically threw on invalid intervals */\n valid = false;\n }\n return valid;\n}\n\nexport function monthDisabledBefore(\n day: Date,\n {\n minDate,\n includeDates,\n }: Pick<DateFilterOptions, \"minDate\" | \"includeDates\"> = {},\n): boolean {\n const previousMonth = subMonths(day, 1);\n return (\n (minDate && differenceInCalendarMonths(minDate, previousMonth) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) =>\n differenceInCalendarMonths(includeDate, previousMonth) > 0,\n )) ||\n false\n );\n}\n\nexport function monthDisabledAfter(\n day: Date,\n {\n maxDate,\n includeDates,\n }: Pick<DateFilterOptions, \"maxDate\" | \"includeDates\"> = {},\n): boolean {\n const nextMonth = addMonths(day, 1);\n return (\n (maxDate && differenceInCalendarMonths(nextMonth, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) => differenceInCalendarMonths(nextMonth, includeDate) > 0,\n )) ||\n false\n );\n}\n\nexport function quarterDisabledBefore(\n date: Date,\n {\n minDate,\n includeDates,\n }: Pick<DateFilterOptions, \"minDate\" | \"includeDates\"> = {},\n): boolean {\n const firstDateOfYear = startOfYear(date);\n const previousQuarter = subQuarters(firstDateOfYear, 1);\n\n return (\n (minDate && differenceInCalendarQuarters(minDate, previousQuarter) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) =>\n differenceInCalendarQuarters(includeDate, previousQuarter) > 0,\n )) ||\n false\n );\n}\n\nexport function quarterDisabledAfter(\n date: Date,\n {\n maxDate,\n includeDates,\n }: Pick<DateFilterOptions, \"maxDate\" | \"includeDates\"> = {},\n): boolean {\n const lastDateOfYear = endOfYear(date);\n const nextQuarter = addQuarters(lastDateOfYear, 1);\n\n return (\n (maxDate && differenceInCalendarQuarters(nextQuarter, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) =>\n differenceInCalendarQuarters(nextQuarter, includeDate) > 0,\n )) ||\n false\n );\n}\n\nexport function yearDisabledBefore(\n day: Date,\n {\n minDate,\n includeDates,\n }: Pick<DateFilterOptions, \"minDate\" | \"includeDates\"> = {},\n): boolean {\n const previousYear = subYears(day, 1);\n return (\n (minDate && differenceInCalendarYears(minDate, previousYear) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) =>\n differenceInCalendarYears(includeDate, previousYear) > 0,\n )) ||\n false\n );\n}\n\nexport function yearsDisabledBefore(\n day: Date,\n {\n minDate,\n yearItemNumber = DEFAULT_YEAR_ITEM_NUMBER,\n }: Pick<DateFilterOptions, \"minDate\" | \"yearItemNumber\"> = {},\n): boolean {\n const previousYear = getStartOfYear(subYears(day, yearItemNumber));\n const { endPeriod } = getYearsPeriod(previousYear, yearItemNumber);\n const minDateYear = minDate && getYear(minDate);\n return (minDateYear && minDateYear > endPeriod) || false;\n}\n\nexport function yearDisabledAfter(\n day: Date,\n {\n maxDate,\n includeDates,\n }: Pick<DateFilterOptions, \"maxDate\" | \"includeDates\"> = {},\n): boolean {\n const nextYear = addYears(day, 1);\n return (\n (maxDate && differenceInCalendarYears(nextYear, maxDate) > 0) ||\n (includeDates &&\n includeDates.every(\n (includeDate) => differenceInCalendarYears(nextYear, includeDate) > 0,\n )) ||\n false\n );\n}\n\nexport function yearsDisabledAfter(\n day: Date,\n {\n maxDate,\n yearItemNumber = DEFAULT_YEAR_ITEM_NUMBER,\n }: Pick<DateFilterOptions, \"maxDate\" | \"yearItemNumber\"> = {},\n): boolean {\n const nextYear = addYears(day, yearItemNumber);\n const { startPeriod } = getYearsPeriod(nextYear, yearItemNumber);\n const maxDateYear = maxDate && getYear(maxDate);\n return (maxDateYear && maxDateYear < startPeriod) || false;\n}\n\nexport function getEffectiveMinDate({\n minDate,\n includeDates,\n}: Pick<DateFilterOptions, \"minDate\" | \"includeDates\">): Date | undefined {\n if (includeDates && minDate) {\n const minDates = includeDates.filter(\n (includeDate) => differenceInCalendarDays(includeDate, minDate) >= 0,\n );\n return min(minDates);\n } else if (includeDates) {\n return min(includeDates);\n } else {\n return minDate;\n }\n}\n\nexport function getEffectiveMaxDate({\n maxDate,\n includeDates,\n}: Pick<DateFilterOptions, \"maxDate\" | \"includeDates\">): Date | undefined {\n if (includeDates && maxDate) {\n const maxDates = includeDates.filter(\n (includeDate) => differenceInCalendarDays(includeDate, maxDate) <= 0,\n );\n return max(maxDates);\n } else if (includeDates) {\n return max(includeDates);\n } else {\n return maxDate;\n }\n}\n\nexport interface HighlightDate {\n [className: string]: Date[];\n}\n\n/**\n * Get a map of highlighted dates with their corresponding classes.\n * @param highlightDates The dates to highlight.\n * @param defaultClassName The default class to use for highlighting.\n * @returns A map with dates as keys and arrays of class names as values.\n */\nexport function getHighLightDaysMap(\n highlightDates: (Date | HighlightDate)[] = [],\n defaultClassName: string = \"react-datepicker__day--highlighted\",\n): Map<string, string[]> {\n const dateClasses = new Map<string, string[]>();\n for (let i = 0, len = highlightDates.length; i < len; i++) {\n const obj = highlightDates[i];\n if (isDate(obj)) {\n const key = formatDate(obj, \"MM.dd.yyyy\");\n const classNamesArr = dateClasses.get(key) || [];\n if (!classNamesArr.includes(defaultClassName)) {\n classNamesArr.push(defaultClassName);\n dateClasses.set(key, classNamesArr);\n }\n } else if (typeof obj === \"object\") {\n const keys = Object.keys(obj);\n const className = keys[0] ?? \"\";\n const arrOfDates = obj[className];\n if (typeof className === \"string\" && Array.isArray(arrOfDates)) {\n for (let k = 0, len = arrOfDates.length; k < len; k++) {\n const dateK = arrOfDates[k];\n if (dateK) {\n const key = formatDate(dateK, \"MM.dd.yyyy\");\n const classNamesArr = dateClasses.get(key) || [];\n if (!classNamesArr.includes(className)) {\n classNamesArr.push(className);\n dateClasses.set(key, classNamesArr);\n }\n }\n }\n }\n }\n }\n return dateClasses;\n}\n\n/**\n * Compare the two arrays\n * @param array1 The first array to compare.\n * @param array2 The second array to compare.\n * @returns true, if the passed arrays are equal, false otherwise.\n */\nexport function arraysAreEqual<T>(array1: T[], array2: T[]): boolean {\n if (array1.length !== array2.length) {\n return false;\n }\n\n return array1.every((value, index) => value === array2[index]);\n}\n\nexport interface HolidayItem {\n date: Date;\n holidayName: string;\n}\n\ninterface ClassNamesObj {\n className: string;\n holidayNames: string[];\n}\n\nexport type HolidaysMap = Map<string, ClassNamesObj>;\n\n/**\n * Assign the custom class to each date\n * @param holidayDates array of object containing date and name of the holiday\n * @param defaultClassName className to be added.\n * @returns Map containing date as key and array of className and holiday name as value\n */\nexport function getHolidaysMap(\n holidayDates: HolidayItem[] = [],\n defaultClassName: string = \"react-datepicker__day--holidays\",\n): HolidaysMap {\n const dateClasses = new Map<string, ClassNamesObj>();\n holidayDates.forEach((holiday) => {\n const { date: dateObj, holidayName } = holiday;\n if (!isDate(dateObj)) {\n return;\n }\n\n const key = formatDate(dateObj, \"MM.dd.yyyy\");\n const classNamesObj = dateClasses.get(key) || {\n className: \"\",\n holidayNames: [],\n };\n if (\n \"className\" in classNamesObj &&\n classNamesObj[\"className\"] === defaultClassName &&\n arraysAreEqual(classNamesObj[\"holidayNames\"], [holidayName])\n ) {\n return;\n }\n\n classNamesObj[\"className\"] = defaultClassName;\n const holidayNameArr = classNamesObj[\"holidayNames\"];\n classNamesObj[\"holidayNames\"] = holidayNameArr\n ? [...holidayNameArr, holidayName]\n : [holidayName];\n dateClasses.set(key, classNamesObj);\n });\n return dateClasses;\n}\n\n/**\n * Determines the times to inject after a given start of day, current time, and multiplier.\n * @param startOfDay The start of the day.\n * @param currentTime The current time.\n * @param currentMultiplier The current multiplier.\n * @param intervals The intervals.\n * @param injectedTimes The times to potentially inject.\n * @returns An array of times to inject.\n */\nexport function timesToInjectAfter(\n startOfDay: Date,\n currentTime: Date,\n currentMultiplier: number,\n intervals: number,\n injectedTimes: Date[],\n): Date[] {\n const l = injectedTimes.length;\n const times: Date[] = [];\n for (let i = 0; i < l; i++) {\n let injectedTime = startOfDay;\n const injectedTimeValue = injectedTimes[i];\n if (injectedTimeValue) {\n injectedTime = addHours(injectedTime, getHours(injectedTimeValue));\n injectedTime = addMinutes(injectedTime, getMinutes(injectedTimeValue));\n injectedTime = addSeconds(injectedTime, getSeconds(injectedTimeValue));\n }\n\n const nextTime = addMinutes(\n startOfDay,\n (currentMultiplier + 1) * intervals,\n );\n\n if (\n isAfter(injectedTime, currentTime) &&\n isBefore(injectedTime, nextTime) &&\n injectedTimeValue != undefined\n ) {\n times.push(injectedTimeValue);\n }\n }\n\n return times;\n}\n\n/**\n * Adds a leading zero to a number if it's less than 10.\n * @param i The number to add a leading zero to.\n * @returns The number as a string, with a leading zero if it was less than 10.\n */\nexport function addZero(i: number): string {\n return i < 10 ? `0${i}` : `${i}`;\n}\n\n/**\n * Gets the start and end years for a period.\n * @param date The date to get the period for.\n * @param yearItemNumber The number of years in the period. Defaults to DEFAULT_YEAR_ITEM_NUMBER.\n * @returns An object with the start and end years for the period.\n */\nexport function getYearsPeriod(\n date: Date,\n yearItemNumber: number = DEFAULT_YEAR_ITEM_NUMBER,\n): { startPeriod: number; endPeriod: number } {\n const endPeriod = Math.ceil(getYear(date) / yearItemNumber) * yearItemNumber;\n const startPeriod = endPeriod - (yearItemNumber - 1);\n return { startPeriod, endPeriod };\n}\n\n/**\n * Gets the number of hours in a day.\n * @param d The date to get the number of hours for.\n * @returns The number of hours in the day.\n */\nexport function getHoursInDay(d: Date): number {\n const startOfDay = new Date(d.getFullYear(), d.getMonth(), d.getDate());\n const startOfTheNextDay = new Date(\n d.getFullYear(),\n d.getMonth(),\n d.getDate(),\n 24,\n );\n\n return Math.round((+startOfTheNextDay - +startOfDay) / 3_600_000);\n}\n\n/**\n * Returns the start of the minute for the given date\n *\n * NOTE: this function is a DST and timezone-safe analog of `date-fns/startOfMinute`\n * do not make changes unless you know what you're doing\n *\n * See comments on https://github.com/Hacker0x01/react-datepicker/pull/4244\n * for more details\n *\n * @param d date\n * @returns start of the minute\n */\nexport function startOfMinute(d: Date): Date {\n const seconds = d.getSeconds();\n const milliseconds = d.getMilliseconds();\n\n return toDate(d.getTime() - seconds * 1000 - milliseconds);\n}\n\n/**\n * Returns whether the given dates are in the same minute\n *\n * This function is a DST and timezone-safe analog of `date-fns/isSameMinute`\n *\n * @param d1\n * @param d2\n * @returns\n */\nexport function isSameMinute(d1: Date, d2: Date): boolean {\n return startOfMinute(d1).getTime() === startOfMinute(d2).getTime();\n}\n\n/**\n * Returns a new datetime object representing the input date with midnight time\n * @param date The date to get the midnight time for\n * @returns A new datetime object representing the input date with midnight time\n */\nexport function getMidnightDate(date: Date): Date {\n if (!isDate(date)) {\n throw new Error(\"Invalid date\");\n }\n\n const dateWithoutTime = new Date(date);\n dateWithoutTime.setHours(0, 0, 0, 0);\n return dateWithoutTime;\n}\n\n/**\n * Is the first date before the second one?\n * @param date The date that should be before the other one to return true\n * @param dateToCompare The date to compare with\n * @returns The first date is before the second date\n *\n * Note:\n * This function considers the mid-night of the given dates for comparison.\n * It evaluates whether date is before dateToCompare based on their mid-night timestamps.\n */\nexport function isDateBefore(date: Date, dateToCompare: Date): boolean {\n if (!isDate(date) || !isDate(dateToCompare)) {\n throw new Error(\"Invalid date received\");\n }\n\n const midnightDate = getMidnightDate(date);\n const midnightDateToCompare = getMidnightDate(dateToCompare);\n\n return isBefore(midnightDate, midnightDateToCompare);\n}\n\n/**\n * Checks if the space key was pressed down.\n *\n * @param event - The keyboard event.\n * @returns - Returns true if the space key was pressed down, false otherwise.\n */\nexport function isSpaceKeyDown(\n event: React.KeyboardEvent<HTMLDivElement>,\n): boolean {\n return event.key === KeyType.Space;\n}\n", "import React, { Component, cloneElement } from \"react\";\n\ninterface InputTimeProps {\n onChange?: (date: Date) => void;\n date?: Date;\n timeString?: string;\n timeInputLabel?: string;\n customTimeInput?: React.ReactElement<{\n date?: Date;\n value: string;\n onChange: (time: string) => void;\n }>;\n}\n\ninterface InputTimeState {\n time?: string;\n}\n\n/**\n * `InputTime` is a React component that manages time input.\n *\n * @component\n * @example\n * <InputTime timeString=\"12:00\" />\n *\n * @param props - The properties that define the `InputTime` component.\n * @param props.onChange - Function that is called when the date changes.\n * @param props.date - The initial date value.\n * @param props.timeString - The initial time string value.\n * @param props.timeInputLabel - The label for the time input.\n * @param props.customTimeInput - An optional custom time input element.\n *\n * @returns The `InputTime` component.\n */\nexport default class InputTime extends Component<\n InputTimeProps,\n InputTimeState\n> {\n inputRef: React.RefObject<HTMLInputElement | null> = React.createRef();\n\n constructor(props: InputTimeProps) {\n super(props);\n\n this.state = {\n time: this.props.timeString,\n };\n }\n\n static getDerivedStateFromProps(\n props: InputTimeProps,\n state: InputTimeState,\n ) {\n if (props.timeString !== state.time) {\n return {\n time: props.timeString,\n };\n }\n\n // Return null to indicate no change to state.\n return null;\n }\n\n onTimeChange = (time: InputTimeState[\"time\"]) => {\n this.setState({ time });\n\n const { date: propDate } = this.props;\n const isPropDateValid = propDate instanceof Date && !isNaN(+propDate);\n const date = isPropDateValid ? propDate : new Date();\n\n if (time?.includes(\":\")) {\n const [hours, minutes] = time.split(\":\") as [string, string];\n date.setHours(Number(hours));\n date.setMinutes(Number(minutes));\n }\n\n this.props.onChange?.(date);\n };\n\n renderTimeInput = () => {\n const { time } = this.state;\n const { date, timeString, customTimeInput } = this.props;\n\n if (customTimeInput) {\n return cloneElement(customTimeInput, {\n date,\n value: time,\n onChange: this.onTimeChange,\n });\n }\n\n return (\n <input\n type=\"time\"\n className=\"react-datepicker-time__input\"\n placeholder=\"Time\"\n name=\"time-input\"\n ref={this.inputRef}\n onClick={() => {\n this.inputRef.current?.focus();\n }}\n required\n value={time}\n onChange={(event) => {\n this.onTimeChange(event.target.value || timeString);\n }}\n />\n );\n };\n\n render() {\n return (\n <div className=\"react-datepicker__input-time-container\">\n <div className=\"react-datepicker-time__caption\">\n {this.props.timeInputLabel}\n </div>\n <div className=\"react-datepicker-time__input-container\">\n <div className=\"react-datepicker-time__input\">\n {this.renderTimeInput()}\n </div>\n </div>\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component, createRef } from \"react\";\n\nimport {\n getDay,\n getMonth,\n getDate,\n newDate,\n isSameDay,\n isDayDisabled,\n isDayExcluded,\n isDayInRange,\n isEqual,\n isBefore,\n isAfter,\n getDayOfWeekCode,\n getStartOfWeek,\n formatDate,\n type DateFilterOptionsWithDisabled,\n type DateNumberType,\n type Locale,\n type HolidaysMap,\n KeyType,\n} from \"./date_utils\";\n\ninterface DayProps extends Pick<\n DateFilterOptionsWithDisabled,\n | \"minDate\"\n | \"maxDate\"\n | \"excludeDates\"\n | \"excludeDateIntervals\"\n | \"includeDateIntervals\"\n | \"includeDates\"\n | \"filterDate\"\n | \"disabled\"\n> {\n ariaLabelPrefixWhenEnabled?: string;\n ariaLabelPrefixWhenDisabled?: string;\n disabledKeyboardNavigation?: boolean;\n day: Date;\n dayClassName?: (date: Date) => string;\n highlightDates?: Map<string, string[]>;\n holidays?: HolidaysMap;\n inline?: boolean;\n shouldFocusDayInline?: boolean;\n month: number;\n onClick?: React.MouseEventHandler<HTMLDivElement>;\n onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;\n handleOnKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n usePointerEvent?: boolean;\n preSelection?: Date | null;\n selected?: Date | null;\n selectingDate?: Date;\n selectsEnd?: boolean;\n selectsStart?: boolean;\n selectsRange?: boolean;\n showWeekPicker?: boolean;\n showWeekNumber?: boolean;\n selectsDisabledDaysInRange?: boolean;\n selectsMultiple?: boolean;\n selectedDates?: Date[];\n startDate?: Date | null;\n endDate?: Date | null;\n renderDayContents?: (day: number, date: Date) => React.ReactNode;\n containerRef?: React.RefObject<HTMLDivElement | null>;\n calendarStartDay?: DateNumberType;\n locale?: Locale;\n monthShowsDuplicateDaysEnd?: boolean;\n monthShowsDuplicateDaysStart?: boolean;\n swapRange?: boolean;\n}\n\n/**\n * `Day` is a React component that represents a single day in a date picker.\n * It handles the rendering and interaction of a day.\n *\n * @prop ariaLabelPrefixWhenEnabled - Aria label prefix when the day is enabled.\n * @prop ariaLabelPrefixWhenDisabled - Aria label prefix when the day is disabled.\n * @prop disabledKeyboardNavigation - Whether keyboard navigation is disabled.\n * @prop day - The day to be displayed.\n * @prop dayClassName - Function to customize the CSS class of the day.\n * @prop endDate - The end date in a range.\n * @prop highlightDates - Map of dates to be highlighted.\n * @prop holidays - Map of holiday dates.\n * @prop inline - Whether the date picker is inline.\n * @prop shouldFocusDayInline - Whether the day should be focused when date picker is inline.\n * @prop month - The month the day belongs to.\n * @prop onClick - Click event handler.\n * @prop onMouseEnter - Mouse enter event handler.\n * @prop handleOnKeyDown - Key down event handler.\n * @prop usePointerEvent - Whether to use pointer events.\n * @prop preSelection - The date that is currently selected.\n * @prop selected - The selected date.\n * @prop selectingDate - The date currently being selected.\n * @prop selectsEnd - Whether the day can be the end date in a range.\n * @prop selectsStart - Whether the day can be the start date in a range.\n * @prop selectsRange - Whether the day can be in a range.\n * @prop showWeekPicker - Whether to show week picker.\n * @prop showWeekNumber - Whether to show week numbers.\n * @prop selectsDisabledDaysInRange - Whether to select disabled days in a range.\n * @prop selectsMultiple - Whether to allow multiple date selection.\n * @prop selectedDates - Array of selected dates.\n * @prop startDate - The start date in a range.\n * @prop renderDayContents - Function to customize the rendering of the day's contents.\n * @prop containerRef - Ref for the container.\n * @prop excludeDates - Array of dates to be excluded.\n * @prop calendarStartDay - The start day of the week.\n * @prop locale - The locale object.\n * @prop monthShowsDuplicateDaysEnd - Whether to show duplicate days at the end of the month.\n * @prop monthShowsDuplicateDaysStart - Whether to show duplicate days at the start of the month.\n * @prop includeDates - Array of dates to be included.\n * @prop includeDateIntervals - Array of date intervals to be included.\n * @prop minDate - The minimum date that can be selected.\n * @prop maxDate - The maximum date that can be selected.\n *\n * @example\n * ```tsx\n * import React from 'react';\n * import Day from './day';\n *\n * function MyComponent() {\n * const handleDayClick = (event) => {\n * console.log('Day clicked', event);\n * };\n *\n * const handleDayMouseEnter = (event) => {\n * console.log('Mouse entered day', event);\n * };\n *\n * const renderDayContents = (date) => {\n * return <div>{date.getDate()}</div>;\n * };\n *\n * return (\n * <Day\n * day={new Date()}\n * onClick={handleDayClick}\n * onMouseEnter={handleDayMouseEnter}\n * renderDayContents={renderDayContents}\n * />\n * );\n * }\n *\n * export default MyComponent;\n * ```\n */\nexport default class Day extends Component<DayProps> {\n componentDidMount() {\n this.handleFocusDay();\n }\n\n componentDidUpdate() {\n this.handleFocusDay();\n }\n\n dayEl = createRef<HTMLDivElement>();\n\n handleClick: DayProps[\"onClick\"] = (event) => {\n if (!this.isDisabled() && this.props.onClick) {\n this.props.onClick(event);\n }\n };\n\n handleMouseEnter: DayProps[\"onMouseEnter\"] = (event) => {\n if (!this.isDisabled() && this.props.onMouseEnter) {\n this.props.onMouseEnter(event);\n }\n };\n\n handleOnKeyDown: React.KeyboardEventHandler<HTMLDivElement> = (event) => {\n const eventKey = event.key;\n if (eventKey === KeyType.Space) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n\n this.props.handleOnKeyDown?.(event);\n };\n\n isSameDay = (other: Date | null | undefined) =>\n isSameDay(this.props.day, other);\n\n isKeyboardSelected = () => {\n if (this.props.disabledKeyboardNavigation) {\n return false;\n }\n\n const isSelectedDate = this.props.selectsMultiple\n ? this.props.selectedDates?.some((date) => this.isSameDayOrWeek(date))\n : this.isSameDayOrWeek(this.props.selected);\n\n const isDisabled =\n this.props.preSelection && this.isDisabled(this.props.preSelection);\n\n return (\n !isSelectedDate &&\n this.isSameDayOrWeek(this.props.preSelection) &&\n !isDisabled\n );\n };\n\n isDisabled = (day = this.props.day) =>\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n isDayDisabled(day, {\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n excludeDates: this.props.excludeDates,\n excludeDateIntervals: this.props.excludeDateIntervals,\n includeDateIntervals: this.props.includeDateIntervals,\n includeDates: this.props.includeDates,\n filterDate: this.props.filterDate,\n disabled: this.props.disabled,\n });\n\n isExcluded = () =>\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n isDayExcluded(this.props.day, {\n excludeDates: this.props.excludeDates,\n excludeDateIntervals: this.props.excludeDateIntervals,\n });\n\n isStartOfWeek = () =>\n isSameDay(\n this.props.day,\n getStartOfWeek(\n this.props.day,\n this.props.locale,\n this.props.calendarStartDay,\n ),\n );\n\n isSameWeek = (other?: Date | null) =>\n this.props.showWeekPicker &&\n isSameDay(\n other,\n getStartOfWeek(\n this.props.day,\n this.props.locale,\n this.props.calendarStartDay,\n ),\n );\n\n isSameDayOrWeek = (other?: Date | null) =>\n this.isSameDay(other) || this.isSameWeek(other);\n\n getHighLightedClass = () => {\n const { day, highlightDates } = this.props;\n\n if (!highlightDates) {\n return false;\n }\n\n // Looking for className in the Map of {'day string, 'className'}\n const dayStr = formatDate(day, \"MM.dd.yyyy\");\n return highlightDates.get(dayStr);\n };\n\n // Function to return the array containing className associated to the date\n getHolidaysClass = () => {\n const { day, holidays } = this.props;\n if (!holidays) {\n // For type consistency no other reasons\n return [undefined];\n }\n const dayStr = formatDate(day, \"MM.dd.yyyy\");\n // Looking for className in the Map of {day string: {className, holidayName}}\n if (holidays.has(dayStr)) {\n return [holidays.get(dayStr)?.className];\n }\n\n // For type consistency no other reasons\n return [undefined];\n };\n\n isInRange = () => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isDayInRange(day, startDate, endDate);\n };\n\n isInSelectingRange = () => {\n const {\n day,\n selectsStart,\n selectsEnd,\n selectsRange,\n selectsDisabledDaysInRange,\n startDate,\n swapRange,\n endDate,\n } = this.props;\n\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n // Don't highlight days outside the current month\n if (this.isAfterMonth() || this.isBeforeMonth()) {\n return false;\n }\n\n if (\n !(selectsStart || selectsEnd || selectsRange) ||\n !selectingDate ||\n (!selectsDisabledDaysInRange && this.isDisabled())\n ) {\n return false;\n }\n\n if (\n selectsStart &&\n endDate &&\n (isBefore(selectingDate, endDate) || isEqual(selectingDate, endDate))\n ) {\n return isDayInRange(day, selectingDate, endDate);\n }\n\n if (\n selectsEnd &&\n startDate &&\n (isAfter(selectingDate, startDate) || isEqual(selectingDate, startDate))\n ) {\n return isDayInRange(day, startDate, selectingDate);\n }\n\n if (selectsRange && startDate && !endDate) {\n if (isEqual(selectingDate, startDate)) {\n return isDayInRange(day, startDate, selectingDate);\n }\n\n if (isAfter(selectingDate, startDate)) {\n return isDayInRange(day, startDate, selectingDate);\n }\n\n if (swapRange && isBefore(selectingDate, startDate)) {\n return isDayInRange(day, selectingDate, startDate);\n }\n }\n\n return false;\n };\n\n isSelectingRangeStart = () => {\n if (!this.isInSelectingRange()) {\n return false;\n }\n\n const { day, startDate, selectsStart, swapRange, selectsRange } =\n this.props;\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (selectsStart) {\n return isSameDay(day, selectingDate);\n }\n\n if (selectsRange && swapRange && startDate && selectingDate) {\n return isSameDay(\n day,\n isBefore(selectingDate, startDate) ? selectingDate : startDate,\n );\n }\n\n return isSameDay(day, startDate);\n };\n\n isSelectingRangeEnd = () => {\n if (!this.isInSelectingRange()) {\n return false;\n }\n\n const { day, endDate, selectsEnd, selectsRange, swapRange, startDate } =\n this.props;\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (selectsEnd) {\n return isSameDay(day, selectingDate);\n }\n\n if (selectsRange && swapRange && startDate && selectingDate) {\n return isSameDay(\n day,\n isBefore(selectingDate, startDate) ? startDate : selectingDate,\n );\n }\n\n if (selectsRange) {\n return isSameDay(day, selectingDate);\n }\n\n return isSameDay(day, endDate);\n };\n\n isRangeStart = () => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameDay(startDate, day);\n };\n\n isRangeEnd = () => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameDay(endDate, day);\n };\n\n isWeekend = () => {\n const weekday = getDay(this.props.day);\n return weekday === 0 || weekday === 6;\n };\n\n isAfterMonth = () => {\n return (\n this.props.month !== undefined &&\n (this.props.month + 1) % 12 === getMonth(this.props.day)\n );\n };\n\n isBeforeMonth = () => {\n return (\n this.props.month !== undefined &&\n (getMonth(this.props.day) + 1) % 12 === this.props.month\n );\n };\n\n isCurrentDay = () => this.isSameDay(newDate());\n\n isSelected = () => {\n if (this.props.selectsMultiple) {\n return this.props.selectedDates?.some((date) =>\n this.isSameDayOrWeek(date),\n );\n }\n return this.isSameDayOrWeek(this.props.selected);\n };\n\n getClassNames = (date: Date) => {\n const dayClassName = this.props.dayClassName\n ? this.props.dayClassName(date)\n : undefined;\n return clsx(\n \"react-datepicker__day\",\n dayClassName,\n \"react-datepicker__day--\" + getDayOfWeekCode(this.props.day),\n {\n \"react-datepicker__day--disabled\": this.isDisabled(),\n \"react-datepicker__day--excluded\": this.isExcluded(),\n \"react-datepicker__day--selected\": this.isSelected(),\n \"react-datepicker__day--keyboard-selected\": this.isKeyboardSelected(),\n \"react-datepicker__day--range-start\": this.isRangeStart(),\n \"react-datepicker__day--range-end\": this.isRangeEnd(),\n \"react-datepicker__day--in-range\": this.isInRange(),\n \"react-datepicker__day--in-selecting-range\": this.isInSelectingRange(),\n \"react-datepicker__day--selecting-range-start\":\n this.isSelectingRangeStart(),\n \"react-datepicker__day--selecting-range-end\":\n this.isSelectingRangeEnd(),\n \"react-datepicker__day--today\": this.isCurrentDay(),\n \"react-datepicker__day--weekend\": this.isWeekend(),\n \"react-datepicker__day--outside-month\":\n this.isAfterMonth() || this.isBeforeMonth(),\n },\n this.getHighLightedClass(),\n this.getHolidaysClass(),\n );\n };\n\n getAriaLabel = () => {\n const {\n day,\n ariaLabelPrefixWhenEnabled = \"Choose\",\n ariaLabelPrefixWhenDisabled = \"Not available\",\n } = this.props;\n\n const prefix =\n this.isDisabled() || this.isExcluded()\n ? ariaLabelPrefixWhenDisabled\n : ariaLabelPrefixWhenEnabled;\n\n return `${prefix} ${formatDate(day, \"PPPP\", this.props.locale)}`;\n };\n\n // A function to return the holiday's name as title's content\n getTitle = () => {\n const { day, holidays = new Map(), excludeDates } = this.props;\n const compareDt = formatDate(day, \"MM.dd.yyyy\");\n const titles = [];\n if (holidays.has(compareDt)) {\n titles.push(...holidays.get(compareDt).holidayNames);\n }\n if (this.isExcluded()) {\n titles.push(\n excludeDates\n ?.filter((excludeDate) => {\n if (excludeDate instanceof Date) {\n return isSameDay(excludeDate, day);\n }\n return isSameDay(excludeDate?.date, day);\n })\n .map((excludeDate) => {\n if (excludeDate instanceof Date) {\n return undefined;\n }\n return excludeDate?.message;\n }),\n );\n }\n // I'm not sure that this is a right output, but all tests are green\n return titles.join(\", \");\n };\n\n getTabIndex = () => {\n const selectedDay = this.props.selected;\n const preSelectionDay = this.props.preSelection;\n const tabIndex =\n !(\n this.props.showWeekPicker &&\n (this.props.showWeekNumber || !this.isStartOfWeek())\n ) &&\n (this.isKeyboardSelected() ||\n (this.isSameDay(selectedDay) &&\n isSameDay(preSelectionDay, selectedDay)))\n ? 0\n : -1;\n\n return tabIndex;\n };\n\n // various cases when we need to apply focus to the preselected day\n // focus the day on mount/update so that keyboard navigation works while cycling through months with up or down keys (not for prev and next month buttons)\n // prevent focus for these activeElement cases so we don't pull focus from the input as the calendar opens\n handleFocusDay = () => {\n // only do this while the input isn't focused\n // otherwise, typing/backspacing the date manually may steal focus away from the input\n this.shouldFocusDay() && this.dayEl.current?.focus({ preventScroll: true });\n };\n\n private shouldFocusDay() {\n let shouldFocusDay = false;\n if (this.getTabIndex() === 0 && this.isSameDay(this.props.preSelection)) {\n // there is currently no activeElement and not inline\n if (!document.activeElement || document.activeElement === document.body) {\n shouldFocusDay = true;\n }\n // inline version:\n // do not focus on initial render to prevent autoFocus issue\n // focus after month has changed via keyboard\n if (this.props.inline && !this.props.shouldFocusDayInline) {\n shouldFocusDay = false;\n }\n if (this.isDayActiveElement()) {\n shouldFocusDay = true;\n }\n if (this.isDuplicateDay()) {\n shouldFocusDay = false;\n }\n }\n return shouldFocusDay;\n }\n\n // the activeElement is in the container, and it is another instance of Day\n private isDayActiveElement() {\n return (\n this.props.containerRef?.current?.contains(document.activeElement) &&\n document.activeElement?.classList.contains(\"react-datepicker__day\")\n );\n }\n\n private isDuplicateDay() {\n return (\n //day is one of the non rendered duplicate days\n (this.props.monthShowsDuplicateDaysEnd && this.isAfterMonth()) ||\n (this.props.monthShowsDuplicateDaysStart && this.isBeforeMonth())\n );\n }\n\n renderDayContents = () => {\n if (this.props.monthShowsDuplicateDaysEnd && this.isAfterMonth())\n return null;\n if (this.props.monthShowsDuplicateDaysStart && this.isBeforeMonth())\n return null;\n return this.props.renderDayContents\n ? this.props.renderDayContents(getDate(this.props.day), this.props.day)\n : getDate(this.props.day);\n };\n\n render = () => (\n // TODO: Use <option> instead of the \"option\" role to ensure accessibility across all devices.\n <div\n ref={this.dayEl}\n className={this.getClassNames(this.props.day)}\n onKeyDown={this.handleOnKeyDown}\n onClick={this.handleClick}\n onMouseEnter={\n !this.props.usePointerEvent ? this.handleMouseEnter : undefined\n }\n onPointerEnter={\n this.props.usePointerEvent ? this.handleMouseEnter : undefined\n }\n tabIndex={this.getTabIndex()}\n aria-label={this.getAriaLabel()}\n role=\"gridcell\"\n title={this.getTitle()}\n aria-disabled={this.isDisabled()}\n aria-current={this.isCurrentDay() ? \"date\" : undefined}\n aria-selected={this.isSelected() || this.isInRange()}\n >\n {this.renderDayContents()}\n {this.getTitle() !== \"\" && (\n <span className=\"overlay\">{this.getTitle()}</span>\n )}\n </div>\n );\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component, createRef } from \"react\";\n\nimport { KeyType, isSameDay } from \"./date_utils\";\n\ninterface WeekNumberProps {\n weekNumber: number;\n date: Date;\n onClick?: React.MouseEventHandler<HTMLDivElement>;\n ariaLabelPrefix?: string;\n selected?: Date | null;\n preSelection?: Date | null;\n showWeekPicker?: boolean;\n showWeekNumber?: boolean;\n disabledKeyboardNavigation?: boolean;\n inline?: boolean;\n shouldFocusDayInline?: boolean;\n handleOnKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n containerRef?: React.RefObject<HTMLDivElement | null>;\n isInputFocused?: boolean;\n isWeekDisabled?: boolean;\n}\n\nexport default class WeekNumber extends Component<WeekNumberProps> {\n static get defaultProps() {\n return {\n ariaLabelPrefix: \"week \",\n };\n }\n\n componentDidMount(): void {\n this.handleFocusWeekNumber();\n }\n\n componentDidUpdate(prevProps: WeekNumberProps): void {\n this.handleFocusWeekNumber(prevProps);\n }\n\n weekNumberEl = createRef<HTMLDivElement>();\n\n handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (this.props.onClick) {\n this.props.onClick(event);\n }\n };\n\n handleOnKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n const eventKey = event.key;\n if (eventKey === KeyType.Space) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n\n this.props.handleOnKeyDown?.(event);\n };\n\n isKeyboardSelected = (): boolean =>\n !this.props.disabledKeyboardNavigation &&\n !isSameDay(this.props.date, this.props.selected) &&\n isSameDay(this.props.date, this.props.preSelection);\n\n getTabIndex = (): number =>\n this.props.showWeekPicker &&\n this.props.showWeekNumber &&\n (this.isKeyboardSelected() ||\n (isSameDay(this.props.date, this.props.selected) &&\n isSameDay(this.props.preSelection, this.props.selected)))\n ? 0\n : -1;\n\n // various cases when we need to apply focus to the preselected week-number\n // focus the week-number on mount/update so that keyboard navigation works while cycling through months with up or down keys (not for prev and next month buttons)\n // prevent focus for these activeElement cases so we don't pull focus from the input as the calendar opens\n handleFocusWeekNumber = (prevProps?: Partial<WeekNumberProps>): void => {\n let shouldFocusWeekNumber = false;\n // only do this while the input isn't focused\n // otherwise, typing/backspacing the date manually may steal focus away from the input\n if (\n this.getTabIndex() === 0 &&\n !prevProps?.isInputFocused &&\n isSameDay(this.props.date, this.props.preSelection)\n ) {\n // there is currently no activeElement and not inline\n if (!document.activeElement || document.activeElement === document.body) {\n shouldFocusWeekNumber = true;\n }\n // inline version:\n // do not focus on initial render to prevent autoFocus issue\n // focus after month has changed via keyboard\n if (this.props.inline && !this.props.shouldFocusDayInline) {\n shouldFocusWeekNumber = false;\n }\n // the activeElement is in the container, and it is another instance of WeekNumber\n if (\n this.props.containerRef &&\n this.props.containerRef.current &&\n this.props.containerRef.current.contains(document.activeElement) &&\n document.activeElement &&\n document.activeElement.classList.contains(\n \"react-datepicker__week-number\",\n )\n ) {\n shouldFocusWeekNumber = true;\n }\n }\n\n shouldFocusWeekNumber &&\n this.weekNumberEl.current &&\n this.weekNumberEl.current.focus({ preventScroll: true });\n };\n\n render(): React.ReactElement {\n const {\n weekNumber,\n isWeekDisabled,\n ariaLabelPrefix = WeekNumber.defaultProps.ariaLabelPrefix,\n onClick,\n } = this.props;\n\n const weekNumberClasses = {\n \"react-datepicker__week-number\": true,\n \"react-datepicker__week-number--clickable\": !!onClick && !isWeekDisabled,\n \"react-datepicker__week-number--selected\":\n !!onClick && isSameDay(this.props.date, this.props.selected),\n };\n return (\n <div\n ref={this.weekNumberEl}\n className={clsx(weekNumberClasses)}\n aria-label={`${ariaLabelPrefix} ${this.props.weekNumber}`}\n onClick={this.handleClick}\n onKeyDown={this.handleOnKeyDown}\n tabIndex={this.getTabIndex()}\n role=\"gridcell\"\n >\n {weekNumber}\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component } from \"react\";\n\nimport {\n addDays,\n getWeek,\n getStartOfWeek,\n isSameDay,\n isDayDisabled,\n} from \"./date_utils\";\nimport Day from \"./day\";\nimport WeekNumber from \"./week_number\";\n\ninterface DayProps extends React.ComponentPropsWithoutRef<typeof Day> {}\n\ninterface WeekNumberProps extends React.ComponentPropsWithoutRef<\n typeof WeekNumber\n> {}\n\ninterface WeekProps\n extends\n Omit<\n DayProps,\n | \"ariaLabelPrefixWhenEnabled\"\n | \"ariaLabelPrefixWhenDisabled\"\n | \"day\"\n | \"onClick\"\n | \"onMouseEnter\"\n >,\n Omit<WeekNumberProps, \"weekNumber\" | \"date\" | \"onClick\"> {\n day: Date;\n chooseDayAriaLabelPrefix?: DayProps[\"ariaLabelPrefixWhenEnabled\"];\n disabledDayAriaLabelPrefix?: DayProps[\"ariaLabelPrefixWhenDisabled\"];\n onDayClick?: (day: Date, event: React.MouseEvent<HTMLDivElement>) => void;\n onDayMouseEnter?: (day: Date) => void;\n shouldCloseOnSelect?: boolean;\n setOpen?: (open: boolean) => void;\n formatWeekNumber?: (date: Date) => number;\n onWeekSelect?: (\n day: Date,\n weekNumber: number,\n event: React.MouseEvent<HTMLDivElement>,\n ) => void;\n weekClassName?: (date: Date) => string;\n}\n\nexport default class Week extends Component<WeekProps> {\n static get defaultProps() {\n return {\n shouldCloseOnSelect: true,\n };\n }\n\n isDisabled = (day: Date): boolean =>\n isDayDisabled(day, {\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n excludeDates: this.props.excludeDates,\n excludeDateIntervals: this.props.excludeDateIntervals,\n includeDateIntervals: this.props.includeDateIntervals,\n includeDates: this.props.includeDates,\n filterDate: this.props.filterDate,\n });\n\n handleDayClick = (\n day: Date,\n event: React.MouseEvent<HTMLDivElement>,\n ): void => {\n if (this.props.onDayClick) {\n this.props.onDayClick(day, event);\n }\n };\n\n handleDayMouseEnter = (day: Date): void => {\n if (this.props.onDayMouseEnter) {\n this.props.onDayMouseEnter(day);\n }\n };\n\n handleWeekClick = (\n day: Date,\n weekNumber: number,\n event: React.MouseEvent<HTMLDivElement>,\n ) => {\n let enabledWeekDay = new Date(day);\n\n for (let i = 0; i < 7; i++) {\n const processingDay = new Date(day);\n processingDay.setDate(processingDay.getDate() + i);\n\n const isEnabled = !this.isDisabled(processingDay);\n\n if (isEnabled) {\n enabledWeekDay = processingDay;\n break;\n }\n }\n\n if (typeof this.props.onWeekSelect === \"function\") {\n this.props.onWeekSelect(enabledWeekDay, weekNumber, event);\n }\n if (this.props.showWeekPicker) {\n this.handleDayClick(enabledWeekDay, event);\n }\n if (\n this.props.shouldCloseOnSelect ??\n Week.defaultProps.shouldCloseOnSelect\n ) {\n this.props.setOpen?.(false);\n }\n };\n\n formatWeekNumber = (date: Date): number => {\n if (this.props.formatWeekNumber) {\n return this.props.formatWeekNumber(date);\n }\n return getWeek(date);\n };\n\n isWeekDisabled = (): boolean => {\n const startOfWeek = this.startOfWeek();\n const endOfWeek = addDays(startOfWeek, 6);\n\n let processingDate = new Date(startOfWeek);\n while (processingDate <= endOfWeek) {\n if (!this.isDisabled(processingDate)) return false;\n\n processingDate = addDays(processingDate, 1);\n }\n\n return true;\n };\n\n renderDays = () => {\n const startOfWeek = this.startOfWeek();\n const days = [];\n const weekNumber = this.formatWeekNumber(startOfWeek);\n if (this.props.showWeekNumber) {\n const onClickAction =\n this.props.onWeekSelect || this.props.showWeekPicker\n ? this.handleWeekClick.bind(this, startOfWeek, weekNumber)\n : undefined;\n days.push(\n <WeekNumber\n key=\"W\"\n {...Week.defaultProps}\n {...this.props}\n weekNumber={weekNumber}\n isWeekDisabled={this.isWeekDisabled()}\n date={startOfWeek}\n onClick={onClickAction}\n />,\n );\n }\n return days.concat(\n [0, 1, 2, 3, 4, 5, 6].map<React.ReactElement>(\n (offset: number): React.ReactElement => {\n const day = addDays(startOfWeek, offset);\n return (\n <Day\n {...Week.defaultProps}\n {...this.props}\n ariaLabelPrefixWhenEnabled={this.props.chooseDayAriaLabelPrefix}\n ariaLabelPrefixWhenDisabled={\n this.props.disabledDayAriaLabelPrefix\n }\n key={day.valueOf()}\n day={day}\n onClick={this.handleDayClick.bind(this, day)}\n onMouseEnter={this.handleDayMouseEnter.bind(this, day)}\n />\n );\n },\n ),\n );\n };\n\n startOfWeek = (): Date =>\n getStartOfWeek(\n this.props.day,\n this.props.locale,\n this.props.calendarStartDay,\n );\n\n isKeyboardSelected = (): boolean =>\n !this.props.disabledKeyboardNavigation &&\n !isSameDay(this.startOfWeek(), this.props.selected) &&\n isSameDay(this.startOfWeek(), this.props.preSelection);\n\n render(): React.ReactElement {\n const weekNumberClasses = {\n \"react-datepicker__week\": true,\n \"react-datepicker__week--selected\": isSameDay(\n this.startOfWeek(),\n this.props.selected,\n ),\n \"react-datepicker__week--keyboard-selected\": this.isKeyboardSelected(),\n };\n const customWeekClassName = this.props.weekClassName\n ? this.props.weekClassName(this.startOfWeek())\n : undefined;\n return (\n <div className={clsx(weekNumberClasses, customWeekClassName)} role=\"row\">\n {this.renderDays()}\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component, createRef } from \"react\";\n\nimport {\n KeyType,\n addDays,\n addMonths,\n addQuarters,\n addWeeks,\n formatDate,\n getMonth,\n getMonthInLocale,\n getMonthShortInLocale,\n getQuarter,\n getQuarterShortInLocale,\n getStartOfMonth,\n getStartOfQuarter,\n getStartOfWeek,\n getYear,\n isDayDisabled,\n isDayExcluded,\n isMonthDisabled,\n isMonthInRange,\n isMonthYearDisabled,\n isQuarterDisabled,\n isQuarterInRange,\n isSameMonth,\n isSameQuarter,\n isSpaceKeyDown,\n isValid,\n newDate,\n setMonth,\n setQuarter,\n subMonths,\n subQuarters,\n} from \"./date_utils\";\nimport Week from \"./week\";\n\nconst FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;\n\nconst MONTH_COLUMNS_LAYOUT = {\n TWO_COLUMNS: \"two_columns\",\n THREE_COLUMNS: \"three_columns\",\n FOUR_COLUMNS: \"four_columns\",\n};\nconst MONTH_COLUMNS = {\n [MONTH_COLUMNS_LAYOUT.TWO_COLUMNS]: {\n grid: [\n [0, 1],\n [2, 3],\n [4, 5],\n [6, 7],\n [8, 9],\n [10, 11],\n ],\n verticalNavigationOffset: 2,\n },\n [MONTH_COLUMNS_LAYOUT.THREE_COLUMNS]: {\n grid: [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [9, 10, 11],\n ],\n verticalNavigationOffset: 3,\n },\n [MONTH_COLUMNS_LAYOUT.FOUR_COLUMNS]: {\n grid: [\n [0, 1, 2, 3],\n [4, 5, 6, 7],\n [8, 9, 10, 11],\n ],\n verticalNavigationOffset: 4,\n },\n};\nconst MONTH_NAVIGATION_HORIZONTAL_OFFSET = 1;\n\nfunction getMonthColumnsLayout(\n showFourColumnMonthYearPicker?: boolean,\n showTwoColumnMonthYearPicker?: boolean,\n) {\n if (showFourColumnMonthYearPicker) {\n return MONTH_COLUMNS_LAYOUT.FOUR_COLUMNS;\n }\n if (showTwoColumnMonthYearPicker) {\n return MONTH_COLUMNS_LAYOUT.TWO_COLUMNS;\n }\n return MONTH_COLUMNS_LAYOUT.THREE_COLUMNS;\n}\n\ninterface WeekProps extends React.ComponentPropsWithoutRef<typeof Week> {}\n\ninterface MonthProps extends Omit<\n WeekProps,\n | \"ariaLabelPrefix\"\n | \"chooseDayAriaLabelPrefix\"\n | \"day\"\n | \"disabledDayAriaLabelPrefix\"\n | \"month\"\n | \"onDayClick\"\n | \"onDayMouseEnter\"\n | \"preSelection\"\n | \"selected\"\n | \"showWeekNumber\"\n> {\n monthClassName?: (date: Date) => string;\n onDayClick?: (\n date: Date,\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n orderInDisplay?: number,\n ) => void;\n onDayMouseEnter?: (date: Date) => void;\n onMouseLeave?: VoidFunction;\n setPreSelection?: (date?: Date | null) => void;\n renderMonthContent?: (\n m: number,\n shortMonthText: string,\n fullMonthText: string,\n day: Date,\n ) => React.ReactNode;\n renderQuarterContent?: (q: number, shortQuarter: string) => React.ReactNode;\n handleOnMonthKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;\n ariaLabelPrefix?: string;\n day: Date;\n startDate?: Date | null;\n endDate?: Date | null;\n orderInDisplay?: number;\n fixedHeight?: boolean;\n peekNextMonth?: boolean;\n preSelection?: Date | null;\n selected?: Date | null;\n showWeekNumbers?: WeekProps[\"showWeekNumber\"];\n showMonthYearPicker?: boolean;\n showFullMonthYearPicker?: boolean;\n showTwoColumnMonthYearPicker?: boolean;\n showFourColumnMonthYearPicker?: boolean;\n showQuarterYearPicker?: boolean;\n weekAriaLabelPrefix?: WeekProps[\"ariaLabelPrefix\"];\n chooseDayAriaLabelPrefix?: WeekProps[\"chooseDayAriaLabelPrefix\"];\n disabledDayAriaLabelPrefix?: WeekProps[\"disabledDayAriaLabelPrefix\"];\n dayNamesHeader?: React.ReactNode;\n monthHeader?: React.ReactNode;\n monthFooter?: React.ReactNode;\n}\n\n/**\n * `Month` is a React component that represents a month in a calendar.\n * It accepts a `MonthProps` object as props which provides various configurations and event handlers.\n *\n * @prop dayClassName - Function to determine the class name for a day.\n * @prop monthClassName - Function to determine the class name for a month.\n * @prop filterDate - Function to filter dates.\n * @prop formatWeekNumber - Function to format the week number.\n * @prop onDayClick - Function to handle day click events.\n * @prop onDayMouseEnter - Function to handle mouse enter events on a day.\n * @prop onMouseLeave - Function to handle mouse leave events.\n * @prop onWeekSelect - Function to handle week selection.\n * @prop setPreSelection - Function to set pre-selection.\n * @prop setOpen - Function to set open state.\n * @prop renderDayContents - Function to render day contents.\n * @prop renderMonthContent - Function to render month content.\n * @prop renderQuarterContent - Function to render quarter content.\n * @prop handleOnKeyDown - Function to handle key down events.\n * @prop handleOnMonthKeyDown - Function to handle key down events on a month.\n * @prop ariaLabelPrefix - Aria label prefix.\n * @prop chooseDayAriaLabelPrefix - Aria label prefix for choosing a day.\n * @prop disabledDayAriaLabelPrefix - Aria label prefix for disabled day.\n * @prop disabledKeyboardNavigation - Flag to disable keyboard navigation.\n * @prop day - The day.\n * @prop endDate - The end date.\n * @prop orderInDisplay - The order in display.\n * @prop excludeDates - Dates to exclude.\n * @prop excludeDateIntervals - Date intervals to exclude.\n * @prop fixedHeight - Flag to set fixed height.\n * @prop highlightDates - Dates to highlight.\n * @prop holidays - Holidays.\n * @prop includeDates - Dates to include.\n * @prop includeDateIntervals - Date intervals to include.\n * @prop inline - Flag to set inline.\n * @prop shouldFocusDayInline - Flag to set focus on day inline.\n * @prop locale - The locale.\n * @prop maxDate - The maximum date.\n * @prop minDate - The minimum date.\n * @prop usePointerEvent - Flag to use pointer event.\n * @prop peekNextMonth - Flag to peek next month.\n * @prop preSelection - The pre-selection.\n * @prop selected - The selected date.\n * @prop selectingDate - The selecting date.\n * @prop calendarStartDay - The calendar start day.\n * @prop selectsEnd - Flag to select end.\n * @prop selectsStart - Flag to select start.\n * @prop selectsRange - Flag to select range.\n * @prop selectsDisabledDaysInRange - Flag to select disabled days in range.\n * @prop selectsMultiple - Flag to select multiple.\n * @prop selectedDates - The selected dates.\n * @prop showWeekNumbers - Flag to show week numbers.\n * @prop startDate - The start date.\n * @prop shouldCloseOnSelect - Flag to close on select.\n * @prop showMonthYearPicker - Flag to show month year picker.\n * @prop showFullMonthYearPicker - Flag to show full month year picker.\n * @prop showTwoColumnMonthYearPicker - Flag to show two column month year picker.\n * @prop showFourColumnMonthYearPicker - Flag to show four column month year picker.\n * @prop showQuarterYearPicker - Flag to show quarter year picker.\n * @prop showWeekPicker - Flag to show week picker.\n * @prop isInputFocused - Flag to set input focus.\n * @prop weekAriaLabelPrefix - Aria label prefix for week.\n * @prop containerRef - The container reference.\n * @prop monthShowsDuplicateDaysEnd - Flag to show duplicate days at the end of the month.\n * @prop monthShowsDuplicateDaysStart - Flag to show duplicate days at the start of the month.\n *\n * @example\n * ```tsx\n * function App() {\n * const handleDayClick = (date) => {\n * console.log('Day clicked: ', date);\n * };\n *\n * const handleDayMouseEnter = (date) => {\n * console.log('Mouse entered on day: ', date);\n * };\n *\n * return (\n * <div>\n * <Month\n * day={new Date()}\n * endDate={new Date()}\n * onDayClick={handleDayClick}\n * onDayMouseEnter={handleDayMouseEnter}\n * disabledKeyboardNavigation={false}\n * showWeekNumbers={true}\n * showMonthYearPicker={false}\n * />\n * </div>\n * );\n * }\n * ```\n */\nexport default class Month extends Component<MonthProps> {\n MONTH_REFS = [...Array(12)].map(() => createRef<HTMLDivElement>());\n QUARTER_REFS = [...Array(4)].map(() => createRef<HTMLDivElement>());\n\n isDisabled = (day: Date) =>\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n isDayDisabled(day, {\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n excludeDates: this.props.excludeDates,\n excludeDateIntervals: this.props.excludeDateIntervals,\n includeDateIntervals: this.props.includeDateIntervals,\n includeDates: this.props.includeDates,\n filterDate: this.props.filterDate,\n disabled: this.props.disabled,\n });\n\n isExcluded = (day: Date) =>\n // Almost all props previously were passed as this.props w/o proper typing with prop-types\n // after the migration to TS i made it explicit\n isDayExcluded(day, {\n excludeDates: this.props.excludeDates,\n excludeDateIntervals: this.props.excludeDateIntervals,\n });\n\n handleDayClick = (\n day: Date,\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n this.props.onDayClick?.(day, event, this.props.orderInDisplay);\n };\n\n handleDayMouseEnter = (day: Date) => {\n this.props.onDayMouseEnter?.(day);\n };\n\n handleMouseLeave = () => {\n this.props.onMouseLeave?.();\n };\n\n isRangeStartMonth = (m: number) => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameMonth(setMonth(day, m), startDate);\n };\n\n isRangeStartQuarter = (q: number) => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameQuarter(setQuarter(day, q), startDate);\n };\n\n isRangeEndMonth = (m: number) => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameMonth(setMonth(day, m), endDate);\n };\n\n isRangeEndQuarter = (q: number) => {\n const { day, startDate, endDate } = this.props;\n if (!startDate || !endDate) {\n return false;\n }\n return isSameQuarter(setQuarter(day, q), endDate);\n };\n\n isInSelectingRangeMonth = (m: number) => {\n const { day, selectsStart, selectsEnd, selectsRange, startDate, endDate } =\n this.props;\n\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (!(selectsStart || selectsEnd || selectsRange) || !selectingDate) {\n return false;\n }\n\n if (selectsStart && endDate) {\n return isMonthInRange(selectingDate, endDate, m, day);\n }\n\n if (selectsEnd && startDate) {\n return isMonthInRange(startDate, selectingDate, m, day);\n }\n\n if (selectsRange && startDate && !endDate) {\n return isMonthInRange(startDate, selectingDate, m, day);\n }\n\n return false;\n };\n\n isSelectingMonthRangeStart = (m: number) => {\n if (!this.isInSelectingRangeMonth(m)) {\n return false;\n }\n\n const { day, startDate, selectsStart } = this.props;\n const _month = setMonth(day, m);\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (selectsStart) {\n return isSameMonth(_month, selectingDate);\n } else {\n return isSameMonth(_month, startDate);\n }\n };\n\n isSelectingMonthRangeEnd = (m: number) => {\n if (!this.isInSelectingRangeMonth(m)) {\n return false;\n }\n\n const { day, endDate, selectsEnd, selectsRange } = this.props;\n const _month = setMonth(day, m);\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (selectsEnd || selectsRange) {\n return isSameMonth(_month, selectingDate);\n } else {\n return isSameMonth(_month, endDate);\n }\n };\n\n isInSelectingRangeQuarter = (q: number) => {\n const { day, selectsStart, selectsEnd, selectsRange, startDate, endDate } =\n this.props;\n\n const selectingDate = this.props.selectingDate ?? this.props.preSelection;\n\n if (!(selectsStart || selectsEnd || selectsRange) || !selectingDate) {\n return false;\n }\n\n if (selectsStart && endDate) {\n return isQuarterInRange(selectingDate, endDate, q, day);\n }\n\n if (selectsEnd && startDate) {\n return isQuarterInRange(startDate, selectingDate, q, day);\n }\n\n if (selectsRange && startDate && !endDate) {\n return isQuarterInRange(startDate, selectingDate, q, day);\n }\n\n return false;\n };\n\n isWeekInMonth = (startOfWeek: Date) => {\n const day = this.props.day;\n const endOfWeek = addDays(startOfWeek, 6);\n return isSameMonth(startOfWeek, day) || isSameMonth(endOfWeek, day);\n };\n\n isCurrentMonth = (day: Date, m: number) =>\n getYear(day) === getYear(newDate()) && m === getMonth(newDate());\n\n isCurrentQuarter = (day: Date, q: number) =>\n getYear(day) === getYear(newDate()) && q === getQuarter(newDate());\n\n isSelectedMonth = (day: Date, m: number, selected: Date) =>\n getMonth(selected) === m && getYear(day) === getYear(selected);\n\n isSelectMonthInList = (day: Date, m: number, selectedDates: Date[]) =>\n selectedDates.some((selectedDate) =>\n this.isSelectedMonth(day, m, selectedDate),\n );\n\n isSelectedQuarter = (day: Date, q: number, selected: Date): boolean =>\n getQuarter(selected) === q && getYear(day) === getYear(selected);\n\n isSelectQuarterInList = (day: Date, q: number, selectedDates: Date[]) =>\n selectedDates.some((selectedDate) =>\n this.isSelectedQuarter(day, q, selectedDate),\n );\n\n isMonthSelected = () => {\n const { day, selected, selectedDates, selectsMultiple } = this.props;\n const monthIdx = getMonth(day);\n\n if (selectsMultiple) {\n return selectedDates?.some((date) =>\n this.isSelectedMonth(day, monthIdx, date),\n );\n }\n\n return !!selected && this.isSelectedMonth(day, monthIdx, selected);\n };\n\n isQuarterSelected = () => {\n const { day, selected, selectedDates, selectsMultiple } = this.props;\n const quarterIdx = getQuarter(day);\n\n if (selectsMultiple) {\n return selectedDates?.some((selectedDate) =>\n this.isSelectedQuarter(day, quarterIdx, selectedDate),\n );\n }\n\n return !!selected && this.isSelectedQuarter(day, quarterIdx, selected);\n };\n\n renderWeeks = () => {\n // Return empty array if day is invalid\n if (!isValid(this.props.day)) {\n return [];\n }\n\n const weeks = [];\n const isFixedHeight = this.props.fixedHeight;\n\n let i = 0;\n let breakAfterNextPush = false;\n let currentWeekStart = getStartOfWeek(\n getStartOfMonth(this.props.day),\n this.props.locale,\n this.props.calendarStartDay,\n );\n\n const isPreSelected = (preSelection: Date) =>\n this.props.showWeekPicker\n ? getStartOfWeek(\n preSelection,\n this.props.locale,\n this.props.calendarStartDay,\n )\n : this.props.preSelection;\n\n const isSelected = (selected: Date) =>\n this.props.showWeekPicker\n ? getStartOfWeek(\n selected,\n this.props.locale,\n this.props.calendarStartDay,\n )\n : this.props.selected;\n\n const selected = this.props.selected\n ? isSelected(this.props.selected)\n : undefined;\n\n const preSelection = this.props.preSelection\n ? isPreSelected(this.props.preSelection)\n : undefined;\n\n while (true) {\n weeks.push(\n <Week\n {...this.props}\n ariaLabelPrefix={this.props.weekAriaLabelPrefix}\n key={i}\n day={currentWeekStart}\n month={getMonth(this.props.day)}\n onDayClick={this.handleDayClick}\n onDayMouseEnter={this.handleDayMouseEnter}\n selected={selected}\n preSelection={preSelection}\n showWeekNumber={this.props.showWeekNumbers}\n />,\n );\n\n if (breakAfterNextPush) break;\n\n i++;\n currentWeekStart = addWeeks(currentWeekStart, 1);\n\n // If one of these conditions is true, we will either break on this week\n // or break on the next week\n const isFixedAndFinalWeek =\n isFixedHeight && i >= FIXED_HEIGHT_STANDARD_WEEK_COUNT;\n const isNonFixedAndOutOfMonth =\n !isFixedHeight && !this.isWeekInMonth(currentWeekStart);\n\n if (isFixedAndFinalWeek || isNonFixedAndOutOfMonth) {\n if (this.props.peekNextMonth) {\n breakAfterNextPush = true;\n } else {\n break;\n }\n }\n }\n\n return weeks;\n };\n\n onMonthClick = (\n event:\n | React.MouseEvent<HTMLDivElement, MouseEvent>\n | React.KeyboardEvent<HTMLDivElement>,\n m: number,\n ) => {\n const { isDisabled, labelDate } = this.isMonthDisabledForLabelDate(m);\n\n if (isDisabled) {\n return;\n }\n\n this.handleDayClick(getStartOfMonth(labelDate), event);\n };\n\n onMonthMouseEnter = (m: number) => {\n const { isDisabled, labelDate } = this.isMonthDisabledForLabelDate(m);\n\n if (isDisabled) {\n return;\n }\n\n this.handleDayMouseEnter(getStartOfMonth(labelDate));\n };\n\n handleMonthNavigation = (newMonth: number, newDate: Date) => {\n this.props.setPreSelection?.(newDate);\n\n this.MONTH_REFS[newMonth]?.current?.focus();\n };\n\n handleKeyboardNavigation = (\n event: React.KeyboardEvent<HTMLDivElement>,\n eventKey: KeyType,\n month: number,\n ) => {\n const {\n selected,\n preSelection,\n setPreSelection,\n minDate,\n maxDate,\n showFourColumnMonthYearPicker,\n showTwoColumnMonthYearPicker,\n } = this.props;\n if (!preSelection) return;\n\n const monthColumnsLayout = getMonthColumnsLayout(\n showFourColumnMonthYearPicker,\n showTwoColumnMonthYearPicker,\n );\n\n const verticalOffset = this.getVerticalOffset(monthColumnsLayout);\n\n const monthsGrid = MONTH_COLUMNS[monthColumnsLayout]?.grid;\n\n const calculateNewDateAndMonth = (\n eventKey: KeyType,\n date: Date,\n month: number,\n ): { newCalculatedDate: Date; newCalculatedMonth: number } => {\n let newCalculatedDate = date;\n let newCalculatedMonth = month;\n switch (eventKey) {\n case KeyType.ArrowRight:\n newCalculatedDate = addMonths(\n date,\n MONTH_NAVIGATION_HORIZONTAL_OFFSET,\n );\n newCalculatedMonth =\n month === 11 ? 0 : month + MONTH_NAVIGATION_HORIZONTAL_OFFSET;\n break;\n case KeyType.ArrowLeft:\n newCalculatedDate = subMonths(\n date,\n MONTH_NAVIGATION_HORIZONTAL_OFFSET,\n );\n newCalculatedMonth =\n month === 0 ? 11 : month - MONTH_NAVIGATION_HORIZONTAL_OFFSET;\n break;\n case KeyType.ArrowUp:\n newCalculatedDate = subMonths(date, verticalOffset);\n newCalculatedMonth = monthsGrid?.[0]?.includes(month)\n ? month + 12 - verticalOffset\n : month - verticalOffset;\n break;\n case KeyType.ArrowDown:\n newCalculatedDate = addMonths(date, verticalOffset);\n newCalculatedMonth = monthsGrid?.[monthsGrid.length - 1]?.includes(\n month,\n )\n ? month - 12 + verticalOffset\n : month + verticalOffset;\n break;\n }\n\n return { newCalculatedDate, newCalculatedMonth };\n };\n\n const getNewDateAndMonth = (\n eventKey: KeyType,\n selectedDate: Date,\n month: number,\n ): { newCalculatedDate: Date; newCalculatedMonth: number } => {\n const MAX_ITERATIONS = 40;\n let eventKeyCopy = eventKey;\n let validDateFound = false;\n let iterations = 0;\n let { newCalculatedDate, newCalculatedMonth } = calculateNewDateAndMonth(\n eventKeyCopy,\n selectedDate,\n month,\n );\n\n while (!validDateFound) {\n if (iterations >= MAX_ITERATIONS) {\n newCalculatedDate = selectedDate;\n newCalculatedMonth = month;\n break;\n }\n // if minDate exists and the new month is before the minimum month, it will try to find the next available month after\n if (minDate && newCalculatedDate < minDate) {\n eventKeyCopy = KeyType.ArrowRight;\n const obj = calculateNewDateAndMonth(\n eventKeyCopy,\n newCalculatedDate,\n newCalculatedMonth,\n );\n newCalculatedDate = obj.newCalculatedDate;\n newCalculatedMonth = obj.newCalculatedMonth;\n }\n\n // if maxDate exists and the new month is after the maximum month, it will try to find the next available month before\n if (maxDate && newCalculatedDate > maxDate) {\n eventKeyCopy = KeyType.ArrowLeft;\n const obj = calculateNewDateAndMonth(\n eventKeyCopy,\n newCalculatedDate,\n newCalculatedMonth,\n );\n newCalculatedDate = obj.newCalculatedDate;\n newCalculatedMonth = obj.newCalculatedMonth;\n }\n\n if (isMonthYearDisabled(newCalculatedDate, this.props)) {\n const obj = calculateNewDateAndMonth(\n eventKeyCopy,\n newCalculatedDate,\n newCalculatedMonth,\n );\n newCalculatedDate = obj.newCalculatedDate;\n newCalculatedMonth = obj.newCalculatedMonth;\n } else {\n validDateFound = true;\n }\n iterations++;\n }\n\n return { newCalculatedDate, newCalculatedMonth };\n };\n\n if (eventKey === KeyType.Enter) {\n if (!this.isMonthDisabled(month)) {\n this.onMonthClick(event, month);\n setPreSelection?.(selected);\n }\n return;\n }\n\n const { newCalculatedDate, newCalculatedMonth } = getNewDateAndMonth(\n eventKey,\n preSelection,\n month,\n );\n\n switch (eventKey) {\n case KeyType.ArrowRight:\n case KeyType.ArrowLeft:\n case KeyType.ArrowUp:\n case KeyType.ArrowDown:\n this.handleMonthNavigation(newCalculatedMonth, newCalculatedDate);\n break;\n }\n };\n\n getVerticalOffset = (monthColumnsLayout: string) => {\n return MONTH_COLUMNS[monthColumnsLayout]?.verticalNavigationOffset ?? 0;\n };\n\n onMonthKeyDown = (\n event: React.KeyboardEvent<HTMLDivElement>,\n month: number,\n ) => {\n const { disabledKeyboardNavigation, handleOnMonthKeyDown } = this.props;\n const eventKey = event.key as KeyType;\n if (eventKey !== KeyType.Tab) {\n // preventDefault on tab event blocks focus change\n event.preventDefault();\n }\n if (!disabledKeyboardNavigation) {\n this.handleKeyboardNavigation(event, eventKey, month);\n }\n\n handleOnMonthKeyDown && handleOnMonthKeyDown(event);\n };\n\n onQuarterClick = (\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n q: number,\n ) => {\n const labelDate = setQuarter(this.props.day, q);\n\n if (isQuarterDisabled(labelDate, this.props)) {\n return;\n }\n\n this.handleDayClick(getStartOfQuarter(labelDate), event);\n };\n\n onQuarterMouseEnter = (q: number) => {\n const labelDate = setQuarter(this.props.day, q);\n\n if (isQuarterDisabled(labelDate, this.props)) {\n return;\n }\n\n this.handleDayMouseEnter(getStartOfQuarter(labelDate));\n };\n\n handleQuarterNavigation = (newQuarter: number, newDate: Date) => {\n if (this.isDisabled(newDate) || this.isExcluded(newDate)) {\n return;\n }\n this.props.setPreSelection?.(newDate);\n this.QUARTER_REFS[newQuarter - 1]?.current?.focus();\n };\n\n onQuarterKeyDown = (\n event: React.KeyboardEvent<HTMLDivElement>,\n quarter: number,\n ) => {\n const eventKey = event.key;\n if (!this.props.disabledKeyboardNavigation) {\n switch (eventKey) {\n case KeyType.Enter:\n this.onQuarterClick(event, quarter);\n this.props.setPreSelection?.(this.props.selected);\n break;\n case KeyType.ArrowRight:\n if (!this.props.preSelection) {\n break;\n }\n this.handleQuarterNavigation(\n quarter === 4 ? 1 : quarter + 1,\n addQuarters(this.props.preSelection, 1),\n );\n break;\n case KeyType.ArrowLeft:\n if (!this.props.preSelection) {\n break;\n }\n this.handleQuarterNavigation(\n quarter === 1 ? 4 : quarter - 1,\n subQuarters(this.props.preSelection, 1),\n );\n break;\n }\n }\n };\n\n isMonthDisabledForLabelDate = (\n month: number,\n ): {\n isDisabled: boolean;\n labelDate: Date;\n } => {\n const { day, disabled, minDate, maxDate, excludeDates, includeDates } =\n this.props;\n const labelDate = setMonth(day, month);\n\n if (disabled) {\n return {\n isDisabled: true,\n labelDate: setMonth(day, month),\n };\n }\n\n return {\n isDisabled:\n ((minDate || maxDate || excludeDates || includeDates) &&\n isMonthDisabled(labelDate, this.props)) ??\n false,\n labelDate,\n };\n };\n\n isMonthDisabled = (month: number) => {\n const { isDisabled } = this.isMonthDisabledForLabelDate(month);\n return isDisabled;\n };\n\n getSelection() {\n const { selected, selectedDates, selectsMultiple } = this.props;\n\n if (selectsMultiple) {\n return selectedDates;\n }\n\n if (selected) {\n return [selected];\n }\n\n return undefined;\n }\n\n getMonthClassNames = (m: number) => {\n const { day, startDate, endDate, preSelection, monthClassName } =\n this.props;\n const _monthClassName = monthClassName\n ? monthClassName(setMonth(day, m))\n : undefined;\n\n const selection = this.getSelection();\n\n return clsx(\n \"react-datepicker__month-text\",\n `react-datepicker__month-${m}`,\n _monthClassName,\n {\n \"react-datepicker__month-text--disabled\": this.isMonthDisabled(m),\n \"react-datepicker__month-text--selected\": selection\n ? this.isSelectMonthInList(day, m, selection)\n : undefined,\n \"react-datepicker__month-text--keyboard-selected\":\n !this.props.disabledKeyboardNavigation &&\n preSelection &&\n this.isSelectedMonth(day, m, preSelection) &&\n !this.isMonthSelected() &&\n !this.isMonthDisabled(m),\n \"react-datepicker__month-text--in-selecting-range\":\n this.isInSelectingRangeMonth(m),\n \"react-datepicker__month-text--in-range\":\n startDate && endDate\n ? isMonthInRange(startDate, endDate, m, day)\n : undefined,\n \"react-datepicker__month-text--range-start\": this.isRangeStartMonth(m),\n \"react-datepicker__month-text--range-end\": this.isRangeEndMonth(m),\n \"react-datepicker__month-text--selecting-range-start\":\n this.isSelectingMonthRangeStart(m),\n \"react-datepicker__month-text--selecting-range-end\":\n this.isSelectingMonthRangeEnd(m),\n \"react-datepicker__month-text--today\": this.isCurrentMonth(day, m),\n },\n );\n };\n\n getTabIndex = (m: number) => {\n if (this.props.preSelection == null) {\n return \"-1\";\n }\n const preSelectedMonth = getMonth(this.props.preSelection);\n const { isDisabled: isPreSelectedMonthDisabled } =\n this.isMonthDisabledForLabelDate(preSelectedMonth);\n\n const tabIndex =\n m === preSelectedMonth &&\n !(isPreSelectedMonthDisabled || this.props.disabledKeyboardNavigation)\n ? \"0\"\n : \"-1\";\n\n return tabIndex;\n };\n\n getQuarterTabIndex = (q: number) => {\n if (this.props.preSelection == null) {\n return \"-1\";\n }\n const preSelectedQuarter = getQuarter(this.props.preSelection);\n const isCurrentQuarterDisabled = isQuarterDisabled(\n this.props.day,\n this.props,\n );\n\n const tabIndex =\n q === preSelectedQuarter &&\n !(isCurrentQuarterDisabled || this.props.disabledKeyboardNavigation)\n ? \"0\"\n : \"-1\";\n\n return tabIndex;\n };\n\n getAriaLabel = (month: number) => {\n const {\n chooseDayAriaLabelPrefix = \"Choose\",\n disabledDayAriaLabelPrefix = \"Not available\",\n day,\n locale,\n } = this.props;\n const labelDate = setMonth(day, month);\n const prefix =\n this.isDisabled(labelDate) || this.isExcluded(labelDate)\n ? disabledDayAriaLabelPrefix\n : chooseDayAriaLabelPrefix;\n\n return `${prefix} ${formatDate(labelDate, \"MMMM yyyy\", locale)}`;\n };\n\n getQuarterClassNames = (q: number) => {\n const {\n day,\n startDate,\n endDate,\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n preSelection,\n disabledKeyboardNavigation,\n disabled,\n } = this.props;\n\n const isDisabled =\n (minDate ||\n maxDate ||\n excludeDates ||\n includeDates ||\n filterDate ||\n disabled) &&\n isQuarterDisabled(setQuarter(day, q), this.props);\n\n const selection = this.getSelection();\n\n return clsx(\n \"react-datepicker__quarter-text\",\n `react-datepicker__quarter-${q}`,\n {\n \"react-datepicker__quarter-text--disabled\": isDisabled,\n \"react-datepicker__quarter-text--selected\": selection\n ? this.isSelectQuarterInList(day, q, selection)\n : undefined,\n \"react-datepicker__quarter-text--keyboard-selected\":\n !disabledKeyboardNavigation &&\n preSelection &&\n this.isSelectedQuarter(day, q, preSelection) &&\n !this.isQuarterSelected() &&\n !isDisabled,\n \"react-datepicker__quarter-text--in-selecting-range\":\n this.isInSelectingRangeQuarter(q),\n \"react-datepicker__quarter-text--in-range\":\n startDate && endDate\n ? isQuarterInRange(startDate, endDate, q, day)\n : undefined,\n \"react-datepicker__quarter-text--range-start\":\n this.isRangeStartQuarter(q),\n \"react-datepicker__quarter-text--range-end\": this.isRangeEndQuarter(q),\n \"react-datepicker__quarter-text--today\": this.isCurrentQuarter(day, q),\n },\n );\n };\n\n getMonthContent = (m: number) => {\n const { showFullMonthYearPicker, renderMonthContent, locale, day } =\n this.props;\n const shortMonthText = getMonthShortInLocale(m, locale);\n const fullMonthText = getMonthInLocale(m, locale);\n if (renderMonthContent) {\n return renderMonthContent(m, shortMonthText, fullMonthText, day);\n }\n return showFullMonthYearPicker ? fullMonthText : shortMonthText;\n };\n\n getQuarterContent = (q: number) => {\n const { renderQuarterContent, locale } = this.props;\n const shortQuarter = getQuarterShortInLocale(q, locale);\n return renderQuarterContent?.(q, shortQuarter) ?? shortQuarter;\n };\n\n renderMonths = () => {\n const {\n showTwoColumnMonthYearPicker,\n showFourColumnMonthYearPicker,\n day,\n selected,\n } = this.props;\n\n const monthColumns =\n MONTH_COLUMNS[\n getMonthColumnsLayout(\n showFourColumnMonthYearPicker,\n showTwoColumnMonthYearPicker,\n )\n ]?.grid;\n return monthColumns?.map((month, i) => (\n <div className=\"react-datepicker__month-wrapper\" key={i}>\n {month.map((m, j) => (\n <div\n ref={this.MONTH_REFS[m]}\n key={j}\n onClick={(event) => {\n this.onMonthClick(event, m);\n }}\n onKeyDown={(event) => {\n if (isSpaceKeyDown(event)) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n\n this.onMonthKeyDown(event, m);\n }}\n onMouseEnter={\n !this.props.usePointerEvent\n ? () => this.onMonthMouseEnter(m)\n : undefined\n }\n onPointerEnter={\n this.props.usePointerEvent\n ? () => this.onMonthMouseEnter(m)\n : undefined\n }\n tabIndex={Number(this.getTabIndex(m))}\n className={this.getMonthClassNames(m)}\n aria-disabled={this.isMonthDisabled(m)}\n role=\"option\"\n aria-label={this.getAriaLabel(m)}\n aria-current={this.isCurrentMonth(day, m) ? \"date\" : undefined}\n aria-selected={\n selected ? this.isSelectedMonth(day, m, selected) : undefined\n }\n >\n {this.getMonthContent(m)}\n </div>\n ))}\n </div>\n ));\n };\n\n renderQuarters = () => {\n const { day, selected } = this.props;\n const quarters = [1, 2, 3, 4];\n return (\n <div className=\"react-datepicker__quarter-wrapper\">\n {quarters.map((q, j) => (\n <div\n key={j}\n ref={this.QUARTER_REFS[j]}\n role=\"option\"\n onClick={(event) => {\n this.onQuarterClick(event, q);\n }}\n onKeyDown={(event) => {\n this.onQuarterKeyDown(event, q);\n }}\n onMouseEnter={\n !this.props.usePointerEvent\n ? () => this.onQuarterMouseEnter(q)\n : undefined\n }\n onPointerEnter={\n this.props.usePointerEvent\n ? () => this.onQuarterMouseEnter(q)\n : undefined\n }\n className={this.getQuarterClassNames(q)}\n aria-selected={\n selected ? this.isSelectedQuarter(day, q, selected) : undefined\n }\n tabIndex={Number(this.getQuarterTabIndex(q))}\n aria-current={this.isCurrentQuarter(day, q) ? \"date\" : undefined}\n >\n {this.getQuarterContent(q)}\n </div>\n ))}\n </div>\n );\n };\n\n getClassNames = () => {\n const {\n selectingDate,\n selectsStart,\n selectsEnd,\n showMonthYearPicker,\n showQuarterYearPicker,\n showWeekPicker,\n } = this.props;\n\n return clsx(\n \"react-datepicker__month\",\n {\n \"react-datepicker__month--selecting-range\":\n selectingDate && (selectsStart || selectsEnd),\n },\n { \"react-datepicker__monthPicker\": showMonthYearPicker },\n { \"react-datepicker__quarterPicker\": showQuarterYearPicker },\n { \"react-datepicker__weekPicker\": showWeekPicker },\n );\n };\n\n render() {\n const {\n showMonthYearPicker,\n showQuarterYearPicker,\n day,\n ariaLabelPrefix = \"Month \",\n } = this.props;\n\n const formattedAriaLabelPrefix = ariaLabelPrefix\n ? ariaLabelPrefix.trim() + \" \"\n : \"\";\n\n // Format aria-label, return empty string if date is invalid\n const formattedAriaLabel = isValid(day)\n ? `${formattedAriaLabelPrefix}${formatDate(day, \"MMMM, yyyy\", this.props.locale)}`\n : \"\";\n\n const shouldUseListboxRole = showMonthYearPicker || showQuarterYearPicker;\n\n if (shouldUseListboxRole) {\n return (\n <div\n className={this.getClassNames()}\n onMouseLeave={\n !this.props.usePointerEvent ? this.handleMouseLeave : undefined\n }\n onPointerLeave={\n this.props.usePointerEvent ? this.handleMouseLeave : undefined\n }\n aria-label={formattedAriaLabel}\n role=\"listbox\"\n >\n {showMonthYearPicker ? this.renderMonths() : this.renderQuarters()}\n </div>\n );\n }\n\n // For regular calendar view, use table structure\n return (\n <div role=\"table\">\n {this.props.dayNamesHeader && (\n <div role=\"rowgroup\">{this.props.dayNamesHeader}</div>\n )}\n {this.props.monthHeader && (\n <div role=\"rowgroup\">{this.props.monthHeader}</div>\n )}\n <div\n className={this.getClassNames()}\n onMouseLeave={\n !this.props.usePointerEvent ? this.handleMouseLeave : undefined\n }\n onPointerLeave={\n this.props.usePointerEvent ? this.handleMouseLeave : undefined\n }\n aria-label={formattedAriaLabel}\n role=\"rowgroup\"\n >\n {this.renderWeeks()}\n </div>\n {this.props.monthFooter && (\n <div role=\"rowgroup\">{this.props.monthFooter}</div>\n )}\n </div>\n );\n }\n}\n", "import React, { Component } from \"react\";\n\nimport { ClickOutsideWrapper } from \"./click_outside_wrapper\";\n\ninterface MonthDropdownOptionsProps {\n onCancel: VoidFunction;\n onChange: (month: number) => void;\n month: number;\n monthNames: string[];\n}\n\nexport default class MonthDropdownOptions extends Component<MonthDropdownOptionsProps> {\n monthOptionButtonsRef: Record<number, HTMLDivElement | null> = {};\n\n isSelectedMonth = (i: number): boolean => this.props.month === i;\n\n handleOptionKeyDown = (i: number, e: React.KeyboardEvent): void => {\n switch (e.key) {\n case \"Enter\":\n e.preventDefault();\n this.onChange(i);\n break;\n case \"Escape\":\n e.preventDefault();\n this.props.onCancel();\n break;\n case \"ArrowUp\":\n case \"ArrowDown\": {\n e.preventDefault();\n const newMonth =\n (i + (e.key === \"ArrowUp\" ? -1 : 1) + this.props.monthNames.length) %\n this.props.monthNames.length;\n this.monthOptionButtonsRef[newMonth]?.focus();\n break;\n }\n }\n };\n\n renderOptions = (): React.ReactElement[] => {\n // Clear refs to prevent memory leaks on re-render\n this.monthOptionButtonsRef = {};\n\n return this.props.monthNames.map<React.ReactElement>(\n (month: string, i: number): React.ReactElement => (\n <div\n ref={(el) => {\n this.monthOptionButtonsRef[i] = el;\n if (this.isSelectedMonth(i)) {\n el?.focus();\n }\n }}\n role=\"button\"\n tabIndex={0}\n className={\n this.isSelectedMonth(i)\n ? \"react-datepicker__month-option react-datepicker__month-option--selected_month\"\n : \"react-datepicker__month-option\"\n }\n key={month}\n onClick={this.onChange.bind(this, i)}\n onKeyDown={this.handleOptionKeyDown.bind(this, i)}\n aria-selected={this.isSelectedMonth(i) ? \"true\" : undefined}\n >\n {this.isSelectedMonth(i) ? (\n <span className=\"react-datepicker__month-option--selected\">✓</span>\n ) : (\n \"\"\n )}\n {month}\n </div>\n ),\n );\n };\n\n onChange = (month: number): void => this.props.onChange(month);\n\n handleClickOutside = (): void => this.props.onCancel();\n\n render(): React.ReactElement {\n return (\n <ClickOutsideWrapper\n className=\"react-datepicker__month-dropdown\"\n onClickOutside={this.handleClickOutside}\n >\n {this.renderOptions()}\n </ClickOutsideWrapper>\n );\n }\n}\n", "import React, { Component } from \"react\";\n\nimport {\n getMonthShortInLocale,\n getMonthInLocale,\n type Locale,\n} from \"./date_utils\";\nimport MonthDropdownOptions from \"./month_dropdown_options\";\n\ninterface MonthDropdownOptionsProps extends React.ComponentPropsWithoutRef<\n typeof MonthDropdownOptions\n> {}\n\ninterface MonthDropdownProps extends Omit<\n MonthDropdownOptionsProps,\n \"monthNames\" | \"onChange\" | \"onCancel\"\n> {\n dropdownMode: \"scroll\" | \"select\";\n locale?: Locale;\n onChange: (month: number) => void;\n useShortMonthInDropdown?: boolean;\n}\n\ninterface MonthDropdownState {\n dropdownVisible: boolean;\n}\n\nexport default class MonthDropdown extends Component<\n MonthDropdownProps,\n MonthDropdownState\n> {\n state: MonthDropdownState = {\n dropdownVisible: false,\n };\n\n renderSelectOptions = (monthNames: string[]): React.ReactElement[] =>\n monthNames.map<React.ReactElement>(\n (m: string, i: number): React.ReactElement => (\n <option key={m} value={i}>\n {m}\n </option>\n ),\n );\n\n renderSelectMode = (monthNames: string[]): React.ReactElement => (\n <select\n value={this.props.month}\n className=\"react-datepicker__month-select\"\n onChange={(e) => this.onChange(parseInt(e.target.value))}\n >\n {this.renderSelectOptions(monthNames)}\n </select>\n );\n\n renderReadView = (\n visible: boolean,\n monthNames: string[],\n ): React.ReactElement => (\n <button\n key=\"read\"\n type=\"button\"\n style={{ visibility: visible ? \"visible\" : \"hidden\" }}\n className=\"react-datepicker__month-read-view\"\n onClick={this.toggleDropdown}\n >\n <span className=\"react-datepicker__month-read-view--down-arrow\" />\n <span className=\"react-datepicker__month-read-view--selected-month\">\n {monthNames[this.props.month]}\n </span>\n </button>\n );\n\n renderDropdown = (monthNames: string[]): React.ReactElement => (\n <MonthDropdownOptions\n key=\"dropdown\"\n {...this.props}\n monthNames={monthNames}\n onChange={this.onChange}\n onCancel={this.toggleDropdown}\n />\n );\n\n renderScrollMode = (monthNames: string[]): React.ReactElement[] => {\n const { dropdownVisible } = this.state;\n const result = [this.renderReadView(!dropdownVisible, monthNames)];\n if (dropdownVisible) {\n result.unshift(this.renderDropdown(monthNames));\n }\n return result;\n };\n\n onChange = (month: number): void => {\n this.toggleDropdown();\n if (month !== this.props.month) {\n this.props.onChange(month);\n }\n };\n\n toggleDropdown = (): void =>\n this.setState({\n dropdownVisible: !this.state.dropdownVisible,\n });\n\n render(): React.ReactElement {\n const monthNames: string[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(\n this.props.useShortMonthInDropdown\n ? (m: number): string => getMonthShortInLocale(m, this.props.locale)\n : (m: number): string => getMonthInLocale(m, this.props.locale),\n );\n\n let renderedDropdown: React.ReactElement | React.ReactElement[];\n switch (this.props.dropdownMode) {\n case \"scroll\":\n renderedDropdown = this.renderScrollMode(monthNames);\n break;\n case \"select\":\n renderedDropdown = this.renderSelectMode(monthNames);\n break;\n }\n\n return (\n <div\n className={`react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--${this.props.dropdownMode}`}\n >\n {renderedDropdown}\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component } from \"react\";\n\nimport { ClickOutsideWrapper } from \"./click_outside_wrapper\";\nimport {\n addMonths,\n addYears,\n subYears,\n formatDate,\n getStartOfMonth,\n newDate,\n isAfter,\n isSameMonth,\n isSameYear,\n getTime,\n type Locale,\n} from \"./date_utils\";\n\n// Default range: 5 years before and after current date\nconst DEFAULT_YEAR_RANGE = 5;\n\nfunction generateMonthYears(\n minDate: Date | undefined,\n maxDate: Date | undefined,\n currentDate: Date,\n): Date[] {\n const list = [];\n\n // Use defaults if minDate/maxDate not provided\n const effectiveMinDate = minDate ?? subYears(currentDate, DEFAULT_YEAR_RANGE);\n const effectiveMaxDate = maxDate ?? addYears(currentDate, DEFAULT_YEAR_RANGE);\n\n let currDate = getStartOfMonth(effectiveMinDate);\n const lastDate = getStartOfMonth(effectiveMaxDate);\n\n while (!isAfter(currDate, lastDate)) {\n list.push(newDate(currDate));\n\n currDate = addMonths(currDate, 1);\n }\n return list;\n}\n\ninterface MonthYearDropdownOptionsProps {\n minDate?: Date;\n maxDate?: Date;\n onCancel: VoidFunction;\n onChange: (monthYear: number) => void;\n scrollableMonthYearDropdown?: boolean;\n date: Date;\n dateFormat: string;\n locale?: Locale;\n}\n\ninterface MonthYearDropdownOptionsState {\n monthYearsList: Date[];\n}\n\nexport default class MonthYearDropdownOptions extends Component<\n MonthYearDropdownOptionsProps,\n MonthYearDropdownOptionsState\n> {\n constructor(props: MonthYearDropdownOptionsProps) {\n super(props);\n\n this.state = {\n monthYearsList: generateMonthYears(\n this.props.minDate,\n this.props.maxDate,\n this.props.date,\n ),\n };\n }\n\n renderOptions = (): React.ReactElement[] => {\n return this.state.monthYearsList.map<React.ReactElement>(\n (monthYear: Date): React.ReactElement => {\n const monthYearPoint = getTime(monthYear);\n const isSameMonthYear =\n isSameYear(this.props.date, monthYear) &&\n isSameMonth(this.props.date, monthYear);\n\n return (\n <div\n className={\n isSameMonthYear\n ? \"react-datepicker__month-year-option--selected_month-year\"\n : \"react-datepicker__month-year-option\"\n }\n key={monthYearPoint}\n onClick={this.onChange.bind(this, monthYearPoint)}\n aria-selected={isSameMonthYear ? \"true\" : undefined}\n >\n {isSameMonthYear ? (\n <span className=\"react-datepicker__month-year-option--selected\">\n ✓\n </span>\n ) : (\n \"\"\n )}\n {formatDate(monthYear, this.props.dateFormat, this.props.locale)}\n </div>\n );\n },\n );\n };\n\n onChange = (monthYear: number): void => this.props.onChange(monthYear);\n\n handleClickOutside = (): void => {\n this.props.onCancel();\n };\n\n render(): React.ReactElement {\n const dropdownClass = clsx({\n \"react-datepicker__month-year-dropdown\": true,\n \"react-datepicker__month-year-dropdown--scrollable\":\n this.props.scrollableMonthYearDropdown,\n });\n\n return (\n <ClickOutsideWrapper\n className={dropdownClass}\n onClickOutside={this.handleClickOutside}\n >\n {this.renderOptions()}\n </ClickOutsideWrapper>\n );\n }\n}\n", "import React, { Component } from \"react\";\n\nimport {\n addMonths,\n addYears,\n subYears,\n formatDate,\n getStartOfMonth,\n isAfter,\n isSameMonth,\n isSameYear,\n newDate,\n getTime,\n type Locale,\n} from \"./date_utils\";\n\nimport MonthYearDropdownOptions from \"./month_year_dropdown_options\";\n\n// Default range: 5 years before and after current date\nconst DEFAULT_YEAR_RANGE = 5;\n\ninterface MonthYearDropdownOptionsProps extends React.ComponentPropsWithoutRef<\n typeof MonthYearDropdownOptions\n> {}\n\ninterface MonthYearDropdownProps extends Omit<\n MonthYearDropdownOptionsProps,\n \"onChange\" | \"onCancel\"\n> {\n dropdownMode: \"scroll\" | \"select\";\n onChange: (monthYear: Date) => void;\n locale?: Locale;\n}\n\ninterface MonthYearDropdownState {\n dropdownVisible: boolean;\n}\n\nexport default class MonthYearDropdown extends Component<\n MonthYearDropdownProps,\n MonthYearDropdownState\n> {\n state: MonthYearDropdownState = {\n dropdownVisible: false,\n };\n\n renderSelectOptions = (): React.ReactElement[] => {\n // Use defaults if minDate/maxDate not provided\n const minDate =\n this.props.minDate ?? subYears(this.props.date, DEFAULT_YEAR_RANGE);\n const maxDate =\n this.props.maxDate ?? addYears(this.props.date, DEFAULT_YEAR_RANGE);\n\n let currDate = getStartOfMonth(minDate);\n const lastDate = getStartOfMonth(maxDate);\n const options = [];\n\n while (!isAfter(currDate, lastDate)) {\n const timePoint = getTime(currDate);\n options.push(\n <option key={timePoint} value={timePoint}>\n {formatDate(currDate, this.props.dateFormat, this.props.locale)}\n </option>,\n );\n\n currDate = addMonths(currDate, 1);\n }\n\n return options;\n };\n\n onSelectChange = (event: React.ChangeEvent<HTMLSelectElement>): void => {\n this.onChange(parseInt(event.target.value));\n };\n\n renderSelectMode = (): React.ReactElement => (\n <select\n value={getTime(getStartOfMonth(this.props.date))}\n className=\"react-datepicker__month-year-select\"\n onChange={this.onSelectChange}\n >\n {this.renderSelectOptions()}\n </select>\n );\n\n renderReadView = (visible: boolean): React.ReactElement => {\n const yearMonth = formatDate(\n this.props.date,\n this.props.dateFormat,\n this.props.locale,\n );\n\n return (\n <div\n key=\"read\"\n style={{ visibility: visible ? \"visible\" : \"hidden\" }}\n className=\"react-datepicker__month-year-read-view\"\n onClick={this.toggleDropdown}\n >\n <span className=\"react-datepicker__month-year-read-view--down-arrow\" />\n <span className=\"react-datepicker__month-year-read-view--selected-month-year\">\n {yearMonth}\n </span>\n </div>\n );\n };\n\n renderDropdown = (): React.ReactElement => (\n <MonthYearDropdownOptions\n key=\"dropdown\"\n {...this.props}\n onChange={this.onChange}\n onCancel={this.toggleDropdown}\n />\n );\n\n renderScrollMode = (): React.ReactElement[] => {\n const { dropdownVisible } = this.state;\n const result = [this.renderReadView(!dropdownVisible)];\n if (dropdownVisible) {\n result.unshift(this.renderDropdown());\n }\n return result;\n };\n\n onChange = (monthYearPoint: number): void => {\n this.toggleDropdown();\n\n const changedDate = newDate(monthYearPoint);\n\n if (\n isSameYear(this.props.date, changedDate) &&\n isSameMonth(this.props.date, changedDate)\n ) {\n return;\n }\n\n this.props.onChange(changedDate);\n };\n\n toggleDropdown = (): void =>\n this.setState({\n dropdownVisible: !this.state.dropdownVisible,\n });\n\n render(): React.ReactElement {\n let renderedDropdown;\n switch (this.props.dropdownMode) {\n case \"scroll\":\n renderedDropdown = this.renderScrollMode();\n break;\n case \"select\":\n renderedDropdown = this.renderSelectMode();\n break;\n }\n\n return (\n <div\n className={`react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--${this.props.dropdownMode}`}\n >\n {renderedDropdown}\n </div>\n );\n }\n}\n", "import React, { Component } from \"react\";\n\nimport {\n getHours,\n getMinutes,\n newDate,\n getStartOfDay,\n addMinutes,\n formatDate,\n isTimeInDisabledRange,\n isTimeDisabled,\n timesToInjectAfter,\n getHoursInDay,\n isSameMinute,\n getSeconds,\n safeToDate,\n type Locale,\n type TimeFilterOptions,\n KeyType,\n} from \"./date_utils\";\n\ninterface TimeProps extends Pick<\n TimeFilterOptions,\n \"minTime\" | \"maxTime\" | \"excludeTimes\" | \"includeTimes\" | \"filterTime\"\n> {\n format?: string;\n intervals?: number;\n selected?: Date | null;\n openToDate?: Date;\n onChange?: (time: Date) => void;\n timeClassName?: (time: Date) => string;\n todayButton?: React.ReactNode;\n monthRef?: HTMLDivElement;\n timeCaption?: string;\n injectTimes?: Date[];\n handleOnKeyDown?: React.KeyboardEventHandler<HTMLLIElement>;\n locale?: Locale;\n showTimeSelectOnly?: boolean;\n showTimeCaption?: boolean;\n}\n\ninterface TimeState {\n height: number | null;\n}\n\nexport default class Time extends Component<TimeProps, TimeState> {\n static get defaultProps() {\n return {\n intervals: 30,\n todayButton: null,\n timeCaption: \"Time\",\n showTimeCaption: true,\n };\n }\n\n static calcCenterPosition = (\n listHeight: number,\n centerLiRef: HTMLLIElement,\n ): number => {\n return (\n centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2)\n );\n };\n\n private resizeObserver?: ResizeObserver;\n state: TimeState = {\n height: null,\n };\n\n componentDidMount(): void {\n // code to ensure selected time will always be in focus within time window when it first appears\n this.scrollToTheSelectedTime();\n this.observeDatePickerHeightChanges();\n }\n\n componentWillUnmount(): void {\n this.resizeObserver?.disconnect();\n }\n\n private header?: HTMLDivElement;\n\n private list?: HTMLUListElement;\n\n private centerLi?: HTMLLIElement;\n\n private observeDatePickerHeightChanges(): void {\n const { monthRef } = this.props;\n this.updateContainerHeight();\n\n if (monthRef) {\n this.resizeObserver = new ResizeObserver(() => {\n this.updateContainerHeight();\n });\n\n this.resizeObserver.observe(monthRef);\n }\n }\n\n private updateContainerHeight(): void {\n if (this.props.monthRef && this.header) {\n const newHeight =\n this.props.monthRef.clientHeight - this.header.clientHeight;\n // Only update state if height actually changed to prevent infinite resize loops\n if (this.state.height !== newHeight) {\n this.setState({\n height: newHeight,\n });\n }\n }\n }\n\n scrollToTheSelectedTime = (): void => {\n requestAnimationFrame((): void => {\n if (!this.list) return;\n\n this.list.scrollTop =\n (this.centerLi &&\n Time.calcCenterPosition(\n this.props.monthRef\n ? this.props.monthRef.clientHeight -\n (this.header?.clientHeight ?? 0)\n : this.list.clientHeight,\n this.centerLi,\n )) ??\n 0;\n });\n };\n\n handleClick = (time: Date): void => {\n if (\n ((this.props.minTime || this.props.maxTime) &&\n isTimeInDisabledRange(time, this.props)) ||\n ((this.props.excludeTimes ||\n this.props.includeTimes ||\n this.props.filterTime) &&\n isTimeDisabled(time, this.props))\n ) {\n return;\n }\n this.props.onChange?.(time);\n };\n\n isSelectedTime = (time: Date) => {\n const selected = safeToDate(this.props.selected);\n return selected && isSameMinute(selected, time);\n };\n\n isDisabledTime = (time: Date): boolean | undefined =>\n ((this.props.minTime || this.props.maxTime) &&\n isTimeInDisabledRange(time, this.props)) ||\n ((this.props.excludeTimes ||\n this.props.includeTimes ||\n this.props.filterTime) &&\n isTimeDisabled(time, this.props));\n\n liClasses = (time: Date): string => {\n const classes = [\n \"react-datepicker__time-list-item\",\n this.props.timeClassName ? this.props.timeClassName(time) : undefined,\n ];\n\n if (this.isSelectedTime(time)) {\n classes.push(\"react-datepicker__time-list-item--selected\");\n }\n\n if (this.isDisabledTime(time)) {\n classes.push(\"react-datepicker__time-list-item--disabled\");\n }\n\n //convert this.props.intervals and the relevant time to seconds and check if it it's a clean multiple of the interval\n if (\n this.props.injectTimes &&\n (getHours(time) * 3600 + getMinutes(time) * 60 + getSeconds(time)) %\n ((this.props.intervals ?? Time.defaultProps.intervals) * 60) !==\n 0\n ) {\n classes.push(\"react-datepicker__time-list-item--injected\");\n }\n\n return classes.join(\" \");\n };\n\n handleOnKeyDown = (\n event: React.KeyboardEvent<HTMLLIElement>,\n time: Date,\n ): void => {\n if (event.key === KeyType.Space) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n\n if (\n (event.key === KeyType.ArrowUp || event.key === KeyType.ArrowLeft) &&\n event.target instanceof HTMLElement &&\n event.target.previousSibling\n ) {\n event.preventDefault();\n event.target.previousSibling instanceof HTMLElement &&\n event.target.previousSibling.focus();\n }\n if (\n (event.key === KeyType.ArrowDown || event.key === KeyType.ArrowRight) &&\n event.target instanceof HTMLElement &&\n event.target.nextSibling\n ) {\n event.preventDefault();\n event.target.nextSibling instanceof HTMLElement &&\n event.target.nextSibling.focus();\n }\n\n if (event.key === KeyType.Enter) {\n this.handleClick(time);\n }\n this.props.handleOnKeyDown?.(event);\n };\n\n renderTimes = (): React.ReactElement[] => {\n let times: Date[] = [];\n const format =\n typeof this.props.format === \"string\" ? this.props.format : \"p\";\n const intervals = this.props.intervals ?? Time.defaultProps.intervals;\n\n const activeDate =\n safeToDate(this.props.selected) ||\n safeToDate(this.props.openToDate) ||\n newDate();\n\n const base = getStartOfDay(activeDate);\n const sortedInjectTimes =\n this.props.injectTimes &&\n this.props.injectTimes.sort(function (a: Date, b: Date): number {\n return a.getTime() - b.getTime();\n });\n\n const minutesInDay = 60 * getHoursInDay(activeDate);\n const multiplier = minutesInDay / intervals;\n\n for (let i = 0; i < multiplier; i++) {\n const currentTime = addMinutes(base, i * intervals);\n times.push(currentTime);\n\n if (sortedInjectTimes) {\n const timesToInject = timesToInjectAfter(\n base,\n currentTime,\n i,\n intervals,\n sortedInjectTimes,\n );\n times = times.concat(timesToInject);\n }\n }\n\n // Determine which time to focus and scroll into view when component mounts\n const timeToFocus = times.reduce<Date | undefined>((prev, time) => {\n if (time.getTime() <= activeDate.getTime()) {\n return time;\n }\n return prev;\n }, times[0]);\n\n return times.map<React.ReactElement>((time): React.ReactElement => {\n return (\n <li\n key={time.valueOf()}\n onClick={this.handleClick.bind(this, time)}\n className={this.liClasses(time)}\n ref={(li: HTMLLIElement): void => {\n if (time === timeToFocus) {\n this.centerLi = li;\n }\n }}\n onKeyDown={(event: React.KeyboardEvent<HTMLLIElement>): void => {\n this.handleOnKeyDown(event, time);\n }}\n tabIndex={time === timeToFocus ? 0 : -1}\n role=\"option\"\n aria-selected={this.isSelectedTime(time) ? \"true\" : undefined}\n aria-disabled={this.isDisabledTime(time) ? \"true\" : undefined}\n >\n {formatDate(time, format, this.props.locale)}\n </li>\n );\n });\n };\n\n renderTimeCaption = (): React.ReactElement => {\n if (this.props.showTimeCaption === false) {\n return <></>;\n }\n\n return (\n <div\n className={`react-datepicker__header react-datepicker__header--time ${\n this.props.showTimeSelectOnly\n ? \"react-datepicker__header--time--only\"\n : \"\"\n }`}\n ref={(header: HTMLDivElement) => {\n this.header = header;\n }}\n >\n <div className=\"react-datepicker-time__header\">\n {this.props.timeCaption}\n </div>\n </div>\n );\n };\n\n render() {\n const { height } = this.state;\n\n return (\n <div\n className={`react-datepicker__time-container ${\n (this.props.todayButton ?? Time.defaultProps.todayButton)\n ? \"react-datepicker__time-container--with-today-button\"\n : \"\"\n }`}\n >\n {this.renderTimeCaption()}\n <div className=\"react-datepicker__time\">\n <div className=\"react-datepicker__time-box\">\n <ul\n className=\"react-datepicker__time-list\"\n ref={(list: HTMLUListElement) => {\n this.list = list;\n }}\n style={height ? { height } : {}}\n role=\"listbox\"\n aria-label={this.props.timeCaption}\n >\n {this.renderTimes()}\n </ul>\n </div>\n </div>\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component, createRef } from \"react\";\n\nimport {\n type DateFilterOptionsWithDisabled,\n addYears,\n getStartOfYear,\n getYear,\n getYearsPeriod,\n isDayDisabled,\n isDayExcluded,\n isSameDay,\n isSameYear,\n isSpaceKeyDown,\n isYearDisabled,\n isYearInRange,\n newDate,\n setYear,\n subYears,\n KeyType,\n} from \"./date_utils\";\n\nconst VERTICAL_NAVIGATION_OFFSET = 3;\n\ninterface YearProps extends Pick<\n DateFilterOptionsWithDisabled,\n | \"minDate\"\n | \"maxDate\"\n | \"excludeDates\"\n | \"includeDates\"\n | \"filterDate\"\n | \"disabled\"\n> {\n clearSelectingDate?: VoidFunction;\n date?: Date;\n disabledKeyboardNavigation?: boolean;\n onDayClick?: (\n date: Date,\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => void;\n preSelection?: Date | null;\n setPreSelection?: (date?: Date | null) => void;\n selectsMultiple?: boolean;\n selectedDates?: Date[];\n selected?: Date | null;\n inline?: boolean;\n usePointerEvent?: boolean;\n onYearMouseEnter: (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>,\n year: number,\n ) => void;\n onYearMouseLeave: (\n event: React.MouseEvent<HTMLDivElement, MouseEvent>,\n year: number,\n ) => void;\n selectingDate?: Date;\n renderYearContent?: (year: number) => React.ReactNode;\n selectsEnd?: boolean;\n selectsStart?: boolean;\n selectsRange?: boolean;\n startDate?: Date | null;\n endDate?: Date | null;\n yearItemNumber?: number;\n handleOnKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;\n yearClassName?: (date: Date) => string;\n}\n\n/**\n * `Year` is a component that represents a year in a date picker.\n *\n * @class\n * @param {YearProps} props - The properties that define the `Year` component.\n * @property {VoidFunction} [props.clearSelectingDate] - Function to clear the selected date.\n * @property {Date} [props.date] - The currently selected date.\n * @property {boolean} [props.disabledKeyboardNavigation] - If true, keyboard navigation is disabled.\n * @property {Date} [props.endDate] - The end date in a range selection.\n * @property {(date: Date) => void} props.onDayClick - Function to handle day click events.\n * @property {Date} props.preSelection - The date that is currently in focus.\n * @property {(date: Date) => void} props.setPreSelection - Function to set the pre-selected date.\n * @property {{ [key: string]: any }} props.selected - The selected date(s).\n * @property {boolean} props.inline - If true, the date picker is displayed inline.\n * @property {Date} props.maxDate - The maximum selectable date.\n * @property {Date} props.minDate - The minimum selectable date.\n * @property {boolean} props.usePointerEvent - If true, pointer events are used instead of mouse events.\n * @property {(date: Date) => void} props.onYearMouseEnter - Function to handle mouse enter events on a year.\n * @property {(date: Date) => void} props.onYearMouseLeave - Function to handle mouse leave events on a year.\n */\nexport default class Year extends Component<YearProps> {\n constructor(props: YearProps) {\n super(props);\n }\n\n YEAR_REFS = [...Array(this.props.yearItemNumber)].map(() =>\n createRef<HTMLDivElement>(),\n );\n\n isDisabled = (date: Date) =>\n isDayDisabled(date, {\n minDate: this.props.minDate,\n maxDate: this.props.maxDate,\n excludeDates: this.props.excludeDates,\n includeDates: this.props.includeDates,\n filterDate: this.props.filterDate,\n });\n\n isExcluded = (date: Date) =>\n isDayExcluded(date, {\n excludeDates: this.props.excludeDates,\n });\n\n selectingDate = () => this.props.selectingDate ?? this.props.preSelection;\n\n updateFocusOnPaginate = (refIndex: number) => {\n const waitForReRender = () => {\n this.YEAR_REFS[refIndex]?.current?.focus();\n };\n\n window.requestAnimationFrame(waitForReRender);\n };\n\n handleYearClick = (\n day: Date,\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n ) => {\n if (this.props.onDayClick) {\n this.props.onDayClick(day, event);\n }\n };\n\n handleYearNavigation = (newYear: number, newDate: Date) => {\n const { date, yearItemNumber } = this.props;\n if (date === undefined || yearItemNumber === undefined) {\n return;\n }\n\n const { startPeriod } = getYearsPeriod(date, yearItemNumber);\n\n if (this.isDisabled(newDate) || this.isExcluded(newDate)) {\n return;\n }\n this.props.setPreSelection?.(newDate);\n\n if (newYear - startPeriod < 0) {\n this.updateFocusOnPaginate(yearItemNumber - (startPeriod - newYear));\n } else if (newYear - startPeriod >= yearItemNumber) {\n this.updateFocusOnPaginate(\n Math.abs(yearItemNumber - (newYear - startPeriod)),\n );\n } else this.YEAR_REFS[newYear - startPeriod]?.current?.focus();\n };\n\n isSameDay = (y: Date, other: Date) => isSameDay(y, other);\n\n isCurrentYear = (y: number) => y === getYear(newDate());\n\n isRangeStart = (y: number) =>\n this.props.startDate &&\n this.props.endDate &&\n isSameYear(setYear(newDate(), y), this.props.startDate);\n\n isRangeEnd = (y: number) =>\n this.props.startDate &&\n this.props.endDate &&\n isSameYear(setYear(newDate(), y), this.props.endDate);\n\n isInRange = (y: number) =>\n isYearInRange(y, this.props.startDate, this.props.endDate);\n\n isInSelectingRange = (y: number) => {\n const { selectsStart, selectsEnd, selectsRange, startDate, endDate } =\n this.props;\n\n if (\n !(selectsStart || selectsEnd || selectsRange) ||\n !this.selectingDate()\n ) {\n return false;\n }\n if (selectsStart && endDate) {\n return isYearInRange(y, this.selectingDate(), endDate);\n }\n if (selectsEnd && startDate) {\n return isYearInRange(y, startDate, this.selectingDate());\n }\n if (selectsRange && startDate && !endDate) {\n return isYearInRange(y, startDate, this.selectingDate());\n }\n return false;\n };\n\n isSelectingRangeStart = (y: number) => {\n if (!this.isInSelectingRange(y)) {\n return false;\n }\n\n const { startDate, selectsStart } = this.props;\n const _year = setYear(newDate(), y);\n\n if (selectsStart) {\n return isSameYear(_year, this.selectingDate() ?? null);\n }\n return isSameYear(_year, startDate ?? null);\n };\n\n isSelectingRangeEnd = (y: number) => {\n if (!this.isInSelectingRange(y)) {\n return false;\n }\n\n const { endDate, selectsEnd, selectsRange } = this.props;\n const _year = setYear(newDate(), y);\n\n if (selectsEnd || selectsRange) {\n return isSameYear(_year, this.selectingDate() ?? null);\n }\n return isSameYear(_year, endDate ?? null);\n };\n\n isKeyboardSelected = (y: number) => {\n if (\n this.props.disabledKeyboardNavigation ||\n this.props.date === undefined ||\n this.props.preSelection == null\n ) {\n return;\n }\n\n const {\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n selected,\n } = this.props;\n\n const date = getStartOfYear(setYear(this.props.date, y));\n const isDisabled =\n (minDate || maxDate || excludeDates || includeDates || filterDate) &&\n isYearDisabled(y, this.props);\n\n const isSelectedDay =\n !!selected && isSameDay(date, getStartOfYear(selected));\n const isKeyboardSelectedDay = isSameDay(\n date,\n getStartOfYear(this.props.preSelection),\n );\n\n return (\n !this.props.inline &&\n !isSelectedDay &&\n isKeyboardSelectedDay &&\n !isDisabled\n );\n };\n\n isSelectedYear = (year: number) => {\n const { selectsMultiple, selected, selectedDates } = this.props;\n\n if (selectsMultiple) {\n return selectedDates?.some((date) => year === getYear(date));\n }\n return !!selected && year === getYear(selected);\n };\n\n onYearClick = (\n event:\n | React.MouseEvent<HTMLDivElement, MouseEvent>\n | React.KeyboardEvent<HTMLDivElement>,\n y: number,\n ) => {\n const { date } = this.props;\n if (date === undefined) {\n return;\n }\n this.handleYearClick(getStartOfYear(setYear(date, y)), event);\n };\n\n onYearKeyDown = (event: React.KeyboardEvent<HTMLDivElement>, y: number) => {\n const { key } = event;\n const { date, yearItemNumber, handleOnKeyDown } = this.props;\n\n if (key !== KeyType.Tab) {\n // preventDefault on tab event blocks focus change\n event.preventDefault();\n }\n\n if (!this.props.disabledKeyboardNavigation) {\n switch (key) {\n case KeyType.Enter:\n if (this.props.selected == null) {\n break;\n }\n this.onYearClick(event, y);\n this.props.setPreSelection?.(this.props.selected);\n break;\n case KeyType.ArrowRight:\n if (this.props.preSelection == null) {\n break;\n }\n this.handleYearNavigation(\n y + 1,\n addYears(this.props.preSelection, 1),\n );\n break;\n case KeyType.ArrowLeft:\n if (this.props.preSelection == null) {\n break;\n }\n this.handleYearNavigation(\n y - 1,\n subYears(this.props.preSelection, 1),\n );\n break;\n case KeyType.ArrowUp: {\n if (\n date === undefined ||\n yearItemNumber === undefined ||\n this.props.preSelection == null\n ) {\n break;\n }\n const { startPeriod } = getYearsPeriod(date, yearItemNumber);\n let offset = VERTICAL_NAVIGATION_OFFSET;\n let newYear = y - offset;\n\n if (newYear < startPeriod) {\n const leftOverOffset = yearItemNumber % offset;\n\n if (y >= startPeriod && y < startPeriod + leftOverOffset) {\n offset = leftOverOffset;\n } else {\n offset += leftOverOffset;\n }\n\n newYear = y - offset;\n }\n\n this.handleYearNavigation(\n newYear,\n subYears(this.props.preSelection, offset),\n );\n break;\n }\n case KeyType.ArrowDown: {\n if (\n date === undefined ||\n yearItemNumber === undefined ||\n this.props.preSelection == null\n ) {\n break;\n }\n const { endPeriod } = getYearsPeriod(date, yearItemNumber);\n let offset = VERTICAL_NAVIGATION_OFFSET;\n let newYear = y + offset;\n\n if (newYear > endPeriod) {\n const leftOverOffset = yearItemNumber % offset;\n\n if (y <= endPeriod && y > endPeriod - leftOverOffset) {\n offset = leftOverOffset;\n } else {\n offset += leftOverOffset;\n }\n\n newYear = y + offset;\n }\n\n this.handleYearNavigation(\n newYear,\n addYears(this.props.preSelection, offset),\n );\n break;\n }\n }\n }\n\n handleOnKeyDown && handleOnKeyDown(event);\n };\n\n getYearClassNames = (y: number) => {\n const {\n date,\n disabled,\n minDate,\n maxDate,\n excludeDates,\n includeDates,\n filterDate,\n yearClassName,\n } = this.props;\n\n return clsx(\n \"react-datepicker__year-text\",\n `react-datepicker__year-${y}`,\n date ? yearClassName?.(setYear(date, y)) : undefined,\n {\n \"react-datepicker__year-text--selected\": this.isSelectedYear(y),\n \"react-datepicker__year-text--disabled\":\n (minDate ||\n maxDate ||\n excludeDates ||\n includeDates ||\n filterDate ||\n disabled) &&\n isYearDisabled(y, this.props),\n \"react-datepicker__year-text--keyboard-selected\":\n this.isKeyboardSelected(y),\n \"react-datepicker__year-text--range-start\": this.isRangeStart(y),\n \"react-datepicker__year-text--range-end\": this.isRangeEnd(y),\n \"react-datepicker__year-text--in-range\": this.isInRange(y),\n \"react-datepicker__year-text--in-selecting-range\":\n this.isInSelectingRange(y),\n \"react-datepicker__year-text--selecting-range-start\":\n this.isSelectingRangeStart(y),\n \"react-datepicker__year-text--selecting-range-end\":\n this.isSelectingRangeEnd(y),\n \"react-datepicker__year-text--today\": this.isCurrentYear(y),\n },\n );\n };\n\n getYearTabIndex = (y: number) => {\n if (\n this.props.disabledKeyboardNavigation ||\n this.props.preSelection == null\n ) {\n return \"-1\";\n }\n const preSelected = getYear(this.props.preSelection);\n const isPreSelectedYearDisabled = isYearDisabled(y, this.props);\n\n return y === preSelected && !isPreSelectedYearDisabled ? \"0\" : \"-1\";\n };\n\n getYearContent = (y: number) => {\n return this.props.renderYearContent ? this.props.renderYearContent(y) : y;\n };\n\n render() {\n const yearsList = [];\n const { date, yearItemNumber, onYearMouseEnter, onYearMouseLeave } =\n this.props;\n if (date === undefined) {\n return null;\n }\n const { startPeriod, endPeriod } = getYearsPeriod(date, yearItemNumber);\n\n for (let y = startPeriod; y <= endPeriod; y++) {\n yearsList.push(\n <div\n ref={this.YEAR_REFS[y - startPeriod]}\n onClick={(event) => {\n this.onYearClick(event, y);\n }}\n onKeyDown={(event) => {\n if (isSpaceKeyDown(event)) {\n event.preventDefault();\n event.key = KeyType.Enter;\n }\n\n this.onYearKeyDown(event, y);\n }}\n tabIndex={Number(this.getYearTabIndex(y))}\n className={this.getYearClassNames(y)}\n onMouseEnter={\n !this.props.usePointerEvent\n ? (event) => onYearMouseEnter(event, y)\n : undefined\n }\n onPointerEnter={\n this.props.usePointerEvent\n ? (event) => onYearMouseEnter(event, y)\n : undefined\n }\n onMouseLeave={\n !this.props.usePointerEvent\n ? (event) => onYearMouseLeave(event, y)\n : undefined\n }\n onPointerLeave={\n this.props.usePointerEvent\n ? (event) => onYearMouseLeave(event, y)\n : undefined\n }\n key={y}\n aria-current={this.isCurrentYear(y) ? \"date\" : undefined}\n >\n {this.getYearContent(y)}\n </div>,\n );\n }\n\n return (\n <div className=\"react-datepicker__year\">\n <div\n className=\"react-datepicker__year-wrapper\"\n onMouseLeave={\n !this.props.usePointerEvent\n ? this.props.clearSelectingDate\n : undefined\n }\n onPointerLeave={\n this.props.usePointerEvent\n ? this.props.clearSelectingDate\n : undefined\n }\n >\n {yearsList}\n </div>\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport React, { Component, createRef } from \"react\";\n\nimport { ClickOutsideWrapper } from \"./click_outside_wrapper\";\nimport { getYear } from \"./date_utils\";\n\nfunction generateYears(\n year: number,\n noOfYear: number,\n minDate?: Date,\n maxDate?: Date,\n): number[] {\n const list: number[] = [];\n for (let i = 0; i < 2 * noOfYear + 1; i++) {\n const newYear = year + noOfYear - i;\n let isInRange = true;\n\n if (minDate) {\n isInRange = getYear(minDate) <= newYear;\n }\n\n if (maxDate && isInRange) {\n isInRange = getYear(maxDate) >= newYear;\n }\n\n if (isInRange) {\n list.push(newYear);\n }\n }\n\n return list;\n}\n\ninterface YearDropdownOptionsProps {\n minDate?: Date;\n maxDate?: Date;\n onChange: (year: number) => void;\n onCancel: VoidFunction;\n scrollableYearDropdown?: boolean;\n year: number;\n yearDropdownItemNumber?: number;\n}\n\ninterface YearDropdownOptionsState {\n yearsList: number[];\n}\n\nexport default class YearDropdownOptions extends Component<\n YearDropdownOptionsProps,\n YearDropdownOptionsState\n> {\n constructor(props: YearDropdownOptionsProps) {\n super(props);\n const { yearDropdownItemNumber, scrollableYearDropdown } = props;\n const noOfYear =\n yearDropdownItemNumber || (scrollableYearDropdown ? 10 : 5);\n\n this.state = {\n yearsList: generateYears(\n this.props.year,\n noOfYear,\n this.props.minDate,\n this.props.maxDate,\n ),\n };\n this.dropdownRef = createRef<HTMLDivElement>();\n }\n\n componentDidMount(): void {\n const dropdownCurrent = this.dropdownRef.current;\n\n if (dropdownCurrent) {\n // Get array from HTMLCollection\n const dropdownCurrentChildren = dropdownCurrent.children\n ? Array.from(dropdownCurrent.children)\n : null;\n const selectedYearOptionEl = dropdownCurrentChildren\n ? dropdownCurrentChildren.find((childEl) => childEl.ariaSelected)\n : null;\n\n dropdownCurrent.scrollTop =\n selectedYearOptionEl && selectedYearOptionEl instanceof HTMLElement\n ? selectedYearOptionEl.offsetTop +\n (selectedYearOptionEl.clientHeight - dropdownCurrent.clientHeight) /\n 2\n : (dropdownCurrent.scrollHeight - dropdownCurrent.clientHeight) / 2;\n }\n }\n\n dropdownRef: React.RefObject<HTMLDivElement | null>;\n yearOptionButtonsRef: Record<number, HTMLDivElement | null> = {};\n\n handleOptionKeyDown = (year: number, e: React.KeyboardEvent): void => {\n switch (e.key) {\n case \"Enter\":\n e.preventDefault();\n this.onChange(year);\n break;\n case \"Escape\":\n e.preventDefault();\n this.props.onCancel();\n break;\n case \"ArrowUp\":\n case \"ArrowDown\": {\n e.preventDefault();\n const newYear = year + (e.key === \"ArrowUp\" ? 1 : -1);\n // Add bounds checking to ensure the year exists in our refs\n if (this.yearOptionButtonsRef[newYear]) {\n this.yearOptionButtonsRef[newYear]?.focus();\n }\n break;\n }\n }\n };\n\n renderOptions = (): React.ReactElement[] => {\n // Clear refs to prevent memory leaks on re-render\n this.yearOptionButtonsRef = {};\n\n const selectedYear = this.props.year;\n const options = this.state.yearsList.map((year) => (\n <div\n ref={(el) => {\n this.yearOptionButtonsRef[year] = el;\n if (year === selectedYear) {\n el?.focus();\n }\n }}\n role=\"button\"\n tabIndex={0}\n className={\n selectedYear === year\n ? \"react-datepicker__year-option react-datepicker__year-option--selected_year\"\n : \"react-datepicker__year-option\"\n }\n key={year}\n onClick={this.onChange.bind(this, year)}\n onKeyDown={this.handleOptionKeyDown.bind(this, year)}\n aria-selected={selectedYear === year ? \"true\" : undefined}\n >\n {selectedYear === year ? (\n <span className=\"react-datepicker__year-option--selected\">✓</span>\n ) : (\n \"\"\n )}\n {year}\n </div>\n ));\n\n const minYear = this.props.minDate ? getYear(this.props.minDate) : null;\n const maxYear = this.props.maxDate ? getYear(this.props.maxDate) : null;\n\n if (!maxYear || !this.state.yearsList.find((year) => year === maxYear)) {\n options.unshift(\n <div\n className=\"react-datepicker__year-option\"\n key={\"upcoming\"}\n onClick={this.incrementYears}\n >\n <a className=\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming\" />\n </div>,\n );\n }\n\n if (!minYear || !this.state.yearsList.find((year) => year === minYear)) {\n options.push(\n <div\n className=\"react-datepicker__year-option\"\n key={\"previous\"}\n onClick={this.decrementYears}\n >\n <a className=\"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous\" />\n </div>,\n );\n }\n\n return options;\n };\n\n onChange = (year: number): void => {\n this.props.onChange(year);\n };\n\n handleClickOutside = (): void => {\n this.props.onCancel();\n };\n\n shiftYears = (amount: number): void => {\n const years = this.state.yearsList.map(function (year) {\n return year + amount;\n });\n\n this.setState({\n yearsList: years,\n });\n };\n\n incrementYears = (): void => {\n return this.shiftYears(1);\n };\n\n decrementYears = (): void => {\n return this.shiftYears(-1);\n };\n\n render() {\n const dropdownClass = clsx({\n \"react-datepicker__year-dropdown\": true,\n \"react-datepicker__year-dropdown--scrollable\":\n this.props.scrollableYearDropdown,\n });\n\n return (\n <ClickOutsideWrapper\n className={dropdownClass}\n containerRef={this.dropdownRef}\n onClickOutside={this.handleClickOutside}\n >\n {this.renderOptions()}\n </ClickOutsideWrapper>\n );\n }\n}\n", "import React, { Component } from \"react\";\n\nimport { getYear } from \"./date_utils\";\nimport YearDropdownOptions from \"./year_dropdown_options\";\n\ninterface YearDropdownOptionsProps extends React.ComponentPropsWithoutRef<\n typeof YearDropdownOptions\n> {}\n\ninterface YearDropdownProps extends Omit<\n YearDropdownOptionsProps,\n \"onChange\" | \"onCancel\"\n> {\n adjustDateOnChange?: boolean;\n dropdownMode: \"scroll\" | \"select\";\n onChange: (year: number) => void;\n date: Date;\n onSelect?: (date: Date, event?: React.MouseEvent<HTMLButtonElement>) => void;\n setOpen?: (open: boolean) => void;\n}\n\ninterface YearDropdownState {\n dropdownVisible: boolean;\n}\n\nexport default class YearDropdown extends Component<\n YearDropdownProps,\n YearDropdownState\n> {\n state: YearDropdownState = {\n dropdownVisible: false,\n };\n\n renderSelectOptions = (): React.ReactElement[] => {\n const minYear: number = this.props.minDate\n ? getYear(this.props.minDate)\n : 1900;\n const maxYear: number = this.props.maxDate\n ? getYear(this.props.maxDate)\n : 2100;\n\n const options: React.ReactElement[] = [];\n for (let i = minYear; i <= maxYear; i++) {\n options.push(\n <option key={i} value={i}>\n {i}\n </option>,\n );\n }\n return options;\n };\n\n onSelectChange = (event: React.ChangeEvent<HTMLSelectElement>): void => {\n this.onChange(parseInt(event.target.value));\n };\n\n renderSelectMode = (): React.ReactElement => (\n <select\n value={this.props.year}\n className=\"react-datepicker__year-select\"\n onChange={this.onSelectChange}\n >\n {this.renderSelectOptions()}\n </select>\n );\n\n renderReadView = (visible: boolean): React.ReactElement => (\n <button\n key=\"read\"\n type=\"button\"\n style={{ visibility: visible ? \"visible\" : \"hidden\" }}\n className=\"react-datepicker__year-read-view\"\n onClick={this.toggleDropdown}\n >\n <span className=\"react-datepicker__year-read-view--down-arrow\" />\n <span className=\"react-datepicker__year-read-view--selected-year\">\n {this.props.year}\n </span>\n </button>\n );\n\n renderDropdown = (): React.ReactElement => (\n <YearDropdownOptions\n key=\"dropdown\"\n {...this.props}\n onChange={this.onChange}\n onCancel={this.toggleDropdown}\n />\n );\n\n renderScrollMode = (): React.ReactElement[] => {\n const { dropdownVisible } = this.state;\n const result = [this.renderReadView(!dropdownVisible)];\n if (dropdownVisible) {\n result.unshift(this.renderDropdown());\n }\n return result;\n };\n\n onChange = (year: number): void => {\n this.toggleDropdown();\n if (year === this.props.year) return;\n this.props.onChange(year);\n };\n\n toggleDropdown = (event?: React.MouseEvent<HTMLButtonElement>): void => {\n this.setState(\n {\n dropdownVisible: !this.state.dropdownVisible,\n },\n () => {\n if (this.props.adjustDateOnChange) {\n this.handleYearChange(this.props.date, event);\n }\n },\n );\n };\n\n handleYearChange = (\n date: Date,\n event?: React.MouseEvent<HTMLButtonElement>,\n ): void => {\n this.onSelect?.(date, event);\n this.setOpen();\n };\n\n onSelect = (\n date: Date,\n event?: React.MouseEvent<HTMLButtonElement>,\n ): void => {\n this.props.onSelect?.(date, event);\n };\n\n setOpen = (): void => {\n this.props.setOpen?.(true);\n };\n\n render(): React.ReactElement {\n let renderedDropdown;\n switch (this.props.dropdownMode) {\n case \"scroll\":\n renderedDropdown = this.renderScrollMode();\n break;\n case \"select\":\n renderedDropdown = this.renderSelectMode();\n break;\n }\n\n return (\n <div\n className={`react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--${this.props.dropdownMode}`}\n >\n {renderedDropdown}\n </div>\n );\n }\n}\n", "import { clsx } from \"clsx\";\nimport { differenceInDays } from \"date-fns\";\nimport React, { Component, createRef } from \"react\";\n\nimport CalendarContainer from \"./calendar_container\";\nimport { ClickOutsideWrapper } from \"./click_outside_wrapper\";\nimport {\n newDate,\n setMonth,\n getMonth,\n addMonths,\n subMonths,\n getStartOfWeek,\n getStartOfToday,\n addDays,\n formatDate,\n setYear,\n getYear,\n isBefore,\n addYears,\n subYears,\n isAfter,\n getFormattedWeekdayInLocale,\n getWeekdayShortInLocale,\n getWeekdayMinInLocale,\n isSameDay,\n isSameMonth,\n monthDisabledBefore,\n monthDisabledAfter,\n yearDisabledBefore,\n yearDisabledAfter,\n yearsDisabledAfter,\n yearsDisabledBefore,\n quarterDisabledBefore,\n quarterDisabledAfter,\n getEffectiveMinDate,\n getEffectiveMaxDate,\n addZero,\n isValid,\n getYearsPeriod,\n DEFAULT_YEAR_ITEM_NUMBER,\n getMonthInLocale,\n type Locale,\n getStartOfMonth,\n getEndOfMonth,\n isDayDisabled,\n} from \"./date_utils\";\nimport InputTime from \"./input_time\";\nimport Month from \"./month\";\nimport MonthDropdown from \"./month_dropdown\";\nimport MonthYearDropdown from \"./month_year_dropdown\";\nimport Time from \"./time\";\nimport Year from \"./year\";\nimport YearDropdown from \"./year_dropdown\";\n\nimport type { ClickOutsideHandler } from \"./click_outside_wrapper\";\nimport type { Day } from \"date-fns\";\n\ninterface YearDropdownProps extends React.ComponentPropsWithoutRef<\n typeof YearDropdown\n> {}\n\ninterface MonthDropdownProps extends React.ComponentPropsWithoutRef<\n typeof MonthDropdown\n> {}\n\ninterface MonthYearDropdownProps extends React.ComponentPropsWithoutRef<\n typeof MonthYearDropdown\n> {}\n\ninterface YearProps extends React.ComponentPropsWithoutRef<typeof Year> {}\n\ninterface MonthProps extends React.ComponentPropsWithoutRef<typeof Month> {}\n\ninterface TimeProps extends React.ComponentPropsWithoutRef<typeof Time> {}\n\ninterface InputTimeProps extends React.ComponentPropsWithoutRef<\n typeof InputTime\n> {}\n\nconst DROPDOWN_FOCUS_CLASSNAMES = [\n \"react-datepicker__year-select\",\n \"react-datepicker__month-select\",\n \"react-datepicker__month-year-select\",\n];\n\nexport const OUTSIDE_CLICK_IGNORE_CLASS =\n \"react-datepicker-ignore-onclickoutside\";\n\nconst isDropdownSelect = (element: HTMLDivElement) => {\n const classNames = (element.className || \"\").split(/\\s+/);\n return DROPDOWN_FOCUS_CLASSNAMES.some(\n (testClassname) => classNames.indexOf(testClassname) >= 0,\n );\n};\n\nexport interface ReactDatePickerCustomHeaderProps {\n date: CalendarState[\"date\"];\n customHeaderCount: number;\n monthDate: Date;\n changeMonth: (month: number) => void;\n changeYear: (year: number) => void;\n decreaseMonth: VoidFunction;\n increaseMonth: VoidFunction;\n decreaseYear: VoidFunction;\n increaseYear: VoidFunction;\n prevMonthButtonDisabled: boolean;\n nextMonthButtonDisabled: boolean;\n prevYearButtonDisabled: boolean;\n nextYearButtonDisabled: boolean;\n visibleYearsRange?: {\n startYear: number;\n endYear: number;\n };\n}\n\nexport interface ReactDatePickerCustomDayNameProps {\n day: Date;\n shortName: string;\n fullName: string;\n locale?: Locale;\n customDayNameCount: number;\n}\n\ntype CalendarProps = React.PropsWithChildren<\n Omit<\n YearDropdownProps,\n \"date\" | \"onChange\" | \"year\" | \"minDate\" | \"maxDate\"\n > &\n Omit<MonthDropdownProps, \"month\" | \"onChange\"> &\n Omit<MonthYearDropdownProps, \"date\" | \"onChange\" | \"minDate\" | \"maxDate\"> &\n Omit<\n YearProps,\n | \"onDayClick\"\n | \"selectingDate\"\n | \"clearSelectingDate\"\n | \"onYearMouseEnter\"\n | \"onYearMouseLeave\"\n | \"minDate\"\n | \"maxDate\"\n > &\n Omit<\n MonthProps,\n | \"ariaLabelPrefix\"\n | \"onChange\"\n | \"day\"\n | \"onDayClick\"\n | \"handleOnKeyDown\"\n | \"handleOnMonthKeyDown\"\n | \"onDayMouseEnter\"\n | \"onMouseLeave\"\n | \"orderInDisplay\"\n | \"monthShowsDuplicateDaysEnd\"\n | \"monthShowsDuplicateDaysStart\"\n | \"minDate\"\n | \"maxDate\"\n > &\n Omit<TimeProps, \"onChange\" | \"format\" | \"intervals\" | \"monthRef\"> &\n Omit<InputTimeProps, \"date\" | \"timeString\" | \"onChange\"> & {\n selectsRange?: boolean;\n startDate?: Date | null;\n endDate?: Date | null;\n className?: string;\n container?: React.ElementType;\n showYearPicker?: boolean;\n showMonthYearPicker?: boolean;\n showQuarterYearPicker?: boolean;\n showTimeSelect?: boolean;\n showTimeInput?: boolean;\n showYearDropdown?: boolean;\n showMonthDropdown?: boolean;\n yearItemNumber?: number;\n useWeekdaysShort?: boolean;\n forceShowMonthNavigation?: boolean;\n showDisabledMonthNavigation?: boolean;\n formatWeekDay?: (date: string) => string;\n onDropdownFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;\n calendarStartDay?: Day;\n weekDayClassName?: (date: Date) => string;\n onMonthChange?: (date: Date) => void;\n onYearChange?: (date: Date) => void;\n onDayMouseEnter?: (date: Date) => void;\n onMonthMouseLeave?: VoidFunction;\n weekLabel?: string;\n onClickOutside: ClickOutsideHandler;\n outsideClickIgnoreClass?: string;\n previousMonthButtonLabel?: React.ReactNode;\n previousYearButtonLabel?: React.ReactNode;\n previousMonthAriaLabel?: string;\n previousYearAriaLabel?: string;\n nextMonthButtonLabel?: React.ReactNode;\n nextYearButtonLabel?: React.ReactNode;\n nextMonthAriaLabel?: string;\n nextYearAriaLabel?: string;\n showPreviousMonths?: boolean;\n monthsShown?: number;\n monthSelectedIn?: number;\n onMonthSelectedInChange?: (monthSelectedIn: number) => void;\n onSelect: (\n day: Date,\n event?:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n monthSelectedIn?: number,\n ) => void;\n renderCustomHeader?: (\n props: ReactDatePickerCustomHeaderProps,\n ) => React.ReactElement;\n renderCustomDayName?: (\n props: ReactDatePickerCustomDayNameProps,\n ) => React.ReactNode;\n monthHeaderPosition?: \"top\" | \"middle\" | \"bottom\";\n onYearMouseEnter?: YearProps[\"onYearMouseEnter\"];\n onYearMouseLeave?: YearProps[\"onYearMouseLeave\"];\n monthAriaLabelPrefix?: MonthProps[\"ariaLabelPrefix\"];\n handleOnDayKeyDown?: MonthProps[\"handleOnKeyDown\"];\n handleOnKeyDown?: (\n event:\n | React.KeyboardEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLLIElement>\n | React.KeyboardEvent<HTMLButtonElement>,\n ) => void;\n onTimeChange?: (time: Date, modifyDateType?: \"start\" | \"end\") => void;\n timeFormat?: TimeProps[\"format\"];\n timeIntervals?: TimeProps[\"intervals\"];\n } & (\n | ({\n showMonthYearDropdown: true;\n } & Pick<YearDropdownProps, \"maxDate\" | \"minDate\">)\n | ({\n showMonthYearDropdown?: never;\n } & Pick<YearDropdownProps, \"maxDate\" | \"minDate\"> &\n Pick<YearProps, \"maxDate\" | \"minDate\"> &\n Pick<MonthProps, \"maxDate\" | \"minDate\">)\n )\n>;\n\ninterface CalendarState\n extends Pick<YearProps, \"selectingDate\">, Pick<MonthProps, \"selectingDate\"> {\n date: Required<YearProps>[\"date\"];\n monthContainer: TimeProps[\"monthRef\"];\n isRenderAriaLiveMessage: boolean;\n}\n\nexport default class Calendar extends Component<CalendarProps, CalendarState> {\n static get defaultProps() {\n return {\n monthsShown: 1,\n forceShowMonthNavigation: false,\n outsideClickIgnoreClass: OUTSIDE_CLICK_IGNORE_CLASS,\n timeCaption: \"Time\",\n previousYearButtonLabel: \"Previous Year\",\n nextYearButtonLabel: \"Next Year\",\n previousMonthButtonLabel: \"Previous Month\",\n nextMonthButtonLabel: \"Next Month\",\n yearItemNumber: DEFAULT_YEAR_ITEM_NUMBER,\n monthHeaderPosition: \"top\",\n };\n }\n\n constructor(props: CalendarProps) {\n super(props);\n\n this.containerRef = createRef<HTMLDivElement>();\n\n this.state = {\n date: this.getDateInView(),\n selectingDate: undefined,\n monthContainer: undefined,\n isRenderAriaLiveMessage: false,\n };\n }\n\n componentDidMount() {\n // monthContainer height is needed in time component\n // to determine the height for the ul in the time component\n // setState here so height is given after final component\n // layout is rendered\n if (this.props.showTimeSelect) {\n this.assignMonthContainer = ((): void => {\n this.setState({ monthContainer: this.monthContainer });\n })();\n }\n }\n\n componentDidUpdate(prevProps: CalendarProps) {\n if (\n this.props.preSelection &&\n isValid(this.props.preSelection) &&\n (!isSameDay(this.props.preSelection, prevProps.preSelection) ||\n this.props.monthSelectedIn !== prevProps.monthSelectedIn)\n ) {\n const hasMonthChanged = !isSameMonth(\n this.state.date,\n this.props.preSelection,\n );\n this.setState(\n {\n date: this.props.preSelection,\n },\n () => hasMonthChanged && this.handleCustomMonthChange(this.state.date),\n );\n } else if (\n this.props.openToDate &&\n !isSameDay(this.props.openToDate, prevProps.openToDate)\n ) {\n this.setState({\n date: this.props.openToDate,\n });\n }\n }\n\n containerRef: React.RefObject<HTMLDivElement | null>;\n\n monthContainer: CalendarState[\"monthContainer\"] = undefined;\n\n assignMonthContainer: void | undefined;\n\n handleClickOutside = (event: MouseEvent): void => {\n this.props.onClickOutside(event);\n };\n\n setClickOutsideRef = (): HTMLDivElement | null => {\n return this.containerRef.current;\n };\n\n handleDropdownFocus = (event: React.FocusEvent<HTMLDivElement>): void => {\n if (isDropdownSelect(event.target)) {\n this.props.onDropdownFocus?.(event);\n }\n };\n\n getDateInView = (): Date => {\n const { preSelection, selected, openToDate } = this.props;\n const minDate = getEffectiveMinDate(this.props);\n const maxDate = getEffectiveMaxDate(this.props);\n const current = newDate();\n const initialDate = openToDate || selected || preSelection;\n if (initialDate) {\n return initialDate;\n } else {\n if (minDate && isBefore(current, minDate)) {\n return minDate;\n } else if (maxDate && isAfter(current, maxDate)) {\n return maxDate;\n }\n }\n return current;\n };\n\n increaseMonth = (): void => {\n this.setState(\n ({ date }) => ({\n date: addMonths(date, 1),\n }),\n () => this.handleMonthChange(this.state.date),\n );\n };\n\n decreaseMonth = (): void => {\n this.setState(\n ({ date }) => ({\n date: subMonths(date, 1),\n }),\n () => this.handleMonthChange(this.state.date),\n );\n };\n\n handleDayClick = (\n day: Date,\n event:\n | React.MouseEvent<HTMLDivElement>\n | React.KeyboardEvent<HTMLDivElement>,\n monthSelectedIn?: number,\n ): void => {\n this.props.onSelect(day, event, monthSelectedIn);\n this.props.setPreSelection && this.props.setPreSelection(day);\n };\n\n handleDayMouseEnter = (day: Date): void => {\n this.setState({ selectingDate: day });\n this.props.onDayMouseEnter && this.props.onDayMouseEnter(day);\n };\n\n handleMonthMouseLeave = (): void => {\n this.setState({ selectingDate: undefined });\n this.props.onMonthMouseLeave && this.props.onMonthMouseLeave();\n };\n\n handleYearMouseEnter = (\n event: React.MouseEvent<HTMLDivElement>,\n year: number,\n ): void => {\n this.setState({ selectingDate: setYear(newDate(), year) });\n !!this.props.onYearMouseEnter && this.props.onYearMouseEnter(event, year);\n };\n\n handleYearMouseLeave = (\n event: React.MouseEvent<HTMLDivElement>,\n year: number,\n ): void => {\n !!this.props.onYearMouseLeave && this.props.onYearMouseLeave(event, year);\n };\n\n handleYearChange = (date: Date): void => {\n this.props.onYearChange?.(date);\n this.setState({ isRenderAriaLiveMessage: true });\n if (this.props.adjustDateOnChange) {\n this.props.onSelect(date);\n this.props.setOpen?.(true);\n }\n\n this.props.setPreSelection && this.props.setPreSelection(date);\n };\n\n getEnabledPreSelectionDateForMonth = (date: Date) => {\n if (!isDayDisabled(date, this.props)) {\n return date;\n }\n\n const startOfMonth = getStartOfMonth(date);\n const endOfMonth = getEndOfMonth(date);\n\n const totalDays = differenceInDays(endOfMonth, startOfMonth);\n\n let preSelectedDate = null;\n\n for (let dayIdx = 0; dayIdx <= totalDays; dayIdx++) {\n const processingDate = addDays(startOfMonth, dayIdx);\n\n if (!isDayDisabled(processingDate, this.props)) {\n preSelectedDate = processingDate;\n break;\n }\n }\n\n return preSelectedDate;\n };\n\n handleMonthChange = (date: Date): void => {\n const enabledPreSelectionDate =\n this.getEnabledPreSelectionDateForMonth(date) ?? date;\n\n this.handleCustomMonthChange(enabledPreSelectionDate);\n if (this.props.adjustDateOnChange) {\n this.props.onSelect(enabledPreSelectionDate);\n this.props.setOpen?.(true);\n }\n\n this.props.setPreSelection &&\n this.props.setPreSelection(enabledPreSelectionDate);\n };\n\n handleCustomMonthChange = (date: Date): void => {\n this.props.onMonthChange?.(date);\n this.setState({ isRenderAriaLiveMessage: true });\n };\n\n handleMonthYearChange = (date: Date): void => {\n this.handleYearChange(date);\n this.handleMonthChange(date);\n };\n\n changeYear = (year: number): void => {\n this.setState(\n ({ date }) => ({\n date: setYear(date, Number(year)),\n }),\n () => this.handleYearChange(this.state.date),\n );\n };\n\n changeMonth = (month: number): void => {\n this.setState(\n ({ date }) => ({\n date: setMonth(date, Number(month)),\n }),\n () => {\n this.handleMonthChange(this.state.date);\n // Reset monthSelectedIn to 0 so the target month appears in the leftmost position\n // This ensures consistent behavior when using changeMonth in custom headers\n this.props.onMonthSelectedInChange?.(0);\n },\n );\n };\n\n changeMonthYear = (monthYear: Date): void => {\n this.setState(\n ({ date }) => ({\n date: setYear(setMonth(date, getMonth(monthYear)), getYear(monthYear)),\n }),\n () => this.handleMonthYearChange(this.state.date),\n );\n };\n\n header = (\n date: Date = this.state.date,\n customDayNameCount: number = 0,\n ): React.ReactElement[] => {\n // Return empty array if date is invalid\n if (!isValid(date)) {\n return [];\n }\n\n const disabled = this.props.disabled;\n const startOfWeek = getStartOfWeek(\n date,\n this.props.locale,\n this.props.calendarStartDay,\n );\n\n const dayNames: React.ReactElement[] = [];\n if (this.props.showWeekNumbers) {\n dayNames.push(\n <div\n key=\"W\"\n className={`react-datepicker__day-name ${disabled ? \"react-datepicker__day-name--disabled\" : \"\"}`}\n role=\"columnheader\"\n >\n <span className=\"react-datepicker__sr-only\">Week number</span>\n <span aria-hidden=\"true\">{this.props.weekLabel || \"#\"}</span>\n </div>,\n );\n }\n return dayNames.concat(\n [0, 1, 2, 3, 4, 5, 6].map((offset) => {\n const day = addDays(startOfWeek, offset);\n const weekDayName = this.formatWeekday(day, this.props.locale);\n const fullDayName = formatDate(day, \"EEEE\", this.props.locale);\n\n const weekDayClassName = this.props.weekDayClassName\n ? this.props.weekDayClassName(day)\n : undefined;\n\n // Use custom render if provided\n if (this.props.renderCustomDayName) {\n const customContent = this.props.renderCustomDayName({\n day,\n shortName: weekDayName,\n fullName: fullDayName,\n locale: this.props.locale,\n customDayNameCount,\n });\n\n return (\n <div\n key={offset}\n role=\"columnheader\"\n className={clsx(\n \"react-datepicker__day-name\",\n weekDayClassName,\n disabled ? \"react-datepicker__day-name--disabled\" : \"\",\n )}\n >\n {customContent}\n </div>\n );\n }\n\n // Default render\n return (\n <div\n key={offset}\n role=\"columnheader\"\n className={clsx(\n \"react-datepicker__day-name\",\n weekDayClassName,\n disabled ? \"react-datepicker__day-name--disabled\" : \"\",\n )}\n >\n <span className=\"react-datepicker__sr-only\">{fullDayName}</span>\n <span aria-hidden=\"true\">{weekDayName}</span>\n </div>\n );\n }),\n );\n };\n\n formatWeekday = (day: Date, locale?: Locale): string => {\n if (this.props.formatWeekDay) {\n return getFormattedWeekdayInLocale(day, this.props.formatWeekDay, locale);\n }\n return this.props.useWeekdaysShort\n ? getWeekdayShortInLocale(day, locale)\n : getWeekdayMinInLocale(day, locale);\n };\n\n decreaseYear = (): void => {\n this.setState(\n ({ date }) => ({\n date: subYears(\n date,\n this.props.showYearPicker\n ? (this.props.yearItemNumber ??\n Calendar.defaultProps.yearItemNumber)\n : 1,\n ),\n }),\n () => this.handleYearChange(this.state.date),\n );\n };\n\n clearSelectingDate = (): void => {\n this.setState({ selectingDate: undefined });\n };\n\n renderPreviousButton = (): React.ReactElement | void => {\n if (this.props.renderCustomHeader) {\n return;\n }\n\n const monthsShown =\n this.props.monthsShown ?? Calendar.defaultProps.monthsShown;\n const monthsToSubtract = this.props.showPreviousMonths\n ? monthsShown - 1\n : 0;\n const monthSelectedIn = this.props.monthSelectedIn ?? monthsToSubtract;\n const fromMonthDate = subMonths(this.state.date, monthSelectedIn);\n\n let allPrevDaysDisabled;\n switch (true) {\n case this.props.disabled:\n allPrevDaysDisabled = true;\n break;\n case this.props.showMonthYearPicker:\n allPrevDaysDisabled = yearDisabledBefore(this.state.date, this.props);\n break;\n case this.props.showYearPicker:\n allPrevDaysDisabled = yearsDisabledBefore(this.state.date, this.props);\n break;\n case this.props.showQuarterYearPicker:\n allPrevDaysDisabled = quarterDisabledBefore(\n this.state.date,\n this.props,\n );\n break;\n default:\n allPrevDaysDisabled = monthDisabledBefore(fromMonthDate, this.props);\n break;\n }\n\n if (\n (!(\n this.props.forceShowMonthNavigation ??\n Calendar.defaultProps.forceShowMonthNavigation\n ) &&\n !this.props.showDisabledMonthNavigation &&\n allPrevDaysDisabled) ||\n this.props.showTimeSelectOnly\n ) {\n return;\n }\n\n const iconClasses = [\n \"react-datepicker__navigation-icon\",\n \"react-datepicker__navigation-icon--previous\",\n ];\n\n const classes = [\n \"react-datepicker__navigation\",\n \"react-datepicker__navigation--previous\",\n ];\n\n let clickHandler: React.MouseEventHandler<HTMLButtonElement> | undefined =\n this.decreaseMonth;\n\n if (\n this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker ||\n this.props.showYearPicker\n ) {\n clickHandler = this.decreaseYear;\n }\n\n if (allPrevDaysDisabled && this.props.showDisabledMonthNavigation) {\n classes.push(\"react-datepicker__navigation--previous--disabled\");\n clickHandler = undefined;\n }\n\n const isForYear =\n this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker ||\n this.props.showYearPicker;\n\n const {\n previousMonthButtonLabel = Calendar.defaultProps.previousMonthButtonLabel,\n previousYearButtonLabel = Calendar.defaultProps.previousYearButtonLabel,\n } = this.props;\n\n const {\n previousMonthAriaLabel = typeof previousMonthButtonLabel === \"string\"\n ? previousMonthButtonLabel\n : \"Previous Month\",\n previousYearAriaLabel = typeof previousYearButtonLabel === \"string\"\n ? previousYearButtonLabel\n : \"Previous Year\",\n } = this.props;\n\n return (\n <button\n type=\"button\"\n className={classes.join(\" \")}\n onClick={clickHandler}\n onKeyDown={this.props.handleOnKeyDown}\n aria-label={isForYear ? previousYearAriaLabel : previousMonthAriaLabel}\n >\n <span className={iconClasses.join(\" \")}>\n {isForYear ? previousYearButtonLabel : previousMonthButtonLabel}\n </span>\n </button>\n );\n };\n\n increaseYear = (): void => {\n this.setState(\n ({ date }) => ({\n date: addYears(\n date,\n this.props.showYearPicker\n ? (this.props.yearItemNumber ??\n Calendar.defaultProps.yearItemNumber)\n : 1,\n ),\n }),\n () => this.handleYearChange(this.state.date),\n );\n };\n\n renderNextButton = (): React.ReactElement | void => {\n if (this.props.renderCustomHeader) {\n return;\n }\n\n let allNextDaysDisabled: boolean;\n switch (true) {\n case this.props.disabled:\n allNextDaysDisabled = true;\n break;\n case this.props.showMonthYearPicker:\n allNextDaysDisabled = yearDisabledAfter(this.state.date, this.props);\n break;\n case this.props.showYearPicker:\n allNextDaysDisabled = yearsDisabledAfter(this.state.date, this.props);\n break;\n case this.props.showQuarterYearPicker:\n allNextDaysDisabled = quarterDisabledAfter(this.state.date, this.props);\n break;\n default:\n allNextDaysDisabled = monthDisabledAfter(this.state.date, this.props);\n break;\n }\n\n if (\n (!(\n this.props.forceShowMonthNavigation ??\n Calendar.defaultProps.forceShowMonthNavigation\n ) &&\n !this.props.showDisabledMonthNavigation &&\n allNextDaysDisabled) ||\n this.props.showTimeSelectOnly\n ) {\n return;\n }\n\n const classes: string[] = [\n \"react-datepicker__navigation\",\n \"react-datepicker__navigation--next\",\n ];\n const iconClasses = [\n \"react-datepicker__navigation-icon\",\n \"react-datepicker__navigation-icon--next\",\n ];\n if (this.props.showTimeSelect) {\n classes.push(\"react-datepicker__navigation--next--with-time\");\n }\n if (this.props.todayButton) {\n classes.push(\"react-datepicker__navigation--next--with-today-button\");\n }\n\n let clickHandler: React.MouseEventHandler<HTMLButtonElement> | undefined =\n this.increaseMonth;\n\n if (\n this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker ||\n this.props.showYearPicker\n ) {\n clickHandler = this.increaseYear;\n }\n\n if (allNextDaysDisabled && this.props.showDisabledMonthNavigation) {\n classes.push(\"react-datepicker__navigation--next--disabled\");\n clickHandler = undefined;\n }\n\n const isForYear =\n this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker ||\n this.props.showYearPicker;\n\n const {\n nextMonthButtonLabel = Calendar.defaultProps.nextMonthButtonLabel,\n nextYearButtonLabel = Calendar.defaultProps.nextYearButtonLabel,\n } = this.props;\n const {\n nextMonthAriaLabel = typeof nextMonthButtonLabel === \"string\"\n ? nextMonthButtonLabel\n : \"Next Month\",\n nextYearAriaLabel = typeof nextYearButtonLabel === \"string\"\n ? nextYearButtonLabel\n : \"Next Year\",\n } = this.props;\n\n return (\n <button\n type=\"button\"\n className={classes.join(\" \")}\n onClick={clickHandler}\n onKeyDown={this.props.handleOnKeyDown}\n aria-label={isForYear ? nextYearAriaLabel : nextMonthAriaLabel}\n >\n <span className={iconClasses.join(\" \")}>\n {isForYear ? nextYearButtonLabel : nextMonthButtonLabel}\n </span>\n </button>\n );\n };\n\n renderCurrentMonth = (date: Date = this.state.date): React.ReactElement => {\n const classes = [\"react-datepicker__current-month\"];\n\n if (this.props.showYearDropdown) {\n classes.push(\"react-datepicker__current-month--hasYearDropdown\");\n }\n if (this.props.showMonthDropdown) {\n classes.push(\"react-datepicker__current-month--hasMonthDropdown\");\n }\n if (this.props.showMonthYearDropdown) {\n classes.push(\"react-datepicker__current-month--hasMonthYearDropdown\");\n }\n return (\n <h2 className={classes.join(\" \")}>\n {isValid(date)\n ? formatDate(date, this.props.dateFormat, this.props.locale)\n : \"\"}\n </h2>\n );\n };\n\n renderYearDropdown = (\n overrideHide: boolean = false,\n ): React.ReactElement | undefined => {\n if (!this.props.showYearDropdown || overrideHide) {\n return;\n }\n return (\n <YearDropdown\n {...Calendar.defaultProps}\n {...this.props}\n date={this.state.date}\n onChange={this.changeYear}\n year={getYear(this.state.date)}\n />\n );\n };\n\n renderMonthDropdown = (\n overrideHide: boolean = false,\n ): React.ReactElement | undefined => {\n if (!this.props.showMonthDropdown || overrideHide) {\n return;\n }\n return (\n <MonthDropdown\n {...Calendar.defaultProps}\n {...this.props}\n month={getMonth(this.state.date)}\n onChange={this.changeMonth}\n />\n );\n };\n\n renderMonthYearDropdown = (\n overrideHide: boolean = false,\n ): React.ReactElement | undefined => {\n if (!this.props.showMonthYearDropdown || overrideHide) {\n return;\n }\n return (\n <MonthYearDropdown\n {...Calendar.defaultProps}\n {...this.props}\n date={this.state.date}\n onChange={this.changeMonthYear}\n />\n );\n };\n\n handleTodayButtonClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n this.props.onSelect(getStartOfToday(), event);\n this.props.setPreSelection && this.props.setPreSelection(getStartOfToday());\n };\n\n renderTodayButton = (): React.ReactElement | undefined => {\n if (!this.props.todayButton || this.props.showTimeSelectOnly) {\n return;\n }\n return (\n <div\n className=\"react-datepicker__today-button\"\n onClick={this.handleTodayButtonClick}\n >\n {this.props.todayButton}\n </div>\n );\n };\n\n renderDayNamesHeader = (monthDate: Date, customDayNameCount: number = 0) => (\n <div className=\"react-datepicker__day-names\" role=\"row\">\n {this.header(monthDate, customDayNameCount)}\n </div>\n );\n\n renderDefaultHeader = ({ monthDate, i }: { monthDate: Date; i: number }) => {\n const headerContent = (\n <div\n className={clsx(\"react-datepicker__header\", {\n \"react-datepicker__header--has-time-select\":\n this.props.showTimeSelect,\n \"react-datepicker__header--middle\":\n this.props.monthHeaderPosition === \"middle\",\n \"react-datepicker__header--bottom\":\n this.props.monthHeaderPosition === \"bottom\",\n })}\n >\n {this.renderCurrentMonth(monthDate)}\n <div\n className={`react-datepicker__header__dropdown react-datepicker__header__dropdown--${this.props.dropdownMode}`}\n onFocus={this.handleDropdownFocus}\n >\n {this.renderMonthDropdown(i !== 0)}\n {this.renderMonthYearDropdown(i !== 0)}\n {this.renderYearDropdown(i !== 0)}\n </div>\n </div>\n );\n\n // Top position: render header directly in default location\n if (this.props.monthHeaderPosition === \"top\") {\n return headerContent;\n }\n\n // Middle/bottom positions: wrap with navigation buttons\n return (\n <div className=\"react-datepicker__header-wrapper\">\n {this.renderPreviousButton() || null}\n {this.renderNextButton() || null}\n {headerContent}\n </div>\n );\n };\n\n renderCustomHeader = (headerArgs: { monthDate: Date; i: number }) => {\n const { monthDate, i } = headerArgs;\n\n if (\n (this.props.showTimeSelect && !this.state.monthContainer) ||\n this.props.showTimeSelectOnly\n ) {\n return null;\n }\n\n const { showYearPicker, yearItemNumber } = this.props;\n\n let visibleYearsRange;\n if (showYearPicker) {\n const { startPeriod: startYear, endPeriod: endYear } = getYearsPeriod(\n monthDate,\n yearItemNumber,\n );\n visibleYearsRange = {\n startYear,\n endYear,\n };\n }\n\n const prevMonthButtonDisabled = monthDisabledBefore(\n this.state.date,\n this.props,\n );\n\n const nextMonthButtonDisabled = monthDisabledAfter(\n this.state.date,\n this.props,\n );\n\n const prevYearButtonDisabled = yearDisabledBefore(\n this.state.date,\n this.props,\n );\n\n const nextYearButtonDisabled = yearDisabledAfter(\n this.state.date,\n this.props,\n );\n\n return (\n <div\n className=\"react-datepicker__header react-datepicker__header--custom\"\n onFocus={this.props.onDropdownFocus}\n >\n {this.props.renderCustomHeader?.({\n ...this.state,\n ...(showYearPicker && { visibleYearsRange }),\n customHeaderCount: i,\n monthDate,\n changeMonth: this.changeMonth,\n changeYear: this.changeYear,\n decreaseMonth: this.decreaseMonth,\n increaseMonth: this.increaseMonth,\n decreaseYear: this.decreaseYear,\n increaseYear: this.increaseYear,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n prevYearButtonDisabled,\n nextYearButtonDisabled,\n })}\n </div>\n );\n };\n\n renderYearHeader = ({\n monthDate,\n }: {\n monthDate: Date;\n }): React.ReactElement => {\n const {\n showYearPicker,\n yearItemNumber = Calendar.defaultProps.yearItemNumber,\n } = this.props;\n const { startPeriod, endPeriod } = getYearsPeriod(\n monthDate,\n yearItemNumber,\n );\n return (\n <div className=\"react-datepicker__header react-datepicker-year-header\">\n {showYearPicker ? `${startPeriod} - ${endPeriod}` : getYear(monthDate)}\n </div>\n );\n };\n\n renderHeader = ({\n monthDate,\n i = 0,\n }: {\n monthDate: Date;\n i?: number;\n }): React.ReactElement | null => {\n const headerArgs = { monthDate, i };\n switch (true) {\n case this.props.renderCustomHeader !== undefined:\n return this.renderCustomHeader(headerArgs);\n case this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker ||\n this.props.showYearPicker:\n return this.renderYearHeader(headerArgs);\n default:\n return this.renderDefaultHeader(headerArgs);\n }\n };\n\n renderMonths = (): React.ReactElement[] | undefined => {\n if (this.props.showTimeSelectOnly || this.props.showYearPicker) {\n return;\n }\n\n const monthList: React.ReactElement[] = [];\n const monthsShown =\n this.props.monthsShown ?? Calendar.defaultProps.monthsShown;\n const monthsToSubtract = this.props.showPreviousMonths\n ? monthsShown - 1\n : 0;\n const fromMonthDate =\n this.props.showMonthYearPicker || this.props.showQuarterYearPicker\n ? addYears(this.state.date, monthsToSubtract)\n : subMonths(this.state.date, monthsToSubtract);\n const monthSelectedIn = this.props.monthSelectedIn ?? monthsToSubtract;\n for (let i = 0; i < monthsShown; ++i) {\n const monthsToAdd = i - monthSelectedIn + monthsToSubtract;\n const monthDate =\n this.props.showMonthYearPicker || this.props.showQuarterYearPicker\n ? addYears(fromMonthDate, monthsToAdd)\n : addMonths(fromMonthDate, monthsToAdd);\n const monthKey = `month-${i}`;\n const monthShowsDuplicateDaysEnd = i < monthsShown - 1;\n const monthShowsDuplicateDaysStart = i > 0;\n monthList.push(\n <div\n key={monthKey}\n ref={(div) => {\n this.monthContainer = div ?? undefined;\n }}\n className=\"react-datepicker__month-container\"\n >\n {this.props.monthHeaderPosition === \"top\" &&\n this.renderHeader({ monthDate, i })}\n <Month\n {...Calendar.defaultProps}\n {...this.props}\n containerRef={this.containerRef}\n ariaLabelPrefix={this.props.monthAriaLabelPrefix}\n day={monthDate}\n onDayClick={this.handleDayClick}\n handleOnKeyDown={this.props.handleOnDayKeyDown}\n handleOnMonthKeyDown={this.props.handleOnKeyDown}\n onDayMouseEnter={this.handleDayMouseEnter}\n onMouseLeave={this.handleMonthMouseLeave}\n orderInDisplay={i}\n selectingDate={this.state.selectingDate}\n monthShowsDuplicateDaysEnd={monthShowsDuplicateDaysEnd}\n monthShowsDuplicateDaysStart={monthShowsDuplicateDaysStart}\n dayNamesHeader={this.renderDayNamesHeader(monthDate, i)}\n monthHeader={\n this.props.monthHeaderPosition === \"middle\"\n ? this.renderHeader({ monthDate, i })\n : undefined\n }\n monthFooter={\n this.props.monthHeaderPosition === \"bottom\"\n ? this.renderHeader({ monthDate, i })\n : undefined\n }\n />\n </div>,\n );\n }\n return monthList;\n };\n\n renderYears = (): React.ReactElement | undefined => {\n if (this.props.showTimeSelectOnly) {\n return;\n }\n if (this.props.showYearPicker) {\n return (\n <div className=\"react-datepicker__year--container\">\n {this.renderHeader({ monthDate: this.state.date })}\n <Year\n {...Calendar.defaultProps}\n {...this.props}\n selectingDate={this.state.selectingDate}\n date={this.state.date}\n onDayClick={this.handleDayClick}\n clearSelectingDate={this.clearSelectingDate}\n onYearMouseEnter={this.handleYearMouseEnter}\n onYearMouseLeave={this.handleYearMouseLeave}\n />\n </div>\n );\n }\n return;\n };\n\n renderTimeSection = (): React.ReactElement | undefined => {\n if (\n this.props.showTimeSelect &&\n (this.state.monthContainer || this.props.showTimeSelectOnly)\n ) {\n return (\n <Time\n {...Calendar.defaultProps}\n {...this.props}\n onChange={this.props.onTimeChange}\n format={this.props.timeFormat}\n intervals={this.props.timeIntervals}\n monthRef={this.state.monthContainer}\n />\n );\n }\n return;\n };\n\n renderInputTimeSection = (): React.ReactElement | undefined => {\n if (!this.props.showTimeInput) {\n return;\n }\n\n // Handle selectsRange mode - render two time inputs\n if (this.props.selectsRange) {\n const { startDate, endDate } = this.props;\n\n const startTime = startDate ? new Date(startDate) : undefined;\n const startTimeValid =\n startTime && isValid(startTime) && Boolean(startDate);\n const startTimeString = startTimeValid\n ? `${addZero(startTime.getHours())}:${addZero(startTime.getMinutes())}`\n : \"\";\n\n const endTime = endDate ? new Date(endDate) : undefined;\n const endTimeValid = endTime && isValid(endTime) && Boolean(endDate);\n const endTimeString = endTimeValid\n ? `${addZero(endTime.getHours())}:${addZero(endTime.getMinutes())}`\n : \"\";\n\n return (\n <>\n <InputTime\n {...Calendar.defaultProps}\n {...this.props}\n date={startTime}\n timeString={startTimeString}\n onChange={(time: Date) => {\n this.props.onTimeChange?.(time, \"start\");\n }}\n timeInputLabel={(this.props.timeInputLabel ?? \"Time\") + \" (Start)\"}\n />\n <InputTime\n {...Calendar.defaultProps}\n {...this.props}\n date={endTime}\n timeString={endTimeString}\n onChange={(time: Date) => {\n this.props.onTimeChange?.(time, \"end\");\n }}\n timeInputLabel={(this.props.timeInputLabel ?? \"Time\") + \" (End)\"}\n />\n </>\n );\n }\n\n // Single date mode (original behavior)\n const time = this.props.selected\n ? new Date(this.props.selected)\n : undefined;\n const timeValid = time && isValid(time) && Boolean(this.props.selected);\n const timeString = timeValid\n ? `${addZero(time.getHours())}:${addZero(time.getMinutes())}`\n : \"\";\n return (\n <InputTime\n {...Calendar.defaultProps}\n {...this.props}\n date={time}\n timeString={timeString}\n onChange={(time: Date) => {\n this.props.onTimeChange?.(time);\n }}\n />\n );\n };\n\n renderAriaLiveRegion = (): React.ReactElement => {\n // Don't render aria-live message if date is invalid\n if (!isValid(this.state.date)) {\n return (\n <span\n role=\"alert\"\n aria-live=\"polite\"\n className=\"react-datepicker__aria-live\"\n />\n );\n }\n\n const { startPeriod, endPeriod } = getYearsPeriod(\n this.state.date,\n this.props.yearItemNumber ?? Calendar.defaultProps.yearItemNumber,\n );\n let ariaLiveMessage;\n\n if (this.props.showYearPicker) {\n ariaLiveMessage = `${startPeriod} - ${endPeriod}`;\n } else if (\n this.props.showMonthYearPicker ||\n this.props.showQuarterYearPicker\n ) {\n ariaLiveMessage = getYear(this.state.date);\n } else {\n ariaLiveMessage = `${getMonthInLocale(\n getMonth(this.state.date),\n this.props.locale,\n )} ${getYear(this.state.date)}`;\n }\n\n return (\n <span\n role=\"alert\"\n aria-live=\"polite\"\n className=\"react-datepicker__aria-live\"\n >\n {this.state.isRenderAriaLiveMessage && ariaLiveMessage}\n </span>\n );\n };\n\n renderChildren = (): React.ReactElement | undefined => {\n if (this.props.children) {\n return (\n <div className=\"react-datepicker__children-container\">\n {this.props.children}\n </div>\n );\n }\n return;\n };\n\n render(): React.ReactElement {\n const Container = this.props.container || CalendarContainer;\n return (\n <ClickOutsideWrapper\n onClickOutside={this.handleClickOutside}\n style={{ display: \"contents\" }}\n ignoreClass={this.props.outsideClickIgnoreClass}\n >\n <div style={{ display: \"contents\" }} ref={this.containerRef}>\n <Container\n className={clsx(\"react-datepicker\", this.props.className, {\n \"react-datepicker--time-only\": this.props.showTimeSelectOnly,\n })}\n showTime={this.props.showTimeSelect || this.props.showTimeInput}\n showTimeSelectOnly={this.props.showTimeSelectOnly}\n inline={this.props.inline}\n >\n {this.renderAriaLiveRegion()}\n {this.props.monthHeaderPosition === \"top\" &&\n this.renderPreviousButton()}\n {this.props.monthHeaderPosition === \"top\" &&\n this.renderNextButton()}\n {this.renderMonths()}\n {this.renderYears()}\n {this.renderTodayButton()}\n {this.renderTimeSection()}\n {this.renderInputTimeSection()}\n {this.renderChildren()}\n </Container>\n </div>\n </ClickOutsideWrapper>\n );\n }\n}\n", "import React from \"react\";\n\ninterface CalendarIconProps {\n icon?: string | React.ReactNode;\n className?: string;\n onClick?: (event: React.MouseEvent) => void;\n}\n\n/**\n * `CalendarIcon` is a React component that renders an icon for a calendar.\n * The icon can be a string representing a CSS class, a React node, or a default SVG icon.\n *\n * @component\n * @prop icon - The icon to be displayed. This can be a string representing a CSS class or a React node.\n * @prop className - An optional string representing additional CSS classes to be applied to the icon.\n * @prop onClick - An optional function to be called when the icon is clicked.\n *\n * @example\n * // To use a CSS class as the icon\n * <CalendarIcon icon=\"my-icon-class\" onClick={myClickHandler} />\n *\n * @example\n * // To use a React node as the icon\n * <CalendarIcon icon={<MyIconComponent />} onClick={myClickHandler} />\n *\n * @returns The `CalendarIcon` component.\n */\nconst CalendarIcon: React.FC<CalendarIconProps> = ({\n icon,\n className = \"\",\n onClick,\n}: CalendarIconProps): React.ReactElement => {\n const defaultClass = \"react-datepicker__calendar-icon\";\n\n if (typeof icon === \"string\") {\n return (\n <i\n className={`${defaultClass} ${icon} ${className}`}\n aria-hidden=\"true\"\n onClick={onClick}\n />\n );\n }\n\n if (React.isValidElement(icon)) {\n // Because we are checking that typeof icon is string first, we can safely cast icon as React.ReactElement on types level and code level\n const iconElement = icon as React.ReactElement<{\n className: string;\n onClick: (event: React.MouseEvent) => void;\n }>;\n\n return React.cloneElement(iconElement, {\n className: `${iconElement.props.className || \"\"} ${defaultClass} ${className}`,\n onClick: (event: React.MouseEvent) => {\n if (typeof iconElement.props.onClick === \"function\") {\n iconElement.props.onClick(event);\n }\n\n if (typeof onClick === \"function\") {\n onClick(event);\n }\n },\n });\n }\n\n // Default SVG Icon\n return (\n <svg\n className={`${defaultClass} ${className}`}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 448 512\"\n onClick={onClick}\n >\n <path d=\"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z\" />\n </svg>\n );\n};\n\nexport default CalendarIcon;\n", "import { Component } from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport type React from \"react\";\n\ninterface PortalProps {\n children: React.ReactNode;\n portalId: string;\n portalHost?: ShadowRoot;\n}\n\n/**\n * `Portal` is a React component that allows you to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * @class\n * @param {PortalProps} props - The properties that define the `Portal` component.\n * @property {React.ReactNode} props.children - The children to be rendered into the `Portal`.\n * @property {string} props.portalId - The id of the DOM node into which the `Portal` will render.\n * @property {ShadowRoot} [props.portalHost] - The DOM node to host the `Portal`.\n */\nclass Portal extends Component<PortalProps> {\n constructor(props: PortalProps) {\n super(props);\n this.el = document.createElement(\"div\");\n }\n\n componentDidMount() {\n this.portalRoot = (this.props.portalHost || document).getElementById(\n this.props.portalId,\n );\n if (!this.portalRoot) {\n this.portalRoot = document.createElement(\"div\");\n this.portalRoot.setAttribute(\"id\", this.props.portalId);\n (this.props.portalHost || document.body).appendChild(this.portalRoot);\n }\n this.portalRoot.appendChild(this.el);\n }\n\n componentWillUnmount() {\n if (this.portalRoot) {\n this.portalRoot.removeChild(this.el);\n }\n }\n\n private el: HTMLDivElement;\n private portalRoot: HTMLElement | null = null;\n\n render(): React.ReactPortal {\n return ReactDOM.createPortal(this.props.children, this.el);\n }\n}\n\nexport default Portal;\n", "import React, { Component, createRef } from \"react\";\n\nimport type { ReactNode } from \"react\";\n\ninterface TabLoopProps {\n enableTabLoop?: boolean;\n children?: ReactNode | undefined;\n}\n\nconst focusableElementsSelector =\n \"[tabindex], a, button, input, select, textarea\";\nconst focusableFilter = (\n node:\n | HTMLButtonElement\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement\n | HTMLAnchorElement,\n) => {\n if (node instanceof HTMLAnchorElement) {\n return node.tabIndex !== -1;\n }\n\n return !node.disabled && node.tabIndex !== -1;\n};\n\n/**\n * `TabLoop` is a React component that manages tabbing behavior for its children.\n *\n * TabLoop prevents the user from tabbing outside of the popper\n * It creates a tabindex loop so that \"Tab\" on the last element will focus the first element\n * and \"Shift Tab\" on the first element will focus the last element\n *\n * @component\n * @example\n * <TabLoop enableTabLoop={true}>\n * <ChildComponent />\n * </TabLoop>\n *\n * @param props - The properties that define the `TabLoop` component.\n * @param props.children - The child components.\n * @param props.enableTabLoop - Whether to enable the tab loop.\n *\n * @returns The `TabLoop` component.\n */\nexport default class TabLoop extends Component<TabLoopProps> {\n static defaultProps = {\n enableTabLoop: true,\n };\n\n constructor(props: TabLoopProps) {\n super(props);\n\n this.tabLoopRef = createRef();\n }\n\n private tabLoopRef: React.RefObject<HTMLDivElement | null>;\n\n /**\n * `getTabChildren` is a method of the `TabLoop` class that retrieves all tabbable children of the component.\n *\n * This method uses the `tabbable` library to find all tabbable elements within the `TabLoop` component.\n * It then filters out any elements that are not visible.\n *\n * @returns An array of all tabbable and visible children of the `TabLoop` component.\n */\n getTabChildren = () =>\n Array.prototype.slice\n .call(\n this.tabLoopRef.current?.querySelectorAll(focusableElementsSelector),\n 1,\n -1,\n )\n .filter(focusableFilter);\n\n handleFocusStart = () => {\n const tabChildren = this.getTabChildren();\n tabChildren &&\n tabChildren.length > 1 &&\n tabChildren[tabChildren.length - 1].focus();\n };\n\n handleFocusEnd = () => {\n const tabChildren = this.getTabChildren();\n tabChildren && tabChildren.length > 1 && tabChildren[0].focus();\n };\n\n render(): React.ReactNode {\n if (!(this.props.enableTabLoop ?? TabLoop.defaultProps.enableTabLoop)) {\n return this.props.children;\n }\n return (\n <div className=\"react-datepicker__tab-loop\" ref={this.tabLoopRef}>\n <div\n className=\"react-datepicker__tab-loop__start\"\n tabIndex={0}\n onFocus={this.handleFocusStart}\n />\n {this.props.children}\n <div\n className=\"react-datepicker__tab-loop__end\"\n tabIndex={0}\n onFocus={this.handleFocusEnd}\n />\n </div>\n );\n }\n}\n", "import {\n useFloating,\n arrow,\n offset,\n flip,\n autoUpdate,\n type UseFloatingOptions,\n type Middleware,\n type Placement,\n type UseFloatingReturn,\n} from \"@floating-ui/react\";\nimport React, { useRef } from \"react\";\n\nexport interface FloatingProps {\n hidePopper?: boolean;\n popperProps: UseFloatingReturn & {\n arrowRef: React.RefObject<SVGSVGElement>;\n };\n}\n\nexport interface WithFloatingProps {\n popperModifiers?: Middleware[];\n popperProps?: Omit<UseFloatingOptions, \"middleware\">;\n hidePopper?: boolean;\n popperPlacement?: Placement;\n}\n\n/**\n * `withFloating` is a higher-order component that adds floating behavior to a component.\n *\n * @param Component - The component to enhance.\n *\n * @example\n * const FloatingComponent = withFloating(MyComponent);\n * <FloatingComponent popperModifiers={[]} popperProps={{}} hidePopper={true} />\n *\n * @param popperModifiers - The modifiers to use for the popper.\n * @param popperProps - The props to pass to the popper.\n * @param hidePopper - Whether to hide the popper.\n * @param popperPlacement - The placement of the popper.\n *\n * @returns A new component with floating behavior.\n */\nexport default function withFloating<T extends FloatingProps>(\n Component: React.ComponentType<T>,\n) {\n type R = Omit<T, \"popperProps\"> & WithFloatingProps;\n function WithFloating(props: R): React.ReactElement {\n const hidePopper: boolean =\n typeof props.hidePopper === \"boolean\" ? props.hidePopper : true;\n const arrowRef = useRef<SVGSVGElement>(null);\n const floatingProps = useFloating({\n open: !hidePopper,\n whileElementsMounted: autoUpdate,\n placement: props.popperPlacement,\n middleware: [\n flip({ padding: 15 }),\n offset(10),\n // eslint-disable-next-line react-hooks/refs -- Floating UI requires refs to be passed during render\n arrow({ element: arrowRef }),\n ...(props.popperModifiers ?? []),\n ],\n ...props.popperProps,\n });\n\n const componentProps = {\n ...props,\n hidePopper,\n popperProps: { ...floatingProps, arrowRef },\n } as unknown as T;\n\n return <Component {...componentProps} />;\n }\n\n WithFloating.displayName = `withFloating(${Component.displayName || Component.name || \"Component\"})`;\n\n return WithFloating;\n}\n", "import { FloatingArrow } from \"@floating-ui/react\";\nimport { clsx } from \"clsx\";\nimport React, { createElement, useEffect } from \"react\";\n\nimport Portal from \"./portal\";\nimport TabLoop from \"./tab_loop\";\nimport withFloating from \"./with_floating\";\n\nimport type { FloatingProps } from \"./with_floating\";\nimport type { ReactNode } from \"react\";\n\ninterface PortalProps extends Omit<\n React.ComponentPropsWithoutRef<typeof Portal>,\n \"children\"\n> {}\ninterface TabLoopProps extends Omit<\n React.ComponentPropsWithoutRef<typeof TabLoop>,\n \"children\"\n> {}\n\ninterface PopperComponentProps\n extends Omit<PortalProps, \"portalId\">, TabLoopProps, FloatingProps {\n className?: string;\n wrapperClassName?: string;\n popperComponent: React.ReactNode;\n popperContainer?: React.FC<{ children?: ReactNode | undefined }>;\n targetComponent: React.ReactNode;\n popperOnKeyDown: React.KeyboardEventHandler<HTMLDivElement>;\n showArrow?: boolean;\n portalId?: PortalProps[\"portalId\"];\n popperTargetRef?: React.RefObject<HTMLElement | null>;\n monthHeaderPosition?: \"top\" | \"middle\" | \"bottom\";\n}\n\n// Exported for testing purposes\nexport const PopperComponent: React.FC<PopperComponentProps> = (props) => {\n const {\n className,\n wrapperClassName,\n hidePopper = true,\n popperComponent,\n targetComponent,\n enableTabLoop,\n popperOnKeyDown,\n portalId,\n portalHost,\n popperProps,\n showArrow,\n popperTargetRef,\n monthHeaderPosition,\n } = props;\n\n // When a custom popperTargetRef is provided, use it as the position reference\n // This allows the popper to be positioned relative to a specific element\n // within the custom input, rather than the wrapper div\n useEffect(() => {\n if (popperTargetRef?.current) {\n popperProps.refs.setPositionReference(popperTargetRef.current);\n }\n }, [popperTargetRef, popperProps.refs]);\n\n let popper: React.ReactElement | undefined = undefined;\n\n if (!hidePopper) {\n const classes = clsx(\n \"react-datepicker-popper\",\n !showArrow && \"react-datepicker-popper-offset\",\n monthHeaderPosition === \"middle\" &&\n \"react-datepicker-popper--header-middle\",\n monthHeaderPosition === \"bottom\" &&\n \"react-datepicker-popper--header-bottom\",\n className,\n );\n popper = (\n <TabLoop enableTabLoop={enableTabLoop}>\n {/* eslint-disable react-hooks/refs -- Floating UI values are designed to be used during render */}\n <div\n ref={popperProps.refs.setFloating}\n style={popperProps.floatingStyles}\n className={classes}\n data-placement={popperProps.placement}\n onKeyDown={popperOnKeyDown}\n >\n {popperComponent}\n {showArrow && (\n <FloatingArrow\n ref={popperProps.arrowRef}\n context={popperProps.context}\n fill=\"currentColor\"\n strokeWidth={1}\n height={8}\n width={16}\n style={{ transform: \"translateY(-1px)\" }}\n className=\"react-datepicker__triangle\"\n />\n )}\n </div>\n {/* eslint-enable react-hooks/refs */}\n </TabLoop>\n );\n }\n\n if (props.popperContainer) {\n popper = createElement(props.popperContainer, {}, popper);\n }\n\n if (portalId && !hidePopper) {\n popper = (\n <Portal portalId={portalId} portalHost={portalHost}>\n {popper}\n </Portal>\n );\n }\n\n const wrapperClasses = clsx(\"react-datepicker-wrapper\", wrapperClassName);\n\n return (\n <>\n {/* eslint-disable-next-line react-hooks/refs -- Floating UI refs are designed to be used during render */}\n <div ref={popperProps.refs.setReference} className={wrapperClasses}>\n {targetComponent}\n </div>\n {popper}\n </>\n );\n};\n\nexport default withFloating<PopperComponentProps>(PopperComponent);\n", "import { clsx } from \"clsx\";\nimport React, { Component, cloneElement } from \"react\";\n\nimport Calendar, { OUTSIDE_CLICK_IGNORE_CLASS } from \"./calendar\";\nimport CalendarIcon from \"./calendar_icon\";\nimport {\n newDate,\n isDate,\n isBefore,\n isAfter,\n isEqual,\n setTime,\n isValid,\n getSeconds,\n getMinutes,\n getHours,\n addDays,\n addMinutes,\n addMonths,\n addWeeks,\n subDays,\n subMonths,\n subWeeks,\n addYears,\n subYears,\n isDayDisabled,\n isDayInRange,\n getEffectiveMinDate,\n getEffectiveMaxDate,\n parseDate,\n parseDateForNavigation,\n formatDate,\n safeDateFormat,\n safeDateRangeFormat,\n getHighLightDaysMap,\n getYear,\n getMonth,\n getStartOfWeek,\n getEndOfWeek,\n registerLocale,\n setDefaultLocale,\n getDefaultLocale,\n DEFAULT_YEAR_ITEM_NUMBER,\n isSameDay,\n isMonthDisabled,\n isYearDisabled,\n safeMultipleDatesFormat,\n getHolidaysMap,\n isDateBefore,\n getStartOfDay,\n getEndOfDay,\n isSameMinute,\n toZonedTime,\n fromZonedTime,\n safeToDate,\n type HighlightDate,\n type HolidayItem,\n type TimeZone,\n KeyType,\n DATE_RANGE_SEPARATOR,\n} from \"./date_utils\";\nimport PopperComponent from \"./popper_component\";\nimport Portal from \"./portal\";\nimport TabLoop from \"./tab_loop\";\n\nimport type { ClickOutsideHandler } from \"./click_outside_wrapper\";\n\nexport { default as CalendarContainer } from \"./calendar_container\";\n\nexport { registerLocale, setDefaultLocale, getDefaultLocale };\n\nexport {\n ReactDatePickerCustomHeaderProps,\n ReactDatePickerCustomDayNameProps,\n} from \"./calendar\";\n\n// Compares dates year+month combinations\nfunction hasPreSelectionChanged(\n date1?: Date | null,\n date2?: Date | null,\n): boolean {\n if (date1 && date2) {\n return (\n getMonth(date1) !== getMonth(date2) || getYear(date1) !== getYear(date2)\n );\n }\n\n return date1 !== date2;\n}\n\n/**\n * General datepicker component.\n */\nconst INPUT_ERR_1 = \"Date input not valid.\";\n\ninterface Holiday {\n date: string;\n holidayName: string;\n}\n\ntype CalendarProps = React.ComponentPropsWithoutRef<typeof Calendar>;\n\ninterface CalendarIconProps extends React.ComponentPropsWithoutRef<\n typeof CalendarIcon\n> {}\n\ninterface PortalProps extends React.ComponentPropsWithoutRef<typeof Portal> {}\n\ninterface PopperComponentProps extends React.ComponentPropsWithoutRef<\n typeof PopperComponent\n> {}\n\n// see https://github.com/microsoft/TypeScript/issues/31501\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype OmitUnion<T, K extends keyof any> = T extends any ? Omit<T, K> : never;\nexport type DatePickerProps = OmitUnion<\n CalendarProps,\n | \"setOpen\"\n | \"dateFormat\"\n | \"preSelection\"\n | \"onSelect\"\n | \"onClickOutside\"\n | \"highlightDates\"\n | \"holidays\"\n | \"shouldFocusDayInline\"\n | \"monthSelectedIn\"\n | \"onDropdownFocus\"\n | \"onTimeChange\"\n | \"className\"\n | \"container\"\n | \"handleOnKeyDown\"\n | \"handleOnDayKeyDown\"\n | \"isInputFocused\"\n | \"setPreSelection\"\n | \"selectsRange\"\n | \"selectsMultiple\"\n | \"dropdownMode\"\n> &\n Partial<Pick<CalendarIconProps, \"icon\">> &\n OmitUnion<PortalProps, \"children\" | \"portalId\"> &\n OmitUnion<\n PopperComponentProps,\n | \"className\"\n | \"hidePopper\"\n | \"targetComponent\"\n | \"popperComponent\"\n | \"popperOnKeyDown\"\n | \"showArrow\"\n > & {\n dateFormatCalendar?: CalendarProps[\"dateFormat\"];\n calendarClassName?: CalendarProps[\"className\"];\n calendarContainer?: CalendarProps[\"container\"];\n dropdownMode?: CalendarProps[\"dropdownMode\"];\n onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;\n popperClassName?: PopperComponentProps[\"className\"];\n showPopperArrow?: PopperComponentProps[\"showArrow\"];\n popperTargetRef?: React.RefObject<HTMLElement | null>;\n open?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n startOpen?: boolean;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onClickOutside?: ClickOutsideHandler;\n onInputClick?: VoidFunction;\n preventOpenOnFocus?: boolean;\n closeOnScroll?: boolean | ((event: Event) => boolean);\n isClearable?: boolean;\n clearButtonTitle?: string;\n clearButtonClassName?: string;\n ariaLabelClose?: string;\n className?: string;\n customInput?: Parameters<typeof cloneElement>[0];\n dateFormat?: string | string[];\n showDateSelect?: boolean;\n highlightDates?: (Date | HighlightDate)[];\n onCalendarOpen?: VoidFunction;\n onCalendarClose?: VoidFunction;\n strictParsing?: boolean;\n swapRange?: boolean;\n onInputError?: (error: { code: 1; msg: string }) => void;\n allowSameDay?: boolean;\n withPortal?: boolean;\n focusSelectedMonth?: boolean;\n showIcon?: boolean;\n calendarIconClassname?: never;\n calendarIconClassName?: string;\n toggleCalendarOnIconClick?: boolean;\n holidays?: Holiday[];\n startDate?: Date | null;\n endDate?: Date | null;\n selected?: Date | null;\n /**\n * The IANA timezone identifier (e.g., \"America/New_York\", \"UTC\", \"Europe/London\").\n * When set, the datepicker will display dates/times in this timezone and\n * the onChange callback will return dates adjusted to this timezone.\n *\n * Requires the optional peer dependency `date-fns-tz` to be installed:\n * ```\n * npm install date-fns-tz\n * ```\n *\n * @example\n * ```tsx\n * <DatePicker\n * timeZone=\"America/New_York\"\n * selected={selectedDate}\n * onChange={(date) => setSelectedDate(date)}\n * />\n * ```\n */\n timeZone?: TimeZone;\n value?: string;\n customInputRef?: string;\n id?: string;\n name?: string;\n form?: string;\n autoFocus?: boolean;\n placeholderText?: string;\n autoComplete?: string;\n title?: string;\n required?: boolean;\n tabIndex?: number;\n ariaDescribedBy?: string;\n ariaInvalid?: string;\n ariaLabel?: string;\n ariaLabelledBy?: string;\n ariaRequired?: string;\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: string;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n \"aria-required\"?: string;\n rangeSeparator?: string;\n onChangeRaw?: (\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n selectionMeta?: {\n date: Date;\n formattedDate: string;\n },\n ) => void;\n onSelect?: (\n date: Date | null,\n event?:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n } & (\n | {\n selectsRange?: false | undefined;\n selectsMultiple?: false | undefined;\n formatMultipleDates?: never;\n onChange?: (\n date: Date | null,\n event?:\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n }\n | {\n selectsRange?: true;\n selectsMultiple?: false | undefined;\n formatMultipleDates?: never;\n onChange?: (\n date: [Date | null, Date | null],\n event?:\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n }\n | {\n selectsRange?: false | undefined;\n selectsMultiple?: true;\n formatMultipleDates?: (\n dates: Date[],\n formatDate: (date: Date) => string,\n ) => string;\n onChange?: (\n dates: Date[] | null,\n event?:\n | React.MouseEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n }\n );\n\n// Internal types for onChange handlers - used for type assertions within the component\ntype OnChangeSingle = (\n date: Date | null,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n) => void;\n\ntype OnChangeRange = (\n date: [Date | null, Date | null],\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n) => void;\n\ntype OnChangeMultiple = (\n dates: Date[] | null,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n) => void;\n\ninterface DatePickerState {\n open: boolean;\n wasHidden: boolean;\n lastPreSelectChange?:\n | typeof PRESELECT_CHANGE_VIA_INPUT\n | typeof PRESELECT_CHANGE_VIA_NAVIGATE;\n inputValue: string | null;\n preventFocus: boolean;\n preSelection?: CalendarProps[\"preSelection\"];\n shouldFocusDayInline?: CalendarProps[\"shouldFocusDayInline\"];\n monthSelectedIn?: CalendarProps[\"monthSelectedIn\"];\n focused?: CalendarProps[\"isInputFocused\"];\n highlightDates: Required<CalendarProps>[\"highlightDates\"];\n isRenderAriaLiveMessage?: boolean;\n}\n\nexport class DatePicker extends Component<DatePickerProps, DatePickerState> {\n static get defaultProps() {\n return {\n allowSameDay: false,\n dateFormat: \"MM/dd/yyyy\",\n dateFormatCalendar: \"LLLL yyyy\",\n disabled: false,\n disabledKeyboardNavigation: false,\n dropdownMode: \"scroll\" as const,\n preventOpenOnFocus: false,\n monthsShown: 1,\n outsideClickIgnoreClass: OUTSIDE_CLICK_IGNORE_CLASS,\n readOnly: false,\n rangeSeparator: DATE_RANGE_SEPARATOR,\n withPortal: false,\n selectsDisabledDaysInRange: false,\n shouldCloseOnSelect: true,\n showTimeSelect: false,\n showTimeInput: false,\n showPreviousMonths: false,\n showMonthYearPicker: false,\n showFullMonthYearPicker: false,\n showTwoColumnMonthYearPicker: false,\n showFourColumnMonthYearPicker: false,\n showYearPicker: false,\n showQuarterYearPicker: false,\n showWeekPicker: false,\n strictParsing: false,\n swapRange: false,\n timeIntervals: 30,\n timeCaption: \"Time\",\n previousMonthAriaLabel: \"Previous Month\",\n previousMonthButtonLabel: \"Previous Month\",\n nextMonthAriaLabel: \"Next Month\",\n nextMonthButtonLabel: \"Next Month\",\n previousYearAriaLabel: \"Previous Year\",\n previousYearButtonLabel: \"Previous Year\",\n nextYearAriaLabel: \"Next Year\",\n nextYearButtonLabel: \"Next Year\",\n timeInputLabel: \"Time\",\n enableTabLoop: true,\n yearItemNumber: DEFAULT_YEAR_ITEM_NUMBER,\n focusSelectedMonth: false,\n showPopperArrow: true,\n excludeScrollbar: true,\n customTimeInput: null,\n calendarStartDay: undefined,\n toggleCalendarOnIconClick: false,\n usePointerEvent: false,\n };\n }\n\n constructor(props: DatePickerProps) {\n super(props);\n this.state = this.calcInitialState();\n this.preventFocusTimeout = undefined;\n }\n\n componentDidMount(): void {\n window.addEventListener(\"scroll\", this.onScroll, true);\n document.addEventListener(\n \"visibilitychange\",\n this.setHiddenStateOnVisibilityHidden,\n );\n }\n\n componentDidUpdate(\n prevProps: DatePickerProps,\n prevState: DatePickerState,\n ): void {\n // Update preSelection when selected/startDate prop changes to a different month/year.\n // This ensures the calendar view updates when dates are programmatically set\n // (e.g., via \"Today\" or \"This Week\" buttons). (Fix for #3367)\n if (\n this.props.selectsRange &&\n hasPreSelectionChanged(prevProps.startDate, this.props.startDate)\n ) {\n this.setPreSelection(this.props.startDate);\n } else if (\n hasPreSelectionChanged(prevProps.selected, this.props.selected)\n ) {\n this.setPreSelection(this.props.selected);\n }\n if (\n this.state.monthSelectedIn !== undefined &&\n prevProps.monthsShown !== this.props.monthsShown\n ) {\n this.setState({ monthSelectedIn: 0 });\n }\n // Reset monthSelectedIn when calendar opens for range selection\n // This ensures startDate is displayed as the first month when reopening\n // (Fix for #5939), but we don't reset during active selection to avoid\n // the view jumping when clicking dates in the second calendar (Fix for #5275)\n if (\n this.props.selectsRange &&\n prevState.open === false &&\n this.state.open === true &&\n this.state.monthSelectedIn !== 0\n ) {\n this.setState({ monthSelectedIn: 0 });\n }\n if (prevProps.highlightDates !== this.props.highlightDates) {\n this.setState({\n highlightDates: getHighLightDaysMap(this.props.highlightDates),\n });\n }\n if (\n !prevState.focused &&\n !isEqual(prevProps.selected, this.props.selected)\n ) {\n this.setState({ inputValue: null });\n }\n\n if (prevState.open !== this.state.open) {\n if (prevState.open === false && this.state.open === true) {\n this.props.onCalendarOpen?.();\n }\n\n if (prevState.open === true && this.state.open === false) {\n this.props.onCalendarClose?.();\n }\n }\n }\n\n componentWillUnmount(): void {\n this.clearPreventFocusTimeout();\n window.removeEventListener(\"scroll\", this.onScroll, true);\n document.removeEventListener(\n \"visibilitychange\",\n this.setHiddenStateOnVisibilityHidden,\n );\n }\n\n preventFocusTimeout: ReturnType<typeof setTimeout> | undefined;\n\n inputFocusTimeout: ReturnType<typeof setTimeout> | undefined;\n\n calendar: Calendar | null = null;\n\n input: HTMLElement | null = null;\n\n getPreSelection = (): Date => {\n const { timeZone } = this.props;\n const baseDate = this.props.openToDate\n ? this.props.openToDate\n : this.props.selectsEnd && this.props.startDate\n ? this.props.startDate\n : this.props.selectsStart && this.props.endDate\n ? this.props.endDate\n : newDate();\n\n // Convert to the specified timezone for display\n return timeZone ? toZonedTime(baseDate, timeZone) : baseDate;\n };\n\n // Convert the date from string format to standard Date format\n // Uses parseDate with ISO format to parse as local time, preventing\n // dates from shifting in timezones west of UTC. See issue #6105.\n modifyHolidays = () =>\n this.props.holidays?.reduce<HolidayItem[]>((accumulator, holiday) => {\n const date = parseDate(holiday.date, \"yyyy-MM-dd\", undefined, false);\n if (!date) {\n return accumulator;\n }\n\n return [...accumulator, { ...holiday, date }];\n }, []);\n\n calcInitialState = (): DatePickerState => {\n const { timeZone } = this.props;\n const defaultPreSelection = this.getPreSelection();\n const minDate = getEffectiveMinDate(this.props);\n const maxDate = getEffectiveMaxDate(this.props);\n const boundedPreSelection =\n minDate && isBefore(defaultPreSelection, getStartOfDay(minDate))\n ? minDate\n : maxDate && isAfter(defaultPreSelection, getEndOfDay(maxDate))\n ? maxDate\n : defaultPreSelection;\n\n // Convert selected/startDate to zoned time for display if timezone is specified\n let initialPreSelection = this.props.selectsRange\n ? this.props.startDate\n : this.props.selected;\n\n if (initialPreSelection && timeZone) {\n initialPreSelection = toZonedTime(initialPreSelection, timeZone);\n }\n\n return {\n open: this.props.startOpen || false,\n preventFocus: false,\n inputValue: null,\n preSelection: initialPreSelection ?? boundedPreSelection,\n // transforming highlighted days (perhaps nested array)\n // to flat Map for faster access in day.jsx\n highlightDates: getHighLightDaysMap(this.props.highlightDates),\n focused: false,\n // used to focus day in inline version after month has changed, but not on\n // initial render\n shouldFocusDayInline: false,\n isRenderAriaLiveMessage: false,\n wasHidden: false,\n };\n };\n\n getInputValue = (): string => {\n const {\n locale,\n startDate,\n endDate,\n rangeSeparator,\n selected,\n selectedDates,\n selectsMultiple,\n selectsRange,\n formatMultipleDates,\n value,\n } = this.props;\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n\n const { inputValue } = this.state;\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof inputValue === \"string\") {\n return inputValue;\n } else if (selectsRange) {\n return safeDateRangeFormat(startDate, endDate, {\n dateFormat,\n locale,\n rangeSeparator,\n });\n } else if (selectsMultiple) {\n if (formatMultipleDates) {\n const formatDateFn = (date: Date) =>\n safeDateFormat(date, { dateFormat, locale });\n return formatMultipleDates(selectedDates ?? [], formatDateFn);\n }\n return safeMultipleDatesFormat(selectedDates ?? [], {\n dateFormat,\n locale,\n });\n }\n return safeDateFormat(selected, {\n dateFormat,\n locale,\n });\n };\n\n resetHiddenStatus = (): void => {\n this.setState({\n ...this.state,\n wasHidden: false,\n });\n };\n\n setHiddenStatus = (): void => {\n this.setState({\n ...this.state,\n wasHidden: true,\n });\n };\n\n setHiddenStateOnVisibilityHidden = (): void => {\n if (document.visibilityState !== \"hidden\") {\n return;\n }\n\n this.setHiddenStatus();\n };\n\n clearPreventFocusTimeout = () => {\n if (this.preventFocusTimeout) {\n clearTimeout(this.preventFocusTimeout);\n }\n };\n\n setFocus = () => {\n this.input?.focus?.({ preventScroll: true });\n };\n\n setBlur = () => {\n this.input?.blur?.();\n this.cancelFocusInput();\n };\n\n deferBlur = () => {\n requestAnimationFrame(() => {\n this.setBlur();\n });\n };\n\n setOpen = (open: boolean, skipSetBlur: boolean = false): void => {\n this.setState(\n {\n open: open,\n preSelection:\n open && this.state.open\n ? this.state.preSelection\n : this.calcInitialState().preSelection,\n lastPreSelectChange: PRESELECT_CHANGE_VIA_NAVIGATE,\n },\n () => {\n if (!open) {\n this.setState(\n (prev: DatePickerState) => ({\n focused: skipSetBlur ? prev.focused : false,\n }),\n () => {\n !skipSetBlur && this.deferBlur();\n\n this.setState({ inputValue: null });\n },\n );\n }\n },\n );\n };\n inputOk = (): boolean => isDate(this.state.preSelection);\n\n isCalendarOpen = () =>\n this.props.open === undefined\n ? this.state.open && !this.props.disabled && !this.props.readOnly\n : this.props.open;\n\n handleFocus = (event: React.FocusEvent<HTMLElement>): void => {\n const isAutoReFocus = this.state.wasHidden;\n const isOpenAllowed = isAutoReFocus ? this.state.open : true;\n\n if (isAutoReFocus) {\n this.resetHiddenStatus();\n }\n\n if (!this.state.preventFocus) {\n this.props.onFocus?.(event);\n if (\n isOpenAllowed &&\n !this.props.preventOpenOnFocus &&\n !this.props.readOnly\n ) {\n this.setOpen(true);\n }\n }\n this.setState({ focused: true });\n };\n\n sendFocusBackToInput = (): void => {\n // Clear previous timeout if it exists\n if (this.preventFocusTimeout) {\n this.clearPreventFocusTimeout();\n }\n\n // close the popper and refocus the input\n // stop the input from auto opening onFocus\n // setFocus to the input\n this.setState({ preventFocus: true }, (): void => {\n this.preventFocusTimeout = setTimeout((): void => {\n this.setFocus();\n this.setState({ preventFocus: false });\n });\n });\n };\n\n cancelFocusInput = () => {\n clearTimeout(this.inputFocusTimeout);\n this.inputFocusTimeout = undefined;\n };\n\n deferFocusInput = () => {\n this.cancelFocusInput();\n this.inputFocusTimeout = setTimeout(() => this.setFocus(), 1);\n };\n\n handleDropdownFocus = () => {\n this.cancelFocusInput();\n };\n\n resetInputValue = () => {\n this.setState({\n ...this.state,\n inputValue: null,\n });\n };\n\n handleBlur = (event: React.FocusEvent<HTMLElement>) => {\n if (!this.state.open || this.props.withPortal || this.props.showTimeInput) {\n this.props.onBlur?.(event);\n }\n\n // If user cleared the input via a mask library (inputValue has no date-like\n // characters), clear the selection on blur (fixes issue #5814 with mask inputs)\n const { inputValue } = this.state;\n if (typeof inputValue === \"string\" && inputValue.length > 0) {\n // Check if input looks like a cleared mask (no alphanumeric characters)\n // This distinguishes between:\n // - \"__/__/____\" (cleared mask) → should clear selection\n // - \"2025-02-45\" (invalid date) → should keep previous selection\n const hasDateCharacters = /[a-zA-Z0-9]/.test(inputValue);\n if (!hasDateCharacters && this.props.selected) {\n this.setSelected(null, undefined, true);\n }\n }\n\n this.resetInputValue();\n\n if (this.state.open && this.props.open === false) {\n this.setOpen(false);\n }\n\n this.setState({ focused: false });\n };\n\n handleCalendarClickOutside = (event: MouseEvent) => {\n // Call user's onClickOutside first, allowing them to call preventDefault()\n this.props.onClickOutside?.(event);\n\n // Only close if not prevented and not inline\n if (!this.props.inline && !event.defaultPrevented) {\n this.setOpen(false);\n }\n if (this.props.withPortal) {\n event.preventDefault();\n }\n };\n\n // handleChange is called when user types in the textbox\n handleChange = (\n ...allArgs: Parameters<Required<DatePickerProps>[\"onChangeRaw\"]>\n ) => {\n const event = allArgs[0];\n if (this.props.onChangeRaw) {\n this.props.onChangeRaw.apply(this, allArgs);\n if (\n !event ||\n typeof event.isDefaultPrevented !== \"function\" ||\n event.isDefaultPrevented()\n ) {\n return;\n }\n }\n\n this.setState({\n inputValue:\n event?.target instanceof HTMLInputElement ? event.target.value : null,\n lastPreSelectChange: PRESELECT_CHANGE_VIA_INPUT,\n });\n\n const { selectsRange, startDate, endDate } = this.props;\n\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n const strictParsing =\n this.props.strictParsing ?? DatePicker.defaultProps.strictParsing;\n\n const value =\n event?.target instanceof HTMLInputElement ? event.target.value : \"\";\n\n if (selectsRange) {\n const rangeSeparator = this.props.rangeSeparator as string;\n const trimmedRangeSeparator = rangeSeparator.trim();\n\n const [valueStart, valueEnd] = value\n .split(\n dateFormat.includes(trimmedRangeSeparator)\n ? rangeSeparator\n : trimmedRangeSeparator,\n 2,\n )\n .map((val) => val.trim());\n const startDateNew = parseDate(\n valueStart ?? \"\",\n dateFormat,\n this.props.locale,\n strictParsing,\n );\n const endDateNew = startDateNew\n ? parseDate(\n valueEnd ?? \"\",\n dateFormat,\n this.props.locale,\n strictParsing,\n )\n : null;\n const startChanged =\n safeToDate(startDate)?.getTime() !== startDateNew?.getTime();\n const endChanged =\n safeToDate(endDate)?.getTime() !== endDateNew?.getTime();\n\n if (!startChanged && !endChanged) {\n return;\n }\n\n if (startDateNew && isDayDisabled(startDateNew, this.props)) {\n return;\n }\n if (endDateNew && isDayDisabled(endDateNew, this.props)) {\n return;\n }\n\n // Update preSelection to keep calendar viewport consistent when reopening\n // Use startDate for preSelection to match calcInitialState behavior\n if (startDateNew) {\n this.setState({ preSelection: startDateNew });\n }\n\n this.props.onChange?.([startDateNew, endDateNew], event);\n } else {\n // not selectsRange\n const date = parseDate(\n value,\n dateFormat,\n this.props.locale,\n strictParsing,\n this.props.selected ?? undefined,\n );\n\n // Update selection if either (1) date was successfully parsed, or (2) input field is empty\n if (date || !value) {\n this.setSelected(date, event, true);\n } else if (!this.props.inline) {\n // If full date parsing failed but we have partial input,\n // try to extract date info for calendar navigation\n const navDate = parseDateForNavigation(\n value,\n this.state.preSelection ?? undefined,\n );\n // Only update preSelection if navDate is valid and within min/max bounds\n if (\n navDate &&\n (!this.props.minDate || !isBefore(navDate, this.props.minDate)) &&\n (!this.props.maxDate || !isAfter(navDate, this.props.maxDate))\n ) {\n this.setState({ preSelection: navDate });\n }\n }\n }\n };\n\n handleSelect = (\n date: Date,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n monthSelectedIn?: number,\n ) => {\n if (this.props.readOnly) return;\n\n const { selectsRange, startDate, endDate, locale, swapRange } = this.props;\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n const isDateSelectionComplete =\n !selectsRange ||\n (startDate && !endDate && (swapRange || !isDateBefore(date, startDate)));\n\n if (\n this.props.shouldCloseOnSelect &&\n !this.props.showTimeSelect &&\n isDateSelectionComplete\n ) {\n // Preventing onFocus event to fix issue\n // https://github.com/Hacker0x01/react-datepicker/issues/628\n this.sendFocusBackToInput();\n }\n if (this.props.onChangeRaw) {\n const formattedDate = safeDateFormat(date, {\n dateFormat,\n locale,\n });\n this.props.onChangeRaw(event, { date, formattedDate });\n }\n this.setSelected(date, event, false, monthSelectedIn);\n if (this.props.showDateSelect) {\n this.setState({ isRenderAriaLiveMessage: true });\n }\n if (!this.props.shouldCloseOnSelect || this.props.showTimeSelect) {\n this.setPreSelection(date);\n } else if (isDateSelectionComplete) {\n this.setOpen(false);\n }\n };\n\n // setSelected is called either from handleChange (user typed date into textbox and it was parsed) or handleSelect (user selected date from calendar using mouse or keyboard)\n setSelected = (\n date: Date | null,\n event?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n keepInput?: boolean,\n monthSelectedIn?: number,\n ) => {\n const { timeZone } = this.props;\n\n // If timezone is specified, convert the selected date from zoned time to UTC\n // This ensures the onChange callback receives a proper UTC Date object\n let changedDate = date;\n if (changedDate && timeZone) {\n changedDate = fromZonedTime(changedDate, timeZone);\n }\n\n // Early return if selected year/month/day is disabled\n if (this.props.showYearPicker) {\n if (\n changedDate !== null &&\n isYearDisabled(getYear(changedDate), this.props)\n ) {\n return;\n }\n } else if (this.props.showMonthYearPicker) {\n if (changedDate !== null && isMonthDisabled(changedDate, this.props)) {\n return;\n }\n } else {\n if (changedDate !== null && isDayDisabled(changedDate, this.props)) {\n return;\n }\n }\n\n const {\n onChange,\n selectsRange,\n startDate,\n endDate,\n selectsMultiple,\n selectedDates,\n minTime,\n swapRange,\n } = this.props;\n\n if (\n !isEqual(this.props.selected, changedDate) ||\n this.props.allowSameDay ||\n selectsRange ||\n selectsMultiple\n ) {\n if (changedDate !== null) {\n // Preserve previously selected time if only date is currently being changed\n if (\n this.props.selected &&\n (!keepInput ||\n (!this.props.showTimeSelect &&\n !this.props.showTimeSelectOnly &&\n !this.props.showTimeInput))\n ) {\n changedDate = setTime(changedDate, {\n hour: getHours(this.props.selected),\n minute: getMinutes(this.props.selected),\n second: getSeconds(this.props.selected),\n });\n }\n\n // If minTime is present then set the time to minTime\n if (\n !keepInput &&\n (this.props.showTimeSelect || this.props.showTimeSelectOnly)\n ) {\n if (minTime) {\n changedDate = setTime(changedDate, {\n hour: minTime.getHours(),\n minute: minTime.getMinutes(),\n second: minTime.getSeconds(),\n });\n }\n }\n\n if (!this.props.inline) {\n this.setState({\n preSelection: changedDate,\n });\n }\n if (!this.props.focusSelectedMonth) {\n this.setState({ monthSelectedIn: monthSelectedIn });\n }\n }\n\n if (selectsRange) {\n const onChangeRange = onChange as OnChangeRange | undefined;\n const noRanges = !startDate && !endDate;\n const hasStartRange = startDate && !endDate;\n const hasOnlyEndRange = !startDate && !!endDate;\n const isRangeFilled = startDate && endDate;\n if (noRanges) {\n onChangeRange?.([changedDate, null], event);\n } else if (hasStartRange) {\n if (changedDate === null) {\n onChangeRange?.([null, null], event);\n } else if (isDateBefore(changedDate, startDate)) {\n if (swapRange) {\n onChangeRange?.([changedDate, startDate], event);\n } else {\n onChangeRange?.([changedDate, null], event);\n }\n } else {\n onChangeRange?.([startDate, changedDate], event);\n }\n } else if (hasOnlyEndRange) {\n if (changedDate && isDateBefore(changedDate, endDate)) {\n onChangeRange?.([changedDate, endDate], event);\n } else {\n onChangeRange?.([changedDate, null], event);\n }\n }\n if (isRangeFilled) {\n onChangeRange?.([changedDate, null], event);\n }\n } else if (selectsMultiple) {\n const onChangeMultiple = onChange as OnChangeMultiple | undefined;\n if (changedDate !== null) {\n if (!selectedDates?.length) {\n onChangeMultiple?.([changedDate], event);\n } else {\n const isChangedDateAlreadySelected = selectedDates.some(\n (selectedDate) => isSameDay(selectedDate, changedDate),\n );\n\n if (isChangedDateAlreadySelected) {\n const nextDates = selectedDates.filter(\n (selectedDate) => !isSameDay(selectedDate, changedDate),\n );\n\n onChangeMultiple?.(nextDates, event);\n } else {\n onChangeMultiple?.([...selectedDates, changedDate], event);\n }\n }\n }\n } else {\n (onChange as OnChangeSingle | undefined)?.(changedDate, event);\n }\n }\n\n if (!keepInput) {\n this.props.onSelect?.(changedDate, event);\n this.setState({ inputValue: null });\n }\n };\n\n // When checking preSelection via min/maxDate, times need to be manipulated via getStartOfDay/getEndOfDay\n setPreSelection = (date?: Date | null): void => {\n if (this.props.readOnly) return;\n const hasMinDate = isDate(this.props.minDate);\n const hasMaxDate = isDate(this.props.maxDate);\n let isValidDateSelection = true;\n if (date) {\n const dateStartOfDay = getStartOfDay(date);\n if (hasMinDate && hasMaxDate) {\n // isDayInRange uses getStartOfDay internally, so not necessary to manipulate times here\n isValidDateSelection = isDayInRange(\n date,\n this.props.minDate,\n this.props.maxDate,\n );\n } else if (hasMinDate) {\n const minDateStartOfDay = getStartOfDay(this.props.minDate);\n isValidDateSelection =\n isAfter(date, minDateStartOfDay) ||\n isEqual(dateStartOfDay, minDateStartOfDay);\n } else if (hasMaxDate) {\n const maxDateEndOfDay = getEndOfDay(this.props.maxDate);\n isValidDateSelection =\n isBefore(date, maxDateEndOfDay) ||\n isEqual(dateStartOfDay, maxDateEndOfDay);\n }\n }\n if (isValidDateSelection) {\n this.setState({\n preSelection: date,\n });\n }\n };\n\n toggleCalendar = (): void => {\n this.setOpen(!this.state.open);\n };\n\n handleTimeChange = (time: Date, modifyDateType?: \"start\" | \"end\"): void => {\n if (this.props.selectsMultiple) {\n return;\n }\n\n const { selectsRange, startDate, endDate, onChange, timeZone } = this.props;\n\n if (selectsRange) {\n const onChangeRange = onChange as OnChangeRange | undefined;\n // In range mode, apply time to the appropriate date\n // If modifyDateType is specified, use that to determine which date to modify\n // Otherwise, use the legacy behavior:\n // - If we have a startDate but no endDate, apply time to startDate\n // - If we have both, apply time to endDate\n\n if (modifyDateType === \"start\") {\n // Explicitly modify start date\n if (startDate) {\n let changedStartDate = setTime(startDate, {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n this.setState({\n preSelection: changedStartDate,\n });\n // Convert from zoned time to UTC if timezone is specified\n if (timeZone) {\n changedStartDate = fromZonedTime(changedStartDate, timeZone);\n }\n onChangeRange?.(\n [\n changedStartDate,\n endDate\n ? timeZone\n ? fromZonedTime(endDate, timeZone)\n : endDate\n : null,\n ],\n undefined,\n );\n }\n } else if (modifyDateType === \"end\") {\n // Explicitly modify end date\n if (endDate) {\n let changedEndDate = setTime(endDate, {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n this.setState({\n preSelection: changedEndDate,\n });\n // Convert from zoned time to UTC if timezone is specified\n if (timeZone) {\n changedEndDate = fromZonedTime(changedEndDate, timeZone);\n }\n onChangeRange?.(\n [\n startDate\n ? timeZone\n ? fromZonedTime(startDate, timeZone)\n : startDate\n : null,\n changedEndDate,\n ],\n undefined,\n );\n }\n } else {\n // Legacy behavior for showTimeSelect (single time picker)\n const hasStartRange = startDate && !endDate;\n\n if (hasStartRange) {\n // Apply time to startDate\n let changedStartDate = setTime(startDate, {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n this.setState({\n preSelection: changedStartDate,\n });\n // Convert from zoned time to UTC if timezone is specified\n if (timeZone) {\n changedStartDate = fromZonedTime(changedStartDate, timeZone);\n }\n onChangeRange?.([changedStartDate, null], undefined);\n } else if (startDate && endDate) {\n // Apply time to endDate\n let changedEndDate = setTime(endDate, {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n this.setState({\n preSelection: changedEndDate,\n });\n // Convert from zoned time to UTC if timezone is specified\n if (timeZone) {\n changedEndDate = fromZonedTime(changedEndDate, timeZone);\n }\n onChangeRange?.(\n [\n timeZone ? fromZonedTime(startDate, timeZone) : startDate,\n changedEndDate,\n ],\n undefined,\n );\n } else {\n // No dates selected yet, just update preSelection\n const changedDate = setTime(this.getPreSelection(), {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n this.setState({\n preSelection: changedDate,\n });\n }\n }\n } else {\n // Single date mode (original behavior)\n const selected = this.props.selected\n ? this.props.selected\n : this.getPreSelection();\n let changedDate = this.props.selected\n ? time\n : setTime(selected, {\n hour: getHours(time),\n minute: getMinutes(time),\n });\n\n this.setState({\n preSelection: changedDate,\n });\n\n // Convert from zoned time to UTC if timezone is specified\n if (changedDate && timeZone) {\n changedDate = fromZonedTime(changedDate, timeZone);\n }\n\n (this.props.onChange as OnChangeSingle | undefined)?.(changedDate);\n }\n\n if (this.props.shouldCloseOnSelect && !this.props.showTimeInput) {\n this.sendFocusBackToInput();\n this.setOpen(false);\n }\n if (this.props.showTimeInput) {\n this.setOpen(true);\n }\n if (this.props.showTimeSelectOnly || this.props.showTimeSelect) {\n this.setState({ isRenderAriaLiveMessage: true });\n }\n this.setState({ inputValue: null });\n };\n\n onInputClick = (): void => {\n if (!this.props.disabled && !this.props.readOnly) {\n this.setOpen(true);\n }\n\n this.props.onInputClick?.();\n };\n\n handleTimeOnlyArrowKey = (eventKey: string): void => {\n const currentTime =\n safeToDate(this.props.selected) || this.state.preSelection || newDate();\n const timeIntervals = this.props.timeIntervals ?? 30;\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n const formatStr = Array.isArray(dateFormat) ? dateFormat[0] : dateFormat;\n\n const baseDate = getStartOfDay(currentTime);\n const currentMinutes = getHours(currentTime) * 60 + getMinutes(currentTime);\n\n const maxMinutes = 23 * 60 + 60 - timeIntervals; // Cap at last valid interval of the day\n let newTime: Date;\n if (eventKey === KeyType.ArrowUp) {\n const newMinutes = Math.max(0, currentMinutes - timeIntervals);\n newTime = addMinutes(baseDate, newMinutes);\n } else {\n const newMinutes = Math.min(maxMinutes, currentMinutes + timeIntervals);\n newTime = addMinutes(baseDate, newMinutes);\n }\n\n const formattedTime = formatDate(\n newTime,\n formatStr || DatePicker.defaultProps.dateFormat,\n this.props.locale,\n );\n this.setState({\n preSelection: newTime,\n inputValue: formattedTime,\n });\n\n if (this.props.selectsRange || this.props.selectsMultiple) {\n return;\n }\n\n const selected = this.props.selected\n ? this.props.selected\n : this.getPreSelection();\n const changedDate = this.props.selected\n ? newTime\n : setTime(selected, {\n hour: getHours(newTime),\n minute: getMinutes(newTime),\n });\n\n (this.props.onChange as OnChangeSingle | undefined)?.(changedDate);\n\n if (this.props.showTimeSelectOnly || this.props.showTimeSelect) {\n this.setState({ isRenderAriaLiveMessage: true });\n }\n\n requestAnimationFrame(() => {\n this.scrollToTimeOption(newTime);\n });\n };\n\n handleTimeOnlyEnterKey = (event: React.KeyboardEvent<HTMLElement>): void => {\n const inputElement = event.target as HTMLInputElement;\n const inputValue = inputElement.value;\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n const timeFormat = this.props.timeFormat || \"p\";\n\n const defaultTime =\n this.state.preSelection || safeToDate(this.props.selected) || newDate();\n const parsedDate = parseDate(\n inputValue,\n dateFormat,\n this.props.locale,\n this.props.strictParsing ?? false,\n defaultTime,\n );\n\n let timeToCommit: Date = defaultTime;\n\n if (parsedDate && isValid(parsedDate)) {\n timeToCommit = parsedDate;\n } else {\n const highlightedItem =\n this.calendar?.containerRef.current instanceof Element &&\n this.calendar.containerRef.current.querySelector(\n \".react-datepicker__time-list-item[tabindex='0']\",\n );\n\n if (highlightedItem instanceof HTMLElement) {\n const itemText = highlightedItem.textContent?.trim();\n if (itemText) {\n const itemTime = parseDate(\n itemText,\n timeFormat,\n this.props.locale,\n false,\n defaultTime,\n );\n if (itemTime && isValid(itemTime)) {\n timeToCommit = itemTime;\n }\n }\n }\n }\n\n this.handleTimeChange(timeToCommit);\n this.setOpen(false);\n this.sendFocusBackToInput();\n };\n\n scrollToTimeOption = (time: Date): void => {\n if (!this.calendar?.containerRef.current) {\n return;\n }\n\n const container = this.calendar.containerRef.current;\n const timeListItems = Array.from(\n container.querySelectorAll<HTMLLIElement>(\n \".react-datepicker__time-list-item\",\n ),\n );\n\n let targetItem: HTMLLIElement | null = null;\n let closestTimeDiff = Infinity;\n const timeFormat = this.props.timeFormat || \"p\";\n\n for (const item of timeListItems) {\n const itemText = item.textContent?.trim();\n if (itemText) {\n const itemTime = parseDate(\n itemText,\n timeFormat,\n this.props.locale,\n false,\n time,\n );\n if (itemTime && isValid(itemTime)) {\n if (isSameMinute(itemTime, time)) {\n targetItem = item;\n break;\n }\n const timeDiff = Math.abs(itemTime.getTime() - time.getTime());\n if (timeDiff < closestTimeDiff) {\n closestTimeDiff = timeDiff;\n targetItem = item;\n }\n }\n }\n }\n\n if (targetItem) {\n timeListItems.forEach((item) => {\n item.setAttribute(\"tabindex\", \"-1\");\n });\n targetItem.setAttribute(\"tabindex\", \"0\");\n\n targetItem.scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n });\n }\n };\n\n onInputKeyDown = (event: React.KeyboardEvent<HTMLElement>): void => {\n this.props.onKeyDown?.(event);\n const eventKey = event.key;\n\n if (\n !this.state.open &&\n !this.props.inline &&\n !this.props.preventOpenOnFocus\n ) {\n if (\n eventKey === KeyType.ArrowDown ||\n eventKey === KeyType.ArrowUp ||\n eventKey === KeyType.Enter\n ) {\n this.onInputClick?.();\n }\n return;\n }\n\n if (this.state.open && this.props.showTimeSelectOnly) {\n if (eventKey === KeyType.ArrowDown || eventKey === KeyType.ArrowUp) {\n event.preventDefault();\n this.handleTimeOnlyArrowKey(eventKey);\n return;\n }\n\n if (eventKey === KeyType.Enter) {\n event.preventDefault();\n this.handleTimeOnlyEnterKey(event);\n return;\n }\n }\n\n // if calendar is open, these keys will focus the selected item\n if (this.state.open) {\n if (eventKey === KeyType.ArrowDown || eventKey === KeyType.ArrowUp) {\n event.preventDefault();\n const selectorString = this.props.showTimeSelectOnly\n ? \".react-datepicker__time-list-item[tabindex='0']\"\n : this.props.showWeekPicker && this.props.showWeekNumbers\n ? '.react-datepicker__week-number[tabindex=\"0\"]'\n : this.props.showFullMonthYearPicker ||\n this.props.showMonthYearPicker\n ? '.react-datepicker__month-text[tabindex=\"0\"]'\n : '.react-datepicker__day[tabindex=\"0\"]';\n const selectedItem =\n this.calendar?.containerRef.current instanceof Element &&\n this.calendar.containerRef.current.querySelector(selectorString);\n selectedItem instanceof HTMLElement &&\n selectedItem.focus({ preventScroll: true });\n\n return;\n }\n\n const copy = newDate(this.state.preSelection);\n if (eventKey === KeyType.Enter) {\n event.preventDefault();\n (event.target as HTMLInputElement).blur();\n if (\n this.inputOk() &&\n this.state.lastPreSelectChange === PRESELECT_CHANGE_VIA_NAVIGATE\n ) {\n this.handleSelect(copy, event);\n !this.props.shouldCloseOnSelect && this.setPreSelection(copy);\n } else {\n this.setOpen(false);\n }\n } else if (eventKey === KeyType.Escape) {\n event.preventDefault();\n (event.target as HTMLInputElement).blur();\n this.sendFocusBackToInput();\n this.setOpen(false);\n } else if (eventKey === KeyType.Tab) {\n this.setOpen(false);\n }\n\n if (!this.inputOk()) {\n this.props.onInputError?.({ code: 1, msg: INPUT_ERR_1 });\n }\n }\n };\n\n onPortalKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n const eventKey = event.key;\n if (eventKey === KeyType.Escape) {\n event.preventDefault();\n this.setState(\n {\n preventFocus: true,\n },\n () => {\n this.setOpen(false);\n setTimeout(() => {\n this.setFocus();\n this.setState({ preventFocus: false });\n });\n },\n );\n }\n };\n\n // keyDown events passed down to day.jsx\n onDayKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const {\n minDate,\n maxDate,\n disabledKeyboardNavigation,\n showWeekPicker,\n shouldCloseOnSelect,\n locale,\n calendarStartDay,\n adjustDateOnChange,\n inline,\n } = this.props;\n this.props.onKeyDown?.(event);\n if (disabledKeyboardNavigation) return;\n const eventKey = event.key as KeyType;\n const isShiftKeyActive = event.shiftKey;\n\n const copy = newDate(this.state.preSelection);\n\n const calculateNewDate = (eventKey: KeyType, date: Date): Date => {\n let newCalculatedDate = date;\n switch (eventKey) {\n case KeyType.ArrowRight:\n newCalculatedDate = showWeekPicker\n ? addWeeks(date, 1)\n : addDays(date, 1);\n break;\n case KeyType.ArrowLeft:\n newCalculatedDate = showWeekPicker\n ? subWeeks(date, 1)\n : subDays(date, 1);\n break;\n case KeyType.ArrowUp:\n newCalculatedDate = subWeeks(date, 1);\n break;\n case KeyType.ArrowDown:\n newCalculatedDate = addWeeks(date, 1);\n break;\n case KeyType.PageUp:\n newCalculatedDate = isShiftKeyActive\n ? subYears(date, 1)\n : subMonths(date, 1);\n break;\n case KeyType.PageDown:\n newCalculatedDate = isShiftKeyActive\n ? addYears(date, 1)\n : addMonths(date, 1);\n break;\n case KeyType.Home:\n newCalculatedDate = getStartOfWeek(date, locale, calendarStartDay);\n break;\n case KeyType.End:\n newCalculatedDate = getEndOfWeek(date);\n break;\n }\n return newCalculatedDate;\n };\n\n const getNewDate = (eventKey: KeyType, date: Date): Date => {\n const MAX_ITERATIONS = 40;\n let eventKeyCopy = eventKey;\n let validDateFound = false;\n let iterations = 0;\n let newSelection = calculateNewDate(eventKey, date);\n\n while (!validDateFound) {\n if (iterations >= MAX_ITERATIONS) {\n newSelection = date;\n break;\n }\n // if minDate exists and the new selection is before the min date, get the nearest date that isn't disabled\n if (minDate && newSelection < minDate) {\n eventKeyCopy = KeyType.ArrowRight;\n newSelection = isDayDisabled(minDate, this.props)\n ? calculateNewDate(eventKeyCopy, newSelection)\n : minDate;\n }\n\n // if maxDate exists and the new selection is after the max date, get the nearest date that isn't disabled\n if (maxDate && newSelection > maxDate) {\n eventKeyCopy = KeyType.ArrowLeft;\n newSelection = isDayDisabled(maxDate, this.props)\n ? calculateNewDate(eventKeyCopy, newSelection)\n : maxDate;\n }\n\n if (isDayDisabled(newSelection, this.props)) {\n // if PageUp and Home is pressed to a disabled date, it will try to find the next available date after\n if (\n eventKeyCopy === KeyType.PageUp ||\n eventKeyCopy === KeyType.Home\n ) {\n eventKeyCopy = KeyType.ArrowRight;\n }\n\n // if PageDown and End is pressed to a disabled date, it will try to find the next available date before\n if (\n eventKeyCopy === KeyType.PageDown ||\n eventKeyCopy === KeyType.End\n ) {\n eventKeyCopy = KeyType.ArrowLeft;\n }\n newSelection = calculateNewDate(eventKeyCopy, newSelection);\n } else {\n validDateFound = true;\n }\n iterations++;\n }\n\n return newSelection;\n };\n\n if (eventKey === KeyType.Enter) {\n event.preventDefault();\n this.handleSelect(copy, event);\n !shouldCloseOnSelect && this.setPreSelection(copy);\n return;\n } else if (eventKey === KeyType.Escape) {\n event.preventDefault();\n\n this.setOpen(false);\n if (!this.inputOk()) {\n this.props.onInputError?.({ code: 1, msg: INPUT_ERR_1 });\n }\n return;\n }\n\n let newSelection = null;\n switch (eventKey) {\n case KeyType.ArrowLeft:\n case KeyType.ArrowRight:\n case KeyType.ArrowUp:\n case KeyType.ArrowDown:\n case KeyType.PageUp:\n case KeyType.PageDown:\n case KeyType.Home:\n case KeyType.End:\n newSelection = getNewDate(eventKey, copy);\n break;\n }\n if (!newSelection) {\n this.props.onInputError?.({ code: 1, msg: INPUT_ERR_1 });\n return;\n }\n event.preventDefault();\n this.setState({ lastPreSelectChange: PRESELECT_CHANGE_VIA_NAVIGATE });\n if (adjustDateOnChange) {\n this.setSelected(newSelection);\n }\n this.setPreSelection(newSelection);\n // In inline mode, always set shouldFocusDayInline to true when navigating via keyboard.\n // This ensures focus is properly transferred to the new day element regardless of\n // whether the month changed. The user initiated this navigation from a focused day,\n // so we should always focus the destination day.\n if (inline) {\n this.setState({ shouldFocusDayInline: true });\n }\n };\n\n // handle generic key down events in the popper that do not adjust or select dates\n // ex: while focusing prev and next month buttons\n onPopperKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): void => {\n const eventKey = event.key;\n if (eventKey === KeyType.Escape) {\n event.preventDefault();\n this.sendFocusBackToInput();\n this.setOpen(false);\n }\n };\n\n onClearClick = (event?: React.MouseEvent<HTMLButtonElement>): void => {\n if (event) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n }\n\n this.sendFocusBackToInput();\n\n const { selectsRange, onChange } = this.props;\n if (selectsRange) {\n (onChange as OnChangeRange | undefined)?.([null, null], event);\n } else {\n (onChange as OnChangeSingle | undefined)?.(null, event);\n }\n\n this.setState({ inputValue: null });\n };\n\n clear = () => {\n this.onClearClick();\n };\n\n onScroll = (event: Event): void => {\n if (\n typeof this.props.closeOnScroll === \"boolean\" &&\n this.props.closeOnScroll\n ) {\n if (\n event.target === document ||\n event.target === document.documentElement ||\n event.target === document.body\n ) {\n this.setOpen(false);\n }\n } else if (typeof this.props.closeOnScroll === \"function\") {\n if (this.props.closeOnScroll(event)) {\n this.setOpen(false);\n }\n }\n };\n\n handleMonthSelectedInChange = (monthSelectedIn: number): void => {\n this.setState({ monthSelectedIn });\n };\n\n renderCalendar = () => {\n if (!this.props.inline && !this.isCalendarOpen()) {\n return null;\n }\n return (\n <Calendar\n showMonthYearDropdown={undefined}\n ref={(elem) => {\n this.calendar = elem;\n }}\n {...this.props}\n {...this.state}\n setOpen={this.setOpen}\n dateFormat={\n this.props.dateFormatCalendar ??\n DatePicker.defaultProps.dateFormatCalendar\n }\n onSelect={this.handleSelect}\n onClickOutside={this.handleCalendarClickOutside}\n holidays={getHolidaysMap(this.modifyHolidays())}\n outsideClickIgnoreClass={this.props.outsideClickIgnoreClass}\n onDropdownFocus={this.handleDropdownFocus}\n onTimeChange={this.handleTimeChange}\n className={this.props.calendarClassName}\n container={this.props.calendarContainer}\n handleOnKeyDown={this.props.onKeyDown}\n handleOnDayKeyDown={this.onDayKeyDown}\n setPreSelection={this.setPreSelection}\n dropdownMode={\n this.props.dropdownMode ?? DatePicker.defaultProps.dropdownMode\n }\n onMonthSelectedInChange={this.handleMonthSelectedInChange}\n >\n {this.props.children}\n </Calendar>\n );\n };\n\n renderAriaLiveRegion = () => {\n const { locale } = this.props;\n const dateFormat =\n this.props.dateFormat ?? DatePicker.defaultProps.dateFormat;\n const isContainsTime =\n this.props.showTimeInput || this.props.showTimeSelect;\n const longDateFormat = isContainsTime ? \"PPPPp\" : \"PPPP\";\n let ariaLiveMessage;\n\n if (this.props.selectsRange) {\n ariaLiveMessage = `Selected start date: ${safeDateFormat(\n this.props.startDate,\n {\n dateFormat: longDateFormat,\n locale,\n },\n )}. ${\n this.props.endDate\n ? \"End date: \" +\n safeDateFormat(this.props.endDate, {\n dateFormat: longDateFormat,\n locale,\n })\n : \"\"\n }`;\n } else {\n if (this.props.showTimeSelectOnly) {\n ariaLiveMessage = `Selected time: ${safeDateFormat(\n this.props.selected,\n { dateFormat, locale },\n )}`;\n } else if (this.props.showYearPicker) {\n ariaLiveMessage = `Selected year: ${safeDateFormat(\n this.props.selected,\n { dateFormat: \"yyyy\", locale },\n )}`;\n } else if (this.props.showMonthYearPicker) {\n ariaLiveMessage = `Selected month: ${safeDateFormat(\n this.props.selected,\n { dateFormat: \"MMMM yyyy\", locale },\n )}`;\n } else if (this.props.showQuarterYearPicker) {\n ariaLiveMessage = `Selected quarter: ${safeDateFormat(\n this.props.selected,\n {\n dateFormat: \"yyyy, QQQ\",\n locale,\n },\n )}`;\n } else {\n ariaLiveMessage = `Selected date: ${safeDateFormat(\n this.props.selected,\n {\n dateFormat: longDateFormat,\n locale,\n },\n )}`;\n }\n }\n\n return (\n <span\n role=\"alert\"\n aria-live=\"polite\"\n className=\"react-datepicker__aria-live\"\n >\n {ariaLiveMessage}\n </span>\n );\n };\n\n renderDateInput = () => {\n const className = clsx(this.props.className, {\n [this.props.outsideClickIgnoreClass ||\n DatePicker.defaultProps.outsideClickIgnoreClass]: this.state.open,\n });\n\n const customInput = this.props.customInput || <input type=\"text\" />;\n const customInputRef = this.props.customInputRef || \"ref\";\n\n // Build aria props object, only including defined values to avoid\n // overwriting aria attributes that may be set on the custom input\n const ariaProps: Record<string, string> = {};\n const ariaDescribedBy =\n this.props[\"aria-describedby\"] ?? this.props.ariaDescribedBy;\n const ariaInvalid = this.props[\"aria-invalid\"] ?? this.props.ariaInvalid;\n const ariaLabel = this.props[\"aria-label\"] ?? this.props.ariaLabel;\n const ariaLabelledBy =\n this.props[\"aria-labelledby\"] ?? this.props.ariaLabelledBy;\n const ariaRequired = this.props[\"aria-required\"] ?? this.props.ariaRequired;\n\n if (ariaDescribedBy != null)\n ariaProps[\"aria-describedby\"] = ariaDescribedBy;\n if (ariaInvalid != null) ariaProps[\"aria-invalid\"] = ariaInvalid;\n if (ariaLabel != null) ariaProps[\"aria-label\"] = ariaLabel;\n if (ariaLabelledBy != null) ariaProps[\"aria-labelledby\"] = ariaLabelledBy;\n if (ariaRequired != null) ariaProps[\"aria-required\"] = ariaRequired;\n\n return cloneElement(customInput, {\n [customInputRef]: (input: HTMLElement | null) => {\n this.input = input;\n },\n value: this.getInputValue(),\n onBlur: this.handleBlur,\n onChange: this.handleChange,\n onClick: this.onInputClick,\n onFocus: this.handleFocus,\n onKeyDown: this.onInputKeyDown,\n id: this.props.id,\n name: this.props.name,\n form: this.props.form,\n autoFocus: this.props.autoFocus,\n placeholder: this.props.placeholderText,\n disabled: this.props.disabled,\n autoComplete: this.props.autoComplete,\n className: clsx(customInput.props.className, className),\n title: this.props.title,\n readOnly: this.props.readOnly,\n required: this.props.required,\n tabIndex: this.props.tabIndex,\n ...ariaProps,\n });\n };\n\n renderClearButton = (): React.ReactElement | null => {\n const {\n isClearable,\n disabled,\n selected,\n startDate,\n endDate,\n clearButtonTitle,\n clearButtonClassName = \"\",\n ariaLabelClose = \"Close\",\n selectedDates,\n readOnly,\n } = this.props;\n if (\n isClearable &&\n !readOnly &&\n (selected != null ||\n startDate != null ||\n endDate != null ||\n selectedDates?.length)\n ) {\n return (\n <button\n type=\"button\"\n className={clsx(\n \"react-datepicker__close-icon\",\n clearButtonClassName,\n { \"react-datepicker__close-icon--disabled\": disabled },\n )}\n disabled={disabled}\n aria-label={ariaLabelClose}\n onClick={this.onClearClick}\n title={clearButtonTitle}\n tabIndex={-1}\n />\n );\n } else {\n return null;\n }\n };\n\n renderInputContainer(): React.ReactElement {\n const {\n showIcon,\n icon,\n calendarIconClassname,\n calendarIconClassName,\n toggleCalendarOnIconClick,\n } = this.props;\n const { open } = this.state;\n\n if (calendarIconClassname) {\n console.warn(\n `calendarIconClassname props is deprecated. should use calendarIconClassName props.`,\n );\n }\n\n return (\n <div\n className={`react-datepicker__input-container${\n showIcon ? \" react-datepicker__view-calendar-icon\" : \"\"\n }`}\n >\n {showIcon && (\n <CalendarIcon\n icon={icon}\n className={clsx(\n calendarIconClassName,\n !calendarIconClassName && calendarIconClassname,\n open && \"react-datepicker-ignore-onclickoutside\",\n )}\n {...(toggleCalendarOnIconClick\n ? {\n onClick: this.toggleCalendar,\n }\n : null)}\n />\n )}\n {this.state.isRenderAriaLiveMessage && this.renderAriaLiveRegion()}\n {this.renderDateInput()}\n {this.renderClearButton()}\n </div>\n );\n }\n\n render(): React.ReactElement | null {\n const calendar = this.renderCalendar();\n\n if (this.props.inline) return calendar;\n\n if (this.props.withPortal) {\n let portalContainer = this.state.open ? (\n <TabLoop enableTabLoop={this.props.enableTabLoop}>\n <div\n className=\"react-datepicker__portal\"\n tabIndex={-1}\n onKeyDown={this.onPortalKeyDown}\n >\n {calendar}\n </div>\n </TabLoop>\n ) : null;\n\n if (this.state.open && this.props.portalId) {\n portalContainer = (\n <Portal portalId={this.props.portalId} {...this.props}>\n {portalContainer}\n </Portal>\n );\n }\n\n return (\n <>\n {this.renderInputContainer()}\n {portalContainer}\n </>\n );\n }\n\n return (\n <PopperComponent\n {...this.props}\n className={this.props.popperClassName}\n hidePopper={!this.isCalendarOpen()}\n targetComponent={this.renderInputContainer()}\n popperComponent={calendar}\n popperOnKeyDown={this.onPopperKeyDown}\n showArrow={this.props.showPopperArrow}\n monthHeaderPosition={this.props.monthHeaderPosition}\n />\n );\n }\n}\n\nconst PRESELECT_CHANGE_VIA_INPUT = \"input\";\nconst PRESELECT_CHANGE_VIA_NAVIGATE = \"navigate\";\nexport default DatePicker;\n", "import React from 'react'\n\nimport './index.css'\n\nconst paths = {\n 24: 'M14.5 5C14.7761 5 15 5.22386 15 5.5V6H16.5C17.3284 6 18 6.67157 18 7.5V16.5C18 17.3284 17.3284 18 16.5 18H7.5C6.67157 18 6 17.3284 6 16.5V7.5C6 6.67157 6.67157 6 7.5 6H9V5.5C9 5.22386 9.22386 5 9.5 5C9.77614 5 10 5.22386 10 5.5V6H14V5.5C14 5.22386 14.2239 5 14.5 5ZM7 16.5C7 16.7761 7.22386 17 7.5 17H16.5C16.7761 17 17 16.7761 17 16.5V10H7V16.5ZM7.5 7C7.22386 7 7 7.22386 7 7.5V9H17V7.5C17 7.22386 16.7761 7 16.5 7H15V7.5C15 7.77614 14.7761 8 14.5 8C14.2239 8 14 7.77614 14 7.5V7H10V7.5C10 7.77614 9.77614 8 9.5 8C9.22386 8 9 7.77614 9 7.5V7H7.5Z',\n}\n\nexport const CalendarIcon: React.FC<{\n readonly className?: string\n}> = ({ className }) => (\n <svg\n className={['icon', 'icon--calendar', className].filter(Boolean).join(' ')}\n fill=\"none\"\n height={24}\n viewBox=\"0 0 24 24\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"fill\"\n clipRule=\"evenodd\"\n d={paths[24]}\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n />\n </svg>\n)\n", "import React from 'react'\n\nimport './index.css'\n\ntype Direction = 'down' | 'left' | 'right' | 'up'\n\nconst paths: Record<16 | 24, string> = {\n 16: 'M9.76777 6.76764C9.96304 6.57248 10.2796 6.57241 10.4748 6.76764C10.67 6.96288 10.6699 7.27943 10.4748 7.47467L8.35371 9.59577C8.15847 9.79101 7.84194 9.79096 7.64668 9.59577L5.52461 7.47467C5.32969 7.27948 5.32969 6.96284 5.52461 6.76764C5.71988 6.57248 6.03738 6.57241 6.23261 6.76764L8.00019 8.53522L9.76777 6.76764Z',\n 24: 'M8.35352 10.1465C8.15825 9.9512 7.84175 9.9512 7.64648 10.1465C7.45122 10.3417 7.45122 10.6583 7.64648 10.8535L11.6465 14.8535C11.8417 15.0488 12.1583 15.0488 12.3535 14.8535L16.3535 10.8535C16.5488 10.6583 16.5488 10.3417 16.3535 10.1465C16.1583 9.9512 15.8417 9.9512 15.6465 10.1465L12 13.793L8.35352 10.1465Z',\n}\n\nconst rotations: Record<Direction, number> = {\n down: 0,\n left: 90,\n right: -90,\n up: 180,\n}\n\nexport type ChevronIconProps = {\n readonly ariaLabel?: string\n readonly className?: string\n readonly direction?: Direction\n readonly size?: 16 | 24\n}\n\nexport const ChevronIcon: React.FC<ChevronIconProps> = ({\n ariaLabel,\n className,\n direction = 'down',\n size = 24,\n}) => (\n <svg\n aria-label={ariaLabel}\n className={['icon', 'icon--chevron', className].filter(Boolean).join(' ')}\n fill=\"none\"\n height={size}\n style={{ transform: rotations[direction] ? `rotate(${rotations[direction]}deg)` : undefined }}\n viewBox={`0 0 ${size} ${size}`}\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path className=\"fill\" clipRule=\"evenodd\" d={paths[size]} fillRule=\"evenodd\" />\n </svg>\n)\n", "'use client'\nimport type {\n AcceptedLanguages,\n ClientTranslationKeys,\n ClientTranslationsObject,\n I18nClient,\n I18nOptions,\n Language,\n TFunction,\n} from '@payloadcms/translations'\nimport type { Locale } from 'date-fns'\nimport type { LanguageOptions } from 'payload'\n\nimport { importDateFNSLocale, t } from '@payloadcms/translations'\nimport { enUS } from 'date-fns/locale/en-US'\nimport React, { createContext, use, useEffect, useState } from 'react'\n\nimport { useRouter } from '../RouterAdapter/index.js'\nimport { useServerFunctions } from '../ServerFunctions/index.js'\n\ntype ContextType<\n TAdditionalTranslations = {},\n TAdditionalClientTranslationKeys extends string = never,\n> = {\n i18n: [TAdditionalClientTranslationKeys] extends [never]\n ? I18nClient\n : TAdditionalTranslations extends object\n ? I18nClient<TAdditionalTranslations, TAdditionalClientTranslationKeys>\n : I18nClient<ClientTranslationsObject, TAdditionalClientTranslationKeys>\n languageOptions: LanguageOptions\n switchLanguage?: (lang: AcceptedLanguages) => Promise<void>\n t: TFunction<ClientTranslationKeys | Extract<TAdditionalClientTranslationKeys, string>>\n}\n\nconst Context = createContext<ContextType<any, any>>({\n // Use `any` here to be replaced later with a more specific type when used\n i18n: {\n dateFNS: enUS,\n dateFNSKey: 'en-US',\n fallbackLanguage: 'en',\n language: 'en',\n t: (key) => key,\n translations: {} as any,\n },\n languageOptions: undefined,\n switchLanguage: undefined,\n t: (key) => undefined,\n})\n\ntype Props = {\n children: React.ReactNode\n dateFNSKey: Language['dateFNSKey']\n fallbackLang: I18nOptions['fallbackLanguage']\n language: string\n languageOptions: LanguageOptions\n translations: I18nClient['translations']\n}\n\nexport const TranslationProvider: React.FC<Props> = ({\n children,\n dateFNSKey,\n fallbackLang,\n language,\n languageOptions,\n translations,\n}) => {\n const router = useRouter()\n const { switchLanguage: switchLanguageServerFn } = useServerFunctions()\n const [dateFNS, setDateFNS] = useState<Locale>()\n\n const nextT: ContextType['t'] = React.useCallback(\n (key, vars): string =>\n t({\n key,\n translations,\n vars,\n }),\n [translations],\n )\n\n const switchLanguage = React.useCallback(\n async (lang: string) => {\n try {\n await switchLanguageServerFn(lang)\n router.refresh()\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(`Error loading language: \"${lang}\"`, error)\n }\n },\n [switchLanguageServerFn, router],\n )\n\n useEffect(() => {\n // en-US is date-fns' default locale, so it's already part of the bundle\n if (dateFNSKey === 'en-US') {\n setDateFNS(enUS)\n return\n }\n\n let isCancelled = false\n const loadDateFNS = async () => {\n const imported = await importDateFNSLocale(dateFNSKey)\n\n if (!isCancelled) {\n setDateFNS(imported)\n }\n }\n\n void loadDateFNS()\n\n return () => {\n isCancelled = true\n }\n }, [dateFNSKey])\n\n return (\n <Context\n value={{\n i18n: {\n dateFNS,\n dateFNSKey,\n fallbackLanguage: fallbackLang,\n language,\n t: nextT,\n translations,\n },\n languageOptions,\n switchLanguage,\n t: nextT,\n }}\n >\n {children}\n </Context>\n )\n}\n\nexport const useTranslation = <\n TAdditionalTranslations = {},\n TAdditionalClientTranslationKeys extends string = never,\n>() => use<ContextType<TAdditionalTranslations, TAdditionalClientTranslationKeys>>(Context)\n", "import type {\n AdminViewServerPropsOnly,\n BuildFormStateArgs,\n BuildTableStateArgs,\n Data,\n DocumentPreferences,\n DocumentSlots,\n FormState,\n Params,\n RenderDocumentVersionsProperties,\n ServerFunction,\n ServerFunctionClient,\n SlugifyServerFunctionArgs,\n} from 'payload'\nimport type { Slugify } from 'payload/shared'\n\nimport React, { createContext, useCallback } from 'react'\n\nimport type {\n RenderFieldServerFnArgs,\n RenderFieldServerFnReturnType,\n} from '../../forms/fieldSchemasToFormState/serverFunctions/renderFieldServerFn.js'\nimport type { buildFormStateHandler } from '../../utilities/buildFormState.js'\nimport type { buildTableStateHandler } from '../../utilities/buildTableState.js'\nimport type { CopyDataFromLocaleArgs } from '../../utilities/copyDataFromLocale.js'\nimport type {\n getUpcomingScheduledPublishHandler,\n GetUpcomingScheduledPublishHandlerArgs,\n schedulePublishHandler,\n SchedulePublishHandlerArgs,\n} from '../../utilities/schedulePublishHandler.js'\n\ntype GetFormStateClient = (\n args: {\n signal?: AbortSignal\n } & Omit<BuildFormStateArgs, 'clientConfig' | 'req'>,\n) => ReturnType<typeof buildFormStateHandler>\n\ntype SchedulePublishClient = (\n args: {\n signal?: AbortSignal\n } & Omit<SchedulePublishHandlerArgs, 'clientConfig' | 'req'>,\n) => ReturnType<typeof schedulePublishHandler>\n\ntype GetUpcomingScheduledPublishClient = (\n args: {\n signal?: AbortSignal\n } & Omit<GetUpcomingScheduledPublishHandlerArgs, 'clientConfig' | 'req'>,\n) => ReturnType<typeof getUpcomingScheduledPublishHandler>\n\ntype GetTableStateClient = (\n args: {\n signal?: AbortSignal\n } & Omit<BuildTableStateArgs, 'clientConfig' | 'req'>,\n) => ReturnType<typeof buildTableStateHandler>\n\ntype SlugifyClient = (\n args: {\n signal?: AbortSignal\n } & Omit<SlugifyServerFunctionArgs, 'clientConfig' | 'req'>,\n) => ReturnType<Slugify>\n\nexport type RenderDocumentResult = {\n data: any\n Document: React.ReactNode\n preferences: DocumentPreferences\n}\n\ntype RenderDocumentBaseArgs = {\n collectionSlug: string\n disableActions?: boolean\n docID: number | string\n drawerSlug?: string\n initialData?: Data\n initialState?: FormState\n overrideEntityVisibility?: boolean\n paramsOverride?: AdminViewServerPropsOnly['params']\n redirectAfterCreate?: boolean\n redirectAfterDelete: boolean\n redirectAfterDuplicate: boolean\n redirectAfterRestore?: boolean\n searchParams?: Params\n /**\n * Properties specific to the versions view\n */\n versions?: RenderDocumentVersionsProperties\n}\n\nexport type RenderDocumentServerFunction = ServerFunction<\n RenderDocumentBaseArgs,\n Promise<RenderDocumentResult>\n>\n\ntype RenderDocumentServerFunctionHookFn = (\n // No req or importMap - those are augmented by handleServerFunctions\n args: {\n signal?: AbortSignal\n } & RenderDocumentBaseArgs,\n) => Promise<RenderDocumentResult>\n\ntype CopyDataFromLocaleClient = (\n args: {\n signal?: AbortSignal\n } & Omit<CopyDataFromLocaleArgs, 'req'>,\n) => Promise<{ data: Data }>\n\ntype GetDocumentSlots = (args: {\n collectionSlug: string\n id?: number | string\n signal?: AbortSignal\n}) => Promise<DocumentSlots>\n\ntype RenderFieldClient = (args: RenderFieldServerFnArgs) => Promise<RenderFieldServerFnReturnType>\n\ntype SwitchLanguageClient = (lang: string) => Promise<void>\n\nexport type ServerFunctionsContextType = {\n _internal_renderField: RenderFieldClient\n copyDataFromLocale: CopyDataFromLocaleClient\n getDocumentSlots: GetDocumentSlots\n getFormState: GetFormStateClient\n getTableState: GetTableStateClient\n getUpcomingScheduledPublish: GetUpcomingScheduledPublishClient\n renderDocument: RenderDocumentServerFunctionHookFn\n schedulePublish: SchedulePublishClient\n serverFunction: ServerFunctionClient\n slugify: SlugifyClient\n switchLanguage: SwitchLanguageClient\n}\n\nexport const ServerFunctionsContext = createContext<ServerFunctionsContextType | undefined>(\n undefined,\n)\n\nexport const useServerFunctions = () => {\n const context = React.use(ServerFunctionsContext)\n if (context === undefined) {\n throw new Error('useServerFunctions must be used within a ServerFunctionsProvider')\n }\n return context\n}\n\nexport const ServerFunctionsProvider: React.FC<{\n children: React.ReactNode\n serverFunction: ServerFunctionClient\n}> = ({ children, serverFunction }) => {\n if (!serverFunction) {\n throw new Error('ServerFunctionsProvider requires a serverFunction prop')\n }\n\n const getDocumentSlots = useCallback<GetDocumentSlots>(\n async (args) =>\n await serverFunction({\n name: 'render-document-slots',\n args,\n }),\n [serverFunction],\n )\n\n const schedulePublish = useCallback<SchedulePublishClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args\n\n try {\n if (!remoteSignal?.aborted) {\n const result = await serverFunction({\n name: 'schedule-publish',\n args: { ...rest },\n })\n\n if (!remoteSignal?.aborted) {\n return result\n }\n }\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n\n let error = `Error scheduling ${rest.type}`\n\n if (rest.doc) {\n error += ` for document with ID ${rest.doc.value} in collection ${rest.doc.relationTo}`\n }\n\n return { error }\n },\n [serverFunction],\n )\n\n const getUpcomingScheduledPublish = useCallback<GetUpcomingScheduledPublishClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args\n\n if (remoteSignal?.aborted) {\n return []\n }\n\n const result = (await serverFunction({\n name: 'get-upcoming-scheduled-publish',\n args: rest,\n })) as Awaited<ReturnType<typeof getUpcomingScheduledPublishHandler>>\n\n return remoteSignal?.aborted ? [] : result\n },\n [serverFunction],\n )\n\n const getFormState = useCallback<GetFormStateClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args || {}\n\n try {\n if (!remoteSignal?.aborted) {\n const result = (await serverFunction({\n name: 'form-state',\n args: { fallbackLocale: false, ...rest },\n })) as Awaited<ReturnType<typeof buildFormStateHandler>> // TODO: infer this type when `strictNullChecks` is enabled\n\n if (!remoteSignal?.aborted) {\n return result\n }\n }\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n\n return { state: null }\n },\n [serverFunction],\n )\n\n const getTableState = useCallback<GetTableStateClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args || {}\n\n try {\n if (!remoteSignal?.aborted) {\n const result = (await serverFunction({\n name: 'table-state',\n args: { fallbackLocale: false, ...rest },\n })) as Awaited<ReturnType<typeof buildTableStateHandler>> // TODO: infer this type when `strictNullChecks` is enabled\n\n if (!remoteSignal?.aborted) {\n return result\n }\n }\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n\n // return { state: args.formState }\n },\n [serverFunction],\n )\n\n const renderDocument = useCallback<RenderDocumentServerFunctionHookFn>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args || {}\n try {\n const result = (await serverFunction({\n name: 'render-document',\n args: {\n fallbackLocale: false,\n ...rest,\n } as Parameters<RenderDocumentServerFunctionHookFn>[0],\n })) as Awaited<ReturnType<RenderDocumentServerFunctionHookFn>> // TODO: infer this type when `strictNullChecks` is enabled\n\n return result\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n },\n [serverFunction],\n )\n\n const copyDataFromLocale = useCallback<CopyDataFromLocaleClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args || {}\n\n const result = (await serverFunction({\n name: 'copy-data-from-locale',\n args: rest,\n })) as Data\n\n if (!remoteSignal?.aborted) {\n return { data: result }\n }\n },\n [serverFunction],\n )\n\n const _internal_renderField = useCallback<RenderFieldClient>(\n async (args) => {\n try {\n const result = (await serverFunction({\n name: 'render-field',\n args,\n })) as RenderFieldServerFnReturnType\n\n return result\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n },\n [serverFunction],\n )\n\n const slugify = useCallback<SlugifyClient>(\n async (args) => {\n const { signal: remoteSignal, ...rest } = args || {}\n\n try {\n const result = (await serverFunction({\n name: 'slugify',\n args: { ...rest },\n })) as Awaited<ReturnType<Slugify>> // TODO: infer this type when `strictNullChecks` is enabled\n\n return result\n } catch (_err) {\n console.error(_err) // eslint-disable-line no-console\n }\n },\n [serverFunction],\n )\n\n const switchLanguage = useCallback<SwitchLanguageClient>(\n async (lang) => {\n await serverFunction({\n name: 'switch-language',\n args: { lang },\n })\n },\n [serverFunction],\n )\n\n return (\n <ServerFunctionsContext\n value={{\n _internal_renderField,\n copyDataFromLocale,\n getDocumentSlots,\n getFormState,\n getTableState,\n getUpcomingScheduledPublish,\n renderDocument,\n schedulePublish,\n serverFunction,\n slugify,\n switchLanguage,\n }}\n >\n {children}\n </ServerFunctionsContext>\n )\n}\n", "'use client'\nexport const getFormattedLocale = (language = 'enUS') => {\n const formattedLocales = {\n en: 'enUS',\n my: 'enUS', // Burmese is not currently supported\n ua: 'uk',\n zh: 'zhCN',\n }\n\n const formattedLocale = formattedLocales[language] || language\n\n return formattedLocale\n}\n", "import type { DatePickerProps } from 'react-datepicker'\n\nimport { format } from 'date-fns'\nimport { getDefaultLocale } from 'react-datepicker'\n\ntype DatePickerLocale = Exclude<DatePickerProps['locale'], string | undefined>\n\nexport const hasAmbiguousYearInput = ({\n date,\n dateFormat,\n inputValue,\n locale,\n}: {\n date: Date | null\n dateFormat: string | string[]\n inputValue?: string\n locale?: DatePickerProps['locale']\n}): boolean => {\n if (!date || date.getFullYear() >= 100 || !inputValue) {\n return false\n }\n\n const formats = Array.isArray(dateFormat) ? dateFormat : [dateFormat]\n const resolvedLocale = resolveDatePickerLocale({ locale })\n\n return !formats.some(\n (dateFormat) =>\n format(date, dateFormat, {\n locale: resolvedLocale,\n useAdditionalDayOfYearTokens: true,\n useAdditionalWeekYearTokens: true,\n }) === inputValue,\n )\n}\n\nconst resolveDatePickerLocale = ({ locale }: { locale?: DatePickerProps['locale'] }) => {\n // The picker formats its explicit 'en' locale with date-fns defaults.\n if (locale === 'en') {\n return undefined\n }\n\n if (typeof locale === 'object') {\n return locale\n }\n\n // registerLocale stores names on this scope; react-datepicker exposes no registry getter.\n const scope = (typeof window !== 'undefined' ? window : globalThis) as {\n __localeData__?: Record<string, DatePickerLocale>\n }\n const defaultLocale = getDefaultLocale()\n\n return (\n (locale && scope.__localeData__?.[locale]) ||\n (defaultLocale && scope.__localeData__?.[defaultLocale]) ||\n undefined\n )\n}\n", "'use client'\n\nimport type ReactDatePicker from 'react-datepicker'\nimport type { DatePickerProps } from 'react-datepicker'\n\nimport React from 'react'\n\nimport type { Props } from './types.js'\n\ntype DatePickerComponent = typeof ReactDatePicker extends { default: infer Component }\n ? Component\n : typeof ReactDatePicker\n\nexport const useDatePickerKeyboard = ({ overrides }: Props) => {\n const datePickerRef = React.useRef<React.ComponentRef<DatePickerComponent>>(null)\n const calendarRef = React.useRef<HTMLDivElement>(null)\n const hasTypedInput = React.useRef(false)\n const shouldFocusCalendar = React.useRef(false)\n const calendarFocusFrame = React.useRef<null | number>(null)\n const onEscape = React.useCallback((event: React.KeyboardEvent) => {\n event.stopPropagation()\n if (!event.defaultPrevented) {\n event.preventDefault()\n datePickerRef.current?.setOpen(false, true)\n datePickerRef.current?.sendFocusBackToInput()\n }\n }, [])\n const onOverrideKeyDownRef = React.useRef(overrides?.onKeyDown)\n\n React.useLayoutEffect(() => {\n onOverrideKeyDownRef.current = overrides?.onKeyDown\n }, [overrides?.onKeyDown])\n\n const onCalendarKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n if (!event.defaultPrevented) {\n onOverrideKeyDownRef.current?.(event)\n }\n onEscape(event)\n }\n },\n [onEscape],\n )\n\n React.useEffect(\n () => () => {\n if (calendarFocusFrame.current !== null) {\n cancelAnimationFrame(calendarFocusFrame.current)\n }\n },\n [],\n )\n\n const onBlur: NonNullable<DatePickerProps['onBlur']> = (event) => {\n hasTypedInput.current = false\n overrides?.onBlur?.(event)\n }\n const onChangeRaw: NonNullable<DatePickerProps['onChangeRaw']> = (event, selectionMeta) => {\n overrides?.onChangeRaw?.(event, selectionMeta)\n\n if (event && !event.defaultPrevented && event.target === datePickerRef.current?.input) {\n hasTypedInput.current = true\n }\n }\n const onCalendarClose = () => {\n hasTypedInput.current = false\n shouldFocusCalendar.current = false\n if (calendarFocusFrame.current !== null) {\n cancelAnimationFrame(calendarFocusFrame.current)\n calendarFocusFrame.current = null\n }\n overrides?.onCalendarClose?.()\n }\n const onCalendarOpen = () => {\n if (shouldFocusCalendar.current) {\n calendarFocusFrame.current = requestAnimationFrame(() => {\n calendarFocusFrame.current = null\n shouldFocusCalendar.current = false\n if (!datePickerRef.current?.isCalendarOpen()) {\n return\n }\n const calendar = calendarRef.current\n const focusTarget =\n calendar?.querySelector<HTMLElement>('[tabindex=\"0\"]') ||\n calendar?.querySelector<HTMLElement>('button:not(:disabled), select:not(:disabled)')\n\n focusTarget?.focus()\n })\n }\n overrides?.onCalendarOpen?.()\n }\n const onKeyDown: NonNullable<DatePickerProps['onKeyDown']> = (event) => {\n overrides?.onKeyDown?.(event)\n\n if (event.key === 'Escape' && datePickerRef.current?.isCalendarOpen()) {\n onEscape(event)\n }\n\n if (\n !event.defaultPrevented &&\n event.target === datePickerRef.current?.input &&\n !datePickerRef.current.isCalendarOpen() &&\n ['ArrowDown', 'ArrowUp', 'Enter'].includes(event.key)\n ) {\n event.preventDefault()\n // Enter confirms typed input instead of opening the calendar over nearby controls.\n if (event.key === 'Enter' && hasTypedInput.current) {\n hasTypedInput.current = false\n datePickerRef.current.setOpen(false)\n return\n }\n shouldFocusCalendar.current = true\n datePickerRef.current?.setOpen(true)\n }\n }\n\n const onKeyDownCapture: React.KeyboardEventHandler<HTMLDivElement> = (event) => {\n // Cells handle Escape themselves, which can blur the input after we restore focus.\n // Intercept only the cell itself so nested controls can consume Escape.\n const isCalendarCell =\n event.target instanceof HTMLElement &&\n event.target.matches(\n '.react-datepicker__day, .react-datepicker__week-number, .react-datepicker__month-text, .react-datepicker__year-text',\n )\n\n if (\n event.key === 'Escape' &&\n (event.target === datePickerRef.current?.input || isCalendarCell) &&\n datePickerRef.current?.isCalendarOpen()\n ) {\n overrides?.onKeyDown?.(event)\n onEscape(event)\n }\n }\n\n return {\n calendarRef,\n datePickerRef,\n onBlur,\n onCalend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,GAAA+D,GACC,aAAGA,SACJgC,kBAAa5E,IAAA,YACb6E,iBAAA7E,IAAmB,cACnB8E,GAAkB9E,GAAA,CAAA,CAAA,CAAA,OAQ5B+E,GAAA3F",
6
+ "names": ["React", "r", "e", "t", "f", "n", "clsx", "maxTime", "minTime", "millisecondsInWeek", "millisecondsInDay", "millisecondsInMinute", "millisecondsInHour", "millisecondsInSecond", "minutesInMonth", "minutesInDay", "secondsInHour", "secondsInDay", "secondsInHour", "secondsInWeek", "secondsInYear", "secondsInMonth", "secondsInQuarter", "constructFromSymbol", "constructFrom", "date", "value", "constructFromSymbol", "toDate", "argument", "context", "constructFrom", "addDays", "date", "amount", "options", "_date", "toDate", "constructFrom", "addMonths", "date", "amount", "options", "_date", "toDate", "constructFrom", "dayOfMonth", "endOfDesiredMonth", "daysInMonth", "addMilliseconds", "date", "amount", "options", "constructFrom", "toDate", "addHours", "date", "amount", "options", "addMilliseconds", "millisecondsInHour", "defaultOptions", "getDefaultOptions", "startOfWeek", "date", "options", "defaultOptions", "getDefaultOptions", "weekStartsOn", "_date", "toDate", "day", "diff", "startOfISOWeek", "date", "options", "startOfWeek", "getISOWeekYear", "date", "options", "_date", "toDate", "year", "fourthOfJanuaryOfNextYear", "constructFrom", "startOfNextYear", "startOfISOWeek", "fourthOfJanuaryOfThisYear", "startOfThisYear", "getTimezoneOffsetInMilliseconds", "date", "_date", "toDate", "utcDate", "normalizeDates", "context", "dates", "normalize", "constructFrom", "date", "startOfDay", "date", "options", "_date", "toDate", "differenceInCalendarDays", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "laterStartOfDay", "startOfDay", "earlierStartOfDay", "laterTimestamp", "getTimezoneOffsetInMilliseconds", "earlierTimestamp", "millisecondsInDay", "startOfISOWeekYear", "date", "options", "year", "getISOWeekYear", "fourthOfJanuary", "constructFrom", "startOfISOWeek", "addMinutes", "date", "amount", "options", "_date", "toDate", "millisecondsInMinute", "addQuarters", "date", "amount", "options", "addMonths", "addSeconds", "date", "amount", "options", "addMilliseconds", "addWeeks", "date", "amount", "options", "addDays", "addYears", "date", "amount", "options", "addMonths", "max", "dates", "options", "result", "context", "date", "constructFrom", "date_", "toDate", "min", "dates", "options", "result", "context", "date", "constructFrom", "date_", "toDate", "isSameDay", "laterDate", "earlierDate", "options", "dateLeft_", "dateRight_", "normalizeDates", "startOfDay", "isDate", "value", "isValid", "date", "isDate", "toDate", "differenceInCalendarMonths", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "yearsDiff", "monthsDiff", "getQuarter", "date", "options", "_date", "toDate", "differenceInCalendarQuarters", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "yearsDiff", "quartersDiff", "getQuarter", "differenceInCalendarYears", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "differenceInDays", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "sign", "compareLocalAsc", "difference", "differenceInCalendarDays", "isLastDayNotFull", "result", "diff", "endOfDay", "date", "options", "_date", "toDate", "endOfMonth", "date", "options", "_date", "toDate", "month", "startOfQuarter", "date", "options", "_date", "toDate", "currentMonth", "month", "startOfMonth", "date", "options", "_date", "toDate", "endOfYear", "date", "options", "_date", "toDate", "year", "startOfYear", "date", "options", "date_", "toDate", "endOfWeek", "date", "options", "defaultOptions", "getDefaultOptions", "weekStartsOn", "_date", "toDate", "day", "diff", "formatDistanceLocale", "formatDistance", "token", "count", "options", "result", "tokenValue", "buildFormatLongFn", "args", "options", "width", "dateFormats", "timeFormats", "dateTimeFormats", "formatLong", "buildFormatLongFn", "formatRelativeLocale", "formatRelative", "token", "_date", "_baseDate", "_options", "buildLocalizeFn", "args", "value", "options", "context", "valuesArray", "defaultWidth", "width", "index", "eraValues", "quarterValues", "monthValues", "dayValues", "dayPeriodValues", "formattingDayPeriodValues", "ordinalNumber", "dirtyNumber", "_options", "number", "rem100", "localize", "buildLocalizeFn", "quarter", "buildMatchFn", "args", "string", "options", "width", "matchPattern", "matchResult", "matchedString", "parsePatterns", "key", "findIndex", "pattern", "findKey", "value", "rest", "object", "predicate", "array", "buildMatchPatternFn", "args", "string", "options", "matchResult", "matchedString", "parseResult", "value", "rest", "matchOrdinalNumberPattern", "parseOrdinalNumberPattern", "matchEraPatterns", "parseEraPatterns", "matchQuarterPatterns", "parseQuarterPatterns", "matchMonthPatterns", "parseMonthPatterns", "matchDayPatterns", "parseDayPatterns", "matchDayPeriodPatterns", "parseDayPeriodPatterns", "match", "buildMatchPatternFn", "value", "buildMatchFn", "index", "enUS", "formatDistance", "formatLong", "formatRelative", "localize", "match", "getDayOfYear", "date", "options", "_date", "toDate", "differenceInCalendarDays", "startOfYear", "getISOWeek", "date", "options", "_date", "toDate", "diff", "startOfISOWeek", "startOfISOWeekYear", "millisecondsInWeek", "getWeekYear", "date", "options", "_date", "toDate", "year", "defaultOptions", "getDefaultOptions", "firstWeekContainsDate", "firstWeekOfNextYear", "constructFrom", "startOfNextYear", "startOfWeek", "firstWeekOfThisYear", "startOfThisYear", "startOfWeekYear", "date", "options", "defaultOptions", "getDefaultOptions", "firstWeekContainsDate", "year", "getWeekYear", "firstWeek", "constructFrom", "startOfWeek", "getWeek", "date", "options", "_date", "toDate", "diff", "startOfWeek", "startOfWeekYear", "millisecondsInWeek", "addLeadingZeros", "number", "targetLength", "sign", "output", "lightFormatters", "date", "token", "signedYear", "year", "addLeadingZeros", "month", "dayPeriodEnumValue", "numberOfDigits", "milliseconds", "fractionalSeconds", "dayPeriodEnum", "formatters", "date", "token", "localize", "era", "signedYear", "year", "lightFormatters", "options", "signedWeekYear", "getWeekYear", "weekYear", "twoDigitYear", "addLeadingZeros", "isoWeekYear", "getISOWeekYear", "quarter", "month", "week", "getWeek", "isoWeek", "getISOWeek", "dayOfYear", "getDayOfYear", "dayOfWeek", "localDayOfWeek", "isoDayOfWeek", "dayPeriodEnumValue", "hours", "_localize", "timezoneOffset", "formatTimezoneWithOptionalMinutes", "formatTimezone", "formatTimezoneShort", "timestamp", "offset", "delimiter", "sign", "absOffset", "minutes", "dateLongFormatter", "pattern", "formatLong", "timeLongFormatter", "dateTimeLongFormatter", "matchResult", "datePattern", "timePattern", "dateTimeFormat", "longFormatters", "dayOfYearTokenRE", "weekYearTokenRE", "throwTokens", "isProtectedDayOfYearToken", "token", "isProtectedWeekYearToken", "warnOrThrowProtectedError", "format", "input", "_message", "message", "subject", "formattingTokensRegExp", "longFormattingTokensRegExp", "escapedStringRegExp", "doubleQuoteRegExp", "unescapedLatinCharacterRegExp", "format", "date", "formatStr", "options", "defaultOptions", "getDefaultOptions", "locale", "enUS", "firstWeekContainsDate", "weekStartsOn", "originalDate", "toDate", "isValid", "parts", "longFormattingTokensRegExp", "substring", "firstCharacter", "longFormatter", "longFormatters", "formattingTokensRegExp", "cleanEscapedString", "formatters", "unescapedLatinCharacterRegExp", "formatterOptions", "part", "token", "isProtectedWeekYearToken", "isProtectedDayOfYearToken", "warnOrThrowProtectedError", "formatter", "input", "matched", "escapedStringRegExp", "doubleQuoteRegExp", "getDate", "date", "options", "toDate", "getDay", "date", "options", "toDate", "getDaysInMonth", "date", "options", "_date", "toDate", "year", "monthIndex", "lastDayOfMonth", "constructFrom", "getDefaultOptions", "getHours", "date", "options", "toDate", "getISODay", "date", "options", "day", "toDate", "getMinutes", "date", "options", "toDate", "getMonth", "date", "options", "toDate", "getSeconds", "date", "toDate", "getTime", "date", "toDate", "getYear", "date", "options", "toDate", "isAfter", "date", "dateToCompare", "toDate", "isBefore", "date", "dateToCompare", "toDate", "isEqual", "leftDate", "rightDate", "toDate", "transpose", "date", "constructor", "date_", "isConstructor", "constructFrom", "TIMEZONE_UNIT_PRIORITY", "Setter", "_utcDate", "_options", "ValueSetter", "value", "validateValue", "setValue", "priority", "subPriority", "date", "options", "flags", "DateTimezoneSetter", "context", "reference", "constructFrom", "transpose", "Parser", "dateString", "token", "match", "options", "result", "ValueSetter", "_utcDate", "_value", "_options", "EraParser", "Parser", "dateString", "token", "match", "date", "flags", "value", "numericPatterns", "timezonePatterns", "mapValue", "parseFnResult", "mapFn", "parseNumericPattern", "pattern", "dateString", "matchResult", "parseTimezonePattern", "sign", "hours", "minutes", "seconds", "millisecondsInHour", "millisecondsInMinute", "millisecondsInSecond", "parseAnyDigitsSigned", "numericPatterns", "parseNDigits", "parseNDigitsSigned", "dayPeriodEnumToHours", "dayPeriod", "normalizeTwoDigitYear", "twoDigitYear", "currentYear", "isCommonEra", "absCurrentYear", "result", "rangeEnd", "rangeEndCentury", "isPreviousCentury", "isLeapYearIndex", "year", "YearParser", "Parser", "dateString", "token", "match", "valueCallback", "year", "mapValue", "parseNDigits", "_date", "value", "date", "flags", "currentYear", "normalizedTwoDigitYear", "normalizeTwoDigitYear", "LocalWeekYearParser", "Parser", "dateString", "token", "match", "valueCallback", "year", "mapValue", "parseNDigits", "_date", "value", "date", "flags", "options", "currentYear", "getWeekYear", "normalizedTwoDigitYear", "normalizeTwoDigitYear", "startOfWeek", "ISOWeekYearParser", "Parser", "dateString", "token", "parseNDigitsSigned", "date", "_flags", "value", "firstWeekOfYear", "constructFrom", "startOfISOWeek", "ExtendedYearParser", "Parser", "dateString", "token", "parseNDigitsSigned", "date", "_flags", "value", "QuarterParser", "Parser", "dateString", "token", "match", "parseNDigits", "_date", "value", "date", "_flags", "StandAloneQuarterParser", "Parser", "dateString", "token", "match", "parseNDigits", "_date", "value", "date", "_flags", "MonthParser", "Parser", "dateString", "token", "match", "valueCallback", "value", "mapValue", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "date", "_flags", "StandAloneMonthParser", "Parser", "dateString", "token", "match", "valueCallback", "value", "mapValue", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "date", "_flags", "setWeek", "date", "week", "options", "date_", "toDate", "diff", "getWeek", "LocalWeekParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "options", "startOfWeek", "setWeek", "setISOWeek", "date", "week", "options", "_date", "toDate", "diff", "getISOWeek", "ISOWeekParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "startOfISOWeek", "setISOWeek", "DAYS_IN_MONTH", "DAYS_IN_MONTH_LEAP_YEAR", "DateParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "date", "value", "year", "isLeapYear", "isLeapYearIndex", "month", "_flags", "DayOfYearParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "date", "value", "year", "isLeapYearIndex", "_flags", "setDay", "date", "day", "options", "defaultOptions", "getDefaultOptions", "weekStartsOn", "date_", "toDate", "currentDay", "dayIndex", "delta", "diff", "addDays", "DayParser", "Parser", "dateString", "token", "match", "_date", "value", "date", "_flags", "options", "setDay", "LocalDayParser", "Parser", "dateString", "token", "match", "options", "valueCallback", "value", "wholeWeekDays", "mapValue", "parseNDigits", "_date", "date", "_flags", "setDay", "StandAloneLocalDayParser", "Parser", "dateString", "token", "match", "options", "valueCallback", "value", "wholeWeekDays", "mapValue", "parseNDigits", "_date", "date", "_flags", "setDay", "setISODay", "date", "day", "options", "date_", "toDate", "currentDay", "getISODay", "diff", "addDays", "ISODayParser", "Parser", "dateString", "token", "match", "valueCallback", "value", "parseNDigits", "mapValue", "_date", "date", "_flags", "setISODay", "AMPMParser", "Parser", "dateString", "token", "match", "date", "_flags", "value", "dayPeriodEnumToHours", "AMPMMidnightParser", "Parser", "dateString", "token", "match", "date", "_flags", "value", "dayPeriodEnumToHours", "DayPeriodParser", "Parser", "dateString", "token", "match", "date", "_flags", "value", "dayPeriodEnumToHours", "Hour1to12Parser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "isPM", "Hour0to23Parser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "Hour0To11Parser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "Hour1To24Parser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "hours", "MinuteParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "SecondParser", "Parser", "dateString", "token", "match", "parseNumericPattern", "numericPatterns", "parseNDigits", "_date", "value", "date", "_flags", "FractionOfSecondParser", "Parser", "dateString", "token", "valueCallback", "value", "mapValue", "parseNDigits", "date", "_flags", "ISOTimezoneWithZParser", "Parser", "dateString", "token", "parseTimezonePattern", "timezonePatterns", "date", "flags", "value", "constructFrom", "getTimezoneOffsetInMilliseconds", "ISOTimezoneParser", "Parser", "dateString", "token", "parseTimezonePattern", "timezonePatterns", "date", "flags", "value", "constructFrom", "getTimezoneOffsetInMilliseconds", "TimestampSecondsParser", "Parser", "dateString", "parseAnyDigitsSigned", "date", "_flags", "value", "constructFrom", "TimestampMillisecondsParser", "Parser", "dateString", "parseAnyDigitsSigned", "date", "_flags", "value", "constructFrom", "parsers", "EraParser", "YearParser", "LocalWeekYearParser", "ISOWeekYearParser", "ExtendedYearParser", "QuarterParser", "StandAloneQuarterParser", "MonthParser", "StandAloneMonthParser", "LocalWeekParser", "ISOWeekParser", "DateParser", "DayOfYearParser", "DayParser", "LocalDayParser", "StandAloneLocalDayParser", "ISODayParser", "AMPMParser", "AMPMMidnightParser", "DayPeriodParser", "Hour1to12Parser", "Hour0to23Parser", "Hour0To11Parser", "Hour1To24Parser", "MinuteParser", "SecondParser", "FractionOfSecondParser", "ISOTimezoneWithZParser", "ISOTimezoneParser", "TimestampSecondsParser", "TimestampMillisecondsParser", "formattingTokensRegExp", "longFormattingTokensRegExp", "escapedStringRegExp", "doubleQuoteRegExp", "notWhitespaceRegExp", "unescapedLatinCharacterRegExp", "parse", "dateStr", "formatStr", "referenceDate", "options", "invalidDate", "constructFrom", "defaultOptions", "getDefaultOptions", "locale", "enUS", "firstWeekContainsDate", "weekStartsOn", "toDate", "subFnOptions", "setters", "DateTimezoneSetter", "tokens", "substring", "firstCharacter", "longFormatters", "longFormatter", "usedTokens", "token", "isProtectedWeekYearToken", "warnOrThrowProtectedError", "isProtectedDayOfYearToken", "parser", "parsers", "incompatibleTokens", "incompatibleToken", "usedToken", "parseResult", "cleanEscapedString", "uniquePrioritySetters", "setter", "a", "b", "priority", "index", "array", "setterArray", "date", "flags", "result", "input", "isSameMonth", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "isSameQuarter", "laterDate", "earlierDate", "options", "dateLeft_", "dateRight_", "normalizeDates", "startOfQuarter", "isSameYear", "laterDate", "earlierDate", "options", "laterDate_", "earlierDate_", "normalizeDates", "isWithinInterval", "date", "interval", "options", "time", "toDate", "startTime", "endTime", "a", "b", "subDays", "date", "amount", "options", "addDays", "parseISO", "argument", "options", "invalidDate", "constructFrom", "additionalDigits", "dateStrings", "splitDateString", "date", "parseYearResult", "parseYear", "parseDate", "timestamp", "time", "offset", "parseTime", "parseTimezone", "tmpDate", "result", "toDate", "patterns", "dateRegex", "timeRegex", "timezoneRegex", "dateString", "array", "timeString", "token", "regex", "captures", "year", "century", "isWeekDate", "dayOfYear", "parseDateUnit", "month", "day", "week", "dayOfWeek", "validateWeekDate", "dayOfISOWeekYear", "validateDate", "validateDayOfYearDate", "value", "hours", "parseTimeUnit", "minutes", "seconds", "validateTime", "millisecondsInHour", "millisecondsInMinute", "timezoneString", "sign", "validateTimezone", "isoWeekYear", "fourthOfJanuaryDay", "diff", "daysInMonths", "isLeapYearIndex", "_year", "_hours", "setMonth", "date", "month", "options", "_date", "toDate", "year", "day", "midMonth", "constructFrom", "daysInMonth", "getDaysInMonth", "setHours", "date", "hours", "options", "_date", "toDate", "setMinutes", "date", "minutes", "options", "date_", "toDate", "setQuarter", "date", "quarter", "options", "date_", "toDate", "oldQuarter", "diff", "setMonth", "setSeconds", "date", "seconds", "options", "_date", "toDate", "setYear", "date", "year", "options", "date_", "toDate", "constructFrom", "subMonths", "date", "amount", "options", "addMonths", "subQuarters", "date", "amount", "options", "addQuarters", "subWeeks", "date", "amount", "options", "addWeeks", "subYears", "date", "amount", "options", "addYears", "React", "hasWindow", "getNodeName", "node", "isNode", "getWindow", "_node$ownerDocument", "getDocumentElement", "_ref", "value", "isElement", "isHTMLElement", "isShadowRoot", "isOverflowElement", "element", "overflow", "overflowX", "overflowY", "display", "getComputedStyle", "isTableElement", "isTopLayer", "willChangeRe", "containRe", "isNotNone", "isWebKitValue", "isContainingBlock", "elementOrCss", "css", "isWebKit", "getContainingBlock", "currentNode", "getParentNode", "isLastTraversableNode", "getNodeScroll", "result", "getNearestOverflowAncestor", "parentNode", "getOverflowAncestors", "list", "traverseIframes", "_node$ownerDocument2", "scrollableAncestor", "isBody", "win", "frameElement", "getFrameElement", "React", "useLayoutEffect", "sides", "min", "max", "round", "floor", "createCoords", "v", "oppositeSideMap", "clamp", "start", "value", "end", "evaluate", "param", "getSide", "placement", "getAlignment", "getOppositeAxis", "axis", "getAxisLength", "getSideAxis", "firstChar", "getAlignmentAxis", "getAlignmentSides", "rects", "rtl", "alignment", "alignmentAxis", "length", "mainAlignmentSide", "getOppositePlacement", "getExpandedPlacements", "oppositePlacement", "getOppositeAlignmentPlacement", "lrPlacement", "rlPlacement", "tbPlacement", "btPlacement", "getSideList", "side", "isStart", "getOppositeAxisPlacements", "flipAlignment", "direction", "list", "expandPaddingObject", "padding", "_padding$top", "_padding$right", "_padding$bottom", "_padding$left", "getPaddingObject", "rectToClientRect", "rect", "x", "y", "width", "height", "candidateSelectors", "candidateSelector", "join", "NoElement", "Element", "matches", "prototype", "msMatchesSelector", "webkitMatchesSelector", "getRootNode", "element", "_element$getRootNode", "call", "ownerDocument", "isInert", "node", "lookUp", "_node$getAttribute", "inertAtt", "getAttribute", "inert", "result", "closest", "parentNode", "isContentEditable", "_node$getAttribute2", "attValue", "getCandidates", "el", "includeContainer", "filter", "candidates", "Array", "slice", "apply", "querySelectorAll", "unshift", "getCandidatesIteratively", "elements", "options", "elementsToCheck", "from", "length", "shift", "tagName", "assigned", "assignedElements", "content", "children", "nestedCandidates", "flatten", "push", "scopeParent", "validCandidate", "includes", "shadowRoot", "getShadowRoot", "validShadowRoot", "shadowRootFilter", "hasTabIndex", "isNaN", "parseInt", "getTabIndex", "Error", "tabIndex", "test", "getSortOrderTabIndex", "isScope", "sortOrderedTabbables", "a", "b", "documentOrder", "isInput", "isHiddenInput", "type", "isDetailsWithSummary", "r", "some", "child", "getCheckedRadio", "nodes", "form", "i", "checked", "isTabbableRadio", "name", "radioScope", "queryRadios", "radioSet", "window", "CSS", "escape", "err", "console", "error", "message", "isRadio", "isNonTabbableRadio", "isNodeAttached", "_nodeRoot", "nodeRoot", "nodeRootHost", "host", "attached", "_nodeRootHost", "_nodeRootHost$ownerDo", "_node$ownerDocument", "contains", "_nodeRoot2", "_nodeRootHost2", "_nodeRootHost2$ownerD", "isZeroArea", "_node$getBoundingClie", "getBoundingClientRect", "width", "height", "isHidden", "_ref", "displayCheck", "visible", "checkVisibility", "checkOpacity", "opacityProperty", "contentVisibilityAuto", "visibilityProperty", "checkVisibilityCSS", "_getComputedStyle", "getComputedStyle", "visibility", "isDirectSummary", "nodeUnderDetails", "parentElement", "originalNode", "rootNode", "assignedSlot", "getClientRects", "isDisabledFromFieldset", "disabled", "item", "isNodeMatchingSelectorFocusable", "isNodeMatchingSelectorTabbable", "isShadowRootTabbable", "shadowHostNode", "sortByOrder", "regularTabbables", "orderedTabbables", "forEach", "candidateTabindex", "sort", "reduce", "acc", "sortable", "concat", "tabbable", "container", "bind", "focusable", "isTabbable", "focusableCandidateSelector", "isFocusable", "isClient", "noop", "index", "useLayoutEffect", "SafeReact", "React", "useInsertionEffect", "SafeReact", "useSafeInsertionEffect", "fn", "useEffectEvent", "callback", "ref", "_len", "args", "_key", "jsx", "jsxs", "Fragment", "ReactDOM", "computeCoordsFromPlacement", "_ref", "placement", "rtl", "reference", "floating", "sideAxis", "getSideAxis", "alignmentAxis", "getAlignmentAxis", "alignLength", "getAxisLength", "side", "getSide", "isVertical", "commonX", "commonY", "commonAlign", "coords", "alignment", "getAlignment", "detectOverflow", "state", "options", "_await$platform$isEle", "x", "y", "platform", "rects", "elements", "strategy", "boundary", "rootBoundary", "elementContext", "altBoundary", "padding", "evaluate", "paddingObject", "getPaddingObject", "element", "clippingClientRect", "rectToClientRect", "rect", "offsetParent", "offsetScale", "elementClientRect", "MAX_RESET_COUNT", "computePosition", "config", "middleware", "platformWithDetectOverflow", "statefulPlacement", "resetCount", "middlewareData", "i", "currentMiddleware", "name", "fn", "nextX", "nextY", "data", "reset", "arrow", "axis", "length", "arrowDimensions", "isYAxis", "minProp", "maxProp", "clientProp", "endDiff", "startDiff", "arrowOffsetParent", "clientSize", "centerToReference", "largestPossiblePadding", "minPadding", "min", "maxPadding", "max", "center", "offset", "clamp", "shouldAddOffset", "alignmentOffset", "flip", "options", "state", "_middlewareData$arrow", "_middlewareData$flip", "placement", "middlewareData", "rects", "initialPlacement", "platform", "elements", "checkMainAxis", "checkCrossAxis", "specifiedFallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment", "detectOverflowOptions", "evaluate", "side", "getSide", "initialSideAxis", "getSideAxis", "isBasePlacement", "rtl", "fallbackPlacements", "getOppositePlacement", "getExpandedPlacements", "hasFallbackAxisSideDirection", "getOppositeAxisPlacements", "placements", "overflow", "overflows", "overflowsData", "sides", "getAlignmentSides", "_middlewareData$flip2", "_overflowsData$filter", "nextIndex", "nextPlacement", "d", "resetPlacement", "a", "b", "_overflowsData$filter2", "currentSideAxis", "acc", "getSideOffsets", "rect", "isAnySideFullyClipped", "hide", "strategy", "offsets", "originSides", "convertValueToCoords", "state", "options", "placement", "platform", "elements", "rtl", "side", "getSide", "alignment", "getAlignment", "isVertical", "getSideAxis", "mainAxisMulti", "crossAxisMulti", "rawValue", "evaluate", "mainAxis", "crossAxis", "alignmentAxis", "offset", "_middlewareData$offse", "_middlewareData$arrow", "x", "y", "middlewareData", "diffCoords", "shift", "checkMainAxis", "checkCrossAxis", "limiter", "_ref", "detectOverflowOptions", "coords", "overflow", "getOppositeAxis", "mainAxisCoord", "crossAxisCoord", "clampCoord", "axis", "coord", "clamp", "limitedCoords", "size", "options", "state", "placement", "rects", "platform", "elements", "apply", "detectOverflowOptions", "evaluate", "overflow", "side", "getSide", "alignment", "getAlignment", "isYAxis", "getSideAxis", "width", "height", "heightSide", "widthSide", "maximumClippingHeight", "maximumClippingWidth", "overflowAvailableHeight", "min", "overflowAvailableWidth", "shiftData", "noShift", "availableHeight", "availableWidth", "max", "nextDimensions", "getCssDimensions", "element", "css", "getComputedStyle", "width", "height", "hasOffset", "isHTMLElement", "offsetWidth", "offsetHeight", "shouldFallback", "round", "unwrapElement", "isElement", "getScale", "domElement", "createCoords", "rect", "$", "x", "y", "noOffsets", "getVisualOffsets", "win", "getWindow", "isWebKit", "shouldAddVisualOffsets", "isFixed", "floatingOffsetParent", "getBoundingClientRect", "includeScale", "isFixedStrategy", "offsetParent", "clientRect", "scale", "visualOffsets", "offsetWin", "currentWin", "currentIFrame", "getFrameElement", "iframeScale", "iframeRect", "left", "top", "rectToClientRect", "getWindowScrollBarX", "leftScroll", "getNodeScroll", "getDocumentElement", "getHTMLOffset", "documentElement", "scroll", "htmlRect", "convertOffsetParentRelativeRectToViewportRelativeRect", "_ref", "elements", "strategy", "topLayer", "isTopLayer", "offsets", "isOffsetParentAnElement", "getNodeName", "isOverflowElement", "offsetRect", "htmlOffset", "getClientRects", "getDocumentRect", "html", "body", "max", "SCROLLBAR_MAX", "getViewportRect", "rootBoundary", "isLayoutViewport", "visualViewport", "layoutRelativeClientCoords", "doc", "bodyStyles", "bodyMarginInline", "reservedWidth", "gutter", "getInnerBoundingClientRect", "getClientRectFromClippingAncestor", "clippingAncestor", "getClippingElementAncestors", "cache", "cachedResult", "result", "getOverflowAncestors", "el", "lastKeptComputedStyle", "elementIsFixed", "currentNode", "getParentNode", "isLastTraversableNode", "computedStyle", "currentNodeIsContaining", "isContainingBlock", "lastPosition", "ancestor", "getClippingRect", "boundary", "clippingAncestors", "firstRect", "right", "bottom", "i", "min", "getDimensions", "getRectRelativeToOffsetParent", "isStaticPositioned", "getTrueOffsetParent", "polyfill", "rawOffsetParent", "getOffsetParent", "svgOffsetParent", "isTableElement", "getContainingBlock", "getElementRects", "data", "getOffsetParentFn", "getDimensionsFn", "floatingDimensions", "isRTL", "platform", "rectsAreEqual", "a", "b", "observeMove", "onMove", "ancestorResize", "io", "timeoutId", "root", "cleanup", "_io", "refresh", "skip", "threshold", "elementRectForRootMargin", "insetTop", "floor", "insetRight", "insetBottom", "insetLeft", "options", "isFirstUpdate", "handleObserve", "entries", "ratio", "handleResize", "autoUpdate", "reference", "floating", "update", "ancestorScroll", "elementResize", "layoutShift", "animationFrame", "referenceEl", "ancestors", "cleanupIo", "reobserveFrame", "resizeObserver", "firstEntry", "_resizeObserver", "frameId", "prevRefRect", "frameLoop", "nextRefRect", "_resizeObserver2", "offset", "flip", "arrow", "computePosition", "reference", "floating", "options", "cache", "mergedOptions", "platformWithCache", "platform", "React", "useLayoutEffect", "ReactDOM", "isClient", "noop", "index", "deepEqual", "a", "b", "length", "i", "keys", "key", "getDPR", "element", "roundByDPR", "value", "dpr", "useLatestRef", "ref", "useFloating", "options", "placement", "strategy", "middleware", "platform", "externalReference", "externalFloating", "transform", "whileElementsMounted", "open", "data", "setData", "latestMiddleware", "setLatestMiddleware", "_reference", "_setReference", "_floating", "_setFloating", "setReference", "node", "referenceRef", "setFloating", "floatingRef", "referenceEl", "floatingEl", "dataRef", "hasWhileElementsMounted", "whileElementsMountedRef", "platformRef", "openRef", "update", "config", "computePosition", "fullData", "isMountedRef", "refs", "elements", "floatingStyles", "initialStyles", "x", "y", "arrow$1", "isRef", "state", "padding", "arrow", "offset", "deps", "result", "flip", "options", "deps", "result", "arrow", "options", "deps", "result", "arrow$1", "ARROW_LEFT", "ARROW_RIGHT", "ARROW_UP", "ARROW_DOWN", "horizontalKeys", "ARROW_LEFT", "ARROW_RIGHT", "verticalKeys", "ARROW_UP", "ARROW_DOWN", "allKeys", "SafeReact", "React", "serverHandoffComplete", "count", "genId", "useFloatingId", "id", "setId", "index", "useReactId", "useId", "FloatingArrow", "props", "ref", "placement", "floating", "arrow", "shift", "width", "height", "tipRadius", "strokeWidth", "staticOffset", "stroke", "d", "transform", "restStyle", "rest", "clipPathId", "useId", "isRTL", "setIsRTL", "index", "getComputedStyle", "side", "alignment", "isVerticalSide", "computedStaticOffset", "computedStrokeWidth", "halfStrokeWidth", "svgX", "svgY", "isCustomShape", "yOffsetProp", "xOffsetProp", "arrowX", "arrowY", "dValue", "rotation", "jsxs", "t", "jsx", "createEventEmitter", "map", "event", "data", "_map$get", "listener", "_map$get2", "FloatingNodeContext", "FloatingTreeContext", "useFloatingParentNodeId", "_React$useContext", "useFloatingTree", "useFloatingRootContext", "options", "open", "onOpenChangeProp", "elementsProp", "floatingId", "useId", "dataRef", "events", "createEventEmitter", "nested", "useFloatingParentNodeId", "positionReference", "setPositionReference", "onOpenChange", "useEffectEvent", "event", "reason", "refs", "elements", "useFloating", "_temp", "_elementsOption$refer", "_elementsOption$float", "elementsOption", "nodeId", "internalRootContext", "rootContext", "computedElements", "_domReference", "setDomReference", "_setPositionReference", "domReference", "domReferenceRef", "tree", "useFloatingTree", "index", "position", "node", "computedPositionReference", "isElement", "setReference", "context", "extendStatics", "d", "b", "Object", "setPrototypeOf", "__proto__", "Array", "p", "prototype", "hasOwnProperty", "call", "__extends", "TypeError", "String", "__", "constructor", "create", "__assign", "assign", "t", "s", "i", "n", "arguments", "length", "apply", "__spreadArray", "to", "from", "pack", "l", "ar", "slice", "concat", "CalendarContainer", "_a", "_b", "showTimeSelectOnly", "_c", "showTime", "className", "children", "inline", "ariaLabel", "React", "useDetectClickOutside", "onClickOutside", "ignoreClass", "ref", "useRef", "onClickOutsideRef", "useEffect", "handleClickOutside", "useCallback", "event", "target", "eventTarget", "ClickOutsideWrapper", "containerRef", "style", "detectRef", "node", "dateFnsTz", "dateFnsTzLoadAttempted", "getDateFnsTz", "dateFnsTzModuleName", "__require", "toZonedTime", "date", "timeZone", "tz", "fromZonedTime", "KeyType", "getLocaleScope", "scope", "DEFAULT_YEAR_ITEM_NUMBER", "newDate", "value", "d", "parseISO", "toDate", "isValid", "parseDate", "dateFormat", "locale", "strictParsing", "refDate", "localeObject", "getLocaleObject", "getDefaultLocale", "formats", "_i", "formats_1", "format_1", "parsedDate", "parse", "formatDate", "nativeDate", "isValidDate", "parseDateForNavigation", "yearMatch", "year", "monthMatch", "month", "safeToDate", "isDate", "formatStr", "format", "localeObj", "safeDateFormat", "DATE_RANGE_SEPARATOR", "safeDateRangeFormat", "startDate", "endDate", "props", "formattedStartDate", "formattedEndDate", "dateRangeSeparator", "safeMultipleDatesFormat", "dates", "formattedFirstDate", "formattedSecondDate", "extraDatesCount", "setTime", "hour", "minute", "_d", "second", "setHours", "setMinutes", "setSeconds", "getWeek", "getISOWeek", "getDayOfWeekCode", "day", "getStartOfDay", "startOfDay", "getStartOfWeek", "calendarStartDay", "startOfWeek", "getStartOfMonth", "startOfMonth", "getStartOfYear", "startOfYear", "getStartOfQuarter", "startOfQuarter", "getStartOfToday", "getEndOfDay", "endOfDay", "getEndOfWeek", "endOfWeek", "getEndOfMonth", "endOfMonth", "isSameYear", "date1", "date2", "dfIsSameYear", "isSameMonth", "dfIsSameMonth", "isSameQuarter", "dfIsSameQuarter", "isSameDay", "dfIsSameDay", "isEqual", "dfIsEqual", "isDayInRange", "valid", "start", "end", "isWithinInterval", "registerLocale", "localeName", "localeData", "setDefaultLocale", "localeSpec", "getFormattedWeekdayInLocale", "formatFunc", "getWeekdayMinInLocale", "getWeekdayShortInLocale", "getMonthInLocale", "setMonth", "getMonthShortInLocale", "getQuarterShortInLocale", "quarter", "setQuarter", "isDayDisabled", "minDate", "maxDate", "excludeDates", "excludeDateIntervals", "includeDates", "includeDateIntervals", "filterDate", "disabled", "isOutOfBounds", "excludeDate", "includeDate", "isDayExcluded", "isMonthDisabled", "isMonthInRange", "m", "startDateYear", "getYear", "startDateMonth", "getMonth", "endDateYear", "endDateMonth", "dayYear", "isMonthYearDisabled", "excludedDate", "includedDate", "isQuarterDisabled", "isYearInRange", "startYear", "endYear", "isYearDisabled", "endOfYear", "isQuarterInRange", "q", "startDateQuarter", "getQuarter", "endDateQuarter", "differenceInCalendarDays", "isTimeInList", "time", "times", "listTime", "getHours", "getMinutes", "getSeconds", "isTimeDisabled", "excludeTimes", "includeTimes", "filterTime", "isTimeInDisabledRange", "minTime", "maxTime", "baseTime", "min", "max", "monthDisabledBefore", "previousMonth", "subMonths", "differenceInCalendarMonths", "monthDisabledAfter", "nextMonth", "addMonths", "quarterDisabledBefore", "firstDateOfYear", "previousQuarter", "subQuarters", "differenceInCalendarQuarters", "quarterDisabledAfter", "lastDateOfYear", "nextQuarter", "addQuarters", "yearDisabledBefore", "previousYear", "subYears", "differenceInCalendarYears", "yearsDisabledBefore", "yearItemNumber", "endPeriod", "getYearsPeriod", "minDateYear", "yearDisabledAfter", "nextYear", "addYears", "yearsDisabledAfter", "startPeriod", "maxDateYear", "getEffectiveMinDate", "minDates", "getEffectiveMaxDate", "maxDates", "getHighLightDaysMap", "highlightDates", "defaultClassName", "dateClasses", "i", "len", "obj", "key", "classNamesArr", "keys", "arrOfDates", "k", "len_1", "dateK", "arraysAreEqual", "array1", "array2", "index", "getHolidaysMap", "holidayDates", "holiday", "dateObj", "holidayName", "classNamesObj", "holidayNameArr", "__spreadArray", "timesToInjectAfter", "currentTime", "currentMultiplier", "intervals", "injectedTimes", "l", "injectedTime", "injectedTimeValue", "addHours", "addMinutes", "addSeconds", "nextTime", "isAfter", "isBefore", "addZero", "getHoursInDay", "startOfTheNextDay", "startOfMinute", "seconds", "milliseconds", "isSameMinute", "d1", "d2", "getMidnightDate", "dateWithoutTime", "isDateBefore", "dateToCompare", "midnightDate", "midnightDateToCompare", "isSpaceKeyDown", "InputTime", "_super", "__extends", "_this", "propDate", "isPropDateValid", "hours", "minutes", "timeString", "customTimeInput", "cloneElement", "state", "Component", "Day", "createRef", "eventKey", "other", "isSelectedDate", "isDisabled", "dayStr", "holidays", "selectsStart", "selectsEnd", "selectsRange", "selectsDisabledDaysInRange", "swapRange", "selectingDate", "weekday", "getDay", "dayClassName", "clsx", "ariaLabelPrefixWhenEnabled", "ariaLabelPrefixWhenDisabled", "prefix", "compareDt", "titles", "selectedDay", "preSelectionDay", "tabIndex", "getDate", "shouldFocusDay", "WeekNumber", "prevProps", "shouldFocusWeekNumber", "weekNumber", "isWeekDisabled", "ariaLabelPrefix", "onClick", "weekNumberClasses", "Week", "enabledWeekDay", "processingDay", "isEnabled", "addDays", "processingDate", "days", "onClickAction", "_assign", "offset", "__assign", "customWeekClassName", "FIXED_HEIGHT_STANDARD_WEEK_COUNT", "MONTH_COLUMNS_LAYOUT", "MONTH_COLUMNS", "MONTH_NAVIGATION_HORIZONTAL_OFFSET", "getMonthColumnsLayout", "showFourColumnMonthYearPicker", "showTwoColumnMonthYearPicker", "Month", "_month", "selected", "selectedDates", "selectedDate", "selectsMultiple", "monthIdx", "quarterIdx", "weeks", "isFixedHeight", "breakAfterNextPush", "currentWeekStart", "isPreSelected", "preSelection", "isSelected", "addWeeks", "isFixedAndFinalWeek", "isNonFixedAndOutOfMonth", "labelDate", "newMonth", "setPreSelection", "monthColumnsLayout", "verticalOffset", "monthsGrid", "calculateNewDateAndMonth", "newCalculatedDate", "newCalculatedMonth", "getNewDateAndMonth", "MAX_ITERATIONS", "eventKeyCopy", "validDateFound", "iterations", "disabledKeyboardNavigation", "handleOnMonthKeyDown", "newQuarter", "monthClassName", "_monthClassName", "selection", "preSelectedMonth", "isPreSelectedMonthDisabled", "preSelectedQuarter", "isCurrentQuarterDisabled", "chooseDayAriaLabelPrefix", "disabledDayAriaLabelPrefix", "showFullMonthYearPicker", "renderMonthContent", "shortMonthText", "fullMonthText", "renderQuarterContent", "shortQuarter", "monthColumns", "j", "quarters", "showMonthYearPicker", "showQuarterYearPicker", "showWeekPicker", "formattedAriaLabelPrefix", "formattedAriaLabel", "shouldUseListboxRole", "MonthDropdownOptions", "e", "el", "MonthDropdown", "monthNames", "visible", "dropdownVisible", "result", "renderedDropdown", "DEFAULT_YEAR_RANGE", "generateMonthYears", "currentDate", "list", "effectiveMinDate", "effectiveMaxDate", "currDate", "lastDate", "MonthYearDropdownOptions", "monthYear", "monthYearPoint", "getTime", "isSameMonthYear", "dropdownClass", "MonthYearDropdown", "options", "timePoint", "yearMonth", "changedDate", "Time", "classes", "activeDate", "base", "sortedInjectTimes", "a", "b", "minutesInDay", "multiplier", "timesToInject", "timeToFocus", "prev", "li", "header", "monthRef", "newHeight", "height", "listHeight", "centerLiRef", "VERTICAL_NAVIGATION_OFFSET", "Year", "refIndex", "waitForReRender", "newYear", "_e", "y", "setYear", "_year", "isSelectedDay", "isKeyboardSelectedDay", "handleOnKeyDown", "leftOverOffset", "yearClassName", "preSelected", "isPreSelectedYearDisabled", "yearsList", "onYearMouseEnter", "onYearMouseLeave", "this_1", "generateYears", "noOfYear", "isInRange", "YearDropdownOptions", "selectedYear", "minYear", "maxYear", "amount", "years", "yearDropdownItemNumber", "scrollableYearDropdown", "dropdownCurrent", "dropdownCurrentChildren", "selectedYearOptionEl", "childEl", "YearDropdown", "DROPDOWN_FOCUS_CLASSNAMES", "OUTSIDE_CLICK_IGNORE_CLASS", "isDropdownSelect", "element", "classNames", "testClassname", "Calendar", "openToDate", "current", "initialDate", "monthSelectedIn", "totalDays", "differenceInDays", "preSelectedDate", "dayIdx", "enabledPreSelectionDate", "customDayNameCount", "dayNames", "weekDayName", "fullDayName", "weekDayClassName", "customContent", "monthsShown", "monthsToSubtract", "fromMonthDate", "allPrevDaysDisabled", "iconClasses", "clickHandler", "isForYear", "previousMonthButtonLabel", "_f", "previousYearButtonLabel", "_g", "_h", "previousMonthAriaLabel", "_j", "previousYearAriaLabel", "allNextDaysDisabled", "nextMonthButtonLabel", "nextYearButtonLabel", "nextMonthAriaLabel", "nextYearAriaLabel", "overrideHide", "monthDate", "headerContent", "headerArgs", "showYearPicker", "visibleYearsRange", "prevMonthButtonDisabled", "nextMonthButtonDisabled", "prevYearButtonDisabled", "nextYearButtonDisabled", "monthList", "monthsToAdd", "monthKey", "monthShowsDuplicateDaysEnd", "monthShowsDuplicateDaysStart", "div", "startTime", "startTimeValid", "startTimeString", "endTime", "endTimeValid", "endTimeString", "timeValid", "ariaLiveMessage", "hasMonthChanged_1", "Container", "CalendarIcon", "icon", "defaultClass", "iconElement_1", "Portal", "ReactDOM", "focusableElementsSelector", "focusableFilter", "TabLoop", "tabChildren", "withFloating", "WithFloating", "hidePopper", "arrowRef", "floatingProps", "useFloating", "autoUpdate", "flip", "arrow", "componentProps", "PopperComponent", "wrapperClassName", "popperComponent", "targetComponent", "enableTabLoop", "popperOnKeyDown", "portalId", "portalHost", "popperProps", "showArrow", "popperTargetRef", "monthHeaderPosition", "popper", "FloatingArrow", "createElement", "wrapperClasses", "hasPreSelectionChanged", "INPUT_ERR_1", "DatePicker", "baseDate", "accumulator", "defaultPreSelection", "boundedPreSelection", "initialPreSelection", "rangeSeparator", "formatMultipleDates", "inputValue", "formatDateFn", "open", "skipSetBlur", "PRESELECT_CHANGE_VIA_NAVIGATE", "isAutoReFocus", "isOpenAllowed", "hasDateCharacters", "allArgs", "PRESELECT_CHANGE_VIA_INPUT", "trimmedRangeSeparator", "_k", "val", "valueStart", "valueEnd", "startDateNew", "endDateNew", "startChanged", "endChanged", "navDate", "isDateSelectionComplete", "formattedDate", "keepInput", "onChange", "onChangeRange", "noRanges", "hasStartRange", "hasOnlyEndRange", "isRangeFilled", "onChangeMultiple", "isChangedDateAlreadySelected", "nextDates", "hasMinDate", "hasMaxDate", "isValidDateSelection", "dateStartOfDay", "minDateStartOfDay", "maxDateEndOfDay", "modifyDateType", "changedStartDate", "changedEndDate", "timeIntervals", "currentMinutes", "maxMinutes", "newTime", "newMinutes", "formattedTime", "inputElement", "timeFormat", "defaultTime", "timeToCommit", "highlightedItem", "itemText", "itemTime", "container", "timeListItems", "targetItem", "closestTimeDiff", "timeListItems_1", "item", "timeDiff", "selectorString", "selectedItem", "copy", "shouldCloseOnSelect", "adjustDateOnChange", "isShiftKeyActive", "calculateNewDate", "subWeeks", "subDays", "getNewDate", "newSelection", "elem", "isContainsTime", "longDateFormat", "customInput", "customInputRef", "ariaProps", "ariaDescribedBy", "ariaInvalid", "ariaLabelledBy", "ariaRequired", "input", "isClearable", "clearButtonTitle", "clearButtonClassName", "ariaLabelClose", "readOnly", "prevState", "showIcon", "calendarIconClassname", "calendarIconClassName", "toggleCalendarOnIconClick", "calendar", "portalContainer", "createPortal", "flushSync", "paths", "CalendarIcon", "className", "_jsx", "fill", "height", "viewBox", "width", "xmlns", "clipRule", "d", "paths", "rotations", "down", "left", "right", "ChevronIcon", "ariaLabel", "className", "direction", "_jsx", "fill", "size", "height", "style", "viewBox", "width", "xmlns", "clipRule", "d", "c", "_c", "importDateFNSLocale", "t", "createContext", "use", "useEffect", "useState", "React", "createContext", "useCallback", "ServerFunctionsContext", "undefined", "useServerFunctions", "context", "use", "Error", "ServerFunctionsProvider", "children", "serverFunction", "getDocumentSlots", "args", "name", "schedulePublish", "signal", "remoteSignal", "rest", "aborted", "result", "_err", "console", "error", "type", "doc", "value", "relationTo", "getUpcomingScheduledPublish", "getFormState", "fallbackLocale", "state", "getTableState", "renderDocument", "copyDataFromLocale", "data", "_internal_renderField", "slugify", "switchLanguage", "lang", "_jsx", "Context", "createContext", "i18n", "dateFNS", "enUS", "dateFNSKey", "fallbackLanguage", "language", "t", "key", "translations", "languageOptions", "undefined", "switchLanguage", "TranslationProvider", "t0", "$", "_c", "children", "fallbackLang", "router", "useRouter", "switchLanguageServerFn", "useServerFunctions", "setDateFNS", "useState", "t1", "vars", "nextT", "t2", "lang", "refresh", "t3", "error", "console", "t4", "isCancelled", "loadDateFNS", "imported", "importDateFNSLocale", "useEffect", "t5", "_jsx", "value", "useTranslation", "use", "getFormattedLocale", "language", "en", "my", "ua", "zh", "hasAmbiguousYearInput", "date", "dateFormat", "inputValue", "locale", "getFullYear", "formats", "Array", "isArray", "resolvedLocale", "resolveDatePickerLocale", "some", "format", "useAdditionalDayOfYearTokens", "useAdditionalWeekYearTokens", "scope", "window", "globalThis", "defaultLocale", "getDefaultLocale", "__localeData__", "undefined", "c", "_c", "React", "useDatePickerKeyboard", "t0", "$", "overrides", "datePickerRef", "useRef", "calendarRef", "hasTypedInput", "shouldFocusCalendar", "calendarFocusFrame", "t1", "Symbol", "for", "event", "stopPropagation", "defaultPrevented", "preventDefault", "current", "setOpen", "sendFocusBackToInput", "onEscape", "onOverrideKeyDownRef", "onKeyDown", "t2", "t3", "t4", "useLayoutEffect", "t5", "event_0", "key", "onCalendarKeyDown", "t6", "t7", "cancelAnimationFrame", "useEffect", "t8", "event_1", "onBlur", "t9", "event_2", "selectionMeta", "onChangeRaw", "target", "input", "t10", "onCalendarClose", "t11", "requestAnimationFrame", "isCalendarOpen", "calendar", "querySelector", "focus", "onCalendarOpen", "t12", "event_3", "includes", "t13", "event_4", "isCalendarCell", "HTMLElement", "matches", "onKeyDownCapture", "t14", "ReactDatePicker", "ReactDatePickerDefaultImport", "default", "baseClass", "children", "className", "containerRef", "dialogLabel", "monthLabel", "onKeyDown", "React", "useLayoutEffect", "current", "querySelector", "yearLabel", "_jsx", "ref", "role", "getDateTimeFieldLabel", "field", "locale", "type", "_error", "DatePicker", "props", "id", "customDisplayFormat", "displayFormat", "maxDate", "maxTime", "minDate", "minTime", "monthsToShow", "onChange", "overrides", "pickerAppearance", "placeholder", "readOnly", "timeFormat", "timeIntervals", "value", "calendarRef", "datePickerRef", "onBlur", "onCalendarClose", "onCalendarKeyDown", "onCalendarOpen", "onChangeRaw", "onKeyDownCapture", "useDatePickerKeyboard", "rejectedInputValueRef", "useRef", "undefined", "setContainerRef", "setModalContainer", "element", "useState", "useCallback", "popperContainer", "i18n", "t", "useTranslation", "CustomCalendarContainer", "calendarContainer", "containerProps", "style", "children_0", "dateFormat", "incomingDate", "event", "newDate", "hasAmbiguousYearInput", "target", "date", "inputValue", "picker", "tzOffset", "getTimezoneOffset", "onChangeFromProps", "dateTimePickerProps", "customInputRef", "disabled", "monthsShown", "ChevronIcon", "nextMonthButtonLabel", "nextYearButtonLabel", "placeholderText", "modalContainer", "popperPlacement", "portalId", "preventOpenOnFocus", "previousMonthButtonLabel", "previousYearButtonLabel", "selected", "shouldCloseOnSelect", "showMonthYearPicker", "showPopperArrow", "showTimeSelect", "showTimeSelectOnly", "onBlurCapture", "event_0", "input", "flushSync", "classes", "useEffect", "datepickerLocale", "getFormattedLocale", "registerLocale", "setDefaultLocale", "dateFNS", "_jsxs", "dropdownMode", "showMonthDropdown", "showYearDropdown", "DatePicker_default"]
7
+ }