ezux 1.1.13 → 1.1.18

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 (513) hide show
  1. package/README.md +58 -15
  2. package/dist/DeleteConfirmationModal-CukNDgtX.cjs +1 -0
  3. package/dist/DeleteConfirmationModal-p8XGDGIw.js +38 -0
  4. package/dist/EzContextMenu-BCUoEQp5.cjs +1 -0
  5. package/dist/EzContextMenu-srLxujt8.js +287 -0
  6. package/dist/EzErrorBoundary-C7a6VisX.js +74 -0
  7. package/dist/EzErrorBoundary-d_2g-_EK.cjs +1 -0
  8. package/dist/EzEventModal-C079wLjP.js +725 -0
  9. package/dist/EzEventModal-CAA9cAM0.cjs +1 -0
  10. package/dist/EzFlow-C74NbZA9.js +2545 -0
  11. package/dist/EzFlow-CQFeY7DL.cjs +5 -0
  12. package/dist/EzGroupingPanel-BVaAJaVU.js +107 -0
  13. package/dist/EzGroupingPanel-BwWDWEuW.cjs +1 -0
  14. package/dist/EzKanban-BlJWybKe.js +1575 -0
  15. package/dist/EzKanban-DdKODRRv.cjs +2 -0
  16. package/dist/EzLayout-BGnqFtvO.cjs +1 -0
  17. package/dist/EzLayout-CiaPLniV.js +7005 -0
  18. package/dist/EzProvider-AlmsYIDk.js +982 -0
  19. package/dist/EzProvider-L2qQMq-v.cjs +1 -0
  20. package/dist/EzScheduler-C1Jtvvju.js +2700 -0
  21. package/dist/EzScheduler-CkqTngI6.cjs +1 -0
  22. package/dist/EzSchedulerQuickAdd-BIC8xbSn.js +124 -0
  23. package/dist/EzSchedulerQuickAdd-BeNfGdWs.cjs +1 -0
  24. package/dist/EzSchedulerToolbar-BJwTpgas.cjs +1 -0
  25. package/dist/EzSchedulerToolbar-Ba4gbvUg.js +305 -0
  26. package/dist/EzSignature-7UHO5lSP.js +386 -0
  27. package/dist/EzSignature-Df7UZ-IS.cjs +1 -0
  28. package/dist/EzTable-CEXvJR1t.cjs +3 -0
  29. package/dist/EzTable-D2p1IWHc.js +4290 -0
  30. package/dist/EzTableEditDialog-BXnnYSSy.cjs +1 -0
  31. package/dist/EzTableEditDialog-Ccd5XoHm.js +84 -0
  32. package/dist/EzTableFooter-CtexeDAC.cjs +1 -0
  33. package/dist/EzTableFooter-DrLoWelo.js +35 -0
  34. package/dist/EzTableToolbar-BH5z9fSJ.js +160 -0
  35. package/dist/EzTableToolbar-DwuumvWP.cjs +1 -0
  36. package/dist/EzTreeView-D1G0Aomc.js +818 -0
  37. package/dist/EzTreeView-KMGlU4ax.cjs +1 -0
  38. package/dist/HighlightText-BViuwe03.cjs +1 -0
  39. package/dist/HighlightText-DNA2R2uf.js +56 -0
  40. package/dist/KanbanBoard-B7_Z5sh1.js +1697 -0
  41. package/dist/KanbanBoard-CyitudI1.cjs +1 -0
  42. package/dist/Modal-BmX1C448.cjs +1 -0
  43. package/dist/Modal-CrzpKyjK.js +74 -0
  44. package/dist/NotificationPanel-BzpDc10Q.js +54 -0
  45. package/dist/NotificationPanel-CFME00wq.cjs +1 -0
  46. package/dist/TooltipWrapper-BSAmUx9H.js +44 -0
  47. package/dist/TooltipWrapper-DfbFAZ1U.cjs +1 -0
  48. package/dist/advanced.cjs +10 -0
  49. package/dist/advanced.d.ts +44 -0
  50. package/dist/advanced.es.js +400 -0
  51. package/dist/avatar-BSdRHETK.cjs +1 -0
  52. package/dist/avatar-BvCUJ-_r.js +27 -0
  53. package/dist/button-BBMwzUtG.cjs +1 -0
  54. package/dist/button-CYyNwV8S.js +44 -0
  55. package/dist/calendar-DEHX32Cp.cjs +1 -0
  56. package/dist/calendar-DOIPGsyI.js +112 -0
  57. package/dist/card-CPlRZxbq.cjs +1 -0
  58. package/dist/card-ZUNxcdIM.js +60 -0
  59. package/dist/checkbox-BrCh_Iid.cjs +1 -0
  60. package/dist/checkbox-DRkQuB4W.js +21 -0
  61. package/dist/components/EzFlow/EzConnectionLine.d.ts +5 -0
  62. package/dist/components/EzFlow/EzFlow.examples.d.ts +5 -0
  63. package/dist/components/EzFlow/EzFlow.types.d.ts +260 -0
  64. package/dist/components/EzFlow/EzFlowBackground.d.ts +5 -0
  65. package/dist/components/EzFlow/EzFlowCanvas.d.ts +3 -0
  66. package/dist/components/EzFlow/EzFlowControls.d.ts +5 -0
  67. package/dist/components/EzFlow/EzFlowEdge.d.ts +5 -0
  68. package/dist/components/EzFlow/EzFlowHeader.d.ts +6 -0
  69. package/dist/components/EzFlow/EzFlowToolbox.d.ts +6 -0
  70. package/dist/components/EzFlow/EzWorkflow.d.ts +5 -0
  71. package/dist/components/EzFlow/EzWorkflowPerformance.d.ts +3 -0
  72. package/dist/components/EzFlow/EzWorkflowServiceAdapters.d.ts +24 -0
  73. package/dist/components/EzFlow/EzWorkflowValidation.d.ts +95 -0
  74. package/dist/components/EzFlow/index.d.ts +13 -0
  75. package/dist/components/EzFlow/nodes/ActionNode.d.ts +3 -0
  76. package/dist/components/EzFlow/nodes/ApprovalNode.d.ts +3 -0
  77. package/dist/components/EzFlow/nodes/DecisionNode.d.ts +3 -0
  78. package/dist/components/EzFlow/nodes/DelayNode.d.ts +3 -0
  79. package/dist/components/EzFlow/nodes/EndNode.d.ts +3 -0
  80. package/dist/components/EzFlow/nodes/GroupNode.d.ts +3 -0
  81. package/dist/components/EzFlow/nodes/LoopNode.d.ts +3 -0
  82. package/dist/components/EzFlow/nodes/RequestNode.d.ts +3 -0
  83. package/dist/components/EzFlow/nodes/StartNode.d.ts +3 -0
  84. package/dist/components/EzFlow/nodes/index.d.ts +9 -0
  85. package/dist/components/EzKanban/EzKanban.types.d.ts +808 -0
  86. package/dist/components/EzKanban/components/CardEditorModal.d.ts +23 -0
  87. package/dist/components/EzKanban/components/EzKanbanErrorFallback.d.ts +1 -0
  88. package/dist/components/EzKanban/components/FilterPopover.d.ts +10 -0
  89. package/dist/components/EzKanban/components/KanbanBoard.d.ts +59 -0
  90. package/dist/components/EzKanban/components/KanbanCard.d.ts +46 -0
  91. package/dist/components/EzKanban/components/KanbanColumn.d.ts +55 -0
  92. package/dist/components/EzKanban/components/KanbanSwimlane.d.ts +45 -0
  93. package/dist/components/EzKanban/components/KanbanToolbar.d.ts +41 -0
  94. package/dist/components/EzKanban/exports.d.ts +4 -0
  95. package/dist/components/EzKanban/hooks/useKanbanCards.d.ts +36 -0
  96. package/dist/components/EzKanban/hooks/useKanbanColumns.d.ts +27 -0
  97. package/dist/components/EzKanban/hooks/useKanbanDragDrop.d.ts +31 -0
  98. package/dist/components/EzKanban/hooks/useKanbanFilters.d.ts +23 -0
  99. package/dist/components/EzKanban/hooks/useKanbanState.d.ts +79 -0
  100. package/dist/components/EzKanban/hooks/useKanbanSwimlanes.d.ts +27 -0
  101. package/dist/components/EzKanban/hooks/useKanbanVirtualization.d.ts +16 -0
  102. package/dist/components/EzKanban/index.d.ts +51 -0
  103. package/dist/components/EzKanban/services/KanbanService.d.ts +31 -0
  104. package/dist/components/EzKanban/state/kanban.store.d.ts +33 -0
  105. package/dist/components/EzKanban/useEzKanban.d.ts +87 -0
  106. package/dist/components/EzKanban/views/KanbanTimelineView.d.ts +15 -0
  107. package/dist/components/EzLayout/Authentication/AuthSlider.d.ts +13 -0
  108. package/dist/components/EzLayout/Authentication/InputPassword.d.ts +7 -0
  109. package/dist/components/EzLayout/Authentication/SignInForm.d.ts +21 -0
  110. package/dist/components/EzLayout/Authentication/SignUpForm.d.ts +20 -0
  111. package/dist/components/EzLayout/EzHeader.d.ts +48 -0
  112. package/dist/components/EzLayout/EzLanguageSwitcher.d.ts +4 -0
  113. package/dist/components/EzLayout/EzLayout.types.d.ts +261 -0
  114. package/dist/components/EzLayout/EzOrganizationSwitcher.d.ts +14 -0
  115. package/dist/components/EzLayout/EzSidebar.d.ts +24 -0
  116. package/dist/components/EzLayout/EzThemeColorChanger.d.ts +9 -0
  117. package/dist/components/EzLayout/EzThemeSwitcher.d.ts +8 -0
  118. package/dist/components/EzLayout/EzUserProfile.d.ts +27 -0
  119. package/dist/components/EzLayout/components/EzSidebarFooter.d.ts +8 -0
  120. package/dist/components/EzLayout/components/EzSidebarNav.d.ts +10 -0
  121. package/dist/components/EzLayout/components/EzSidebarNavItem.d.ts +11 -0
  122. package/dist/components/EzLayout/components/MainContent.d.ts +13 -0
  123. package/dist/components/EzLayout/hooks/useLayoutImperative.d.ts +17 -0
  124. package/dist/components/EzLayout/hooks/useLayoutState.d.ts +25 -0
  125. package/dist/components/EzLayout/index.d.ts +23 -0
  126. package/dist/components/EzLayout/useEzLayout.d.ts +34 -0
  127. package/dist/components/EzScheduler/EzScheduler.types.d.ts +1252 -0
  128. package/dist/components/EzScheduler/EzSchedulerToolbar.d.ts +117 -0
  129. package/dist/components/EzScheduler/components/EzEventModal.d.ts +23 -0
  130. package/dist/components/EzScheduler/components/EzOverlapAlert.d.ts +12 -0
  131. package/dist/components/EzScheduler/components/EzQuickInfoPopup.d.ts +22 -0
  132. package/dist/components/EzScheduler/components/EzResourceSidebar.d.ts +33 -0
  133. package/dist/components/EzScheduler/components/EzSchedulerContent.d.ts +111 -0
  134. package/dist/components/EzScheduler/components/EzSchedulerQuickAdd.d.ts +17 -0
  135. package/dist/components/EzScheduler/components/RecurrenceEditor.d.ts +7 -0
  136. package/dist/components/EzScheduler/components/SchedulerLoadingSpinner.d.ts +2 -0
  137. package/dist/components/EzScheduler/components/dnd/DraggableEvent.d.ts +24 -0
  138. package/dist/components/EzScheduler/components/dnd/DroppableSlot.d.ts +19 -0
  139. package/dist/components/EzScheduler/hooks/useRecurrence.d.ts +2 -0
  140. package/dist/components/EzScheduler/hooks/useSchedulerEventHandlers.d.ts +15 -0
  141. package/dist/components/EzScheduler/hooks/useSchedulerEvents.d.ts +27 -0
  142. package/dist/components/EzScheduler/hooks/useSchedulerImperative.d.ts +19 -0
  143. package/dist/components/EzScheduler/hooks/useSchedulerNavigation.d.ts +9 -0
  144. package/dist/components/EzScheduler/hooks/useSchedulerResources.d.ts +10 -0
  145. package/dist/components/EzScheduler/hooks/useSchedulerState.d.ts +14 -0
  146. package/dist/components/EzScheduler/hooks/useSchedulerVirtualization.d.ts +9 -0
  147. package/dist/components/EzScheduler/index.d.ts +43 -0
  148. package/dist/components/EzScheduler/models/EventSettings.d.ts +11 -0
  149. package/dist/components/EzScheduler/models/View.d.ts +49 -0
  150. package/dist/components/EzScheduler/models/index.d.ts +2 -0
  151. package/dist/components/EzScheduler/services/AttendeeService.d.ts +15 -0
  152. package/dist/components/EzScheduler/services/AuditService.d.ts +15 -0
  153. package/dist/components/EzScheduler/services/CollisionDetectionService.d.ts +19 -0
  154. package/dist/components/EzScheduler/services/DragAndDropService.d.ts +16 -0
  155. package/dist/components/EzScheduler/services/HistoryService.d.ts +31 -0
  156. package/dist/components/EzScheduler/services/ICalendarImportService.d.ts +16 -0
  157. package/dist/components/EzScheduler/services/PrintService.d.ts +7 -0
  158. package/dist/components/EzScheduler/services/RecurrenceEngine.d.ts +7 -0
  159. package/dist/components/EzScheduler/services/ReminderService.d.ts +17 -0
  160. package/dist/components/EzScheduler/services/SchedulerService.d.ts +71 -0
  161. package/dist/components/EzScheduler/services/SearchService.d.ts +11 -0
  162. package/dist/components/EzScheduler/services/SecurityService.d.ts +25 -0
  163. package/dist/components/EzScheduler/services/TimezoneService.d.ts +20 -0
  164. package/dist/components/EzScheduler/services/VirtualScrollingService.d.ts +34 -0
  165. package/dist/components/EzScheduler/state/scheduler.store.d.ts +27 -0
  166. package/dist/components/EzScheduler/templates/CellTemplate.d.ts +42 -0
  167. package/dist/components/EzScheduler/templates/EditorTemplate.d.ts +32 -0
  168. package/dist/components/EzScheduler/templates/HeaderTemplate.d.ts +36 -0
  169. package/dist/components/EzScheduler/useEzScheduler.d.ts +104 -0
  170. package/dist/components/EzScheduler/utils/createDragConstraint.d.ts +7 -0
  171. package/dist/components/EzScheduler/utils/getWeekNumber.d.ts +8 -0
  172. package/dist/components/EzScheduler/utils/sanitizeHtml.d.ts +18 -0
  173. package/dist/components/EzScheduler/views/AgendaView.d.ts +28 -0
  174. package/dist/components/EzScheduler/views/DayWeekView.d.ts +177 -0
  175. package/dist/components/EzScheduler/views/MonthView.d.ts +60 -0
  176. package/dist/components/EzScheduler/views/TimelineView.d.ts +116 -0
  177. package/dist/components/EzSignature/EzSignature.d.ts +42 -0
  178. package/dist/components/EzSignature/EzSignature.types.d.ts +132 -0
  179. package/dist/components/EzSignature/index.d.ts +2 -0
  180. package/dist/components/EzTable/EzColumnMenu.d.ts +7 -0
  181. package/dist/components/EzTable/EzDateFilterTree.d.ts +7 -0
  182. package/dist/components/EzTable/EzExcelFilter.d.ts +8 -0
  183. package/dist/components/EzTable/EzFilterBuilder.d.ts +12 -0
  184. package/dist/components/EzTable/EzGroupingPanel.d.ts +9 -0
  185. package/dist/components/EzTable/EzHeaderContextMenu.d.ts +8 -0
  186. package/dist/components/EzTable/EzPagination.d.ts +19 -0
  187. package/dist/components/EzTable/EzTable.types.d.ts +1 -0
  188. package/dist/components/EzTable/EzTableEditDialog.d.ts +15 -0
  189. package/dist/components/EzTable/EzTableFooter.d.ts +10 -0
  190. package/dist/components/EzTable/EzTableOverlays.d.ts +11 -0
  191. package/dist/components/EzTable/EzTableStatusBar.d.ts +10 -0
  192. package/dist/components/EzTable/EzTableToolbar.d.ts +60 -0
  193. package/dist/components/EzTable/SmartCell.d.ts +7 -0
  194. package/dist/components/EzTable/components/AdvancedColumnFilter.d.ts +16 -0
  195. package/dist/components/EzTable/components/BooleanFilterSection.d.ts +7 -0
  196. package/dist/components/EzTable/components/EzDraggableHeader.d.ts +10 -0
  197. package/dist/components/EzTable/components/EzHeaderDragPreview.d.ts +7 -0
  198. package/dist/components/EzTable/components/EzTableBodySection.d.ts +72 -0
  199. package/dist/components/EzTable/components/EzTableCell.d.ts +46 -0
  200. package/dist/components/EzTable/components/EzTableHeaderSection.d.ts +23 -0
  201. package/dist/components/EzTable/components/EzTablePaginationSection.d.ts +31 -0
  202. package/dist/components/EzTable/components/EzTableRow.d.ts +58 -0
  203. package/dist/components/EzTable/components/FilterActionButtons.d.ts +16 -0
  204. package/dist/components/EzTable/components/FilterRuleSelect.d.ts +26 -0
  205. package/dist/components/EzTable/components/SelectAllCheckbox.d.ts +21 -0
  206. package/dist/components/EzTable/components/SelectFilterSection.d.ts +18 -0
  207. package/dist/components/EzTable/components/VirtualizedFilterList.d.ts +21 -0
  208. package/dist/components/EzTable/constants/filterOptions.d.ts +47 -0
  209. package/dist/components/EzTable/context/EzTableContext.d.ts +10 -0
  210. package/dist/components/EzTable/context/TableConfigContext.d.ts +13 -0
  211. package/dist/components/EzTable/context/TableStore.d.ts +17 -0
  212. package/dist/components/EzTable/filterUtils.d.ts +5 -0
  213. package/dist/components/EzTable/hooks/useAutoFit.d.ts +4 -0
  214. package/dist/components/EzTable/hooks/useCellEventHandlers.d.ts +16 -0
  215. package/dist/components/EzTable/hooks/useColumnSizeVars.d.ts +6 -0
  216. package/dist/components/EzTable/hooks/useContainerResize.d.ts +11 -0
  217. package/dist/components/EzTable/hooks/useDialogStateInitialization.d.ts +8 -0
  218. package/dist/components/EzTable/hooks/useFilterSelection.d.ts +12 -0
  219. package/dist/components/EzTable/hooks/useTableFiltering.d.ts +23 -0
  220. package/dist/components/EzTable/hooks/useTableHistory.d.ts +87 -0
  221. package/dist/components/EzTable/hooks/useTableImperative.d.ts +42 -0
  222. package/dist/components/EzTable/hooks/useTableSelection.d.ts +32 -0
  223. package/dist/components/EzTable/hooks/useTableState.d.ts +33 -0
  224. package/dist/components/EzTable/hooks/useTableVirtualization.d.ts +35 -0
  225. package/dist/components/EzTable/index.d.ts +54 -0
  226. package/dist/components/EzTable/renderers/index.d.ts +6 -0
  227. package/dist/components/EzTable/services/TableService.d.ts +29 -0
  228. package/dist/components/EzTable/types/EzTableColumn.types.d.ts +146 -0
  229. package/dist/components/EzTable/types/EzTableEdit.types.d.ts +58 -0
  230. package/dist/components/EzTable/types/EzTableFilter.types.d.ts +50 -0
  231. package/dist/components/EzTable/types/EzTableProps.d.ts +750 -0
  232. package/dist/components/EzTable/types/index.d.ts +4 -0
  233. package/dist/components/EzTable/useEzTable.d.ts +17 -0
  234. package/dist/components/EzTable/utils/SizingUtils.d.ts +11 -0
  235. package/dist/components/EzTable/utils/TextMeasurer.d.ts +1 -0
  236. package/dist/components/EzTable/utils/TruncatedTooltip.d.ts +7 -0
  237. package/dist/components/EzTable/utils/columnTypeDetector.d.ts +5 -0
  238. package/dist/components/EzTable/utils/filterTypeGuards.d.ts +3 -0
  239. package/dist/components/EzTable/utils/index.d.ts +1 -0
  240. package/dist/components/EzTreeView/EzTreeView.types.d.ts +364 -0
  241. package/dist/components/EzTreeView/EzTreeViewItem.d.ts +89 -0
  242. package/dist/components/EzTreeView/EzVirtualTree.d.ts +84 -0
  243. package/dist/components/EzTreeView/components/EzTreeViewLoadingSpinner.d.ts +2 -0
  244. package/dist/components/EzTreeView/hooks/useTreeDragDrop.d.ts +31 -0
  245. package/dist/components/EzTreeView/hooks/useTreeExpansion.d.ts +21 -0
  246. package/dist/components/EzTreeView/hooks/useTreeImperative.d.ts +28 -0
  247. package/dist/components/EzTreeView/hooks/useTreeSelection.d.ts +31 -0
  248. package/dist/components/EzTreeView/hooks/useTreeState.d.ts +21 -0
  249. package/dist/components/EzTreeView/hooks/useTreeVirtualization.d.ts +18 -0
  250. package/dist/components/EzTreeView/index.d.ts +40 -0
  251. package/dist/components/EzTreeView/services/TreeService.d.ts +11 -0
  252. package/dist/components/EzTreeView/useEzTreeView.d.ts +50 -0
  253. package/dist/components/EzTreeView/utils/treeUtils.d.ts +17 -0
  254. package/dist/components/shared/components/EzErrorBoundary.d.ts +18 -0
  255. package/dist/components/shared/components/EzLayoutErrorFallback.d.ts +2 -0
  256. package/dist/components/shared/components/EzLoadingSpinner.d.ts +8 -0
  257. package/dist/components/shared/components/EzSchedulerErrorFallback.d.ts +2 -0
  258. package/dist/components/shared/components/EzSortableList.d.ts +12 -0
  259. package/dist/components/shared/components/EzTableErrorFallback.d.ts +2 -0
  260. package/dist/components/shared/components/EzTreeViewErrorFallback.d.ts +2 -0
  261. package/dist/components/ui/avatar.d.ts +10 -0
  262. package/dist/components/ui/badge.d.ts +9 -0
  263. package/dist/components/ui/breadcrumb.d.ts +19 -0
  264. package/dist/components/ui/button.d.ts +13 -0
  265. package/dist/components/ui/calendar.d.ts +15 -0
  266. package/dist/components/ui/card.d.ts +10 -0
  267. package/dist/components/ui/checkbox.d.ts +7 -0
  268. package/dist/components/ui/combobox.d.ts +19 -0
  269. package/dist/components/ui/command.d.ts +78 -0
  270. package/dist/components/ui/context-menu.d.ts +27 -0
  271. package/dist/components/ui/date-time-picker.d.ts +14 -0
  272. package/dist/components/ui/dropdown-menu.d.ts +31 -0
  273. package/dist/components/ui/index.d.ts +27 -0
  274. package/dist/components/ui/input.d.ts +5 -0
  275. package/dist/components/ui/label.d.ts +9 -0
  276. package/dist/components/ui/modal.d.ts +9 -0
  277. package/dist/components/ui/password-input.d.ts +5 -0
  278. package/dist/components/ui/popover.d.ts +10 -0
  279. package/dist/components/ui/progress.d.ts +7 -0
  280. package/dist/components/ui/radio-group.d.ts +5 -0
  281. package/dist/components/ui/resizable.d.ts +8 -0
  282. package/dist/components/ui/scroll-area.d.ts +5 -0
  283. package/dist/components/ui/select.d.ts +26 -0
  284. package/dist/components/ui/skeleton.d.ts +2 -0
  285. package/dist/components/ui/switch.d.ts +6 -0
  286. package/dist/components/ui/table.d.ts +10 -0
  287. package/dist/components/ui/tabs.d.ts +22 -0
  288. package/dist/components/ui/textarea.d.ts +5 -0
  289. package/dist/components/ui/tooltip.d.ts +10 -0
  290. package/dist/date-time-picker-Bs-7XzHD.cjs +1 -0
  291. package/dist/date-time-picker-fUzf4TnU.js +127 -0
  292. package/dist/dropdown-menu-BRP0tyR_.cjs +1 -0
  293. package/dist/dropdown-menu-B_7_K13o.js +78 -0
  294. package/dist/ezux.css +2 -1
  295. package/dist/flow.cjs +1 -0
  296. package/dist/flow.d.ts +2 -0
  297. package/dist/flow.es.js +2 -0
  298. package/dist/index.cjs +3 -12
  299. package/dist/index.d.ts +66 -6404
  300. package/dist/index.es.js +229 -1041
  301. package/dist/input-CYlvlbF7.cjs +1 -0
  302. package/dist/input-Cj3sQK3M.js +14 -0
  303. package/dist/kanban.cjs +1 -1
  304. package/dist/kanban.d.ts +2 -1343
  305. package/dist/kanban.es.js +4 -17
  306. package/dist/label-BGgvoZWD.cjs +1 -0
  307. package/dist/label-DWEV--5W.js +16 -0
  308. package/dist/layout.cjs +1 -1
  309. package/dist/layout.d.ts +2 -690
  310. package/dist/layout.es.js +2 -20
  311. package/dist/lib/perfect-freehand.d.ts +221 -0
  312. package/dist/lib/utils.d.ts +2 -0
  313. package/dist/mock-services.cjs +1 -0
  314. package/dist/mock-services.d.ts +8 -0
  315. package/dist/mock-services.es.js +161 -0
  316. package/dist/popover-D1akYj0W.js +17 -0
  317. package/dist/popover-wZKNvYM5.cjs +1 -0
  318. package/dist/scheduler.cjs +1 -1
  319. package/dist/scheduler.d.ts +2 -1430
  320. package/dist/scheduler.es.js +2 -11
  321. package/dist/scroll-area-BJs87d45.js +35 -0
  322. package/dist/scroll-area-DSkE2KB_.cjs +1 -0
  323. package/dist/select-D4tFaSai.js +43 -0
  324. package/dist/select-sVieKbLu.cjs +1 -0
  325. package/dist/shared/components/AnimatedText.d.ts +44 -0
  326. package/dist/shared/components/BaseCell.d.ts +14 -0
  327. package/dist/shared/components/BooleanRenderer.d.ts +34 -0
  328. package/dist/shared/components/ChartRenderer.d.ts +19 -0
  329. package/dist/shared/components/DeleteConfirmationModal.d.ts +11 -0
  330. package/dist/shared/components/EzContextMenu.d.ts +12 -0
  331. package/dist/shared/components/EzNotificationDropdown.d.ts +2 -0
  332. package/dist/shared/components/HighlightText.d.ts +4 -0
  333. package/dist/shared/components/Modal.d.ts +13 -0
  334. package/dist/shared/components/NotificationPanel.d.ts +2 -0
  335. package/dist/shared/components/PrimitiveRenderer.d.ts +39 -0
  336. package/dist/shared/components/SearchableSelect.d.ts +13 -0
  337. package/dist/shared/components/SelectRenderer.d.ts +33 -0
  338. package/dist/shared/components/StatusBadge.d.ts +21 -0
  339. package/dist/shared/components/TooltipWrapper.d.ts +12 -0
  340. package/dist/shared/components/index.d.ts +9 -0
  341. package/dist/shared/contexts/EzProvider.d.ts +56 -0
  342. package/dist/shared/hooks/index.d.ts +56 -0
  343. package/dist/shared/hooks/useBaseComponent.d.ts +59 -0
  344. package/dist/shared/hooks/useComponentImperativeAPI.d.ts +11 -0
  345. package/dist/shared/hooks/useComponentState.d.ts +39 -0
  346. package/dist/shared/hooks/useCurrentTime.d.ts +6 -0
  347. package/dist/shared/hooks/useDataChangeEvents.d.ts +53 -0
  348. package/dist/shared/hooks/useDebounce.d.ts +10 -0
  349. package/dist/shared/hooks/useDeleteConfirmation.d.ts +9 -0
  350. package/dist/shared/hooks/useDialogState.d.ts +21 -0
  351. package/dist/shared/hooks/useDndHandlers.d.ts +19 -0
  352. package/dist/shared/hooks/useEditing.d.ts +107 -0
  353. package/dist/shared/hooks/useEventHandlers.d.ts +61 -0
  354. package/dist/shared/hooks/useEzTheme.d.ts +22 -0
  355. package/dist/shared/hooks/useFieldValidation.d.ts +24 -0
  356. package/dist/shared/hooks/useHistory.d.ts +13 -0
  357. package/dist/shared/hooks/useI18n.d.ts +8 -0
  358. package/dist/shared/hooks/useImperativeAPI.d.ts +8 -0
  359. package/dist/shared/hooks/useInitCoreServices.d.ts +5 -0
  360. package/dist/shared/hooks/useKeyboardNavigation.d.ts +36 -0
  361. package/dist/shared/hooks/useKeyboardShortcuts.d.ts +14 -0
  362. package/dist/shared/hooks/useLifecycleEvents.d.ts +22 -0
  363. package/dist/shared/hooks/useLoadingState.d.ts +17 -0
  364. package/dist/shared/hooks/useMediaQuery.d.ts +6 -0
  365. package/dist/shared/hooks/useNotificationService.d.ts +8 -0
  366. package/dist/shared/hooks/usePerformanceMonitor.d.ts +22 -0
  367. package/dist/shared/hooks/useRowSelectionEvents.d.ts +44 -0
  368. package/dist/shared/hooks/useSelection.d.ts +73 -0
  369. package/dist/shared/hooks/useService.d.ts +12 -0
  370. package/dist/shared/hooks/useServiceState.d.ts +1 -0
  371. package/dist/shared/hooks/useStateChangeEvents.d.ts +61 -0
  372. package/dist/shared/hooks/useTheme.d.ts +13 -0
  373. package/dist/shared/hooks/useVirtualization.d.ts +85 -0
  374. package/dist/shared/services/BaseService.d.ts +57 -0
  375. package/dist/shared/services/ContextMenuService.d.ts +58 -0
  376. package/dist/shared/services/ExportService.d.ts +35 -0
  377. package/dist/shared/services/FocusManagerService.d.ts +33 -0
  378. package/dist/shared/services/HierarchyService.d.ts +43 -0
  379. package/dist/shared/services/I18nService.d.ts +84 -0
  380. package/dist/shared/services/LayoutService.d.ts +80 -0
  381. package/dist/shared/services/NotificationService.d.ts +44 -0
  382. package/dist/shared/services/PersistenceService.d.ts +69 -0
  383. package/dist/shared/services/ServiceRegistry.d.ts +52 -0
  384. package/dist/shared/services/ThemeService.d.ts +49 -0
  385. package/dist/shared/services/VirtualizationService.d.ts +51 -0
  386. package/dist/shared/state/store.d.ts +10 -0
  387. package/dist/shared/themes.d.ts +25 -0
  388. package/dist/shared/types/BaseProps.d.ts +17 -0
  389. package/dist/shared/types/common.d.ts +373 -0
  390. package/dist/shared/types/index.d.ts +2 -0
  391. package/dist/shared/utils/canvasUtils.d.ts +16 -0
  392. package/dist/shared/utils/commonUtils.d.ts +28 -0
  393. package/dist/shared/utils/csvUtils.d.ts +7 -0
  394. package/dist/shared/utils/dateUtils.d.ts +5 -0
  395. package/dist/shared/utils/dndUtils.d.ts +16 -0
  396. package/dist/shared/utils/formatUtils.d.ts +20 -0
  397. package/dist/shared/utils/imperativeApiUtils.d.ts +36 -0
  398. package/dist/shared/utils/index.d.ts +11 -0
  399. package/dist/shared/utils/renderUtils.d.ts +6 -0
  400. package/dist/shared/utils/serviceUtils.d.ts +10 -0
  401. package/dist/shared/utils/styleUtils.d.ts +121 -0
  402. package/dist/shared/utils/validationUtils.d.ts +16 -0
  403. package/dist/signature.cjs +1 -1
  404. package/dist/signature.d.ts +2 -410
  405. package/dist/signature.es.js +2 -4
  406. package/dist/table.cjs +1 -1
  407. package/dist/table.d.ts +2 -1059
  408. package/dist/table.es.js +2 -17
  409. package/dist/theme-vars.css +143 -135
  410. package/dist/tooltip-B1wC9m05.js +16 -0
  411. package/dist/tooltip-Qmzrg5u5.cjs +1 -0
  412. package/dist/treeview.cjs +1 -1
  413. package/dist/treeview.d.ts +2 -656
  414. package/dist/treeview.es.js +2 -954
  415. package/dist/useComponentState-DiSFLYju.js +57 -0
  416. package/dist/useComponentState-Wcz6pjd6.cjs +1 -0
  417. package/dist/useImperativeAPI-Dbx2hMTb.js +7 -0
  418. package/dist/useImperativeAPI-VrgLwXEO.cjs +1 -0
  419. package/dist/useInitCoreServices-CuBrviDM.js +40 -0
  420. package/dist/useInitCoreServices-DlALVDNx.cjs +1 -0
  421. package/dist/useService-CnCBGG3G.js +10 -0
  422. package/dist/useService-CyF782jv.cjs +1 -0
  423. package/dist/useServiceState-CkrJZm1D.js +21 -0
  424. package/dist/useServiceState-PyYQWxHi.cjs +1 -0
  425. package/package.json +76 -56
  426. package/dist/EzContextMenu-B6HBUjWv.cjs +0 -5
  427. package/dist/EzContextMenu-BSA_B6Pr.js +0 -3500
  428. package/dist/EzErrorBoundary-CEdz_hDo.cjs +0 -41
  429. package/dist/EzErrorBoundary-D4NBadES.js +0 -3727
  430. package/dist/EzEventModal-BUMp_BFi.js +0 -689
  431. package/dist/EzEventModal-xzHfzi0O.cjs +0 -1
  432. package/dist/EzGroupingPanel-BUsIYDRi.js +0 -143
  433. package/dist/EzGroupingPanel-D0HdSomF.cjs +0 -1
  434. package/dist/EzSchedulerQuickAdd-C653LTGh.js +0 -118
  435. package/dist/EzSchedulerQuickAdd-UnOWCpJd.cjs +0 -1
  436. package/dist/EzSchedulerToolbar-C-5OdRY6.cjs +0 -1
  437. package/dist/EzSchedulerToolbar-CO5jjDQg.js +0 -240
  438. package/dist/EzSignature-BaNesxwC.cjs +0 -1
  439. package/dist/EzSignature-D4EYwo9W.js +0 -419
  440. package/dist/EzTableEditDialog-Cd948V1C.js +0 -63
  441. package/dist/EzTableEditDialog-NiOubaMT.cjs +0 -1
  442. package/dist/EzTableFooter-CWjfGCjL.cjs +0 -1
  443. package/dist/EzTableFooter-DveD12RC.js +0 -54
  444. package/dist/EzTableToolbar-Bz8UWv6j.js +0 -246
  445. package/dist/EzTableToolbar-DHE7Bb1R.cjs +0 -1
  446. package/dist/HighlightText-8D6KEyBw.js +0 -68
  447. package/dist/HighlightText-LtZmzCle.cjs +0 -1
  448. package/dist/NotificationPanel-D2Y-_ahk.js +0 -68
  449. package/dist/NotificationPanel-zLxrtTGf.cjs +0 -1
  450. package/dist/TooltipWrapper-BrRTi5EJ.js +0 -2021
  451. package/dist/TooltipWrapper-DWts4bAI.cjs +0 -1
  452. package/dist/avatar-BeK0E4mn.js +0 -41
  453. package/dist/avatar-DZAaTK2f.cjs +0 -1
  454. package/dist/bell-DAz8P0BR.js +0 -14
  455. package/dist/bell-DOX2y38e.cjs +0 -1
  456. package/dist/calendar-BMZ8ddOf.cjs +0 -1
  457. package/dist/calendar-Dy3rVMW2.js +0 -90
  458. package/dist/checkbox-B0lGHUyy.cjs +0 -1
  459. package/dist/checkbox-boJRxICT.js +0 -46
  460. package/dist/chevron-down-C3s8jU6B.js +0 -5
  461. package/dist/chevron-down-DZVL7VHW.cjs +0 -1
  462. package/dist/chevron-left-BFr8XZyF.js +0 -5
  463. package/dist/chevron-left-HWhRo6IH.cjs +0 -1
  464. package/dist/circle-alert-77QqFR-z.cjs +0 -1
  465. package/dist/circle-alert-B2AMDd8N.js +0 -9
  466. package/dist/circle-x-Cv7bfIC_.js +0 -9
  467. package/dist/circle-x-DwVXxhXr.cjs +0 -1
  468. package/dist/date-time-picker-DTxHdPgQ.cjs +0 -1
  469. package/dist/date-time-picker-Dj2eftJI.js +0 -1636
  470. package/dist/download-0ZhO2XaW.cjs +0 -1
  471. package/dist/download-panVHmk6.js +0 -9
  472. package/dist/ellipsis-CuqNthAj.js +0 -9
  473. package/dist/ellipsis-CzlqJf-i.cjs +0 -1
  474. package/dist/grip-vertical-CSyDKBul.js +0 -12
  475. package/dist/grip-vertical-DZNBW1Dn.cjs +0 -1
  476. package/dist/index-B3ipEEhH.cjs +0 -2
  477. package/dist/index-BPPb7bcs.js +0 -3220
  478. package/dist/index-BQKw_Vho.js +0 -9604
  479. package/dist/index-C5STgBSy.js +0 -5203
  480. package/dist/index-C6NfgycP.js +0 -4644
  481. package/dist/index-D4f2ZdrG.cjs +0 -2
  482. package/dist/index-DUY1SqMo.cjs +0 -1
  483. package/dist/index-c1Zg--dt.cjs +0 -7
  484. package/dist/input-BgM_la4k.cjs +0 -1
  485. package/dist/input-jYQ5VKNR.js +0 -21
  486. package/dist/isBefore-C3Y_wbk3.js +0 -15
  487. package/dist/isBefore-Cp1ttk6q.cjs +0 -1
  488. package/dist/label-ClOW9UCt.js +0 -55
  489. package/dist/label-Dx6oDB-X.cjs +0 -1
  490. package/dist/layers-BA4i1fYX.js +0 -27
  491. package/dist/layers-xSPd-hz3.cjs +0 -1
  492. package/dist/popover-BJq1CKmi.cjs +0 -1
  493. package/dist/popover-Cmlb7w3R.js +0 -341
  494. package/dist/scroll-area-9fwpVNxT.js +0 -573
  495. package/dist/scroll-area-CwwZSSA4.cjs +0 -1
  496. package/dist/select-GxA46anr.cjs +0 -1
  497. package/dist/select-mDCun_IR.js +0 -35
  498. package/dist/settings-CvyjK75A.js +0 -31
  499. package/dist/settings-DKPknrt8.cjs +0 -1
  500. package/dist/sortable.esm-CsRPuXyD.cjs +0 -1
  501. package/dist/sortable.esm-CzMCDPet.js +0 -477
  502. package/dist/tooltip-B41iztKT.cjs +0 -1
  503. package/dist/tooltip-BCtrEe0z.js +0 -490
  504. package/dist/useComponentState-C87xXa5d.js +0 -64
  505. package/dist/useComponentState-DDgGbBXv.cjs +0 -1
  506. package/dist/useImperativeAPI-DXmCQvPL.js +0 -7
  507. package/dist/useImperativeAPI-DbZ3owSV.cjs +0 -1
  508. package/dist/useInitCoreServices-CwXv2p4S.cjs +0 -1
  509. package/dist/useInitCoreServices-D1WaWlaI.js +0 -3929
  510. package/dist/useService-8OoezWr8.cjs +0 -1
  511. package/dist/useService-BUi3uAqE.js +0 -10
  512. package/dist/useServiceState-BjpCjUn2.cjs +0 -1
  513. package/dist/useServiceState-VE-viK8b.js +0 -24
@@ -0,0 +1,2700 @@
1
+ import { _ as e, g as t, n } from "./EzProvider-AlmsYIDk.js";
2
+ import { t as r } from "./button-CYyNwV8S.js";
3
+ import { n as i, r as a, t as o } from "./avatar-BvCUJ-_r.js";
4
+ import { i as s, n as c, t as l } from "./EzErrorBoundary-C7a6VisX.js";
5
+ import { n as u, t as d } from "./useInitCoreServices-CuBrviDM.js";
6
+ import { t as f } from "./useServiceState-CkrJZm1D.js";
7
+ import { i as p, n as m, r as h, t as g } from "./tooltip-B1wC9m05.js";
8
+ import { _, t as v } from "./EzContextMenu-srLxujt8.js";
9
+ import { a as y, i as b, n as x, r as S, s as C, t as w } from "./TooltipWrapper-BSAmUx9H.js";
10
+ import { t as T } from "./Modal-CrzpKyjK.js";
11
+ import E, { useCallback as D, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
12
+ import { AlertTriangle as M, Clock as N, RefreshCw as P, X as ee } from "lucide-react";
13
+ import { Fragment as te, jsx as F, jsxs as I } from "react/jsx-runtime";
14
+ import { Store as L } from "@tanstack/store";
15
+ import { DndContext as R, DragOverlay as z, PointerSensor as B, pointerWithin as V, rectIntersection as H, useDndContext as U, useDraggable as W, useDroppable as G, useSensor as K, useSensors as q } from "@dnd-kit/core";
16
+ import { useStore as ne } from "@tanstack/react-store";
17
+ import { QueryClient as J, QueryClientProvider as re, useMutation as Y, useQuery as ie, useQueryClient as ae } from "@tanstack/react-query";
18
+ import { addDays as X, addMinutes as oe, addMonths as se, addWeeks as Z, areIntervalsOverlapping as ce, differenceInMinutes as le, eachDayOfInterval as ue, endOfDay as de, endOfMonth as fe, endOfWeek as pe, format as Q, getISOWeek as me, getWeek as he, isSameDay as $, isSameMonth as ge, isWithinInterval as _e, startOfDay as ve, startOfMonth as ye, startOfWeek as be, subDays as xe, subMonths as Se, subWeeks as Ce } from "date-fns";
19
+ import { RRule as we } from "rrule";
20
+ import { CSS as Te } from "@dnd-kit/utilities";
21
+ import Ee from "dompurify";
22
+ //#region src/shared/hooks/useMediaQuery.ts
23
+ function De(e) {
24
+ let [t, n] = j(() => typeof window < "u" ? window.matchMedia(e).matches : !1);
25
+ return O(() => {
26
+ if (typeof window > "u") return;
27
+ let t = window.matchMedia(e), r = () => n(t.matches);
28
+ return t.addEventListener ? t.addEventListener("change", r) : t.addListener(r), () => {
29
+ t.removeEventListener ? t.removeEventListener("change", r) : t.removeListener(r);
30
+ };
31
+ }, [e]), t;
32
+ }
33
+ //#endregion
34
+ //#region src/shared/hooks/useCurrentTime.ts
35
+ function Oe(e = 6e4) {
36
+ let [t, n] = j(() => /* @__PURE__ */ new Date());
37
+ return O(() => {
38
+ let t = setInterval(() => {
39
+ n(/* @__PURE__ */ new Date());
40
+ }, e);
41
+ return () => clearInterval(t);
42
+ }, [e]), t;
43
+ }
44
+ //#endregion
45
+ //#region src/shared/hooks/useKeyboardNavigation.ts
46
+ var ke = ({ totalItems: e, columns: t = 1, onSelect: n, onAction: r, onCancel: i, wrap: a = !0, enabled: o = !0 }) => {
47
+ let [s, c] = j(-1), l = D((l) => {
48
+ if (!o || e === 0) return;
49
+ let u = s;
50
+ switch (l.key) {
51
+ case "ArrowDown":
52
+ s === -1 ? u = 0 : (u = s + t, u >= e && (u = a ? u % t : s)), l.preventDefault();
53
+ break;
54
+ case "ArrowUp":
55
+ if (s === -1) u = e - 1;
56
+ else if (u = s - t, u < 0) if (a) {
57
+ let n = s % t;
58
+ u = (Math.ceil(e / t) - 1) * t + n, u >= e && (u -= t);
59
+ } else u = s;
60
+ l.preventDefault();
61
+ break;
62
+ case "ArrowRight":
63
+ s === -1 ? u = 0 : (u = s + 1, u >= e && (u = a ? 0 : s)), l.preventDefault();
64
+ break;
65
+ case "ArrowLeft":
66
+ s === -1 ? u = e - 1 : (u = s - 1, u < 0 && (u = a ? e - 1 : s)), l.preventDefault();
67
+ break;
68
+ case "Enter":
69
+ s !== -1 && r && (r(s), l.preventDefault());
70
+ break;
71
+ case "Escape":
72
+ i && (i(), l.preventDefault()), c(-1);
73
+ break;
74
+ default: return;
75
+ }
76
+ u !== s && (c(u), n?.(u));
77
+ }, [
78
+ s,
79
+ e,
80
+ t,
81
+ n,
82
+ r,
83
+ i,
84
+ a,
85
+ o
86
+ ]);
87
+ return O(() => {
88
+ if (o) return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
89
+ }, [o, l]), {
90
+ selectedIndex: s,
91
+ setSelectedIndex: c
92
+ };
93
+ }, Ae = (e) => new L({
94
+ events: [],
95
+ resources: [],
96
+ view: "week",
97
+ currentDate: /* @__PURE__ */ new Date(),
98
+ selectedDate: /* @__PURE__ */ new Date(),
99
+ selectedEventId: null,
100
+ slotDuration: 30,
101
+ is24Hour: !0,
102
+ ...e
103
+ }), je = (e) => ({
104
+ setEvents: (t) => {
105
+ e.setState((e) => ({
106
+ ...e,
107
+ events: t
108
+ }));
109
+ },
110
+ addEvent: (t) => {
111
+ e.setState((e) => ({
112
+ ...e,
113
+ events: [...e.events, t]
114
+ }));
115
+ },
116
+ updateEvent: (t) => {
117
+ e.setState((e) => ({
118
+ ...e,
119
+ events: e.events.map((e) => e.id === t.id ? t : e)
120
+ }));
121
+ },
122
+ deleteEvent: (t) => {
123
+ e.setState((e) => ({
124
+ ...e,
125
+ events: e.events.filter((e) => e.id !== t)
126
+ }));
127
+ },
128
+ setResources: (t) => {
129
+ e.setState((e) => ({
130
+ ...e,
131
+ resources: t
132
+ }));
133
+ },
134
+ setView: (t) => {
135
+ e.setState((e) => ({
136
+ ...e,
137
+ view: t
138
+ }));
139
+ },
140
+ setCurrentDate: (t) => {
141
+ e.setState((e) => ({
142
+ ...e,
143
+ currentDate: t
144
+ }));
145
+ },
146
+ setSelectedDate: (t) => {
147
+ e.setState((e) => ({
148
+ ...e,
149
+ selectedDate: t
150
+ }));
151
+ },
152
+ setSelectedEventId: (t) => {
153
+ e.setState((e) => ({
154
+ ...e,
155
+ selectedEventId: t
156
+ }));
157
+ },
158
+ setSlotDuration: (t) => {
159
+ e.setState((e) => ({
160
+ ...e,
161
+ slotDuration: t
162
+ }));
163
+ },
164
+ setIs24Hour: (t) => {
165
+ e.setState((e) => ({
166
+ ...e,
167
+ is24Hour: t
168
+ }));
169
+ }
170
+ }), Me = class {
171
+ name = "SchedulerService";
172
+ events = /* @__PURE__ */ new Map();
173
+ resources = /* @__PURE__ */ new Map();
174
+ constructor(e = []) {
175
+ this.initializeWithData(e);
176
+ }
177
+ async init() {}
178
+ async cleanup() {}
179
+ initializeWithData(e, t = []) {
180
+ this.events.clear(), this.resources.clear(), e.forEach((e) => {
181
+ this.events.set(String(e.id), JSON.parse(JSON.stringify(e)));
182
+ }), t.forEach((e) => {
183
+ this.resources.set(String(e.id), JSON.parse(JSON.stringify(e)));
184
+ });
185
+ }
186
+ async getEvents(e, t) {
187
+ return await this.simulateLatency(), !e || !t ? Array.from(this.events.values()) : Array.from(this.events.values()).filter((n) => {
188
+ let r = new Date(n.start), i = new Date(n.end);
189
+ return r >= e && r < t || i > e && i <= t || r <= e && i >= t;
190
+ }).map((e) => ({
191
+ ...e,
192
+ start: new Date(e.start),
193
+ end: new Date(e.end)
194
+ }));
195
+ }
196
+ async addEvent(e) {
197
+ await this.simulateLatency();
198
+ let t = {
199
+ id: e.id || Math.random().toString(36).substring(2, 9),
200
+ title: e.title || "Untitled Event",
201
+ start: e.start || /* @__PURE__ */ new Date(),
202
+ end: e.end || new Date((/* @__PURE__ */ new Date()).getTime() + 3600 * 1e3),
203
+ description: e.description,
204
+ resourceId: e.resourceId,
205
+ resourceIds: e.resourceIds,
206
+ allDay: e.allDay || !1,
207
+ ...e
208
+ };
209
+ return this.events.set(String(t.id), t), t;
210
+ }
211
+ async updateEvent(e) {
212
+ await this.simulateLatency();
213
+ let t = String(e.id);
214
+ if (this.events.has(t)) {
215
+ let n = {
216
+ ...this.events.get(t),
217
+ ...e,
218
+ id: t
219
+ };
220
+ return this.events.set(t, n), n;
221
+ } else if (this.events.has(e.id)) {
222
+ let t = {
223
+ ...this.events.get(e.id),
224
+ ...e
225
+ };
226
+ return this.events.set(e.id, t), t;
227
+ }
228
+ throw Error(`Event with ID ${e.id} not found`);
229
+ }
230
+ async deleteEvent(e) {
231
+ await this.simulateLatency();
232
+ let t = String(e);
233
+ this.events.has(t) ? this.events.delete(t) : this.events.has(e) && this.events.delete(e);
234
+ }
235
+ async getResources() {
236
+ return await this.simulateLatency(), Array.from(this.resources.values());
237
+ }
238
+ async addResource(e) {
239
+ return await this.simulateLatency(), e.id ||= Math.random().toString(36).substring(2, 9), this.resources.set(String(e.id), e), e;
240
+ }
241
+ simulateLatency() {
242
+ return new Promise((e) => setTimeout(e, 300));
243
+ }
244
+ }, Ne = class {
245
+ name = "RecurrenceEngine";
246
+ expandEvents(e, t, n) {
247
+ let r = [];
248
+ return e.forEach((e) => {
249
+ if (e.recurrenceRule || e.rrule) try {
250
+ let i = e.recurrenceRule || e.rrule || "";
251
+ if (!i) return;
252
+ let a = new Date(e.start), o = new Date(e.end), s = we.parseString(i);
253
+ s.dtstart = a;
254
+ let c = new we(s).between(t, n, !0), l = /* @__PURE__ */ new Set();
255
+ e.exdate && Array.isArray(e.exdate) ? e.exdate.forEach((e) => {
256
+ let t = new Date(e).getTime();
257
+ isNaN(t) || l.add(t);
258
+ }) : typeof e.recurrenceException == "string" && e.recurrenceException.split(",").forEach((e) => {
259
+ let t = new Date(e).getTime();
260
+ isNaN(t) || l.add(t);
261
+ }), c.forEach((t) => {
262
+ if (l.has(t.getTime())) return;
263
+ let n = o.getTime() - a.getTime();
264
+ if (isNaN(n)) return;
265
+ let i = new Date(t.getTime() + n);
266
+ r.push({
267
+ ...e,
268
+ id: `${e.id}-${t.getTime()}`,
269
+ recurrenceId: String(e.id),
270
+ start: t,
271
+ end: i,
272
+ originalStart: a
273
+ });
274
+ });
275
+ } catch (t) {
276
+ console.error(`Error processing recurrence rule for event ${e.id}:`, t), r.push(e);
277
+ }
278
+ else r.push(e);
279
+ }), r;
280
+ }
281
+ cleanup() {}
282
+ }, Pe = (e, t, r) => {
283
+ let i = n(), { events: a, serviceRegistry: o = i, showWeekend: c = !0, recurrenceEngine: l, onEventCreate: u, onEventChange: d, onEventDelete: f } = e, p = ae(), m = s(o, "SchedulerService", () => new Me(a || [])), h = l || s(o, "RecurrenceEngine", () => new Ne());
284
+ O(() => {
285
+ a && a.length > 0 && (m.initializeWithData(a), p.invalidateQueries({ queryKey: ["scheduler-events"] }));
286
+ }, [
287
+ a,
288
+ m,
289
+ p
290
+ ]);
291
+ let g = k(() => {
292
+ let e, n;
293
+ if (t === "day" || t === "timeline-day") e = ve(r), n = de(r);
294
+ else if (t === "month" || t === "timeline-month") e = t === "month" ? be(ye(r), { weekStartsOn: 0 }) : ye(r), n = t === "month" ? pe(fe(r), { weekStartsOn: 0 }) : fe(r);
295
+ else if (t === "week" || t === "workweek" || t === "timeline-week") {
296
+ let i = be(r, { weekStartsOn: 0 });
297
+ e = t === "workweek" ? X(i, 1) : i, n = t === "workweek" ? X(i, 5) : pe(r, { weekStartsOn: 0 });
298
+ } else e = ve(r), n = de(r);
299
+ try {
300
+ let t = ue({
301
+ start: e,
302
+ end: n
303
+ });
304
+ return c ? t : t.filter((e) => {
305
+ let t = e.getDay();
306
+ return t !== 0 && t !== 6;
307
+ });
308
+ } catch {
309
+ return [r];
310
+ }
311
+ }, [
312
+ t,
313
+ r,
314
+ c
315
+ ]), _ = g.length > 0 ? ve(g[0]) : /* @__PURE__ */ new Date(), v = g.length > 0 ? de(g[g.length - 1]) : /* @__PURE__ */ new Date(), { data: y = [] } = ie({
316
+ queryKey: [
317
+ "scheduler-events",
318
+ _.toISOString(),
319
+ v.toISOString()
320
+ ],
321
+ queryFn: () => m.getEvents(_, v),
322
+ placeholderData: a || []
323
+ }), b = k(() => g.length === 0 ? [] : h.expandEvents(y, _, v), [
324
+ y,
325
+ g,
326
+ h,
327
+ _,
328
+ v
329
+ ]), x = k(() => g.length ? b.filter((e) => _e(e.start, {
330
+ start: _,
331
+ end: v
332
+ }) || _e(e.end, {
333
+ start: _,
334
+ end: v
335
+ }) || e.start < _ && e.end > v) : [], [
336
+ b,
337
+ g,
338
+ _,
339
+ v
340
+ ]), S = Y({
341
+ mutationFn: async (e) => {
342
+ let t = await m.addEvent(e);
343
+ return u && await u(t), t;
344
+ },
345
+ onMutate: async (e) => {
346
+ let t = [
347
+ "scheduler-events",
348
+ _.toISOString(),
349
+ v.toISOString()
350
+ ];
351
+ await p.cancelQueries({ queryKey: t });
352
+ let n = p.getQueryData(t);
353
+ return p.setQueryData(t, (t = []) => {
354
+ let n = {
355
+ ...e,
356
+ id: e.id || Date.now().toString(),
357
+ start: e.start || /* @__PURE__ */ new Date(),
358
+ end: e.end || /* @__PURE__ */ new Date()
359
+ };
360
+ return [...t, n];
361
+ }), {
362
+ previousEvents: n,
363
+ queryKey: t
364
+ };
365
+ },
366
+ onError: (e, t, n) => {
367
+ n?.previousEvents && p.setQueryData(n.queryKey, n.previousEvents);
368
+ },
369
+ onSettled: () => {
370
+ p.invalidateQueries({ queryKey: ["scheduler-events"] });
371
+ }
372
+ }), C = Y({
373
+ mutationFn: async (e) => {
374
+ let t = await m.updateEvent(e);
375
+ return d && await d(t), t;
376
+ },
377
+ onMutate: async (e) => {
378
+ let t = [
379
+ "scheduler-events",
380
+ _.toISOString(),
381
+ v.toISOString()
382
+ ];
383
+ await p.cancelQueries({ queryKey: t });
384
+ let n = p.getQueryData(t);
385
+ return p.setQueryData(t, (t = []) => t.map((t) => t.id === e.id ? e : t)), {
386
+ previousEvents: n,
387
+ queryKey: t
388
+ };
389
+ },
390
+ onError: (e, t, n) => {
391
+ n?.previousEvents && p.setQueryData(n.queryKey, n.previousEvents);
392
+ },
393
+ onSettled: () => {
394
+ p.invalidateQueries({ queryKey: ["scheduler-events"] });
395
+ }
396
+ }), w = Y({
397
+ mutationFn: async (e) => (await m.deleteEvent(e), f && await f(e.toString()), e),
398
+ onMutate: async (e) => {
399
+ let t = [
400
+ "scheduler-events",
401
+ _.toISOString(),
402
+ v.toISOString()
403
+ ];
404
+ await p.cancelQueries({ queryKey: t });
405
+ let n = p.getQueryData(t);
406
+ return p.setQueryData(t, (t = []) => t.filter((t) => t.id !== e)), {
407
+ previousEvents: n,
408
+ queryKey: t
409
+ };
410
+ },
411
+ onError: (e, t, n) => {
412
+ n?.previousEvents && p.setQueryData(n.queryKey, n.previousEvents);
413
+ },
414
+ onSettled: () => {
415
+ p.invalidateQueries({ queryKey: ["scheduler-events"] });
416
+ }
417
+ });
418
+ return {
419
+ schedulerService: m,
420
+ recurrenceEngine: h,
421
+ daysInView: g,
422
+ visibleEvents: x,
423
+ allEvents: y,
424
+ addEvent: S.mutateAsync,
425
+ updateEvent: C.mutateAsync,
426
+ deleteEvent: w.mutateAsync,
427
+ isUpdating: S.isPending || C.isPending || w.isPending
428
+ };
429
+ }, Fe = (e) => {
430
+ let { overscanCount: t = 2, startHour: n = "00:00", endHour: r = "24:00" } = e, i = parseInt(n.split(":")[0], 10), a = parseInt(r.split(":")[0], 10), o = 60 / (e.slotDuration || 30), s = Math.max(1, (a - i) * o), { rowVirtualizer: c, columnVirtualizer: l, parentRef: u } = _({
431
+ rowCount: s,
432
+ rowHeight: 64,
433
+ overscanCount: t,
434
+ progressiveRendering: e.progressiveRendering,
435
+ prefetchDistance: e.prefetchDistance,
436
+ enableColumnVirtualization: e.view?.startsWith("timeline"),
437
+ columnCount: e.view?.startsWith("timeline") ? s : 0,
438
+ columnWidth: 100,
439
+ id: e.id,
440
+ debug: e.debugVirtualization,
441
+ onScrollStart: () => {
442
+ e.virtualScrollStart && e.virtualScrollStart({ virtualizer: {} });
443
+ },
444
+ onScrollStop: () => {
445
+ e.virtualScrollStop && e.virtualScrollStop({ virtualizer: {} });
446
+ }
447
+ });
448
+ return {
449
+ parentRef: u,
450
+ rowVirtualizer: c,
451
+ columnVirtualizer: l
452
+ };
453
+ }, Ie = (e, t, n, r) => {
454
+ let i = (e) => {
455
+ t(e), r?.(e);
456
+ };
457
+ return {
458
+ next: () => {
459
+ let t = e;
460
+ n === "day" || n === "timeline-day" ? t = X(e, 1) : n === "week" || n === "workweek" || n === "timeline-week" ? t = Z(e, 1) : (n === "month" || n === "timeline-month") && (t = se(e, 1)), i(t);
461
+ },
462
+ prev: () => {
463
+ let t = e;
464
+ n === "day" || n === "timeline-day" ? t = xe(e, 1) : n === "week" || n === "workweek" || n === "timeline-week" ? t = Ce(e, 1) : (n === "month" || n === "timeline-month") && (t = Se(e, 1)), i(t);
465
+ },
466
+ today: () => {
467
+ i(/* @__PURE__ */ new Date());
468
+ }
469
+ };
470
+ }, Le = class extends t {
471
+ name = "HistoryService";
472
+ undoStack = [];
473
+ redoStack = [];
474
+ maxHistorySize = 50;
475
+ constructor() {
476
+ super({
477
+ canUndo: !1,
478
+ canRedo: !1
479
+ });
480
+ }
481
+ record(e) {
482
+ let t = {
483
+ ...e,
484
+ timestamp: Date.now()
485
+ };
486
+ this.undoStack.push(t), this.undoStack.length > this.maxHistorySize && this.undoStack.shift(), this.redoStack = [], this.updateState();
487
+ }
488
+ undo() {
489
+ if (this.undoStack.length === 0) return null;
490
+ let e = this.undoStack.pop();
491
+ return this.redoStack.push(e), this.updateState(), e;
492
+ }
493
+ redo() {
494
+ if (this.redoStack.length === 0) return null;
495
+ let e = this.redoStack.pop();
496
+ return this.undoStack.push(e), this.updateState(), e;
497
+ }
498
+ clear() {
499
+ this.undoStack = [], this.redoStack = [], this.updateState();
500
+ }
501
+ updateState() {
502
+ this.setState({
503
+ canUndo: this.undoStack.length > 0,
504
+ canRedo: this.redoStack.length > 0
505
+ });
506
+ }
507
+ cleanup() {
508
+ this.clear(), super.cleanup();
509
+ }
510
+ }, Re = class {
511
+ name = "SearchService";
512
+ search(e, t, n = {}) {
513
+ if (!t || !t.trim()) return e;
514
+ let r = n.matchCase ? t : t.toLowerCase(), i = n.fields || [
515
+ "title",
516
+ "description",
517
+ "location"
518
+ ];
519
+ return e.filter((e) => i.some((t) => {
520
+ let i = e[t];
521
+ return typeof i == "string" ? n.matchCase ? i.includes(r) : i.toLowerCase().includes(r) : !1;
522
+ }));
523
+ }
524
+ cleanup() {}
525
+ }, ze = class {
526
+ name = "TimezoneService";
527
+ constructor() {}
528
+ toTimezone(e, t) {
529
+ if (!t || t === "UTC" || t === "Local") return new Date(e);
530
+ try {
531
+ let n = new Date(e).toLocaleString("en-US", { timeZone: t });
532
+ return new Date(n);
533
+ } catch (n) {
534
+ return console.warn(`TimezoneService: Invalid timezone ${t}`, n), new Date(e);
535
+ }
536
+ }
537
+ formatInTimezone(e, t, n) {
538
+ try {
539
+ return new Intl.DateTimeFormat("en-US", {
540
+ ...n,
541
+ timeZone: t
542
+ }).format(new Date(e));
543
+ } catch (e) {
544
+ return console.error("TimezoneService formatting error:", e), "";
545
+ }
546
+ }
547
+ getLocalTimezone() {
548
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
549
+ }
550
+ cleanup() {}
551
+ }, Be = class {
552
+ name = "AttendeeService";
553
+ constructor() {}
554
+ isValidEmail(e) {
555
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
556
+ }
557
+ getStatusLabel(e) {
558
+ switch (e) {
559
+ case "accepted": return "Accepted";
560
+ case "declined": return "Declined";
561
+ case "tentative": return "Tentative";
562
+ case "needs-action": return "Needs Action";
563
+ default: return "Unknown";
564
+ }
565
+ }
566
+ cleanup() {}
567
+ }, Ve = class {
568
+ name = "ReminderService";
569
+ timer = null;
570
+ checkInterval = 6e4;
571
+ onReminderTriggered;
572
+ constructor() {}
573
+ start(e) {
574
+ this.onReminderTriggered = e, this.timer && clearInterval(this.timer), this.timer = setInterval(() => this.checkReminders(), this.checkInterval);
575
+ }
576
+ stop() {
577
+ this.timer &&= (clearInterval(this.timer), null);
578
+ }
579
+ checkReminders() {
580
+ console.log("[ReminderService] Checking for due reminders...", this.onReminderTriggered);
581
+ }
582
+ getTriggerTime(e, t) {
583
+ return /* @__PURE__ */ new Date(e.getTime() - t * 6e4);
584
+ }
585
+ cleanup() {
586
+ this.stop();
587
+ }
588
+ }, He = (e) => {
589
+ let { serviceRegistry: t, state: n, api: r } = u(e), i = f("I18nService")?.dir || "ltr", a = e.dir === "auto" || !e.dir ? i : e.dir, o = k(() => Ae({
590
+ events: e.events || [],
591
+ resources: e.resources || [],
592
+ view: e.view ? e.view.toLowerCase() : "week",
593
+ currentDate: e.selectedDate || /* @__PURE__ */ new Date(),
594
+ selectedDate: e.selectedDate || /* @__PURE__ */ new Date(),
595
+ slotDuration: e.slotDuration || 30,
596
+ is24Hour: e.is24Hour ?? !0
597
+ }), []), c = k(() => je(o), [o]), l = ne(o, (e) => e);
598
+ O(() => {
599
+ e.events && c.setEvents(e.events);
600
+ }, [e.events]), O(() => {
601
+ e.resources && c.setResources(e.resources);
602
+ }, [e.resources]), O(() => {
603
+ if (e.view) {
604
+ let t = e.view.toLowerCase().replace(/[^a-z]/g, "");
605
+ c.setView({
606
+ day: "day",
607
+ week: "week",
608
+ workweek: "workweek",
609
+ month: "month",
610
+ timelineday: "timeline-day",
611
+ timelineweek: "timeline-week",
612
+ timelineworkweek: "timeline-week",
613
+ timelinemonth: "timeline-month",
614
+ agenda: "agenda",
615
+ timeline: "timeline-day"
616
+ }[t] || t);
617
+ }
618
+ }, [e.view, c]), O(() => {
619
+ e.selectedDate && (c.setCurrentDate(e.selectedDate), c.setSelectedDate(e.selectedDate));
620
+ }, [e.selectedDate]), O(() => {
621
+ e.slotDuration !== void 0 && c.setSlotDuration(e.slotDuration);
622
+ }, [e.slotDuration]), O(() => {
623
+ e.is24Hour !== void 0 && c.setIs24Hour(e.is24Hour);
624
+ }, [e.is24Hour]);
625
+ let { view: d, currentDate: p, events: m } = l, { schedulerService: h, recurrenceEngine: g, daysInView: _, visibleEvents: v, allEvents: y, addEvent: b, updateEvent: x, deleteEvent: S, isUpdating: C } = Pe({
626
+ ...e,
627
+ events: m
628
+ }, d, p), { parentRef: w, rowVirtualizer: T, columnVirtualizer: E } = Fe(e), { next: D, prev: A, today: M } = Ie(p, c.setCurrentDate, d, e.onDateChange), [N, P] = j(null), { selectedIndex: ee, setSelectedIndex: te } = ke({
629
+ totalItems: v.length,
630
+ enabled: !0,
631
+ onSelect: (e) => {
632
+ let t = v[e];
633
+ t && (P(t.id), (document.getElementById(`event-${t.id}`) || document.querySelector(`[data-event-id="${t.id}"]`))?.scrollIntoView({
634
+ behavior: "smooth",
635
+ block: "nearest"
636
+ }));
637
+ },
638
+ onAction: (t) => {
639
+ let n = v[t];
640
+ n && e.onEventClick && e.onEventClick(n);
641
+ }
642
+ }), F = k(() => ({
643
+ showWeekend: e.showWeekend ?? !0,
644
+ timeFormat: e.timeFormat,
645
+ weekRule: e.weekRule || "FirstDay",
646
+ monthsCount: e.monthsCount || 1,
647
+ eventDragArea: e.eventDragArea,
648
+ dir: a || "ltr"
649
+ }), [
650
+ e.showWeekend,
651
+ e.timeFormat,
652
+ e.weekRule,
653
+ e.monthsCount,
654
+ e.eventDragArea,
655
+ a
656
+ ]), I = s(t, "HistoryService", () => new Le()), L = s(t, "SearchService", () => new Re()), R = s(t, "TimezoneService", () => new ze()), z = s(t, "AttendeeService", () => new Be()), B = s(t, "ReminderService", () => new Ve());
657
+ return {
658
+ state: {
659
+ currentView: l.view,
660
+ selectedDate: l.selectedDate,
661
+ currentDate: p,
662
+ events: l.events,
663
+ resources: l.resources,
664
+ viewEvents: v,
665
+ daysInView: _,
666
+ allEvents: y,
667
+ slotDuration: l.slotDuration,
668
+ is24Hour: l.is24Hour,
669
+ isUpdating: C,
670
+ selectedIndex: ee,
671
+ highlightedEventId: N
672
+ },
673
+ actions: {
674
+ nextPeriod: D,
675
+ prevPeriod: A,
676
+ today: M,
677
+ setView: c.setView,
678
+ setDate: c.setSelectedDate,
679
+ setCurrentDate: c.setCurrentDate,
680
+ addEvent: b,
681
+ updateEvent: x,
682
+ deleteEvent: S,
683
+ setSlotDuration: c.setSlotDuration,
684
+ setIs24Hour: c.setIs24Hour,
685
+ setSelectedIndex: te,
686
+ setHighlightedEventId: P
687
+ },
688
+ services: {
689
+ schedulerService: h,
690
+ recurrenceEngine: g,
691
+ historyService: I,
692
+ searchService: L,
693
+ timezoneService: R,
694
+ attendeeService: z,
695
+ reminderService: B,
696
+ serviceRegistry: t
697
+ },
698
+ config: F,
699
+ refs: {
700
+ parentRef: w,
701
+ rowVirtualizer: T,
702
+ columnVirtualizer: E
703
+ },
704
+ baseState: n,
705
+ baseApi: r,
706
+ dir: a
707
+ };
708
+ }, Ue = (e, t, n, r, i, a, o = {}) => {
709
+ c(a, k(() => {
710
+ let a = b(i.scrollToIndex), s = x(() => n.getEvents(), (e) => n.addEvent(e), (e) => n.updateEvent(e), (e) => n.deleteEvent(e)), c = C(i.showSpinner, i.hideSpinner), l = y(() => {}, i.forceUpdate), u = S(() => o.onExportExcel?.(r), () => o.onExportICS?.(r), () => {
711
+ window.print();
712
+ });
713
+ return {
714
+ changeView: i.changeView,
715
+ changeCurrentView: i.changeView,
716
+ next: i.next,
717
+ prev: i.prev,
718
+ today: i.today,
719
+ ...a,
720
+ scrollTo: (e, t = 0) => {
721
+ let n = parseInt(e.split(":")[0]) * 60 + t, r = Math.floor(n / 30);
722
+ i.scrollToIndex(r);
723
+ },
724
+ scrollToTime: (e, t) => {
725
+ let n = e * 60 + t, r = Math.floor(n / 30);
726
+ i.scrollToIndex(r);
727
+ },
728
+ ...s,
729
+ getCurrentDate: () => t,
730
+ setCurrentDate: (e) => {
731
+ let n = e.getTime() - t.getTime();
732
+ n > 0 && i.next(), n < 0 && i.prev();
733
+ },
734
+ getEvents: async () => n.getEvents(),
735
+ getEventsInDateRange: async (e, t) => n.getEvents(e, t),
736
+ addEvent: async (e) => {
737
+ await n.addEvent(e);
738
+ },
739
+ saveEvent: async (e) => {
740
+ await n.updateEvent(e);
741
+ },
742
+ deleteEvent: async (e) => {
743
+ await n.deleteEvent(e);
744
+ },
745
+ getCurrentViewEvents: () => r,
746
+ scrollToEvent: (e) => {
747
+ let t = r.find((t) => t.id === e);
748
+ if (!t) return;
749
+ let n = t.start.getHours() * 60 + t.start.getMinutes();
750
+ i.scrollToIndex(Math.floor(n / 30));
751
+ },
752
+ selectEvent: () => {},
753
+ clearSelection: () => {},
754
+ addResource: async (e) => {
755
+ i.setResources((t) => [...t, e]);
756
+ },
757
+ getResources: async () => n.getResources(),
758
+ updateResource: async (e, t) => {
759
+ i.setResources((n) => n.map((n) => String(n.id) === String(e) ? {
760
+ ...n,
761
+ ...t
762
+ } : n));
763
+ },
764
+ removeResource: async (e) => {
765
+ i.setResources((t) => t.filter((t) => t.id !== e));
766
+ },
767
+ openEditor: (e, t = "Add") => {
768
+ i.setEditorState({
769
+ isOpen: !0,
770
+ mode: t === "Edit" ? "edit" : t === "view" ? "view" : "create",
771
+ event: e
772
+ });
773
+ },
774
+ closeEditor: () => i.setEditorState({
775
+ isOpen: !1,
776
+ mode: "create",
777
+ event: void 0
778
+ }),
779
+ closeQuickInfoPopup: i.closeQuickInfoPopup,
780
+ ...c,
781
+ ...l,
782
+ ...u,
783
+ currentView: e,
784
+ ...o
785
+ };
786
+ }, [
787
+ e,
788
+ t,
789
+ r,
790
+ i,
791
+ n,
792
+ o
793
+ ]));
794
+ }, We = ({ resources: e }) => {
795
+ let t = k(() => !e || e.length === 0 ? [] : "dataSource" in e[0] ? e.flatMap((e) => e.dataSource) : e, [e]), [n, r] = j(t);
796
+ return O(() => {
797
+ r(t);
798
+ }, [t]), {
799
+ resources: t,
800
+ internalResources: n,
801
+ setInternalResources: r
802
+ };
803
+ }, Ge = ({ events: e, resources: t = [], onEventChange: n, onBeforeEventDrop: r, onBeforeEventResize: i, slotDuration: a = 30 }) => {
804
+ let o = D((e) => {
805
+ if (e) return t.find((t) => String(t.id) === String(e));
806
+ }, [t]), s = (e, t) => e === !1 || t.cancel, c = D((t) => {
807
+ let { active: c, over: l, delta: u } = t, d = e.find((e) => e.id === c.id || e.id === (c.data?.current?.eventId || c.data?.current?.id));
808
+ if (!d) return;
809
+ if (c.data?.current?.type?.startsWith("resize-")) {
810
+ let e = c.data.current.type, t = c.data.current, r = t?.orientation || "vertical", l = t?.pixelsPerSlot || 64, f = r === "vertical" ? u.y : u.x, p = Math.round(f / l) * a;
811
+ if (p === 0) return;
812
+ let m, h;
813
+ if (e === "resize-bottom") {
814
+ let e = new Date(d.end.getTime() + p * 60 * 1e3), t = new Date(d.start.getTime() + a * 60 * 1e3), n = e < t ? t : e;
815
+ h = "end", m = {
816
+ ...d,
817
+ end: n
818
+ };
819
+ } else if (e === "resize-top") {
820
+ let e = new Date(d.start.getTime() + p * 60 * 1e3), t = /* @__PURE__ */ new Date(d.end.getTime() - a * 60 * 1e3), n = e > t ? t : e;
821
+ h = "start", m = {
822
+ ...d,
823
+ start: n
824
+ };
825
+ }
826
+ if (!m) return;
827
+ let g = {
828
+ data: d,
829
+ event: m,
830
+ originalEvent: d,
831
+ proposedEvent: m,
832
+ sourceResourceId: d.resourceId,
833
+ targetResourceId: m.resourceId,
834
+ sourceResource: o(d.resourceId),
835
+ targetResource: o(m.resourceId),
836
+ sourceTime: d.start,
837
+ targetTime: m.start,
838
+ resizeEdge: h,
839
+ cancel: !1
840
+ };
841
+ if (s(i?.(g), g)) return;
842
+ n?.(m);
843
+ return;
844
+ }
845
+ if (!l) return;
846
+ let f = l.data?.current;
847
+ if (f?.kind === "time-slot" || typeof l.id == "string" && l.id.startsWith("slot-")) {
848
+ let e = f?.date, t = f?.resourceId;
849
+ if (e) {
850
+ let i = d.end.getTime() - d.start.getTime(), a = new Date(e), c = new Date(a.getTime() + i), l = {
851
+ ...d,
852
+ start: a,
853
+ end: c,
854
+ resourceId: t === "none" ? void 0 : t,
855
+ resourceIds: t && t !== "none" ? [t] : d.resourceIds
856
+ }, u = {
857
+ data: d,
858
+ event: l,
859
+ originalEvent: d,
860
+ proposedEvent: l,
861
+ sourceResourceId: d.resourceId,
862
+ targetResourceId: l.resourceId,
863
+ sourceResource: o(d.resourceId),
864
+ targetResource: o(l.resourceId),
865
+ sourceTime: d.start,
866
+ targetTime: a,
867
+ cancel: !1
868
+ };
869
+ if (s(r?.(u), u)) return;
870
+ n?.(l);
871
+ }
872
+ return;
873
+ }
874
+ if (f?.kind === "timeline-row") {
875
+ let e = f.slotWidth || 80, t = f.resourceId, i = f.isRtl ? -1 : 1, c = Math.round(u.x * i / e) * a, l = d.end.getTime() - d.start.getTime(), p = new Date(d.start.getTime() + c * 60 * 1e3), m = new Date(p.getTime() + l), h = {
876
+ ...d,
877
+ start: p,
878
+ end: m,
879
+ resourceId: t === "none" ? void 0 : t,
880
+ resourceIds: t && t !== "none" ? [t] : d.resourceIds
881
+ }, g = {
882
+ data: d,
883
+ event: h,
884
+ originalEvent: d,
885
+ proposedEvent: h,
886
+ sourceResourceId: d.resourceId,
887
+ targetResourceId: h.resourceId,
888
+ sourceResource: o(d.resourceId),
889
+ targetResource: o(h.resourceId),
890
+ sourceTime: d.start,
891
+ targetTime: p,
892
+ cancel: !1
893
+ };
894
+ if (s(r?.(g), g)) return;
895
+ n?.(h);
896
+ return;
897
+ }
898
+ let p = typeof l.id == "string" && l.id.startsWith("header-") ? l.id.replace("header-", "") : null;
899
+ if (p) {
900
+ let e = {
901
+ ...d,
902
+ resourceId: p
903
+ }, t = {
904
+ data: d,
905
+ event: e,
906
+ originalEvent: d,
907
+ proposedEvent: e,
908
+ sourceResourceId: d.resourceId,
909
+ targetResourceId: e.resourceId,
910
+ sourceResource: o(d.resourceId),
911
+ targetResource: o(e.resourceId),
912
+ sourceTime: d.start,
913
+ targetTime: e.start,
914
+ cancel: !1
915
+ };
916
+ if (s(r?.(t), t)) return;
917
+ n?.(e);
918
+ }
919
+ }, [
920
+ e,
921
+ o,
922
+ r,
923
+ i,
924
+ n,
925
+ a
926
+ ]);
927
+ return {
928
+ sensors: q(K(B, { activationConstraint: { distance: 8 } })),
929
+ handleDragEnd: c
930
+ };
931
+ }, Ke = () => /* @__PURE__ */ F("div", {
932
+ className: "flex flex-col items-center justify-center min-h-screen p-4",
933
+ children: /* @__PURE__ */ I("div", {
934
+ className: "flex flex-col items-center gap-4 max-w-md w-full",
935
+ children: [
936
+ /* @__PURE__ */ F("div", {
937
+ className: "flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10",
938
+ children: /* @__PURE__ */ F(M, { className: "w-8 h-8 text-destructive" })
939
+ }),
940
+ /* @__PURE__ */ I("div", {
941
+ className: "flex flex-col items-center gap-2 text-center",
942
+ children: [/* @__PURE__ */ F("h2", {
943
+ className: "text-lg font-semibold",
944
+ children: "Scheduler Error"
945
+ }), /* @__PURE__ */ F("p", {
946
+ className: "text-sm text-muted-foreground",
947
+ children: "Something went wrong with the scheduler. Please refresh the page or try again."
948
+ })]
949
+ }),
950
+ /* @__PURE__ */ I("button", {
951
+ onClick: () => window.location.reload(),
952
+ className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",
953
+ children: [/* @__PURE__ */ F(P, { className: "w-4 h-4" }), "Refresh Page"]
954
+ })
955
+ ]
956
+ })
957
+ }), qe = ({ variant: t = "primary", text: n = "Loading", className: r }) => /* @__PURE__ */ F("div", {
958
+ className: e("absolute inset-0 bg-background/40 backdrop-blur-[2px] z-[100] flex items-center justify-center transition-all duration-300", r),
959
+ children: /* @__PURE__ */ I("div", {
960
+ className: "flex flex-col items-center gap-3",
961
+ children: [/* @__PURE__ */ F("div", { className: e({
962
+ sm: "w-8 h-8",
963
+ md: "w-10 h-10",
964
+ lg: "w-12 h-12"
965
+ }.md, {
966
+ primary: "border-primary/20 border-t-primary",
967
+ secondary: "border-muted-foreground/20 border-t-muted-foreground"
968
+ }[t], "rounded-full animate-spin") }), /* @__PURE__ */ F("span", {
969
+ className: "text-[10px] font-black uppercase tracking-widest text-primary animate-pulse",
970
+ children: n
971
+ })]
972
+ })
973
+ }), Je = () => /* @__PURE__ */ F(qe, { text: "Synchronizing" }), Ye = ({ event: t, style: n, onClick: r, onDoubleClick: i, onDelete: a, orientation: o = "vertical", resizable: s = !1, className: c, showTime: l = !0, isBlocked: u = !1, isPast: d = !1, isHighlighted: f = !1, slotDuration: p = 30, pixelsPerSlot: m, dragOverlay: h = !1, isSourceDragging: g = !1 }) => {
974
+ let _ = u || t.isBlock, y = _ || d, b = m || (o === "vertical" ? 64 : 80), { attributes: x, listeners: S, setNodeRef: C, transform: T, isDragging: E } = W({
975
+ id: h ? `overlay-${t.id}` : t.id,
976
+ data: {
977
+ type: "event",
978
+ eventId: t.id,
979
+ event: t,
980
+ orientation: o,
981
+ pixelsPerSlot: b
982
+ },
983
+ disabled: h || y
984
+ }), { attributes: D, listeners: O, setNodeRef: k, transform: A, isDragging: j } = W({
985
+ id: `resize-bottom-${t.id}`,
986
+ data: {
987
+ type: "resize-bottom",
988
+ eventId: t.id,
989
+ orientation: o,
990
+ pixelsPerSlot: b
991
+ },
992
+ disabled: !s || y
993
+ }), { attributes: M, listeners: N, setNodeRef: P, transform: L, isDragging: R } = W({
994
+ id: `resize-top-${t.id}`,
995
+ data: {
996
+ type: "resize-top",
997
+ eventId: t.id,
998
+ orientation: o,
999
+ pixelsPerSlot: b
1000
+ },
1001
+ disabled: !s || y
1002
+ }), z = j || R, B = b / p, V = new Date(t.start), H = new Date(t.end);
1003
+ if (E && T) {
1004
+ let e = o === "vertical" ? T.y : T.x, t = Math.round(e / B / 15) * 15;
1005
+ V = oe(V, t), H = oe(H, t);
1006
+ } else if (R && L) {
1007
+ let e = o === "vertical" ? L.y : L.x, t = Math.round(e / B / 15) * 15;
1008
+ V = oe(V, t);
1009
+ } else if (j && A) {
1010
+ let e = o === "vertical" ? A.y : A.x, t = Math.round(e / B / 15) * 15;
1011
+ H = oe(H, t);
1012
+ }
1013
+ let U = n?.borderColor || t.color || "hsl(var(--primary))", G = _ ? {
1014
+ backgroundImage: "repeating - linear - gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px)",
1015
+ backgroundColor: "rgba(0,0,0,0.02)",
1016
+ color: "gray",
1017
+ borderLeftWidth: "4px",
1018
+ borderColor: "#d1d5db",
1019
+ borderStyle: "solid",
1020
+ opacity: 1
1021
+ } : {}, K = /* @__PURE__ */ I("div", {
1022
+ ref: C,
1023
+ style: {
1024
+ ...n,
1025
+ transform: h ? void 0 : Te.Translate.toString(T),
1026
+ opacity: g ? .35 : E ? .6 : d ? .7 : 1,
1027
+ zIndex: E || z ? 100 : y ? 10 : 20,
1028
+ touchAction: "none",
1029
+ pointerEvents: h || E || z ? "none" : "auto",
1030
+ position: h ? "relative" : "absolute",
1031
+ backgroundColor: `color-mix(in srgb, ${U} 12%, transparent)`,
1032
+ color: `color-mix(in srgb, ${U} 90%, black)`,
1033
+ borderLeftWidth: "4px",
1034
+ borderColor: U,
1035
+ ..._ ? G : {},
1036
+ ...j && o === "vertical" && A ? { height: `${Math.max((parseInt(n?.height) || 0) + A.y, 24)}px` } : {},
1037
+ ...R && o === "vertical" && L ? {
1038
+ top: `${(parseInt(n?.top) || 0) + L.y}px`,
1039
+ height: `${Math.max((parseInt(n?.height) || 0) - L.y, 24)}px`
1040
+ } : {},
1041
+ ...j && o === "horizontal" && A ? { width: `${Math.max((parseInt(n?.width) || 0) + A.x, 24)}px` } : {},
1042
+ ...R && o === "horizontal" && L ? {
1043
+ left: `${(parseInt(n?.left) || 0) + L.x}px`,
1044
+ width: `${Math.max((parseInt(n?.width) || 0) - L.x, 24)}px`
1045
+ } : {}
1046
+ },
1047
+ ...x,
1048
+ ...S,
1049
+ className: e("absolute rounded-md text-xs border overflow-hidden group select-none flex flex-col", "bg-primary/10 border-primary/20 text-foreground shadow-sm hover:shadow-md transition-shadow", h && "shadow-xl ring-2 ring-primary/40 cursor-grabbing scale-[1.01]", E && "opacity-50 z-50 shadow-xl scale-105 cursor-grabbing ring-2 ring-primary ring-offset-2", f && "ring-2 ring-primary ring-offset-1 bg-primary/20 shadow-md transition-all duration-300", _ && "bg-muted/50 border-muted opacity-80", !_ && "pointer-events-auto", _ && "pointer-events-auto select-none grayscale", c),
1050
+ onClick: (e) => {
1051
+ !E && !z && (e.stopPropagation(), r?.(t));
1052
+ },
1053
+ onDoubleClick: (e) => {
1054
+ e.stopPropagation(), i?.(t);
1055
+ },
1056
+ role: "button",
1057
+ "aria-label": `Event: ${t.title}`,
1058
+ children: [/* @__PURE__ */ I("div", {
1059
+ className: "flex-1 min-h-0 relative px-2 py-1",
1060
+ children: [
1061
+ /* @__PURE__ */ I("div", {
1062
+ className: "flex items-start justify-between gap-1",
1063
+ children: [/* @__PURE__ */ F("div", {
1064
+ className: "font-semibold truncate pr-4 leading-tight",
1065
+ children: t.title
1066
+ }), !_ && /* @__PURE__ */ F("button", {
1067
+ className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 hover:bg-destructive/10 rounded absolute top-0 right-0 z-10",
1068
+ onClick: (e) => {
1069
+ e.stopPropagation(), a?.(t.id);
1070
+ },
1071
+ onPointerDown: (e) => e.stopPropagation(),
1072
+ children: /* @__PURE__ */ F(ee, { className: "h-3 w-3 text-muted-foreground hover:text-destructive" })
1073
+ })]
1074
+ }),
1075
+ l && !_ && /* @__PURE__ */ I("div", {
1076
+ className: "text-[10px] text-muted-foreground truncate leading-tight",
1077
+ children: [
1078
+ Q(V, "h:mm a"),
1079
+ " - ",
1080
+ Q(H, "h:mm a")
1081
+ ]
1082
+ }),
1083
+ t.description && /* @__PURE__ */ F("div", {
1084
+ className: "text-[10px] text-muted-foreground line-clamp-2 leading-tight mt-0.5",
1085
+ children: t.description
1086
+ }),
1087
+ _ && /* @__PURE__ */ F("div", {
1088
+ className: "flex items-center justify-center h-full",
1089
+ children: /* @__PURE__ */ F("span", {
1090
+ className: "text-xs font-medium text-muted-foreground opacity-70 -rotate-45 select-none",
1091
+ children: "BLOCKED"
1092
+ })
1093
+ })
1094
+ ]
1095
+ }), s && !_ && /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F("div", {
1096
+ ref: k,
1097
+ ...D,
1098
+ ...O,
1099
+ className: e("absolute z-20 hover:bg-primary/20 transition-colors flex items-center justify-center opacity-0 group-hover:opacity-100", o === "vertical" ? "bottom-0 left-0 right-0 h-3 cursor-ns-resize" : "right-0 top-0 bottom-0 w-3 cursor-ew-resize"),
1100
+ style: { touchAction: "none" },
1101
+ children: /* @__PURE__ */ F("div", { className: e("bg-primary/40 rounded-full", o === "vertical" ? "w-10 h-1" : "h-10 w-1") })
1102
+ }), /* @__PURE__ */ F("div", {
1103
+ ref: P,
1104
+ ...M,
1105
+ ...N,
1106
+ className: e("absolute z-20 hover:bg-primary/20 transition-colors flex items-center justify-center opacity-0 group-hover:opacity-100", o === "vertical" ? "top-0 left-0 right-0 h-3 cursor-ns-resize" : "left-0 top-0 bottom-0 w-3 cursor-ew-resize"),
1107
+ style: { touchAction: "none" },
1108
+ children: /* @__PURE__ */ F("div", { className: e("bg-primary/40 rounded-full", o === "vertical" ? "w-10 h-1 shadow-[0_-1px_0_rgba(0,0,0,0.1)]" : "h-10 w-1 shadow-[-1px_0_0_rgba(0,0,0,0.1)]") })
1109
+ })] })]
1110
+ });
1111
+ return /* @__PURE__ */ F(w, {
1112
+ content: t.description,
1113
+ enabled: !!t.description && !E,
1114
+ children: /* @__PURE__ */ F(v, {
1115
+ contextId: "scheduler-event",
1116
+ data: t,
1117
+ children: K
1118
+ })
1119
+ });
1120
+ }, Xe = ({ date: t, resourceId: n, children: r, className: i, style: a, onClick: o, onDoubleClick: s, onMouseDown: c, onMouseEnter: l, onContextMenu: u, data: d, isSelected: f, isWorkHour: p }) => {
1121
+ let { active: m } = U(), { setNodeRef: h, isOver: g } = G({
1122
+ id: `slot-${t.toISOString()}-${n || "none"}`,
1123
+ data: {
1124
+ date: t,
1125
+ resourceId: n,
1126
+ ...d || {}
1127
+ }
1128
+ });
1129
+ return /* @__PURE__ */ F("div", {
1130
+ ref: h,
1131
+ "data-testid": "scheduler-slot",
1132
+ "data-shaded": p === !1,
1133
+ className: e("relative transition-all duration-200", f && "bg-primary/15", !f && p === !1 && "bg-background", !!m && "before:absolute before:inset-0 before:border before:border-dashed before:border-primary/10 before:pointer-events-none before:z-0", g && "bg-primary/20 ring-2 ring-primary ring-inset z-10 before:opacity-0", i),
1134
+ style: a,
1135
+ onClick: o,
1136
+ onDoubleClick: s,
1137
+ onMouseDown: c,
1138
+ onMouseEnter: l,
1139
+ onContextMenu: u,
1140
+ children: r
1141
+ });
1142
+ };
1143
+ //#endregion
1144
+ //#region src/components/EzScheduler/utils/sanitizeHtml.ts
1145
+ function Ze(e, t = !0) {
1146
+ return t ? Ee.sanitize(e, {
1147
+ ALLOWED_TAGS: /* @__PURE__ */ "b.i.em.strong.u.span.div.p.br.h1.h2.h3.h4.h5.h6.ul.ol.li.a.img.table.thead.tbody.tr.th.td".split("."),
1148
+ ALLOWED_ATTR: [
1149
+ "class",
1150
+ "href",
1151
+ "src",
1152
+ "alt",
1153
+ "title"
1154
+ ],
1155
+ ALLOW_DATA_ATTR: !1
1156
+ }) : e;
1157
+ }
1158
+ function Qe(e, t, n = !0) {
1159
+ if (!e) return null;
1160
+ if (typeof e == "function") {
1161
+ let n = e(t);
1162
+ return typeof n == "string" ? { __html: Ze(n, !0) } : n;
1163
+ }
1164
+ return typeof e == "string" ? { __html: Ze(e, !0) } : null;
1165
+ }
1166
+ //#endregion
1167
+ //#region src/components/EzScheduler/utils/getWeekNumber.ts
1168
+ function $e(e, t = "FirstDay") {
1169
+ switch (t) {
1170
+ case "FirstDay": return he(e, { weekStartsOn: 0 });
1171
+ case "FirstFourDayWeek": return me(e);
1172
+ case "FirstFullWeek": return he(e, {
1173
+ weekStartsOn: 0,
1174
+ firstWeekContainsDate: 1
1175
+ });
1176
+ default: return he(e);
1177
+ }
1178
+ }
1179
+ //#endregion
1180
+ //#region src/components/EzScheduler/views/DayWeekView.tsx
1181
+ var et = (e, t, n, r, i, a, o, s, c, l = !0, u = !1) => {
1182
+ let d = 0, f = 0;
1183
+ if (l) {
1184
+ let e = i / r, s = e / o;
1185
+ d = t * i + n * e + a * s, f = s * .98;
1186
+ } else {
1187
+ let e = i / r, s = e / o;
1188
+ d = n * i + t * e + a * s, f = s * .98;
1189
+ }
1190
+ let p = ((e.start.getHours() - s) * 60 + e.start.getMinutes()) / c * 64, m = (e.end.getTime() - e.start.getTime()) / (1e3 * 60) / c * 64;
1191
+ return {
1192
+ top: `${p}px`,
1193
+ height: `${Math.max(m, 24)}px`,
1194
+ [u ? "right" : "left"]: `${d}%`,
1195
+ width: `${f}%`,
1196
+ [u ? "borderRightWidth" : "borderLeftWidth"]: "4px",
1197
+ borderColor: e.color || "hsl(var(--primary))"
1198
+ };
1199
+ }, tt = ({ startHour: t, slotDuration: n, isRtl: r }) => {
1200
+ let i = Oe(), a = ((i.getHours() - t) * 60 + i.getMinutes()) / n * 64;
1201
+ return a < 0 ? null : /* @__PURE__ */ I("div", {
1202
+ className: e("absolute inset-x-0 z-50 pointer-events-none flex items-center"),
1203
+ style: { top: `${a}px` },
1204
+ children: [/* @__PURE__ */ F("div", { className: "w-full border-t-2 border-primary" }), /* @__PURE__ */ F("div", { className: e("absolute w-3 h-3 bg-primary rounded-full shadow-sm ring-2 ring-background", r ? "-right-1.5" : "-left-1.5") })]
1205
+ });
1206
+ }, nt = ({ daysInView: t, visibleEvents: n, rowVirtualizer: r, resources: s = [], showResourcesInDayView: c = !1, onEventClick: l, onEventDoubleClick: u, onEventDelete: d, scrollRef: f, onViewChange: p, onDateChange: m, locale: h, onRangeSelect: g, onSlotClick: _, onSlotDoubleClick: v, dateHeaderTemplate: y, showWeekNumber: b = !1, weekRule: x = "FirstDay", cellTemplate: S, showUnassignedLane: C = !1, startHour: w = "00:00", slotDuration: T = 30, is24Hour: E = !0, setIs24Hour: D, group: M, onCellContextMenu: P, dir: ee }) => {
1207
+ let L = ee === "rtl", R = Oe(), z = parseInt(w.split(":")[0], 10), [B, V] = j(null), [H, U] = j(!1), W = A(null), G = (e, t, r) => n.some((t) => (t.isHoliday || t.isFullyBooked) && $(t.start, e)) ? !0 : n.some((n) => n.isBlock && (n.resourceId === r || !n.resourceId && !r) && ce({
1208
+ start: n.start,
1209
+ end: n.end
1210
+ }, {
1211
+ start: e,
1212
+ end: t
1213
+ })), K = (e, t) => {
1214
+ let n = oe(e, T);
1215
+ if (G(e, n, t)) return;
1216
+ U(!0);
1217
+ let r = {
1218
+ start: e,
1219
+ end: n,
1220
+ resourceId: t
1221
+ };
1222
+ V(r), W.current = r;
1223
+ }, q = (e) => {
1224
+ if (!H || !W.current) return;
1225
+ let t = new Date(e.getTime() + T * 60 * 1e3), n = {
1226
+ ...W.current,
1227
+ end: t
1228
+ };
1229
+ V(n), W.current = n;
1230
+ };
1231
+ O(() => {
1232
+ let e = (e) => {
1233
+ if (H && W.current) {
1234
+ let { start: t, end: n, resourceId: r } = W.current, i = t < n ? t : n, a = t < n ? n : t;
1235
+ G(i, a, r) || (g?.(i, a, r, {
1236
+ x: e.clientX,
1237
+ y: e.clientY
1238
+ }), _?.(i, r));
1239
+ }
1240
+ U(!1), V(null), W.current = null;
1241
+ };
1242
+ return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
1243
+ }, [
1244
+ H,
1245
+ g,
1246
+ _
1247
+ ]);
1248
+ let ne = De("(max-width: 768px)"), J = k(() => {
1249
+ let e = c && s.length > 0 ? [...s] : [];
1250
+ return (C || c && e.length === 0) && (e.find((e) => e.id === "" || e.id === "unassigned") || e.unshift({
1251
+ id: "unassigned",
1252
+ name: "Unassigned",
1253
+ type: "Global Inbox",
1254
+ color: "hsl(var(--muted-foreground))"
1255
+ })), e.length > 0 ? e : [{
1256
+ id: "",
1257
+ name: ""
1258
+ }];
1259
+ }, [
1260
+ s,
1261
+ c,
1262
+ C
1263
+ ]), re = ne && c && J.length > 1, Y = !ne && (J.length > 3 || t.length > 3 && J.length > 1), ie = re || Y, ae = t.length * J.length * 150, X = {
1264
+ width: ie && ae > 0 ? `${ae}px` : "100%",
1265
+ minWidth: "100%"
1266
+ }, se = new Intl.DateTimeFormat(h, { day: "numeric" }), Z = M?.byDate ?? !0, le = Z ? t : J, ue = Z ? J : t, de = le, fe = ue, pe = 100 / de.length, me = 100 / fe.length;
1267
+ return /* @__PURE__ */ I("div", {
1268
+ ref: f,
1269
+ "data-testid": "scheduler-scroll-container",
1270
+ "data-view": "day-week",
1271
+ style: { scrollbarGutter: "stable" },
1272
+ className: e("flex-1 flex flex-col min-h-0 relative overflow-auto bg-background select-none border border-border rounded-lg", ie && "snap-x snap-mandatory"),
1273
+ children: [/* @__PURE__ */ I("div", {
1274
+ className: "sticky top-0 z-50 bg-background/95 backdrop-blur-md border-b border-border flex shrink-0",
1275
+ style: X,
1276
+ children: [
1277
+ b && /* @__PURE__ */ F("div", {
1278
+ className: e("w-12 shrink-0 sticky z-50 bg-background border-e border-border flex items-center justify-center", L ? "right-0" : "left-0"),
1279
+ children: /* @__PURE__ */ F("span", {
1280
+ className: "text-[9px] font-bold text-muted-foreground uppercase tracking-wider",
1281
+ children: "WK"
1282
+ })
1283
+ }),
1284
+ /* @__PURE__ */ I("div", {
1285
+ className: e("w-24 shrink-0 sticky bg-background border-e border-border z-50 cursor-pointer hover:bg-muted/50 transition-colors flex flex-col items-center justify-center gap-1 group", b ? L ? "right-12" : "left-12" : L ? "right-0" : "left-0"),
1286
+ onClick: () => D?.(!E),
1287
+ title: "Toggle 24h / AM-PM format",
1288
+ children: [/* @__PURE__ */ F(N, { className: "w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors" }), /* @__PURE__ */ F("span", {
1289
+ className: "text-[9px] font-bold uppercase text-muted-foreground/60 group-hover:text-primary/70",
1290
+ children: E ? "24 Hours" : "AM / PM"
1291
+ })]
1292
+ }),
1293
+ /* @__PURE__ */ F("div", {
1294
+ className: "flex flex-1",
1295
+ style: ie ? { width: "100%" } : void 0,
1296
+ children: de.map((r) => {
1297
+ let s = Z, c = s ? r : null, l = s ? null : r, u = s && $(c, /* @__PURE__ */ new Date());
1298
+ return /* @__PURE__ */ I("div", {
1299
+ style: { width: `${pe}%` },
1300
+ className: "flex flex-col border-e border-border last:border-e-0",
1301
+ children: [/* @__PURE__ */ F("div", {
1302
+ className: e("flex flex-col items-center justify-center py-3 transition-colors shrink-0 border-e-2 border-foreground/20", u && "bg-background"),
1303
+ children: s ? (() => {
1304
+ let r = n.find((e) => (e.isHoliday || e.isFullyBooked) && $(e.start, c));
1305
+ return /* @__PURE__ */ I("div", {
1306
+ className: "flex flex-col items-center relative w-full",
1307
+ children: [
1308
+ r?.isHoliday && /* @__PURE__ */ F("span", {
1309
+ className: "absolute -top-1 px-1.5 py-0.5 bg-destructive/10 text-destructive text-[9px] font-black uppercase tracking-tighter rounded-full border border-destructive/20 mb-1 leading-none shadow-sm",
1310
+ children: "Holiday"
1311
+ }),
1312
+ r?.isFullyBooked && /* @__PURE__ */ F("span", {
1313
+ className: "absolute -top-1 px-1.5 py-0.5 bg-warning/10 text-warning-foreground text-[9px] font-black uppercase tracking-tighter rounded-full border border-warning/20 mb-1 leading-none shadow-sm",
1314
+ children: "Fully Booked"
1315
+ }),
1316
+ y ? /* @__PURE__ */ F("div", {
1317
+ className: "h-full w-full flex items-center justify-center pt-2",
1318
+ children: typeof y == "function" ? y({
1319
+ date: c,
1320
+ type: "Day",
1321
+ text: se.format(c)
1322
+ }) : y
1323
+ }) : /* @__PURE__ */ F("div", {
1324
+ className: "flex flex-col items-center cursor-pointer hover:bg-muted/50 transition-colors pt-2",
1325
+ onClick: () => {
1326
+ p && m && (m(c), p("day"));
1327
+ },
1328
+ children: t.length > 1 && /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F("span", {
1329
+ className: e("text-base font-medium mt-0.5", u ? "text-primary font-bold" : "text-foreground"),
1330
+ children: Q(c, "dd MMM yyyy")
1331
+ }), /* @__PURE__ */ F("span", {
1332
+ className: e("text-sm font-medium uppercase tracking-wider", u ? "text-primary" : "text-muted-foreground/80"),
1333
+ children: Q(c, "EEE")
1334
+ })] })
1335
+ })
1336
+ ]
1337
+ });
1338
+ })() : /* @__PURE__ */ I("div", {
1339
+ className: "flex items-center gap-2 px-2",
1340
+ children: [/* @__PURE__ */ I(o, {
1341
+ className: "h-8 w-8 shadow-sm border border-background",
1342
+ children: [l.avatar && /* @__PURE__ */ F(a, { src: l.avatar }), /* @__PURE__ */ F(i, {
1343
+ className: "text-xs font-bold",
1344
+ children: l.name?.charAt(0)
1345
+ })]
1346
+ }), /* @__PURE__ */ I("div", {
1347
+ className: "flex flex-col",
1348
+ children: [/* @__PURE__ */ F("span", {
1349
+ className: "text-sm font-bold truncate",
1350
+ children: l.name
1351
+ }), /* @__PURE__ */ F("span", {
1352
+ className: "text-[10px] text-muted-foreground truncate",
1353
+ children: l.type || "Resource"
1354
+ })]
1355
+ })]
1356
+ })
1357
+ }), fe.length > 0 && /* @__PURE__ */ F("div", {
1358
+ className: "flex w-full border-t border-border bg-background h-10 shrink-0",
1359
+ children: fe.map((t, r) => {
1360
+ let c = s ? null : t, l = s ? t : null, u = c ? n.find((e) => e.isHoliday && $(e.start, c)) : null, d = c ? n.find((e) => e.isFullyBooked && $(e.start, c)) : null;
1361
+ return /* @__PURE__ */ F("div", {
1362
+ style: { width: `${me}%` },
1363
+ className: e("flex items-center justify-center px-1 border-e border-border/30 last:border-e-0 group", ie && "snap-center", (r % 2, "bg-background")),
1364
+ children: s ? /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ I(o, {
1365
+ className: "h-4 w-4 me-1 shadow-sm border border-background",
1366
+ children: [l.avatar && /* @__PURE__ */ F(a, { src: l.avatar }), /* @__PURE__ */ F(i, {
1367
+ className: "text-[7px] font-bold",
1368
+ children: l.name?.charAt(0)
1369
+ })]
1370
+ }), /* @__PURE__ */ F("span", {
1371
+ className: "text-[9px] font-bold text-muted-foreground truncate group-hover:text-foreground transition-colors",
1372
+ children: l.name
1373
+ })] }) : /* @__PURE__ */ I("div", {
1374
+ className: "flex flex-col items-center justify-center",
1375
+ children: [
1376
+ u && /* @__PURE__ */ F("span", {
1377
+ className: "text-xs font-black uppercase tracking-wider text-destructive bg-destructive/10 px-2 py-0.5 rounded-sm mb-0.5",
1378
+ children: "Holiday"
1379
+ }),
1380
+ d && /* @__PURE__ */ F("span", {
1381
+ className: "text-xs font-black uppercase tracking-wider text-warning-foreground bg-warning/10 px-2 py-0.5 rounded-sm mb-0.5",
1382
+ children: "Fully Booked"
1383
+ }),
1384
+ /* @__PURE__ */ F("span", {
1385
+ className: e("text-[10px] font-bold text-muted-foreground uppercase", u && "text-destructive", d && "text-amber-600"),
1386
+ children: Q(c, "EEE d")
1387
+ })
1388
+ ]
1389
+ })
1390
+ }, c ? c.toISOString() : l.id);
1391
+ })
1392
+ })]
1393
+ }, s ? c.toISOString() : l.id);
1394
+ })
1395
+ })
1396
+ ]
1397
+ }), /* @__PURE__ */ I("div", {
1398
+ "data-testid": "scheduler-virtual-body",
1399
+ className: "relative shrink-0",
1400
+ style: {
1401
+ height: `${r.getTotalSize()}px`,
1402
+ ...X
1403
+ },
1404
+ children: [r.getVirtualItems().map((r) => {
1405
+ let i = r.index * T, a = z + Math.floor(i / 60), o = i % 60, s = "";
1406
+ if (E) s = `${a < 10 ? "0" + a : a}:${o < 10 ? "0" + o : o}`;
1407
+ else {
1408
+ let e = a >= 12 ? "PM" : "AM", t = a % 12 || 12;
1409
+ s = `${t < 10 ? "0" + t : t}:${o < 10 ? "0" + o : o} ${e}`;
1410
+ }
1411
+ return /* @__PURE__ */ I("div", {
1412
+ className: "absolute left-0 w-full flex",
1413
+ style: {
1414
+ height: "64px",
1415
+ top: `${r.start}px`
1416
+ },
1417
+ children: [/* @__PURE__ */ I("div", {
1418
+ className: e("w-24 shrink-0 flex flex-col items-end justify-center pe-3 border-e border-border bg-background z-50 sticky backdrop-blur-md", L ? "right-0" : "left-0"),
1419
+ children: [s && /* @__PURE__ */ F("span", {
1420
+ className: "text-sm text-foreground font-black bg-background px-1 relative z-50 uppercase tracking-tighter tabular-nums",
1421
+ children: s
1422
+ }), b && a === 0 && /* @__PURE__ */ I("span", {
1423
+ className: "text-[9px] text-muted-foreground/60 font-semibold mt-1",
1424
+ children: ["W", $e(t[0], x)]
1425
+ })]
1426
+ }), /* @__PURE__ */ I("div", {
1427
+ className: "flex flex-1 relative",
1428
+ style: { height: "64px" },
1429
+ children: [
1430
+ /* @__PURE__ */ F("div", { className: "absolute bottom-0 left-0 w-full border-b border-border/40" }),
1431
+ /* @__PURE__ */ F("div", { className: "absolute top-1/2 left-0 w-full border-b border-dashed border-border/20 h-px" }),
1432
+ de.map((t) => /* @__PURE__ */ F("div", {
1433
+ style: { width: `${pe}%` },
1434
+ className: "h-full flex relative border-e-2 border-foreground/20 last:border-e-0",
1435
+ children: fe.map((i, s) => {
1436
+ let c = Z ? t : i, l = Z ? i : t, u = r.index + z, d = c.getDay(), f = n.find((e) => e.isHoliday && $(e.start, c)), p = n.find((e) => e.isFullyBooked && $(e.start, c)), m = !0;
1437
+ m = l.workingHours ? l.workingHours.days.includes(d) && u >= l.workingHours.start && u < l.workingHours.end : d !== 0 && d !== 6 && u >= 9 && u < 17;
1438
+ let h = new Date(new Date(c).setHours(a, o, 0, 0)), g = $(c, /* @__PURE__ */ new Date()), _ = !!B && B.resourceId === l.id && h >= B.start && h < B.end;
1439
+ return /* @__PURE__ */ F(Xe, {
1440
+ date: h,
1441
+ resourceId: l.id,
1442
+ isWorkHour: m,
1443
+ isSelected: _,
1444
+ data: {
1445
+ kind: "time-slot",
1446
+ date: h,
1447
+ resourceId: l.id,
1448
+ orientation: "vertical",
1449
+ slotDuration: T
1450
+ },
1451
+ onMouseDown: () => K(h, l.id),
1452
+ onMouseEnter: () => q(h),
1453
+ onDoubleClick: () => {
1454
+ G(h, oe(h, T), l.id) || v?.(h, l.id);
1455
+ },
1456
+ onContextMenu: (e) => {
1457
+ e.preventDefault(), P?.({
1458
+ date: h,
1459
+ x: e.clientX,
1460
+ y: e.clientY
1461
+ });
1462
+ },
1463
+ style: {
1464
+ width: `${me}%`,
1465
+ minWidth: "auto",
1466
+ height: "100%"
1467
+ },
1468
+ className: e("border-e border-border/30 relative cursor-pointer hover:bg-primary/5 transition-colors pointer-events-auto", s === fe.length - 1 && "border-e-0", ie && "snap-center", f && "bg-[repeating-linear-gradient(-45deg,hsl(var(--destructive)/0.05)_0px,hsl(var(--destructive)/0.05)_10px,transparent_10px,transparent_20px)] bg-destructive/[0.02]", p && "bg-[repeating-linear-gradient(-45deg,theme(colors.warning/0.05)_0px,theme(colors.warning/0.05)_10px,transparent_10px,transparent_20px)] bg-warning/[0.02]", !f && !p && "bg-background"),
1469
+ children: S ? (() => {
1470
+ let e = Qe(S, {
1471
+ date: h,
1472
+ resourceId: l.id,
1473
+ isWorkHour: m,
1474
+ isToday: g
1475
+ });
1476
+ return e && typeof e == "object" && "__html" in e ? /* @__PURE__ */ F("div", {
1477
+ className: "w-full h-full",
1478
+ dangerouslySetInnerHTML: e
1479
+ }) : /* @__PURE__ */ F("div", {
1480
+ className: "w-full h-full",
1481
+ children: e
1482
+ });
1483
+ })() : null
1484
+ }, Z ? l.id || s : c.toISOString() || s);
1485
+ })
1486
+ }, Z ? t.toISOString() : t.id))
1487
+ ]
1488
+ })]
1489
+ }, r.index);
1490
+ }), /* @__PURE__ */ I("div", {
1491
+ className: "absolute top-0 h-full z-10",
1492
+ style: {
1493
+ width: "calc(100% - 6rem)",
1494
+ [L ? "right" : "left"]: "6rem",
1495
+ pointerEvents: "none"
1496
+ },
1497
+ children: [/* @__PURE__ */ F(tt, {
1498
+ startHour: z,
1499
+ slotDuration: T,
1500
+ isRtl: L
1501
+ }), t.map((e, r) => {
1502
+ let i = n.filter((t) => $(e, t.start));
1503
+ i.sort((e, t) => e.start.getTime() - t.start.getTime());
1504
+ let a = /* @__PURE__ */ new Map();
1505
+ return i.forEach((e) => {
1506
+ let t = e.resourceId;
1507
+ !t && C && (t = "unassigned");
1508
+ let n = J.findIndex((e) => e.id === t);
1509
+ if (n === -1) if (J.length === 1 && (J[0].id === "" || !c)) n = 0;
1510
+ else return;
1511
+ a.has(n) || a.set(n, []), a.get(n).push(e);
1512
+ }), [...a.entries()].map(([e, n]) => {
1513
+ let i = [];
1514
+ return n.forEach((e) => {
1515
+ let t = !1;
1516
+ for (let n of i) if (n.some((t) => ce({
1517
+ start: t.start,
1518
+ end: t.end
1519
+ }, {
1520
+ start: e.start,
1521
+ end: e.end
1522
+ }))) {
1523
+ n.push(e), t = !0;
1524
+ break;
1525
+ }
1526
+ t || i.push([e]);
1527
+ }), i.map((n) => {
1528
+ let i = [];
1529
+ return n.forEach((e) => {
1530
+ let t = !1;
1531
+ for (let n = 0; n < i.length; n++) if (!i[n].some((t) => ce({
1532
+ start: t.start,
1533
+ end: t.end
1534
+ }, {
1535
+ start: e.start,
1536
+ end: e.end
1537
+ }))) {
1538
+ i[n].push(e), t = !0;
1539
+ break;
1540
+ }
1541
+ t || i.push([e]);
1542
+ }), n.map((n) => {
1543
+ let a = i.findIndex((e) => e.includes(n));
1544
+ return /* @__PURE__ */ F(Ye, {
1545
+ event: n,
1546
+ style: et(n, r, e, Z ? J.length : t.length, pe, a, i.length, z, T, Z, L),
1547
+ onClick: l,
1548
+ onDoubleClick: u,
1549
+ onDelete: d,
1550
+ orientation: "vertical",
1551
+ resizable: !0,
1552
+ isBlocked: n.isBlock,
1553
+ isPast: n.end < R,
1554
+ slotDuration: T,
1555
+ pixelsPerSlot: 64
1556
+ }, n.id);
1557
+ });
1558
+ });
1559
+ });
1560
+ })]
1561
+ })]
1562
+ })]
1563
+ });
1564
+ }, rt = ({ currentDate: t, daysInView: n, visibleEvents: r, onSlotClick: i, onSlotDoubleClick: a, onEventClick: o, moreEventsClick: s, dir: c }) => {
1565
+ let l = c === "rtl", u = (e) => r.filter((t) => $(t.start, e));
1566
+ return /* @__PURE__ */ F(h, { children: /* @__PURE__ */ I("div", {
1567
+ className: "flex flex-col h-full w-full bg-background rounded-xl border border-border overflow-hidden shadow-sm",
1568
+ children: [/* @__PURE__ */ F("div", {
1569
+ className: "grid grid-cols-7 border-b border-border bg-muted/30",
1570
+ children: [
1571
+ "Sun",
1572
+ "Mon",
1573
+ "Tue",
1574
+ "Wed",
1575
+ "Thu",
1576
+ "Fri",
1577
+ "Sat"
1578
+ ].map((e, t) => /* @__PURE__ */ F("div", {
1579
+ className: "py-3 text-center text-xs font-semibold uppercase text-muted-foreground tracking-widest",
1580
+ children: e
1581
+ }, t))
1582
+ }), /* @__PURE__ */ F("div", {
1583
+ className: "grid grid-cols-7 grid-rows-6 flex-1 min-h-0 bg-muted/20 gap-px",
1584
+ children: n.map((n) => {
1585
+ let r = u(n).filter((e) => !e.isBlock), c = ge(n, t), d = $(n, /* @__PURE__ */ new Date()), f = r.slice(0, 4), h = r.length - 4, _ = r.length;
1586
+ return /* @__PURE__ */ I("div", {
1587
+ onClick: () => i?.(n),
1588
+ onDoubleClick: () => a?.(n),
1589
+ className: e("relative flex flex-col p-2 transition-colors group bg-background focus-visible:z-10", !c && "bg-muted/5 text-muted-foreground/50", c && "hover:bg-muted/30", "min-h-[100px]"),
1590
+ children: [/* @__PURE__ */ I("div", {
1591
+ className: e("flex items-center justify-between mb-1"),
1592
+ children: [/* @__PURE__ */ F("span", {
1593
+ className: e("text-sm font-medium w-7 h-7 flex items-center justify-center rounded-full transition-all", d ? "bg-primary text-primary-foreground shadow-sm font-bold scale-110" : "text-foreground group-hover:bg-muted/50", !c && "text-muted-foreground opacity-50"),
1594
+ children: Q(n, "d")
1595
+ }), _ > 0 && /* @__PURE__ */ F("span", {
1596
+ className: "text-[10px] text-muted-foreground font-medium px-1.5 py-0.5 rounded-full bg-muted/50",
1597
+ children: _
1598
+ })]
1599
+ }), /* @__PURE__ */ I("div", {
1600
+ className: "flex-1 flex flex-col gap-1.5 min-w-0",
1601
+ children: [f.map((t) => /* @__PURE__ */ I(g, {
1602
+ delayDuration: 300,
1603
+ children: [/* @__PURE__ */ F(p, {
1604
+ asChild: !0,
1605
+ children: /* @__PURE__ */ I("div", {
1606
+ onClick: (e) => {
1607
+ e.stopPropagation(), o?.(t);
1608
+ },
1609
+ className: e("group/event relative", "flex items-center gap-2 px-2 py-1 rounded-md text-xs font-medium cursor-pointer transition-all shadow-sm hover:shadow-md border border-transparent hover:border-border/50 overflow-hidden bg-card hover:bg-accent/50", !c && "opacity-60 grayscale"),
1610
+ style: { [l ? "borderRight" : "borderLeft"]: `3px solid ${t.color || "oklch(var(--primary))"}` },
1611
+ children: [/* @__PURE__ */ F("div", {
1612
+ className: "flex-1 truncate leading-tight",
1613
+ children: t.title
1614
+ }), t.start && /* @__PURE__ */ F("span", {
1615
+ className: "text-[10px] text-muted-foreground/70 tabular-nums shrink-0",
1616
+ children: Q(t.start, "h:mm a")
1617
+ })]
1618
+ })
1619
+ }), /* @__PURE__ */ F(m, {
1620
+ className: "p-3 max-w-xs bg-popover/95 backdrop-blur-sm border-border/50 shadow-xl",
1621
+ sideOffset: 5,
1622
+ children: /* @__PURE__ */ I("div", {
1623
+ className: "space-y-1.5",
1624
+ children: [/* @__PURE__ */ I("div", {
1625
+ className: "flex items-center gap-2 border-b border-border/50 pb-1.5",
1626
+ children: [/* @__PURE__ */ F("div", {
1627
+ className: "w-2 h-2 rounded-full shrink-0",
1628
+ style: { backgroundColor: t.color || "oklch(var(--primary))" }
1629
+ }), /* @__PURE__ */ F("span", {
1630
+ className: "font-semibold text-sm truncate",
1631
+ children: t.title
1632
+ })]
1633
+ }), /* @__PURE__ */ I("div", {
1634
+ className: "text-xs text-muted-foreground space-y-0.5",
1635
+ children: [
1636
+ /* @__PURE__ */ I("div", {
1637
+ className: "flex items-center gap-1.5",
1638
+ children: [/* @__PURE__ */ F("span", {
1639
+ className: "font-medium text-foreground/80",
1640
+ children: "Time:"
1641
+ }), /* @__PURE__ */ I("span", { children: [
1642
+ Q(t.start, "MMM d, h:mm a"),
1643
+ " - ",
1644
+ Q(t.end, "h:mm a")
1645
+ ] })]
1646
+ }),
1647
+ t.location && /* @__PURE__ */ I("div", {
1648
+ className: "flex items-center gap-1.5",
1649
+ children: [/* @__PURE__ */ F("span", {
1650
+ className: "font-medium text-foreground/80",
1651
+ children: "Location:"
1652
+ }), /* @__PURE__ */ F("span", { children: t.location })]
1653
+ }),
1654
+ t.description && /* @__PURE__ */ F("div", {
1655
+ className: "pt-1 mt-1 border-t border-border/30 text-muted-foreground/80 line-clamp-3",
1656
+ children: t.description
1657
+ })
1658
+ ]
1659
+ })]
1660
+ })
1661
+ })]
1662
+ }, t.id)), h > 0 && /* @__PURE__ */ I("button", {
1663
+ onClick: (e) => {
1664
+ e.stopPropagation(), s?.({ date: n });
1665
+ },
1666
+ className: "mt-auto self-start text-[10px] bg-muted/50 hover:bg-muted text-muted-foreground hover:text-foreground font-medium px-2 py-1 rounded-md transition-colors w-full text-left",
1667
+ children: [
1668
+ "+",
1669
+ h,
1670
+ " more"
1671
+ ]
1672
+ })]
1673
+ })]
1674
+ }, n.toISOString());
1675
+ })
1676
+ })]
1677
+ }) });
1678
+ }, it = ({ view: t, daysInView: n, visibleEvents: r, resources: s = [], onSlotClick: c, onSlotDoubleClick: l, onEventClick: u, onEventDelete: d, onRangeSelect: f, currentTimeIndicator: p, showResourceHeaders: m = !0, group: h, showUnassignedLane: g = !1, startHour: _ = "00:00", endHour: v = "24:00", slotDuration: y = 60, is24Hour: b = !1, scrollRef: x, dir: S }) => {
1679
+ let C = S === "rtl", w = Oe(), T = _ ? parseInt(_.split(":")[0], 10) : 0, E = v ? parseInt(v.split(":")[0], 10) : 24, D = E - T, [M, N] = j(null), [P, ee] = j(!1), L = A(null), R = A(null), z = t === "timeline-month", B = z ? 1440 : y, V = 60 / B, H = z ? 1 : D * V, U = n.length * H, W = z ? 120 : 80, G = U * W, K = k(() => {
1680
+ let e = s.length > 0 ? [...s] : [];
1681
+ return (g || e.length === 0) && (e.find((e) => e.id === "unassigned") || e.unshift({
1682
+ id: "unassigned",
1683
+ name: "Unassigned",
1684
+ type: "Global Inbox",
1685
+ color: "hsl(var(--muted-foreground))"
1686
+ })), e;
1687
+ }, [s, g]), q = k(() => {
1688
+ if (!h || !h.resources || h.resources.length === 0) return {
1689
+ isGrouped: !1,
1690
+ groups: [{
1691
+ name: "All",
1692
+ resources: K
1693
+ }]
1694
+ };
1695
+ let e = h.resources[0], t = /* @__PURE__ */ new Map();
1696
+ K.forEach((n) => {
1697
+ let r = n[e] || "Unassigned";
1698
+ t.has(r) || t.set(r, []), t.get(r)?.push(n);
1699
+ });
1700
+ let n = [];
1701
+ return t.forEach((e, t) => {
1702
+ n.push({
1703
+ name: t,
1704
+ resources: e
1705
+ });
1706
+ }), {
1707
+ isGrouped: !0,
1708
+ groups: n
1709
+ };
1710
+ }, [K, h]), ne = k(() => q.groups.flatMap((e) => e.resources), [q]), J = (e) => {
1711
+ if (z) return ve(n[e]);
1712
+ let t = Math.floor(e / H), r = e % H;
1713
+ return oe(ve(n[t]), T * 60 + r * B);
1714
+ }, re = (e) => {
1715
+ if (z) {
1716
+ let t = n.findIndex((t) => $(t, ve(e)));
1717
+ return t === -1 ? -1 : t * W;
1718
+ }
1719
+ let t = ve(e), r = n.findIndex((e) => $(e, t));
1720
+ if (r === -1) return -1;
1721
+ let i = le(e, t) - T * 60;
1722
+ return (r * D * 60 + i) / B * W;
1723
+ }, Y = (() => {
1724
+ if (z) {
1725
+ let e = ve(n[0]), t = ve(n[n.length - 1]);
1726
+ return w < e || w > t ? null : re(w);
1727
+ }
1728
+ let e = re(w), t = w.getHours();
1729
+ return e === -1 || t < T || t >= E ? null : e;
1730
+ })(), ie = A(!1);
1731
+ O(() => {
1732
+ x?.current && Y !== null && !ie.current && setTimeout(() => {
1733
+ x.current && (C ? x.current.scrollLeft = -Y : x.current.scrollLeft = Y, ie.current = !0);
1734
+ }, 50);
1735
+ }, [
1736
+ x,
1737
+ Y,
1738
+ t
1739
+ ]);
1740
+ let ae = (e, t) => {
1741
+ let n = J(e);
1742
+ if (r.some((e) => (e.isHoliday || e.isFullyBooked) && $(e.start, n))) return;
1743
+ ee(!0);
1744
+ let i = {
1745
+ startSlot: e,
1746
+ endSlot: e,
1747
+ resourceId: t
1748
+ };
1749
+ N(i), L.current = i;
1750
+ }, X = (e) => {
1751
+ if (!P || !L.current) return;
1752
+ let t = {
1753
+ ...L.current,
1754
+ endSlot: e
1755
+ };
1756
+ N(t), L.current = t;
1757
+ };
1758
+ O(() => {
1759
+ let e = (e) => {
1760
+ if (P && L.current) {
1761
+ let { startSlot: t, endSlot: n, resourceId: i } = L.current, a = Math.min(t, n), o = Math.max(t, n), s = J(a), l = J(o + 1);
1762
+ r.some((e) => (e.isHoliday || e.isFullyBooked) && $(e.start, s)) || (f?.(s, l, i, {
1763
+ x: e.clientX,
1764
+ y: e.clientY
1765
+ }), c?.(s, i));
1766
+ }
1767
+ ee(!1), N(null), L.current = null;
1768
+ };
1769
+ return window.addEventListener("mouseup", e), () => window.removeEventListener("mouseup", e);
1770
+ }, [
1771
+ P,
1772
+ f,
1773
+ c,
1774
+ n
1775
+ ]);
1776
+ let se = (e, t) => {
1777
+ if (!M || M.resourceId !== t) return !1;
1778
+ let n = Math.min(M.startSlot, M.endSlot), r = Math.max(M.startSlot, M.endSlot);
1779
+ return e >= n && e <= r;
1780
+ }, { resourceMap: Z, maxLevels: ce } = k(() => {
1781
+ let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
1782
+ return ne.forEach((n) => {
1783
+ e.set(n.id, []), t.set(n.id, 1);
1784
+ }), r.forEach((t) => {
1785
+ let n = t.resourceId || "unassigned", r = String(n);
1786
+ e.has(r) ? e.get(r)?.push(t) : e.has("unassigned") && !n && e.get("unassigned")?.push(t);
1787
+ }), e.forEach((n, r) => {
1788
+ let i = [...n].sort((e, t) => e.start.getTime() - t.start.getTime()), a = [], o = i.map((e) => {
1789
+ let t = 0;
1790
+ for (; a[t] !== void 0 && a[t] > e.start.getTime() + 3e5;) t++;
1791
+ return a[t] = e.end.getTime(), {
1792
+ ...e,
1793
+ level: t
1794
+ };
1795
+ });
1796
+ e.set(r, o), t.set(r, a.length || 1);
1797
+ }), {
1798
+ resourceMap: e,
1799
+ maxLevels: t
1800
+ };
1801
+ }, [r, ne]), ue = (e) => {
1802
+ let t = re(e.start), n = re(e.end);
1803
+ if (t === -1 && n === -1) return { display: "none" };
1804
+ let r = Math.max(0, t), i = Math.max(0, (n === -1 ? G : Math.min(G, n)) - r);
1805
+ if (i <= 4) return { display: "none" };
1806
+ let a = 20 + e.level * 46, o = e.color || "hsl(var(--primary))";
1807
+ return {
1808
+ [C ? "right" : "left"]: `${r}px`,
1809
+ width: `${Math.max(i, 4)}px`,
1810
+ top: `${a}px`,
1811
+ height: "36px",
1812
+ background: `linear-gradient(135deg, color-mix(in srgb, ${o} 20%, transparent), color-mix(in srgb, ${o} 10%, transparent))`,
1813
+ backdropFilter: "blur(4px)",
1814
+ [C ? "borderRight" : "borderLeft"]: `4px solid ${o}`,
1815
+ borderTop: `1px solid color-mix(in srgb, ${o} 30%, transparent)`,
1816
+ [C ? "borderLeft" : "borderRight"]: `1px solid color-mix(in srgb, ${o} 30%, transparent)`,
1817
+ borderBottom: `1px solid color-mix(in srgb, ${o} 30%, transparent)`,
1818
+ color: "hsl(var(--foreground))",
1819
+ borderRadius: "6px",
1820
+ boxShadow: "0 2px 8px -2px rgba(0,0,0,0.1)",
1821
+ display: "flex",
1822
+ alignItems: "center",
1823
+ fontSize: "12px",
1824
+ fontWeight: "600",
1825
+ paddingInlineStart: "12px",
1826
+ paddingInlineEnd: "8px",
1827
+ whiteSpace: "nowrap",
1828
+ overflow: "hidden",
1829
+ textOverflow: "ellipsis",
1830
+ transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
1831
+ zIndex: 20 + e.level,
1832
+ cursor: "pointer"
1833
+ };
1834
+ }, de = m ? q.isGrouped ? 280 : 240 : 0;
1835
+ return /* @__PURE__ */ I("div", {
1836
+ className: "flex flex-col h-full w-full overflow-hidden border border-border/40 rounded-xl bg-background shadow-sm",
1837
+ children: [/* @__PURE__ */ I("div", {
1838
+ className: "flex bg-background z-40 sticky top-0 border-b border-border/40 shadow-[0_1px_2px_rgba(0,0,0,0.03)] items-center",
1839
+ children: [
1840
+ m && q.isGrouped && /* @__PURE__ */ F("div", {
1841
+ className: e("w-[40px] shrink-0 border-e border-border/40 p-1 flex items-center justify-center bg-background select-none sticky z-50", C ? "right-0" : "left-0"),
1842
+ children: /* @__PURE__ */ F("div", {
1843
+ className: "writing-mode-vertical rotate-180 font-bold text-[10px] uppercase tracking-widest text-muted-foreground/70",
1844
+ children: "Group"
1845
+ })
1846
+ }),
1847
+ m && /* @__PURE__ */ F("div", {
1848
+ className: e("w-[240px] shrink-0 border-e border-border/40 px-6 py-4 font-bold text-[11px] uppercase tracking-widest flex items-center bg-background text-muted-foreground select-none sticky z-50", q.isGrouped ? C ? "right-[40px]" : "left-[40px]" : C ? "right-0" : "left-0"),
1849
+ children: "RESOURCES"
1850
+ }),
1851
+ /* @__PURE__ */ F("div", {
1852
+ ref: R,
1853
+ className: "overflow-hidden flex-1 relative",
1854
+ children: /* @__PURE__ */ F("div", {
1855
+ className: "flex",
1856
+ style: { width: G },
1857
+ children: n.map((t) => {
1858
+ let r = n.length === 1, i = t.getDay() === 0 || t.getDay() === 6;
1859
+ return z ? /* @__PURE__ */ I("div", {
1860
+ className: e("flex shrink-0 border-e border-border/30 h-14 flex-col justify-center items-center transition-colors select-none", i ? "bg-muted/10" : "bg-transparent hover:bg-muted/5"),
1861
+ style: { width: W },
1862
+ children: [/* @__PURE__ */ F("span", {
1863
+ className: e("text-[10px] font-bold uppercase mb-0.5 tracking-wider", i ? "text-muted-foreground" : "text-primary"),
1864
+ children: Q(t, "EEE")
1865
+ }), /* @__PURE__ */ F("span", {
1866
+ className: e("text-xs font-semibold", i ? "text-muted-foreground/70" : "text-foreground/80"),
1867
+ children: Q(t, "d")
1868
+ })]
1869
+ }, t.toISOString()) : /* @__PURE__ */ F("div", {
1870
+ className: "flex shrink-0 border-e border-border/40",
1871
+ style: { width: G / n.length },
1872
+ children: Array.from({ length: H }).map((n, i) => {
1873
+ let a = i * B, o = T + Math.floor(a / 60), s = a % 60, c = new Date((/* @__PURE__ */ new Date()).setHours(o, s, 0, 0)), l = "";
1874
+ return l = b ? Q(c, "HH:mm") : B < 60 || s !== 0 ? Q(c, "h:mm a") : Q(c, "ha"), /* @__PURE__ */ I("div", {
1875
+ className: "flex flex-col justify-end pb-2 border-e border-border/10 last:border-e-0 relative h-14",
1876
+ style: { width: W },
1877
+ children: [!r && i === 0 && /* @__PURE__ */ F("div", {
1878
+ className: e("absolute top-2 px-2 py-0.5 rounded text-[10px] font-bold text-foreground/80 bg-muted/50 border border-border/20 whitespace-nowrap", C ? "right-2" : "left-2"),
1879
+ children: Q(t, "EEE, MMM d")
1880
+ }), /* @__PURE__ */ F("span", {
1881
+ className: "text-[11px] font-black text-foreground text-center px-1 select-none tabular-nums truncate",
1882
+ children: l
1883
+ })]
1884
+ }, i);
1885
+ })
1886
+ }, t.toISOString());
1887
+ })
1888
+ })
1889
+ })
1890
+ ]
1891
+ }), /* @__PURE__ */ F("div", {
1892
+ ref: x,
1893
+ "data-testid": "scheduler-scroll-container",
1894
+ className: "flex-1 overflow-auto relative custom-scrollbar bg-background",
1895
+ onScroll: (e) => {
1896
+ R.current && (R.current.scrollLeft = e.currentTarget.scrollLeft);
1897
+ },
1898
+ children: /* @__PURE__ */ I("div", {
1899
+ className: "relative min-w-max",
1900
+ style: {
1901
+ width: G + de,
1902
+ minHeight: "100%"
1903
+ },
1904
+ children: [Y !== null && p !== !1 && /* @__PURE__ */ I("div", {
1905
+ className: "current-time-indicator z-50 pointer-events-none",
1906
+ style: {
1907
+ [C ? "right" : "left"]: `${Y + de}px`,
1908
+ height: "100%"
1909
+ },
1910
+ children: [/* @__PURE__ */ F("div", { className: "absolute top-0 -translate-x-1/2 w-[2px] h-full bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.6)]" }), /* @__PURE__ */ F("div", { className: "absolute top-0 -translate-x-1/2 -mt-1 w-2.5 h-2.5 rounded-full bg-red-500 shadow-md border-2 border-background" })]
1911
+ }), q.groups.map((t) => /* @__PURE__ */ I("div", {
1912
+ className: "flex border-b border-border/30 relative",
1913
+ children: [m && q.isGrouped && /* @__PURE__ */ I("div", {
1914
+ className: e("w-[40px] shrink-0 sticky z-30 bg-background border-e border-border/40 flex items-center justify-center p-1", C ? "right-0" : "left-0"),
1915
+ style: { height: "auto" },
1916
+ children: [/* @__PURE__ */ F("div", { className: "absolute inset-0 bg-background/80" }), /* @__PURE__ */ F("div", {
1917
+ className: "relative writing-mode-vertical transform rotate-180 text-[10px] font-bold uppercase tracking-wide text-foreground/70 whitespace-nowrap py-2 overflow-hidden text-ellipsis max-h-full",
1918
+ children: t.name
1919
+ })]
1920
+ }), /* @__PURE__ */ F("div", {
1921
+ className: "flex flex-col w-full",
1922
+ children: t.resources.map((t, s) => {
1923
+ let c = (ce.get(t.id) || 1) * 46 + 40;
1924
+ return /* @__PURE__ */ I("div", {
1925
+ className: e("flex border-b border-border/30 last:border-b-0 group/row hover:bg-muted/5 transition-colors", (s % 2, "bg-background")),
1926
+ style: { height: `${c}px` },
1927
+ children: [/* @__PURE__ */ F("div", {
1928
+ className: e("w-[240px] shrink-0 sticky z-30 bg-background/95 backdrop-blur border-e border-border/40 px-6 py-4 flex items-center gap-4 transition-all shadow-[1px_0_4px_rgba(0,0,0,0.02)]", q.isGrouped ? C ? "right-[40px]" : "left-[40px]" : C ? "right-0" : "left-0", !m && "hidden"),
1929
+ children: /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ I(o, {
1930
+ className: "h-9 w-9 border border-border/60 shadow-sm",
1931
+ children: [t.avatar && /* @__PURE__ */ F(a, {
1932
+ src: t.avatar,
1933
+ alt: t.name,
1934
+ className: "object-cover"
1935
+ }), /* @__PURE__ */ F(i, {
1936
+ className: "text-xs font-bold bg-primary/5 text-primary",
1937
+ children: t.name.charAt(0)
1938
+ })]
1939
+ }), /* @__PURE__ */ I("div", {
1940
+ className: "flex flex-col min-w-0",
1941
+ children: [/* @__PURE__ */ F("span", {
1942
+ className: "text-[13px] font-semibold truncate text-foreground/90 tracking-tight leading-none mb-1.5",
1943
+ children: t.name
1944
+ }), /* @__PURE__ */ I("div", {
1945
+ className: "flex items-center gap-1.5",
1946
+ children: [/* @__PURE__ */ F("span", { className: e("w-1.5 h-1.5 rounded-full", t.type === "Internal" ? "bg-primary shadow-[0_0_6px_var(--primary)]/50" : "bg-success shadow-[0_0_6px_var(--success)]/50") }), /* @__PURE__ */ F("span", {
1947
+ className: "text-[10px] text-muted-foreground font-medium uppercase tracking-wider",
1948
+ children: t.type || "Available"
1949
+ })]
1950
+ })]
1951
+ })] })
1952
+ }), /* @__PURE__ */ F(at, {
1953
+ resource: t,
1954
+ totalSlots: U,
1955
+ slotWidth: W,
1956
+ totalWidth: G,
1957
+ slotToDate: J,
1958
+ onSlotMouseDown: ae,
1959
+ onSlotMouseEnter: X,
1960
+ onSlotDoubleClick: l,
1961
+ isSlotSelected: se,
1962
+ resourceMap: Z,
1963
+ getEventStyle: ue,
1964
+ onEventClick: u,
1965
+ onEventDelete: d,
1966
+ slotDuration: B,
1967
+ now: w,
1968
+ visibleEvents: r,
1969
+ slotsPerDay: H,
1970
+ daysInView: n,
1971
+ dir: S
1972
+ })]
1973
+ }, t.id);
1974
+ })
1975
+ })]
1976
+ }, t.name))]
1977
+ })
1978
+ })]
1979
+ });
1980
+ }, at = ({ resource: t, totalSlots: n, slotWidth: r, totalWidth: i, slotToDate: a, onSlotMouseDown: o, onSlotMouseEnter: s, onSlotDoubleClick: c, isSlotSelected: l, resourceMap: u, getEventStyle: d, onEventClick: f, onEventDelete: p, slotDuration: m, now: h, visibleEvents: g, slotsPerDay: _, daysInView: v, dir: y }) => {
1981
+ let b = y === "rtl", { setNodeRef: x, isOver: S } = G({
1982
+ id: `row-${t.id}`,
1983
+ data: {
1984
+ kind: "timeline-row",
1985
+ resourceId: t.id,
1986
+ slotWidth: r,
1987
+ totalSlots: n,
1988
+ slotDuration: m,
1989
+ isRtl: b
1990
+ }
1991
+ });
1992
+ return /* @__PURE__ */ I("div", {
1993
+ ref: x,
1994
+ className: e("relative flex-1 group/interactive", S && "bg-primary/5 shadow-inner"),
1995
+ style: { width: i },
1996
+ onMouseMove: (e) => {
1997
+ let t = e.currentTarget.getBoundingClientRect(), i = e.clientX - t.left, a = Math.floor(b ? (t.width - i) / r : i / r);
1998
+ a >= 0 && a < n && s(a);
1999
+ },
2000
+ onMouseDown: (e) => {
2001
+ let i = e.currentTarget.getBoundingClientRect(), a = e.clientX - i.left, s = Math.floor(b ? (i.width - a) / r : a / r);
2002
+ s >= 0 && s < n && o(s, t.id);
2003
+ },
2004
+ onDoubleClick: (e) => {
2005
+ let i = e.currentTarget.getBoundingClientRect(), o = e.clientX - i.left, s = Math.floor(b ? (i.width - o) / r : o / r);
2006
+ if (s >= 0 && s < n) {
2007
+ let e = a(s);
2008
+ g.some((t) => (t.isHoliday || t.isFullyBooked) && $(t.start, e)) || c?.(e, t.id);
2009
+ }
2010
+ },
2011
+ children: [
2012
+ /* @__PURE__ */ F("div", {
2013
+ className: "absolute inset-0 pointer-events-none",
2014
+ style: {
2015
+ backgroundImage: `repeating-linear-gradient(${b ? "to left" : "to right"}, transparent, transparent ${r - 1}px, hsl(var(--border) / 0.1) ${r - 1}px, hsl(var(--border) / 0.1) ${r}px)`,
2016
+ backgroundSize: `${r}px 100%`
2017
+ }
2018
+ }),
2019
+ /* @__PURE__ */ F("div", {
2020
+ className: "absolute inset-0 pointer-events-none flex",
2021
+ children: v.map((t, n) => {
2022
+ let i = g.find((e) => e.isHoliday && $(e.start, t)), a = g.find((e) => e.isFullyBooked && $(e.start, t));
2023
+ return !i && !a ? /* @__PURE__ */ F("div", { style: { width: _ * r } }, n) : /* @__PURE__ */ F("div", {
2024
+ style: { width: _ * r },
2025
+ className: e("h-full border-e border-border/10", i && "bg-[repeating-linear-gradient(-45deg,hsl(var(--destructive)/0.05)_0px,hsl(var(--destructive)/0.05)_10px,transparent_10px,transparent_20px)] bg-destructive/[0.02]", a && "bg-[repeating-linear-gradient(-45deg,theme(colors.amber.500/0.05)_0px,theme(colors.amber.500/0.05)_10px,transparent_10px,transparent_20px)] bg-amber-500/[0.02]")
2026
+ }, n);
2027
+ })
2028
+ }),
2029
+ /* @__PURE__ */ F(ot, {
2030
+ totalSlots: n,
2031
+ resourceId: t.id,
2032
+ slotWidth: r,
2033
+ isSlotSelected: l,
2034
+ isRtl: b
2035
+ }),
2036
+ u.get(t.id)?.map((e) => /* @__PURE__ */ F(Ye, {
2037
+ event: e,
2038
+ style: d(e),
2039
+ onClick: f,
2040
+ onDelete: p,
2041
+ orientation: "horizontal",
2042
+ resizable: !0,
2043
+ isBlocked: e.isBlock,
2044
+ isPast: e.end < h,
2045
+ slotDuration: m,
2046
+ pixelsPerSlot: r
2047
+ }, e.id))
2048
+ ]
2049
+ });
2050
+ }, ot = E.memo(({ totalSlots: e, resourceId: t, slotWidth: n, isSlotSelected: r, isRtl: i }) => {
2051
+ let a = [], o = null;
2052
+ for (let n = 0; n < e; n++) r(n, t) ? o ? o.length++ : (o = {
2053
+ start: n,
2054
+ length: 1
2055
+ }, a.push(o)) : o = null;
2056
+ return /* @__PURE__ */ F(te, { children: a.map((e, t) => /* @__PURE__ */ F("div", {
2057
+ className: "absolute top-0 bottom-0 bg-primary/20 border-x border-primary/30 z-10 pointer-events-none",
2058
+ style: {
2059
+ [i ? "right" : "left"]: `${e.start * n}px`,
2060
+ width: `${e.length * n}px`
2061
+ }
2062
+ }, t)) });
2063
+ }), st = ({ daysInView: t, visibleEvents: n, onEventClick: r }) => /* @__PURE__ */ F("div", {
2064
+ "data-testid": "scheduler-scroll-container",
2065
+ className: "flex flex-col h-full w-full bg-background overflow-y-auto border border-border rounded-lg",
2066
+ children: t.map((t) => {
2067
+ let i = n.filter((e) => $(e.start, t)).sort((e, t) => e.start.getTime() - t.start.getTime());
2068
+ return /* @__PURE__ */ I("div", {
2069
+ className: "flex flex-col border-b border-border pb-2 last:border-b-0",
2070
+ children: [/* @__PURE__ */ I("div", {
2071
+ className: e("flex items-center px-4 py-2 sticky top-0 bg-background/95 backdrop-blur z-10 border-b border-border", $(t, /* @__PURE__ */ new Date()) && "text-primary font-semibold"),
2072
+ children: [/* @__PURE__ */ I("div", {
2073
+ className: "flex flex-col items-center mr-4 w-12 shrink-0",
2074
+ children: [/* @__PURE__ */ F("span", {
2075
+ className: "text-[10px] uppercase font-bold text-muted-foreground",
2076
+ children: Q(t, "EEE")
2077
+ }), /* @__PURE__ */ F("span", {
2078
+ className: "text-xl font-bold leading-none",
2079
+ children: Q(t, "d")
2080
+ })]
2081
+ }), /* @__PURE__ */ F("div", {
2082
+ className: "text-sm font-medium text-muted-foreground",
2083
+ children: Q(t, "MMMM yyyy")
2084
+ })]
2085
+ }), /* @__PURE__ */ F("div", {
2086
+ className: "flex flex-col px-2 py-1 gap-2",
2087
+ children: i.length === 0 ? /* @__PURE__ */ F("div", {
2088
+ className: "text-sm text-muted-foreground px-4 py-2 italic opacity-50",
2089
+ children: "No events"
2090
+ }) : i.map((t) => /* @__PURE__ */ F(v, {
2091
+ contextId: "scheduler-event",
2092
+ data: t,
2093
+ children: /* @__PURE__ */ I("div", {
2094
+ "data-testid": `scheduler-event-${t.id}`,
2095
+ className: e("flex items-center p-3 rounded-lg border bg-card text-card-foreground shadow-sm cursor-pointer hover:bg-muted/50 transition-colors", t.color && `border-l-4 border-l-[${t.color}]`),
2096
+ style: { borderLeftColor: t.color },
2097
+ onClick: () => r?.(t),
2098
+ children: [
2099
+ /* @__PURE__ */ I("div", {
2100
+ className: "flex flex-col mr-4 min-w-[80px] shrink-0",
2101
+ children: [/* @__PURE__ */ F("span", {
2102
+ className: "text-sm font-bold",
2103
+ children: Q(t.start, "h:mm a")
2104
+ }), /* @__PURE__ */ F("span", {
2105
+ className: "text-xs text-muted-foreground",
2106
+ children: Q(t.end, "h:mm a")
2107
+ })]
2108
+ }),
2109
+ /* @__PURE__ */ I("div", {
2110
+ className: "flex-1 min-w-0",
2111
+ children: [/* @__PURE__ */ F("div", {
2112
+ className: "font-semibold truncate",
2113
+ children: t.title
2114
+ }), t.description && /* @__PURE__ */ F("div", {
2115
+ className: "text-xs text-muted-foreground truncate",
2116
+ children: t.description
2117
+ })]
2118
+ }),
2119
+ t.resourceId && /* @__PURE__ */ F("div", {
2120
+ className: "hidden sm:block ml-2 px-2 py-0.5 rounded-full bg-muted text-[10px] text-muted-foreground",
2121
+ children: t.resourceId
2122
+ })
2123
+ ]
2124
+ })
2125
+ }, t.id))
2126
+ })]
2127
+ }, t.toISOString());
2128
+ })
2129
+ });
2130
+ //#endregion
2131
+ //#region src/components/EzScheduler/components/EzSchedulerContent.tsx
2132
+ function ct({ view: e, daysInView: t, visibleEvents: n, rowVirtualizer: r, resources: i, handleSlotDoubleClick: a, handleEventDoubleClick: o, handleEventDelete: s, parentRef: c, setView: l, setCurrentDate: u, props: d, handleRangeSelect: f, currentDate: p, showUnassignedLane: m, slotDuration: h, is24Hour: g, setIs24Hour: _, dir: v }) {
2133
+ let y = De("(max-width: 768px)"), b = typeof d.cell == "function" ? d.cell : void 0;
2134
+ switch (y && (e === "week" || e === "workweek") ? "agenda" : e) {
2135
+ case "day":
2136
+ case "week":
2137
+ case "workweek": return /* @__PURE__ */ F(nt, {
2138
+ daysInView: t,
2139
+ visibleEvents: n,
2140
+ rowVirtualizer: r,
2141
+ resources: i,
2142
+ onSlotDoubleClick: a,
2143
+ onEventDoubleClick: o,
2144
+ onEventDelete: s,
2145
+ scrollRef: c,
2146
+ onViewChange: l,
2147
+ onDateChange: u,
2148
+ onRangeSelect: f,
2149
+ onSlotClick: (e, t) => d.onCellClick?.(e, t),
2150
+ onEventClick: (e) => d.onEventClick?.(e),
2151
+ showResourcesInDayView: d.showResourcesInDayView,
2152
+ showWeekNumber: d.showWeekNumber,
2153
+ weekRule: d.weekRule,
2154
+ cellTemplate: b,
2155
+ enableHtmlSanitizer: d.enableHtmlSanitizer,
2156
+ showUnassignedLane: m,
2157
+ startHour: d.startHour,
2158
+ endHour: d.endHour,
2159
+ slotDuration: h,
2160
+ is24Hour: g,
2161
+ setIs24Hour: _,
2162
+ group: d.group,
2163
+ onCellContextMenu: d.onCellContextMenu,
2164
+ dir: v
2165
+ });
2166
+ case "month": return /* @__PURE__ */ F(rt, {
2167
+ currentDate: p,
2168
+ daysInView: t,
2169
+ visibleEvents: n,
2170
+ onSlotClick: (e) => d.onCellClick?.(e),
2171
+ onSlotDoubleClick: (e) => a(e),
2172
+ onEventClick: (e) => d.onEventClick?.(e) || o(e),
2173
+ monthsCount: d.monthsCount,
2174
+ dir: v
2175
+ });
2176
+ case "timeline":
2177
+ case "timeline-day":
2178
+ case "timelineday":
2179
+ case "timeline-week":
2180
+ case "timelineweek":
2181
+ case "timeline-month":
2182
+ case "timelinemonth": return /* @__PURE__ */ F(it, {
2183
+ view: e,
2184
+ currentDate: p,
2185
+ daysInView: t,
2186
+ visibleEvents: n,
2187
+ resources: i,
2188
+ onSlotClick: (e, t) => d.onCellClick?.(e, t),
2189
+ onSlotDoubleClick: a,
2190
+ onEventClick: (e) => d.onEventClick?.(e) || o(e),
2191
+ onEventDelete: s,
2192
+ onRangeSelect: f,
2193
+ currentTimeIndicator: d.currentTimeIndicator,
2194
+ showResourceHeaders: d.showResourceHeaders,
2195
+ group: d.group,
2196
+ showUnassignedLane: d.showUnassignedLane,
2197
+ startHour: d.startHour,
2198
+ endHour: d.endHour,
2199
+ slotDuration: h,
2200
+ is24Hour: g,
2201
+ scrollRef: c,
2202
+ dir: v
2203
+ });
2204
+ case "agenda": return /* @__PURE__ */ F(st, {
2205
+ daysInView: t,
2206
+ visibleEvents: n,
2207
+ onEventClick: (e) => d.onEventClick?.(e) || o(e)
2208
+ });
2209
+ default: return /* @__PURE__ */ I("div", { children: [
2210
+ "View ",
2211
+ e,
2212
+ " not implemented"
2213
+ ] });
2214
+ }
2215
+ }
2216
+ //#endregion
2217
+ //#region src/components/EzScheduler/index.tsx
2218
+ var lt = E.lazy(() => import("./EzEventModal-C079wLjP.js").then((e) => e.n).then((e) => ({ default: e.EzEventModal }))), ut = E.lazy(() => import("./EzSchedulerQuickAdd-BIC8xbSn.js").then((e) => e.n).then((e) => ({ default: e.EzSchedulerQuickAdd }))), dt = E.lazy(() => import("./EzSchedulerToolbar-Ba4gbvUg.js").then((e) => e.n).then((e) => ({ default: e.EzSchedulerToolbar }))), ft = new J();
2219
+ function pt({ ref: e, ...t }) {
2220
+ return d(), /* @__PURE__ */ F(re, {
2221
+ client: ft,
2222
+ children: /* @__PURE__ */ F(mt, {
2223
+ ...t,
2224
+ ref: e
2225
+ })
2226
+ });
2227
+ }
2228
+ function mt({ ref: t, ...n }) {
2229
+ let i = He({
2230
+ ...n,
2231
+ view: n.view || n.defaultView || "Week",
2232
+ selectedDate: n.selectedDate ?? n.defaultSelectedDate
2233
+ }), { state: a, actions: o, services: s, refs: c, baseApi: u, dir: d } = i, { currentView: f, currentDate: p, viewEvents: m, daysInView: h, slotDuration: g, is24Hour: _ } = a, { setView: v, setCurrentDate: y } = o, { rowVirtualizer: b, parentRef: x } = c, { schedulerService: S, serviceRegistry: C } = s, [w, O] = j(null), { internalResources: k, setInternalResources: A } = We({ resources: n.resources }), M = (e) => {
2234
+ if (!e.start || !e.end) return {
2235
+ hasBlockOverlap: !1,
2236
+ hasRegularOverlap: !1,
2237
+ overlappingEvents: []
2238
+ };
2239
+ let t = m.filter((t) => t.id === e.id || !(t.resourceId === e.resourceId || t.resourceIds?.some((t) => e.resourceId === t) || !t.resourceId && !e.resourceId) ? !1 : ce({
2240
+ start: t.start,
2241
+ end: t.end
2242
+ }, {
2243
+ start: e.start,
2244
+ end: e.end
2245
+ }));
2246
+ return {
2247
+ hasBlockOverlap: t.some((e) => e.isBlock),
2248
+ hasRegularOverlap: t.length > 0,
2249
+ overlappingEvents: t
2250
+ };
2251
+ }, N = (e = "regular") => {
2252
+ let t = C.get("NotificationService");
2253
+ if (t) {
2254
+ let n = "", r = "warning";
2255
+ e === "block" ? (n = "Cannot place event here: This time is blocked (e.g. Lunch Break).", r = "error") : e === "past" ? (n = "Cannot move or create events in the past.", r = "error") : (n = "Warning: This event overlaps with an existing event.", r = "warning"), t.add({
2256
+ type: r,
2257
+ message: n,
2258
+ duration: 5e3
2259
+ });
2260
+ }
2261
+ }, { sensors: P, handleDragEnd: ee } = Ge({
2262
+ events: m,
2263
+ resources: k,
2264
+ slotDuration: g,
2265
+ onBeforeEventDrop: n.onBeforeEventDrop,
2266
+ onBeforeEventResize: n.onBeforeEventResize,
2267
+ onEventChange: (e) => {
2268
+ if (!n.allowPastEvents && e.start < /* @__PURE__ */ new Date()) {
2269
+ N("past");
2270
+ return;
2271
+ }
2272
+ let { hasBlockOverlap: t, hasRegularOverlap: r, overlappingEvents: i } = M(e);
2273
+ if (t) {
2274
+ N("block");
2275
+ return;
2276
+ }
2277
+ if (r) {
2278
+ if (n.onEventOverlap) {
2279
+ let t = {
2280
+ event: e,
2281
+ existingEvents: i,
2282
+ cancel: !1
2283
+ };
2284
+ if (n.onEventOverlap(t), t.cancel) return;
2285
+ }
2286
+ N("regular");
2287
+ }
2288
+ o.updateEvent(e);
2289
+ }
2290
+ }), te = D((e) => {
2291
+ let t = e.active.data.current, n = t?.eventId || t?.id || e.active.id;
2292
+ O((t?.event || m.find((e) => e.id === n)) ?? null);
2293
+ }, [m]), L = D((e) => {
2294
+ ee(e), O(null);
2295
+ }, [ee]), B = D(() => {
2296
+ O(null);
2297
+ }, []), [U, W] = j({
2298
+ isOpen: !1,
2299
+ mode: "create"
2300
+ }), [G, K] = j(!1), [q, ne] = j(null), [J, re] = j({
2301
+ x: 0,
2302
+ y: 0
2303
+ }), Y = E.useMemo(() => ({
2304
+ ...i.baseApi,
2305
+ onExportExcel: n.onExportExcel,
2306
+ onExportCSV: n.onExportCSV,
2307
+ onExportICS: n.onExportICS,
2308
+ get currentView() {
2309
+ return f;
2310
+ },
2311
+ destroy: () => {
2312
+ n.destroyed && n.destroyed({});
2313
+ }
2314
+ }), [
2315
+ i.baseApi,
2316
+ f,
2317
+ n.destroyed,
2318
+ n.onExportExcel,
2319
+ n.onExportCSV,
2320
+ n.onExportICS
2321
+ ]);
2322
+ Ue(f, p, S, m, {
2323
+ setEditorState: W,
2324
+ setResources: A,
2325
+ scrollToIndex: (e) => {
2326
+ x.current && (x.current.scrollTop = e * 64);
2327
+ },
2328
+ forceUpdate: () => {},
2329
+ showSpinner: u.showSpinner,
2330
+ hideSpinner: u.hideSpinner,
2331
+ closeQuickInfoPopup: () => K(!1),
2332
+ changeView: (e) => v(e.toLowerCase()),
2333
+ next: o.nextPeriod,
2334
+ prev: o.prevPeriod,
2335
+ today: o.today
2336
+ }, t, Y);
2337
+ let ie = (e, t) => {
2338
+ n.onCellDoubleClick ? n.onCellDoubleClick(e, t) : W({
2339
+ isOpen: !0,
2340
+ mode: "create",
2341
+ event: {
2342
+ start: e,
2343
+ end: oe(e, 30),
2344
+ resourceId: t,
2345
+ resourceIds: t ? [t] : []
2346
+ }
2347
+ });
2348
+ }, ae = (e) => {
2349
+ n.onEventDoubleClick ? n.onEventDoubleClick(e) : W({
2350
+ isOpen: !0,
2351
+ mode: e.end < /* @__PURE__ */ new Date() ? "view" : "edit",
2352
+ event: e
2353
+ });
2354
+ }, X = (e, t) => e === !1 || t.cancel, se = async (e) => {
2355
+ if (!n.allowPastEvents && e.start && e.start < /* @__PURE__ */ new Date()) {
2356
+ N("past");
2357
+ return;
2358
+ }
2359
+ let { hasBlockOverlap: t, hasRegularOverlap: r } = M(e);
2360
+ if (t) {
2361
+ N("block");
2362
+ return;
2363
+ }
2364
+ if (r && N("regular"), U.mode === "create") {
2365
+ let t = {
2366
+ event: e,
2367
+ cancel: !1
2368
+ };
2369
+ if (X(n.onBeforeEventCreate?.(t), t)) return;
2370
+ await n.onEventCreate?.(e), o.addEvent(e);
2371
+ } else {
2372
+ let t = e.id ? m.find((t) => t.id === e.id) : void 0, r = e, i = {
2373
+ event: r,
2374
+ originalEvent: t,
2375
+ proposedEvent: r,
2376
+ sourceResourceId: t?.resourceId,
2377
+ targetResourceId: r.resourceId,
2378
+ sourceTime: t?.start,
2379
+ targetTime: r.start,
2380
+ cancel: !1
2381
+ };
2382
+ if (X(n.onBeforeEventChange?.(i), i)) return;
2383
+ await n.onEventChange?.(r), o.updateEvent(r);
2384
+ }
2385
+ W((e) => ({
2386
+ ...e,
2387
+ isOpen: !1
2388
+ }));
2389
+ }, [Z, le] = j({ isOpen: !1 }), ue = async (e) => {
2390
+ le({
2391
+ isOpen: !0,
2392
+ eventId: e
2393
+ });
2394
+ }, de = async () => {
2395
+ let e = Z.eventId;
2396
+ if (!e) return;
2397
+ let t = m.find((t) => t.id === e);
2398
+ if (t) {
2399
+ let r = {
2400
+ eventId: e,
2401
+ event: t,
2402
+ cancel: !1
2403
+ };
2404
+ if (X(n.onBeforeEventDelete?.(r), r)) return;
2405
+ await n.onEventDelete?.(e), o.deleteEvent(e);
2406
+ let i = C.get("NotificationService");
2407
+ if (i) {
2408
+ let e = Q(t.start, "MMM d, yyyy h:mm a");
2409
+ i.add({
2410
+ type: "success",
2411
+ message: `Event "${t.title}" on ${e} has been cancelled.`,
2412
+ duration: 5e3
2413
+ });
2414
+ }
2415
+ }
2416
+ le({ isOpen: !1 });
2417
+ }, fe = (e) => {
2418
+ if (!n.allowPastEvents && e.start && e.start < /* @__PURE__ */ new Date()) {
2419
+ N("past");
2420
+ return;
2421
+ }
2422
+ let t = {
2423
+ event: e,
2424
+ cancel: !1
2425
+ };
2426
+ X(n.onBeforeEventCreate?.(t), t) || (o.addEvent(e), n.onEventCreate?.(e), K(!1));
2427
+ };
2428
+ return /* @__PURE__ */ F(l, {
2429
+ fallback: /* @__PURE__ */ F(Ke, {}),
2430
+ children: /* @__PURE__ */ I("div", {
2431
+ className: e("ez-scheduler flex flex-col w-full h-full bg-background select-none overflow-hidden", n.className),
2432
+ dir: d,
2433
+ children: [n.showHeaderBar !== !1 && /* @__PURE__ */ F(E.Suspense, {
2434
+ fallback: /* @__PURE__ */ F("div", { className: "h-12 w-full animate-pulse bg-muted/20 rounded-md mb-4" }),
2435
+ children: (() => {
2436
+ let e = n.slots?.toolbar;
2437
+ return e ? /* @__PURE__ */ F(e, {
2438
+ view: f,
2439
+ setView: v,
2440
+ currentDate: p,
2441
+ next: o.nextPeriod,
2442
+ prev: o.prevPeriod,
2443
+ today: o.today,
2444
+ onAddClick: D(() => W({
2445
+ isOpen: !0,
2446
+ mode: "create",
2447
+ event: {}
2448
+ }), []),
2449
+ slotDuration: g,
2450
+ setSlotDuration: o.setSlotDuration,
2451
+ setCurrentDate: y,
2452
+ onPrev: o.prevPeriod,
2453
+ onNext: o.nextPeriod,
2454
+ onToday: o.today,
2455
+ currentView: f,
2456
+ onViewChange: (e) => {
2457
+ let t = e.toLowerCase().replace(/[^a-z]/g, "");
2458
+ v({
2459
+ day: "day",
2460
+ week: "week",
2461
+ workweek: "workweek",
2462
+ month: "month",
2463
+ timelineday: "timeline-day",
2464
+ timelineweek: "timeline-week",
2465
+ timelineworkweek: "timeline-week",
2466
+ timelinemonth: "timeline-month",
2467
+ agenda: "agenda",
2468
+ timeline: "timeline-day"
2469
+ }[t] || t);
2470
+ },
2471
+ views: n.views || [
2472
+ "Day",
2473
+ "Week",
2474
+ "Month"
2475
+ ],
2476
+ onExportExcel: D(() => n.onExportExcel?.(m), [n.onExportExcel, m]),
2477
+ onExportCSV: D(() => n.onExportCSV?.(m), [n.onExportCSV, m]),
2478
+ onExportICS: D(() => n.onExportICS?.(m), [n.onExportICS, m]),
2479
+ dir: d,
2480
+ ...n.slotProps?.toolbar
2481
+ }) : /* @__PURE__ */ F(dt, {
2482
+ view: f,
2483
+ setView: v,
2484
+ currentDate: p,
2485
+ next: o.nextPeriod,
2486
+ prev: o.prevPeriod,
2487
+ today: o.today,
2488
+ onAddClick: D(() => W({
2489
+ isOpen: !0,
2490
+ mode: "create",
2491
+ event: {}
2492
+ }), []),
2493
+ slotDuration: g,
2494
+ setSlotDuration: o.setSlotDuration,
2495
+ setCurrentDate: y,
2496
+ onPrev: o.prevPeriod,
2497
+ onNext: o.nextPeriod,
2498
+ onToday: o.today,
2499
+ currentView: f,
2500
+ onViewChange: (e) => {
2501
+ let t = e.toLowerCase().replace(/[^a-z]/g, "");
2502
+ v({
2503
+ day: "day",
2504
+ week: "week",
2505
+ workweek: "workweek",
2506
+ month: "month",
2507
+ timelineday: "timeline-day",
2508
+ timelineweek: "timeline-week",
2509
+ timelineworkweek: "timeline-week",
2510
+ timelinemonth: "timeline-month",
2511
+ agenda: "agenda",
2512
+ timeline: "timeline-day"
2513
+ }[t] || t);
2514
+ },
2515
+ views: n.views || [
2516
+ "Day",
2517
+ "Week",
2518
+ "Month"
2519
+ ],
2520
+ onExportExcel: D(() => n.onExportExcel?.(m), [n.onExportExcel, m]),
2521
+ onExportCSV: D(() => n.onExportCSV?.(m), [n.onExportCSV, m]),
2522
+ onExportICS: D(() => n.onExportICS?.(m), [n.onExportICS, m]),
2523
+ dir: d
2524
+ });
2525
+ })()
2526
+ }), /* @__PURE__ */ I(R, {
2527
+ sensors: P,
2528
+ onDragStart: te,
2529
+ onDragEnd: L,
2530
+ onDragCancel: B,
2531
+ collisionDetection: (e) => {
2532
+ let t = V(e);
2533
+ return t.length > 0 ? t : H(e);
2534
+ },
2535
+ autoScroll: { enabled: !0 },
2536
+ children: [
2537
+ /* @__PURE__ */ I("div", {
2538
+ className: "flex-1 overflow-hidden relative flex flex-col",
2539
+ children: [/* @__PURE__ */ F(ct, {
2540
+ view: f,
2541
+ daysInView: h,
2542
+ visibleEvents: m,
2543
+ rowVirtualizer: b,
2544
+ resources: k,
2545
+ handleSlotDoubleClick: ie,
2546
+ handleEventDoubleClick: ae,
2547
+ handleEventDelete: ue,
2548
+ parentRef: x,
2549
+ setView: v,
2550
+ setCurrentDate: y,
2551
+ props: n,
2552
+ handleRangeSelect: (e, t, r, i) => {
2553
+ n.showQuickInfoPopup && (ne({
2554
+ start: e,
2555
+ end: t,
2556
+ resourceId: r
2557
+ }), re({
2558
+ x: i?.x || 0,
2559
+ y: i?.y || 0
2560
+ }), K(!0));
2561
+ },
2562
+ currentDate: p,
2563
+ showUnassignedLane: n.showUnassignedLane,
2564
+ slotDuration: g,
2565
+ is24Hour: _,
2566
+ setIs24Hour: o.setIs24Hour,
2567
+ dir: d
2568
+ }), n.isLoading && /* @__PURE__ */ F(Je, {})]
2569
+ }),
2570
+ /* @__PURE__ */ F(z, {
2571
+ dropAnimation: null,
2572
+ children: w ? /* @__PURE__ */ F(Ye, {
2573
+ event: w,
2574
+ dragOverlay: !0,
2575
+ orientation: f.toLowerCase().startsWith("timeline") ? "horizontal" : "vertical",
2576
+ showTime: !0,
2577
+ resizable: !1,
2578
+ style: {
2579
+ width: f.toLowerCase().startsWith("timeline") ? 180 : 220,
2580
+ minHeight: 56
2581
+ }
2582
+ }) : null
2583
+ }),
2584
+ (() => {
2585
+ if (G && q) {
2586
+ let e = n.slots?.quickAdd;
2587
+ return e ? /* @__PURE__ */ F(E.Suspense, {
2588
+ fallback: null,
2589
+ children: /* @__PURE__ */ F(e, {
2590
+ start: q.start,
2591
+ end: q.end,
2592
+ resourceId: q.resourceId,
2593
+ resources: k,
2594
+ onSave: fe,
2595
+ onCancel: () => K(!1),
2596
+ onMoreOptions: (e) => {
2597
+ K(!1), W({
2598
+ isOpen: !0,
2599
+ mode: "create",
2600
+ event: e
2601
+ });
2602
+ },
2603
+ position: J,
2604
+ ...n.slotProps?.quickAdd
2605
+ })
2606
+ }) : /* @__PURE__ */ F(E.Suspense, {
2607
+ fallback: null,
2608
+ children: /* @__PURE__ */ F(ut, {
2609
+ start: q.start,
2610
+ end: q.end,
2611
+ resourceId: q.resourceId,
2612
+ resources: k,
2613
+ onSave: fe,
2614
+ onCancel: () => K(!1),
2615
+ onMoreOptions: (e) => {
2616
+ K(!1), W({
2617
+ isOpen: !0,
2618
+ mode: "create",
2619
+ event: e
2620
+ });
2621
+ },
2622
+ position: J
2623
+ })
2624
+ });
2625
+ }
2626
+ return null;
2627
+ })(),
2628
+ (() => {
2629
+ let e = n.slots?.eventModal;
2630
+ return e ? /* @__PURE__ */ F(E.Suspense, {
2631
+ fallback: null,
2632
+ children: /* @__PURE__ */ F(e, {
2633
+ isOpen: U.isOpen,
2634
+ onClose: () => W((e) => ({
2635
+ ...e,
2636
+ isOpen: !1
2637
+ })),
2638
+ mode: U.mode,
2639
+ event: U.event,
2640
+ onSave: se,
2641
+ onDelete: ue,
2642
+ resources: k,
2643
+ locale: n.locale,
2644
+ editorTemplate: typeof n.editorTemplate == "function" ? n.editorTemplate : void 0,
2645
+ headerTemplate: typeof n.editorHeaderTemplate == "function" ? n.editorHeaderTemplate : void 0,
2646
+ footerTemplate: typeof n.editorFooterTemplate == "function" ? n.editorFooterTemplate : void 0,
2647
+ headerFieldsTemplate: typeof n.editorHeaderFieldsTemplate == "function" ? n.editorHeaderFieldsTemplate : void 0,
2648
+ hiddenFields: n.editorHiddenFields,
2649
+ ...n.slotProps?.eventModal
2650
+ })
2651
+ }) : /* @__PURE__ */ F(E.Suspense, {
2652
+ fallback: null,
2653
+ children: /* @__PURE__ */ F(lt, {
2654
+ isOpen: U.isOpen,
2655
+ onClose: () => W((e) => ({
2656
+ ...e,
2657
+ isOpen: !1
2658
+ })),
2659
+ mode: U.mode,
2660
+ event: U.event,
2661
+ onSave: se,
2662
+ onDelete: ue,
2663
+ resources: k,
2664
+ locale: n.locale,
2665
+ editorTemplate: typeof n.editorTemplate == "function" ? n.editorTemplate : void 0,
2666
+ headerTemplate: typeof n.editorHeaderTemplate == "function" ? n.editorHeaderTemplate : void 0,
2667
+ footerTemplate: typeof n.editorFooterTemplate == "function" ? n.editorFooterTemplate : void 0,
2668
+ headerFieldsTemplate: typeof n.editorHeaderFieldsTemplate == "function" ? n.editorHeaderFieldsTemplate : void 0,
2669
+ hiddenFields: n.editorHiddenFields
2670
+ })
2671
+ });
2672
+ })(),
2673
+ /* @__PURE__ */ F(T, {
2674
+ isOpen: Z.isOpen,
2675
+ onClose: () => le({ isOpen: !1 }),
2676
+ title: "Delete Event",
2677
+ footer: /* @__PURE__ */ I("div", {
2678
+ className: "flex gap-2",
2679
+ children: [/* @__PURE__ */ F(r, {
2680
+ variant: "ghost",
2681
+ onClick: () => le({ isOpen: !1 }),
2682
+ children: "Cancel"
2683
+ }), /* @__PURE__ */ F(r, {
2684
+ variant: "destructive",
2685
+ onClick: de,
2686
+ children: "Delete"
2687
+ })]
2688
+ }),
2689
+ children: /* @__PURE__ */ F("p", {
2690
+ className: "text-sm text-muted-foreground",
2691
+ children: "Are you sure you want to delete this event? This action cannot be undone."
2692
+ })
2693
+ })
2694
+ ]
2695
+ })]
2696
+ })
2697
+ });
2698
+ }
2699
+ //#endregion
2700
+ export { De as a, ke as i, He as n, Me as r, pt as t };