@baishuyun/ui-mobile 0.9.1 → 0.11.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 (65) hide show
  1. package/dist/AMap/{AMap-B1GiEoPE.js → AMap-BkfhkrnK.js} +106 -106
  2. package/dist/AMap/index.js +4 -4
  3. package/dist/ActionSheet/{ActionSheet-DVck9uyS.js → ActionSheet-DJyeduZq.js} +7 -7
  4. package/dist/ActionSheet/index.js +6 -6
  5. package/dist/Calendar/{Calendar-B1TwDL1q.js → Calendar-Cf81JVOC.js} +353 -356
  6. package/dist/Calendar/index.js +5 -4
  7. package/dist/Calendar/{cssVars-DNOooryc.js → timeUtils-t4A3-Hr6.js} +1 -3
  8. package/dist/ConfigProvider/{ConfigProvider-xyGx046s.js → ConfigProvider-CNWefxiV.js} +14 -2
  9. package/dist/ConfigProvider/index.js +4 -4
  10. package/dist/ConfigProvider/{useLocale-Bf81I-9U.js → useLocale-DiKogqPs.js} +6 -0
  11. package/dist/Editor/Editor-CZ4Tz-N2.js +2785 -0
  12. package/dist/Editor/index.js +8 -8
  13. package/dist/Gantt/{Gantt-CbHw9RMw.js → Gantt-Bhvbj3l8.js} +220 -219
  14. package/dist/Gantt/index.js +8 -8
  15. package/dist/Icon/Icon-BKlmJSoE.js +23 -0
  16. package/dist/Icon/index.js +2 -2
  17. package/dist/Overlay/index.js +2 -2
  18. package/dist/Popup/{Popup-BIIDAUmB.js → Popup-Cg3t422z.js} +2 -2
  19. package/dist/Popup/index.js +4 -4
  20. package/dist/Segmented/Segmented-CxQ3Pd05.js +85 -0
  21. package/dist/Segmented/index.js +3 -0
  22. package/dist/components/Editor/{EditorHtml.d.ts → EditorHtmlPreview.d.ts} +1 -1
  23. package/dist/components/Editor/color/EditorColorPicker.d.ts +11 -0
  24. package/dist/components/Editor/color/colorUtils.d.ts +32 -0
  25. package/dist/components/Editor/constants/codeLanguages.d.ts +6 -0
  26. package/dist/components/Editor/hooks/useEditorAiSession.d.ts +20 -0
  27. package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
  28. package/dist/components/Editor/hooks/useEditorImageUpload.d.ts +17 -0
  29. package/dist/components/Editor/hooks/useEditorLink.d.ts +15 -0
  30. package/dist/components/Editor/hooks/useEditorValueBridge.d.ts +10 -0
  31. package/dist/components/Editor/htmlConfig.d.ts +2 -0
  32. package/dist/components/Editor/index.d.ts +1 -1
  33. package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
  34. package/dist/components/Editor/nodes/ImageNode.d.ts +5 -2
  35. package/dist/components/Editor/plugins/CodeHighlightPlugin.d.ts +2 -0
  36. package/dist/components/Editor/plugins/EnterKeyPlugin.d.ts +1 -0
  37. package/dist/components/Editor/plugins/TablePlugin.d.ts +2 -0
  38. package/dist/components/Editor/popups/AiResultPopup.d.ts +13 -0
  39. package/dist/components/Editor/popups/ImageUrlPopup.d.ts +7 -0
  40. package/dist/components/Editor/popups/LinkPopup.d.ts +13 -0
  41. package/dist/components/Editor/popups/OptionSheets.d.ts +23 -0
  42. package/dist/components/Editor/popups/index.d.ts +4 -0
  43. package/dist/components/Editor/popups/shared.d.ts +11 -0
  44. package/dist/components/Editor/toolbar/Toolbar.d.ts +7 -1
  45. package/dist/components/Editor/toolbar/useTextFormats.d.ts +2 -15
  46. package/dist/components/Editor/utils/codeHighlighter.d.ts +12 -0
  47. package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +4 -0
  48. package/dist/components/Editor/utils/readTextFormats.d.ts +21 -0
  49. package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
  50. package/dist/components/Segmented/Segmented.d.ts +7 -0
  51. package/dist/components/Segmented/index.d.ts +2 -0
  52. package/dist/components/Segmented/interface.d.ts +42 -0
  53. package/dist/components/index.d.ts +3 -1
  54. package/dist/index.js +14 -13
  55. package/dist/locale/lang/en-US.json.d.ts +6 -0
  56. package/dist/locale/lang/zh-CN.json.d.ts +6 -0
  57. package/dist/locale/lang/zh-TW.json.d.ts +6 -0
  58. package/dist/style.css +1 -1
  59. package/dist/vendors/cssVars-BbL_cmFM.js +6 -0
  60. package/dist/vendors/{version-CegBK2kS.js → version-CMSvw03J.js} +1 -1
  61. package/package.json +7 -1
  62. package/dist/Editor/Editor-COxP3RpF.js +0 -2059
  63. package/dist/Icon/Icon-D3xi1oyo.js +0 -23
  64. package/dist/components/Editor/sheets.d.ts +0 -43
  65. /package/dist/Overlay/{Overlay-CqQWOqO4.js → Overlay-DFiZYsBs.js} +0 -0
@@ -1,36 +1,35 @@
1
- import { t as e } from "../ConfigProvider/useLocale-Bf81I-9U.js";
2
- import { i as t, n, r, t as i } from "./cssVars-DNOooryc.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
- //#region src/components/Calendar/Calendar.module.scss
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());
1
+ import { t as e } from "../ConfigProvider/useLocale-DiKogqPs.js";
2
+ import { n as t, r as n, t as r } from "./timeUtils-t4A3-Hr6.js";
3
+ import { t as i } from "../vendors/cssVars-BbL_cmFM.js";
4
+ import { t as a } from "../Segmented/Segmented-CxQ3Pd05.js";
5
+ import o, { createContext as s, forwardRef as c, useCallback as l, useContext as u, useEffect as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
6
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
7
+ import { useControllableValue as v, useLatest as y, useSize as b } from "ahooks";
8
+ import x from "dayjs";
9
+ //#region src/components/Calendar/context/CalendarContext.tsx
10
+ var S = s(null), C = ({ children: n, currentDate: i, setCurrentDate: a, viewMode: o, setViewMode: s, timeZone: c, events: u, onEventClick: d, onDayClick: f }) => {
11
+ let { t: m } = e(), h = p(() => t(c), [c]), _ = l(() => {
12
+ let e = r(c);
13
+ x(i).isSame(e, "day") || a(e.toDate());
15
14
  }, [
16
15
  i,
17
16
  a,
18
- l
19
- ]), v = f(() => m("calendar.yearMonth", {
17
+ c
18
+ ]), v = p(() => m("calendar.yearMonth", {
20
19
  year: i.getFullYear(),
21
20
  monthShort: m(`calendar.monthShort.${i.getMonth() + 1}`)
22
- }), [i, m]), y = f(() => ({
21
+ }), [i, m]), y = p(() => ({
23
22
  currentDate: i,
24
23
  setCurrentDate: a,
25
24
  goToToday: _,
26
25
  viewMode: o,
27
26
  setViewMode: s,
28
27
  yearMonthText: v,
29
- timeZone: l,
30
- timezoneLabel: g,
28
+ timeZone: c,
29
+ timezoneLabel: h,
31
30
  events: u,
32
31
  onEventClick: d,
33
- onDayClick: p
32
+ onDayClick: f
34
33
  }), [
35
34
  i,
36
35
  a,
@@ -38,29 +37,27 @@ var x = {
38
37
  o,
39
38
  s,
40
39
  v,
41
- l,
42
- g,
40
+ c,
41
+ h,
43
42
  u,
44
43
  d,
45
- p
44
+ f
46
45
  ]);
47
- return /* @__PURE__ */ h(S.Provider, {
46
+ return /* @__PURE__ */ g(S.Provider, {
48
47
  value: y,
49
- children: t
48
+ children: n
50
49
  });
51
50
  }, w = () => {
52
- let e = l(S);
51
+ let e = u(S);
53
52
  if (!e) throw Error("useCalendarContext must be used within a CalendarProvider");
54
53
  return 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 = [
54
+ }, T = {
55
+ "bsy-mobile-calendar-header": "_bsy-mobile-calendar-header_f5f2q_1",
56
+ "bsy-mobile-calendar-header__left": "_bsy-mobile-calendar-header__left_f5f2q_12",
57
+ "bsy-mobile-calendar-header__year-month": "_bsy-mobile-calendar-header__year-month_f5f2q_18",
58
+ "bsy-mobile-calendar-header__today": "_bsy-mobile-calendar-header__today_f5f2q_23",
59
+ "bsy-mobile-calendar-header__segmented": "_bsy-mobile-calendar-header__segmented_f5f2q_32"
60
+ }, E = [
64
61
  {
65
62
  key: "calendar.viewDay",
66
63
  value: "day"
@@ -73,40 +70,37 @@ var x = {
73
70
  key: "calendar.viewMonth",
74
71
  value: "month"
75
72
  }
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"],
73
+ ], D = () => {
74
+ let { yearMonthText: t, goToToday: n, viewMode: r, setViewMode: i } = w(), { t: o } = e();
75
+ return /* @__PURE__ */ _("div", {
76
+ className: T["bsy-mobile-calendar-header"],
77
+ children: [/* @__PURE__ */ _("div", {
78
+ className: T["bsy-mobile-calendar-header__left"],
79
+ children: [/* @__PURE__ */ g("span", {
80
+ className: T["bsy-mobile-calendar-header__year-month"],
84
81
  children: t
85
- }), /* @__PURE__ */ h("button", {
86
- className: E["bsy-mobile-calendar-header__today"],
82
+ }), /* @__PURE__ */ g("button", {
83
+ className: T["bsy-mobile-calendar-header__today"],
87
84
  onClick: n,
88
85
  type: "button",
89
- children: a("calendar.today")
86
+ children: o("calendar.today")
90
87
  })]
91
- }), /* @__PURE__ */ h("div", {
92
- className: E["bsy-mobile-calendar-segmented"],
93
- role: "tablist",
94
- children: D.map((e) => /* @__PURE__ */ h("button", {
95
- type: "button",
96
- role: "tab",
97
- "aria-selected": r === e.value,
98
- className: T(E["bsy-mobile-calendar-segmented__item"], r === e.value && E["bsy-mobile-calendar-segmented__item--active"]),
99
- onClick: () => i(e.value),
100
- children: a(e.key)
101
- }, e.value))
88
+ }), /* @__PURE__ */ g(a, {
89
+ className: T["bsy-mobile-calendar-header__segmented"],
90
+ options: E.map((e) => ({
91
+ label: o(e.key),
92
+ value: e.value
93
+ })),
94
+ value: r,
95
+ onChange: i
102
96
  })]
103
97
  });
104
- }, k = "0.4s", A = "cubic-bezier(0.25, 0.8, 0.25, 1)", j = 26, M = {
98
+ }, O = "0.4s", k = "cubic-bezier(0.25, 0.8, 0.25, 1)", A = 26, j = {
105
99
  HEADER_HEIGHT: 24,
106
100
  SLOT_HEIGHT: 22,
107
101
  SLOT_GAP: 4,
108
102
  WEEK_PADDING_X: 10
109
- }, N = [
103
+ }, M = [
110
104
  1,
111
105
  2,
112
106
  3,
@@ -114,7 +108,7 @@ var x = {
114
108
  5,
115
109
  6,
116
110
  7
117
- ], P = {
111
+ ], N = {
118
112
  "bsy-mobile-calendar-month": "_bsy-mobile-calendar-month_1t8o8_1",
119
113
  "bsy-mobile-calendar-weekday-header": "_bsy-mobile-calendar-weekday-header_1t8o8_7",
120
114
  "bsy-mobile-calendar-weekday-header__item": "_bsy-mobile-calendar-weekday-header__item_1t8o8_13",
@@ -133,27 +127,27 @@ var x = {
133
127
  "bsy-mobile-calendar-week-events__segment": "_bsy-mobile-calendar-week-events__segment_1t8o8_113"
134
128
  }, ee = () => {
135
129
  let { t } = e();
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"],
130
+ return /* @__PURE__ */ g("div", {
131
+ className: N["bsy-mobile-calendar-weekday-header"],
132
+ children: M.map((e) => /* @__PURE__ */ g("div", {
133
+ className: N["bsy-mobile-calendar-weekday-header__item"],
140
134
  children: t(`calendar.weekday.${e}`)
141
135
  }, e))
142
136
  });
143
- }, te = s(function({ date: e, isCurrentMonth: t, isToday: n, hiddenCount: r = 0 }, i) {
144
- return /* @__PURE__ */ g("div", {
137
+ }, P = (...e) => e.filter(Boolean).join(" "), te = c(function({ date: e, isCurrentMonth: t, isToday: n, hiddenCount: r = 0 }, i) {
138
+ return /* @__PURE__ */ _("div", {
145
139
  ref: i,
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"]),
140
+ className: N["bsy-mobile-calendar-day-cell"],
141
+ children: [/* @__PURE__ */ _("div", {
142
+ className: N["bsy-mobile-calendar-day-cell__header"],
143
+ children: [/* @__PURE__ */ g("div", {
144
+ className: P(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"]),
151
145
  children: e.date()
152
- }), r > 0 ? /* @__PURE__ */ g("div", {
153
- className: P["bsy-mobile-calendar-day-cell__badge"],
146
+ }), r > 0 ? /* @__PURE__ */ _("div", {
147
+ className: N["bsy-mobile-calendar-day-cell__badge"],
154
148
  children: ["+", r]
155
149
  }) : null]
156
- }), /* @__PURE__ */ h("div", { className: P["bsy-mobile-calendar-day-cell__body"] })]
150
+ }), /* @__PURE__ */ g("div", { className: N["bsy-mobile-calendar-day-cell__body"] })]
157
151
  });
158
152
  }), F = {
159
153
  "bsy-mobile-calendar-event-card": "_bsy-mobile-calendar-event-card_v4uo1_1",
@@ -164,8 +158,8 @@ var x = {
164
158
  "bsy-mobile-calendar-event-card__timed-body": "_bsy-mobile-calendar-event-card__timed-body_v4uo1_42",
165
159
  "bsy-mobile-calendar-event-card__title": "_bsy-mobile-calendar-event-card__title_v4uo1_46",
166
160
  "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),
161
+ }, I = o.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__ */ g("div", {
162
+ className: P(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),
169
163
  style: {
170
164
  height: a,
171
165
  lineHeight: l === "timed" ? "normal" : `${a}px`,
@@ -175,12 +169,12 @@ var x = {
175
169
  e.stopPropagation(), c();
176
170
  } : void 0,
177
171
  role: c ? "button" : void 0,
178
- children: t ? l === "timed" ? /* @__PURE__ */ g("div", {
172
+ children: t ? l === "timed" ? /* @__PURE__ */ _("div", {
179
173
  className: F["bsy-mobile-calendar-event-card__timed-body"],
180
- children: [/* @__PURE__ */ h("div", {
174
+ children: [/* @__PURE__ */ g("div", {
181
175
  className: F["bsy-mobile-calendar-event-card__title"],
182
176
  children: e
183
- }), !!u && /* @__PURE__ */ h("div", {
177
+ }), !!u && /* @__PURE__ */ g("div", {
184
178
  className: F["bsy-mobile-calendar-event-card__time"],
185
179
  children: u
186
180
  })]
@@ -189,7 +183,7 @@ var x = {
189
183
  //#endregion
190
184
  //#region src/components/Calendar/utils/monthLayoutAlgorithm.ts
191
185
  function ne(e) {
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;
186
+ 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;
193
187
  return {
194
188
  top: i + r * (a + o),
195
189
  height: a,
@@ -198,7 +192,7 @@ function ne(e) {
198
192
  };
199
193
  }
200
194
  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;
195
+ let r = x(e.startTime), i = x(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;
202
196
  return o.valueOf() === s.valueOf() && c >= 0 && c < n && (u = Math.min(c + 1, n)), {
203
197
  event: e,
204
198
  startDayIndex: c,
@@ -286,14 +280,14 @@ function se(e, t, n) {
286
280
  }
287
281
  return r;
288
282
  }
289
- var ce = a.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
283
+ var ce = o.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
290
284
  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"],
285
+ return /* @__PURE__ */ g("div", {
286
+ className: N["bsy-mobile-calendar-week-events"],
293
287
  children: i.map((e) => {
294
288
  let t = ne(e), { event: n, isStart: i, isEnd: a, isWeekStart: o } = e, s = i || o;
295
- return /* @__PURE__ */ h(I, {
296
- className: P["bsy-mobile-calendar-week-events__segment"],
289
+ return /* @__PURE__ */ g(I, {
290
+ className: N["bsy-mobile-calendar-week-events__segment"],
297
291
  label: n.label,
298
292
  showLabel: s,
299
293
  isStart: i,
@@ -313,7 +307,7 @@ var ce = a.memo(({ segments: e, hiddenScheduleIds: t, maxVisibleRows: n }) => {
313
307
  //#endregion
314
308
  //#region src/components/Calendar/utils/dateUtils.ts
315
309
  function le(e) {
316
- let t = b(e).startOf("isoWeek");
310
+ let t = x(e).startOf("isoWeek");
317
311
  return Array.from({ length: 7 }, (e, n) => t.add(n, "day"));
318
312
  }
319
313
  function ue(e) {
@@ -327,22 +321,22 @@ function de(e) {
327
321
  return t;
328
322
  }
329
323
  function R(e, t) {
330
- return e.isSame(n(t), "day");
324
+ return e.isSame(r(t), "day");
331
325
  }
332
326
  function fe(e, t) {
333
327
  return e.isSame(t, "month");
334
328
  }
335
329
  function z(e) {
336
- return b(e.startTime).format("YYYY-MM-DD") !== b(e.endTime).format("YYYY-MM-DD");
330
+ return x(e.startTime).format("YYYY-MM-DD") !== x(e.endTime).format("YYYY-MM-DD");
337
331
  }
338
332
  function pe(e, t) {
339
- let n = t.startOf("day"), r = b(e.startTime).startOf("day"), i = b(e.endTime).startOf("day");
333
+ let n = t.startOf("day"), r = x(e.startTime).startOf("day"), i = x(e.endTime).startOf("day");
340
334
  return !n.isBefore(r) && !n.isAfter(i);
341
335
  }
342
336
  function me(e, t) {
343
337
  let n = t.startOf("day");
344
338
  return e.filter((e) => {
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");
339
+ let t = x(e.startTime), r = x(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");
346
340
  return a && !o && (s = r.subtract(1, "day").startOf("day")), !n.isBefore(i) && !n.isAfter(s);
347
341
  });
348
342
  }
@@ -350,23 +344,23 @@ function me(e, t) {
350
344
  //#region src/components/Calendar/CalendarMonth/WeekRow/WeekRow.tsx
351
345
  var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenScheduleIds: i, maxVisibleRows: a, cellRef: o, onDayClick: s }) => {
352
346
  let { timeZone: c } = w();
353
- return /* @__PURE__ */ g("div", {
354
- className: P["bsy-mobile-calendar-week-row"],
347
+ return /* @__PURE__ */ _("div", {
348
+ className: N["bsy-mobile-calendar-week-row"],
355
349
  onClick: (t) => {
356
350
  if (!s) return;
357
351
  let n = t.currentTarget.getBoundingClientRect(), r = t.clientX - n.left, i = n.width / 7, a = Math.floor(r / i);
358
352
  a >= 0 && a < e.length && s(e[a]);
359
353
  },
360
- children: [/* @__PURE__ */ h("div", {
361
- className: P["bsy-mobile-calendar-week-row__cells"],
362
- children: e.map((e, n) => /* @__PURE__ */ h(te, {
354
+ children: [/* @__PURE__ */ g("div", {
355
+ className: N["bsy-mobile-calendar-week-row__cells"],
356
+ children: e.map((e, n) => /* @__PURE__ */ g(te, {
363
357
  ref: n === 0 ? o : void 0,
364
358
  date: e,
365
359
  isCurrentMonth: fe(e, t),
366
360
  isToday: R(e, c),
367
361
  hiddenCount: r[n] || 0
368
362
  }, e.format("YYYY-MM-DD")))
369
- }), /* @__PURE__ */ h(ce, {
363
+ }), /* @__PURE__ */ g(ce, {
370
364
  segments: n,
371
365
  hiddenScheduleIds: i,
372
366
  maxVisibleRows: a
@@ -376,14 +370,14 @@ var he = ({ dates: e, monthDate: t, segments: n, hiddenCounts: r, hiddenSchedule
376
370
  //#endregion
377
371
  //#region src/components/Calendar/hooks/useMonthDates.ts
378
372
  function ge(e) {
379
- return { weeks: f(() => de(ue(e)), [e.format("YYYY-MM")]) };
373
+ return { weeks: p(() => de(ue(e)), [e.format("YYYY-MM")]) };
380
374
  }
381
375
  //#endregion
382
376
  //#region src/components/Calendar/hooks/useCellHeight.ts
383
- var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } = M;
377
+ var { HEADER_HEIGHT: _e, SLOT_HEIGHT: ve, SLOT_GAP: ye } = j;
384
378
  function be() {
385
- let e = p(null), [t, n] = m(2);
386
- return u(() => {
379
+ let e = m(null), [t, n] = h(2);
380
+ return d(() => {
387
381
  let t = e.current;
388
382
  if (!t) return;
389
383
  let r = (e) => {
@@ -406,7 +400,7 @@ function be() {
406
400
  //#endregion
407
401
  //#region src/components/Calendar/hooks/useMonthEventLayout.ts
408
402
  function xe({ events: e, monthDate: t, maxVisibleRows: n }) {
409
- return f(() => {
403
+ return p(() => {
410
404
  if (!e || e.length === 0) return {
411
405
  weekLayouts: Array.from({ length: 6 }, () => []),
412
406
  hiddenScheduleIds: /* @__PURE__ */ new Set(),
@@ -432,13 +426,13 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
432
426
  monthDate: e,
433
427
  maxVisibleRows: s
434
428
  });
435
- return /* @__PURE__ */ h("div", {
436
- className: P["bsy-mobile-calendar-month-slide"],
429
+ return /* @__PURE__ */ g("div", {
430
+ className: N["bsy-mobile-calendar-month-slide"],
437
431
  style: {
438
432
  width: t,
439
433
  ...r
440
434
  },
441
- children: a.map((t, n) => /* @__PURE__ */ h(he, {
435
+ children: a.map((t, n) => /* @__PURE__ */ g(he, {
442
436
  dates: t,
443
437
  monthDate: e,
444
438
  segments: c[n] || [],
@@ -451,21 +445,21 @@ var Se = ({ monthDate: e, containerWidth: t, events: n, style: r, onDayClick: i
451
445
  });
452
446
  }, B = (e) => e.subtract(1, "month"), V = (e) => e.add(1, "month");
453
447
  function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
454
- let r = f(() => [
448
+ let r = p(() => [
455
449
  B(e),
456
450
  e,
457
451
  V(e)
458
- ], [e.format("YYYY-MM")]), [i, a] = m(0), [o, s] = m(!1), l = p({
452
+ ], [e.format("YYYY-MM")]), [i, a] = h(0), [o, s] = h(!1), c = m({
459
453
  startX: 0,
460
454
  startY: 0,
461
455
  startTime: 0,
462
456
  isDragging: !1,
463
457
  isVerticalScroll: !1,
464
458
  directionLocked: !1
465
- }), u = v(e), d = v(t), h = v(n), g = v(i), _ = c((e) => {
466
- if (l.current.isDragging) return;
459
+ }), u = y(e), d = y(t), f = y(n), g = y(i), _ = l((e) => {
460
+ if (c.current.isDragging) return;
467
461
  let t = e.touches[0];
468
- l.current = {
462
+ c.current = {
469
463
  startX: t.clientX,
470
464
  startY: t.clientY,
471
465
  startTime: Date.now(),
@@ -473,21 +467,21 @@ function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
473
467
  isVerticalScroll: !1,
474
468
  directionLocked: !1
475
469
  }, s(!1);
476
- }, []), y = c((e) => {
477
- if (!l.current.isDragging) return;
478
- let t = e.touches[0], n = t.clientX - l.current.startX, r = t.clientY - l.current.startY;
479
- if (!l.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (l.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
480
- l.current.isVerticalScroll = !0;
470
+ }, []), v = l((e) => {
471
+ if (!c.current.isDragging) return;
472
+ let t = e.touches[0], n = t.clientX - c.current.startX, r = t.clientY - c.current.startY;
473
+ if (!c.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (c.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
474
+ c.current.isVerticalScroll = !0;
481
475
  return;
482
476
  }
483
- l.current.isVerticalScroll || a(n);
484
- }, []), b = c(() => {
485
- if (!l.current.isDragging) return;
486
- let e = h.current ?? 0, t = g.current ?? 0;
487
- if (l.current.isDragging = !1, !e || l.current.isVerticalScroll) return;
488
- let n = Date.now() - l.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
477
+ c.current.isVerticalScroll || a(n);
478
+ }, []), b = l(() => {
479
+ if (!c.current.isDragging) return;
480
+ let e = f.current ?? 0, t = g.current ?? 0;
481
+ if (c.current.isDragging = !1, !e || c.current.isVerticalScroll) return;
482
+ let n = Date.now() - c.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
489
483
  s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
490
- }, [h, g]), x = c(() => {
484
+ }, [f, g]), x = l(() => {
491
485
  let e = g.current ?? 0, t = u.current, n = d.current;
492
486
  if (e !== 0 && t && n) {
493
487
  let r = (e > 0 ? -1 : 1) == 1 ? V(t) : B(t);
@@ -502,14 +496,14 @@ function Ce({ currentDate: e, setCurrentDate: t, containerWidth: n }) {
502
496
  months: r,
503
497
  translateX: i,
504
498
  transitionEnabled: o,
505
- bindEvents: f(() => ({
499
+ bindEvents: p(() => ({
506
500
  onTouchStart: _,
507
- onTouchMove: y,
501
+ onTouchMove: v,
508
502
  onTouchEnd: b,
509
503
  onTouchCancel: b
510
504
  }), [
511
505
  _,
512
- y,
506
+ v,
513
507
  b
514
508
  ]),
515
509
  handleTransitionEnd: x
@@ -526,10 +520,10 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
526
520
  let t = me(r, e);
527
521
  i?.(e.toDate(), t);
528
522
  };
529
- return n ? /* @__PURE__ */ h("div", {
530
- className: P["bsy-mobile-calendar-carousel"],
523
+ return n ? /* @__PURE__ */ g("div", {
524
+ className: N["bsy-mobile-calendar-carousel"],
531
525
  ...c,
532
- children: /* @__PURE__ */ h("div", {
526
+ children: /* @__PURE__ */ g("div", {
533
527
  style: {
534
528
  width: n * 3,
535
529
  marginLeft: -n,
@@ -540,7 +534,7 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
540
534
  willChange: "transform"
541
535
  },
542
536
  onTransitionEnd: l,
543
- children: a.map((e) => /* @__PURE__ */ h(Se, {
537
+ children: a.map((e) => /* @__PURE__ */ g(Se, {
544
538
  monthDate: e,
545
539
  containerWidth: n,
546
540
  events: r,
@@ -553,13 +547,13 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
553
547
  })
554
548
  }) : null;
555
549
  }, Te = () => {
556
- let e = p(null), t = y(e), { currentDate: n, setCurrentDate: r, events: i } = w(), a = f(() => b(n), [n]), o = c((e) => {
550
+ let e = m(null), t = b(e), { currentDate: n, setCurrentDate: r, events: i } = w(), a = p(() => x(n), [n]), o = l((e) => {
557
551
  r(e.toDate());
558
552
  }, [r]);
559
- return /* @__PURE__ */ g("div", {
553
+ return /* @__PURE__ */ _("div", {
560
554
  ref: e,
561
- className: P["bsy-mobile-calendar-month"],
562
- children: [/* @__PURE__ */ h(ee, {}), /* @__PURE__ */ h(we, {
555
+ className: N["bsy-mobile-calendar-month"],
556
+ children: [/* @__PURE__ */ g(ee, {}), /* @__PURE__ */ g(we, {
563
557
  currentDate: a,
564
558
  setCurrentDate: o,
565
559
  containerWidth: t?.width ?? 0,
@@ -568,21 +562,21 @@ var we = ({ currentDate: e, setCurrentDate: t, containerWidth: n, events: r }) =
568
562
  });
569
563
  }, H = (e) => e.subtract(1, "week"), U = (e) => e.add(1, "week");
570
564
  function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
571
- let r = f(() => [
565
+ let r = p(() => [
572
566
  H(e),
573
567
  e,
574
568
  U(e)
575
- ], [e.format("YYYY-MM-DD")]), [i, a] = m(0), [o, s] = m(!1), l = p({
569
+ ], [e.format("YYYY-MM-DD")]), [i, a] = h(0), [o, s] = h(!1), c = m({
576
570
  startX: 0,
577
571
  startY: 0,
578
572
  startTime: 0,
579
573
  isDragging: !1,
580
574
  isVerticalScroll: !1,
581
575
  directionLocked: !1
582
- }), u = v(e), d = v(t), h = v(n), g = v(i), _ = c((e) => {
583
- if (l.current.isDragging) return;
576
+ }), u = y(e), d = y(t), f = y(n), g = y(i), _ = l((e) => {
577
+ if (c.current.isDragging) return;
584
578
  let t = e.touches[0];
585
- l.current = {
579
+ c.current = {
586
580
  startX: t.clientX,
587
581
  startY: t.clientY,
588
582
  startTime: Date.now(),
@@ -590,21 +584,21 @@ function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
590
584
  isVerticalScroll: !1,
591
585
  directionLocked: !1
592
586
  }, s(!1);
593
- }, []), y = c((e) => {
594
- if (!l.current.isDragging) return;
595
- let t = e.touches[0], n = t.clientX - l.current.startX, r = t.clientY - l.current.startY;
596
- if (!l.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (l.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
597
- l.current.isVerticalScroll = !0;
587
+ }, []), v = l((e) => {
588
+ if (!c.current.isDragging) return;
589
+ let t = e.touches[0], n = t.clientX - c.current.startX, r = t.clientY - c.current.startY;
590
+ if (!c.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (c.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
591
+ c.current.isVerticalScroll = !0;
598
592
  return;
599
593
  }
600
- l.current.isVerticalScroll || a(n);
601
- }, []), b = c(() => {
602
- if (!l.current.isDragging) return;
603
- let e = h.current ?? 0, t = g.current ?? 0;
604
- if (l.current.isDragging = !1, !e || l.current.isVerticalScroll) return;
605
- let n = Date.now() - l.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
594
+ c.current.isVerticalScroll || a(n);
595
+ }, []), b = l(() => {
596
+ if (!c.current.isDragging) return;
597
+ let e = f.current ?? 0, t = g.current ?? 0;
598
+ if (c.current.isDragging = !1, !e || c.current.isVerticalScroll) return;
599
+ let n = Date.now() - c.current.startTime, r = Math.abs(t) / n, i = Math.abs(t) > e * .35 || r > .3;
606
600
  s(!0), a(i && t !== 0 ? -(t > 0 ? -1 : 1) * e : 0);
607
- }, [h, g]), x = c(() => {
601
+ }, [f, g]), x = l(() => {
608
602
  let e = g.current ?? 0, t = u.current, n = d.current;
609
603
  if (e !== 0 && t && n) {
610
604
  let r = (e > 0 ? -1 : 1) == 1 ? U(t) : H(t);
@@ -619,14 +613,14 @@ function Ee({ selectedDate: e, setSelectedDate: t, containerWidth: n }) {
619
613
  weeks: r,
620
614
  translateX: i,
621
615
  transitionEnabled: o,
622
- bindEvents: f(() => ({
616
+ bindEvents: p(() => ({
623
617
  onTouchStart: _,
624
- onTouchMove: y,
618
+ onTouchMove: v,
625
619
  onTouchEnd: b,
626
620
  onTouchCancel: b
627
621
  }), [
628
622
  _,
629
- y,
623
+ v,
630
624
  b
631
625
  ]),
632
626
  handleTransitionEnd: x
@@ -668,29 +662,29 @@ var W = {
668
662
  "bsy-mobile-calendar-allday__content": "_bsy-mobile-calendar-allday__content_dugny_170",
669
663
  "bsy-mobile-calendar-allday__list": "_bsy-mobile-calendar-allday__list_dugny_176",
670
664
  "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", {
665
+ }, De = ({ weekDate: t, currentDate: n, containerWidth: i, onDateClick: a }) => {
666
+ let { timeZone: o } = w(), { t: s } = e(), c = le(t.toDate()), l = r(o).startOf("day"), u = c.some((e) => R(e, o)), d = l.day(), f = n.isSame(l, "day");
667
+ return /* @__PURE__ */ _("div", {
674
668
  className: W["bsy-mobile-calendar-week-slide"],
675
669
  style: { width: i },
676
- children: [/* @__PURE__ */ h("div", {
670
+ children: [/* @__PURE__ */ g("div", {
677
671
  className: W["bsy-mobile-calendar-week-slide__weekdays"],
678
- children: N.map((e, t) => {
672
+ children: M.map((e, t) => {
679
673
  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"]),
674
+ return /* @__PURE__ */ g("div", {
675
+ className: P(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"]),
682
676
  children: s(`calendar.weekday.${e}`)
683
677
  }, e);
684
678
  })
685
- }), /* @__PURE__ */ h("div", {
679
+ }), /* @__PURE__ */ g("div", {
686
680
  className: W["bsy-mobile-calendar-week-slide__dates"],
687
681
  children: c.map((e) => {
688
- let t = R(e, o), n = e.isSame(r, "day") && !t, i = e.isBefore(l);
689
- return /* @__PURE__ */ h("div", {
682
+ let t = R(e, o), r = e.isSame(n, "day") && !t, i = e.isBefore(l);
683
+ return /* @__PURE__ */ g("div", {
690
684
  className: W["bsy-mobile-calendar-week-slide__date-item"],
691
685
  onClick: () => a?.(e),
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"]),
686
+ children: /* @__PURE__ */ g("div", {
687
+ className: P(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"], r && W["bsy-mobile-calendar-week-slide__date-circle--selected"]),
694
688
  children: e.date()
695
689
  })
696
690
  }, e.format("YYYY-MM-DD"));
@@ -703,10 +697,10 @@ var W = {
703
697
  setSelectedDate: t,
704
698
  containerWidth: n
705
699
  });
706
- return n ? /* @__PURE__ */ h("div", {
700
+ return n ? /* @__PURE__ */ g("div", {
707
701
  className: W["bsy-mobile-calendar-week-carousel"],
708
702
  ...o,
709
- children: /* @__PURE__ */ h("div", {
703
+ children: /* @__PURE__ */ g("div", {
710
704
  style: {
711
705
  width: n * 3,
712
706
  marginLeft: -n,
@@ -717,7 +711,7 @@ var W = {
717
711
  willChange: "transform"
718
712
  },
719
713
  onTransitionEnd: s,
720
- children: r.map((r) => /* @__PURE__ */ h(De, {
714
+ children: r.map((r) => /* @__PURE__ */ g(De, {
721
715
  weekDate: r,
722
716
  currentDate: e,
723
717
  containerWidth: n,
@@ -725,31 +719,31 @@ var W = {
725
719
  }, r.format("YYYY-MM-DD")))
726
720
  })
727
721
  }) : null;
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(() => {
722
+ }, ke = o.memo(({ events: t, onEventClick: n }) => {
723
+ let { t: r } = e(), i = m(null), [a, o] = h(0), [s, c] = h(!1), l = s ? t.length : Math.min(t.length, 3), u = t.slice(0, l), d = t.length - 3, p = t.length > 3, v = s && t.length > 8;
724
+ return f(() => {
731
725
  i.current && o(t.length > 0 ? i.current.scrollHeight : 0);
732
- }, [t, s]), /* @__PURE__ */ h("div", {
726
+ }, [t, s]), /* @__PURE__ */ g("div", {
733
727
  className: W["bsy-mobile-calendar-allday"],
734
728
  style: { height: a },
735
- children: /* @__PURE__ */ g("div", {
729
+ children: /* @__PURE__ */ _("div", {
736
730
  ref: i,
737
731
  className: W["bsy-mobile-calendar-allday__content"],
738
- children: [/* @__PURE__ */ h("div", {
732
+ children: [/* @__PURE__ */ g("div", {
739
733
  className: W["bsy-mobile-calendar-allday__list"],
740
734
  style: v ? {
741
735
  maxHeight: 204,
742
736
  overflowY: "auto"
743
737
  } : void 0,
744
- children: u.map((e) => /* @__PURE__ */ h(I, {
738
+ children: u.map((e) => /* @__PURE__ */ g(I, {
745
739
  label: e.label,
746
740
  style: { width: "100%" },
747
741
  onClick: () => n?.(e)
748
742
  }, e.id))
749
- }), _ ? /* @__PURE__ */ g("div", {
743
+ }), p ? /* @__PURE__ */ _("div", {
750
744
  className: W["bsy-mobile-calendar-allday__expand"],
751
745
  onClick: () => c((e) => !e),
752
- children: [/* @__PURE__ */ h("span", { children: s ? r("calendar.collapse") : r("calendar.moreRecords", { count: f }) }), /* @__PURE__ */ h("svg", {
746
+ children: [/* @__PURE__ */ g("span", { children: s ? r("calendar.collapse") : r("calendar.moreRecords", { count: d }) }), /* @__PURE__ */ g("svg", {
753
747
  width: "16",
754
748
  height: "16",
755
749
  viewBox: "0 0 16 16",
@@ -758,7 +752,7 @@ var W = {
758
752
  transform: s ? "rotate(180deg)" : "rotate(0deg)",
759
753
  transition: "transform 200ms ease"
760
754
  },
761
- children: /* @__PURE__ */ h("path", {
755
+ children: /* @__PURE__ */ g("path", {
762
756
  d: "M4 6L8 10L12 6",
763
757
  stroke: "currentColor",
764
758
  strokeWidth: "1.5",
@@ -771,35 +765,35 @@ var W = {
771
765
  });
772
766
  }), Ae = ({ currentDate: e, setCurrentDate: t, containerWidth: n, allDayEvents: r, onEventClick: i }) => {
773
767
  let { timezoneLabel: a } = w();
774
- return /* @__PURE__ */ g("div", {
768
+ return /* @__PURE__ */ _("div", {
775
769
  className: W["bsy-mobile-calendar-day__header-wrap"],
776
- children: [/* @__PURE__ */ g("div", {
770
+ children: [/* @__PURE__ */ _("div", {
777
771
  className: W["bsy-mobile-calendar-day__header"],
778
- children: [/* @__PURE__ */ h("div", {
772
+ children: [/* @__PURE__ */ g("div", {
779
773
  className: W["bsy-mobile-calendar-day__tz"],
780
774
  children: a
781
- }), /* @__PURE__ */ h(Oe, {
775
+ }), /* @__PURE__ */ g(Oe, {
782
776
  currentDate: e,
783
777
  setCurrentDate: t,
784
778
  containerWidth: n
785
779
  })]
786
- }), /* @__PURE__ */ h(ke, {
780
+ }), /* @__PURE__ */ g(ke, {
787
781
  events: r,
788
782
  onEventClick: i
789
783
  })]
790
784
  });
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);
785
+ }, G = (e) => x(e.startTime).format("YYYY-MM-DD") !== x(e.endTime).format("YYYY-MM-DD"), K = (e) => {
786
+ let t = x(e.startTime), n = x(e.endTime);
793
787
  return n.diff(t, "minute") < 22 ? t.add(22, "minute") : n;
794
788
  }, q = (e, t) => {
795
- let n = b(e.startTime), r = K(e), i = b(t.startTime), a = K(t);
789
+ let n = x(e.startTime), r = K(e), i = x(t.startTime), a = K(t);
796
790
  return n.isBefore(a) && r.isAfter(i);
797
791
  }, je = (e) => {
798
792
  if (e.length === 0) return [];
799
- let t = [...e].sort((e, t) => b(e.startTime).valueOf() - b(t.startTime).valueOf()), n = [], r = [t[0]], i = K(t[0]);
793
+ let t = [...e].sort((e, t) => x(e.startTime).valueOf() - x(t.startTime).valueOf()), n = [], r = [t[0]], i = K(t[0]);
800
794
  for (let e = 1; e < t.length; e += 1) {
801
795
  let a = t[e];
802
- if (b(a.startTime).isBefore(i)) {
796
+ if (x(a.startTime).isBefore(i)) {
803
797
  r.push(a);
804
798
  let e = K(a);
805
799
  e.isAfter(i) && (i = e);
@@ -807,7 +801,7 @@ var W = {
807
801
  }
808
802
  return n.push(r), n;
809
803
  }, Me = (e) => {
810
- let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) => b(e.startTime).valueOf() - b(t.startTime).valueOf());
804
+ let t = /* @__PURE__ */ new Map(), n = [], r = [...e].sort((e, t) => x(e.startTime).valueOf() - x(t.startTime).valueOf());
811
805
  for (let e of r) {
812
806
  let r = !1;
813
807
  for (let i = 0; i < n.length; i += 1) if (n[i].every((t) => !q(t, e))) {
@@ -850,7 +844,7 @@ var W = {
850
844
  for (let e of r) {
851
845
  let n = Me(e), r = Pe(e, n), a = Math.max(...Array.from(n.values())) + 1;
852
846
  for (let o of e) {
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);
847
+ let e = x(o.startTime), s = x(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);
854
848
  i.push({
855
849
  event: o,
856
850
  top: d,
@@ -871,11 +865,11 @@ var W = {
871
865
  interval: 60,
872
866
  rowHeight: 60
873
867
  }, Re = (e) => {
874
- let t = b(e.startTime), n = b(e.endTime);
868
+ let t = x(e.startTime), n = x(e.endTime);
875
869
  return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
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(() => {
870
+ }, ze = (e, t, n) => Math.min(Math.max(e, t), n), Be = ({ events: e, currentDate: t, onEventClick: i }) => {
871
+ let { timeZone: a } = w(), o = m(null), s = m(null), [c, l] = h(() => Date.now()), u = p(() => Fe(e, Le), [e]), f = p(() => new Map(e.map((e) => [e.id, e])), [e]), v = u.timedEvents ?? [], y = p(() => x(t).isSame(r(a), "day"), [t, a]);
872
+ d(() => {
879
873
  if (!y) {
880
874
  s.current = null;
881
875
  return;
@@ -888,47 +882,47 @@ var W = {
888
882
  window.clearInterval(e);
889
883
  };
890
884
  }, [y]);
891
- let x = f(() => {
885
+ let b = p(() => {
892
886
  if (!y) return null;
893
- let e = t(c, a);
887
+ let e = n(c, a);
894
888
  return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
895
889
  }, [
896
890
  y,
897
891
  c,
898
892
  a
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");
893
+ ]), S = p(() => b === null ? null : b - 20, [b]);
894
+ return d(() => {
895
+ if (!y || !o.current || b === null) return;
896
+ let e = x(t).format("YYYY-MM-DD");
903
897
  if (s.current === e) return;
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;
898
+ let n = o.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
899
+ n.scrollTop = ze(b - n.clientHeight * .35, 0, r), s.current = e;
906
900
  }, [
907
- r,
901
+ t,
908
902
  y,
909
- x
910
- ]), /* @__PURE__ */ h("div", {
903
+ b
904
+ ]), /* @__PURE__ */ g("div", {
911
905
  className: W["bsy-mobile-calendar-day__body"],
912
906
  ref: o,
913
- children: /* @__PURE__ */ g("div", {
907
+ children: /* @__PURE__ */ _("div", {
914
908
  className: W["bsy-mobile-calendar-day__time-grid"],
915
- children: [/* @__PURE__ */ h("div", {
909
+ children: [/* @__PURE__ */ g("div", {
916
910
  className: W["bsy-mobile-calendar-day__time-col"],
917
- children: Ie.map((e, t) => /* @__PURE__ */ h("div", {
911
+ children: Ie.map((e, t) => /* @__PURE__ */ g("div", {
918
912
  className: W["bsy-mobile-calendar-day__time-label"],
919
913
  style: { top: 20 + t * 60 },
920
914
  children: e
921
915
  }, e))
922
- }), /* @__PURE__ */ g("div", {
916
+ }), /* @__PURE__ */ _("div", {
923
917
  className: W["bsy-mobile-calendar-day__content-col"],
924
918
  children: [
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", {
919
+ /* @__PURE__ */ g("div", { style: { height: 20 } }),
920
+ Ie.map((e) => /* @__PURE__ */ g("div", { className: W["bsy-mobile-calendar-day__hour-cell"] }, e)),
921
+ /* @__PURE__ */ _("div", {
928
922
  className: W["bsy-mobile-calendar-day__timed-layer"],
929
923
  children: [v.map((e) => {
930
- let { event: t, top: n, height: r, left: a, width: o, isPercent: s } = e, c = _.get(t.id);
931
- return c ? /* @__PURE__ */ h(I, {
924
+ let { event: t, top: n, height: r, left: a, width: o, isPercent: s } = e, c = f.get(t.id);
925
+ return c ? /* @__PURE__ */ g(I, {
932
926
  className: W["bsy-mobile-calendar-day__timed-item"],
933
927
  label: t.label,
934
928
  timeText: Re(c),
@@ -941,10 +935,10 @@ var W = {
941
935
  },
942
936
  onClick: () => i?.(c)
943
937
  }, t.id) : null;
944
- }), S === null ? null : /* @__PURE__ */ h("div", {
938
+ }), S === null ? null : /* @__PURE__ */ g("div", {
945
939
  className: W["bsy-mobile-calendar-now-line"],
946
940
  style: { top: S },
947
- children: /* @__PURE__ */ h("div", { className: W["bsy-mobile-calendar-now-dot"] })
941
+ children: /* @__PURE__ */ g("div", { className: W["bsy-mobile-calendar-now-dot"] })
948
942
  })]
949
943
  })
950
944
  ]
@@ -952,25 +946,25 @@ var W = {
952
946
  })
953
947
  });
954
948
  }, 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);
949
+ let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = m(null), a = b(i), o = p(() => {
950
+ let t = x(e);
957
951
  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) => {
952
+ }, [n, e]), s = p(() => {
953
+ let t = x(e);
954
+ return n.filter((e) => !z(e) && x(e.startTime).isSame(t, "day"));
955
+ }, [n, e]), c = p(() => a?.width ? a.width - 56 : 0, [a?.width]), u = l((e) => {
962
956
  t(e.toDate());
963
957
  }, [t]);
964
- return /* @__PURE__ */ g("div", {
958
+ return /* @__PURE__ */ _("div", {
965
959
  className: W["bsy-mobile-calendar-day"],
966
960
  ref: i,
967
- children: [/* @__PURE__ */ h(Ae, {
968
- currentDate: b(e),
961
+ children: [/* @__PURE__ */ g(Ae, {
962
+ currentDate: x(e),
969
963
  setCurrentDate: u,
970
- containerWidth: l,
964
+ containerWidth: c,
971
965
  allDayEvents: o,
972
966
  onEventClick: r
973
- }), /* @__PURE__ */ h(Be, {
967
+ }), /* @__PURE__ */ g(Be, {
974
968
  events: s,
975
969
  currentDate: e,
976
970
  onEventClick: r
@@ -991,7 +985,7 @@ function Ue(e, t) {
991
985
  return e * t + e * 4;
992
986
  }
993
987
  function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
994
- let [r, i] = m(0), [a, o] = m(!1), s = p({
988
+ let [r, i] = h(0), [a, o] = h(!1), s = m({
995
989
  startX: 0,
996
990
  startY: 0,
997
991
  startTime: 0,
@@ -999,16 +993,16 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
999
993
  isDragging: !1,
1000
994
  isVerticalScroll: !1,
1001
995
  directionLocked: !1
1002
- }), l = v(e), d = v(t), h = v(n), g = v(r), _ = p(e.format("YYYY-MM-DD"));
1003
- u(() => {
996
+ }), c = y(e), u = y(t), f = y(n), g = y(r), _ = m(e.format("YYYY-MM-DD"));
997
+ d(() => {
1004
998
  let t = e.format("YYYY-MM-DD");
1005
999
  _.current !== t && (i(0), o(!1), _.current = t);
1006
1000
  }, [e]);
1007
- let y = f(() => He(e, r, n), [
1001
+ let v = p(() => He(e, r, n), [
1008
1002
  e.format("YYYY-MM-DD"),
1009
1003
  r,
1010
1004
  n
1011
- ]), b = c((e) => Ue(e, h.current ?? 0), [h]), x = r, S = c((e) => {
1005
+ ]), b = l((e) => Ue(e, f.current ?? 0), [f]), x = r, S = l((e) => {
1012
1006
  if (s.current.isDragging) return;
1013
1007
  let t = e.touches[0];
1014
1008
  s.current = {
@@ -1020,7 +1014,7 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1020
1014
  isVerticalScroll: !1,
1021
1015
  directionLocked: !1
1022
1016
  }, o(!1);
1023
- }, [g]), C = c((e) => {
1017
+ }, [g]), C = l((e) => {
1024
1018
  if (!s.current.isDragging) return;
1025
1019
  let t = e.touches[0], n = t.clientX - s.current.startX, r = t.clientY - s.current.startY;
1026
1020
  if (!s.current.directionLocked && (Math.abs(n) > 10 || Math.abs(r) > 10) && (s.current.directionLocked = !0, Math.abs(r) > Math.abs(n))) {
@@ -1028,15 +1022,15 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1028
1022
  return;
1029
1023
  }
1030
1024
  s.current.isVerticalScroll || i(s.current.startTranslateX + n);
1031
- }, []), w = c(() => {
1025
+ }, []), w = l(() => {
1032
1026
  if (!s.current.isDragging) return;
1033
- let e = g.current ?? 0, t = h.current ?? 0;
1027
+ let e = g.current ?? 0, t = f.current ?? 0;
1034
1028
  if (s.current.isDragging = !1, !t || s.current.isVerticalScroll) return;
1035
1029
  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;
1036
1030
  u = l ? r > 0 ? Math.ceil(e / n) * n : Math.floor(e / n) * n : Math.round(e / n) * n, o(!0), i(u);
1037
- }, [h, g]), T = c(() => {
1031
+ }, [f, g]), T = l(() => {
1038
1032
  o(!1);
1039
- let e = g.current ?? 0, t = h.current ?? 0, n = l.current, r = d.current;
1033
+ let e = g.current ?? 0, t = f.current ?? 0, n = c.current, r = u.current;
1040
1034
  if (t > 0 && n && r) {
1041
1035
  let a = J(t), o = -e / a, s = Math.round(o);
1042
1036
  if (s !== 0) {
@@ -1045,19 +1039,19 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1045
1039
  }
1046
1040
  }
1047
1041
  }, [
1048
- h,
1042
+ f,
1049
1043
  g,
1050
- l,
1051
- d
1052
- ]), E = c(() => {
1044
+ c,
1045
+ u
1046
+ ]), E = l(() => {
1053
1047
  i(0), o(!1);
1054
1048
  }, []);
1055
1049
  return {
1056
- visibleDays: y,
1050
+ visibleDays: v,
1057
1051
  offsetX: r,
1058
1052
  trackTransformX: x,
1059
1053
  transitionEnabled: a,
1060
- bindEvents: f(() => ({
1054
+ bindEvents: p(() => ({
1061
1055
  onTouchStart: S,
1062
1056
  onTouchMove: C,
1063
1057
  onTouchEnd: w,
@@ -1074,14 +1068,14 @@ function We({ baseDate: e, setBaseDate: t, columnWidth: n }) {
1074
1068
  }
1075
1069
  //#endregion
1076
1070
  //#region src/components/Calendar/CalendarThreeDay/ThreeDayCarousel.context.tsx
1077
- var Ge = o(null), Ke = ({ children: e, value: t }) => {
1078
- let n = f(() => t, [t]);
1079
- return /* @__PURE__ */ h(Ge.Provider, {
1071
+ var Ge = s(null), Ke = ({ children: e, value: t }) => {
1072
+ let n = p(() => t, [t]);
1073
+ return /* @__PURE__ */ g(Ge.Provider, {
1080
1074
  value: n,
1081
1075
  children: e
1082
1076
  });
1083
1077
  }, Y = () => {
1084
- let e = l(Ge);
1078
+ let e = u(Ge);
1085
1079
  if (!e) throw Error("useThreeDayCarouselContext must be used within a ThreeDayCarouselProvider");
1086
1080
  return e;
1087
1081
  }, X = {
@@ -1120,39 +1114,39 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1120
1114
  "bsy-mobile-calendar-threeday__now-line": "_bsy-mobile-calendar-threeday__now-line_1alic_197",
1121
1115
  "bsy-mobile-calendar-threeday__now-dot": "_bsy-mobile-calendar-threeday__now-dot_1alic_206"
1122
1116
  }, 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", {
1117
+ let { visibleDays: t, trackTransformX: n, transitionEnabled: i, bindEvents: a, handleTransitionEnd: o, columnWidth: s, getColumnLeft: c } = Y(), { timeZone: l, timezoneLabel: u } = w(), { t: d } = e(), f = p(() => r(l).startOf("day"), [l]), m = p(() => ({
1118
+ transform: `translateX(${n}px)`,
1119
+ transition: i ? `transform ${O} ${k}` : "none"
1120
+ }), [n, i]);
1121
+ return /* @__PURE__ */ _("div", {
1128
1122
  className: X["bsy-mobile-calendar-threeday__header"],
1129
- children: [/* @__PURE__ */ g("div", {
1123
+ children: [/* @__PURE__ */ _("div", {
1130
1124
  className: X["bsy-mobile-calendar-threeday__tz"],
1131
- children: [/* @__PURE__ */ h("div", { className: X["bsy-mobile-calendar-threeday__tz-empty"] }), /* @__PURE__ */ h("div", {
1125
+ children: [/* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__tz-empty"] }), /* @__PURE__ */ g("div", {
1132
1126
  className: X["bsy-mobile-calendar-threeday__tz-label"],
1133
1127
  children: u
1134
1128
  })]
1135
- }), /* @__PURE__ */ h("div", {
1129
+ }), /* @__PURE__ */ g("div", {
1136
1130
  className: X["bsy-mobile-calendar-threeday__dates"],
1137
1131
  ...a,
1138
- children: /* @__PURE__ */ h("div", {
1132
+ children: /* @__PURE__ */ g("div", {
1139
1133
  className: X["bsy-mobile-calendar-threeday__dates-track"],
1140
1134
  style: m,
1141
1135
  onTransitionEnd: o,
1142
1136
  children: t.map(({ date: e, offset: t }) => {
1143
- let n = e.isSame(p, "day"), r = e.isBefore(p, "day"), i = e.isoWeekday(), a = c(t);
1144
- return /* @__PURE__ */ g("div", {
1137
+ let n = e.isSame(f, "day"), r = e.isBefore(f, "day"), i = e.isoWeekday(), a = c(t);
1138
+ return /* @__PURE__ */ _("div", {
1145
1139
  className: X["bsy-mobile-calendar-threeday__date-col"],
1146
1140
  style: {
1147
1141
  position: "absolute",
1148
1142
  left: a,
1149
1143
  width: s
1150
1144
  },
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"]),
1145
+ children: [/* @__PURE__ */ g("div", {
1146
+ className: P(X["bsy-mobile-calendar-threeday__weekday"], n && X["bsy-mobile-calendar-threeday__weekday--today"], !n && r && X["bsy-mobile-calendar-threeday__weekday--past"]),
1153
1147
  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"]),
1148
+ }), /* @__PURE__ */ g("div", {
1149
+ className: P(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"]),
1156
1150
  children: e.date()
1157
1151
  })]
1158
1152
  }, e.format("YYYY-MM-DD"));
@@ -1164,16 +1158,16 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1164
1158
  interval: 60,
1165
1159
  rowHeight: 60
1166
1160
  }, Xe = 4, Ze = 8, Qe = 4, Z = 8, $e = (e) => {
1167
- let t = b(e.startTime), n = b(e.endTime);
1161
+ let t = x(e.startTime), n = x(e.endTime);
1168
1162
  return `${t.format("HH:mm")}-${n.format("HH:mm")}`;
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) => ({
1163
+ }, et = (e, t, n) => Math.min(Math.max(e, t), n), tt = ({ events: e, currentDate: t, onEventClick: i }) => {
1164
+ let { timeZone: a } = w(), { visibleDays: o, trackTransformX: s, transitionEnabled: c, bindEvents: l, columnWidth: u, getColumnLeft: f } = Y(), v = m(null), y = m(null), [b, S] = h(() => Date.now()), C = p(() => r(a).startOf("day"), [a]), T = p(() => o.map(({ date: t, offset: n }, r) => ({
1171
1165
  date: t,
1172
1166
  offset: n,
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),
1167
+ layout: Fe(e.filter((e) => x(e.startTime).isSame(t, "day") || x(e.startTime).isBefore(t, "day") && x(e.endTime).isAfter(t, "day")), Ye),
1174
1168
  isFirstVisibleDay: r === 2
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(() => {
1169
+ })), [o, e]), E = p(() => new Map(e.map((e) => [e.id, e])), [e]), D = p(() => o.findIndex(({ date: e }) => e.isSame(C, "day")), [o, C]), A = p(() => x(t).isSame(C, "day"), [t, C]);
1170
+ d(() => {
1177
1171
  if (D === -1) {
1178
1172
  y.current = null;
1179
1173
  return;
@@ -1182,67 +1176,67 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1182
1176
  let e = window.setInterval(() => S(Date.now()), 60 * 1e3);
1183
1177
  return () => window.clearInterval(e);
1184
1178
  }, [D]);
1185
- let j = f(() => {
1179
+ let j = p(() => {
1186
1180
  if (D === -1) return null;
1187
- let e = t(x, a);
1181
+ let e = n(b, a);
1188
1182
  return 20 + (e.hour() * 60 + e.minute() + e.second() / 60) / 60 * 60;
1189
1183
  }, [
1190
1184
  D,
1191
- x,
1185
+ b,
1192
1186
  a
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");
1187
+ ]), M = p(() => j === null ? null : j - 20, [j]);
1188
+ d(() => {
1189
+ if (!A || !v.current || j === null) return;
1190
+ let e = x(t).format("YYYY-MM-DD");
1197
1191
  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;
1192
+ let n = v.current, r = Math.max(n.scrollHeight - n.clientHeight, 0);
1193
+ n.scrollTop = et(j - n.clientHeight * .35, 0, r), y.current = e;
1200
1194
  }, [
1201
- r,
1202
- O,
1195
+ t,
1196
+ A,
1203
1197
  j
1204
1198
  ]);
1205
- let N = f(() => ({
1199
+ let N = p(() => ({
1206
1200
  transform: `translateX(${s}px)`,
1207
- transition: c ? `transform ${k} ${A}` : "none"
1201
+ transition: c ? `transform ${O} ${k}` : "none"
1208
1202
  }), [s, c]);
1209
- return /* @__PURE__ */ h("div", {
1203
+ return /* @__PURE__ */ g("div", {
1210
1204
  className: X["bsy-mobile-calendar-threeday__body"],
1211
1205
  ref: v,
1212
- children: /* @__PURE__ */ g("div", {
1206
+ children: /* @__PURE__ */ _("div", {
1213
1207
  className: X["bsy-mobile-calendar-threeday__body-content"],
1214
- children: [/* @__PURE__ */ h("div", {
1208
+ children: [/* @__PURE__ */ g("div", {
1215
1209
  className: X["bsy-mobile-calendar-threeday__body-time"],
1216
- children: Je.map((e, t) => /* @__PURE__ */ h("div", {
1210
+ children: Je.map((e, t) => /* @__PURE__ */ g("div", {
1217
1211
  className: X["bsy-mobile-calendar-threeday__time-label"],
1218
1212
  style: { top: 20 + t * 60 },
1219
1213
  children: e
1220
1214
  }, e))
1221
- }), /* @__PURE__ */ h("div", {
1215
+ }), /* @__PURE__ */ g("div", {
1222
1216
  className: X["bsy-mobile-calendar-threeday__grid"],
1223
1217
  ...l,
1224
- children: /* @__PURE__ */ h("div", {
1218
+ children: /* @__PURE__ */ g("div", {
1225
1219
  className: X["bsy-mobile-calendar-threeday__grid-track"],
1226
1220
  style: N,
1227
1221
  children: T.map((e) => {
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", {
1222
+ let { date: t, offset: n, layout: r, isFirstVisibleDay: a } = e, o = r.timedEvents ?? [], s = t.isSame(C, "day"), c = f(n);
1223
+ return /* @__PURE__ */ _("div", {
1230
1224
  className: X["bsy-mobile-calendar-threeday__day-col"],
1231
1225
  style: {
1232
1226
  position: "absolute",
1233
1227
  left: c,
1234
- width: d
1228
+ width: u
1235
1229
  },
1236
1230
  children: [
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", {
1231
+ /* @__PURE__ */ g("div", { style: { height: 20 } }),
1232
+ Je.map((e) => /* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__hour-cell"] }, e)),
1233
+ /* @__PURE__ */ _("div", {
1240
1234
  className: X["bsy-mobile-calendar-threeday__timed-layer"],
1241
1235
  children: [o.map((e) => {
1242
- let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns: u } = e, f = E.get(t.id);
1236
+ let { event: t, top: n, height: r, left: o, width: s, isPercent: c, column: l, totalColumns: d } = e, f = E.get(t.id);
1243
1237
  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, {
1238
+ let p = a ? Ze : Qe, m = Math.max(0, u - p), h = Math.max(d ?? 1, 1), _ = Math.max(0, s - p), v = Math.max(Z, m - (h - 1) * Z), y = et(_, Math.min(Z, m), Math.min(m, v)), b = Math.max(0, m - y), x = (h > 1 ? (l ?? 0) / (h - 1) : 0) * b, S = a ? x + Xe : x;
1239
+ return /* @__PURE__ */ g(I, {
1246
1240
  className: X["bsy-mobile-calendar-threeday__timed-item"],
1247
1241
  label: t.label,
1248
1242
  timeText: $e(f),
@@ -1255,10 +1249,10 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1255
1249
  },
1256
1250
  onClick: () => i?.(f)
1257
1251
  }, t.id);
1258
- }), s && M !== null ? /* @__PURE__ */ h("div", {
1252
+ }), s && M !== null ? /* @__PURE__ */ g("div", {
1259
1253
  className: X["bsy-mobile-calendar-threeday__now-line"],
1260
1254
  style: { top: M },
1261
- children: /* @__PURE__ */ h("div", { className: X["bsy-mobile-calendar-threeday__now-dot"] })
1255
+ children: /* @__PURE__ */ g("div", { className: X["bsy-mobile-calendar-threeday__now-dot"] })
1262
1256
  }) : null]
1263
1257
  })
1264
1258
  ]
@@ -1272,7 +1266,7 @@ var Ge = o(null), Ke = ({ children: e, value: t }) => {
1272
1266
  //#endregion
1273
1267
  //#region src/components/Calendar/utils/threeDaysAlgorithm.ts
1274
1268
  function nt(e, t) {
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");
1269
+ let n = t.startOf("day"), r = x(e.startTime), i = x(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");
1276
1270
  return {
1277
1271
  event: e,
1278
1272
  startCol: a,
@@ -1329,14 +1323,14 @@ function st(e, t, n) {
1329
1323
  return i;
1330
1324
  }
1331
1325
  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(() => {
1326
+ let { offsetX: r, transitionEnabled: i, bindEvents: a, columnWidth: o } = Y(), [s, c] = h(!1), l = p(() => it(e, t), [e, t]), u = p(() => {
1333
1327
  let e = l.filter((e) => ot(e.startCol, e.endCol, r, o).visible);
1334
1328
  return e.length === 0 ? -1 : Math.max(...e.map((e) => e.row));
1335
1329
  }, [
1336
1330
  l,
1337
1331
  r,
1338
1332
  o
1339
- ]) + 1, d = u > 3, p = s && u > 8, _ = s ? Math.min(u, 8) : Math.min(u, 3), v = f(() => s || !d ? [
1333
+ ]) + 1, d = u > 3, f = s && u > 8, m = s ? Math.min(u, 8) : Math.min(u, 3), v = p(() => s || !d ? [
1340
1334
  0,
1341
1335
  0,
1342
1336
  0
@@ -1346,29 +1340,29 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1346
1340
  o,
1347
1341
  s,
1348
1342
  d
1349
- ]), y = !s && d && v.some((e) => e > 0), b = f(() => u === 0 ? 0 : _ * j + (y ? at : 0) + 8, [
1343
+ ]), y = !s && d && v.some((e) => e > 0), b = p(() => u === 0 ? 0 : m * A + (y ? at : 0) + 8, [
1350
1344
  u,
1351
- _,
1345
+ m,
1352
1346
  y
1353
- ]), x = f(() => u === 0 ? 0 : p ? u * j : _ * j + (y ? at : 0), [
1347
+ ]), x = p(() => u === 0 ? 0 : f ? u * A : m * A + (y ? at : 0), [
1354
1348
  u,
1355
- _,
1349
+ m,
1356
1350
  y,
1357
- p
1351
+ f
1358
1352
  ]), S = J(o);
1359
- return /* @__PURE__ */ g("div", {
1353
+ return /* @__PURE__ */ _("div", {
1360
1354
  className: X["bsy-mobile-calendar-threeday__allday"],
1361
1355
  style: { height: b },
1362
- children: [s && d ? /* @__PURE__ */ h("div", {
1356
+ children: [s && d ? /* @__PURE__ */ g("div", {
1363
1357
  className: X["bsy-mobile-calendar-threeday__collapse"],
1364
1358
  onClick: () => c(!1),
1365
- children: /* @__PURE__ */ h("svg", {
1359
+ children: /* @__PURE__ */ g("svg", {
1366
1360
  width: "16",
1367
1361
  height: "16",
1368
1362
  viewBox: "0 0 16 16",
1369
1363
  fill: "none",
1370
1364
  style: { transform: "rotate(180deg)" },
1371
- children: /* @__PURE__ */ h("path", {
1365
+ children: /* @__PURE__ */ g("path", {
1372
1366
  d: "M4 6L8 10L12 6",
1373
1367
  stroke: "currentColor",
1374
1368
  strokeWidth: "1.5",
@@ -1376,24 +1370,24 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1376
1370
  strokeLinejoin: "round"
1377
1371
  })
1378
1372
  })
1379
- }) : null, /* @__PURE__ */ h("div", {
1373
+ }) : null, /* @__PURE__ */ g("div", {
1380
1374
  className: X["bsy-mobile-calendar-threeday__allday-area"],
1381
- style: p ? {
1375
+ style: f ? {
1382
1376
  overflowY: "auto",
1383
- maxHeight: 8 * j
1377
+ maxHeight: 8 * A
1384
1378
  } : void 0,
1385
1379
  ...a,
1386
- children: /* @__PURE__ */ g("div", {
1380
+ children: /* @__PURE__ */ _("div", {
1387
1381
  className: X["bsy-mobile-calendar-threeday__allday-track"],
1388
1382
  style: {
1389
1383
  height: x,
1390
- transition: i ? `height ${k} ${A}` : "none"
1384
+ transition: i ? `height ${O} ${k}` : "none"
1391
1385
  },
1392
1386
  children: [l.map((e) => {
1393
1387
  let { event: t, startCol: i, endCol: a, row: c } = e;
1394
1388
  if (!s && c >= 3) return null;
1395
1389
  let l = ot(i, a, r, o);
1396
- return l.visible ? /* @__PURE__ */ h(I, {
1390
+ return l.visible ? /* @__PURE__ */ g(I, {
1397
1391
  className: X["bsy-mobile-calendar-threeday__allday-card"],
1398
1392
  label: t.label,
1399
1393
  variant: "allDay",
@@ -1404,22 +1398,22 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1404
1398
  style: {
1405
1399
  left: l.left,
1406
1400
  width: l.width - 4,
1407
- top: c * j + 4
1401
+ top: c * A + 4
1408
1402
  },
1409
1403
  onClick: () => n?.(t)
1410
1404
  }, t.id) : null;
1411
1405
  }), y ? v.map((e, t) => {
1412
1406
  if (e === 0) return null;
1413
1407
  let n = t * S;
1414
- return /* @__PURE__ */ h("div", {
1408
+ return /* @__PURE__ */ g("div", {
1415
1409
  className: X["bsy-mobile-calendar-threeday__expand-btn"],
1416
1410
  style: {
1417
1411
  left: n,
1418
1412
  width: o - 4,
1419
- top: 3 * j + 4
1413
+ top: 3 * A + 4
1420
1414
  },
1421
1415
  onClick: () => c(!0),
1422
- children: /* @__PURE__ */ g("span", { children: [
1416
+ children: /* @__PURE__ */ _("span", { children: [
1423
1417
  "还有",
1424
1418
  e,
1425
1419
  "条记录"
@@ -1430,60 +1424,60 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1430
1424
  })]
1431
1425
  });
1432
1426
  }, 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({
1427
+ let { currentDate: e, setCurrentDate: t, events: n, onEventClick: r } = w(), i = m(null), a = b(i), o = p(() => a?.width ? (a.width - 56 - 8 - 8) / 3 : 0, [a?.width]), s = p(() => x(e), [e]), { visibleDays: c, offsetX: u, trackTransformX: d, transitionEnabled: f, bindEvents: h, handleTransitionEnd: v, getColumnLeft: y, resetPosition: S } = We({
1434
1428
  baseDate: s,
1435
- setBaseDate: c((e) => {
1429
+ setBaseDate: l((e) => {
1436
1430
  t(e.toDate());
1437
1431
  }, [t]),
1438
1432
  columnWidth: o
1439
- }), C = f(() => n.filter((e) => z(e)), [n]), T = f(() => n.filter((e) => !z(e)), [n]), E = f(() => ({
1440
- visibleDays: l,
1433
+ }), C = p(() => n.filter((e) => z(e)), [n]), T = p(() => n.filter((e) => !z(e)), [n]), E = p(() => ({
1434
+ visibleDays: c,
1441
1435
  offsetX: u,
1442
1436
  trackTransformX: d,
1443
- transitionEnabled: m,
1444
- bindEvents: _,
1437
+ transitionEnabled: f,
1438
+ bindEvents: h,
1445
1439
  handleTransitionEnd: v,
1446
1440
  columnWidth: o,
1447
- getColumnLeft: x,
1441
+ getColumnLeft: y,
1448
1442
  resetPosition: S
1449
1443
  }), [
1450
- l,
1444
+ c,
1451
1445
  u,
1452
1446
  d,
1453
- m,
1454
- _,
1447
+ f,
1448
+ h,
1455
1449
  v,
1456
1450
  o,
1457
- x,
1451
+ y,
1458
1452
  S
1459
1453
  ]);
1460
- return /* @__PURE__ */ h("div", {
1454
+ return /* @__PURE__ */ g("div", {
1461
1455
  className: X["bsy-mobile-calendar-threeday"],
1462
1456
  ref: i,
1463
- children: o > 0 ? /* @__PURE__ */ g(Ke, {
1457
+ children: o > 0 ? /* @__PURE__ */ _(Ke, {
1464
1458
  value: E,
1465
- children: [/* @__PURE__ */ g("div", {
1459
+ children: [/* @__PURE__ */ _("div", {
1466
1460
  className: X["bsy-mobile-calendar-threeday__header-wrap"],
1467
- children: [/* @__PURE__ */ h(qe, {}), /* @__PURE__ */ h(ct, {
1461
+ children: [/* @__PURE__ */ g(qe, {}), /* @__PURE__ */ g(ct, {
1468
1462
  events: C,
1469
1463
  baseDate: s,
1470
1464
  onEventClick: r
1471
1465
  })]
1472
- }), /* @__PURE__ */ h(tt, {
1466
+ }), /* @__PURE__ */ g(tt, {
1473
1467
  events: T,
1474
1468
  currentDate: e,
1475
1469
  onEventClick: r
1476
1470
  })]
1477
1471
  }) : null
1478
1472
  });
1479
- }, ut = (e, n = {}) => {
1480
- let { timeZone: r } = n;
1481
- return Array.isArray(e) ? e.map((e, n) => ({
1473
+ }, ut = (e, t = {}) => {
1474
+ let { timeZone: r } = t;
1475
+ return Array.isArray(e) ? e.map((e, t) => ({
1482
1476
  ...e,
1483
- id: e.id ?? String(n),
1477
+ id: e.id ?? String(t),
1484
1478
  label: e.label ?? "",
1485
- startTime: t(e.startTime, r),
1486
- endTime: t(e.endTime, r)
1479
+ startTime: n(e.startTime, r),
1480
+ endTime: n(e.endTime, r)
1487
1481
  })) : [];
1488
1482
  }, Q = {
1489
1483
  "#005EEF": {
@@ -1561,35 +1555,38 @@ var ct = ({ events: e, baseDate: t, onEventClick: n }) => {
1561
1555
  }, ht = (e, t) => {
1562
1556
  let n = t ?? e?.colorPrimary ?? "#0265ff", r = dt(n), a = ft(n, r.normal, r.hover);
1563
1557
  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, {
1558
+ }, gt = {
1559
+ "bsy-mobile-calendar": "_bsy-mobile-calendar_1c2fd_1",
1560
+ "bsy-mobile-calendar__body": "_bsy-mobile-calendar__body_1c2fd_19"
1561
+ }, _t = (e) => {
1562
+ let { events: t, scheduleColor: n, theme: i, timeZone: a, className: o, onEventClick: s, onDayClick: c } = e, [l, u] = v(e, {
1566
1563
  defaultValue: "month",
1567
1564
  defaultValuePropName: "defaultMode",
1568
1565
  valuePropName: "mode",
1569
1566
  trigger: "onModeChange"
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, {
1567
+ }), [d, f] = v(e, { defaultValue: r(a).toDate() }), m = p(() => ut(t, { timeZone: a }), [t, a]), h = p(() => ht(i, n), [i, n]);
1568
+ return /* @__PURE__ */ g("div", {
1569
+ className: P(gt["bsy-mobile-calendar"], o),
1570
+ style: h,
1571
+ children: /* @__PURE__ */ _(C, {
1575
1572
  currentDate: d,
1576
- setCurrentDate: p,
1573
+ setCurrentDate: f,
1577
1574
  viewMode: l,
1578
1575
  setViewMode: u,
1579
1576
  timeZone: a,
1580
1577
  events: m,
1581
1578
  onEventClick: s,
1582
1579
  onDayClick: c,
1583
- children: [/* @__PURE__ */ h(O, {}), /* @__PURE__ */ g("div", {
1584
- className: x["bsy-mobile-calendar__body"],
1580
+ children: [/* @__PURE__ */ g(D, {}), /* @__PURE__ */ _("div", {
1581
+ className: gt["bsy-mobile-calendar__body"],
1585
1582
  children: [
1586
- l === "month" ? /* @__PURE__ */ h(Te, {}) : null,
1587
- l === "day" ? /* @__PURE__ */ h(Ve, {}) : null,
1588
- l === "threeDay" ? /* @__PURE__ */ h(lt, {}) : null
1583
+ l === "month" ? /* @__PURE__ */ g(Te, {}) : null,
1584
+ l === "day" ? /* @__PURE__ */ g(Ve, {}) : null,
1585
+ l === "threeDay" ? /* @__PURE__ */ g(lt, {}) : null
1589
1586
  ]
1590
1587
  })]
1591
1588
  })
1592
1589
  });
1593
1590
  };
1594
1591
  //#endregion
1595
- export { gt as t };
1592
+ export { _t as t };