@baishuyun/ui-mobile 0.6.1 → 0.8.0

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 (48) hide show
  1. package/dist/AMap/{AMap-DwrSlwyV.js → AMap-BwIa29WQ.js} +2 -2
  2. package/dist/AMap/index.js +4 -4
  3. package/dist/ActionSheet/ActionSheet-8cPpwho3.js +85 -0
  4. package/dist/ActionSheet/index.js +6 -4
  5. package/dist/Calendar/{Calendar-Bd6CS8y7.js → Calendar-B9IuDHRd.js} +611 -596
  6. package/dist/Calendar/{timeUtils-t4A3-Hr6.js → cssVars-E8Cq0tta.js} +3 -1
  7. package/dist/Calendar/index.js +4 -4
  8. package/dist/ConfigProvider/{ConfigProvider-DnlakyRE.js → ConfigProvider-CCXPxdJt.js} +29 -21
  9. package/dist/ConfigProvider/index.js +4 -3
  10. package/dist/ConfigProvider/{useLocale-CP8NRZoj.js → useLocale-D12uIZ9q.js} +1 -0
  11. package/dist/Gantt/{Gantt-CR7eRNVP.js → Gantt-fRNTYViS.js} +384 -379
  12. package/dist/Gantt/index.js +8 -6
  13. package/dist/Icon/{Icon-CFvcrGGg.js → Icon-OUPXAIEn.js} +1 -1
  14. package/dist/Icon/index.js +2 -2
  15. package/dist/Overlay/Overlay-YzAfhILA.js +61 -0
  16. package/dist/Overlay/index.js +3 -0
  17. package/dist/Popup/Popup-C1uwPnxj.js +78 -0
  18. package/dist/Popup/index.js +5 -0
  19. package/dist/components/ActionSheet/ActionSheet.d.ts +1 -1
  20. package/dist/components/ActionSheet/interface.d.ts +1 -2
  21. package/dist/components/Calendar/context/CalendarContext.d.ts +1 -3
  22. package/dist/components/Calendar/index.d.ts +1 -1
  23. package/dist/components/Calendar/interface.d.ts +23 -2
  24. package/dist/components/Calendar/utils/colorUtils.d.ts +1 -2
  25. package/dist/components/Calendar/utils/index.d.ts +2 -1
  26. package/dist/components/Calendar/utils/theme/index.d.ts +1 -0
  27. package/dist/components/Calendar/utils/theme/resolveCalendarThemeVars.d.ts +4 -0
  28. package/dist/components/ConfigProvider/ConfigProvider.d.ts +1 -1
  29. package/dist/components/ConfigProvider/context.d.ts +14 -0
  30. package/dist/components/Gantt/index.d.ts +1 -1
  31. package/dist/components/Gantt/interface.d.ts +16 -0
  32. package/dist/components/Gantt/utils/theme/index.d.ts +1 -0
  33. package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +3 -0
  34. package/dist/components/Overlay/OverlayContext.d.ts +17 -0
  35. package/dist/components/Overlay/index.d.ts +2 -0
  36. package/dist/components/Popup/Popup.d.ts +3 -0
  37. package/dist/components/Popup/index.d.ts +2 -0
  38. package/dist/components/Popup/interface.d.ts +46 -0
  39. package/dist/components/index.d.ts +6 -2
  40. package/dist/index.js +12 -10
  41. package/dist/locale/lang/en-US.json.d.ts +3 -0
  42. package/dist/locale/lang/zh-CN.json.d.ts +3 -0
  43. package/dist/locale/lang/zh-TW.json.d.ts +3 -0
  44. package/dist/style.css +1 -1
  45. package/dist/utils/cssVars.d.ts +1 -0
  46. package/dist/vendors/{version-DsM7d69k.js → version-DdP63VFD.js} +1 -1
  47. package/package.json +2 -2
  48. package/dist/ActionSheet/ActionSheet-DbrKxa_y.js +0 -133
@@ -1,68 +1,66 @@
1
- import { t as e } from "../ConfigProvider/useLocale-CP8NRZoj.js";
2
- import { n as t, r as n, t as r } from "./timeUtils-t4A3-Hr6.js";
3
- import i, { createContext as a, forwardRef as o, useCallback as s, useContext as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
4
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
- import { useControllableValue as g, useLatest as _, useSize as v } from "ahooks";
6
- import y from "dayjs";
1
+ import { t as e } from "../ConfigProvider/useLocale-D12uIZ9q.js";
2
+ import { i as t, n, r, t as i } from "./cssVars-E8Cq0tta.js";
3
+ import a, { createContext as o, forwardRef as s, useCallback as c, useContext as l, useEffect as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
4
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { useControllableValue as _, useLatest as v, useSize as y } from "ahooks";
6
+ import b from "dayjs";
7
7
  //#region src/components/Calendar/Calendar.module.scss
8
- var b = {
9
- "bsy-mobile-calendar": "_bsy-mobile-calendar_12jhk_1",
10
- "bsy-mobile-calendar__body": "_bsy-mobile-calendar__body_12jhk_15"
11
- }, x = a(null), S = ({ children: n, currentDate: i, setCurrentDate: a, viewMode: o, setViewMode: c, scheduleColor: l, timeZone: u, events: f, onEventClick: p, onDayClick: h }) => {
12
- let { t: g } = e(), _ = d(() => t(u), [u]), v = s(() => {
13
- let e = r(u);
14
- y(i).isSame(e, "day") || a(e.toDate());
8
+ var x = {
9
+ "bsy-mobile-calendar": "_bsy-mobile-calendar_1c2fd_1",
10
+ "bsy-mobile-calendar__body": "_bsy-mobile-calendar__body_1c2fd_19"
11
+ }, S = o(null), C = ({ children: t, currentDate: i, setCurrentDate: a, viewMode: o, setViewMode: s, timeZone: l, events: u, onEventClick: d, onDayClick: p }) => {
12
+ let { t: m } = e(), g = f(() => r(l), [l]), _ = c(() => {
13
+ let e = n(l);
14
+ b(i).isSame(e, "day") || a(e.toDate());
15
15
  }, [
16
16
  i,
17
17
  a,
18
- u
19
- ]), b = d(() => g("calendar.yearMonth", {
18
+ l
19
+ ]), v = f(() => m("calendar.yearMonth", {
20
20
  year: i.getFullYear(),
21
- monthShort: g(`calendar.monthShort.${i.getMonth() + 1}`)
22
- }), [i, g]), S = d(() => ({
21
+ monthShort: m(`calendar.monthShort.${i.getMonth() + 1}`)
22
+ }), [i, m]), y = f(() => ({
23
23
  currentDate: i,
24
24
  setCurrentDate: a,
25
- goToToday: v,
25
+ goToToday: _,
26
26
  viewMode: o,
27
- setViewMode: c,
28
- yearMonthText: b,
29
- scheduleColor: l,
30
- timeZone: u,
31
- timezoneLabel: _,
32
- events: f,
33
- onEventClick: p,
34
- onDayClick: h
27
+ setViewMode: s,
28
+ yearMonthText: v,
29
+ timeZone: l,
30
+ timezoneLabel: g,
31
+ events: u,
32
+ onEventClick: d,
33
+ onDayClick: p
35
34
  }), [
36
35
  i,
37
36
  a,
38
- v,
37
+ _,
39
38
  o,
40
- c,
41
- b,
39
+ s,
40
+ v,
42
41
  l,
42
+ g,
43
43
  u,
44
- _,
45
- f,
46
- p,
47
- h
44
+ d,
45
+ p
48
46
  ]);
49
- return /* @__PURE__ */ m(x.Provider, {
50
- value: S,
51
- children: n
47
+ return /* @__PURE__ */ h(S.Provider, {
48
+ value: y,
49
+ children: t
52
50
  });
53
- }, C = () => {
54
- let e = c(x);
51
+ }, w = () => {
52
+ let e = l(S);
55
53
  if (!e) throw Error("useCalendarContext must be used within a CalendarProvider");
56
54
  return e;
57
- }, w = (...e) => e.filter(Boolean).join(" "), T = {
58
- "bsy-mobile-calendar-header": "_bsy-mobile-calendar-header_r7swj_1",
59
- "bsy-mobile-calendar-header__left": "_bsy-mobile-calendar-header__left_r7swj_12",
60
- "bsy-mobile-calendar-header__year-month": "_bsy-mobile-calendar-header__year-month_r7swj_18",
61
- "bsy-mobile-calendar-header__today": "_bsy-mobile-calendar-header__today_r7swj_23",
62
- "bsy-mobile-calendar-segmented": "_bsy-mobile-calendar-segmented_r7swj_33",
63
- "bsy-mobile-calendar-segmented__item": "_bsy-mobile-calendar-segmented__item_r7swj_39",
64
- "bsy-mobile-calendar-segmented__item--active": "_bsy-mobile-calendar-segmented__item--active_r7swj_50"
65
- }, E = [
55
+ }, T = (...e) => e.filter(Boolean).join(" "), E = {
56
+ "bsy-mobile-calendar-header": "_bsy-mobile-calendar-header_arzu9_1",
57
+ "bsy-mobile-calendar-header__left": "_bsy-mobile-calendar-header__left_arzu9_12",
58
+ "bsy-mobile-calendar-header__year-month": "_bsy-mobile-calendar-header__year-month_arzu9_18",
59
+ "bsy-mobile-calendar-header__today": "_bsy-mobile-calendar-header__today_arzu9_23",
60
+ "bsy-mobile-calendar-segmented": "_bsy-mobile-calendar-segmented_arzu9_33",
61
+ "bsy-mobile-calendar-segmented__item": "_bsy-mobile-calendar-segmented__item_arzu9_39",
62
+ "bsy-mobile-calendar-segmented__item--active": "_bsy-mobile-calendar-segmented__item--active_arzu9_50"
63
+ }, D = [
66
64
  {
67
65
  key: "calendar.viewDay",
68
66
  value: "day"
@@ -75,40 +73,40 @@ var b = {
75
73
  key: "calendar.viewMonth",
76
74
  value: "month"
77
75
  }
78
- ], D = () => {
79
- let { yearMonthText: t, goToToday: n, viewMode: r, setViewMode: i } = C(), { t: a } = e();
80
- return /* @__PURE__ */ h("div", {
81
- className: T["bsy-mobile-calendar-header"],
82
- children: [/* @__PURE__ */ h("div", {
83
- className: T["bsy-mobile-calendar-header__left"],
84
- children: [/* @__PURE__ */ m("span", {
85
- className: T["bsy-mobile-calendar-header__year-month"],
76
+ ], O = () => {
77
+ let { yearMonthText: t, goToToday: n, viewMode: r, setViewMode: i } = w(), { t: a } = e();
78
+ return /* @__PURE__ */ g("div", {
79
+ className: E["bsy-mobile-calendar-header"],
80
+ children: [/* @__PURE__ */ g("div", {
81
+ className: E["bsy-mobile-calendar-header__left"],
82
+ children: [/* @__PURE__ */ h("span", {
83
+ className: E["bsy-mobile-calendar-header__year-month"],
86
84
  children: t
87
- }), /* @__PURE__ */ m("button", {
88
- className: T["bsy-mobile-calendar-header__today"],
85
+ }), /* @__PURE__ */ h("button", {
86
+ className: E["bsy-mobile-calendar-header__today"],
89
87
  onClick: n,
90
88
  type: "button",
91
89
  children: a("calendar.today")
92
90
  })]
93
- }), /* @__PURE__ */ m("div", {
94
- className: T["bsy-mobile-calendar-segmented"],
91
+ }), /* @__PURE__ */ h("div", {
92
+ className: E["bsy-mobile-calendar-segmented"],
95
93
  role: "tablist",
96
- children: E.map((e) => /* @__PURE__ */ m("button", {
94
+ children: D.map((e) => /* @__PURE__ */ h("button", {
97
95
  type: "button",
98
96
  role: "tab",
99
97
  "aria-selected": r === e.value,
100
- className: w(T["bsy-mobile-calendar-segmented__item"], r === e.value && T["bsy-mobile-calendar-segmented__item--active"]),
98
+ className: T(E["bsy-mobile-calendar-segmented__item"], r === e.value && E["bsy-mobile-calendar-segmented__item--active"]),
101
99
  onClick: () => i(e.value),
102
100
  children: a(e.key)
103
101
  }, e.value))
104
102
  })]
105
103
  });
106
- }, O = "0.4s", k = "cubic-bezier(0.25, 0.8, 0.25, 1)", A = 26, j = {
104
+ }, k = "0.4s", A = "cubic-bezier(0.25, 0.8, 0.25, 1)", j = 26, M = {
107
105
  HEADER_HEIGHT: 24,
108
106
  SLOT_HEIGHT: 22,
109
107
  SLOT_GAP: 4,
110
108
  WEEK_PADDING_X: 10
111
- }, M = [
109
+ }, N = [
112
110
  1,
113
111
  2,
114
112
  3,
@@ -116,58 +114,58 @@ var b = {
116
114
  5,
117
115
  6,
118
116
  7
119
- ], N = {
120
- "bsy-mobile-calendar-month": "_bsy-mobile-calendar-month_lsyxr_1",
121
- "bsy-mobile-calendar-weekday-header": "_bsy-mobile-calendar-weekday-header_lsyxr_7",
122
- "bsy-mobile-calendar-weekday-header__item": "_bsy-mobile-calendar-weekday-header__item_lsyxr_13",
123
- "bsy-mobile-calendar-carousel": "_bsy-mobile-calendar-carousel_lsyxr_21",
124
- "bsy-mobile-calendar-month-slide": "_bsy-mobile-calendar-month-slide_lsyxr_28",
125
- "bsy-mobile-calendar-week-row": "_bsy-mobile-calendar-week-row_lsyxr_35",
126
- "bsy-mobile-calendar-week-row__cells": "_bsy-mobile-calendar-week-row__cells_lsyxr_40",
127
- "bsy-mobile-calendar-day-cell": "_bsy-mobile-calendar-day-cell_lsyxr_45",
128
- "bsy-mobile-calendar-day-cell__header": "_bsy-mobile-calendar-day-cell__header_lsyxr_51",
129
- "bsy-mobile-calendar-day-cell__body": "_bsy-mobile-calendar-day-cell__body_lsyxr_59",
130
- "bsy-mobile-calendar-day-cell__text": "_bsy-mobile-calendar-day-cell__text_lsyxr_63",
131
- "bsy-mobile-calendar-day-cell__text--today": "_bsy-mobile-calendar-day-cell__text--today_lsyxr_72",
132
- "bsy-mobile-calendar-day-cell__text--other": "_bsy-mobile-calendar-day-cell__text--other_lsyxr_78",
133
- "bsy-mobile-calendar-day-cell__badge": "_bsy-mobile-calendar-day-cell__badge_lsyxr_81",
134
- "bsy-mobile-calendar-week-events": "_bsy-mobile-calendar-week-events_lsyxr_97",
135
- "bsy-mobile-calendar-week-events__segment": "_bsy-mobile-calendar-week-events__segment_lsyxr_108"
117
+ ], P = {
118
+ "bsy-mobile-calendar-month": "_bsy-mobile-calendar-month_1t8o8_1",
119
+ "bsy-mobile-calendar-weekday-header": "_bsy-mobile-calendar-weekday-header_1t8o8_7",
120
+ "bsy-mobile-calendar-weekday-header__item": "_bsy-mobile-calendar-weekday-header__item_1t8o8_13",
121
+ "bsy-mobile-calendar-carousel": "_bsy-mobile-calendar-carousel_1t8o8_21",
122
+ "bsy-mobile-calendar-month-slide": "_bsy-mobile-calendar-month-slide_1t8o8_29",
123
+ "bsy-mobile-calendar-week-row": "_bsy-mobile-calendar-week-row_1t8o8_36",
124
+ "bsy-mobile-calendar-week-row__cells": "_bsy-mobile-calendar-week-row__cells_1t8o8_45",
125
+ "bsy-mobile-calendar-day-cell": "_bsy-mobile-calendar-day-cell_1t8o8_50",
126
+ "bsy-mobile-calendar-day-cell__header": "_bsy-mobile-calendar-day-cell__header_1t8o8_56",
127
+ "bsy-mobile-calendar-day-cell__body": "_bsy-mobile-calendar-day-cell__body_1t8o8_64",
128
+ "bsy-mobile-calendar-day-cell__text": "_bsy-mobile-calendar-day-cell__text_1t8o8_68",
129
+ "bsy-mobile-calendar-day-cell__text--today": "_bsy-mobile-calendar-day-cell__text--today_1t8o8_77",
130
+ "bsy-mobile-calendar-day-cell__text--other": "_bsy-mobile-calendar-day-cell__text--other_1t8o8_83",
131
+ "bsy-mobile-calendar-day-cell__badge": "_bsy-mobile-calendar-day-cell__badge_1t8o8_86",
132
+ "bsy-mobile-calendar-week-events": "_bsy-mobile-calendar-week-events_1t8o8_102",
133
+ "bsy-mobile-calendar-week-events__segment": "_bsy-mobile-calendar-week-events__segment_1t8o8_113"
136
134
  }, ee = () => {
137
135
  let { t } = e();
138
- return /* @__PURE__ */ m("div", {
139
- className: N["bsy-mobile-calendar-weekday-header"],
140
- children: M.map((e) => /* @__PURE__ */ m("div", {
141
- className: N["bsy-mobile-calendar-weekday-header__item"],
136
+ return /* @__PURE__ */ h("div", {
137
+ className: P["bsy-mobile-calendar-weekday-header"],
138
+ children: N.map((e) => /* @__PURE__ */ h("div", {
139
+ className: P["bsy-mobile-calendar-weekday-header__item"],
142
140
  children: t(`calendar.weekday.${e}`)
143
141
  }, e))
144
142
  });
145
- }, te = o(function({ date: e, isCurrentMonth: t, isToday: n, hiddenCount: r = 0 }, i) {
146
- return /* @__PURE__ */ h("div", {
143
+ }, te = s(function({ date: e, isCurrentMonth: t, isToday: n, hiddenCount: r = 0 }, i) {
144
+ return /* @__PURE__ */ g("div", {
147
145
  ref: i,
148
- className: N["bsy-mobile-calendar-day-cell"],
149
- children: [/* @__PURE__ */ h("div", {
150
- className: N["bsy-mobile-calendar-day-cell__header"],
151
- children: [/* @__PURE__ */ m("div", {
152
- className: w(N["bsy-mobile-calendar-day-cell__text"], !t && N["bsy-mobile-calendar-day-cell__text--other"], n && N["bsy-mobile-calendar-day-cell__text--today"]),
146
+ className: P["bsy-mobile-calendar-day-cell"],
147
+ children: [/* @__PURE__ */ g("div", {
148
+ className: P["bsy-mobile-calendar-day-cell__header"],
149
+ children: [/* @__PURE__ */ h("div", {
150
+ className: T(P["bsy-mobile-calendar-day-cell__text"], !t && P["bsy-mobile-calendar-day-cell__text--other"], n && P["bsy-mobile-calendar-day-cell__text--today"]),
153
151
  children: e.date()
154
- }), r > 0 ? /* @__PURE__ */ h("div", {
155
- className: N["bsy-mobile-calendar-day-cell__badge"],
152
+ }), r > 0 ? /* @__PURE__ */ g("div", {
153
+ className: P["bsy-mobile-calendar-day-cell__badge"],
156
154
  children: ["+", r]
157
155
  }) : null]
158
- }), /* @__PURE__ */ m("div", { className: N["bsy-mobile-calendar-day-cell__body"] })]
156
+ }), /* @__PURE__ */ h("div", { className: P["bsy-mobile-calendar-day-cell__body"] })]
159
157
  });
160
- }), P = {
161
- "bsy-mobile-calendar-event-card": "_bsy-mobile-calendar-event-card_r9n00_1",
162
- "bsy-mobile-calendar-event-card--timed": "_bsy-mobile-calendar-event-card--timed_r9n00_17",
163
- "bsy-mobile-calendar-event-card--start": "_bsy-mobile-calendar-event-card--start_r9n00_30",
164
- "bsy-mobile-calendar-event-card--end": "_bsy-mobile-calendar-event-card--end_r9n00_34",
165
- "bsy-mobile-calendar-event-card--continue": "_bsy-mobile-calendar-event-card--continue_r9n00_38",
166
- "bsy-mobile-calendar-event-card__timed-body": "_bsy-mobile-calendar-event-card__timed-body_r9n00_42",
167
- "bsy-mobile-calendar-event-card__title": "_bsy-mobile-calendar-event-card__title_r9n00_46",
168
- "bsy-mobile-calendar-event-card__time": "_bsy-mobile-calendar-event-card__time_r9n00_42"
169
- }, F = i.memo(({ label: e, showLabel: t = !0, isStart: n = !0, isEnd: r = !0, isContinue: i = !1, height: a = 22, style: o, className: s, onClick: c, variant: l = "allDay", timeText: u }) => /* @__PURE__ */ m("div", {
170
- className: w(P["bsy-mobile-calendar-event-card"], l === "timed" && P["bsy-mobile-calendar-event-card--timed"], n && P["bsy-mobile-calendar-event-card--start"], r && P["bsy-mobile-calendar-event-card--end"], i && P["bsy-mobile-calendar-event-card--continue"], s),
158
+ }), F = {
159
+ "bsy-mobile-calendar-event-card": "_bsy-mobile-calendar-event-card_v4uo1_1",
160
+ "bsy-mobile-calendar-event-card--timed": "_bsy-mobile-calendar-event-card--timed_v4uo1_17",
161
+ "bsy-mobile-calendar-event-card--start": "_bsy-mobile-calendar-event-card--start_v4uo1_30",
162
+ "bsy-mobile-calendar-event-card--end": "_bsy-mobile-calendar-event-card--end_v4uo1_34",
163
+ "bsy-mobile-calendar-event-card--continue": "_bsy-mobile-calendar-event-card--continue_v4uo1_38",
164
+ "bsy-mobile-calendar-event-card__timed-body": "_bsy-mobile-calendar-event-card__timed-body_v4uo1_42",
165
+ "bsy-mobile-calendar-event-card__title": "_bsy-mobile-calendar-event-card__title_v4uo1_46",
166
+ "bsy-mobile-calendar-event-card__time": "_bsy-mobile-calendar-event-card__time_v4uo1_42"
167
+ }, I = a.memo(({ label: e, showLabel: t = !0, isStart: n = !0, isEnd: r = !0, isContinue: i = !1, height: a = 22, style: o, className: s, onClick: c, variant: l = "allDay", timeText: u }) => /* @__PURE__ */ h("div", {
168
+ className: T(F["bsy-mobile-calendar-event-card"], l === "timed" && F["bsy-mobile-calendar-event-card--timed"], n && F["bsy-mobile-calendar-event-card--start"], r && F["bsy-mobile-calendar-event-card--end"], i && F["bsy-mobile-calendar-event-card--continue"], s),
171
169
  style: {
172
170
  height: a,
173
171
  lineHeight: l === "timed" ? "normal" : `${a}px`,
@@ -177,13 +175,13 @@ var b = {
177
175
  e.stopPropagation(), c();
178
176
  } : void 0,
179
177
  role: c ? "button" : void 0,
180
- children: t ? l === "timed" ? /* @__PURE__ */ h("div", {
181
- className: P["bsy-mobile-calendar-event-card__timed-body"],
182
- children: [/* @__PURE__ */ m("div", {
183
- className: P["bsy-mobile-calendar-event-card__title"],
178
+ children: t ? l === "timed" ? /* @__PURE__ */ g("div", {
179
+ className: F["bsy-mobile-calendar-event-card__timed-body"],
180
+ children: [/* @__PURE__ */ h("div", {
181
+ className: F["bsy-mobile-calendar-event-card__title"],
184
182
  children: e
185
- }), !!u && /* @__PURE__ */ m("div", {
186
- className: P["bsy-mobile-calendar-event-card__time"],
183
+ }), !!u && /* @__PURE__ */ h("div", {
184
+ className: F["bsy-mobile-calendar-event-card__time"],
187
185
  children: u
188
186
  })]
189
187
  }) : e : null
@@ -191,7 +189,7 @@ var b = {
191
189
  //#endregion
192
190
  //#region src/components/Calendar/utils/monthLayoutAlgorithm.ts
193
191
  function ne(e) {
194
- let { startCol: t, endCol: n, row: r } = e, { HEADER_HEIGHT: i, SLOT_HEIGHT: a, SLOT_GAP: o, WEEK_PADDING_X: s } = j, c = 100 / 7, l = s;
192
+ let { startCol: t, endCol: n, row: r } = e, { HEADER_HEIGHT: i, SLOT_HEIGHT: a, SLOT_GAP: o, WEEK_PADDING_X: s } = M, c = 100 / 7, l = s;
195
193
  return {
196
194
  top: i + r * (a + o),
197
195
  height: a,
@@ -199,8 +197,8 @@ function ne(e) {
199
197
  width: `calc(${(n - t) * c}% - ${l}px)`
200
198
  };
201
199
  }
202
- function I(e, t, n) {
203
- let r = y(e.startTime), i = y(e.endTime), a = t.add(n, "day"), o = r.isBefore(t) ? t : r, s = i.isAfter(a) ? a : i, c = o.diff(t, "day"), l = r.startOf("day").diff(t.startOf("day"), "day"), u = s.hour() === 0 && s.minute() === 0 && s.second() === 0 ? s.diff(t, "day") : s.diff(t, "day") + 1;
200
+ function L(e, t, n) {
201
+ let r = b(e.startTime), i = b(e.endTime), a = t.add(n, "day"), o = r.isBefore(t) ? t : r, s = i.isAfter(a) ? a : i, c = o.diff(t, "day"), l = r.startOf("day").diff(t.startOf("day"), "day"), u = s.hour() === 0 && s.minute() === 0 && s.second() === 0 ? s.diff(t, "day") : s.diff(t, "day") + 1;
204
202
  return o.valueOf() === s.valueOf() && c >= 0 && c < n && (u = Math.min(c + 1, n)), {
205
203
  event: e,
206
204
  startDayIndex: c,
@@ -211,7 +209,7 @@ function I(e, t, n) {
211
209
  }
212
210
  function re(e, t, n) {
213
211
  if (!e || e.length === 0) return /* @__PURE__ */ new Map();
214
- let r = e.map((e) => I(e, t, n));
212
+ let r = e.map((e) => L(e, t, n));
215
213
  r.sort((e, t) => e.startDayIndex === t.startDayIndex ? t.span - e.span : e.startDayIndex - t.startDayIndex);
216
214
  let i = /* @__PURE__ */ new Map(), a = [];
217
215
  for (let e of r) {
@@ -254,7 +252,7 @@ function ie(e, t) {
254
252
  function ae(e, t, n, r, i) {
255
253
  let a = /* @__PURE__ */ new Set();
256
254
  if (!t || t.length === 0) return a;
257
- let o = t.map((e) => I(e, n, r)), s = Array.from({ length: r }, () => []);
255
+ let o = t.map((e) => L(e, n, r)), s = Array.from({ length: r }, () => []);
258
256
  for (let e of o) for (let t = e.startDayIndex; t < e.endDayIndex; t += 1) s[t].push(e);
259
257
  for (let t = 0; t < r; t += 1) {
260
258
  let n = s[t].filter((e) => !a.has(e.event.id));
@@ -269,7 +267,7 @@ function oe(e, t, n = 6) {
269
267
  eventRowMap: /* @__PURE__ */ new Map(),
270
268
  gridEvents: []
271
269
  };
272
- let i = re(e, t, r), a = e.map((e) => I(e, t, r)), o = Array.from({ length: n }, () => []);
270
+ let i = re(e, t, r), a = e.map((e) => L(e, t, r)), o = Array.from({ length: n }, () => []);
273
271
  for (let e of a) {
274
272
  let t = ie(e, i.get(e.event.id) ?? 0);
275
273
  for (let e of t) o[e.weekIndex].push(e);
@@ -288,14 +286,14 @@ function se(e, t, n) {
288
286
  }
289
287
  return r;
290
288
  }
291
- var ce = i.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
292
- let { onEventClick: r } = C(), i = e.filter((e) => !t.has(e.event.id) && e.row < n);
293
- return /* @__PURE__ */ m("div", {
294
- className: N["bsy-mobile-calendar-week-events"],
289
+ var ce = a.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
290
+ let { onEventClick: r } = w(), i = e.filter((e) => !t.has(e.event.id) && e.row < n);
291
+ return /* @__PURE__ */ h("div", {
292
+ className: P["bsy-mobile-calendar-week-events"],
295
293
  children: i.map((e) => {
296
294
  let t = ne(e), { event: n, isStart: i, isEnd: a, isWeekStart: o } = e, s = i || o;
297
- return /* @__PURE__ */ m(F, {
298
- className: N["bsy-mobile-calendar-week-events__segment"],
295
+ return /* @__PURE__ */ h(I, {
296
+ className: P["bsy-mobile-calendar-week-events__segment"],
299
297
  label: n.label,
300
298
  showLabel: s,
301
299
  isStart: i,
@@ -315,7 +313,7 @@ var ce = i.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
315
313
  //#endregion
316
314
  //#region src/components/Calendar/utils/dateUtils.ts
317
315
  function le(e) {
318
- let t = y(e).startOf("isoWeek");
316
+ let t = b(e).startOf("isoWeek");
319
317
  return Array.from({ length: 7 }, (e, n) => t.add(n, "day"));
320
318
  }
321
319
  function ue(e) {
@@ -328,47 +326,47 @@ function de(e) {
328
326
  for (let n = 0; n < e.length; n += 7) t.push(e.slice(n, n + 7));
329
327
  return t;
330
328
  }
331
- function L(e, t) {
332
- return e.isSame(r(t), "day");
329
+ function R(e, t) {
330
+ return e.isSame(n(t), "day");
333
331
  }
334
332
  function fe(e, t) {
335
333
  return e.isSame(t, "month");
336
334
  }
337
- function R(e) {
338
- return y(e.startTime).format("YYYY-MM-DD") !== y(e.endTime).format("YYYY-MM-DD");
335
+ function z(e) {
336
+ return b(e.startTime).format("YYYY-MM-DD") !== b(e.endTime).format("YYYY-MM-DD");
339
337
  }
340
338
  function pe(e, t) {
341
- let n = t.startOf("day"), r = y(e.startTime).startOf("day"), i = y(e.endTime).startOf("day");
339
+ let n = t.startOf("day"), r = b(e.startTime).startOf("day"), i = b(e.endTime).startOf("day");
342
340
  return !n.isBefore(r) && !n.isAfter(i);
343
341
  }
344
342
  function me(e, t) {
345
343
  let n = t.startOf("day");
346
344
  return e.filter((e) => {
347
- let t = y(e.startTime), r = y(e.endTime), i = t.startOf("day"), a = r.hour() === 0 && r.minute() === 0 && r.second() === 0, o = t.valueOf() === r.valueOf(), s = r.startOf("day");
345
+ let t = b(e.startTime), r = b(e.endTime), i = t.startOf("day"), a = r.hour() === 0 && r.minute() === 0 && r.second() === 0, o = t.valueOf() === r.valueOf(), s = r.startOf("day");
348
346
  return a && !o && (s = r.subtract(1, "day").startOf("day")), !n.isBefore(i) && !n.isAfter(s);
349
347
  });
350
348
  }
351
349
  //#endregion
352
350
  //#region src/components/Calendar/CalendarMonth/WeekRow/WeekRow.tsx
353
351
  var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenScheduleIds: i, maxVisibleRows: a, cellRef: o, onDayClick: s }) => {
354
- let { timeZone: c } = C();
355
- return /* @__PURE__ */ h("div", {
356
- className: N["bsy-mobile-calendar-week-row"],
352
+ let { timeZone: c } = w();
353
+ return /* @__PURE__ */ g("div", {
354
+ className: P["bsy-mobile-calendar-week-row"],
357
355
  onClick: (t) => {
358
356
  if (!s) return;
359
357
  let n = t.currentTarget.getBoundingClientRect(), r = t.clientX - n.left, i = n.width / 7, a = Math.floor(r / i);
360
358
  a >= 0 && a < e.length && s(e[a]);
361
359
  },
362
- children: [/* @__PURE__ */ m("div", {
363
- className: N["bsy-mobile-calendar-week-row__cells"],
364
- children: e.map((e, n) => /* @__PURE__ */ m(te, {
360
+ children: [/* @__PURE__ */ h("div", {
361
+ className: P["bsy-mobile-calendar-week-row__cells"],
362
+ children: e.map((e, n) => /* @__PURE__ */ h(te, {
365
363
  ref: n === 0 ? o : void 0,
366
364
  date: e,
367
365
  isCurrentMonth: fe(e, t),
368
- isToday: L(e, c),
366
+ isToday: R(e, c),
369
367
  hiddenCount: r[n] || 0
370
368
  }, e.format("YYYY-MM-DD")))
371
- }), /* @__PURE__ */ m(ce, {
369
+ }), /* @__PURE__ */ h(ce, {
372
370
  segments: n,
373
371
  hiddenScheduleIds: i,
374
372
  maxVisibleRows: a
@@ -378,14 +376,14 @@ var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenSchedule
378
376
  //#endregion
379
377
  //#region src/components/Calendar/hooks/useMonthDates.ts
380
378
  function ge(e) {
381
- return { weeks: d(() => de(ue(e)), [e.format("YYYY-MM")]) };
379
+ return { weeks: f(() => de(ue(e)), [e.format("YYYY-MM")]) };
382
380
  }
383
381
  //#endregion
384
382
  //#region src/components/Calendar/hooks/useCellHeight.ts
385
- var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } = j;
383
+ var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } = M;
386
384
  function be() {
387
- let e = f(null), [t, n] = p(2);
388
- return l(() => {
385
+ let e = p(null), [t, n] = m(2);
386
+ return u(() => {
389
387
  let t = e.current;
390
388
  if (!t) return;
391
389
  let r = (e) => {
@@ -408,7 +406,7 @@ function be() {
408
406
  //#endregion
409
407
  //#region src/components/Calendar/hooks/useMonthEventLayout.ts
410
408
  function xe({ events: e, monthDate: t, maxVisibleRows: n }) {
411
- return d(() => {
409
+ return f(() => {
412
410
  if (!e || e.length === 0) return {
413
411
  weekLayouts: Array.from({ length: 6 }, () => []),
414
412
  hiddenScheduleIds: /* @__PURE__ */ new Set(),
@@ -434,13 +432,13 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
434
432
  monthDate: e,
435
433
  maxVisibleRows: s
436
434
  });
437
- return /* @__PURE__ */ m("div", {
438
- className: N["bsy-mobile-calendar-month-slide"],
435
+ return /* @__PURE__ */ h("div", {
436
+ className: P["bsy-mobile-calendar-month-slide"],
439
437
  style: {
440
438
  width: t,
441
439
  ...r
442
440
  },
443
- children: a.map((t, n) => /* @__PURE__ */ m(he, {
441
+ children: a.map((t, n) => /* @__PURE__ */ h(he, {
444
442
  dates: t,
445
443
  monthDate: e,
446
444
  segments: c[n] || [],
@@ -451,20 +449,20 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
451
449
  onDayClick: i
452
450
  }, `week-${n}`))
453
451
  });
454
- }, Ce = (e) => e.subtract(1, "month"), z = (e) => e.add(1, "month");
455
- function we({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
456
- let r = d(() => [
457
- Ce(e),
452
+ }, B = (e) => e.subtract(1, "month"), V = (e) => e.add(1, "month");
453
+ function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
454
+ let r = f(() => [
455
+ B(e),
458
456
  e,
459
- z(e)
460
- ], [e.format("YYYY-MM")]), [i, a] = p(0), [o, c] = p(!1), l = f({
457
+ V(e)
458
+ ], [e.format("YYYY-MM")]), [i, a] = m(0), [o, s] = m(!1), l = p({
461
459
  startX: 0,
462
460
  startY: 0,
463
461
  startTime: 0,
464
462
  isDragging: !1,
465
463
  isVerticalScroll: !1,
466
464
  directionLocked: !1
467
- }), u = _(e), m = _(t), h = _(n), g = _(i), v = s((e) => {
465
+ }), u = v(e), d = v(t), h = v(n), g = v(i), _ = c((e) => {
468
466
  if (l.current.isDragging) return;
469
467
  let t = e.touches[0];
470
468
  l.current = {
@@ -474,8 +472,8 @@ function we({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
474
472
  isDragging: !0,
475
473
  isVerticalScroll: !1,
476
474
  directionLocked: !1
477
- }, c(!1);
478
- }, []), y = s((e) => {
475
+ }, s(!1);
476
+ }, []), y = c((e) => {
479
477
  if (!l.current.isDragging) return;
480
478
  let t = e.touches[0], n = t.clientX - l.current.startX, r = t.clientY - l.current.startY;
481
479
  if (!l.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (l.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
@@ -483,34 +481,34 @@ function we({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
483
481
  return;
484
482
  }
485
483
  l.current.isVerticalScroll || a(n);
486
- }, []), b = s(() => {
484
+ }, []), b = c(() => {
487
485
  if (!l.current.isDragging) return;
488
486
  let e = h.current ?? 0, t = g.current ?? 0;
489
487
  if (l.current.isDragging = !1, !e || l.current.isVerticalScroll) return;
490
488
  let n = Date.now() - l.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
491
- c(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
492
- }, [h, g]), x = s(() => {
493
- let e = g.current ?? 0, t = u.current, n = m.current;
489
+ s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
490
+ }, [h, g]), x = c(() => {
491
+ let e = g.current ?? 0, t = u.current, n = d.current;
494
492
  if (e !== 0 && t && n) {
495
- let r = (e > 0 ? -1 : 1) == 1 ? z(t) : Ce(t);
496
- c(!1), a(0), n(r);
493
+ let r = (e > 0 ? -1 : 1) == 1 ? V(t) : B(t);
494
+ s(!1), a(0), n(r);
497
495
  }
498
496
  }, [
499
497
  g,
500
498
  u,
501
- m
499
+ d
502
500
  ]);
503
501
  return {
504
502
  months: r,
505
503
  translateX: i,
506
504
  transitionEnabled: o,
507
- bindEvents: d(() => ({
508
- onTouchStart: v,
505
+ bindEvents: f(() => ({
506
+ onTouchStart: _,
509
507
  onTouchMove: y,
510
508
  onTouchEnd: b,
511
509
  onTouchCancel: b
512
510
  }), [
513
- v,
511
+ _,
514
512
  y,
515
513
  b
516
514
  ]),
@@ -519,8 +517,8 @@ function we({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
519
517
  }
520
518
  //#endregion
521
519
  //#region src/components/Calendar/CalendarMonth/MonthCarousel/MonthCarousel.tsx
522
- var Te = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) => {
523
- let { onDayClick: i } = C(), { months: a, translateX: o, transitionEnabled: s, bindEvents: c, handleTransitionEnd: l } = we({
520
+ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) => {
521
+ let { onDayClick: i } = w(), { months: a, translateX: o, transitionEnabled: s, bindEvents: c, handleTransitionEnd: l } = Ce({
524
522
  currentDate: e,
525
523
  setCurrentDate: t,
526
524
  containerWidth: n
@@ -528,10 +526,10 @@ var Te = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
528
526
  let t = me(r, e);
529
527
  i?.(e.toDate(), t);
530
528
  };
531
- return n ? /* @__PURE__ */ m("div", {
532
- className: N["bsy-mobile-calendar-carousel"],
529
+ return n ? /* @__PURE__ */ h("div", {
530
+ className: P["bsy-mobile-calendar-carousel"],
533
531
  ...c,
534
- children: /* @__PURE__ */ m("div", {
532
+ children: /* @__PURE__ */ h("div", {
535
533
  style: {
536
534
  width: n * 3,
537
535
  marginLeft: -n,
@@ -542,7 +540,7 @@ var Te = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
542
540
  willChange: "transform"
543
541
  },
544
542
  onTransitionEnd: l,
545
- children: a.map((e) => /* @__PURE__ */ m(Se, {
543
+ children: a.map((e) => /* @__PURE__ */ h(Se, {
546
544
  monthDate: e,
547
545
  containerWidth: n,
548
546
  events: r,
@@ -554,34 +552,34 @@ var Te = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
554
552
  }, e.format("YYYY-MM")))
555
553
  })
556
554
  }) : null;
557
- }, Ee = () => {
558
- let e = f(null), t = v(e), { currentDate: n, setCurrentDate: r, events: i } = C(), a = d(() => y(n), [n]), o = s((e) => {
555
+ }, Te = () => {
556
+ let e = p(null), t = y(e), { currentDate: n, setCurrentDate: r, events: i } = w(), a = f(() => b(n), [n]), o = c((e) => {
559
557
  r(e.toDate());
560
558
  }, [r]);
561
- return /* @__PURE__ */ h("div", {
559
+ return /* @__PURE__ */ g("div", {
562
560
  ref: e,
563
- className: N["bsy-mobile-calendar-month"],
564
- children: [/* @__PURE__ */ m(ee, {}), /* @__PURE__ */ m(Te, {
561
+ className: P["bsy-mobile-calendar-month"],
562
+ children: [/* @__PURE__ */ h(ee, {}), /* @__PURE__ */ h(we, {
565
563
  currentDate: a,
566
564
  setCurrentDate: o,
567
565
  containerWidth: t?.width ?? 0,
568
566
  events: i
569
567
  })]
570
568
  });
571
- }, B = (e) => e.subtract(1, "week"), V = (e) => e.add(1, "week");
572
- function De({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
573
- let r = d(() => [
574
- B(e),
569
+ }, H = (e) => e.subtract(1, "week"), U = (e) => e.add(1, "week");
570
+ function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
571
+ let r = f(() => [
572
+ H(e),
575
573
  e,
576
- V(e)
577
- ], [e.format("YYYY-MM-DD")]), [i, a] = p(0), [o, c] = p(!1), l = f({
574
+ U(e)
575
+ ], [e.format("YYYY-MM-DD")]), [i, a] = m(0), [o, s] = m(!1), l = p({
578
576
  startX: 0,
579
577
  startY: 0,
580
578
  startTime: 0,
581
579
  isDragging: !1,
582
580
  isVerticalScroll: !1,
583
581
  directionLocked: !1
584
- }), u = _(e), m = _(t), h = _(n), g = _(i), v = s((e) => {
582
+ }), u = v(e), d = v(t), h = v(n), g = v(i), _ = c((e) => {
585
583
  if (l.current.isDragging) return;
586
584
  let t = e.touches[0];
587
585
  l.current = {
@@ -591,8 +589,8 @@ function De({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
591
589
  isDragging: !0,
592
590
  isVerticalScroll: !1,
593
591
  directionLocked: !1
594
- }, c(!1);
595
- }, []), y = s((e) => {
592
+ }, s(!1);
593
+ }, []), y = c((e) => {
596
594
  if (!l.current.isDragging) return;
597
595
  let t = e.touches[0], n = t.clientX - l.current.startX, r = t.clientY - l.current.startY;
598
596
  if (!l.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (l.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
@@ -600,34 +598,34 @@ function De({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
600
598
  return;
601
599
  }
602
600
  l.current.isVerticalScroll || a(n);
603
- }, []), b = s(() => {
601
+ }, []), b = c(() => {
604
602
  if (!l.current.isDragging) return;
605
603
  let e = h.current ?? 0, t = g.current ?? 0;
606
604
  if (l.current.isDragging = !1, !e || l.current.isVerticalScroll) return;
607
605
  let n = Date.now() - l.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
608
- c(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
609
- }, [h, g]), x = s(() => {
610
- let e = g.current ?? 0, t = u.current, n = m.current;
606
+ s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
607
+ }, [h, g]), x = c(() => {
608
+ let e = g.current ?? 0, t = u.current, n = d.current;
611
609
  if (e !== 0 && t && n) {
612
- let r = (e > 0 ? -1 : 1) == 1 ? V(t) : B(t);
613
- c(!1), a(0), n(r);
610
+ let r = (e > 0 ? -1 : 1) == 1 ? U(t) : H(t);
611
+ s(!1), a(0), n(r);
614
612
  }
615
613
  }, [
616
614
  g,
617
615
  u,
618
- m
616
+ d
619
617
  ]);
620
618
  return {
621
619
  weeks: r,
622
620
  translateX: i,
623
621
  transitionEnabled: o,
624
- bindEvents: d(() => ({
625
- onTouchStart: v,
622
+ bindEvents: f(() => ({
623
+ onTouchStart: _,
626
624
  onTouchMove: y,
627
625
  onTouchEnd: b,
628
626
  onTouchCancel: b
629
627
  }), [
630
- v,
628
+ _,
631
629
  y,
632
630
  b
633
631
  ]),
@@ -636,79 +634,79 @@ function De({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
636
634
  }
637
635
  //#endregion
638
636
  //#region src/components/Calendar/CalendarDay/CalendarDay.module.scss
639
- var H = {
640
- "bsy-mobile-calendar-day": "_bsy-mobile-calendar-day_12vkp_1",
641
- "bsy-mobile-calendar-day__header-wrap": "_bsy-mobile-calendar-day__header-wrap_12vkp_7",
642
- "bsy-mobile-calendar-day__header": "_bsy-mobile-calendar-day__header_12vkp_7",
643
- "bsy-mobile-calendar-day__tz": "_bsy-mobile-calendar-day__tz_12vkp_15",
644
- "bsy-mobile-calendar-day__body": "_bsy-mobile-calendar-day__body_12vkp_25",
645
- "bsy-mobile-calendar-day__time-grid": "_bsy-mobile-calendar-day__time-grid_12vkp_30",
646
- "bsy-mobile-calendar-day__time-col": "_bsy-mobile-calendar-day__time-col_12vkp_34",
647
- "bsy-mobile-calendar-day__time-label": "_bsy-mobile-calendar-day__time-label_12vkp_39",
648
- "bsy-mobile-calendar-day__content-col": "_bsy-mobile-calendar-day__content-col_12vkp_47",
649
- "bsy-mobile-calendar-day__hour-cell": "_bsy-mobile-calendar-day__hour-cell_12vkp_52",
650
- "bsy-mobile-calendar-day__timed-layer": "_bsy-mobile-calendar-day__timed-layer_12vkp_57",
651
- "bsy-mobile-calendar-day__timed-item": "_bsy-mobile-calendar-day__timed-item_12vkp_69",
652
- "bsy-mobile-calendar-week-carousel": "_bsy-mobile-calendar-week-carousel_12vkp_75",
653
- "bsy-mobile-calendar-week-slide": "_bsy-mobile-calendar-week-slide_12vkp_81",
654
- "bsy-mobile-calendar-week-slide__weekdays": "_bsy-mobile-calendar-week-slide__weekdays_12vkp_86",
655
- "bsy-mobile-calendar-week-slide__dates": "_bsy-mobile-calendar-week-slide__dates_12vkp_91",
656
- "bsy-mobile-calendar-week-slide__weekday": "_bsy-mobile-calendar-week-slide__weekday_12vkp_86",
657
- "bsy-mobile-calendar-week-slide__weekday--weekend": "_bsy-mobile-calendar-week-slide__weekday--weekend_12vkp_103",
658
- "bsy-mobile-calendar-week-slide__weekday--today": "_bsy-mobile-calendar-week-slide__weekday--today_12vkp_106",
659
- "bsy-mobile-calendar-week-slide__weekday--future": "_bsy-mobile-calendar-week-slide__weekday--future_12vkp_109",
660
- "bsy-mobile-calendar-week-slide__date-item": "_bsy-mobile-calendar-week-slide__date-item_12vkp_112",
661
- "bsy-mobile-calendar-week-slide__date-circle": "_bsy-mobile-calendar-week-slide__date-circle_12vkp_118",
662
- "bsy-mobile-calendar-week-slide__date-circle--today": "_bsy-mobile-calendar-week-slide__date-circle--today_12vkp_128",
663
- "bsy-mobile-calendar-week-slide__date-circle--today-idle": "_bsy-mobile-calendar-week-slide__date-circle--today-idle_12vkp_132",
664
- "bsy-mobile-calendar-week-slide__date-circle--past": "_bsy-mobile-calendar-week-slide__date-circle--past_12vkp_136",
665
- "bsy-mobile-calendar-week-slide__date-circle--future": "_bsy-mobile-calendar-week-slide__date-circle--future_12vkp_139",
666
- "bsy-mobile-calendar-week-slide__date-circle--selected": "_bsy-mobile-calendar-week-slide__date-circle--selected_12vkp_142",
667
- "bsy-mobile-calendar-now-line": "_bsy-mobile-calendar-now-line_12vkp_146",
668
- "bsy-mobile-calendar-now-dot": "_bsy-mobile-calendar-now-dot_12vkp_156",
669
- "bsy-mobile-calendar-allday": "_bsy-mobile-calendar-allday_12vkp_166",
670
- "bsy-mobile-calendar-allday__content": "_bsy-mobile-calendar-allday__content_12vkp_170",
671
- "bsy-mobile-calendar-allday__list": "_bsy-mobile-calendar-allday__list_12vkp_177",
672
- "bsy-mobile-calendar-allday__expand": "_bsy-mobile-calendar-allday__expand_12vkp_181"
673
- }, Oe = ({ weekDate: t, currentDate: n, containerWidth: i, onDateClick: a }) => {
674
- let { timeZone: o } = C(), { t: s } = e(), c = le(t.toDate()), l = r(o).startOf("day"), u = c.some((e) => L(e, o)), d = l.day(), f = n.isSame(l, "day");
675
- return /* @__PURE__ */ h("div", {
676
- className: H["bsy-mobile-calendar-week-slide"],
637
+ var W = {
638
+ "bsy-mobile-calendar-day": "_bsy-mobile-calendar-day_dugny_1",
639
+ "bsy-mobile-calendar-day__header-wrap": "_bsy-mobile-calendar-day__header-wrap_dugny_7",
640
+ "bsy-mobile-calendar-day__header": "_bsy-mobile-calendar-day__header_dugny_7",
641
+ "bsy-mobile-calendar-day__tz": "_bsy-mobile-calendar-day__tz_dugny_15",
642
+ "bsy-mobile-calendar-day__body": "_bsy-mobile-calendar-day__body_dugny_25",
643
+ "bsy-mobile-calendar-day__time-grid": "_bsy-mobile-calendar-day__time-grid_dugny_30",
644
+ "bsy-mobile-calendar-day__time-col": "_bsy-mobile-calendar-day__time-col_dugny_34",
645
+ "bsy-mobile-calendar-day__time-label": "_bsy-mobile-calendar-day__time-label_dugny_39",
646
+ "bsy-mobile-calendar-day__content-col": "_bsy-mobile-calendar-day__content-col_dugny_47",
647
+ "bsy-mobile-calendar-day__hour-cell": "_bsy-mobile-calendar-day__hour-cell_dugny_52",
648
+ "bsy-mobile-calendar-day__timed-layer": "_bsy-mobile-calendar-day__timed-layer_dugny_57",
649
+ "bsy-mobile-calendar-day__timed-item": "_bsy-mobile-calendar-day__timed-item_dugny_69",
650
+ "bsy-mobile-calendar-week-carousel": "_bsy-mobile-calendar-week-carousel_dugny_75",
651
+ "bsy-mobile-calendar-week-slide": "_bsy-mobile-calendar-week-slide_dugny_81",
652
+ "bsy-mobile-calendar-week-slide__weekdays": "_bsy-mobile-calendar-week-slide__weekdays_dugny_86",
653
+ "bsy-mobile-calendar-week-slide__dates": "_bsy-mobile-calendar-week-slide__dates_dugny_91",
654
+ "bsy-mobile-calendar-week-slide__weekday": "_bsy-mobile-calendar-week-slide__weekday_dugny_86",
655
+ "bsy-mobile-calendar-week-slide__weekday--today": "_bsy-mobile-calendar-week-slide__weekday--today_dugny_103",
656
+ "bsy-mobile-calendar-week-slide__weekday--past": "_bsy-mobile-calendar-week-slide__weekday--past_dugny_106",
657
+ "bsy-mobile-calendar-week-slide__weekday--future": "_bsy-mobile-calendar-week-slide__weekday--future_dugny_109",
658
+ "bsy-mobile-calendar-week-slide__date-item": "_bsy-mobile-calendar-week-slide__date-item_dugny_112",
659
+ "bsy-mobile-calendar-week-slide__date-circle": "_bsy-mobile-calendar-week-slide__date-circle_dugny_118",
660
+ "bsy-mobile-calendar-week-slide__date-circle--today": "_bsy-mobile-calendar-week-slide__date-circle--today_dugny_128",
661
+ "bsy-mobile-calendar-week-slide__date-circle--today-idle": "_bsy-mobile-calendar-week-slide__date-circle--today-idle_dugny_132",
662
+ "bsy-mobile-calendar-week-slide__date-circle--past": "_bsy-mobile-calendar-week-slide__date-circle--past_dugny_136",
663
+ "bsy-mobile-calendar-week-slide__date-circle--future": "_bsy-mobile-calendar-week-slide__date-circle--future_dugny_139",
664
+ "bsy-mobile-calendar-week-slide__date-circle--selected": "_bsy-mobile-calendar-week-slide__date-circle--selected_dugny_142",
665
+ "bsy-mobile-calendar-now-line": "_bsy-mobile-calendar-now-line_dugny_146",
666
+ "bsy-mobile-calendar-now-dot": "_bsy-mobile-calendar-now-dot_dugny_156",
667
+ "bsy-mobile-calendar-allday": "_bsy-mobile-calendar-allday_dugny_166",
668
+ "bsy-mobile-calendar-allday__content": "_bsy-mobile-calendar-allday__content_dugny_170",
669
+ "bsy-mobile-calendar-allday__list": "_bsy-mobile-calendar-allday__list_dugny_176",
670
+ "bsy-mobile-calendar-allday__expand": "_bsy-mobile-calendar-allday__expand_dugny_180"
671
+ }, De = ({ weekDate: t, currentDate: r, containerWidth: i, onDateClick: a }) => {
672
+ let { timeZone: o } = w(), { t: s } = e(), c = le(t.toDate()), l = n(o).startOf("day"), u = c.some((e) => R(e, o)), d = l.day(), f = r.isSame(l, "day");
673
+ return /* @__PURE__ */ g("div", {
674
+ className: W["bsy-mobile-calendar-week-slide"],
677
675
  style: { width: i },
678
- children: [/* @__PURE__ */ m("div", {
679
- className: H["bsy-mobile-calendar-week-slide__weekdays"],
680
- children: M.map((e, t) => {
681
- let n = t >= 5, r = t === 6 ? 0 : t + 1, i = c.find((e) => e.day() === r), a = u && r === d, o = i ? i.isAfter(l) : !1;
682
- return /* @__PURE__ */ m("div", {
683
- className: w(H["bsy-mobile-calendar-week-slide__weekday"], n && H["bsy-mobile-calendar-week-slide__weekday--weekend"], a && H["bsy-mobile-calendar-week-slide__weekday--today"], o && H["bsy-mobile-calendar-week-slide__weekday--future"]),
676
+ children: [/* @__PURE__ */ h("div", {
677
+ className: W["bsy-mobile-calendar-week-slide__weekdays"],
678
+ children: N.map((e, t) => {
679
+ let n = t === 6 ? 0 : t + 1, r = c.find((e) => e.day() === n), i = u && n === d, a = r ? r.isBefore(l, "day") : !1, o = r ? r.isAfter(l) : !1;
680
+ return /* @__PURE__ */ h("div", {
681
+ className: T(W["bsy-mobile-calendar-week-slide__weekday"], i && W["bsy-mobile-calendar-week-slide__weekday--today"], !i && a && W["bsy-mobile-calendar-week-slide__weekday--past"], o && W["bsy-mobile-calendar-week-slide__weekday--future"]),
684
682
  children: s(`calendar.weekday.${e}`)
685
683
  }, e);
686
684
  })
687
- }), /* @__PURE__ */ m("div", {
688
- className: H["bsy-mobile-calendar-week-slide__dates"],
685
+ }), /* @__PURE__ */ h("div", {
686
+ className: W["bsy-mobile-calendar-week-slide__dates"],
689
687
  children: c.map((e) => {
690
- let t = L(e, o), r = e.isSame(n, "day") && !t, i = e.isBefore(l);
691
- return /* @__PURE__ */ m("div", {
692
- className: H["bsy-mobile-calendar-week-slide__date-item"],
688
+ let t = R(e, o), n = e.isSame(r, "day") && !t, i = e.isBefore(l);
689
+ return /* @__PURE__ */ h("div", {
690
+ className: W["bsy-mobile-calendar-week-slide__date-item"],
693
691
  onClick: () => a?.(e),
694
- children: /* @__PURE__ */ m("div", {
695
- className: w(H["bsy-mobile-calendar-week-slide__date-circle"], t && (f ? H["bsy-mobile-calendar-week-slide__date-circle--today"] : H["bsy-mobile-calendar-week-slide__date-circle--today-idle"]), !t && i && H["bsy-mobile-calendar-week-slide__date-circle--past"], !t && !i && H["bsy-mobile-calendar-week-slide__date-circle--future"], r && H["bsy-mobile-calendar-week-slide__date-circle--selected"]),
692
+ children: /* @__PURE__ */ h("div", {
693
+ className: T(W["bsy-mobile-calendar-week-slide__date-circle"], t && (f ? W["bsy-mobile-calendar-week-slide__date-circle--today"] : W["bsy-mobile-calendar-week-slide__date-circle--today-idle"]), !t && i && W["bsy-mobile-calendar-week-slide__date-circle--past"], !t && !i && W["bsy-mobile-calendar-week-slide__date-circle--future"], n && W["bsy-mobile-calendar-week-slide__date-circle--selected"]),
696
694
  children: e.date()
697
695
  })
698
696
  }, e.format("YYYY-MM-DD"));
699
697
  })
700
698
  })]
701
699
  });
702
- }, ke = ({ currentDate: e, setCurrentDate: t, containerWidth: n }) => {
703
- let { weeks: r, translateX: i, transitionEnabled: a, bindEvents: o, handleTransitionEnd: s } = De({
700
+ }, Oe = ({ currentDate: e, setCurrentDate: t, containerWidth: n }) => {
701
+ let { weeks: r, translateX: i, transitionEnabled: a, bindEvents: o, handleTransitionEnd: s } = Ee({
704
702
  selectedDate: e,
705
703
  setSelectedDate: t,
706
704
  containerWidth: n
707
705
  });
708
- return n ? /* @__PURE__ */ m("div", {
709
- className: H["bsy-mobile-calendar-week-carousel"],
706
+ return n ? /* @__PURE__ */ h("div", {
707
+ className: W["bsy-mobile-calendar-week-carousel"],
710
708
  ...o,
711
- children: /* @__PURE__ */ m("div", {
709
+ children: /* @__PURE__ */ h("div", {
712
710
  style: {
713
711
  width: n * 3,
714
712
  marginLeft: -n,
@@ -719,7 +717,7 @@ var H = {
719
717
  willChange: "transform"
720
718
  },
721
719
  onTransitionEnd: s,
722
- children: r.map((r) => /* @__PURE__ */ m(Oe, {
720
+ children: r.map((r) => /* @__PURE__ */ h(De, {
723
721
  weekDate: r,
724
722
  currentDate: e,
725
723
  containerWidth: n,
@@ -727,31 +725,31 @@ var H = {
727
725
  }, r.format("YYYY-MM-DD")))
728
726
  })
729
727
  }) : null;
730
- }, Ae = i.memo(({ events: t, onEventClick: n }) => {
731
- let { t: r } = e(), i = f(null), [a, o] = p(0), [s, c] = p(!1), l = s ? t.length : Math.min(t.length, 3), d = t.slice(0, l), g = t.length - 3, _ = t.length > 3, v = s && t.length > 8;
732
- return u(() => {
728
+ }, ke = a.memo(({ events: t, onEventClick: n }) => {
729
+ let { t: r } = e(), i = p(null), [a, o] = m(0), [s, c] = m(!1), l = s ? t.length : Math.min(t.length, 3), u = t.slice(0, l), f = t.length - 3, _ = t.length > 3, v = s && t.length > 8;
730
+ return d(() => {
733
731
  i.current && o(t.length > 0 ? i.current.scrollHeight : 0);
734
- }, [t, s]), /* @__PURE__ */ m("div", {
735
- className: H["bsy-mobile-calendar-allday"],
732
+ }, [t, s]), /* @__PURE__ */ h("div", {
733
+ className: W["bsy-mobile-calendar-allday"],
736
734
  style: { height: a },
737
- children: /* @__PURE__ */ h("div", {
735
+ children: /* @__PURE__ */ g("div", {
738
736
  ref: i,
739
- className: H["bsy-mobile-calendar-allday__content"],
740
- children: [/* @__PURE__ */ m("div", {
741
- className: H["bsy-mobile-calendar-allday__list"],
737
+ className: W["bsy-mobile-calendar-allday__content"],
738
+ children: [/* @__PURE__ */ h("div", {
739
+ className: W["bsy-mobile-calendar-allday__list"],
742
740
  style: v ? {
743
741
  maxHeight: 204,
744
742
  overflowY: "auto"
745
743
  } : void 0,
746
- children: d.map((e) => /* @__PURE__ */ m(F, {
744
+ children: u.map((e) => /* @__PURE__ */ h(I, {
747
745
  label: e.label,
748
746
  style: { width: "100%" },
749
747
  onClick: () => n?.(e)
750
748
  }, e.id))
751
- }), _ ? /* @__PURE__ */ h("div", {
752
- className: H["bsy-mobile-calendar-allday__expand"],
749
+ }), _ ? /* @__PURE__ */ g("div", {
750
+ className: W["bsy-mobile-calendar-allday__expand"],
753
751
  onClick: () => c((e) => !e),
754
- children: [/* @__PURE__ */ m("span", { children: s ? r("calendar.collapse") : r("calendar.moreRecords", { count: g }) }), /* @__PURE__ */ m("svg", {
752
+ children: [/* @__PURE__ */ h("span", { children: s ? r("calendar.collapse") : r("calendar.moreRecords", { count: f }) }), /* @__PURE__ */ h("svg", {
755
753
  width: "16",
756
754
  height: "16",
757
755
  viewBox: "0 0 16 16",
@@ -760,9 +758,9 @@ var H = {
760
758
  transform: s ? "rotate(180deg)" : "rotate(0deg)",
761
759
  transition: "transform 200ms ease"
762
760
  },
763
- children: /* @__PURE__ */ m("path", {
761
+ children: /* @__PURE__ */ h("path", {
764
762
  d: "M4 6L8 10L12 6",
765
- stroke: "#666666",
763
+ stroke: "currentColor",
766
764
  strokeWidth: "1.5",
767
765
  strokeLinecap: "round",
768
766
  strokeLinejoin: "round"
@@ -771,62 +769,62 @@ var H = {
771
769
  }) : null]
772
770
  })
773
771
  });
774
- }), je = ({ currentDate: e, setCurrentDate: t, containerWidth: n, allDayEvents: r, onEventClick: i }) => {
775
- let { timezoneLabel: a } = C();
776
- return /* @__PURE__ */ h("div", {
777
- className: H["bsy-mobile-calendar-day__header-wrap"],
778
- children: [/* @__PURE__ */ h("div", {
779
- className: H["bsy-mobile-calendar-day__header"],
780
- children: [/* @__PURE__ */ m("div", {
781
- className: H["bsy-mobile-calendar-day__tz"],
772
+ }), Ae = ({ currentDate: e, setCurrentDate: t, containerWidth: n, allDayEvents: r, onEventClick: i }) => {
773
+ let { timezoneLabel: a } = w();
774
+ return /* @__PURE__ */ g("div", {
775
+ className: W["bsy-mobile-calendar-day__header-wrap"],
776
+ children: [/* @__PURE__ */ g("div", {
777
+ className: W["bsy-mobile-calendar-day__header"],
778
+ children: [/* @__PURE__ */ h("div", {
779
+ className: W["bsy-mobile-calendar-day__tz"],
782
780
  children: a
783
- }), /* @__PURE__ */ m(ke, {
781
+ }), /* @__PURE__ */ h(Oe, {
784
782
  currentDate: e,
785
783
  setCurrentDate: t,
786
784
  containerWidth: n
787
785
  })]
788
- }), /* @__PURE__ */ m(Ae, {
786
+ }), /* @__PURE__ */ h(ke, {
789
787
  events: r,
790
788
  onEventClick: i
791
789
  })]
792
790
  });
793
- }, Me = (e) => y(e.startTime).format("YYYY-MM-DD") !== y(e.endTime).format("YYYY-MM-DD"), U = (e) => {
794
- let t = y(e.startTime), n = y(e.endTime);
791
+ }, G = (e) => b(e.startTime).format("YYYY-MM-DD") !== b(e.endTime).format("YYYY-MM-DD"), K = (e) => {
792
+ let t = b(e.startTime), n = b(e.endTime);
795
793
  return n.diff(t, "minute") < 22 ? t.add(22, "minute") : n;
796
- }, Ne = (e, t) => {
797
- let n = y(e.startTime), r = U(e), i = y(t.startTime), a = U(t);
794
+ }, q = (e, t) => {
795
+ let n = b(e.startTime), r = K(e), i = b(t.startTime), a = K(t);
798
796
  return n.isBefore(a) && r.isAfter(i);
799
- }, Pe = (e) => {
797
+ }, je = (e) => {
800
798
  if (e.length === 0) return [];
801
- let t = [...e].sort((e, t) => y(e.startTime).valueOf() - y(t.startTime).valueOf()), n = [], r = [t[0]], i = U(t[0]);
799
+ let t = [...e].sort((e, t) => b(e.startTime).valueOf() - b(t.startTime).valueOf()), n = [], r = [t[0]], i = K(t[0]);
802
800
  for (let e = 1; e < t.length; e += 1) {
803
801
  let a = t[e];
804
- if (y(a.startTime).isBefore(i)) {
802
+ if (b(a.startTime).isBefore(i)) {
805
803
  r.push(a);
806
- let e = U(a);
804
+ let e = K(a);
807
805
  e.isAfter(i) && (i = e);
808
- } else n.push(r), r = [a], i = U(a);
806
+ } else n.push(r), r = [a], i = K(a);
809
807
  }
810
808
  return n.push(r), n;
811
- }, Fe = (e) => {
812
- let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) => y(e.startTime).valueOf() - y(t.startTime).valueOf());
809
+ }, Me = (e) => {
810
+ let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) => b(e.startTime).valueOf() - b(t.startTime).valueOf());
813
811
  for (let e of r) {
814
812
  let r = !1;
815
- for (let i = 0; i < n.length; i += 1) if (n[i].every((t) => !Ne(t, e))) {
813
+ for (let i = 0; i < n.length; i += 1) if (n[i].every((t) => !q(t, e))) {
816
814
  n[i].push(e), t.set(e.id, i), r = !0;
817
815
  break;
818
816
  }
819
817
  r || (n.push([e]), t.set(e.id, n.length - 1));
820
818
  }
821
819
  return t;
822
- }, Ie = (e, t, n, r, i) => {
820
+ }, Ne = (e, t, n, r, i) => {
823
821
  let a = n;
824
822
  for (let n of r) if (n.id !== e.id) {
825
823
  let r = i.get(n.id) ?? 0;
826
- r > t && Ne(e, n) && (a = Math.min(a, r));
824
+ r > t && q(e, n) && (a = Math.min(a, r));
827
825
  }
828
826
  return a - t;
829
- }, Le = (e, t) => {
827
+ }, Pe = (e, t) => {
830
828
  let n = Math.max(...Array.from(t.values())) + 1, r = /* @__PURE__ */ new Map(), i = n > 10;
831
829
  for (let a of e) {
832
830
  let o = t.get(a.id) ?? 0;
@@ -838,7 +836,7 @@ var H = {
838
836
  isPercent: !1
839
837
  });
840
838
  } else {
841
- let i = Ie(a, o, n, e, t), s = 100 / n;
839
+ let i = Ne(a, o, n, e, t), s = 100 / n;
842
840
  r.set(a.id, {
843
841
  left: o * s,
844
842
  width: s * i,
@@ -847,12 +845,12 @@ var H = {
847
845
  }
848
846
  }
849
847
  return r;
850
- }, Re = (e, t) => {
851
- let n = e.filter(Me), r = Pe(e.filter((e) => !Me(e))), i = [];
848
+ }, Fe = (e, t) => {
849
+ let n = e.filter(G), r = je(e.filter((e) => !G(e))), i = [];
852
850
  for (let e of r) {
853
- let n = Fe(e), r = Le(e, n), a = Math.max(...Array.from(n.values())) + 1;
851
+ let n = Me(e), r = Pe(e, n), a = Math.max(...Array.from(n.values())) + 1;
854
852
  for (let o of e) {
855
- let e = y(o.startTime), s = y(o.endTime), c = e.hour() * 60 + e.minute(), l = s.hour() * 60 + s.minute(), u = Math.max(l - c, 22), d = c / t.interval * t.rowHeight, f = u / t.interval * t.rowHeight, p = r.get(o.id);
853
+ let e = b(o.startTime), s = b(o.endTime), c = e.hour() * 60 + e.minute(), l = s.hour() * 60 + s.minute(), u = Math.max(l - c, 22), d = c / t.interval * t.rowHeight, f = u / t.interval * t.rowHeight, p = r.get(o.id);
856
854
  i.push({
857
855
  event: o,
858
856
  top: d,
@@ -869,71 +867,71 @@ var H = {
869
867
  timedEvents: i,
870
868
  allDayEvents: n
871
869
  };
872
- }, W = Array.from({ length: 24 }, (e, t) => `${t.toString().padStart(2, "0")}:00`), ze = {
870
+ }, Ie = Array.from({ length: 24 }, (e, t) => `${t.toString().padStart(2, "0")}:00`), Le = {
873
871
  interval: 60,
874
872
  rowHeight: 60
875
- }, Be = (e) => {
876
- let t = y(e.startTime), n = y(e.endTime);
873
+ }, Re = (e) => {
874
+ let t = b(e.startTime), n = b(e.endTime);
877
875
  return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
878
- }, Ve = (e, t, n) => Math.min(Math.max(e, t), n), He = ({ events: e, currentDate: t, onEventClick: i }) => {
879
- let { timeZone: a } = C(), o = f(null), s = f(null), [c, u] = p(() => Date.now()), g = d(() => Re(e, ze), [e]), _ = d(() => new Map(e.map((e) => [e.id, e])), [e]), v = g.timedEvents ?? [], b = d(() => y(t).isSame(r(a), "day"), [t, a]);
880
- l(() => {
881
- if (!b) {
876
+ }, ze = (e, t, n) => Math.min(Math.max(e, t), n), Be = ({ events: e, currentDate: r, onEventClick: i }) => {
877
+ let { timeZone: a } = w(), o = p(null), s = p(null), [c, l] = m(() => Date.now()), d = f(() => Fe(e, Le), [e]), _ = f(() => new Map(e.map((e) => [e.id, e])), [e]), v = d.timedEvents ?? [], y = f(() => b(r).isSame(n(a), "day"), [r, a]);
878
+ u(() => {
879
+ if (!y) {
882
880
  s.current = null;
883
881
  return;
884
882
  }
885
- u(Date.now());
883
+ l(Date.now());
886
884
  let e = window.setInterval(() => {
887
- u(Date.now());
885
+ l(Date.now());
888
886
  }, 60 * 1e3);
889
887
  return () => {
890
888
  window.clearInterval(e);
891
889
  };
892
- }, [b]);
893
- let x = d(() => {
894
- if (!b) return null;
895
- let e = n(c, a);
890
+ }, [y]);
891
+ let x = f(() => {
892
+ if (!y) return null;
893
+ let e = t(c, a);
896
894
  return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
897
895
  }, [
898
- b,
896
+ y,
899
897
  c,
900
898
  a
901
- ]), S = d(() => x === null ? null : x - 20, [x]);
902
- return l(() => {
903
- if (!b || !o.current || x === null) return;
904
- let e = y(t).format("YYYY-MM-DD");
899
+ ]), S = f(() => x === null ? null : x - 20, [x]);
900
+ return u(() => {
901
+ if (!y || !o.current || x === null) return;
902
+ let e = b(r).format("YYYY-MM-DD");
905
903
  if (s.current === e) return;
906
- let n = o.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
907
- n.scrollTop = Ve(x - n.clientHeight * .35, 0, r), s.current = e;
904
+ let t = o.current, n = Math.max(t.scrollHeight - t.clientHeight, 0);
905
+ t.scrollTop = ze(x - t.clientHeight * .35, 0, n), s.current = e;
908
906
  }, [
909
- t,
910
- b,
907
+ r,
908
+ y,
911
909
  x
912
- ]), /* @__PURE__ */ m("div", {
913
- className: H["bsy-mobile-calendar-day__body"],
910
+ ]), /* @__PURE__ */ h("div", {
911
+ className: W["bsy-mobile-calendar-day__body"],
914
912
  ref: o,
915
- children: /* @__PURE__ */ h("div", {
916
- className: H["bsy-mobile-calendar-day__time-grid"],
917
- children: [/* @__PURE__ */ m("div", {
918
- className: H["bsy-mobile-calendar-day__time-col"],
919
- children: W.map((e, t) => /* @__PURE__ */ m("div", {
920
- className: H["bsy-mobile-calendar-day__time-label"],
913
+ children: /* @__PURE__ */ g("div", {
914
+ className: W["bsy-mobile-calendar-day__time-grid"],
915
+ children: [/* @__PURE__ */ h("div", {
916
+ className: W["bsy-mobile-calendar-day__time-col"],
917
+ children: Ie.map((e, t) => /* @__PURE__ */ h("div", {
918
+ className: W["bsy-mobile-calendar-day__time-label"],
921
919
  style: { top: 20 + t * 60 },
922
920
  children: e
923
921
  }, e))
924
- }), /* @__PURE__ */ h("div", {
925
- className: H["bsy-mobile-calendar-day__content-col"],
922
+ }), /* @__PURE__ */ g("div", {
923
+ className: W["bsy-mobile-calendar-day__content-col"],
926
924
  children: [
927
- /* @__PURE__ */ m("div", { style: { height: 20 } }),
928
- W.map((e) => /* @__PURE__ */ m("div", { className: H["bsy-mobile-calendar-day__hour-cell"] }, e)),
929
- /* @__PURE__ */ h("div", {
930
- className: H["bsy-mobile-calendar-day__timed-layer"],
925
+ /* @__PURE__ */ h("div", { style: { height: 20 } }),
926
+ Ie.map((e) => /* @__PURE__ */ h("div", { className: W["bsy-mobile-calendar-day__hour-cell"] }, e)),
927
+ /* @__PURE__ */ g("div", {
928
+ className: W["bsy-mobile-calendar-day__timed-layer"],
931
929
  children: [v.map((e) => {
932
930
  let { event: t, top: n, height: r, left: a, width: o, isPercent: s } = e, c = _.get(t.id);
933
- return c ? /* @__PURE__ */ m(F, {
934
- className: H["bsy-mobile-calendar-day__timed-item"],
931
+ return c ? /* @__PURE__ */ h(I, {
932
+ className: W["bsy-mobile-calendar-day__timed-item"],
935
933
  label: t.label,
936
- timeText: Be(c),
934
+ timeText: Re(c),
937
935
  variant: "timed",
938
936
  height: r,
939
937
  style: {
@@ -943,57 +941,57 @@ var H = {
943
941
  },
944
942
  onClick: () => i?.(c)
945
943
  }, t.id) : null;
946
- }), S === null ? null : /* @__PURE__ */ m("div", {
947
- className: H["bsy-mobile-calendar-now-line"],
944
+ }), S === null ? null : /* @__PURE__ */ h("div", {
945
+ className: W["bsy-mobile-calendar-now-line"],
948
946
  style: { top: S },
949
- children: /* @__PURE__ */ m("div", { className: H["bsy-mobile-calendar-now-dot"] })
947
+ children: /* @__PURE__ */ h("div", { className: W["bsy-mobile-calendar-now-dot"] })
950
948
  })]
951
949
  })
952
950
  ]
953
951
  })]
954
952
  })
955
953
  });
956
- }, Ue = () => {
957
- let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = C(), i = f(null), a = v(i), o = d(() => {
958
- let t = y(e);
959
- return n.filter((e) => R(e) && pe(e, t));
960
- }, [n, e]), c = d(() => {
961
- let t = y(e);
962
- return n.filter((e) => !R(e) && y(e.startTime).isSame(t, "day"));
963
- }, [n, e]), l = d(() => a?.width ? a.width - 56 : 0, [a?.width]), u = s((e) => {
954
+ }, Ve = () => {
955
+ let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = p(null), a = y(i), o = f(() => {
956
+ let t = b(e);
957
+ return n.filter((e) => z(e) && pe(e, t));
958
+ }, [n, e]), s = f(() => {
959
+ let t = b(e);
960
+ return n.filter((e) => !z(e) && b(e.startTime).isSame(t, "day"));
961
+ }, [n, e]), l = f(() => a?.width ? a.width - 56 : 0, [a?.width]), u = c((e) => {
964
962
  t(e.toDate());
965
963
  }, [t]);
966
- return /* @__PURE__ */ h("div", {
967
- className: H["bsy-mobile-calendar-day"],
964
+ return /* @__PURE__ */ g("div", {
965
+ className: W["bsy-mobile-calendar-day"],
968
966
  ref: i,
969
- children: [/* @__PURE__ */ m(je, {
970
- currentDate: y(e),
967
+ children: [/* @__PURE__ */ h(Ae, {
968
+ currentDate: b(e),
971
969
  setCurrentDate: u,
972
970
  containerWidth: l,
973
971
  allDayEvents: o,
974
972
  onEventClick: r
975
- }), /* @__PURE__ */ m(He, {
976
- events: c,
973
+ }), /* @__PURE__ */ h(Be, {
974
+ events: s,
977
975
  currentDate: e,
978
976
  onEventClick: r
979
977
  })]
980
978
  });
981
979
  };
982
- function G(e) {
980
+ function J(e) {
983
981
  return e + 4;
984
982
  }
985
- function We(e, t, n) {
986
- let r = G(n), i = n > 0 ? -t / r : 0, a = Math.floor(i) - 2;
983
+ function He(e, t, n) {
984
+ let r = J(n), i = n > 0 ? -t / r : 0, a = Math.floor(i) - 2;
987
985
  return Array.from({ length: 7 }, (t, n) => ({
988
986
  date: e.add(a + n, "day"),
989
987
  offset: a + n
990
988
  }));
991
989
  }
992
- function Ge(e, t) {
990
+ function Ue(e, t) {
993
991
  return e * t + e * 4;
994
992
  }
995
- function Ke({ baseDate: e, setBaseDate: t, columnWidth: n }) {
996
- let [r, i] = p(0), [a, o] = p(!1), c = f({
993
+ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
994
+ let [r, i] = m(0), [a, o] = m(!1), s = p({
997
995
  startX: 0,
998
996
  startY: 0,
999
997
  startTime: 0,
@@ -1001,19 +999,19 @@ function Ke({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1001
999
  isDragging: !1,
1002
1000
  isVerticalScroll: !1,
1003
1001
  directionLocked: !1
1004
- }), u = _(e), m = _(t), h = _(n), g = _(r), v = f(e.format("YYYY-MM-DD"));
1005
- l(() => {
1002
+ }), l = v(e), d = v(t), h = v(n), g = v(r), _ = p(e.format("YYYY-MM-DD"));
1003
+ u(() => {
1006
1004
  let t = e.format("YYYY-MM-DD");
1007
- v.current !== t && (i(0), o(!1), v.current = t);
1005
+ _.current !== t && (i(0), o(!1), _.current = t);
1008
1006
  }, [e]);
1009
- let y = d(() => We(e, r, n), [
1007
+ let y = f(() => He(e, r, n), [
1010
1008
  e.format("YYYY-MM-DD"),
1011
1009
  r,
1012
1010
  n
1013
- ]), b = s((e) => Ge(e, h.current ?? 0), [h]), x = r, S = s((e) => {
1014
- if (c.current.isDragging) return;
1011
+ ]), b = c((e) => Ue(e, h.current ?? 0), [h]), x = r, S = c((e) => {
1012
+ if (s.current.isDragging) return;
1015
1013
  let t = e.touches[0];
1016
- c.current = {
1014
+ s.current = {
1017
1015
  startX: t.clientX,
1018
1016
  startY: t.clientY,
1019
1017
  startTime: Date.now(),
@@ -1022,36 +1020,36 @@ function Ke({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1022
1020
  isVerticalScroll: !1,
1023
1021
  directionLocked: !1
1024
1022
  }, o(!1);
1025
- }, [g]), C = s((e) => {
1026
- if (!c.current.isDragging) return;
1027
- let t = e.touches[0], n = t.clientX - c.current.startX, r = t.clientY - c.current.startY;
1028
- if (!c.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (c.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
1029
- c.current.isVerticalScroll = !0;
1023
+ }, [g]), C = c((e) => {
1024
+ if (!s.current.isDragging) return;
1025
+ let t = e.touches[0], n = t.clientX - s.current.startX, r = t.clientY - s.current.startY;
1026
+ if (!s.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (s.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
1027
+ s.current.isVerticalScroll = !0;
1030
1028
  return;
1031
1029
  }
1032
- c.current.isVerticalScroll || i(c.current.startTranslateX + n);
1033
- }, []), w = s(() => {
1034
- if (!c.current.isDragging) return;
1030
+ s.current.isVerticalScroll || i(s.current.startTranslateX + n);
1031
+ }, []), w = c(() => {
1032
+ if (!s.current.isDragging) return;
1035
1033
  let e = g.current ?? 0, t = h.current ?? 0;
1036
- if (c.current.isDragging = !1, !t || c.current.isVerticalScroll) return;
1037
- let n = G(t), r = e - c.current.startTranslateX, a = Date.now() - c.current.startTime, s = Math.abs(r) / a, l = Math.abs(r) > t * .35 || s > .3, u;
1034
+ if (s.current.isDragging = !1, !t || s.current.isVerticalScroll) return;
1035
+ let n = J(t), r = e - s.current.startTranslateX, a = Date.now() - s.current.startTime, c = Math.abs(r) / a, l = Math.abs(r) > t * .35 || c > .3, u;
1038
1036
  u = l ? r > 0 ? Math.ceil(e / n) * n : Math.floor(e / n) * n : Math.round(e / n) * n, o(!0), i(u);
1039
- }, [h, g]), T = s(() => {
1037
+ }, [h, g]), T = c(() => {
1040
1038
  o(!1);
1041
- let e = g.current ?? 0, t = h.current ?? 0, n = u.current, r = m.current;
1039
+ let e = g.current ?? 0, t = h.current ?? 0, n = l.current, r = d.current;
1042
1040
  if (t > 0 && n && r) {
1043
- let a = G(t), o = -e / a, s = Math.round(o);
1041
+ let a = J(t), o = -e / a, s = Math.round(o);
1044
1042
  if (s !== 0) {
1045
1043
  let e = n.add(s, "day");
1046
- v.current = e.format("YYYY-MM-DD"), r(e), i(0);
1044
+ _.current = e.format("YYYY-MM-DD"), r(e), i(0);
1047
1045
  }
1048
1046
  }
1049
1047
  }, [
1050
1048
  h,
1051
1049
  g,
1052
- u,
1053
- m
1054
- ]), E = s(() => {
1050
+ l,
1051
+ d
1052
+ ]), E = c(() => {
1055
1053
  i(0), o(!1);
1056
1054
  }, []);
1057
1055
  return {
@@ -1059,7 +1057,7 @@ function Ke({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1059
1057
  offsetX: r,
1060
1058
  trackTransformX: x,
1061
1059
  transitionEnabled: a,
1062
- bindEvents: d(() => ({
1060
+ bindEvents: f(() => ({
1063
1061
  onTouchStart: S,
1064
1062
  onTouchMove: C,
1065
1063
  onTouchEnd: w,
@@ -1076,86 +1074,85 @@ function Ke({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1076
1074
  }
1077
1075
  //#endregion
1078
1076
  //#region src/components/Calendar/CalendarThreeDay/ThreeDayCarousel.context.tsx
1079
- var K = a(null), qe = ({ children: e, value: t }) => {
1080
- let n = d(() => t, [t]);
1081
- return /* @__PURE__ */ m(K.Provider, {
1077
+ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1078
+ let n = f(() => t, [t]);
1079
+ return /* @__PURE__ */ h(Ge.Provider, {
1082
1080
  value: n,
1083
1081
  children: e
1084
1082
  });
1085
- }, q = () => {
1086
- let e = c(K);
1083
+ }, Y = () => {
1084
+ let e = l(Ge);
1087
1085
  if (!e) throw Error("useThreeDayCarouselContext must be used within a ThreeDayCarouselProvider");
1088
1086
  return e;
1089
- }, J = {
1090
- "bsy-mobile-calendar-threeday": "_bsy-mobile-calendar-threeday_bnwsm_1",
1091
- "bsy-mobile-calendar-threeday__header-wrap": "_bsy-mobile-calendar-threeday__header-wrap_bnwsm_7",
1092
- "bsy-mobile-calendar-threeday__header": "_bsy-mobile-calendar-threeday__header_bnwsm_7",
1093
- "bsy-mobile-calendar-threeday__tz": "_bsy-mobile-calendar-threeday__tz_bnwsm_15",
1094
- "bsy-mobile-calendar-threeday__tz-empty": "_bsy-mobile-calendar-threeday__tz-empty_bnwsm_21",
1095
- "bsy-mobile-calendar-threeday__tz-label": "_bsy-mobile-calendar-threeday__tz-label_bnwsm_24",
1096
- "bsy-mobile-calendar-threeday__dates": "_bsy-mobile-calendar-threeday__dates_bnwsm_32",
1097
- "bsy-mobile-calendar-threeday__dates-track": "_bsy-mobile-calendar-threeday__dates-track_bnwsm_38",
1098
- "bsy-mobile-calendar-threeday__date-col": "_bsy-mobile-calendar-threeday__date-col_bnwsm_43",
1099
- "bsy-mobile-calendar-threeday__weekday": "_bsy-mobile-calendar-threeday__weekday_bnwsm_50",
1100
- "bsy-mobile-calendar-threeday__weekday--weekend": "_bsy-mobile-calendar-threeday__weekday--weekend_bnwsm_55",
1101
- "bsy-mobile-calendar-threeday__weekday--today": "_bsy-mobile-calendar-threeday__weekday--today_bnwsm_58",
1102
- "bsy-mobile-calendar-threeday__weekday--past": "_bsy-mobile-calendar-threeday__weekday--past_bnwsm_61",
1103
- "bsy-mobile-calendar-threeday__date-num": "_bsy-mobile-calendar-threeday__date-num_bnwsm_64",
1104
- "bsy-mobile-calendar-threeday__date-num--today": "_bsy-mobile-calendar-threeday__date-num--today_bnwsm_71",
1105
- "bsy-mobile-calendar-threeday__date-num--past": "_bsy-mobile-calendar-threeday__date-num--past_bnwsm_74",
1106
- "bsy-mobile-calendar-threeday__date-num--future": "_bsy-mobile-calendar-threeday__date-num--future_bnwsm_77",
1107
- "bsy-mobile-calendar-threeday__allday": "_bsy-mobile-calendar-threeday__allday_bnwsm_80",
1108
- "bsy-mobile-calendar-threeday__allday-area": "_bsy-mobile-calendar-threeday__allday-area_bnwsm_88",
1109
- "bsy-mobile-calendar-threeday__allday-track": "_bsy-mobile-calendar-threeday__allday-track_bnwsm_94",
1110
- "bsy-mobile-calendar-threeday__allday-card": "_bsy-mobile-calendar-threeday__allday-card_bnwsm_99",
1111
- "bsy-mobile-calendar-threeday__expand-btn": "_bsy-mobile-calendar-threeday__expand-btn_bnwsm_107",
1112
- "bsy-mobile-calendar-threeday__collapse": "_bsy-mobile-calendar-threeday__collapse_bnwsm_118",
1113
- "bsy-mobile-calendar-threeday__body": "_bsy-mobile-calendar-threeday__body_bnwsm_130",
1114
- "bsy-mobile-calendar-threeday__body-content": "_bsy-mobile-calendar-threeday__body-content_bnwsm_135",
1115
- "bsy-mobile-calendar-threeday__body-time": "_bsy-mobile-calendar-threeday__body-time_bnwsm_139",
1116
- "bsy-mobile-calendar-threeday__time-label": "_bsy-mobile-calendar-threeday__time-label_bnwsm_153",
1117
- "bsy-mobile-calendar-threeday__grid": "_bsy-mobile-calendar-threeday__grid_bnwsm_161",
1118
- "bsy-mobile-calendar-threeday__grid-track": "_bsy-mobile-calendar-threeday__grid-track_bnwsm_168",
1119
- "bsy-mobile-calendar-threeday__day-col": "_bsy-mobile-calendar-threeday__day-col_bnwsm_173",
1120
- "bsy-mobile-calendar-threeday__hour-cell": "_bsy-mobile-calendar-threeday__hour-cell_bnwsm_177",
1121
- "bsy-mobile-calendar-threeday__timed-layer": "_bsy-mobile-calendar-threeday__timed-layer_bnwsm_182",
1122
- "bsy-mobile-calendar-threeday__timed-item": "_bsy-mobile-calendar-threeday__timed-item_bnwsm_195",
1123
- "bsy-mobile-calendar-threeday__now-line": "_bsy-mobile-calendar-threeday__now-line_bnwsm_200",
1124
- "bsy-mobile-calendar-threeday__now-dot": "_bsy-mobile-calendar-threeday__now-dot_bnwsm_209"
1125
- }, Je = () => {
1126
- let { visibleDays: t, trackTransformX: n, transitionEnabled: i, bindEvents: a, handleTransitionEnd: o, columnWidth: s, getColumnLeft: c } = q(), { timeZone: l, timezoneLabel: u } = C(), { t: f } = e(), p = d(() => r(l).startOf("day"), [l]), g = d(() => ({
1127
- transform: `translateX(${n}px)`,
1128
- transition: i ? `transform ${O} ${k}` : "none"
1129
- }), [n, i]);
1130
- return /* @__PURE__ */ h("div", {
1131
- className: J["bsy-mobile-calendar-threeday__header"],
1132
- children: [/* @__PURE__ */ h("div", {
1133
- className: J["bsy-mobile-calendar-threeday__tz"],
1134
- children: [/* @__PURE__ */ m("div", { className: J["bsy-mobile-calendar-threeday__tz-empty"] }), /* @__PURE__ */ m("div", {
1135
- className: J["bsy-mobile-calendar-threeday__tz-label"],
1087
+ }, X = {
1088
+ "bsy-mobile-calendar-threeday": "_bsy-mobile-calendar-threeday_1alic_1",
1089
+ "bsy-mobile-calendar-threeday__header-wrap": "_bsy-mobile-calendar-threeday__header-wrap_1alic_7",
1090
+ "bsy-mobile-calendar-threeday__header": "_bsy-mobile-calendar-threeday__header_1alic_7",
1091
+ "bsy-mobile-calendar-threeday__tz": "_bsy-mobile-calendar-threeday__tz_1alic_15",
1092
+ "bsy-mobile-calendar-threeday__tz-empty": "_bsy-mobile-calendar-threeday__tz-empty_1alic_21",
1093
+ "bsy-mobile-calendar-threeday__tz-label": "_bsy-mobile-calendar-threeday__tz-label_1alic_24",
1094
+ "bsy-mobile-calendar-threeday__dates": "_bsy-mobile-calendar-threeday__dates_1alic_32",
1095
+ "bsy-mobile-calendar-threeday__dates-track": "_bsy-mobile-calendar-threeday__dates-track_1alic_38",
1096
+ "bsy-mobile-calendar-threeday__date-col": "_bsy-mobile-calendar-threeday__date-col_1alic_43",
1097
+ "bsy-mobile-calendar-threeday__weekday": "_bsy-mobile-calendar-threeday__weekday_1alic_50",
1098
+ "bsy-mobile-calendar-threeday__weekday--today": "_bsy-mobile-calendar-threeday__weekday--today_1alic_55",
1099
+ "bsy-mobile-calendar-threeday__weekday--past": "_bsy-mobile-calendar-threeday__weekday--past_1alic_58",
1100
+ "bsy-mobile-calendar-threeday__date-num": "_bsy-mobile-calendar-threeday__date-num_1alic_61",
1101
+ "bsy-mobile-calendar-threeday__date-num--today": "_bsy-mobile-calendar-threeday__date-num--today_1alic_68",
1102
+ "bsy-mobile-calendar-threeday__date-num--past": "_bsy-mobile-calendar-threeday__date-num--past_1alic_71",
1103
+ "bsy-mobile-calendar-threeday__date-num--future": "_bsy-mobile-calendar-threeday__date-num--future_1alic_74",
1104
+ "bsy-mobile-calendar-threeday__allday": "_bsy-mobile-calendar-threeday__allday_1alic_77",
1105
+ "bsy-mobile-calendar-threeday__allday-area": "_bsy-mobile-calendar-threeday__allday-area_1alic_85",
1106
+ "bsy-mobile-calendar-threeday__allday-track": "_bsy-mobile-calendar-threeday__allday-track_1alic_91",
1107
+ "bsy-mobile-calendar-threeday__allday-card": "_bsy-mobile-calendar-threeday__allday-card_1alic_96",
1108
+ "bsy-mobile-calendar-threeday__expand-btn": "_bsy-mobile-calendar-threeday__expand-btn_1alic_104",
1109
+ "bsy-mobile-calendar-threeday__collapse": "_bsy-mobile-calendar-threeday__collapse_1alic_115",
1110
+ "bsy-mobile-calendar-threeday__body": "_bsy-mobile-calendar-threeday__body_1alic_127",
1111
+ "bsy-mobile-calendar-threeday__body-content": "_bsy-mobile-calendar-threeday__body-content_1alic_132",
1112
+ "bsy-mobile-calendar-threeday__body-time": "_bsy-mobile-calendar-threeday__body-time_1alic_136",
1113
+ "bsy-mobile-calendar-threeday__time-label": "_bsy-mobile-calendar-threeday__time-label_1alic_150",
1114
+ "bsy-mobile-calendar-threeday__grid": "_bsy-mobile-calendar-threeday__grid_1alic_158",
1115
+ "bsy-mobile-calendar-threeday__grid-track": "_bsy-mobile-calendar-threeday__grid-track_1alic_165",
1116
+ "bsy-mobile-calendar-threeday__day-col": "_bsy-mobile-calendar-threeday__day-col_1alic_170",
1117
+ "bsy-mobile-calendar-threeday__hour-cell": "_bsy-mobile-calendar-threeday__hour-cell_1alic_174",
1118
+ "bsy-mobile-calendar-threeday__timed-layer": "_bsy-mobile-calendar-threeday__timed-layer_1alic_179",
1119
+ "bsy-mobile-calendar-threeday__timed-item": "_bsy-mobile-calendar-threeday__timed-item_1alic_192",
1120
+ "bsy-mobile-calendar-threeday__now-line": "_bsy-mobile-calendar-threeday__now-line_1alic_197",
1121
+ "bsy-mobile-calendar-threeday__now-dot": "_bsy-mobile-calendar-threeday__now-dot_1alic_206"
1122
+ }, qe = () => {
1123
+ let { visibleDays: t, trackTransformX: r, transitionEnabled: i, bindEvents: a, handleTransitionEnd: o, columnWidth: s, getColumnLeft: c } = Y(), { timeZone: l, timezoneLabel: u } = w(), { t: d } = e(), p = f(() => n(l).startOf("day"), [l]), m = f(() => ({
1124
+ transform: `translateX(${r}px)`,
1125
+ transition: i ? `transform ${k} ${A}` : "none"
1126
+ }), [r, i]);
1127
+ return /* @__PURE__ */ g("div", {
1128
+ className: X["bsy-mobile-calendar-threeday__header"],
1129
+ children: [/* @__PURE__ */ g("div", {
1130
+ className: X["bsy-mobile-calendar-threeday__tz"],
1131
+ children: [/* @__PURE__ */ h("div", { className: X["bsy-mobile-calendar-threeday__tz-empty"] }), /* @__PURE__ */ h("div", {
1132
+ className: X["bsy-mobile-calendar-threeday__tz-label"],
1136
1133
  children: u
1137
1134
  })]
1138
- }), /* @__PURE__ */ m("div", {
1139
- className: J["bsy-mobile-calendar-threeday__dates"],
1135
+ }), /* @__PURE__ */ h("div", {
1136
+ className: X["bsy-mobile-calendar-threeday__dates"],
1140
1137
  ...a,
1141
- children: /* @__PURE__ */ m("div", {
1142
- className: J["bsy-mobile-calendar-threeday__dates-track"],
1143
- style: g,
1138
+ children: /* @__PURE__ */ h("div", {
1139
+ className: X["bsy-mobile-calendar-threeday__dates-track"],
1140
+ style: m,
1144
1141
  onTransitionEnd: o,
1145
1142
  children: t.map(({ date: e, offset: t }) => {
1146
- let n = e.isSame(p, "day"), r = e.isBefore(p, "day"), i = e.isoWeekday(), a = i === 6 || i === 7, o = c(t);
1147
- return /* @__PURE__ */ h("div", {
1148
- className: J["bsy-mobile-calendar-threeday__date-col"],
1143
+ let n = e.isSame(p, "day"), r = e.isBefore(p, "day"), i = e.isoWeekday(), a = c(t);
1144
+ return /* @__PURE__ */ g("div", {
1145
+ className: X["bsy-mobile-calendar-threeday__date-col"],
1149
1146
  style: {
1150
1147
  position: "absolute",
1151
- left: o,
1148
+ left: a,
1152
1149
  width: s
1153
1150
  },
1154
- children: [/* @__PURE__ */ m("div", {
1155
- className: w(J["bsy-mobile-calendar-threeday__weekday"], a && J["bsy-mobile-calendar-threeday__weekday--weekend"], n && J["bsy-mobile-calendar-threeday__weekday--today"], !n && r && J["bsy-mobile-calendar-threeday__weekday--past"]),
1156
- children: f(`calendar.weekdayPrefixed.${i}`)
1157
- }), /* @__PURE__ */ m("div", {
1158
- className: w(J["bsy-mobile-calendar-threeday__date-num"], n && J["bsy-mobile-calendar-threeday__date-num--today"], !n && r && J["bsy-mobile-calendar-threeday__date-num--past"], !n && !r && J["bsy-mobile-calendar-threeday__date-num--future"]),
1151
+ children: [/* @__PURE__ */ h("div", {
1152
+ className: T(X["bsy-mobile-calendar-threeday__weekday"], n && X["bsy-mobile-calendar-threeday__weekday--today"], !n && r && X["bsy-mobile-calendar-threeday__weekday--past"]),
1153
+ children: d(`calendar.weekdayPrefixed.${i}`)
1154
+ }), /* @__PURE__ */ h("div", {
1155
+ className: T(X["bsy-mobile-calendar-threeday__date-num"], n && X["bsy-mobile-calendar-threeday__date-num--today"], !n && r && X["bsy-mobile-calendar-threeday__date-num--past"], !n && !r && X["bsy-mobile-calendar-threeday__date-num--future"]),
1159
1156
  children: e.date()
1160
1157
  })]
1161
1158
  }, e.format("YYYY-MM-DD"));
@@ -1163,92 +1160,92 @@ var K = a(null), qe = ({ children: e, value: t }) => {
1163
1160
  })
1164
1161
  })]
1165
1162
  });
1166
- }, Y = Array.from({ length: 24 }, (e, t) => `${t.toString().padStart(2, "0")}:00`), Ye = {
1163
+ }, Je = Array.from({ length: 24 }, (e, t) => `${t.toString().padStart(2, "0")}:00`), Ye = {
1167
1164
  interval: 60,
1168
1165
  rowHeight: 60
1169
- }, Xe = 4, Ze = 8, Qe = 4, X = 8, $e = (e) => {
1170
- let t = y(e.startTime), n = y(e.endTime);
1166
+ }, Xe = 4, Ze = 8, Qe = 4, Z = 8, $e = (e) => {
1167
+ let t = b(e.startTime), n = b(e.endTime);
1171
1168
  return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
1172
- }, et = (e, t, n) => Math.min(Math.max(e, t), n), tt = ({ events: e, currentDate: t, onEventClick: i }) => {
1173
- let { timeZone: a } = C(), { visibleDays: o, trackTransformX: s, transitionEnabled: c, bindEvents: u, columnWidth: g, getColumnLeft: _ } = q(), v = f(null), b = f(null), [x, S] = p(() => Date.now()), w = d(() => r(a).startOf("day"), [a]), T = d(() => o.map(({ date: t, offset: n }, r) => ({
1169
+ }, et = (e, t, n) => Math.min(Math.max(e, t), n), tt = ({ events: e, currentDate: r, onEventClick: i }) => {
1170
+ let { timeZone: a } = w(), { visibleDays: o, trackTransformX: s, transitionEnabled: c, bindEvents: l, columnWidth: d, getColumnLeft: _ } = Y(), v = p(null), y = p(null), [x, S] = m(() => Date.now()), C = f(() => n(a).startOf("day"), [a]), T = f(() => o.map(({ date: t, offset: n }, r) => ({
1174
1171
  date: t,
1175
1172
  offset: n,
1176
- layout: Re(e.filter((e) => y(e.startTime).isSame(t, "day") || y(e.startTime).isBefore(t, "day") && y(e.endTime).isAfter(t, "day")), Ye),
1173
+ layout: Fe(e.filter((e) => b(e.startTime).isSame(t, "day") || b(e.startTime).isBefore(t, "day") && b(e.endTime).isAfter(t, "day")), Ye),
1177
1174
  isFirstVisibleDay: r === 2
1178
- })), [o, e]), E = d(() => new Map(e.map((e) => [e.id, e])), [e]), D = d(() => o.findIndex(({ date: e }) => e.isSame(w, "day")), [o, w]), A = d(() => y(t).isSame(w, "day"), [t, w]);
1179
- l(() => {
1175
+ })), [o, e]), E = f(() => new Map(e.map((e) => [e.id, e])), [e]), D = f(() => o.findIndex(({ date: e }) => e.isSame(C, "day")), [o, C]), O = f(() => b(r).isSame(C, "day"), [r, C]);
1176
+ u(() => {
1180
1177
  if (D === -1) {
1181
- b.current = null;
1178
+ y.current = null;
1182
1179
  return;
1183
1180
  }
1184
1181
  S(Date.now());
1185
1182
  let e = window.setInterval(() => S(Date.now()), 60 * 1e3);
1186
1183
  return () => window.clearInterval(e);
1187
1184
  }, [D]);
1188
- let j = d(() => {
1185
+ let j = f(() => {
1189
1186
  if (D === -1) return null;
1190
- let e = n(x, a);
1187
+ let e = t(x, a);
1191
1188
  return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
1192
1189
  }, [
1193
1190
  D,
1194
1191
  x,
1195
1192
  a
1196
- ]), M = d(() => j === null ? null : j - 20, [j]);
1197
- l(() => {
1198
- if (!A || !v.current || j === null) return;
1199
- let e = y(t).format("YYYY-MM-DD");
1200
- if (b.current === e) return;
1201
- let n = v.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
1202
- n.scrollTop = et(j - n.clientHeight * .35, 0, r), b.current = e;
1193
+ ]), M = f(() => j === null ? null : j - 20, [j]);
1194
+ u(() => {
1195
+ if (!O || !v.current || j === null) return;
1196
+ let e = b(r).format("YYYY-MM-DD");
1197
+ if (y.current === e) return;
1198
+ let t = v.current, n = Math.max(t.scrollHeight - t.clientHeight, 0);
1199
+ t.scrollTop = et(j - t.clientHeight * .35, 0, n), y.current = e;
1203
1200
  }, [
1204
- t,
1205
- A,
1201
+ r,
1202
+ O,
1206
1203
  j
1207
1204
  ]);
1208
- let N = d(() => ({
1205
+ let N = f(() => ({
1209
1206
  transform: `translateX(${s}px)`,
1210
- transition: c ? `transform ${O} ${k}` : "none"
1207
+ transition: c ? `transform ${k} ${A}` : "none"
1211
1208
  }), [s, c]);
1212
- return /* @__PURE__ */ m("div", {
1213
- className: J["bsy-mobile-calendar-threeday__body"],
1209
+ return /* @__PURE__ */ h("div", {
1210
+ className: X["bsy-mobile-calendar-threeday__body"],
1214
1211
  ref: v,
1215
- children: /* @__PURE__ */ h("div", {
1216
- className: J["bsy-mobile-calendar-threeday__body-content"],
1217
- children: [/* @__PURE__ */ m("div", {
1218
- className: J["bsy-mobile-calendar-threeday__body-time"],
1219
- children: Y.map((e, t) => /* @__PURE__ */ m("div", {
1220
- className: J["bsy-mobile-calendar-threeday__time-label"],
1212
+ children: /* @__PURE__ */ g("div", {
1213
+ className: X["bsy-mobile-calendar-threeday__body-content"],
1214
+ children: [/* @__PURE__ */ h("div", {
1215
+ className: X["bsy-mobile-calendar-threeday__body-time"],
1216
+ children: Je.map((e, t) => /* @__PURE__ */ h("div", {
1217
+ className: X["bsy-mobile-calendar-threeday__time-label"],
1221
1218
  style: { top: 20 + t * 60 },
1222
1219
  children: e
1223
1220
  }, e))
1224
- }), /* @__PURE__ */ m("div", {
1225
- className: J["bsy-mobile-calendar-threeday__grid"],
1226
- ...u,
1227
- children: /* @__PURE__ */ m("div", {
1228
- className: J["bsy-mobile-calendar-threeday__grid-track"],
1221
+ }), /* @__PURE__ */ h("div", {
1222
+ className: X["bsy-mobile-calendar-threeday__grid"],
1223
+ ...l,
1224
+ children: /* @__PURE__ */ h("div", {
1225
+ className: X["bsy-mobile-calendar-threeday__grid-track"],
1229
1226
  style: N,
1230
1227
  children: T.map((e) => {
1231
- let { date: t, offset: n, layout: r, isFirstVisibleDay: a } = e, o = r.timedEvents ?? [], s = t.isSame(w, "day"), c = _(n);
1232
- return /* @__PURE__ */ h("div", {
1233
- className: J["bsy-mobile-calendar-threeday__day-col"],
1228
+ let { date: t, offset: n, layout: r, isFirstVisibleDay: a } = e, o = r.timedEvents ?? [], s = t.isSame(C, "day"), c = _(n);
1229
+ return /* @__PURE__ */ g("div", {
1230
+ className: X["bsy-mobile-calendar-threeday__day-col"],
1234
1231
  style: {
1235
1232
  position: "absolute",
1236
1233
  left: c,
1237
- width: g
1234
+ width: d
1238
1235
  },
1239
1236
  children: [
1240
- /* @__PURE__ */ m("div", { style: { height: 20 } }),
1241
- Y.map((e) => /* @__PURE__ */ m("div", { className: J["bsy-mobile-calendar-threeday__hour-cell"] }, e)),
1242
- /* @__PURE__ */ h("div", {
1243
- className: J["bsy-mobile-calendar-threeday__timed-layer"],
1237
+ /* @__PURE__ */ h("div", { style: { height: 20 } }),
1238
+ Je.map((e) => /* @__PURE__ */ h("div", { className: X["bsy-mobile-calendar-threeday__hour-cell"] }, e)),
1239
+ /* @__PURE__ */ g("div", {
1240
+ className: X["bsy-mobile-calendar-threeday__timed-layer"],
1244
1241
  children: [o.map((e) => {
1245
- let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns: u } = e, d = E.get(t.id);
1246
- if (!d) return null;
1247
- let f = a ? Ze : Qe, p = Math.max(0, g - f), h = Math.max(u ?? 1, 1), _ = Math.max(0, s - f), v = Math.max(X, p - (h - 1) * X), y = et(_, Math.min(X, p), Math.min(p, v)), b = Math.max(0, p - y), x = (h > 1 ? (l ?? 0) / (h - 1) : 0) * b, S = a ? x + Xe : x;
1248
- return /* @__PURE__ */ m(F, {
1249
- className: J["bsy-mobile-calendar-threeday__timed-item"],
1242
+ let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns: u } = e, f = E.get(t.id);
1243
+ if (!f) return null;
1244
+ let p = a ? Ze : Qe, m = Math.max(0, d - p), g = Math.max(u ?? 1, 1), _ = Math.max(0, s - p), v = Math.max(Z, m - (g - 1) * Z), y = et(_, Math.min(Z, m), Math.min(m, v)), b = Math.max(0, m - y), x = (g > 1 ? (l ?? 0) / (g - 1) : 0) * b, S = a ? x + Xe : x;
1245
+ return /* @__PURE__ */ h(I, {
1246
+ className: X["bsy-mobile-calendar-threeday__timed-item"],
1250
1247
  label: t.label,
1251
- timeText: $e(d),
1248
+ timeText: $e(f),
1252
1249
  variant: "timed",
1253
1250
  height: r,
1254
1251
  style: {
@@ -1256,12 +1253,12 @@ var K = a(null), qe = ({ children: e, value: t }) => {
1256
1253
  left: c ? a ? `calc(${o}% + ${Xe}px)` : `${o}%` : S,
1257
1254
  width: c ? a ? `calc(${s}% - ${Ze}px)` : `calc(${s}% - ${Qe}px)` : y
1258
1255
  },
1259
- onClick: () => i?.(d)
1256
+ onClick: () => i?.(f)
1260
1257
  }, t.id);
1261
- }), s && M !== null ? /* @__PURE__ */ m("div", {
1262
- className: J["bsy-mobile-calendar-threeday__now-line"],
1258
+ }), s && M !== null ? /* @__PURE__ */ h("div", {
1259
+ className: X["bsy-mobile-calendar-threeday__now-line"],
1263
1260
  style: { top: M },
1264
- children: /* @__PURE__ */ m("div", { className: J["bsy-mobile-calendar-threeday__now-dot"] })
1261
+ children: /* @__PURE__ */ h("div", { className: X["bsy-mobile-calendar-threeday__now-dot"] })
1265
1262
  }) : null]
1266
1263
  })
1267
1264
  ]
@@ -1275,7 +1272,7 @@ var K = a(null), qe = ({ children: e, value: t }) => {
1275
1272
  //#endregion
1276
1273
  //#region src/components/Calendar/utils/threeDaysAlgorithm.ts
1277
1274
  function nt(e, t) {
1278
- let n = t.startOf("day"), r = y(e.startTime), i = y(e.endTime), a = r.startOf("day").diff(n, "day"), o = i.hour() === 0 && i.minute() === 0 && i.second() === 0 ? i.startOf("day").diff(n, "day") : i.startOf("day").add(1, "day").diff(n, "day");
1275
+ let n = t.startOf("day"), r = b(e.startTime), i = b(e.endTime), a = r.startOf("day").diff(n, "day"), o = i.hour() === 0 && i.minute() === 0 && i.second() === 0 ? i.startOf("day").diff(n, "day") : i.startOf("day").add(1, "day").diff(n, "day");
1279
1276
  return {
1280
1277
  event: e,
1281
1278
  startCol: a,
@@ -1309,8 +1306,8 @@ function it(e, t) {
1309
1306
  //#endregion
1310
1307
  //#region src/components/Calendar/CalendarThreeDay/ThreeDayAllDayEvents/ThreeDayAllDayEvents.tsx
1311
1308
  var at = 22;
1312
- function Z(e, t, n, r) {
1313
- let i = G(r), a = e * i, o = t * i, s = a + n, c = o + n, l = r * 3 + 8, u = Math.max(s, 0), d = Math.min(c, l) - u;
1309
+ function ot(e, t, n, r) {
1310
+ let i = J(r), a = e * i, o = t * i, s = a + n, c = o + n, l = r * 3 + 8, u = Math.max(s, 0), d = Math.min(c, l) - u;
1314
1311
  return {
1315
1312
  left: u,
1316
1313
  width: d,
@@ -1319,8 +1316,8 @@ function Z(e, t, n, r) {
1319
1316
  isEnd: c <= l
1320
1317
  };
1321
1318
  }
1322
- function ot(e, t, n) {
1323
- let r = G(n), i = [
1319
+ function st(e, t, n) {
1320
+ let r = J(n), i = [
1324
1321
  0,
1325
1322
  0,
1326
1323
  0
@@ -1331,73 +1328,73 @@ function ot(e, t, n) {
1331
1328
  }
1332
1329
  return i;
1333
1330
  }
1334
- var st = ({ events: e, baseDate: t, onEventClick: n }) => {
1335
- let { offsetX: r, transitionEnabled: i, bindEvents: a, columnWidth: o } = q(), [s, c] = p(!1), l = d(() => it(e, t), [e, t]), u = d(() => {
1336
- let e = l.filter((e) => Z(e.startCol, e.endCol, r, o).visible);
1331
+ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1332
+ let { offsetX: r, transitionEnabled: i, bindEvents: a, columnWidth: o } = Y(), [s, c] = m(!1), l = f(() => it(e, t), [e, t]), u = f(() => {
1333
+ let e = l.filter((e) => ot(e.startCol, e.endCol, r, o).visible);
1337
1334
  return e.length === 0 ? -1 : Math.max(...e.map((e) => e.row));
1338
1335
  }, [
1339
1336
  l,
1340
1337
  r,
1341
1338
  o
1342
- ]) + 1, f = u > 3, g = s && u > 8, _ = s ? Math.min(u, 8) : Math.min(u, 3), v = d(() => s || !f ? [
1339
+ ]) + 1, d = u > 3, p = s && u > 8, _ = s ? Math.min(u, 8) : Math.min(u, 3), v = f(() => s || !d ? [
1343
1340
  0,
1344
1341
  0,
1345
1342
  0
1346
- ] : ot(l, r, o), [
1343
+ ] : st(l, r, o), [
1347
1344
  l,
1348
1345
  r,
1349
1346
  o,
1350
1347
  s,
1351
- f
1352
- ]), y = !s && f && v.some((e) => e > 0), b = d(() => u === 0 ? 0 : _ * A + (y ? at : 0) + 8, [
1348
+ d
1349
+ ]), y = !s && d && v.some((e) => e > 0), b = f(() => u === 0 ? 0 : _ * j + (y ? at : 0) + 8, [
1353
1350
  u,
1354
1351
  _,
1355
1352
  y
1356
- ]), x = d(() => u === 0 ? 0 : g ? u * A : _ * A + (y ? at : 0), [
1353
+ ]), x = f(() => u === 0 ? 0 : p ? u * j : _ * j + (y ? at : 0), [
1357
1354
  u,
1358
1355
  _,
1359
1356
  y,
1360
- g
1361
- ]), S = G(o);
1362
- return /* @__PURE__ */ h("div", {
1363
- className: J["bsy-mobile-calendar-threeday__allday"],
1357
+ p
1358
+ ]), S = J(o);
1359
+ return /* @__PURE__ */ g("div", {
1360
+ className: X["bsy-mobile-calendar-threeday__allday"],
1364
1361
  style: { height: b },
1365
- children: [s && f ? /* @__PURE__ */ m("div", {
1366
- className: J["bsy-mobile-calendar-threeday__collapse"],
1362
+ children: [s && d ? /* @__PURE__ */ h("div", {
1363
+ className: X["bsy-mobile-calendar-threeday__collapse"],
1367
1364
  onClick: () => c(!1),
1368
- children: /* @__PURE__ */ m("svg", {
1365
+ children: /* @__PURE__ */ h("svg", {
1369
1366
  width: "16",
1370
1367
  height: "16",
1371
1368
  viewBox: "0 0 16 16",
1372
1369
  fill: "none",
1373
1370
  style: { transform: "rotate(180deg)" },
1374
- children: /* @__PURE__ */ m("path", {
1371
+ children: /* @__PURE__ */ h("path", {
1375
1372
  d: "M4 6L8 10L12 6",
1376
- stroke: "#666666",
1373
+ stroke: "currentColor",
1377
1374
  strokeWidth: "1.5",
1378
1375
  strokeLinecap: "round",
1379
1376
  strokeLinejoin: "round"
1380
1377
  })
1381
1378
  })
1382
- }) : null, /* @__PURE__ */ m("div", {
1383
- className: J["bsy-mobile-calendar-threeday__allday-area"],
1384
- style: g ? {
1379
+ }) : null, /* @__PURE__ */ h("div", {
1380
+ className: X["bsy-mobile-calendar-threeday__allday-area"],
1381
+ style: p ? {
1385
1382
  overflowY: "auto",
1386
- maxHeight: 8 * A
1383
+ maxHeight: 8 * j
1387
1384
  } : void 0,
1388
1385
  ...a,
1389
- children: /* @__PURE__ */ h("div", {
1390
- className: J["bsy-mobile-calendar-threeday__allday-track"],
1386
+ children: /* @__PURE__ */ g("div", {
1387
+ className: X["bsy-mobile-calendar-threeday__allday-track"],
1391
1388
  style: {
1392
1389
  height: x,
1393
- transition: i ? `height ${O} ${k}` : "none"
1390
+ transition: i ? `height ${k} ${A}` : "none"
1394
1391
  },
1395
1392
  children: [l.map((e) => {
1396
1393
  let { event: t, startCol: i, endCol: a, row: c } = e;
1397
1394
  if (!s && c >= 3) return null;
1398
- let l = Z(i, a, r, o);
1399
- return l.visible ? /* @__PURE__ */ m(F, {
1400
- className: J["bsy-mobile-calendar-threeday__allday-card"],
1395
+ let l = ot(i, a, r, o);
1396
+ return l.visible ? /* @__PURE__ */ h(I, {
1397
+ className: X["bsy-mobile-calendar-threeday__allday-card"],
1401
1398
  label: t.label,
1402
1399
  variant: "allDay",
1403
1400
  height: 22,
@@ -1407,22 +1404,22 @@ var st = ({ events: e, baseDate: t, onEventClick: n }) => {
1407
1404
  style: {
1408
1405
  left: l.left,
1409
1406
  width: l.width - 4,
1410
- top: c * A + 4
1407
+ top: c * j + 4
1411
1408
  },
1412
1409
  onClick: () => n?.(t)
1413
1410
  }, t.id) : null;
1414
1411
  }), y ? v.map((e, t) => {
1415
1412
  if (e === 0) return null;
1416
1413
  let n = t * S;
1417
- return /* @__PURE__ */ m("div", {
1418
- className: J["bsy-mobile-calendar-threeday__expand-btn"],
1414
+ return /* @__PURE__ */ h("div", {
1415
+ className: X["bsy-mobile-calendar-threeday__expand-btn"],
1419
1416
  style: {
1420
1417
  left: n,
1421
1418
  width: o - 4,
1422
- top: 3 * A + 4
1419
+ top: 3 * j + 4
1423
1420
  },
1424
1421
  onClick: () => c(!0),
1425
- children: /* @__PURE__ */ h("span", { children: [
1422
+ children: /* @__PURE__ */ g("span", { children: [
1426
1423
  "还有",
1427
1424
  e,
1428
1425
  "条记录"
@@ -1432,61 +1429,61 @@ var st = ({ events: e, baseDate: t, onEventClick: n }) => {
1432
1429
  })
1433
1430
  })]
1434
1431
  });
1435
- }, ct = () => {
1436
- let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = C(), i = f(null), a = v(i), o = d(() => a?.width ? (a.width - 56 - 8 - 8) / 3 : 0, [a?.width]), c = d(() => y(e), [e]), { visibleDays: l, offsetX: u, trackTransformX: p, transitionEnabled: g, bindEvents: _, handleTransitionEnd: b, getColumnLeft: x, resetPosition: S } = Ke({
1437
- baseDate: c,
1438
- setBaseDate: s((e) => {
1432
+ }, lt = () => {
1433
+ let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = p(null), a = y(i), o = f(() => a?.width ? (a.width - 56 - 8 - 8) / 3 : 0, [a?.width]), s = f(() => b(e), [e]), { visibleDays: l, offsetX: u, trackTransformX: d, transitionEnabled: m, bindEvents: _, handleTransitionEnd: v, getColumnLeft: x, resetPosition: S } = We({
1434
+ baseDate: s,
1435
+ setBaseDate: c((e) => {
1439
1436
  t(e.toDate());
1440
1437
  }, [t]),
1441
1438
  columnWidth: o
1442
- }), w = d(() => n.filter((e) => R(e)), [n]), T = d(() => n.filter((e) => !R(e)), [n]), E = d(() => ({
1439
+ }), C = f(() => n.filter((e) => z(e)), [n]), T = f(() => n.filter((e) => !z(e)), [n]), E = f(() => ({
1443
1440
  visibleDays: l,
1444
1441
  offsetX: u,
1445
- trackTransformX: p,
1446
- transitionEnabled: g,
1442
+ trackTransformX: d,
1443
+ transitionEnabled: m,
1447
1444
  bindEvents: _,
1448
- handleTransitionEnd: b,
1445
+ handleTransitionEnd: v,
1449
1446
  columnWidth: o,
1450
1447
  getColumnLeft: x,
1451
1448
  resetPosition: S
1452
1449
  }), [
1453
1450
  l,
1454
1451
  u,
1455
- p,
1456
- g,
1452
+ d,
1453
+ m,
1457
1454
  _,
1458
- b,
1455
+ v,
1459
1456
  o,
1460
1457
  x,
1461
1458
  S
1462
1459
  ]);
1463
- return /* @__PURE__ */ m("div", {
1464
- className: J["bsy-mobile-calendar-threeday"],
1460
+ return /* @__PURE__ */ h("div", {
1461
+ className: X["bsy-mobile-calendar-threeday"],
1465
1462
  ref: i,
1466
- children: o > 0 ? /* @__PURE__ */ h(qe, {
1463
+ children: o > 0 ? /* @__PURE__ */ g(Ke, {
1467
1464
  value: E,
1468
- children: [/* @__PURE__ */ h("div", {
1469
- className: J["bsy-mobile-calendar-threeday__header-wrap"],
1470
- children: [/* @__PURE__ */ m(Je, {}), /* @__PURE__ */ m(st, {
1471
- events: w,
1472
- baseDate: c,
1465
+ children: [/* @__PURE__ */ g("div", {
1466
+ className: X["bsy-mobile-calendar-threeday__header-wrap"],
1467
+ children: [/* @__PURE__ */ h(qe, {}), /* @__PURE__ */ h(ct, {
1468
+ events: C,
1469
+ baseDate: s,
1473
1470
  onEventClick: r
1474
1471
  })]
1475
- }), /* @__PURE__ */ m(tt, {
1472
+ }), /* @__PURE__ */ h(tt, {
1476
1473
  events: T,
1477
1474
  currentDate: e,
1478
1475
  onEventClick: r
1479
1476
  })]
1480
1477
  }) : null
1481
1478
  });
1482
- }, lt = (e, t = {}) => {
1483
- let { timeZone: r } = t;
1484
- return Array.isArray(e) ? e.map((e, t) => ({
1479
+ }, ut = (e, n = {}) => {
1480
+ let { timeZone: r } = n;
1481
+ return Array.isArray(e) ? e.map((e, n) => ({
1485
1482
  ...e,
1486
- id: e.id ?? String(t),
1483
+ id: e.id ?? String(n),
1487
1484
  label: e.label ?? "",
1488
- startTime: n(e.startTime, r),
1489
- endTime: n(e.endTime, r)
1485
+ startTime: t(e.startTime, r),
1486
+ endTime: t(e.endTime, r)
1490
1487
  })) : [];
1491
1488
  }, Q = {
1492
1489
  "#005EEF": {
@@ -1525,7 +1522,7 @@ var st = ({ events: e, baseDate: t, onEventClick: n }) => {
1525
1522
  normal: "#F2F3F5",
1526
1523
  hover: "#E6E6E7"
1527
1524
  }
1528
- }, $ = /* @__PURE__ */ new Map(), ut = (e) => {
1525
+ }, $ = /* @__PURE__ */ new Map(), dt = (e) => {
1529
1526
  if (!e) return {
1530
1527
  normal: "#e8f0fe",
1531
1528
  hover: "#d7e3fd"
@@ -1538,43 +1535,61 @@ var st = ({ events: e, baseDate: t, onEventClick: n }) => {
1538
1535
  hover: `rgb(${Math.round(n + (255 - n) * o)}, ${Math.round(r + (255 - r) * o)}, ${Math.round(i + (255 - i) * o)})`
1539
1536
  };
1540
1537
  return $.set(e, s), s;
1541
- }, dt = (e) => {
1542
- let t = ut(e);
1543
- return {
1544
- "--bsy-mobile-calendar-color": e,
1545
- "--bsy-mobile-calendar-bg": t.normal,
1546
- "--bsy-mobile-calendar-hover": t.hover
1547
- };
1548
- }, ft = (e) => {
1549
- let { events: t, scheduleColor: n, timeZone: i, className: a, onEventClick: o, onDayClick: s } = e, [c, l] = g(e, {
1538
+ }, ft = (e, t, n) => {
1539
+ let r = {};
1540
+ return e && (r["--bsy-mobile-calendar-color"] = e), t && (r["--bsy-mobile-calendar-bg"] = t), n && (r["--bsy-mobile-calendar-hover"] = n), r;
1541
+ }, pt = {
1542
+ center: {
1543
+ backgroundPosition: "50%",
1544
+ backgroundSize: "contain"
1545
+ },
1546
+ stretch: {
1547
+ backgroundPosition: "50%",
1548
+ backgroundSize: "cover"
1549
+ },
1550
+ masterDrawingCenter: {
1551
+ backgroundPosition: "50%",
1552
+ backgroundSize: "100% 100%"
1553
+ }
1554
+ }, mt = (e) => {
1555
+ let t = {};
1556
+ if (i(t, "--bsy-mobile-calendar-background-color", e.colorBgContainer), e.panelBgImage) {
1557
+ let n = pt[e.panelBgImagePosition ?? "center"];
1558
+ t["--bsy-mobile-calendar-background-image"] = `url(${e.panelBgImage})`, t["--bsy-mobile-calendar-background-position"] = n.backgroundPosition, t["--bsy-mobile-calendar-background-size"] = n.backgroundSize, t["--bsy-mobile-calendar-background-repeat"] = "no-repeat";
1559
+ }
1560
+ return t;
1561
+ }, ht = (e, t) => {
1562
+ let n = t ?? e?.colorPrimary ?? "#0265ff", r = dt(n), a = ft(n, r.normal, r.hover);
1563
+ return e ? (Object.assign(a, mt(e)), i(a, "--bsy-mobile-calendar-title-color", e.colorText), i(a, "--bsy-mobile-calendar-over-title-color", e.colorTextTertiary), i(a, "--bsy-mobile-calendar-specifically-color", e.colorTextQuaternary ?? e.colorTextTertiary), i(a, "--bsy-mobile-calendar-header-background", e.colorFillSecondary), i(a, "--bsy-mobile-calendar-highlight-color", e.colorPrimary), e.colorPrimary && (a["--bsy-mobile-calendar-segmented-active-color"] = "#fff"), i(a, "--bsy-mobile-calendar-highlight-text-color", e.colorPrimaryText), i(a, "--bsy-mobile-calendar-border-color", e.colorSplit), i(a, "--bsy-mobile-calendar-more-record-color", e.colorLink), Object.assign(a, ft(e.eventBorderColor, e.eventBg, e.eventBgHover)), a) : a;
1564
+ }, gt = (e) => {
1565
+ let { events: t, scheduleColor: r, theme: i, timeZone: a, className: o, onEventClick: s, onDayClick: c } = e, [l, u] = _(e, {
1550
1566
  defaultValue: "month",
1551
1567
  defaultValuePropName: "defaultMode",
1552
1568
  valuePropName: "mode",
1553
1569
  trigger: "onModeChange"
1554
- }), [u, f] = g(e, { defaultValue: r(i).toDate() }), p = d(() => lt(t, { timeZone: i }), [t, i]), _ = d(() => dt(n), [n]);
1555
- return /* @__PURE__ */ m("div", {
1556
- className: w(b["bsy-mobile-calendar"], a),
1557
- style: _,
1558
- children: /* @__PURE__ */ h(S, {
1559
- currentDate: u,
1560
- setCurrentDate: f,
1561
- viewMode: c,
1562
- setViewMode: l,
1563
- scheduleColor: n,
1564
- timeZone: i,
1565
- events: p,
1566
- onEventClick: o,
1567
- onDayClick: s,
1568
- children: [/* @__PURE__ */ m(D, {}), /* @__PURE__ */ h("div", {
1569
- className: b["bsy-mobile-calendar__body"],
1570
+ }), [d, p] = _(e, { defaultValue: n(a).toDate() }), m = f(() => ut(t, { timeZone: a }), [t, a]), v = f(() => ht(i, r), [i, r]);
1571
+ return /* @__PURE__ */ h("div", {
1572
+ className: T(x["bsy-mobile-calendar"], o),
1573
+ style: v,
1574
+ children: /* @__PURE__ */ g(C, {
1575
+ currentDate: d,
1576
+ setCurrentDate: p,
1577
+ viewMode: l,
1578
+ setViewMode: u,
1579
+ timeZone: a,
1580
+ events: m,
1581
+ onEventClick: s,
1582
+ onDayClick: c,
1583
+ children: [/* @__PURE__ */ h(O, {}), /* @__PURE__ */ g("div", {
1584
+ className: x["bsy-mobile-calendar__body"],
1570
1585
  children: [
1571
- c === "month" ? /* @__PURE__ */ m(Ee, {}) : null,
1572
- c === "day" ? /* @__PURE__ */ m(Ue, {}) : null,
1573
- c === "threeDay" ? /* @__PURE__ */ m(ct, {}) : null
1586
+ l === "month" ? /* @__PURE__ */ h(Te, {}) : null,
1587
+ l === "day" ? /* @__PURE__ */ h(Ve, {}) : null,
1588
+ l === "threeDay" ? /* @__PURE__ */ h(lt, {}) : null
1574
1589
  ]
1575
1590
  })]
1576
1591
  })
1577
1592
  });
1578
1593
  };
1579
1594
  //#endregion
1580
- export { ft as t };
1595
+ export { gt as t };