@isma91/react-scheduler 4.0.0 → 4.0.2

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 (132) hide show
  1. package/{dist/index.js → index.js} +218 -203
  2. package/package.json +4 -76
  3. package/.github/workflows/publish.yml +0 -29
  4. package/.github/workflows/tests.yml +0 -35
  5. package/.gitignore +0 -32
  6. package/.husky/pre-commit +0 -2
  7. package/.prettierignore +0 -1
  8. package/.prettierrc.json +0 -7
  9. package/.yarnrc.yml +0 -1
  10. package/dist/LICENSE +0 -24
  11. package/dist/README.md +0 -172
  12. package/dist/package.json +0 -65
  13. package/eslint.config.js +0 -79
  14. package/index.html +0 -41
  15. package/jest.config.ts +0 -194
  16. package/public/favicon.ico +0 -0
  17. package/public/logo192.png +0 -0
  18. package/public/logo512.png +0 -0
  19. package/public/manifest.json +0 -25
  20. package/public/robots.txt +0 -3
  21. package/scripts/post-pack.js +0 -34
  22. package/src/App.tsx +0 -25
  23. package/src/Page1.tsx +0 -67
  24. package/src/events.tsx +0 -227
  25. package/src/index.tsx +0 -21
  26. package/src/lib/SchedulerComponent.tsx +0 -78
  27. package/src/lib/__tests__/index.test.tsx +0 -24
  28. package/src/lib/components/common/Cell.tsx +0 -52
  29. package/src/lib/components/common/LocaleArrow.tsx +0 -38
  30. package/src/lib/components/common/ResourceHeader.tsx +0 -73
  31. package/src/lib/components/common/Tabs.tsx +0 -119
  32. package/src/lib/components/common/TodayTypo.tsx +0 -44
  33. package/src/lib/components/common/WithResources.tsx +0 -98
  34. package/src/lib/components/events/Actions.tsx +0 -65
  35. package/src/lib/components/events/AgendaEventsList.tsx +0 -115
  36. package/src/lib/components/events/CurrentTimeBar.tsx +0 -59
  37. package/src/lib/components/events/EmptyAgenda.tsx +0 -27
  38. package/src/lib/components/events/EventItem.tsx +0 -180
  39. package/src/lib/components/events/EventItemPopover.tsx +0 -179
  40. package/src/lib/components/events/MonthEvents.tsx +0 -141
  41. package/src/lib/components/events/TodayEvents.tsx +0 -99
  42. package/src/lib/components/hoc/DateProvider.tsx +0 -19
  43. package/src/lib/components/inputs/DatePicker.tsx +0 -95
  44. package/src/lib/components/inputs/Input.tsx +0 -113
  45. package/src/lib/components/inputs/SelectInput.tsx +0 -164
  46. package/src/lib/components/month/MonthTable.tsx +0 -207
  47. package/src/lib/components/nav/DayDateBtn.tsx +0 -77
  48. package/src/lib/components/nav/MonthDateBtn.tsx +0 -80
  49. package/src/lib/components/nav/Navigation.tsx +0 -201
  50. package/src/lib/components/nav/WeekDateBtn.tsx +0 -89
  51. package/src/lib/components/week/WeekTable.tsx +0 -229
  52. package/src/lib/helpers/constants.ts +0 -4
  53. package/src/lib/helpers/generals.tsx +0 -354
  54. package/src/lib/hooks/useArrowDisable.ts +0 -26
  55. package/src/lib/hooks/useCellAttributes.ts +0 -67
  56. package/src/lib/hooks/useDragAttributes.ts +0 -31
  57. package/src/lib/hooks/useEventPermissions.ts +0 -42
  58. package/src/lib/hooks/useStore.ts +0 -8
  59. package/src/lib/hooks/useSyncScroll.ts +0 -31
  60. package/src/lib/hooks/useWindowResize.ts +0 -37
  61. package/src/lib/index.tsx +0 -14
  62. package/src/lib/positionManger/context.ts +0 -14
  63. package/src/lib/positionManger/provider.tsx +0 -113
  64. package/src/lib/positionManger/usePosition.ts +0 -8
  65. package/src/lib/store/context.ts +0 -5
  66. package/src/lib/store/default.ts +0 -157
  67. package/src/lib/store/provider.tsx +0 -211
  68. package/src/lib/store/types.ts +0 -33
  69. package/src/lib/styles/styles.ts +0 -256
  70. package/src/lib/types.ts +0 -423
  71. package/src/lib/views/Day.tsx +0 -265
  72. package/src/lib/views/DayAgenda.tsx +0 -57
  73. package/src/lib/views/Editor.tsx +0 -258
  74. package/src/lib/views/Month.tsx +0 -82
  75. package/src/lib/views/MonthAgenda.tsx +0 -84
  76. package/src/lib/views/Week.tsx +0 -92
  77. package/src/lib/views/WeekAgenda.tsx +0 -81
  78. package/src/vite-env.d.ts +0 -3
  79. package/tsconfig.build.json +0 -5
  80. package/tsconfig.json +0 -27
  81. package/vite.config.js +0 -40
  82. /package/{dist/SchedulerComponent.d.ts → SchedulerComponent.d.ts} +0 -0
  83. /package/{dist/components → components}/common/Cell.d.ts +0 -0
  84. /package/{dist/components → components}/common/LocaleArrow.d.ts +0 -0
  85. /package/{dist/components → components}/common/ResourceHeader.d.ts +0 -0
  86. /package/{dist/components → components}/common/Tabs.d.ts +0 -0
  87. /package/{dist/components → components}/common/TodayTypo.d.ts +0 -0
  88. /package/{dist/components → components}/common/WithResources.d.ts +0 -0
  89. /package/{dist/components → components}/events/Actions.d.ts +0 -0
  90. /package/{dist/components → components}/events/AgendaEventsList.d.ts +0 -0
  91. /package/{dist/components → components}/events/CurrentTimeBar.d.ts +0 -0
  92. /package/{dist/components → components}/events/EmptyAgenda.d.ts +0 -0
  93. /package/{dist/components → components}/events/EventItem.d.ts +0 -0
  94. /package/{dist/components → components}/events/EventItemPopover.d.ts +0 -0
  95. /package/{dist/components → components}/events/MonthEvents.d.ts +0 -0
  96. /package/{dist/components → components}/events/TodayEvents.d.ts +0 -0
  97. /package/{dist/components → components}/hoc/DateProvider.d.ts +0 -0
  98. /package/{dist/components → components}/inputs/DatePicker.d.ts +0 -0
  99. /package/{dist/components → components}/inputs/Input.d.ts +0 -0
  100. /package/{dist/components → components}/inputs/SelectInput.d.ts +0 -0
  101. /package/{dist/components → components}/month/MonthTable.d.ts +0 -0
  102. /package/{dist/components → components}/nav/DayDateBtn.d.ts +0 -0
  103. /package/{dist/components → components}/nav/MonthDateBtn.d.ts +0 -0
  104. /package/{dist/components → components}/nav/Navigation.d.ts +0 -0
  105. /package/{dist/components → components}/nav/WeekDateBtn.d.ts +0 -0
  106. /package/{dist/components → components}/week/WeekTable.d.ts +0 -0
  107. /package/{dist/helpers → helpers}/constants.d.ts +0 -0
  108. /package/{dist/helpers → helpers}/generals.d.ts +0 -0
  109. /package/{dist/hooks → hooks}/useArrowDisable.d.ts +0 -0
  110. /package/{dist/hooks → hooks}/useCellAttributes.d.ts +0 -0
  111. /package/{dist/hooks → hooks}/useDragAttributes.d.ts +0 -0
  112. /package/{dist/hooks → hooks}/useEventPermissions.d.ts +0 -0
  113. /package/{dist/hooks → hooks}/useStore.d.ts +0 -0
  114. /package/{dist/hooks → hooks}/useSyncScroll.d.ts +0 -0
  115. /package/{dist/hooks → hooks}/useWindowResize.d.ts +0 -0
  116. /package/{dist/index.d.ts → index.d.ts} +0 -0
  117. /package/{dist/positionManger → positionManger}/context.d.ts +0 -0
  118. /package/{dist/positionManger → positionManger}/provider.d.ts +0 -0
  119. /package/{dist/positionManger → positionManger}/usePosition.d.ts +0 -0
  120. /package/{dist/store → store}/context.d.ts +0 -0
  121. /package/{dist/store → store}/default.d.ts +0 -0
  122. /package/{dist/store → store}/provider.d.ts +0 -0
  123. /package/{dist/store → store}/types.d.ts +0 -0
  124. /package/{dist/styles → styles}/styles.d.ts +0 -0
  125. /package/{dist/types.d.ts → types.d.ts} +0 -0
  126. /package/{dist/views → views}/Day.d.ts +0 -0
  127. /package/{dist/views → views}/DayAgenda.d.ts +0 -0
  128. /package/{dist/views → views}/Editor.d.ts +0 -0
  129. /package/{dist/views → views}/Month.d.ts +0 -0
  130. /package/{dist/views → views}/MonthAgenda.d.ts +0 -0
  131. /package/{dist/views → views}/Week.d.ts +0 -0
  132. /package/{dist/views → views}/WeekAgenda.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { jsxs as M, jsx as r, Fragment as Y } from "react/jsx-runtime";
2
2
  import { createContext as pt, useContext as yt, useMemo as U, useState as L, Fragment as ie, useRef as nt, useEffect as te, useCallback as Z, forwardRef as mt } from "react";
3
- import { isWithinInterval as j, endOfDay as q, startOfDay as X, format as N, isSameDay as ye, isBefore as me, isAfter as Se, differenceInDays as _t, addSeconds as Zt, subMinutes as qt, addMinutes as de, differenceInMilliseconds as Xt, addDays as Q, addMilliseconds as Yt, isToday as _e, differenceInMinutes as Fe, set as ke, startOfWeek as $e, eachMinuteOfInterval as vt, endOfMonth as bt, endOfWeek as wt, startOfMonth as Ze, getMonth as Qt, setMonth as rt, getDaysInMonth as Jt, isSameMonth as Dt, differenceInCalendarWeeks as Kt, closestTo as en, setHours as ot, eachWeekOfInterval as tn, eachDayOfInterval as nn, isEqual as it } from "date-fns";
4
- import { useTheme as ne, ListItem as rn, ListItemAvatar as xt, Avatar as qe, ListItemText as kt, Typography as F, Tabs as on, Tab as an, Box as Ee, styled as se, alpha as Me, Paper as Tt, Grow as sn, IconButton as ve, Slide as ln, Button as ee, Popover as Te, List as dn, ListItemButton as cn, ButtonBase as un, useMediaQuery as Ct, MenuList as hn, MenuItem as Le, TextField as fn, FormControl as gn, InputLabel as pn, Select as yn, Checkbox as mn, Chip as _n, CircularProgress as Et, FormHelperText as vn, Dialog as bn, DialogTitle as wn, DialogContent as Dn, Grid as at, DialogActions as xn } from "@mui/material";
3
+ import { isWithinInterval as j, endOfDay as q, startOfDay as X, format as N, isSameDay as ye, isBefore as me, isAfter as Se, differenceInDays as vt, addSeconds as Zt, subMinutes as qt, addMinutes as de, differenceInMilliseconds as Xt, addDays as Q, addMilliseconds as Yt, isToday as ve, differenceInMinutes as Fe, set as ke, startOfWeek as $e, eachMinuteOfInterval as _t, endOfMonth as bt, endOfWeek as wt, startOfMonth as Ze, getMonth as Qt, setMonth as rt, getDaysInMonth as Jt, isSameMonth as Dt, differenceInCalendarWeeks as Kt, closestTo as en, setHours as ot, eachWeekOfInterval as tn, eachDayOfInterval as nn, isEqual as it } from "date-fns";
4
+ import { useTheme as ne, ListItem as rn, ListItemAvatar as xt, Avatar as qe, ListItemText as kt, Typography as F, Tabs as on, Tab as an, Box as Ee, styled as se, alpha as Me, Paper as Tt, Grow as sn, IconButton as _e, Slide as ln, Button as ee, Popover as Te, List as dn, ListItemButton as cn, ButtonBase as un, useMediaQuery as Ct, MenuList as hn, MenuItem as Le, TextField as fn, FormControl as gn, InputLabel as pn, Select as yn, Checkbox as mn, Chip as vn, CircularProgress as Et, FormHelperText as _n, Dialog as bn, DialogTitle as wn, DialogContent as Dn, Grid as at, DialogActions as xn } from "@mui/material";
5
5
  import { enUS as kn } from "date-fns/locale";
6
6
  import { styled as Tn } from "@mui/material/styles";
7
7
  import Cn from "@mui/icons-material/DeleteRounded";
@@ -18,8 +18,8 @@ import ze from "@mui/icons-material/NavigateNextRounded";
18
18
  import { DateCalendar as Xe } from "@mui/x-date-pickers";
19
19
  import Fn from "@mui/icons-material/MoreVert";
20
20
  import $n from "@mui/icons-material/ViewAgenda";
21
- import { DatePicker as An } from "@mui/x-date-pickers/DatePicker";
22
- import { DateTimePicker as Rn } from "@mui/x-date-pickers/DateTimePicker";
21
+ import { DatePicker as Rn } from "@mui/x-date-pickers/DatePicker";
22
+ import { DateTimePicker as An } from "@mui/x-date-pickers/DateTimePicker";
23
23
  import Hn from "@mui/icons-material/ExpandMore";
24
24
  const Wn = (e) => {
25
25
  if (e.month)
@@ -40,8 +40,8 @@ const Wn = (e) => {
40
40
  var f;
41
41
  const i = n.idField, s = o.find((c) => c.name === i), a = !!((f = s == null ? void 0 : s.config) != null && f.multiple), d = [];
42
42
  for (const c of e) {
43
- const v = a && !Array.isArray(c[i]) ? [c[i]] : c[i];
44
- (a || Array.isArray(v) ? v.includes(t[i]) : v === t[i]) && d.push({
43
+ const _ = a && !Array.isArray(c[i]) ? [c[i]] : c[i];
44
+ (a || Array.isArray(_) ? _.includes(t[i]) : _ === t[i]) && d.push({
45
45
  ...c,
46
46
  color: c.color || t[n.colorField || ""]
47
47
  });
@@ -61,7 +61,7 @@ const Wn = (e) => {
61
61
  start: t.start,
62
62
  end: t.end
63
63
  }))
64
- ), St = (e, t) => Math.ceil(e) / t, Mt = (e, t) => Math.max(e / t, 60), ae = (e, t) => _t(q(Zt(t, -1)), X(e)), Bn = (e) => new Date(
64
+ ), St = (e, t) => Math.ceil(e) / t, Mt = (e, t) => Math.max(e / t, 60), ae = (e, t) => vt(q(Zt(t, -1)), X(e)), Bn = (e) => new Date(
65
65
  e.getUTCFullYear(),
66
66
  e.getUTCMonth(),
67
67
  e.getUTCDate(),
@@ -90,10 +90,10 @@ const Wn = (e) => {
90
90
  if (o && !a.allDay && ae(a.start, a.end) > 0) {
91
91
  const f = X(t), c = q(t);
92
92
  if (j(t, { start: X(a.start), end: q(a.end) }) || j(a.start, { start: f, end: c }) || j(a.end, { start: f, end: c })) {
93
- const v = me(a.start, f) ? f : a.start, y = Se(a.end, c) ? c : a.end;
93
+ const _ = me(a.start, f) ? f : a.start, y = Se(a.end, c) ? c : a.end;
94
94
  i.push({
95
95
  ...a,
96
- start: v,
96
+ start: _,
97
97
  end: y,
98
98
  _originalStart: a.start,
99
99
  _originalEnd: a.end,
@@ -111,16 +111,16 @@ const Wn = (e) => {
111
111
  end: q(qt(o.end, 1))
112
112
  })
113
113
  );
114
- return Ae(n);
114
+ return Re(n);
115
115
  }, Ot = (e) => e.sort((t, n) => {
116
116
  const o = t.end.getTime() - t.start.getTime();
117
117
  return n.end.getTime() - n.start.getTime() - o;
118
- }), Ae = (e) => e.sort((t, n) => t.allDay || ae(t.start, t.end) > 0 ? -1 : t.start.getTime() - n.start.getTime()), Ne = (e, t, n, o, i) => {
118
+ }), Re = (e) => e.sort((t, n) => t.allDay || ae(t.start, t.end) > 0 ? -1 : t.start.getTime() - n.start.getTime()), Ne = (e, t, n, o, i) => {
119
119
  var f;
120
120
  const s = Array.isArray(t), a = [], d = {};
121
121
  for (let c = 0; c < e.length; c++) {
122
- const h = Oe(e[c], n), v = ae(h.start, h.end) > 0, y = i && !h.allDay && v;
123
- let p = h.allDay || v && !y;
122
+ const h = Oe(e[c], n), _ = ae(h.start, h.end) > 0, y = i && !h.allDay && _;
123
+ let p = h.allDay || _ && !y;
124
124
  if (p && (s ? p = t.some(
125
125
  (u) => j(u, {
126
126
  start: X(h.start),
@@ -248,9 +248,9 @@ const Vn = {
248
248
  dialogMaxWidth: f,
249
249
  hourFormat: c,
250
250
  ...h
251
- } = e, v = qn(e), y = o || "week", p = v[y] ? y : Wn(v);
251
+ } = e, _ = qn(e), y = o || "week", p = _[y] ? y : Wn(_);
252
252
  return {
253
- ...v,
253
+ ..._,
254
254
  translations: Zn(t),
255
255
  resourceFields: Object.assign(Un, n),
256
256
  view: p,
@@ -306,7 +306,7 @@ const Vn = {
306
306
  },
307
307
  onDrop: () => {
308
308
  }
309
- }, At = pt($t), O = () => yt(At), je = ({ resource: e }) => {
309
+ }, Rt = pt($t), O = () => yt(Rt), je = ({ resource: e }) => {
310
310
  const { resourceHeaderComponent: t, resourceFields: n, direction: o, resourceViewMode: i } = O(), s = ne(), a = e[n.textField], d = e[n.subTextField || ""], f = e[n.avatarField || ""], c = e[n.colorField || ""];
311
311
  return t instanceof Function ? t(e) : /* @__PURE__ */ M(
312
312
  rn,
@@ -463,12 +463,12 @@ const Qn = Tn("div")(({ theme: e }) => ({
463
463
  component: /* @__PURE__ */ r(Y, { children: e(c) })
464
464
  })), d = (c) => {
465
465
  if (i(c, "selectedTab"), typeof s == "function") {
466
- const h = t.find((v) => v[n.idField] === c);
466
+ const h = t.find((_) => _[n.idField] === c);
467
467
  h && s(h);
468
468
  }
469
469
  }, f = U(() => {
470
470
  const c = t[0][n.idField];
471
- return !o || t.findIndex((v) => v[n.idField] === o) < 0 ? c : o;
471
+ return !o || t.findIndex((_) => _[n.idField] === o) < 0 ? c : o;
472
472
  }, [t, n.idField, o]);
473
473
  return /* @__PURE__ */ r(Jn, { tabs: a, tab: f, setTab: d, style: { display: "grid" } });
474
474
  }, er = se("div")(({ theme: e, dialog: t }) => ({
@@ -520,7 +520,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
520
520
  alignItems: "center"
521
521
  }
522
522
  })
523
- ), Re = se("div")(
523
+ ), Ae = se("div")(
524
524
  ({ theme: e, stickyOffset: t = 0, stickyHeight: n = 40 }) => ({
525
525
  borderStyle: "solid",
526
526
  borderColor: e.palette.grey[300],
@@ -701,7 +701,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
701
701
  borderTop: `solid 2px ${t || e.palette.error.light}`,
702
702
  width: "100%"
703
703
  }
704
- })), Rt = (e) => {
704
+ })), At = (e) => {
705
705
  const { editable: t, deletable: n, draggable: o } = O(), i = U(() => typeof e.editable < "u" ? e.editable : t, [t, e.editable]), s = U(() => typeof e.deletable < "u" ? e.deletable : n, [n, e.deletable]), a = U(() => {
706
706
  if (i)
707
707
  return typeof e.draggable < "u" ? e.draggable : o;
@@ -716,11 +716,11 @@ const Qn = Tn("div")(({ theme: e }) => ({
716
716
  if (!s)
717
717
  return a(!0);
718
718
  t();
719
- }, { canEdit: f, canDelete: c } = Rt(e);
719
+ }, { canEdit: f, canDelete: c } = At(e);
720
720
  return /* @__PURE__ */ M(or, { children: [
721
721
  /* @__PURE__ */ r(sn, { in: !s, exit: !1, timeout: 400, unmountOnExit: !0, children: /* @__PURE__ */ M("div", { children: [
722
- f && /* @__PURE__ */ r(ve, { size: "small", onClick: n, children: /* @__PURE__ */ r(En, {}) }),
723
- c && /* @__PURE__ */ r(ve, { size: "small", onClick: d, children: /* @__PURE__ */ r(Cn, {}) })
722
+ f && /* @__PURE__ */ r(_e, { size: "small", onClick: n, children: /* @__PURE__ */ r(En, {}) }),
723
+ c && /* @__PURE__ */ r(_e, { size: "small", onClick: d, children: /* @__PURE__ */ r(Cn, {}) })
724
724
  ] }) }),
725
725
  /* @__PURE__ */ r(
726
726
  ln,
@@ -747,15 +747,15 @@ const Qn = Tn("div")(({ theme: e }) => ({
747
747
  customViewer: f,
748
748
  viewerExtraComponent: c,
749
749
  fields: h,
750
- resources: v,
750
+ resources: _,
751
751
  resourceFields: y,
752
752
  locale: p,
753
753
  viewerTitleComponent: u,
754
754
  viewerSubtitleComponent: g,
755
755
  hourFormat: b,
756
756
  translations: l,
757
- onEventEdit: _
758
- } = O(), T = ne(), E = De(b), D = t._originalStart || t.start, k = t._originalEnd || t.end, S = ae(D, k) <= 0 && t.allDay, I = y.idField, m = v.filter(
757
+ onEventEdit: v
758
+ } = O(), T = ne(), E = De(b), D = t._originalStart || t.start, k = t._originalEnd || t.end, S = ae(D, k) <= 0 && t.allDay, I = y.idField, m = _.filter(
759
759
  (x) => Array.isArray(t[I]) ? t[I].includes(x[I]) : x[I] === t[I]
760
760
  ), w = async () => {
761
761
  try {
@@ -806,7 +806,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
806
806
  children: [
807
807
  /* @__PURE__ */ M("div", { className: "rs__popper_actions", children: [
808
808
  /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
809
- ve,
809
+ _e,
810
810
  {
811
811
  size: "small",
812
812
  onClick: () => {
@@ -821,7 +821,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
821
821
  event: t,
822
822
  onDelete: w,
823
823
  onEdit: () => {
824
- n(), o(!0, t), _ && typeof _ == "function" && _(t);
824
+ n(), o(!0, t), v && typeof v == "function" && v(t);
825
825
  }
826
826
  }
827
827
  )
@@ -868,7 +868,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
868
868
  }
869
869
  );
870
870
  }, Qe = ({ day: e, events: t }) => {
871
- const [n, o] = L(null), [i, s] = L(), [a, d] = L(!1), { locale: f, hourFormat: c, eventRenderer: h, onEventClick: v, timeZone: y, disableViewer: p } = O(), u = ne(), g = De(c), b = (l) => {
871
+ const [n, o] = L(null), [i, s] = L(), [a, d] = L(!1), { locale: f, hourFormat: c, eventRenderer: h, onEventClick: _, timeZone: y, disableViewer: p } = O(), u = ne(), g = De(c), b = (l) => {
872
872
  !(l != null && l.currentTarget) && a && d(!1), o((l == null ? void 0 : l.currentTarget) || null);
873
873
  };
874
874
  return /* @__PURE__ */ M(ie, { children: [
@@ -895,7 +895,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
895
895
  tabIndex: p ? -1 : 0,
896
896
  disabled: l.disabled,
897
897
  onClick: (I) => {
898
- I.preventDefault(), I.stopPropagation(), p || b(I), s(l), typeof v == "function" && v(l);
898
+ I.preventDefault(), I.stopPropagation(), p || b(I), s(l), typeof _ == "function" && _(l);
899
899
  },
900
900
  children: [
901
901
  /* @__PURE__ */ r(xt, { children: /* @__PURE__ */ r(
@@ -926,7 +926,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
926
926
  }, Je = () => {
927
927
  const { height: e, translations: t, stickyNavigationOffset: n, stickyNavigationHeight: o } = O();
928
928
  return /* @__PURE__ */ r(
929
- Re,
929
+ Ae,
930
930
  {
931
931
  stickyOffset: n,
932
932
  stickyHeight: o,
@@ -951,19 +951,19 @@ const Qn = Tn("div")(({ theme: e }) => ({
951
951
  alwaysShowAgendaDays: f,
952
952
  stickyNavigationOffset: c,
953
953
  stickyNavigationHeight: h
954
- } = O(), { disableGoToDay: v, headRenderer: y } = o, p = U(() => e.some((u) => Ie(n, u).length > 0), [e, n]);
955
- return !f && !p ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Re, { stickyOffset: c, stickyHeight: h, children: e.map((u, g) => {
954
+ } = O(), { disableGoToDay: _, headRenderer: y } = o, p = U(() => e.some((u) => Ie(n, u).length > 0), [e, n]);
955
+ return !f && !p ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Ae, { stickyOffset: c, stickyHeight: h, children: e.map((u, g) => {
956
956
  const b = he({ dateLeft: u, timeZone: a }), l = Ie(n, u);
957
- return !f && !l.length ? null : /* @__PURE__ */ M("div", { className: `rs__agenda_row ${_e(u) ? "rs__today_cell" : ""}`, children: [
957
+ return !f && !l.length ? null : /* @__PURE__ */ M("div", { className: `rs__agenda_row ${ve(u) ? "rs__today_cell" : ""}`, children: [
958
958
  /* @__PURE__ */ r("div", { className: "rs__cell rs__agenda__cell", children: typeof y == "function" ? /* @__PURE__ */ r("div", { children: y({ day: u, events: n, resource: t }) }) : /* @__PURE__ */ r(
959
959
  F,
960
960
  {
961
961
  sx: { fontWeight: b ? "bold" : "inherit" },
962
962
  color: b ? "primary" : "inherit",
963
963
  variant: "body2",
964
- className: v ? "" : "rs__hover__op",
965
- onClick: (_) => {
966
- _.stopPropagation(), v || i(u);
964
+ className: _ ? "" : "rs__hover__op",
965
+ onClick: (v) => {
966
+ v.stopPropagation(), _ || i(u);
967
967
  },
968
968
  children: N(u, "dd E", { locale: s })
969
969
  }
@@ -1033,7 +1033,7 @@ const Qn = Tn("div")(({ theme: e }) => ({
1033
1033
  }
1034
1034
  };
1035
1035
  }, He = ({ event: e, multiday: t, hasPrev: n, hasNext: o, showdate: i = !0 }) => {
1036
- const { direction: s, locale: a, hourFormat: d, eventRenderer: f, onEventClick: c, view: h, disableViewer: v } = O(), y = dr(e), [p, u] = L(null), [g, b] = L(!1), l = ne(), _ = De(d), T = s === "rtl" ? lt : st, E = s === "rtl" ? st : lt, D = ae(e.start, e.end) <= 0 && e.allDay, { canDrag: k } = Rt(e), S = Z(
1036
+ const { direction: s, locale: a, hourFormat: d, eventRenderer: f, onEventClick: c, view: h, disableViewer: _ } = O(), y = dr(e), [p, u] = L(null), [g, b] = L(!1), l = ne(), v = De(d), T = s === "rtl" ? lt : st, E = s === "rtl" ? st : lt, D = ae(e.start, e.end) <= 0 && e.allDay, { canDrag: k } = At(e), S = Z(
1037
1037
  (m) => {
1038
1038
  !(m != null && m.currentTarget) && g && b(!1), u((m == null ? void 0 : m.currentTarget) || null);
1039
1039
  },
@@ -1047,9 +1047,9 @@ const Qn = Tn("div")(({ theme: e }) => ({
1047
1047
  let m = /* @__PURE__ */ M("div", { style: { padding: "2px 6px" }, children: [
1048
1048
  /* @__PURE__ */ r(F, { variant: "subtitle2", style: { fontSize: 12 }, noWrap: !0, children: e.title }),
1049
1049
  e.subtitle && /* @__PURE__ */ r(F, { variant: "body2", style: { fontSize: 11 }, noWrap: !0, children: e.subtitle }),
1050
- i && /* @__PURE__ */ r(F, { style: { fontSize: 11 }, noWrap: !0, children: `${N(e.start, _, {
1050
+ i && /* @__PURE__ */ r(F, { style: { fontSize: 11 }, noWrap: !0, children: `${N(e.start, v, {
1051
1051
  locale: a
1052
- })} - ${N(e.end, _, { locale: a })}` })
1052
+ })} - ${N(e.end, v, { locale: a })}` })
1053
1053
  ] });
1054
1054
  return t && (m = /* @__PURE__ */ M(
1055
1055
  "div",
@@ -1061,9 +1061,9 @@ const Qn = Tn("div")(({ theme: e }) => ({
1061
1061
  justifyContent: "space-between"
1062
1062
  },
1063
1063
  children: [
1064
- /* @__PURE__ */ r(F, { sx: { fontSize: 11 }, noWrap: !0, children: n ? /* @__PURE__ */ r(E, { fontSize: "small", sx: { display: "flex" } }) : i && !D && N(e.start, _, { locale: a }) }),
1064
+ /* @__PURE__ */ r(F, { sx: { fontSize: 11 }, noWrap: !0, children: n ? /* @__PURE__ */ r(E, { fontSize: "small", sx: { display: "flex" } }) : i && !D && N(e.start, v, { locale: a }) }),
1065
1065
  /* @__PURE__ */ r(F, { variant: "subtitle2", align: "center", sx: { fontSize: 12 }, noWrap: !0, children: e.title }),
1066
- /* @__PURE__ */ r(F, { sx: { fontSize: 11 }, noWrap: !0, children: o ? /* @__PURE__ */ r(T, { fontSize: "small", sx: { display: "flex" } }) : i && !D && N(e.end, _, { locale: a }) })
1066
+ /* @__PURE__ */ r(F, { sx: { fontSize: 11 }, noWrap: !0, children: o ? /* @__PURE__ */ r(T, { fontSize: "small", sx: { display: "flex" } }) : i && !D && N(e.end, v, { locale: a }) })
1067
1067
  ]
1068
1068
  }
1069
1069
  )), /* @__PURE__ */ r(
@@ -1081,11 +1081,11 @@ const Qn = Tn("div")(({ theme: e }) => ({
1081
1081
  un,
1082
1082
  {
1083
1083
  onClick: (w) => {
1084
- w.preventDefault(), w.stopPropagation(), v || S(w), typeof c == "function" && c(e);
1084
+ w.preventDefault(), w.stopPropagation(), _ || S(w), typeof c == "function" && c(e);
1085
1085
  },
1086
1086
  focusRipple: !0,
1087
- tabIndex: v ? -1 : 0,
1088
- disableRipple: v,
1087
+ tabIndex: _ ? -1 : 0,
1088
+ disableRipple: _,
1089
1089
  disabled: e.disabled,
1090
1090
  children: /* @__PURE__ */ r("div", { ...y, draggable: k, children: m })
1091
1091
  }
@@ -1099,11 +1099,11 @@ const Qn = Tn("div")(({ theme: e }) => ({
1099
1099
  h,
1100
1100
  e,
1101
1101
  i,
1102
- _,
1102
+ v,
1103
1103
  a,
1104
1104
  l.palette.primary.main,
1105
1105
  l.palette.primary.contrastText,
1106
- v,
1106
+ _,
1107
1107
  y,
1108
1108
  k,
1109
1109
  S,
@@ -1153,7 +1153,7 @@ const cr = (e) => {
1153
1153
  showCurrentTimeBar: c = !0,
1154
1154
  currentTimeBarColor: h
1155
1155
  }) => {
1156
- const v = [];
1156
+ const _ = [];
1157
1157
  return /* @__PURE__ */ M(ie, { children: [
1158
1158
  c && he({ dateLeft: t, timeZone: d }) && /* @__PURE__ */ r(
1159
1159
  cr,
@@ -1168,8 +1168,8 @@ const cr = (e) => {
1168
1168
  }
1169
1169
  ),
1170
1170
  e.map((y, p) => {
1171
- const u = (o * 60 - n * 60) * s, g = Fe(y.end, y.start) * s, b = Math.min(g, u) - Ue, l = n * 60, _ = y.start.getHours() * 60 + y.start.getMinutes(), T = Math.max(_ - l, 0), E = T * s, k = b / 60 * Ue, S = T / i, I = E + S, m = zn(e, y), w = m.filter((x) => v.includes(x.event_id));
1172
- return v.push(y.event_id), /* @__PURE__ */ r(
1171
+ const u = (o * 60 - n * 60) * s, g = Fe(y.end, y.start) * s, b = Math.min(g, u) - Ue, l = n * 60, v = y.start.getHours() * 60 + y.start.getMinutes(), T = Math.max(v - l, 0), E = T * s, k = b / 60 * Ue, S = T / i, I = E + S, m = zn(e, y), w = m.filter((x) => _.includes(x.event_id));
1172
+ return _.push(y.event_id), /* @__PURE__ */ r(
1173
1173
  "div",
1174
1174
  {
1175
1175
  className: "rs__event__item",
@@ -1196,7 +1196,7 @@ const cr = (e) => {
1196
1196
  setCurrentDragged: f,
1197
1197
  editable: c,
1198
1198
  timeZone: h
1199
- } = O(), v = ne();
1199
+ } = O(), _ = ne();
1200
1200
  return {
1201
1201
  tabIndex: c ? 0 : -1,
1202
1202
  disableRipple: !c,
@@ -1208,10 +1208,10 @@ const cr = (e) => {
1208
1208
  }), s && typeof s == "function" && s(e, t, n, o);
1209
1209
  },
1210
1210
  onDragOver: (y) => {
1211
- y.preventDefault(), d && (y.currentTarget.style.backgroundColor = Me(v.palette.secondary.main, 0.3));
1211
+ y.preventDefault(), d && (y.currentTarget.style.backgroundColor = Me(_.palette.secondary.main, 0.3));
1212
1212
  },
1213
1213
  onDragEnter: (y) => {
1214
- d && (y.currentTarget.style.backgroundColor = Me(v.palette.secondary.main, 0.3));
1214
+ d && (y.currentTarget.style.backgroundColor = Me(_.palette.secondary.main, 0.3));
1215
1215
  },
1216
1216
  onDragLeave: (y) => {
1217
1217
  d && (y.currentTarget.style.backgroundColor = "");
@@ -1268,46 +1268,46 @@ const cr = (e) => {
1268
1268
  handleGotoDay: f,
1269
1269
  resources: c,
1270
1270
  resourceFields: h,
1271
- resourceViewMode: v,
1271
+ resourceViewMode: _,
1272
1272
  direction: y,
1273
1273
  locale: p,
1274
1274
  hourFormat: u,
1275
1275
  timeZone: g,
1276
1276
  stickyNavigation: b,
1277
1277
  stickyNavigationOffset: l,
1278
- stickyNavigationHeight: _,
1278
+ stickyNavigationHeight: v,
1279
1279
  currentTime: T,
1280
1280
  showCurrentTimeBar: E,
1281
1281
  currentTimeBarColor: D,
1282
1282
  forceInlineMultiDay: k
1283
- } = O(), { startHour: S, endHour: I, step: m, cellRenderer: w, disableGoToDay: x, headRenderer: C, hourRenderer: W } = a, { renderedSlots: R } = Bt(), { headersRef: z, bodyRef: J } = Wt(), re = pe, K = X(e[0]), le = q(e[e.length - 1]), P = De(u), fe = U(() => {
1284
- const $ = c.length && v === "default", A = Ne(
1283
+ } = O(), { startHour: S, endHour: I, step: m, cellRenderer: w, disableGoToDay: x, headRenderer: C, hourRenderer: W } = a, { renderedSlots: A } = Bt(), { headersRef: z, bodyRef: J } = Wt(), re = pe, K = X(e[0]), le = q(e[e.length - 1]), P = De(u), fe = U(() => {
1284
+ const $ = c.length && _ === "default", R = Ne(
1285
1285
  $ ? d : i,
1286
1286
  e,
1287
1287
  g,
1288
1288
  !0,
1289
1289
  k
1290
1290
  );
1291
- return re * A.length + 45;
1291
+ return re * R.length + 45;
1292
1292
  }, [
1293
1293
  re,
1294
1294
  e,
1295
1295
  d,
1296
- v,
1296
+ _,
1297
1297
  i,
1298
1298
  c.length,
1299
1299
  g
1300
- ]), V = ($, A, G) => {
1301
- const oe = ye(K, A);
1300
+ ]), V = ($, R, G) => {
1301
+ const oe = ye(K, R);
1302
1302
  return Ne(
1303
1303
  $,
1304
1304
  e,
1305
1305
  g,
1306
1306
  void 0,
1307
1307
  k
1308
- ).filter((B) => me(B.start, K) ? oe : ye(B.start, A)).sort((B, ge) => ge.end.getTime() - B.end.getTime()).map((B) => {
1308
+ ).filter((B) => me(B.start, K) ? oe : ye(B.start, R)).sort((B, ge) => ge.end.getTime() - B.end.getTime()).map((B) => {
1309
1309
  var tt;
1310
- const ge = me(X(B.start), K), xe = Se(q(B.end), le), Vt = ae(ge ? K : B.start, xe ? le : B.end) + 1, Gt = N(A, "yyyy-MM-dd"), jt = G ? G[h.idField] : "all", Pe = (tt = R == null ? void 0 : R[jt]) == null ? void 0 : tt[Gt], Ut = (Pe == null ? void 0 : Pe[B.event_id]) || 0;
1310
+ const ge = me(X(B.start), K), xe = Se(q(B.end), le), Vt = ae(ge ? K : B.start, xe ? le : B.end) + 1, Gt = N(R, "yyyy-MM-dd"), jt = G ? G[h.idField] : "all", Pe = (tt = A == null ? void 0 : A[jt]) == null ? void 0 : tt[Gt], Ut = (Pe == null ? void 0 : Pe[B.event_id]) || 0;
1311
1311
  return /* @__PURE__ */ r(
1312
1312
  "div",
1313
1313
  {
@@ -1332,13 +1332,13 @@ const cr = (e) => {
1332
1332
  sticky: "1",
1333
1333
  stickyNavigation: b,
1334
1334
  stickyOffset: l,
1335
- stickyHeight: _,
1335
+ stickyHeight: v,
1336
1336
  children: [
1337
1337
  /* @__PURE__ */ r("span", { className: "rs__cell rs__time" }),
1338
- e.map(($, A) => /* @__PURE__ */ M(
1338
+ e.map(($, R) => /* @__PURE__ */ M(
1339
1339
  "span",
1340
1340
  {
1341
- className: `rs__cell rs__header ${_e($) ? "rs__today_cell" : ""}`,
1341
+ className: `rs__cell rs__header ${ve($) ? "rs__today_cell" : ""}`,
1342
1342
  style: { height: fe },
1343
1343
  children: [
1344
1344
  typeof C == "function" ? /* @__PURE__ */ r("div", { children: C({ day: $, events: i, resource: s }) }) : /* @__PURE__ */ r(
@@ -1352,17 +1352,17 @@ const cr = (e) => {
1352
1352
  V(i, $, s)
1353
1353
  ]
1354
1354
  },
1355
- A
1355
+ R
1356
1356
  ))
1357
1357
  ]
1358
1358
  }
1359
1359
  ),
1360
- /* @__PURE__ */ r(be, { days: e.length, ref: J, children: t.map(($, A) => /* @__PURE__ */ M(ie, { children: [
1360
+ /* @__PURE__ */ r(be, { days: e.length, ref: J, children: t.map(($, R) => /* @__PURE__ */ M(ie, { children: [
1361
1361
  /* @__PURE__ */ r("span", { style: { height: n }, className: "rs__cell rs__header rs__time", children: typeof W == "function" ? /* @__PURE__ */ r("div", { children: W(N($, P, { locale: p })) }) : /* @__PURE__ */ r(F, { variant: "caption", children: N($, P, { locale: p }) }) }),
1362
1362
  e.map((G, oe) => {
1363
1363
  const H = /* @__PURE__ */ new Date(`${N(G, "yyyy/MM/dd")} ${N($, P)}`), ce = de(H, m), B = h.idField;
1364
- return /* @__PURE__ */ M("span", { className: `rs__cell ${_e(G) ? "rs__today_cell" : ""}`, children: [
1365
- A === 0 && /* @__PURE__ */ r(
1364
+ return /* @__PURE__ */ M("span", { className: `rs__cell ${ve(G) ? "rs__today_cell" : ""}`, children: [
1365
+ R === 0 && /* @__PURE__ */ r(
1366
1366
  Lt,
1367
1367
  {
1368
1368
  todayEvents: Nt(
@@ -1397,7 +1397,7 @@ const cr = (e) => {
1397
1397
  )
1398
1398
  ] }, oe);
1399
1399
  })
1400
- ] }, A)) })
1400
+ ] }, R)) })
1401
1401
  ] });
1402
1402
  }, fr = () => {
1403
1403
  const {
@@ -1412,7 +1412,7 @@ const cr = (e) => {
1412
1412
  resourceFields: f,
1413
1413
  fields: c,
1414
1414
  agenda: h
1415
- } = O(), { weekStartOn: v, weekDays: y, startHour: p, endHour: u, step: g } = e, b = $e(t, { weekStartsOn: v }), l = y.map((x) => Q(b, x)), _ = X(l[0]), T = q(l[l.length - 1]), E = ke(t, { hours: p, minutes: 0, seconds: 0 }), D = ke(t, { hours: u, minutes: -g, seconds: 0 }), k = vt(
1415
+ } = O(), { weekStartOn: _, weekDays: y, startHour: p, endHour: u, step: g } = e, b = $e(t, { weekStartsOn: _ }), l = y.map((x) => Q(b, x)), v = X(l[0]), T = q(l[l.length - 1]), E = ke(t, { hours: p, minutes: 0, seconds: 0 }), D = ke(t, { hours: u, minutes: -g, seconds: 0 }), k = _t(
1416
1416
  {
1417
1417
  start: E,
1418
1418
  end: D
@@ -1422,7 +1422,7 @@ const cr = (e) => {
1422
1422
  try {
1423
1423
  s(!0);
1424
1424
  const x = await i({
1425
- start: _,
1425
+ start: v,
1426
1426
  end: T,
1427
1427
  view: "week"
1428
1428
  });
@@ -1458,7 +1458,7 @@ const cr = (e) => {
1458
1458
  const { direction: o } = O();
1459
1459
  let i = ze;
1460
1460
  return e === "prev" ? i = o === "rtl" ? ze : dt : e === "next" && (i = o === "rtl" ? dt : ze), /* @__PURE__ */ r(
1461
- ve,
1461
+ _e,
1462
1462
  {
1463
1463
  style: { padding: 2 },
1464
1464
  onClick: t,
@@ -1473,7 +1473,7 @@ const cr = (e) => {
1473
1473
  const { selectedDate: e, week: t, navigationPickerProps: n, view: o } = O(), i = n == null ? void 0 : n.minDate, s = n == null ? void 0 : n.maxDate, a = o === "month" ? bt(e) : o === "week" ? wt(e, { weekStartsOn: t == null ? void 0 : t.weekStartOn }) : e, d = o === "month" ? Ze(e) : o === "week" ? $e(e, { weekStartsOn: t == null ? void 0 : t.weekStartOn }) : e, f = i ? d <= i : !1, c = s ? a >= s : !1;
1474
1474
  return { prevDisabled: f, nextDisabled: c };
1475
1475
  }, gr = ({ selectedDate: e, onChange: t, weekProps: n }) => {
1476
- const { locale: o, navigationPickerProps: i } = O(), [s, a] = L(null), { weekStartOn: d } = n, f = $e(e, { weekStartsOn: d }), c = wt(e, { weekStartsOn: d }), { prevDisabled: h, nextDisabled: v } = et(), y = (l) => {
1476
+ const { locale: o, navigationPickerProps: i } = O(), [s, a] = L(null), { weekStartOn: d } = n, f = $e(e, { weekStartsOn: d }), c = wt(e, { weekStartsOn: d }), { prevDisabled: h, nextDisabled: _ } = et(), y = (l) => {
1477
1477
  a(l.currentTarget);
1478
1478
  }, p = () => {
1479
1479
  a(null);
@@ -1526,7 +1526,7 @@ const cr = (e) => {
1526
1526
  {
1527
1527
  type: "next",
1528
1528
  onClick: b,
1529
- disabled: v,
1529
+ disabled: _,
1530
1530
  "aria-label": "next week"
1531
1531
  }
1532
1532
  )
@@ -1538,7 +1538,7 @@ const cr = (e) => {
1538
1538
  s(null);
1539
1539
  }, h = (p) => {
1540
1540
  t(p || /* @__PURE__ */ new Date()), c();
1541
- }, v = () => {
1541
+ }, _ = () => {
1542
1542
  const p = Q(e, -1);
1543
1543
  t(p);
1544
1544
  }, y = () => {
@@ -1550,7 +1550,7 @@ const cr = (e) => {
1550
1550
  we,
1551
1551
  {
1552
1552
  type: "prev",
1553
- onClick: v,
1553
+ onClick: _,
1554
1554
  disabled: a,
1555
1555
  "aria-label": "previous day"
1556
1556
  }
@@ -1585,7 +1585,7 @@ const cr = (e) => {
1585
1585
  a(u.currentTarget);
1586
1586
  }, h = () => {
1587
1587
  a(null);
1588
- }, v = (u) => {
1588
+ }, _ = (u) => {
1589
1589
  t(u || /* @__PURE__ */ new Date()), h();
1590
1590
  }, y = () => {
1591
1591
  const u = i - 1;
@@ -1622,7 +1622,7 @@ const cr = (e) => {
1622
1622
  openTo: "month",
1623
1623
  views: ["year", "month"],
1624
1624
  value: e,
1625
- onChange: v
1625
+ onChange: _
1626
1626
  }
1627
1627
  ) })
1628
1628
  }
@@ -1650,20 +1650,20 @@ const cr = (e) => {
1650
1650
  month: f,
1651
1651
  disableViewNavigator: c,
1652
1652
  onSelectedDateChange: h,
1653
- onViewChange: v,
1653
+ onViewChange: _,
1654
1654
  stickyNavigation: y,
1655
1655
  timeZone: p,
1656
1656
  agenda: u,
1657
1657
  toggleAgenda: g,
1658
1658
  enableAgenda: b,
1659
1659
  customHeaderContent: l,
1660
- stickyNavigationOffset: _
1660
+ stickyNavigationOffset: v
1661
1661
  } = O(), [T, E] = L(null), D = ne(), k = Ct(D.breakpoints.up("sm")), S = i(), I = (C) => {
1662
1662
  E(C || null);
1663
1663
  }, m = (C) => {
1664
1664
  o(C, "selectedDate"), h && typeof h == "function" && h(C);
1665
1665
  }, w = (C) => {
1666
- o(C, "view"), v && typeof v == "function" && v(C, u);
1666
+ o(C, "view"), _ && typeof _ == "function" && _(C, u);
1667
1667
  }, x = () => {
1668
1668
  switch (t) {
1669
1669
  case "month":
@@ -1683,7 +1683,7 @@ const cr = (e) => {
1683
1683
  return "";
1684
1684
  }
1685
1685
  };
1686
- return !a && c ? null : /* @__PURE__ */ M(nr, { sticky: y ? "1" : "0", offset: _, children: [
1686
+ return !a && c ? null : /* @__PURE__ */ M(nr, { sticky: y ? "1" : "0", offset: v, children: [
1687
1687
  /* @__PURE__ */ r("div", { "data-testid": "date-navigator", children: a && x() }),
1688
1688
  l && /* @__PURE__ */ r("div", { className: "rs__custom_header_content", children: l() }),
1689
1689
  /* @__PURE__ */ M(
@@ -1712,7 +1712,7 @@ const cr = (e) => {
1712
1712
  children: s.navigation.agenda
1713
1713
  }
1714
1714
  ) : /* @__PURE__ */ r(
1715
- ve,
1715
+ _e,
1716
1716
  {
1717
1717
  color: u ? "primary" : "default",
1718
1718
  style: { padding: 5 },
@@ -1733,7 +1733,7 @@ const cr = (e) => {
1733
1733
  C
1734
1734
  )) : /* @__PURE__ */ M(ie, { children: [
1735
1735
  /* @__PURE__ */ r(
1736
- ve,
1736
+ _e,
1737
1737
  {
1738
1738
  style: { padding: 5 },
1739
1739
  onClick: (C) => {
@@ -1776,7 +1776,7 @@ const cr = (e) => {
1776
1776
  }
1777
1777
  )
1778
1778
  ] });
1779
- }, _r = ({
1779
+ }, vr = ({
1780
1780
  type: e = "datetime",
1781
1781
  value: t,
1782
1782
  label: n,
@@ -1789,14 +1789,14 @@ const cr = (e) => {
1789
1789
  required: c
1790
1790
  }) => {
1791
1791
  var b, l;
1792
- const { translations: h } = O(), [v, y] = L({
1792
+ const { translations: h } = O(), [_, y] = L({
1793
1793
  touched: !1,
1794
1794
  valid: !!t,
1795
1795
  errorMsg: d || (c ? ((b = h == null ? void 0 : h.validation) == null ? void 0 : b.required) || "Required" : void 0)
1796
- }), p = e === "date" ? An : Rn, u = v.touched && (a || !v.valid), g = Z(
1797
- (_) => {
1796
+ }), p = e === "date" ? Rn : An, u = _.touched && (a || !_.valid), g = Z(
1797
+ (v) => {
1798
1798
  var S;
1799
- const T = !isNaN(Date.parse(_)), E = typeof _ == "string" && T ? new Date(_) : _;
1799
+ const T = !isNaN(Date.parse(v)), E = typeof v == "string" && T ? new Date(v) : v;
1800
1800
  let D = !0, k = d;
1801
1801
  c && !E && (D = !1, k = d || ((S = h == null ? void 0 : h.validation) == null ? void 0 : S.required) || "Required"), y((I) => ({ ...I, touched: !0, valid: D, errorMsg: k })), i(o, E);
1802
1802
  },
@@ -1809,21 +1809,21 @@ const cr = (e) => {
1809
1809
  {
1810
1810
  value: t instanceof Date ? t : new Date(t),
1811
1811
  label: n,
1812
- onChange: (_) => {
1813
- g(_);
1812
+ onChange: (v) => {
1813
+ g(v);
1814
1814
  },
1815
1815
  minutesStep: 5,
1816
1816
  slotProps: {
1817
1817
  textField: {
1818
1818
  variant: s,
1819
- helperText: u && v.errorMsg,
1819
+ helperText: u && _.errorMsg,
1820
1820
  error: u,
1821
1821
  fullWidth: !0
1822
1822
  }
1823
1823
  }
1824
1824
  }
1825
1825
  ) });
1826
- }, vr = ({
1826
+ }, _r = ({
1827
1827
  variant: e = "outlined",
1828
1828
  label: t,
1829
1829
  placeholder: n,
@@ -1835,7 +1835,7 @@ const cr = (e) => {
1835
1835
  email: f,
1836
1836
  decimal: c,
1837
1837
  onChange: h,
1838
- disabled: v,
1838
+ disabled: _,
1839
1839
  multiline: y,
1840
1840
  rows: p,
1841
1841
  touched: u
@@ -1844,26 +1844,26 @@ const cr = (e) => {
1844
1844
  touched: !1,
1845
1845
  valid: !1,
1846
1846
  errorMsg: ""
1847
- }), { translations: l } = O(), _ = Z(
1847
+ }), { translations: l } = O(), v = Z(
1848
1848
  (T) => {
1849
- var S, I, m, w, x, C, W, R, z;
1849
+ var S, I, m, w, x, C, W, A, z;
1850
1850
  const E = T;
1851
1851
  let D = !0, k = "";
1852
- f && (D = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(E) && D, k = ((S = l == null ? void 0 : l.validation) == null ? void 0 : S.invalidEmail) || "Invalid Email"), c && (D = /^[0-9]+(\.[0-9]*)?$/.test(E) && D, k = ((I = l == null ? void 0 : l.validation) == null ? void 0 : I.onlyNumbers) || "Only Numbers Allowed"), a && `${E}`.trim().length < a && (D = !1, k = typeof ((m = l == null ? void 0 : l.validation) == null ? void 0 : m.min) == "function" ? (w = l == null ? void 0 : l.validation) == null ? void 0 : w.min(a) : ((x = l == null ? void 0 : l.validation) == null ? void 0 : x.min) || `Minimum ${a} letters`), d && `${E}`.trim().length > d && (D = !1, k = typeof ((C = l == null ? void 0 : l.validation) == null ? void 0 : C.max) == "function" ? (W = l == null ? void 0 : l.validation) == null ? void 0 : W.max(d) : ((R = l == null ? void 0 : l.validation) == null ? void 0 : R.max) || `Maximum ${d} letters`), s && `${E}`.trim().length <= 0 && (D = !1, k = ((z = l == null ? void 0 : l.validation) == null ? void 0 : z.required) || "Required"), b({ touched: !0, valid: D, errorMsg: k }), h(i, E, D);
1852
+ f && (D = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(E) && D, k = ((S = l == null ? void 0 : l.validation) == null ? void 0 : S.invalidEmail) || "Invalid Email"), c && (D = /^[0-9]+(\.[0-9]*)?$/.test(E) && D, k = ((I = l == null ? void 0 : l.validation) == null ? void 0 : I.onlyNumbers) || "Only Numbers Allowed"), a && `${E}`.trim().length < a && (D = !1, k = typeof ((m = l == null ? void 0 : l.validation) == null ? void 0 : m.min) == "function" ? (w = l == null ? void 0 : l.validation) == null ? void 0 : w.min(a) : ((x = l == null ? void 0 : l.validation) == null ? void 0 : x.min) || `Minimum ${a} letters`), d && `${E}`.trim().length > d && (D = !1, k = typeof ((C = l == null ? void 0 : l.validation) == null ? void 0 : C.max) == "function" ? (W = l == null ? void 0 : l.validation) == null ? void 0 : W.max(d) : ((A = l == null ? void 0 : l.validation) == null ? void 0 : A.max) || `Maximum ${d} letters`), s && `${E}`.trim().length <= 0 && (D = !1, k = ((z = l == null ? void 0 : l.validation) == null ? void 0 : z.required) || "Required"), b({ touched: !0, valid: D, errorMsg: k }), h(i, E, D);
1853
1853
  },
1854
1854
  [c, f, d, a, i, h, s, l == null ? void 0 : l.validation]
1855
1855
  );
1856
1856
  return te(() => {
1857
- u && _(o);
1858
- }, [_, u, o]), /* @__PURE__ */ r(
1857
+ u && v(o);
1858
+ }, [v, u, o]), /* @__PURE__ */ r(
1859
1859
  fn,
1860
1860
  {
1861
1861
  variant: e,
1862
1862
  label: t && /* @__PURE__ */ r(F, { variant: "body2", children: `${t} ${s ? "*" : ""}` }),
1863
1863
  value: o,
1864
1864
  name: i,
1865
- onChange: (T) => _(T.target.value),
1866
- disabled: v,
1865
+ onChange: (T) => v(T.target.value),
1866
+ disabled: _,
1867
1867
  error: g.touched && !g.valid,
1868
1868
  helperText: g.touched && !g.valid && g.errorMsg,
1869
1869
  multiline: y,
@@ -1886,7 +1886,7 @@ const cr = (e) => {
1886
1886
  variant: f = "outlined",
1887
1887
  loading: c,
1888
1888
  multiple: h,
1889
- placeholder: v,
1889
+ placeholder: _,
1890
1890
  errMsg: y
1891
1891
  }) => {
1892
1892
  var T, E;
@@ -1896,7 +1896,7 @@ const cr = (e) => {
1896
1896
  errorMsg: y || (o ? ((T = u == null ? void 0 : u.validation) == null ? void 0 : T.required) || "Required" : void 0)
1897
1897
  }), l = Z(() => {
1898
1898
  g.touched || b((D) => ({ ...D, touched: !0, errorMsg: y || D.errorMsg }));
1899
- }, [y, g.touched]), _ = Z(
1899
+ }, [y, g.touched]), v = Z(
1900
1900
  (D) => {
1901
1901
  var m;
1902
1902
  const k = D;
@@ -1906,8 +1906,8 @@ const cr = (e) => {
1906
1906
  [y, h, n, i, o, (E = u == null ? void 0 : u.validation) == null ? void 0 : E.required]
1907
1907
  );
1908
1908
  return te(() => {
1909
- d && _(t);
1910
- }, [_, d, t]), /* @__PURE__ */ M(Y, { children: [
1909
+ d && v(t);
1910
+ }, [v, d, t]), /* @__PURE__ */ M(Y, { children: [
1911
1911
  /* @__PURE__ */ M(
1912
1912
  gn,
1913
1913
  {
@@ -1924,7 +1924,7 @@ const cr = (e) => {
1924
1924
  labelId: `input_${n}`,
1925
1925
  value: t,
1926
1926
  onBlur: l,
1927
- onChange: (D) => _(D.target.value),
1927
+ onChange: (D) => v(D.target.value),
1928
1928
  IconComponent: c ? () => /* @__PURE__ */ r(Et, { size: 5 }) : Hn,
1929
1929
  multiple: !!h,
1930
1930
  classes: {
@@ -1937,7 +1937,7 @@ const cr = (e) => {
1937
1937
  if (h) {
1938
1938
  for (const S of e)
1939
1939
  D.includes(S.value) && k.push([S.text]);
1940
- return h === "chips" ? k.map((S, I) => /* @__PURE__ */ r(_n, { label: S, style: { margin: "0 2px" }, color: "primary" }, `${S}_${I}`)) : k.join(",");
1940
+ return h === "chips" ? k.map((S, I) => /* @__PURE__ */ r(vn, { label: S, style: { margin: "0 2px" }, color: "primary" }, `${S}_${I}`)) : k.join(",");
1941
1941
  } else {
1942
1942
  for (const S of e)
1943
1943
  D === S.value && k.push([S.text]);
@@ -1945,7 +1945,7 @@ const cr = (e) => {
1945
1945
  }
1946
1946
  },
1947
1947
  children: [
1948
- v && /* @__PURE__ */ r(Le, { value: "", children: /* @__PURE__ */ r("em", { children: v }) }),
1948
+ _ && /* @__PURE__ */ r(Le, { value: "", children: /* @__PURE__ */ r("em", { children: _ }) }),
1949
1949
  e.map((D) => /* @__PURE__ */ M(Le, { value: D.value, children: [
1950
1950
  h && /* @__PURE__ */ r(mn, { checked: t.indexOf(D.value) > -1, color: "primary" }),
1951
1951
  D.text
@@ -1956,7 +1956,7 @@ const cr = (e) => {
1956
1956
  ]
1957
1957
  }
1958
1958
  ),
1959
- /* @__PURE__ */ r(vn, { style: { color: p.palette.error.main }, children: g.touched && !g.valid && g.errorMsg })
1959
+ /* @__PURE__ */ r(_n, { style: { color: p.palette.error.main }, children: g.touched && !g.valid && g.errorMsg })
1960
1960
  ] });
1961
1961
  }, ht = (e, t) => {
1962
1962
  var o;
@@ -2015,10 +2015,10 @@ const cr = (e) => {
2015
2015
  onConfirm: f,
2016
2016
  customEditor: c,
2017
2017
  confirmEvent: h,
2018
- dialogMaxWidth: v,
2018
+ dialogMaxWidth: _,
2019
2019
  translations: y,
2020
2020
  timeZone: p
2021
- } = O(), [u, g] = L(ht(e, i || o)), [b, l] = L(!1), _ = ne(), T = Ct(_.breakpoints.down("sm")), E = (m, w, x) => {
2021
+ } = O(), [u, g] = L(ht(e, i || o)), [b, l] = L(!1), v = ne(), T = Ct(v.breakpoints.down("sm")), E = (m, w, x) => {
2022
2022
  g((C) => ({
2023
2023
  ...C,
2024
2024
  [m]: { ...C[m], value: w, validity: x }
@@ -2045,7 +2045,7 @@ const cr = (e) => {
2045
2045
  switch (w.type) {
2046
2046
  case "input":
2047
2047
  return /* @__PURE__ */ r(
2048
- vr,
2048
+ _r,
2049
2049
  {
2050
2050
  value: w.value,
2051
2051
  name: m,
@@ -2057,7 +2057,7 @@ const cr = (e) => {
2057
2057
  );
2058
2058
  case "date":
2059
2059
  return /* @__PURE__ */ r(
2060
- _r,
2060
+ vr,
2061
2061
  {
2062
2062
  value: w.value,
2063
2063
  name: m,
@@ -2068,13 +2068,13 @@ const cr = (e) => {
2068
2068
  }
2069
2069
  );
2070
2070
  case "select":
2071
- const R = e.find((z) => z.name === m);
2071
+ const A = e.find((z) => z.name === m);
2072
2072
  return /* @__PURE__ */ r(
2073
2073
  br,
2074
2074
  {
2075
2075
  value: w.value,
2076
2076
  name: m,
2077
- options: (R == null ? void 0 : R.options) || [],
2077
+ options: (A == null ? void 0 : A.options) || [],
2078
2078
  onChange: E,
2079
2079
  touched: b,
2080
2080
  ...w.config,
@@ -2090,7 +2090,7 @@ const cr = (e) => {
2090
2090
  {
2091
2091
  open: t,
2092
2092
  fullScreen: T,
2093
- maxWidth: v,
2093
+ maxWidth: _,
2094
2094
  onClose: () => {
2095
2095
  n(!1);
2096
2096
  },
@@ -2132,19 +2132,19 @@ const cr = (e) => {
2132
2132
  alwaysShowAgendaDays: f,
2133
2133
  stickyNavigationOffset: c,
2134
2134
  stickyNavigationHeight: h
2135
- } = O(), { disableGoToDay: v, headRenderer: y } = n, p = Jt(a), u = Array.from({ length: p }, (b, l) => l + 1), g = U(() => e.filter((b) => Dt(b.start, a)), [e, a]);
2136
- return !f && !g.length ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Re, { stickyOffset: c, stickyHeight: h, children: u.map((b) => {
2137
- const l = new Date(a.getFullYear(), a.getMonth(), b), _ = he({ dateLeft: l, timeZone: s }), T = Ie(e, l);
2138
- return !f && !T.length ? null : /* @__PURE__ */ M("div", { className: `rs__agenda_row ${_e(l) ? "rs__today_cell" : ""}`, children: [
2135
+ } = O(), { disableGoToDay: _, headRenderer: y } = n, p = Jt(a), u = Array.from({ length: p }, (b, l) => l + 1), g = U(() => e.filter((b) => Dt(b.start, a)), [e, a]);
2136
+ return !f && !g.length ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Ae, { stickyOffset: c, stickyHeight: h, children: u.map((b) => {
2137
+ const l = new Date(a.getFullYear(), a.getMonth(), b), v = he({ dateLeft: l, timeZone: s }), T = Ie(e, l);
2138
+ return !f && !T.length ? null : /* @__PURE__ */ M("div", { className: `rs__agenda_row ${ve(l) ? "rs__today_cell" : ""}`, children: [
2139
2139
  /* @__PURE__ */ r("div", { className: "rs__cell rs__agenda__cell", children: typeof y == "function" ? /* @__PURE__ */ r("div", { children: y({ day: l, events: e, resource: t }) }) : /* @__PURE__ */ r(
2140
2140
  F,
2141
2141
  {
2142
- sx: { fontWeight: _ ? "bold" : "inherit" },
2143
- color: _ ? "primary" : "inherit",
2142
+ sx: { fontWeight: v ? "bold" : "inherit" },
2143
+ color: v ? "primary" : "inherit",
2144
2144
  variant: "body2",
2145
- className: v ? "" : "rs__hover__op",
2145
+ className: _ ? "" : "rs__hover__op",
2146
2146
  onClick: (E) => {
2147
- E.stopPropagation(), v || o(l);
2147
+ E.stopPropagation(), _ || o(l);
2148
2148
  },
2149
2149
  children: N(l, "dd E", { locale: i })
2150
2150
  }
@@ -2162,24 +2162,24 @@ const cr = (e) => {
2162
2162
  onViewMore: a,
2163
2163
  cellHeight: d
2164
2164
  }) => {
2165
- const f = Math.round((d - ut) / pe - 1), { translations: c, month: h, locale: v, timeZone: y } = O(), { renderedSlots: p } = Bt(), u = U(() => {
2165
+ const f = Math.round((d - ut) / pe - 1), { translations: c, month: h, locale: _, timeZone: y } = O(), { renderedSlots: p } = Bt(), u = U(() => {
2166
2166
  var b;
2167
2167
  const g = [];
2168
2168
  for (let l = 0; l < Math.min(e.length, f + 1); l++) {
2169
- const _ = Oe(e[l], y), T = !!i && me(_.start, i), E = T && i ? i : _.start;
2170
- let D = ae(E, _.end) + 1;
2171
- const k = Kt(_.end, E, {
2169
+ const v = Oe(e[l], y), T = !!i && me(v.start, i), E = T && i ? i : v.start;
2170
+ let D = ae(E, v.end) + 1;
2171
+ const k = Kt(v.end, E, {
2172
2172
  weekStartsOn: h == null ? void 0 : h.weekStartOn,
2173
- locale: v
2173
+ locale: _
2174
2174
  }) > 0;
2175
2175
  if (k) {
2176
- const x = $e(_.start, {
2176
+ const x = $e(v.start, {
2177
2177
  weekStartsOn: h == null ? void 0 : h.weekStartOn,
2178
- locale: v
2178
+ locale: _
2179
2179
  }), C = en(x, o);
2180
- C && (D = s.length - (i ? 0 : _t(_.start, C)));
2180
+ C && (D = s.length - (i ? 0 : vt(v.start, C)));
2181
2181
  }
2182
- const S = N(n, "yyyy-MM-dd"), I = (b = p == null ? void 0 : p[t || "all"]) == null ? void 0 : b[S], m = (I == null ? void 0 : I[_.event_id]) || 0, w = Math.min(m, f) * pe + ut;
2182
+ const S = N(n, "yyyy-MM-dd"), I = (b = p == null ? void 0 : p[t || "all"]) == null ? void 0 : b[S], m = (I == null ? void 0 : I[v.event_id]) || 0, w = Math.min(m, f) * pe + ut;
2183
2183
  if (m >= f) {
2184
2184
  g.push(
2185
2185
  /* @__PURE__ */ r(
@@ -2211,15 +2211,15 @@ const cr = (e) => {
2211
2211
  children: /* @__PURE__ */ r(
2212
2212
  He,
2213
2213
  {
2214
- event: _,
2214
+ event: v,
2215
2215
  showdate: !1,
2216
- multiday: ae(_.start, _.end) > 0,
2216
+ multiday: ae(v.start, v.end) > 0,
2217
2217
  hasPrev: T,
2218
2218
  hasNext: k
2219
2219
  }
2220
2220
  )
2221
2221
  },
2222
- `${_.event_id}_${l}`
2222
+ `${v.event_id}_${l}`
2223
2223
  )
2224
2224
  );
2225
2225
  }
@@ -2231,7 +2231,7 @@ const cr = (e) => {
2231
2231
  f,
2232
2232
  i,
2233
2233
  h == null ? void 0 : h.weekStartOn,
2234
- v,
2234
+ _,
2235
2235
  n,
2236
2236
  o,
2237
2237
  s.length,
@@ -2250,23 +2250,23 @@ const cr = (e) => {
2250
2250
  resourceFields: f,
2251
2251
  fields: c,
2252
2252
  locale: h,
2253
- hourFormat: v,
2253
+ hourFormat: _,
2254
2254
  stickyNavigation: y,
2255
2255
  timeZone: p,
2256
2256
  onClickMore: u,
2257
2257
  stickyNavigationOffset: g,
2258
2258
  stickyNavigationHeight: b
2259
- } = O(), { weekDays: l, startHour: _, endHour: T, cellRenderer: E, headRenderer: D, disableGoToDay: k } = i, { headersRef: S, bodyRef: I } = Wt(), m = ne(), w = Ze(s), x = De(v), C = o / n.length, W = Z(
2260
- (R) => {
2261
- let z = Ae(a);
2262
- R && (z = Ce(a, R, f, c));
2259
+ } = O(), { weekDays: l, startHour: v, endHour: T, cellRenderer: E, headRenderer: D, disableGoToDay: k } = i, { headersRef: S, bodyRef: I } = Wt(), m = ne(), w = Ze(s), x = De(_), C = o / n.length, W = Z(
2260
+ (A) => {
2261
+ let z = Re(a);
2262
+ A && (z = Ce(a, A, f, c));
2263
2263
  const J = [];
2264
2264
  for (const re of n) {
2265
2265
  const K = l.map((le) => {
2266
- const P = Q(re, le), fe = /* @__PURE__ */ new Date(`${N(ot(P, _), `yyyy/MM/dd ${x}`)}`), V = /* @__PURE__ */ new Date(`${N(ot(P, T), `yyyy/MM/dd ${x}`)}`), $ = f.idField, A = ye(re, P) ? P : null, G = z.flatMap((H) => It(H, P)).filter((H) => {
2266
+ const P = Q(re, le), fe = /* @__PURE__ */ new Date(`${N(ot(P, v), `yyyy/MM/dd ${x}`)}`), V = /* @__PURE__ */ new Date(`${N(ot(P, T), `yyyy/MM/dd ${x}`)}`), $ = f.idField, R = ye(re, P) ? P : null, G = z.flatMap((H) => It(H, P)).filter((H) => {
2267
2267
  if (ye(H.start, P)) return !0;
2268
2268
  const ce = { start: X(H.start), end: q(H.end) };
2269
- return !!(A && j(A, ce));
2269
+ return !!(R && j(R, ce));
2270
2270
  }), oe = he({ dateLeft: P, timeZone: p });
2271
2271
  return /* @__PURE__ */ M("span", { style: { height: C }, className: "rs__cell", children: [
2272
2272
  /* @__PURE__ */ r(
@@ -2277,12 +2277,12 @@ const cr = (e) => {
2277
2277
  day: s,
2278
2278
  height: C,
2279
2279
  resourceKey: $,
2280
- resourceVal: R ? R[$] : null,
2280
+ resourceVal: A ? A[$] : null,
2281
2281
  cellRenderer: E
2282
2282
  }
2283
2283
  ),
2284
2284
  /* @__PURE__ */ M(ie, { children: [
2285
- typeof D == "function" ? /* @__PURE__ */ r("div", { style: { position: "absolute", top: 0 }, children: D({ day: P, events: z, resource: R }) }) : /* @__PURE__ */ r(
2285
+ typeof D == "function" ? /* @__PURE__ */ r("div", { style: { position: "absolute", top: 0 }, children: D({ day: P, events: z, resource: A }) }) : /* @__PURE__ */ r(
2286
2286
  qe,
2287
2287
  {
2288
2288
  style: {
@@ -2311,10 +2311,10 @@ const cr = (e) => {
2311
2311
  xr,
2312
2312
  {
2313
2313
  events: G,
2314
- resourceId: R == null ? void 0 : R[$],
2314
+ resourceId: A == null ? void 0 : A[$],
2315
2315
  today: P,
2316
2316
  eachWeekStart: n,
2317
- eachFirstDayInCalcRow: A,
2317
+ eachFirstDayInCalcRow: R,
2318
2318
  daysList: e,
2319
2319
  onViewMore: (H) => {
2320
2320
  u && typeof u == "function" ? u(H, d) : d(H);
@@ -2345,7 +2345,7 @@ const cr = (e) => {
2345
2345
  u,
2346
2346
  f,
2347
2347
  s,
2348
- _,
2348
+ v,
2349
2349
  m.palette.secondary.contrastText,
2350
2350
  m.palette.secondary.main,
2351
2351
  p,
@@ -2363,13 +2363,13 @@ const cr = (e) => {
2363
2363
  stickyNavigation: y,
2364
2364
  stickyOffset: g,
2365
2365
  stickyHeight: b,
2366
- children: e.map((R, z) => /* @__PURE__ */ r(
2366
+ children: e.map((A, z) => /* @__PURE__ */ r(
2367
2367
  F,
2368
2368
  {
2369
2369
  className: "rs__cell rs__header rs__header__center",
2370
2370
  align: "center",
2371
2371
  variant: "body2",
2372
- children: N(R, "EE", { locale: h })
2372
+ children: N(A, "EE", { locale: h })
2373
2373
  },
2374
2374
  z
2375
2375
  ))
@@ -2389,23 +2389,23 @@ const cr = (e) => {
2389
2389
  resourceFields: d,
2390
2390
  fields: f,
2391
2391
  agenda: c
2392
- } = O(), { weekStartOn: h, weekDays: v } = e, y = Ze(t), p = bt(t), u = tn(
2392
+ } = O(), { weekStartOn: h, weekDays: _ } = e, y = Ze(t), p = bt(t), u = tn(
2393
2393
  {
2394
2394
  start: y,
2395
2395
  end: p
2396
2396
  },
2397
2397
  { weekStartsOn: h }
2398
- ), g = v.map((_) => Q(u[0], _)), b = Z(async () => {
2398
+ ), g = _.map((v) => Q(u[0], v)), b = Z(async () => {
2399
2399
  try {
2400
2400
  i(!0);
2401
- const _ = u[0], T = Q(u[u.length - 1], g.length), E = await o({
2402
- start: _,
2401
+ const v = u[0], T = Q(u[u.length - 1], g.length), E = await o({
2402
+ start: v,
2403
2403
  end: T,
2404
2404
  view: "month"
2405
2405
  });
2406
2406
  E && (E != null && E.length) && s(E, "events");
2407
- } catch (_) {
2408
- throw _;
2407
+ } catch (v) {
2408
+ throw v;
2409
2409
  } finally {
2410
2410
  i(!1);
2411
2411
  }
@@ -2414,12 +2414,12 @@ const cr = (e) => {
2414
2414
  o instanceof Function && b();
2415
2415
  }, [b, o]);
2416
2416
  const l = Z(
2417
- (_) => {
2417
+ (v) => {
2418
2418
  if (c) {
2419
- let T = Ae(n);
2420
- return _ && (T = Ce(n, _, d, f)), /* @__PURE__ */ r(Dr, { resource: _, events: T });
2419
+ let T = Re(n);
2420
+ return v && (T = Ce(n, v, d, f)), /* @__PURE__ */ r(Dr, { resource: v, events: T });
2421
2421
  }
2422
- return /* @__PURE__ */ r(kr, { daysList: g, eachWeekStart: u, resource: _ });
2422
+ return /* @__PURE__ */ r(kr, { daysList: g, eachWeekStart: u, resource: v });
2423
2423
  },
2424
2424
  [c, g, u, n, f, d]
2425
2425
  );
@@ -2434,7 +2434,7 @@ const cr = (e) => {
2434
2434
  stickyNavigationOffset: d,
2435
2435
  stickyNavigationHeight: f
2436
2436
  } = O(), { headRenderer: c } = n, h = U(() => Ie(e, i), [e, i]);
2437
- return !a && !h.length ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Re, { stickyOffset: d, stickyHeight: f, children: /* @__PURE__ */ M("div", { className: "rs__agenda_row rs__today_cell", children: [
2437
+ return !a && !h.length ? /* @__PURE__ */ r(Je, {}) : /* @__PURE__ */ r(Ae, { stickyOffset: d, stickyHeight: f, children: /* @__PURE__ */ M("div", { className: "rs__agenda_row rs__today_cell", children: [
2438
2438
  /* @__PURE__ */ r("div", { className: "rs__cell rs__agenda__cell", children: typeof c == "function" ? /* @__PURE__ */ r("div", { children: c({ day: i, events: e, resource: t }) }) : /* @__PURE__ */ r(F, { variant: "body2", children: N(i, "dd E", { locale: o }) }) }),
2439
2439
  /* @__PURE__ */ r("div", { className: "rs__cell rs__agenda_items", children: h.length > 0 ? /* @__PURE__ */ r(Qe, { day: i, events: h }) : /* @__PURE__ */ r(F, { sx: { padding: 1 }, children: s.noDataToDisplay }) })
2440
2440
  ] }) });
@@ -2451,33 +2451,33 @@ const cr = (e) => {
2451
2451
  resourceFields: f,
2452
2452
  resourceViewMode: c,
2453
2453
  fields: h,
2454
- direction: v,
2454
+ direction: _,
2455
2455
  locale: y,
2456
2456
  hourFormat: p,
2457
2457
  timeZone: u,
2458
2458
  stickyNavigation: g,
2459
2459
  agenda: b,
2460
2460
  stickyNavigationOffset: l,
2461
- stickyNavigationHeight: _,
2461
+ stickyNavigationHeight: v,
2462
2462
  currentTime: T,
2463
2463
  showCurrentTimeBar: E,
2464
2464
  currentTimeBarColor: D,
2465
2465
  forceInlineMultiDay: k
2466
- } = O(), { startHour: S, endHour: I, step: m, cellRenderer: w, headRenderer: x, hourRenderer: C } = e, W = ke(t, { hours: S, minutes: 0, seconds: 0 }), R = ke(t, { hours: I, minutes: -m, seconds: 0 }), z = vt(
2466
+ } = O(), { startHour: S, endHour: I, step: m, cellRenderer: w, headRenderer: x, hourRenderer: C } = e, W = ke(t, { hours: S, minutes: 0, seconds: 0 }), A = ke(t, { hours: I, minutes: -m, seconds: 0 }), z = _t(
2467
2467
  {
2468
2468
  start: W,
2469
- end: R
2469
+ end: A
2470
2470
  },
2471
2471
  { step: m }
2472
2472
  ), J = Mt(o, z.length), re = St(J, m), K = De(p), le = Z(async () => {
2473
2473
  try {
2474
2474
  s(!0);
2475
- const V = Q(W, -1), $ = Q(R, 1), A = await i({
2475
+ const V = Q(W, -1), $ = Q(A, 1), R = await i({
2476
2476
  start: V,
2477
2477
  end: $,
2478
2478
  view: "day"
2479
2479
  });
2480
- A && (A != null && A.length) && a(A, "events");
2480
+ R && (R != null && R.length) && a(R, "events");
2481
2481
  } catch (V) {
2482
2482
  throw V;
2483
2483
  } finally {
@@ -2489,14 +2489,20 @@ const cr = (e) => {
2489
2489
  }, [le, i]);
2490
2490
  const P = Z(
2491
2491
  (V) => {
2492
- const $ = Ne(V, t, u, k);
2492
+ const $ = Ne(
2493
+ V,
2494
+ t,
2495
+ u,
2496
+ void 0,
2497
+ k
2498
+ );
2493
2499
  return /* @__PURE__ */ r(
2494
2500
  "div",
2495
2501
  {
2496
2502
  className: "rs__block_col",
2497
2503
  style: { height: pe * $.length },
2498
- children: $.map((A, G) => {
2499
- const oe = me(A.start, X(t)), H = Se(A.end, q(t));
2504
+ children: $.map((R, G) => {
2505
+ const oe = me(R.start, X(t)), H = Se(R.end, q(t));
2500
2506
  return /* @__PURE__ */ r(
2501
2507
  "div",
2502
2508
  {
@@ -2506,9 +2512,9 @@ const cr = (e) => {
2506
2512
  width: "99.9%",
2507
2513
  overflowX: "hidden"
2508
2514
  },
2509
- children: /* @__PURE__ */ r(He, { event: A, multiday: !0, hasPrev: oe, hasNext: H })
2515
+ children: /* @__PURE__ */ r(He, { event: R, multiday: !0, hasPrev: oe, hasNext: H })
2510
2516
  },
2511
- A.event_id
2517
+ R.event_id
2512
2518
  );
2513
2519
  })
2514
2520
  }
@@ -2520,10 +2526,11 @@ const cr = (e) => {
2520
2526
  let $ = n;
2521
2527
  if (V && ($ = Ce(n, V, f, h)), b)
2522
2528
  return /* @__PURE__ */ r(Cr, { resource: V, events: $ });
2523
- const A = d.length && c === "default", G = Ne(
2524
- A ? n : $,
2529
+ const R = d.length && c === "default", G = Ne(
2530
+ R ? n : $,
2525
2531
  t,
2526
2532
  u,
2533
+ void 0,
2527
2534
  k
2528
2535
  ), oe = pe * G.length + 45;
2529
2536
  return /* @__PURE__ */ M(Y, { children: [
@@ -2534,13 +2541,13 @@ const cr = (e) => {
2534
2541
  sticky: "1",
2535
2542
  stickyNavigation: g,
2536
2543
  stickyOffset: l,
2537
- stickyHeight: _,
2544
+ stickyHeight: v,
2538
2545
  children: [
2539
2546
  /* @__PURE__ */ r("span", { className: "rs__cell" }),
2540
2547
  /* @__PURE__ */ M(
2541
2548
  "span",
2542
2549
  {
2543
- className: `rs__cell rs__header ${_e(t) ? "rs__today_cell" : ""}`,
2550
+ className: `rs__cell rs__header ${ve(t) ? "rs__today_cell" : ""}`,
2544
2551
  style: { height: oe },
2545
2552
  children: [
2546
2553
  typeof x == "function" ? /* @__PURE__ */ r("div", { children: x({ day: t, events: $, resource: V }) }) : /* @__PURE__ */ r(Pt, { date: t, locale: y }),
@@ -2555,7 +2562,7 @@ const cr = (e) => {
2555
2562
  const B = /* @__PURE__ */ new Date(`${N(t, "yyyy/MM/dd")} ${N(H, K)}`), ge = de(B, m), xe = f.idField;
2556
2563
  return /* @__PURE__ */ M(ie, { children: [
2557
2564
  /* @__PURE__ */ r("span", { className: "rs__cell rs__header rs__time", style: { height: J }, children: typeof C == "function" ? /* @__PURE__ */ r("div", { children: C(N(H, K, { locale: y })) }) : /* @__PURE__ */ r(F, { variant: "caption", children: N(H, K, { locale: y }) }) }),
2558
- /* @__PURE__ */ M("span", { className: `rs__cell ${_e(t) ? "rs__today_cell" : ""}`, children: [
2565
+ /* @__PURE__ */ M("span", { className: `rs__cell ${ve(t) ? "rs__today_cell" : ""}`, children: [
2559
2566
  ce === 0 && /* @__PURE__ */ r(
2560
2567
  Lt,
2561
2568
  {
@@ -2570,7 +2577,7 @@ const cr = (e) => {
2570
2577
  startHour: S,
2571
2578
  endHour: I,
2572
2579
  step: m,
2573
- direction: v,
2580
+ direction: _,
2574
2581
  timeZone: u,
2575
2582
  currentTime: T,
2576
2583
  showCurrentTimeBar: E,
@@ -2600,7 +2607,7 @@ const cr = (e) => {
2600
2607
  W,
2601
2608
  b,
2602
2609
  w,
2603
- v,
2610
+ _,
2604
2611
  I,
2605
2612
  n,
2606
2613
  h,
@@ -2643,7 +2650,7 @@ const cr = (e) => {
2643
2650
  }
2644
2651
  return t;
2645
2652
  }, gt = (e, t, n, o, i) => {
2646
- const s = i === "month" ? Ot(e) : Ae(e), a = {};
2653
+ const s = i === "month" ? Ot(e) : Re(e), a = {};
2647
2654
  if (t.length)
2648
2655
  for (const d of t) {
2649
2656
  const f = Ce(s, d, n, o), c = ft(f);
@@ -2668,9 +2675,9 @@ const cr = (e) => {
2668
2675
  )
2669
2676
  }));
2670
2677
  }, [t, i, o, n, s]);
2671
- const f = (c, h, v, y) => {
2678
+ const f = (c, h, _, y) => {
2672
2679
  d((p) => {
2673
- var u, g, b, l, _;
2680
+ var u, g, b, l, v;
2674
2681
  return {
2675
2682
  ...p,
2676
2683
  renderedSlots: {
@@ -2678,9 +2685,9 @@ const cr = (e) => {
2678
2685
  [y || "all"]: {
2679
2686
  ...(u = p.renderedSlots) == null ? void 0 : u[y || "all"],
2680
2687
  [c]: (b = (g = p.renderedSlots) == null ? void 0 : g[y || "all"]) != null && b[c] ? {
2681
- ...(_ = (l = p.renderedSlots) == null ? void 0 : l[y || "all"]) == null ? void 0 : _[c],
2682
- [h]: v
2683
- } : { [h]: v }
2688
+ ...(v = (l = p.renderedSlots) == null ? void 0 : l[y || "all"]) == null ? void 0 : v[c],
2689
+ [h]: _
2690
+ } : { [h]: _ }
2684
2691
  }
2685
2692
  }
2686
2693
  };
@@ -2697,7 +2704,7 @@ const cr = (e) => {
2697
2704
  }
2698
2705
  );
2699
2706
  }, Mr = mt(function(t, n) {
2700
- const o = O(), { view: i, dialog: s, loading: a, loadingComponent: d, resourceViewMode: f, resources: c, translations: h } = o, v = U(() => {
2707
+ const o = O(), { view: i, dialog: s, loading: a, loadingComponent: d, resourceViewMode: f, resources: c, translations: h } = o, _ = U(() => {
2701
2708
  switch (i) {
2702
2709
  case "month":
2703
2710
  return /* @__PURE__ */ r(Tr, {});
@@ -2736,7 +2743,7 @@ const cr = (e) => {
2736
2743
  flexDirection: f === "vertical" ? "column" : void 0
2737
2744
  },
2738
2745
  "data-testid": "grid",
2739
- children: /* @__PURE__ */ r(Sr, { children: v })
2746
+ children: /* @__PURE__ */ r(Sr, { children: _ })
2740
2747
  }
2741
2748
  ),
2742
2749
  s && /* @__PURE__ */ r(wr, {})
@@ -2751,9 +2758,17 @@ const cr = (e) => {
2751
2758
  onEventDrop: t.onEventDrop,
2752
2759
  customEditor: t.customEditor,
2753
2760
  customHeaderContent: t.customHeaderContent,
2754
- events: t.events || []
2761
+ // Only sync events if NOT using getRemoteEvents
2762
+ // Otherwise, let the internal state manage events
2763
+ ...t.getRemoteEvents ? {} : { events: t.events || [] }
2755
2764
  }));
2756
- }, [t.onEventDrop, t.customEditor, t.events, t.customHeaderContent]), te(() => {
2765
+ }, [
2766
+ t.onEventDrop,
2767
+ t.customEditor,
2768
+ t.events,
2769
+ t.customHeaderContent,
2770
+ t.getRemoteEvents
2771
+ ]), te(() => {
2757
2772
  typeof t.loading < "u" && o((p) => ({ ...p, loading: t.loading }));
2758
2773
  }, [t.loading]);
2759
2774
  const i = (p, u) => {
@@ -2787,31 +2802,31 @@ const cr = (e) => {
2787
2802
  }, h = (p, u) => {
2788
2803
  let g;
2789
2804
  u === "edit" ? Array.isArray(p) ? g = n.events.map((b) => {
2790
- const l = p.find((_) => _.event_id === b.event_id);
2805
+ const l = p.find((v) => v.event_id === b.event_id);
2791
2806
  return l ? { ...b, ...l } : b;
2792
2807
  }) : g = n.events.map(
2793
2808
  (b) => b.event_id === p.event_id ? { ...b, ...p } : b
2794
2809
  ) : g = n.events.concat(p), o((b) => ({ ...b, events: g }));
2795
- }, v = (p) => {
2810
+ }, _ = (p) => {
2796
2811
  o((u) => ({ ...u, currentDragged: p }));
2797
2812
  }, y = async (p, u, g, b, l) => {
2798
2813
  var I;
2799
- const _ = n.events.find((m) => typeof m.event_id == "number" ? m.event_id === +u : m.event_id === u), T = n.fields.find((m) => m.name === b), E = !!((I = T == null ? void 0 : T.config) != null && I.multiple);
2814
+ const v = n.events.find((m) => typeof m.event_id == "number" ? m.event_id === +u : m.event_id === u), T = n.fields.find((m) => m.name === b), E = !!((I = T == null ? void 0 : T.config) != null && I.multiple);
2800
2815
  let D = l;
2801
2816
  if (T) {
2802
- const m = _[b], w = Ve(T, m, _).value;
2817
+ const m = v[b], w = Ve(T, m, v).value;
2803
2818
  if (E)
2804
2819
  if (w.includes(l)) {
2805
- if (it(_.start, g))
2820
+ if (it(v.start, g))
2806
2821
  return;
2807
2822
  D = w;
2808
2823
  } else
2809
2824
  D = w.length > 1 ? [...w, l] : [l];
2810
2825
  }
2811
- if (it(_.start, g) && (!D || !E && D === _[b]))
2826
+ if (it(v.start, g) && (!D || !E && D === v[b]))
2812
2827
  return;
2813
- const k = Fe(_.end, _.start), S = {
2814
- ..._,
2828
+ const k = Fe(v.end, v.start), S = {
2829
+ ...v,
2815
2830
  start: g,
2816
2831
  end: de(g, k),
2817
2832
  recurring: void 0,
@@ -2821,14 +2836,14 @@ const cr = (e) => {
2821
2836
  return h(S, "edit");
2822
2837
  try {
2823
2838
  f(!0);
2824
- const m = await n.onEventDrop(p, g, S, _);
2839
+ const m = await n.onEventDrop(p, g, S, v);
2825
2840
  m && h(m, "edit");
2826
2841
  } finally {
2827
2842
  f(!1);
2828
2843
  }
2829
2844
  };
2830
2845
  return /* @__PURE__ */ r(
2831
- At.Provider,
2846
+ Rt.Provider,
2832
2847
  {
2833
2848
  value: {
2834
2849
  ...n,
@@ -2839,7 +2854,7 @@ const cr = (e) => {
2839
2854
  triggerLoading: f,
2840
2855
  handleGotoDay: c,
2841
2856
  confirmEvent: h,
2842
- setCurrentDragged: v,
2857
+ setCurrentDragged: _,
2843
2858
  onDrop: y
2844
2859
  },
2845
2860
  children: e