uapp-communication-sdk 1.0.0-dev.62 → 1.0.0-dev.63
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.
- package/communication-sdk.cjs +1 -1
- package/communication-sdk.js +402 -369
- package/communication-sdk.standalone.js +159 -159
- package/package.json +1 -1
- package/types/features/feed/presentation/composer-schedule.d.ts.map +1 -1
- package/types/features/feed/presentation/composer-tag-sheet.d.ts.map +1 -1
- package/types/features/feed/presentation/use-composer-form-state.d.ts.map +1 -1
- package/types/features/meetings/domain/slot-availability.d.ts.map +1 -1
- package/types/features/meetings/presentation/AttendeeSidebar.d.ts.map +1 -1
- package/types/features/meetings/presentation/booking-helpers.d.ts.map +1 -1
- package/types/features/schedule/index.d.ts +1 -1
- package/types/features/schedule/index.d.ts.map +1 -1
- package/types/features/schedule/presentation/BlockEditor.d.ts.map +1 -1
- package/types/features/schedule/presentation/CustomTimesSection.d.ts.map +1 -1
- package/types/features/schedule/presentation/use-conflict-resolver.d.ts.map +1 -1
- package/types/features/schedule/presentation/use-schedule-controller.d.ts +1 -1
- package/types/features/schedule/presentation/use-schedule-controller.d.ts.map +1 -1
- package/types/features/schedule/presentation/use-schedule-data.d.ts.map +1 -1
package/communication-sdk.js
CHANGED
|
@@ -31293,7 +31293,7 @@ var jX = (e) => {
|
|
|
31293
31293
|
}, NX = (e) => MX(e), PX = (e, t, n) => {
|
|
31294
31294
|
let r = new Date(n.start).getTime(), i = new Date(n.end).getTime();
|
|
31295
31295
|
return e.getTime() < i && t.getTime() > r;
|
|
31296
|
-
}, FX = (e, t, n) => e.userId === t || t === n && n !== "" && e.userId === void 0, IX = (e, t) => e.allBlocks.filter((t) => FX(t, e.userId, e.selfUserId) && t.status !== "available").flatMap((e) =>
|
|
31296
|
+
}, FX = (e, t, n) => e.userId === t || t === n && n !== "" && e.userId === void 0, IX = (e, t) => e.allBlocks.filter((t) => FX(t, e.userId, e.selfUserId) && t.status !== "available").flatMap((e) => HO(e, t.start, t.end)), LX = (e, t) => e.allBlocks.filter((t) => FX(t, e.userId, e.selfUserId) && t.status === "available").flatMap((e) => HO(e, t.start, t.end)).map((e) => ({
|
|
31297
31297
|
start: new Date(e.start),
|
|
31298
31298
|
end: new Date(e.end)
|
|
31299
31299
|
})), RX = (e, t, n) => t.getTime() >= e.start.getTime() && n.getTime() <= e.end.getTime(), zX = (e) => {
|
|
@@ -32735,7 +32735,7 @@ var PQ = f(null), FQ = ({ module: e, children: t }) => /* @__PURE__ */ (0, A.jsx
|
|
|
32735
32735
|
onClick: n,
|
|
32736
32736
|
children: /* @__PURE__ */ (0, A.jsx)("span", { className: Y.switchKnob })
|
|
32737
32737
|
}), t$ = ({ value: e, onChange: t, timezone: n }) => {
|
|
32738
|
-
let r = /* @__PURE__ */ new Date(), i = r.
|
|
32738
|
+
let r = JN(/* @__PURE__ */ new Date(), n), i = `${String(r.year)}-${String(r.month).padStart(2, "0")}-${String(r.day).padStart(2, "0")}`, a = e.date === i, o = `${String(r.hour).padStart(2, "0")}:${String(r.minute).padStart(2, "0")}`;
|
|
32739
32739
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
32740
32740
|
className: Y.schedule,
|
|
32741
32741
|
children: [
|
|
@@ -32754,7 +32754,7 @@ var PQ = f(null), FQ = ({ module: e, children: t }) => /* @__PURE__ */ (0, A.jsx
|
|
|
32754
32754
|
type: "date",
|
|
32755
32755
|
className: Y.scheduleInput,
|
|
32756
32756
|
value: e.date,
|
|
32757
|
-
min:
|
|
32757
|
+
min: i,
|
|
32758
32758
|
onChange: (n) => {
|
|
32759
32759
|
t({
|
|
32760
32760
|
...e,
|
|
@@ -32926,9 +32926,20 @@ function s$(e, t) {
|
|
|
32926
32926
|
n.setTaggedUsers((t) => t.some((t) => t.id === e.id) ? t.filter((t) => t.id !== e.id) : [...t, e]);
|
|
32927
32927
|
}, s = (e, t) => {
|
|
32928
32928
|
n.setTitle(e), n.setBody(t), n.setSheet(null), n.setSelectedItem(null);
|
|
32929
|
+
}, c = (e) => {
|
|
32930
|
+
let t = typeof e == "function" ? e(n.mode) : e;
|
|
32931
|
+
if (n.setMode(t), t === "schedule" && !n.schedule.date) {
|
|
32932
|
+
let e = JN(/* @__PURE__ */ new Date(), r), t = `${String(e.year)}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`, i = `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}`;
|
|
32933
|
+
n.setSchedule({
|
|
32934
|
+
...n.schedule,
|
|
32935
|
+
date: t,
|
|
32936
|
+
time: i
|
|
32937
|
+
});
|
|
32938
|
+
}
|
|
32929
32939
|
};
|
|
32930
32940
|
return {
|
|
32931
32941
|
...n,
|
|
32942
|
+
setMode: c,
|
|
32932
32943
|
category: t.find((e) => e.id === n.categoryId),
|
|
32933
32944
|
timezone: r,
|
|
32934
32945
|
submitDisabled: i,
|
|
@@ -33057,7 +33068,7 @@ var c$ = {
|
|
|
33057
33068
|
},
|
|
33058
33069
|
children: "Type a name or email to search teammates."
|
|
33059
33070
|
}), m$ = ({ taggedUserIds: e, onToggleTag: t }) => {
|
|
33060
|
-
let [n, r] = T(""), i = sX(n), a = n.trim().length > 0,
|
|
33071
|
+
let [n, r] = T(""), i = sX(n), { user: a } = Bz(), o = n.trim().length > 0, s = (i.data ?? []).filter((e) => e.id !== a?.id);
|
|
33061
33072
|
return /* @__PURE__ */ (0, A.jsxs)("div", { children: [/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
33062
33073
|
className: Y.tagSearch,
|
|
33063
33074
|
children: [
|
|
@@ -33097,10 +33108,10 @@ var c$ = {
|
|
|
33097
33108
|
}), /* @__PURE__ */ (0, A.jsx)("div", {
|
|
33098
33109
|
className: Y.tagList,
|
|
33099
33110
|
children: /* @__PURE__ */ (0, A.jsx)(p$, {
|
|
33100
|
-
isSearching:
|
|
33111
|
+
isSearching: o,
|
|
33101
33112
|
isPending: i.isPending,
|
|
33102
33113
|
search: n,
|
|
33103
|
-
activeList:
|
|
33114
|
+
activeList: s,
|
|
33104
33115
|
taggedUserIds: e,
|
|
33105
33116
|
onToggleTag: t
|
|
33106
33117
|
})
|
|
@@ -36056,10 +36067,10 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
36056
36067
|
}, M0 = (e, t) => {
|
|
36057
36068
|
let n = e ?? t, r = n.getFullYear(), i = String(n.getMonth() + 1).padStart(2, "0"), a = String(n.getDate()).padStart(2, "0");
|
|
36058
36069
|
return `${String(r)}-${i}-${a}`;
|
|
36059
|
-
}, N0 = (e, t) => new Date(e).toLocaleTimeString("en-
|
|
36060
|
-
hour: "
|
|
36070
|
+
}, N0 = (e, t) => new Date(e).toLocaleTimeString("en-US", {
|
|
36071
|
+
hour: "numeric",
|
|
36061
36072
|
minute: "2-digit",
|
|
36062
|
-
hour12: !
|
|
36073
|
+
hour12: !0,
|
|
36063
36074
|
timeZone: t
|
|
36064
36075
|
}), P0 = (e, t, n) => !e || !t ? "" : `${N0(e, n)} – ${N0(t, n)}`, F0 = (e, t) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
36065
36076
|
weekday: "short",
|
|
@@ -36085,14 +36096,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
36085
36096
|
color: r?.color ?? "#555"
|
|
36086
36097
|
};
|
|
36087
36098
|
}, z0 = (e, t, n) => {
|
|
36088
|
-
let r = new Date($N(e, "00:00", t))
|
|
36089
|
-
start: new Date($N(e, n.from, t)),
|
|
36090
|
-
end: new Date($N(e, n.to, t))
|
|
36091
|
-
})) : [];
|
|
36099
|
+
let r = new Date($N(e, "00:00", t));
|
|
36092
36100
|
return {
|
|
36093
36101
|
rangeStart: r,
|
|
36094
|
-
rangeEnd: new Date(
|
|
36095
|
-
workWindows:
|
|
36102
|
+
rangeEnd: new Date(r.getTime() + 1440 * 60 * 1e3),
|
|
36103
|
+
workWindows: n?.active ? n.slots.map((n) => ({
|
|
36104
|
+
start: new Date($N(e, n.from, t)),
|
|
36105
|
+
end: new Date($N(e, n.to, t))
|
|
36106
|
+
})) : []
|
|
36096
36107
|
};
|
|
36097
36108
|
}, B0 = (e, t, n, r) => {
|
|
36098
36109
|
let i = [], a = (e, t) => {
|
|
@@ -36104,7 +36115,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
36104
36115
|
r.workWindows.forEach((e) => {
|
|
36105
36116
|
a(e.start, e.end);
|
|
36106
36117
|
}), n.forEach((e) => {
|
|
36107
|
-
|
|
36118
|
+
HO(e, r.rangeStart, r.rangeEnd).forEach((e) => {
|
|
36119
|
+
a(e.start, e.end);
|
|
36120
|
+
});
|
|
36108
36121
|
}), e.forEach((e) => {
|
|
36109
36122
|
let n = t.get(e);
|
|
36110
36123
|
n && (n.workingHours.forEach((e) => {
|
|
@@ -37133,15 +37146,15 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
37133
37146
|
let c = s?.active ? s.slots.map((e) => ({
|
|
37134
37147
|
start: new Date($N(a, e.from, i)),
|
|
37135
37148
|
end: new Date($N(a, e.to, i))
|
|
37136
|
-
})) : [];
|
|
37149
|
+
})) : [], l = new Date($N(a, "00:00", i)), u = new Date(l.getTime() + 1440 * 60 * 1e3);
|
|
37137
37150
|
return zX({
|
|
37138
37151
|
userId: e,
|
|
37139
37152
|
selfUserId: t,
|
|
37140
37153
|
slotStart: new Date($N(a, n, i)),
|
|
37141
37154
|
slotEnd: new Date($N(a, r, i)),
|
|
37142
37155
|
allBlocks: o,
|
|
37143
|
-
rangeStart:
|
|
37144
|
-
rangeEnd:
|
|
37156
|
+
rangeStart: l,
|
|
37157
|
+
rangeEnd: u,
|
|
37145
37158
|
workWindows: c
|
|
37146
37159
|
});
|
|
37147
37160
|
}, T2 = (e, t, n) => {
|
|
@@ -39060,7 +39073,26 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39060
39073
|
label: "S",
|
|
39061
39074
|
longLabel: "Sun"
|
|
39062
39075
|
}
|
|
39063
|
-
], A3 = (
|
|
39076
|
+
], A3 = (e) => {
|
|
39077
|
+
let [t, n] = e.split(":").map(Number);
|
|
39078
|
+
return (t ?? 0) * 60 + (n ?? 0);
|
|
39079
|
+
}, j3 = (e) => {
|
|
39080
|
+
let t = Math.floor(e / 60), n = e % 60;
|
|
39081
|
+
return `${String(t).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
|
|
39082
|
+
}, M3 = (e) => {
|
|
39083
|
+
if (!e) return {
|
|
39084
|
+
start: "09:00",
|
|
39085
|
+
end: "17:00"
|
|
39086
|
+
};
|
|
39087
|
+
let t = A3(e.start), n = A3(e.end), r = n > t ? n - t : 60, i = n, a = i + r;
|
|
39088
|
+
return i >= 1439 ? {
|
|
39089
|
+
start: "23:00",
|
|
39090
|
+
end: "23:59"
|
|
39091
|
+
} : (a > 1439 && (a = 1439), {
|
|
39092
|
+
start: j3(i),
|
|
39093
|
+
end: j3(a)
|
|
39094
|
+
});
|
|
39095
|
+
}, N3 = ({ slot: e, index: t, dayMeta: n, dayName: r, showTrash: i, onUpdateStart: a, onUpdateEnd: o, onAdd: s, onRemove: c }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39064
39096
|
className: Q.differentTimeRowItem,
|
|
39065
39097
|
children: [
|
|
39066
39098
|
t === 0 ? /* @__PURE__ */ (0, A.jsx)("span", {
|
|
@@ -39100,14 +39132,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39100
39132
|
children: /* @__PURE__ */ (0, A.jsx)(Si, { size: 12 })
|
|
39101
39133
|
})
|
|
39102
39134
|
]
|
|
39103
|
-
}),
|
|
39135
|
+
}), P3 = ({ dayMeta: e, dayName: t, slots: n, startIso: r, endIso: i, onChangeSlots: a }) => {
|
|
39104
39136
|
let o = n.length > 0 ? n : [{
|
|
39105
39137
|
start: Z4(r),
|
|
39106
39138
|
end: Z4(i ?? r)
|
|
39107
39139
|
}];
|
|
39108
39140
|
return /* @__PURE__ */ (0, A.jsx)("div", {
|
|
39109
39141
|
className: Q.differentTimeRowGroup,
|
|
39110
|
-
children: o.map((n, r) => /* @__PURE__ */ (0, A.jsx)(
|
|
39142
|
+
children: o.map((n, r) => /* @__PURE__ */ (0, A.jsx)(N3, {
|
|
39111
39143
|
slot: n,
|
|
39112
39144
|
index: r,
|
|
39113
39145
|
dayMeta: e,
|
|
@@ -39129,17 +39161,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39129
39161
|
},
|
|
39130
39162
|
onAdd: () => {
|
|
39131
39163
|
let e = o[o.length - 1];
|
|
39132
|
-
a([...o,
|
|
39133
|
-
start: e?.end ?? "09:00",
|
|
39134
|
-
end: e?.end ?? "17:00"
|
|
39135
|
-
}]);
|
|
39164
|
+
a([...o, M3(e)]);
|
|
39136
39165
|
},
|
|
39137
39166
|
onRemove: () => {
|
|
39138
39167
|
a(o.filter((e, t) => t !== r));
|
|
39139
39168
|
}
|
|
39140
39169
|
}, r))
|
|
39141
39170
|
});
|
|
39142
|
-
},
|
|
39171
|
+
}, F3 = ({ rec: e, onChange: t, startIso: n, endIso: r }) => e.weekdays.length === 0 ? /* @__PURE__ */ (0, A.jsx)(A.Fragment, {}) : /* @__PURE__ */ (0, A.jsxs)(A.Fragment, { children: [/* @__PURE__ */ (0, A.jsxs)("label", {
|
|
39143
39172
|
className: Q.differentTimeRow,
|
|
39144
39173
|
children: [/* @__PURE__ */ (0, A.jsx)("input", {
|
|
39145
39174
|
type: "checkbox",
|
|
@@ -39155,7 +39184,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39155
39184
|
className: Q.differentTimeList,
|
|
39156
39185
|
children: [e.weekdays.map((i) => {
|
|
39157
39186
|
let a = k3.find((e) => e.wd === i);
|
|
39158
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
39187
|
+
return /* @__PURE__ */ (0, A.jsx)(P3, {
|
|
39159
39188
|
dayMeta: a,
|
|
39160
39189
|
dayName: a ? a.longLabel : "",
|
|
39161
39190
|
slots: e.weekdayTimes?.[i] ?? [],
|
|
@@ -39176,7 +39205,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39176
39205
|
className: Q.differentTimeNote,
|
|
39177
39206
|
children: "Defaults to the base event time when not overridden. Use + to add multiple slots per day."
|
|
39178
39207
|
})]
|
|
39179
|
-
})] }),
|
|
39208
|
+
})] }), I3 = ({ recurrence: e, startIso: t, endIso: n }) => {
|
|
39180
39209
|
let r = new Date(t), i = n === void 0 ? new Date(r.getTime() + 1800 * 1e3) : new Date(n), a = r, o = new Date(r.getTime() + 2160 * 60 * 60 * 1e3), s = VO({
|
|
39181
39210
|
start: t,
|
|
39182
39211
|
end: i.toISOString(),
|
|
@@ -39212,7 +39241,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39212
39241
|
})
|
|
39213
39242
|
]
|
|
39214
39243
|
});
|
|
39215
|
-
},
|
|
39244
|
+
}, L3 = [
|
|
39216
39245
|
{
|
|
39217
39246
|
wd: 1,
|
|
39218
39247
|
label: "M"
|
|
@@ -39241,18 +39270,18 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39241
39270
|
wd: 0,
|
|
39242
39271
|
label: "S"
|
|
39243
39272
|
}
|
|
39244
|
-
],
|
|
39273
|
+
], R3 = {
|
|
39245
39274
|
daily: "day",
|
|
39246
39275
|
weekly: "week",
|
|
39247
39276
|
monthly: "month",
|
|
39248
39277
|
yearly: "year"
|
|
39249
|
-
},
|
|
39278
|
+
}, z3 = [{
|
|
39250
39279
|
id: "dayOfMonth",
|
|
39251
39280
|
label: "Day of month"
|
|
39252
39281
|
}, {
|
|
39253
39282
|
id: "nthWeekday",
|
|
39254
39283
|
label: "Day of week"
|
|
39255
|
-
}],
|
|
39284
|
+
}], B3 = ({ rec: e, onChange: t }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
39256
39285
|
className: Q.recurChips,
|
|
39257
39286
|
children: jO.map((n) => /* @__PURE__ */ (0, A.jsx)("button", {
|
|
39258
39287
|
type: "button",
|
|
@@ -39266,7 +39295,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39266
39295
|
},
|
|
39267
39296
|
children: n.label
|
|
39268
39297
|
}, n.id))
|
|
39269
|
-
}),
|
|
39298
|
+
}), V3 = ({ rec: e, onChange: t }) => /* @__PURE__ */ (0, A.jsxs)("label", {
|
|
39270
39299
|
className: Q.recurInline,
|
|
39271
39300
|
children: [
|
|
39272
39301
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
@@ -39288,12 +39317,12 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39288
39317
|
}),
|
|
39289
39318
|
/* @__PURE__ */ (0, A.jsxs)("span", {
|
|
39290
39319
|
className: Q.recurInlineLabel,
|
|
39291
|
-
children: [
|
|
39320
|
+
children: [R3[e.freq], e.interval > 1 ? "s" : ""]
|
|
39292
39321
|
})
|
|
39293
39322
|
]
|
|
39294
|
-
}),
|
|
39323
|
+
}), H3 = ({ rec: e, onChange: t }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
39295
39324
|
className: Q.recurWeekdays,
|
|
39296
|
-
children:
|
|
39325
|
+
children: L3.map(({ wd: n, label: r }) => {
|
|
39297
39326
|
let i = e.weekdays.includes(n);
|
|
39298
39327
|
return /* @__PURE__ */ (0, A.jsx)("button", {
|
|
39299
39328
|
type: "button",
|
|
@@ -39308,9 +39337,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39308
39337
|
children: r
|
|
39309
39338
|
}, n);
|
|
39310
39339
|
})
|
|
39311
|
-
}),
|
|
39340
|
+
}), U3 = ({ rec: e, onChange: t }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
39312
39341
|
className: Q.recurChips,
|
|
39313
|
-
children:
|
|
39342
|
+
children: z3.map((n) => /* @__PURE__ */ (0, A.jsx)("button", {
|
|
39314
39343
|
type: "button",
|
|
39315
39344
|
className: O(Q.recurChip, e.monthlyMode === n.id && Q.recurChipActive),
|
|
39316
39345
|
onClick: () => {
|
|
@@ -39321,7 +39350,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39321
39350
|
},
|
|
39322
39351
|
children: n.label
|
|
39323
39352
|
}, n.id))
|
|
39324
|
-
}),
|
|
39353
|
+
}), W3 = ({ rec: e, startIso: t, onChange: n }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39325
39354
|
className: Q.recurEnds,
|
|
39326
39355
|
children: [
|
|
39327
39356
|
/* @__PURE__ */ (0, A.jsxs)("label", {
|
|
@@ -39403,33 +39432,33 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39403
39432
|
]
|
|
39404
39433
|
})
|
|
39405
39434
|
]
|
|
39406
|
-
}),
|
|
39435
|
+
}), G3 = ({ recurrence: e, startIso: t, endIso: n, onChange: r }) => {
|
|
39407
39436
|
let i = e.freq === "weekly", a = e.freq === "monthly" || e.freq === "yearly";
|
|
39408
39437
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39409
39438
|
className: Q.recurBuilder,
|
|
39410
39439
|
children: [
|
|
39411
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39440
|
+
/* @__PURE__ */ (0, A.jsx)(B3, {
|
|
39412
39441
|
rec: e,
|
|
39413
39442
|
onChange: r
|
|
39414
39443
|
}),
|
|
39415
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39444
|
+
/* @__PURE__ */ (0, A.jsx)(V3, {
|
|
39416
39445
|
rec: e,
|
|
39417
39446
|
onChange: r
|
|
39418
39447
|
}),
|
|
39419
|
-
i && /* @__PURE__ */ (0, A.jsxs)(A.Fragment, { children: [/* @__PURE__ */ (0, A.jsx)(
|
|
39448
|
+
i && /* @__PURE__ */ (0, A.jsxs)(A.Fragment, { children: [/* @__PURE__ */ (0, A.jsx)(H3, {
|
|
39420
39449
|
rec: e,
|
|
39421
39450
|
onChange: r
|
|
39422
|
-
}), /* @__PURE__ */ (0, A.jsx)(
|
|
39451
|
+
}), /* @__PURE__ */ (0, A.jsx)(F3, {
|
|
39423
39452
|
rec: e,
|
|
39424
39453
|
onChange: r,
|
|
39425
39454
|
startIso: t,
|
|
39426
39455
|
endIso: n
|
|
39427
39456
|
})] }),
|
|
39428
|
-
a && /* @__PURE__ */ (0, A.jsx)(
|
|
39457
|
+
a && /* @__PURE__ */ (0, A.jsx)(U3, {
|
|
39429
39458
|
rec: e,
|
|
39430
39459
|
onChange: r
|
|
39431
39460
|
}),
|
|
39432
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39461
|
+
/* @__PURE__ */ (0, A.jsx)(W3, {
|
|
39433
39462
|
rec: e,
|
|
39434
39463
|
startIso: t,
|
|
39435
39464
|
onChange: r
|
|
@@ -39438,14 +39467,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39438
39467
|
className: Q.recurSummaryBox,
|
|
39439
39468
|
children: KO(e, t)
|
|
39440
39469
|
}),
|
|
39441
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39470
|
+
/* @__PURE__ */ (0, A.jsx)(I3, {
|
|
39442
39471
|
recurrence: e,
|
|
39443
39472
|
startIso: t,
|
|
39444
39473
|
endIso: n
|
|
39445
39474
|
})
|
|
39446
39475
|
]
|
|
39447
39476
|
});
|
|
39448
|
-
},
|
|
39477
|
+
}, K3 = ({ draft: e, onChange: t }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39449
39478
|
className: D3.field,
|
|
39450
39479
|
children: [/* @__PURE__ */ (0, A.jsx)("span", {
|
|
39451
39480
|
className: Q.microLabel,
|
|
@@ -39473,7 +39502,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39473
39502
|
}, n.id);
|
|
39474
39503
|
})
|
|
39475
39504
|
})]
|
|
39476
|
-
}),
|
|
39505
|
+
}), q3 = ({ draft: e, onChange: t }) => /* @__PURE__ */ (0, A.jsxs)(A.Fragment, { children: [/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39477
39506
|
className: e.allDay ? D3.field : Q.dtGrid,
|
|
39478
39507
|
children: [/* @__PURE__ */ (0, A.jsxs)("label", {
|
|
39479
39508
|
className: D3.field,
|
|
@@ -39522,7 +39551,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39522
39551
|
t(E3(e, n.target.checked));
|
|
39523
39552
|
}
|
|
39524
39553
|
}), /* @__PURE__ */ (0, A.jsx)("span", { children: "All-day" })]
|
|
39525
|
-
})] }),
|
|
39554
|
+
})] }), J3 = ({ draft: e, onChange: t }) => {
|
|
39526
39555
|
let n = e.recurrence !== null;
|
|
39527
39556
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39528
39557
|
className: Q.recurSection,
|
|
@@ -39540,7 +39569,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39540
39569
|
className: O(Q.recurSwitch, n && Q.recurSwitchOn),
|
|
39541
39570
|
children: /* @__PURE__ */ (0, A.jsx)("span", { className: Q.recurKnob })
|
|
39542
39571
|
})]
|
|
39543
|
-
}), e.recurrence !== null && /* @__PURE__ */ (0, A.jsx)(
|
|
39572
|
+
}), e.recurrence !== null && /* @__PURE__ */ (0, A.jsx)(G3, {
|
|
39544
39573
|
recurrence: e.recurrence,
|
|
39545
39574
|
startIso: e.start,
|
|
39546
39575
|
endIso: e.end,
|
|
@@ -39549,7 +39578,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39549
39578
|
}
|
|
39550
39579
|
})]
|
|
39551
39580
|
});
|
|
39552
|
-
},
|
|
39581
|
+
}, Y3 = ({ draft: e, onChange: t }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39553
39582
|
className: Q.panelForm,
|
|
39554
39583
|
children: [
|
|
39555
39584
|
/* @__PURE__ */ (0, A.jsxs)("label", {
|
|
@@ -39577,15 +39606,15 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39577
39606
|
})
|
|
39578
39607
|
]
|
|
39579
39608
|
}),
|
|
39580
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39609
|
+
/* @__PURE__ */ (0, A.jsx)(K3, {
|
|
39581
39610
|
draft: e,
|
|
39582
39611
|
onChange: t
|
|
39583
39612
|
}),
|
|
39584
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39613
|
+
/* @__PURE__ */ (0, A.jsx)(q3, {
|
|
39585
39614
|
draft: e,
|
|
39586
39615
|
onChange: t
|
|
39587
39616
|
}),
|
|
39588
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
39617
|
+
/* @__PURE__ */ (0, A.jsx)(J3, {
|
|
39589
39618
|
draft: e,
|
|
39590
39619
|
onChange: t
|
|
39591
39620
|
}),
|
|
@@ -39608,7 +39637,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39608
39637
|
})]
|
|
39609
39638
|
})
|
|
39610
39639
|
]
|
|
39611
|
-
}),
|
|
39640
|
+
}), X3 = (e, t, n, r) => {
|
|
39612
39641
|
let i = new Date(e).getTime(), a = new Date(t).getTime(), o = new Date(n).getTime(), s = new Date(r).getTime();
|
|
39613
39642
|
return i <= o && a >= s ? { type: "delete" } : i > o && a < s ? {
|
|
39614
39643
|
type: "split",
|
|
@@ -39624,20 +39653,20 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39624
39653
|
start: n,
|
|
39625
39654
|
end: new Date(i).toISOString()
|
|
39626
39655
|
} : null;
|
|
39627
|
-
},
|
|
39656
|
+
}, Z3 = (e, t) => {
|
|
39628
39657
|
let n = new Date(e.start).getTime(), r = new Date(e.end).getTime(), i = new Date(t.start).getTime();
|
|
39629
39658
|
return n < new Date(t.end).getTime() && r > i;
|
|
39630
|
-
},
|
|
39659
|
+
}, Q3 = (e, t) => {
|
|
39631
39660
|
let n = e.block.status === "available" && t.block.status === "available", r = e.block.status !== "available" && t.block.status !== "available";
|
|
39632
|
-
return (n || r) &&
|
|
39633
|
-
},
|
|
39661
|
+
return (n || r) && Z3(e, t);
|
|
39662
|
+
}, $3 = (e, t, n) => {
|
|
39634
39663
|
let r = ok([new qO({
|
|
39635
39664
|
id: "draft",
|
|
39636
39665
|
...e
|
|
39637
39666
|
})], n), i = ok(t, n), a = [];
|
|
39638
|
-
for (let e of i) r.some((t) =>
|
|
39667
|
+
for (let e of i) r.some((t) => Q3(t, e)) && a.push(e);
|
|
39639
39668
|
return a;
|
|
39640
|
-
},
|
|
39669
|
+
}, e6 = (e) => ({
|
|
39641
39670
|
userId: e.userId,
|
|
39642
39671
|
title: e.title,
|
|
39643
39672
|
status: e.status,
|
|
@@ -39646,46 +39675,46 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39646
39675
|
allDay: e.allDay,
|
|
39647
39676
|
notes: e.notes,
|
|
39648
39677
|
recurrence: e.recurrence
|
|
39649
|
-
}),
|
|
39650
|
-
...
|
|
39678
|
+
}), t6 = (e, t, n) => ({
|
|
39679
|
+
...e6(e),
|
|
39651
39680
|
start: t,
|
|
39652
39681
|
end: n,
|
|
39653
39682
|
recurrence: null
|
|
39654
|
-
}),
|
|
39683
|
+
}), n6 = (e, t) => {
|
|
39655
39684
|
let n = e.recurrence;
|
|
39656
|
-
if (n === null) return
|
|
39685
|
+
if (n === null) return e6(e);
|
|
39657
39686
|
let r = Array.from(new Set([...n.exceptions, ...t]));
|
|
39658
39687
|
return {
|
|
39659
|
-
...
|
|
39688
|
+
...e6(e),
|
|
39660
39689
|
recurrence: {
|
|
39661
39690
|
...n,
|
|
39662
39691
|
exceptions: r
|
|
39663
39692
|
}
|
|
39664
39693
|
};
|
|
39665
|
-
},
|
|
39666
|
-
let r =
|
|
39694
|
+
}, r6 = (e, t, n) => n.type === "delete" ? [] : n.type === "update" ? [t6(e, n.start, n.end)] : [t6(e, t.start, n.updateEnd), t6(e, n.createStart, n.createEnd)], i6 = (e, t, n) => {
|
|
39695
|
+
let r = X3(n.start, n.end, t.start, t.end);
|
|
39667
39696
|
return r === null ? [] : r.type === "delete" ? [{
|
|
39668
39697
|
kind: "delete",
|
|
39669
39698
|
blockId: e.id
|
|
39670
39699
|
}] : r.type === "update" ? [{
|
|
39671
39700
|
kind: "update",
|
|
39672
39701
|
blockId: e.id,
|
|
39673
|
-
draft:
|
|
39702
|
+
draft: t6(e, r.start, r.end)
|
|
39674
39703
|
}] : [{
|
|
39675
39704
|
kind: "update",
|
|
39676
39705
|
blockId: e.id,
|
|
39677
|
-
draft:
|
|
39706
|
+
draft: t6(e, t.start, r.updateEnd)
|
|
39678
39707
|
}, {
|
|
39679
39708
|
kind: "create",
|
|
39680
|
-
draft:
|
|
39709
|
+
draft: t6(e, r.createStart, r.createEnd)
|
|
39681
39710
|
}];
|
|
39682
|
-
},
|
|
39711
|
+
}, a6 = (e, t, n) => {
|
|
39683
39712
|
let r = [], i = [];
|
|
39684
39713
|
for (let a of t) {
|
|
39685
|
-
let t =
|
|
39714
|
+
let t = X3(n.start, n.end, a.start, a.end);
|
|
39686
39715
|
if (t !== null) {
|
|
39687
39716
|
r.push(a.date);
|
|
39688
|
-
for (let n of
|
|
39717
|
+
for (let n of r6(e, a, t)) i.push({
|
|
39689
39718
|
kind: "create",
|
|
39690
39719
|
draft: n
|
|
39691
39720
|
});
|
|
@@ -39694,9 +39723,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39694
39723
|
return r.length === 0 ? [] : [{
|
|
39695
39724
|
kind: "update",
|
|
39696
39725
|
blockId: e.id,
|
|
39697
|
-
draft:
|
|
39726
|
+
draft: n6(e, r)
|
|
39698
39727
|
}, ...i];
|
|
39699
|
-
},
|
|
39728
|
+
}, o6 = (e, t) => {
|
|
39700
39729
|
let n = /* @__PURE__ */ new Map();
|
|
39701
39730
|
for (let e of t) {
|
|
39702
39731
|
let t = n.get(e.block.id) ?? [];
|
|
@@ -39706,15 +39735,15 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39706
39735
|
for (let t of n.values()) {
|
|
39707
39736
|
let n = t[0];
|
|
39708
39737
|
if (n === void 0) continue;
|
|
39709
|
-
let i = n.block.recurrence === null ?
|
|
39738
|
+
let i = n.block.recurrence === null ? i6(n.block, n, e) : a6(n.block, t, e);
|
|
39710
39739
|
r.push(...i);
|
|
39711
39740
|
}
|
|
39712
39741
|
return r;
|
|
39713
|
-
},
|
|
39742
|
+
}, s6 = (e, t) => e.filter((e) => t.mode !== "edit" || e.id !== t.block.id), c6 = (e, t, n) => {
|
|
39714
39743
|
let r = /* @__PURE__ */ new Map();
|
|
39715
|
-
for (let i of
|
|
39744
|
+
for (let i of $3(e, t, n)) r.set(i.block.id, i.block);
|
|
39716
39745
|
return [...r.values()];
|
|
39717
|
-
},
|
|
39746
|
+
}, l6 = (e, t, n, r) => {
|
|
39718
39747
|
if (e.title.trim().length === 0) return {
|
|
39719
39748
|
error: "Event title is required.",
|
|
39720
39749
|
code: "empty_title"
|
|
@@ -39728,11 +39757,15 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39728
39757
|
code: "invalid_time"
|
|
39729
39758
|
};
|
|
39730
39759
|
let i = y3(e, r);
|
|
39731
|
-
if (n.mode !== "edit"
|
|
39732
|
-
|
|
39760
|
+
if ((n.mode !== "edit" || i.start !== y3({
|
|
39761
|
+
...e,
|
|
39762
|
+
start: n.block.start,
|
|
39763
|
+
end: n.block.end
|
|
39764
|
+
}, r).start) && new Date(i.start).getTime() < Date.now() - 300 * 1e3) return {
|
|
39765
|
+
error: "Cannot schedule an event in the past.",
|
|
39733
39766
|
code: "invalid_time"
|
|
39734
39767
|
};
|
|
39735
|
-
let a = B4(new Date(i.start), 0), o =
|
|
39768
|
+
let a = B4(new Date(i.start), 0), o = c6(i, s6(t, n), a);
|
|
39736
39769
|
if (o.length > 0) {
|
|
39737
39770
|
let t = o[0], n = o.some((e) => e.status === "meeting");
|
|
39738
39771
|
if (t !== void 0) return e.status === "available" && t.status === "available" ? {
|
|
@@ -39746,7 +39779,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39746
39779
|
};
|
|
39747
39780
|
}
|
|
39748
39781
|
return { error: null };
|
|
39749
|
-
},
|
|
39782
|
+
}, u6 = (e, t, n) => {
|
|
39750
39783
|
let r = VN(), i = HN(), a = UN(), o = async (e) => {
|
|
39751
39784
|
if (e.kind === "delete") {
|
|
39752
39785
|
await a.mutateAsync(e.blockId);
|
|
@@ -39762,7 +39795,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39762
39795
|
await r.mutateAsync(e.draft);
|
|
39763
39796
|
};
|
|
39764
39797
|
return { resolve: async (r, i) => {
|
|
39765
|
-
let a = y3(e, n), s = B4(new Date(a.start), 0), c =
|
|
39798
|
+
let a = y3(e, n), s = B4(new Date(a.start), 0), c = o6(a, $3(a, s6(r, t), s));
|
|
39766
39799
|
try {
|
|
39767
39800
|
await Promise.all(c.map(o)), XE.success("Conflicts resolved successfully!"), i();
|
|
39768
39801
|
} catch (e) {
|
|
@@ -39770,13 +39803,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39770
39803
|
XE.error(`Failed to resolve conflicts: ${t}`);
|
|
39771
39804
|
}
|
|
39772
39805
|
} };
|
|
39773
|
-
},
|
|
39806
|
+
}, d6 = {
|
|
39774
39807
|
errorStack: "_errorStack_q9qoj_4",
|
|
39775
39808
|
errorLine: "_errorLine_q9qoj_11"
|
|
39776
|
-
},
|
|
39777
|
-
let t = mO(e.start) === mO(e.end) ? Y4(e.start) : `${Y4(e.start)}${
|
|
39778
|
-
return e.allDay ? `${t}${
|
|
39779
|
-
},
|
|
39809
|
+
}, f6 = " · ", p6 = " – ", m6 = (e) => {
|
|
39810
|
+
let t = mO(e.start) === mO(e.end) ? Y4(e.start) : `${Y4(e.start)}${p6}${Y4(e.end)}`, n = e.recurrence === null ? "" : `${f6}${KO(e.recurrence, e.start)}`;
|
|
39811
|
+
return e.allDay ? `${t}${f6}All day${n}` : e.recurrence?.differentTimes ? `${t}${n}` : `${t}${f6}${`${J4(e.start)}${p6}${J4(e.end)}`}${f6}${q4(dO(e.start, e.end))}${n}`;
|
|
39812
|
+
}, h6 = ({ isEdit: e, busy: t, canSave: n, validationError: r, isConflict: i, summary: a, onSave: o, onDelete: s, onCancel: c, onResolveConflicts: l }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39780
39813
|
className: Q.panelFooter,
|
|
39781
39814
|
children: [/* @__PURE__ */ (0, A.jsx)("div", {
|
|
39782
39815
|
className: O(Q.panelSummary, r !== null && Q.panelSummaryError),
|
|
@@ -39785,9 +39818,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39785
39818
|
" ",
|
|
39786
39819
|
a
|
|
39787
39820
|
] }) : /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39788
|
-
className:
|
|
39821
|
+
className: d6.errorStack,
|
|
39789
39822
|
children: [/* @__PURE__ */ (0, A.jsxs)("span", {
|
|
39790
|
-
className:
|
|
39823
|
+
className: d6.errorLine,
|
|
39791
39824
|
children: [
|
|
39792
39825
|
/* @__PURE__ */ (0, A.jsx)(gr, { size: 14 }),
|
|
39793
39826
|
" ",
|
|
@@ -39836,7 +39869,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39836
39869
|
})
|
|
39837
39870
|
]
|
|
39838
39871
|
})]
|
|
39839
|
-
}),
|
|
39872
|
+
}), g6 = (e, t, n, r) => {
|
|
39840
39873
|
let i = VN(), a = HN(), o = UN();
|
|
39841
39874
|
return {
|
|
39842
39875
|
busy: i.isPending || a.isPending || o.isPending,
|
|
@@ -39878,8 +39911,8 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39878
39911
|
});
|
|
39879
39912
|
}
|
|
39880
39913
|
};
|
|
39881
|
-
},
|
|
39882
|
-
let [r, i] = T(() => b3(e)), { busy: a, onSave: o, onDelete: s } =
|
|
39914
|
+
}, _6 = ({ state: e, timezone: t, onClose: n }) => {
|
|
39915
|
+
let [r, i] = T(() => b3(e)), { busy: a, onSave: o, onDelete: s } = g6(e, r, t, n), { data: c = [] } = BN(), l = u6(r, e, t), u = e.mode === "edit", d = l6(r, c, e, t), f = d.code === "title_too_long" ? null : d.error, p = d.error === null, m = (d.code === "overlap_availability" || d.code === "overlap_event") && !d.hasMeetingConflict;
|
|
39883
39916
|
return /* @__PURE__ */ (0, A.jsxs)(_b, {
|
|
39884
39917
|
open: !0,
|
|
39885
39918
|
side: "right",
|
|
@@ -39887,13 +39920,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39887
39920
|
onOpenChange: (e) => {
|
|
39888
39921
|
e || n();
|
|
39889
39922
|
},
|
|
39890
|
-
footer: /* @__PURE__ */ (0, A.jsx)(
|
|
39923
|
+
footer: /* @__PURE__ */ (0, A.jsx)(h6, {
|
|
39891
39924
|
isEdit: u,
|
|
39892
39925
|
busy: a,
|
|
39893
39926
|
canSave: p,
|
|
39894
39927
|
validationError: f,
|
|
39895
39928
|
isConflict: m,
|
|
39896
|
-
summary:
|
|
39929
|
+
summary: m6(r),
|
|
39897
39930
|
onSave: o,
|
|
39898
39931
|
onDelete: s,
|
|
39899
39932
|
onCancel: n,
|
|
@@ -39911,36 +39944,36 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39911
39944
|
onClick: n,
|
|
39912
39945
|
children: /* @__PURE__ */ (0, A.jsx)(Oi, { size: 18 })
|
|
39913
39946
|
})]
|
|
39914
|
-
}), /* @__PURE__ */ (0, A.jsx)(
|
|
39947
|
+
}), /* @__PURE__ */ (0, A.jsx)(Y3, {
|
|
39915
39948
|
draft: r,
|
|
39916
39949
|
onChange: i
|
|
39917
39950
|
})]
|
|
39918
39951
|
});
|
|
39919
|
-
},
|
|
39952
|
+
}, v6 = () => {
|
|
39920
39953
|
let e = Intl.supportedValuesOf;
|
|
39921
39954
|
return typeof e == "function" ? e("timeZone") : ZO;
|
|
39922
|
-
},
|
|
39955
|
+
}, y6 = (e, t, n, r) => ({
|
|
39923
39956
|
...e,
|
|
39924
39957
|
slots: e.slots.map((e) => ({
|
|
39925
39958
|
...e,
|
|
39926
39959
|
from: QN(e.from, t, n, r),
|
|
39927
39960
|
to: QN(e.to, t, n, r)
|
|
39928
39961
|
}))
|
|
39929
|
-
}),
|
|
39930
|
-
mon:
|
|
39931
|
-
tue:
|
|
39932
|
-
wed:
|
|
39933
|
-
thu:
|
|
39934
|
-
fri:
|
|
39935
|
-
sat:
|
|
39936
|
-
sun:
|
|
39937
|
-
}),
|
|
39938
|
-
let n =
|
|
39962
|
+
}), b6 = (e, t, n, r) => hO({
|
|
39963
|
+
mon: y6(e.mon, t, n, r),
|
|
39964
|
+
tue: y6(e.tue, t, n, r),
|
|
39965
|
+
wed: y6(e.wed, t, n, r),
|
|
39966
|
+
thu: y6(e.thu, t, n, r),
|
|
39967
|
+
fri: y6(e.fri, t, n, r),
|
|
39968
|
+
sat: y6(e.sat, t, n, r),
|
|
39969
|
+
sun: y6(e.sun, t, n, r)
|
|
39970
|
+
}), x6 = (e, t) => {
|
|
39971
|
+
let n = v6();
|
|
39939
39972
|
return (n.includes(t) ? n : [t, ...n]).map((t) => ({
|
|
39940
39973
|
id: t,
|
|
39941
39974
|
offset: eP(YN(t, e))
|
|
39942
39975
|
}));
|
|
39943
|
-
},
|
|
39976
|
+
}, S6 = {
|
|
39944
39977
|
tzWrap: "_tzWrap_horpb_4",
|
|
39945
39978
|
tzTrigger: "_tzTrigger_horpb_8",
|
|
39946
39979
|
tzGlobe: "_tzGlobe_horpb_30",
|
|
@@ -39958,16 +39991,16 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39958
39991
|
tzRowOffset: "_tzRowOffset_horpb_171",
|
|
39959
39992
|
tzCheck: "_tzCheck_horpb_178",
|
|
39960
39993
|
tzEmpty: "_tzEmpty_horpb_183"
|
|
39961
|
-
},
|
|
39962
|
-
className:
|
|
39994
|
+
}, C6 = (e, t) => t === "" || e.id.toLowerCase().includes(t) || e.offset.toLowerCase().includes(t), w6 = ({ search: e, list: t, value: n, onSearch: r, onPick: i }) => /* @__PURE__ */ (0, A.jsxs)(M.div, {
|
|
39995
|
+
className: S6.tzPop,
|
|
39963
39996
|
variants: lb,
|
|
39964
39997
|
initial: "hidden",
|
|
39965
39998
|
animate: "visible",
|
|
39966
39999
|
exit: "exit",
|
|
39967
40000
|
children: [/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39968
|
-
className:
|
|
40001
|
+
className: S6.tzSearch,
|
|
39969
40002
|
children: [/* @__PURE__ */ (0, A.jsx)(ci, { size: 13 }), /* @__PURE__ */ (0, A.jsx)("input", {
|
|
39970
|
-
className:
|
|
40003
|
+
className: S6.tzSearchInput,
|
|
39971
40004
|
placeholder: "Search timezones…",
|
|
39972
40005
|
value: e,
|
|
39973
40006
|
onChange: (e) => {
|
|
@@ -39975,42 +40008,42 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
39975
40008
|
}
|
|
39976
40009
|
})]
|
|
39977
40010
|
}), /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
39978
|
-
className:
|
|
40011
|
+
className: S6.tzList,
|
|
39979
40012
|
children: [t.map((e) => /* @__PURE__ */ (0, A.jsxs)("button", {
|
|
39980
40013
|
type: "button",
|
|
39981
|
-
className: O(
|
|
40014
|
+
className: O(S6.tzRow, e.id === n && S6.tzRowActive),
|
|
39982
40015
|
onClick: () => {
|
|
39983
40016
|
i(e.id);
|
|
39984
40017
|
},
|
|
39985
40018
|
children: [
|
|
39986
40019
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
39987
|
-
className:
|
|
40020
|
+
className: S6.tzRowLabel,
|
|
39988
40021
|
children: e.id
|
|
39989
40022
|
}),
|
|
39990
40023
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
39991
|
-
className:
|
|
40024
|
+
className: S6.tzRowOffset,
|
|
39992
40025
|
children: e.offset
|
|
39993
40026
|
}),
|
|
39994
40027
|
e.id === n && /* @__PURE__ */ (0, A.jsx)(dr, {
|
|
39995
40028
|
size: 13,
|
|
39996
|
-
className:
|
|
40029
|
+
className: S6.tzCheck
|
|
39997
40030
|
})
|
|
39998
40031
|
]
|
|
39999
40032
|
}, e.id)), t.length === 0 && /* @__PURE__ */ (0, A.jsx)("p", {
|
|
40000
|
-
className:
|
|
40033
|
+
className: S6.tzEmpty,
|
|
40001
40034
|
children: "No timezones match."
|
|
40002
40035
|
})]
|
|
40003
40036
|
})]
|
|
40004
|
-
}),
|
|
40005
|
-
let [r, i] = T(!1), [a, o] = T(""), s = C(() =>
|
|
40037
|
+
}), T6 = ({ value: e, now: t, onChange: n }) => {
|
|
40038
|
+
let [r, i] = T(!1), [a, o] = T(""), s = C(() => x6(t, e), [t, e]), c = s.find((t) => t.id === e) ?? {
|
|
40006
40039
|
id: e,
|
|
40007
40040
|
offset: ""
|
|
40008
|
-
}, l = a.trim().toLowerCase(), u = s.filter((e) =>
|
|
40041
|
+
}, l = a.trim().toLowerCase(), u = s.filter((e) => C6(e, l));
|
|
40009
40042
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40010
|
-
className:
|
|
40043
|
+
className: S6.tzWrap,
|
|
40011
40044
|
children: [/* @__PURE__ */ (0, A.jsxs)("button", {
|
|
40012
40045
|
type: "button",
|
|
40013
|
-
className:
|
|
40046
|
+
className: S6.tzTrigger,
|
|
40014
40047
|
"aria-expanded": r,
|
|
40015
40048
|
"aria-label": "Change timezone",
|
|
40016
40049
|
onClick: () => {
|
|
@@ -40019,29 +40052,29 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40019
40052
|
children: [
|
|
40020
40053
|
/* @__PURE__ */ (0, A.jsx)(Ar, {
|
|
40021
40054
|
size: 14,
|
|
40022
|
-
className:
|
|
40055
|
+
className: S6.tzGlobe
|
|
40023
40056
|
}),
|
|
40024
40057
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
40025
|
-
className:
|
|
40058
|
+
className: S6.tzTriggerLabel,
|
|
40026
40059
|
children: c.id
|
|
40027
40060
|
}),
|
|
40028
40061
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
40029
|
-
className:
|
|
40062
|
+
className: S6.tzTriggerOffset,
|
|
40030
40063
|
children: c.offset
|
|
40031
40064
|
}),
|
|
40032
40065
|
/* @__PURE__ */ (0, A.jsx)(fr, {
|
|
40033
40066
|
size: 15,
|
|
40034
|
-
className:
|
|
40067
|
+
className: S6.tzChevron
|
|
40035
40068
|
})
|
|
40036
40069
|
]
|
|
40037
40070
|
}), /* @__PURE__ */ (0, A.jsx)(p_, { children: r && /* @__PURE__ */ (0, A.jsxs)(A.Fragment, { children: [/* @__PURE__ */ (0, A.jsx)("button", {
|
|
40038
40071
|
type: "button",
|
|
40039
|
-
className:
|
|
40072
|
+
className: S6.tzBackdrop,
|
|
40040
40073
|
"aria-label": "Close timezone picker",
|
|
40041
40074
|
onClick: () => {
|
|
40042
40075
|
i(!1);
|
|
40043
40076
|
}
|
|
40044
|
-
}), /* @__PURE__ */ (0, A.jsx)(
|
|
40077
|
+
}), /* @__PURE__ */ (0, A.jsx)(w6, {
|
|
40045
40078
|
search: a,
|
|
40046
40079
|
list: u,
|
|
40047
40080
|
value: e,
|
|
@@ -40106,10 +40139,10 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40106
40139
|
availabilityBandEditBtn: "_availabilityBandEditBtn_156z1_589",
|
|
40107
40140
|
dragSelectionHighlight: "_dragSelectionHighlight_156z1_612",
|
|
40108
40141
|
dragSelectionLabel: "_dragSelectionLabel_156z1_631"
|
|
40109
|
-
},
|
|
40142
|
+
}, E6 = {
|
|
40110
40143
|
hidden: {},
|
|
40111
40144
|
visible: { transition: { staggerChildren: .04 } }
|
|
40112
|
-
},
|
|
40145
|
+
}, D6 = (e) => {
|
|
40113
40146
|
let t = [...e].sort((e, t) => e.start < t.start ? -1 : 1), n = /* @__PURE__ */ new Map();
|
|
40114
40147
|
for (let e of t) {
|
|
40115
40148
|
let t = n.get(e.date);
|
|
@@ -40124,7 +40157,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40124
40157
|
}) : t.items.push(e);
|
|
40125
40158
|
}
|
|
40126
40159
|
return [...n.values()];
|
|
40127
|
-
},
|
|
40160
|
+
}, O6 = ({ occurrence: e, onSelect: t }) => {
|
|
40128
40161
|
let { block: n } = e, r = $4[n.status], i = n.allDay ? "All day" : `${J4(e.start)} – ${J4(e.end)}`;
|
|
40129
40162
|
return /* @__PURE__ */ (0, A.jsxs)(M.button, {
|
|
40130
40163
|
type: "button",
|
|
@@ -40161,8 +40194,8 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40161
40194
|
})
|
|
40162
40195
|
]
|
|
40163
40196
|
});
|
|
40164
|
-
},
|
|
40165
|
-
let r =
|
|
40197
|
+
}, k6 = ({ occurrences: e, onSelectBlock: t, onCreate: n }) => {
|
|
40198
|
+
let r = D6(e);
|
|
40166
40199
|
return r.length === 0 ? /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40167
40200
|
className: $.agendaEmpty,
|
|
40168
40201
|
children: [
|
|
@@ -40194,17 +40227,17 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40194
40227
|
children: e.label
|
|
40195
40228
|
}), /* @__PURE__ */ (0, A.jsx)(M.div, {
|
|
40196
40229
|
className: $.agendaItems,
|
|
40197
|
-
variants:
|
|
40230
|
+
variants: E6,
|
|
40198
40231
|
initial: "hidden",
|
|
40199
40232
|
animate: "visible",
|
|
40200
|
-
children: e.items.map((e) => /* @__PURE__ */ (0, A.jsx)(
|
|
40233
|
+
children: e.items.map((e) => /* @__PURE__ */ (0, A.jsx)(O6, {
|
|
40201
40234
|
occurrence: e,
|
|
40202
40235
|
onSelect: t
|
|
40203
40236
|
}, e.key))
|
|
40204
40237
|
})]
|
|
40205
40238
|
}, e.key))
|
|
40206
40239
|
});
|
|
40207
|
-
},
|
|
40240
|
+
}, A6 = [
|
|
40208
40241
|
"Mon",
|
|
40209
40242
|
"Tue",
|
|
40210
40243
|
"Wed",
|
|
@@ -40212,7 +40245,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40212
40245
|
"Fri",
|
|
40213
40246
|
"Sat",
|
|
40214
40247
|
"Sun"
|
|
40215
|
-
],
|
|
40248
|
+
], j6 = 3, M6 = (e) => {
|
|
40216
40249
|
let t = /* @__PURE__ */ new Map();
|
|
40217
40250
|
for (let n of e) {
|
|
40218
40251
|
let e = t.get(n.date) ?? [];
|
|
@@ -40220,8 +40253,8 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40220
40253
|
}
|
|
40221
40254
|
for (let e of t.values()) e.sort((e, t) => e.start < t.start ? -1 : 1);
|
|
40222
40255
|
return t;
|
|
40223
|
-
},
|
|
40224
|
-
let { date: t, inMonth: n, isToday: r, occs: i } = e, a = i.length -
|
|
40256
|
+
}, N6 = (e) => {
|
|
40257
|
+
let { date: t, inMonth: n, isToday: r, occs: i } = e, a = i.length - j6;
|
|
40225
40258
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40226
40259
|
className: O($.monthCell, !n && $.monthCellOff, r && $.monthCellToday),
|
|
40227
40260
|
onClick: () => {
|
|
@@ -40232,7 +40265,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40232
40265
|
className: O($.monthDayNum, r && $.monthDayNumToday),
|
|
40233
40266
|
children: t.getDate()
|
|
40234
40267
|
}),
|
|
40235
|
-
i.slice(0,
|
|
40268
|
+
i.slice(0, j6).map((t) => /* @__PURE__ */ (0, A.jsx)("button", {
|
|
40236
40269
|
type: "button",
|
|
40237
40270
|
className: $.monthChip,
|
|
40238
40271
|
style: k({ "--status-color": $4[t.block.status].color }),
|
|
@@ -40251,13 +40284,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40251
40284
|
})
|
|
40252
40285
|
]
|
|
40253
40286
|
});
|
|
40254
|
-
},
|
|
40255
|
-
let o =
|
|
40287
|
+
}, P6 = ({ dates: e, anchor: t, occurrences: n, today: r, onSelectBlock: i, onSelectSlot: a }) => {
|
|
40288
|
+
let o = M6(n), s = mO(r);
|
|
40256
40289
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40257
40290
|
className: $.monthScroll,
|
|
40258
40291
|
children: [/* @__PURE__ */ (0, A.jsx)("div", {
|
|
40259
40292
|
className: $.monthHead,
|
|
40260
|
-
children:
|
|
40293
|
+
children: A6.map((e) => /* @__PURE__ */ (0, A.jsx)("span", {
|
|
40261
40294
|
className: $.monthHeadCell,
|
|
40262
40295
|
children: e
|
|
40263
40296
|
}, e))
|
|
@@ -40282,7 +40315,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40282
40315
|
},
|
|
40283
40316
|
children: e.map((e) => {
|
|
40284
40317
|
let n = mO(e);
|
|
40285
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
40318
|
+
return /* @__PURE__ */ (0, A.jsx)(N6, {
|
|
40286
40319
|
date: e,
|
|
40287
40320
|
inMonth: e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear(),
|
|
40288
40321
|
isToday: n === s,
|
|
@@ -40293,7 +40326,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40293
40326
|
})
|
|
40294
40327
|
})]
|
|
40295
40328
|
});
|
|
40296
|
-
},
|
|
40329
|
+
}, F6 = {
|
|
40297
40330
|
sidebar: "_sidebar_p4iov_4",
|
|
40298
40331
|
summaryGrid: "_summaryGrid_p4iov_36",
|
|
40299
40332
|
summaryCard: "_summaryCard_p4iov_42",
|
|
@@ -40314,10 +40347,10 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40314
40347
|
drawerHeader: "_drawerHeader_p4iov_177",
|
|
40315
40348
|
drawerTitle: "_drawerTitle_p4iov_185",
|
|
40316
40349
|
drawerCloseBtn: "_drawerCloseBtn_p4iov_191"
|
|
40317
|
-
},
|
|
40350
|
+
}, I6 = {
|
|
40318
40351
|
hidden: {},
|
|
40319
40352
|
visible: { transition: { staggerChildren: .05 } }
|
|
40320
|
-
},
|
|
40353
|
+
}, L6 = ({ occurrences: e, today: t, availability: n }) => {
|
|
40321
40354
|
let r = tk(e, t), i = $D[(t.getDay() + 6) % 7]?.id ?? "mon", a = n?.[i], o = a?.active ? a.slots : [], s = [
|
|
40322
40355
|
{
|
|
40323
40356
|
label: "Free",
|
|
@@ -40345,39 +40378,39 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40345
40378
|
}
|
|
40346
40379
|
];
|
|
40347
40380
|
return /* @__PURE__ */ (0, A.jsxs)("div", { children: [/* @__PURE__ */ (0, A.jsx)("div", {
|
|
40348
|
-
className:
|
|
40381
|
+
className: F6.sideHeader,
|
|
40349
40382
|
children: "Today"
|
|
40350
40383
|
}), /* @__PURE__ */ (0, A.jsx)(M.div, {
|
|
40351
|
-
className:
|
|
40352
|
-
variants:
|
|
40384
|
+
className: F6.summaryGrid,
|
|
40385
|
+
variants: I6,
|
|
40353
40386
|
initial: "hidden",
|
|
40354
40387
|
animate: "visible",
|
|
40355
40388
|
children: s.map((e) => /* @__PURE__ */ (0, A.jsxs)(M.div, {
|
|
40356
|
-
className:
|
|
40389
|
+
className: F6.summaryCard,
|
|
40357
40390
|
style: k({ "--v": e.color }),
|
|
40358
40391
|
variants: cb,
|
|
40359
40392
|
whileHover: { y: -2 },
|
|
40360
40393
|
children: [/* @__PURE__ */ (0, A.jsxs)("span", {
|
|
40361
|
-
className:
|
|
40394
|
+
className: F6.summaryTop,
|
|
40362
40395
|
children: [/* @__PURE__ */ (0, A.jsx)(e.Icon, {
|
|
40363
40396
|
size: 12,
|
|
40364
40397
|
strokeWidth: 2.4,
|
|
40365
|
-
className:
|
|
40398
|
+
className: F6.summaryTopIcon
|
|
40366
40399
|
}), /* @__PURE__ */ (0, A.jsx)("span", {
|
|
40367
|
-
className:
|
|
40400
|
+
className: F6.summaryLabel,
|
|
40368
40401
|
children: e.label
|
|
40369
40402
|
})]
|
|
40370
40403
|
}), /* @__PURE__ */ (0, A.jsx)("span", {
|
|
40371
|
-
className:
|
|
40404
|
+
className: F6.summaryValue,
|
|
40372
40405
|
children: e.value
|
|
40373
40406
|
})]
|
|
40374
40407
|
}, e.label))
|
|
40375
40408
|
})] });
|
|
40376
|
-
},
|
|
40377
|
-
className:
|
|
40409
|
+
}, R6 = ({ onQuickAdd: e }) => /* @__PURE__ */ (0, A.jsxs)("div", { children: [/* @__PURE__ */ (0, A.jsx)("div", {
|
|
40410
|
+
className: F6.sideHeader,
|
|
40378
40411
|
children: "Quick add"
|
|
40379
40412
|
}), /* @__PURE__ */ (0, A.jsx)("div", {
|
|
40380
|
-
className:
|
|
40413
|
+
className: F6.quickRow,
|
|
40381
40414
|
children: [{
|
|
40382
40415
|
status: "focus",
|
|
40383
40416
|
minutes: 60,
|
|
@@ -40393,7 +40426,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40393
40426
|
return /* @__PURE__ */ (0, A.jsxs)(M.button, {
|
|
40394
40427
|
type: "button",
|
|
40395
40428
|
whileTap: { scale: .96 },
|
|
40396
|
-
className:
|
|
40429
|
+
className: F6.quickBtn,
|
|
40397
40430
|
style: k({ "--status-color": n.color }),
|
|
40398
40431
|
onClick: () => {
|
|
40399
40432
|
e(t.status, t.minutes, t.title);
|
|
@@ -40405,24 +40438,24 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40405
40438
|
]
|
|
40406
40439
|
}, t.label);
|
|
40407
40440
|
})
|
|
40408
|
-
})] }),
|
|
40409
|
-
className:
|
|
40441
|
+
})] }), z6 = ({ activeStatuses: e, onToggleStatus: t }) => /* @__PURE__ */ (0, A.jsxs)("div", { children: [/* @__PURE__ */ (0, A.jsx)("div", {
|
|
40442
|
+
className: F6.sideHeader,
|
|
40410
40443
|
children: "Status legend"
|
|
40411
40444
|
}), /* @__PURE__ */ (0, A.jsx)("div", {
|
|
40412
|
-
className:
|
|
40445
|
+
className: F6.legend,
|
|
40413
40446
|
children: QO.map((n) => {
|
|
40414
40447
|
let r = $4[n.id], i = e.has(n.id);
|
|
40415
40448
|
return /* @__PURE__ */ (0, A.jsxs)(M.button, {
|
|
40416
40449
|
type: "button",
|
|
40417
40450
|
whileTap: { scale: .97 },
|
|
40418
|
-
className: O(
|
|
40451
|
+
className: O(F6.legendItem, i ? F6.legendItemOn : F6.legendOff),
|
|
40419
40452
|
style: k({ "--status-color": r.color }),
|
|
40420
40453
|
onClick: () => {
|
|
40421
40454
|
t(n.id);
|
|
40422
40455
|
},
|
|
40423
40456
|
children: [
|
|
40424
40457
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
40425
|
-
className: O(
|
|
40458
|
+
className: O(F6.legendSwatch, !i && F6.legendSwatchOff),
|
|
40426
40459
|
children: /* @__PURE__ */ (0, A.jsx)(p_, { children: i && /* @__PURE__ */ (0, A.jsx)(M.span, {
|
|
40427
40460
|
initial: { scale: 0 },
|
|
40428
40461
|
animate: { scale: 1 },
|
|
@@ -40440,40 +40473,40 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40440
40473
|
}),
|
|
40441
40474
|
/* @__PURE__ */ (0, A.jsx)(r.Icon, {
|
|
40442
40475
|
size: 12,
|
|
40443
|
-
className:
|
|
40476
|
+
className: F6.legendIcon
|
|
40444
40477
|
}),
|
|
40445
40478
|
n.label
|
|
40446
40479
|
]
|
|
40447
40480
|
}, n.id);
|
|
40448
40481
|
})
|
|
40449
|
-
})] }),
|
|
40450
|
-
className:
|
|
40482
|
+
})] }), B6 = (e) => /* @__PURE__ */ (0, A.jsxs)("aside", {
|
|
40483
|
+
className: F6.sidebar,
|
|
40451
40484
|
children: [
|
|
40452
40485
|
e.onClose !== void 0 && /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40453
|
-
className:
|
|
40486
|
+
className: F6.drawerHeader,
|
|
40454
40487
|
children: [/* @__PURE__ */ (0, A.jsx)("span", {
|
|
40455
|
-
className:
|
|
40488
|
+
className: F6.drawerTitle,
|
|
40456
40489
|
children: "Schedule Settings"
|
|
40457
40490
|
}), /* @__PURE__ */ (0, A.jsx)("button", {
|
|
40458
40491
|
type: "button",
|
|
40459
|
-
className:
|
|
40492
|
+
className: F6.drawerCloseBtn,
|
|
40460
40493
|
onClick: e.onClose,
|
|
40461
40494
|
"aria-label": "Close schedule settings",
|
|
40462
40495
|
children: /* @__PURE__ */ (0, A.jsx)(Oi, { size: 16 })
|
|
40463
40496
|
})]
|
|
40464
40497
|
}),
|
|
40465
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40498
|
+
/* @__PURE__ */ (0, A.jsx)(L6, {
|
|
40466
40499
|
occurrences: e.occurrences,
|
|
40467
40500
|
today: e.today,
|
|
40468
40501
|
availability: e.availability
|
|
40469
40502
|
}),
|
|
40470
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40471
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40503
|
+
/* @__PURE__ */ (0, A.jsx)(R6, { onQuickAdd: e.onQuickAdd }),
|
|
40504
|
+
/* @__PURE__ */ (0, A.jsx)(z6, {
|
|
40472
40505
|
activeStatuses: e.activeStatuses,
|
|
40473
40506
|
onToggleStatus: e.onToggleStatus
|
|
40474
40507
|
})
|
|
40475
40508
|
]
|
|
40476
|
-
}),
|
|
40509
|
+
}), V6 = (e, t, n, r) => {
|
|
40477
40510
|
let i = Math.min(e, t), a = Math.max(e, t);
|
|
40478
40511
|
if (e === t) {
|
|
40479
40512
|
let e = r - 1;
|
|
@@ -40495,7 +40528,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40495
40528
|
startHour: n,
|
|
40496
40529
|
endHour: r
|
|
40497
40530
|
};
|
|
40498
|
-
},
|
|
40531
|
+
}, H6 = ({ item: e, range: t, onSelect: n }) => {
|
|
40499
40532
|
let { occurrence: r } = e, { block: i } = r, a = $4[i.status], o = o3(r.start, r.end, t), s = r.continuesFromPrevDay === !0, c = r.continuesToNextDay === !0, l = s ? "Continued from the previous day" : c ? "Continues into the next day" : void 0;
|
|
40500
40533
|
return /* @__PURE__ */ (0, A.jsxs)(M.button, {
|
|
40501
40534
|
type: "button",
|
|
@@ -40567,7 +40600,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40567
40600
|
]
|
|
40568
40601
|
})]
|
|
40569
40602
|
});
|
|
40570
|
-
},
|
|
40603
|
+
}, U6 = ({ occurrence: e, onSelect: t }) => {
|
|
40571
40604
|
let { block: n } = e, r = $4[n.status];
|
|
40572
40605
|
return /* @__PURE__ */ (0, A.jsxs)("button", {
|
|
40573
40606
|
type: "button",
|
|
@@ -40582,7 +40615,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40582
40615
|
n.title
|
|
40583
40616
|
]
|
|
40584
40617
|
});
|
|
40585
|
-
},
|
|
40618
|
+
}, W6 = (e) => `${String(e).padStart(2, "0")}:00`, G6 = ({ bands: e, range: t, onSelectSlot: n, onSelectBlock: r }) => /* @__PURE__ */ (0, A.jsx)(A.Fragment, { children: e.map((e) => {
|
|
40586
40619
|
let i = e.block.allDay && e.continuesFromPrevDay !== !0 && e.continuesToNextDay !== !0 ? {
|
|
40587
40620
|
top: 0,
|
|
40588
40621
|
height: a3(t)
|
|
@@ -40611,7 +40644,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40611
40644
|
children: "Edit"
|
|
40612
40645
|
})]
|
|
40613
40646
|
}, e.key);
|
|
40614
|
-
}) }),
|
|
40647
|
+
}) }), K6 = ({ day: e, cell: t, dayIndex: n, range: r, onDragSelectStart: i, onDragSelectEnter: a, onDropBlock: o, onSelectSlot: s }) => /* @__PURE__ */ (0, A.jsx)(A.Fragment, { children: i3(r).map((r) => /* @__PURE__ */ (0, A.jsx)("button", {
|
|
40615
40648
|
type: "button",
|
|
40616
40649
|
className: $.hourRow,
|
|
40617
40650
|
"aria-label": `Add a block on ${e.long} at ${e3(r)}`,
|
|
@@ -40626,12 +40659,12 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40626
40659
|
},
|
|
40627
40660
|
onDrop: (e) => {
|
|
40628
40661
|
let n = e.dataTransfer.getData("text/plain");
|
|
40629
|
-
n && o(n, Q4(mO(t.date),
|
|
40662
|
+
n && o(n, Q4(mO(t.date), W6(r)));
|
|
40630
40663
|
},
|
|
40631
40664
|
onClick: () => {
|
|
40632
|
-
s(Q4(mO(t.date),
|
|
40665
|
+
s(Q4(mO(t.date), W6(r)));
|
|
40633
40666
|
}
|
|
40634
|
-
}, r)) }),
|
|
40667
|
+
}, r)) }), q6 = (e) => e === 0 ? "" : e === 1 ? "1 event" : `${String(e)} events`, J6 = ({ day: e, cell: t, count: n, off: r }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40635
40668
|
className: $.dayHeader,
|
|
40636
40669
|
children: [
|
|
40637
40670
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
@@ -40644,16 +40677,16 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40644
40677
|
}),
|
|
40645
40678
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
40646
40679
|
className: $.dayCount,
|
|
40647
|
-
children: r ? "Day off" :
|
|
40680
|
+
children: r ? "Day off" : q6(n)
|
|
40648
40681
|
})
|
|
40649
40682
|
]
|
|
40650
|
-
}),
|
|
40683
|
+
}), Y6 = ({ allDay: e, onSelectBlock: t }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
40651
40684
|
className: $.allDayBand,
|
|
40652
|
-
children: e.map((e) => /* @__PURE__ */ (0, A.jsx)(
|
|
40685
|
+
children: e.map((e) => /* @__PURE__ */ (0, A.jsx)(U6, {
|
|
40653
40686
|
occurrence: e,
|
|
40654
40687
|
onSelect: t
|
|
40655
40688
|
}, e.key))
|
|
40656
|
-
}),
|
|
40689
|
+
}), X6 = ({ dayIndex: e, dragSelect: t, rangeStartHour: n }) => t === null || e < Math.min(t.startDayIndex, t.endDayIndex) || e > Math.max(t.startDayIndex, t.endDayIndex) ? null : /* @__PURE__ */ (0, A.jsx)("div", {
|
|
40657
40690
|
className: $.dragSelectionHighlight,
|
|
40658
40691
|
style: k({
|
|
40659
40692
|
"--top": `${String((Math.min(t.startHour, t.endHour - 1) - n) * 52)}px`,
|
|
@@ -40668,7 +40701,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40668
40701
|
e3(Math.max(t.startHour, t.endHour))
|
|
40669
40702
|
]
|
|
40670
40703
|
})
|
|
40671
|
-
}),
|
|
40704
|
+
}), Z6 = (e, t) => {
|
|
40672
40705
|
let n = e.filter((e) => e.dayIndex === t);
|
|
40673
40706
|
return {
|
|
40674
40707
|
dayOccs: n,
|
|
@@ -40676,7 +40709,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40676
40709
|
availabilityBands: n.filter((e) => e.block.status === "available"),
|
|
40677
40710
|
laid: f3(n.filter((e) => !e.block.allDay && e.block.status !== "available"))
|
|
40678
40711
|
};
|
|
40679
|
-
},
|
|
40712
|
+
}, Q6 = ({ active: e, slots: t, range: n, cell: r, day: i, dayIndex: a, now: o, availabilityBands: s, laid: c, dragSelect: l, onDragSelectStart: u, onDragSelectEnter: d, onDropBlock: f, onSelectSlot: p, onSelectBlock: m }) => {
|
|
40680
40713
|
let h = c3(e, t, n), g = r.isToday ? l3(o, n) : null;
|
|
40681
40714
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40682
40715
|
className: $.hoursWrap,
|
|
@@ -40689,13 +40722,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40689
40722
|
"--h": `${String(e.height)}px`
|
|
40690
40723
|
})
|
|
40691
40724
|
}, e.top)),
|
|
40692
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40725
|
+
/* @__PURE__ */ (0, A.jsx)(G6, {
|
|
40693
40726
|
bands: s,
|
|
40694
40727
|
range: n,
|
|
40695
40728
|
onSelectSlot: p,
|
|
40696
40729
|
onSelectBlock: m
|
|
40697
40730
|
}),
|
|
40698
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40731
|
+
/* @__PURE__ */ (0, A.jsx)(K6, {
|
|
40699
40732
|
day: i,
|
|
40700
40733
|
cell: r,
|
|
40701
40734
|
dayIndex: a,
|
|
@@ -40705,7 +40738,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40705
40738
|
onDropBlock: f,
|
|
40706
40739
|
onSelectSlot: p
|
|
40707
40740
|
}),
|
|
40708
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40741
|
+
/* @__PURE__ */ (0, A.jsx)(X6, {
|
|
40709
40742
|
dayIndex: a,
|
|
40710
40743
|
dragSelect: l,
|
|
40711
40744
|
rangeStartHour: n.startHour
|
|
@@ -40715,36 +40748,36 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40715
40748
|
style: k({ "--top": `${String(g)}px` }),
|
|
40716
40749
|
children: /* @__PURE__ */ (0, A.jsx)("span", { className: $.nowDot })
|
|
40717
40750
|
}),
|
|
40718
|
-
c.map((e) => /* @__PURE__ */ (0, A.jsx)(
|
|
40751
|
+
c.map((e) => /* @__PURE__ */ (0, A.jsx)(H6, {
|
|
40719
40752
|
item: e,
|
|
40720
40753
|
range: n,
|
|
40721
40754
|
onSelect: m
|
|
40722
40755
|
}, e.occurrence.key))
|
|
40723
40756
|
]
|
|
40724
40757
|
});
|
|
40725
|
-
},
|
|
40726
|
-
let { day: t, cell: n, dayIndex: r, occurrences: i, onSelectBlock: a, active: o } = e, { dayOccs: s, allDay: c, availabilityBands: l, laid: u } =
|
|
40758
|
+
}, $6 = (e) => {
|
|
40759
|
+
let { day: t, cell: n, dayIndex: r, occurrences: i, onSelectBlock: a, active: o } = e, { dayOccs: s, allDay: c, availabilityBands: l, laid: u } = Z6(i, r), d = !o;
|
|
40727
40760
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40728
40761
|
className: O($.dayCol, n.isToday && $.dayColToday),
|
|
40729
40762
|
children: [
|
|
40730
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40763
|
+
/* @__PURE__ */ (0, A.jsx)(J6, {
|
|
40731
40764
|
day: t,
|
|
40732
40765
|
cell: n,
|
|
40733
40766
|
count: s.length,
|
|
40734
40767
|
off: d
|
|
40735
40768
|
}),
|
|
40736
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40769
|
+
/* @__PURE__ */ (0, A.jsx)(Y6, {
|
|
40737
40770
|
allDay: c,
|
|
40738
40771
|
onSelectBlock: a
|
|
40739
40772
|
}),
|
|
40740
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
40773
|
+
/* @__PURE__ */ (0, A.jsx)(Q6, {
|
|
40741
40774
|
...e,
|
|
40742
40775
|
availabilityBands: l,
|
|
40743
40776
|
laid: u
|
|
40744
40777
|
})
|
|
40745
40778
|
]
|
|
40746
40779
|
});
|
|
40747
|
-
},
|
|
40780
|
+
}, e8 = ({ range: e }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40748
40781
|
className: $.gutter,
|
|
40749
40782
|
children: [
|
|
40750
40783
|
/* @__PURE__ */ (0, A.jsx)("div", { className: $.gutterHead }),
|
|
@@ -40757,12 +40790,12 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40757
40790
|
children: e3(e)
|
|
40758
40791
|
}, e))
|
|
40759
40792
|
]
|
|
40760
|
-
}),
|
|
40793
|
+
}), t8 = (e, t) => {
|
|
40761
40794
|
let [n, r] = T(null);
|
|
40762
40795
|
return y(() => {
|
|
40763
40796
|
let i = () => {
|
|
40764
40797
|
if (n !== null) {
|
|
40765
|
-
let { firstDayIdx: i, lastDayIdx: a, startHour: o, endHour: s } =
|
|
40798
|
+
let { firstDayIdx: i, lastDayIdx: a, startHour: o, endHour: s } = V6(n.startDayIndex, n.endDayIndex, n.startHour, n.endHour), c = e[i], l = e[a];
|
|
40766
40799
|
c && l && t(Q4(mO(c.date), `${String(o).padStart(2, "0")}:00`), Q4(mO(l.date), `${String(s).padStart(2, "0")}:00`)), r(null);
|
|
40767
40800
|
}
|
|
40768
40801
|
};
|
|
@@ -40797,7 +40830,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40797
40830
|
}
|
|
40798
40831
|
}
|
|
40799
40832
|
};
|
|
40800
|
-
},
|
|
40833
|
+
}, n8 = (e) => {
|
|
40801
40834
|
let t = HN();
|
|
40802
40835
|
return { dropBlock: (n, r) => {
|
|
40803
40836
|
let i = e.find((e) => e.block.id === n);
|
|
@@ -40816,14 +40849,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40816
40849
|
}
|
|
40817
40850
|
});
|
|
40818
40851
|
} };
|
|
40819
|
-
},
|
|
40852
|
+
}, r8 = (e) => ({
|
|
40820
40853
|
active: e ? e.active : !0,
|
|
40821
40854
|
slots: e?.slots ?? [{
|
|
40822
40855
|
from: "09:00",
|
|
40823
40856
|
to: "17:00"
|
|
40824
40857
|
}]
|
|
40825
|
-
}),
|
|
40826
|
-
let u = w(null), { dragSelect: d, startDrag: f, enterDrag: p } =
|
|
40858
|
+
}), i8 = ({ days: e, cells: t, occurrences: n, availability: r, workStart: i, workEnd: a, range: o, now: s, onSelectBlock: c, onSelectSlot: l }) => {
|
|
40859
|
+
let u = w(null), { dragSelect: d, startDrag: f, enterDrag: p } = t8(t, l), { dropBlock: m } = n8(n), h = w(s);
|
|
40827
40860
|
h.current = s;
|
|
40828
40861
|
let { startHour: g, endHour: _ } = o, v = s.getHours() * 60 + s.getMinutes(), b = t.some((e) => e.isToday) && v >= g * 60 && v <= _ * 60;
|
|
40829
40862
|
y(() => {
|
|
@@ -40847,11 +40880,11 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40847
40880
|
children: /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
40848
40881
|
className: $.gridInner,
|
|
40849
40882
|
style: k({ "--all-day-rows": x }),
|
|
40850
|
-
children: [/* @__PURE__ */ (0, A.jsx)(
|
|
40883
|
+
children: [/* @__PURE__ */ (0, A.jsx)(e8, { range: o }), e.map((e) => {
|
|
40851
40884
|
let i = $D.findIndex((t) => t.id === e.id), a = t[i] ?? t[0];
|
|
40852
40885
|
if (a === void 0) return null;
|
|
40853
|
-
let { active: u, slots: h } =
|
|
40854
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
40886
|
+
let { active: u, slots: h } = r8(r ? r[e.id] : null);
|
|
40887
|
+
return /* @__PURE__ */ (0, A.jsx)($6, {
|
|
40855
40888
|
day: e,
|
|
40856
40889
|
cell: a,
|
|
40857
40890
|
dayIndex: i,
|
|
@@ -40870,7 +40903,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40870
40903
|
})]
|
|
40871
40904
|
})
|
|
40872
40905
|
});
|
|
40873
|
-
},
|
|
40906
|
+
}, a8 = [
|
|
40874
40907
|
{
|
|
40875
40908
|
id: "day",
|
|
40876
40909
|
label: "Day"
|
|
@@ -40895,33 +40928,33 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40895
40928
|
id: "hours",
|
|
40896
40929
|
label: "Working Hours"
|
|
40897
40930
|
}
|
|
40898
|
-
],
|
|
40931
|
+
], o8 = (e) => e === "month" || e === "agenda", s8 = (e, t) => {
|
|
40899
40932
|
let n = new Set(e);
|
|
40900
40933
|
return t === "agenda" ? n.delete("available") : t !== "hours" && n.add("available"), n;
|
|
40901
|
-
},
|
|
40934
|
+
}, c8 = (e, t) => {
|
|
40902
40935
|
let n = new Set(e);
|
|
40903
40936
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
40904
|
-
},
|
|
40937
|
+
}, l8 = () => {
|
|
40905
40938
|
let [e, t] = T("week"), [n, r] = T(0), [i, a] = T(0), [o, s] = T(null), [c, l] = T(() => new Set(QO.map((e) => e.id))), [u, d] = T(""), f = rP(u).display;
|
|
40906
40939
|
return {
|
|
40907
40940
|
view: e,
|
|
40908
40941
|
setView: (e) => {
|
|
40909
|
-
t(e), l((t) =>
|
|
40942
|
+
t(e), l((t) => s8(t, e));
|
|
40910
40943
|
},
|
|
40911
|
-
|
|
40944
|
+
dayOffset: n,
|
|
40912
40945
|
monthOffset: i,
|
|
40913
40946
|
goPrev: () => {
|
|
40914
|
-
|
|
40947
|
+
o8(e) ? a((e) => e - 1) : r(e === "day" ? (e) => e - 1 : (e) => e - 7);
|
|
40915
40948
|
},
|
|
40916
40949
|
goNext: () => {
|
|
40917
|
-
|
|
40950
|
+
o8(e) ? a((e) => e + 1) : r(e === "day" ? (e) => e + 1 : (e) => e + 7);
|
|
40918
40951
|
},
|
|
40919
40952
|
goToday: () => {
|
|
40920
40953
|
r(0), a(0);
|
|
40921
40954
|
},
|
|
40922
40955
|
active: c,
|
|
40923
40956
|
toggle: (e) => {
|
|
40924
|
-
l((t) =>
|
|
40957
|
+
l((t) => c8(t, e));
|
|
40925
40958
|
},
|
|
40926
40959
|
editor: o,
|
|
40927
40960
|
openCreate: (e, t) => {
|
|
@@ -40955,7 +40988,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40955
40988
|
timezone: f,
|
|
40956
40989
|
setTimezone: d
|
|
40957
40990
|
};
|
|
40958
|
-
},
|
|
40991
|
+
}, u8 = {
|
|
40959
40992
|
scheduleRoot: "_scheduleRoot_5za8e_7",
|
|
40960
40993
|
toolbar: "_toolbar_5za8e_16",
|
|
40961
40994
|
scheduleSelect: "_scheduleSelect_5za8e_27",
|
|
@@ -40974,18 +41007,18 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40974
41007
|
hoursArea: "_hoursArea_5za8e_172",
|
|
40975
41008
|
sidebarToggleBtn: "_sidebarToggleBtn_5za8e_181",
|
|
40976
41009
|
sidebarToggleBtnActive: "_sidebarToggleBtnActive_5za8e_199"
|
|
40977
|
-
},
|
|
41010
|
+
}, d8 = (e) => e.view === "month" ? /* @__PURE__ */ (0, A.jsx)(P6, {
|
|
40978
41011
|
dates: e.monthDates,
|
|
40979
41012
|
anchor: e.monthAnchor,
|
|
40980
41013
|
occurrences: e.monthOccurrences,
|
|
40981
41014
|
today: e.today,
|
|
40982
41015
|
onSelectBlock: e.onSelectBlock,
|
|
40983
41016
|
onSelectSlot: e.onSelectSlot
|
|
40984
|
-
}) : e.view === "agenda" ? /* @__PURE__ */ (0, A.jsx)(
|
|
41017
|
+
}) : e.view === "agenda" ? /* @__PURE__ */ (0, A.jsx)(k6, {
|
|
40985
41018
|
occurrences: e.monthOccurrences,
|
|
40986
41019
|
onSelectBlock: e.onSelectBlock,
|
|
40987
41020
|
onCreate: e.onCreate
|
|
40988
|
-
}) : /* @__PURE__ */ (0, A.jsx)(
|
|
41021
|
+
}) : /* @__PURE__ */ (0, A.jsx)(i8, {
|
|
40989
41022
|
days: e.days,
|
|
40990
41023
|
cells: e.cells,
|
|
40991
41024
|
occurrences: e.weekOccurrences,
|
|
@@ -40996,13 +41029,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
40996
41029
|
now: e.today,
|
|
40997
41030
|
onSelectBlock: e.onSelectBlock,
|
|
40998
41031
|
onSelectSlot: e.onSelectSlot
|
|
40999
|
-
}),
|
|
41032
|
+
}), f8 = (e) => {
|
|
41000
41033
|
let t = Pi("(max-width: 1024px)");
|
|
41001
41034
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41002
|
-
className:
|
|
41035
|
+
className: u8.main,
|
|
41003
41036
|
children: [
|
|
41004
41037
|
/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41005
|
-
className:
|
|
41038
|
+
className: u8.calArea,
|
|
41006
41039
|
children: [
|
|
41007
41040
|
e.query.isPending && /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41008
41041
|
className: D3.center,
|
|
@@ -41013,10 +41046,10 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41013
41046
|
title: "Could not load schedule",
|
|
41014
41047
|
children: e.query.error.message
|
|
41015
41048
|
}),
|
|
41016
|
-
e.query.isSuccess &&
|
|
41049
|
+
e.query.isSuccess && d8(e)
|
|
41017
41050
|
]
|
|
41018
41051
|
}),
|
|
41019
|
-
!t && /* @__PURE__ */ (0, A.jsx)(
|
|
41052
|
+
!t && /* @__PURE__ */ (0, A.jsx)(B6, {
|
|
41020
41053
|
occurrences: e.summary,
|
|
41021
41054
|
today: e.today,
|
|
41022
41055
|
availability: e.availability,
|
|
@@ -41033,7 +41066,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41033
41066
|
},
|
|
41034
41067
|
title: "Schedule Settings",
|
|
41035
41068
|
side: "right",
|
|
41036
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
41069
|
+
children: /* @__PURE__ */ (0, A.jsx)(B6, {
|
|
41037
41070
|
occurrences: e.summary,
|
|
41038
41071
|
today: e.today,
|
|
41039
41072
|
availability: e.availability,
|
|
@@ -41047,7 +41080,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41047
41080
|
})
|
|
41048
41081
|
]
|
|
41049
41082
|
});
|
|
41050
|
-
},
|
|
41083
|
+
}, p8 = (e, t) => e.meetingDuration !== t.meetingDuration || e.bufferMinutes !== t.bufferMinutes, m8 = (e, t, n) => {
|
|
41051
41084
|
let r = nP.from({
|
|
41052
41085
|
personal: t.timezone,
|
|
41053
41086
|
anchor: t.availabilityTimezone
|
|
@@ -41055,9 +41088,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41055
41088
|
return {
|
|
41056
41089
|
anchorZone: r.anchor,
|
|
41057
41090
|
initialTimezone: r.display,
|
|
41058
|
-
initialInZone:
|
|
41091
|
+
initialInZone: b6(e, r.anchor, r.display, n)
|
|
41059
41092
|
};
|
|
41060
|
-
},
|
|
41093
|
+
}, h8 = (e) => {
|
|
41061
41094
|
let t = {};
|
|
41062
41095
|
for (let [n, r] of Object.entries(e)) t[n] = {
|
|
41063
41096
|
active: r.active,
|
|
@@ -41067,13 +41100,13 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41067
41100
|
}))
|
|
41068
41101
|
};
|
|
41069
41102
|
return t;
|
|
41070
|
-
},
|
|
41071
|
-
let r = zN(), i = GN(), [a] = T(() => n.now()), [{ anchorZone: o, initialTimezone: s, initialInZone: c }] = T(() =>
|
|
41103
|
+
}, g8 = (e, t, n) => {
|
|
41104
|
+
let r = zN(), i = GN(), [a] = T(() => n.now()), [{ anchorZone: o, initialTimezone: s, initialInZone: c }] = T(() => m8(e, t, a)), [l, u] = T(c), [d, f] = T(s), [p, m] = T(t.meetingDuration), [h, g] = T(t.bufferMinutes), _ = b6(l, d, o, a), v = JSON.stringify(h8(_)) !== JSON.stringify(h8(e)), b = p8({
|
|
41072
41105
|
meetingDuration: p,
|
|
41073
41106
|
bufferMinutes: h
|
|
41074
41107
|
}, t);
|
|
41075
41108
|
return y(() => {
|
|
41076
|
-
r.isSuccess && u(
|
|
41109
|
+
r.isSuccess && u(b6(e, o, d, a));
|
|
41077
41110
|
}, [
|
|
41078
41111
|
e,
|
|
41079
41112
|
r.isSuccess,
|
|
@@ -41105,7 +41138,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41105
41138
|
}));
|
|
41106
41139
|
},
|
|
41107
41140
|
changeTimezone: (e) => {
|
|
41108
|
-
r.reset(), i.reset(), u((t) =>
|
|
41141
|
+
r.reset(), i.reset(), u((t) => b6(t, d, e, a)), f(e);
|
|
41109
41142
|
},
|
|
41110
41143
|
reset: () => {
|
|
41111
41144
|
r.mutate(null, {
|
|
@@ -41125,7 +41158,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41125
41158
|
});
|
|
41126
41159
|
}
|
|
41127
41160
|
};
|
|
41128
|
-
},
|
|
41161
|
+
}, _8 = {
|
|
41129
41162
|
hours: "_hours_ftj0h_5",
|
|
41130
41163
|
fieldLabel: "_fieldLabel_ftj0h_18",
|
|
41131
41164
|
chips: "_chips_ftj0h_24",
|
|
@@ -41154,38 +41187,38 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41154
41187
|
customBadgeText: "_customBadgeText_ftj0h_247",
|
|
41155
41188
|
resetToBranchBtn: "_resetToBranchBtn_ftj0h_251",
|
|
41156
41189
|
settingsGrid: "_settingsGrid_ftj0h_271"
|
|
41157
|
-
},
|
|
41158
|
-
className:
|
|
41190
|
+
}, v8 = ({ name: e, options: t, selected: n, onSelect: r }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41191
|
+
className: _8.chips,
|
|
41159
41192
|
children: t.map((t) => {
|
|
41160
41193
|
let i = n === t;
|
|
41161
41194
|
return /* @__PURE__ */ (0, A.jsxs)("button", {
|
|
41162
41195
|
type: "button",
|
|
41163
|
-
className: O(
|
|
41196
|
+
className: O(_8.chipBtn, i && _8.chipBtnActive),
|
|
41164
41197
|
onClick: () => {
|
|
41165
41198
|
r(t);
|
|
41166
41199
|
},
|
|
41167
41200
|
children: [i && /* @__PURE__ */ (0, A.jsx)(M.span, {
|
|
41168
41201
|
layoutId: `chip-${e}`,
|
|
41169
|
-
className:
|
|
41202
|
+
className: _8.chipBg,
|
|
41170
41203
|
transition: {
|
|
41171
41204
|
type: "spring",
|
|
41172
41205
|
stiffness: 420,
|
|
41173
41206
|
damping: 34
|
|
41174
41207
|
}
|
|
41175
41208
|
}), /* @__PURE__ */ (0, A.jsxs)("span", {
|
|
41176
|
-
className:
|
|
41209
|
+
className: _8.chipLabel,
|
|
41177
41210
|
children: [t, "m"]
|
|
41178
41211
|
})]
|
|
41179
41212
|
}, t);
|
|
41180
41213
|
})
|
|
41181
|
-
}),
|
|
41182
|
-
className:
|
|
41214
|
+
}), y8 = ({ meetingDuration: e, bufferMinutes: t, onDurationChange: n, onBufferChange: r }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41215
|
+
className: _8.settingsGrid,
|
|
41183
41216
|
children: [/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41184
41217
|
className: D3.field,
|
|
41185
41218
|
children: [/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41186
|
-
className:
|
|
41219
|
+
className: _8.fieldLabel,
|
|
41187
41220
|
children: "Meeting duration"
|
|
41188
|
-
}), /* @__PURE__ */ (0, A.jsx)(
|
|
41221
|
+
}), /* @__PURE__ */ (0, A.jsx)(v8, {
|
|
41189
41222
|
name: "duration",
|
|
41190
41223
|
options: YO,
|
|
41191
41224
|
selected: e,
|
|
@@ -41194,29 +41227,29 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41194
41227
|
}), /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41195
41228
|
className: D3.field,
|
|
41196
41229
|
children: [/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41197
|
-
className:
|
|
41230
|
+
className: _8.fieldLabel,
|
|
41198
41231
|
children: "Buffer between meetings"
|
|
41199
|
-
}), /* @__PURE__ */ (0, A.jsx)(
|
|
41232
|
+
}), /* @__PURE__ */ (0, A.jsx)(v8, {
|
|
41200
41233
|
name: "buffer",
|
|
41201
41234
|
options: XO,
|
|
41202
41235
|
selected: t,
|
|
41203
41236
|
onSelect: r
|
|
41204
41237
|
})]
|
|
41205
41238
|
})]
|
|
41206
|
-
}),
|
|
41207
|
-
className:
|
|
41239
|
+
}), b8 = ({ day: e, value: t, onChange: n }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41240
|
+
className: _8.dayRow,
|
|
41208
41241
|
children: [
|
|
41209
41242
|
/* @__PURE__ */ (0, A.jsx)("button", {
|
|
41210
41243
|
type: "button",
|
|
41211
|
-
className: O(
|
|
41244
|
+
className: O(_8.toggle, t.active && _8.toggleOn),
|
|
41212
41245
|
"aria-pressed": t.active,
|
|
41213
41246
|
onClick: () => {
|
|
41214
41247
|
n({ active: !t.active });
|
|
41215
41248
|
},
|
|
41216
|
-
children: /* @__PURE__ */ (0, A.jsx)("span", { className:
|
|
41249
|
+
children: /* @__PURE__ */ (0, A.jsx)("span", { className: _8.toggleKnob })
|
|
41217
41250
|
}),
|
|
41218
41251
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41219
|
-
className:
|
|
41252
|
+
className: _8.dayName,
|
|
41220
41253
|
children: e.long
|
|
41221
41254
|
}),
|
|
41222
41255
|
/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
@@ -41227,7 +41260,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41227
41260
|
flex: 1
|
|
41228
41261
|
},
|
|
41229
41262
|
children: [t.slots.map((e, r) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41230
|
-
className:
|
|
41263
|
+
className: _8.dayTimes,
|
|
41231
41264
|
children: [
|
|
41232
41265
|
/* @__PURE__ */ (0, A.jsx)(bD, {
|
|
41233
41266
|
value: e.from,
|
|
@@ -41258,7 +41291,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41258
41291
|
}),
|
|
41259
41292
|
/* @__PURE__ */ (0, A.jsx)("button", {
|
|
41260
41293
|
type: "button",
|
|
41261
|
-
className:
|
|
41294
|
+
className: _8.resetBtn,
|
|
41262
41295
|
disabled: !t.active || t.slots.length === 1,
|
|
41263
41296
|
onClick: () => {
|
|
41264
41297
|
n({ slots: t.slots.filter((e, t) => t !== r) });
|
|
@@ -41268,7 +41301,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41268
41301
|
]
|
|
41269
41302
|
}, e.id)), /* @__PURE__ */ (0, A.jsx)("button", {
|
|
41270
41303
|
type: "button",
|
|
41271
|
-
className:
|
|
41304
|
+
className: _8.resetBtn,
|
|
41272
41305
|
style: {
|
|
41273
41306
|
alignSelf: "flex-start",
|
|
41274
41307
|
margin: 0
|
|
@@ -41286,7 +41319,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41286
41319
|
}),
|
|
41287
41320
|
/* @__PURE__ */ (0, A.jsxs)("button", {
|
|
41288
41321
|
type: "button",
|
|
41289
|
-
className:
|
|
41322
|
+
className: _8.resetBtn,
|
|
41290
41323
|
onClick: () => {
|
|
41291
41324
|
n({
|
|
41292
41325
|
active: !0,
|
|
@@ -41300,22 +41333,22 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41300
41333
|
children: [/* @__PURE__ */ (0, A.jsx)(ni, { size: 13 }), " Reset"]
|
|
41301
41334
|
})
|
|
41302
41335
|
]
|
|
41303
|
-
}),
|
|
41304
|
-
className:
|
|
41336
|
+
}), x8 = ({ timezone: e, branchName: t, now: n, onTimezoneChange: r }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41337
|
+
className: _8.settingsGrid,
|
|
41305
41338
|
children: [/* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41306
41339
|
className: D3.field,
|
|
41307
41340
|
children: [
|
|
41308
41341
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41309
|
-
className:
|
|
41342
|
+
className: _8.fieldLabel,
|
|
41310
41343
|
children: "Timezone"
|
|
41311
41344
|
}),
|
|
41312
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41345
|
+
/* @__PURE__ */ (0, A.jsx)(T6, {
|
|
41313
41346
|
value: e,
|
|
41314
41347
|
now: n,
|
|
41315
41348
|
onChange: r
|
|
41316
41349
|
}),
|
|
41317
41350
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41318
|
-
className:
|
|
41351
|
+
className: _8.fieldHint,
|
|
41319
41352
|
children: "Preview only — set your saved timezone in Profile"
|
|
41320
41353
|
})
|
|
41321
41354
|
]
|
|
@@ -41323,25 +41356,25 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41323
41356
|
className: D3.field,
|
|
41324
41357
|
children: [
|
|
41325
41358
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41326
|
-
className:
|
|
41359
|
+
className: _8.fieldLabel,
|
|
41327
41360
|
children: "Home Branch"
|
|
41328
41361
|
}),
|
|
41329
41362
|
/* @__PURE__ */ (0, A.jsx)("div", {
|
|
41330
|
-
className:
|
|
41363
|
+
className: _8.readonlyField,
|
|
41331
41364
|
children: t
|
|
41332
41365
|
}),
|
|
41333
41366
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41334
|
-
className:
|
|
41367
|
+
className: _8.fieldHint,
|
|
41335
41368
|
children: "Assigned from your UAPP account"
|
|
41336
41369
|
})
|
|
41337
41370
|
]
|
|
41338
41371
|
})]
|
|
41339
|
-
}),
|
|
41340
|
-
className:
|
|
41372
|
+
}), S8 = ({ isOverride: e, branchName: t, onReset: n }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41373
|
+
className: _8.inheritedBanner,
|
|
41341
41374
|
children: e ? /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41342
|
-
className:
|
|
41375
|
+
className: _8.customBadge,
|
|
41343
41376
|
children: [/* @__PURE__ */ (0, A.jsxs)("span", {
|
|
41344
|
-
className:
|
|
41377
|
+
className: _8.customBadgeText,
|
|
41345
41378
|
children: [
|
|
41346
41379
|
"Customized Working Hours (overrides ",
|
|
41347
41380
|
t,
|
|
@@ -41349,52 +41382,52 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41349
41382
|
]
|
|
41350
41383
|
}), /* @__PURE__ */ (0, A.jsxs)("button", {
|
|
41351
41384
|
type: "button",
|
|
41352
|
-
className:
|
|
41385
|
+
className: _8.resetToBranchBtn,
|
|
41353
41386
|
onClick: n,
|
|
41354
41387
|
children: [/* @__PURE__ */ (0, A.jsx)(Ci, { size: 13 }), " Use Branch Defaults"]
|
|
41355
41388
|
})]
|
|
41356
41389
|
}) : /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41357
|
-
className:
|
|
41390
|
+
className: _8.inheritedBadge,
|
|
41358
41391
|
children: [/* @__PURE__ */ (0, A.jsxs)("span", { children: ["Inheriting default hours from ", /* @__PURE__ */ (0, A.jsx)("strong", { children: t })] }), /* @__PURE__ */ (0, A.jsx)("span", {
|
|
41359
|
-
className:
|
|
41392
|
+
className: _8.badgeSub,
|
|
41360
41393
|
children: "Modifying the hours below will create a personal override."
|
|
41361
41394
|
})]
|
|
41362
41395
|
})
|
|
41363
|
-
}),
|
|
41364
|
-
className:
|
|
41396
|
+
}), C8 = ({ statusText: e, disabled: t, onClick: n }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41397
|
+
className: _8.formFooter,
|
|
41365
41398
|
children: [/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41366
|
-
className:
|
|
41399
|
+
className: _8.formStatus,
|
|
41367
41400
|
children: e
|
|
41368
41401
|
}), /* @__PURE__ */ (0, A.jsx)("button", {
|
|
41369
41402
|
type: "button",
|
|
41370
|
-
className:
|
|
41403
|
+
className: _8.saveBtn,
|
|
41371
41404
|
disabled: t,
|
|
41372
41405
|
onClick: n,
|
|
41373
41406
|
children: "Save changes"
|
|
41374
41407
|
})]
|
|
41375
|
-
}),
|
|
41376
|
-
let { clock: i } = MN(), a =
|
|
41408
|
+
}), w8 = (e, t) => e ? "Unsaved changes" : t ? "Saved" : "", T8 = ({ initial: e, isOverride: t, branchName: n, prefs: r }) => {
|
|
41409
|
+
let { clock: i } = MN(), a = g8(e, r, i), o = w8(a.dirty, a.isSuccess);
|
|
41377
41410
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41378
|
-
className:
|
|
41411
|
+
className: _8.hours,
|
|
41379
41412
|
children: [
|
|
41380
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41413
|
+
/* @__PURE__ */ (0, A.jsx)(x8, {
|
|
41381
41414
|
timezone: a.timezone,
|
|
41382
41415
|
branchName: n,
|
|
41383
41416
|
now: a.now,
|
|
41384
41417
|
onTimezoneChange: a.changeTimezone
|
|
41385
41418
|
}),
|
|
41386
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41419
|
+
/* @__PURE__ */ (0, A.jsx)(y8, {
|
|
41387
41420
|
meetingDuration: a.meetingDuration,
|
|
41388
41421
|
bufferMinutes: a.bufferMinutes,
|
|
41389
41422
|
onDurationChange: a.setMeetingDuration,
|
|
41390
41423
|
onBufferChange: a.setBufferMinutes
|
|
41391
41424
|
}),
|
|
41392
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41425
|
+
/* @__PURE__ */ (0, A.jsx)(S8, {
|
|
41393
41426
|
isOverride: t,
|
|
41394
41427
|
branchName: n,
|
|
41395
41428
|
onReset: a.reset
|
|
41396
41429
|
}),
|
|
41397
|
-
$D.map((e) => /* @__PURE__ */ (0, A.jsx)(
|
|
41430
|
+
$D.map((e) => /* @__PURE__ */ (0, A.jsx)(b8, {
|
|
41398
41431
|
day: e,
|
|
41399
41432
|
value: a.draft[e.id],
|
|
41400
41433
|
onChange: (t) => {
|
|
@@ -41406,14 +41439,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41406
41439
|
title: "Could not save",
|
|
41407
41440
|
children: a.errorMsg
|
|
41408
41441
|
}),
|
|
41409
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41442
|
+
/* @__PURE__ */ (0, A.jsx)(C8, {
|
|
41410
41443
|
statusText: o,
|
|
41411
41444
|
disabled: !a.dirty || a.isSaving,
|
|
41412
41445
|
onClick: a.onSave
|
|
41413
41446
|
})
|
|
41414
41447
|
]
|
|
41415
41448
|
});
|
|
41416
|
-
},
|
|
41449
|
+
}, E8 = (e, t, n) => e?.message ?? t?.message ?? n?.message ?? "Unknown error", D8 = (e, t) => e?.branches.find((e) => e.id === t)?.name ?? "your branch", O8 = () => {
|
|
41417
41450
|
let e = RN(), t = vR(), n = WN();
|
|
41418
41451
|
if (e.isPending || t.isPending || n.isPending) return /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41419
41452
|
className: D3.center,
|
|
@@ -41422,23 +41455,23 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41422
41455
|
if (e.isError || t.isError || n.isError) return /* @__PURE__ */ (0, A.jsx)(Bi, {
|
|
41423
41456
|
tone: "error",
|
|
41424
41457
|
title: "Could not load working hours",
|
|
41425
|
-
children:
|
|
41458
|
+
children: E8(e.error, t.error, n.error)
|
|
41426
41459
|
});
|
|
41427
|
-
let r =
|
|
41428
|
-
return /* @__PURE__ */ (0, A.jsx)(
|
|
41460
|
+
let r = D8(t.data, n.data.branchId);
|
|
41461
|
+
return /* @__PURE__ */ (0, A.jsx)(T8, {
|
|
41429
41462
|
initial: e.data.weekly,
|
|
41430
41463
|
isOverride: e.data.isOverride,
|
|
41431
41464
|
branchName: r,
|
|
41432
41465
|
prefs: n.data
|
|
41433
41466
|
}, `${String(e.data.isOverride)}:${e.data.source}`);
|
|
41434
|
-
},
|
|
41467
|
+
}, k8 = {
|
|
41435
41468
|
workStart: "09:00",
|
|
41436
41469
|
workEnd: "17:00",
|
|
41437
41470
|
branchId: "uk"
|
|
41438
|
-
},
|
|
41471
|
+
}, A8 = (e, t) => e === "day" ? $D.slice(t, t + 1) : e === "workweek" ? $D.slice(0, 5) : $D, j8 = (e) => {
|
|
41439
41472
|
let [t] = e.split(":");
|
|
41440
41473
|
return Number(t ?? "0");
|
|
41441
|
-
},
|
|
41474
|
+
}, M8 = (e, t, n) => {
|
|
41442
41475
|
if (e !== null) return e;
|
|
41443
41476
|
if (t) {
|
|
41444
41477
|
let e = LI(t, n), r = {};
|
|
@@ -41465,82 +41498,82 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41465
41498
|
}]
|
|
41466
41499
|
};
|
|
41467
41500
|
return r;
|
|
41468
|
-
},
|
|
41469
|
-
let t = Object.values(e).filter((e) => e.active).flatMap((e) => e.slots), n = t.length > 0 ? Math.min(...t.map((e) =>
|
|
41501
|
+
}, N8 = (e, t, n, r) => t !== "" && t !== n ? b6(e, t, n, r) : e, P8 = (e) => {
|
|
41502
|
+
let t = Object.values(e).filter((e) => e.active).flatMap((e) => e.slots), n = t.length > 0 ? Math.min(...t.map((e) => j8(e.from))) : 9, r = t.length > 0 ? Math.max(...t.map((e) => j8(e.to))) : 17;
|
|
41470
41503
|
return {
|
|
41471
41504
|
workStart: `${String(Math.max(0, n)).padStart(2, "0")}:00`,
|
|
41472
41505
|
workEnd: `${String(Math.min(24, r)).padStart(2, "0")}:00`
|
|
41473
41506
|
};
|
|
41474
|
-
},
|
|
41475
|
-
let
|
|
41507
|
+
}, F8 = (e, t) => C(() => {
|
|
41508
|
+
let n = e ?? [], r = qN();
|
|
41509
|
+
if (t === r) return n;
|
|
41510
|
+
let i = (e) => {
|
|
41511
|
+
let n = new Date(e), i = YN(t, n) - YN(r, n);
|
|
41512
|
+
return i === 0 ? e : new Date(n.getTime() + i * 6e4).toISOString();
|
|
41513
|
+
};
|
|
41514
|
+
return n.map((e) => new qO({
|
|
41515
|
+
id: e.id,
|
|
41516
|
+
userId: e.userId,
|
|
41517
|
+
title: e.title,
|
|
41518
|
+
status: e.status,
|
|
41519
|
+
start: i(e.start),
|
|
41520
|
+
end: i(e.end),
|
|
41521
|
+
allDay: e.allDay,
|
|
41522
|
+
notes: e.notes,
|
|
41523
|
+
recurrence: e.recurrence
|
|
41524
|
+
}));
|
|
41525
|
+
}, [e, t]), I8 = (e) => {
|
|
41526
|
+
let t = BN(), n = LN().data ?? null, r = WN().data, i = r ?? k8, a = vR(), o = /* @__PURE__ */ new Date(), s = YN(e.timezone, o) - YN(qN(), o), c = new Date(o.getTime() + s * 6e4), l = e.view === "month" || e.view === "agenda", u = (t) => e.active.has(t.block.status), d = i.branchId, f = N8(C(() => M8(n, a.data, d), [
|
|
41476
41527
|
n,
|
|
41477
41528
|
a.data,
|
|
41478
41529
|
d
|
|
41479
|
-
]), r?.availabilityTimezone ?? "", e.timezone, o), { workStart: p, workEnd: m } =
|
|
41480
|
-
|
|
41481
|
-
if (h === t) return e;
|
|
41482
|
-
let n = (e) => {
|
|
41483
|
-
let n = new Date(e), r = YN(h, n) - YN(t, n);
|
|
41484
|
-
return r === 0 ? e : new Date(n.getTime() + r * 6e4).toISOString();
|
|
41485
|
-
};
|
|
41486
|
-
return e.map((e) => new qO({
|
|
41487
|
-
id: e.id,
|
|
41488
|
-
userId: e.userId,
|
|
41489
|
-
title: e.title,
|
|
41490
|
-
status: e.status,
|
|
41491
|
-
start: n(e.start),
|
|
41492
|
-
end: n(e.end),
|
|
41493
|
-
allDay: e.allDay,
|
|
41494
|
-
notes: e.notes,
|
|
41495
|
-
recurrence: e.recurrence
|
|
41496
|
-
}));
|
|
41497
|
-
}, [g, h]), v = B4(c, e.weekOffset), y = ok(_, v), b = K4(c, e.monthOffset), x = ak(b[0] ?? c, b[b.length - 1] ?? c, _);
|
|
41498
|
-
return {
|
|
41530
|
+
]), r?.availabilityTimezone ?? "", e.timezone, o), { workStart: p, workEnd: m } = P8(f), h = e.timezone, g = F8(t.data, h), _ = (c.getDay() + 6) % 7, v = Math.floor((e.dayOffset + _) / 7), y = ((e.dayOffset + _) % 7 + 7) % 7, b = ok(g, B4(c, v)), x = K4(c, e.monthOffset), S = ak(x[0] ?? c, x[x.length - 1] ?? c, g), w = new Date(c);
|
|
41531
|
+
return w.setSeconds(0, 0), w.setMinutes(Math.ceil(w.getMinutes() / 30) * 30), {
|
|
41499
41532
|
query: t,
|
|
41500
41533
|
today: c,
|
|
41501
|
-
days:
|
|
41502
|
-
cells: V4(c,
|
|
41503
|
-
weekOccurrences:
|
|
41534
|
+
days: A8(e.view, y),
|
|
41535
|
+
cells: V4(c, v),
|
|
41536
|
+
weekOccurrences: b.filter(u),
|
|
41504
41537
|
availability: f,
|
|
41505
41538
|
workStart: p,
|
|
41506
41539
|
workEnd: m,
|
|
41507
|
-
range: r3(
|
|
41508
|
-
monthDates:
|
|
41540
|
+
range: r3(b, p, m),
|
|
41541
|
+
monthDates: x,
|
|
41509
41542
|
monthAnchor: W4(c, e.monthOffset),
|
|
41510
|
-
monthOccurrences:
|
|
41511
|
-
summary: l ?
|
|
41512
|
-
rangeText: l ? G4(c, e.monthOffset) : U4(c,
|
|
41513
|
-
defaultStart:
|
|
41514
|
-
};
|
|
41515
|
-
},
|
|
41516
|
-
className:
|
|
41517
|
-
children:
|
|
41543
|
+
monthOccurrences: S.filter(u),
|
|
41544
|
+
summary: l ? S : b,
|
|
41545
|
+
rangeText: l ? G4(c, e.monthOffset) : U4(c, v),
|
|
41546
|
+
defaultStart: w.toISOString()
|
|
41547
|
+
};
|
|
41548
|
+
}, L8 = ({ view: e, onView: t }) => /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41549
|
+
className: u8.viewChips,
|
|
41550
|
+
children: a8.map((n) => {
|
|
41518
41551
|
let r = e === n.id;
|
|
41519
41552
|
return /* @__PURE__ */ (0, A.jsxs)("button", {
|
|
41520
41553
|
type: "button",
|
|
41521
|
-
className: O(
|
|
41554
|
+
className: O(u8.viewChip, r && u8.viewChipActive),
|
|
41522
41555
|
onClick: () => {
|
|
41523
41556
|
t(n.id);
|
|
41524
41557
|
},
|
|
41525
41558
|
children: [r && /* @__PURE__ */ (0, A.jsx)(M.span, {
|
|
41526
41559
|
layoutId: "schedViewBg",
|
|
41527
|
-
className:
|
|
41560
|
+
className: u8.viewChipBg,
|
|
41528
41561
|
transition: {
|
|
41529
41562
|
type: "spring",
|
|
41530
41563
|
stiffness: 420,
|
|
41531
41564
|
damping: 34
|
|
41532
41565
|
}
|
|
41533
41566
|
}), /* @__PURE__ */ (0, A.jsx)("span", {
|
|
41534
|
-
className:
|
|
41567
|
+
className: u8.viewChipLabel,
|
|
41535
41568
|
children: n.label
|
|
41536
41569
|
})]
|
|
41537
41570
|
}, n.id);
|
|
41538
41571
|
})
|
|
41539
|
-
}),
|
|
41540
|
-
className:
|
|
41572
|
+
}), R8 = ({ view: e, onView: t, rangeText: n, showNav: r, onPrev: i, onNext: a, onToday: o, onNew: s, timezone: c, setTimezone: l, todayDate: u, onToggleSidebar: d, isSidebarOpen: f }) => /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41573
|
+
className: u8.toolbar,
|
|
41541
41574
|
children: [
|
|
41542
41575
|
/* @__PURE__ */ (0, A.jsx)("select", {
|
|
41543
|
-
className:
|
|
41576
|
+
className: u8.scheduleSelect,
|
|
41544
41577
|
"aria-label": "Calendar",
|
|
41545
41578
|
defaultValue: "my",
|
|
41546
41579
|
children: /* @__PURE__ */ (0, A.jsx)("option", {
|
|
@@ -41548,55 +41581,55 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41548
41581
|
children: "My Schedule"
|
|
41549
41582
|
})
|
|
41550
41583
|
}),
|
|
41551
|
-
e !== "hours" && /* @__PURE__ */ (0, A.jsx)(
|
|
41584
|
+
e !== "hours" && /* @__PURE__ */ (0, A.jsx)(T6, {
|
|
41552
41585
|
value: c,
|
|
41553
41586
|
onChange: l,
|
|
41554
41587
|
now: u
|
|
41555
41588
|
}),
|
|
41556
41589
|
r && /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41557
|
-
className:
|
|
41590
|
+
className: u8.weekNav,
|
|
41558
41591
|
children: [
|
|
41559
41592
|
/* @__PURE__ */ (0, A.jsx)("button", {
|
|
41560
41593
|
type: "button",
|
|
41561
|
-
className:
|
|
41594
|
+
className: u8.todayBtn,
|
|
41562
41595
|
onClick: o,
|
|
41563
41596
|
children: "Today"
|
|
41564
41597
|
}),
|
|
41565
41598
|
/* @__PURE__ */ (0, A.jsx)("button", {
|
|
41566
41599
|
type: "button",
|
|
41567
|
-
className:
|
|
41600
|
+
className: u8.navBtn,
|
|
41568
41601
|
"aria-label": "Previous week",
|
|
41569
41602
|
onClick: i,
|
|
41570
41603
|
children: /* @__PURE__ */ (0, A.jsx)(pr, { size: 16 })
|
|
41571
41604
|
}),
|
|
41572
41605
|
/* @__PURE__ */ (0, A.jsx)("button", {
|
|
41573
41606
|
type: "button",
|
|
41574
|
-
className:
|
|
41607
|
+
className: u8.navBtn,
|
|
41575
41608
|
"aria-label": "Next week",
|
|
41576
41609
|
onClick: a,
|
|
41577
41610
|
children: /* @__PURE__ */ (0, A.jsx)(mr, { size: 16 })
|
|
41578
41611
|
}),
|
|
41579
41612
|
/* @__PURE__ */ (0, A.jsx)("span", {
|
|
41580
|
-
className:
|
|
41613
|
+
className: u8.dateLabel,
|
|
41581
41614
|
children: n
|
|
41582
41615
|
})
|
|
41583
41616
|
]
|
|
41584
41617
|
}),
|
|
41585
41618
|
e !== "hours" && d !== void 0 && /* @__PURE__ */ (0, A.jsx)("button", {
|
|
41586
41619
|
type: "button",
|
|
41587
|
-
className: O(
|
|
41620
|
+
className: O(u8.sidebarToggleBtn, f && u8.sidebarToggleBtnActive),
|
|
41588
41621
|
"aria-label": "Schedule settings",
|
|
41589
41622
|
title: "Schedule settings",
|
|
41590
41623
|
onClick: d,
|
|
41591
41624
|
children: /* @__PURE__ */ (0, A.jsx)(pi, { size: 15 })
|
|
41592
41625
|
}),
|
|
41593
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41626
|
+
/* @__PURE__ */ (0, A.jsx)(L8, {
|
|
41594
41627
|
view: e,
|
|
41595
41628
|
onView: t
|
|
41596
41629
|
}),
|
|
41597
41630
|
/* @__PURE__ */ (0, A.jsxs)("button", {
|
|
41598
41631
|
type: "button",
|
|
41599
|
-
className:
|
|
41632
|
+
className: u8.newBtn,
|
|
41600
41633
|
onClick: s,
|
|
41601
41634
|
children: [/* @__PURE__ */ (0, A.jsx)(ei, {
|
|
41602
41635
|
size: 14,
|
|
@@ -41604,14 +41637,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41604
41637
|
}), " New"]
|
|
41605
41638
|
})
|
|
41606
41639
|
]
|
|
41607
|
-
}),
|
|
41608
|
-
let [e, t] = T(!1), n =
|
|
41640
|
+
}), z8 = () => {
|
|
41641
|
+
let [e, t] = T(!1), n = l8(), r = I8(n), i = () => {
|
|
41609
41642
|
n.openCreate(r.defaultStart);
|
|
41610
41643
|
};
|
|
41611
41644
|
return /* @__PURE__ */ (0, A.jsxs)("div", {
|
|
41612
|
-
className:
|
|
41645
|
+
className: u8.scheduleRoot,
|
|
41613
41646
|
children: [
|
|
41614
|
-
/* @__PURE__ */ (0, A.jsx)(
|
|
41647
|
+
/* @__PURE__ */ (0, A.jsx)(R8, {
|
|
41615
41648
|
view: n.view,
|
|
41616
41649
|
onView: n.setView,
|
|
41617
41650
|
rangeText: r.rangeText,
|
|
@@ -41629,9 +41662,9 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41629
41662
|
isSidebarOpen: e
|
|
41630
41663
|
}),
|
|
41631
41664
|
n.view === "hours" ? /* @__PURE__ */ (0, A.jsx)("div", {
|
|
41632
|
-
className:
|
|
41633
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
41634
|
-
}) : /* @__PURE__ */ (0, A.jsx)(
|
|
41665
|
+
className: u8.hoursArea,
|
|
41666
|
+
children: /* @__PURE__ */ (0, A.jsx)(O8, {})
|
|
41667
|
+
}) : /* @__PURE__ */ (0, A.jsx)(f8, {
|
|
41635
41668
|
query: r.query,
|
|
41636
41669
|
view: n.view,
|
|
41637
41670
|
today: r.today,
|
|
@@ -41657,19 +41690,19 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41657
41690
|
t(!1);
|
|
41658
41691
|
}
|
|
41659
41692
|
}),
|
|
41660
|
-
n.editor !== null && /* @__PURE__ */ (0, A.jsx)(
|
|
41693
|
+
n.editor !== null && /* @__PURE__ */ (0, A.jsx)(_6, {
|
|
41661
41694
|
state: n.editor,
|
|
41662
41695
|
timezone: n.timezone,
|
|
41663
41696
|
onClose: n.closeEditor
|
|
41664
41697
|
})
|
|
41665
41698
|
]
|
|
41666
41699
|
});
|
|
41667
|
-
},
|
|
41700
|
+
}, B8 = () => {
|
|
41668
41701
|
YQ("uapp-schedule", () => /* @__PURE__ */ (0, A.jsx)(T0, {
|
|
41669
41702
|
path: "/comms/schedule",
|
|
41670
|
-
children: /* @__PURE__ */ (0, A.jsx)(
|
|
41703
|
+
children: /* @__PURE__ */ (0, A.jsx)(z8, {})
|
|
41671
41704
|
}));
|
|
41672
|
-
},
|
|
41705
|
+
}, V8 = "/api/app/notification", H8 = (e) => {
|
|
41673
41706
|
let t = bX.safeParse(e);
|
|
41674
41707
|
if (!t.success) return null;
|
|
41675
41708
|
let { id: n, kind: r, actor: i, message: a, detail: o, time: s, postId: c } = t.data;
|
|
@@ -41682,7 +41715,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41682
41715
|
...o == null ? {} : { detail: o },
|
|
41683
41716
|
...c == null ? {} : { postId: c }
|
|
41684
41717
|
};
|
|
41685
|
-
},
|
|
41718
|
+
}, U8 = (e) => async () => {
|
|
41686
41719
|
let t = e.read();
|
|
41687
41720
|
if (t.accessToken !== void 0 && e.clock.now().getTime() < t.expiresAt - 6e4) return t.accessToken;
|
|
41688
41721
|
let n = await e.getAssertion(), r = await e.exchange(n);
|
|
@@ -41694,17 +41727,17 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41694
41727
|
accessToken: r.value.accessToken,
|
|
41695
41728
|
expiresAt: r.value.expiresAt.getTime()
|
|
41696
41729
|
}), r.value.accessToken;
|
|
41697
|
-
},
|
|
41730
|
+
}, W8 = async (e, t) => {
|
|
41698
41731
|
try {
|
|
41699
|
-
let t = await e.get(
|
|
41700
|
-
return (Array.isArray(t) ? t : []).map(
|
|
41732
|
+
let t = await e.get(V8);
|
|
41733
|
+
return (Array.isArray(t) ? t : []).map(H8).filter((e) => e !== null);
|
|
41701
41734
|
} catch (e) {
|
|
41702
41735
|
return t.error("Could not load unread notifications", e), [];
|
|
41703
41736
|
}
|
|
41704
|
-
},
|
|
41737
|
+
}, G8 = (e, t, n) => new Kq({ logger: t }).create({
|
|
41705
41738
|
url: `${e}/signalr/notifications`,
|
|
41706
41739
|
accessTokenProvider: n
|
|
41707
|
-
}),
|
|
41740
|
+
}), K8 = (e) => {
|
|
41708
41741
|
let t = e.logger ?? new Ek("info"), n = new KN(), r = e.modules ?? ["commhub.feed"], i, a = 0, o = null, s = null, c = [], l = new Ck(new yk(new _k({
|
|
41709
41742
|
logger: t,
|
|
41710
41743
|
baseUrl: e.apiBaseUrl,
|
|
@@ -41718,7 +41751,7 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41718
41751
|
logger: t,
|
|
41719
41752
|
clientKey: e.clientKey,
|
|
41720
41753
|
modules: r
|
|
41721
|
-
}), d =
|
|
41754
|
+
}), d = U8({
|
|
41722
41755
|
getAssertion: e.getAssertion,
|
|
41723
41756
|
exchange: (e) => u.exchangeSsoSecret(e),
|
|
41724
41757
|
clock: n,
|
|
@@ -41733,8 +41766,8 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41733
41766
|
});
|
|
41734
41767
|
return {
|
|
41735
41768
|
start: async () => {
|
|
41736
|
-
o === null && await d() !== void 0 && (c = await
|
|
41737
|
-
let r =
|
|
41769
|
+
o === null && await d() !== void 0 && (c = await W8(l, t), c.forEach(e.onNotification), o = G8(e.apiBaseUrl, t, () => i), s = o.on(yX.ReceiveNotification, (n) => {
|
|
41770
|
+
let r = H8(n);
|
|
41738
41771
|
if (r === null) {
|
|
41739
41772
|
t.error("Discarded a malformed notification payload", { rawPayload: n });
|
|
41740
41773
|
return;
|
|
@@ -41746,14 +41779,14 @@ var G$ = (e) => e.split(/[\s_-]+/).filter((e) => e.length > 0).map((e) => e.char
|
|
|
41746
41779
|
s?.(), s = null, await o?.stop(), o = null;
|
|
41747
41780
|
},
|
|
41748
41781
|
markAsRead: async (e) => {
|
|
41749
|
-
await d() !== void 0 && (await l.post(`${
|
|
41782
|
+
await d() !== void 0 && (await l.post(`${V8}/${e}/mark-as-read`, {}), c = c.filter((t) => t.id !== e));
|
|
41750
41783
|
},
|
|
41751
41784
|
unread: () => c
|
|
41752
41785
|
};
|
|
41753
|
-
},
|
|
41754
|
-
XQ(), E0(), z4(),
|
|
41786
|
+
}, q8 = () => {
|
|
41787
|
+
XQ(), E0(), z4(), B8();
|
|
41755
41788
|
};
|
|
41756
41789
|
//#endregion
|
|
41757
|
-
export { zQ as CommsProvider, yK as SDK_MODULE_SCOPES, BQ as WidgetRoot,
|
|
41790
|
+
export { zQ as CommsProvider, yK as SDK_MODULE_SCOPES, BQ as WidgetRoot, K8 as createNotificationClient, q8 as defineCustomElements, z4 as registerBookingsWidget, XQ as registerChatWidget, E0 as registerFeedWidget, B8 as registerScheduleWidget };
|
|
41758
41791
|
|
|
41759
41792
|
//# sourceMappingURL=communication-sdk.js.map
|