@splpi/estore-shared-components 7.0.1 → 7.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +131 -17
- package/dist/index.d.ts +131 -17
- package/dist/index.js +1380 -459
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1373 -434
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -226,6 +226,51 @@ var STANDARD_ICON_BUTTON_STYLES = {
|
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
+
// src/hooks/ocrStorage.ts
|
|
230
|
+
var OCR_STORAGE_KEY = "ocrResult";
|
|
231
|
+
var readStored = () => {
|
|
232
|
+
try {
|
|
233
|
+
const raw = localStorage.getItem(OCR_STORAGE_KEY);
|
|
234
|
+
return raw ? JSON.parse(raw) : null;
|
|
235
|
+
} catch {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var readOcrResult = (section) => {
|
|
240
|
+
if (typeof window === "undefined") return null;
|
|
241
|
+
const stored = readStored();
|
|
242
|
+
if (!stored || stored.applied?.[section]) return null;
|
|
243
|
+
return stored;
|
|
244
|
+
};
|
|
245
|
+
var markOcrApplied = (section) => {
|
|
246
|
+
if (typeof window === "undefined") return false;
|
|
247
|
+
const stored = readStored();
|
|
248
|
+
if (!stored || stored.applied?.[section]) return false;
|
|
249
|
+
try {
|
|
250
|
+
localStorage.setItem(
|
|
251
|
+
OCR_STORAGE_KEY,
|
|
252
|
+
JSON.stringify({ ...stored, applied: { ...stored.applied, [section]: true } })
|
|
253
|
+
);
|
|
254
|
+
} catch {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
return true;
|
|
258
|
+
};
|
|
259
|
+
var saveOcrResult = (value) => {
|
|
260
|
+
if (typeof window === "undefined") return;
|
|
261
|
+
try {
|
|
262
|
+
localStorage.setItem(OCR_STORAGE_KEY, JSON.stringify(value));
|
|
263
|
+
} catch {
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
var clearOcrResult = () => {
|
|
267
|
+
if (typeof window === "undefined") return;
|
|
268
|
+
try {
|
|
269
|
+
localStorage.removeItem(OCR_STORAGE_KEY);
|
|
270
|
+
} catch {
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
|
|
229
274
|
// src/NewSaleForm/LifePlanApplication1.tsx
|
|
230
275
|
import { useEffect, useState as useState2 } from "react";
|
|
231
276
|
|
|
@@ -329,11 +374,20 @@ var civilStatusCollection = createListCollection({
|
|
|
329
374
|
{ label: "Annulled", value: "annulled" }
|
|
330
375
|
]
|
|
331
376
|
});
|
|
377
|
+
var applyOcr = (data, ocr) => ocr ? {
|
|
378
|
+
...data,
|
|
379
|
+
firstName: ocr.firstName || data.firstName || "",
|
|
380
|
+
middleName: ocr.middleName || data.middleName || "",
|
|
381
|
+
lastName: ocr.lastName || data.lastName || "",
|
|
382
|
+
birthDate: ocr.birthDate || data.birthDate || "",
|
|
383
|
+
idType: ocr.idType || data.idType || "",
|
|
384
|
+
idNumber: ocr.idNumber || data.idNumber || ""
|
|
385
|
+
} : data;
|
|
332
386
|
var LifePlanApplication1 = ({
|
|
333
387
|
initialData,
|
|
334
388
|
onUpdate
|
|
335
389
|
}) => {
|
|
336
|
-
const [formData, setFormData] = useState2({
|
|
390
|
+
const [formData, setFormData] = useState2(() => applyOcr({
|
|
337
391
|
firstName: initialData?.firstName ?? "Juan",
|
|
338
392
|
middleName: initialData?.middleName ?? "Santos",
|
|
339
393
|
lastName: initialData?.lastName ?? "Dela Cruz",
|
|
@@ -350,49 +404,14 @@ var LifePlanApplication1 = ({
|
|
|
350
404
|
emailAddress: initialData?.emailAddress ?? "juan.delacruz@example.com",
|
|
351
405
|
mailingAddress: initialData?.mailingAddress ?? "123 Mabini Street, Barangay San Antonio, Makati City",
|
|
352
406
|
landLineNumber: initialData?.landLineNumber ?? "02-8123-4567"
|
|
353
|
-
});
|
|
407
|
+
}, readOcrResult("personal")));
|
|
354
408
|
const updateFormData = (nextData) => {
|
|
355
409
|
setFormData(nextData);
|
|
356
410
|
onUpdate?.(nextData);
|
|
357
411
|
};
|
|
358
412
|
useEffect(() => {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
try {
|
|
362
|
-
const ocrData = JSON.parse(OCRValue);
|
|
363
|
-
let formattedBirthDate = "";
|
|
364
|
-
if (typeof ocrData?.birthDate === "string") {
|
|
365
|
-
const [month, day, year] = ocrData.birthDate.split("/").map((part) => part.trim());
|
|
366
|
-
if (month && day && year) {
|
|
367
|
-
formattedBirthDate = `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
let mappedIdType = "";
|
|
371
|
-
if (ocrData?.idType) {
|
|
372
|
-
const normalizedIdType = ocrData.idType.toLowerCase().replace(/\s+/g, "_").replace(/'/g, "");
|
|
373
|
-
if (normalizedIdType.includes("passport")) {
|
|
374
|
-
mappedIdType = "passport";
|
|
375
|
-
} else if (normalizedIdType.includes("driver")) {
|
|
376
|
-
mappedIdType = "driver_license";
|
|
377
|
-
} else if (normalizedIdType.includes("national") || normalizedIdType.includes("id")) {
|
|
378
|
-
mappedIdType = "national_id";
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
const updatedData = {
|
|
382
|
-
...formData,
|
|
383
|
-
firstName: ocrData?.firstName || "",
|
|
384
|
-
lastName: ocrData?.lastName || "",
|
|
385
|
-
middleName: ocrData?.middleName || "",
|
|
386
|
-
birthDate: formattedBirthDate || "",
|
|
387
|
-
idType: mappedIdType || ""
|
|
388
|
-
};
|
|
389
|
-
updateFormData(updatedData);
|
|
390
|
-
} catch (e) {
|
|
391
|
-
console.error("Failed to parse OCR value:", e);
|
|
392
|
-
localStorage.removeItem("ocrResult");
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}, []);
|
|
413
|
+
if (markOcrApplied("personal")) onUpdate?.(formData);
|
|
414
|
+
}, [formData, onUpdate]);
|
|
396
415
|
return /* @__PURE__ */ jsxs2(
|
|
397
416
|
Grid,
|
|
398
417
|
{
|
|
@@ -849,22 +868,45 @@ var cityOptions = [
|
|
|
849
868
|
"Bongao",
|
|
850
869
|
"Ipil"
|
|
851
870
|
].map((city) => ({ label: city, value: city }));
|
|
852
|
-
var districtOptions = cityOptions;
|
|
853
|
-
var barangayOptions = cityOptions;
|
|
854
871
|
var provinceCollection = createListCollection2({ items: provinceOptions });
|
|
855
872
|
var cityCollection = createListCollection2({ items: cityOptions });
|
|
856
|
-
var
|
|
857
|
-
var
|
|
873
|
+
var normalizePlace = (value) => value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/^city of\s+/, "").replace(/\s+city$/, "").replace(/[^a-z0-9]/g, "");
|
|
874
|
+
var matchOption = (candidates, options) => {
|
|
875
|
+
for (const candidate of candidates ?? []) {
|
|
876
|
+
const key = normalizePlace(candidate);
|
|
877
|
+
const match = options.find(
|
|
878
|
+
(option) => normalizePlace(option.value) === key
|
|
879
|
+
);
|
|
880
|
+
if (match) return match.value;
|
|
881
|
+
}
|
|
882
|
+
return "";
|
|
883
|
+
};
|
|
858
884
|
var LifePlanApplication2 = ({
|
|
859
|
-
onAddressUpdate
|
|
885
|
+
onAddressUpdate,
|
|
886
|
+
parseAddress
|
|
860
887
|
}) => {
|
|
861
|
-
const
|
|
862
|
-
const [
|
|
863
|
-
const [
|
|
864
|
-
const [
|
|
865
|
-
const [
|
|
866
|
-
const [
|
|
867
|
-
|
|
888
|
+
const [lot, setLot] = useState3("");
|
|
889
|
+
const [street, setStreet] = useState3("");
|
|
890
|
+
const [city, setCity] = useState3("");
|
|
891
|
+
const [province, setProvince] = useState3("");
|
|
892
|
+
const [district, setDistrict] = useState3("");
|
|
893
|
+
const [barangay, setBarangay] = useState3("");
|
|
894
|
+
useEffect2(() => {
|
|
895
|
+
if (!parseAddress) return;
|
|
896
|
+
const ocr = readOcrResult("address");
|
|
897
|
+
if (!ocr?.addressLine) return;
|
|
898
|
+
markOcrApplied("address");
|
|
899
|
+
parseAddress(ocr.addressLine).then((result) => {
|
|
900
|
+
setLot(result.lot ?? "");
|
|
901
|
+
setStreet(result.street ?? "");
|
|
902
|
+
setProvince(matchOption(result.provinceCandidates, provinceOptions));
|
|
903
|
+
setCity(matchOption(result.cityCandidates, cityOptions));
|
|
904
|
+
setDistrict(result.district ?? "");
|
|
905
|
+
setBarangay(result.barangay ?? "");
|
|
906
|
+
}).catch((error) => {
|
|
907
|
+
console.error("Error parsing address:", error);
|
|
908
|
+
});
|
|
909
|
+
}, [parseAddress]);
|
|
868
910
|
useEffect2(() => {
|
|
869
911
|
onAddressUpdate?.({
|
|
870
912
|
lot,
|
|
@@ -920,44 +962,22 @@ var LifePlanApplication2 = ({
|
|
|
920
962
|
]
|
|
921
963
|
}
|
|
922
964
|
) }),
|
|
923
|
-
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */
|
|
924
|
-
|
|
965
|
+
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */ jsx3(
|
|
966
|
+
FloatingLabelInput,
|
|
925
967
|
{
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
children: [
|
|
931
|
-
/* @__PURE__ */ jsx3(Select2.HiddenSelect, {}),
|
|
932
|
-
/* @__PURE__ */ jsxs3(Select2.Control, { children: [
|
|
933
|
-
/* @__PURE__ */ jsx3(Select2.Trigger, { children: /* @__PURE__ */ jsx3(Select2.ValueText, { placeholder: "Select District" }) }),
|
|
934
|
-
/* @__PURE__ */ jsx3(Select2.IndicatorGroup, { children: /* @__PURE__ */ jsx3(Select2.Indicator, {}) })
|
|
935
|
-
] }),
|
|
936
|
-
/* @__PURE__ */ jsx3(Portal, { children: /* @__PURE__ */ jsx3(Select2.Positioner, { children: /* @__PURE__ */ jsx3(Select2.Content, { children: districtOptions.map((item) => /* @__PURE__ */ jsxs3(Select2.Item, { item, children: [
|
|
937
|
-
item.label,
|
|
938
|
-
/* @__PURE__ */ jsx3(Select2.ItemIndicator, {})
|
|
939
|
-
] }, item.value)) }) }) })
|
|
940
|
-
]
|
|
968
|
+
id: "district",
|
|
969
|
+
label: "District",
|
|
970
|
+
value: district,
|
|
971
|
+
onChange: (e) => setDistrict(e.target.value)
|
|
941
972
|
}
|
|
942
973
|
) }),
|
|
943
|
-
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */
|
|
944
|
-
|
|
974
|
+
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */ jsx3(
|
|
975
|
+
FloatingLabelInput,
|
|
945
976
|
{
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
children: [
|
|
951
|
-
/* @__PURE__ */ jsx3(Select2.HiddenSelect, {}),
|
|
952
|
-
/* @__PURE__ */ jsxs3(Select2.Control, { children: [
|
|
953
|
-
/* @__PURE__ */ jsx3(Select2.Trigger, { children: /* @__PURE__ */ jsx3(Select2.ValueText, { placeholder: "Select Barangay" }) }),
|
|
954
|
-
/* @__PURE__ */ jsx3(Select2.IndicatorGroup, { children: /* @__PURE__ */ jsx3(Select2.Indicator, {}) })
|
|
955
|
-
] }),
|
|
956
|
-
/* @__PURE__ */ jsx3(Portal, { children: /* @__PURE__ */ jsx3(Select2.Positioner, { children: /* @__PURE__ */ jsx3(Select2.Content, { children: barangayOptions.map((item) => /* @__PURE__ */ jsxs3(Select2.Item, { item, children: [
|
|
957
|
-
item.label,
|
|
958
|
-
/* @__PURE__ */ jsx3(Select2.ItemIndicator, {})
|
|
959
|
-
] }, item.value)) }) }) })
|
|
960
|
-
]
|
|
977
|
+
id: "barangay",
|
|
978
|
+
label: "Barangay",
|
|
979
|
+
value: barangay,
|
|
980
|
+
onChange: (e) => setBarangay(e.target.value)
|
|
961
981
|
}
|
|
962
982
|
) }),
|
|
963
983
|
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */ jsx3(
|
|
@@ -2134,6 +2154,7 @@ var InfoCard = ({
|
|
|
2134
2154
|
}
|
|
2135
2155
|
);
|
|
2136
2156
|
};
|
|
2157
|
+
var info_card_default = InfoCard;
|
|
2137
2158
|
|
|
2138
2159
|
// src/NewSaleForm/ui/input-card-accordion.tsx
|
|
2139
2160
|
import { Box as Box8, Flex as Flex3, Text as Text5 } from "@chakra-ui/react";
|
|
@@ -2261,7 +2282,8 @@ var isEmploymentComplete = (e) => !!e && [
|
|
|
2261
2282
|
var LifePlanApplicationFormWrapper = ({
|
|
2262
2283
|
openSection,
|
|
2263
2284
|
openSectionKey,
|
|
2264
|
-
onValidChange
|
|
2285
|
+
onValidChange,
|
|
2286
|
+
parseAddress
|
|
2265
2287
|
}) => {
|
|
2266
2288
|
const [applicationData, setApplicationData] = useState7(
|
|
2267
2289
|
createEmptyApplicationData
|
|
@@ -2336,7 +2358,13 @@ var LifePlanApplicationFormWrapper = ({
|
|
|
2336
2358
|
description: "Where you currently live",
|
|
2337
2359
|
value: "address",
|
|
2338
2360
|
complete: isAddressComplete(applicationData.address),
|
|
2339
|
-
page: /* @__PURE__ */ jsx10(
|
|
2361
|
+
page: /* @__PURE__ */ jsx10(
|
|
2362
|
+
LifePlanApplication2_default,
|
|
2363
|
+
{
|
|
2364
|
+
onAddressUpdate: handleAddressUpdate,
|
|
2365
|
+
...parseAddress ? { parseAddress } : {}
|
|
2366
|
+
}
|
|
2367
|
+
)
|
|
2340
2368
|
},
|
|
2341
2369
|
{
|
|
2342
2370
|
icon: IoIosInformationCircleOutline,
|
|
@@ -3091,6 +3119,9 @@ var createLifePlanSteps = (confirmationProps) => [
|
|
|
3091
3119
|
if (confirmationProps?.onApplicationValidChange !== void 0) {
|
|
3092
3120
|
applicationFormWrapperProps.onValidChange = confirmationProps.onApplicationValidChange;
|
|
3093
3121
|
}
|
|
3122
|
+
if (confirmationProps?.parseAddress !== void 0) {
|
|
3123
|
+
applicationFormWrapperProps.parseAddress = confirmationProps.parseAddress;
|
|
3124
|
+
}
|
|
3094
3125
|
return /* @__PURE__ */ jsx14(LifePlanApplicationFormWrapper_default, { ...applicationFormWrapperProps });
|
|
3095
3126
|
})()
|
|
3096
3127
|
},
|
|
@@ -3474,10 +3505,20 @@ var horizontal_stepper_default = HorizontalStepper;
|
|
|
3474
3505
|
|
|
3475
3506
|
// src/NewSaleForm/SharedLifePlanApplication.tsx
|
|
3476
3507
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3508
|
+
var safeParse = (value) => {
|
|
3509
|
+
if (!value) return null;
|
|
3510
|
+
try {
|
|
3511
|
+
return JSON.parse(value);
|
|
3512
|
+
} catch {
|
|
3513
|
+
return null;
|
|
3514
|
+
}
|
|
3515
|
+
};
|
|
3477
3516
|
var SharedLifePlanApplication = ({
|
|
3478
3517
|
title = "Life Plan Application",
|
|
3479
3518
|
description = "Please fill out the form below to apply for a life plan.",
|
|
3480
|
-
onPaymentError
|
|
3519
|
+
onPaymentError,
|
|
3520
|
+
onCheckout,
|
|
3521
|
+
parseAddress
|
|
3481
3522
|
}) => {
|
|
3482
3523
|
const [currentStep, setCurrentStep] = useState11(0);
|
|
3483
3524
|
const [loading, setLoading] = useState11(false);
|
|
@@ -3490,6 +3531,7 @@ var SharedLifePlanApplication = ({
|
|
|
3490
3531
|
...applicationSection ? { applicationSection } : {},
|
|
3491
3532
|
applicationSectionKey,
|
|
3492
3533
|
onApplicationValidChange: setApplicationValid,
|
|
3534
|
+
...parseAddress ? { parseAddress } : {},
|
|
3493
3535
|
onEdit: (section) => {
|
|
3494
3536
|
setApplicationSection(section ?? "personal");
|
|
3495
3537
|
setApplicationSectionKey((key) => key + 1);
|
|
@@ -3500,6 +3542,38 @@ var SharedLifePlanApplication = ({
|
|
|
3500
3542
|
const handleCheckout = async () => {
|
|
3501
3543
|
if (!allAgreementsAccepted) return;
|
|
3502
3544
|
setLoading(true);
|
|
3545
|
+
try {
|
|
3546
|
+
if (!onCheckout) {
|
|
3547
|
+
throw new Error("onCheckout prop is not provided");
|
|
3548
|
+
}
|
|
3549
|
+
const checkoutRaw = sessionStorage.getItem("CheckoutCart");
|
|
3550
|
+
const cartRaw = sessionStorage.getItem("Cart");
|
|
3551
|
+
const parsed = safeParse(checkoutRaw) ?? safeParse(cartRaw);
|
|
3552
|
+
const items = Array.isArray(parsed) ? parsed : parsed ? [parsed] : [];
|
|
3553
|
+
if (items.length === 0) {
|
|
3554
|
+
throw new Error("No items to checkout");
|
|
3555
|
+
}
|
|
3556
|
+
const applicationData = loadApplicationDataFromLocalStorage() ?? createEmptyApplicationData();
|
|
3557
|
+
const checkoutPayload = items.map((item) => ({
|
|
3558
|
+
planDesc: item.planDesc,
|
|
3559
|
+
mode: item.mode,
|
|
3560
|
+
ipInstAmt: Number(item.price),
|
|
3561
|
+
planTerm: item.planTerm,
|
|
3562
|
+
quantity: item.quantity ?? 1
|
|
3563
|
+
}));
|
|
3564
|
+
const checkoutUrl = await onCheckout({
|
|
3565
|
+
items: checkoutPayload,
|
|
3566
|
+
application: applicationData
|
|
3567
|
+
});
|
|
3568
|
+
if (!checkoutUrl) throw new Error("Checkout URL not found");
|
|
3569
|
+
window.location.href = checkoutUrl;
|
|
3570
|
+
} catch (error) {
|
|
3571
|
+
console.error(error);
|
|
3572
|
+
onPaymentError?.(error);
|
|
3573
|
+
alert("Failed to proceed to payment");
|
|
3574
|
+
} finally {
|
|
3575
|
+
setLoading(false);
|
|
3576
|
+
}
|
|
3503
3577
|
};
|
|
3504
3578
|
return /* @__PURE__ */ jsx16(Box14, { w: "full", overflowX: "hidden", children: /* @__PURE__ */ jsx16(
|
|
3505
3579
|
horizontal_stepper_default,
|
|
@@ -3517,27 +3591,884 @@ var SharedLifePlanApplication_default = SharedLifePlanApplication;
|
|
|
3517
3591
|
|
|
3518
3592
|
// src/NewSaleForm/LifePlanApplicationStepWrapper.tsx
|
|
3519
3593
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3520
|
-
var LifePlanApplicationStepWrapper = () => {
|
|
3521
|
-
return /* @__PURE__ */ jsx17(SharedLifePlanApplication_default, {});
|
|
3594
|
+
var LifePlanApplicationStepWrapper = (props) => {
|
|
3595
|
+
return /* @__PURE__ */ jsx17(SharedLifePlanApplication_default, { ...props });
|
|
3522
3596
|
};
|
|
3523
3597
|
var LifePlanApplicationStepWrapper_default = LifePlanApplicationStepWrapper;
|
|
3524
3598
|
|
|
3599
|
+
// src/hooks/useOcr.ts
|
|
3600
|
+
import { useCallback as useCallback2, useState as useState12 } from "react";
|
|
3601
|
+
function useOcr(scanIdFn) {
|
|
3602
|
+
const [data, setData] = useState12(null);
|
|
3603
|
+
const [loading, setLoading] = useState12(false);
|
|
3604
|
+
const [error, setError] = useState12(null);
|
|
3605
|
+
const scanId = useCallback2(
|
|
3606
|
+
async (file) => {
|
|
3607
|
+
setLoading(true);
|
|
3608
|
+
setError(null);
|
|
3609
|
+
try {
|
|
3610
|
+
clearOcrResult();
|
|
3611
|
+
const result = await scanIdFn(file);
|
|
3612
|
+
saveOcrResult(result);
|
|
3613
|
+
setData(result);
|
|
3614
|
+
return result;
|
|
3615
|
+
} catch (err) {
|
|
3616
|
+
setError(err instanceof Error ? err.message : "OCR failed");
|
|
3617
|
+
throw err;
|
|
3618
|
+
} finally {
|
|
3619
|
+
setLoading(false);
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3622
|
+
[scanIdFn]
|
|
3623
|
+
);
|
|
3624
|
+
return { data, loading, error, scanId };
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
// src/GetStarted/GetStarted.tsx
|
|
3628
|
+
import {
|
|
3629
|
+
BaseText,
|
|
3630
|
+
Body as Body5,
|
|
3631
|
+
CancelButton as CancelButton2,
|
|
3632
|
+
H3 as H32,
|
|
3633
|
+
NextButton,
|
|
3634
|
+
PrimaryMdButton as PrimaryMdButton3
|
|
3635
|
+
} from "st-peter-ui";
|
|
3636
|
+
import {
|
|
3637
|
+
Box as Box17,
|
|
3638
|
+
VStack as VStack7,
|
|
3639
|
+
Dialog as Dialog3,
|
|
3640
|
+
Button as Button3,
|
|
3641
|
+
Portal as Portal4,
|
|
3642
|
+
CloseButton as CloseButton3,
|
|
3643
|
+
Input as Input4
|
|
3644
|
+
} from "@chakra-ui/react";
|
|
3645
|
+
import { useState as useState14 } from "react";
|
|
3646
|
+
import { LuIdCard, LuSignature } from "react-icons/lu";
|
|
3647
|
+
|
|
3648
|
+
// src/GetStarted/Container.tsx
|
|
3649
|
+
import "react";
|
|
3650
|
+
import { Box as Box15 } from "@chakra-ui/react";
|
|
3651
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3652
|
+
var Container = ({ children }) => {
|
|
3653
|
+
return /* @__PURE__ */ jsx18(
|
|
3654
|
+
Box15,
|
|
3655
|
+
{
|
|
3656
|
+
px: { base: 8, md: 8 },
|
|
3657
|
+
mt: { base: 16, md: 32 },
|
|
3658
|
+
mb: { base: 32, md: 16 },
|
|
3659
|
+
maxW: "7xl",
|
|
3660
|
+
mx: "auto",
|
|
3661
|
+
children
|
|
3662
|
+
}
|
|
3663
|
+
);
|
|
3664
|
+
};
|
|
3665
|
+
var Container_default = Container;
|
|
3666
|
+
|
|
3667
|
+
// src/GetStarted/DocumentUploadCard.tsx
|
|
3668
|
+
import { useEffect as useEffect7, useRef as useRef2, useState as useState13 } from "react";
|
|
3669
|
+
import { Box as Box16, Flex as Flex8, Spinner, Text as Text9, useBreakpointValue as useBreakpointValue2 } from "@chakra-ui/react";
|
|
3670
|
+
import {
|
|
3671
|
+
LuUpload,
|
|
3672
|
+
LuCamera,
|
|
3673
|
+
LuFolderOpen,
|
|
3674
|
+
LuFileText,
|
|
3675
|
+
LuCheck as LuCheck3,
|
|
3676
|
+
LuTriangleAlert,
|
|
3677
|
+
LuRefreshCw,
|
|
3678
|
+
LuTrash2,
|
|
3679
|
+
LuReplace,
|
|
3680
|
+
LuSparkles
|
|
3681
|
+
} from "react-icons/lu";
|
|
3682
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3683
|
+
var PRIMARY2 = "var(--chakra-colors-primary)";
|
|
3684
|
+
var PRIMARY_SOFT = "var(--chakra-colors-primary-disabled)";
|
|
3685
|
+
var defaultNotifyError = (message) => {
|
|
3686
|
+
console.error(message);
|
|
3687
|
+
};
|
|
3688
|
+
var formatBytes = (bytes) => {
|
|
3689
|
+
if (!bytes) return "";
|
|
3690
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
3691
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
|
|
3692
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
3693
|
+
};
|
|
3694
|
+
var validate = (file, config) => {
|
|
3695
|
+
const accepted = config.accept.split(",").map((s) => s.trim());
|
|
3696
|
+
const okType = accepted.includes(file.type) || accepted.some(
|
|
3697
|
+
(a) => a.endsWith("/*") && file.type.startsWith(a.slice(0, -1))
|
|
3698
|
+
) || accepted.some(
|
|
3699
|
+
(a) => a.startsWith(".") && file.name.toLowerCase().endsWith(a)
|
|
3700
|
+
);
|
|
3701
|
+
if (!okType) return "Unsupported file type. Please upload a JPG, PNG or PDF.";
|
|
3702
|
+
if (file.size > config.maxSizeMB * 1024 * 1024)
|
|
3703
|
+
return `File is too large. Maximum size is ${config.maxSizeMB}MB.`;
|
|
3704
|
+
return null;
|
|
3705
|
+
};
|
|
3706
|
+
var useDocumentSlot = (config, onProcess, notifyError = defaultNotifyError) => {
|
|
3707
|
+
const [slot, setSlot] = useState13({ status: "idle" });
|
|
3708
|
+
const timers = useRef2([]);
|
|
3709
|
+
const runId = useRef2(0);
|
|
3710
|
+
const clearTimers = () => {
|
|
3711
|
+
timers.current.forEach(clearTimeout);
|
|
3712
|
+
timers.current = [];
|
|
3713
|
+
};
|
|
3714
|
+
const processFile = (file, currentRun, isSignature) => {
|
|
3715
|
+
if (!onProcess) return false;
|
|
3716
|
+
onProcess(file).then((result) => {
|
|
3717
|
+
if (runId.current !== currentRun) return;
|
|
3718
|
+
setSlot((prev) => ({
|
|
3719
|
+
...prev,
|
|
3720
|
+
status: "completed",
|
|
3721
|
+
cleanedImageUrl: isSignature ? prev.previewUrl : void 0,
|
|
3722
|
+
extraction: !isSignature && result && typeof result === "object" ? result : void 0
|
|
3723
|
+
}));
|
|
3724
|
+
}).catch((err) => {
|
|
3725
|
+
if (runId.current !== currentRun) return;
|
|
3726
|
+
const message = err instanceof Error && err.message ? err.message : "We couldn't process this document. Please try again.";
|
|
3727
|
+
setSlot((prev) => ({ ...prev, status: "failed", error: message }));
|
|
3728
|
+
notifyError(message);
|
|
3729
|
+
});
|
|
3730
|
+
return true;
|
|
3731
|
+
};
|
|
3732
|
+
const runLifecycle = (file) => {
|
|
3733
|
+
clearTimers();
|
|
3734
|
+
const currentRun = ++runId.current;
|
|
3735
|
+
const previewUrl = URL.createObjectURL(file);
|
|
3736
|
+
const isSignature = config.processor === "signature";
|
|
3737
|
+
setSlot({
|
|
3738
|
+
status: "uploading",
|
|
3739
|
+
file,
|
|
3740
|
+
fileName: file.name,
|
|
3741
|
+
fileType: file.type,
|
|
3742
|
+
fileSize: file.size,
|
|
3743
|
+
previewUrl,
|
|
3744
|
+
progress: 0
|
|
3745
|
+
});
|
|
3746
|
+
let progress = 0;
|
|
3747
|
+
const tick = () => {
|
|
3748
|
+
progress = Math.min(100, progress + 20);
|
|
3749
|
+
setSlot((prev) => ({ ...prev, progress }));
|
|
3750
|
+
if (progress < 100) {
|
|
3751
|
+
timers.current.push(setTimeout(tick, 180));
|
|
3752
|
+
} else {
|
|
3753
|
+
timers.current.push(
|
|
3754
|
+
setTimeout(() => {
|
|
3755
|
+
setSlot((prev) => ({ ...prev, status: "processing" }));
|
|
3756
|
+
if (processFile(file, currentRun, isSignature)) return;
|
|
3757
|
+
timers.current.push(
|
|
3758
|
+
setTimeout(() => {
|
|
3759
|
+
setSlot((prev) => ({
|
|
3760
|
+
...prev,
|
|
3761
|
+
status: "completed",
|
|
3762
|
+
cleanedImageUrl: isSignature ? prev.previewUrl : void 0,
|
|
3763
|
+
extraction: isSignature ? void 0 : { name: "Sample", date: "2026-07-16", id: "0001" }
|
|
3764
|
+
}));
|
|
3765
|
+
}, 1600)
|
|
3766
|
+
);
|
|
3767
|
+
}, 200)
|
|
3768
|
+
);
|
|
3769
|
+
}
|
|
3770
|
+
};
|
|
3771
|
+
timers.current.push(setTimeout(tick, 180));
|
|
3772
|
+
};
|
|
3773
|
+
const uploadDocument = (file) => runLifecycle(file);
|
|
3774
|
+
const retryDocument = () => {
|
|
3775
|
+
if (slot.file) runLifecycle(slot.file);
|
|
3776
|
+
};
|
|
3777
|
+
const removeDocument = () => {
|
|
3778
|
+
clearTimers();
|
|
3779
|
+
runId.current++;
|
|
3780
|
+
if (slot.previewUrl) URL.revokeObjectURL(slot.previewUrl);
|
|
3781
|
+
setSlot({ status: "idle" });
|
|
3782
|
+
};
|
|
3783
|
+
return { slot, uploadDocument, retryDocument, removeDocument };
|
|
3784
|
+
};
|
|
3785
|
+
var Card = ({
|
|
3786
|
+
activeIcon,
|
|
3787
|
+
title,
|
|
3788
|
+
subtitle,
|
|
3789
|
+
headerAction,
|
|
3790
|
+
children
|
|
3791
|
+
}) => /* @__PURE__ */ jsxs15(
|
|
3792
|
+
Box16,
|
|
3793
|
+
{
|
|
3794
|
+
w: "full",
|
|
3795
|
+
borderRadius: "2xl",
|
|
3796
|
+
bg: "white",
|
|
3797
|
+
borderWidth: "1px",
|
|
3798
|
+
borderColor: "gray.200",
|
|
3799
|
+
shadow: "sm",
|
|
3800
|
+
overflow: "hidden",
|
|
3801
|
+
children: [
|
|
3802
|
+
/* @__PURE__ */ jsxs15(Flex8, { align: "center", justify: "space-between", px: 4, py: 3, gap: 2, children: [
|
|
3803
|
+
/* @__PURE__ */ jsxs15(Flex8, { align: "center", gap: 2, minW: 0, children: [
|
|
3804
|
+
/* @__PURE__ */ jsx19(
|
|
3805
|
+
Box16,
|
|
3806
|
+
{
|
|
3807
|
+
p: 2,
|
|
3808
|
+
borderRadius: "full",
|
|
3809
|
+
bg: "gray.100",
|
|
3810
|
+
color: PRIMARY2,
|
|
3811
|
+
flexShrink: 0,
|
|
3812
|
+
children: activeIcon
|
|
3813
|
+
}
|
|
3814
|
+
),
|
|
3815
|
+
/* @__PURE__ */ jsxs15(Box16, { minW: 0, children: [
|
|
3816
|
+
/* @__PURE__ */ jsx19(Text9, { fontWeight: "bold", fontSize: "md", lineHeight: "1.2", truncate: true, children: title }),
|
|
3817
|
+
subtitle && /* @__PURE__ */ jsx19(Text9, { fontSize: "xs", color: "gray.500", truncate: true, children: subtitle })
|
|
3818
|
+
] })
|
|
3819
|
+
] }),
|
|
3820
|
+
headerAction
|
|
3821
|
+
] }),
|
|
3822
|
+
/* @__PURE__ */ jsx19(Box16, { px: 4, pb: 4, pt: 1, borderTopWidth: "1px", borderColor: "gray.100", children })
|
|
3823
|
+
]
|
|
3824
|
+
}
|
|
3825
|
+
);
|
|
3826
|
+
var StatusPill = ({ status }) => {
|
|
3827
|
+
const map = {
|
|
3828
|
+
idle: null,
|
|
3829
|
+
uploading: { label: "Uploading", fg: "#1D4ED8", bg: "#EFF6FF" },
|
|
3830
|
+
processing: { label: "Analyzing", fg: "#7C3AED", bg: "#F5F3FF" },
|
|
3831
|
+
completed: { label: "Completed", fg: "#15803D", bg: "#F0FDF4" },
|
|
3832
|
+
failed: { label: "Failed", fg: "#B91C1C", bg: "#FEF2F2" }
|
|
3833
|
+
};
|
|
3834
|
+
const meta = map[status];
|
|
3835
|
+
if (!meta) return null;
|
|
3836
|
+
return /* @__PURE__ */ jsxs15(
|
|
3837
|
+
Flex8,
|
|
3838
|
+
{
|
|
3839
|
+
align: "center",
|
|
3840
|
+
gap: 1.5,
|
|
3841
|
+
px: 2.5,
|
|
3842
|
+
py: 1,
|
|
3843
|
+
borderRadius: "full",
|
|
3844
|
+
fontSize: "xs",
|
|
3845
|
+
fontWeight: 600,
|
|
3846
|
+
style: { color: meta.fg, background: meta.bg },
|
|
3847
|
+
flexShrink: 0,
|
|
3848
|
+
children: [
|
|
3849
|
+
status === "processing" || status === "uploading" ? /* @__PURE__ */ jsx19(Spinner, { size: "xs", borderWidth: "2px" }) : status === "completed" ? /* @__PURE__ */ jsx19(LuCheck3, { size: 12 }) : /* @__PURE__ */ jsx19(LuTriangleAlert, { size: 12 }),
|
|
3850
|
+
meta.label
|
|
3851
|
+
]
|
|
3852
|
+
}
|
|
3853
|
+
);
|
|
3854
|
+
};
|
|
3855
|
+
var ProgressBar = ({ value, color }) => /* @__PURE__ */ jsx19(Box16, { w: "full", h: "6px", bg: "gray.100", borderRadius: "full", overflow: "hidden", children: /* @__PURE__ */ jsx19(
|
|
3856
|
+
Box16,
|
|
3857
|
+
{
|
|
3858
|
+
h: "full",
|
|
3859
|
+
borderRadius: "full",
|
|
3860
|
+
style: {
|
|
3861
|
+
width: `${value}%`,
|
|
3862
|
+
background: color,
|
|
3863
|
+
transition: "width 0.2s ease"
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
) });
|
|
3867
|
+
var Thumb = ({
|
|
3868
|
+
url,
|
|
3869
|
+
isPdf,
|
|
3870
|
+
fileName,
|
|
3871
|
+
transparent
|
|
3872
|
+
}) => /* @__PURE__ */ jsx19(
|
|
3873
|
+
Flex8,
|
|
3874
|
+
{
|
|
3875
|
+
align: "center",
|
|
3876
|
+
justify: "center",
|
|
3877
|
+
boxSize: { base: "56px", md: "64px" },
|
|
3878
|
+
borderRadius: "lg",
|
|
3879
|
+
borderWidth: "1px",
|
|
3880
|
+
borderColor: "gray.200",
|
|
3881
|
+
overflow: "hidden",
|
|
3882
|
+
flexShrink: 0,
|
|
3883
|
+
bg: transparent ? "transparent" : "gray.50",
|
|
3884
|
+
style: transparent ? {
|
|
3885
|
+
backgroundImage: "linear-gradient(45deg,#eee 25%,transparent 25%),linear-gradient(-45deg,#eee 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eee 75%),linear-gradient(-45deg,transparent 75%,#eee 75%)",
|
|
3886
|
+
backgroundSize: "10px 10px",
|
|
3887
|
+
backgroundPosition: "0 0,0 5px,5px -5px,-5px 0"
|
|
3888
|
+
} : void 0,
|
|
3889
|
+
children: isPdf || !url ? /* @__PURE__ */ jsxs15(Flex8, { direction: "column", align: "center", color: "gray.400", gap: 0.5, children: [
|
|
3890
|
+
/* @__PURE__ */ jsx19(LuFileText, { size: 22 }),
|
|
3891
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "9px", fontWeight: 600, children: isPdf ? "PDF" : "FILE" })
|
|
3892
|
+
] }) : (
|
|
3893
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
3894
|
+
/* @__PURE__ */ jsx19(
|
|
3895
|
+
"img",
|
|
3896
|
+
{
|
|
3897
|
+
src: url,
|
|
3898
|
+
alt: fileName ?? "preview",
|
|
3899
|
+
style: { width: "100%", height: "100%", objectFit: "contain" }
|
|
3900
|
+
}
|
|
3901
|
+
)
|
|
3902
|
+
)
|
|
3903
|
+
}
|
|
3904
|
+
);
|
|
3905
|
+
var GhostBtn = ({
|
|
3906
|
+
icon,
|
|
3907
|
+
label,
|
|
3908
|
+
onClick,
|
|
3909
|
+
tone = "gray"
|
|
3910
|
+
}) => {
|
|
3911
|
+
const tones = {
|
|
3912
|
+
gray: { c: "gray.600", h: "gray.50", b: "gray.200" },
|
|
3913
|
+
danger: { c: "#B91C1C", h: "#FEF2F2", b: "#FECACA" },
|
|
3914
|
+
primary: { c: PRIMARY2, h: PRIMARY_SOFT, b: PRIMARY2 }
|
|
3915
|
+
};
|
|
3916
|
+
const t = tones[tone];
|
|
3917
|
+
return /* @__PURE__ */ jsxs15(
|
|
3918
|
+
Flex8,
|
|
3919
|
+
{
|
|
3920
|
+
as: "button",
|
|
3921
|
+
align: "center",
|
|
3922
|
+
gap: 1.5,
|
|
3923
|
+
px: 2.5,
|
|
3924
|
+
py: 1.5,
|
|
3925
|
+
borderRadius: "lg",
|
|
3926
|
+
borderWidth: "1px",
|
|
3927
|
+
borderColor: t.b,
|
|
3928
|
+
color: t.c,
|
|
3929
|
+
bg: "white",
|
|
3930
|
+
fontSize: "xs",
|
|
3931
|
+
fontWeight: 600,
|
|
3932
|
+
cursor: "pointer",
|
|
3933
|
+
_hover: { bg: t.h },
|
|
3934
|
+
transition: "all 0.15s",
|
|
3935
|
+
onClick,
|
|
3936
|
+
children: [
|
|
3937
|
+
icon,
|
|
3938
|
+
label
|
|
3939
|
+
]
|
|
3940
|
+
}
|
|
3941
|
+
);
|
|
3942
|
+
};
|
|
3943
|
+
function DocumentUploadCard({
|
|
3944
|
+
config,
|
|
3945
|
+
onStatusChange,
|
|
3946
|
+
onProcess,
|
|
3947
|
+
onError
|
|
3948
|
+
}) {
|
|
3949
|
+
const notifyError = onError ?? defaultNotifyError;
|
|
3950
|
+
const { slot, uploadDocument, retryDocument, removeDocument } = useDocumentSlot(config, onProcess, notifyError);
|
|
3951
|
+
const status = slot?.status ?? "idle";
|
|
3952
|
+
useEffect7(() => {
|
|
3953
|
+
onStatusChange?.(status);
|
|
3954
|
+
}, [status, onStatusChange]);
|
|
3955
|
+
const browseRef = useRef2(null);
|
|
3956
|
+
const cameraRef = useRef2(null);
|
|
3957
|
+
const [dragging, setDragging] = useState13(false);
|
|
3958
|
+
const Icon6 = config.icon;
|
|
3959
|
+
const isPdf = slot?.fileType === "application/pdf";
|
|
3960
|
+
const handleFiles = (files) => {
|
|
3961
|
+
const file = files?.[0];
|
|
3962
|
+
if (!file) return;
|
|
3963
|
+
const error = validate(file, config);
|
|
3964
|
+
if (error) {
|
|
3965
|
+
notifyError(error);
|
|
3966
|
+
return;
|
|
3967
|
+
}
|
|
3968
|
+
void uploadDocument(file);
|
|
3969
|
+
};
|
|
3970
|
+
const onDrop = (e) => {
|
|
3971
|
+
e.preventDefault();
|
|
3972
|
+
setDragging(false);
|
|
3973
|
+
handleFiles(e.dataTransfer.files);
|
|
3974
|
+
};
|
|
3975
|
+
const renderDropzone = () => /* @__PURE__ */ jsxs15(
|
|
3976
|
+
Flex8,
|
|
3977
|
+
{
|
|
3978
|
+
direction: "column",
|
|
3979
|
+
align: "center",
|
|
3980
|
+
justify: "center",
|
|
3981
|
+
gap: 2,
|
|
3982
|
+
py: { base: 6, md: 7 },
|
|
3983
|
+
px: 4,
|
|
3984
|
+
borderWidth: "2px",
|
|
3985
|
+
borderStyle: "dashed",
|
|
3986
|
+
borderColor: dragging ? PRIMARY2 : "gray.200",
|
|
3987
|
+
borderRadius: "xl",
|
|
3988
|
+
bg: dragging ? PRIMARY_SOFT : "gray.50",
|
|
3989
|
+
transition: "all 0.15s",
|
|
3990
|
+
textAlign: "center",
|
|
3991
|
+
onDragOver: (e) => {
|
|
3992
|
+
e.preventDefault();
|
|
3993
|
+
setDragging(true);
|
|
3994
|
+
},
|
|
3995
|
+
onDragLeave: () => setDragging(false),
|
|
3996
|
+
onDrop,
|
|
3997
|
+
role: "button",
|
|
3998
|
+
tabIndex: 0,
|
|
3999
|
+
onClick: () => browseRef.current?.click(),
|
|
4000
|
+
onKeyDown: (e) => {
|
|
4001
|
+
if (e.key === "Enter" || e.key === " ") browseRef.current?.click();
|
|
4002
|
+
},
|
|
4003
|
+
cursor: "pointer",
|
|
4004
|
+
_hover: { borderColor: PRIMARY2, bg: PRIMARY_SOFT },
|
|
4005
|
+
children: [
|
|
4006
|
+
/* @__PURE__ */ jsx19(
|
|
4007
|
+
Flex8,
|
|
4008
|
+
{
|
|
4009
|
+
align: "center",
|
|
4010
|
+
justify: "center",
|
|
4011
|
+
boxSize: 11,
|
|
4012
|
+
borderRadius: "full",
|
|
4013
|
+
bg: "white",
|
|
4014
|
+
borderWidth: "1px",
|
|
4015
|
+
borderColor: "gray.200",
|
|
4016
|
+
color: PRIMARY2,
|
|
4017
|
+
children: /* @__PURE__ */ jsx19(LuUpload, { size: 18 })
|
|
4018
|
+
}
|
|
4019
|
+
),
|
|
4020
|
+
/* @__PURE__ */ jsxs15(Box16, { children: [
|
|
4021
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "sm", fontWeight: 600, color: "gray.800", children: "Drag & drop or tap to upload" }),
|
|
4022
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "xs", color: "gray.500", mt: 0.5, children: config.hint ?? "JPG, PNG or PDF" })
|
|
4023
|
+
] }),
|
|
4024
|
+
/* @__PURE__ */ jsxs15(Flex8, { gap: 2, mt: 1, onClick: (e) => e.stopPropagation(), children: [
|
|
4025
|
+
/* @__PURE__ */ jsx19(
|
|
4026
|
+
GhostBtn,
|
|
4027
|
+
{
|
|
4028
|
+
icon: /* @__PURE__ */ jsx19(LuFolderOpen, { size: 13 }),
|
|
4029
|
+
label: "Browse",
|
|
4030
|
+
tone: "primary",
|
|
4031
|
+
onClick: () => browseRef.current?.click()
|
|
4032
|
+
}
|
|
4033
|
+
),
|
|
4034
|
+
/* @__PURE__ */ jsx19(
|
|
4035
|
+
GhostBtn,
|
|
4036
|
+
{
|
|
4037
|
+
icon: /* @__PURE__ */ jsx19(LuCamera, { size: 13 }),
|
|
4038
|
+
label: "Take photo",
|
|
4039
|
+
onClick: () => cameraRef.current?.click()
|
|
4040
|
+
}
|
|
4041
|
+
)
|
|
4042
|
+
] })
|
|
4043
|
+
]
|
|
4044
|
+
}
|
|
4045
|
+
);
|
|
4046
|
+
const renderBusy = () => /* @__PURE__ */ jsxs15(Flex8, { gap: 3, align: "center", children: [
|
|
4047
|
+
/* @__PURE__ */ jsx19(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4048
|
+
/* @__PURE__ */ jsxs15(Box16, { flex: "1", minW: 0, children: [
|
|
4049
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName }),
|
|
4050
|
+
status === "uploading" ? /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
4051
|
+
/* @__PURE__ */ jsxs15(
|
|
4052
|
+
Flex8,
|
|
4053
|
+
{
|
|
4054
|
+
justify: "space-between",
|
|
4055
|
+
fontSize: "xs",
|
|
4056
|
+
color: "gray.500",
|
|
4057
|
+
mt: 1,
|
|
4058
|
+
mb: 1,
|
|
4059
|
+
children: [
|
|
4060
|
+
/* @__PURE__ */ jsx19(Text9, { children: "Uploading\u2026" }),
|
|
4061
|
+
/* @__PURE__ */ jsxs15(Text9, { fontWeight: 600, children: [
|
|
4062
|
+
slot?.progress ?? 0,
|
|
4063
|
+
"%"
|
|
4064
|
+
] })
|
|
4065
|
+
]
|
|
4066
|
+
}
|
|
4067
|
+
),
|
|
4068
|
+
/* @__PURE__ */ jsx19(ProgressBar, { value: slot?.progress ?? 0, color: "#2563EB" })
|
|
4069
|
+
] }) : /* @__PURE__ */ jsxs15(Flex8, { align: "center", gap: 2, mt: 1.5, children: [
|
|
4070
|
+
/* @__PURE__ */ jsxs15(
|
|
4071
|
+
Flex8,
|
|
4072
|
+
{
|
|
4073
|
+
align: "center",
|
|
4074
|
+
gap: 1.5,
|
|
4075
|
+
px: 2,
|
|
4076
|
+
py: 1,
|
|
4077
|
+
borderRadius: "md",
|
|
4078
|
+
bg: "#F5F3FF",
|
|
4079
|
+
color: "#7C3AED",
|
|
4080
|
+
fontSize: "xs",
|
|
4081
|
+
fontWeight: 600,
|
|
4082
|
+
children: [
|
|
4083
|
+
/* @__PURE__ */ jsx19(LuSparkles, { size: 12 }),
|
|
4084
|
+
config.processor === "signature" ? "Cleaning signature\u2026" : "Reading with AI\u2026"
|
|
4085
|
+
]
|
|
4086
|
+
}
|
|
4087
|
+
),
|
|
4088
|
+
/* @__PURE__ */ jsx19(Spinner, { size: "xs", color: "#7C3AED", borderWidth: "2px" })
|
|
4089
|
+
] }),
|
|
4090
|
+
status === "processing" && /* @__PURE__ */ jsx19(Text9, { fontSize: "11px", color: "gray.400", mt: 1.5, children: "This can take a few seconds. Your upload is already saved." })
|
|
4091
|
+
] })
|
|
4092
|
+
] });
|
|
4093
|
+
const renderFailed = () => /* @__PURE__ */ jsxs15(Box16, { children: [
|
|
4094
|
+
/* @__PURE__ */ jsxs15(Flex8, { gap: 3, align: "flex-start", children: [
|
|
4095
|
+
/* @__PURE__ */ jsx19(Thumb, { url: slot?.previewUrl, isPdf, fileName: slot?.fileName }),
|
|
4096
|
+
/* @__PURE__ */ jsxs15(Box16, { flex: "1", minW: 0, children: [
|
|
4097
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName ?? config.label }),
|
|
4098
|
+
/* @__PURE__ */ jsxs15(Flex8, { align: "flex-start", gap: 1.5, mt: 1, color: "#B91C1C", children: [
|
|
4099
|
+
/* @__PURE__ */ jsx19(Box16, { mt: "1px", children: /* @__PURE__ */ jsx19(LuTriangleAlert, { size: 13 }) }),
|
|
4100
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "xs", lineHeight: "1.4", children: slot?.error ?? "We couldn't process this document." })
|
|
4101
|
+
] })
|
|
4102
|
+
] })
|
|
4103
|
+
] }),
|
|
4104
|
+
/* @__PURE__ */ jsxs15(Flex8, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4105
|
+
slot?.file ? /* @__PURE__ */ jsx19(
|
|
4106
|
+
GhostBtn,
|
|
4107
|
+
{
|
|
4108
|
+
icon: /* @__PURE__ */ jsx19(LuRefreshCw, { size: 13 }),
|
|
4109
|
+
label: "Retry",
|
|
4110
|
+
tone: "primary",
|
|
4111
|
+
onClick: () => void retryDocument()
|
|
4112
|
+
}
|
|
4113
|
+
) : /* @__PURE__ */ jsx19(
|
|
4114
|
+
GhostBtn,
|
|
4115
|
+
{
|
|
4116
|
+
icon: /* @__PURE__ */ jsx19(LuUpload, { size: 13 }),
|
|
4117
|
+
label: "Re-upload",
|
|
4118
|
+
tone: "primary",
|
|
4119
|
+
onClick: () => browseRef.current?.click()
|
|
4120
|
+
}
|
|
4121
|
+
),
|
|
4122
|
+
/* @__PURE__ */ jsx19(
|
|
4123
|
+
GhostBtn,
|
|
4124
|
+
{
|
|
4125
|
+
icon: /* @__PURE__ */ jsx19(LuReplace, { size: 13 }),
|
|
4126
|
+
label: "Choose another",
|
|
4127
|
+
onClick: () => browseRef.current?.click()
|
|
4128
|
+
}
|
|
4129
|
+
),
|
|
4130
|
+
/* @__PURE__ */ jsx19(
|
|
4131
|
+
GhostBtn,
|
|
4132
|
+
{
|
|
4133
|
+
icon: /* @__PURE__ */ jsx19(LuTrash2, { size: 13 }),
|
|
4134
|
+
label: "Remove",
|
|
4135
|
+
tone: "danger",
|
|
4136
|
+
onClick: () => removeDocument()
|
|
4137
|
+
}
|
|
4138
|
+
)
|
|
4139
|
+
] })
|
|
4140
|
+
] });
|
|
4141
|
+
const renderCompleted = () => {
|
|
4142
|
+
const isSignature = config.processor === "signature";
|
|
4143
|
+
const fieldCount = slot?.extraction ? Object.values(slot.extraction).filter(Boolean).length : 0;
|
|
4144
|
+
const displayUrl = isSignature ? slot?.cleanedImageUrl ?? slot?.previewUrl : slot?.previewUrl;
|
|
4145
|
+
return /* @__PURE__ */ jsxs15(Box16, { children: [
|
|
4146
|
+
/* @__PURE__ */ jsxs15(Flex8, { gap: 3, align: "center", children: [
|
|
4147
|
+
/* @__PURE__ */ jsx19(
|
|
4148
|
+
Thumb,
|
|
4149
|
+
{
|
|
4150
|
+
url: displayUrl,
|
|
4151
|
+
isPdf: isPdf && !isSignature,
|
|
4152
|
+
fileName: slot?.fileName,
|
|
4153
|
+
transparent: isSignature && !!slot?.cleanedImageUrl
|
|
4154
|
+
}
|
|
4155
|
+
),
|
|
4156
|
+
/* @__PURE__ */ jsxs15(Box16, { flex: "1", minW: 0, children: [
|
|
4157
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "sm", fontWeight: 600, color: "gray.800", truncate: true, children: slot?.fileName }),
|
|
4158
|
+
/* @__PURE__ */ jsx19(Text9, { fontSize: "xs", color: "gray.500", children: formatBytes(slot?.fileSize) }),
|
|
4159
|
+
/* @__PURE__ */ jsxs15(
|
|
4160
|
+
Flex8,
|
|
4161
|
+
{
|
|
4162
|
+
align: "center",
|
|
4163
|
+
gap: 1.5,
|
|
4164
|
+
mt: 1.5,
|
|
4165
|
+
color: PRIMARY2,
|
|
4166
|
+
fontSize: "xs",
|
|
4167
|
+
fontWeight: 600,
|
|
4168
|
+
children: [
|
|
4169
|
+
/* @__PURE__ */ jsx19(LuSparkles, { size: 12 }),
|
|
4170
|
+
isSignature ? "Signature detected & cleaned" : `${fieldCount} field${fieldCount === 1 ? "" : "s"} extracted`
|
|
4171
|
+
]
|
|
4172
|
+
}
|
|
4173
|
+
)
|
|
4174
|
+
] })
|
|
4175
|
+
] }),
|
|
4176
|
+
/* @__PURE__ */ jsxs15(Flex8, { gap: 2, mt: 3, wrap: "wrap", children: [
|
|
4177
|
+
/* @__PURE__ */ jsx19(
|
|
4178
|
+
GhostBtn,
|
|
4179
|
+
{
|
|
4180
|
+
icon: /* @__PURE__ */ jsx19(LuReplace, { size: 13 }),
|
|
4181
|
+
label: "Replace",
|
|
4182
|
+
onClick: () => browseRef.current?.click()
|
|
4183
|
+
}
|
|
4184
|
+
),
|
|
4185
|
+
/* @__PURE__ */ jsx19(
|
|
4186
|
+
GhostBtn,
|
|
4187
|
+
{
|
|
4188
|
+
icon: /* @__PURE__ */ jsx19(LuTrash2, { size: 13 }),
|
|
4189
|
+
label: "Remove",
|
|
4190
|
+
tone: "danger",
|
|
4191
|
+
onClick: () => removeDocument()
|
|
4192
|
+
}
|
|
4193
|
+
)
|
|
4194
|
+
] })
|
|
4195
|
+
] });
|
|
4196
|
+
};
|
|
4197
|
+
const requiredTag = /* @__PURE__ */ jsx19(
|
|
4198
|
+
Text9,
|
|
4199
|
+
{
|
|
4200
|
+
fontSize: "10px",
|
|
4201
|
+
fontWeight: 700,
|
|
4202
|
+
px: 1.5,
|
|
4203
|
+
py: 0.5,
|
|
4204
|
+
borderRadius: "full",
|
|
4205
|
+
color: config.required ? "#B45309" : "gray.500",
|
|
4206
|
+
bg: config.required ? "#FEF3C7" : "gray.100",
|
|
4207
|
+
flexShrink: 0,
|
|
4208
|
+
children: config.required ? "REQUIRED" : "OPTIONAL"
|
|
4209
|
+
}
|
|
4210
|
+
);
|
|
4211
|
+
const isMobile = useBreakpointValue2({ base: true, lg: false });
|
|
4212
|
+
return /* @__PURE__ */ jsxs15(
|
|
4213
|
+
Card,
|
|
4214
|
+
{
|
|
4215
|
+
activeIcon: /* @__PURE__ */ jsx19(Icon6, { size: 18 }),
|
|
4216
|
+
title: config.label,
|
|
4217
|
+
subtitle: config.description,
|
|
4218
|
+
headerAction: !isMobile ? /* @__PURE__ */ jsxs15(Flex8, { align: "center", gap: 2, flexShrink: 0, children: [
|
|
4219
|
+
requiredTag,
|
|
4220
|
+
/* @__PURE__ */ jsx19(StatusPill, { status })
|
|
4221
|
+
] }) : /* @__PURE__ */ jsx19(Fragment3, {}),
|
|
4222
|
+
children: [
|
|
4223
|
+
isMobile ? /* @__PURE__ */ jsxs15(
|
|
4224
|
+
Flex8,
|
|
4225
|
+
{
|
|
4226
|
+
align: "center",
|
|
4227
|
+
justifySelf: "flex-end",
|
|
4228
|
+
gap: 2,
|
|
4229
|
+
mb: 1,
|
|
4230
|
+
flexShrink: 0,
|
|
4231
|
+
children: [
|
|
4232
|
+
requiredTag,
|
|
4233
|
+
/* @__PURE__ */ jsx19(StatusPill, { status })
|
|
4234
|
+
]
|
|
4235
|
+
}
|
|
4236
|
+
) : /* @__PURE__ */ jsx19(Fragment3, {}),
|
|
4237
|
+
status === "idle" && renderDropzone(),
|
|
4238
|
+
(status === "uploading" || status === "processing") && renderBusy(),
|
|
4239
|
+
status === "failed" && renderFailed(),
|
|
4240
|
+
status === "completed" && renderCompleted(),
|
|
4241
|
+
/* @__PURE__ */ jsx19(
|
|
4242
|
+
"input",
|
|
4243
|
+
{
|
|
4244
|
+
ref: browseRef,
|
|
4245
|
+
type: "file",
|
|
4246
|
+
accept: config.accept,
|
|
4247
|
+
hidden: true,
|
|
4248
|
+
onChange: (e) => {
|
|
4249
|
+
handleFiles(e.target.files);
|
|
4250
|
+
e.target.value = "";
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
),
|
|
4254
|
+
/* @__PURE__ */ jsx19(
|
|
4255
|
+
"input",
|
|
4256
|
+
{
|
|
4257
|
+
ref: cameraRef,
|
|
4258
|
+
type: "file",
|
|
4259
|
+
accept: "image/*",
|
|
4260
|
+
capture: "environment",
|
|
4261
|
+
hidden: true,
|
|
4262
|
+
onChange: (e) => {
|
|
4263
|
+
handleFiles(e.target.files);
|
|
4264
|
+
e.target.value = "";
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
)
|
|
4268
|
+
]
|
|
4269
|
+
}
|
|
4270
|
+
);
|
|
4271
|
+
}
|
|
4272
|
+
|
|
4273
|
+
// src/GetStarted/GetStarted.tsx
|
|
4274
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4275
|
+
var defaultNotify = (type, message) => {
|
|
4276
|
+
if (type === "error") console.error(message);
|
|
4277
|
+
else console.info(message);
|
|
4278
|
+
};
|
|
4279
|
+
var GOVERNMENT_ID_CONFIG = {
|
|
4280
|
+
id: "government-id",
|
|
4281
|
+
label: "Government-issued ID",
|
|
4282
|
+
description: "Current and valid ID",
|
|
4283
|
+
accept: "image/*",
|
|
4284
|
+
maxSizeMB: 5,
|
|
4285
|
+
required: true,
|
|
4286
|
+
hint: "Any image \xB7 up to 5MB",
|
|
4287
|
+
processor: "extraction",
|
|
4288
|
+
icon: LuIdCard
|
|
4289
|
+
};
|
|
4290
|
+
var SIGNATURE_CONFIG = {
|
|
4291
|
+
id: "specimen-signature",
|
|
4292
|
+
label: "Specimen Signature",
|
|
4293
|
+
description: "Signature on plain white paper",
|
|
4294
|
+
accept: "image/png,image/jpeg,application/pdf",
|
|
4295
|
+
maxSizeMB: 5,
|
|
4296
|
+
required: true,
|
|
4297
|
+
hint: "JPG, PNG or PDF \xB7 up to 5MB",
|
|
4298
|
+
processor: "signature",
|
|
4299
|
+
icon: LuSignature
|
|
4300
|
+
};
|
|
4301
|
+
var GetStarted = ({
|
|
4302
|
+
scanId: scanIdFn,
|
|
4303
|
+
onContinue,
|
|
4304
|
+
notify = defaultNotify
|
|
4305
|
+
}) => {
|
|
4306
|
+
const [uploadDialogOpen, setUploadDialogOpen] = useState14(false);
|
|
4307
|
+
const [referralDialogOpen, setReferralDialogOpen] = useState14(false);
|
|
4308
|
+
const [governmentIdStatus, setGovernmentIdStatus] = useState14("idle");
|
|
4309
|
+
const { scanId } = useOcr(scanIdFn);
|
|
4310
|
+
return /* @__PURE__ */ jsx20(Container_default, { children: /* @__PURE__ */ jsxs16(
|
|
4311
|
+
Box17,
|
|
4312
|
+
{
|
|
4313
|
+
p: { base: 0, md: 8 },
|
|
4314
|
+
rounded: "lg",
|
|
4315
|
+
shadow: { base: "none", md: "md" },
|
|
4316
|
+
bg: "white",
|
|
4317
|
+
maxW: "3xl",
|
|
4318
|
+
display: "flex",
|
|
4319
|
+
flexDirection: "column",
|
|
4320
|
+
alignItems: "center",
|
|
4321
|
+
mx: "auto",
|
|
4322
|
+
children: [
|
|
4323
|
+
/* @__PURE__ */ jsxs16(VStack7, { gap: 4, align: "stretch", children: [
|
|
4324
|
+
/* @__PURE__ */ jsx20(Box17, { textAlign: "center", children: /* @__PURE__ */ jsx20(H32, { children: "Let's Get Started" }) }),
|
|
4325
|
+
/* @__PURE__ */ jsx20(BaseText, { textAlign: { base: "center", md: "start" }, children: "We'll be needing some documents and information to proceed with the purchase, please prepare the following in advance to smooth out the next steps" }),
|
|
4326
|
+
/* @__PURE__ */ jsx20(Box17, { bg: "gray.50", p: 8, rounded: "md", children: /* @__PURE__ */ jsx20(VStack7, { align: "start", gap: 2, children: /* @__PURE__ */ jsxs16(Box17, { mb: 4, display: "flex", flexDirection: "column", gap: 2, children: [
|
|
4327
|
+
/* @__PURE__ */ jsx20(BaseText, { fontWeight: "bold", children: "Required Information" }),
|
|
4328
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "1. Full Name" }),
|
|
4329
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "2. Nationality" }),
|
|
4330
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "3. Mobile Number" }),
|
|
4331
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "4. Email Address" }),
|
|
4332
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "5. Date of Birth" }),
|
|
4333
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "6. Complete Address" }),
|
|
4334
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "7. Beneficiary/ies" }),
|
|
4335
|
+
/* @__PURE__ */ jsx20(BaseText, { fontWeight: "bold", children: "Required Documents" }),
|
|
4336
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "1. Current and Valid Government-issued ID" }),
|
|
4337
|
+
/* @__PURE__ */ jsx20(BaseText, { children: "2. Specimen Signature" })
|
|
4338
|
+
] }) }) })
|
|
4339
|
+
] }),
|
|
4340
|
+
/* @__PURE__ */ jsxs16(Box17, { textAlign: "end", children: [
|
|
4341
|
+
/* @__PURE__ */ jsxs16(
|
|
4342
|
+
Dialog3.Root,
|
|
4343
|
+
{
|
|
4344
|
+
size: { mdDown: "full", md: "md" },
|
|
4345
|
+
open: uploadDialogOpen,
|
|
4346
|
+
onOpenChange: (details) => setUploadDialogOpen(details.open),
|
|
4347
|
+
children: [
|
|
4348
|
+
/* @__PURE__ */ jsx20(Dialog3.Trigger, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
4349
|
+
Button3,
|
|
4350
|
+
{
|
|
4351
|
+
w: { base: "sm", md: "2xl" },
|
|
4352
|
+
mt: { base: 4, md: 8 },
|
|
4353
|
+
onClick: () => setUploadDialogOpen(true),
|
|
4354
|
+
children: "CONTINUE"
|
|
4355
|
+
}
|
|
4356
|
+
) }),
|
|
4357
|
+
/* @__PURE__ */ jsxs16(Portal4, { children: [
|
|
4358
|
+
/* @__PURE__ */ jsx20(Dialog3.Backdrop, {}),
|
|
4359
|
+
/* @__PURE__ */ jsx20(Dialog3.Positioner, { children: /* @__PURE__ */ jsxs16(Dialog3.Content, { children: [
|
|
4360
|
+
/* @__PURE__ */ jsx20(Dialog3.Header, { children: /* @__PURE__ */ jsx20(Dialog3.Title, { children: "Upload Requirements" }) }),
|
|
4361
|
+
/* @__PURE__ */ jsx20(Dialog3.Body, { children: /* @__PURE__ */ jsxs16(VStack7, { gap: 6, align: "stretch", children: [
|
|
4362
|
+
/* @__PURE__ */ jsx20(info_card_default, { children: "To continue, please upload a valid ID. The system will use it to populate your information automatically." }),
|
|
4363
|
+
/* @__PURE__ */ jsx20(
|
|
4364
|
+
DocumentUploadCard,
|
|
4365
|
+
{
|
|
4366
|
+
config: GOVERNMENT_ID_CONFIG,
|
|
4367
|
+
onStatusChange: setGovernmentIdStatus,
|
|
4368
|
+
onProcess: scanId,
|
|
4369
|
+
onError: (message) => notify("error", message)
|
|
4370
|
+
}
|
|
4371
|
+
),
|
|
4372
|
+
/* @__PURE__ */ jsx20(
|
|
4373
|
+
DocumentUploadCard,
|
|
4374
|
+
{
|
|
4375
|
+
config: SIGNATURE_CONFIG,
|
|
4376
|
+
onError: (message) => notify("error", message)
|
|
4377
|
+
}
|
|
4378
|
+
)
|
|
4379
|
+
] }) }),
|
|
4380
|
+
/* @__PURE__ */ jsxs16(Dialog3.Footer, { display: "flex", justifyContent: "space-between", children: [
|
|
4381
|
+
/* @__PURE__ */ jsx20(Dialog3.ActionTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(CancelButton2, {}) }),
|
|
4382
|
+
/* @__PURE__ */ jsx20(
|
|
4383
|
+
NextButton,
|
|
4384
|
+
{
|
|
4385
|
+
onClick: () => {
|
|
4386
|
+
if (governmentIdStatus === "uploading" || governmentIdStatus === "processing") {
|
|
4387
|
+
notify("info", "Please wait while we read your ID.");
|
|
4388
|
+
return;
|
|
4389
|
+
}
|
|
4390
|
+
if (governmentIdStatus !== "completed") {
|
|
4391
|
+
notify("error", "Please upload a government-issued ID.");
|
|
4392
|
+
return;
|
|
4393
|
+
}
|
|
4394
|
+
setUploadDialogOpen(false);
|
|
4395
|
+
setReferralDialogOpen(true);
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
)
|
|
4399
|
+
] }),
|
|
4400
|
+
/* @__PURE__ */ jsx20(Dialog3.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(CloseButton3, { size: "sm" }) })
|
|
4401
|
+
] }) })
|
|
4402
|
+
] })
|
|
4403
|
+
]
|
|
4404
|
+
}
|
|
4405
|
+
),
|
|
4406
|
+
/* @__PURE__ */ jsx20(
|
|
4407
|
+
Dialog3.Root,
|
|
4408
|
+
{
|
|
4409
|
+
placement: "center",
|
|
4410
|
+
open: referralDialogOpen,
|
|
4411
|
+
onOpenChange: (details) => setReferralDialogOpen(details.open),
|
|
4412
|
+
size: { mdDown: "full", md: "md" },
|
|
4413
|
+
children: /* @__PURE__ */ jsxs16(Portal4, { children: [
|
|
4414
|
+
/* @__PURE__ */ jsx20(Dialog3.Backdrop, {}),
|
|
4415
|
+
/* @__PURE__ */ jsx20(Dialog3.Positioner, { children: /* @__PURE__ */ jsxs16(Dialog3.Content, { children: [
|
|
4416
|
+
/* @__PURE__ */ jsx20(Dialog3.Header, { children: /* @__PURE__ */ jsx20(Dialog3.Title, { children: "Referral Agent" }) }),
|
|
4417
|
+
/* @__PURE__ */ jsx20(Dialog3.Body, { children: /* @__PURE__ */ jsxs16(VStack7, { align: "stretch", gap: 4, children: [
|
|
4418
|
+
/* @__PURE__ */ jsx20(Body5, { children: "Do you have an referral agent? (optional)" }),
|
|
4419
|
+
/* @__PURE__ */ jsx20(Input4, { placeholder: "Enter agent name" })
|
|
4420
|
+
] }) }),
|
|
4421
|
+
/* @__PURE__ */ jsxs16(Dialog3.Footer, { display: "flex", justifyContent: "space-between", children: [
|
|
4422
|
+
/* @__PURE__ */ jsx20(
|
|
4423
|
+
Button3,
|
|
4424
|
+
{
|
|
4425
|
+
variant: "outline",
|
|
4426
|
+
onClick: () => {
|
|
4427
|
+
setReferralDialogOpen(false);
|
|
4428
|
+
onContinue?.();
|
|
4429
|
+
},
|
|
4430
|
+
children: "Skip"
|
|
4431
|
+
}
|
|
4432
|
+
),
|
|
4433
|
+
/* @__PURE__ */ jsx20(
|
|
4434
|
+
PrimaryMdButton3,
|
|
4435
|
+
{
|
|
4436
|
+
onClick: () => {
|
|
4437
|
+
setReferralDialogOpen(false);
|
|
4438
|
+
onContinue?.();
|
|
4439
|
+
},
|
|
4440
|
+
children: "Continue"
|
|
4441
|
+
}
|
|
4442
|
+
)
|
|
4443
|
+
] }),
|
|
4444
|
+
/* @__PURE__ */ jsx20(Dialog3.CloseTrigger, { asChild: true, children: /* @__PURE__ */ jsx20(CloseButton3, { size: "sm" }) })
|
|
4445
|
+
] }) })
|
|
4446
|
+
] })
|
|
4447
|
+
}
|
|
4448
|
+
)
|
|
4449
|
+
] })
|
|
4450
|
+
]
|
|
4451
|
+
}
|
|
4452
|
+
) });
|
|
4453
|
+
};
|
|
4454
|
+
var GetStarted_default = GetStarted;
|
|
4455
|
+
|
|
3525
4456
|
// src/Generic/BottomQuickActions.tsx
|
|
3526
|
-
import
|
|
4457
|
+
import React7 from "react";
|
|
3527
4458
|
import {
|
|
3528
|
-
Box as
|
|
4459
|
+
Box as Box18,
|
|
3529
4460
|
Drawer,
|
|
3530
|
-
Portal as
|
|
4461
|
+
Portal as Portal5,
|
|
3531
4462
|
HStack as HStack4,
|
|
3532
|
-
VStack as
|
|
3533
|
-
Flex as
|
|
4463
|
+
VStack as VStack8,
|
|
4464
|
+
Flex as Flex9,
|
|
3534
4465
|
Icon as Icon4,
|
|
3535
|
-
CloseButton as
|
|
3536
|
-
Text as
|
|
4466
|
+
CloseButton as CloseButton4,
|
|
4467
|
+
Text as Text10
|
|
3537
4468
|
} from "@chakra-ui/react";
|
|
3538
4469
|
import { LuChevronRight as LuChevronRight2 } from "react-icons/lu";
|
|
3539
4470
|
import Link from "next/link";
|
|
3540
|
-
import { jsx as
|
|
4471
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3541
4472
|
var SHEET_BG = BRAND_COLORS.white;
|
|
3542
4473
|
var DRAG_COLOR = BRAND_COLORS.neutralBorder;
|
|
3543
4474
|
var ITEM_BG = BRAND_COLORS.white;
|
|
@@ -3554,14 +4485,14 @@ var SUBTITLE_COLOR = BRAND_COLORS.grey;
|
|
|
3554
4485
|
var LABEL_COLOR = BRAND_COLORS.neutralText;
|
|
3555
4486
|
var DESC_COLOR = BRAND_COLORS.grey;
|
|
3556
4487
|
var CHEVRON_COLOR = BRAND_COLORS.ashWhite;
|
|
3557
|
-
var QuickActionsHeaderCard =
|
|
4488
|
+
var QuickActionsHeaderCard = React7.memo(
|
|
3558
4489
|
({
|
|
3559
4490
|
initials,
|
|
3560
4491
|
avatarBg = AVATAR_DEFAULT_BG,
|
|
3561
4492
|
label,
|
|
3562
4493
|
meta,
|
|
3563
4494
|
trailing
|
|
3564
|
-
}) => /* @__PURE__ */
|
|
4495
|
+
}) => /* @__PURE__ */ jsxs17(
|
|
3565
4496
|
HStack4,
|
|
3566
4497
|
{
|
|
3567
4498
|
gap: STANDARD_SPACING.sm,
|
|
@@ -3572,8 +4503,8 @@ var QuickActionsHeaderCard = React5.memo(
|
|
|
3572
4503
|
borderWidth: "1px",
|
|
3573
4504
|
borderColor: HEADER_CARD_BORDER,
|
|
3574
4505
|
children: [
|
|
3575
|
-
initials && /* @__PURE__ */
|
|
3576
|
-
|
|
4506
|
+
initials && /* @__PURE__ */ jsx21(
|
|
4507
|
+
Flex9,
|
|
3577
4508
|
{
|
|
3578
4509
|
w: "40px",
|
|
3579
4510
|
h: "40px",
|
|
@@ -3582,8 +4513,8 @@ var QuickActionsHeaderCard = React5.memo(
|
|
|
3582
4513
|
align: "center",
|
|
3583
4514
|
justify: "center",
|
|
3584
4515
|
flexShrink: 0,
|
|
3585
|
-
children: /* @__PURE__ */
|
|
3586
|
-
|
|
4516
|
+
children: /* @__PURE__ */ jsx21(
|
|
4517
|
+
Text10,
|
|
3587
4518
|
{
|
|
3588
4519
|
fontSize: "14px",
|
|
3589
4520
|
fontWeight: "700",
|
|
@@ -3594,9 +4525,9 @@ var QuickActionsHeaderCard = React5.memo(
|
|
|
3594
4525
|
)
|
|
3595
4526
|
}
|
|
3596
4527
|
),
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3599
|
-
|
|
4528
|
+
/* @__PURE__ */ jsxs17(Box18, { flex: "1", minW: 0, children: [
|
|
4529
|
+
/* @__PURE__ */ jsx21(
|
|
4530
|
+
Text10,
|
|
3600
4531
|
{
|
|
3601
4532
|
fontSize: "15px",
|
|
3602
4533
|
fontWeight: "700",
|
|
@@ -3608,8 +4539,8 @@ var QuickActionsHeaderCard = React5.memo(
|
|
|
3608
4539
|
children: label
|
|
3609
4540
|
}
|
|
3610
4541
|
),
|
|
3611
|
-
meta && /* @__PURE__ */
|
|
3612
|
-
|
|
4542
|
+
meta && /* @__PURE__ */ jsx21(
|
|
4543
|
+
Text10,
|
|
3613
4544
|
{
|
|
3614
4545
|
fontSize: "12px",
|
|
3615
4546
|
color: SUBTITLE_COLOR,
|
|
@@ -3630,10 +4561,10 @@ var QuickActionsHeaderCard = React5.memo(
|
|
|
3630
4561
|
var ITEM_TRANSITION = {
|
|
3631
4562
|
transition: "background 0.15s ease, transform 0.1s ease"
|
|
3632
4563
|
};
|
|
3633
|
-
var ActionItem =
|
|
4564
|
+
var ActionItem = React7.memo(({ action }) => {
|
|
3634
4565
|
const iconBg = action.iconBg ?? DEFAULT_ICON_BG;
|
|
3635
4566
|
const iconColor = action.iconColor ?? DEFAULT_ICON_COLOR;
|
|
3636
|
-
const inner = /* @__PURE__ */
|
|
4567
|
+
const inner = /* @__PURE__ */ jsxs17(
|
|
3637
4568
|
HStack4,
|
|
3638
4569
|
{
|
|
3639
4570
|
gap: STANDARD_SPACING.sm,
|
|
@@ -3656,8 +4587,8 @@ var ActionItem = React5.memo(({ action }) => {
|
|
|
3656
4587
|
_active: { bg: ITEM_ACTIVE_BG, transform: "scale(0.99)" },
|
|
3657
4588
|
style: ITEM_TRANSITION,
|
|
3658
4589
|
children: [
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
|
|
4590
|
+
/* @__PURE__ */ jsx21(
|
|
4591
|
+
Flex9,
|
|
3661
4592
|
{
|
|
3662
4593
|
w: "40px",
|
|
3663
4594
|
h: "40px",
|
|
@@ -3666,12 +4597,12 @@ var ActionItem = React5.memo(({ action }) => {
|
|
|
3666
4597
|
align: "center",
|
|
3667
4598
|
justify: "center",
|
|
3668
4599
|
flexShrink: 0,
|
|
3669
|
-
children: /* @__PURE__ */
|
|
4600
|
+
children: /* @__PURE__ */ jsx21(Icon4, { as: action.icon, boxSize: "20px", color: iconColor })
|
|
3670
4601
|
}
|
|
3671
4602
|
),
|
|
3672
|
-
/* @__PURE__ */
|
|
3673
|
-
/* @__PURE__ */
|
|
3674
|
-
|
|
4603
|
+
/* @__PURE__ */ jsxs17(Box18, { flex: "1", minW: 0, children: [
|
|
4604
|
+
/* @__PURE__ */ jsx21(
|
|
4605
|
+
Text10,
|
|
3675
4606
|
{
|
|
3676
4607
|
fontSize: "15px",
|
|
3677
4608
|
fontWeight: "600",
|
|
@@ -3680,8 +4611,8 @@ var ActionItem = React5.memo(({ action }) => {
|
|
|
3680
4611
|
children: action.label
|
|
3681
4612
|
}
|
|
3682
4613
|
),
|
|
3683
|
-
action.description && /* @__PURE__ */
|
|
3684
|
-
|
|
4614
|
+
action.description && /* @__PURE__ */ jsx21(
|
|
4615
|
+
Text10,
|
|
3685
4616
|
{
|
|
3686
4617
|
fontSize: "12px",
|
|
3687
4618
|
color: DESC_COLOR,
|
|
@@ -3694,7 +4625,7 @@ var ActionItem = React5.memo(({ action }) => {
|
|
|
3694
4625
|
}
|
|
3695
4626
|
)
|
|
3696
4627
|
] }),
|
|
3697
|
-
/* @__PURE__ */
|
|
4628
|
+
/* @__PURE__ */ jsx21(
|
|
3698
4629
|
Icon4,
|
|
3699
4630
|
{
|
|
3700
4631
|
as: LuChevronRight2,
|
|
@@ -3707,7 +4638,7 @@ var ActionItem = React5.memo(({ action }) => {
|
|
|
3707
4638
|
}
|
|
3708
4639
|
);
|
|
3709
4640
|
if (action.href) {
|
|
3710
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ jsx21(
|
|
3711
4642
|
Link,
|
|
3712
4643
|
{
|
|
3713
4644
|
href: action.href,
|
|
@@ -3726,15 +4657,15 @@ var BottomQuickActions = ({
|
|
|
3726
4657
|
headerSlot,
|
|
3727
4658
|
actions
|
|
3728
4659
|
}) => {
|
|
3729
|
-
return /* @__PURE__ */
|
|
4660
|
+
return /* @__PURE__ */ jsx21(
|
|
3730
4661
|
Drawer.Root,
|
|
3731
4662
|
{
|
|
3732
4663
|
open,
|
|
3733
4664
|
onOpenChange: (e) => onOpenChange(e.open),
|
|
3734
4665
|
placement: "bottom",
|
|
3735
|
-
children: /* @__PURE__ */
|
|
3736
|
-
/* @__PURE__ */
|
|
3737
|
-
/* @__PURE__ */
|
|
4666
|
+
children: /* @__PURE__ */ jsxs17(Portal5, { children: [
|
|
4667
|
+
/* @__PURE__ */ jsx21(Drawer.Backdrop, {}),
|
|
4668
|
+
/* @__PURE__ */ jsx21(Drawer.Positioner, { children: /* @__PURE__ */ jsxs17(
|
|
3738
4669
|
Drawer.Content,
|
|
3739
4670
|
{
|
|
3740
4671
|
borderTopRadius: "l3",
|
|
@@ -3745,8 +4676,8 @@ var BottomQuickActions = ({
|
|
|
3745
4676
|
pb: `calc(${STANDARD_SPACING.sm} + env(safe-area-inset-bottom))`,
|
|
3746
4677
|
boxShadow: STANDARD_SHADOWS.level4,
|
|
3747
4678
|
children: [
|
|
3748
|
-
/* @__PURE__ */
|
|
3749
|
-
|
|
4679
|
+
/* @__PURE__ */ jsx21(Flex9, { justify: "center", pt: "10px", pb: "4px", children: /* @__PURE__ */ jsx21(
|
|
4680
|
+
Box18,
|
|
3750
4681
|
{
|
|
3751
4682
|
w: "36px",
|
|
3752
4683
|
h: "4px",
|
|
@@ -3754,16 +4685,16 @@ var BottomQuickActions = ({
|
|
|
3754
4685
|
bg: DRAG_COLOR
|
|
3755
4686
|
}
|
|
3756
4687
|
) }),
|
|
3757
|
-
/* @__PURE__ */
|
|
4688
|
+
/* @__PURE__ */ jsx21(
|
|
3758
4689
|
Drawer.Header,
|
|
3759
4690
|
{
|
|
3760
4691
|
px: STANDARD_SPACING.sm,
|
|
3761
4692
|
pt: "12px",
|
|
3762
4693
|
pb: "0",
|
|
3763
4694
|
borderBottomWidth: "0",
|
|
3764
|
-
children: /* @__PURE__ */
|
|
3765
|
-
/* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
4695
|
+
children: /* @__PURE__ */ jsxs17(Flex9, { align: "flex-start", justify: "space-between", gap: "12px", children: [
|
|
4696
|
+
/* @__PURE__ */ jsxs17(Box18, { flex: "1", minW: 0, children: [
|
|
4697
|
+
/* @__PURE__ */ jsx21(
|
|
3767
4698
|
Drawer.Title,
|
|
3768
4699
|
{
|
|
3769
4700
|
fontSize: "18px",
|
|
@@ -3774,8 +4705,8 @@ var BottomQuickActions = ({
|
|
|
3774
4705
|
children: title
|
|
3775
4706
|
}
|
|
3776
4707
|
),
|
|
3777
|
-
subtitle && /* @__PURE__ */
|
|
3778
|
-
|
|
4708
|
+
subtitle && /* @__PURE__ */ jsx21(
|
|
4709
|
+
Text10,
|
|
3779
4710
|
{
|
|
3780
4711
|
fontSize: "13px",
|
|
3781
4712
|
color: SUBTITLE_COLOR,
|
|
@@ -3786,8 +4717,8 @@ var BottomQuickActions = ({
|
|
|
3786
4717
|
}
|
|
3787
4718
|
)
|
|
3788
4719
|
] }),
|
|
3789
|
-
/* @__PURE__ */
|
|
3790
|
-
|
|
4720
|
+
/* @__PURE__ */ jsx21(Drawer.CloseTrigger, { asChild: true, mt: "2px", flexShrink: 0, children: /* @__PURE__ */ jsx21(
|
|
4721
|
+
CloseButton4,
|
|
3791
4722
|
{
|
|
3792
4723
|
size: "sm",
|
|
3793
4724
|
color: BRAND_COLORS.neutralText,
|
|
@@ -3798,15 +4729,15 @@ var BottomQuickActions = ({
|
|
|
3798
4729
|
] })
|
|
3799
4730
|
}
|
|
3800
4731
|
),
|
|
3801
|
-
/* @__PURE__ */
|
|
4732
|
+
/* @__PURE__ */ jsxs17(
|
|
3802
4733
|
Drawer.Body,
|
|
3803
4734
|
{
|
|
3804
4735
|
px: STANDARD_SPACING.sm,
|
|
3805
4736
|
pt: STANDARD_SPACING.sm,
|
|
3806
4737
|
pb: "4px",
|
|
3807
4738
|
children: [
|
|
3808
|
-
headerSlot && /* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
4739
|
+
headerSlot && /* @__PURE__ */ jsx21(Box18, { mb: STANDARD_SPACING.xs, children: headerSlot }),
|
|
4740
|
+
/* @__PURE__ */ jsx21(VStack8, { gap: STANDARD_SPACING.xs, align: "stretch", children: actions.map((action, i) => /* @__PURE__ */ jsx21(ActionItem, { action }, i)) })
|
|
3810
4741
|
]
|
|
3811
4742
|
}
|
|
3812
4743
|
)
|
|
@@ -3820,18 +4751,18 @@ var BottomQuickActions = ({
|
|
|
3820
4751
|
var BottomQuickActions_default = BottomQuickActions;
|
|
3821
4752
|
|
|
3822
4753
|
// src/Generic/NotifyInstall.tsx
|
|
3823
|
-
import { useEffect as
|
|
3824
|
-
import { Button as
|
|
4754
|
+
import { useEffect as useEffect9, useState as useState16 } from "react";
|
|
4755
|
+
import { Button as Button4, Flex as Flex10, HStack as HStack5, Icon as Icon5, Text as Text11, VStack as VStack9 } from "@chakra-ui/react";
|
|
3825
4756
|
import { AnimatePresence, motion } from "motion/react";
|
|
3826
4757
|
import { FiDownload, FiPlusSquare, FiShare, FiX } from "react-icons/fi";
|
|
3827
4758
|
|
|
3828
4759
|
// src/hooks/useNotifyInstall.ts
|
|
3829
|
-
import { useEffect as
|
|
4760
|
+
import { useEffect as useEffect8, useState as useState15 } from "react";
|
|
3830
4761
|
function useNotifyInstall() {
|
|
3831
|
-
const [isInstalled, setIsInstalled] =
|
|
3832
|
-
const [isMobile, setIsMobile] =
|
|
3833
|
-
const [installPrompt, setInstallPrompt] =
|
|
3834
|
-
|
|
4762
|
+
const [isInstalled, setIsInstalled] = useState15(false);
|
|
4763
|
+
const [isMobile, setIsMobile] = useState15(false);
|
|
4764
|
+
const [installPrompt, setInstallPrompt] = useState15(null);
|
|
4765
|
+
useEffect8(() => {
|
|
3835
4766
|
const mobile = /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
3836
4767
|
setIsMobile(mobile);
|
|
3837
4768
|
const installed = window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === true;
|
|
@@ -3863,7 +4794,7 @@ function useNotifyInstall() {
|
|
|
3863
4794
|
}
|
|
3864
4795
|
|
|
3865
4796
|
// src/Generic/NotifyInstall.tsx
|
|
3866
|
-
import { Fragment as
|
|
4797
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3867
4798
|
var STEPS = [
|
|
3868
4799
|
{ icon: FiShare, label: "Tap the browser menu or Share button" },
|
|
3869
4800
|
{ icon: FiPlusSquare, label: 'Choose "Add to Home Screen"' }
|
|
@@ -3874,8 +4805,8 @@ function NotifyInstall({
|
|
|
3874
4805
|
appName
|
|
3875
4806
|
}) {
|
|
3876
4807
|
const { isInstalled, isMobile, canInstall, install } = useNotifyInstall();
|
|
3877
|
-
const [isDismissed, setIsDismissed] =
|
|
3878
|
-
|
|
4808
|
+
const [isDismissed, setIsDismissed] = useState16(true);
|
|
4809
|
+
useEffect9(() => {
|
|
3879
4810
|
if (localStorage.getItem(DISMISSED_KEY) !== "true") {
|
|
3880
4811
|
setIsDismissed(false);
|
|
3881
4812
|
}
|
|
@@ -3885,10 +4816,10 @@ function NotifyInstall({
|
|
|
3885
4816
|
setIsDismissed(true);
|
|
3886
4817
|
};
|
|
3887
4818
|
const showPrompt = isMobile && !isInstalled && !isDismissed;
|
|
3888
|
-
return /* @__PURE__ */
|
|
4819
|
+
return /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
3889
4820
|
children,
|
|
3890
|
-
/* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
4821
|
+
/* @__PURE__ */ jsx22(AnimatePresence, { children: showPrompt && /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
4822
|
+
/* @__PURE__ */ jsx22(
|
|
3892
4823
|
motion.div,
|
|
3893
4824
|
{
|
|
3894
4825
|
initial: { opacity: 0 },
|
|
@@ -3907,7 +4838,7 @@ function NotifyInstall({
|
|
|
3907
4838
|
},
|
|
3908
4839
|
"install-backdrop"
|
|
3909
4840
|
),
|
|
3910
|
-
/* @__PURE__ */
|
|
4841
|
+
/* @__PURE__ */ jsxs18(
|
|
3911
4842
|
motion.div,
|
|
3912
4843
|
{
|
|
3913
4844
|
initial: { y: "100%" },
|
|
@@ -3926,7 +4857,7 @@ function NotifyInstall({
|
|
|
3926
4857
|
paddingBottom: "env(safe-area-inset-bottom)"
|
|
3927
4858
|
},
|
|
3928
4859
|
children: [
|
|
3929
|
-
/* @__PURE__ */
|
|
4860
|
+
/* @__PURE__ */ jsx22(
|
|
3930
4861
|
"button",
|
|
3931
4862
|
{
|
|
3932
4863
|
"aria-label": "Dismiss install prompt",
|
|
@@ -3945,12 +4876,12 @@ function NotifyInstall({
|
|
|
3945
4876
|
justifyContent: "center",
|
|
3946
4877
|
color: "#9ca3af"
|
|
3947
4878
|
},
|
|
3948
|
-
children: /* @__PURE__ */
|
|
4879
|
+
children: /* @__PURE__ */ jsx22(FiX, { size: 18 })
|
|
3949
4880
|
}
|
|
3950
4881
|
),
|
|
3951
|
-
/* @__PURE__ */
|
|
3952
|
-
/* @__PURE__ */
|
|
3953
|
-
|
|
4882
|
+
/* @__PURE__ */ jsxs18(VStack9, { gap: 6, textAlign: "center", px: 6, py: 8, children: [
|
|
4883
|
+
/* @__PURE__ */ jsx22(
|
|
4884
|
+
Flex10,
|
|
3954
4885
|
{
|
|
3955
4886
|
boxSize: 16,
|
|
3956
4887
|
align: "center",
|
|
@@ -3959,12 +4890,12 @@ function NotifyInstall({
|
|
|
3959
4890
|
bg: "green.50",
|
|
3960
4891
|
color: "green.600",
|
|
3961
4892
|
shadow: "sm",
|
|
3962
|
-
children: /* @__PURE__ */
|
|
4893
|
+
children: /* @__PURE__ */ jsx22(Icon5, { as: FiDownload, boxSize: 8 })
|
|
3963
4894
|
}
|
|
3964
4895
|
),
|
|
3965
|
-
/* @__PURE__ */
|
|
3966
|
-
/* @__PURE__ */
|
|
3967
|
-
|
|
4896
|
+
/* @__PURE__ */ jsxs18(VStack9, { gap: 2, children: [
|
|
4897
|
+
/* @__PURE__ */ jsxs18(
|
|
4898
|
+
Text11,
|
|
3968
4899
|
{
|
|
3969
4900
|
fontSize: "lg",
|
|
3970
4901
|
fontWeight: "bold",
|
|
@@ -3976,10 +4907,10 @@ function NotifyInstall({
|
|
|
3976
4907
|
]
|
|
3977
4908
|
}
|
|
3978
4909
|
),
|
|
3979
|
-
/* @__PURE__ */
|
|
4910
|
+
/* @__PURE__ */ jsx22(Text11, { fontSize: "sm", color: "gray.500", lineHeight: "tall", children: "Add the app to your home screen for a faster, app-like experience before continuing." })
|
|
3980
4911
|
] }),
|
|
3981
|
-
canInstall ? /* @__PURE__ */
|
|
3982
|
-
|
|
4912
|
+
canInstall ? /* @__PURE__ */ jsxs18(
|
|
4913
|
+
Button4,
|
|
3983
4914
|
{
|
|
3984
4915
|
onClick: install,
|
|
3985
4916
|
colorPalette: "green",
|
|
@@ -3987,12 +4918,12 @@ function NotifyInstall({
|
|
|
3987
4918
|
w: "full",
|
|
3988
4919
|
rounded: "xl",
|
|
3989
4920
|
children: [
|
|
3990
|
-
/* @__PURE__ */
|
|
4921
|
+
/* @__PURE__ */ jsx22(Icon5, { as: FiDownload }),
|
|
3991
4922
|
"Add to Home Screen"
|
|
3992
4923
|
]
|
|
3993
4924
|
}
|
|
3994
|
-
) : /* @__PURE__ */
|
|
3995
|
-
|
|
4925
|
+
) : /* @__PURE__ */ jsx22(
|
|
4926
|
+
VStack9,
|
|
3996
4927
|
{
|
|
3997
4928
|
w: "full",
|
|
3998
4929
|
bg: "gray.50",
|
|
@@ -4002,9 +4933,9 @@ function NotifyInstall({
|
|
|
4002
4933
|
p: 4,
|
|
4003
4934
|
gap: 4,
|
|
4004
4935
|
align: "stretch",
|
|
4005
|
-
children: STEPS.map((step, i) => /* @__PURE__ */
|
|
4006
|
-
/* @__PURE__ */
|
|
4007
|
-
|
|
4936
|
+
children: STEPS.map((step, i) => /* @__PURE__ */ jsxs18(HStack5, { gap: 3, align: "center", children: [
|
|
4937
|
+
/* @__PURE__ */ jsx22(
|
|
4938
|
+
Flex10,
|
|
4008
4939
|
{
|
|
4009
4940
|
boxSize: 9,
|
|
4010
4941
|
flexShrink: 0,
|
|
@@ -4015,10 +4946,10 @@ function NotifyInstall({
|
|
|
4015
4946
|
borderWidth: "1px",
|
|
4016
4947
|
borderColor: "gray.200",
|
|
4017
4948
|
color: "green.600",
|
|
4018
|
-
children: /* @__PURE__ */
|
|
4949
|
+
children: /* @__PURE__ */ jsx22(Icon5, { as: step.icon, boxSize: 4 })
|
|
4019
4950
|
}
|
|
4020
4951
|
),
|
|
4021
|
-
/* @__PURE__ */
|
|
4952
|
+
/* @__PURE__ */ jsx22(Text11, { fontSize: "sm", color: "gray.700", textAlign: "left", children: step.label })
|
|
4022
4953
|
] }, i))
|
|
4023
4954
|
}
|
|
4024
4955
|
)
|
|
@@ -4032,21 +4963,21 @@ function NotifyInstall({
|
|
|
4032
4963
|
}
|
|
4033
4964
|
|
|
4034
4965
|
// src/UserProfile/UserProfile.tsx
|
|
4035
|
-
import { useEffect as
|
|
4966
|
+
import { useEffect as useEffect10, useMemo, useState as useState17 } from "react";
|
|
4036
4967
|
import {
|
|
4037
4968
|
Avatar,
|
|
4038
4969
|
Badge as Badge2,
|
|
4039
|
-
Box as
|
|
4040
|
-
Button as
|
|
4041
|
-
Flex as
|
|
4970
|
+
Box as Box19,
|
|
4971
|
+
Button as Button5,
|
|
4972
|
+
Flex as Flex11,
|
|
4042
4973
|
HStack as HStack6,
|
|
4043
4974
|
IconButton as IconButton3,
|
|
4044
|
-
Input as
|
|
4975
|
+
Input as Input5,
|
|
4045
4976
|
InputGroup,
|
|
4046
4977
|
Separator as Separator3,
|
|
4047
|
-
Text as
|
|
4048
|
-
useBreakpointValue as
|
|
4049
|
-
VStack as
|
|
4978
|
+
Text as Text12,
|
|
4979
|
+
useBreakpointValue as useBreakpointValue3,
|
|
4980
|
+
VStack as VStack10
|
|
4050
4981
|
} from "@chakra-ui/react";
|
|
4051
4982
|
import {
|
|
4052
4983
|
RiDashboardFill,
|
|
@@ -4069,7 +5000,7 @@ import {
|
|
|
4069
5000
|
LuCreditCard,
|
|
4070
5001
|
LuEye,
|
|
4071
5002
|
LuEyeOff,
|
|
4072
|
-
LuFileText,
|
|
5003
|
+
LuFileText as LuFileText2,
|
|
4073
5004
|
LuHouse,
|
|
4074
5005
|
LuLock,
|
|
4075
5006
|
LuMoon,
|
|
@@ -4090,7 +5021,7 @@ import { LiaHandHoldingUsdSolid } from "react-icons/lia";
|
|
|
4090
5021
|
import { FaHandHoldingUsd } from "react-icons/fa";
|
|
4091
5022
|
import { MdManageAccounts, MdOutlineManageAccounts } from "react-icons/md";
|
|
4092
5023
|
import { IoLeaf, IoLeafOutline } from "react-icons/io5";
|
|
4093
|
-
import { Fragment as
|
|
5024
|
+
import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4094
5025
|
var NAVBAR_STORAGE_KEY = "profile-navbar-quick-items";
|
|
4095
5026
|
var FONT_SIZE_STORAGE_KEY = "profile-font-size-pref";
|
|
4096
5027
|
var DEFAULT_NAV_HREFS = ["/", "/plans", "/pay-my-plan", "/claims"];
|
|
@@ -4133,8 +5064,8 @@ var ALL_NAV_OPTIONS = [
|
|
|
4133
5064
|
key: "/claims",
|
|
4134
5065
|
title: "Claim",
|
|
4135
5066
|
href: "/claims",
|
|
4136
|
-
Icon:
|
|
4137
|
-
activeIcon:
|
|
5067
|
+
Icon: LuFileText2,
|
|
5068
|
+
activeIcon: LuFileText2,
|
|
4138
5069
|
match: (p) => p.startsWith("/claims"),
|
|
4139
5070
|
roles: ["branch", "bmstl", "sales-agent"]
|
|
4140
5071
|
},
|
|
@@ -4388,28 +5319,28 @@ function ReusableProfile({
|
|
|
4388
5319
|
onTwoFactorChange,
|
|
4389
5320
|
onToast = noopToast
|
|
4390
5321
|
}) {
|
|
4391
|
-
const [profileView, setProfileView] =
|
|
4392
|
-
const [fallbackColorMode, setFallbackColorMode] =
|
|
5322
|
+
const [profileView, setProfileView] = useState17("main");
|
|
5323
|
+
const [fallbackColorMode, setFallbackColorMode] = useState17("light");
|
|
4393
5324
|
const colorMode = controlledColorMode ?? fallbackColorMode;
|
|
4394
|
-
const [fontSize, setFontSizeLocal] =
|
|
4395
|
-
const [quickNavHrefs, setQuickNavHrefs] =
|
|
4396
|
-
const [replacingIdx, setReplacingIdx] =
|
|
4397
|
-
const [editName, setEditName] =
|
|
4398
|
-
const [editLoading, setEditLoading] =
|
|
4399
|
-
const [currentPw, setCurrentPw] =
|
|
4400
|
-
const [newPw, setNewPw] =
|
|
4401
|
-
const [confirmPw, setConfirmPw] =
|
|
4402
|
-
const [showCurrentPw, setShowCurrentPw] =
|
|
4403
|
-
const [showNewPw, setShowNewPw] =
|
|
4404
|
-
const [showConfirmPw, setShowConfirmPw] =
|
|
4405
|
-
const [pwLoading, setPwLoading] =
|
|
4406
|
-
const [twoFactorEnabled, setTwoFactorEnabled] =
|
|
5325
|
+
const [fontSize, setFontSizeLocal] = useState17("md");
|
|
5326
|
+
const [quickNavHrefs, setQuickNavHrefs] = useState17(initialQuickNavHrefs);
|
|
5327
|
+
const [replacingIdx, setReplacingIdx] = useState17(null);
|
|
5328
|
+
const [editName, setEditName] = useState17(user.displayName);
|
|
5329
|
+
const [editLoading, setEditLoading] = useState17(false);
|
|
5330
|
+
const [currentPw, setCurrentPw] = useState17("");
|
|
5331
|
+
const [newPw, setNewPw] = useState17("");
|
|
5332
|
+
const [confirmPw, setConfirmPw] = useState17("");
|
|
5333
|
+
const [showCurrentPw, setShowCurrentPw] = useState17(false);
|
|
5334
|
+
const [showNewPw, setShowNewPw] = useState17(false);
|
|
5335
|
+
const [showConfirmPw, setShowConfirmPw] = useState17(false);
|
|
5336
|
+
const [pwLoading, setPwLoading] = useState17(false);
|
|
5337
|
+
const [twoFactorEnabled, setTwoFactorEnabled] = useState17(
|
|
4407
5338
|
initialTwoFactorEnabled
|
|
4408
5339
|
);
|
|
4409
|
-
const [isMounted, setIsMounted] =
|
|
4410
|
-
const isDesktopRaw =
|
|
5340
|
+
const [isMounted, setIsMounted] = useState17(false);
|
|
5341
|
+
const isDesktopRaw = useBreakpointValue3({ base: false, md: true });
|
|
4411
5342
|
const isDesktop = isMounted ? isDesktopRaw ?? false : false;
|
|
4412
|
-
|
|
5343
|
+
useEffect10(() => {
|
|
4413
5344
|
setIsMounted(true);
|
|
4414
5345
|
if (!enableLocalStorage || typeof window === "undefined") return;
|
|
4415
5346
|
setFontSizeLocal(localStorage.getItem(FONT_SIZE_STORAGE_KEY) ?? "md");
|
|
@@ -4420,7 +5351,7 @@ function ReusableProfile({
|
|
|
4420
5351
|
setQuickNavHrefs(initialQuickNavHrefs);
|
|
4421
5352
|
}
|
|
4422
5353
|
}, [enableLocalStorage, initialQuickNavHrefs, storageKey]);
|
|
4423
|
-
|
|
5354
|
+
useEffect10(() => {
|
|
4424
5355
|
setEditName(user.displayName);
|
|
4425
5356
|
}, [user.displayName]);
|
|
4426
5357
|
const availableOptions = useMemo(
|
|
@@ -4551,9 +5482,9 @@ function ReusableProfile({
|
|
|
4551
5482
|
}
|
|
4552
5483
|
};
|
|
4553
5484
|
const roleLabel = user.role ? ROLE_LABELS[user.role] ?? user.role : "";
|
|
4554
|
-
const mainContent = /* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
|
|
5485
|
+
const mainContent = /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
5486
|
+
/* @__PURE__ */ jsxs19(
|
|
5487
|
+
Box19,
|
|
4557
5488
|
{
|
|
4558
5489
|
bg: "var(--chakra-colors-primary)",
|
|
4559
5490
|
pt: 12,
|
|
@@ -4561,7 +5492,7 @@ function ReusableProfile({
|
|
|
4561
5492
|
px: 4,
|
|
4562
5493
|
textAlign: "center",
|
|
4563
5494
|
children: [
|
|
4564
|
-
/* @__PURE__ */
|
|
5495
|
+
/* @__PURE__ */ jsxs19(
|
|
4565
5496
|
Avatar.Root,
|
|
4566
5497
|
{
|
|
4567
5498
|
size: "2xl",
|
|
@@ -4569,13 +5500,13 @@ function ReusableProfile({
|
|
|
4569
5500
|
mb: 4,
|
|
4570
5501
|
colorPalette: pickPalette(user.displayName || "U"),
|
|
4571
5502
|
children: [
|
|
4572
|
-
user.avatarSrc && /* @__PURE__ */
|
|
4573
|
-
/* @__PURE__ */
|
|
5503
|
+
user.avatarSrc && /* @__PURE__ */ jsx23(Avatar.Image, { src: user.avatarSrc, alt: user.displayName }),
|
|
5504
|
+
/* @__PURE__ */ jsx23(Avatar.Fallback, { name: user.displayName })
|
|
4574
5505
|
]
|
|
4575
5506
|
}
|
|
4576
5507
|
),
|
|
4577
|
-
/* @__PURE__ */
|
|
4578
|
-
|
|
5508
|
+
/* @__PURE__ */ jsx23(
|
|
5509
|
+
Text12,
|
|
4579
5510
|
{
|
|
4580
5511
|
color: "white",
|
|
4581
5512
|
fontWeight: "bold",
|
|
@@ -4585,8 +5516,8 @@ function ReusableProfile({
|
|
|
4585
5516
|
children: user.displayName
|
|
4586
5517
|
}
|
|
4587
5518
|
),
|
|
4588
|
-
user.email && /* @__PURE__ */
|
|
4589
|
-
roleLabel && /* @__PURE__ */
|
|
5519
|
+
user.email && /* @__PURE__ */ jsx23(Text12, { color: "rgba(255,255,255,0.75)", fontSize: "sm", mb: 2, children: user.email }),
|
|
5520
|
+
roleLabel && /* @__PURE__ */ jsx23(Box19, { display: "inline-flex", children: /* @__PURE__ */ jsx23(
|
|
4590
5521
|
Badge2,
|
|
4591
5522
|
{
|
|
4592
5523
|
bg: "rgba(255,255,255,0.15)",
|
|
@@ -4603,9 +5534,9 @@ function ReusableProfile({
|
|
|
4603
5534
|
]
|
|
4604
5535
|
}
|
|
4605
5536
|
),
|
|
4606
|
-
/* @__PURE__ */
|
|
4607
|
-
/* @__PURE__ */
|
|
4608
|
-
|
|
5537
|
+
/* @__PURE__ */ jsxs19(Box19, { px: 4, pt: 5, pb: 1, children: [
|
|
5538
|
+
/* @__PURE__ */ jsx23(
|
|
5539
|
+
Text12,
|
|
4609
5540
|
{
|
|
4610
5541
|
fontSize: "xs",
|
|
4611
5542
|
fontWeight: "bold",
|
|
@@ -4616,8 +5547,8 @@ function ReusableProfile({
|
|
|
4616
5547
|
children: "Account"
|
|
4617
5548
|
}
|
|
4618
5549
|
),
|
|
4619
|
-
/* @__PURE__ */
|
|
4620
|
-
|
|
5550
|
+
/* @__PURE__ */ jsx23(
|
|
5551
|
+
Box19,
|
|
4621
5552
|
{
|
|
4622
5553
|
as: "button",
|
|
4623
5554
|
w: "full",
|
|
@@ -4625,8 +5556,8 @@ function ReusableProfile({
|
|
|
4625
5556
|
_hover: { opacity: 0.7 },
|
|
4626
5557
|
transition: "opacity 0.15s",
|
|
4627
5558
|
onClick: () => setProfileView("edit-account"),
|
|
4628
|
-
children: /* @__PURE__ */
|
|
4629
|
-
|
|
5559
|
+
children: /* @__PURE__ */ jsxs19(
|
|
5560
|
+
Flex11,
|
|
4630
5561
|
{
|
|
4631
5562
|
justify: "space-between",
|
|
4632
5563
|
align: "center",
|
|
@@ -4635,9 +5566,9 @@ function ReusableProfile({
|
|
|
4635
5566
|
borderRadius: "lg",
|
|
4636
5567
|
bg: isDesktop && profileView === "edit-account" ? "gray.100" : void 0,
|
|
4637
5568
|
children: [
|
|
4638
|
-
/* @__PURE__ */
|
|
4639
|
-
/* @__PURE__ */
|
|
4640
|
-
|
|
5569
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5570
|
+
/* @__PURE__ */ jsx23(
|
|
5571
|
+
Box19,
|
|
4641
5572
|
{
|
|
4642
5573
|
w: "38px",
|
|
4643
5574
|
h: "38px",
|
|
@@ -4648,23 +5579,23 @@ function ReusableProfile({
|
|
|
4648
5579
|
justifyContent: "center",
|
|
4649
5580
|
color: "gray.600",
|
|
4650
5581
|
flexShrink: 0,
|
|
4651
|
-
children: /* @__PURE__ */
|
|
5582
|
+
children: /* @__PURE__ */ jsx23(LuUser, { size: 16 })
|
|
4652
5583
|
}
|
|
4653
5584
|
),
|
|
4654
|
-
/* @__PURE__ */
|
|
4655
|
-
/* @__PURE__ */
|
|
4656
|
-
/* @__PURE__ */
|
|
5585
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5586
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Edit Account" }),
|
|
5587
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "gray.500", children: "Update your display name and contact details" })
|
|
4657
5588
|
] })
|
|
4658
5589
|
] }),
|
|
4659
|
-
/* @__PURE__ */
|
|
5590
|
+
/* @__PURE__ */ jsx23(LuChevronRight3, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
4660
5591
|
]
|
|
4661
5592
|
}
|
|
4662
5593
|
)
|
|
4663
5594
|
}
|
|
4664
5595
|
),
|
|
4665
|
-
/* @__PURE__ */
|
|
4666
|
-
/* @__PURE__ */
|
|
4667
|
-
|
|
5596
|
+
/* @__PURE__ */ jsx23(Separator3, {}),
|
|
5597
|
+
/* @__PURE__ */ jsx23(
|
|
5598
|
+
Box19,
|
|
4668
5599
|
{
|
|
4669
5600
|
as: "button",
|
|
4670
5601
|
w: "full",
|
|
@@ -4675,8 +5606,8 @@ function ReusableProfile({
|
|
|
4675
5606
|
resetPasswordForm();
|
|
4676
5607
|
setProfileView("change-password");
|
|
4677
5608
|
},
|
|
4678
|
-
children: /* @__PURE__ */
|
|
4679
|
-
|
|
5609
|
+
children: /* @__PURE__ */ jsxs19(
|
|
5610
|
+
Flex11,
|
|
4680
5611
|
{
|
|
4681
5612
|
justify: "space-between",
|
|
4682
5613
|
align: "center",
|
|
@@ -4685,9 +5616,9 @@ function ReusableProfile({
|
|
|
4685
5616
|
borderRadius: "lg",
|
|
4686
5617
|
bg: isDesktop && profileView === "change-password" ? "gray.100" : void 0,
|
|
4687
5618
|
children: [
|
|
4688
|
-
/* @__PURE__ */
|
|
4689
|
-
/* @__PURE__ */
|
|
4690
|
-
|
|
5619
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5620
|
+
/* @__PURE__ */ jsx23(
|
|
5621
|
+
Box19,
|
|
4691
5622
|
{
|
|
4692
5623
|
w: "38px",
|
|
4693
5624
|
h: "38px",
|
|
@@ -4698,25 +5629,25 @@ function ReusableProfile({
|
|
|
4698
5629
|
justifyContent: "center",
|
|
4699
5630
|
color: "gray.600",
|
|
4700
5631
|
flexShrink: 0,
|
|
4701
|
-
children: /* @__PURE__ */
|
|
5632
|
+
children: /* @__PURE__ */ jsx23(LuLock, { size: 16 })
|
|
4702
5633
|
}
|
|
4703
5634
|
),
|
|
4704
|
-
/* @__PURE__ */
|
|
4705
|
-
/* @__PURE__ */
|
|
4706
|
-
/* @__PURE__ */
|
|
5635
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5636
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Change Password" }),
|
|
5637
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "gray.500", children: "Test locally through the callback prop" })
|
|
4707
5638
|
] })
|
|
4708
5639
|
] }),
|
|
4709
|
-
/* @__PURE__ */
|
|
5640
|
+
/* @__PURE__ */ jsx23(LuChevronRight3, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
4710
5641
|
]
|
|
4711
5642
|
}
|
|
4712
5643
|
)
|
|
4713
5644
|
}
|
|
4714
5645
|
),
|
|
4715
|
-
/* @__PURE__ */
|
|
4716
|
-
/* @__PURE__ */
|
|
4717
|
-
/* @__PURE__ */
|
|
4718
|
-
/* @__PURE__ */
|
|
4719
|
-
|
|
5646
|
+
/* @__PURE__ */ jsx23(Separator3, {}),
|
|
5647
|
+
/* @__PURE__ */ jsxs19(Flex11, { justify: "space-between", align: "center", py: 3, children: [
|
|
5648
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5649
|
+
/* @__PURE__ */ jsx23(
|
|
5650
|
+
Box19,
|
|
4720
5651
|
{
|
|
4721
5652
|
w: "38px",
|
|
4722
5653
|
h: "38px",
|
|
@@ -4727,16 +5658,16 @@ function ReusableProfile({
|
|
|
4727
5658
|
justifyContent: "center",
|
|
4728
5659
|
color: "gray.600",
|
|
4729
5660
|
flexShrink: 0,
|
|
4730
|
-
children: /* @__PURE__ */
|
|
5661
|
+
children: /* @__PURE__ */ jsx23(LuShield, { size: 16 })
|
|
4731
5662
|
}
|
|
4732
5663
|
),
|
|
4733
|
-
/* @__PURE__ */
|
|
4734
|
-
/* @__PURE__ */
|
|
4735
|
-
/* @__PURE__ */
|
|
5664
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5665
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Two Factor Authentication" }),
|
|
5666
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "gray.500", children: twoFactorEnabled ? "Enabled" : "Disabled" })
|
|
4736
5667
|
] })
|
|
4737
5668
|
] }),
|
|
4738
|
-
/* @__PURE__ */
|
|
4739
|
-
|
|
5669
|
+
/* @__PURE__ */ jsx23(
|
|
5670
|
+
Box19,
|
|
4740
5671
|
{
|
|
4741
5672
|
role: "switch",
|
|
4742
5673
|
"aria-checked": twoFactorEnabled,
|
|
@@ -4758,8 +5689,8 @@ function ReusableProfile({
|
|
|
4758
5689
|
cursor: "pointer",
|
|
4759
5690
|
flexShrink: 0,
|
|
4760
5691
|
outline: "none",
|
|
4761
|
-
children: /* @__PURE__ */
|
|
4762
|
-
|
|
5692
|
+
children: /* @__PURE__ */ jsx23(
|
|
5693
|
+
Box19,
|
|
4763
5694
|
{
|
|
4764
5695
|
position: "absolute",
|
|
4765
5696
|
top: "3px",
|
|
@@ -4776,9 +5707,9 @@ function ReusableProfile({
|
|
|
4776
5707
|
)
|
|
4777
5708
|
] })
|
|
4778
5709
|
] }),
|
|
4779
|
-
/* @__PURE__ */
|
|
4780
|
-
/* @__PURE__ */
|
|
4781
|
-
|
|
5710
|
+
/* @__PURE__ */ jsxs19(Box19, { px: 4, pt: 4, pb: 2, children: [
|
|
5711
|
+
/* @__PURE__ */ jsx23(
|
|
5712
|
+
Text12,
|
|
4782
5713
|
{
|
|
4783
5714
|
fontSize: "xs",
|
|
4784
5715
|
fontWeight: "bold",
|
|
@@ -4789,10 +5720,10 @@ function ReusableProfile({
|
|
|
4789
5720
|
children: "Preferences"
|
|
4790
5721
|
}
|
|
4791
5722
|
),
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
-
|
|
5723
|
+
/* @__PURE__ */ jsxs19(Flex11, { justify: "space-between", align: "center", py: 3, children: [
|
|
5724
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5725
|
+
/* @__PURE__ */ jsx23(
|
|
5726
|
+
Box19,
|
|
4796
5727
|
{
|
|
4797
5728
|
w: "38px",
|
|
4798
5729
|
h: "38px",
|
|
@@ -4803,18 +5734,18 @@ function ReusableProfile({
|
|
|
4803
5734
|
justifyContent: "center",
|
|
4804
5735
|
color: "gray.600",
|
|
4805
5736
|
flexShrink: 0,
|
|
4806
|
-
children: colorMode === "dark" ? /* @__PURE__ */
|
|
5737
|
+
children: colorMode === "dark" ? /* @__PURE__ */ jsx23(LuMoon, { size: 16 }) : /* @__PURE__ */ jsx23(LuSun, { size: 16 })
|
|
4807
5738
|
}
|
|
4808
5739
|
),
|
|
4809
|
-
/* @__PURE__ */
|
|
4810
|
-
/* @__PURE__ */
|
|
4811
|
-
/* @__PURE__ */
|
|
5740
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5741
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Appearance" }),
|
|
5742
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "gray.500", children: colorMode === "light" ? "Light mode" : "Dark mode" })
|
|
4812
5743
|
] })
|
|
4813
5744
|
] }),
|
|
4814
|
-
/* @__PURE__ */
|
|
5745
|
+
/* @__PURE__ */ jsx23(HStack6, { gap: 1.5, children: ["light", "dark"].map((mode) => {
|
|
4815
5746
|
const isActive = colorMode === mode;
|
|
4816
|
-
return /* @__PURE__ */
|
|
4817
|
-
|
|
5747
|
+
return /* @__PURE__ */ jsxs19(
|
|
5748
|
+
Button5,
|
|
4818
5749
|
{
|
|
4819
5750
|
size: "sm",
|
|
4820
5751
|
variant: "outline",
|
|
@@ -4829,9 +5760,9 @@ function ReusableProfile({
|
|
|
4829
5760
|
},
|
|
4830
5761
|
onClick: () => handleColorMode(mode),
|
|
4831
5762
|
children: [
|
|
4832
|
-
mode === "light" ? /* @__PURE__ */
|
|
4833
|
-
/* @__PURE__ */
|
|
4834
|
-
|
|
5763
|
+
mode === "light" ? /* @__PURE__ */ jsx23(LuSun, { size: 13 }) : /* @__PURE__ */ jsx23(LuMoon, { size: 13 }),
|
|
5764
|
+
/* @__PURE__ */ jsx23(
|
|
5765
|
+
Text12,
|
|
4835
5766
|
{
|
|
4836
5767
|
fontSize: "xs",
|
|
4837
5768
|
textTransform: "capitalize",
|
|
@@ -4845,11 +5776,11 @@ function ReusableProfile({
|
|
|
4845
5776
|
);
|
|
4846
5777
|
}) })
|
|
4847
5778
|
] }),
|
|
4848
|
-
/* @__PURE__ */
|
|
4849
|
-
/* @__PURE__ */
|
|
4850
|
-
/* @__PURE__ */
|
|
4851
|
-
/* @__PURE__ */
|
|
4852
|
-
|
|
5779
|
+
/* @__PURE__ */ jsx23(Separator3, {}),
|
|
5780
|
+
/* @__PURE__ */ jsxs19(Flex11, { justify: "space-between", align: "center", py: 3, children: [
|
|
5781
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5782
|
+
/* @__PURE__ */ jsx23(
|
|
5783
|
+
Box19,
|
|
4853
5784
|
{
|
|
4854
5785
|
w: "38px",
|
|
4855
5786
|
h: "38px",
|
|
@@ -4865,15 +5796,15 @@ function ReusableProfile({
|
|
|
4865
5796
|
children: "A"
|
|
4866
5797
|
}
|
|
4867
5798
|
),
|
|
4868
|
-
/* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
4870
|
-
/* @__PURE__ */
|
|
5799
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5800
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Text Size" }),
|
|
5801
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "gray.500", children: fontSizeLabel })
|
|
4871
5802
|
] })
|
|
4872
5803
|
] }),
|
|
4873
|
-
/* @__PURE__ */
|
|
5804
|
+
/* @__PURE__ */ jsx23(HStack6, { gap: 1, children: FONT_SIZES.map((option) => {
|
|
4874
5805
|
const isActive = fontSize === option.value;
|
|
4875
|
-
return /* @__PURE__ */
|
|
4876
|
-
|
|
5806
|
+
return /* @__PURE__ */ jsx23(
|
|
5807
|
+
Button5,
|
|
4877
5808
|
{
|
|
4878
5809
|
size: "sm",
|
|
4879
5810
|
variant: "outline",
|
|
@@ -4888,8 +5819,8 @@ function ReusableProfile({
|
|
|
4888
5819
|
},
|
|
4889
5820
|
onClick: () => handleFontSize(option.value),
|
|
4890
5821
|
title: option.title,
|
|
4891
|
-
children: /* @__PURE__ */
|
|
4892
|
-
|
|
5822
|
+
children: /* @__PURE__ */ jsx23(
|
|
5823
|
+
Text12,
|
|
4893
5824
|
{
|
|
4894
5825
|
fontWeight: isActive ? "bold" : "normal",
|
|
4895
5826
|
style: { fontSize: `${option.scale * 13}px` },
|
|
@@ -4901,9 +5832,9 @@ function ReusableProfile({
|
|
|
4901
5832
|
);
|
|
4902
5833
|
}) })
|
|
4903
5834
|
] }),
|
|
4904
|
-
/* @__PURE__ */
|
|
4905
|
-
/* @__PURE__ */
|
|
4906
|
-
|
|
5835
|
+
/* @__PURE__ */ jsx23(Separator3, {}),
|
|
5836
|
+
/* @__PURE__ */ jsx23(
|
|
5837
|
+
Box19,
|
|
4907
5838
|
{
|
|
4908
5839
|
as: "button",
|
|
4909
5840
|
w: "full",
|
|
@@ -4911,10 +5842,10 @@ function ReusableProfile({
|
|
|
4911
5842
|
_hover: { opacity: 0.7 },
|
|
4912
5843
|
transition: "opacity 0.15s",
|
|
4913
5844
|
onClick: () => setProfileView("navbar-customize"),
|
|
4914
|
-
children: /* @__PURE__ */
|
|
4915
|
-
/* @__PURE__ */
|
|
4916
|
-
/* @__PURE__ */
|
|
4917
|
-
|
|
5845
|
+
children: /* @__PURE__ */ jsxs19(Flex11, { justify: "space-between", align: "center", py: 3, children: [
|
|
5846
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
5847
|
+
/* @__PURE__ */ jsx23(
|
|
5848
|
+
Box19,
|
|
4918
5849
|
{
|
|
4919
5850
|
w: "38px",
|
|
4920
5851
|
h: "38px",
|
|
@@ -4925,12 +5856,12 @@ function ReusableProfile({
|
|
|
4925
5856
|
justifyContent: "center",
|
|
4926
5857
|
color: "gray.600",
|
|
4927
5858
|
flexShrink: 0,
|
|
4928
|
-
children: /* @__PURE__ */
|
|
5859
|
+
children: /* @__PURE__ */ jsx23(LuArrowLeftRight, { size: 16 })
|
|
4929
5860
|
}
|
|
4930
5861
|
),
|
|
4931
|
-
/* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
4933
|
-
/* @__PURE__ */
|
|
5862
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
5863
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "semibold", children: "Quick Navigation" }),
|
|
5864
|
+
/* @__PURE__ */ jsxs19(Text12, { fontSize: "xs", color: "gray.500", children: [
|
|
4934
5865
|
quickNavHrefs.length,
|
|
4935
5866
|
" of ",
|
|
4936
5867
|
maxQuickNavItems,
|
|
@@ -4938,13 +5869,13 @@ function ReusableProfile({
|
|
|
4938
5869
|
] })
|
|
4939
5870
|
] })
|
|
4940
5871
|
] }),
|
|
4941
|
-
/* @__PURE__ */
|
|
5872
|
+
/* @__PURE__ */ jsx23(LuChevronRight3, { size: 16, color: "var(--chakra-colors-gray-400)" })
|
|
4942
5873
|
] })
|
|
4943
5874
|
}
|
|
4944
5875
|
)
|
|
4945
5876
|
] }),
|
|
4946
|
-
/* @__PURE__ */
|
|
4947
|
-
|
|
5877
|
+
/* @__PURE__ */ jsx23(Box19, { px: 4, pt: 4, pb: 10, children: /* @__PURE__ */ jsx23(VStack10, { gap: 2.5, children: /* @__PURE__ */ jsx23(
|
|
5878
|
+
Button5,
|
|
4948
5879
|
{
|
|
4949
5880
|
w: "full",
|
|
4950
5881
|
variant: "outline",
|
|
@@ -4956,9 +5887,9 @@ function ReusableProfile({
|
|
|
4956
5887
|
}
|
|
4957
5888
|
) }) })
|
|
4958
5889
|
] });
|
|
4959
|
-
const editAccountContent = /* @__PURE__ */
|
|
4960
|
-
/* @__PURE__ */
|
|
4961
|
-
/* @__PURE__ */
|
|
5890
|
+
const editAccountContent = /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
5891
|
+
/* @__PURE__ */ jsx23(Box19, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 2, pr: 10, children: [
|
|
5892
|
+
/* @__PURE__ */ jsx23(
|
|
4962
5893
|
IconButton3,
|
|
4963
5894
|
{
|
|
4964
5895
|
size: "sm",
|
|
@@ -4966,20 +5897,20 @@ function ReusableProfile({
|
|
|
4966
5897
|
"aria-label": "Back",
|
|
4967
5898
|
color: "gray.600",
|
|
4968
5899
|
onClick: () => setProfileView("main"),
|
|
4969
|
-
children: /* @__PURE__ */
|
|
5900
|
+
children: /* @__PURE__ */ jsx23(LuChevronLeft2, {})
|
|
4970
5901
|
}
|
|
4971
5902
|
),
|
|
4972
|
-
/* @__PURE__ */
|
|
5903
|
+
/* @__PURE__ */ jsx23(Text12, { fontWeight: "bold", fontSize: "md", children: "Edit Account" })
|
|
4973
5904
|
] }) }),
|
|
4974
|
-
/* @__PURE__ */
|
|
4975
|
-
user.avatarSrc && /* @__PURE__ */
|
|
4976
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsx23(Box19, { textAlign: "center", pt: 5, pb: 4, children: /* @__PURE__ */ jsxs19(Avatar.Root, { size: "xl", mx: "auto", mb: 1, children: [
|
|
5906
|
+
user.avatarSrc && /* @__PURE__ */ jsx23(Avatar.Image, { src: user.avatarSrc, alt: editName }),
|
|
5907
|
+
/* @__PURE__ */ jsx23(Avatar.Fallback, { name: editName })
|
|
4977
5908
|
] }) }),
|
|
4978
|
-
/* @__PURE__ */
|
|
4979
|
-
/* @__PURE__ */
|
|
4980
|
-
/* @__PURE__ */
|
|
4981
|
-
/* @__PURE__ */
|
|
4982
|
-
|
|
5909
|
+
/* @__PURE__ */ jsxs19(VStack10, { gap: 4, px: 4, pb: 10, align: "stretch", children: [
|
|
5910
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
5911
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Display Name" }),
|
|
5912
|
+
/* @__PURE__ */ jsx23(
|
|
5913
|
+
Input5,
|
|
4983
5914
|
{
|
|
4984
5915
|
value: editName,
|
|
4985
5916
|
onChange: (event) => setEditName(event.target.value),
|
|
@@ -4988,10 +5919,10 @@ function ReusableProfile({
|
|
|
4988
5919
|
}
|
|
4989
5920
|
)
|
|
4990
5921
|
] }),
|
|
4991
|
-
/* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */
|
|
4993
|
-
/* @__PURE__ */
|
|
4994
|
-
|
|
5922
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
5923
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Email" }),
|
|
5924
|
+
/* @__PURE__ */ jsx23(
|
|
5925
|
+
Input5,
|
|
4995
5926
|
{
|
|
4996
5927
|
value: user.email ?? "",
|
|
4997
5928
|
readOnly: true,
|
|
@@ -5001,10 +5932,10 @@ function ReusableProfile({
|
|
|
5001
5932
|
}
|
|
5002
5933
|
)
|
|
5003
5934
|
] }),
|
|
5004
|
-
/* @__PURE__ */
|
|
5005
|
-
/* @__PURE__ */
|
|
5006
|
-
/* @__PURE__ */
|
|
5007
|
-
|
|
5935
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
5936
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Mobile Number" }),
|
|
5937
|
+
/* @__PURE__ */ jsx23(
|
|
5938
|
+
Input5,
|
|
5008
5939
|
{
|
|
5009
5940
|
value: user.mobileNumber ?? "",
|
|
5010
5941
|
readOnly: true,
|
|
@@ -5014,8 +5945,8 @@ function ReusableProfile({
|
|
|
5014
5945
|
}
|
|
5015
5946
|
)
|
|
5016
5947
|
] }),
|
|
5017
|
-
/* @__PURE__ */
|
|
5018
|
-
|
|
5948
|
+
/* @__PURE__ */ jsx23(
|
|
5949
|
+
Button5,
|
|
5019
5950
|
{
|
|
5020
5951
|
w: "full",
|
|
5021
5952
|
mt: 2,
|
|
@@ -5029,9 +5960,9 @@ function ReusableProfile({
|
|
|
5029
5960
|
)
|
|
5030
5961
|
] })
|
|
5031
5962
|
] });
|
|
5032
|
-
const changePasswordContent = /* @__PURE__ */
|
|
5033
|
-
/* @__PURE__ */
|
|
5034
|
-
/* @__PURE__ */
|
|
5963
|
+
const changePasswordContent = /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
5964
|
+
/* @__PURE__ */ jsx23(Box19, { px: 4, pt: 4, pb: 3, borderBottomWidth: "1px", borderColor: "gray.200", children: /* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 2, pr: 10, children: [
|
|
5965
|
+
/* @__PURE__ */ jsx23(
|
|
5035
5966
|
IconButton3,
|
|
5036
5967
|
{
|
|
5037
5968
|
size: "sm",
|
|
@@ -5039,18 +5970,18 @@ function ReusableProfile({
|
|
|
5039
5970
|
"aria-label": "Back",
|
|
5040
5971
|
color: "gray.600",
|
|
5041
5972
|
onClick: () => setProfileView("main"),
|
|
5042
|
-
children: /* @__PURE__ */
|
|
5973
|
+
children: /* @__PURE__ */ jsx23(LuChevronLeft2, {})
|
|
5043
5974
|
}
|
|
5044
5975
|
),
|
|
5045
|
-
/* @__PURE__ */
|
|
5976
|
+
/* @__PURE__ */ jsx23(Text12, { fontWeight: "bold", fontSize: "md", children: "Change Password" })
|
|
5046
5977
|
] }) }),
|
|
5047
|
-
/* @__PURE__ */
|
|
5048
|
-
/* @__PURE__ */
|
|
5049
|
-
/* @__PURE__ */
|
|
5050
|
-
/* @__PURE__ */
|
|
5978
|
+
/* @__PURE__ */ jsxs19(VStack10, { gap: 5, px: 4, pt: 6, pb: 10, children: [
|
|
5979
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
5980
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Current Password" }),
|
|
5981
|
+
/* @__PURE__ */ jsx23(
|
|
5051
5982
|
InputGroup,
|
|
5052
5983
|
{
|
|
5053
|
-
endElement: /* @__PURE__ */
|
|
5984
|
+
endElement: /* @__PURE__ */ jsx23(
|
|
5054
5985
|
IconButton3,
|
|
5055
5986
|
{
|
|
5056
5987
|
size: "xs",
|
|
@@ -5058,11 +5989,11 @@ function ReusableProfile({
|
|
|
5058
5989
|
color: "gray.500",
|
|
5059
5990
|
"aria-label": "Toggle current password visibility",
|
|
5060
5991
|
onClick: () => setShowCurrentPw(!showCurrentPw),
|
|
5061
|
-
children: showCurrentPw ? /* @__PURE__ */
|
|
5992
|
+
children: showCurrentPw ? /* @__PURE__ */ jsx23(LuEyeOff, { size: 15 }) : /* @__PURE__ */ jsx23(LuEye, { size: 15 })
|
|
5062
5993
|
}
|
|
5063
5994
|
),
|
|
5064
|
-
children: /* @__PURE__ */
|
|
5065
|
-
|
|
5995
|
+
children: /* @__PURE__ */ jsx23(
|
|
5996
|
+
Input5,
|
|
5066
5997
|
{
|
|
5067
5998
|
type: showCurrentPw ? "text" : "password",
|
|
5068
5999
|
value: currentPw,
|
|
@@ -5074,12 +6005,12 @@ function ReusableProfile({
|
|
|
5074
6005
|
}
|
|
5075
6006
|
)
|
|
5076
6007
|
] }),
|
|
5077
|
-
/* @__PURE__ */
|
|
5078
|
-
/* @__PURE__ */
|
|
5079
|
-
/* @__PURE__ */
|
|
6008
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
6009
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "New Password" }),
|
|
6010
|
+
/* @__PURE__ */ jsx23(
|
|
5080
6011
|
InputGroup,
|
|
5081
6012
|
{
|
|
5082
|
-
endElement: /* @__PURE__ */
|
|
6013
|
+
endElement: /* @__PURE__ */ jsx23(
|
|
5083
6014
|
IconButton3,
|
|
5084
6015
|
{
|
|
5085
6016
|
size: "xs",
|
|
@@ -5087,11 +6018,11 @@ function ReusableProfile({
|
|
|
5087
6018
|
color: "gray.500",
|
|
5088
6019
|
"aria-label": "Toggle new password visibility",
|
|
5089
6020
|
onClick: () => setShowNewPw(!showNewPw),
|
|
5090
|
-
children: showNewPw ? /* @__PURE__ */
|
|
6021
|
+
children: showNewPw ? /* @__PURE__ */ jsx23(LuEyeOff, { size: 15 }) : /* @__PURE__ */ jsx23(LuEye, { size: 15 })
|
|
5091
6022
|
}
|
|
5092
6023
|
),
|
|
5093
|
-
children: /* @__PURE__ */
|
|
5094
|
-
|
|
6024
|
+
children: /* @__PURE__ */ jsx23(
|
|
6025
|
+
Input5,
|
|
5095
6026
|
{
|
|
5096
6027
|
type: showNewPw ? "text" : "password",
|
|
5097
6028
|
value: newPw,
|
|
@@ -5102,9 +6033,9 @@ function ReusableProfile({
|
|
|
5102
6033
|
)
|
|
5103
6034
|
}
|
|
5104
6035
|
),
|
|
5105
|
-
newPw && /* @__PURE__ */
|
|
5106
|
-
/* @__PURE__ */
|
|
5107
|
-
|
|
6036
|
+
newPw && /* @__PURE__ */ jsxs19(Box19, { mt: 2, children: [
|
|
6037
|
+
/* @__PURE__ */ jsx23(Flex11, { gap: 1, mb: 1, children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsx23(
|
|
6038
|
+
Box19,
|
|
5108
6039
|
{
|
|
5109
6040
|
flex: 1,
|
|
5110
6041
|
h: "3px",
|
|
@@ -5114,15 +6045,15 @@ function ReusableProfile({
|
|
|
5114
6045
|
},
|
|
5115
6046
|
i
|
|
5116
6047
|
)) }),
|
|
5117
|
-
/* @__PURE__ */
|
|
6048
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: pwMeta.color, fontWeight: "medium", children: pwMeta.label })
|
|
5118
6049
|
] })
|
|
5119
6050
|
] }),
|
|
5120
|
-
/* @__PURE__ */
|
|
5121
|
-
/* @__PURE__ */
|
|
5122
|
-
/* @__PURE__ */
|
|
6051
|
+
/* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
6052
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "xs", fontWeight: "semibold", color: "gray.500", mb: 1.5, children: "Confirm New Password" }),
|
|
6053
|
+
/* @__PURE__ */ jsx23(
|
|
5123
6054
|
InputGroup,
|
|
5124
6055
|
{
|
|
5125
|
-
endElement: /* @__PURE__ */
|
|
6056
|
+
endElement: /* @__PURE__ */ jsx23(
|
|
5126
6057
|
IconButton3,
|
|
5127
6058
|
{
|
|
5128
6059
|
size: "xs",
|
|
@@ -5130,11 +6061,11 @@ function ReusableProfile({
|
|
|
5130
6061
|
color: "gray.500",
|
|
5131
6062
|
"aria-label": "Toggle confirm password visibility",
|
|
5132
6063
|
onClick: () => setShowConfirmPw(!showConfirmPw),
|
|
5133
|
-
children: showConfirmPw ? /* @__PURE__ */
|
|
6064
|
+
children: showConfirmPw ? /* @__PURE__ */ jsx23(LuEyeOff, { size: 15 }) : /* @__PURE__ */ jsx23(LuEye, { size: 15 })
|
|
5134
6065
|
}
|
|
5135
6066
|
),
|
|
5136
|
-
children: /* @__PURE__ */
|
|
5137
|
-
|
|
6067
|
+
children: /* @__PURE__ */ jsx23(
|
|
6068
|
+
Input5,
|
|
5138
6069
|
{
|
|
5139
6070
|
type: showConfirmPw ? "text" : "password",
|
|
5140
6071
|
value: confirmPw,
|
|
@@ -5145,10 +6076,10 @@ function ReusableProfile({
|
|
|
5145
6076
|
)
|
|
5146
6077
|
}
|
|
5147
6078
|
),
|
|
5148
|
-
confirmPw && confirmPw !== newPw && /* @__PURE__ */
|
|
6079
|
+
confirmPw && confirmPw !== newPw && /* @__PURE__ */ jsx23(Text12, { fontSize: "xs", color: "red.500", mt: 1, children: "Passwords do not match" })
|
|
5149
6080
|
] }),
|
|
5150
|
-
/* @__PURE__ */
|
|
5151
|
-
|
|
6081
|
+
/* @__PURE__ */ jsx23(
|
|
6082
|
+
Button5,
|
|
5152
6083
|
{
|
|
5153
6084
|
w: "full",
|
|
5154
6085
|
mt: 1,
|
|
@@ -5163,9 +6094,9 @@ function ReusableProfile({
|
|
|
5163
6094
|
)
|
|
5164
6095
|
] })
|
|
5165
6096
|
] });
|
|
5166
|
-
const navbarCustomizeContent = /* @__PURE__ */
|
|
5167
|
-
/* @__PURE__ */
|
|
5168
|
-
|
|
6097
|
+
const navbarCustomizeContent = /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
6098
|
+
/* @__PURE__ */ jsx23(
|
|
6099
|
+
Box19,
|
|
5169
6100
|
{
|
|
5170
6101
|
px: 4,
|
|
5171
6102
|
pt: 4,
|
|
@@ -5176,8 +6107,8 @@ function ReusableProfile({
|
|
|
5176
6107
|
top: 0,
|
|
5177
6108
|
bg: "bg",
|
|
5178
6109
|
zIndex: 1,
|
|
5179
|
-
children: /* @__PURE__ */
|
|
5180
|
-
/* @__PURE__ */
|
|
6110
|
+
children: /* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 2, pr: 10, children: [
|
|
6111
|
+
/* @__PURE__ */ jsx23(
|
|
5181
6112
|
IconButton3,
|
|
5182
6113
|
{
|
|
5183
6114
|
size: "sm",
|
|
@@ -5188,12 +6119,12 @@ function ReusableProfile({
|
|
|
5188
6119
|
setReplacingIdx(null);
|
|
5189
6120
|
setProfileView("main");
|
|
5190
6121
|
},
|
|
5191
|
-
children: /* @__PURE__ */
|
|
6122
|
+
children: /* @__PURE__ */ jsx23(LuChevronLeft2, {})
|
|
5192
6123
|
}
|
|
5193
6124
|
),
|
|
5194
|
-
/* @__PURE__ */
|
|
5195
|
-
/* @__PURE__ */
|
|
5196
|
-
/* @__PURE__ */
|
|
6125
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
6126
|
+
/* @__PURE__ */ jsx23(Text12, { fontWeight: "bold", fontSize: "md", children: "Quick Navigation" }),
|
|
6127
|
+
/* @__PURE__ */ jsxs19(Text12, { fontSize: "xs", color: "gray.500", children: [
|
|
5197
6128
|
"Choose up to ",
|
|
5198
6129
|
maxQuickNavItems,
|
|
5199
6130
|
" shortcuts for the bottom bar"
|
|
@@ -5202,10 +6133,10 @@ function ReusableProfile({
|
|
|
5202
6133
|
] })
|
|
5203
6134
|
}
|
|
5204
6135
|
),
|
|
5205
|
-
/* @__PURE__ */
|
|
5206
|
-
/* @__PURE__ */
|
|
5207
|
-
/* @__PURE__ */
|
|
5208
|
-
|
|
6136
|
+
/* @__PURE__ */ jsxs19(Box19, { px: 4, pt: 5, pb: 2, children: [
|
|
6137
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", justify: "space-between", mb: 3, children: [
|
|
6138
|
+
/* @__PURE__ */ jsx23(
|
|
6139
|
+
Text12,
|
|
5209
6140
|
{
|
|
5210
6141
|
fontSize: "xs",
|
|
5211
6142
|
fontWeight: "bold",
|
|
@@ -5215,8 +6146,8 @@ function ReusableProfile({
|
|
|
5215
6146
|
children: "Pinned"
|
|
5216
6147
|
}
|
|
5217
6148
|
),
|
|
5218
|
-
/* @__PURE__ */
|
|
5219
|
-
|
|
6149
|
+
/* @__PURE__ */ jsxs19(
|
|
6150
|
+
Text12,
|
|
5220
6151
|
{
|
|
5221
6152
|
fontSize: "xs",
|
|
5222
6153
|
color: quickNavHrefs.length >= maxQuickNavItems ? "orange.500" : "gray.400",
|
|
@@ -5229,8 +6160,8 @@ function ReusableProfile({
|
|
|
5229
6160
|
}
|
|
5230
6161
|
)
|
|
5231
6162
|
] }),
|
|
5232
|
-
quickNavHrefs.length === 0 ? /* @__PURE__ */
|
|
5233
|
-
|
|
6163
|
+
quickNavHrefs.length === 0 ? /* @__PURE__ */ jsx23(
|
|
6164
|
+
Flex11,
|
|
5234
6165
|
{
|
|
5235
6166
|
align: "center",
|
|
5236
6167
|
justify: "center",
|
|
@@ -5239,18 +6170,18 @@ function ReusableProfile({
|
|
|
5239
6170
|
borderWidth: "1px",
|
|
5240
6171
|
borderStyle: "dashed",
|
|
5241
6172
|
borderColor: "gray.200",
|
|
5242
|
-
children: /* @__PURE__ */
|
|
6173
|
+
children: /* @__PURE__ */ jsx23(Text12, { fontSize: "sm", color: "gray.400", children: "No items pinned \u2014 add from below" })
|
|
5243
6174
|
}
|
|
5244
|
-
) : /* @__PURE__ */
|
|
6175
|
+
) : /* @__PURE__ */ jsx23(VStack10, { gap: 0, children: quickNavHrefs.map((href, idx) => {
|
|
5245
6176
|
const option = availableOptions.find((item) => item.key === href);
|
|
5246
6177
|
if (!option) return null;
|
|
5247
6178
|
const ItemIcon = option.Icon;
|
|
5248
6179
|
const isFirst = idx === 0;
|
|
5249
6180
|
const isLast = idx === quickNavHrefs.length - 1;
|
|
5250
6181
|
const isReplacing = replacingIdx === idx;
|
|
5251
|
-
return /* @__PURE__ */
|
|
5252
|
-
/* @__PURE__ */
|
|
5253
|
-
|
|
6182
|
+
return /* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
6183
|
+
/* @__PURE__ */ jsxs19(
|
|
6184
|
+
Flex11,
|
|
5254
6185
|
{
|
|
5255
6186
|
justify: "space-between",
|
|
5256
6187
|
align: "center",
|
|
@@ -5262,9 +6193,9 @@ function ReusableProfile({
|
|
|
5262
6193
|
borderColor: isReplacing ? "orange.200" : void 0,
|
|
5263
6194
|
transition: "all 0.15s",
|
|
5264
6195
|
children: [
|
|
5265
|
-
/* @__PURE__ */
|
|
5266
|
-
/* @__PURE__ */
|
|
5267
|
-
|
|
6196
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
6197
|
+
/* @__PURE__ */ jsx23(
|
|
6198
|
+
Box19,
|
|
5268
6199
|
{
|
|
5269
6200
|
w: "36px",
|
|
5270
6201
|
h: "36px",
|
|
@@ -5275,13 +6206,13 @@ function ReusableProfile({
|
|
|
5275
6206
|
justifyContent: "center",
|
|
5276
6207
|
color: "white",
|
|
5277
6208
|
flexShrink: 0,
|
|
5278
|
-
children: /* @__PURE__ */
|
|
6209
|
+
children: /* @__PURE__ */ jsx23(ItemIcon, { size: 15 })
|
|
5279
6210
|
}
|
|
5280
6211
|
),
|
|
5281
|
-
/* @__PURE__ */
|
|
5282
|
-
/* @__PURE__ */
|
|
5283
|
-
isReplacing && /* @__PURE__ */
|
|
5284
|
-
|
|
6212
|
+
/* @__PURE__ */ jsxs19(Box19, { children: [
|
|
6213
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", fontWeight: "medium", children: option.title }),
|
|
6214
|
+
isReplacing && /* @__PURE__ */ jsx23(
|
|
6215
|
+
Text12,
|
|
5285
6216
|
{
|
|
5286
6217
|
fontSize: "xs",
|
|
5287
6218
|
color: "orange.500",
|
|
@@ -5291,8 +6222,8 @@ function ReusableProfile({
|
|
|
5291
6222
|
)
|
|
5292
6223
|
] })
|
|
5293
6224
|
] }),
|
|
5294
|
-
/* @__PURE__ */
|
|
5295
|
-
/* @__PURE__ */
|
|
6225
|
+
/* @__PURE__ */ jsxs19(HStack6, { gap: 0.5, children: [
|
|
6226
|
+
/* @__PURE__ */ jsx23(
|
|
5296
6227
|
IconButton3,
|
|
5297
6228
|
{
|
|
5298
6229
|
size: "xs",
|
|
@@ -5301,10 +6232,10 @@ function ReusableProfile({
|
|
|
5301
6232
|
color: "gray.500",
|
|
5302
6233
|
disabled: isFirst || isReplacing,
|
|
5303
6234
|
onClick: () => moveNavItem(idx, -1),
|
|
5304
|
-
children: /* @__PURE__ */
|
|
6235
|
+
children: /* @__PURE__ */ jsx23(LuChevronUp3, { size: 14 })
|
|
5305
6236
|
}
|
|
5306
6237
|
),
|
|
5307
|
-
/* @__PURE__ */
|
|
6238
|
+
/* @__PURE__ */ jsx23(
|
|
5308
6239
|
IconButton3,
|
|
5309
6240
|
{
|
|
5310
6241
|
size: "xs",
|
|
@@ -5313,10 +6244,10 @@ function ReusableProfile({
|
|
|
5313
6244
|
color: "gray.500",
|
|
5314
6245
|
disabled: isLast || isReplacing,
|
|
5315
6246
|
onClick: () => moveNavItem(idx, 1),
|
|
5316
|
-
children: /* @__PURE__ */
|
|
6247
|
+
children: /* @__PURE__ */ jsx23(LuChevronDown3, { size: 14 })
|
|
5317
6248
|
}
|
|
5318
6249
|
),
|
|
5319
|
-
/* @__PURE__ */
|
|
6250
|
+
/* @__PURE__ */ jsx23(
|
|
5320
6251
|
IconButton3,
|
|
5321
6252
|
{
|
|
5322
6253
|
size: "xs",
|
|
@@ -5326,10 +6257,10 @@ function ReusableProfile({
|
|
|
5326
6257
|
color: isReplacing ? "white" : "gray.500",
|
|
5327
6258
|
_hover: { bg: isReplacing ? "orange.500" : "gray.100" },
|
|
5328
6259
|
onClick: () => setReplacingIdx(isReplacing ? null : idx),
|
|
5329
|
-
children: /* @__PURE__ */
|
|
6260
|
+
children: /* @__PURE__ */ jsx23(LuArrowLeftRight, { size: 13 })
|
|
5330
6261
|
}
|
|
5331
6262
|
),
|
|
5332
|
-
/* @__PURE__ */
|
|
6263
|
+
/* @__PURE__ */ jsx23(
|
|
5333
6264
|
IconButton3,
|
|
5334
6265
|
{
|
|
5335
6266
|
size: "xs",
|
|
@@ -5339,23 +6270,23 @@ function ReusableProfile({
|
|
|
5339
6270
|
_hover: { bg: "red.50" },
|
|
5340
6271
|
disabled: isReplacing,
|
|
5341
6272
|
onClick: () => removeNavItem(href),
|
|
5342
|
-
children: /* @__PURE__ */
|
|
6273
|
+
children: /* @__PURE__ */ jsx23(LuX, { size: 14 })
|
|
5343
6274
|
}
|
|
5344
6275
|
)
|
|
5345
6276
|
] })
|
|
5346
6277
|
]
|
|
5347
6278
|
}
|
|
5348
6279
|
),
|
|
5349
|
-
!isLast && /* @__PURE__ */
|
|
6280
|
+
!isLast && /* @__PURE__ */ jsx23(Separator3, {})
|
|
5350
6281
|
] }, href);
|
|
5351
6282
|
}) })
|
|
5352
6283
|
] }),
|
|
5353
|
-
/* @__PURE__ */
|
|
5354
|
-
/* @__PURE__ */
|
|
5355
|
-
/* @__PURE__ */
|
|
5356
|
-
replacingIdx !== null ? /* @__PURE__ */
|
|
5357
|
-
/* @__PURE__ */
|
|
5358
|
-
|
|
6284
|
+
/* @__PURE__ */ jsx23(Separator3, { mx: 4, my: 1 }),
|
|
6285
|
+
/* @__PURE__ */ jsxs19(Box19, { px: 4, pt: 4, pb: 10, children: [
|
|
6286
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", justify: "space-between", mb: 3, children: [
|
|
6287
|
+
replacingIdx !== null ? /* @__PURE__ */ jsxs19(Box19, { children: [
|
|
6288
|
+
/* @__PURE__ */ jsx23(
|
|
6289
|
+
Text12,
|
|
5359
6290
|
{
|
|
5360
6291
|
fontSize: "xs",
|
|
5361
6292
|
fontWeight: "bold",
|
|
@@ -5365,15 +6296,15 @@ function ReusableProfile({
|
|
|
5365
6296
|
children: "Select Replacement"
|
|
5366
6297
|
}
|
|
5367
6298
|
),
|
|
5368
|
-
/* @__PURE__ */
|
|
6299
|
+
/* @__PURE__ */ jsxs19(Text12, { fontSize: "xs", color: "gray.500", mt: 0.5, children: [
|
|
5369
6300
|
'for "',
|
|
5370
6301
|
availableOptions.find(
|
|
5371
6302
|
(item) => item.key === quickNavHrefs[replacingIdx]
|
|
5372
6303
|
)?.title,
|
|
5373
6304
|
'"'
|
|
5374
6305
|
] })
|
|
5375
|
-
] }) : /* @__PURE__ */
|
|
5376
|
-
|
|
6306
|
+
] }) : /* @__PURE__ */ jsx23(
|
|
6307
|
+
Text12,
|
|
5377
6308
|
{
|
|
5378
6309
|
fontSize: "xs",
|
|
5379
6310
|
fontWeight: "bold",
|
|
@@ -5383,8 +6314,8 @@ function ReusableProfile({
|
|
|
5383
6314
|
children: "Available"
|
|
5384
6315
|
}
|
|
5385
6316
|
),
|
|
5386
|
-
replacingIdx !== null && /* @__PURE__ */
|
|
5387
|
-
|
|
6317
|
+
replacingIdx !== null && /* @__PURE__ */ jsx23(
|
|
6318
|
+
Button5,
|
|
5388
6319
|
{
|
|
5389
6320
|
size: "xs",
|
|
5390
6321
|
variant: "ghost",
|
|
@@ -5394,17 +6325,17 @@ function ReusableProfile({
|
|
|
5394
6325
|
}
|
|
5395
6326
|
)
|
|
5396
6327
|
] }),
|
|
5397
|
-
unpinnedOptions.length === 0 ? /* @__PURE__ */
|
|
6328
|
+
unpinnedOptions.length === 0 ? /* @__PURE__ */ jsx23(Text12, { fontSize: "sm", color: "gray.400", py: 3, textAlign: "center", children: "All available items are pinned" }) : /* @__PURE__ */ jsx23(VStack10, { gap: 0, children: unpinnedOptions.map((option, idx) => {
|
|
5398
6329
|
const ItemIcon = option.Icon;
|
|
5399
6330
|
const isLast = idx === unpinnedOptions.length - 1;
|
|
5400
6331
|
const isReplacingMode = replacingIdx !== null;
|
|
5401
6332
|
const canAdd = quickNavHrefs.length < maxQuickNavItems;
|
|
5402
6333
|
const actionEnabled = isReplacingMode || canAdd;
|
|
5403
|
-
return /* @__PURE__ */
|
|
5404
|
-
/* @__PURE__ */
|
|
5405
|
-
/* @__PURE__ */
|
|
5406
|
-
/* @__PURE__ */
|
|
5407
|
-
|
|
6334
|
+
return /* @__PURE__ */ jsxs19(Box19, { w: "full", children: [
|
|
6335
|
+
/* @__PURE__ */ jsxs19(Flex11, { justify: "space-between", align: "center", py: 2.5, children: [
|
|
6336
|
+
/* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
|
|
6337
|
+
/* @__PURE__ */ jsx23(
|
|
6338
|
+
Box19,
|
|
5408
6339
|
{
|
|
5409
6340
|
w: "36px",
|
|
5410
6341
|
h: "36px",
|
|
@@ -5415,11 +6346,11 @@ function ReusableProfile({
|
|
|
5415
6346
|
justifyContent: "center",
|
|
5416
6347
|
color: isReplacingMode ? "orange.500" : "gray.500",
|
|
5417
6348
|
flexShrink: 0,
|
|
5418
|
-
children: /* @__PURE__ */
|
|
6349
|
+
children: /* @__PURE__ */ jsx23(ItemIcon, { size: 15 })
|
|
5419
6350
|
}
|
|
5420
6351
|
),
|
|
5421
|
-
/* @__PURE__ */
|
|
5422
|
-
|
|
6352
|
+
/* @__PURE__ */ jsx23(
|
|
6353
|
+
Text12,
|
|
5423
6354
|
{
|
|
5424
6355
|
fontSize: "sm",
|
|
5425
6356
|
fontWeight: "medium",
|
|
@@ -5428,7 +6359,7 @@ function ReusableProfile({
|
|
|
5428
6359
|
}
|
|
5429
6360
|
)
|
|
5430
6361
|
] }),
|
|
5431
|
-
isReplacingMode ? /* @__PURE__ */
|
|
6362
|
+
isReplacingMode ? /* @__PURE__ */ jsx23(
|
|
5432
6363
|
IconButton3,
|
|
5433
6364
|
{
|
|
5434
6365
|
size: "xs",
|
|
@@ -5438,9 +6369,9 @@ function ReusableProfile({
|
|
|
5438
6369
|
color: "orange.500",
|
|
5439
6370
|
_hover: { bg: "orange.50" },
|
|
5440
6371
|
onClick: () => replaceNavItem(replacingIdx, option.key),
|
|
5441
|
-
children: /* @__PURE__ */
|
|
6372
|
+
children: /* @__PURE__ */ jsx23(LuArrowLeftRight, { size: 13 })
|
|
5442
6373
|
}
|
|
5443
|
-
) : /* @__PURE__ */
|
|
6374
|
+
) : /* @__PURE__ */ jsx23(
|
|
5444
6375
|
IconButton3,
|
|
5445
6376
|
{
|
|
5446
6377
|
size: "xs",
|
|
@@ -5451,19 +6382,19 @@ function ReusableProfile({
|
|
|
5451
6382
|
color: canAdd ? "var(--chakra-colors-primary)" : "gray.300",
|
|
5452
6383
|
_hover: { bg: canAdd ? "blue.50" : "transparent" },
|
|
5453
6384
|
onClick: () => addNavItem(option.key),
|
|
5454
|
-
children: /* @__PURE__ */
|
|
6385
|
+
children: /* @__PURE__ */ jsx23(LuPlus, { size: 13 })
|
|
5455
6386
|
}
|
|
5456
6387
|
)
|
|
5457
6388
|
] }),
|
|
5458
|
-
!isLast && /* @__PURE__ */
|
|
6389
|
+
!isLast && /* @__PURE__ */ jsx23(Separator3, {})
|
|
5459
6390
|
] }, option.key);
|
|
5460
6391
|
}) })
|
|
5461
6392
|
] })
|
|
5462
6393
|
] });
|
|
5463
6394
|
const subViewContent = profileView === "edit-account" ? editAccountContent : profileView === "change-password" ? changePasswordContent : profileView === "navbar-customize" ? navbarCustomizeContent : null;
|
|
5464
6395
|
if (isDesktop) {
|
|
5465
|
-
return /* @__PURE__ */
|
|
5466
|
-
|
|
6396
|
+
return /* @__PURE__ */ jsxs19(
|
|
6397
|
+
Flex11,
|
|
5467
6398
|
{
|
|
5468
6399
|
maxW: "6xl",
|
|
5469
6400
|
mx: "auto",
|
|
@@ -5473,8 +6404,8 @@ function ReusableProfile({
|
|
|
5473
6404
|
p: { md: 6, lg: 8 },
|
|
5474
6405
|
align: "start",
|
|
5475
6406
|
children: [
|
|
5476
|
-
/* @__PURE__ */
|
|
5477
|
-
|
|
6407
|
+
/* @__PURE__ */ jsx23(
|
|
6408
|
+
Box19,
|
|
5478
6409
|
{
|
|
5479
6410
|
w: { md: "300px", lg: "340px" },
|
|
5480
6411
|
flexShrink: 0,
|
|
@@ -5488,8 +6419,8 @@ function ReusableProfile({
|
|
|
5488
6419
|
children: mainContent
|
|
5489
6420
|
}
|
|
5490
6421
|
),
|
|
5491
|
-
/* @__PURE__ */
|
|
5492
|
-
|
|
6422
|
+
/* @__PURE__ */ jsx23(
|
|
6423
|
+
Box19,
|
|
5493
6424
|
{
|
|
5494
6425
|
flex: "1",
|
|
5495
6426
|
minW: 0,
|
|
@@ -5499,8 +6430,8 @@ function ReusableProfile({
|
|
|
5499
6430
|
overflow: "hidden",
|
|
5500
6431
|
bg: "bg",
|
|
5501
6432
|
minH: "540px",
|
|
5502
|
-
children: subViewContent ?? /* @__PURE__ */
|
|
5503
|
-
|
|
6433
|
+
children: subViewContent ?? /* @__PURE__ */ jsxs19(
|
|
6434
|
+
Flex11,
|
|
5504
6435
|
{
|
|
5505
6436
|
direction: "column",
|
|
5506
6437
|
align: "center",
|
|
@@ -5510,8 +6441,8 @@ function ReusableProfile({
|
|
|
5510
6441
|
textAlign: "center",
|
|
5511
6442
|
color: "gray.400",
|
|
5512
6443
|
children: [
|
|
5513
|
-
/* @__PURE__ */
|
|
5514
|
-
|
|
6444
|
+
/* @__PURE__ */ jsx23(
|
|
6445
|
+
Box19,
|
|
5515
6446
|
{
|
|
5516
6447
|
w: "56px",
|
|
5517
6448
|
h: "56px",
|
|
@@ -5521,10 +6452,10 @@ function ReusableProfile({
|
|
|
5521
6452
|
alignItems: "center",
|
|
5522
6453
|
justifyContent: "center",
|
|
5523
6454
|
mb: 4,
|
|
5524
|
-
children: /* @__PURE__ */
|
|
6455
|
+
children: /* @__PURE__ */ jsx23(LuUser, { size: 24 })
|
|
5525
6456
|
}
|
|
5526
6457
|
),
|
|
5527
|
-
/* @__PURE__ */
|
|
6458
|
+
/* @__PURE__ */ jsx23(Text12, { fontSize: "sm", mt: 1, maxW: "280px", children: "Choose Edit Account, Change Password, or Quick Navigation from the menu to update your details here." })
|
|
5528
6459
|
]
|
|
5529
6460
|
}
|
|
5530
6461
|
)
|
|
@@ -5534,12 +6465,14 @@ function ReusableProfile({
|
|
|
5534
6465
|
}
|
|
5535
6466
|
);
|
|
5536
6467
|
}
|
|
5537
|
-
return /* @__PURE__ */
|
|
6468
|
+
return /* @__PURE__ */ jsx23(Box19, { maxW: "480px", mx: "auto", w: "full", minH: "100%", bg: "bg", children: profileView === "main" ? mainContent : subViewContent });
|
|
5538
6469
|
}
|
|
5539
6470
|
var UserProfile_default = ReusableProfile;
|
|
5540
6471
|
export {
|
|
5541
6472
|
beneficiary_default as Beneficiary,
|
|
5542
6473
|
BottomQuickActions_default as BottomQuickActions,
|
|
6474
|
+
DocumentUploadCard,
|
|
6475
|
+
GetStarted_default as GetStarted,
|
|
5543
6476
|
HealthDeclaration_default as HealthDeclaration,
|
|
5544
6477
|
LifePlanApplication1_default as LifePlanApplication1,
|
|
5545
6478
|
LifePlanApplication2_default as LifePlanApplication2,
|
|
@@ -5547,10 +6480,16 @@ export {
|
|
|
5547
6480
|
LifePlanApplicationFormWrapper_default as LifePlanApplicationFormWrapper,
|
|
5548
6481
|
LifePlanApplicationStepWrapper_default as LifePlanApplicationStepWrapper,
|
|
5549
6482
|
NotifyInstall,
|
|
6483
|
+
OCR_STORAGE_KEY,
|
|
5550
6484
|
SharedLifePlanApplication_default as SharedLifePlanApplication,
|
|
5551
6485
|
UserProfile_default as UserProfile,
|
|
6486
|
+
clearOcrResult,
|
|
5552
6487
|
createEmptyApplicationData,
|
|
5553
6488
|
loadApplicationDataFromLocalStorage,
|
|
5554
|
-
|
|
6489
|
+
markOcrApplied,
|
|
6490
|
+
readOcrResult,
|
|
6491
|
+
saveApplicationDataToLocalStorage,
|
|
6492
|
+
saveOcrResult,
|
|
6493
|
+
useOcr
|
|
5555
6494
|
};
|
|
5556
6495
|
//# sourceMappingURL=index.mjs.map
|