your-ai-workflow-firebase-os 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessNotice-BZ5Gt1nP.js +40 -0
- package/dist/AccessNotice-CN7kc70o.cjs +1 -0
- package/dist/{AddressField-B2YBRXcx.js → AddressField-9Sqn8TvC.js} +3 -3
- package/dist/{AddressField-BBv8NGX8.cjs → AddressField-B7wtV8yA.cjs} +1 -1
- package/dist/Assets-DBMwZ3bN.cjs +1 -0
- package/dist/Assets-DT-NU_WO.js +296 -0
- package/dist/Attachments-Bl9_dfsu.js +46 -0
- package/dist/Attachments-UVK9SRXf.cjs +1 -0
- package/dist/Billing-0RIHayHy.cjs +1 -0
- package/dist/Billing-FNE2r3_d.js +379 -0
- package/dist/BookingCalendar-BP5kiv3d.cjs +1 -0
- package/dist/BookingCalendar-DZ2fEFja.js +309 -0
- package/dist/Button-4lzOE31p.js +48 -0
- package/dist/Button-5DlB2MCi.cjs +1 -0
- package/dist/CalendarView-BimoXy_k.cjs +1 -0
- package/dist/CalendarView-D-ykjpvI.js +664 -0
- package/dist/ConfirmModal-Di9GR-vV.cjs +1 -0
- package/dist/ConfirmModal-gKQEpd4d.js +113 -0
- package/dist/ContactPopup-BXnHrRwl.js +1114 -0
- package/dist/ContactPopup-lxmRMoIa.cjs +1 -0
- package/dist/CopyLink-BpEQWmfI.cjs +1 -0
- package/dist/CopyLink-CBAVfcm1.js +43 -0
- package/dist/DashboardNav-CXa_ci-_.cjs +1 -0
- package/dist/DashboardNav-Dmn7PVSp.js +886 -0
- package/dist/EmailAdmin-CjN_rvxT.js +318 -0
- package/dist/EmailAdmin-lAEBdY1s.cjs +1 -0
- package/dist/EventCard-46EquygT.cjs +1 -0
- package/dist/EventCard-B6xD-mk3.js +97 -0
- package/dist/FileViewerPopup-CX-J75TM.js +1283 -0
- package/dist/FileViewerPopup-D8-MmIoS.cjs +3 -0
- package/dist/FormNote-BivRNA3J.js +50 -0
- package/dist/FormNote-BtdTGpml.cjs +1 -0
- package/dist/FormsAdmin-B5PBCG2W.js +812 -0
- package/dist/FormsAdmin-BQCULvi5.cjs +1 -0
- package/dist/Inbox-BPk2ZkE5.js +779 -0
- package/dist/Inbox-DNrcBx0o.cjs +3 -0
- package/dist/Loader-Bu89fsbB.cjs +1 -0
- package/dist/Loader-D4gwgBOq.js +32 -0
- package/dist/ManagePlanButton-B0dwqZBd.cjs +1 -0
- package/dist/ManagePlanButton-BSrOHYze.js +29 -0
- package/dist/MyBookings-6qr0GgzO.cjs +1 -0
- package/dist/MyBookings-BQjGM2LQ.js +113 -0
- package/dist/PageTitle-CZhgmmDT.cjs +3 -0
- package/dist/PageTitle-D93YCiN8.js +1606 -0
- package/dist/PagesAdmin-BcHIcqM5.cjs +34 -0
- package/dist/PagesAdmin-D69P9nRb.js +5802 -0
- package/dist/PagesAdmin-DNwZOKjA.cjs +1 -0
- package/dist/PagesAdmin-HUITEcHx.js +3 -0
- package/dist/PaymentsAdmin-C2iCI9qC.js +1291 -0
- package/dist/PaymentsAdmin-CoXi2vCm.cjs +2 -0
- package/dist/{PhoneInputField-B3P_vUDW.cjs → PhoneInputField-BEwYZMB7.cjs} +1 -1
- package/dist/{PhoneInputField-D3wWs-M8.js → PhoneInputField-BG0L2djE.js} +2 -2
- package/dist/PhoneInputField-DfOtCIH_.js +2 -0
- package/dist/{PhoneInputField-CdNTvWXQ.cjs → PhoneInputField-jhWvto8C.cjs} +1 -1
- package/dist/Popup-DHYGFl2-.cjs +1 -0
- package/dist/Popup-xROLytgr.js +142 -0
- package/dist/ProviderMark-BBfaM5Yl.js +52 -0
- package/dist/ProviderMark-xLkUN3Fx.cjs +1 -0
- package/dist/PublishApp-Bm-6r3Td.js +595 -0
- package/dist/PublishApp-D4XJUkJa.cjs +2 -0
- package/dist/Said-CoC15awL.js +94 -0
- package/dist/Said-IqCNofdh.cjs +1 -0
- package/dist/ScheduleAdmin-BKfQkrR8.js +1853 -0
- package/dist/ScheduleAdmin-DwK36GAZ.cjs +1 -0
- package/dist/SchedulePicker--urIH2Eb.js +112 -0
- package/dist/SchedulePicker-nmqzUnUH.cjs +1 -0
- package/dist/Setup-CHLgd-ag.js +849 -0
- package/dist/Setup-CaDranTm.cjs +1374 -0
- package/dist/SetupPayments-CVIwh1eQ.js +411 -0
- package/dist/SetupPayments-HNXWA25X.cjs +1 -0
- package/dist/SignInAdmin-C94-A-0w.cjs +4 -0
- package/dist/SignInAdmin-Yxgv_8U4.js +766 -0
- package/dist/SupportBar-CDT0HwdP.cjs +1 -0
- package/dist/SupportBar-CN_JGC-9.js +117 -0
- package/dist/SystemTabContent-L3vGGF3P.cjs +1 -0
- package/dist/SystemTabContent-QdxxLILE.js +35 -0
- package/dist/TemplateDrive-DV8zNjYe.cjs +1 -0
- package/dist/TemplateDrive-NJY_AAvV.js +1197 -0
- package/dist/ThemeAdmin-BzFjJkLg.js +269 -0
- package/dist/ThemeAdmin-DVnPNxe7.cjs +1 -0
- package/dist/ThemeAdmin-DY7Vc4Sj.cjs +3 -0
- package/dist/ThemeAdmin-DnC-D2N3.js +2 -0
- package/dist/{ContactPopup-Dsg2ntq3.js → TimeZoneField-DkI1Bkcz.js} +3191 -5322
- package/dist/TimeZoneField-qs7NPR30.cjs +12 -0
- package/dist/TransactionsAdmin-BsZ-oQWi.js +582 -0
- package/dist/TransactionsAdmin-CTSTiPld.cjs +1 -0
- package/dist/Trouble-9es_AI4F.cjs +1 -0
- package/dist/Trouble-oWt9fMsm.js +164 -0
- package/dist/Users-CTitWXyd.cjs +1 -0
- package/dist/Users-DJjQTWJF.js +1207 -0
- package/dist/aiModels-DIP9fn8T.cjs +1 -0
- package/dist/{aiModels-BHlEfuRJ.js → aiModels-DnDhNGup.js} +29 -61
- package/dist/arrivalRoads-BJ-35vkk.js +228 -0
- package/dist/arrivalRoads-qoU-B4jt.cjs +4 -0
- package/dist/{bake-BWG3y-15.cjs → bake-n2wyFw0B.cjs} +1 -1
- package/dist/{bake-BtYOG1Du.js → bake-naZeMu98.js} +1 -1
- package/dist/bookingPages-C7a3srPG.js +102 -0
- package/dist/bookingPages-DvbFbD9X.cjs +1 -0
- package/dist/components/CustomSelect.d.ts +7 -1
- package/dist/components/RegistrationFields.d.ts +6 -1
- package/dist/components/Reveal.d.ts +12 -0
- package/dist/components/ScrollToTop.d.ts +4 -0
- package/dist/contentFallback-C9MZjdq7.cjs +1 -0
- package/dist/contentFallback-CEDY0Pwp.js +96 -0
- package/dist/contentKey-Bwry4lDa.js +13 -0
- package/dist/contentKey-DJGYYnAE.cjs +1 -0
- package/dist/email-BfnZnMwD.cjs +1 -0
- package/dist/email-Ddj8Dlu6.js +58 -0
- package/dist/{fileBytes-BdwaFKRy.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
- package/dist/{fileBytes-DuW2K-H_.js → fileBytes-bjgvCfWu.js} +2 -2
- package/dist/forms-Bvx9HTM6.js +75 -0
- package/dist/forms-CmNeTETW.cjs +1 -0
- package/dist/lib/ThemeContext.d.ts +0 -14
- package/dist/lib/bareImgWatch.d.ts +6 -1
- package/dist/lib/localEdits.d.ts +2 -0
- package/dist/lib/paymentProducts.d.ts +8 -0
- package/dist/lib/payments.d.ts +11 -1
- package/dist/notices-B7iIrIEg.js +29 -0
- package/dist/notices-upMg8UVh.cjs +1 -0
- package/dist/openOnArrival-Buwqb86D.cjs +1 -0
- package/dist/openOnArrival-S2K6v-lB.js +35 -0
- package/dist/pageFiles--Ih60ITP.js +45 -0
- package/dist/pageFiles-UtBmlOcD.cjs +1 -0
- package/dist/pages/PagesAdmin.d.ts +69 -0
- package/dist/people-2jZE_pdI.js +102 -0
- package/dist/people-BpVvIr9-.cjs +1 -0
- package/dist/personName-CFw3pxuu.js +18 -0
- package/dist/personName-CbzN_i57.cjs +1 -0
- package/dist/publishSteps-C1cDFzzB.js +88 -0
- package/dist/publishSteps-SSm8afDw.cjs +1 -0
- package/dist/recordLock-DHVvI9bP.js +61 -0
- package/dist/recordLock-DWeIxiwh.cjs +1 -0
- package/dist/recordsKey-B7QrxdeU.cjs +1 -0
- package/dist/recordsKey-D5-wC0Aw.js +141 -0
- package/dist/registrationFields-CLeR2lQJ.js +181 -0
- package/dist/registrationFields-v4pOoRdn.cjs +1 -0
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/roles-D6VaHWfV.js +147 -0
- package/dist/roles-DQUFFBQe.cjs +1 -0
- package/dist/scheduleData-ATN8w5hI.js +727 -0
- package/dist/scheduleData-Cltj0ABZ.cjs +1 -0
- package/dist/server.cjs.js +6 -6
- package/dist/server.es.js +716 -715
- package/dist/serviceStatus-TQyZO_Y_.cjs +1 -0
- package/dist/serviceStatus-vS8AI7SZ.js +125 -0
- package/dist/tabAudience-BqpN6dsR.cjs +1 -0
- package/dist/tabAudience-CRyMvv0v.js +34 -0
- package/dist/transactions-BqMQDRx3.js +343 -0
- package/dist/transactions-CufFrdAM.cjs +1 -0
- package/dist/useIsPhone-BVGx_X3e.js +13 -0
- package/dist/useIsPhone-o63tNneA.cjs +1 -0
- package/dist/{validate-DzSJWuyL.js → validate-CmC_tLK-.js} +433 -351
- package/dist/validate-DZMwqSrb.cjs +103 -0
- package/dist/vite/validate.d.ts +14 -0
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/your-ai-workflow-firebase-os.cjs.js +15 -1431
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +8200 -32421
- package/package.json +1 -1
- package/src/index.css +122 -2
- package/dist/ContactPopup-IwBm-eqz.cjs +0 -12
- package/dist/PhoneInputField-CVamkTJg.js +0 -2
- package/dist/aiModels-BIhoTNH0.cjs +0 -1
- package/dist/validate-e48WXJdP.cjs +0 -103
- /package/dist/{address-DI1YaCI4.cjs → address-Bsb8COq2.cjs} +0 -0
- /package/dist/{address-Ca1h_UZX.js → address-C2bHNxJU.js} +0 -0
- /package/dist/{dist-BkUiTtIb.js → dist-DUPvBnOA.js} +0 -0
- /package/dist/{dist-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
- /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +0 -0
- /package/dist/{lucide-react-ehRy1vqS.js → lucide-react-CA7GD7Nv.js} +0 -0
- /package/dist/{mediaKind-dk396a03.cjs → mediaKind-D0MWyv6b.cjs} +0 -0
- /package/dist/{mediaKind-De2Cx_kB.js → mediaKind-DmKMsjeY.js} +0 -0
- /package/dist/{pdf-u73U7-6s.js → pdf-DRXcPGkr.js} +0 -0
- /package/dist/{pdf-B24jYmSf.cjs → pdf-jLjjhvjp.cjs} +0 -0
- /package/dist/{pdf.worker.min-BPOWx2_9.js → pdf.worker.min-CfKZezeM.js} +0 -0
- /package/dist/{pdf.worker.min-BvhEiZFe.cjs → pdf.worker.min-bLgNWd7w.cjs} +0 -0
- /package/dist/{verifiedAccount-C1iCxopN.js → verifiedAccount-DRbRFJ6H.js} +0 -0
- /package/dist/{verifiedAccount-D3OeaOBo.cjs → verifiedAccount-DScyKk96.cjs} +0 -0
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
import "./PageTitle-D93YCiN8.js";
|
|
2
|
+
import { K as e, Mn as t, Mt as n, Pt as r, Qt as i, Rn as a, Tn as o, V as s, Vn as c, Zt as l, _ as u, _n as d, b as f, cr as p, jn as m, o as h, sr as g, u as _, v, x as y, xn as b, zn as x } from "./TimeZoneField-DkI1Bkcz.js";
|
|
3
|
+
import { $ as S, C, G as w, Qt as T, an as E, dn as D, in as ee, o as O, sn as k, un as A } from "./lucide-react-CA7GD7Nv.js";
|
|
4
|
+
import { t as j } from "./Button-4lzOE31p.js";
|
|
5
|
+
import { a as M, i as N, o as P, r as F, s as te, t as I } from "./BookingCalendar-DZ2fEFja.js";
|
|
6
|
+
import { t as ne } from "./ConfirmModal-gKQEpd4d.js";
|
|
7
|
+
import { a as L, i as re, n as R, o as z, r as B, s as V, t as H } from "./EventCard-B6xD-mk3.js";
|
|
8
|
+
import { useEffect as U, useMemo as W, useRef as G, useState as K } from "react";
|
|
9
|
+
import { Fragment as ie, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/schedule/EventDetail.tsx
|
|
11
|
+
var ae = (e) => {
|
|
12
|
+
let t = e.replace(/_/g, " ").trim();
|
|
13
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
14
|
+
};
|
|
15
|
+
function oe(e, t) {
|
|
16
|
+
let n = e.memberName.trim();
|
|
17
|
+
if (e.partySize > 1) {
|
|
18
|
+
let n = `${e.partyAccepted} of ${e.partySize} have accepted.`;
|
|
19
|
+
return t ? `${n} Yours is still to come.` : n;
|
|
20
|
+
}
|
|
21
|
+
return t ? "This is waiting for you to accept." : n ? `Waiting for ${n} to accept.` : "Waiting to be accepted.";
|
|
22
|
+
}
|
|
23
|
+
function se(e) {
|
|
24
|
+
let t = e.memberName.trim();
|
|
25
|
+
return e.partySize > 1 ? e.partyAccepted > 0 ? `${e.partyAccepted} of ${e.partySize} have confirmed so far. You will hear once they all have.` : "Waiting to be confirmed. You will hear as soon as it is." : t ? `Waiting for ${t} to confirm. You will hear as soon as they do.` : "Waiting to be confirmed. You will hear as soon as it is.";
|
|
26
|
+
}
|
|
27
|
+
function ce({ open: e, onClose: t, children: n }) {
|
|
28
|
+
return U(() => {
|
|
29
|
+
if (!e) return;
|
|
30
|
+
let n = (e) => {
|
|
31
|
+
e.key === "Escape" && t();
|
|
32
|
+
};
|
|
33
|
+
return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
|
|
34
|
+
}, [e, t]), /* @__PURE__ */ q(p, { children: e && /* @__PURE__ */ J("div", {
|
|
35
|
+
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
36
|
+
children: [/* @__PURE__ */ q(g.div, {
|
|
37
|
+
onClick: t,
|
|
38
|
+
initial: { opacity: 0 },
|
|
39
|
+
animate: { opacity: 1 },
|
|
40
|
+
exit: { opacity: 0 },
|
|
41
|
+
className: "absolute inset-0 bg-background/80 backdrop-blur-xl cursor-pointer"
|
|
42
|
+
}), /* @__PURE__ */ q(g.div, {
|
|
43
|
+
role: "dialog",
|
|
44
|
+
"aria-modal": "true",
|
|
45
|
+
initial: {
|
|
46
|
+
opacity: 0,
|
|
47
|
+
scale: .95,
|
|
48
|
+
y: 10
|
|
49
|
+
},
|
|
50
|
+
animate: {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
scale: 1,
|
|
53
|
+
y: 0
|
|
54
|
+
},
|
|
55
|
+
exit: {
|
|
56
|
+
opacity: 0,
|
|
57
|
+
scale: .95,
|
|
58
|
+
y: 10
|
|
59
|
+
},
|
|
60
|
+
className: "w-full max-w-[420px] max-h-[85vh] overflow-y-auto styled-scrollbars-mini p-5 sm:p-6 rounded-3xl glass-popover border border-[var(--panel-border)] shadow-2xl relative z-10 text-left",
|
|
61
|
+
children: n
|
|
62
|
+
})]
|
|
63
|
+
}) });
|
|
64
|
+
}
|
|
65
|
+
function le({ color: e, title: t, line: r, cancelled: i, onClose: a }) {
|
|
66
|
+
return /* @__PURE__ */ J("div", {
|
|
67
|
+
className: "flex items-start gap-3 mb-4",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ q("span", {
|
|
70
|
+
"aria-hidden": !0,
|
|
71
|
+
className: `w-1 self-stretch rounded-full shrink-0 ${i ? "bg-foreground/15" : ""}`,
|
|
72
|
+
style: i ? void 0 : { background: n(e, 85) }
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ J("div", {
|
|
75
|
+
className: "flex-1 min-w-0",
|
|
76
|
+
children: [/* @__PURE__ */ J("div", {
|
|
77
|
+
className: "flex items-center gap-2 flex-wrap",
|
|
78
|
+
children: [/* @__PURE__ */ q("h3", {
|
|
79
|
+
className: `text-[17px] font-extrabold tracking-tight leading-tight break-words ${i ? "text-foreground/50 line-through" : "text-foreground"}`,
|
|
80
|
+
children: t
|
|
81
|
+
}), i && /* @__PURE__ */ q(H, {})]
|
|
82
|
+
}), /* @__PURE__ */ q("p", {
|
|
83
|
+
className: "text-[12.5px] font-medium text-foreground/50 leading-snug mt-0.5",
|
|
84
|
+
children: r
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ q("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: a,
|
|
90
|
+
"aria-label": "Close",
|
|
91
|
+
className: I,
|
|
92
|
+
children: /* @__PURE__ */ q(O, { className: "w-4 h-4" })
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function Y({ label: e, children: t }) {
|
|
98
|
+
return /* @__PURE__ */ J("div", {
|
|
99
|
+
className: "flex items-start justify-between gap-3 px-3.5 py-2.5",
|
|
100
|
+
children: [/* @__PURE__ */ q("span", {
|
|
101
|
+
className: "text-[12px] font-medium text-foreground/45 shrink-0",
|
|
102
|
+
children: e
|
|
103
|
+
}), /* @__PURE__ */ q("span", {
|
|
104
|
+
className: "text-[12.5px] font-semibold text-foreground/80 text-right break-words min-w-0",
|
|
105
|
+
children: t
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function X({ booking: e, zone: t, chip: n, me: i = "", side: s = "host", onClose: l, onColor: u, onAccept: d, onCancel: p, onDelete: m, onRelease: g }) {
|
|
110
|
+
let [_, y] = K(!1), [w, E] = K(!1), [D, ee] = K(""), [O, M] = K(!1), [N, P] = K(""), F = b(e, t), te = e.end < (/* @__PURE__ */ new Date()).toISOString(), I = !e.own && e.timeZone && e.timeZone !== t ? e.timeZone : "", L = Object.entries(e.answers).filter(([, e]) => e), B = s === "booker", H = !e.heldOnly && (L.length > 0 || !!I || !!n || !B && !e.own && (!!e.scheduleName || !!e.email || e.createdAt > 0)), U = e.heldOnly, W = !U && (e.own || e.cancelled || te), G = !B && !!i && e.memberId === i, X = V(e), de = !!X && G && !!d, fe = U ? "Free this held time" : e.own ? "Delete this event" : e.cancelled ? "Remove this cancelled booking" : te ? "Remove this booking" : X && G ? "Decline this booking" : "Cancel this booking", Z = U ? !!g : W && !!m, Q = !W && !U, $ = !!X && G && !W;
|
|
111
|
+
return /* @__PURE__ */ J(ie, { children: [/* @__PURE__ */ J(ce, {
|
|
112
|
+
open: !0,
|
|
113
|
+
onClose: l,
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ q(le, {
|
|
116
|
+
color: e.color,
|
|
117
|
+
title: z(e, s),
|
|
118
|
+
line: `${F.day} · ${F.time}`,
|
|
119
|
+
cancelled: e.cancelled,
|
|
120
|
+
onClose: l
|
|
121
|
+
}),
|
|
122
|
+
e.cancelled && /* @__PURE__ */ J("div", {
|
|
123
|
+
className: "mb-4 px-3.5 py-2.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.03] flex flex-col gap-1.5",
|
|
124
|
+
children: [/* @__PURE__ */ J("p", {
|
|
125
|
+
className: "text-[12.5px] font-medium text-foreground/70 leading-snug",
|
|
126
|
+
children: [ue(e), " The time is free again — it stays here so you have the record."]
|
|
127
|
+
}), !!e.cancelReason && /* @__PURE__ */ J("p", {
|
|
128
|
+
className: "text-[12.5px] font-semibold text-foreground/80 leading-snug border-l-2 border-[var(--panel-border)] pl-2.5",
|
|
129
|
+
children: [
|
|
130
|
+
"“",
|
|
131
|
+
e.cancelReason,
|
|
132
|
+
"”"
|
|
133
|
+
]
|
|
134
|
+
})]
|
|
135
|
+
}),
|
|
136
|
+
!!X && /* @__PURE__ */ J("div", {
|
|
137
|
+
className: "mb-4 px-3.5 py-3 rounded-2xl border border-amber-500/25 bg-amber-500/[0.07] flex flex-col gap-2.5",
|
|
138
|
+
children: [/* @__PURE__ */ J("div", {
|
|
139
|
+
className: "flex items-start gap-2.5",
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ q(T, {
|
|
142
|
+
className: "w-4 h-4 shrink-0 mt-[1px] text-amber-600 dark:text-amber-400",
|
|
143
|
+
"aria-hidden": !0
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ q("p", {
|
|
146
|
+
className: "text-[12.5px] font-semibold text-foreground/75 leading-snug flex-1 min-w-0",
|
|
147
|
+
children: B ? se(e) : oe(e, G)
|
|
148
|
+
}),
|
|
149
|
+
e.partySize > 1 && /* @__PURE__ */ q(re, { label: X })
|
|
150
|
+
]
|
|
151
|
+
}), de && !w && /* @__PURE__ */ J(j, {
|
|
152
|
+
onClick: async () => {
|
|
153
|
+
M(!0), P("");
|
|
154
|
+
let e = await d();
|
|
155
|
+
M(!1), e && P(e);
|
|
156
|
+
},
|
|
157
|
+
isLoading: O,
|
|
158
|
+
className: "py-2 px-4 text-[13px] font-bold rounded-xl self-start",
|
|
159
|
+
children: [/* @__PURE__ */ q(k, {
|
|
160
|
+
className: "w-3.5 h-3.5 shrink-0",
|
|
161
|
+
"aria-hidden": !0
|
|
162
|
+
}), "Accept"]
|
|
163
|
+
})]
|
|
164
|
+
}),
|
|
165
|
+
U && /* @__PURE__ */ q("p", {
|
|
166
|
+
className: "mb-4 px-3.5 py-2.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.03] text-[12.5px] font-medium text-foreground/70 leading-snug",
|
|
167
|
+
children: "This hour is held with no booking behind it — a booking that was started and never finished. Nobody can take the time until it is freed, and there is nothing here to cancel."
|
|
168
|
+
}),
|
|
169
|
+
H && /* @__PURE__ */ J("div", {
|
|
170
|
+
className: "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.015] divide-y divide-[var(--panel-border)]/40",
|
|
171
|
+
children: [
|
|
172
|
+
!B && !e.own && e.scheduleName && /* @__PURE__ */ q(Y, {
|
|
173
|
+
label: "Meeting",
|
|
174
|
+
children: e.scheduleName
|
|
175
|
+
}),
|
|
176
|
+
!B && e.email && /* @__PURE__ */ q(Y, {
|
|
177
|
+
label: "Email",
|
|
178
|
+
children: /* @__PURE__ */ q("a", {
|
|
179
|
+
href: `mailto:${e.email}`,
|
|
180
|
+
className: "text-accent hover:underline break-all",
|
|
181
|
+
children: e.email
|
|
182
|
+
})
|
|
183
|
+
}),
|
|
184
|
+
L.map(([e, t]) => /* @__PURE__ */ q(Y, {
|
|
185
|
+
label: e === "note" ? "Note" : ae(e),
|
|
186
|
+
children: c(t) ? /* @__PURE__ */ q("span", {
|
|
187
|
+
className: "flex flex-col items-end gap-1 min-w-0",
|
|
188
|
+
children: x(t).map((e) => /* @__PURE__ */ J("a", {
|
|
189
|
+
href: e,
|
|
190
|
+
target: "_blank",
|
|
191
|
+
rel: "noopener noreferrer",
|
|
192
|
+
title: a(e),
|
|
193
|
+
className: "inline-flex items-center gap-1.5 max-w-full min-w-0 text-accent hover:underline",
|
|
194
|
+
children: [/* @__PURE__ */ q(S, { className: "w-3.5 h-3.5 shrink-0" }), /* @__PURE__ */ q("span", {
|
|
195
|
+
className: "truncate min-w-0",
|
|
196
|
+
children: a(e)
|
|
197
|
+
})]
|
|
198
|
+
}, e))
|
|
199
|
+
}) : t
|
|
200
|
+
}, e)),
|
|
201
|
+
I && /* @__PURE__ */ J(Y, {
|
|
202
|
+
label: B ? "The time you booked in" : "Their time",
|
|
203
|
+
children: [
|
|
204
|
+
r(new Date(e.start), I),
|
|
205
|
+
" — ",
|
|
206
|
+
o(I)
|
|
207
|
+
]
|
|
208
|
+
}),
|
|
209
|
+
n && /* @__PURE__ */ q(Y, {
|
|
210
|
+
label: "Payment",
|
|
211
|
+
children: /* @__PURE__ */ q(v, {
|
|
212
|
+
state: n.state,
|
|
213
|
+
label: n.label
|
|
214
|
+
})
|
|
215
|
+
}),
|
|
216
|
+
!B && !e.own && e.createdAt > 0 && /* @__PURE__ */ q(Y, {
|
|
217
|
+
label: "Booked",
|
|
218
|
+
children: new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(new Date(e.createdAt))
|
|
219
|
+
})
|
|
220
|
+
]
|
|
221
|
+
}),
|
|
222
|
+
!e.cancelled && !U && !!u && /* @__PURE__ */ J("div", {
|
|
223
|
+
className: "mt-4 flex flex-col gap-2",
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ q("span", {
|
|
226
|
+
className: "text-[12.5px] sm:text-[13px] font-medium text-foreground/50 select-none ml-1",
|
|
227
|
+
children: "Colour"
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ q(R, {
|
|
230
|
+
value: e.color,
|
|
231
|
+
onChange: async (e) => {
|
|
232
|
+
P("");
|
|
233
|
+
let t = await u(e);
|
|
234
|
+
t && P(t);
|
|
235
|
+
}
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ q("p", {
|
|
238
|
+
className: "text-[11px] font-medium text-foreground/40 leading-snug ml-1 mt-0.5",
|
|
239
|
+
children: "Shown on the calendar and in the day beside it."
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
}),
|
|
243
|
+
w && /* @__PURE__ */ J("div", {
|
|
244
|
+
className: "mt-4 flex flex-col gap-3 p-3.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.02]",
|
|
245
|
+
children: [/* @__PURE__ */ q(f, {
|
|
246
|
+
label: $ ? "Why are you turning it down?" : B ? "Why can you not make it?" : "Why are you cancelling?",
|
|
247
|
+
value: D,
|
|
248
|
+
onChange: ee,
|
|
249
|
+
placeholder: B ? "Something has come up — I would like to book another time." : "Something has come up and I cannot make this time — do book another.",
|
|
250
|
+
hint: B ? `${e.memberName.trim() || "Whoever you booked with"} will see this.` : `${e.name.trim() || "Whoever booked"} will see this on the meeting.`
|
|
251
|
+
}), /* @__PURE__ */ J("div", {
|
|
252
|
+
className: "flex items-center gap-3",
|
|
253
|
+
children: [/* @__PURE__ */ q(j, {
|
|
254
|
+
variant: "secondary",
|
|
255
|
+
onClick: () => {
|
|
256
|
+
E(!1), P("");
|
|
257
|
+
},
|
|
258
|
+
disabled: O,
|
|
259
|
+
className: "flex-1 py-2.5 text-[13px] font-bold rounded-xl",
|
|
260
|
+
children: "Keep it"
|
|
261
|
+
}), /* @__PURE__ */ q(j, {
|
|
262
|
+
onClick: async () => {
|
|
263
|
+
M(!0), P("");
|
|
264
|
+
let e = await p(D.trim());
|
|
265
|
+
if (M(!1), e) {
|
|
266
|
+
P(e);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
E(!1), l();
|
|
270
|
+
},
|
|
271
|
+
isLoading: O,
|
|
272
|
+
disabled: !D.trim(),
|
|
273
|
+
className: "flex-1 py-2.5 text-[13px] font-bold rounded-xl bg-red-500 hover:bg-red-600 border-none text-white shadow-lg hover:shadow-red-500/20 disabled:opacity-40 disabled:hover:bg-red-500 disabled:hover:shadow-none",
|
|
274
|
+
children: $ ? "Decline it" : "Cancel it"
|
|
275
|
+
})]
|
|
276
|
+
})]
|
|
277
|
+
}),
|
|
278
|
+
!w && !Q && !Z && !B && !U && /* @__PURE__ */ q("p", {
|
|
279
|
+
className: "text-[11px] sm:text-[11.5px] text-foreground/40 font-medium leading-snug mt-4 ml-1",
|
|
280
|
+
children: "Nothing left to do here — only an admin can take a booking off the calendar for good."
|
|
281
|
+
}),
|
|
282
|
+
!!N && /* @__PURE__ */ q("p", {
|
|
283
|
+
className: "text-[12px] font-semibold text-red-500 mt-3 ml-1",
|
|
284
|
+
children: N
|
|
285
|
+
}),
|
|
286
|
+
!w && /* @__PURE__ */ J("div", {
|
|
287
|
+
className: `mt-5 flex items-center gap-3 ${Z || Q ? "justify-between" : "justify-end"}`,
|
|
288
|
+
children: [(Z || Q) && /* @__PURE__ */ q(h, {
|
|
289
|
+
icon: Z ? C : A,
|
|
290
|
+
tone: "danger",
|
|
291
|
+
title: fe,
|
|
292
|
+
onClick: () => Z ? y(!0) : E(!0),
|
|
293
|
+
children: U ? "Free the time" : e.own ? "Delete" : Z ? "Remove" : $ ? "Decline" : "Cancel booking"
|
|
294
|
+
}), /* @__PURE__ */ q(j, {
|
|
295
|
+
variant: "secondary",
|
|
296
|
+
onClick: l,
|
|
297
|
+
className: "py-2 px-4 text-[13px] font-bold rounded-xl",
|
|
298
|
+
children: "Close"
|
|
299
|
+
})]
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
}), /* @__PURE__ */ q(ne, {
|
|
303
|
+
isOpen: _,
|
|
304
|
+
title: `${fe}?`,
|
|
305
|
+
message: U ? "The hour goes back on offer. There is no booking behind it, so nothing else is lost." : e.own ? "It leaves your calendar and the time can be booked again." : "It goes from the calendar for good, with everything it holds — in every diary it was booked into. This cannot be undone.",
|
|
306
|
+
confirmText: U ? "Yes, free it" : e.own ? "Yes, delete" : "Yes, remove",
|
|
307
|
+
cancelText: "Keep it",
|
|
308
|
+
isProcessing: O,
|
|
309
|
+
onCancel: () => y(!1),
|
|
310
|
+
onConfirm: async () => {
|
|
311
|
+
M(!0);
|
|
312
|
+
let e = await (U ? g?.() ?? null : m?.() ?? null);
|
|
313
|
+
M(!1), y(!1), e ? P(e) : l();
|
|
314
|
+
}
|
|
315
|
+
})] });
|
|
316
|
+
}
|
|
317
|
+
function ue(e) {
|
|
318
|
+
let t = e.cancelledAt > 0 ? ` on ${new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(new Date(e.cancelledAt))}` : "", n = e.cancelledBy.trim();
|
|
319
|
+
return e.cancelledSide === "booker" ? `${n || "The person who booked"} cancelled this${t}.` : e.cancelledSide === "host" ? `${n || "Your team"} cancelled this${t}.` : `This booking was cancelled${t}.`;
|
|
320
|
+
}
|
|
321
|
+
var de = (e, t, n, r) => ({
|
|
322
|
+
title: "",
|
|
323
|
+
time: e === r ? i(n, t) : "09:00",
|
|
324
|
+
minutes: "60",
|
|
325
|
+
color: "",
|
|
326
|
+
note: ""
|
|
327
|
+
});
|
|
328
|
+
function fe({ dateKey: n, dayLabel: r, zone: i, today: a, now: c, onClose: l, onAdd: d }) {
|
|
329
|
+
let [p, m] = K(() => de(n, i, c ? c() : /* @__PURE__ */ new Date(), a)), [h, g] = K(!1), [v, b] = K(""), x = (e) => m((t) => ({
|
|
330
|
+
...t,
|
|
331
|
+
...e
|
|
332
|
+
}));
|
|
333
|
+
return /* @__PURE__ */ J(ce, {
|
|
334
|
+
open: !0,
|
|
335
|
+
onClose: l,
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ q(le, {
|
|
338
|
+
color: p.color,
|
|
339
|
+
title: p.title.trim() || "Add an event",
|
|
340
|
+
line: `${r} · your time, ${o(i)}`,
|
|
341
|
+
onClose: l
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ J("div", {
|
|
344
|
+
className: "flex flex-col gap-3.5",
|
|
345
|
+
children: [
|
|
346
|
+
/* @__PURE__ */ q(y, {
|
|
347
|
+
label: "What is it?",
|
|
348
|
+
value: p.title,
|
|
349
|
+
onChange: (e) => x({ title: e }),
|
|
350
|
+
placeholder: "Lunch with Sam",
|
|
351
|
+
hint: "Leave it empty and the time simply shows as busy."
|
|
352
|
+
}),
|
|
353
|
+
/* @__PURE__ */ J("div", {
|
|
354
|
+
className: "grid grid-cols-2 gap-3",
|
|
355
|
+
children: [/* @__PURE__ */ q(u, {
|
|
356
|
+
label: "Starts at",
|
|
357
|
+
value: p.time,
|
|
358
|
+
onChange: (e) => x({ time: e }),
|
|
359
|
+
options: e,
|
|
360
|
+
allowEmpty: !1
|
|
361
|
+
}), /* @__PURE__ */ q(u, {
|
|
362
|
+
label: "Lasts",
|
|
363
|
+
value: p.minutes,
|
|
364
|
+
onChange: (e) => x({ minutes: e }),
|
|
365
|
+
options: s,
|
|
366
|
+
allowEmpty: !1
|
|
367
|
+
})]
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ J("div", {
|
|
370
|
+
className: "flex flex-col gap-2",
|
|
371
|
+
children: [/* @__PURE__ */ q("span", {
|
|
372
|
+
className: `${_} ml-1`,
|
|
373
|
+
children: "Colour"
|
|
374
|
+
}), /* @__PURE__ */ q(R, {
|
|
375
|
+
value: p.color,
|
|
376
|
+
onChange: (e) => x({ color: e })
|
|
377
|
+
})]
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ q(f, {
|
|
380
|
+
label: "Note",
|
|
381
|
+
value: p.note,
|
|
382
|
+
onChange: (e) => x({ note: e }),
|
|
383
|
+
placeholder: "Anything to remember"
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ q("p", {
|
|
388
|
+
className: "text-[11.5px] font-medium text-foreground/40 leading-snug mt-3 ml-1",
|
|
389
|
+
children: "Nobody can book this time once it is here."
|
|
390
|
+
}),
|
|
391
|
+
!!v && /* @__PURE__ */ q("p", {
|
|
392
|
+
className: "text-[12px] font-semibold text-red-500 mt-3 ml-1",
|
|
393
|
+
children: v
|
|
394
|
+
}),
|
|
395
|
+
/* @__PURE__ */ J("div", {
|
|
396
|
+
className: "mt-5 flex items-center gap-3",
|
|
397
|
+
children: [/* @__PURE__ */ q(j, {
|
|
398
|
+
variant: "secondary",
|
|
399
|
+
onClick: l,
|
|
400
|
+
disabled: h,
|
|
401
|
+
className: "flex-1 py-2.5 text-[13px] font-bold rounded-xl",
|
|
402
|
+
children: "Cancel"
|
|
403
|
+
}), /* @__PURE__ */ q(j, {
|
|
404
|
+
onClick: async () => {
|
|
405
|
+
g(!0), b("");
|
|
406
|
+
let e = t(n, p.time, i), r = new Date(e.getTime() + Number(p.minutes) * 6e4), a = await d({
|
|
407
|
+
title: p.title.trim(),
|
|
408
|
+
start: e.toISOString(),
|
|
409
|
+
end: r.toISOString(),
|
|
410
|
+
color: p.color,
|
|
411
|
+
note: p.note.trim()
|
|
412
|
+
});
|
|
413
|
+
g(!1), a ? b(a) : l();
|
|
414
|
+
},
|
|
415
|
+
isLoading: h,
|
|
416
|
+
className: "flex-1 py-2.5 text-[13px] font-bold rounded-xl",
|
|
417
|
+
children: "Add it"
|
|
418
|
+
})]
|
|
419
|
+
})
|
|
420
|
+
]
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
var Z = (e, t) => new Intl.DateTimeFormat(t, {
|
|
424
|
+
timeZone: "UTC",
|
|
425
|
+
weekday: "short",
|
|
426
|
+
day: "numeric",
|
|
427
|
+
month: "long"
|
|
428
|
+
}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`)), Q = [
|
|
429
|
+
"M",
|
|
430
|
+
"T",
|
|
431
|
+
"W",
|
|
432
|
+
"T",
|
|
433
|
+
"F",
|
|
434
|
+
"S",
|
|
435
|
+
"S"
|
|
436
|
+
], $ = (e) => e.slice(0, 7), pe = (e, t, n) => r(e, t, n).replace(/[\s\u00a0\u202f]+/g, "").toLowerCase();
|
|
437
|
+
function me(e, t = 3) {
|
|
438
|
+
return e.length <= t ? {
|
|
439
|
+
shown: e,
|
|
440
|
+
extra: 0
|
|
441
|
+
} : {
|
|
442
|
+
shown: e.slice(0, t - 1),
|
|
443
|
+
extra: e.length - (t - 1)
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
var he = (e, t, n = "host") => n === "booker" ? z(e, n) : t && e.memberName ? `${L(e)} · ${e.memberName}` : L(e);
|
|
447
|
+
function ge(e, t) {
|
|
448
|
+
let n = /* @__PURE__ */ new Map();
|
|
449
|
+
for (let r of e) {
|
|
450
|
+
let e = m(new Date(r.start), t).dateKey, i = n.get(e) || [];
|
|
451
|
+
i.push(r), n.set(e, i);
|
|
452
|
+
}
|
|
453
|
+
for (let e of n.values()) e.sort((e, t) => e.start.localeCompare(t.start));
|
|
454
|
+
return n;
|
|
455
|
+
}
|
|
456
|
+
function _e(e, t, n = !0) {
|
|
457
|
+
return !n || !e.paymentId && !e.paymentSession ? null : e.paymentSession ? t === void 0 ? {
|
|
458
|
+
state: "saving",
|
|
459
|
+
label: "Checking payment"
|
|
460
|
+
} : t ? {
|
|
461
|
+
state: "saved",
|
|
462
|
+
label: "Paid"
|
|
463
|
+
} : {
|
|
464
|
+
state: "off",
|
|
465
|
+
label: "Awaiting payment"
|
|
466
|
+
} : {
|
|
467
|
+
state: "off",
|
|
468
|
+
label: "Not paid"
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
var ve = "h-8 px-3 rounded-xl border border-[var(--panel-border)]/60 inline-flex items-center gap-1.5 text-[12.5px] font-semibold text-foreground/60 hover:text-foreground hover:border-accent/40 hover:bg-foreground/5 active:scale-[0.98] transition-all cursor-pointer";
|
|
472
|
+
function ye({ bookings: e, zone: t, paid: r, openBookingId: i, onOpened: a, withMember: o = !1, me: s = "", side: c = "host", onAccept: u, onCancel: f, onDelete: p, canDelete: h, onColor: g, onRelease: _, onAdd: v, now: y }) {
|
|
473
|
+
let b = m(y ? y() : /* @__PURE__ */ new Date(), t).dateKey, x = W(() => ge(e, t), [e, t]), [S, C] = K($(b)), [T, O] = K(b), [k, A] = K(null), [j, ne] = K(!1), L = G("");
|
|
474
|
+
U(() => {
|
|
475
|
+
if (!i) {
|
|
476
|
+
L.current = "";
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
if (L.current === i) return;
|
|
480
|
+
let n = e.find((e) => e.id === i);
|
|
481
|
+
if (!n) return;
|
|
482
|
+
L.current = i;
|
|
483
|
+
let r = m(new Date(n.start), t).dateKey;
|
|
484
|
+
C($(r)), O(r), A(n.id), a?.();
|
|
485
|
+
}, [
|
|
486
|
+
i,
|
|
487
|
+
e,
|
|
488
|
+
t,
|
|
489
|
+
a
|
|
490
|
+
]);
|
|
491
|
+
let re = P(S), R = x.get(T) || [], z = (y ? y() : /* @__PURE__ */ new Date()).toISOString(), V = Z(T), H = k ? e.find((e) => e.id === k) : void 0, { ref: ie, moreBelow: ae } = te(R.length, T);
|
|
492
|
+
return /* @__PURE__ */ J("div", {
|
|
493
|
+
className: "flex flex-col md:flex-row gap-3 md:gap-4 w-full md:items-stretch",
|
|
494
|
+
children: [
|
|
495
|
+
/* @__PURE__ */ J("div", {
|
|
496
|
+
className: `${F} w-full md:flex-1 min-w-0`,
|
|
497
|
+
children: [/* @__PURE__ */ J("div", {
|
|
498
|
+
className: N,
|
|
499
|
+
children: [/* @__PURE__ */ q("h4", {
|
|
500
|
+
className: "text-[14px] font-bold text-foreground tracking-tight truncate",
|
|
501
|
+
children: l(S)
|
|
502
|
+
}), /* @__PURE__ */ J("div", {
|
|
503
|
+
className: "flex items-center gap-1.5 shrink-0",
|
|
504
|
+
children: [
|
|
505
|
+
/* @__PURE__ */ q("button", {
|
|
506
|
+
type: "button",
|
|
507
|
+
onClick: () => {
|
|
508
|
+
C($(b)), O(b);
|
|
509
|
+
},
|
|
510
|
+
className: ve,
|
|
511
|
+
children: "Today"
|
|
512
|
+
}),
|
|
513
|
+
/* @__PURE__ */ q("button", {
|
|
514
|
+
type: "button",
|
|
515
|
+
"aria-label": "Previous month",
|
|
516
|
+
onClick: () => C((e) => d(e, -1)),
|
|
517
|
+
className: I,
|
|
518
|
+
children: /* @__PURE__ */ q(E, { className: "w-4 h-4" })
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ q("button", {
|
|
521
|
+
type: "button",
|
|
522
|
+
"aria-label": "Next month",
|
|
523
|
+
onClick: () => C((e) => d(e, 1)),
|
|
524
|
+
className: I,
|
|
525
|
+
children: /* @__PURE__ */ q(ee, { className: "w-4 h-4" })
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
})]
|
|
529
|
+
}), /* @__PURE__ */ q("div", {
|
|
530
|
+
className: "p-2 sm:p-3",
|
|
531
|
+
children: /* @__PURE__ */ J("div", {
|
|
532
|
+
className: "grid grid-cols-7 gap-1",
|
|
533
|
+
role: "grid",
|
|
534
|
+
"aria-label": l(S),
|
|
535
|
+
children: [Q.map((e, t) => /* @__PURE__ */ q("div", {
|
|
536
|
+
className: "text-center text-[10.5px] font-bold uppercase tracking-wider text-foreground/35 pb-1",
|
|
537
|
+
children: e
|
|
538
|
+
}, t)), re.map((e, r) => {
|
|
539
|
+
if (!e) return /* @__PURE__ */ q("div", { "aria-hidden": !0 }, `blank-${r}`);
|
|
540
|
+
let i = x.get(e) || [], { shown: a, extra: s } = me(i), l = e === T, u = e === b;
|
|
541
|
+
return /* @__PURE__ */ J("button", {
|
|
542
|
+
type: "button",
|
|
543
|
+
role: "gridcell",
|
|
544
|
+
"aria-label": `${e}${i.length ? `, ${i.length} booked` : ""}`,
|
|
545
|
+
"aria-selected": l,
|
|
546
|
+
onClick: () => O(e),
|
|
547
|
+
className: `relative flex flex-col items-center sm:items-stretch justify-center sm:justify-start h-10 sm:h-[86px] rounded-xl sm:p-1 text-left transition-all cursor-pointer border ${l ? "border-accent/70 bg-accent/[0.08] shadow-sm shadow-accent/10" : i.length ? "border-transparent hover:bg-foreground/[0.05] hover:border-[var(--panel-border)]/60" : "border-transparent hover:bg-foreground/[0.03]"} ${u && !l ? "ring-1 ring-inset ring-accent/45" : ""}`,
|
|
548
|
+
children: [/* @__PURE__ */ q("span", {
|
|
549
|
+
className: `text-[13px] tabular-nums leading-none sm:px-1 sm:pt-0.5 sm:pb-1 ${l || u ? "font-bold text-accent" : i.length ? "font-bold text-foreground" : "font-semibold text-foreground/35"}`,
|
|
550
|
+
children: Number(e.slice(8, 10))
|
|
551
|
+
}), /* @__PURE__ */ J("span", {
|
|
552
|
+
"aria-hidden": !0,
|
|
553
|
+
className: "max-sm:hidden sm:flex flex-col gap-[2px] w-full min-w-0",
|
|
554
|
+
children: [a.map((e) => /* @__PURE__ */ J("span", {
|
|
555
|
+
className: `flex items-center gap-1 min-w-0 rounded-md pr-1 py-[2px] leading-[1.2] overflow-hidden ${e.end < z && !e.cancelled ? "opacity-50" : ""} ${e.cancelled ? "bg-foreground/[0.04] line-through" : ""}`,
|
|
556
|
+
style: e.cancelled ? void 0 : { background: n(e.color, 12) },
|
|
557
|
+
children: [
|
|
558
|
+
/* @__PURE__ */ q("span", {
|
|
559
|
+
className: `w-[3px] self-stretch rounded-full shrink-0 ${e.cancelled ? "bg-foreground/15" : ""}`,
|
|
560
|
+
style: e.cancelled ? void 0 : { background: n(e.color, 85) }
|
|
561
|
+
}),
|
|
562
|
+
/* @__PURE__ */ q("span", {
|
|
563
|
+
className: `text-[9.5px] font-bold tabular-nums shrink-0 ${e.cancelled ? "text-foreground/40" : "text-foreground/85"}`,
|
|
564
|
+
children: pe(new Date(e.start), t)
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ q("span", {
|
|
567
|
+
className: `text-[9.5px] font-medium truncate ${e.cancelled ? "text-foreground/40" : "text-foreground/60"}`,
|
|
568
|
+
children: he(e, o, c)
|
|
569
|
+
})
|
|
570
|
+
]
|
|
571
|
+
}, e.id)), s > 0 && /* @__PURE__ */ J("span", {
|
|
572
|
+
className: "px-1 text-[9.5px] font-bold text-foreground/45 leading-[1.2]",
|
|
573
|
+
children: [
|
|
574
|
+
"+",
|
|
575
|
+
s,
|
|
576
|
+
" more"
|
|
577
|
+
]
|
|
578
|
+
})]
|
|
579
|
+
})]
|
|
580
|
+
}, e);
|
|
581
|
+
})]
|
|
582
|
+
})
|
|
583
|
+
})]
|
|
584
|
+
}),
|
|
585
|
+
/* @__PURE__ */ q("div", {
|
|
586
|
+
className: "w-full md:w-[320px] shrink-0 md:relative md:min-h-[360px]",
|
|
587
|
+
children: /* @__PURE__ */ J("div", {
|
|
588
|
+
className: `${F} flex flex-col md:absolute md:inset-0`,
|
|
589
|
+
children: [/* @__PURE__ */ J("div", {
|
|
590
|
+
className: N,
|
|
591
|
+
children: [/* @__PURE__ */ q("p", {
|
|
592
|
+
className: "text-[13px] font-bold text-foreground tracking-tight truncate",
|
|
593
|
+
children: V
|
|
594
|
+
}), /* @__PURE__ */ J("div", {
|
|
595
|
+
className: "flex items-center gap-2 shrink-0",
|
|
596
|
+
children: [R.length > 0 && /* @__PURE__ */ J("span", {
|
|
597
|
+
className: "text-[11.5px] font-semibold text-foreground/40 tabular-nums max-sm:hidden",
|
|
598
|
+
children: [
|
|
599
|
+
R.length,
|
|
600
|
+
" ",
|
|
601
|
+
R.length === 1 ? "event" : "events"
|
|
602
|
+
]
|
|
603
|
+
}), v && /* @__PURE__ */ J("button", {
|
|
604
|
+
type: "button",
|
|
605
|
+
onClick: () => ne(!0),
|
|
606
|
+
title: `Add an event on ${V}`,
|
|
607
|
+
className: ve,
|
|
608
|
+
children: [/* @__PURE__ */ q(w, { className: "w-3.5 h-3.5 shrink-0" }), "Add"]
|
|
609
|
+
})]
|
|
610
|
+
})]
|
|
611
|
+
}), /* @__PURE__ */ J("div", {
|
|
612
|
+
className: "relative flex-1 min-h-0",
|
|
613
|
+
children: [/* @__PURE__ */ q("div", {
|
|
614
|
+
ref: ie,
|
|
615
|
+
className: "p-3 h-full overflow-y-auto styled-scrollbars-mini flex flex-col gap-2",
|
|
616
|
+
children: R.length === 0 ? /* @__PURE__ */ J("div", {
|
|
617
|
+
className: "flex flex-col items-center justify-center text-center gap-2 py-8 px-2",
|
|
618
|
+
children: [/* @__PURE__ */ q(D, {
|
|
619
|
+
className: "w-5 h-5 text-foreground/25",
|
|
620
|
+
"aria-hidden": !0
|
|
621
|
+
}), /* @__PURE__ */ q("p", {
|
|
622
|
+
className: "text-[12.5px] font-medium text-foreground/45 leading-relaxed",
|
|
623
|
+
children: "Nothing on this day yet."
|
|
624
|
+
})]
|
|
625
|
+
}) : R.map((e) => /* @__PURE__ */ q(B, {
|
|
626
|
+
booking: e,
|
|
627
|
+
zone: t,
|
|
628
|
+
now: y,
|
|
629
|
+
chip: _e(e, r?.[e.paymentSession], !!r),
|
|
630
|
+
withMember: o,
|
|
631
|
+
side: c,
|
|
632
|
+
onOpen: () => A(e.id)
|
|
633
|
+
}, e.id))
|
|
634
|
+
}), ae && /* @__PURE__ */ q(M, {})]
|
|
635
|
+
})]
|
|
636
|
+
})
|
|
637
|
+
}),
|
|
638
|
+
H && /* @__PURE__ */ q(X, {
|
|
639
|
+
booking: H,
|
|
640
|
+
zone: t,
|
|
641
|
+
chip: _e(H, r?.[H.paymentSession], !!r),
|
|
642
|
+
onClose: () => A(null),
|
|
643
|
+
me: s,
|
|
644
|
+
side: c,
|
|
645
|
+
onColor: g ? (e) => g(H.id, e) : void 0,
|
|
646
|
+
onAccept: u ? () => u(H) : void 0,
|
|
647
|
+
onCancel: (e) => f(H, e),
|
|
648
|
+
onDelete: p && (!h || h(H)) ? () => p(H) : void 0,
|
|
649
|
+
onRelease: _ ? () => _(H) : void 0
|
|
650
|
+
}),
|
|
651
|
+
j && v && /* @__PURE__ */ q(fe, {
|
|
652
|
+
dateKey: T,
|
|
653
|
+
dayLabel: V,
|
|
654
|
+
zone: t,
|
|
655
|
+
today: b,
|
|
656
|
+
now: y,
|
|
657
|
+
onClose: () => ne(!1),
|
|
658
|
+
onAdd: v
|
|
659
|
+
})
|
|
660
|
+
]
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
//#endregion
|
|
664
|
+
export { ye as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-CiTBaPhY.cjs`);const e=require(`./TimeZoneField-qs7NPR30.cjs`),t=require(`./lucide-react-BwV6L6Is.cjs`),n=require(`./Popup-DHYGFl2-.cjs`),r=require(`./Button-5DlB2MCi.cjs`);let i=require(`react`),a=require(`react/jsx-runtime`),o=require(`react-dom`);var s=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`;function c({isOpen:c,title:l,message:u,confirmText:d=`Delete`,cancelText:f=`Cancel`,onConfirm:p,onCancel:m,isProcessing:h=!1,disableConfirm:g=!1}){let _=(0,i.useRef)(null),v=(0,i.useRef)(m),y=(0,i.useRef)(h);if((0,i.useEffect)(()=>{v.current=m,y.current=h}),(0,i.useEffect)(()=>{if(!c)return;let e=document.body.style.overflow;document.body.style.overflow=`hidden`;let t=document.activeElement,n=window.setTimeout(()=>{_.current&&!_.current.contains(document.activeElement)&&_.current.focus()},0),r=e=>{if(e.defaultPrevented)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),y.current||v.current();return}if(e.key!==`Tab`||!_.current)return;e.stopPropagation();let t=Array.from(_.current.querySelectorAll(s)).filter(e=>e.offsetParent!==null||e===document.activeElement);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||i===_.current)?(e.preventDefault(),r.focus()):!e.shiftKey&&i===r&&(e.preventDefault(),n.focus())};return window.addEventListener(`keydown`,r,!0),()=>{window.clearTimeout(n),window.removeEventListener(`keydown`,r,!0),document.body.style.overflow=e,t&&document.contains(t)&&t.focus({preventScroll:!0})}},[c]),typeof document>`u`)return null;let b=n.n()>0;return(0,o.createPortal)((0,a.jsx)(e.cr,{children:c&&(0,a.jsxs)(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center p-4`,children:[(0,a.jsx)(e.sr.div,{onClick:()=>!h&&m(),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`absolute inset-0 cursor-pointer ${b?`bg-background/60`:`bg-background/80 backdrop-blur-xl`}`}),(0,a.jsx)(e.sr.div,{ref:_,role:`dialog`,"aria-modal":`true`,"aria-label":l,tabIndex:-1,initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{duration:.18,ease:[.16,1,.3,1]},className:`w-full max-w-[400px] p-6 rounded-3xl glass-popover border border-[var(--panel-border)] shadow-2xl relative z-10 text-center outline-none`,children:(0,a.jsxs)(`div`,{className:`w-full flex flex-col items-center`,children:[(0,a.jsx)(`h3`,{className:`text-xl font-bold mb-2 text-foreground tracking-tight`,children:l}),(0,a.jsx)(`p`,{className:`w-full text-[14px] font-medium text-foreground/60 leading-relaxed mb-6 break-words`,children:u}),(0,a.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,children:[(0,a.jsx)(r.t,{variant:`secondary`,onClick:m,disabled:h,className:`flex-1 py-2.5 text-[13px] font-bold rounded-xl`,children:f}),(0,a.jsx)(r.t,{onClick:p,disabled:h||g,className:`flex-1 py-2.5 text-[13px] font-bold rounded-xl bg-red-500 hover:bg-red-600 border-none text-white shadow-xl hover:shadow-red-500/20 glow-hover`,children:h?(0,a.jsx)(t.ht,{className:`w-5 h-5 animate-spin mx-auto`}):d})]})]})})]})}),document.body)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|