@burdenoff/microfe-subscriberbot 2026.625.1 → 2026.626.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.
- package/dist/subscriberbot/pages/HomePage.js +19 -14
- package/dist/subscriberbot/pages/HomePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +66 -60
- package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminDashboard.js +83 -44
- package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +38 -32
- package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +226 -221
- package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js +127 -125
- package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +235 -230
- package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/CartManagementPage.js +267 -262
- package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/admin/UserManagementPage.js +267 -262
- package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +46 -41
- package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +257 -252
- package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +231 -194
- package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +167 -162
- package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +128 -126
- package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +297 -300
- package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +220 -223
- package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +250 -245
- package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/HelpSupportPage.js +94 -96
- package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js +48 -42
- package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +1 -1
- package/dist/subscriberbot/pages/common/SettingsPage.js +745 -736
- package/dist/subscriberbot/pages/common/SettingsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +353 -321
- package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDetailPage.js +258 -225
- package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +82 -76
- package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CheckoutPage.js +212 -215
- package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js +416 -381
- package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +488 -479
- package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +521 -512
- package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/FavoritesPage.js +57 -51
- package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +56 -50
- package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +65 -60
- package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +79 -73
- package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/ReviewsPage.js +68 -62
- package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +1 -1
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +60 -54
- package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +292 -255
- package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +237 -231
- package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +60 -54
- package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js +350 -319
- package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +106 -100
- package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +51 -45
- package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +1 -1
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +387 -382
- package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +320 -282
- package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js +92 -61
- package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +82 -77
- package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +82 -77
- package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +1 -1
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +348 -340
- package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,8 +5,9 @@ import { EmptyState as r } from "../../components/EmptyState.js";
|
|
|
5
5
|
import { useState as i } from "react";
|
|
6
6
|
import { Banknote as a, CheckCircle2 as o, CreditCard as s, Plus as c, Shield as l, ShoppingCart as u, Smartphone as d, Trash2 as f, Wallet as p, X as m } from "lucide-react";
|
|
7
7
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
+
import { EmphasisPanel as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
//#region src/subscriberbot/pages/customer/PaymentMethodsPage.tsx
|
|
9
|
-
var
|
|
10
|
+
var y = [
|
|
10
11
|
{
|
|
11
12
|
id: "pm-1",
|
|
12
13
|
type: "upi",
|
|
@@ -48,7 +49,7 @@ var _ = [
|
|
|
48
49
|
isDefault: !1
|
|
49
50
|
}
|
|
50
51
|
];
|
|
51
|
-
function
|
|
52
|
+
function b({ method: e, onRemove: n, onSetDefault: r }) {
|
|
52
53
|
let i = e.icon;
|
|
53
54
|
return /* @__PURE__ */ g("div", {
|
|
54
55
|
className: t("flex items-center gap-4 rounded-lg border p-4", e.isDefault ? "border-foreground/30 bg-accent/50" : "border-border-seam bg-bg-surface"),
|
|
@@ -92,120 +93,125 @@ function v({ method: e, onRemove: n, onSetDefault: r }) {
|
|
|
92
93
|
]
|
|
93
94
|
});
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
let { navigateTo: f } = e(), [
|
|
96
|
+
function x() {
|
|
97
|
+
let { navigateTo: f } = e(), [x, S] = i(y), [C, w] = i(!1), [T, E] = i("card"), [D, O] = i(null), [k, A] = i({
|
|
97
98
|
cardNumber: "",
|
|
98
99
|
expiry: "",
|
|
99
100
|
cvv: "",
|
|
100
101
|
nameOnCard: ""
|
|
101
|
-
}), [
|
|
102
|
+
}), [j, M] = i({ upiId: "" }), [N, P] = i({
|
|
102
103
|
walletProvider: "Paytm",
|
|
103
104
|
mobile: ""
|
|
104
|
-
}),
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
|
|
105
|
+
}), F = (e) => {
|
|
106
|
+
O(e), setTimeout(() => O(null), 3e3);
|
|
107
|
+
}, I = () => {
|
|
108
|
+
A({
|
|
108
109
|
cardNumber: "",
|
|
109
110
|
expiry: "",
|
|
110
111
|
cvv: "",
|
|
111
112
|
nameOnCard: ""
|
|
112
|
-
}),
|
|
113
|
+
}), M({ upiId: "" }), P({
|
|
113
114
|
walletProvider: "Paytm",
|
|
114
115
|
mobile: ""
|
|
115
|
-
}),
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
116
|
+
}), E("card");
|
|
117
|
+
}, L = (e) => {
|
|
118
|
+
S((t) => t.filter((t) => t.id !== e)), F("Payment method removed");
|
|
119
|
+
}, R = (e) => {
|
|
120
|
+
S((t) => t.map((t) => ({
|
|
120
121
|
...t,
|
|
121
122
|
isDefault: t.id === e
|
|
122
|
-
}))),
|
|
123
|
-
},
|
|
123
|
+
}))), F("Default payment method updated");
|
|
124
|
+
}, z = () => {
|
|
124
125
|
let e = "", t = "", n = s;
|
|
125
|
-
if (
|
|
126
|
-
if (!
|
|
126
|
+
if (T === "card") {
|
|
127
|
+
if (!k.cardNumber.trim() || !k.expiry.trim() || !k.cvv.trim() || !k.nameOnCard.trim()) {
|
|
127
128
|
alert("Please fill in all card fields.");
|
|
128
129
|
return;
|
|
129
130
|
}
|
|
130
|
-
e = `${
|
|
131
|
-
} else if (
|
|
132
|
-
if (!
|
|
131
|
+
e = `${k.nameOnCard}'s Card`, t = `**** **** **** ${k.cardNumber.slice(-4)}`, n = s;
|
|
132
|
+
} else if (T === "upi") {
|
|
133
|
+
if (!j.upiId.trim()) {
|
|
133
134
|
alert("Please enter a UPI ID.");
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
e = "UPI", t =
|
|
137
|
+
e = "UPI", t = j.upiId, n = d;
|
|
137
138
|
} else {
|
|
138
|
-
if (!
|
|
139
|
+
if (!N.mobile.trim()) {
|
|
139
140
|
alert("Please enter mobile number.");
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
142
|
-
e =
|
|
143
|
+
e = N.walletProvider, t = `Mobile: ${N.mobile}`, n = p;
|
|
143
144
|
}
|
|
144
145
|
let r = {
|
|
145
146
|
id: `pm-${Date.now()}`,
|
|
146
|
-
type:
|
|
147
|
+
type: T,
|
|
147
148
|
label: e,
|
|
148
149
|
detail: t,
|
|
149
150
|
icon: n,
|
|
150
151
|
isDefault: !1
|
|
151
152
|
};
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
upi:
|
|
155
|
-
card:
|
|
156
|
-
wallet:
|
|
153
|
+
S((e) => [...e, r]), I(), w(!1), F("Payment method added successfully");
|
|
154
|
+
}, B = {
|
|
155
|
+
upi: x.filter((e) => e.type === "upi"),
|
|
156
|
+
card: x.filter((e) => e.type === "card"),
|
|
157
|
+
wallet: x.filter((e) => e.type === "wallet")
|
|
157
158
|
};
|
|
158
159
|
return /* @__PURE__ */ g(n, {
|
|
159
160
|
title: "Payment Methods",
|
|
160
161
|
description: "Manage your saved payment options",
|
|
161
162
|
actions: /* @__PURE__ */ g("button", {
|
|
162
163
|
type: "button",
|
|
163
|
-
onClick: () =>
|
|
164
|
+
onClick: () => w(!0),
|
|
164
165
|
className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-opacity", "bg-foreground text-background hover:opacity-90"),
|
|
165
166
|
children: [/* @__PURE__ */ h(c, { className: "h-4 w-4" }), "Add Method"]
|
|
166
167
|
}),
|
|
167
168
|
children: [
|
|
168
|
-
|
|
169
|
+
/* @__PURE__ */ h(v, {
|
|
170
|
+
icon: /* @__PURE__ */ h(s, { className: "h-4 w-4" }),
|
|
171
|
+
className: "mb-6",
|
|
172
|
+
children: "Save the cards and UPI options you pay with so checkout is fast and you don't have to re-enter details each time. Set a default for one-tap payment, and add or remove methods whenever they change. Your full card numbers are never stored here — only a secure reference."
|
|
173
|
+
}),
|
|
174
|
+
D && /* @__PURE__ */ g("div", {
|
|
169
175
|
className: "mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-3 flex items-center gap-2",
|
|
170
176
|
children: [/* @__PURE__ */ h(o, { className: "h-4 w-4 text-status-success-text shrink-0" }), /* @__PURE__ */ h("p", {
|
|
171
177
|
className: "text-sm text-status-success-text",
|
|
172
|
-
children:
|
|
178
|
+
children: D
|
|
173
179
|
})]
|
|
174
180
|
}),
|
|
175
|
-
|
|
181
|
+
x.length > 0 ? /* @__PURE__ */ g(_, {
|
|
176
182
|
className: "space-y-6",
|
|
177
183
|
children: [
|
|
178
|
-
|
|
184
|
+
B.upi.length > 0 && /* @__PURE__ */ g("section", { children: [/* @__PURE__ */ g("h3", {
|
|
179
185
|
className: "text-sm font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
180
186
|
children: [/* @__PURE__ */ h(d, { className: "h-4 w-4 text-text-secondary" }), "UPI"]
|
|
181
187
|
}), /* @__PURE__ */ h("div", {
|
|
182
188
|
className: "space-y-2",
|
|
183
|
-
children:
|
|
189
|
+
children: B.upi.map((e) => /* @__PURE__ */ h(b, {
|
|
184
190
|
method: e,
|
|
185
|
-
onRemove:
|
|
186
|
-
onSetDefault:
|
|
191
|
+
onRemove: L,
|
|
192
|
+
onSetDefault: R
|
|
187
193
|
}, e.id))
|
|
188
194
|
})] }),
|
|
189
|
-
|
|
195
|
+
B.card.length > 0 && /* @__PURE__ */ g("section", { children: [/* @__PURE__ */ g("h3", {
|
|
190
196
|
className: "text-sm font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
191
197
|
children: [/* @__PURE__ */ h(s, { className: "h-4 w-4 text-text-secondary" }), "Cards"]
|
|
192
198
|
}), /* @__PURE__ */ h("div", {
|
|
193
199
|
className: "space-y-2",
|
|
194
|
-
children:
|
|
200
|
+
children: B.card.map((e) => /* @__PURE__ */ h(b, {
|
|
195
201
|
method: e,
|
|
196
|
-
onRemove:
|
|
197
|
-
onSetDefault:
|
|
202
|
+
onRemove: L,
|
|
203
|
+
onSetDefault: R
|
|
198
204
|
}, e.id))
|
|
199
205
|
})] }),
|
|
200
|
-
|
|
206
|
+
B.wallet.length > 0 && /* @__PURE__ */ g("section", { children: [/* @__PURE__ */ g("h3", {
|
|
201
207
|
className: "text-sm font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
202
208
|
children: [/* @__PURE__ */ h(p, { className: "h-4 w-4 text-text-secondary" }), "Wallets"]
|
|
203
209
|
}), /* @__PURE__ */ h("div", {
|
|
204
210
|
className: "space-y-2",
|
|
205
|
-
children:
|
|
211
|
+
children: B.wallet.map((e) => /* @__PURE__ */ h(b, {
|
|
206
212
|
method: e,
|
|
207
|
-
onRemove:
|
|
208
|
-
onSetDefault:
|
|
213
|
+
onRemove: L,
|
|
214
|
+
onSetDefault: R
|
|
209
215
|
}, e.id))
|
|
210
216
|
})] }),
|
|
211
217
|
/* @__PURE__ */ g("div", {
|
|
@@ -226,7 +232,7 @@ function y() {
|
|
|
226
232
|
description: "Add a payment method to make faster checkouts.",
|
|
227
233
|
action: /* @__PURE__ */ h("button", {
|
|
228
234
|
type: "button",
|
|
229
|
-
onClick: () =>
|
|
235
|
+
onClick: () => w(!0),
|
|
230
236
|
className: "rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
231
237
|
children: "Add Payment Method"
|
|
232
238
|
})
|
|
@@ -291,7 +297,7 @@ function y() {
|
|
|
291
297
|
})]
|
|
292
298
|
})]
|
|
293
299
|
}),
|
|
294
|
-
|
|
300
|
+
C && /* @__PURE__ */ h("div", {
|
|
295
301
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
|
|
296
302
|
children: /* @__PURE__ */ h("div", {
|
|
297
303
|
className: "w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-lg",
|
|
@@ -306,7 +312,7 @@ function y() {
|
|
|
306
312
|
}), /* @__PURE__ */ h("button", {
|
|
307
313
|
type: "button",
|
|
308
314
|
onClick: () => {
|
|
309
|
-
|
|
315
|
+
w(!1), I();
|
|
310
316
|
},
|
|
311
317
|
className: "rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors",
|
|
312
318
|
children: /* @__PURE__ */ h(m, { className: "h-4 w-4" })
|
|
@@ -338,14 +344,14 @@ function y() {
|
|
|
338
344
|
Icon: p
|
|
339
345
|
}
|
|
340
346
|
].map(({ value: e, label: n, sub: r, Icon: i }) => /* @__PURE__ */ g("label", {
|
|
341
|
-
className: t("flex items-center gap-3 rounded-lg border p-3 cursor-pointer transition-colors",
|
|
347
|
+
className: t("flex items-center gap-3 rounded-lg border p-3 cursor-pointer transition-colors", T === e ? "border-foreground bg-accent" : "border-border-seam hover:bg-accent"),
|
|
342
348
|
children: [
|
|
343
349
|
/* @__PURE__ */ h("input", {
|
|
344
350
|
type: "radio",
|
|
345
351
|
name: "paymentType",
|
|
346
352
|
value: e,
|
|
347
|
-
checked:
|
|
348
|
-
onChange: () =>
|
|
353
|
+
checked: T === e,
|
|
354
|
+
onChange: () => E(e),
|
|
349
355
|
className: "h-4 w-4 shrink-0"
|
|
350
356
|
}),
|
|
351
357
|
/* @__PURE__ */ h(i, { className: "h-5 w-5 text-text-secondary shrink-0" }),
|
|
@@ -359,7 +365,7 @@ function y() {
|
|
|
359
365
|
]
|
|
360
366
|
}, e))
|
|
361
367
|
}),
|
|
362
|
-
|
|
368
|
+
T === "card" && /* @__PURE__ */ g("div", {
|
|
363
369
|
className: "space-y-3",
|
|
364
370
|
children: [
|
|
365
371
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
@@ -368,8 +374,8 @@ function y() {
|
|
|
368
374
|
}), /* @__PURE__ */ h("input", {
|
|
369
375
|
type: "text",
|
|
370
376
|
placeholder: "1234 5678 9012 3456",
|
|
371
|
-
value:
|
|
372
|
-
onChange: (e) =>
|
|
377
|
+
value: k.cardNumber,
|
|
378
|
+
onChange: (e) => A((t) => ({
|
|
373
379
|
...t,
|
|
374
380
|
cardNumber: e.target.value
|
|
375
381
|
})),
|
|
@@ -383,8 +389,8 @@ function y() {
|
|
|
383
389
|
}), /* @__PURE__ */ h("input", {
|
|
384
390
|
type: "text",
|
|
385
391
|
placeholder: "MM/YY",
|
|
386
|
-
value:
|
|
387
|
-
onChange: (e) =>
|
|
392
|
+
value: k.expiry,
|
|
393
|
+
onChange: (e) => A((t) => ({
|
|
388
394
|
...t,
|
|
389
395
|
expiry: e.target.value
|
|
390
396
|
})),
|
|
@@ -395,8 +401,8 @@ function y() {
|
|
|
395
401
|
}), /* @__PURE__ */ h("input", {
|
|
396
402
|
type: "password",
|
|
397
403
|
placeholder: "123",
|
|
398
|
-
value:
|
|
399
|
-
onChange: (e) =>
|
|
404
|
+
value: k.cvv,
|
|
405
|
+
onChange: (e) => A((t) => ({
|
|
400
406
|
...t,
|
|
401
407
|
cvv: e.target.value
|
|
402
408
|
})),
|
|
@@ -409,8 +415,8 @@ function y() {
|
|
|
409
415
|
}), /* @__PURE__ */ h("input", {
|
|
410
416
|
type: "text",
|
|
411
417
|
placeholder: "John Doe",
|
|
412
|
-
value:
|
|
413
|
-
onChange: (e) =>
|
|
418
|
+
value: k.nameOnCard,
|
|
419
|
+
onChange: (e) => A((t) => ({
|
|
414
420
|
...t,
|
|
415
421
|
nameOnCard: e.target.value
|
|
416
422
|
})),
|
|
@@ -418,24 +424,24 @@ function y() {
|
|
|
418
424
|
})] })
|
|
419
425
|
]
|
|
420
426
|
}),
|
|
421
|
-
|
|
427
|
+
T === "upi" && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
422
428
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
423
429
|
children: "UPI ID"
|
|
424
430
|
}), /* @__PURE__ */ h("input", {
|
|
425
431
|
type: "text",
|
|
426
432
|
placeholder: "yourname@paytm",
|
|
427
|
-
value:
|
|
428
|
-
onChange: (e) =>
|
|
433
|
+
value: j.upiId,
|
|
434
|
+
onChange: (e) => M({ upiId: e.target.value }),
|
|
429
435
|
className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
430
436
|
})] }),
|
|
431
|
-
|
|
437
|
+
T === "wallet" && /* @__PURE__ */ g("div", {
|
|
432
438
|
className: "space-y-3",
|
|
433
439
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
434
440
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
435
441
|
children: "Select Wallet"
|
|
436
442
|
}), /* @__PURE__ */ g("select", {
|
|
437
|
-
value:
|
|
438
|
-
onChange: (e) =>
|
|
443
|
+
value: N.walletProvider,
|
|
444
|
+
onChange: (e) => P((t) => ({
|
|
439
445
|
...t,
|
|
440
446
|
walletProvider: e.target.value
|
|
441
447
|
})),
|
|
@@ -452,8 +458,8 @@ function y() {
|
|
|
452
458
|
}), /* @__PURE__ */ h("input", {
|
|
453
459
|
type: "tel",
|
|
454
460
|
placeholder: "9876543210",
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
461
|
+
value: N.mobile,
|
|
462
|
+
onChange: (e) => P((t) => ({
|
|
457
463
|
...t,
|
|
458
464
|
mobile: e.target.value
|
|
459
465
|
})),
|
|
@@ -464,13 +470,13 @@ function y() {
|
|
|
464
470
|
className: "flex items-center gap-3 pt-5",
|
|
465
471
|
children: [/* @__PURE__ */ h("button", {
|
|
466
472
|
type: "button",
|
|
467
|
-
onClick:
|
|
473
|
+
onClick: z,
|
|
468
474
|
className: "flex-1 rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity",
|
|
469
475
|
children: "Add Payment Method"
|
|
470
476
|
}), /* @__PURE__ */ h("button", {
|
|
471
477
|
type: "button",
|
|
472
478
|
onClick: () => {
|
|
473
|
-
|
|
479
|
+
w(!1), I();
|
|
474
480
|
},
|
|
475
481
|
className: "flex-1 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
|
|
476
482
|
children: "Cancel"
|
|
@@ -484,6 +490,6 @@ function y() {
|
|
|
484
490
|
});
|
|
485
491
|
}
|
|
486
492
|
//#endregion
|
|
487
|
-
export {
|
|
493
|
+
export { x as PaymentMethodsPage };
|
|
488
494
|
|
|
489
495
|
//# sourceMappingURL=PaymentMethodsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentMethodsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/customer/PaymentMethodsPage.tsx"],"sourcesContent":["/**\n * Payment Methods Page\n * @module subscriberbot/pages/customer\n *\n * Manage saved payment methods: UPI IDs, credit/debit cards, wallets.\n * Add Payment Method modal with type selection (Card/UPI/Wallet),\n * conditional forms, Quick Pay Options section (Cash on Delivery,\n * Pay at Cart), form state management, grouped display, security badge.\n */\n\nimport { useState } from 'react';\nimport {\n CreditCard,\n Smartphone,\n Wallet,\n Plus,\n Trash2,\n CheckCircle2,\n Shield,\n X,\n Banknote,\n ShoppingCart,\n} from 'lucide-react';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { cn } from '../../utils/cn';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface PaymentMethod {\n id: string;\n type: 'upi' | 'card' | 'wallet';\n label: string;\n detail: string;\n icon: typeof CreditCard;\n isDefault: boolean;\n}\n\ninterface CardFormState {\n cardNumber: string;\n expiry: string;\n cvv: string;\n nameOnCard: string;\n}\n\ninterface UpiFormState {\n upiId: string;\n}\n\ninterface WalletFormState {\n walletProvider: string;\n mobile: string;\n}\n\n// ============================================================================\n// Mock Data\n// ============================================================================\n\nconst initialMethods: PaymentMethod[] = [\n {\n id: 'pm-1',\n type: 'upi',\n label: 'Google Pay',\n detail: 'priya@okaxis',\n icon: Smartphone,\n isDefault: true,\n },\n {\n id: 'pm-2',\n type: 'upi',\n label: 'PhonePe',\n detail: 'priya@ybl',\n icon: Smartphone,\n isDefault: false,\n },\n {\n id: 'pm-3',\n type: 'card',\n label: 'HDFC Credit Card',\n detail: '**** **** **** 4242',\n icon: CreditCard,\n isDefault: false,\n },\n {\n id: 'pm-4',\n type: 'card',\n label: 'SBI Debit Card',\n detail: '**** **** **** 8765',\n icon: CreditCard,\n isDefault: false,\n },\n {\n id: 'pm-5',\n type: 'wallet',\n label: 'SubscriberBot Wallet',\n detail: 'Balance: \\u20B9 1,250.00',\n icon: Wallet,\n isDefault: false,\n },\n];\n\n// ============================================================================\n// Payment Method Row\n// ============================================================================\n\nfunction PaymentMethodRow({\n method,\n onRemove,\n onSetDefault,\n}: {\n method: PaymentMethod;\n onRemove: (id: string) => void;\n onSetDefault: (id: string) => void;\n}) {\n const Icon = method.icon;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-4 rounded-lg border p-4',\n method.isDefault ? 'border-foreground/30 bg-accent/50' : 'border-border-seam bg-bg-surface'\n )}\n >\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <Icon className=\"h-5 w-5 text-text-secondary\" />\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-text-primary\">{method.label}</p>\n {method.isDefault && (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-status-success-bg/10 px-2 py-0.5 text-[10px] font-medium text-status-success-text\">\n <CheckCircle2 className=\"h-3 w-3\" />\n Default\n </span>\n )}\n </div>\n <p className=\"mt-0.5 text-xs text-text-secondary font-mono\">{method.detail}</p>\n </div>\n\n <div className=\"flex items-center gap-1\">\n {!method.isDefault && (\n <button\n type=\"button\"\n onClick={() => onSetDefault(method.id)}\n title=\"Set as default\"\n className=\"rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n Set Default\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => onRemove(method.id)}\n title=\"Remove payment method\"\n className=\"rounded-md p-2 text-text-secondary hover:bg-status-error-bg/10 hover:text-status-error-text transition-colors\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function PaymentMethodsPage() {\n const { navigateTo } = useSubscriberBot();\n const [methods, setMethods] = useState<PaymentMethod[]>(initialMethods);\n const [showAddModal, setShowAddModal] = useState(false);\n const [selectedType, setSelectedType] = useState<'card' | 'upi' | 'wallet'>('card');\n const [statusMessage, setStatusMessage] = useState<string | null>(null);\n\n // Form states\n const [cardForm, setCardForm] = useState<CardFormState>({\n cardNumber: '',\n expiry: '',\n cvv: '',\n nameOnCard: '',\n });\n const [upiForm, setUpiForm] = useState<UpiFormState>({ upiId: '' });\n const [walletForm, setWalletForm] = useState<WalletFormState>({\n walletProvider: 'Paytm',\n mobile: '',\n });\n\n const showStatus = (msg: string) => {\n setStatusMessage(msg);\n setTimeout(() => setStatusMessage(null), 3000);\n };\n\n const resetForms = () => {\n setCardForm({ cardNumber: '', expiry: '', cvv: '', nameOnCard: '' });\n setUpiForm({ upiId: '' });\n setWalletForm({ walletProvider: 'Paytm', mobile: '' });\n setSelectedType('card');\n };\n\n const handleRemove = (id: string) => {\n setMethods((prev) => prev.filter((m) => m.id !== id));\n showStatus('Payment method removed');\n };\n\n const handleSetDefault = (id: string) => {\n setMethods((prev) => prev.map((m) => ({ ...m, isDefault: m.id === id })));\n showStatus('Default payment method updated');\n };\n\n const handleAddPaymentMethod = () => {\n let label = '';\n let detail = '';\n let icon = CreditCard;\n\n if (selectedType === 'card') {\n if (\n !cardForm.cardNumber.trim() ||\n !cardForm.expiry.trim() ||\n !cardForm.cvv.trim() ||\n !cardForm.nameOnCard.trim()\n ) {\n alert('Please fill in all card fields.');\n return;\n }\n label = `${cardForm.nameOnCard}'s Card`;\n detail = `**** **** **** ${cardForm.cardNumber.slice(-4)}`;\n icon = CreditCard;\n } else if (selectedType === 'upi') {\n if (!upiForm.upiId.trim()) {\n alert('Please enter a UPI ID.');\n return;\n }\n label = 'UPI';\n detail = upiForm.upiId;\n icon = Smartphone;\n } else {\n if (!walletForm.mobile.trim()) {\n alert('Please enter mobile number.');\n return;\n }\n label = walletForm.walletProvider;\n detail = `Mobile: ${walletForm.mobile}`;\n icon = Wallet;\n }\n\n const newMethod: PaymentMethod = {\n id: `pm-${Date.now()}`,\n type: selectedType,\n label,\n detail,\n icon,\n isDefault: false,\n };\n\n setMethods((prev) => [...prev, newMethod]);\n resetForms();\n setShowAddModal(false);\n showStatus('Payment method added successfully');\n };\n\n const grouped = {\n upi: methods.filter((m) => m.type === 'upi'),\n card: methods.filter((m) => m.type === 'card'),\n wallet: methods.filter((m) => m.type === 'wallet'),\n };\n\n return (\n <PageLayout\n title=\"Payment Methods\"\n description=\"Manage your saved payment options\"\n actions={\n <button\n type=\"button\"\n onClick={() => setShowAddModal(true)}\n className={cn(\n 'flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-opacity',\n 'bg-foreground text-background hover:opacity-90'\n )}\n >\n <Plus className=\"h-4 w-4\" />\n Add Method\n </button>\n }\n >\n {/* Status message */}\n {statusMessage && (\n <div className=\"mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-3 flex items-center gap-2\">\n <CheckCircle2 className=\"h-4 w-4 text-status-success-text shrink-0\" />\n <p className=\"text-sm text-status-success-text\">{statusMessage}</p>\n </div>\n )}\n\n {methods.length > 0 ? (\n <div className=\"space-y-6\">\n {/* UPI */}\n {grouped.upi.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Smartphone className=\"h-4 w-4 text-text-secondary\" />\n UPI\n </h3>\n <div className=\"space-y-2\">\n {grouped.upi.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Cards */}\n {grouped.card.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <CreditCard className=\"h-4 w-4 text-text-secondary\" />\n Cards\n </h3>\n <div className=\"space-y-2\">\n {grouped.card.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Wallets */}\n {grouped.wallet.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Wallet className=\"h-4 w-4 text-text-secondary\" />\n Wallets\n </h3>\n <div className=\"space-y-2\">\n {grouped.wallet.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Security note */}\n <div className=\"flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4\">\n <Shield className=\"mt-0.5 h-5 w-5 shrink-0 text-text-secondary\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">Secure Payments</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Your payment information is encrypted and securely stored. We never share your\n financial details with third parties.\n </p>\n </div>\n </div>\n </div>\n ) : (\n <EmptyState\n illustration=\"empty-data\"\n icon={<CreditCard className=\"h-12 w-12\" />}\n title=\"No payment methods\"\n description=\"Add a payment method to make faster checkouts.\"\n action={\n <button\n type=\"button\"\n onClick={() => setShowAddModal(true)}\n className=\"rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n Add Payment Method\n </button>\n }\n />\n )}\n\n {/* Quick Pay Options */}\n <div className=\"mt-8\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4\">Quick Pay Options</h2>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-center gap-3 mb-2\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <Banknote className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <h3 className=\"text-sm font-semibold text-text-primary\">Cash on Delivery</h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">Pay when you receive your order</p>\n <div className=\"flex items-center gap-2 text-status-success-text\">\n <CheckCircle2 className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs\">Available for all orders</span>\n </div>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-center gap-3 mb-2\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <ShoppingCart className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <h3 className=\"text-sm font-semibold text-text-primary\">Pay at Cart</h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">Pay directly to the vendor</p>\n <div className=\"flex items-center gap-2 text-status-success-text\">\n <CheckCircle2 className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs\">Supports all payment methods</span>\n </div>\n </div>\n </div>\n </div>\n\n {/* Add Payment Method Modal */}\n {showAddModal && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4\">\n <div className=\"w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-lg\">\n <div className=\"p-5\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Add Payment Method</h2>\n <button\n type=\"button\"\n onClick={() => {\n setShowAddModal(false);\n resetForms();\n }}\n className=\"rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n <p className=\"text-sm text-text-secondary mb-5\">\n Choose a payment method to add to your account\n </p>\n\n {/* Type Selection */}\n <div className=\"space-y-2 mb-5\">\n {[\n {\n value: 'card' as const,\n label: 'Credit/Debit Card',\n sub: 'Visa, Mastercard, Rupay',\n Icon: CreditCard,\n },\n {\n value: 'upi' as const,\n label: 'UPI',\n sub: 'Google Pay, PhonePe, Paytm',\n Icon: Smartphone,\n },\n {\n value: 'wallet' as const,\n label: 'Wallet',\n sub: 'Paytm, Amazon Pay, Mobikwik',\n Icon: Wallet,\n },\n ].map(({ value, label, sub, Icon }) => (\n <label\n key={value}\n className={cn(\n 'flex items-center gap-3 rounded-lg border p-3 cursor-pointer transition-colors',\n selectedType === value\n ? 'border-foreground bg-accent'\n : 'border-border-seam hover:bg-accent'\n )}\n >\n <input\n type=\"radio\"\n name=\"paymentType\"\n value={value}\n checked={selectedType === value}\n onChange={() => setSelectedType(value)}\n className=\"h-4 w-4 shrink-0\"\n />\n <Icon className=\"h-5 w-5 text-text-secondary shrink-0\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{label}</p>\n <p className=\"text-xs text-text-secondary\">{sub}</p>\n </div>\n </label>\n ))}\n </div>\n\n {/* Card Form */}\n {selectedType === 'card' && (\n <div className=\"space-y-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Card Number\n </label>\n <input\n type=\"text\"\n placeholder=\"1234 5678 9012 3456\"\n value={cardForm.cardNumber}\n onChange={(e) => setCardForm((p) => ({ ...p, cardNumber: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Expiry Date\n </label>\n <input\n type=\"text\"\n placeholder=\"MM/YY\"\n value={cardForm.expiry}\n onChange={(e) => setCardForm((p) => ({ ...p, expiry: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n CVV\n </label>\n <input\n type=\"password\"\n placeholder=\"123\"\n value={cardForm.cvv}\n onChange={(e) => setCardForm((p) => ({ ...p, cvv: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Name on Card\n </label>\n <input\n type=\"text\"\n placeholder=\"John Doe\"\n value={cardForm.nameOnCard}\n onChange={(e) => setCardForm((p) => ({ ...p, nameOnCard: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n )}\n\n {/* UPI Form */}\n {selectedType === 'upi' && (\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">UPI ID</label>\n <input\n type=\"text\"\n placeholder=\"yourname@paytm\"\n value={upiForm.upiId}\n onChange={(e) => setUpiForm({ upiId: e.target.value })}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n )}\n\n {/* Wallet Form */}\n {selectedType === 'wallet' && (\n <div className=\"space-y-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Select Wallet\n </label>\n <select\n value={walletForm.walletProvider}\n onChange={(e) =>\n setWalletForm((p) => ({ ...p, walletProvider: e.target.value }))\n }\n className=\"w-full 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)]\"\n >\n <option>Paytm</option>\n <option>Amazon Pay</option>\n <option>Mobikwik</option>\n <option>Freecharge</option>\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Mobile Number\n </label>\n <input\n type=\"tel\"\n placeholder=\"9876543210\"\n value={walletForm.mobile}\n onChange={(e) => setWalletForm((p) => ({ ...p, mobile: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n )}\n\n {/* Actions */}\n <div className=\"flex items-center gap-3 pt-5\">\n <button\n type=\"button\"\n onClick={handleAddPaymentMethod}\n className=\"flex-1 rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n Add Payment Method\n </button>\n <button\n type=\"button\"\n onClick={() => {\n setShowAddModal(false);\n resetForms();\n }}\n className=\"flex-1 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mapp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AAe,OAAO;UAAE,GAAG;UAAG,gBAAgB,EAAE,OAAO;UAAO,EAAE;SAElE,WAAU;mBALZ;UAOE,kBAAC,UAAD,EAAA,UAAQ,SAAc,CAAA;UACtB,kBAAC,UAAD,EAAA,UAAQ,cAAmB,CAAA;UAC3B,kBAAC,UAAD,EAAA,UAAQ,YAAiB,CAAA;UACzB,kBAAC,UAAD,EAAA,UAAQ,cAAmB,CAAA;UACpB;WACL,EAAA,CAAA,EACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;SAAO,WAAU;mBAAmD;SAE5D,CAAA,EACR,kBAAC,SAAD;SACE,MAAK;SACL,aAAY;SACZ,OAAO,EAAW;SAClB,WAAW,MAAM,GAAe,OAAO;UAAE,GAAG;UAAG,QAAQ,EAAE,OAAO;UAAO,EAAE;SACzE,WAAU;SACV,CAAA,CACE,EAAA,CAAA,CACF;;OAIR,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,UAAD;SACE,MAAK;SACL,SAAS;SACT,WAAU;mBACX;SAEQ,CAAA,EACT,kBAAC,UAAD;SACE,MAAK;SACL,eAAe;AAEb,UADA,EAAgB,GAAM,EACtB,GAAY;;SAEd,WAAU;mBACX;SAEQ,CAAA,CACL;;OACF;;KACF,CAAA;IACF,CAAA;GAEG"}
|
|
1
|
+
{"version":3,"file":"PaymentMethodsPage.js","names":[],"sources":["../../../../src/subscriberbot/pages/customer/PaymentMethodsPage.tsx"],"sourcesContent":["/**\n * Payment Methods Page\n * @module subscriberbot/pages/customer\n *\n * Manage saved payment methods: UPI IDs, credit/debit cards, wallets.\n * Add Payment Method modal with type selection (Card/UPI/Wallet),\n * conditional forms, Quick Pay Options section (Cash on Delivery,\n * Pay at Cart), form state management, grouped display, security badge.\n */\n\nimport { useState } from 'react';\nimport {\n CreditCard,\n Smartphone,\n Wallet,\n Plus,\n Trash2,\n CheckCircle2,\n Shield,\n X,\n Banknote,\n ShoppingCart,\n} from 'lucide-react';\nimport { PagePurpose, EmphasisPanel } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { EmptyState } from '../../components/EmptyState';\nimport { useSubscriberBot } from '../../context/SubscriberBotContext';\nimport { cn } from '../../utils/cn';\n\n// ============================================================================\n// Types\n// ============================================================================\n\ninterface PaymentMethod {\n id: string;\n type: 'upi' | 'card' | 'wallet';\n label: string;\n detail: string;\n icon: typeof CreditCard;\n isDefault: boolean;\n}\n\ninterface CardFormState {\n cardNumber: string;\n expiry: string;\n cvv: string;\n nameOnCard: string;\n}\n\ninterface UpiFormState {\n upiId: string;\n}\n\ninterface WalletFormState {\n walletProvider: string;\n mobile: string;\n}\n\n// ============================================================================\n// Mock Data\n// ============================================================================\n\nconst initialMethods: PaymentMethod[] = [\n {\n id: 'pm-1',\n type: 'upi',\n label: 'Google Pay',\n detail: 'priya@okaxis',\n icon: Smartphone,\n isDefault: true,\n },\n {\n id: 'pm-2',\n type: 'upi',\n label: 'PhonePe',\n detail: 'priya@ybl',\n icon: Smartphone,\n isDefault: false,\n },\n {\n id: 'pm-3',\n type: 'card',\n label: 'HDFC Credit Card',\n detail: '**** **** **** 4242',\n icon: CreditCard,\n isDefault: false,\n },\n {\n id: 'pm-4',\n type: 'card',\n label: 'SBI Debit Card',\n detail: '**** **** **** 8765',\n icon: CreditCard,\n isDefault: false,\n },\n {\n id: 'pm-5',\n type: 'wallet',\n label: 'SubscriberBot Wallet',\n detail: 'Balance: \\u20B9 1,250.00',\n icon: Wallet,\n isDefault: false,\n },\n];\n\n// ============================================================================\n// Payment Method Row\n// ============================================================================\n\nfunction PaymentMethodRow({\n method,\n onRemove,\n onSetDefault,\n}: {\n method: PaymentMethod;\n onRemove: (id: string) => void;\n onSetDefault: (id: string) => void;\n}) {\n const Icon = method.icon;\n\n return (\n <div\n className={cn(\n 'flex items-center gap-4 rounded-lg border p-4',\n method.isDefault ? 'border-foreground/30 bg-accent/50' : 'border-border-seam bg-bg-surface'\n )}\n >\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <Icon className=\"h-5 w-5 text-text-secondary\" />\n </div>\n\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <p className=\"text-sm font-medium text-text-primary\">{method.label}</p>\n {method.isDefault && (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-status-success-bg/10 px-2 py-0.5 text-[10px] font-medium text-status-success-text\">\n <CheckCircle2 className=\"h-3 w-3\" />\n Default\n </span>\n )}\n </div>\n <p className=\"mt-0.5 text-xs text-text-secondary font-mono\">{method.detail}</p>\n </div>\n\n <div className=\"flex items-center gap-1\">\n {!method.isDefault && (\n <button\n type=\"button\"\n onClick={() => onSetDefault(method.id)}\n title=\"Set as default\"\n className=\"rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n Set Default\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => onRemove(method.id)}\n title=\"Remove payment method\"\n className=\"rounded-md p-2 text-text-secondary hover:bg-status-error-bg/10 hover:text-status-error-text transition-colors\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </button>\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function PaymentMethodsPage() {\n const { navigateTo } = useSubscriberBot();\n const [methods, setMethods] = useState<PaymentMethod[]>(initialMethods);\n const [showAddModal, setShowAddModal] = useState(false);\n const [selectedType, setSelectedType] = useState<'card' | 'upi' | 'wallet'>('card');\n const [statusMessage, setStatusMessage] = useState<string | null>(null);\n\n // Form states\n const [cardForm, setCardForm] = useState<CardFormState>({\n cardNumber: '',\n expiry: '',\n cvv: '',\n nameOnCard: '',\n });\n const [upiForm, setUpiForm] = useState<UpiFormState>({ upiId: '' });\n const [walletForm, setWalletForm] = useState<WalletFormState>({\n walletProvider: 'Paytm',\n mobile: '',\n });\n\n const showStatus = (msg: string) => {\n setStatusMessage(msg);\n setTimeout(() => setStatusMessage(null), 3000);\n };\n\n const resetForms = () => {\n setCardForm({ cardNumber: '', expiry: '', cvv: '', nameOnCard: '' });\n setUpiForm({ upiId: '' });\n setWalletForm({ walletProvider: 'Paytm', mobile: '' });\n setSelectedType('card');\n };\n\n const handleRemove = (id: string) => {\n setMethods((prev) => prev.filter((m) => m.id !== id));\n showStatus('Payment method removed');\n };\n\n const handleSetDefault = (id: string) => {\n setMethods((prev) => prev.map((m) => ({ ...m, isDefault: m.id === id })));\n showStatus('Default payment method updated');\n };\n\n const handleAddPaymentMethod = () => {\n let label = '';\n let detail = '';\n let icon = CreditCard;\n\n if (selectedType === 'card') {\n if (\n !cardForm.cardNumber.trim() ||\n !cardForm.expiry.trim() ||\n !cardForm.cvv.trim() ||\n !cardForm.nameOnCard.trim()\n ) {\n alert('Please fill in all card fields.');\n return;\n }\n label = `${cardForm.nameOnCard}'s Card`;\n detail = `**** **** **** ${cardForm.cardNumber.slice(-4)}`;\n icon = CreditCard;\n } else if (selectedType === 'upi') {\n if (!upiForm.upiId.trim()) {\n alert('Please enter a UPI ID.');\n return;\n }\n label = 'UPI';\n detail = upiForm.upiId;\n icon = Smartphone;\n } else {\n if (!walletForm.mobile.trim()) {\n alert('Please enter mobile number.');\n return;\n }\n label = walletForm.walletProvider;\n detail = `Mobile: ${walletForm.mobile}`;\n icon = Wallet;\n }\n\n const newMethod: PaymentMethod = {\n id: `pm-${Date.now()}`,\n type: selectedType,\n label,\n detail,\n icon,\n isDefault: false,\n };\n\n setMethods((prev) => [...prev, newMethod]);\n resetForms();\n setShowAddModal(false);\n showStatus('Payment method added successfully');\n };\n\n const grouped = {\n upi: methods.filter((m) => m.type === 'upi'),\n card: methods.filter((m) => m.type === 'card'),\n wallet: methods.filter((m) => m.type === 'wallet'),\n };\n\n return (\n <PageLayout\n title=\"Payment Methods\"\n description=\"Manage your saved payment options\"\n actions={\n <button\n type=\"button\"\n onClick={() => setShowAddModal(true)}\n className={cn(\n 'flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-opacity',\n 'bg-foreground text-background hover:opacity-90'\n )}\n >\n <Plus className=\"h-4 w-4\" />\n Add Method\n </button>\n }\n >\n <PagePurpose icon={<CreditCard className=\"h-4 w-4\" />} className=\"mb-6\">\n Save the cards and UPI options you pay with so checkout is fast and you don't have\n to re-enter details each time. Set a default for one-tap payment, and add or remove\n methods whenever they change. Your full card numbers are never stored here — only a\n secure reference.\n </PagePurpose>\n\n {/* Status message */}\n {statusMessage && (\n <div className=\"mb-4 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 p-3 flex items-center gap-2\">\n <CheckCircle2 className=\"h-4 w-4 text-status-success-text shrink-0\" />\n <p className=\"text-sm text-status-success-text\">{statusMessage}</p>\n </div>\n )}\n\n {methods.length > 0 ? (\n <EmphasisPanel className=\"space-y-6\">\n {/* UPI */}\n {grouped.upi.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Smartphone className=\"h-4 w-4 text-text-secondary\" />\n UPI\n </h3>\n <div className=\"space-y-2\">\n {grouped.upi.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Cards */}\n {grouped.card.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <CreditCard className=\"h-4 w-4 text-text-secondary\" />\n Cards\n </h3>\n <div className=\"space-y-2\">\n {grouped.card.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Wallets */}\n {grouped.wallet.length > 0 && (\n <section>\n <h3 className=\"text-sm font-semibold text-text-primary mb-3 flex items-center gap-2\">\n <Wallet className=\"h-4 w-4 text-text-secondary\" />\n Wallets\n </h3>\n <div className=\"space-y-2\">\n {grouped.wallet.map((method) => (\n <PaymentMethodRow\n key={method.id}\n method={method}\n onRemove={handleRemove}\n onSetDefault={handleSetDefault}\n />\n ))}\n </div>\n </section>\n )}\n\n {/* Security note */}\n <div className=\"flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface p-4\">\n <Shield className=\"mt-0.5 h-5 w-5 shrink-0 text-text-secondary\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">Secure Payments</p>\n <p className=\"mt-0.5 text-xs text-text-secondary\">\n Your payment information is encrypted and securely stored. We never share your\n financial details with third parties.\n </p>\n </div>\n </div>\n </EmphasisPanel>\n ) : (\n <EmptyState\n illustration=\"empty-data\"\n icon={<CreditCard className=\"h-12 w-12\" />}\n title=\"No payment methods\"\n description=\"Add a payment method to make faster checkouts.\"\n action={\n <button\n type=\"button\"\n onClick={() => setShowAddModal(true)}\n className=\"rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n Add Payment Method\n </button>\n }\n />\n )}\n\n {/* Quick Pay Options */}\n <div className=\"mt-8\">\n <h2 className=\"text-base font-semibold text-text-primary mb-4\">Quick Pay Options</h2>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-center gap-3 mb-2\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <Banknote className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <h3 className=\"text-sm font-semibold text-text-primary\">Cash on Delivery</h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">Pay when you receive your order</p>\n <div className=\"flex items-center gap-2 text-status-success-text\">\n <CheckCircle2 className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs\">Available for all orders</span>\n </div>\n </div>\n <div className=\"rounded-lg border border-border-seam bg-bg-surface p-5\">\n <div className=\"flex items-center gap-3 mb-2\">\n <div className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-bg-sunken\">\n <ShoppingCart className=\"h-5 w-5 text-text-secondary\" />\n </div>\n <h3 className=\"text-sm font-semibold text-text-primary\">Pay at Cart</h3>\n </div>\n <p className=\"text-xs text-text-secondary mb-3\">Pay directly to the vendor</p>\n <div className=\"flex items-center gap-2 text-status-success-text\">\n <CheckCircle2 className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"text-xs\">Supports all payment methods</span>\n </div>\n </div>\n </div>\n </div>\n\n {/* Add Payment Method Modal */}\n {showAddModal && (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4\">\n <div className=\"w-full max-w-md max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-lg\">\n <div className=\"p-5\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-4\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Add Payment Method</h2>\n <button\n type=\"button\"\n onClick={() => {\n setShowAddModal(false);\n resetForms();\n }}\n className=\"rounded-md p-2 text-text-secondary hover:bg-accent hover:text-text-primary transition-colors\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n <p className=\"text-sm text-text-secondary mb-5\">\n Choose a payment method to add to your account\n </p>\n\n {/* Type Selection */}\n <div className=\"space-y-2 mb-5\">\n {[\n {\n value: 'card' as const,\n label: 'Credit/Debit Card',\n sub: 'Visa, Mastercard, Rupay',\n Icon: CreditCard,\n },\n {\n value: 'upi' as const,\n label: 'UPI',\n sub: 'Google Pay, PhonePe, Paytm',\n Icon: Smartphone,\n },\n {\n value: 'wallet' as const,\n label: 'Wallet',\n sub: 'Paytm, Amazon Pay, Mobikwik',\n Icon: Wallet,\n },\n ].map(({ value, label, sub, Icon }) => (\n <label\n key={value}\n className={cn(\n 'flex items-center gap-3 rounded-lg border p-3 cursor-pointer transition-colors',\n selectedType === value\n ? 'border-foreground bg-accent'\n : 'border-border-seam hover:bg-accent'\n )}\n >\n <input\n type=\"radio\"\n name=\"paymentType\"\n value={value}\n checked={selectedType === value}\n onChange={() => setSelectedType(value)}\n className=\"h-4 w-4 shrink-0\"\n />\n <Icon className=\"h-5 w-5 text-text-secondary shrink-0\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{label}</p>\n <p className=\"text-xs text-text-secondary\">{sub}</p>\n </div>\n </label>\n ))}\n </div>\n\n {/* Card Form */}\n {selectedType === 'card' && (\n <div className=\"space-y-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Card Number\n </label>\n <input\n type=\"text\"\n placeholder=\"1234 5678 9012 3456\"\n value={cardForm.cardNumber}\n onChange={(e) => setCardForm((p) => ({ ...p, cardNumber: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Expiry Date\n </label>\n <input\n type=\"text\"\n placeholder=\"MM/YY\"\n value={cardForm.expiry}\n onChange={(e) => setCardForm((p) => ({ ...p, expiry: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n CVV\n </label>\n <input\n type=\"password\"\n placeholder=\"123\"\n value={cardForm.cvv}\n onChange={(e) => setCardForm((p) => ({ ...p, cvv: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Name on Card\n </label>\n <input\n type=\"text\"\n placeholder=\"John Doe\"\n value={cardForm.nameOnCard}\n onChange={(e) => setCardForm((p) => ({ ...p, nameOnCard: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n )}\n\n {/* UPI Form */}\n {selectedType === 'upi' && (\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">UPI ID</label>\n <input\n type=\"text\"\n placeholder=\"yourname@paytm\"\n value={upiForm.upiId}\n onChange={(e) => setUpiForm({ upiId: e.target.value })}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n )}\n\n {/* Wallet Form */}\n {selectedType === 'wallet' && (\n <div className=\"space-y-3\">\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Select Wallet\n </label>\n <select\n value={walletForm.walletProvider}\n onChange={(e) =>\n setWalletForm((p) => ({ ...p, walletProvider: e.target.value }))\n }\n className=\"w-full 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)]\"\n >\n <option>Paytm</option>\n <option>Amazon Pay</option>\n <option>Mobikwik</option>\n <option>Freecharge</option>\n </select>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-text-primary mb-1\">\n Mobile Number\n </label>\n <input\n type=\"tel\"\n placeholder=\"9876543210\"\n value={walletForm.mobile}\n onChange={(e) => setWalletForm((p) => ({ ...p, mobile: e.target.value }))}\n className=\"w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n </div>\n </div>\n )}\n\n {/* Actions */}\n <div className=\"flex items-center gap-3 pt-5\">\n <button\n type=\"button\"\n onClick={handleAddPaymentMethod}\n className=\"flex-1 rounded-lg bg-foreground px-4 py-2 text-sm font-medium text-background hover:opacity-90 transition-opacity\"\n >\n Add Payment Method\n </button>\n <button\n type=\"button\"\n onClick={() => {\n setShowAddModal(false);\n resetForms();\n }}\n className=\"flex-1 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors\"\n >\n Cancel\n </button>\n </div>\n </div>\n </div>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;AA8DA,IAAM,IAAkC;CACtC;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,WAAW;EACZ;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,WAAW;EACZ;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,WAAW;EACZ;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,WAAW;EACZ;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO;EACP,QAAQ;EACR,MAAM;EACN,WAAW;EACZ;CACF;AAMD,SAAS,EAAiB,EACxB,WACA,aACA,mBAKC;CACD,IAAM,IAAO,EAAO;AAEpB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,iDACA,EAAO,YAAY,sCAAsC,mCAC1D;YAJH;GAME,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,GAAD,EAAM,WAAU,+BAAgC,CAAA;IAC5C,CAAA;GAEN,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,KAAD;MAAG,WAAU;gBAAyC,EAAO;MAAU,CAAA,EACtE,EAAO,aACN,kBAAC,QAAD;MAAM,WAAU;gBAAhB,CACE,kBAAC,GAAD,EAAc,WAAU,WAAY,CAAA,EAAA,UAE/B;QAEL;QACN,kBAAC,KAAD;KAAG,WAAU;eAAgD,EAAO;KAAW,CAAA,CAC3E;;GAEN,kB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