@burdenoff/microfe-labsofscience 2026.626.2 → 2026.629.1

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 (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,653 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { useInvestmentOpportunities as i, useOfferings as ee, useProviders as a } from "../../hooks/useLabsOfScienceApi.js";
6
- import { formatCurrency as o, formatDistance as s, formatDuration as c } from "../../utils/formatters.js";
7
- import { useMemo as l, useState as u } from "react";
8
- import { ArrowLeft as d, Calendar as f, CheckCircle2 as p, Clock as m, Flame as h, Home as g, Leaf as _, MapPin as v, Minus as y, Plus as b, Search as x, ShoppingCart as S, Star as C, TrendingUp as te, X as w } from "lucide-react";
9
- import { useParams as T } from "react-router-dom";
10
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
11
- import { EmphasisPanel as k, NextSteps as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
12
- //#region src/labsofscience/pages/customer/CartDetailPage.tsx
13
- function M() {
14
- let { cartId: M } = T(), { navigateTo: N } = e(), { data: P = [], isLoading: ne } = a(), { data: F = [], isLoading: re } = ee(M), { data: I = [], isLoading: ie } = i(), L = l(() => P.find((e) => e.id === M), [P, M]), R = l(() => I.find((e) => e.cartId === M), [I, M]), [z, B] = u(""), [V, H] = u(""), [U, W] = u([]), [G, K] = u(!1), [q, J] = u(null), Y = l(() => F.map((e) => ({
15
- id: e.id,
16
- name: e.name,
17
- price: e.price,
18
- description: e.description,
19
- image: e.media?.[0] || "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=400",
20
- category: e.category,
21
- isVeg: !0,
22
- duration: e.durationMinutes,
23
- serviceType: e.serviceType
24
- })), [F]), X = l(() => [...new Set(Y.map((e) => e.category))], [Y]), Z = l(() => {
25
- let e = Y;
26
- if (V && (e = e.filter((e) => e.category === V)), z.trim()) {
27
- let t = z.toLowerCase();
28
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.description.toLowerCase().includes(t));
29
- }
30
- return e;
31
- }, [
32
- Y,
33
- V,
34
- z
35
- ]), ae = l(() => {
36
- let e = {};
37
- return Z.forEach((t) => {
38
- e[t.category] || (e[t.category] = []), e[t.category].push(t);
39
- }), e;
40
- }, [Z]), oe = (e, t = 1, n) => {
41
- W((r) => r.find((t) => t.productId === e.id) ? r.map((n) => n.productId === e.id ? {
42
- ...n,
43
- quantity: n.quantity + t
44
- } : n) : [...r, {
45
- id: `cart-${Date.now()}`,
46
- productId: e.id,
47
- name: e.name,
48
- price: e.price,
49
- quantity: t,
50
- specialInstructions: n
51
- }]);
52
- }, Q = (e, t) => {
53
- W((n) => n.map((n) => n.productId === e ? {
54
- ...n,
55
- quantity: Math.max(0, n.quantity + t)
56
- } : n).filter((e) => e.quantity > 0));
57
- }, $ = (e) => {
58
- W((t) => t.filter((t) => t.productId !== e));
59
- }, se = (e) => U.find((t) => t.productId === e)?.quantity ?? 0, ce = U.reduce((e, t) => e + t.price * t.quantity, 0), le = U.reduce((e, t) => e + t.quantity, 0), ue = (e) => {
60
- J({
61
- product: e,
62
- quantity: 1,
63
- specialInstructions: ""
64
- }), K(!0);
65
- }, de = () => {
66
- q && (oe(q.product, q.quantity, q.specialInstructions), K(!1), J(null), alert(`${q.product.name} added to cart`));
67
- };
68
- return L ? /* @__PURE__ */ O(n, {
69
- title: /* @__PURE__ */ O("div", {
70
- className: "flex items-center gap-3",
71
- children: [
72
- /* @__PURE__ */ D("button", {
73
- type: "button",
74
- onClick: () => N("/customer/carts"),
75
- className: "rounded-md p-1 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
76
- children: /* @__PURE__ */ D(d, { className: "h-5 w-5" })
77
- }),
78
- /* @__PURE__ */ D("span", {
79
- className: "truncate",
80
- children: L.name
81
- }),
82
- L.isVerified && /* @__PURE__ */ D(p, { className: "h-5 w-5 text-status-info-text shrink-0" })
83
- ]
84
- }),
85
- description: L.category,
86
- children: [
87
- /* @__PURE__ */ D(j, {
88
- icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" }),
89
- className: "mb-6",
90
- children: "Browse everything this cart offers and build your order. Search the menu, filter by category, customise items and quantities, then review your order in the panel on the right and head to checkout — you can also book a direct service or explore investing in the cart."
91
- }),
92
- /* @__PURE__ */ D(A, {
93
- storageKey: "labsofscience-cart-detail",
94
- steps: [
95
- {
96
- id: "browse",
97
- label: "Add items to your order",
98
- description: "Tap Add on any menu item to start your cart.",
99
- icon: /* @__PURE__ */ D(b, { className: "h-4 w-4" }),
100
- onClick: () => document.getElementById("labsofscience-menu")?.scrollIntoView({ behavior: "smooth" })
101
- },
102
- {
103
- id: "checkout",
104
- label: "Proceed to checkout",
105
- description: "Review your order and place it once you’re ready.",
106
- icon: /* @__PURE__ */ D(S, { className: "h-4 w-4" }),
107
- onClick: () => N("/customer/checkout")
108
- },
109
- ...L.serviceTypes?.includes("direct_service") ? [{
110
- id: "direct",
111
- label: "Book a direct service",
112
- description: "Have this cart come to your location.",
113
- icon: /* @__PURE__ */ D(g, { className: "h-4 w-4" }),
114
- onClick: () => N(`/customer/carts/${L.id}`)
115
- }] : []
116
- ]
117
- }),
118
- /* @__PURE__ */ O("div", {
119
- className: "relative h-48 rounded-lg bg-bg-sunken overflow-hidden",
120
- children: [/* @__PURE__ */ D("img", {
121
- src: L.image,
122
- alt: L.name,
123
- className: "h-full w-full object-cover"
124
- }), /* @__PURE__ */ D("div", {
125
- className: "absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/60 to-transparent p-4",
126
- children: /* @__PURE__ */ O("div", {
127
- className: "flex items-center gap-3",
128
- children: [/* @__PURE__ */ D("span", {
129
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", L.isOpen ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
130
- children: L.isOpen ? "Open Now" : "Closed"
131
- }), /* @__PURE__ */ O("div", {
132
- className: "flex items-center gap-1 text-white text-sm",
133
- children: [
134
- /* @__PURE__ */ D(C, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }),
135
- /* @__PURE__ */ D("span", {
136
- className: "font-medium",
137
- children: L.rating
138
- }),
139
- /* @__PURE__ */ O("span", {
140
- className: "text-white/70",
141
- children: [
142
- "(",
143
- L.totalRatings,
144
- ")"
145
- ]
146
- })
147
- ]
148
- })]
149
- })
150
- })]
151
- }),
152
- !L.isOpen && /* @__PURE__ */ D("div", {
153
- className: "mt-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-3",
154
- children: /* @__PURE__ */ O("p", {
155
- className: "text-sm text-status-warning-text",
156
- children: [/* @__PURE__ */ D("strong", { children: "This cart is currently closed." }), " You can browse the offerings but orders are not being accepted."]
157
- })
158
- }),
159
- /* @__PURE__ */ O("div", {
160
- className: "mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3",
161
- children: [
162
- /* @__PURE__ */ O("div", {
163
- className: "rounded-lg border border-border-seam bg-bg-surface p-3",
164
- children: [
165
- /* @__PURE__ */ O("div", {
166
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
167
- children: [/* @__PURE__ */ D(v, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
168
- className: "font-medium uppercase tracking-wider",
169
- children: "Location"
170
- })]
171
- }),
172
- /* @__PURE__ */ D("p", {
173
- className: "text-sm text-text-primary",
174
- children: L.location.address
175
- }),
176
- /* @__PURE__ */ O("p", {
177
- className: "text-xs text-text-secondary",
178
- children: [s(L.distance), " away"]
179
- })
180
- ]
181
- }),
182
- /* @__PURE__ */ O("div", {
183
- className: "rounded-lg border border-border-seam bg-bg-surface p-3",
184
- children: [
185
- /* @__PURE__ */ O("div", {
186
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
187
- children: [/* @__PURE__ */ D(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
188
- className: "font-medium uppercase tracking-wider",
189
- children: "Estimated Time"
190
- })]
191
- }),
192
- /* @__PURE__ */ D("p", {
193
- className: "text-sm text-text-primary",
194
- children: c(L.estimatedTime)
195
- }),
196
- L.averageOrderValue && /* @__PURE__ */ O("p", {
197
- className: "text-xs text-text-secondary",
198
- children: ["Avg ", o(L.averageOrderValue, { minimumFractionDigits: 0 })]
199
- })
200
- ]
201
- }),
202
- /* @__PURE__ */ O("div", {
203
- className: "rounded-lg border border-border-seam bg-bg-surface p-3",
204
- children: [
205
- /* @__PURE__ */ O("div", {
206
- className: "flex items-center gap-2 text-text-secondary text-xs mb-1",
207
- children: [/* @__PURE__ */ D(C, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ D("span", {
208
- className: "font-medium uppercase tracking-wider",
209
- children: "Rating"
210
- })]
211
- }),
212
- /* @__PURE__ */ O("p", {
213
- className: "text-sm text-text-primary",
214
- children: [L.rating, " / 5.0"]
215
- }),
216
- /* @__PURE__ */ O("p", {
217
- className: "text-xs text-text-secondary",
218
- children: [L.totalRatings, " reviews"]
219
- })
220
- ]
221
- })
222
- ]
223
- }),
224
- L.businessHours && Object.keys(L.businessHours).length > 0 && /* @__PURE__ */ O("section", {
225
- className: "mt-6",
226
- children: [/* @__PURE__ */ D("h2", {
227
- className: "text-base font-semibold text-text-primary mb-2",
228
- children: "Operating Hours"
229
- }), /* @__PURE__ */ D("div", {
230
- className: "rounded-lg border border-border-seam bg-bg-surface overflow-hidden",
231
- children: Object.entries(L.businessHours).map(([e, t]) => /* @__PURE__ */ O("div", {
232
- className: "flex items-center justify-between px-4 py-2 border-b border-border-seam last:border-b-0",
233
- children: [/* @__PURE__ */ D("span", {
234
- className: "text-sm font-medium text-text-primary capitalize",
235
- children: e
236
- }), t.isOpen ? /* @__PURE__ */ O("span", {
237
- className: "text-sm text-text-secondary",
238
- children: [
239
- t.open,
240
- " - ",
241
- t.close
242
- ]
243
- }) : /* @__PURE__ */ D("span", {
244
- className: "text-sm text-status-error-text",
245
- children: "Closed"
246
- })]
247
- }, e))
248
- })]
249
- }),
250
- /* @__PURE__ */ O("div", {
251
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
252
- children: [/* @__PURE__ */ O("div", {
253
- className: "lg:col-span-2",
254
- children: [
255
- /* @__PURE__ */ O("div", {
256
- className: "flex flex-col gap-3 sm:flex-row mb-4",
257
- children: [/* @__PURE__ */ O("div", {
258
- className: "relative flex-1",
259
- children: [/* @__PURE__ */ D(x, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ D("input", {
260
- type: "text",
261
- placeholder: "Search offerings...",
262
- value: z,
263
- onChange: (e) => B(e.target.value),
264
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 pl-10 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
265
- })]
266
- }), /* @__PURE__ */ O("select", {
267
- value: V,
268
- onChange: (e) => H(e.target.value),
269
- className: "rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
270
- children: [/* @__PURE__ */ D("option", {
271
- value: "",
272
- children: "All Categories"
273
- }), X.map((e) => /* @__PURE__ */ D("option", {
274
- value: e,
275
- children: e
276
- }, e))]
277
- })]
278
- }),
279
- /* @__PURE__ */ O("h2", {
280
- id: "labsofscience-menu",
281
- className: "text-lg font-semibold text-text-primary mb-3",
282
- children: [
283
- "Menu & Services (",
284
- Z.length,
285
- ")"
286
- ]
287
- }),
288
- Z.length === 0 ? /* @__PURE__ */ D(r, {
289
- illustration: z || V ? "empty-search" : "empty-data",
290
- icon: /* @__PURE__ */ D(x, { className: "h-12 w-12" }),
291
- title: "No offerings found",
292
- description: z || V ? "Try a different search term or category filter." : "This cart has not listed any offerings yet."
293
- }) : /* @__PURE__ */ D("div", {
294
- className: "space-y-6",
295
- children: Object.entries(ae).map(([e, n]) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h3", {
296
- className: "text-sm font-semibold text-text-primary mb-2 px-1",
297
- children: e
298
- }), /* @__PURE__ */ D("div", {
299
- className: "space-y-2",
300
- children: n.map((e) => {
301
- let n = se(e.id);
302
- return /* @__PURE__ */ O("div", {
303
- className: "flex gap-4 rounded-lg border border-border-seam bg-bg-surface p-4",
304
- children: [/* @__PURE__ */ D("div", {
305
- className: "h-20 w-20 shrink-0 rounded-md bg-bg-sunken overflow-hidden",
306
- children: /* @__PURE__ */ D("img", {
307
- src: e.image,
308
- alt: e.name,
309
- className: "h-full w-full object-cover"
310
- })
311
- }), /* @__PURE__ */ O("div", {
312
- className: "flex-1 min-w-0",
313
- children: [
314
- /* @__PURE__ */ O("div", {
315
- className: "flex items-start justify-between gap-2",
316
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("div", {
317
- className: "flex items-center gap-2",
318
- children: [/* @__PURE__ */ D("h4", {
319
- className: "text-sm font-semibold text-text-primary",
320
- children: e.name
321
- }), e.isVeg && /* @__PURE__ */ D(_, { className: "h-3.5 w-3.5 text-status-success-text" })]
322
- }), /* @__PURE__ */ D("p", {
323
- className: "text-xs text-text-secondary mt-0.5",
324
- children: e.category
325
- })] }), /* @__PURE__ */ D("span", {
326
- className: "text-sm font-bold text-text-primary whitespace-nowrap",
327
- children: o(e.price, { minimumFractionDigits: 0 })
328
- })]
329
- }),
330
- /* @__PURE__ */ D("p", {
331
- className: "mt-1 text-xs text-text-secondary line-clamp-2",
332
- children: e.description
333
- }),
334
- /* @__PURE__ */ O("div", {
335
- className: "mt-2 flex flex-wrap items-center gap-2 text-[10px] text-text-secondary",
336
- children: [
337
- e.duration != null && e.duration > 0 && /* @__PURE__ */ O("span", {
338
- className: "flex items-center gap-0.5",
339
- children: [/* @__PURE__ */ D(m, { className: "h-3 w-3" }), c(e.duration)]
340
- }),
341
- e.serviceType && /* @__PURE__ */ D("span", {
342
- className: "rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
343
- children: e.serviceType
344
- }),
345
- e.spiceLevel && /* @__PURE__ */ O("span", {
346
- className: "flex items-center gap-0.5 rounded bg-bg-sunken px-1.5 py-0.5 capitalize",
347
- children: [/* @__PURE__ */ D(h, { className: "h-3 w-3" }), e.spiceLevel]
348
- })
349
- ]
350
- }),
351
- /* @__PURE__ */ D("div", {
352
- className: "mt-2 flex justify-end",
353
- children: n > 0 ? /* @__PURE__ */ O("div", {
354
- className: "flex items-center gap-2",
355
- children: [
356
- /* @__PURE__ */ D("button", {
357
- type: "button",
358
- onClick: () => Q(e.id, -1),
359
- className: "flex h-7 w-7 items-center justify-center rounded-full bg-bg-sunken text-text-primary hover:bg-accent",
360
- children: /* @__PURE__ */ D(y, { className: "h-3.5 w-3.5" })
361
- }),
362
- /* @__PURE__ */ D("span", {
363
- className: "min-w-[2ch] text-center text-sm font-medium text-text-primary",
364
- children: n
365
- }),
366
- /* @__PURE__ */ D("button", {
367
- type: "button",
368
- onClick: () => Q(e.id, 1),
369
- className: "flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-background hover:opacity-90",
370
- children: /* @__PURE__ */ D(b, { className: "h-3.5 w-3.5" })
371
- }),
372
- /* @__PURE__ */ D("button", {
373
- type: "button",
374
- onClick: () => $(e.id),
375
- className: "ml-1 flex h-7 w-7 items-center justify-center rounded-full text-status-error-text hover:bg-status-error-bg/10",
376
- children: /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" })
377
- })
378
- ]
379
- }) : /* @__PURE__ */ D("button", {
380
- type: "button",
381
- disabled: !L.isOpen,
382
- onClick: () => ue(e),
383
- className: t("rounded-lg px-4 py-1.5 text-xs font-medium transition-opacity", L.isOpen ? "bg-foreground text-background hover:opacity-90" : "bg-bg-sunken text-text-secondary cursor-not-allowed"),
384
- children: "Add"
385
- })
386
- })
387
- ]
388
- })]
389
- }, e.id);
390
- })
391
- })] }, e))
392
- })
393
- ]
394
- }), /* @__PURE__ */ O("div", {
395
- className: "space-y-4",
396
- children: [
397
- /* @__PURE__ */ O(k, {
398
- className: "p-4 lg:sticky lg:top-6",
399
- children: [/* @__PURE__ */ O("h3", {
400
- className: "text-base font-semibold text-text-primary mb-3 flex items-center gap-2",
401
- children: [/* @__PURE__ */ D(S, { className: "h-4 w-4" }), "Your Order"]
402
- }), U.length === 0 ? /* @__PURE__ */ D(r, {
403
- illustration: "empty-data",
404
- icon: /* @__PURE__ */ D(S, { className: "h-8 w-8" }),
405
- title: "Your cart is empty",
406
- description: "Add items from the menu to start your order.",
407
- className: "py-6"
408
- }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
409
- className: "space-y-2 max-h-64 overflow-y-auto mb-3",
410
- children: U.map((e) => /* @__PURE__ */ O("div", {
411
- className: "flex items-center justify-between gap-2",
412
- children: [/* @__PURE__ */ O("div", {
413
- className: "flex-1 min-w-0",
414
- children: [/* @__PURE__ */ D("p", {
415
- className: "text-sm font-medium text-text-primary truncate",
416
- children: e.name
417
- }), /* @__PURE__ */ O("p", {
418
- className: "text-xs text-text-secondary",
419
- children: [
420
- o(e.price, { minimumFractionDigits: 0 }),
421
- " x",
422
- " ",
423
- e.quantity
424
- ]
425
- })]
426
- }), /* @__PURE__ */ O("div", {
427
- className: "flex items-center gap-1",
428
- children: [
429
- /* @__PURE__ */ D("button", {
430
- type: "button",
431
- onClick: () => Q(e.productId, -1),
432
- className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
433
- children: "-"
434
- }),
435
- /* @__PURE__ */ D("span", {
436
- className: "min-w-[2ch] text-center text-xs font-medium",
437
- children: e.quantity
438
- }),
439
- /* @__PURE__ */ D("button", {
440
- type: "button",
441
- onClick: () => Q(e.productId, 1),
442
- className: "flex h-6 w-6 items-center justify-center rounded bg-bg-sunken text-text-primary text-xs",
443
- children: "+"
444
- }),
445
- /* @__PURE__ */ D("button", {
446
- type: "button",
447
- onClick: () => $(e.productId),
448
- className: "ml-1 text-status-error-text hover:text-status-error-text/80",
449
- children: /* @__PURE__ */ D(w, { className: "h-3.5 w-3.5" })
450
- })
451
- ]
452
- })]
453
- }, e.id))
454
- }), /* @__PURE__ */ O("div", {
455
- className: "border-t border-border-seam pt-3",
456
- children: [/* @__PURE__ */ O("div", {
457
- className: "flex justify-between items-center mb-3",
458
- children: [/* @__PURE__ */ O("span", {
459
- className: "text-sm font-semibold text-text-primary",
460
- children: ["Total: ", o(ce, { minimumFractionDigits: 0 })]
461
- }), /* @__PURE__ */ O("span", {
462
- className: "text-xs text-text-secondary",
463
- children: [le, " items"]
464
- })]
465
- }), /* @__PURE__ */ D("button", {
466
- type: "button",
467
- onClick: () => N("/customer/checkout"),
468
- className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
469
- children: "Proceed to Checkout"
470
- })]
471
- })] })]
472
- }),
473
- L.serviceTypes?.includes("direct_service") && /* @__PURE__ */ O("div", {
474
- className: "rounded-lg border border-accent-purple bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] p-4",
475
- children: [
476
- /* @__PURE__ */ O("h3", {
477
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
478
- children: [/* @__PURE__ */ D(g, { className: "h-4 w-4 text-accent-purple" }), "Direct Service"]
479
- }),
480
- /* @__PURE__ */ D("p", {
481
- className: "text-xs text-text-secondary mb-3",
482
- children: "Cart comes to your location!"
483
- }),
484
- /* @__PURE__ */ D("button", {
485
- type: "button",
486
- onClick: () => N(`/customer/carts/${L.id}`),
487
- className: "w-full rounded-lg bg-accent-purple py-2 text-xs font-medium text-white hover:bg-accent-purple transition-colors",
488
- children: "Book Direct Service"
489
- })
490
- ]
491
- }),
492
- L.serviceTypes?.includes("appointment") && /* @__PURE__ */ O("div", {
493
- className: "rounded-lg border border-status-info-border bg-status-info-bg-subtle p-4",
494
- children: [/* @__PURE__ */ O("h3", {
495
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
496
- children: [/* @__PURE__ */ D(f, { className: "h-4 w-4 text-status-info-text" }), "Appointments Available"]
497
- }), /* @__PURE__ */ D("p", {
498
- className: "text-xs text-text-secondary",
499
- children: "This service provider accepts appointments. Contact them to schedule."
500
- })]
501
- }),
502
- R && /* @__PURE__ */ O("div", {
503
- className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4",
504
- children: [
505
- /* @__PURE__ */ O("h3", {
506
- className: "text-sm font-semibold text-text-primary flex items-center gap-2 mb-2",
507
- children: [/* @__PURE__ */ D(te, { className: "h-4 w-4 text-status-success-text" }), "Investment Opportunity"]
508
- }),
509
- /* @__PURE__ */ D("p", {
510
- className: "text-xs text-text-secondary mb-2",
511
- children: R.description
512
- }),
513
- /* @__PURE__ */ O("div", {
514
- className: "space-y-1 text-xs text-text-secondary mb-3",
515
- children: [
516
- /* @__PURE__ */ O("p", { children: ["Target: ", o(R.targetAmount, { minimumFractionDigits: 0 })] }),
517
- /* @__PURE__ */ O("p", { children: ["Raised: ", o(R.raisedAmount, { minimumFractionDigits: 0 })] }),
518
- /* @__PURE__ */ O("p", { children: [
519
- "Expected Returns: ",
520
- R.expectedReturns,
521
- "%"
522
- ] }),
523
- /* @__PURE__ */ O("p", { children: [
524
- "Min Investment:",
525
- " ",
526
- o(R.minimumInvestment, { minimumFractionDigits: 0 })
527
- ] })
528
- ]
529
- }),
530
- /* @__PURE__ */ D("button", {
531
- type: "button",
532
- onClick: () => alert("Navigate to investor section to fund this business."),
533
- className: "w-full rounded-lg bg-status-success-bg py-2 text-xs font-medium text-white hover:bg-status-success-bg transition-colors",
534
- children: "Fund This Business"
535
- })
536
- ]
537
- })
538
- ]
539
- })]
540
- }),
541
- G && q && /* @__PURE__ */ D("div", {
542
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
543
- children: /* @__PURE__ */ D("div", {
544
- className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface",
545
- children: /* @__PURE__ */ O("div", {
546
- className: "p-5",
547
- children: [
548
- /* @__PURE__ */ O("div", {
549
- className: "flex items-center justify-between mb-4",
550
- children: [/* @__PURE__ */ D("h3", {
551
- className: "text-lg font-semibold text-text-primary",
552
- children: q.product.name
553
- }), /* @__PURE__ */ D("button", {
554
- type: "button",
555
- onClick: () => {
556
- K(!1), J(null);
557
- },
558
- className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
559
- children: /* @__PURE__ */ D(w, { className: "h-5 w-5" })
560
- })]
561
- }),
562
- /* @__PURE__ */ D("p", {
563
- className: "text-sm text-text-secondary mb-4",
564
- children: q.product.description
565
- }),
566
- /* @__PURE__ */ D("p", {
567
- className: "text-lg font-bold text-text-primary mb-4",
568
- children: o(q.product.price, { minimumFractionDigits: 0 })
569
- }),
570
- /* @__PURE__ */ O("div", {
571
- className: "mb-4",
572
- children: [/* @__PURE__ */ D("label", {
573
- className: "block text-sm font-medium text-text-primary mb-2",
574
- children: "Quantity"
575
- }), /* @__PURE__ */ O("div", {
576
- className: "flex items-center gap-3",
577
- children: [
578
- /* @__PURE__ */ D("button", {
579
- type: "button",
580
- onClick: () => J((e) => e && {
581
- ...e,
582
- quantity: Math.max(1, e.quantity - 1)
583
- }),
584
- className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
585
- children: /* @__PURE__ */ D(y, { className: "h-4 w-4" })
586
- }),
587
- /* @__PURE__ */ D("span", {
588
- className: "min-w-[2ch] text-center font-medium text-text-primary",
589
- children: q.quantity
590
- }),
591
- /* @__PURE__ */ D("button", {
592
- type: "button",
593
- onClick: () => J((e) => e && {
594
- ...e,
595
- quantity: e.quantity + 1
596
- }),
597
- className: "flex h-8 w-8 items-center justify-center rounded-full bg-bg-sunken text-text-primary",
598
- children: /* @__PURE__ */ D(b, { className: "h-4 w-4" })
599
- })
600
- ]
601
- })]
602
- }),
603
- /* @__PURE__ */ O("div", {
604
- className: "mb-4",
605
- children: [/* @__PURE__ */ D("label", {
606
- className: "block text-sm font-medium text-text-primary mb-2",
607
- children: "Special Instructions"
608
- }), /* @__PURE__ */ D("textarea", {
609
- value: q.specialInstructions,
610
- onChange: (e) => J((t) => t && {
611
- ...t,
612
- specialInstructions: e.target.value
613
- }),
614
- placeholder: "Any special requests...",
615
- className: "w-full rounded-lg border border-border-seam bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
616
- rows: 3
617
- })]
618
- }),
619
- /* @__PURE__ */ O("button", {
620
- type: "button",
621
- onClick: de,
622
- className: "w-full rounded-lg bg-foreground py-2.5 text-sm font-medium text-background hover:opacity-90 transition-opacity",
623
- children: [
624
- "Add to Cart -",
625
- " ",
626
- o(q.product.price * q.quantity, { minimumFractionDigits: 0 })
627
- ]
628
- })
629
- ]
630
- })
631
- })
632
- })
633
- ]
634
- }) : /* @__PURE__ */ D(n, {
635
- title: "Cart Not Found",
636
- children: /* @__PURE__ */ D(r, {
637
- illustration: "empty-data",
638
- icon: /* @__PURE__ */ D(S, { className: "h-12 w-12" }),
639
- title: "Cart not found",
640
- description: `No cart found with ID "${M}".`,
641
- action: /* @__PURE__ */ D("button", {
642
- type: "button",
643
- onClick: () => N("/customer/carts"),
644
- className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
645
- children: "Browse Carts"
646
- })
647
- })
648
- });
649
- }
650
- //#endregion
651
- export { M as CartDetailPage };
652
-
653
- //# sourceMappingURL=CartDetailPage.js.map