@feedmepos/mf-hrm-portal 2.3.2-dev → 2.3.2-dev.3

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 (292) hide show
  1. package/dist/{ApprovalCodeList-xOyDG5ug.js → ApprovalCodeList-D3U4nvlF.js} +7 -7
  2. package/dist/AuditLogList-qGCW7tf0.js +1950 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +438 -0
  4. package/dist/EmployeeList-Bd73xDCX.js +776 -0
  5. package/dist/{FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js → FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js} +6 -6
  6. package/dist/{GrantUserList-CUkuf3VV.js → GrantUserList-C71pal0N.js} +8 -8
  7. package/dist/{Main-Cg9SOzcz.js → Main-BWJPyEU1.js} +5 -5
  8. package/dist/{Main-BcixH7R5.js → Main-CCdTWngg.js} +11 -11
  9. package/dist/Main-DGf0bQvy.js +96 -0
  10. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
  11. package/dist/{PermissionSetList-I3u2_qHR.js → PermissionSetList-BS-oBunI.js} +35 -33
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +4167 -0
  13. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +35 -0
  14. package/dist/ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js +132 -0
  15. package/dist/{RoleList-ALmAwN0U.js → RoleList-B_7UnVNb.js} +21 -20
  16. package/dist/ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js +544 -0
  17. package/dist/ScheduleGeneralPage-DpNvWNGs.js +811 -0
  18. package/dist/ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js +2556 -0
  19. package/dist/SchedulePage-QW-cYvu2.js +19458 -0
  20. package/dist/SchedulePositionPage-BtFfVo2N.js +282 -0
  21. package/dist/SelectFilter-BXeVKgHN.js +264 -0
  22. package/dist/TeamMemberList-DoisBYnk.js +1154 -0
  23. package/dist/{TimesheetList-CECFKt7H.js → TimesheetList-D-bESKe5.js} +11 -11
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-RIyoAmeb.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js} +3 -3
  25. package/dist/{app-CdrnR_Pw.js → app-D-MUq9Ab.js} +11435 -6652
  26. package/dist/app.js +3 -3
  27. package/dist/{approval-code-Bwvwehz9.js → approval-code-BXUiojPH.js} +1 -1
  28. package/dist/{dayjs.min-BO8bcI17.js → dayjs.min-BZ1pM-6M.js} +13 -13
  29. package/dist/{employee-Dg-J9goA.js → employee-HQEU8fjb.js} +66 -62
  30. package/dist/{grant-user-whFOaPZI.js → grant-user-CBJ3gEgW.js} +1 -1
  31. package/dist/{iteration-ZpERYj3o.js → iteration-ogxW2-Tv.js} +1 -1
  32. package/dist/{lodash-7SZBZ8VQ.js → lodash-Def4gaas.js} +1 -1
  33. package/dist/object-Dwyg2LgX.js +16 -0
  34. package/dist/restaurant-D2mfKHaH.js +1880 -0
  35. package/dist/{role-C6hFKOfU.js → role-JDoDFVd9.js} +4 -5
  36. package/dist/{rule-BlMymDXm.js → rule-DPtqlnz-.js} +94 -99
  37. package/dist/src/api/audit-log/index.d.ts +4 -0
  38. package/dist/src/api/employee/index.d.ts +2 -2
  39. package/dist/src/api/restaurant/index.d.ts +2 -0
  40. package/dist/src/api/schedule/index.d.ts +68 -0
  41. package/dist/src/components/AppForm.vue.d.ts +2 -2
  42. package/dist/src/components/CheckboxInput.vue.d.ts +2 -2
  43. package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
  44. package/dist/src/components/layout/PortalShell.vue.d.ts +12 -0
  45. package/dist/src/components/layout/withScheduleShell.d.ts +10 -0
  46. package/dist/src/composables/useDiscardConfirm.d.ts +3 -1
  47. package/dist/src/composables/useMessage.d.ts +8 -2
  48. package/dist/src/helpers/string.d.ts +1 -10
  49. package/dist/src/router/shared.d.ts +3 -2
  50. package/dist/src/stores/employee.d.ts +12 -12
  51. package/dist/src/stores/restaurant.d.ts +7 -7
  52. package/dist/src/stores/team.d.ts +0 -30
  53. package/dist/src/types/employee.d.ts +1 -0
  54. package/dist/src/types/schedule.d.ts +23 -0
  55. package/dist/src/types/team.d.ts +1 -17
  56. package/dist/src/views/audit-log/constants.d.ts +9 -30
  57. package/dist/src/views/audit-log/locales/index.d.ts +488 -0
  58. package/dist/src/views/audit-log/pos-row.d.ts +27 -0
  59. package/dist/src/views/hr/locales/index.d.ts +4 -4
  60. package/dist/src/views/scheduling/ScheduleGeneralPage.vue.d.ts +3 -0
  61. package/dist/src/views/scheduling/SchedulePage.vue.d.ts +3 -0
  62. package/dist/src/views/scheduling/SchedulePositionPage.vue.d.ts +3 -0
  63. package/dist/src/views/scheduling/components/ScheduleAddEmployeeIdentitySection.vue.d.ts +6 -0
  64. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModal.vue.d.ts +12 -0
  65. package/dist/src/views/scheduling/components/ScheduleAddEmployeeModeStep.vue.d.ts +6 -0
  66. package/dist/src/views/scheduling/components/ScheduleAddEmployeePosAccessSection.vue.d.ts +6 -0
  67. package/dist/src/views/scheduling/components/ScheduleAddEmployeePositionsSection.vue.d.ts +10 -0
  68. package/dist/src/views/scheduling/components/ScheduleAddEmployeeSchedulingSection.vue.d.ts +6 -0
  69. package/dist/src/views/scheduling/components/ScheduleAddPickPopover.vue.d.ts +6 -0
  70. package/dist/src/views/scheduling/components/ScheduleAddPositionModal.vue.d.ts +6 -0
  71. package/dist/src/views/scheduling/components/ScheduleAreaRows.vue.d.ts +41 -0
  72. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDetailsModal.vue.d.ts +6 -0
  73. package/dist/src/views/scheduling/components/ScheduleAutoScheduleDoneArt.vue.d.ts +2 -0
  74. package/dist/src/views/{team/member/ExistingMemberNotice.vue.d.ts → scheduling/components/ScheduleAutoScheduleModal.vue.d.ts} +5 -6
  75. package/dist/src/views/scheduling/components/ScheduleBoardAreaRows.vue.d.ts +25 -0
  76. package/dist/src/views/scheduling/components/ScheduleBoardEditOverlays.vue.d.ts +17 -0
  77. package/dist/src/views/scheduling/components/ScheduleBoardEmployeeRows.vue.d.ts +31 -0
  78. package/dist/src/views/scheduling/components/ScheduleBoardGridHeader.vue.d.ts +29 -0
  79. package/dist/src/views/scheduling/components/ScheduleBoardInteractionOverlays.vue.d.ts +34 -0
  80. package/dist/src/views/scheduling/components/ScheduleBoardOnboardingOverlays.vue.d.ts +26 -0
  81. package/dist/src/views/scheduling/components/ScheduleBoardRails.vue.d.ts +17 -0
  82. package/dist/src/views/scheduling/components/ScheduleBoardToolbar.vue.d.ts +38 -0
  83. package/dist/src/views/scheduling/components/ScheduleBoardUtilityOverlays.vue.d.ts +22 -0
  84. package/dist/src/views/scheduling/components/ScheduleButton.vue.d.ts +23 -0
  85. package/dist/src/views/scheduling/components/ScheduleChangeEmployeeModal.vue.d.ts +8 -0
  86. package/dist/src/views/scheduling/components/ScheduleCloneOutletModal.vue.d.ts +6 -0
  87. package/dist/src/views/scheduling/components/ScheduleCoach.vue.d.ts +6 -0
  88. package/dist/src/views/scheduling/components/ScheduleCompletionDialog.vue.d.ts +15 -0
  89. package/dist/src/views/scheduling/components/ScheduleConfirmModal.vue.d.ts +33 -0
  90. package/dist/src/views/scheduling/components/ScheduleContextMenu.vue.d.ts +17 -0
  91. package/dist/src/views/scheduling/components/ScheduleCostRail.vue.d.ts +8 -0
  92. package/dist/src/views/scheduling/components/ScheduleCostRailEmptyArt.vue.d.ts +2 -0
  93. package/dist/src/views/scheduling/components/ScheduleDateRangePopover.vue.d.ts +6 -0
  94. package/dist/src/views/scheduling/components/ScheduleDayNotePopover.vue.d.ts +6 -0
  95. package/dist/src/views/scheduling/components/ScheduleDayTimeline.vue.d.ts +17 -0
  96. package/dist/src/views/scheduling/components/ScheduleDemandRow.vue.d.ts +23 -0
  97. package/dist/src/views/scheduling/components/ScheduleDemandSheet.vue.d.ts +10 -0
  98. package/dist/src/views/scheduling/components/ScheduleDotsIcon.vue.d.ts +2 -0
  99. package/dist/src/views/scheduling/components/ScheduleEmployeeDetailPanel.vue.d.ts +12 -0
  100. package/dist/src/views/scheduling/components/ScheduleEmployeeIdentity.vue.d.ts +17 -0
  101. package/dist/src/views/scheduling/components/ScheduleExportPreview.vue.d.ts +7 -0
  102. package/dist/src/views/scheduling/components/ScheduleFilterBar.vue.d.ts +18 -0
  103. package/dist/src/views/scheduling/components/ScheduleGapPopover.vue.d.ts +6 -0
  104. package/dist/src/views/scheduling/components/ScheduleGridHeader.vue.d.ts +18 -0
  105. package/dist/src/views/scheduling/components/ScheduleGridSkeleton.vue.d.ts +2 -0
  106. package/dist/src/views/scheduling/components/ScheduleLeaveEditModal.vue.d.ts +6 -0
  107. package/dist/src/views/scheduling/components/ScheduleLoadState.vue.d.ts +9 -0
  108. package/dist/src/views/scheduling/components/ScheduleModal.vue.d.ts +26 -0
  109. package/dist/src/views/scheduling/components/ScheduleOnboardingAssignPositionModal.vue.d.ts +6 -0
  110. package/dist/src/views/scheduling/components/ScheduleOnboardingClosedDayConfirm.vue.d.ts +6 -0
  111. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandDays.vue.d.ts +6 -0
  112. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandFooter.vue.d.ts +6 -0
  113. package/dist/src/views/scheduling/components/ScheduleOnboardingDemandHeader.vue.d.ts +6 -0
  114. package/dist/src/views/scheduling/components/ScheduleOnboardingDoneArt.vue.d.ts +2 -0
  115. package/dist/src/views/scheduling/components/ScheduleOnboardingHoursProfileNotice.vue.d.ts +10 -0
  116. package/dist/src/views/scheduling/components/ScheduleOnboardingPositions.vue.d.ts +6 -0
  117. package/dist/src/views/scheduling/components/ScheduleOnboardingReview.vue.d.ts +6 -0
  118. package/dist/src/views/scheduling/components/ScheduleOnboardingSettings.vue.d.ts +6 -0
  119. package/dist/src/views/scheduling/components/ScheduleOnboardingWelcome.vue.d.ts +11 -0
  120. package/dist/src/views/scheduling/components/ScheduleOnboardingWizard.vue.d.ts +9 -0
  121. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardFooter.vue.d.ts +6 -0
  122. package/dist/src/views/scheduling/components/ScheduleOnboardingWizardHeader.vue.d.ts +11 -0
  123. package/dist/src/views/scheduling/components/SchedulePublishModal.vue.d.ts +8 -0
  124. package/dist/src/views/scheduling/components/SchedulePublishShareArt.vue.d.ts +2 -0
  125. package/dist/src/views/scheduling/components/ScheduleReviewBar.vue.d.ts +12 -0
  126. package/dist/src/views/scheduling/components/ScheduleSelect.vue.d.ts +70 -0
  127. package/dist/src/views/scheduling/components/ScheduleSelectExistingEmployeeModal.vue.d.ts +6 -0
  128. package/dist/src/views/scheduling/components/ScheduleSetupBanner.vue.d.ts +12 -0
  129. package/dist/src/views/scheduling/components/ScheduleShiftCell.vue.d.ts +35 -0
  130. package/dist/src/views/scheduling/components/ScheduleShiftHeadcountEditor.vue.d.ts +10 -0
  131. package/dist/src/views/scheduling/components/ScheduleShiftImpact.vue.d.ts +6 -0
  132. package/dist/src/views/scheduling/components/ScheduleShiftMoreOptions.vue.d.ts +8 -0
  133. package/dist/src/views/scheduling/components/ScheduleShiftPopover.vue.d.ts +16 -0
  134. package/dist/src/views/scheduling/components/ScheduleShiftRepeatDaysRow.vue.d.ts +8 -0
  135. package/dist/src/views/scheduling/components/ScheduleShiftSegmentsEditor.vue.d.ts +8 -0
  136. package/dist/src/views/scheduling/components/ScheduleShiftWhoPicker.vue.d.ts +25 -0
  137. package/dist/src/views/scheduling/components/ScheduleStaffRail.vue.d.ts +16 -0
  138. package/dist/src/views/scheduling/components/ScheduleStaffRows.vue.d.ts +50 -0
  139. package/dist/src/views/scheduling/components/ScheduleStatsRow.vue.d.ts +12 -0
  140. package/dist/src/views/scheduling/components/ScheduleSwapShiftsModal.vue.d.ts +8 -0
  141. package/dist/src/views/scheduling/components/ScheduleTimePickerPopover.vue.d.ts +6 -0
  142. package/dist/src/views/scheduling/components/ScheduleTopbar.vue.d.ts +20 -0
  143. package/dist/src/views/scheduling/composables/auto-schedule-mapping.d.ts +35 -0
  144. package/dist/src/views/scheduling/composables/onboarding-constants.d.ts +7 -0
  145. package/dist/src/views/scheduling/composables/onboarding-hours.d.ts +7 -0
  146. package/dist/src/views/scheduling/composables/onboarding-types.d.ts +51 -0
  147. package/dist/src/views/scheduling/composables/remyPrompt.d.ts +15 -0
  148. package/dist/src/views/scheduling/composables/schedule-add-employee-form.d.ts +82 -0
  149. package/dist/src/views/scheduling/composables/schedule-board-helpers.d.ts +63 -0
  150. package/dist/src/views/scheduling/composables/schedule-breaks.d.ts +9 -0
  151. package/dist/src/views/scheduling/composables/schedule-calendar.d.ts +17 -0
  152. package/dist/src/views/scheduling/composables/schedule-cost.d.ts +24 -0
  153. package/dist/src/views/scheduling/composables/schedule-currency.d.ts +22 -0
  154. package/dist/src/views/scheduling/composables/schedule-day-meta.d.ts +21 -0
  155. package/dist/src/views/scheduling/composables/schedule-demand-domain.d.ts +23 -0
  156. package/dist/src/views/scheduling/composables/schedule-employee-profile.d.ts +7 -0
  157. package/dist/src/views/scheduling/composables/schedule-error.d.ts +1 -0
  158. package/dist/src/views/scheduling/composables/schedule-export-matrix.d.ts +14 -0
  159. package/dist/src/views/scheduling/composables/schedule-leave-split.d.ts +9 -0
  160. package/dist/src/views/scheduling/composables/schedule-popover-position.d.ts +16 -0
  161. package/dist/src/views/scheduling/composables/schedule-quick-pick.d.ts +23 -0
  162. package/dist/src/views/scheduling/composables/schedule-shift-time.d.ts +29 -0
  163. package/dist/src/views/scheduling/composables/schedule-time.d.ts +8 -0
  164. package/dist/src/views/scheduling/composables/schedule-week-cache.d.ts +9 -0
  165. package/dist/src/views/scheduling/composables/useCollapsedList.d.ts +9 -0
  166. package/dist/src/views/scheduling/composables/useRemyAppStore.d.ts +16 -0
  167. package/dist/src/views/scheduling/composables/useScheduleAddEmployee.d.ts +137 -0
  168. package/dist/src/views/scheduling/composables/useScheduleAddPick.d.ts +75 -0
  169. package/dist/src/views/scheduling/composables/useScheduleAreaBoard.d.ts +50 -0
  170. package/dist/src/views/scheduling/composables/useScheduleAreaDragDrop.d.ts +11 -0
  171. package/dist/src/views/scheduling/composables/useScheduleAssignmentMutations.d.ts +13 -0
  172. package/dist/src/views/scheduling/composables/useScheduleAutoSchedule.d.ts +301 -0
  173. package/dist/src/views/scheduling/composables/useScheduleBoard.d.ts +615 -0
  174. package/dist/src/views/scheduling/composables/useScheduleCellState.d.ts +27 -0
  175. package/dist/src/views/scheduling/composables/useScheduleClashDetection.d.ts +28 -0
  176. package/dist/src/views/scheduling/composables/useScheduleCloneOutletModal.d.ts +21 -0
  177. package/dist/src/views/scheduling/composables/useScheduleCoach.d.ts +80 -0
  178. package/dist/src/views/scheduling/composables/useScheduleCopyWeek.d.ts +12 -0
  179. package/dist/src/views/scheduling/composables/useScheduleCostRail.d.ts +60 -0
  180. package/dist/src/views/scheduling/composables/useScheduleDayNote.d.ts +44 -0
  181. package/dist/src/views/scheduling/composables/useScheduleDayTimeline.d.ts +111 -0
  182. package/dist/src/views/scheduling/composables/useScheduleDemand.d.ts +59 -0
  183. package/dist/src/views/scheduling/composables/useScheduleDemandRow.d.ts +47 -0
  184. package/dist/src/views/scheduling/composables/useScheduleDemandSheet.d.ts +166 -0
  185. package/dist/src/views/scheduling/composables/useScheduleDragDrop.d.ts +55 -0
  186. package/dist/src/views/scheduling/composables/useScheduleEmployeeAccess.d.ts +24 -0
  187. package/dist/src/views/scheduling/composables/useScheduleEmployeeAvailability.d.ts +13 -0
  188. package/dist/src/views/scheduling/composables/useScheduleEmployeeCandidates.d.ts +49 -0
  189. package/dist/src/views/scheduling/composables/useScheduleEmployeeCompensation.d.ts +7 -0
  190. package/dist/src/views/scheduling/composables/useScheduleEmployeeForm.d.ts +22 -0
  191. package/dist/src/views/scheduling/composables/useScheduleEmployeeIdentity.d.ts +50 -0
  192. package/dist/src/views/scheduling/composables/useScheduleEmployeeMenu.d.ts +38 -0
  193. package/dist/src/views/scheduling/composables/useScheduleEmployeePersistence.d.ts +32 -0
  194. package/dist/src/views/scheduling/composables/useScheduleEmployeeProfile.d.ts +16 -0
  195. package/dist/src/views/scheduling/composables/useScheduleEmployeeValidation.d.ts +18 -0
  196. package/dist/src/views/scheduling/composables/useScheduleExport.d.ts +52 -0
  197. package/dist/src/views/scheduling/composables/useScheduleFilterBar.d.ts +14 -0
  198. package/dist/src/views/scheduling/composables/useScheduleGapPopover.d.ts +79 -0
  199. package/dist/src/views/scheduling/composables/useScheduleLeave.d.ts +60 -0
  200. package/dist/src/views/scheduling/composables/useScheduleLegend.d.ts +15 -0
  201. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +58 -0
  202. package/dist/src/views/scheduling/composables/useScheduleOnboardingDemand.d.ts +45 -0
  203. package/dist/src/views/scheduling/composables/useScheduleOnboardingEmployees.d.ts +231 -0
  204. package/dist/src/views/scheduling/composables/useScheduleOnboardingFlow.d.ts +9 -0
  205. package/dist/src/views/scheduling/composables/useScheduleOnboardingHours.d.ts +15 -0
  206. package/dist/src/views/scheduling/composables/useScheduleOnboardingNavigation.d.ts +11 -0
  207. package/dist/src/views/scheduling/composables/useScheduleOnboardingPersistence.d.ts +13 -0
  208. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1543 -0
  209. package/dist/src/views/scheduling/composables/useScheduleOutlet.d.ts +25 -0
  210. package/dist/src/views/scheduling/composables/useSchedulePageActions.d.ts +18 -0
  211. package/dist/src/views/scheduling/composables/useSchedulePageBootstrap.d.ts +9 -0
  212. package/dist/src/views/scheduling/composables/useSchedulePageCellActions.d.ts +21 -0
  213. package/dist/src/views/scheduling/composables/useSchedulePageCellDrop.d.ts +20 -0
  214. package/dist/src/views/scheduling/composables/useSchedulePageClearActions.d.ts +33 -0
  215. package/dist/src/views/scheduling/composables/useSchedulePageEmployeeActions.d.ts +22 -0
  216. package/dist/src/views/scheduling/composables/useSchedulePageOverlays.d.ts +21 -0
  217. package/dist/src/views/scheduling/composables/useSchedulePdfExport.d.ts +19 -0
  218. package/dist/src/views/scheduling/composables/useSchedulePositionModal.d.ts +55 -0
  219. package/dist/src/views/scheduling/composables/useSchedulePositions.d.ts +35 -0
  220. package/dist/src/views/scheduling/composables/useSchedulePublish.d.ts +127 -0
  221. package/dist/src/views/scheduling/composables/useSchedulePublishPersistence.d.ts +11 -0
  222. package/dist/src/views/scheduling/composables/useScheduleRangeCalendar.d.ts +27 -0
  223. package/dist/src/views/scheduling/composables/useScheduleRoster.d.ts +313 -0
  224. package/dist/src/views/scheduling/composables/useScheduleSettings.d.ts +40 -0
  225. package/dist/src/views/scheduling/composables/useScheduleSetupBanner.d.ts +17 -0
  226. package/dist/src/views/scheduling/composables/useScheduleShiftActions.d.ts +245 -0
  227. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +63 -0
  228. package/dist/src/views/scheduling/composables/useScheduleShiftPersistence.d.ts +17 -0
  229. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +255 -0
  230. package/dist/src/views/scheduling/composables/useScheduleStatsRow.d.ts +27 -0
  231. package/dist/src/views/scheduling/composables/useScheduleTimePicker.d.ts +49 -0
  232. package/dist/src/views/scheduling/composables/useScheduleTour.d.ts +95 -0
  233. package/dist/src/views/scheduling/composables/useScheduleViewportFit.d.ts +9 -0
  234. package/dist/src/views/scheduling/country-rules/index.d.ts +33 -0
  235. package/dist/src/views/scheduling/data.d.ts +123 -0
  236. package/dist/src/views/scheduling/locales/index.d.ts +6988 -0
  237. package/dist/src/views/scheduling/schedule-constants.d.ts +7 -0
  238. package/dist/src/views/scheduling/schedule-state.d.ts +767 -0
  239. package/dist/src/views/scheduling/schedule-store.d.ts +140 -0
  240. package/dist/src/views/scheduling/types.d.ts +381 -0
  241. package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
  242. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
  243. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +2 -2
  244. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
  245. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
  246. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +2 -2
  247. package/dist/src/views/team/locales/index.d.ts +0 -716
  248. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -50
  249. package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
  250. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
  251. package/dist/src/views/team/member/TeamMemberMasterUser.vue.d.ts +0 -2
  252. package/dist/string-VNuQNweN.js +15 -0
  253. package/dist/style.css +1 -1
  254. package/dist/tsconfig.app.tsbuildinfo +1 -1
  255. package/dist/{useAppStore-CL6EEDuw.js → useAppStore-DZCdxlCd.js} +1 -1
  256. package/dist/useDiscardConfirm-CzZSPyvh.js +28 -0
  257. package/dist/{useLoading-BBjBUzGJ.js → useLoading-Nygx2zn8.js} +1 -1
  258. package/dist/{useReportPermissions-Bg0fma6m.js → useReportPermissions-CxV7Dz1B.js} +3 -3
  259. package/package.json +5 -3
  260. package/dist/AuditLogList-Dd6HyFhk.js +0 -1777
  261. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-Cixg_icC.js +0 -459
  262. package/dist/EmployeeList-BG2KPvOB.js +0 -908
  263. package/dist/Main-BSHf8gTE.js +0 -100
  264. package/dist/MyPosProfile-CN8Bj3aV.js +0 -301
  265. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
  266. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BBoRXQPn.js +0 -4243
  267. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B5QDOF0L.js +0 -1840
  268. package/dist/SelectFilter-ATOm0hdn.js +0 -269
  269. package/dist/TeamMemberList-DZfEnOs1.js +0 -2097
  270. package/dist/member-grant-C46lvrh2.js +0 -55
  271. package/dist/restaurant-CKhT6kgj.js +0 -45
  272. package/dist/src/api/my-pos-profile/index.d.ts +0 -5
  273. package/dist/src/api/staff-invite/index.d.ts +0 -17
  274. package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
  275. package/dist/src/composables/useMenuAccess.d.ts +0 -56
  276. package/dist/src/composables/useStaffInviteProviders.d.ts +0 -19
  277. package/dist/src/helpers/member-grant.d.ts +0 -36
  278. package/dist/src/helpers/my-pos-profile.d.ts +0 -37
  279. package/dist/src/helpers/pos-assignment-rows.d.ts +0 -26
  280. package/dist/src/helpers/staff-invite.d.ts +0 -51
  281. package/dist/src/router/menu-access-guard.d.ts +0 -17
  282. package/dist/src/types/my-pos-profile.d.ts +0 -25
  283. package/dist/src/types/staff-invite.d.ts +0 -100
  284. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
  285. package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -200
  286. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -55
  287. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -46
  288. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
  289. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
  290. package/dist/string-DZQ1uNjn.js +0 -22
  291. package/dist/useDiscardConfirm-DPhEV6v0.js +0 -157
  292. /package/dist/src/{views/my-pos-profile/MyPosProfile.vue.d.ts → components/layout/SchedulePromoBanner.vue.d.ts} +0 -0
@@ -0,0 +1,2556 @@
1
+ import { onMounted as Re, onBeforeUnmount as $e, ref as S, reactive as T, shallowRef as Ae, watch as Be, computed as Y, defineComponent as xe, createElementBlock as M, openBlock as C, renderSlot as Xe, useAttrs as ha, nextTick as ke, normalizeClass as pe, createElementVNode as x, createBlock as pa, mergeProps as va, toDisplayString as z, Teleport as ga, createCommentVNode as G, withDirectives as Da, unref as Ee, vModelText as wa, Fragment as be, renderList as Ha, createTextVNode as Aa, withModifiers as Ea, normalizeStyle as ba } from "vue";
2
+ import { useRoute as Pa, useRouter as Sa } from "vue-router";
3
+ import { useCoreStore as Je, useI18n as ka } from "@feedmepos/mf-common";
4
+ import { g, b as h, u as Ca } from "./restaurant-D2mfKHaH.js";
5
+ import { E as Ce, u as Ze } from "./employee-HQEU8fjb.js";
6
+ import { t as Fe, q as Ma } from "./rule-DPtqlnz-.js";
7
+ function so(e) {
8
+ let a = null;
9
+ function t() {
10
+ if (!a) return;
11
+ a.style.height = "";
12
+ const n = a.getBoundingClientRect().top;
13
+ a.style.height = `${Math.max(0, window.innerHeight - n)}px`;
14
+ }
15
+ Re(() => {
16
+ var n;
17
+ a = ((n = e.value) == null ? void 0 : n.closest(".sch-page")) ?? null, t(), window.addEventListener("resize", t);
18
+ }), $e(() => {
19
+ window.removeEventListener("resize", t), a && (a.style.height = "");
20
+ });
21
+ }
22
+ function Me(e) {
23
+ const [a, t] = String(e || "0:0").split(":").map(Number);
24
+ return (Number.isFinite(a) ? a : 0) * 60 + (Number.isFinite(t) ? t : 0);
25
+ }
26
+ function Na(e) {
27
+ const a = Math.max(0, Math.min(1439, Math.round(e)));
28
+ return `${String(Math.floor(a / 60)).padStart(2, "0")}:${String(a % 60).padStart(2, "0")}`;
29
+ }
30
+ function La(e, a) {
31
+ const t = Me(e);
32
+ let n = Me(a);
33
+ return n <= t && (n += 1440), [t, n];
34
+ }
35
+ function qe(e, a) {
36
+ const [t, n] = La(e, a);
37
+ return Math.max(0, n - t);
38
+ }
39
+ function Oa(e) {
40
+ const a = (Me(e) % 1440 + 1440) % 1440, t = Math.floor(a / 60), n = a % 60, o = t < 12 ? "am" : "pm", i = t % 12 || 12;
41
+ return n ? `${i}:${String(n).padStart(2, "0")}${o}` : `${i}${o}`;
42
+ }
43
+ function io(e) {
44
+ return Oa(Na(e % 1440));
45
+ }
46
+ function ea(e) {
47
+ const a = Array.isArray(e) ? e : e == null ? void 0 : e.breaks;
48
+ return a != null && a.length ? a.reduce((t, n) => {
49
+ if (n.type === "DURATION") return t + n.minutes;
50
+ const [o, i] = n.startTime.split(":").map(Number), [u, s] = n.endTime.split(":").map(Number);
51
+ let d = u * 60 + s - (o * 60 + i);
52
+ return d < 0 && (d += 24 * 60), t + d;
53
+ }, 0) : Math.max(0, e && !Array.isArray(e) ? e.breakMins ?? 0 : 0);
54
+ }
55
+ function ro(e, a) {
56
+ var o;
57
+ const t = a ?? qe(e.start, e.end), n = (o = e.breaks) != null && o.length ? e.breaks.reduce((i, u) => i + (u.breakPayType === "UNPAID" ? ea([u]) : 0), 0) : Math.max(0, e.breakMins ?? 0);
58
+ return Math.max(0, t - Math.min(t, n));
59
+ }
60
+ function lo(e) {
61
+ const a = Math.max(0, Math.round(e ?? 0));
62
+ return a ? [{ type: "DURATION", minutes: a, breakPayType: "UNPAID" }] : [];
63
+ }
64
+ const ne = 500, Ia = 10, _e = 6, uo = 1500, aa = 1e6, w = {
65
+ async completeOnboarding(e, a) {
66
+ return g(
67
+ await h(`restaurants/${e}/schedules`).post("onboarding", a)
68
+ );
69
+ },
70
+ async listEmployeeProfiles(e) {
71
+ return g(
72
+ await h("schedules").get("employees", {
73
+ params: e != null && e.length ? { ids: e.join(",") } : void 0
74
+ })
75
+ );
76
+ },
77
+ async listEmployeeConfigs(e) {
78
+ return g(
79
+ await h(`restaurants/${e}/schedules`).get("employee-configs")
80
+ );
81
+ },
82
+ async saveEmployeeConfigs(e, a) {
83
+ return g(
84
+ await h(`restaurants/${e}/schedules`).post(
85
+ "employee-configs/reorder",
86
+ a
87
+ )
88
+ );
89
+ },
90
+ async getSettings(e) {
91
+ return g(
92
+ await h(`restaurants/${e}/schedules`).get("settings")
93
+ );
94
+ },
95
+ async saveSettings(e, a) {
96
+ return g(
97
+ await h(`restaurants/${e}/schedules`).post("settings", a)
98
+ );
99
+ },
100
+ async generateAutoSchedule(e, a) {
101
+ return g(
102
+ await h(`restaurants/${e}/schedules`).post(
103
+ "auto-schedule/generate",
104
+ a
105
+ )
106
+ );
107
+ },
108
+ async getAutoScheduleCapabilities(e) {
109
+ return g(
110
+ await h(`restaurants/${e}/schedules`).get(
111
+ "auto-schedule/capabilities"
112
+ )
113
+ );
114
+ },
115
+ async applyAutoSchedule(e, a) {
116
+ return g(
117
+ await h(`restaurants/${e}/schedules`).post(
118
+ "auto-schedule/apply",
119
+ a
120
+ )
121
+ );
122
+ },
123
+ /** One outlet's whole board over `[from, to]` (inclusive, 'YYYY-MM-DD'). */
124
+ async readBoard(e, a, t) {
125
+ return g(
126
+ await h(`restaurants/${e}/schedules`).get("board", {
127
+ params: { from: a, to: t }
128
+ })
129
+ );
130
+ },
131
+ async createTimeOff(e, a) {
132
+ return g(
133
+ await h(`restaurants/${e}/schedules`).post("time-off", a)
134
+ );
135
+ },
136
+ async updateTimeOffStatus(e, a, t) {
137
+ return g(
138
+ await h(`restaurants/${e}/schedules`).post(
139
+ `time-off/${a}/status`,
140
+ t
141
+ )
142
+ );
143
+ },
144
+ async deleteTimeOff(e, a) {
145
+ await h(`restaurants/${e}/schedules`).delete(`time-off/${a}`);
146
+ },
147
+ /** Creates or updates the employee's shared business-level scheduling profile. */
148
+ async createEmployeeProfile(e, a) {
149
+ return g(await h("schedules").post("employees", a));
150
+ },
151
+ /** Edits the employee's shared business-level scheduling profile. */
152
+ async updateEmployeeProfile(e, a, t) {
153
+ return g(
154
+ await h("schedules").post("employees", { employeeId: a, ...t })
155
+ );
156
+ },
157
+ async validatePosAccess(e) {
158
+ await h("schedules").post("employees/validate-pos-access", e);
159
+ },
160
+ /** Positions are shared across the business. */
161
+ async createPosition(e) {
162
+ return g(await h("schedules").post("positions", e));
163
+ },
164
+ async updatePosition(e, a) {
165
+ return g(await h("schedules").post(`positions/${e}`, a));
166
+ },
167
+ /** Deleting one position is `deletePositions` with a single-id array — the backend's
168
+ * `DELETE positions/:id` route is gone; this is now `DELETE positions?ids=`. */
169
+ async deletePosition(e) {
170
+ await h("schedules").delete("positions", {
171
+ params: { ids: e }
172
+ });
173
+ },
174
+ /** Creates one flat demand interval. */
175
+ async createDemand(e, a) {
176
+ return g(
177
+ await h(`restaurants/${e}/schedules`).post("demands", a)
178
+ );
179
+ },
180
+ /** Deletes a batch of demands in one request — e.g. `saveDemand` replacing a whole
181
+ * day/weekday's demand rows wholesale. Deleting one demand is just this with a single-id
182
+ * array. */
183
+ async deleteDemands(e, a) {
184
+ return g(
185
+ await h(`restaurants/${e}/schedules`).delete("demands", {
186
+ params: { ids: a.join(",") }
187
+ })
188
+ );
189
+ },
190
+ /** Atomically replaces one date/weekday's flattened demand rows. */
191
+ async replaceDemands(e, a) {
192
+ return g(
193
+ await h(`restaurants/${e}/schedules`).post(
194
+ "demands/replace",
195
+ a
196
+ )
197
+ );
198
+ },
199
+ /** Atomically replaces several date/weekday demand generations. */
200
+ async bulkReplaceDemands(e, a) {
201
+ return g(
202
+ await h(`restaurants/${e}/schedules`).post(
203
+ "demands/bulk-replace",
204
+ a
205
+ )
206
+ );
207
+ },
208
+ /** Replaces one date's note/holiday-mark. All three fields back to empty/false clears it. */
209
+ async saveScheduleDay(e, a, t) {
210
+ return g(
211
+ await h(`restaurants/${e}/schedules`).post(
212
+ `days/${a}`,
213
+ t
214
+ )
215
+ );
216
+ },
217
+ /** A one-off shift assignment. */
218
+ async createAssignment(e, a) {
219
+ return g(
220
+ await h(`restaurants/${e}/schedules`).post("assignments", a)
221
+ );
222
+ },
223
+ async updateAssignment(e, a, t) {
224
+ return g(
225
+ await h(`restaurants/${e}/schedules`).patch(
226
+ `assignments/${a}`,
227
+ t
228
+ )
229
+ );
230
+ },
231
+ /** Atomically applies assignment updates, creates, and deletes used by moves and swaps. */
232
+ async bulkSaveAssignments(e, a) {
233
+ return g(
234
+ await h(`restaurants/${e}/schedules`).post(
235
+ "assignments/bulk",
236
+ a
237
+ )
238
+ );
239
+ },
240
+ /** Replaces demand and/or assignments in one backend transaction. */
241
+ async copySchedule(e, a) {
242
+ return g(
243
+ await h(`restaurants/${e}/schedules`).post("copy", a)
244
+ );
245
+ },
246
+ /** Clears demand and/or assignments in one backend transaction. */
247
+ async clearSchedule(e, a) {
248
+ return g(
249
+ await h(`restaurants/${e}/schedules`).post("clear", a)
250
+ );
251
+ },
252
+ /** Deletes a batch of assignments in one request — e.g. a shift split into several segments
253
+ * getting replaced wholesale. Deleting one assignment is just this with a single-id
254
+ * array. */
255
+ async deleteAssignments(e, a) {
256
+ return g(
257
+ await h(`restaurants/${e}/schedules`).delete("assignments", {
258
+ params: { ids: a.join(",") }
259
+ })
260
+ );
261
+ },
262
+ /** Removes all assignments for an employee from the inclusive removal date onward. */
263
+ async deleteEmployeeFutureAssignments(e, a, t) {
264
+ return g(
265
+ await h(`restaurants/${e}/schedules`).delete(
266
+ "assignments/employee-future",
267
+ { params: { employeeId: a, from: t } }
268
+ )
269
+ );
270
+ },
271
+ /** Flips a batch of assignments to one status in a single request — e.g. Publish sending
272
+ * every DRAFT shift on the board to PUBLISHED at once. */
273
+ async bulkUpdateAssignmentStatus(e, a) {
274
+ return g(
275
+ await h(`restaurants/${e}/schedules`).patch(
276
+ "assignments/bulk-status",
277
+ a
278
+ )
279
+ );
280
+ }
281
+ }, ta = {
282
+ payload: Ae(null),
283
+ loading: S(!1),
284
+ rosterLoading: S(!1),
285
+ loadError: S(null),
286
+ scheduleSetupCompleted: S(!1),
287
+ dataVersion: S(0),
288
+ outletId: S(""),
289
+ restaurantEmployees: S([]),
290
+ employeeConfigs: S([]),
291
+ employeeOutletIds: Ae({}),
292
+ businessEmployees: Ae([]),
293
+ positions: T([]),
294
+ positionRecords: T([]),
295
+ rolePositions: T({}),
296
+ outlet: T({ name: "" }),
297
+ locationOptions: T([]),
298
+ locationLabelById: T({}),
299
+ departmentOptions: T([]),
300
+ compensationGroupOptions: T([]),
301
+ compensationGroupMeta: T({}),
302
+ existingStaff: T([]),
303
+ shiftTemplates: T([]),
304
+ rules: T({
305
+ coverage: {},
306
+ openFrom: "00:00",
307
+ openTo: "24:00",
308
+ dayHours: Array.from({ length: 7 }, () => []),
309
+ payRate: {
310
+ NORMAL: { overtime: 1.5 },
311
+ REST_DAY: { regular: 1, overtime: 2 },
312
+ PUBLIC_HOLIDAY: { regular: 2, overtime: 3 }
313
+ },
314
+ salesForecast: 0,
315
+ closedWeekdays: [],
316
+ labourTarget: 0,
317
+ budgetFromSales: !1,
318
+ budget: 0,
319
+ otCapHours: null,
320
+ workingHours: {
321
+ minHoursPerDay: null,
322
+ maxHoursPerDay: 8,
323
+ maxHoursPerWeek: 45
324
+ },
325
+ otBudget: 0,
326
+ notify: {
327
+ waConnected: !1,
328
+ waNumber: "",
329
+ waDisplayName: "",
330
+ defaults: { wa: !1, push: !1, email: !1 }
331
+ }
332
+ })
333
+ }, {
334
+ payload: r,
335
+ loading: Ue,
336
+ rosterLoading: We,
337
+ loadError: ve,
338
+ scheduleSetupCompleted: ge,
339
+ dataVersion: J,
340
+ outletId: m,
341
+ restaurantEmployees: le,
342
+ employeeConfigs: V,
343
+ employeeOutletIds: na,
344
+ businessEmployees: Pe,
345
+ positions: Ta,
346
+ positionRecords: W,
347
+ rolePositions: co,
348
+ outlet: Ra,
349
+ locationOptions: Ke,
350
+ locationLabelById: se,
351
+ compensationGroupMeta: mo,
352
+ existingStaff: yo,
353
+ shiftTemplates: fo,
354
+ rules: N
355
+ } = ta;
356
+ function $a() {
357
+ const e = ta.rules;
358
+ Object.keys(e.coverage).forEach((a) => delete e.coverage[a]), e.openFrom = "00:00", e.openTo = "24:00", e.dayHours.splice(0, e.dayHours.length, ...Array.from({ length: 7 }, () => [])), Object.assign(e.payRate.NORMAL, { overtime: 1.5 }), Object.assign(e.payRate.REST_DAY, { regular: 1, overtime: 2 }), Object.assign(e.payRate.PUBLIC_HOLIDAY, { regular: 2, overtime: 3 }), e.salesForecast = 0, e.closedWeekdays.splice(0, e.closedWeekdays.length), e.labourTarget = 0, e.budgetFromSales = !1, e.budget = 0, e.otCapHours = null, e.workingHours = {
359
+ minHoursPerDay: null,
360
+ maxHoursPerDay: 8,
361
+ maxHoursPerWeek: 45
362
+ }, e.otBudget = 0, Object.assign(e.notify, {
363
+ waConnected: !1,
364
+ waNumber: "",
365
+ waDisplayName: "",
366
+ defaults: { wa: !1, push: !1, email: !1 }
367
+ });
368
+ }
369
+ const Ne = 7;
370
+ function Ba(e) {
371
+ const a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
372
+ return `${a}-${t}-${n}`;
373
+ }
374
+ function ie(e, a) {
375
+ const t = new Date(e);
376
+ return t.setDate(t.getDate() + a), t;
377
+ }
378
+ function Le(e) {
379
+ const a = new Date(e);
380
+ return a.setHours(0, 0, 0, 0), a.setDate(a.getDate() - (a.getDay() + 6) % 7), a;
381
+ }
382
+ function ho(e, a = /* @__PURE__ */ new Date()) {
383
+ const t = ie(Le(a), e * Ne);
384
+ return Array.from({ length: Ne }, (n, o) => ie(t, o));
385
+ }
386
+ function po(e, a) {
387
+ const t = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), n = t(Le(e)), o = t(Le(a));
388
+ return Math.trunc((o - n) / (Ne * 24 * 60 * 60 * 1e3));
389
+ }
390
+ const oa = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
391
+ function vo(e) {
392
+ return `scheduling.days.short.${oa[(e % 7 + 7) % 7]}`;
393
+ }
394
+ function go(e) {
395
+ return `scheduling.days.long.${oa[(e % 7 + 7) % 7]}`;
396
+ }
397
+ function Do(e, a = "en-US") {
398
+ return !e || e.startsWith("en") ? a : e.startsWith("th") ? "th-TH-u-ca-gregory" : e;
399
+ }
400
+ const j = Ba, xa = {
401
+ noOutlet: "No outlet selected",
402
+ employeeNotFound: "Could not find this employee",
403
+ keepOneLocation: "An employee must keep at least 1 location, otherwise they are deleted. To delete them, use the Employee page.",
404
+ loadFailed: "Could not load the schedule"
405
+ };
406
+ let Oe = null;
407
+ function wo(e) {
408
+ Oe = e;
409
+ }
410
+ function A(e) {
411
+ return Oe ? Oe(`scheduling.store.${e}`) : xa[e];
412
+ }
413
+ let Z = null, q = null, Q = null, oe = 0, De = null;
414
+ function ze(e) {
415
+ return e === m.value ? !1 : ($a(), m.value = e, r.value = null, Z = null, q = null, ve.value = null, De = null, ge.value = !1, le.value = [], V.value = [], Q = null, oe += 1, J.value += 1, !0);
416
+ }
417
+ async function Ie(e) {
418
+ if (!(!e || De === e)) {
419
+ We.value = !0;
420
+ try {
421
+ await Ya(e);
422
+ } finally {
423
+ We.value = !1;
424
+ }
425
+ }
426
+ }
427
+ async function Ya(e) {
428
+ const a = await Ce.readEmployeesPage({
429
+ limit: ne,
430
+ offset: 0,
431
+ restaurantIds: [e]
432
+ });
433
+ e === m.value && (le.value = a.items, V.value = await w.listEmployeeConfigs(e), De = e, J.value += 1, Ka().then((t) => {
434
+ e === m.value && (na.value = t, J.value += 1);
435
+ }));
436
+ }
437
+ async function Fa(e) {
438
+ const a = m.value;
439
+ if (!a || !e.length) return;
440
+ const t = await w.saveEmployeeConfigs(a, { configs: e });
441
+ V.value = t, J.value += 1;
442
+ }
443
+ async function Ho(e) {
444
+ const a = m.value;
445
+ if (!a) throw new Error(A("noOutlet"));
446
+ const t = await w.saveSettings(a, e);
447
+ return m.value === a && r.value && (r.value = { ...r.value, settings: t }), t;
448
+ }
449
+ function sa() {
450
+ !ge.value && r.value && r.value.demands.length > 0 && r.value.assignments.length > 0 && (ge.value = !0);
451
+ }
452
+ async function _a(e, a) {
453
+ const t = V.value.find((o) => o.employeeId === e), n = (t == null ? void 0 : t.displayOrder) ?? (a && V.value.some((o) => o.displayOrder !== null) ? Math.max(
454
+ 0,
455
+ ...V.value.filter(
456
+ (o) => o.displayOrder !== null
457
+ ).map((o) => o.displayOrder)
458
+ ) + 100 : null);
459
+ await Fa([{ employeeId: e, enabled: a, displayOrder: n }]);
460
+ }
461
+ async function Ao(e, a = j(/* @__PURE__ */ new Date())) {
462
+ const t = m.value;
463
+ if (!t) throw new Error(A("noOutlet"));
464
+ await w.deleteEmployeeFutureAssignments(t, e, a), r.value && (r.value = {
465
+ ...r.value,
466
+ assignments: r.value.assignments.filter(
467
+ (n) => n.employeeId !== e || n.date < a
468
+ )
469
+ });
470
+ }
471
+ async function Te() {
472
+ const e = m.value;
473
+ e && (De = null, await Ie(e));
474
+ }
475
+ async function Ua(e, a) {
476
+ const t = Ze(), n = (await X(!0)).find((s) => s._id === e);
477
+ if (!n) throw new Error(A("employeeNotFound"));
478
+ const o = n.restaurantRole.map((s) => ({
479
+ restaurantId: s.restaurantId,
480
+ roleId: s.roleId
481
+ })), i = a(o);
482
+ if (!i.length)
483
+ throw new Error(A("keepOneLocation"));
484
+ (n.isMasterUser ? "master" : "user") === "master" ? await t.updateMasterEmployee(e, {
485
+ user: { name: n.name, passcode: n.passcode, code: n.code ?? "" },
486
+ roles: i,
487
+ previousRoles: o
488
+ }) : await t.updateEmployee(e, {
489
+ user: { name: n.name, passcode: n.passcode },
490
+ roles: i,
491
+ previousRoles: o
492
+ }), await X(!0);
493
+ }
494
+ async function Eo(e, a, t = "", n = !0) {
495
+ const o = [...new Set(a.filter(Boolean))];
496
+ o.length && (await Ua(e, (i) => [
497
+ ...i.filter((u) => !o.includes(u.restaurantId)),
498
+ ...o.map((u) => ({ restaurantId: u, roleId: t }))
499
+ ]), n && m.value && o.includes(m.value) && await _a(e, !0), await Te());
500
+ }
501
+ async function bo(e, a, t) {
502
+ const n = Ze(), o = (t == null ? void 0 : t._id) === e ? t : (await X(!0)).find((p) => p._id === e);
503
+ if (!o) throw new Error(A("employeeNotFound"));
504
+ const i = (p) => p.slice().sort((H, $) => H.restaurantId.localeCompare($.restaurantId)).map((H) => `${H.restaurantId}:${H.roleId}`).join("|"), u = i(o.restaurantRole) !== i(a.roles), s = o.name !== a.name || o.passcode !== a.passcode || o.isMasterUser !== a.masterUser || a.masterUser && (o.code ?? "") !== a.masterCode;
505
+ if (!u && !s) return;
506
+ const d = o.restaurantRole.map((p) => ({
507
+ restaurantId: p.restaurantId,
508
+ roleId: p.roleId
509
+ })), D = o.isMasterUser ? (await Fe.readTeamMembers()).find((p) => p.doc.posUserId === e) : void 0;
510
+ if (D) {
511
+ const p = Ma(), H = p.getPermissionAssignmentByUserId(D.id) ?? await p.readPermissionAssignmentByUserId(D.id), $ = a.masterUser ? {
512
+ code: a.masterCode,
513
+ name: a.name,
514
+ passcode: a.passcode,
515
+ roles: a.roles
516
+ } : null;
517
+ await Fe.updateTeamMember(D.id, {
518
+ permissions: D.permissions,
519
+ customPermissions: (H == null ? void 0 : H.customPermissions) ?? D.permissions,
520
+ permissionSetIds: (H == null ? void 0 : H.permissionSetIds) ?? D.doc.permissionSetIds ?? [],
521
+ posUser: $
522
+ }), await X(!0), await Te();
523
+ return;
524
+ }
525
+ if (a.masterUser) {
526
+ const p = {
527
+ user: { name: a.name, passcode: a.passcode, code: a.masterCode },
528
+ roles: a.roles,
529
+ previousRoles: d
530
+ };
531
+ o.isMasterUser ? await n.updateMasterEmployee(e, p) : await n.migrateToMasterUser(e, p);
532
+ } else
533
+ o.isMasterUser ? await n.updateMasterEmployee(e, {
534
+ user: { name: o.name, passcode: o.passcode, code: o.code ?? "" },
535
+ roles: [],
536
+ previousRoles: d
537
+ }) : await n.updateEmployee(e, {
538
+ user: { name: a.name, passcode: a.passcode },
539
+ roles: a.roles,
540
+ previousRoles: d
541
+ });
542
+ await X(!0), await Te();
543
+ }
544
+ let te = null;
545
+ async function Wa() {
546
+ const e = await Ce.readEmployeesPage({
547
+ limit: ne,
548
+ offset: 0,
549
+ includeEmptyPasscode: !0
550
+ }), a = Math.min(Ia, Math.ceil(e.total / ne)), t = await Promise.all(
551
+ Array.from(
552
+ { length: Math.max(0, a - 1) },
553
+ (n, o) => Ce.readEmployeesPage({
554
+ limit: ne,
555
+ offset: (o + 1) * ne,
556
+ includeEmptyPasscode: !0
557
+ })
558
+ )
559
+ );
560
+ return [...e.items, ...t.flatMap((n) => n.items)];
561
+ }
562
+ function X(e = !1) {
563
+ if (!e) {
564
+ if (te) return te;
565
+ if (Pe.value.length) return Promise.resolve(Pe.value);
566
+ }
567
+ const a = Wa().then((t) => (Pe.value = t, t)).finally(() => {
568
+ te === a && (te = null);
569
+ });
570
+ return te = a, a;
571
+ }
572
+ async function Ka() {
573
+ const e = {};
574
+ try {
575
+ (await X()).forEach((a) => {
576
+ e[a._id] = [...new Set(a.restaurantRole.map((t) => t.restaurantId))];
577
+ });
578
+ } catch {
579
+ return e;
580
+ }
581
+ return e;
582
+ }
583
+ function Ve(e, a) {
584
+ return Z !== null && q !== null && Z <= e && q >= a;
585
+ }
586
+ async function za(e) {
587
+ const a = j(e), t = j(ie(e, 6));
588
+ Ve(a, t) || Q && (await Q, Ve(a, t)) || await ia(
589
+ ie(e, -7 * _e),
590
+ ie(e, 7 * _e)
591
+ );
592
+ }
593
+ async function Po() {
594
+ !Z || !q || await ia(/* @__PURE__ */ new Date(`${Z}T00:00:00`), /* @__PURE__ */ new Date(`${q}T00:00:00`));
595
+ }
596
+ async function So(e) {
597
+ if (!m.value) throw new Error(A("noOutlet"));
598
+ const a = await w.createEmployeeProfile(m.value, e);
599
+ r.value && (r.value.employees.push(a), J.value += 1);
600
+ }
601
+ async function ko(e) {
602
+ await w.validatePosAccess(e);
603
+ }
604
+ async function Co(e, a) {
605
+ if (!m.value) throw new Error(A("noOutlet"));
606
+ const t = await w.updateEmployeeProfile(m.value, e, a);
607
+ if (r.value) {
608
+ const n = r.value.employees.findIndex((o) => o.employeeId === e);
609
+ n > -1 && (r.value = {
610
+ ...r.value,
611
+ employees: r.value.employees.map((o, i) => i === n ? t : o)
612
+ });
613
+ }
614
+ }
615
+ async function Mo(e) {
616
+ const a = await w.createPosition(e);
617
+ r.value && (r.value = { ...r.value, positions: [...r.value.positions, a] });
618
+ }
619
+ async function No(e, a) {
620
+ const t = await w.updatePosition(e, a);
621
+ if (r.value) {
622
+ const n = r.value.positions.find((i) => i.id === e), o = (i) => i.positionId === e || !i.positionId && i.positionName === (n == null ? void 0 : n.name);
623
+ r.value = {
624
+ ...r.value,
625
+ positions: r.value.positions.map((i) => i.id === e ? t : i),
626
+ employees: r.value.employees.map((i) => ({
627
+ ...i,
628
+ primaryPosition: i.primaryPosition && o(i.primaryPosition) ? { ...i.primaryPosition, positionName: t.name } : i.primaryPosition,
629
+ secondaryPositions: i.secondaryPositions.map(
630
+ (u) => o(u) ? { ...u, positionName: t.name } : u
631
+ )
632
+ }))
633
+ };
634
+ }
635
+ }
636
+ async function Lo(e) {
637
+ await w.deletePosition(e), r.value && (r.value = {
638
+ ...r.value,
639
+ positions: r.value.positions.filter((a) => a.id !== e)
640
+ });
641
+ }
642
+ async function Oo(e, a) {
643
+ var o;
644
+ if (!m.value) throw new Error(A("noOutlet"));
645
+ const t = (o = r.value) == null ? void 0 : o.days.find((i) => i.date === e), n = await w.saveScheduleDay(m.value, e, {
646
+ ...a,
647
+ expectedUpdatedAt: a.expectedUpdatedAt ?? (t == null ? void 0 : t.updatedAt)
648
+ });
649
+ if (r.value) {
650
+ const i = r.value.days.filter((u) => u.date !== e);
651
+ n && i.push(n), r.value = { ...r.value, days: i };
652
+ }
653
+ }
654
+ function Va(e) {
655
+ const a = e.periods.flatMap((t) => {
656
+ const n = (t.roles ?? []).filter((u) => u.positionName && u.headcount > 0), o = n.reduce((u, s) => u + s.headcount, 0), i = {
657
+ startTime: t.startTime,
658
+ endTime: t.endTime
659
+ };
660
+ return [
661
+ ...n.map((u) => ({
662
+ ...i,
663
+ headcount: u.headcount,
664
+ position: { positionId: u.positionId, positionName: u.positionName }
665
+ })),
666
+ ...t.headcount > o ? [{ ...i, headcount: t.headcount - o }] : []
667
+ ];
668
+ });
669
+ return {
670
+ date: e.date,
671
+ demands: a
672
+ };
673
+ }
674
+ async function Io(e) {
675
+ if (!m.value) throw new Error(A("noOutlet"));
676
+ if (!e.length) return;
677
+ const a = e.map(Va), t = e.length === 1 ? await w.replaceDemands(m.value, a[0]) : await w.bulkReplaceDemands(m.value, { replacements: a });
678
+ if (r.value) {
679
+ const n = new Set(e.map((i) => i.date)), o = r.value.demands.filter((i) => i.date === null || !n.has(i.date));
680
+ r.value = { ...r.value, demands: [...o, ...t] };
681
+ }
682
+ sa();
683
+ }
684
+ async function To(e) {
685
+ if (!m.value) throw new Error(A("noOutlet"));
686
+ return w.generateAutoSchedule(m.value, e);
687
+ }
688
+ async function Ro() {
689
+ if (!m.value) throw new Error(A("noOutlet"));
690
+ return w.getAutoScheduleCapabilities(m.value);
691
+ }
692
+ async function $o(e) {
693
+ if (!m.value) throw new Error(A("noOutlet"));
694
+ return w.applyAutoSchedule(m.value, e);
695
+ }
696
+ async function Bo(e) {
697
+ if (!m.value) throw new Error(A("noOutlet"));
698
+ const a = await w.bulkSaveAssignments(m.value, e);
699
+ if (r.value) {
700
+ const t = new Set(e.deleteIds), n = new Map(
701
+ r.value.assignments.filter((o) => !t.has(o.id)).map((o) => [o.id, o])
702
+ );
703
+ a.updated.forEach((o) => n.set(o.id, o)), a.created.forEach((o) => n.set(o.id, o)), r.value = { ...r.value, assignments: [...n.values()] };
704
+ }
705
+ return sa(), a;
706
+ }
707
+ async function xo(e) {
708
+ if (!m.value) throw new Error(A("noOutlet"));
709
+ return w.copySchedule(m.value, e);
710
+ }
711
+ async function Yo(e) {
712
+ var t;
713
+ if (!m.value) throw new Error(A("noOutlet"));
714
+ const a = await w.clearSchedule(m.value, e);
715
+ if (r.value) {
716
+ const n = new Set(
717
+ (((t = e.demand) == null ? void 0 : t.replacements) ?? []).map((u) => u.date)
718
+ ), o = new Set(a.deletedAssignmentIds), i = a.demand;
719
+ r.value = {
720
+ ...r.value,
721
+ demands: [
722
+ ...r.value.demands.filter((u) => u.date === null || !n.has(u.date)),
723
+ ...i
724
+ ],
725
+ assignments: r.value.assignments.filter((u) => !o.has(u.id))
726
+ };
727
+ }
728
+ return a;
729
+ }
730
+ async function Fo(e) {
731
+ if (!m.value) throw new Error(A("noOutlet"));
732
+ if (e.length && (await w.deleteAssignments(m.value, e), r.value)) {
733
+ const a = new Set(e);
734
+ r.value = {
735
+ ...r.value,
736
+ assignments: r.value.assignments.filter((t) => !a.has(t.id))
737
+ };
738
+ }
739
+ }
740
+ async function _o(e) {
741
+ if (!m.value) throw new Error(A("noOutlet"));
742
+ const a = await w.createTimeOff(m.value, e);
743
+ return r.value && (r.value = { ...r.value, timeOff: [...r.value.timeOff, a] }), a;
744
+ }
745
+ async function Uo(e, a) {
746
+ if (!m.value) throw new Error(A("noOutlet"));
747
+ const t = await w.updateTimeOffStatus(m.value, e, a);
748
+ return t && r.value && (r.value = {
749
+ ...r.value,
750
+ timeOff: r.value.timeOff.map((n) => n.id === e ? t : n)
751
+ }), t;
752
+ }
753
+ async function Wo(e) {
754
+ if (!m.value) throw new Error(A("noOutlet"));
755
+ await w.deleteTimeOff(m.value, e), r.value && (r.value = {
756
+ ...r.value,
757
+ timeOff: r.value.timeOff.filter((a) => a.id !== e)
758
+ });
759
+ }
760
+ async function Ko(e) {
761
+ if (!m.value) throw new Error(A("noOutlet"));
762
+ const a = await w.bulkUpdateAssignmentStatus(m.value, e);
763
+ if (r.value && a.length) {
764
+ const t = new Map(a.map((n) => [n.id, n]));
765
+ r.value = {
766
+ ...r.value,
767
+ assignments: r.value.assignments.map(
768
+ (n) => t.get(n.id) ?? n
769
+ )
770
+ };
771
+ }
772
+ return a;
773
+ }
774
+ async function ia(e, a) {
775
+ const t = m.value;
776
+ if (!t) {
777
+ ve.value = A("noOutlet");
778
+ return;
779
+ }
780
+ const n = j(e), o = j(a), i = ++oe;
781
+ Ue.value = !0, ve.value = null;
782
+ const u = (async () => {
783
+ try {
784
+ const s = await w.readBoard(t, n, o);
785
+ if (m.value !== t || i !== oe) return;
786
+ r.value = s, ge.value = s.settings.setupCompleted, Z = n, q = o, J.value += 1;
787
+ } catch (s) {
788
+ if (m.value !== t || i !== oe) return;
789
+ ve.value = s instanceof Error ? s.message : A("loadFailed");
790
+ } finally {
791
+ m.value === t && i === oe && (Ue.value = !1);
792
+ }
793
+ })();
794
+ Q = u;
795
+ try {
796
+ await u;
797
+ } finally {
798
+ Q === u && (Q = null);
799
+ }
800
+ }
801
+ const ja = "AE", Ga = "Asia/Dubai", Qa = {
802
+ NORMAL: {
803
+ overtime: 1.25
804
+ },
805
+ REST_DAY: {
806
+ regular: 1,
807
+ overtime: 2
808
+ },
809
+ PUBLIC_HOLIDAY: {
810
+ regular: 2.5,
811
+ overtime: 1.5
812
+ }
813
+ }, Xa = {
814
+ maxHoursPerMonth: null
815
+ }, Ja = {
816
+ fullTime: {
817
+ minHoursPerDay: null,
818
+ maxHoursPerDay: 8,
819
+ maxHoursPerWeek: 48
820
+ },
821
+ partTime: {
822
+ maxHoursPerWeek: 32
823
+ }
824
+ }, Za = [
825
+ {
826
+ month: 1,
827
+ day: 1,
828
+ name: "New Year's Day"
829
+ },
830
+ {
831
+ month: 12,
832
+ day: 2,
833
+ name: "UAE National Day"
834
+ },
835
+ {
836
+ month: 12,
837
+ day: 3,
838
+ name: "UAE National Day Holiday"
839
+ }
840
+ ], qa = {
841
+ 2026: {
842
+ "2026-01-01": "Gregorian New Year",
843
+ "2026-03-20": "Eid Al-Fitr Holiday",
844
+ "2026-03-21": "Eid Al-Fitr Holiday",
845
+ "2026-03-22": "Eid Al-Fitr Holiday",
846
+ "2026-05-26": "Arafat Day",
847
+ "2026-05-27": "Eid Al-Adha Holiday",
848
+ "2026-05-28": "Eid Al-Adha Holiday",
849
+ "2026-05-29": "Eid Al-Adha Holiday",
850
+ "2026-06-17": "Islamic New Year",
851
+ "2026-08-26": "Prophet Muhammad's Birthday",
852
+ "2026-12-02": "UAE National Day",
853
+ "2026-12-03": "UAE National Day Holiday"
854
+ },
855
+ 2027: {
856
+ "2027-01-01": "Gregorian New Year",
857
+ "2027-03-08": "Eid Al-Fitr Holiday",
858
+ "2027-03-09": "Eid Al-Fitr Holiday",
859
+ "2027-03-10": "Eid Al-Fitr Holiday",
860
+ "2027-03-11": "Eid Al-Fitr Holiday",
861
+ "2027-05-15": "Arafat Day",
862
+ "2027-05-16": "Eid Al-Adha Holiday",
863
+ "2027-05-17": "Eid Al-Adha Holiday",
864
+ "2027-05-18": "Eid Al-Adha Holiday",
865
+ "2027-06-06": "Islamic New Year",
866
+ "2027-08-14": "Prophet Muhammad's Birthday",
867
+ "2027-12-02": "UAE National Day",
868
+ "2027-12-03": "UAE National Day Holiday"
869
+ }
870
+ }, et = {
871
+ countryCode: ja,
872
+ timezone: Ga,
873
+ payRate: Qa,
874
+ overtime: Xa,
875
+ workingHours: Ja,
876
+ recurringPublicHolidays: Za,
877
+ publicHolidays: qa
878
+ }, at = "BN", tt = "Asia/Brunei", nt = {
879
+ NORMAL: {
880
+ overtime: 1.5
881
+ },
882
+ REST_DAY: {
883
+ regular: 1,
884
+ overtime: 2
885
+ },
886
+ PUBLIC_HOLIDAY: {
887
+ regular: 2,
888
+ overtime: 3
889
+ }
890
+ }, ot = {
891
+ maxHoursPerMonth: 72
892
+ }, st = {
893
+ fullTime: {
894
+ minHoursPerDay: null,
895
+ maxHoursPerDay: 8,
896
+ maxHoursPerWeek: 44
897
+ },
898
+ partTime: {
899
+ maxHoursPerWeek: 30
900
+ }
901
+ }, it = [
902
+ {
903
+ month: 1,
904
+ day: 1,
905
+ name: "New Year's Day"
906
+ },
907
+ {
908
+ month: 2,
909
+ day: 23,
910
+ name: "National Day"
911
+ },
912
+ {
913
+ month: 5,
914
+ day: 1,
915
+ name: "International Labour Day"
916
+ },
917
+ {
918
+ month: 7,
919
+ day: 15,
920
+ name: "Sultan's Birthday"
921
+ },
922
+ {
923
+ month: 12,
924
+ day: 25,
925
+ name: "Christmas Day"
926
+ }
927
+ ], rt = {
928
+ 2026: {
929
+ "2026-01-01": "New Year's Day",
930
+ "2026-02-17": "Chinese New Year",
931
+ "2026-02-23": "National Day",
932
+ "2026-03-07": "Nuzul Al-Quran",
933
+ "2026-03-20": "Hari Raya Aidilfitri",
934
+ "2026-03-21": "Hari Raya Aidilfitri Holiday",
935
+ "2026-03-22": "Hari Raya Aidilfitri Holiday",
936
+ "2026-05-01": "International Labour Day",
937
+ "2026-05-27": "Hari Raya Aidiladha",
938
+ "2026-06-17": "Islamic New Year",
939
+ "2026-07-15": "Sultan's Birthday",
940
+ "2026-08-25": "Prophet Muhammad's Birthday",
941
+ "2026-12-25": "Christmas Day"
942
+ },
943
+ 2027: {
944
+ "2027-01-01": "New Year's Day",
945
+ "2027-02-06": "Chinese New Year",
946
+ "2027-02-23": "National Day",
947
+ "2027-03-07": "Nuzul Al-Quran",
948
+ "2027-03-10": "Hari Raya Aidilfitri",
949
+ "2027-03-11": "Hari Raya Aidilfitri Holiday",
950
+ "2027-05-01": "International Labour Day",
951
+ "2027-05-17": "Hari Raya Aidiladha",
952
+ "2027-06-06": "Islamic New Year",
953
+ "2027-07-15": "Sultan's Birthday",
954
+ "2027-08-15": "Prophet Muhammad's Birthday",
955
+ "2027-12-25": "Christmas Day"
956
+ }
957
+ }, lt = {
958
+ countryCode: at,
959
+ timezone: tt,
960
+ payRate: nt,
961
+ overtime: ot,
962
+ workingHours: st,
963
+ recurringPublicHolidays: it,
964
+ publicHolidays: rt
965
+ }, ut = "ID", dt = "Asia/Jakarta", ct = {
966
+ NORMAL: {
967
+ overtime: 1.5
968
+ },
969
+ REST_DAY: {
970
+ regular: 1,
971
+ overtime: 2
972
+ },
973
+ PUBLIC_HOLIDAY: {
974
+ regular: 2,
975
+ overtime: 2
976
+ }
977
+ }, mt = {
978
+ maxHoursPerMonth: 72
979
+ }, yt = {
980
+ fullTime: {
981
+ minHoursPerDay: null,
982
+ maxHoursPerDay: 8,
983
+ maxHoursPerWeek: 40
984
+ },
985
+ partTime: {
986
+ maxHoursPerWeek: null
987
+ }
988
+ }, ft = [
989
+ {
990
+ month: 1,
991
+ day: 1,
992
+ name: "New Year's Day"
993
+ },
994
+ {
995
+ month: 5,
996
+ day: 1,
997
+ name: "International Labour Day"
998
+ },
999
+ {
1000
+ month: 8,
1001
+ day: 17,
1002
+ name: "Independence Day"
1003
+ },
1004
+ {
1005
+ month: 12,
1006
+ day: 25,
1007
+ name: "Christmas Day"
1008
+ }
1009
+ ], ht = {
1010
+ 2026: {
1011
+ "2026-01-01": "New Year's Day",
1012
+ "2026-01-16": "Isra Mi'raj",
1013
+ "2026-02-17": "Chinese New Year",
1014
+ "2026-03-19": "Nyepi",
1015
+ "2026-03-21": "Eid al-Fitr",
1016
+ "2026-03-22": "Eid al-Fitr Holiday",
1017
+ "2026-04-03": "Good Friday",
1018
+ "2026-04-05": "Easter Sunday",
1019
+ "2026-05-01": "International Labour Day",
1020
+ "2026-05-14": "Ascension Day",
1021
+ "2026-05-27": "Eid al-Adha",
1022
+ "2026-05-31": "Vesak Day",
1023
+ "2026-06-01": "Pancasila Day",
1024
+ "2026-06-16": "Islamic New Year",
1025
+ "2026-08-17": "Independence Day",
1026
+ "2026-08-25": "Prophet Muhammad's Birthday",
1027
+ "2026-12-25": "Christmas Day"
1028
+ },
1029
+ 2027: {
1030
+ "2027-01-01": "New Year's Day",
1031
+ "2027-01-05": "Isra Mi'raj",
1032
+ "2027-02-06": "Chinese New Year",
1033
+ "2027-03-08": "Nyepi",
1034
+ "2027-03-10": "Eid al-Fitr",
1035
+ "2027-03-11": "Eid al-Fitr Holiday",
1036
+ "2027-03-26": "Good Friday",
1037
+ "2027-03-28": "Easter Sunday",
1038
+ "2027-05-01": "International Labour Day",
1039
+ "2027-05-06": "Ascension Day",
1040
+ "2027-05-17": "Eid al-Adha",
1041
+ "2027-05-20": "Vesak Day",
1042
+ "2027-06-01": "Pancasila Day",
1043
+ "2027-06-06": "Islamic New Year",
1044
+ "2027-08-15": "Prophet Muhammad's Birthday",
1045
+ "2027-08-17": "Independence Day",
1046
+ "2027-12-25": "Christmas Day",
1047
+ "2027-12-26": "Isra Mi'raj"
1048
+ }
1049
+ }, pt = {
1050
+ countryCode: ut,
1051
+ timezone: dt,
1052
+ payRate: ct,
1053
+ overtime: mt,
1054
+ workingHours: yt,
1055
+ recurringPublicHolidays: ft,
1056
+ publicHolidays: ht
1057
+ }, vt = "MO", gt = "Asia/Macau", Dt = {
1058
+ NORMAL: {
1059
+ overtime: 1.5
1060
+ },
1061
+ REST_DAY: {
1062
+ regular: 1,
1063
+ overtime: 2
1064
+ },
1065
+ PUBLIC_HOLIDAY: {
1066
+ regular: 2,
1067
+ overtime: 3
1068
+ }
1069
+ }, wt = {
1070
+ maxHoursPerMonth: null
1071
+ }, Ht = {
1072
+ fullTime: {
1073
+ minHoursPerDay: null,
1074
+ maxHoursPerDay: 8,
1075
+ maxHoursPerWeek: 48
1076
+ },
1077
+ partTime: {
1078
+ maxHoursPerWeek: null
1079
+ }
1080
+ }, At = [
1081
+ {
1082
+ month: 1,
1083
+ day: 1,
1084
+ name: "New Year's Day"
1085
+ },
1086
+ {
1087
+ month: 5,
1088
+ day: 1,
1089
+ name: "Labour Day"
1090
+ },
1091
+ {
1092
+ month: 10,
1093
+ day: 1,
1094
+ name: "National Day"
1095
+ },
1096
+ {
1097
+ month: 12,
1098
+ day: 20,
1099
+ name: "Macao Special Administrative Region Establishment Day"
1100
+ },
1101
+ {
1102
+ month: 12,
1103
+ day: 25,
1104
+ name: "Christmas Day"
1105
+ }
1106
+ ], Et = {
1107
+ 2026: {
1108
+ "2026-01-01": "New Year's Day",
1109
+ "2026-02-17": "Lunar New Year's Day",
1110
+ "2026-02-18": "Second day of Lunar New Year",
1111
+ "2026-02-19": "Third day of Lunar New Year",
1112
+ "2026-04-03": "Good Friday",
1113
+ "2026-04-04": "Day before Easter",
1114
+ "2026-04-05": "Cheng Ming Festival",
1115
+ "2026-04-06": "Compensatory rest day",
1116
+ "2026-04-07": "Compensatory rest day",
1117
+ "2026-05-01": "Labour Day",
1118
+ "2026-05-24": "Buddha's Birthday",
1119
+ "2026-05-25": "Compensatory rest day",
1120
+ "2026-06-19": "Dragon Boat Festival",
1121
+ "2026-09-26": "Day following Mid-Autumn Festival",
1122
+ "2026-09-28": "Compensatory rest day",
1123
+ "2026-10-01": "National Day",
1124
+ "2026-10-02": "Day following National Day",
1125
+ "2026-10-18": "Chong Yeung Festival",
1126
+ "2026-10-19": "Compensatory rest day",
1127
+ "2026-11-02": "All Souls' Day",
1128
+ "2026-12-08": "Immaculate Conception",
1129
+ "2026-12-20": "Macao SAR Establishment Day",
1130
+ "2026-12-21": "Compensatory rest day",
1131
+ "2026-12-22": "Winter Solstice",
1132
+ "2026-12-24": "Christmas Eve",
1133
+ "2026-12-25": "Christmas Day"
1134
+ },
1135
+ 2027: {
1136
+ "2027-01-01": "New Year's Day",
1137
+ "2027-02-06": "Lunar New Year's Day",
1138
+ "2027-02-07": "Second day of Lunar New Year",
1139
+ "2027-02-08": "Third day of Lunar New Year",
1140
+ "2027-02-09": "Compensatory rest day",
1141
+ "2027-02-10": "Compensatory rest day",
1142
+ "2027-03-26": "Good Friday",
1143
+ "2027-03-27": "Day before Easter",
1144
+ "2027-03-29": "Compensatory rest day",
1145
+ "2027-04-05": "Cheng Ming Festival",
1146
+ "2027-05-01": "Labour Day",
1147
+ "2027-05-03": "Compensatory rest day",
1148
+ "2027-05-13": "Buddha's Birthday",
1149
+ "2027-06-09": "Dragon Boat Festival",
1150
+ "2027-09-16": "Day following Mid-Autumn Festival",
1151
+ "2027-10-01": "National Day",
1152
+ "2027-10-02": "Day following National Day",
1153
+ "2027-10-04": "Compensatory rest day",
1154
+ "2027-10-08": "Chong Yeung Festival",
1155
+ "2027-11-02": "All Souls' Day",
1156
+ "2027-12-08": "Immaculate Conception",
1157
+ "2027-12-20": "Macao SAR Establishment Day",
1158
+ "2027-12-22": "Winter Solstice",
1159
+ "2027-12-24": "Christmas Eve",
1160
+ "2027-12-25": "Christmas Day",
1161
+ "2027-12-27": "Compensatory rest day"
1162
+ }
1163
+ }, bt = {
1164
+ countryCode: vt,
1165
+ timezone: gt,
1166
+ payRate: Dt,
1167
+ overtime: wt,
1168
+ workingHours: Ht,
1169
+ recurringPublicHolidays: At,
1170
+ publicHolidays: Et
1171
+ }, Pt = "MV", St = "Indian/Maldives", kt = {
1172
+ NORMAL: {
1173
+ overtime: 1.5
1174
+ },
1175
+ REST_DAY: {
1176
+ regular: 1,
1177
+ overtime: 2
1178
+ },
1179
+ PUBLIC_HOLIDAY: {
1180
+ regular: 2,
1181
+ overtime: 3
1182
+ }
1183
+ }, Ct = {
1184
+ maxHoursPerMonth: null
1185
+ }, Mt = {
1186
+ fullTime: {
1187
+ minHoursPerDay: null,
1188
+ maxHoursPerDay: 8,
1189
+ maxHoursPerWeek: 48
1190
+ },
1191
+ partTime: {
1192
+ maxHoursPerWeek: null
1193
+ }
1194
+ }, Nt = [
1195
+ {
1196
+ month: 1,
1197
+ day: 1,
1198
+ name: "New Year's Day"
1199
+ },
1200
+ {
1201
+ month: 5,
1202
+ day: 1,
1203
+ name: "Labour Day"
1204
+ },
1205
+ {
1206
+ month: 7,
1207
+ day: 26,
1208
+ name: "Independence Day"
1209
+ },
1210
+ {
1211
+ month: 11,
1212
+ day: 3,
1213
+ name: "Victory Day"
1214
+ },
1215
+ {
1216
+ month: 11,
1217
+ day: 11,
1218
+ name: "Republic Day"
1219
+ }
1220
+ ], Lt = {
1221
+ 2026: {
1222
+ "2026-01-01": "New Year's Day",
1223
+ "2026-03-20": "Eid al-Fitr Holiday",
1224
+ "2026-03-21": "Eid al-Fitr Holiday",
1225
+ "2026-03-22": "Eid al-Fitr Holiday",
1226
+ "2026-05-01": "Labour Day",
1227
+ "2026-05-26": "Arafah Day",
1228
+ "2026-05-27": "Eid al-Adha Holiday",
1229
+ "2026-05-28": "Eid al-Adha Holiday",
1230
+ "2026-05-29": "Eid al-Adha Holiday",
1231
+ "2026-06-17": "Islamic New Year",
1232
+ "2026-07-26": "Independence Day",
1233
+ "2026-07-27": "Independence Day Holiday",
1234
+ "2026-08-14": "National Day",
1235
+ "2026-08-25": "Prophet Muhammad's Birthday",
1236
+ "2026-09-13": "The Day Maldives Embraced Islam",
1237
+ "2026-11-03": "Victory Day",
1238
+ "2026-11-11": "Republic Day"
1239
+ },
1240
+ 2027: {
1241
+ "2027-01-01": "New Year's Day",
1242
+ "2027-03-10": "Eid al-Fitr Holiday",
1243
+ "2027-03-11": "Eid al-Fitr Holiday",
1244
+ "2027-05-01": "Labour Day",
1245
+ "2027-05-15": "Arafah Day",
1246
+ "2027-05-16": "Eid al-Adha Holiday",
1247
+ "2027-05-17": "Eid al-Adha Holiday",
1248
+ "2027-05-18": "Eid al-Adha Holiday",
1249
+ "2027-06-06": "Islamic New Year",
1250
+ "2027-07-26": "Independence Day",
1251
+ "2027-07-27": "Independence Day Holiday",
1252
+ "2027-08-14": "National Day",
1253
+ "2027-08-15": "Prophet Muhammad's Birthday",
1254
+ "2027-09-03": "The Day Maldives Embraced Islam",
1255
+ "2027-11-03": "Victory Day",
1256
+ "2027-11-11": "Republic Day"
1257
+ }
1258
+ }, Ot = {
1259
+ countryCode: Pt,
1260
+ timezone: St,
1261
+ payRate: kt,
1262
+ overtime: Ct,
1263
+ workingHours: Mt,
1264
+ recurringPublicHolidays: Nt,
1265
+ publicHolidays: Lt
1266
+ }, It = "MY", Tt = "Asia/Kuala_Lumpur", Rt = {
1267
+ NORMAL: {
1268
+ overtime: 1.5
1269
+ },
1270
+ REST_DAY: {
1271
+ regular: 1,
1272
+ overtime: 2
1273
+ },
1274
+ PUBLIC_HOLIDAY: {
1275
+ regular: 2,
1276
+ overtime: 3
1277
+ }
1278
+ }, $t = {
1279
+ maxHoursPerMonth: 104
1280
+ }, Bt = {
1281
+ fullTime: {
1282
+ minHoursPerDay: null,
1283
+ maxHoursPerDay: 8,
1284
+ maxHoursPerWeek: 45
1285
+ },
1286
+ partTime: {
1287
+ maxHoursPerWeek: 31.5
1288
+ }
1289
+ }, xt = [
1290
+ {
1291
+ month: 1,
1292
+ day: 1,
1293
+ name: "New Year's Day"
1294
+ },
1295
+ {
1296
+ month: 5,
1297
+ day: 1,
1298
+ name: "Labour Day"
1299
+ },
1300
+ {
1301
+ month: 8,
1302
+ day: 31,
1303
+ name: "Merdeka Day"
1304
+ },
1305
+ {
1306
+ month: 9,
1307
+ day: 16,
1308
+ name: "Malaysia Day"
1309
+ },
1310
+ {
1311
+ month: 12,
1312
+ day: 25,
1313
+ name: "Christmas Day"
1314
+ }
1315
+ ], Yt = {
1316
+ 2026: {
1317
+ "2026-01-01": "New Year's Day",
1318
+ "2026-02-17": "Chinese New Year",
1319
+ "2026-02-18": "Chinese New Year Holiday",
1320
+ "2026-03-07": "Nuzul Al-Quran",
1321
+ "2026-03-20": "Hari Raya Aidilfitri",
1322
+ "2026-03-21": "Hari Raya Aidilfitri Holiday",
1323
+ "2026-03-22": "Hari Raya Aidilfitri Holiday",
1324
+ "2026-03-23": "Hari Raya Aidilfitri Holiday",
1325
+ "2026-05-01": "Labour Day",
1326
+ "2026-05-27": "Hari Raya Haji",
1327
+ "2026-05-31": "Wesak Day",
1328
+ "2026-06-01": "Agong's Birthday",
1329
+ "2026-06-17": "Awal Muharram",
1330
+ "2026-08-25": "Prophet Muhammad's Birthday",
1331
+ "2026-08-31": "Merdeka Day",
1332
+ "2026-09-16": "Malaysia Day",
1333
+ "2026-11-08": "Deepavali",
1334
+ "2026-12-25": "Christmas Day"
1335
+ },
1336
+ 2027: {
1337
+ "2027-01-01": "New Year's Day",
1338
+ "2027-02-06": "Chinese New Year",
1339
+ "2027-02-07": "Chinese New Year Holiday",
1340
+ "2027-03-10": "Hari Raya Aidilfitri",
1341
+ "2027-03-11": "Hari Raya Aidilfitri Holiday",
1342
+ "2027-05-01": "Labour Day",
1343
+ "2027-05-17": "Hari Raya Haji",
1344
+ "2027-05-20": "Wesak Day",
1345
+ "2027-06-01": "Agong's Birthday",
1346
+ "2027-06-06": "Awal Muharram",
1347
+ "2027-08-15": "Prophet Muhammad's Birthday",
1348
+ "2027-08-31": "Merdeka Day",
1349
+ "2027-09-16": "Malaysia Day",
1350
+ "2027-10-28": "Deepavali",
1351
+ "2027-12-25": "Christmas Day"
1352
+ }
1353
+ }, Ft = {
1354
+ countryCode: It,
1355
+ timezone: Tt,
1356
+ payRate: Rt,
1357
+ overtime: $t,
1358
+ workingHours: Bt,
1359
+ recurringPublicHolidays: xt,
1360
+ publicHolidays: Yt
1361
+ }, _t = "PK", Ut = "Asia/Karachi", Wt = {
1362
+ NORMAL: {
1363
+ overtime: 1.5
1364
+ },
1365
+ REST_DAY: {
1366
+ regular: 1,
1367
+ overtime: 2
1368
+ },
1369
+ PUBLIC_HOLIDAY: {
1370
+ regular: 2,
1371
+ overtime: 3
1372
+ }
1373
+ }, Kt = {
1374
+ maxHoursPerMonth: null
1375
+ }, zt = {
1376
+ fullTime: {
1377
+ minHoursPerDay: null,
1378
+ maxHoursPerDay: 9,
1379
+ maxHoursPerWeek: 48
1380
+ },
1381
+ partTime: {
1382
+ maxHoursPerWeek: null
1383
+ }
1384
+ }, Vt = [
1385
+ {
1386
+ month: 1,
1387
+ day: 1,
1388
+ name: "New Year's Day"
1389
+ },
1390
+ {
1391
+ month: 2,
1392
+ day: 5,
1393
+ name: "Kashmir Day"
1394
+ },
1395
+ {
1396
+ month: 3,
1397
+ day: 23,
1398
+ name: "Pakistan Day"
1399
+ },
1400
+ {
1401
+ month: 5,
1402
+ day: 1,
1403
+ name: "Labour Day"
1404
+ },
1405
+ {
1406
+ month: 8,
1407
+ day: 14,
1408
+ name: "Independence Day"
1409
+ },
1410
+ {
1411
+ month: 12,
1412
+ day: 25,
1413
+ name: "Quaid-e-Azam Day and Christmas Day"
1414
+ }
1415
+ ], jt = {
1416
+ 2026: {
1417
+ "2026-01-01": "New Year's Day",
1418
+ "2026-02-05": "Kashmir Day",
1419
+ "2026-03-23": "Pakistan Day",
1420
+ "2026-05-01": "Labour Day",
1421
+ "2026-06-27": "Eid al-Adha",
1422
+ "2026-06-28": "Eid al-Adha Holiday",
1423
+ "2026-06-29": "Eid al-Adha Holiday",
1424
+ "2026-08-14": "Independence Day",
1425
+ "2026-08-25": "Eid Milad-un-Nabi",
1426
+ "2026-12-25": "Quaid-e-Azam Day and Christmas Day"
1427
+ },
1428
+ 2027: {
1429
+ "2027-01-01": "New Year's Day",
1430
+ "2027-02-05": "Kashmir Day",
1431
+ "2027-03-23": "Pakistan Day",
1432
+ "2027-05-01": "Labour Day",
1433
+ "2027-05-17": "Eid al-Adha",
1434
+ "2027-05-18": "Eid al-Adha Holiday",
1435
+ "2027-05-19": "Eid al-Adha Holiday",
1436
+ "2027-08-14": "Independence Day",
1437
+ "2027-08-15": "Eid Milad-un-Nabi",
1438
+ "2027-12-25": "Quaid-e-Azam Day and Christmas Day"
1439
+ }
1440
+ }, Gt = {
1441
+ countryCode: _t,
1442
+ timezone: Ut,
1443
+ payRate: Wt,
1444
+ overtime: Kt,
1445
+ workingHours: zt,
1446
+ recurringPublicHolidays: Vt,
1447
+ publicHolidays: jt
1448
+ }, Qt = "SG", Xt = "Asia/Singapore", Jt = {
1449
+ NORMAL: {
1450
+ overtime: 1.5
1451
+ },
1452
+ REST_DAY: {
1453
+ regular: 1,
1454
+ overtime: 2
1455
+ },
1456
+ PUBLIC_HOLIDAY: {
1457
+ regular: 2,
1458
+ overtime: 1.5
1459
+ }
1460
+ }, Zt = {
1461
+ maxHoursPerMonth: 72
1462
+ }, qt = {
1463
+ fullTime: {
1464
+ minHoursPerDay: null,
1465
+ maxHoursPerDay: 12,
1466
+ maxHoursPerWeek: 44
1467
+ },
1468
+ partTime: {
1469
+ maxHoursPerWeek: 35
1470
+ }
1471
+ }, en = [
1472
+ {
1473
+ month: 1,
1474
+ day: 1,
1475
+ name: "New Year's Day"
1476
+ },
1477
+ {
1478
+ month: 5,
1479
+ day: 1,
1480
+ name: "Labour Day"
1481
+ },
1482
+ {
1483
+ month: 8,
1484
+ day: 9,
1485
+ name: "National Day"
1486
+ },
1487
+ {
1488
+ month: 12,
1489
+ day: 25,
1490
+ name: "Christmas Day"
1491
+ }
1492
+ ], an = {
1493
+ 2026: {
1494
+ "2026-01-01": "New Year's Day",
1495
+ "2026-02-17": "Chinese New Year's Day",
1496
+ "2026-02-18": "Chinese New Year's Holiday",
1497
+ "2026-03-21": "Hari Raya Puasa",
1498
+ "2026-04-03": "Good Friday",
1499
+ "2026-05-01": "Labour Day",
1500
+ "2026-05-27": "Hari Raya Haji",
1501
+ "2026-05-31": "Vesak Day",
1502
+ "2026-06-01": "Vesak Day Holiday",
1503
+ "2026-08-09": "National Day",
1504
+ "2026-08-10": "National Day Holiday",
1505
+ "2026-11-08": "Deepavali",
1506
+ "2026-11-09": "Deepavali Holiday",
1507
+ "2026-12-25": "Christmas Day"
1508
+ },
1509
+ 2027: {
1510
+ "2027-01-01": "New Year's Day",
1511
+ "2027-02-06": "Chinese New Year's Day",
1512
+ "2027-02-07": "Chinese New Year's Holiday",
1513
+ "2027-02-08": "Chinese New Year Holiday",
1514
+ "2027-03-10": "Hari Raya Puasa",
1515
+ "2027-03-26": "Good Friday",
1516
+ "2027-05-01": "Labour Day",
1517
+ "2027-05-17": "Hari Raya Haji",
1518
+ "2027-05-20": "Vesak Day",
1519
+ "2027-08-09": "National Day",
1520
+ "2027-10-28": "Deepavali",
1521
+ "2027-12-25": "Christmas Day"
1522
+ }
1523
+ }, tn = {
1524
+ countryCode: Qt,
1525
+ timezone: Xt,
1526
+ payRate: Jt,
1527
+ overtime: Zt,
1528
+ workingHours: qt,
1529
+ recurringPublicHolidays: en,
1530
+ publicHolidays: an
1531
+ }, nn = "TH", on = "Asia/Bangkok", sn = {
1532
+ NORMAL: {
1533
+ overtime: 1.5
1534
+ },
1535
+ REST_DAY: {
1536
+ regular: 1,
1537
+ overtime: 2
1538
+ },
1539
+ PUBLIC_HOLIDAY: {
1540
+ regular: 2,
1541
+ overtime: 3
1542
+ }
1543
+ }, rn = {
1544
+ maxHoursPerMonth: 36
1545
+ }, ln = {
1546
+ fullTime: {
1547
+ minHoursPerDay: null,
1548
+ maxHoursPerDay: 8,
1549
+ maxHoursPerWeek: 48
1550
+ },
1551
+ partTime: {
1552
+ maxHoursPerWeek: null
1553
+ }
1554
+ }, un = [
1555
+ {
1556
+ month: 1,
1557
+ day: 1,
1558
+ name: "New Year's Day"
1559
+ },
1560
+ {
1561
+ month: 4,
1562
+ day: 6,
1563
+ name: "Chakri Memorial Day"
1564
+ },
1565
+ {
1566
+ month: 4,
1567
+ day: 13,
1568
+ name: "Songkran Festival"
1569
+ },
1570
+ {
1571
+ month: 4,
1572
+ day: 14,
1573
+ name: "Songkran Festival"
1574
+ },
1575
+ {
1576
+ month: 4,
1577
+ day: 15,
1578
+ name: "Songkran Festival"
1579
+ },
1580
+ {
1581
+ month: 5,
1582
+ day: 1,
1583
+ name: "National Labour Day"
1584
+ },
1585
+ {
1586
+ month: 5,
1587
+ day: 4,
1588
+ name: "Coronation Day"
1589
+ },
1590
+ {
1591
+ month: 6,
1592
+ day: 3,
1593
+ name: "Queen Suthida's Birthday"
1594
+ },
1595
+ {
1596
+ month: 7,
1597
+ day: 28,
1598
+ name: "King Vajiralongkorn's Birthday"
1599
+ },
1600
+ {
1601
+ month: 8,
1602
+ day: 12,
1603
+ name: "Queen Mother's Birthday and Mother's Day"
1604
+ },
1605
+ {
1606
+ month: 10,
1607
+ day: 13,
1608
+ name: "King Bhumibol Memorial Day"
1609
+ },
1610
+ {
1611
+ month: 10,
1612
+ day: 23,
1613
+ name: "King Chulalongkorn Memorial Day"
1614
+ },
1615
+ {
1616
+ month: 12,
1617
+ day: 5,
1618
+ name: "King Bhumibol's Birthday, National Day and Father's Day"
1619
+ },
1620
+ {
1621
+ month: 12,
1622
+ day: 10,
1623
+ name: "Constitution Day"
1624
+ },
1625
+ {
1626
+ month: 12,
1627
+ day: 31,
1628
+ name: "New Year's Eve"
1629
+ }
1630
+ ], dn = {
1631
+ 2026: {
1632
+ "2026-01-01": "New Year's Day",
1633
+ "2026-03-03": "Makha Bucha Day",
1634
+ "2026-04-06": "Chakri Memorial Day",
1635
+ "2026-04-13": "Songkran Festival",
1636
+ "2026-04-14": "Songkran Festival",
1637
+ "2026-04-15": "Songkran Festival",
1638
+ "2026-05-01": "National Labour Day",
1639
+ "2026-05-04": "Coronation Day",
1640
+ "2026-05-13": "Royal Ploughing Ceremony",
1641
+ "2026-05-31": "Visakha Bucha Day",
1642
+ "2026-06-01": "Substitution for Visakha Bucha Day",
1643
+ "2026-06-03": "Queen Suthida's Birthday",
1644
+ "2026-07-28": "King Vajiralongkorn's Birthday",
1645
+ "2026-07-29": "Asarnha Bucha Day",
1646
+ "2026-07-30": "Buddhist Lent Day",
1647
+ "2026-08-12": "Queen Mother's Birthday and Mother's Day",
1648
+ "2026-10-13": "King Bhumibol Memorial Day",
1649
+ "2026-10-23": "King Chulalongkorn Memorial Day",
1650
+ "2026-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
1651
+ "2026-12-07": "Substitution for National Day and Father's Day",
1652
+ "2026-12-10": "Constitution Day",
1653
+ "2026-12-31": "New Year's Eve"
1654
+ },
1655
+ 2027: {
1656
+ "2027-01-01": "New Year's Day",
1657
+ "2027-02-21": "Makha Bucha Day",
1658
+ "2027-02-22": "Substitution for Makha Bucha Day",
1659
+ "2027-04-06": "Chakri Memorial Day",
1660
+ "2027-04-13": "Songkran Festival",
1661
+ "2027-04-14": "Songkran Festival",
1662
+ "2027-04-15": "Songkran Festival",
1663
+ "2027-05-01": "National Labour Day",
1664
+ "2027-05-03": "Substitution for National Labour Day",
1665
+ "2027-05-04": "Coronation Day",
1666
+ "2027-05-20": "Visakha Bucha Day",
1667
+ "2027-06-03": "Queen Suthida's Birthday",
1668
+ "2027-07-18": "Asarnha Bucha Day",
1669
+ "2027-07-19": "Buddhist Lent Day",
1670
+ "2027-07-20": "Substitution for Asarnha Bucha Day",
1671
+ "2027-07-28": "King Vajiralongkorn's Birthday",
1672
+ "2027-08-12": "Queen Mother's Birthday and Mother's Day",
1673
+ "2027-10-13": "King Bhumibol Memorial Day",
1674
+ "2027-10-23": "King Chulalongkorn Memorial Day",
1675
+ "2027-10-25": "Substitution for King Chulalongkorn Memorial Day",
1676
+ "2027-12-05": "King Bhumibol's Birthday, National Day and Father's Day",
1677
+ "2027-12-06": "Substitution for National Day and Father's Day",
1678
+ "2027-12-10": "Constitution Day",
1679
+ "2027-12-31": "New Year's Eve"
1680
+ }
1681
+ }, cn = {
1682
+ th: {
1683
+ "New Year's Day": "วันขึ้นปีใหม่",
1684
+ "Makha Bucha Day": "วันมาฆบูชา",
1685
+ "Substitution for Makha Bucha Day": "วันหยุดชดเชยวันมาฆบูชา",
1686
+ "Chakri Memorial Day": "วันจักรี",
1687
+ "Songkran Festival": "วันสงกรานต์",
1688
+ "National Labour Day": "วันแรงงานแห่งชาติ",
1689
+ "Substitution for National Labour Day": "วันหยุดชดเชยวันแรงงานแห่งชาติ",
1690
+ "Coronation Day": "วันฉัตรมงคล",
1691
+ "Royal Ploughing Ceremony": "วันพืชมงคล",
1692
+ "Visakha Bucha Day": "วันวิสาขบูชา",
1693
+ "Substitution for Visakha Bucha Day": "วันหยุดชดเชยวันวิสาขบูชา",
1694
+ "Queen Suthida's Birthday": "วันเฉลิมพระชนมพรรษาสมเด็จพระราชินี",
1695
+ "Asarnha Bucha Day": "วันอาสาฬหบูชา",
1696
+ "Substitution for Asarnha Bucha Day": "วันหยุดชดเชยวันอาสาฬหบูชา",
1697
+ "Buddhist Lent Day": "วันเข้าพรรษา",
1698
+ "King Vajiralongkorn's Birthday": "วันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระเจ้าอยู่หัว",
1699
+ "Queen Mother's Birthday and Mother's Day": "วันเฉลิมพระชนมพรรษาพระพันปีหลวง และวันแม่แห่งชาติ",
1700
+ "King Bhumibol Memorial Day": "วันนวมินทรมหาราช",
1701
+ "King Chulalongkorn Memorial Day": "วันปิยมหาราช",
1702
+ "Substitution for King Chulalongkorn Memorial Day": "วันหยุดชดเชยวันปิยมหาราช",
1703
+ "King Bhumibol's Birthday, National Day and Father's Day": "วันชาติ และวันพ่อแห่งชาติ",
1704
+ "Substitution for National Day and Father's Day": "วันหยุดชดเชยวันชาติ และวันพ่อแห่งชาติ",
1705
+ "Constitution Day": "วันรัฐธรรมนูญ",
1706
+ "New Year's Eve": "วันสิ้นปี"
1707
+ }
1708
+ }, mn = {
1709
+ countryCode: nn,
1710
+ timezone: on,
1711
+ payRate: sn,
1712
+ overtime: rn,
1713
+ workingHours: ln,
1714
+ recurringPublicHolidays: un,
1715
+ publicHolidays: dn,
1716
+ holidayNames: cn
1717
+ }, yn = "VN", fn = "Asia/Ho_Chi_Minh", hn = {
1718
+ NORMAL: {
1719
+ overtime: 1.5
1720
+ },
1721
+ REST_DAY: {
1722
+ regular: 1,
1723
+ overtime: 2
1724
+ },
1725
+ PUBLIC_HOLIDAY: {
1726
+ regular: 2,
1727
+ overtime: 3
1728
+ }
1729
+ }, pn = {
1730
+ maxHoursPerMonth: 40
1731
+ }, vn = {
1732
+ fullTime: {
1733
+ minHoursPerDay: null,
1734
+ maxHoursPerDay: 8,
1735
+ maxHoursPerWeek: 48
1736
+ },
1737
+ partTime: {
1738
+ maxHoursPerWeek: null
1739
+ }
1740
+ }, gn = [
1741
+ {
1742
+ month: 1,
1743
+ day: 1,
1744
+ name: "New Year's Day"
1745
+ },
1746
+ {
1747
+ month: 4,
1748
+ day: 30,
1749
+ name: "Reunification Day"
1750
+ },
1751
+ {
1752
+ month: 5,
1753
+ day: 1,
1754
+ name: "International Labour Day"
1755
+ },
1756
+ {
1757
+ month: 9,
1758
+ day: 2,
1759
+ name: "National Day"
1760
+ }
1761
+ ], Dn = {
1762
+ 2026: {
1763
+ "2026-01-01": "New Year's Day",
1764
+ "2026-02-16": "Tet Holiday",
1765
+ "2026-02-17": "Tet Holiday",
1766
+ "2026-02-18": "Tet Holiday",
1767
+ "2026-02-19": "Tet Holiday",
1768
+ "2026-02-20": "Tet Holiday",
1769
+ "2026-04-26": "Hung Kings Commemoration Day",
1770
+ "2026-04-27": "Hung Kings Holiday",
1771
+ "2026-04-30": "Reunification Day",
1772
+ "2026-05-01": "International Labour Day",
1773
+ "2026-09-02": "National Day",
1774
+ "2026-09-03": "National Day Holiday"
1775
+ },
1776
+ 2027: {
1777
+ "2027-01-01": "New Year's Day",
1778
+ "2027-02-05": "Tet Holiday",
1779
+ "2027-02-06": "Tet Holiday",
1780
+ "2027-02-07": "Tet Holiday",
1781
+ "2027-02-08": "Tet Holiday",
1782
+ "2027-02-09": "Tet Holiday",
1783
+ "2027-04-16": "Hung Kings Commemoration Day",
1784
+ "2027-04-30": "Reunification Day",
1785
+ "2027-05-01": "International Labour Day",
1786
+ "2027-09-02": "National Day",
1787
+ "2027-09-03": "National Day Holiday"
1788
+ }
1789
+ }, wn = {
1790
+ countryCode: yn,
1791
+ timezone: fn,
1792
+ payRate: hn,
1793
+ overtime: pn,
1794
+ workingHours: vn,
1795
+ recurringPublicHolidays: gn,
1796
+ publicHolidays: Dn
1797
+ }, je = { AE: et, BN: lt, ID: pt, MO: bt, MV: Ot, MY: Ft, PK: Gt, SG: tn, TH: mn, VN: wn };
1798
+ function Hn(e) {
1799
+ if (typeof e == "string") return e.toUpperCase();
1800
+ if (e && typeof e == "object" && "code" in e) {
1801
+ const a = e.code;
1802
+ if (typeof a == "string") return a.toUpperCase();
1803
+ }
1804
+ return "MY";
1805
+ }
1806
+ function An(e) {
1807
+ return je[Hn(e)] ?? je.MY;
1808
+ }
1809
+ function zo(e, a, t) {
1810
+ var o, i;
1811
+ const n = En(e, a);
1812
+ return !n || !t ? n : ((i = (o = e.holidayNames) == null ? void 0 : o[t.slice(0, 2).toLowerCase()]) == null ? void 0 : i[n]) ?? n;
1813
+ }
1814
+ function En(e, a) {
1815
+ var i, u;
1816
+ const t = (i = e.publicHolidays[a.slice(0, 4)]) == null ? void 0 : i[a];
1817
+ if (t) return t;
1818
+ const n = Number(a.slice(5, 7)), o = Number(a.slice(8, 10));
1819
+ return ((u = e.recurringPublicHolidays.find((s) => s.month === n && s.day === o)) == null ? void 0 : u.name) ?? null;
1820
+ }
1821
+ const bn = Je(), ra = "unassigned", Vo = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], jo = "All Stations", Go = [{ id: ra, label: "Assigned", roles: [], system: !0 }], Ge = [
1822
+ "#903E1F",
1823
+ "#5F090A",
1824
+ "#0A5384",
1825
+ "#1F5F3E",
1826
+ "#5B2C6F",
1827
+ "#7D5A00",
1828
+ "#0F5C5C",
1829
+ "#6E2142"
1830
+ ];
1831
+ function Pn(e) {
1832
+ var t;
1833
+ const a = e.trim().toLocaleLowerCase();
1834
+ return (t = W.find((n) => n.name.toLocaleLowerCase() === a)) == null ? void 0 : t.id;
1835
+ }
1836
+ function Qo(e, a) {
1837
+ if (e)
1838
+ return { positionId: a ?? Pn(e), positionName: e };
1839
+ }
1840
+ function re(e, a = W) {
1841
+ var t;
1842
+ if (e)
1843
+ return (e.positionId && ((t = a.find((n) => n.id === e.positionId)) == null ? void 0 : t.name)) ?? e.positionName;
1844
+ }
1845
+ function Xo(e, a = W) {
1846
+ var t, n;
1847
+ if (e)
1848
+ return e.positionId ? (t = a.find((o) => o.id === e.positionId)) == null ? void 0 : t.name : (n = a.find((o) => o.name.toLocaleLowerCase() === e.positionName.toLocaleLowerCase())) == null ? void 0 : n.name;
1849
+ }
1850
+ function Jo(e, a) {
1851
+ return a ? !W.some((t) => t.id === a) : !!e && !W.some((t) => t.name.toLocaleLowerCase() === e.toLocaleLowerCase());
1852
+ }
1853
+ const Zo = [1, 1, 1, 1, 1, 1, 1];
1854
+ function ue(e) {
1855
+ return (e + 6) % 7;
1856
+ }
1857
+ function qo(e) {
1858
+ return (e + 1) % 7;
1859
+ }
1860
+ function he(e, a) {
1861
+ e.splice(0, e.length, ...a);
1862
+ }
1863
+ function Sn(e, a) {
1864
+ return qe(e, a) / 60;
1865
+ }
1866
+ function kn(e) {
1867
+ var t;
1868
+ const a = e.trim().split(/\s+/).filter(Boolean);
1869
+ return a.length ? (a[0][0] + (((t = a[1]) == null ? void 0 : t[0]) ?? "")).toUpperCase() : "??";
1870
+ }
1871
+ const la = /* @__PURE__ */ new Map(), Se = /* @__PURE__ */ new Map();
1872
+ function es(e) {
1873
+ return la.get(e);
1874
+ }
1875
+ function Cn(e) {
1876
+ const a = Se.get(e);
1877
+ if (a !== void 0) return a;
1878
+ const t = aa + Se.size + 1;
1879
+ return Se.set(e, t), la.set(t, e), t;
1880
+ }
1881
+ function as(e) {
1882
+ return e.sourceId || String(e.id);
1883
+ }
1884
+ function Mn(e) {
1885
+ Ra.name = (e == null ? void 0 : e.outlet.name) ?? "", he(Ta, (e == null ? void 0 : e.positions.map((s) => s.name)) ?? []), he(W, (e == null ? void 0 : e.positions) ?? []);
1886
+ const a = (e == null ? void 0 : e.restaurantProfile.operatingHours) ?? [], t = Array.from({ length: 7 }, () => []);
1887
+ for (const s of a) t[ue(s.dayOfWeek)] = s.closed ? [] : s.hours;
1888
+ he(N.dayHours, t);
1889
+ const n = a.filter((s) => !s.closed).flatMap((s) => s.hours);
1890
+ N.openFrom = n.length ? n.map((s) => s.start).reduce((s, d) => d < s ? d : s) : "00:00", N.openTo = n.length ? n.map((s) => s.end).reduce((s, d) => d > s ? d : s) : "24:00", he(
1891
+ N.closedWeekdays,
1892
+ a.filter((s) => s.closed).map((s) => ue(s.dayOfWeek)).sort((s, d) => s - d)
1893
+ );
1894
+ const o = An(bn.currentCountry.value), i = (e == null ? void 0 : e.settings.settingsConfigured) === !0, u = i ? e.settings.payRate : o.payRate;
1895
+ N.otCapHours = i ? e.settings.overtime.maxHoursPerMonth : o.overtime.maxHoursPerMonth, N.workingHours = i ? e.settings.workingHours : {
1896
+ minHoursPerDay: null,
1897
+ maxHoursPerDay: o.workingHours.fullTime.maxHoursPerDay,
1898
+ maxHoursPerWeek: o.workingHours.fullTime.maxHoursPerWeek
1899
+ }, N.payRate.NORMAL.overtime = u.NORMAL.overtime, N.payRate.REST_DAY.regular = u.REST_DAY.regular, N.payRate.REST_DAY.overtime = u.REST_DAY.overtime, N.payRate.PUBLIC_HOLIDAY.regular = u.PUBLIC_HOLIDAY.regular, N.payRate.PUBLIC_HOLIDAY.overtime = u.PUBLIC_HOLIDAY.overtime;
1900
+ }
1901
+ Be(r, Mn, { immediate: !0 });
1902
+ function we(e) {
1903
+ var a, t, n;
1904
+ return {
1905
+ minHoursPerDay: ((a = e.workingHours) == null ? void 0 : a.minHoursPerDay) ?? N.workingHours.minHoursPerDay,
1906
+ maxHoursPerDay: ((t = e.workingHours) == null ? void 0 : t.maxHoursPerDay) ?? N.workingHours.maxHoursPerDay,
1907
+ maxHoursPerWeek: ((n = e.workingHours) == null ? void 0 : n.maxHoursPerWeek) ?? N.workingHours.maxHoursPerWeek
1908
+ };
1909
+ }
1910
+ function Nn(e) {
1911
+ return e.reduce(
1912
+ (a, t) => {
1913
+ const n = we(t).maxHoursPerWeek;
1914
+ return t.employmentType === "FULLTIME" && n != null ? Math.max(a, n) : a;
1915
+ },
1916
+ 0
1917
+ );
1918
+ }
1919
+ function Ln(e, a) {
1920
+ if (e.wage.type === "HOURLY") return e.wage.amount;
1921
+ const t = we(e).maxHoursPerWeek ?? a;
1922
+ return t ? e.wage.amount / (t * (52 / 12)) : 0;
1923
+ }
1924
+ function On(e, a) {
1925
+ if (e.employmentType === "FULLTIME") return 100;
1926
+ const t = we(e).maxHoursPerWeek;
1927
+ return !a || t == null ? 0 : Math.min(99, Math.round(t / a * 100));
1928
+ }
1929
+ function In(e) {
1930
+ var a;
1931
+ return {
1932
+ start: e.startTime,
1933
+ end: e.endTime,
1934
+ // A missing position means this assignment was genuinely saved as "Any position" — it must
1935
+ // stay blank rather than falling back to the employee's own primary position, or a reload
1936
+ // silently reassigns every "Any position" shift to whatever station the employee is normally
1937
+ // pinned to.
1938
+ role: re(e.position) ?? "",
1939
+ positionId: ((a = e.position) == null ? void 0 : a.positionId) || void 0,
1940
+ // Mongo distinguishes a draft from a published/confirmed assignment; the board's third
1941
+ // state ('ot') is a costing outcome, never something stored.
1942
+ status: e.status === "DRAFT" ? "pending" : "confirmed",
1943
+ breakMins: ea(e.breaks),
1944
+ breaks: e.breaks,
1945
+ // Carried through so an edit updates this same ScheduleShiftAssignments document instead of
1946
+ // creating a duplicate — see useScheduleBoard's commitShift/persistSlot.
1947
+ assignmentId: e.id,
1948
+ updatedAt: e.updatedAt
1949
+ };
1950
+ }
1951
+ function Tn(e) {
1952
+ return e.type === "OFF_DAY" ? "Off day" : e.leaveType === "MEDICAL" ? "Medical Leave" : e.leaveType === "EMERGENCY" ? "Emergency Leave" : e.leaveType === "UNPAID" ? "Unpaid Leave" : "Annual Leave";
1953
+ }
1954
+ function Rn(e, a) {
1955
+ if (a < e.startDate || a > e.endDate) return null;
1956
+ const n = e.startDate === e.endDate || a === e.startDate ? e.startPart : a === e.endDate ? e.endPart : "FULL_DAY";
1957
+ return {
1958
+ requestId: e.id,
1959
+ type: e.type,
1960
+ leaveType: e.leaveType ?? void 0,
1961
+ timeOff: e.status === "PENDING" ? "pending" : "approved",
1962
+ reason: Tn(e),
1963
+ half: n !== "FULL_DAY",
1964
+ halfPart: n === "FULL_DAY" ? void 0 : n
1965
+ };
1966
+ }
1967
+ function $n(e) {
1968
+ return {
1969
+ employeeId: e._id,
1970
+ name: e.name,
1971
+ employmentType: "FULLTIME",
1972
+ wage: { type: "HOURLY", amount: 0 },
1973
+ primaryPosition: null,
1974
+ secondaryPositions: [],
1975
+ availability: []
1976
+ };
1977
+ }
1978
+ function Bn(e) {
1979
+ const a = se[m.value];
1980
+ return !a || !e.includes(a) ? e : [a, ...e.filter((t) => t !== a)];
1981
+ }
1982
+ function xn(e) {
1983
+ var n;
1984
+ const t = (na.value[e] ?? ((n = le.value.find((o) => o._id === e)) == null ? void 0 : n.restaurantRole.map((o) => o.restaurantId)) ?? []).map((o) => se[o]).filter((o) => !!o);
1985
+ return t.length ? Bn([...new Set(t)]) : void 0;
1986
+ }
1987
+ function ts(e = []) {
1988
+ const a = r.value;
1989
+ if (!a) return [];
1990
+ const t = new Map(a.employees.map((s) => [s.employeeId, s])), n = new Map(
1991
+ V.value.map((s) => [s.employeeId, s])
1992
+ ), o = le.value.filter((s) => {
1993
+ var d;
1994
+ return ((d = n.get(s._id)) == null ? void 0 : d.enabled) !== !1;
1995
+ }).map((s) => t.get(s._id) ?? $n(s)), i = Nn(o), u = /* @__PURE__ */ new Map();
1996
+ for (const s of a.assignments) {
1997
+ const d = `${s.employeeId}|${s.date}`, D = u.get(d);
1998
+ D ? D.push(s) : u.set(d, [s]);
1999
+ }
2000
+ return o.map((s) => {
2001
+ const d = le.value.find((v) => v._id === s.employeeId) ?? {
2002
+ name: s.name,
2003
+ code: void 0,
2004
+ passcode: "",
2005
+ isMasterUser: !1
2006
+ }, D = we(s), p = Cn(s.employeeId), H = new Set(W.map((v) => v.id)), $ = new Set(W.map((v) => v.name.toLocaleLowerCase())), F = (v) => v.positionId ? H.has(v.positionId) : $.has(v.positionName.toLocaleLowerCase()), B = re(s.primaryPosition), f = !!s.primaryPosition && F(s.primaryPosition), b = s.secondaryPositions.filter(F).map((v) => re(v)).filter((v) => !!v), _ = B ? f ? [B, ...b] : [] : b, I = [
2007
+ ...B && !f ? [B] : [],
2008
+ ...s.secondaryPositions.filter((v) => !F(v)).map((v) => re(v)).filter((v) => !!v)
2009
+ ], de = _[0] ?? "", K = e.map((v) => {
2010
+ const k = j(v);
2011
+ return (a.timeOff ?? []).filter((E) => E.employeeId === s.employeeId).map((E) => Rn(E, k)).find((E) => E !== null) ?? null;
2012
+ }), L = e.map((v) => {
2013
+ const k = j(v), P = (u.get(`${s.employeeId}|${k}`) ?? []).filter((U) => U.startTime && U.endTime).map((U) => In(U)).sort((U, ye) => U.start.localeCompare(ye.start));
2014
+ return P.length ? P.length === 1 ? P[0] : P : null;
2015
+ }), ee = s.availability.length > 0, ce = Array.from(
2016
+ { length: 7 },
2017
+ (v, k) => ee ? s.availability.some((E) => ue(E.dayOfWeek) === k) : !0
2018
+ ), me = Array.from({ length: 7 }, (v, k) => {
2019
+ const E = s.availability.find((P) => ue(P.dayOfWeek) === k);
2020
+ return { from: (E == null ? void 0 : E.start) ?? "", to: (E == null ? void 0 : E.end) ?? "" };
2021
+ });
2022
+ return {
2023
+ id: p,
2024
+ sourceId: s.employeeId,
2025
+ // Employee page edits update the POS employee name. Use that as the display
2026
+ // source so Scheduling reflects those changes after its roster refresh.
2027
+ name: d.name,
2028
+ // POS access belongs to the POS roster, not the scheduling profile. Keep these
2029
+ // fields on the board employee so the edit form can initialise its access section
2030
+ // from the employee's existing POS account.
2031
+ passcode: d.passcode || void 0,
2032
+ code: d.code,
2033
+ masterUser: d.isMasterUser,
2034
+ employmentType: s.employmentType,
2035
+ role: de,
2036
+ initials: kn(d.name),
2037
+ color: Ge[(p - aa - 1) % Ge.length],
2038
+ // Gross hours actually rostered this week — the figure the cost rail multiplies by
2039
+ // the rate. Contracted hours are a separate question, answered by RULES.contract.
2040
+ // Rounded to one decimal — `hoursBetween` divides by 60, so an unrounded sum reads
2041
+ // as a long, meaningless float (e.g. 31.983333333333334) everywhere this is shown
2042
+ // verbatim, matching the rounding `employeeLoadOf`'s own hours figure already uses.
2043
+ weekHours: Math.round(
2044
+ L.reduce(
2045
+ (v, k) => v + (Array.isArray(k) ? k : k && "start" in k ? [k] : []).reduce(
2046
+ (E, P) => E + Sn(P.start, P.end),
2047
+ 0
2048
+ ),
2049
+ 0
2050
+ ) * 10
2051
+ ) / 10,
2052
+ pct: On(s, i),
2053
+ contractHours: D.maxHoursPerWeek ?? void 0,
2054
+ minHoursPerDay: D.minHoursPerDay ?? void 0,
2055
+ // Keep the persisted override shape here. Consumers that need the effective value use
2056
+ // effectiveWorkingHours(), so an inherited null remains distinguishable from an override.
2057
+ workingHours: s.workingHours,
2058
+ // Every outlet the POS says this person works at, not just this one — the Add / Edit form
2059
+ // shows them, and saving keeps them.
2060
+ locations: xn(s.employeeId),
2061
+ rate: Ln(s, i),
2062
+ positions: _,
2063
+ archivedPositions: I.length ? I : void 0,
2064
+ shifts: L,
2065
+ timeOff: K,
2066
+ // Remarks live in their own collection in the older scheduling design and are not
2067
+ // part of this board's payload yet.
2068
+ remarks: [],
2069
+ section: ra,
2070
+ payBasis: s.wage.type === "HOURLY" ? "hourly" : "monthly",
2071
+ payAmount: s.wage.amount,
2072
+ availDays: ce,
2073
+ availHours: me
2074
+ };
2075
+ });
2076
+ }
2077
+ function ns() {
2078
+ return [];
2079
+ }
2080
+ function os() {
2081
+ var n, o;
2082
+ const e = r.value, a = {}, t = {};
2083
+ for (const i of (e == null ? void 0 : e.demands) ?? []) {
2084
+ const u = i.date ? a[n = i.date] ?? (a[n] = []) : i.dayOfWeek !== null ? t[o = ue(i.dayOfWeek)] ?? (t[o] = []) : null;
2085
+ if (!u) continue;
2086
+ let s = u.find((d) => d.from === i.startTime && d.to === i.endTime);
2087
+ s || (s = { from: i.startTime, to: i.endTime, n: 0, roles: [] }, u.push(s)), s.n += i.headcount, i.position && s.roles.push({
2088
+ position: re(i.position) ?? "",
2089
+ positionId: i.position.positionId || void 0,
2090
+ n: i.headcount
2091
+ });
2092
+ }
2093
+ return { byDate: a, byWeekday: t };
2094
+ }
2095
+ function ss() {
2096
+ const e = Je(), { restaurants: a, readRestaurants: t } = Ca(), n = Pa(), o = Sa(), i = S(!1);
2097
+ let u = () => !0;
2098
+ const s = Y(
2099
+ () => a.value.filter((f) => f.managable).map((f) => ({ value: f._id, label: f.profile.name })).sort((f, b) => f.label.localeCompare(b.label))
2100
+ ), d = () => {
2101
+ var f;
2102
+ return `hrm-schedule-outlet:${((f = e.currentBusiness.value) == null ? void 0 : f._id) ?? ""}`;
2103
+ }, D = Y(() => {
2104
+ var f;
2105
+ return ((f = e.currentRestaurant.value) == null ? void 0 : f._id) ?? "";
2106
+ });
2107
+ async function p(f, b) {
2108
+ return f !== m.value && !await u(f) || !ze(f) ? !1 : (localStorage.setItem(d(), f), n.query.restaurantId !== f && o.replace({ query: { ...n.query, restaurantId: f } }), await Promise.all([Ie(f), za(b)]), !0);
2109
+ }
2110
+ function H(f) {
2111
+ u = f;
2112
+ }
2113
+ const $ = (f) => !!f && s.value.some((b) => b.value === f);
2114
+ async function F() {
2115
+ var _;
2116
+ await t(), Ke.splice(0, Ke.length, ...s.value.map((I) => I.label)), Object.keys(se).forEach((I) => delete se[I]), a.value.forEach((I) => se[I._id] = I.profile.name);
2117
+ const f = localStorage.getItem(d()) ?? "", b = [m.value, f, D.value].find($) ?? ((_ = s.value[0]) == null ? void 0 : _.value) ?? "";
2118
+ return b && ze(b), i.value = !0, b;
2119
+ }
2120
+ async function B() {
2121
+ const f = await F();
2122
+ return f && await Ie(f), f;
2123
+ }
2124
+ return { options: s, ready: i, outletId: m, resolve: B, resolveOutlet: F, switchTo: p, setBeforeSwitch: H };
2125
+ }
2126
+ const Yn = ["data-hierarchy", "data-size", "data-icon"], is = /* @__PURE__ */ xe({
2127
+ __name: "ScheduleButton",
2128
+ props: {
2129
+ hierarchy: { default: "primary" },
2130
+ size: { default: "sm" },
2131
+ iconOnly: { type: Boolean, default: !1 }
2132
+ },
2133
+ setup(e) {
2134
+ return (a, t) => (C(), M("button", {
2135
+ type: "button",
2136
+ class: "sch-button",
2137
+ "data-hierarchy": e.hierarchy,
2138
+ "data-size": e.size,
2139
+ "data-icon": e.iconOnly ? "only" : void 0
2140
+ }, [
2141
+ Xe(a.$slots, "default")
2142
+ ], 8, Yn));
2143
+ }
2144
+ }), Fn = ["disabled", "aria-expanded"], _n = { class: "fx-btn-label" }, Un = { class: "sch" }, Wn = ["aria-multiselectable"], Kn = {
2145
+ key: 0,
2146
+ class: "fx-pop-head"
2147
+ }, zn = {
2148
+ key: 1,
2149
+ class: "fx-pop-search"
2150
+ }, Vn = ["placeholder", "aria-label"], jn = {
2151
+ key: 2,
2152
+ class: "fx-opt is-off"
2153
+ }, Gn = {
2154
+ key: 0,
2155
+ class: "fx-grp"
2156
+ }, Qn = ["aria-selected", "onClick"], Xn = {
2157
+ key: 0,
2158
+ class: "fx-opt-text"
2159
+ }, Jn = { key: 0 }, rs = /* @__PURE__ */ xe({
2160
+ inheritAttrs: !1,
2161
+ __name: "ScheduleSelect",
2162
+ props: {
2163
+ modelValue: {},
2164
+ options: {},
2165
+ multiple: { type: Boolean },
2166
+ selected: {},
2167
+ selectedId: {},
2168
+ placeholder: {},
2169
+ selectedLabel: {},
2170
+ disabled: { type: Boolean },
2171
+ menuTitle: {},
2172
+ searchable: { type: Boolean },
2173
+ teleport: { type: Boolean, default: !0 }
2174
+ },
2175
+ emits: ["update:modelValue", "toggle"],
2176
+ setup(e, { emit: a }) {
2177
+ const { t } = ka(), n = e, o = a, i = ha(), u = Y(() => i.class ?? ""), s = S(!1), d = S(!1), D = S(null), p = S(null), H = S(null), $ = Y(() => n.teleport !== !1 && d.value);
2178
+ Re(() => {
2179
+ d.value = typeof document < "u" && !!document.body;
2180
+ });
2181
+ const F = Y(() => {
2182
+ var l, y;
2183
+ if (n.selectedLabel != null) return n.selectedLabel;
2184
+ if (n.multiple) {
2185
+ const c = ((l = n.selected) == null ? void 0 : l.length) ?? 0;
2186
+ return c ? t("scheduling.filter.selectedCount", { count: c }) : n.placeholder ?? "";
2187
+ }
2188
+ return ((y = n.options.find((c) => c.value === n.modelValue)) == null ? void 0 : y.label) ?? n.placeholder ?? "";
2189
+ });
2190
+ function B(l) {
2191
+ var y;
2192
+ return n.multiple ? !!((y = n.selected) != null && y.includes(l.value)) : n.selectedId != null ? l.id === n.selectedId : l.value === n.modelValue;
2193
+ }
2194
+ const f = Y(() => !!n.menuTitle || n.options.some((l) => l.hint)), b = S(""), _ = S(null), I = Y(() => {
2195
+ const l = b.value.trim().toLowerCase();
2196
+ return !n.searchable || !l ? n.options : n.options.filter((y) => `${y.label} ${y.hint ?? ""}`.toLowerCase().includes(l));
2197
+ }), de = Y(() => {
2198
+ const l = [];
2199
+ let y;
2200
+ for (const c of I.value)
2201
+ c.group !== y && (y = c.group, y && l.push({ heading: y })), l.push({ option: c });
2202
+ return l;
2203
+ }), K = 5, L = 8;
2204
+ function ee() {
2205
+ const l = H.value, y = p.value;
2206
+ if (!l || !y) return;
2207
+ const c = y.getBoundingClientRect(), O = window.innerWidth || document.documentElement.clientWidth, R = window.innerHeight || document.documentElement.clientHeight;
2208
+ l.style.minWidth = `${Math.round(c.width)}px`, l.style.maxWidth = `${Math.max(180, Math.round(O - L * 2))}px`;
2209
+ const ae = R - c.bottom - K - L, ma = c.top - K - L;
2210
+ l.style.maxHeight = `${Math.max(120, Math.min(320, Math.max(ae, ma)))}px`;
2211
+ const fe = l.offsetHeight, ya = l.offsetWidth;
2212
+ let He = c.bottom + K;
2213
+ He + fe > R - L && (He = c.top - K - fe >= L ? c.top - K - fe : Math.max(L, R - fe - L));
2214
+ const fa = Math.min(Math.max(L, c.left), Math.max(L, O - ya - L));
2215
+ l.style.top = `${Math.round(He)}px`, l.style.left = `${Math.round(fa)}px`, l.style.visibility = "visible";
2216
+ }
2217
+ function ce(l) {
2218
+ var c, O;
2219
+ const y = l.target;
2220
+ y && ((c = D.value) != null && c.contains(y) || (O = H.value) != null && O.contains(y)) || P();
2221
+ }
2222
+ function me(l) {
2223
+ const y = H.value, c = l.target;
2224
+ if (y && c && c !== document && y.contains(c)) return;
2225
+ const O = p.value;
2226
+ if (!O) return;
2227
+ const R = O.getBoundingClientRect(), ae = window.innerHeight || document.documentElement.clientHeight;
2228
+ if (R.bottom < 0 || R.top > ae) {
2229
+ P();
2230
+ return;
2231
+ }
2232
+ ee();
2233
+ }
2234
+ function v() {
2235
+ document.addEventListener("click", ce), document.addEventListener("scroll", me, !0), window.addEventListener("resize", P);
2236
+ }
2237
+ function k() {
2238
+ document.removeEventListener("click", ce), document.removeEventListener("scroll", me, !0), window.removeEventListener("resize", P);
2239
+ }
2240
+ async function E() {
2241
+ var l, y, c;
2242
+ n.disabled || s.value || (b.value = "", s.value = !0, await ke(), ee(), (l = _.value) == null || l.focus(), (c = (y = H.value) == null ? void 0 : y.querySelector(".fx-opt.is-on")) == null || c.scrollIntoView({ block: "nearest" }), v());
2243
+ }
2244
+ function P() {
2245
+ s.value && (s.value = !1, b.value = "", k());
2246
+ }
2247
+ Be(b, async () => {
2248
+ s.value && (await ke(), ee());
2249
+ });
2250
+ function U(l) {
2251
+ var y;
2252
+ if (l.key === "Escape")
2253
+ l.preventDefault(), P(), (y = p.value) == null || y.focus();
2254
+ else if (l.key === "Enter") {
2255
+ l.preventDefault();
2256
+ const c = I.value.find((O) => !O.disabled);
2257
+ c && Ye(c);
2258
+ }
2259
+ }
2260
+ function ye() {
2261
+ s.value ? P() : E();
2262
+ }
2263
+ function Ye(l) {
2264
+ if (!l.disabled) {
2265
+ if (n.multiple && !l.command) {
2266
+ o("toggle", l.value);
2267
+ return;
2268
+ }
2269
+ if (P(), n.multiple) {
2270
+ o("update:modelValue", l.value);
2271
+ return;
2272
+ }
2273
+ l.value !== n.modelValue && o("update:modelValue", l.value);
2274
+ }
2275
+ }
2276
+ const ua = Y(() => n.options.filter((l) => !l.disabled));
2277
+ function da(l) {
2278
+ const y = ua.value;
2279
+ if (n.multiple || !y.length) {
2280
+ E();
2281
+ return;
2282
+ }
2283
+ const c = y.findIndex((ae) => ae.value === n.modelValue), O = l === "Home" ? 0 : l === "End" ? y.length - 1 : l === "ArrowDown" ? Math.min(y.length - 1, (c < 0 ? -1 : c) + 1) : Math.max(0, (c < 0 ? 1 : c) - 1), R = y[O];
2284
+ R && R.value !== n.modelValue ? o("update:modelValue", R.value) : E();
2285
+ }
2286
+ function ca(l) {
2287
+ var y;
2288
+ if (l.key === "Escape") {
2289
+ if (!s.value) return;
2290
+ l.preventDefault(), P(), (y = p.value) == null || y.focus();
2291
+ return;
2292
+ }
2293
+ if (l.key === "Enter" || l.key === " ") {
2294
+ l.preventDefault(), ye();
2295
+ return;
2296
+ }
2297
+ l.key !== "ArrowDown" && l.key !== "ArrowUp" && l.key !== "Home" && l.key !== "End" || (l.preventDefault(), da(l.key));
2298
+ }
2299
+ return $e(k), (l, y) => (C(), M("div", {
2300
+ ref_key: "rootEl",
2301
+ ref: D,
2302
+ class: pe(["fx-sel", u.value])
2303
+ }, [
2304
+ x("button", va({
2305
+ ref_key: "btnEl",
2306
+ ref: p
2307
+ }, l.$attrs, {
2308
+ type: "button",
2309
+ class: ["sch-input fx-btn", { "is-open": s.value }],
2310
+ disabled: e.disabled,
2311
+ "aria-haspopup": "listbox",
2312
+ "aria-expanded": s.value,
2313
+ onClick: y[0] || (y[0] = (c) => ye()),
2314
+ onKeydown: ca
2315
+ }), [
2316
+ x("span", _n, z(F.value), 1)
2317
+ ], 16, Fn),
2318
+ (C(), pa(ga, {
2319
+ to: "body",
2320
+ disabled: !$.value
2321
+ }, [
2322
+ x("div", Un, [
2323
+ s.value ? (C(), M("div", {
2324
+ key: 0,
2325
+ ref_key: "popEl",
2326
+ ref: H,
2327
+ class: pe(["fx-pop", { "fx-pop-rich": f.value }]),
2328
+ role: "listbox",
2329
+ "aria-multiselectable": e.multiple || void 0,
2330
+ style: { visibility: "hidden" }
2331
+ }, [
2332
+ e.menuTitle ? (C(), M("div", Kn, z(e.menuTitle), 1)) : G("", !0),
2333
+ e.searchable ? (C(), M("div", zn, [
2334
+ Da(x("input", {
2335
+ ref_key: "searchEl",
2336
+ ref: _,
2337
+ "onUpdate:modelValue": y[1] || (y[1] = (c) => b.value = c),
2338
+ class: "sch-input fx-pop-q",
2339
+ type: "search",
2340
+ placeholder: Ee(t)("scheduling.filter.search"),
2341
+ autocomplete: "off",
2342
+ spellcheck: "false",
2343
+ "aria-label": Ee(t)("scheduling.filter.search"),
2344
+ onKeydown: U
2345
+ }, null, 40, Vn), [
2346
+ [wa, b.value]
2347
+ ])
2348
+ ])) : G("", !0),
2349
+ e.searchable && !de.value.length ? (C(), M("div", jn, z(Ee(t)("scheduling.filter.noMatches")), 1)) : G("", !0),
2350
+ (C(!0), M(be, null, Ha(de.value, (c) => (C(), M(be, {
2351
+ key: "heading" in c ? `heading:${c.heading}` : `option:${c.option.value}`
2352
+ }, [
2353
+ "heading" in c ? (C(), M("div", Gn, z(c.heading), 1)) : (C(), M("div", {
2354
+ key: 1,
2355
+ class: pe(["fx-opt", {
2356
+ "is-on": B(c.option),
2357
+ "is-off": c.option.disabled,
2358
+ "is-new": c.option.command
2359
+ }]),
2360
+ role: "option",
2361
+ "aria-selected": B(c.option),
2362
+ onClick: (O) => Ye(c.option)
2363
+ }, [
2364
+ y[2] || (y[2] = x("span", {
2365
+ class: "fx-tick",
2366
+ "aria-hidden": "true"
2367
+ }, [
2368
+ x("svg", {
2369
+ width: "11",
2370
+ height: "11",
2371
+ viewBox: "0 0 16 16",
2372
+ fill: "none"
2373
+ }, [
2374
+ x("path", {
2375
+ d: "m3.5 8.4 3 3 6-7",
2376
+ stroke: "currentColor",
2377
+ "stroke-width": "2.2",
2378
+ "stroke-linecap": "round",
2379
+ "stroke-linejoin": "round"
2380
+ })
2381
+ ])
2382
+ ], -1)),
2383
+ f.value ? (C(), M("span", Xn, [
2384
+ x("b", null, z(c.option.label), 1),
2385
+ c.option.hint ? (C(), M("small", Jn, z(c.option.hint), 1)) : G("", !0)
2386
+ ])) : (C(), M(be, { key: 1 }, [
2387
+ Aa(z(c.option.label), 1)
2388
+ ], 64))
2389
+ ], 10, Qn))
2390
+ ], 64))), 128))
2391
+ ], 10, Wn)) : G("", !0)
2392
+ ])
2393
+ ], 8, ["disabled"]))
2394
+ ], 2));
2395
+ }
2396
+ }), Zn = ["id", "aria-labelledby", "aria-label"], Qe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', ls = /* @__PURE__ */ xe({
2397
+ __name: "ScheduleModal",
2398
+ props: {
2399
+ open: { type: Boolean },
2400
+ id: {},
2401
+ panelClass: { default: "ob-modal" },
2402
+ panelStyle: {},
2403
+ labelledBy: {},
2404
+ label: {}
2405
+ },
2406
+ emits: ["close"],
2407
+ setup(e, { emit: a }) {
2408
+ const t = e, n = a, o = S(null);
2409
+ let i = null;
2410
+ function u() {
2411
+ ke(() => {
2412
+ const d = o.value;
2413
+ d && (d.querySelector(Qe) ?? d).focus();
2414
+ });
2415
+ }
2416
+ function s(d) {
2417
+ if (!t.open) return;
2418
+ if (d.key === "Escape") {
2419
+ d.preventDefault(), n("close");
2420
+ return;
2421
+ }
2422
+ if (d.key !== "Tab" || !o.value) return;
2423
+ const D = Array.from(o.value.querySelectorAll(Qe));
2424
+ if (!D.length) return;
2425
+ const p = D[0], H = D[D.length - 1];
2426
+ d.shiftKey && document.activeElement === p ? (d.preventDefault(), H.focus()) : !d.shiftKey && document.activeElement === H && (d.preventDefault(), p.focus());
2427
+ }
2428
+ return Be(
2429
+ () => t.open,
2430
+ (d) => {
2431
+ d ? (i = document.activeElement instanceof HTMLElement ? document.activeElement : null, u()) : (i == null || i.focus(), i = null);
2432
+ },
2433
+ { immediate: !0 }
2434
+ ), Re(() => document.addEventListener("keydown", s)), $e(() => {
2435
+ document.removeEventListener("keydown", s), i = null;
2436
+ }), (d, D) => e.open ? (C(), M("div", {
2437
+ key: 0,
2438
+ class: "modal-overlay open",
2439
+ onClick: D[0] || (D[0] = Ea((p) => n("close"), ["self"]))
2440
+ }, [
2441
+ x("div", {
2442
+ id: e.id,
2443
+ ref_key: "panel",
2444
+ ref: o,
2445
+ class: pe(["schedule-modal-panel", e.panelClass]),
2446
+ style: ba(e.panelStyle),
2447
+ role: "dialog",
2448
+ "aria-modal": "true",
2449
+ "aria-labelledby": e.labelledBy,
2450
+ "aria-label": e.label,
2451
+ tabindex: "-1"
2452
+ }, [
2453
+ Xe(d.$slots, "default")
2454
+ ], 14, Zn)
2455
+ ])) : G("", !0);
2456
+ }
2457
+ });
2458
+ export {
2459
+ yo as $,
2460
+ jo as A,
2461
+ Pn as B,
2462
+ mo as C,
2463
+ uo as D,
2464
+ as as E,
2465
+ ro as F,
2466
+ qe as G,
2467
+ Me as H,
2468
+ Oa as I,
2469
+ fo as J,
2470
+ Co as K,
2471
+ Jo as L,
2472
+ Na as M,
2473
+ Wo as N,
2474
+ Uo as O,
2475
+ Ta as P,
2476
+ _o as Q,
2477
+ co as R,
2478
+ Go as S,
2479
+ ge as T,
2480
+ ra as U,
2481
+ Ho as V,
2482
+ Vo as W,
2483
+ V as X,
2484
+ Fa as Y,
2485
+ Ke as Z,
2486
+ qo as _,
2487
+ ts as a,
2488
+ Bn as a0,
2489
+ w as a1,
2490
+ ue as a2,
2491
+ re as a3,
2492
+ se as a4,
2493
+ bo as a5,
2494
+ So as a6,
2495
+ Te as a7,
2496
+ X as a8,
2497
+ Eo as a9,
2498
+ so as aA,
2499
+ ss as aB,
2500
+ wo as aC,
2501
+ Lo as aD,
2502
+ Mo as aE,
2503
+ le as aF,
2504
+ No as aG,
2505
+ _a as aa,
2506
+ ko as ab,
2507
+ j as ac,
2508
+ Cn as ad,
2509
+ $o as ae,
2510
+ To as af,
2511
+ Ro as ag,
2512
+ Zo as ah,
2513
+ za as ai,
2514
+ xo as aj,
2515
+ Ra as ak,
2516
+ io as al,
2517
+ Io as am,
2518
+ go as an,
2519
+ Ue as ao,
2520
+ os as ap,
2521
+ We as aq,
2522
+ ve as ar,
2523
+ Ie as as,
2524
+ Yo as at,
2525
+ Ao as au,
2526
+ is as av,
2527
+ oa as aw,
2528
+ rs as ax,
2529
+ ls as ay,
2530
+ W as az,
2531
+ N as b,
2532
+ ns as c,
2533
+ J as d,
2534
+ Qo as e,
2535
+ lo as f,
2536
+ An as g,
2537
+ zo as h,
2538
+ Ba as i,
2539
+ Oo as j,
2540
+ es as k,
2541
+ Bo as l,
2542
+ Fo as m,
2543
+ Ko as n,
2544
+ m as o,
2545
+ r as p,
2546
+ Do as q,
2547
+ Po as r,
2548
+ La as s,
2549
+ Le as t,
2550
+ po as u,
2551
+ ie as v,
2552
+ ho as w,
2553
+ Ne as x,
2554
+ Xo as y,
2555
+ vo as z
2556
+ };