@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

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 (96) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +260 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  14. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  16. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  18. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  20. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  22. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  24. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
  28. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  30. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
  32. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  40. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  42. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  44. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  46. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  48. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  50. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  52. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  54. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  56. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  58. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  63. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  65. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  67. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  69. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  70. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
  71. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  73. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  74. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
  75. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  76. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
  77. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  78. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  79. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  80. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
  81. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  82. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
  83. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  84. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
  85. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  86. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
  87. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  88. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
  89. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  90. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
  91. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/kadaikodi/mocks/data.js +0 -1517
  94. package/dist/kadaikodi/mocks/data.js.map +0 -1
  95. package/dist/kadaikodi/mocks/users.js +0 -34
  96. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -2,236 +2,70 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i, formatNumber as a } from "../../utils/formatters.js";
6
- import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
7
- import { CheckCircle2 as u, Eye as d, FileText as f, IndianRupee as p, MapPin as m, Search as h, Star as g, X as _ } from "lucide-react";
8
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
9
- import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
5
+ import { useInvest as i, useInvestmentOpportunities as a } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as o } from "../../utils/formatters.js";
7
+ import { useCallback as s, useMemo as c, useState as l } from "react";
8
+ import { Briefcase as u, CheckCircle2 as d, Eye as f, FileText as p, IndianRupee as m, Search as h, X as g } from "lucide-react";
9
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
+ import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
10
11
  //#region src/kadaikodi/pages/investor/InvestmentOpportunitiesPage.tsx
11
- var S = [
12
- {
13
- id: "opp-001",
14
- cartId: "cart-005",
15
- cartName: "Organic Salad Bar",
16
- cartOwner: "Sarah Johnson",
17
- description: "Premium organic salad bar serving health-conscious customers in tech parks. Looking to expand to 3 new locations.",
18
- targetAmount: 5e5,
19
- raisedAmount: 325e3,
20
- minimumInvestment: 25e3,
21
- maximumInvestment: 1e5,
22
- investorCount: 8,
23
- daysLeft: 15,
24
- expectedReturns: 22,
25
- paybackPeriod: 36,
26
- riskLevel: "low",
27
- category: "Healthy Food",
28
- location: "Whitefield, Bangalore",
29
- image: "https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=400",
30
- businessMetrics: {
31
- monthlyRevenue: 28e4,
32
- monthlyOrders: 1800,
33
- averageOrderValue: 156,
34
- rating: 4.9,
35
- reviewCount: 342,
36
- operatingSince: "2022-03-15"
37
- },
38
- financials: {
39
- grossMargin: 65,
40
- netMargin: 28,
41
- monthlyExpenses: 78e3,
42
- breakEvenAchieved: !0
43
- },
44
- investmentTerms: {
45
- equityOffered: 25,
46
- dividendFrequency: "monthly",
47
- lockInPeriod: 24,
48
- exitOptions: [
49
- "Buyback",
50
- "Secondary Sale",
51
- "IPO"
52
- ]
53
- },
54
- documents: [
55
- {
56
- name: "Business Plan",
57
- type: "PDF",
58
- uploadedOn: "2024-06-01"
59
- },
60
- {
61
- name: "Financial Statements",
62
- type: "PDF",
63
- uploadedOn: "2024-06-01"
64
- },
65
- {
66
- name: "Legal Documents",
67
- type: "PDF",
68
- uploadedOn: "2024-06-01"
69
- }
70
- ],
71
- status: "active"
72
- },
73
- {
74
- id: "opp-002",
75
- cartId: "cart-006",
76
- cartName: "Midnight Munchies",
77
- cartOwner: "Ravi Mehta",
78
- description: "Late-night food delivery cart specializing in comfort food for night shift workers and students. Operating near IT corridors.",
79
- targetAmount: 3e5,
80
- raisedAmount: 18e4,
81
- minimumInvestment: 15e3,
82
- maximumInvestment: 75e3,
83
- investorCount: 12,
84
- daysLeft: 22,
85
- expectedReturns: 18,
86
- paybackPeriod: 30,
87
- riskLevel: "medium",
88
- category: "Fast Food",
89
- location: "Electronic City, Bangalore",
90
- image: "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?w=400",
91
- businessMetrics: {
92
- monthlyRevenue: 195e3,
93
- monthlyOrders: 1200,
94
- averageOrderValue: 163,
95
- rating: 4.7,
96
- reviewCount: 256,
97
- operatingSince: "2023-01-10"
98
- },
99
- financials: {
100
- grossMargin: 58,
101
- netMargin: 22,
102
- monthlyExpenses: 65e3,
103
- breakEvenAchieved: !0
104
- },
105
- investmentTerms: {
106
- equityOffered: 20,
107
- dividendFrequency: "quarterly",
108
- lockInPeriod: 18,
109
- exitOptions: ["Buyback", "Secondary Sale"]
110
- },
111
- documents: [{
112
- name: "Business Plan",
113
- type: "PDF",
114
- uploadedOn: "2024-06-05"
115
- }, {
116
- name: "Market Analysis",
117
- type: "PDF",
118
- uploadedOn: "2024-06-05"
119
- }],
120
- status: "active"
121
- },
122
- {
123
- id: "opp-003",
124
- cartId: "cart-007",
125
- cartName: "Fusion Street Tacos",
126
- cartOwner: "Maria Rodriguez",
127
- description: "Innovative fusion taco cart combining Mexican and Indian flavors. Winner of Street Food Awards 2023.",
128
- targetAmount: 4e5,
129
- raisedAmount: 4e5,
130
- minimumInvestment: 2e4,
131
- maximumInvestment: 8e4,
132
- investorCount: 15,
133
- daysLeft: 0,
134
- expectedReturns: 25,
135
- paybackPeriod: 24,
136
- riskLevel: "low",
137
- category: "Fusion Food",
138
- location: "Indiranagar, Bangalore",
139
- image: "https://images.unsplash.com/photo-1551504734-5ee1c4a1479b?w=400",
140
- businessMetrics: {
141
- monthlyRevenue: 32e4,
142
- monthlyOrders: 2100,
143
- averageOrderValue: 152,
144
- rating: 4.8,
145
- reviewCount: 512,
146
- operatingSince: "2021-08-20"
147
- },
148
- financials: {
149
- grossMargin: 68,
150
- netMargin: 32,
151
- monthlyExpenses: 85e3,
152
- breakEvenAchieved: !0
153
- },
154
- investmentTerms: {
155
- equityOffered: 30,
156
- dividendFrequency: "monthly",
157
- lockInPeriod: 12,
158
- exitOptions: ["Buyback", "Franchise Conversion"]
159
- },
160
- documents: [{
161
- name: "Business Plan",
162
- type: "PDF",
163
- uploadedOn: "2024-05-20"
164
- }, {
165
- name: "Awards & Recognition",
166
- type: "PDF",
167
- uploadedOn: "2024-05-20"
168
- }],
169
- status: "funded"
170
- },
171
- {
172
- id: "opp-004",
173
- cartId: "cart-008",
174
- cartName: "Bubble Tea Express",
175
- cartOwner: "Chen Wei",
176
- description: "Trendy bubble tea cart with proprietary recipes. Planning expansion through franchise model.",
177
- targetAmount: 6e5,
178
- raisedAmount: 12e4,
179
- minimumInvestment: 3e4,
180
- maximumInvestment: 15e4,
181
- investorCount: 4,
182
- daysLeft: 45,
183
- expectedReturns: 20,
184
- paybackPeriod: 36,
185
- riskLevel: "high",
186
- category: "Beverages",
187
- location: "Koramangala, Bangalore",
188
- image: "https://images.unsplash.com/photo-1558857563-b371033873b8?w=400",
12
+ function x(e) {
13
+ let t = e.expiresAt ? Math.max(0, Math.ceil((new Date(e.expiresAt).getTime() - Date.now()) / 864e5)) : 0;
14
+ return {
15
+ id: e.id,
16
+ cartId: e.cartId,
17
+ cartName: e.cartName,
18
+ cartOwner: e.businessOwner || "",
19
+ description: e.description,
20
+ targetAmount: e.targetAmount,
21
+ raisedAmount: e.raisedAmount,
22
+ minimumInvestment: e.minimumInvestment,
23
+ maximumInvestment: Math.max(e.minimumInvestment, e.targetAmount - e.raisedAmount),
24
+ investorCount: e.investors.length,
25
+ daysLeft: t,
26
+ expectedReturns: e.expectedReturns,
27
+ paybackPeriod: e.investmentPeriod,
28
+ riskLevel: e.riskLevel,
29
+ category: "",
30
+ location: "",
31
+ image: "",
189
32
  businessMetrics: {
190
- monthlyRevenue: 15e4,
191
- monthlyOrders: 900,
192
- averageOrderValue: 167,
193
- rating: 4.6,
194
- reviewCount: 189,
195
- operatingSince: "2023-11-01"
33
+ monthlyRevenue: 0,
34
+ monthlyOrders: 0,
35
+ averageOrderValue: 0,
36
+ rating: 0,
37
+ reviewCount: 0,
38
+ operatingSince: ""
196
39
  },
197
40
  financials: {
198
- grossMargin: 72,
199
- netMargin: 18,
200
- monthlyExpenses: 55e3,
41
+ grossMargin: 0,
42
+ netMargin: 0,
43
+ monthlyExpenses: 0,
201
44
  breakEvenAchieved: !1
202
45
  },
203
46
  investmentTerms: {
204
- equityOffered: 35,
47
+ equityOffered: 0,
205
48
  dividendFrequency: "quarterly",
206
- lockInPeriod: 36,
207
- exitOptions: ["Franchise Sale", "Acquisition"]
49
+ lockInPeriod: e.investmentPeriod,
50
+ exitOptions: []
208
51
  },
209
- documents: [{
210
- name: "Franchise Plan",
211
- type: "PDF",
212
- uploadedOn: "2024-06-10"
213
- }, {
214
- name: "Recipe Patents",
52
+ documents: e.documents.map((e) => ({
53
+ name: e,
215
54
  type: "PDF",
216
- uploadedOn: "2024-06-10"
217
- }],
218
- status: "active"
219
- }
220
- ], C = {
221
- totalOpportunities: 24,
222
- averageReturns: 21.5,
223
- totalFunded: 156e5,
224
- successRate: 89
225
- };
226
- function w(e) {
55
+ uploadedOn: ""
56
+ })),
57
+ status: e.status
58
+ };
59
+ }
60
+ function S(e) {
227
61
  switch (e) {
228
62
  case "low": return "bg-status-success-bg-subtle text-status-success-text";
229
63
  case "medium": return "bg-status-warning-bg-subtle text-status-warning-text";
230
64
  case "high": return "bg-status-error-bg-subtle text-status-error-text";
231
- default: return "bg-secondary text-secondary-foreground";
65
+ default: return "bg-bg-sunken text-text-secondary";
232
66
  }
233
67
  }
234
- function T(e) {
68
+ function C(e) {
235
69
  switch (e) {
236
70
  case "low": return "Low Risk";
237
71
  case "medium": return "Medium Risk";
@@ -239,34 +73,36 @@ function T(e) {
239
73
  default: return e;
240
74
  }
241
75
  }
242
- function E(e, t) {
76
+ function w(e, t) {
243
77
  return t > 0 ? Math.min(e / t * 100, 100) : 0;
244
78
  }
245
- function D() {
246
- let { navigateTo: D } = e(), [O, k] = l(!0), [A, j] = l(null), [M, N] = l(!1), [P, F] = l(""), [I, L] = l("idle"), [R, z] = l({
79
+ function T() {
80
+ let { navigateTo: T, currentUser: E } = e(), { data: D = [], isLoading: O } = a(), k = i(), [A, j] = l(null), [M, N] = l(!1), [P, F] = l(""), [I, L] = l("idle"), [R, z] = l({
247
81
  searchQuery: "",
248
82
  category: "",
249
83
  riskLevel: "",
250
84
  minimumAmount: "",
251
- location: "",
252
85
  sortBy: "featured"
253
- });
254
- s(() => {
255
- let e = setTimeout(() => k(!1), 600);
256
- return () => clearTimeout(e);
257
- }, []);
258
- let B = o((e, t) => {
86
+ }), B = c(() => D.map(x), [D]), V = c(() => {
87
+ let e = B.length;
88
+ return {
89
+ totalOpportunities: e,
90
+ averageReturns: e ? Number((B.reduce((e, t) => e + t.expectedReturns, 0) / e).toFixed(1)) : 0,
91
+ totalFunded: B.reduce((e, t) => e + t.raisedAmount, 0),
92
+ totalTarget: B.reduce((e, t) => e + t.targetAmount, 0)
93
+ };
94
+ }, [B]), H = s((e, t) => {
259
95
  z((n) => ({
260
96
  ...n,
261
97
  [e]: t
262
98
  }));
263
- }, []), V = c(() => {
264
- let e = [...S];
99
+ }, []), U = c(() => {
100
+ let e = [...B];
265
101
  if (R.searchQuery.trim()) {
266
102
  let t = R.searchQuery.toLowerCase();
267
103
  e = e.filter((e) => e.cartName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.category.toLowerCase().includes(t));
268
104
  }
269
- if (R.category && (e = e.filter((e) => e.category === R.category)), R.riskLevel && (e = e.filter((e) => e.riskLevel === R.riskLevel)), R.location && (e = e.filter((e) => e.location.includes(R.location))), R.minimumAmount) {
105
+ if (R.category && (e = e.filter((e) => e.category === R.category)), R.riskLevel && (e = e.filter((e) => e.riskLevel === R.riskLevel)), R.minimumAmount) {
270
106
  let t = parseInt(R.minimumAmount, 10);
271
107
  e = e.filter((e) => e.minimumInvestment <= t);
272
108
  }
@@ -286,7 +122,7 @@ function D() {
286
122
  default: break;
287
123
  }
288
124
  return e;
289
- }, [R]), H = o(() => {
125
+ }, [R, B]), W = s(() => {
290
126
  if (!A || !P) return;
291
127
  let e = parseInt(P, 10);
292
128
  if (!isNaN(e)) {
@@ -298,238 +134,225 @@ function D() {
298
134
  L("error");
299
135
  return;
300
136
  }
301
- L("success"), setTimeout(() => {
302
- N(!1), F(""), L("idle"), D("/investor/portfolio");
303
- }, 1500);
137
+ k.mutate({
138
+ amount: e,
139
+ investorId: E?.id ?? "",
140
+ opportunityId: A.id
141
+ }, {
142
+ onSuccess: () => {
143
+ L("success"), setTimeout(() => {
144
+ N(!1), F(""), L("idle"), T("/investor/portfolio");
145
+ }, 1500);
146
+ },
147
+ onError: () => L("error")
148
+ });
304
149
  }
305
150
  }, [
306
151
  A,
307
152
  P,
308
- D
309
- ]), U = o((e) => {
153
+ T,
154
+ k,
155
+ E?.id
156
+ ]), G = s((e) => {
310
157
  j(e), F(""), L("idle"), N(!0);
311
158
  }, []);
312
- return O ? /* @__PURE__ */ v(n, {
159
+ return O ? /* @__PURE__ */ _(n, {
313
160
  title: "Investment Opportunities",
314
161
  description: "Loading opportunities...",
315
- children: /* @__PURE__ */ v("div", {
162
+ children: /* @__PURE__ */ _("div", {
316
163
  className: "flex items-center justify-center py-20",
317
- children: /* @__PURE__ */ y("div", {
164
+ children: /* @__PURE__ */ v("div", {
318
165
  className: "text-center",
319
- children: [/* @__PURE__ */ v("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ v("p", {
166
+ children: [/* @__PURE__ */ _("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ _("p", {
320
167
  className: "text-sm text-text-secondary",
321
168
  children: "Loading opportunities..."
322
169
  })]
323
170
  })
324
171
  })
325
- }) : /* @__PURE__ */ y(n, {
172
+ }) : /* @__PURE__ */ v(n, {
326
173
  title: "Investment Opportunities",
327
174
  description: "Discover and invest in growing local businesses",
328
- actions: /* @__PURE__ */ y("span", {
175
+ actions: /* @__PURE__ */ v("span", {
329
176
  className: "text-sm text-text-secondary",
330
- children: [V.length, " opportunities"]
177
+ children: [U.length, " opportunities"]
331
178
  }),
332
179
  children: [
333
- /* @__PURE__ */ v(x, {
180
+ /* @__PURE__ */ _(b, {
334
181
  className: "mb-6",
335
182
  children: "The deal flow — local carts and businesses looking for funding right now. Use this page to discover opportunities that fit your strategy, compare projected returns and equity on offer, filter by category or funding stage, and back the ones you believe in. The stats up top show how the platform is performing so you can gauge typical returns and success rates before you commit."
336
183
  }),
337
- /* @__PURE__ */ y(b, { children: [/* @__PURE__ */ v("h2", {
184
+ /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _("h2", {
338
185
  className: "mb-4 text-base font-semibold text-text-primary",
339
186
  children: "Platform Performance"
340
- }), /* @__PURE__ */ y("div", {
187
+ }), /* @__PURE__ */ v("div", {
341
188
  className: "grid grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4",
342
189
  children: [
343
- /* @__PURE__ */ y("div", {
190
+ /* @__PURE__ */ v("div", {
344
191
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
345
- children: [/* @__PURE__ */ v("p", {
192
+ children: [/* @__PURE__ */ _("p", {
346
193
  className: "text-xs text-text-secondary",
347
194
  children: "Active Opportunities"
348
- }), /* @__PURE__ */ v("p", {
195
+ }), /* @__PURE__ */ _("p", {
349
196
  className: "text-lg font-bold text-text-primary sm:text-2xl",
350
- children: C.totalOpportunities
197
+ children: V.totalOpportunities
351
198
  })]
352
199
  }),
353
- /* @__PURE__ */ y("div", {
200
+ /* @__PURE__ */ v("div", {
354
201
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
355
- children: [/* @__PURE__ */ v("p", {
202
+ children: [/* @__PURE__ */ _("p", {
356
203
  className: "text-xs text-text-secondary",
357
204
  children: "Average Returns"
358
- }), /* @__PURE__ */ y("p", {
205
+ }), /* @__PURE__ */ v("p", {
359
206
  className: "text-lg font-bold text-status-success-text sm:text-2xl",
360
- children: [C.averageReturns, "%"]
207
+ children: [V.averageReturns, "%"]
361
208
  })]
362
209
  }),
363
- /* @__PURE__ */ y("div", {
210
+ /* @__PURE__ */ v("div", {
364
211
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
365
- children: [/* @__PURE__ */ v("p", {
212
+ children: [/* @__PURE__ */ _("p", {
366
213
  className: "text-xs text-text-secondary",
367
214
  children: "Total Funded"
368
- }), /* @__PURE__ */ v("p", {
215
+ }), /* @__PURE__ */ _("p", {
369
216
  className: "text-lg font-bold text-text-primary sm:text-2xl",
370
- children: i(C.totalFunded, {
217
+ children: o(V.totalFunded, {
371
218
  minimumFractionDigits: 0,
372
219
  notation: "compact"
373
220
  })
374
221
  })]
375
222
  }),
376
- /* @__PURE__ */ y("div", {
223
+ /* @__PURE__ */ v("div", {
377
224
  className: "rounded-lg border border-border-subtle bg-bg-surface p-3 sm:p-4",
378
- children: [/* @__PURE__ */ v("p", {
225
+ children: [/* @__PURE__ */ _("p", {
379
226
  className: "text-xs text-text-secondary",
380
- children: "Success Rate"
381
- }), /* @__PURE__ */ y("p", {
227
+ children: "Total Target"
228
+ }), /* @__PURE__ */ _("p", {
382
229
  className: "text-lg font-bold text-text-primary sm:text-2xl",
383
- children: [C.successRate, "%"]
230
+ children: o(V.totalTarget, {
231
+ minimumFractionDigits: 0,
232
+ notation: "compact"
233
+ })
384
234
  })]
385
235
  })
386
236
  ]
387
237
  })] }),
388
- /* @__PURE__ */ v("div", {
238
+ /* @__PURE__ */ _("div", {
389
239
  className: "mt-6 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
390
- children: /* @__PURE__ */ y("div", {
391
- className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
240
+ children: /* @__PURE__ */ v("div", {
241
+ className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",
392
242
  children: [
393
- /* @__PURE__ */ y("div", {
243
+ /* @__PURE__ */ v("div", {
394
244
  className: "relative sm:col-span-2 lg:col-span-1",
395
- children: [/* @__PURE__ */ v(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
245
+ children: [/* @__PURE__ */ _(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ _("input", {
396
246
  type: "text",
397
247
  placeholder: "Search opportunities...",
398
248
  value: R.searchQuery,
399
- onChange: (e) => B("searchQuery", e.target.value),
249
+ onChange: (e) => H("searchQuery", e.target.value),
400
250
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
401
251
  })]
402
252
  }),
403
- /* @__PURE__ */ y("select", {
253
+ /* @__PURE__ */ v("select", {
404
254
  value: R.category,
405
- onChange: (e) => B("category", e.target.value),
255
+ onChange: (e) => H("category", e.target.value),
406
256
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
407
257
  children: [
408
- /* @__PURE__ */ v("option", {
258
+ /* @__PURE__ */ _("option", {
409
259
  value: "",
410
260
  children: "All Categories"
411
261
  }),
412
- /* @__PURE__ */ v("option", {
262
+ /* @__PURE__ */ _("option", {
413
263
  value: "Healthy Food",
414
264
  children: "Healthy Food"
415
265
  }),
416
- /* @__PURE__ */ v("option", {
266
+ /* @__PURE__ */ _("option", {
417
267
  value: "Fast Food",
418
268
  children: "Fast Food"
419
269
  }),
420
- /* @__PURE__ */ v("option", {
270
+ /* @__PURE__ */ _("option", {
421
271
  value: "Fusion Food",
422
272
  children: "Fusion Food"
423
273
  }),
424
- /* @__PURE__ */ v("option", {
274
+ /* @__PURE__ */ _("option", {
425
275
  value: "Beverages",
426
276
  children: "Beverages"
427
277
  }),
428
- /* @__PURE__ */ v("option", {
278
+ /* @__PURE__ */ _("option", {
429
279
  value: "Street Food",
430
280
  children: "Street Food"
431
281
  })
432
282
  ]
433
283
  }),
434
- /* @__PURE__ */ y("select", {
284
+ /* @__PURE__ */ v("select", {
435
285
  value: R.riskLevel,
436
- onChange: (e) => B("riskLevel", e.target.value),
286
+ onChange: (e) => H("riskLevel", e.target.value),
437
287
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
438
288
  children: [
439
- /* @__PURE__ */ v("option", {
289
+ /* @__PURE__ */ _("option", {
440
290
  value: "",
441
291
  children: "All Risk Levels"
442
292
  }),
443
- /* @__PURE__ */ v("option", {
293
+ /* @__PURE__ */ _("option", {
444
294
  value: "low",
445
295
  children: "Low Risk"
446
296
  }),
447
- /* @__PURE__ */ v("option", {
297
+ /* @__PURE__ */ _("option", {
448
298
  value: "medium",
449
299
  children: "Medium Risk"
450
300
  }),
451
- /* @__PURE__ */ v("option", {
301
+ /* @__PURE__ */ _("option", {
452
302
  value: "high",
453
303
  children: "High Risk"
454
304
  })
455
305
  ]
456
306
  }),
457
- /* @__PURE__ */ y("select", {
307
+ /* @__PURE__ */ v("select", {
458
308
  value: R.minimumAmount,
459
- onChange: (e) => B("minimumAmount", e.target.value),
309
+ onChange: (e) => H("minimumAmount", e.target.value),
460
310
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
461
311
  children: [
462
- /* @__PURE__ */ v("option", {
312
+ /* @__PURE__ */ _("option", {
463
313
  value: "",
464
314
  children: "Any Amount"
465
315
  }),
466
- /* @__PURE__ */ v("option", {
316
+ /* @__PURE__ */ _("option", {
467
317
  value: "15000",
468
318
  children: "Under ₹15,000"
469
319
  }),
470
- /* @__PURE__ */ v("option", {
320
+ /* @__PURE__ */ _("option", {
471
321
  value: "25000",
472
322
  children: "Under ₹25,000"
473
323
  }),
474
- /* @__PURE__ */ v("option", {
324
+ /* @__PURE__ */ _("option", {
475
325
  value: "50000",
476
326
  children: "Under ₹50,000"
477
327
  }),
478
- /* @__PURE__ */ v("option", {
328
+ /* @__PURE__ */ _("option", {
479
329
  value: "100000",
480
330
  children: "Under ₹1,00,000"
481
331
  })
482
332
  ]
483
333
  }),
484
- /* @__PURE__ */ y("select", {
485
- value: R.location,
486
- onChange: (e) => B("location", e.target.value),
487
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
488
- children: [
489
- /* @__PURE__ */ v("option", {
490
- value: "",
491
- children: "All Locations"
492
- }),
493
- /* @__PURE__ */ v("option", {
494
- value: "Whitefield",
495
- children: "Whitefield"
496
- }),
497
- /* @__PURE__ */ v("option", {
498
- value: "Koramangala",
499
- children: "Koramangala"
500
- }),
501
- /* @__PURE__ */ v("option", {
502
- value: "Indiranagar",
503
- children: "Indiranagar"
504
- }),
505
- /* @__PURE__ */ v("option", {
506
- value: "Electronic City",
507
- children: "Electronic City"
508
- })
509
- ]
510
- }),
511
- /* @__PURE__ */ y("select", {
334
+ /* @__PURE__ */ v("select", {
512
335
  value: R.sortBy,
513
- onChange: (e) => B("sortBy", e.target.value),
336
+ onChange: (e) => H("sortBy", e.target.value),
514
337
  className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
515
338
  children: [
516
- /* @__PURE__ */ v("option", {
339
+ /* @__PURE__ */ _("option", {
517
340
  value: "featured",
518
341
  children: "Featured"
519
342
  }),
520
- /* @__PURE__ */ v("option", {
343
+ /* @__PURE__ */ _("option", {
521
344
  value: "returns",
522
345
  children: "Highest Returns"
523
346
  }),
524
- /* @__PURE__ */ v("option", {
347
+ /* @__PURE__ */ _("option", {
525
348
  value: "funding",
526
349
  children: "Most Funded"
527
350
  }),
528
- /* @__PURE__ */ v("option", {
351
+ /* @__PURE__ */ _("option", {
529
352
  value: "closing",
530
353
  children: "Closing Soon"
531
354
  }),
532
- /* @__PURE__ */ v("option", {
355
+ /* @__PURE__ */ _("option", {
533
356
  value: "minimum",
534
357
  children: "Lowest Minimum"
535
358
  })
@@ -538,229 +361,155 @@ function D() {
538
361
  ]
539
362
  })
540
363
  }),
541
- V.length === 0 ? /* @__PURE__ */ v("div", {
364
+ U.length === 0 ? /* @__PURE__ */ _("div", {
542
365
  className: "mt-6",
543
- children: /* @__PURE__ */ v(r, {
544
- icon: /* @__PURE__ */ v(h, { className: "h-10 w-10" }),
366
+ children: /* @__PURE__ */ _(r, {
367
+ icon: /* @__PURE__ */ _(h, { className: "h-10 w-10" }),
545
368
  title: "No opportunities found",
546
369
  description: "Try adjusting your filters to find more opportunities",
547
- action: /* @__PURE__ */ v("button", {
370
+ action: /* @__PURE__ */ _("button", {
548
371
  type: "button",
549
372
  onClick: () => z({
550
373
  searchQuery: "",
551
374
  category: "",
552
375
  riskLevel: "",
553
376
  minimumAmount: "",
554
- location: "",
555
377
  sortBy: "featured"
556
378
  }),
557
379
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
558
380
  children: "Clear Filters"
559
381
  })
560
382
  })
561
- }) : /* @__PURE__ */ v("div", {
383
+ }) : /* @__PURE__ */ _("div", {
562
384
  className: "mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",
563
- children: V.map((e) => {
564
- let n = E(e.raisedAmount, e.targetAmount);
565
- return /* @__PURE__ */ y("div", {
385
+ children: U.map((e) => {
386
+ let n = w(e.raisedAmount, e.targetAmount);
387
+ return /* @__PURE__ */ v("div", {
566
388
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm hover:shadow-md transition-shadow",
567
- children: [/* @__PURE__ */ y("div", {
389
+ children: [/* @__PURE__ */ v("div", {
568
390
  className: "relative",
569
391
  children: [
570
- /* @__PURE__ */ v("div", {
571
- className: "h-40 w-full overflow-hidden rounded-t-lg bg-bg-sunken sm:h-48",
572
- children: /* @__PURE__ */ v("img", {
573
- src: e.image,
574
- alt: e.cartName,
575
- className: "h-full w-full object-cover",
576
- loading: "lazy"
577
- })
392
+ /* @__PURE__ */ _("div", {
393
+ className: "flex h-40 w-full items-center justify-center overflow-hidden rounded-t-lg bg-bg-sunken sm:h-48",
394
+ children: /* @__PURE__ */ _(u, { className: "h-10 w-10 text-text-secondary" })
578
395
  }),
579
- e.status === "funded" && /* @__PURE__ */ v("div", {
396
+ e.status === "funded" && /* @__PURE__ */ _("div", {
580
397
  className: "absolute right-2 top-2 rounded-full bg-status-success-text px-2 py-1 text-xs font-medium text-white sm:right-4 sm:top-4 sm:px-3",
581
398
  children: "Fully Funded"
582
399
  }),
583
- e.daysLeft > 0 && e.daysLeft <= 7 && /* @__PURE__ */ y("div", {
400
+ e.daysLeft > 0 && e.daysLeft <= 7 && /* @__PURE__ */ v("div", {
584
401
  className: "absolute left-2 top-2 rounded-full bg-status-error-text px-2 py-1 text-xs font-medium text-white sm:left-4 sm:top-4 sm:px-3",
585
402
  children: [e.daysLeft, " days left"]
586
403
  })
587
404
  ]
588
- }), /* @__PURE__ */ y("div", {
405
+ }), /* @__PURE__ */ v("div", {
589
406
  className: "p-4 sm:p-6",
590
407
  children: [
591
- /* @__PURE__ */ y("div", {
408
+ /* @__PURE__ */ v("div", {
592
409
  className: "mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
593
- children: [/* @__PURE__ */ y("div", {
410
+ children: [/* @__PURE__ */ v("div", {
594
411
  className: "flex-1",
595
412
  children: [
596
- /* @__PURE__ */ v("h3", {
413
+ /* @__PURE__ */ _("h3", {
597
414
  className: "text-base font-semibold text-text-primary sm:text-xl",
598
415
  children: e.cartName
599
416
  }),
600
- /* @__PURE__ */ y("p", {
417
+ /* @__PURE__ */ v("p", {
601
418
  className: "text-xs text-text-secondary sm:text-sm",
602
419
  children: ["by ", e.cartOwner]
603
420
  }),
604
- /* @__PURE__ */ y("div", {
421
+ /* @__PURE__ */ v("div", {
605
422
  className: "mt-2 flex flex-wrap items-center gap-2",
606
- children: [/* @__PURE__ */ v("span", {
423
+ children: [/* @__PURE__ */ _("span", {
607
424
  className: "text-xs text-text-secondary sm:text-sm",
608
425
  children: e.category
609
- }), /* @__PURE__ */ v("span", {
610
- className: t("rounded-full px-2 py-0.5 text-xs font-medium", w(e.riskLevel)),
611
- children: T(e.riskLevel)
426
+ }), /* @__PURE__ */ _("span", {
427
+ className: t("rounded-full px-2 py-0.5 text-xs font-medium", S(e.riskLevel)),
428
+ children: C(e.riskLevel)
612
429
  })]
613
430
  })
614
431
  ]
615
- }), /* @__PURE__ */ y("div", {
432
+ }), /* @__PURE__ */ v("div", {
616
433
  className: "text-left sm:text-right",
617
- children: [/* @__PURE__ */ y("p", {
434
+ children: [/* @__PURE__ */ v("p", {
618
435
  className: "text-xl font-bold text-status-success-text sm:text-2xl",
619
436
  children: [e.expectedReturns, "%"]
620
- }), /* @__PURE__ */ v("p", {
437
+ }), /* @__PURE__ */ _("p", {
621
438
  className: "text-xs text-text-secondary",
622
439
  children: "Expected Returns"
623
440
  })]
624
441
  })]
625
442
  }),
626
- /* @__PURE__ */ v("p", {
443
+ /* @__PURE__ */ _("p", {
627
444
  className: "mb-4 text-sm leading-relaxed text-text-secondary line-clamp-2",
628
445
  children: e.description
629
446
  }),
630
- /* @__PURE__ */ y("div", {
447
+ /* @__PURE__ */ v("div", {
631
448
  className: "mb-4",
632
449
  children: [
633
- /* @__PURE__ */ y("div", {
450
+ /* @__PURE__ */ v("div", {
634
451
  className: "mb-1 flex justify-between text-xs sm:text-sm",
635
- children: [/* @__PURE__ */ y("span", {
452
+ children: [/* @__PURE__ */ v("span", {
636
453
  className: "font-medium text-text-primary",
637
454
  children: [
638
- i(e.raisedAmount, { minimumFractionDigits: 0 }),
455
+ o(e.raisedAmount, { minimumFractionDigits: 0 }),
639
456
  " ",
640
457
  "raised"
641
458
  ]
642
- }), /* @__PURE__ */ y("span", {
459
+ }), /* @__PURE__ */ v("span", {
643
460
  className: "text-text-secondary",
644
- children: ["of ", i(e.targetAmount, { minimumFractionDigits: 0 })]
461
+ children: ["of ", o(e.targetAmount, { minimumFractionDigits: 0 })]
645
462
  })]
646
463
  }),
647
- /* @__PURE__ */ v("div", {
464
+ /* @__PURE__ */ _("div", {
648
465
  className: "h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
649
- children: /* @__PURE__ */ v("div", {
466
+ children: /* @__PURE__ */ _("div", {
650
467
  className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
651
468
  style: { width: `${n}%` }
652
469
  })
653
470
  }),
654
- /* @__PURE__ */ y("div", {
471
+ /* @__PURE__ */ v("div", {
655
472
  className: "mt-1 flex justify-between text-xs text-text-secondary",
656
- children: [/* @__PURE__ */ y("span", { children: [e.investorCount, " investors"] }), /* @__PURE__ */ y("span", { children: [n.toFixed(0), "% funded"] })]
473
+ children: [/* @__PURE__ */ v("span", { children: [e.investorCount, " investors"] }), /* @__PURE__ */ v("span", { children: [n.toFixed(0), "% funded"] })]
657
474
  })
658
475
  ]
659
476
  }),
660
- /* @__PURE__ */ y("div", {
661
- className: "mb-4 grid grid-cols-3 gap-2 text-center sm:gap-4",
662
- children: [
663
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
664
- className: "text-sm font-bold text-text-primary sm:text-lg",
665
- children: i(e.minimumInvestment, { minimumFractionDigits: 0 })
666
- }), /* @__PURE__ */ v("p", {
667
- className: "text-xs text-text-secondary",
668
- children: "Min Investment"
669
- })] }),
670
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("p", {
671
- className: "text-sm font-bold text-text-primary sm:text-lg",
672
- children: [e.paybackPeriod, " mo"]
673
- }), /* @__PURE__ */ v("p", {
674
- className: "text-xs text-text-secondary",
675
- children: "Payback Period"
676
- })] }),
677
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
678
- className: "flex items-center justify-center gap-1",
679
- children: [/* @__PURE__ */ v(g, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), /* @__PURE__ */ v("p", {
680
- className: "text-sm font-bold text-text-primary sm:text-lg",
681
- children: e.businessMetrics.rating
682
- })]
683
- }), /* @__PURE__ */ v("p", {
684
- className: "text-xs text-text-secondary",
685
- children: "Rating"
686
- })] })
687
- ]
688
- }),
689
- /* @__PURE__ */ y("div", {
690
- className: "mb-4 border-t border-border-subtle pt-3 sm:pt-4",
691
- children: [/* @__PURE__ */ v("p", {
692
- className: "mb-2 text-xs font-medium text-text-secondary sm:text-sm",
693
- children: "Business Performance"
694
- }), /* @__PURE__ */ y("div", {
695
- className: "grid grid-cols-1 gap-2 text-xs sm:grid-cols-2 sm:text-sm",
696
- children: [
697
- /* @__PURE__ */ y("div", {
698
- className: "flex justify-between",
699
- children: [/* @__PURE__ */ v("span", {
700
- className: "text-text-secondary",
701
- children: "Monthly Revenue:"
702
- }), /* @__PURE__ */ v("span", {
703
- className: "font-medium text-text-primary",
704
- children: i(e.businessMetrics.monthlyRevenue, { minimumFractionDigits: 0 })
705
- })]
706
- }),
707
- /* @__PURE__ */ y("div", {
708
- className: "flex justify-between",
709
- children: [/* @__PURE__ */ v("span", {
710
- className: "text-text-secondary",
711
- children: "Gross Margin:"
712
- }), /* @__PURE__ */ y("span", {
713
- className: "font-medium text-text-primary",
714
- children: [e.financials.grossMargin, "%"]
715
- })]
716
- }),
717
- /* @__PURE__ */ y("div", {
718
- className: "flex justify-between",
719
- children: [/* @__PURE__ */ v("span", {
720
- className: "text-text-secondary",
721
- children: "Monthly Orders:"
722
- }), /* @__PURE__ */ v("span", {
723
- className: "font-medium text-text-primary",
724
- children: a(e.businessMetrics.monthlyOrders)
725
- })]
726
- }),
727
- /* @__PURE__ */ y("div", {
728
- className: "flex justify-between",
729
- children: [/* @__PURE__ */ v("span", {
730
- className: "text-text-secondary",
731
- children: "Net Margin:"
732
- }), /* @__PURE__ */ y("span", {
733
- className: "font-medium text-text-primary",
734
- children: [e.financials.netMargin, "%"]
735
- })]
736
- })
737
- ]
738
- })]
739
- }),
740
477
  /* @__PURE__ */ v("div", {
478
+ className: "mb-4 grid grid-cols-2 gap-2 text-center sm:gap-4",
479
+ children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
480
+ className: "text-sm font-bold text-text-primary sm:text-lg",
481
+ children: o(e.minimumInvestment, { minimumFractionDigits: 0 })
482
+ }), /* @__PURE__ */ _("p", {
483
+ className: "text-xs text-text-secondary",
484
+ children: "Min Investment"
485
+ })] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("p", {
486
+ className: "text-sm font-bold text-text-primary sm:text-lg",
487
+ children: [e.paybackPeriod, " mo"]
488
+ }), /* @__PURE__ */ _("p", {
489
+ className: "text-xs text-text-secondary",
490
+ children: "Lock-in Period"
491
+ })] })]
492
+ }),
493
+ e.documents.length > 0 && /* @__PURE__ */ _("div", {
741
494
  className: "mb-4 border-t border-border-subtle pt-3",
742
- children: /* @__PURE__ */ y("div", {
495
+ children: /* @__PURE__ */ v("div", {
743
496
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
744
- children: [/* @__PURE__ */ v(f, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ y("span", { children: [e.documents.length, " documents available"] })]
497
+ children: [/* @__PURE__ */ _(p, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ v("span", { children: [e.documents.length, " documents available"] })]
745
498
  })
746
499
  }),
747
- /* @__PURE__ */ y("div", {
748
- className: "mb-4 flex items-center gap-1.5 text-xs text-text-secondary",
749
- children: [/* @__PURE__ */ v(m, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ v("span", { children: e.location })]
750
- }),
751
- /* @__PURE__ */ y("div", {
500
+ /* @__PURE__ */ v("div", {
752
501
  className: "flex flex-col gap-2 sm:flex-row sm:gap-3",
753
- children: [/* @__PURE__ */ v("button", {
502
+ children: [/* @__PURE__ */ _("button", {
754
503
  type: "button",
755
- onClick: () => U(e),
504
+ onClick: () => G(e),
756
505
  disabled: e.status === "funded",
757
506
  className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", e.status === "funded" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
758
507
  children: e.status === "funded" ? "Fully Funded" : "Invest Now"
759
- }), /* @__PURE__ */ y("button", {
508
+ }), /* @__PURE__ */ v("button", {
760
509
  type: "button",
761
- onClick: () => D(`/investor/opportunities/${e.id}`),
510
+ onClick: () => T(`/investor/opportunity/${e.id}`),
762
511
  className: "flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
763
- children: [/* @__PURE__ */ v(d, { className: "h-4 w-4" }), "View Details"]
512
+ children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "View Details"]
764
513
  })]
765
514
  })
766
515
  ]
@@ -768,60 +517,60 @@ function D() {
768
517
  }, e.id);
769
518
  })
770
519
  }),
771
- M && A && /* @__PURE__ */ v("div", {
520
+ M && A && /* @__PURE__ */ _("div", {
772
521
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
773
- children: /* @__PURE__ */ y("div", {
522
+ children: /* @__PURE__ */ v("div", {
774
523
  className: "relative max-h-[90vh] w-full max-w-md overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
775
524
  children: [
776
- /* @__PURE__ */ v("button", {
525
+ /* @__PURE__ */ _("button", {
777
526
  type: "button",
778
527
  onClick: () => {
779
528
  N(!1), F(""), L("idle");
780
529
  },
781
530
  className: "absolute right-3 top-3 rounded-lg p-1 text-text-secondary hover:bg-accent transition-colors",
782
- children: /* @__PURE__ */ v(_, { className: "h-5 w-5" })
531
+ children: /* @__PURE__ */ _(g, { className: "h-5 w-5" })
783
532
  }),
784
- /* @__PURE__ */ y("h3", {
533
+ /* @__PURE__ */ v("h3", {
785
534
  className: "mb-4 text-base font-semibold text-text-primary sm:text-lg",
786
535
  children: ["Invest in ", A.cartName]
787
536
  }),
788
- I === "success" ? /* @__PURE__ */ y("div", {
537
+ I === "success" ? /* @__PURE__ */ v("div", {
789
538
  className: "py-8 text-center",
790
539
  children: [
791
- /* @__PURE__ */ v(u, { className: "mx-auto mb-3 h-12 w-12 text-status-success-text" }),
792
- /* @__PURE__ */ v("p", {
540
+ /* @__PURE__ */ _(d, { className: "mx-auto mb-3 h-12 w-12 text-status-success-text" }),
541
+ /* @__PURE__ */ _("p", {
793
542
  className: "text-sm font-medium text-text-primary",
794
543
  children: "Investment successful!"
795
544
  }),
796
- /* @__PURE__ */ v("p", {
545
+ /* @__PURE__ */ _("p", {
797
546
  className: "mt-1 text-xs text-text-secondary",
798
547
  children: "Redirecting to your portfolio..."
799
548
  })
800
549
  ]
801
- }) : /* @__PURE__ */ y("div", {
550
+ }) : /* @__PURE__ */ v("div", {
802
551
  className: "space-y-4",
803
552
  children: [
804
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
553
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
805
554
  className: "mb-1 text-xs text-text-secondary sm:text-sm",
806
555
  children: "Investment Range"
807
- }), /* @__PURE__ */ y("p", {
556
+ }), /* @__PURE__ */ v("p", {
808
557
  className: "text-sm font-medium text-text-primary sm:text-base",
809
558
  children: [
810
- i(A.minimumInvestment, { minimumFractionDigits: 0 }),
559
+ o(A.minimumInvestment, { minimumFractionDigits: 0 }),
811
560
  " ",
812
561
  "-",
813
562
  " ",
814
- i(A.maximumInvestment, { minimumFractionDigits: 0 })
563
+ o(A.maximumInvestment, { minimumFractionDigits: 0 })
815
564
  ]
816
565
  })] }),
817
- /* @__PURE__ */ y("div", { children: [
818
- /* @__PURE__ */ v("label", {
566
+ /* @__PURE__ */ v("div", { children: [
567
+ /* @__PURE__ */ _("label", {
819
568
  className: "mb-1 block text-xs font-medium text-text-primary sm:text-sm",
820
569
  children: "Investment Amount"
821
570
  }),
822
- /* @__PURE__ */ y("div", {
571
+ /* @__PURE__ */ v("div", {
823
572
  className: "relative",
824
- children: [/* @__PURE__ */ v(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
573
+ children: [/* @__PURE__ */ _(m, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ _("input", {
825
574
  type: "number",
826
575
  value: P,
827
576
  onChange: (e) => {
@@ -831,103 +580,89 @@ function D() {
831
580
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
832
581
  })]
833
582
  }),
834
- I === "error" && /* @__PURE__ */ y("p", {
583
+ I === "error" && /* @__PURE__ */ v("p", {
835
584
  className: "mt-1 text-xs text-status-error-text",
836
585
  children: [
837
586
  "Amount must be between",
838
587
  " ",
839
- i(A.minimumInvestment, { minimumFractionDigits: 0 }),
588
+ o(A.minimumInvestment, { minimumFractionDigits: 0 }),
840
589
  " ",
841
590
  "and",
842
591
  " ",
843
- i(A.maximumInvestment, { minimumFractionDigits: 0 })
592
+ o(A.maximumInvestment, { minimumFractionDigits: 0 })
844
593
  ]
845
594
  })
846
595
  ] }),
847
- P && !isNaN(parseInt(P, 10)) && parseInt(P, 10) > 0 && /* @__PURE__ */ y("div", {
596
+ P && !isNaN(parseInt(P, 10)) && parseInt(P, 10) > 0 && /* @__PURE__ */ v("div", {
848
597
  className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3 sm:p-4",
849
- children: [/* @__PURE__ */ v("p", {
598
+ children: [/* @__PURE__ */ _("p", {
850
599
  className: "mb-2 text-xs text-text-secondary sm:text-sm",
851
600
  children: "Expected Returns"
852
- }), /* @__PURE__ */ y("div", {
601
+ }), /* @__PURE__ */ v("div", {
853
602
  className: "space-y-1.5",
854
603
  children: [
855
- /* @__PURE__ */ y("div", {
604
+ /* @__PURE__ */ v("div", {
856
605
  className: "flex justify-between",
857
- children: [/* @__PURE__ */ v("span", {
606
+ children: [/* @__PURE__ */ _("span", {
858
607
  className: "text-xs text-text-primary sm:text-sm",
859
608
  children: "Investment:"
860
- }), /* @__PURE__ */ v("span", {
609
+ }), /* @__PURE__ */ _("span", {
861
610
  className: "text-xs font-medium text-text-primary sm:text-sm",
862
- children: i(parseInt(P, 10), { minimumFractionDigits: 0 })
611
+ children: o(parseInt(P, 10), { minimumFractionDigits: 0 })
863
612
  })]
864
613
  }),
865
- /* @__PURE__ */ y("div", {
614
+ /* @__PURE__ */ v("div", {
866
615
  className: "flex justify-between",
867
- children: [/* @__PURE__ */ y("span", {
616
+ children: [/* @__PURE__ */ v("span", {
868
617
  className: "text-xs text-text-primary sm:text-sm",
869
618
  children: [
870
619
  "Expected Return (",
871
620
  A.expectedReturns,
872
621
  "%):"
873
622
  ]
874
- }), /* @__PURE__ */ y("span", {
623
+ }), /* @__PURE__ */ v("span", {
875
624
  className: "text-xs font-medium text-status-success-text sm:text-sm",
876
- children: ["+", i(parseInt(P, 10) * A.expectedReturns / 100, { minimumFractionDigits: 0 })]
625
+ children: ["+", o(parseInt(P, 10) * A.expectedReturns / 100, { minimumFractionDigits: 0 })]
877
626
  })]
878
627
  }),
879
- /* @__PURE__ */ y("div", {
628
+ /* @__PURE__ */ v("div", {
880
629
  className: "flex justify-between border-t border-border-subtle pt-2",
881
- children: [/* @__PURE__ */ v("span", {
630
+ children: [/* @__PURE__ */ _("span", {
882
631
  className: "text-xs font-medium text-text-primary sm:text-sm",
883
632
  children: "Total Value:"
884
- }), /* @__PURE__ */ v("span", {
633
+ }), /* @__PURE__ */ _("span", {
885
634
  className: "text-xs font-bold text-text-primary sm:text-sm",
886
- children: i(parseInt(P, 10) * (1 + A.expectedReturns / 100), { minimumFractionDigits: 0 })
635
+ children: o(parseInt(P, 10) * (1 + A.expectedReturns / 100), { minimumFractionDigits: 0 })
887
636
  })]
888
637
  })
889
638
  ]
890
639
  })]
891
640
  }),
892
- /* @__PURE__ */ y("div", {
641
+ /* @__PURE__ */ v("div", {
893
642
  className: "space-y-1 text-xs text-text-secondary sm:text-sm",
894
- children: [
895
- /* @__PURE__ */ y("p", { children: [
896
- "• Minimum lock-in period:",
897
- " ",
898
- A.investmentTerms.lockInPeriod,
899
- " months"
900
- ] }),
901
- /* @__PURE__ */ y("p", { children: [
902
- "• Dividend frequency:",
903
- " ",
904
- A.investmentTerms.dividendFrequency
905
- ] }),
906
- /* @__PURE__ */ y("p", { children: [
907
- "• Your equity stake:",
908
- " ",
909
- ((parseInt(P, 10) || 0) / A.targetAmount * A.investmentTerms.equityOffered).toFixed(2),
910
- "%"
911
- ] }),
912
- /* @__PURE__ */ y("p", { children: [
913
- "• Exit options:",
914
- " ",
915
- A.investmentTerms.exitOptions.join(", ")
916
- ] })
917
- ]
643
+ children: [/* @__PURE__ */ v("p", { children: [
644
+ "• Minimum lock-in period:",
645
+ " ",
646
+ A.investmentTerms.lockInPeriod,
647
+ " months"
648
+ ] }), /* @__PURE__ */ v("p", { children: [
649
+ "• Expected returns: ",
650
+ A.expectedReturns,
651
+ "% over the lock-in period"
652
+ ] })]
918
653
  }),
919
- /* @__PURE__ */ y("div", {
654
+ /* @__PURE__ */ v("div", {
920
655
  className: "flex flex-col gap-2 pt-2 sm:flex-row sm:gap-3",
921
- children: [/* @__PURE__ */ v("button", {
656
+ children: [/* @__PURE__ */ _("button", {
922
657
  type: "button",
923
658
  onClick: () => {
924
659
  N(!1), F(""), L("idle");
925
660
  },
926
661
  className: "flex-1 rounded-lg border border-border-subtle px-4 py-2.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
927
662
  children: "Cancel"
928
- }), /* @__PURE__ */ v("button", {
663
+ }), /* @__PURE__ */ _("button", {
929
664
  type: "button",
930
- onClick: H,
665
+ onClick: W,
931
666
  disabled: !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment,
932
667
  className: t("flex-1 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors", !P || isNaN(parseInt(P, 10)) || parseInt(P, 10) < A.minimumInvestment ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
933
668
  children: "Confirm Investment"
@@ -942,6 +677,6 @@ function D() {
942
677
  });
943
678
  }
944
679
  //#endregion
945
- export { D as InvestmentOpportunitiesPage };
680
+ export { T as InvestmentOpportunitiesPage };
946
681
 
947
682
  //# sourceMappingURL=InvestmentOpportunitiesPage.js.map