@uptrademedia/site-kit 1.0.4 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/README.md +96 -25
  2. package/dist/analytics/index.js +7 -7
  3. package/dist/analytics/index.mjs +3 -3
  4. package/dist/api-QUIPJJCX.js +77 -0
  5. package/dist/api-QUIPJJCX.js.map +1 -0
  6. package/dist/api-V3BA5PMX.mjs +4 -0
  7. package/dist/api-V3BA5PMX.mjs.map +1 -0
  8. package/dist/blog/index.d.mts +160 -5
  9. package/dist/blog/index.d.ts +160 -5
  10. package/dist/blog/index.js +1166 -18
  11. package/dist/blog/index.js.map +1 -1
  12. package/dist/blog/index.mjs +1156 -18
  13. package/dist/blog/index.mjs.map +1 -1
  14. package/dist/blog/server.d.mts +229 -0
  15. package/dist/blog/server.d.ts +229 -0
  16. package/dist/blog/server.js +692 -0
  17. package/dist/blog/server.js.map +1 -0
  18. package/dist/blog/server.mjs +666 -0
  19. package/dist/blog/server.mjs.map +1 -0
  20. package/dist/{chunk-FKVJOT2F.mjs → chunk-42EXHJTC.mjs} +196 -7
  21. package/dist/chunk-42EXHJTC.mjs.map +1 -0
  22. package/dist/{scanner-AZV5I6US.mjs → chunk-44OMJFCG.mjs} +354 -14
  23. package/dist/chunk-44OMJFCG.mjs.map +1 -0
  24. package/dist/chunk-4TGJYNHV.js +981 -0
  25. package/dist/chunk-4TGJYNHV.js.map +1 -0
  26. package/dist/chunk-4XPGGLVP.mjs +53 -0
  27. package/dist/{chunk-NYKRE2FL.mjs.map → chunk-4XPGGLVP.mjs.map} +1 -1
  28. package/dist/{generators-TO2FKJR6.mjs → chunk-6ONUXZDO.mjs} +26 -9
  29. package/dist/chunk-6ONUXZDO.mjs.map +1 -0
  30. package/dist/chunk-CG53ASWX.mjs +729 -0
  31. package/dist/chunk-CG53ASWX.mjs.map +1 -0
  32. package/dist/{scanner-ETJAMIT7.js → chunk-DERI27QC.js} +448 -102
  33. package/dist/chunk-DERI27QC.js.map +1 -0
  34. package/dist/chunk-DYM5ML2V.mjs +1518 -0
  35. package/dist/chunk-DYM5ML2V.mjs.map +1 -0
  36. package/dist/chunk-FLZZOX44.js +1526 -0
  37. package/dist/chunk-FLZZOX44.js.map +1 -0
  38. package/dist/{chunk-7H6I3ECV.mjs → chunk-FQVGK746.mjs} +63 -3
  39. package/dist/chunk-FQVGK746.mjs.map +1 -0
  40. package/dist/{chunk-GQ6ZOU2N.mjs → chunk-JGQPAXTL.mjs} +4 -4
  41. package/dist/{chunk-GQ6ZOU2N.mjs.map → chunk-JGQPAXTL.mjs.map} +1 -1
  42. package/dist/{chunk-V3F5J6CV.js → chunk-JUEVN4Q4.js} +196 -7
  43. package/dist/chunk-JUEVN4Q4.js.map +1 -0
  44. package/dist/chunk-KKMGTT7F.mjs +968 -0
  45. package/dist/chunk-KKMGTT7F.mjs.map +1 -0
  46. package/dist/{chunk-XQJX252G.mjs → chunk-MB3WR5KJ.mjs} +28 -18
  47. package/dist/chunk-MB3WR5KJ.mjs.map +1 -0
  48. package/dist/{chunk-2IHTEKHU.mjs → chunk-QD5CN2OI.mjs} +16 -7
  49. package/dist/chunk-QD5CN2OI.mjs.map +1 -0
  50. package/dist/chunk-QD66FTXZ.mjs +278 -0
  51. package/dist/chunk-QD66FTXZ.mjs.map +1 -0
  52. package/dist/{chunk-SBVEYCSV.js → chunk-QQB4FO4Q.js} +7 -7
  53. package/dist/{chunk-SBVEYCSV.js.map → chunk-QQB4FO4Q.js.map} +1 -1
  54. package/dist/{generators-YZWIGHCO.js → chunk-S2GXR5HY.js} +26 -9
  55. package/dist/chunk-S2GXR5HY.js.map +1 -0
  56. package/dist/{chunk-O2OHHBUD.js → chunk-TDK7DLCH.js} +30 -20
  57. package/dist/chunk-TDK7DLCH.js.map +1 -0
  58. package/dist/chunk-UJQ73OS6.js +282 -0
  59. package/dist/chunk-UJQ73OS6.js.map +1 -0
  60. package/dist/{chunk-QP5NCO2E.js → chunk-VDI7KYME.js} +67 -2
  61. package/dist/chunk-VDI7KYME.js.map +1 -0
  62. package/dist/chunk-VOR53RUR.js +753 -0
  63. package/dist/chunk-VOR53RUR.js.map +1 -0
  64. package/dist/{chunk-GAJLEDRD.js → chunk-ZKJ7JKFV.js} +16 -7
  65. package/dist/chunk-ZKJ7JKFV.js.map +1 -0
  66. package/dist/chunk-ZSMWDLMK.js +63 -0
  67. package/dist/{chunk-EQCVQC35.js.map → chunk-ZSMWDLMK.js.map} +1 -1
  68. package/dist/cli/index.js +37269 -0
  69. package/dist/cli/index.js.map +1 -0
  70. package/dist/cli/index.mjs +37233 -0
  71. package/dist/cli/index.mjs.map +1 -0
  72. package/dist/commerce/index.js +1 -1
  73. package/dist/commerce/index.mjs +1 -1
  74. package/dist/commerce/server.d.mts +12 -3
  75. package/dist/commerce/server.d.ts +12 -3
  76. package/dist/commerce/server.js +71 -70
  77. package/dist/commerce/server.js.map +1 -1
  78. package/dist/commerce/server.mjs +71 -70
  79. package/dist/commerce/server.mjs.map +1 -1
  80. package/dist/engage/index.d.mts +6 -4
  81. package/dist/engage/index.d.ts +6 -4
  82. package/dist/engage/index.js +8 -4
  83. package/dist/engage/index.mjs +2 -2
  84. package/dist/forms/index.js +1 -1
  85. package/dist/forms/index.mjs +1 -1
  86. package/dist/generators-5EU4PTVF.js +33 -0
  87. package/dist/generators-5EU4PTVF.js.map +1 -0
  88. package/dist/generators-TYPILCWD.mjs +4 -0
  89. package/dist/generators-TYPILCWD.mjs.map +1 -0
  90. package/dist/images/index.js +11 -11
  91. package/dist/images/index.mjs +4 -4
  92. package/dist/index.d.mts +155 -5
  93. package/dist/index.d.ts +155 -5
  94. package/dist/index.js +979 -50
  95. package/dist/index.js.map +1 -1
  96. package/dist/index.mjs +821 -8
  97. package/dist/index.mjs.map +1 -1
  98. package/dist/llms/index.d.mts +657 -0
  99. package/dist/llms/index.d.ts +657 -0
  100. package/dist/llms/index.js +101 -0
  101. package/dist/llms/index.js.map +1 -0
  102. package/dist/llms/index.mjs +4 -0
  103. package/dist/llms/index.mjs.map +1 -0
  104. package/dist/migrator-ARLHUNB3.mjs +4 -0
  105. package/dist/migrator-ARLHUNB3.mjs.map +1 -0
  106. package/dist/migrator-VZLBH3VY.js +37 -0
  107. package/dist/migrator-VZLBH3VY.js.map +1 -0
  108. package/dist/redirects/index.js +1 -1
  109. package/dist/redirects/index.mjs +1 -1
  110. package/dist/reputation/index.d.mts +57 -0
  111. package/dist/reputation/index.d.ts +57 -0
  112. package/dist/reputation/index.js +21 -0
  113. package/dist/reputation/index.js.map +1 -0
  114. package/dist/reputation/index.mjs +4 -0
  115. package/dist/reputation/index.mjs.map +1 -0
  116. package/dist/{routing-BWjUF7lp.d.ts → routing-CF91y6NO.d.ts} +1 -1
  117. package/dist/{routing-CgmRi9tD.d.mts → routing-CIOFpFCB.d.mts} +1 -1
  118. package/dist/scanner-7ZMUM2P5.mjs +4 -0
  119. package/dist/scanner-7ZMUM2P5.mjs.map +1 -0
  120. package/dist/scanner-OY7UF3WA.js +53 -0
  121. package/dist/scanner-OY7UF3WA.js.map +1 -0
  122. package/dist/seo/index.d.mts +267 -7
  123. package/dist/seo/index.d.ts +267 -7
  124. package/dist/seo/index.js +432 -24
  125. package/dist/seo/index.js.map +1 -1
  126. package/dist/seo/index.mjs +400 -11
  127. package/dist/seo/index.mjs.map +1 -1
  128. package/dist/seo/server.d.mts +11 -4
  129. package/dist/seo/server.d.ts +11 -4
  130. package/dist/seo/server.js +17 -17
  131. package/dist/seo/server.mjs +3 -3
  132. package/dist/setup/client.js +1 -1
  133. package/dist/setup/client.mjs +1 -1
  134. package/dist/setup/index.js +3 -3
  135. package/dist/setup/index.mjs +2 -2
  136. package/dist/setup/server.js +3 -3
  137. package/dist/setup/server.mjs +2 -2
  138. package/dist/sitemap/index.js +2 -2
  139. package/dist/sitemap/index.js.map +1 -1
  140. package/dist/sitemap/index.mjs +2 -2
  141. package/dist/sitemap/index.mjs.map +1 -1
  142. package/dist/{types-C0pJGfbH.d.mts → types-D6FHAVWX.d.mts} +99 -3
  143. package/dist/{types-C0pJGfbH.d.ts → types-D6FHAVWX.d.ts} +99 -3
  144. package/dist/{types-BDojCvvL.d.mts → types-DI0jnhjJ.d.mts} +31 -8
  145. package/dist/{types-BDojCvvL.d.ts → types-DI0jnhjJ.d.ts} +31 -8
  146. package/dist/{types-BmzutFwy.d.ts → types-j8X4vUhB.d.mts} +19 -2
  147. package/dist/{types-BmzutFwy.d.mts → types-j8X4vUhB.d.ts} +19 -2
  148. package/dist/{web-vitals-BH55V7EJ.js → web-vitals-444RLW3B.js} +11 -11
  149. package/dist/{web-vitals-BH55V7EJ.js.map → web-vitals-444RLW3B.js.map} +1 -1
  150. package/dist/{web-vitals-RJYPWAR3.mjs → web-vitals-KPICZIEF.mjs} +3 -3
  151. package/dist/{web-vitals-RJYPWAR3.mjs.map → web-vitals-KPICZIEF.mjs.map} +1 -1
  152. package/package.json +22 -10
  153. package/dist/api-N35S3EES.js +0 -57
  154. package/dist/api-N35S3EES.js.map +0 -1
  155. package/dist/api-SYBTK7Z7.mjs +0 -4
  156. package/dist/api-SYBTK7Z7.mjs.map +0 -1
  157. package/dist/chunk-2IHTEKHU.mjs.map +0 -1
  158. package/dist/chunk-7H6I3ECV.mjs.map +0 -1
  159. package/dist/chunk-BGJLOJ7T.mjs +0 -605
  160. package/dist/chunk-BGJLOJ7T.mjs.map +0 -1
  161. package/dist/chunk-EQCVQC35.js +0 -35
  162. package/dist/chunk-FKVJOT2F.mjs.map +0 -1
  163. package/dist/chunk-GAJLEDRD.js.map +0 -1
  164. package/dist/chunk-NYKRE2FL.mjs +0 -31
  165. package/dist/chunk-O2OHHBUD.js.map +0 -1
  166. package/dist/chunk-QAYJV4KK.js +0 -608
  167. package/dist/chunk-QAYJV4KK.js.map +0 -1
  168. package/dist/chunk-QP5NCO2E.js.map +0 -1
  169. package/dist/chunk-V3F5J6CV.js.map +0 -1
  170. package/dist/chunk-XQJX252G.mjs.map +0 -1
  171. package/dist/generators-TO2FKJR6.mjs.map +0 -1
  172. package/dist/generators-YZWIGHCO.js.map +0 -1
  173. package/dist/migrator-V6KS75EA.mjs +0 -265
  174. package/dist/migrator-V6KS75EA.mjs.map +0 -1
  175. package/dist/migrator-XKM7YQCY.js +0 -272
  176. package/dist/migrator-XKM7YQCY.js.map +0 -1
  177. package/dist/scanner-AZV5I6US.mjs.map +0 -1
  178. package/dist/scanner-ETJAMIT7.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,14 +1,16 @@
1
1
  'use strict';
2
2
 
3
+ var chunkUJQ73OS6_js = require('./chunk-UJQ73OS6.js');
4
+ var chunkVOR53RUR_js = require('./chunk-VOR53RUR.js');
5
+ var chunkK2HWVOEO_js = require('./chunk-K2HWVOEO.js');
3
6
  var chunk5R4R3WDP_js = require('./chunk-5R4R3WDP.js');
4
7
  var chunkBZBJVG5Y_js = require('./chunk-BZBJVG5Y.js');
5
- var chunkO2OHHBUD_js = require('./chunk-O2OHHBUD.js');
8
+ var chunkTDK7DLCH_js = require('./chunk-TDK7DLCH.js');
6
9
  require('./chunk-HCFPU7TU.js');
7
- require('./chunk-V3F5J6CV.js');
8
- require('./chunk-QAYJV4KK.js');
10
+ require('./chunk-JUEVN4Q4.js');
11
+ require('./chunk-FLZZOX44.js');
9
12
  require('./chunk-ADHVEFWD.js');
10
- var chunkK2HWVOEO_js = require('./chunk-K2HWVOEO.js');
11
- require('./chunk-EQCVQC35.js');
13
+ require('./chunk-ZSMWDLMK.js');
12
14
  var React = require('react');
13
15
  var jsxRuntime = require('react/jsx-runtime');
14
16
 
@@ -163,8 +165,8 @@ function SignalExperiment({
163
165
  trackImpression = true,
164
166
  children
165
167
  }) {
166
- const { assignment, variant, isControl } = chunkO2OHHBUD_js.useSignalExperiment(experimentId);
167
- const trackEvent = chunkO2OHHBUD_js.useSignalEvent();
168
+ const { assignment, variant, isControl } = chunkTDK7DLCH_js.useSignalExperiment(experimentId);
169
+ const trackEvent = chunkTDK7DLCH_js.useSignalEvent();
168
170
  React.useEffect(() => {
169
171
  if (trackImpression && variant) {
170
172
  trackEvent({
@@ -191,7 +193,7 @@ function SignalExperiment({
191
193
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: variants.control || null });
192
194
  }
193
195
  function useExperimentVariant(experimentId) {
194
- return chunkO2OHHBUD_js.useSignalExperiment(experimentId);
196
+ return chunkTDK7DLCH_js.useSignalExperiment(experimentId);
195
197
  }
196
198
  function ExperimentConversion({
197
199
  experimentId,
@@ -199,8 +201,8 @@ function ExperimentConversion({
199
201
  value,
200
202
  children
201
203
  }) {
202
- const trackEvent = chunkO2OHHBUD_js.useSignalEvent();
203
- const { variant } = chunkO2OHHBUD_js.useSignalExperiment(experimentId);
204
+ const trackEvent = chunkTDK7DLCH_js.useSignalEvent();
205
+ const { variant } = chunkTDK7DLCH_js.useSignalExperiment(experimentId);
204
206
  const handleInteraction = () => {
205
207
  trackEvent({
206
208
  event_type: "experiment",
@@ -1388,85 +1390,920 @@ ${moduleConfigs.join("\n")}
1388
1390
  }`;
1389
1391
  }
1390
1392
 
1391
- Object.defineProperty(exports, "SetupWizard", {
1393
+ // src/sync/api.ts
1394
+ var DEFAULT_API_URL = "https://api.uptrademedia.com";
1395
+ async function fetchBookingTypes(orgSlug, apiUrl = DEFAULT_API_URL) {
1396
+ const response = await fetch(`${apiUrl}/sync/public/${orgSlug}/types`);
1397
+ if (!response.ok) {
1398
+ throw new Error(`Failed to fetch booking types: ${response.statusText}`);
1399
+ }
1400
+ const data = await response.json();
1401
+ return data.types || [];
1402
+ }
1403
+ async function fetchBookingTypeDetails(orgSlug, typeSlug, apiUrl = DEFAULT_API_URL) {
1404
+ const response = await fetch(`${apiUrl}/sync/public/${orgSlug}/types/${typeSlug}`);
1405
+ if (!response.ok) {
1406
+ throw new Error(`Failed to fetch booking type: ${response.statusText}`);
1407
+ }
1408
+ return response.json();
1409
+ }
1410
+ async function fetchAvailability(orgSlug, typeSlug, date, apiUrl = DEFAULT_API_URL, timezone, hostId) {
1411
+ const params = new URLSearchParams({ date });
1412
+ if (timezone) params.append("timezone", timezone);
1413
+ if (hostId) params.append("hostId", hostId);
1414
+ const response = await fetch(
1415
+ `${apiUrl}/sync/public/${orgSlug}/availability/${typeSlug}?${params}`
1416
+ );
1417
+ if (!response.ok) {
1418
+ throw new Error(`Failed to fetch availability: ${response.statusText}`);
1419
+ }
1420
+ const data = await response.json();
1421
+ return data.slots || [];
1422
+ }
1423
+ async function createSlotHold(bookingTypeId, startTime, hostId, guestTimezone, apiUrl = DEFAULT_API_URL) {
1424
+ const response = await fetch(`${apiUrl}/sync/public/hold`, {
1425
+ method: "POST",
1426
+ headers: { "Content-Type": "application/json" },
1427
+ body: JSON.stringify({
1428
+ booking_type_id: bookingTypeId,
1429
+ start_time: startTime,
1430
+ host_id: hostId,
1431
+ guest_timezone: guestTimezone
1432
+ })
1433
+ });
1434
+ if (!response.ok) {
1435
+ throw new Error(`Failed to hold slot: ${response.statusText}`);
1436
+ }
1437
+ return response.json();
1438
+ }
1439
+ async function releaseSlotHold(holdId, apiUrl = DEFAULT_API_URL) {
1440
+ await fetch(`${apiUrl}/sync/public/hold/${holdId}`, {
1441
+ method: "DELETE"
1442
+ });
1443
+ }
1444
+ async function createBooking(bookingTypeId, startTime, guest, timezone, hostId, holdId, apiUrl = DEFAULT_API_URL) {
1445
+ const response = await fetch(`${apiUrl}/sync/public/booking`, {
1446
+ method: "POST",
1447
+ headers: { "Content-Type": "application/json" },
1448
+ body: JSON.stringify({
1449
+ booking_type_id: bookingTypeId,
1450
+ start_time: startTime,
1451
+ guest_name: guest.name,
1452
+ guest_email: guest.email,
1453
+ guest_phone: guest.phone,
1454
+ guest_notes: guest.notes,
1455
+ timezone,
1456
+ host_id: hostId,
1457
+ hold_id: holdId
1458
+ })
1459
+ });
1460
+ if (!response.ok) {
1461
+ const errorData = await response.json().catch(() => ({}));
1462
+ throw new Error(errorData.message || `Failed to create booking: ${response.statusText}`);
1463
+ }
1464
+ return response.json();
1465
+ }
1466
+ async function fetchAvailableDates(orgSlug, typeSlug, startDate, endDate, apiUrl = DEFAULT_API_URL, timezone) {
1467
+ const availableDates = [];
1468
+ const start = new Date(startDate);
1469
+ const end = new Date(endDate);
1470
+ const current = new Date(start);
1471
+ while (current <= end) {
1472
+ const dateStr = current.toISOString().split("T")[0];
1473
+ try {
1474
+ const slots = await fetchAvailability(orgSlug, typeSlug, dateStr, apiUrl, timezone);
1475
+ if (slots.some((s) => s.available)) {
1476
+ availableDates.push(dateStr);
1477
+ }
1478
+ } catch {
1479
+ }
1480
+ current.setDate(current.getDate() + 1);
1481
+ }
1482
+ return availableDates;
1483
+ }
1484
+ function detectTimezone() {
1485
+ try {
1486
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
1487
+ } catch {
1488
+ return "America/New_York";
1489
+ }
1490
+ }
1491
+ function formatTime(isoString, timezone) {
1492
+ const date = new Date(isoString);
1493
+ return date.toLocaleTimeString("en-US", {
1494
+ hour: "numeric",
1495
+ minute: "2-digit",
1496
+ hour12: true,
1497
+ timeZone: timezone
1498
+ });
1499
+ }
1500
+ function formatDate2(isoString, timezone) {
1501
+ const date = new Date(isoString);
1502
+ return date.toLocaleDateString("en-US", {
1503
+ weekday: "long",
1504
+ month: "long",
1505
+ day: "numeric",
1506
+ year: "numeric",
1507
+ timeZone: timezone
1508
+ });
1509
+ }
1510
+ function formatDuration(minutes) {
1511
+ if (minutes < 60) {
1512
+ return `${minutes} min`;
1513
+ }
1514
+ const hours = Math.floor(minutes / 60);
1515
+ const mins = minutes % 60;
1516
+ if (mins === 0) {
1517
+ return `${hours} hour${hours > 1 ? "s" : ""}`;
1518
+ }
1519
+ return `${hours}h ${mins}m`;
1520
+ }
1521
+ var DEFAULT_API_URL2 = "https://api.uptrademedia.com";
1522
+ function BookingWidget({
1523
+ orgSlug,
1524
+ apiUrl = DEFAULT_API_URL2,
1525
+ bookingTypeSlug,
1526
+ timezone: propTimezone,
1527
+ className = "",
1528
+ daysToShow = 14,
1529
+ onBookingComplete,
1530
+ onError,
1531
+ hideTypeSelector = false,
1532
+ styles: styles2 = {}
1533
+ }) {
1534
+ const [step, setStep] = React.useState(bookingTypeSlug ? "datetime" : "type");
1535
+ const [loading, setLoading] = React.useState(false);
1536
+ const [error, setError] = React.useState(null);
1537
+ const [bookingTypes, setBookingTypes] = React.useState([]);
1538
+ const [selectedType, setSelectedType] = React.useState(null);
1539
+ const [selectedDate, setSelectedDate] = React.useState(null);
1540
+ const [slots, setSlots] = React.useState([]);
1541
+ const [selectedSlot, setSelectedSlot] = React.useState(null);
1542
+ const [hold, setHold] = React.useState(null);
1543
+ const [guestInfo, setGuestInfo] = React.useState({ name: "", email: "" });
1544
+ const [bookingResult, setBookingResult] = React.useState(null);
1545
+ const timezone = React.useMemo(() => propTimezone || detectTimezone(), [propTimezone]);
1546
+ const availableDates = React.useMemo(() => {
1547
+ const dates = [];
1548
+ const today = /* @__PURE__ */ new Date();
1549
+ today.setHours(0, 0, 0, 0);
1550
+ for (let i = 0; i < daysToShow; i++) {
1551
+ const date = new Date(today);
1552
+ date.setDate(date.getDate() + i);
1553
+ if (date.getDay() !== 0 && date.getDay() !== 6) {
1554
+ dates.push(date);
1555
+ }
1556
+ }
1557
+ return dates;
1558
+ }, [daysToShow]);
1559
+ React.useEffect(() => {
1560
+ if (bookingTypeSlug) {
1561
+ fetchBookingTypeDetails(orgSlug, bookingTypeSlug, apiUrl).then((type) => {
1562
+ setSelectedType(type);
1563
+ setStep("datetime");
1564
+ }).catch((err) => {
1565
+ setError(err.message);
1566
+ onError?.(err);
1567
+ });
1568
+ } else {
1569
+ fetchBookingTypes(orgSlug, apiUrl).then((types) => setBookingTypes(types.filter((t) => t.is_active))).catch((err) => {
1570
+ setError(err.message);
1571
+ onError?.(err);
1572
+ });
1573
+ }
1574
+ }, [orgSlug, bookingTypeSlug, apiUrl, onError]);
1575
+ React.useEffect(() => {
1576
+ if (!selectedDate || !selectedType) return;
1577
+ const dateStr = selectedDate.toISOString().split("T")[0];
1578
+ setLoading(true);
1579
+ setSlots([]);
1580
+ setSelectedSlot(null);
1581
+ fetchAvailability(orgSlug, selectedType.slug, dateStr, apiUrl, timezone).then((s) => setSlots(s.filter((slot) => slot.available))).catch((err) => {
1582
+ setError(err.message);
1583
+ onError?.(err);
1584
+ }).finally(() => setLoading(false));
1585
+ }, [selectedDate, selectedType, orgSlug, apiUrl, timezone, onError]);
1586
+ const handleSlotSelect = React.useCallback(async (slot) => {
1587
+ if (!selectedType) return;
1588
+ if (hold) {
1589
+ await releaseSlotHold(hold.holdId, apiUrl).catch(() => {
1590
+ });
1591
+ }
1592
+ setSelectedSlot(slot);
1593
+ setLoading(true);
1594
+ try {
1595
+ const newHold = await createSlotHold(
1596
+ selectedType.id,
1597
+ slot.start,
1598
+ slot.hostId,
1599
+ timezone,
1600
+ apiUrl
1601
+ );
1602
+ setHold(newHold);
1603
+ setStep("form");
1604
+ } catch (err) {
1605
+ setError(err.message);
1606
+ onError?.(err);
1607
+ } finally {
1608
+ setLoading(false);
1609
+ }
1610
+ }, [selectedType, hold, timezone, apiUrl, onError]);
1611
+ const handleBookingSubmit = React.useCallback(async (e) => {
1612
+ e.preventDefault();
1613
+ if (!selectedType || !selectedSlot) return;
1614
+ setLoading(true);
1615
+ setError(null);
1616
+ try {
1617
+ const result = await createBooking(
1618
+ selectedType.id,
1619
+ selectedSlot.start,
1620
+ guestInfo,
1621
+ timezone,
1622
+ selectedSlot.hostId,
1623
+ hold?.holdId,
1624
+ apiUrl
1625
+ );
1626
+ setBookingResult(result);
1627
+ setStep("success");
1628
+ onBookingComplete?.(result);
1629
+ } catch (err) {
1630
+ setError(err.message);
1631
+ onError?.(err);
1632
+ } finally {
1633
+ setLoading(false);
1634
+ }
1635
+ }, [selectedType, selectedSlot, guestInfo, timezone, hold, apiUrl, onBookingComplete, onError]);
1636
+ React.useEffect(() => {
1637
+ return () => {
1638
+ if (hold) {
1639
+ releaseSlotHold(hold.holdId, apiUrl).catch(() => {
1640
+ });
1641
+ }
1642
+ };
1643
+ }, [hold, apiUrl]);
1644
+ const cssVars = {
1645
+ "--booking-primary": styles2.primaryColor || "#4bbf39",
1646
+ "--booking-radius": styles2.borderRadius || "8px",
1647
+ "--booking-font": styles2.fontFamily || "inherit"
1648
+ };
1649
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1650
+ "div",
1651
+ {
1652
+ className: `uptrade-booking-widget ${className}`,
1653
+ style: cssVars,
1654
+ children: [
1655
+ error && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-error", children: [
1656
+ error,
1657
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => setError(null), children: "Dismiss" })
1658
+ ] }),
1659
+ step === "type" && !hideTypeSelector && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-types", children: [
1660
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "uptrade-booking-title", children: "Select a Service" }),
1661
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-type-list", children: bookingTypes.map((type) => /* @__PURE__ */ jsxRuntime.jsxs(
1662
+ "button",
1663
+ {
1664
+ className: "uptrade-booking-type-card",
1665
+ onClick: () => {
1666
+ setSelectedType(type);
1667
+ setStep("datetime");
1668
+ },
1669
+ children: [
1670
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-type-name", children: type.name }),
1671
+ type.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-type-desc", children: type.description }),
1672
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-type-meta", children: [
1673
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration(type.duration_minutes) }),
1674
+ type.price_cents ? /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1675
+ "$",
1676
+ (type.price_cents / 100).toFixed(2)
1677
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Free" })
1678
+ ] })
1679
+ ]
1680
+ },
1681
+ type.id
1682
+ )) })
1683
+ ] }),
1684
+ step === "datetime" && selectedType && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-datetime", children: [
1685
+ /* @__PURE__ */ jsxRuntime.jsx(
1686
+ "button",
1687
+ {
1688
+ className: "uptrade-booking-back",
1689
+ onClick: () => {
1690
+ if (bookingTypeSlug) return;
1691
+ setSelectedType(null);
1692
+ setStep("type");
1693
+ },
1694
+ disabled: !!bookingTypeSlug,
1695
+ children: "\u2190 Back"
1696
+ }
1697
+ ),
1698
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "uptrade-booking-title", children: selectedType.name }),
1699
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "uptrade-booking-subtitle", children: [
1700
+ formatDuration(selectedType.duration_minutes),
1701
+ " \u2022 ",
1702
+ selectedType.location_type
1703
+ ] }),
1704
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-dates", children: [
1705
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { children: "Select a Date" }),
1706
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-date-grid", children: availableDates.map((date) => {
1707
+ const dateStr = date.toISOString().split("T")[0];
1708
+ const isSelected = selectedDate?.toISOString().split("T")[0] === dateStr;
1709
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1710
+ "button",
1711
+ {
1712
+ className: `uptrade-booking-date ${isSelected ? "selected" : ""}`,
1713
+ onClick: () => setSelectedDate(date),
1714
+ children: [
1715
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "uptrade-booking-date-day", children: date.toLocaleDateString("en-US", { weekday: "short" }) }),
1716
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "uptrade-booking-date-num", children: date.getDate() })
1717
+ ]
1718
+ },
1719
+ dateStr
1720
+ );
1721
+ }) })
1722
+ ] }),
1723
+ selectedDate && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-times", children: [
1724
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { children: "Select a Time" }),
1725
+ loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-loading", children: "Loading available times..." }) : slots.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-empty", children: "No times available on this date" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-time-grid", children: slots.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(
1726
+ "button",
1727
+ {
1728
+ className: `uptrade-booking-time ${selectedSlot?.start === slot.start ? "selected" : ""}`,
1729
+ onClick: () => handleSlotSelect(slot),
1730
+ disabled: loading,
1731
+ children: formatTime(slot.start, timezone)
1732
+ },
1733
+ slot.start
1734
+ )) })
1735
+ ] })
1736
+ ] }),
1737
+ step === "form" && selectedType && selectedSlot && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-form", children: [
1738
+ /* @__PURE__ */ jsxRuntime.jsx(
1739
+ "button",
1740
+ {
1741
+ className: "uptrade-booking-back",
1742
+ onClick: () => setStep("datetime"),
1743
+ children: "\u2190 Back"
1744
+ }
1745
+ ),
1746
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "uptrade-booking-title", children: "Your Information" }),
1747
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "uptrade-booking-subtitle", children: [
1748
+ selectedType.name,
1749
+ " on ",
1750
+ formatDate2(selectedSlot.start, timezone),
1751
+ " at ",
1752
+ formatTime(selectedSlot.start, timezone)
1753
+ ] }),
1754
+ hold && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "uptrade-booking-hold-notice", children: [
1755
+ "This time is held for you for ",
1756
+ Math.floor((new Date(hold.expiresAt).getTime() - Date.now()) / 6e4),
1757
+ " minutes"
1758
+ ] }),
1759
+ /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleBookingSubmit, children: [
1760
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-field", children: [
1761
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "guest-name", children: "Name *" }),
1762
+ /* @__PURE__ */ jsxRuntime.jsx(
1763
+ "input",
1764
+ {
1765
+ id: "guest-name",
1766
+ type: "text",
1767
+ required: true,
1768
+ value: guestInfo.name,
1769
+ onChange: (e) => setGuestInfo((prev) => ({ ...prev, name: e.target.value })),
1770
+ placeholder: "Your full name"
1771
+ }
1772
+ )
1773
+ ] }),
1774
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-field", children: [
1775
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "guest-email", children: "Email *" }),
1776
+ /* @__PURE__ */ jsxRuntime.jsx(
1777
+ "input",
1778
+ {
1779
+ id: "guest-email",
1780
+ type: "email",
1781
+ required: true,
1782
+ value: guestInfo.email,
1783
+ onChange: (e) => setGuestInfo((prev) => ({ ...prev, email: e.target.value })),
1784
+ placeholder: "your@email.com"
1785
+ }
1786
+ )
1787
+ ] }),
1788
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-field", children: [
1789
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "guest-phone", children: "Phone" }),
1790
+ /* @__PURE__ */ jsxRuntime.jsx(
1791
+ "input",
1792
+ {
1793
+ id: "guest-phone",
1794
+ type: "tel",
1795
+ value: guestInfo.phone || "",
1796
+ onChange: (e) => setGuestInfo((prev) => ({ ...prev, phone: e.target.value })),
1797
+ placeholder: "(555) 123-4567"
1798
+ }
1799
+ )
1800
+ ] }),
1801
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-field", children: [
1802
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "guest-notes", children: "Additional Notes" }),
1803
+ /* @__PURE__ */ jsxRuntime.jsx(
1804
+ "textarea",
1805
+ {
1806
+ id: "guest-notes",
1807
+ value: guestInfo.notes || "",
1808
+ onChange: (e) => setGuestInfo((prev) => ({ ...prev, notes: e.target.value })),
1809
+ placeholder: "Anything you'd like us to know...",
1810
+ rows: 3
1811
+ }
1812
+ )
1813
+ ] }),
1814
+ /* @__PURE__ */ jsxRuntime.jsx(
1815
+ "button",
1816
+ {
1817
+ type: "submit",
1818
+ className: "uptrade-booking-submit",
1819
+ disabled: loading,
1820
+ children: loading ? "Booking..." : "Confirm Booking"
1821
+ }
1822
+ )
1823
+ ] })
1824
+ ] }),
1825
+ step === "success" && bookingResult && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-success", children: [
1826
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "uptrade-booking-success-icon", children: "\u2713" }),
1827
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "uptrade-booking-title", children: "Booking Confirmed!" }),
1828
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "uptrade-booking-confirmation-code", children: [
1829
+ "Confirmation: ",
1830
+ bookingResult.booking.confirmationCode
1831
+ ] }),
1832
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-details", children: [
1833
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1834
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "When:" }),
1835
+ " ",
1836
+ formatDate2(bookingResult.booking.scheduledAt, timezone),
1837
+ " at ",
1838
+ formatTime(bookingResult.booking.scheduledAt, timezone)
1839
+ ] }),
1840
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1841
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Duration:" }),
1842
+ " ",
1843
+ formatDuration(bookingResult.booking.durationMinutes)
1844
+ ] }),
1845
+ bookingResult.booking.hostName && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1846
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "With:" }),
1847
+ " ",
1848
+ bookingResult.booking.hostName
1849
+ ] })
1850
+ ] }),
1851
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-calendar-links", children: [
1852
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Add to calendar:" }),
1853
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "uptrade-booking-calendar-buttons", children: [
1854
+ /* @__PURE__ */ jsxRuntime.jsx(
1855
+ "a",
1856
+ {
1857
+ href: bookingResult.calendarLinks.google,
1858
+ target: "_blank",
1859
+ rel: "noopener noreferrer",
1860
+ className: "uptrade-booking-calendar-btn",
1861
+ children: "Google"
1862
+ }
1863
+ ),
1864
+ /* @__PURE__ */ jsxRuntime.jsx(
1865
+ "a",
1866
+ {
1867
+ href: bookingResult.calendarLinks.outlook,
1868
+ target: "_blank",
1869
+ rel: "noopener noreferrer",
1870
+ className: "uptrade-booking-calendar-btn",
1871
+ children: "Outlook"
1872
+ }
1873
+ ),
1874
+ /* @__PURE__ */ jsxRuntime.jsx(
1875
+ "a",
1876
+ {
1877
+ href: bookingResult.calendarLinks.ics,
1878
+ download: true,
1879
+ className: "uptrade-booking-calendar-btn",
1880
+ children: "Download .ics"
1881
+ }
1882
+ )
1883
+ ] })
1884
+ ] }),
1885
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "uptrade-booking-email-notice", children: "A confirmation email has been sent to your email address." })
1886
+ ] }),
1887
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
1888
+ .uptrade-booking-widget {
1889
+ font-family: var(--booking-font);
1890
+ max-width: 480px;
1891
+ margin: 0 auto;
1892
+ padding: 24px;
1893
+ border: 1px solid #e5e5e5;
1894
+ border-radius: var(--booking-radius);
1895
+ background: #fff;
1896
+ }
1897
+
1898
+ .uptrade-booking-error {
1899
+ background: #fef2f2;
1900
+ border: 1px solid #fecaca;
1901
+ color: #b91c1c;
1902
+ padding: 12px;
1903
+ border-radius: var(--booking-radius);
1904
+ margin-bottom: 16px;
1905
+ display: flex;
1906
+ justify-content: space-between;
1907
+ align-items: center;
1908
+ }
1909
+
1910
+ .uptrade-booking-error button {
1911
+ background: none;
1912
+ border: none;
1913
+ color: inherit;
1914
+ cursor: pointer;
1915
+ text-decoration: underline;
1916
+ }
1917
+
1918
+ .uptrade-booking-title {
1919
+ font-size: 1.25rem;
1920
+ font-weight: 600;
1921
+ margin: 0 0 8px 0;
1922
+ }
1923
+
1924
+ .uptrade-booking-subtitle {
1925
+ color: #666;
1926
+ margin: 0 0 16px 0;
1927
+ }
1928
+
1929
+ .uptrade-booking-back {
1930
+ background: none;
1931
+ border: none;
1932
+ color: var(--booking-primary);
1933
+ cursor: pointer;
1934
+ padding: 0;
1935
+ margin-bottom: 16px;
1936
+ font-size: 0.875rem;
1937
+ }
1938
+
1939
+ .uptrade-booking-back:disabled {
1940
+ display: none;
1941
+ }
1942
+
1943
+ .uptrade-booking-type-list {
1944
+ display: flex;
1945
+ flex-direction: column;
1946
+ gap: 12px;
1947
+ }
1948
+
1949
+ .uptrade-booking-type-card {
1950
+ text-align: left;
1951
+ padding: 16px;
1952
+ border: 1px solid #e5e5e5;
1953
+ border-radius: var(--booking-radius);
1954
+ background: #fff;
1955
+ cursor: pointer;
1956
+ transition: border-color 0.2s, box-shadow 0.2s;
1957
+ }
1958
+
1959
+ .uptrade-booking-type-card:hover {
1960
+ border-color: var(--booking-primary);
1961
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--booking-primary) 15%, transparent);
1962
+ }
1963
+
1964
+ .uptrade-booking-type-name {
1965
+ font-weight: 600;
1966
+ margin-bottom: 4px;
1967
+ }
1968
+
1969
+ .uptrade-booking-type-desc {
1970
+ color: #666;
1971
+ font-size: 0.875rem;
1972
+ margin-bottom: 8px;
1973
+ }
1974
+
1975
+ .uptrade-booking-type-meta {
1976
+ display: flex;
1977
+ gap: 12px;
1978
+ font-size: 0.75rem;
1979
+ color: #888;
1980
+ }
1981
+
1982
+ .uptrade-booking-date-grid {
1983
+ display: flex;
1984
+ gap: 8px;
1985
+ flex-wrap: wrap;
1986
+ margin-bottom: 24px;
1987
+ }
1988
+
1989
+ .uptrade-booking-date {
1990
+ display: flex;
1991
+ flex-direction: column;
1992
+ align-items: center;
1993
+ padding: 8px 12px;
1994
+ border: 1px solid #e5e5e5;
1995
+ border-radius: var(--booking-radius);
1996
+ background: #fff;
1997
+ cursor: pointer;
1998
+ transition: all 0.2s;
1999
+ }
2000
+
2001
+ .uptrade-booking-date:hover {
2002
+ border-color: var(--booking-primary);
2003
+ }
2004
+
2005
+ .uptrade-booking-date.selected {
2006
+ background: var(--booking-primary);
2007
+ border-color: var(--booking-primary);
2008
+ color: #fff;
2009
+ }
2010
+
2011
+ .uptrade-booking-date-day {
2012
+ font-size: 0.625rem;
2013
+ text-transform: uppercase;
2014
+ }
2015
+
2016
+ .uptrade-booking-date-num {
2017
+ font-size: 1.125rem;
2018
+ font-weight: 600;
2019
+ }
2020
+
2021
+ .uptrade-booking-time-grid {
2022
+ display: grid;
2023
+ grid-template-columns: repeat(3, 1fr);
2024
+ gap: 8px;
2025
+ }
2026
+
2027
+ .uptrade-booking-time {
2028
+ padding: 10px;
2029
+ border: 1px solid #e5e5e5;
2030
+ border-radius: var(--booking-radius);
2031
+ background: #fff;
2032
+ cursor: pointer;
2033
+ font-size: 0.875rem;
2034
+ transition: all 0.2s;
2035
+ }
2036
+
2037
+ .uptrade-booking-time:hover:not(:disabled) {
2038
+ border-color: var(--booking-primary);
2039
+ }
2040
+
2041
+ .uptrade-booking-time.selected {
2042
+ background: var(--booking-primary);
2043
+ border-color: var(--booking-primary);
2044
+ color: #fff;
2045
+ }
2046
+
2047
+ .uptrade-booking-time:disabled {
2048
+ opacity: 0.5;
2049
+ cursor: not-allowed;
2050
+ }
2051
+
2052
+ .uptrade-booking-loading,
2053
+ .uptrade-booking-empty {
2054
+ text-align: center;
2055
+ padding: 24px;
2056
+ color: #666;
2057
+ }
2058
+
2059
+ .uptrade-booking-hold-notice {
2060
+ background: #fef3c7;
2061
+ border: 1px solid #fcd34d;
2062
+ color: #92400e;
2063
+ padding: 8px 12px;
2064
+ border-radius: var(--booking-radius);
2065
+ font-size: 0.875rem;
2066
+ margin-bottom: 16px;
2067
+ }
2068
+
2069
+ .uptrade-booking-field {
2070
+ margin-bottom: 16px;
2071
+ }
2072
+
2073
+ .uptrade-booking-field label {
2074
+ display: block;
2075
+ margin-bottom: 4px;
2076
+ font-size: 0.875rem;
2077
+ font-weight: 500;
2078
+ }
2079
+
2080
+ .uptrade-booking-field input,
2081
+ .uptrade-booking-field textarea {
2082
+ width: 100%;
2083
+ padding: 10px 12px;
2084
+ border: 1px solid #e5e5e5;
2085
+ border-radius: var(--booking-radius);
2086
+ font-size: 1rem;
2087
+ font-family: inherit;
2088
+ }
2089
+
2090
+ .uptrade-booking-field input:focus,
2091
+ .uptrade-booking-field textarea:focus {
2092
+ outline: none;
2093
+ border-color: var(--booking-primary);
2094
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--booking-primary) 15%, transparent);
2095
+ }
2096
+
2097
+ .uptrade-booking-submit {
2098
+ width: 100%;
2099
+ padding: 14px;
2100
+ background: var(--booking-primary);
2101
+ color: #fff;
2102
+ border: none;
2103
+ border-radius: var(--booking-radius);
2104
+ font-size: 1rem;
2105
+ font-weight: 600;
2106
+ cursor: pointer;
2107
+ transition: opacity 0.2s;
2108
+ }
2109
+
2110
+ .uptrade-booking-submit:hover:not(:disabled) {
2111
+ opacity: 0.9;
2112
+ }
2113
+
2114
+ .uptrade-booking-submit:disabled {
2115
+ opacity: 0.5;
2116
+ cursor: not-allowed;
2117
+ }
2118
+
2119
+ .uptrade-booking-success {
2120
+ text-align: center;
2121
+ }
2122
+
2123
+ .uptrade-booking-success-icon {
2124
+ width: 64px;
2125
+ height: 64px;
2126
+ margin: 0 auto 16px;
2127
+ background: var(--booking-primary);
2128
+ color: #fff;
2129
+ border-radius: 50%;
2130
+ display: flex;
2131
+ align-items: center;
2132
+ justify-content: center;
2133
+ font-size: 2rem;
2134
+ }
2135
+
2136
+ .uptrade-booking-confirmation-code {
2137
+ font-family: monospace;
2138
+ background: #f5f5f5;
2139
+ padding: 8px 16px;
2140
+ border-radius: var(--booking-radius);
2141
+ display: inline-block;
2142
+ margin-bottom: 24px;
2143
+ }
2144
+
2145
+ .uptrade-booking-details {
2146
+ text-align: left;
2147
+ background: #f9f9f9;
2148
+ padding: 16px;
2149
+ border-radius: var(--booking-radius);
2150
+ margin-bottom: 24px;
2151
+ }
2152
+
2153
+ .uptrade-booking-details p {
2154
+ margin: 0 0 8px 0;
2155
+ }
2156
+
2157
+ .uptrade-booking-details p:last-child {
2158
+ margin-bottom: 0;
2159
+ }
2160
+
2161
+ .uptrade-booking-calendar-links {
2162
+ margin-bottom: 24px;
2163
+ }
2164
+
2165
+ .uptrade-booking-calendar-buttons {
2166
+ display: flex;
2167
+ gap: 8px;
2168
+ justify-content: center;
2169
+ margin-top: 8px;
2170
+ }
2171
+
2172
+ .uptrade-booking-calendar-btn {
2173
+ padding: 8px 16px;
2174
+ border: 1px solid #e5e5e5;
2175
+ border-radius: var(--booking-radius);
2176
+ text-decoration: none;
2177
+ color: #333;
2178
+ font-size: 0.875rem;
2179
+ transition: all 0.2s;
2180
+ }
2181
+
2182
+ .uptrade-booking-calendar-btn:hover {
2183
+ border-color: var(--booking-primary);
2184
+ color: var(--booking-primary);
2185
+ }
2186
+
2187
+ .uptrade-booking-email-notice {
2188
+ color: #666;
2189
+ font-size: 0.875rem;
2190
+ }
2191
+
2192
+ h4 {
2193
+ font-size: 0.875rem;
2194
+ font-weight: 600;
2195
+ margin: 0 0 12px 0;
2196
+ color: #666;
2197
+ }
2198
+ ` })
2199
+ ]
2200
+ }
2201
+ );
2202
+ }
2203
+
2204
+ Object.defineProperty(exports, "TestimonialSection", {
1392
2205
  enumerable: true,
1393
- get: function () { return chunk5R4R3WDP_js.SetupWizard; }
2206
+ get: function () { return chunkUJQ73OS6_js.TestimonialSection; }
1394
2207
  });
1395
- Object.defineProperty(exports, "clearRedirectCache", {
2208
+ Object.defineProperty(exports, "fetchReviewStats", {
1396
2209
  enumerable: true,
1397
- get: function () { return chunkBZBJVG5Y_js.clearRedirectCache; }
2210
+ get: function () { return chunkUJQ73OS6_js.fetchReviewStats; }
1398
2211
  });
1399
- Object.defineProperty(exports, "fetchRedirectRules", {
2212
+ Object.defineProperty(exports, "fetchReviews", {
1400
2213
  enumerable: true,
1401
- get: function () { return chunkBZBJVG5Y_js.fetchRedirectRules; }
2214
+ get: function () { return chunkUJQ73OS6_js.fetchReviews; }
1402
2215
  });
1403
- Object.defineProperty(exports, "generateNextRedirects", {
2216
+ Object.defineProperty(exports, "AEOBlock", {
1404
2217
  enumerable: true,
1405
- get: function () { return chunkBZBJVG5Y_js.generateNextRedirects; }
2218
+ get: function () { return chunkVOR53RUR_js.AEOBlock; }
1406
2219
  });
1407
- Object.defineProperty(exports, "handleManagedRedirects", {
2220
+ Object.defineProperty(exports, "AEOCitedContent", {
1408
2221
  enumerable: true,
1409
- get: function () { return chunkBZBJVG5Y_js.handleManagedRedirects; }
2222
+ get: function () { return chunkVOR53RUR_js.AEOCitedContent; }
1410
2223
  });
1411
- Object.defineProperty(exports, "ManagedImage", {
2224
+ Object.defineProperty(exports, "AEOClaim", {
1412
2225
  enumerable: true,
1413
- get: function () { return chunkO2OHHBUD_js.ManagedImage; }
2226
+ get: function () { return chunkVOR53RUR_js.AEOClaim; }
1414
2227
  });
1415
- Object.defineProperty(exports, "SignalBridge", {
2228
+ Object.defineProperty(exports, "AEOComparison", {
1416
2229
  enumerable: true,
1417
- get: function () { return chunkO2OHHBUD_js.SignalBridge; }
2230
+ get: function () { return chunkVOR53RUR_js.AEOComparison; }
1418
2231
  });
1419
- Object.defineProperty(exports, "SiteKitProvider", {
2232
+ Object.defineProperty(exports, "AEODefinition", {
1420
2233
  enumerable: true,
1421
- get: function () { return chunkO2OHHBUD_js.SiteKitProvider; }
2234
+ get: function () { return chunkVOR53RUR_js.AEODefinition; }
1422
2235
  });
1423
- Object.defineProperty(exports, "assignImageToSlot", {
2236
+ Object.defineProperty(exports, "AEOEntity", {
1424
2237
  enumerable: true,
1425
- get: function () { return chunkO2OHHBUD_js.assignImageToSlot; }
2238
+ get: function () { return chunkVOR53RUR_js.AEOEntity; }
1426
2239
  });
1427
- Object.defineProperty(exports, "clearImageSlot", {
2240
+ Object.defineProperty(exports, "AEOProvenanceList", {
1428
2241
  enumerable: true,
1429
- get: function () { return chunkO2OHHBUD_js.clearImageSlot; }
2242
+ get: function () { return chunkVOR53RUR_js.AEOProvenanceList; }
1430
2243
  });
1431
- Object.defineProperty(exports, "fetchManagedImage", {
2244
+ Object.defineProperty(exports, "AEOStep", {
1432
2245
  enumerable: true,
1433
- get: function () { return chunkO2OHHBUD_js.fetchManagedImage; }
2246
+ get: function () { return chunkVOR53RUR_js.AEOStep; }
1434
2247
  });
1435
- Object.defineProperty(exports, "fetchManagedImages", {
2248
+ Object.defineProperty(exports, "AEOSteps", {
1436
2249
  enumerable: true,
1437
- get: function () { return chunkO2OHHBUD_js.fetchManagedImages; }
2250
+ get: function () { return chunkVOR53RUR_js.AEOSteps; }
1438
2251
  });
1439
- Object.defineProperty(exports, "listImageFiles", {
2252
+ Object.defineProperty(exports, "AEOSummary", {
1440
2253
  enumerable: true,
1441
- get: function () { return chunkO2OHHBUD_js.listImageFiles; }
2254
+ get: function () { return chunkVOR53RUR_js.AEOSummary; }
1442
2255
  });
1443
- Object.defineProperty(exports, "uploadImage", {
2256
+ Object.defineProperty(exports, "DEFAULT_SPEAKABLE_SELECTORS", {
1444
2257
  enumerable: true,
1445
- get: function () { return chunkO2OHHBUD_js.uploadImage; }
2258
+ get: function () { return chunkVOR53RUR_js.DEFAULT_SPEAKABLE_SELECTORS; }
1446
2259
  });
1447
- Object.defineProperty(exports, "useSignal", {
2260
+ Object.defineProperty(exports, "SpeakableSchema", {
1448
2261
  enumerable: true,
1449
- get: function () { return chunkO2OHHBUD_js.useSignal; }
2262
+ get: function () { return chunkVOR53RUR_js.SpeakableSchema; }
1450
2263
  });
1451
- Object.defineProperty(exports, "useSignalConfig", {
2264
+ Object.defineProperty(exports, "createLLMsFullTxtHandler", {
1452
2265
  enumerable: true,
1453
- get: function () { return chunkO2OHHBUD_js.useSignalConfig; }
2266
+ get: function () { return chunkVOR53RUR_js.createLLMsFullTxtHandler; }
1454
2267
  });
1455
- Object.defineProperty(exports, "useSignalEvent", {
2268
+ Object.defineProperty(exports, "createLLMsTxtHandler", {
1456
2269
  enumerable: true,
1457
- get: function () { return chunkO2OHHBUD_js.useSignalEvent; }
2270
+ get: function () { return chunkVOR53RUR_js.createLLMsTxtHandler; }
1458
2271
  });
1459
- Object.defineProperty(exports, "useSignalExperiment", {
2272
+ Object.defineProperty(exports, "createSpeakableSchema", {
1460
2273
  enumerable: true,
1461
- get: function () { return chunkO2OHHBUD_js.useSignalExperiment; }
2274
+ get: function () { return chunkVOR53RUR_js.createSpeakableSchema; }
1462
2275
  });
1463
- Object.defineProperty(exports, "useSignalOutcome", {
2276
+ Object.defineProperty(exports, "generateLLMsFullTxt", {
1464
2277
  enumerable: true,
1465
- get: function () { return chunkO2OHHBUD_js.useSignalOutcome; }
2278
+ get: function () { return chunkVOR53RUR_js.generateLLMsFullTxt; }
1466
2279
  });
1467
- Object.defineProperty(exports, "useSiteKit", {
2280
+ Object.defineProperty(exports, "generateLLMsTxt", {
2281
+ enumerable: true,
2282
+ get: function () { return chunkVOR53RUR_js.generateLLMsTxt; }
2283
+ });
2284
+ Object.defineProperty(exports, "getBusinessInfo", {
2285
+ enumerable: true,
2286
+ get: function () { return chunkVOR53RUR_js.getBusinessInfo; }
2287
+ });
2288
+ Object.defineProperty(exports, "getLLMFAQItems", {
2289
+ enumerable: true,
2290
+ get: function () { return chunkVOR53RUR_js.getFAQItems; }
2291
+ });
2292
+ Object.defineProperty(exports, "getLLMServices", {
2293
+ enumerable: true,
2294
+ get: function () { return chunkVOR53RUR_js.getServices; }
2295
+ });
2296
+ Object.defineProperty(exports, "getLLMsData", {
2297
+ enumerable: true,
2298
+ get: function () { return chunkVOR53RUR_js.getLLMsData; }
2299
+ });
2300
+ Object.defineProperty(exports, "getPageSummaries", {
2301
+ enumerable: true,
2302
+ get: function () { return chunkVOR53RUR_js.getPageSummaries; }
2303
+ });
2304
+ Object.defineProperty(exports, "getSpeakableSelectorsForPage", {
1468
2305
  enumerable: true,
1469
- get: function () { return chunkO2OHHBUD_js.useSiteKit; }
2306
+ get: function () { return chunkVOR53RUR_js.getSpeakableSelectorsForPage; }
1470
2307
  });
1471
2308
  Object.defineProperty(exports, "CalendarView", {
1472
2309
  enumerable: true,
@@ -1564,13 +2401,105 @@ Object.defineProperty(exports, "useEventModal", {
1564
2401
  enumerable: true,
1565
2402
  get: function () { return chunkK2HWVOEO_js.useEventModal; }
1566
2403
  });
2404
+ Object.defineProperty(exports, "SetupWizard", {
2405
+ enumerable: true,
2406
+ get: function () { return chunk5R4R3WDP_js.SetupWizard; }
2407
+ });
2408
+ Object.defineProperty(exports, "clearRedirectCache", {
2409
+ enumerable: true,
2410
+ get: function () { return chunkBZBJVG5Y_js.clearRedirectCache; }
2411
+ });
2412
+ Object.defineProperty(exports, "fetchRedirectRules", {
2413
+ enumerable: true,
2414
+ get: function () { return chunkBZBJVG5Y_js.fetchRedirectRules; }
2415
+ });
2416
+ Object.defineProperty(exports, "generateNextRedirects", {
2417
+ enumerable: true,
2418
+ get: function () { return chunkBZBJVG5Y_js.generateNextRedirects; }
2419
+ });
2420
+ Object.defineProperty(exports, "handleManagedRedirects", {
2421
+ enumerable: true,
2422
+ get: function () { return chunkBZBJVG5Y_js.handleManagedRedirects; }
2423
+ });
2424
+ Object.defineProperty(exports, "ManagedImage", {
2425
+ enumerable: true,
2426
+ get: function () { return chunkTDK7DLCH_js.ManagedImage; }
2427
+ });
2428
+ Object.defineProperty(exports, "SignalBridge", {
2429
+ enumerable: true,
2430
+ get: function () { return chunkTDK7DLCH_js.SignalBridge; }
2431
+ });
2432
+ Object.defineProperty(exports, "SiteKitProvider", {
2433
+ enumerable: true,
2434
+ get: function () { return chunkTDK7DLCH_js.SiteKitProvider; }
2435
+ });
2436
+ Object.defineProperty(exports, "assignImageToSlot", {
2437
+ enumerable: true,
2438
+ get: function () { return chunkTDK7DLCH_js.assignImageToSlot; }
2439
+ });
2440
+ Object.defineProperty(exports, "clearImageSlot", {
2441
+ enumerable: true,
2442
+ get: function () { return chunkTDK7DLCH_js.clearImageSlot; }
2443
+ });
2444
+ Object.defineProperty(exports, "fetchManagedImage", {
2445
+ enumerable: true,
2446
+ get: function () { return chunkTDK7DLCH_js.fetchManagedImage; }
2447
+ });
2448
+ Object.defineProperty(exports, "fetchManagedImages", {
2449
+ enumerable: true,
2450
+ get: function () { return chunkTDK7DLCH_js.fetchManagedImages; }
2451
+ });
2452
+ Object.defineProperty(exports, "listImageFiles", {
2453
+ enumerable: true,
2454
+ get: function () { return chunkTDK7DLCH_js.listImageFiles; }
2455
+ });
2456
+ Object.defineProperty(exports, "uploadImage", {
2457
+ enumerable: true,
2458
+ get: function () { return chunkTDK7DLCH_js.uploadImage; }
2459
+ });
2460
+ Object.defineProperty(exports, "useSignal", {
2461
+ enumerable: true,
2462
+ get: function () { return chunkTDK7DLCH_js.useSignal; }
2463
+ });
2464
+ Object.defineProperty(exports, "useSignalConfig", {
2465
+ enumerable: true,
2466
+ get: function () { return chunkTDK7DLCH_js.useSignalConfig; }
2467
+ });
2468
+ Object.defineProperty(exports, "useSignalEvent", {
2469
+ enumerable: true,
2470
+ get: function () { return chunkTDK7DLCH_js.useSignalEvent; }
2471
+ });
2472
+ Object.defineProperty(exports, "useSignalExperiment", {
2473
+ enumerable: true,
2474
+ get: function () { return chunkTDK7DLCH_js.useSignalExperiment; }
2475
+ });
2476
+ Object.defineProperty(exports, "useSignalOutcome", {
2477
+ enumerable: true,
2478
+ get: function () { return chunkTDK7DLCH_js.useSignalOutcome; }
2479
+ });
2480
+ Object.defineProperty(exports, "useSiteKit", {
2481
+ enumerable: true,
2482
+ get: function () { return chunkTDK7DLCH_js.useSiteKit; }
2483
+ });
1567
2484
  exports.AffiliateCard = AffiliateCard;
1568
2485
  exports.AffiliatesWidget = AffiliatesWidget;
2486
+ exports.BookingWidget = BookingWidget;
1569
2487
  exports.ExperimentConversion = ExperimentConversion;
1570
2488
  exports.SetupAssistant = SetupAssistant;
1571
2489
  exports.SignalExperiment = SignalExperiment;
2490
+ exports.createBooking = createBooking;
2491
+ exports.createSlotHold = createSlotHold;
2492
+ exports.detectTimezone = detectTimezone;
1572
2493
  exports.fetchAffiliates = fetchAffiliates;
2494
+ exports.fetchAvailability = fetchAvailability;
2495
+ exports.fetchAvailableDates = fetchAvailableDates;
2496
+ exports.fetchBookingTypeDetails = fetchBookingTypeDetails;
2497
+ exports.fetchBookingTypes = fetchBookingTypes;
2498
+ exports.formatBookingDate = formatDate2;
2499
+ exports.formatBookingTime = formatTime;
2500
+ exports.formatDuration = formatDuration;
1573
2501
  exports.getTrackingUrl = getTrackingUrl;
2502
+ exports.releaseSlotHold = releaseSlotHold;
1574
2503
  exports.useAffiliates = useAffiliates;
1575
2504
  exports.useExperimentVariant = useExperimentVariant;
1576
2505
  //# sourceMappingURL=index.js.map