@retinalabsllc/zairusjs 15.0.85 → 15.0.90
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 +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +222 -115
- package/dist/index.mjs +332 -225
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -293,12 +293,143 @@ var Header = ({
|
|
|
293
293
|
};
|
|
294
294
|
|
|
295
295
|
// src/components/PipleAuth.tsx
|
|
296
|
-
import
|
|
296
|
+
import React6, { useState as useState4, useRef as useRef2, useEffect as useEffect3, Suspense } from "react";
|
|
297
297
|
import { useSearchParams } from "next/navigation";
|
|
298
298
|
import toast from "react-hot-toast";
|
|
299
299
|
import { useGoogleReCaptcha, GoogleReCaptchaProvider } from "react-google-recaptcha-v3";
|
|
300
300
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
301
|
-
|
|
301
|
+
|
|
302
|
+
// src/components/TextInput.tsx
|
|
303
|
+
import React5, { useState as useState3 } from "react";
|
|
304
|
+
var InputSpinner = () => /* @__PURE__ */ React5.createElement("svg", { className: "animate-spin h-3 w-3 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React5.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React5.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
305
|
+
var FlagImage = ({ countryCode }) => {
|
|
306
|
+
const [loaded, setLoaded] = useState3(false);
|
|
307
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "relative w-6 h-6 rounded-full overflow-hidden flex items-center justify-center bg-neutral-100 shrink-0 border border-neutral-200" }, !loaded && /* @__PURE__ */ React5.createElement("div", { className: "absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ React5.createElement(InputSpinner, null)), /* @__PURE__ */ React5.createElement(
|
|
308
|
+
"img",
|
|
309
|
+
{
|
|
310
|
+
src: `https://flagcdn.com/w40/${countryCode.toLowerCase()}.png`,
|
|
311
|
+
alt: countryCode,
|
|
312
|
+
className: `object-cover w-full h-full transition-opacity duration-300 ${loaded ? "opacity-100" : "opacity-0"}`,
|
|
313
|
+
onLoad: () => setLoaded(true)
|
|
314
|
+
}
|
|
315
|
+
));
|
|
316
|
+
};
|
|
317
|
+
var TextInput = ({
|
|
318
|
+
label,
|
|
319
|
+
value,
|
|
320
|
+
onChange,
|
|
321
|
+
placeholder,
|
|
322
|
+
maxLength,
|
|
323
|
+
disabled,
|
|
324
|
+
readOnly,
|
|
325
|
+
type = "text",
|
|
326
|
+
onClick
|
|
327
|
+
}) => /* @__PURE__ */ React5.createElement("div", { className: "space-y-2 flex-1 w-full", onClick }, label && /* @__PURE__ */ React5.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, label), /* @__PURE__ */ React5.createElement(
|
|
328
|
+
"input",
|
|
329
|
+
{
|
|
330
|
+
type,
|
|
331
|
+
value,
|
|
332
|
+
onChange: (e) => onChange(e.target.value.substring(0, maxLength || 100)),
|
|
333
|
+
placeholder,
|
|
334
|
+
disabled,
|
|
335
|
+
readOnly,
|
|
336
|
+
autoComplete: "off",
|
|
337
|
+
spellCheck: "false",
|
|
338
|
+
className: `w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black transition-all outline-none focus:border-black disabled:opacity-50 ${readOnly ? "cursor-pointer" : ""}`
|
|
339
|
+
}
|
|
340
|
+
));
|
|
341
|
+
var NumberInput = ({
|
|
342
|
+
label,
|
|
343
|
+
value,
|
|
344
|
+
onChange,
|
|
345
|
+
placeholder,
|
|
346
|
+
maxLength,
|
|
347
|
+
disabled
|
|
348
|
+
}) => /* @__PURE__ */ React5.createElement("div", { className: "space-y-2 flex-1 w-full" }, label && /* @__PURE__ */ React5.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, label), /* @__PURE__ */ React5.createElement(
|
|
349
|
+
"input",
|
|
350
|
+
{
|
|
351
|
+
type: "text",
|
|
352
|
+
value,
|
|
353
|
+
onChange: (e) => {
|
|
354
|
+
const numOnly = e.target.value.replace(/[^0-9]/g, "");
|
|
355
|
+
onChange(numOnly.substring(0, maxLength || 20));
|
|
356
|
+
},
|
|
357
|
+
placeholder,
|
|
358
|
+
disabled,
|
|
359
|
+
autoComplete: "off",
|
|
360
|
+
spellCheck: "false",
|
|
361
|
+
className: "w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black transition-all outline-none focus:border-black disabled:opacity-50"
|
|
362
|
+
}
|
|
363
|
+
));
|
|
364
|
+
var PhoneInput = ({
|
|
365
|
+
label,
|
|
366
|
+
value,
|
|
367
|
+
onChange,
|
|
368
|
+
selectedCountry,
|
|
369
|
+
onCountryClick,
|
|
370
|
+
placeholder,
|
|
371
|
+
disabled
|
|
372
|
+
}) => /* @__PURE__ */ React5.createElement("div", { className: "space-y-1.5 flex-1 w-full" }, label && /* @__PURE__ */ React5.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block" }, label), /* @__PURE__ */ React5.createElement("div", { className: `flex items-center gap-3 border-b border-neutral-200 focus-within:border-black transition-all duration-300 pb-2 ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ React5.createElement(
|
|
373
|
+
"button",
|
|
374
|
+
{
|
|
375
|
+
type: "button",
|
|
376
|
+
disabled,
|
|
377
|
+
onClick: onCountryClick,
|
|
378
|
+
className: "flex items-center gap-1.5 outline-none hover:opacity-80 transition-opacity"
|
|
379
|
+
},
|
|
380
|
+
/* @__PURE__ */ React5.createElement(FlagImage, { countryCode: selectedCountry.code }),
|
|
381
|
+
/* @__PURE__ */ React5.createElement("span", { className: "text-sm text-black font-medium pl-1" }, selectedCountry.dialCode),
|
|
382
|
+
/* @__PURE__ */ React5.createElement("svg", { className: "w-3 h-3 text-neutral-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor" }, /* @__PURE__ */ React5.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }))
|
|
383
|
+
), /* @__PURE__ */ React5.createElement(
|
|
384
|
+
"input",
|
|
385
|
+
{
|
|
386
|
+
type: "tel",
|
|
387
|
+
value,
|
|
388
|
+
onChange: (e) => {
|
|
389
|
+
const numOnly = e.target.value.replace(/[^0-9]/g, "");
|
|
390
|
+
onChange(numOnly.substring(0, 15));
|
|
391
|
+
},
|
|
392
|
+
disabled,
|
|
393
|
+
required: true,
|
|
394
|
+
autoFocus: true,
|
|
395
|
+
autoComplete: "off",
|
|
396
|
+
spellCheck: "false",
|
|
397
|
+
className: "w-full text-sm bg-transparent text-black outline-none pt-1",
|
|
398
|
+
placeholder: placeholder || "0801 234 5678"
|
|
399
|
+
}
|
|
400
|
+
)));
|
|
401
|
+
|
|
402
|
+
// src/components/PipleAuth.tsx
|
|
403
|
+
var SUPPORTED_COUNTRIES = [
|
|
404
|
+
{ code: "NG", dialCode: "+234", name: "Nigeria" },
|
|
405
|
+
{ code: "GH", dialCode: "+233", name: "Ghana" },
|
|
406
|
+
{ code: "KE", dialCode: "+254", name: "Kenya" }
|
|
407
|
+
];
|
|
408
|
+
var InputSpinner2 = () => /* @__PURE__ */ React6.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React6.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React6.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
409
|
+
var CountrySelectorDialog = ({ isOpen, onClose, onSelect }) => {
|
|
410
|
+
if (!isOpen) return null;
|
|
411
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/40" }, /* @__PURE__ */ React6.createElement("div", { className: "absolute inset-0", onClick: onClose }), /* @__PURE__ */ React6.createElement("div", { className: "w-full max-w-sm bg-white rounded-2xl shadow-2xl overflow-hidden relative z-10 animate-in fade-in zoom-in-95 duration-200" }, /* @__PURE__ */ React6.createElement(
|
|
412
|
+
"button",
|
|
413
|
+
{
|
|
414
|
+
onClick: onClose,
|
|
415
|
+
className: "absolute top-4 right-4 p-2 text-neutral-700 hover:text-neutral-400 transition-colors outline-none"
|
|
416
|
+
},
|
|
417
|
+
/* @__PURE__ */ React6.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React6.createElement("path", { d: "M18 6 6 18" }), /* @__PURE__ */ React6.createElement("path", { d: "m6 6 12 12" }))
|
|
418
|
+
), /* @__PURE__ */ React6.createElement("div", { className: "p-6 sm:p-8" }, /* @__PURE__ */ React6.createElement("div", { className: "mb-6 mt-2" }, /* @__PURE__ */ React6.createElement("h2", { className: "text-xl text-black tracking-tight mb-2" }, "Select Country"), /* @__PURE__ */ React6.createElement("p", { className: "text-[13px] text-neutral-500 leading-relaxed" }, "Choose your region to continue.")), /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col gap-2" }, SUPPORTED_COUNTRIES.map((c) => /* @__PURE__ */ React6.createElement(
|
|
419
|
+
"button",
|
|
420
|
+
{
|
|
421
|
+
key: c.code,
|
|
422
|
+
onClick: () => {
|
|
423
|
+
onSelect(c);
|
|
424
|
+
onClose();
|
|
425
|
+
},
|
|
426
|
+
className: "flex items-center gap-4 p-3 rounded-xl hover:bg-neutral-50 transition-colors text-left outline-none"
|
|
427
|
+
},
|
|
428
|
+
/* @__PURE__ */ React6.createElement(FlagImage, { countryCode: c.code }),
|
|
429
|
+
/* @__PURE__ */ React6.createElement("span", { className: "text-sm text-black flex-1 font-medium" }, c.name),
|
|
430
|
+
/* @__PURE__ */ React6.createElement("span", { className: "text-sm text-neutral-500 font-mono" }, c.dialCode)
|
|
431
|
+
))))));
|
|
432
|
+
};
|
|
302
433
|
function AuthFormInner({
|
|
303
434
|
companyName,
|
|
304
435
|
workspaceLabel = "Workspace",
|
|
@@ -314,28 +445,26 @@ function AuthFormInner({
|
|
|
314
445
|
const searchParams = useSearchParams();
|
|
315
446
|
const redirectUrl = searchParams.get("redirect") || defaultRedirectPath;
|
|
316
447
|
const captchaContext = useRecaptcha ? useGoogleReCaptcha() : null;
|
|
317
|
-
const [mode, setMode] =
|
|
318
|
-
const [step, setStep] =
|
|
319
|
-
const getInitialSignupStep = () =>
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
const [
|
|
323
|
-
const [
|
|
324
|
-
const [
|
|
325
|
-
const [
|
|
326
|
-
const [
|
|
327
|
-
const [firstName, setFirstName] =
|
|
328
|
-
const [lastName, setLastName] =
|
|
329
|
-
const [orgName, setOrgName] =
|
|
330
|
-
const [agreedToTerms, setAgreedToTerms] =
|
|
331
|
-
const [
|
|
332
|
-
const [
|
|
333
|
-
const [
|
|
334
|
-
const [otp, setOtp] = useState3(["", "", "", "", "", ""]);
|
|
448
|
+
const [mode, setMode] = useState4("LOGIN");
|
|
449
|
+
const [step, setStep] = useState4("INPUT");
|
|
450
|
+
const getInitialSignupStep = () => "INVITATION";
|
|
451
|
+
const [signupStep, setSignupStep] = useState4(getInitialSignupStep());
|
|
452
|
+
const [isSubmitting, setIsSubmitting] = useState4(false);
|
|
453
|
+
const [countdown, setCountdown] = useState4(0);
|
|
454
|
+
const [invitationCode, setInvitationCode] = useState4("");
|
|
455
|
+
const [phoneNumber, setPhoneNumber] = useState4("");
|
|
456
|
+
const [selectedCountry, setSelectedCountry] = useState4(SUPPORTED_COUNTRIES[0]);
|
|
457
|
+
const [isCountryDialogOpen, setIsCountryDialogOpen] = useState4(false);
|
|
458
|
+
const [firstName, setFirstName] = useState4("");
|
|
459
|
+
const [lastName, setLastName] = useState4("");
|
|
460
|
+
const [orgName, setOrgName] = useState4("");
|
|
461
|
+
const [agreedToTerms, setAgreedToTerms] = useState4(false);
|
|
462
|
+
const [userHasPasskey, setUserHasPasskey] = useState4(false);
|
|
463
|
+
const [authOptions, setAuthOptions] = useState4(null);
|
|
464
|
+
const [otp, setOtp] = useState4(["", "", "", "", "", ""]);
|
|
335
465
|
const inputRefs = useRef2([]);
|
|
336
466
|
const cleanAlpha = (val) => val.replace(/[^a-zA-Z]/g, "").substring(0, 50);
|
|
337
467
|
const cleanOrgName = (val) => val.replace(/[^a-zA-Z0-9\s]/g, "").substring(0, 50);
|
|
338
|
-
const cleanEmailId = (val) => val.toLowerCase().replace(/[^a-z0-9@._-]/g, "");
|
|
339
468
|
useEffect3(() => {
|
|
340
469
|
if (countdown > 0) {
|
|
341
470
|
const timer = setTimeout(() => setCountdown(countdown - 1), 1e3);
|
|
@@ -365,6 +494,10 @@ function AuthFormInner({
|
|
|
365
494
|
verifyOtpCode(newOtp.join(""));
|
|
366
495
|
}
|
|
367
496
|
};
|
|
497
|
+
const getFormattedPhoneNumber = () => {
|
|
498
|
+
const cleanNumber = phoneNumber.replace(/^0+/, "");
|
|
499
|
+
return `${selectedCountry.dialCode}${cleanNumber}`;
|
|
500
|
+
};
|
|
368
501
|
const handleAuthRequestSubmit = async (e) => {
|
|
369
502
|
if (e) e.preventDefault();
|
|
370
503
|
if (mode === "SIGNUP" && !agreedToTerms) {
|
|
@@ -379,7 +512,8 @@ function AuthFormInner({
|
|
|
379
512
|
recaptchaToken = await captchaContext.executeRecaptcha("auth_request");
|
|
380
513
|
}
|
|
381
514
|
const res = await onAuthRequest({
|
|
382
|
-
|
|
515
|
+
phoneNumber: getFormattedPhoneNumber(),
|
|
516
|
+
country: selectedCountry.code,
|
|
383
517
|
firstName: mode === "SIGNUP" && requireNames ? firstName : void 0,
|
|
384
518
|
lastName: mode === "SIGNUP" && requireNames ? lastName : void 0,
|
|
385
519
|
organizationName: mode === "SIGNUP" && requireOrganization ? orgName : void 0,
|
|
@@ -388,10 +522,9 @@ function AuthFormInner({
|
|
|
388
522
|
recaptchaToken
|
|
389
523
|
});
|
|
390
524
|
if (res.success) {
|
|
391
|
-
setUserHas2FA(!!res.has2FA);
|
|
392
525
|
setUserHasPasskey(!!res.hasPasskey);
|
|
393
526
|
if (res.passkeyOptions) setAuthOptions(res.passkeyOptions);
|
|
394
|
-
toast.success(res.
|
|
527
|
+
toast.success(res.needsPukSetup ? "Verification code sent" : "Security check required");
|
|
395
528
|
setStep("OTP");
|
|
396
529
|
setCountdown(60);
|
|
397
530
|
} else {
|
|
@@ -407,7 +540,10 @@ function AuthFormInner({
|
|
|
407
540
|
if (codeToVerify.length !== 6 || isSubmitting) return;
|
|
408
541
|
setIsSubmitting(true);
|
|
409
542
|
try {
|
|
410
|
-
const res = await onVerifyOtp({
|
|
543
|
+
const res = await onVerifyOtp({
|
|
544
|
+
phoneNumber: getFormattedPhoneNumber(),
|
|
545
|
+
code: codeToVerify
|
|
546
|
+
});
|
|
411
547
|
if (res.success) {
|
|
412
548
|
window.location.href = res.redirect || redirectUrl;
|
|
413
549
|
} else {
|
|
@@ -426,7 +562,11 @@ function AuthFormInner({
|
|
|
426
562
|
setIsSubmitting(true);
|
|
427
563
|
try {
|
|
428
564
|
const credentialResponse = await startAuthentication({ optionsJSON: authOptions });
|
|
429
|
-
const res = await onVerifyOtp({
|
|
565
|
+
const res = await onVerifyOtp({
|
|
566
|
+
phoneNumber: getFormattedPhoneNumber(),
|
|
567
|
+
isPasskey: true,
|
|
568
|
+
passkeyCredential: credentialResponse
|
|
569
|
+
});
|
|
430
570
|
if (res.success) {
|
|
431
571
|
window.location.href = res.redirect || redirectUrl;
|
|
432
572
|
} else {
|
|
@@ -442,35 +582,42 @@ function AuthFormInner({
|
|
|
442
582
|
if (signupStep === "INVITATION") {
|
|
443
583
|
if (requireNames) setSignupStep("NAME");
|
|
444
584
|
else if (requireOrganization) setSignupStep("ORGANIZATION");
|
|
445
|
-
else setSignupStep("
|
|
585
|
+
else setSignupStep("PHONE_ID");
|
|
446
586
|
} else if (signupStep === "NAME") {
|
|
447
587
|
if (requireOrganization) setSignupStep("ORGANIZATION");
|
|
448
|
-
else setSignupStep("
|
|
588
|
+
else setSignupStep("PHONE_ID");
|
|
449
589
|
} else if (signupStep === "ORGANIZATION") {
|
|
450
|
-
setSignupStep("
|
|
590
|
+
setSignupStep("PHONE_ID");
|
|
451
591
|
}
|
|
452
592
|
};
|
|
453
593
|
const isContinueDisabled = () => {
|
|
454
594
|
if (isSubmitting) return true;
|
|
455
|
-
if (mode === "LOGIN") return
|
|
595
|
+
if (mode === "LOGIN") return phoneNumber.length < 5;
|
|
456
596
|
if (mode === "SIGNUP") {
|
|
457
597
|
if (signupStep === "INVITATION") return invitationCode.trim().length > 0 && invitationCode.trim().length < 3;
|
|
458
598
|
if (signupStep === "NAME") return firstName.trim() === "" || lastName.trim() === "";
|
|
459
599
|
if (signupStep === "ORGANIZATION") return orgName.trim().length < 3;
|
|
460
|
-
if (signupStep === "
|
|
600
|
+
if (signupStep === "PHONE_ID") return phoneNumber.length < 5 || !agreedToTerms;
|
|
461
601
|
}
|
|
462
602
|
return false;
|
|
463
603
|
};
|
|
464
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
605
|
+
CountrySelectorDialog,
|
|
606
|
+
{
|
|
607
|
+
isOpen: isCountryDialogOpen,
|
|
608
|
+
onClose: () => setIsCountryDialogOpen(false),
|
|
609
|
+
onSelect: setSelectedCountry
|
|
610
|
+
}
|
|
611
|
+
), /* @__PURE__ */ React6.createElement("div", { className: "w-full max-w-md mx-auto flex flex-col items-center gap-4 relative z-10 animate-in fade-in duration-300" }, /* @__PURE__ */ React6.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ React6.createElement("div", { className: "p-8 md:p-12" }, step === "INPUT" && /* @__PURE__ */ React6.createElement("div", { className: "animate-in fade-in duration-300" }, /* @__PURE__ */ React6.createElement("div", { className: "mb-12 text-center mt-2" }, /* @__PURE__ */ React6.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, mode === "LOGIN" ? `${companyName} ${workspaceLabel}` : "Create Account"), /* @__PURE__ */ React6.createElement("div", { className: "text-[13px] text-neutral-500" }, mode === "LOGIN" ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, "Don't have an account? ", /* @__PURE__ */ React6.createElement("button", { type: "button", onClick: () => {
|
|
465
612
|
setMode("SIGNUP");
|
|
466
613
|
setSignupStep(getInitialSignupStep());
|
|
467
|
-
}, className: "text-black transition-colors ml-1" }, "Sign up")) : /* @__PURE__ */
|
|
614
|
+
}, className: "text-black transition-colors ml-1" }, "Sign up")) : /* @__PURE__ */ React6.createElement(React6.Fragment, null, "Already have an account? ", /* @__PURE__ */ React6.createElement("button", { type: "button", onClick: () => setMode("LOGIN"), className: "text-black transition-colors ml-1" }, "Log in")))), /* @__PURE__ */ React6.createElement("form", { className: "space-y-6", autoComplete: "off", onSubmit: (e) => {
|
|
468
615
|
e.preventDefault();
|
|
469
616
|
if (mode === "SIGNUP" && signupStep === "INVITATION") handleNextSignupStep();
|
|
470
617
|
else if (mode === "SIGNUP" && signupStep === "NAME") handleNextSignupStep();
|
|
471
618
|
else if (mode === "SIGNUP" && signupStep === "ORGANIZATION") handleNextSignupStep();
|
|
472
619
|
else handleAuthRequestSubmit();
|
|
473
|
-
} }, mode === "SIGNUP" && signupStep === "INVITATION" && /* @__PURE__ */
|
|
620
|
+
} }, mode === "SIGNUP" && signupStep === "INVITATION" && /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React6.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React6.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "Referral Code"), /* @__PURE__ */ React6.createElement(
|
|
474
621
|
"input",
|
|
475
622
|
{
|
|
476
623
|
type: "text",
|
|
@@ -480,10 +627,20 @@ function AuthFormInner({
|
|
|
480
627
|
className: "w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300 tracking-widest",
|
|
481
628
|
placeholder: "Referral Code (Optional)"
|
|
482
629
|
}
|
|
483
|
-
))), mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */
|
|
630
|
+
))), mode === "SIGNUP" && signupStep === "NAME" && requireNames && /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React6.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React6.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "First Name"), /* @__PURE__ */ React6.createElement("input", { type: "text", value: firstName, onChange: (e) => setFirstName(cleanAlpha(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "First name" })), /* @__PURE__ */ React6.createElement("div", { className: "space-y-1.5" }, /* @__PURE__ */ React6.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "Last Name"), /* @__PURE__ */ React6.createElement("input", { type: "text", value: lastName, onChange: (e) => setLastName(cleanAlpha(e.target.value)), required: true, className: "w-full px-2 py-3 bg-transparent text-sm border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "Last name" }))), mode === "SIGNUP" && signupStep === "ORGANIZATION" && requireOrganization && /* @__PURE__ */ React6.createElement("div", { className: "flex flex-col gap-6" }, /* @__PURE__ */ React6.createElement("div", { className: "space-y-1.5 relative" }, /* @__PURE__ */ React6.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, "Organization Name"), /* @__PURE__ */ React6.createElement("input", { type: "text", value: orgName, onChange: (e) => setOrgName(cleanOrgName(e.target.value)), required: true, autoFocus: true, className: "w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black outline-none focus:border-black transition-all duration-300", placeholder: "Acme Corporation" }))), (mode === "LOGIN" || mode === "SIGNUP" && signupStep === "PHONE_ID") && /* @__PURE__ */ React6.createElement("div", { className: "space-y-6 animate-in fade-in duration-300" }, /* @__PURE__ */ React6.createElement(
|
|
631
|
+
PhoneInput,
|
|
632
|
+
{
|
|
633
|
+
label: "Phone Number",
|
|
634
|
+
value: phoneNumber,
|
|
635
|
+
onChange: setPhoneNumber,
|
|
636
|
+
selectedCountry,
|
|
637
|
+
onCountryClick: () => setIsCountryDialogOpen(true),
|
|
638
|
+
disabled: isSubmitting
|
|
639
|
+
}
|
|
640
|
+
), mode === "SIGNUP" && /* @__PURE__ */ React6.createElement("div", { className: "flex items-start gap-3 mt-4" }, /* @__PURE__ */ React6.createElement("input", { type: "checkbox", id: "zairus-terms", checked: agreedToTerms, onChange: (e) => setAgreedToTerms(e.target.checked), className: "mt-0.5 w-4 h-4 bg-white border-neutral-300 rounded text-black focus:ring-black cursor-pointer", required: true }), /* @__PURE__ */ React6.createElement("label", { htmlFor: "zairus-terms", className: "text-[11px] text-neutral-500 cursor-pointer leading-snug" }, "I agree to ", companyName, "'s ", /* @__PURE__ */ React6.createElement("a", { href: termsUrl, target: "_blank", rel: "noreferrer", className: "text-black underline " }, "Terms of Service"), " and ", /* @__PURE__ */ React6.createElement("a", { href: privacyUrl, target: "_blank", rel: "noreferrer", className: "text-black underline " }, "Privacy Policy"), "."))), /* @__PURE__ */ React6.createElement(ThreeDActionButton, { type: "submit", disabled: isContinueDisabled(), isLoading: isSubmitting, className: "w-full mt-10" }, "Continue"))), step === "OTP" && /* @__PURE__ */ React6.createElement("div", { className: "animate-in fade-in duration-300" }, /* @__PURE__ */ React6.createElement("div", { className: "text-center mb-10 mt-2" }, /* @__PURE__ */ React6.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, "Security Check"), /* @__PURE__ */ React6.createElement("p", { className: "text-[13px] text-neutral-500" }, "Enter your 6-digit security passcode or OTP.")), /* @__PURE__ */ React6.createElement("form", { className: "space-y-8", autoComplete: "off", onSubmit: (e) => {
|
|
484
641
|
e.preventDefault();
|
|
485
642
|
verifyOtpCode(otp.join(""));
|
|
486
|
-
} }, /* @__PURE__ */
|
|
643
|
+
} }, /* @__PURE__ */ React6.createElement("div", { className: "flex justify-between gap-2", onPaste: handlePaste }, otp.map((digit, index) => /* @__PURE__ */ React6.createElement(
|
|
487
644
|
"input",
|
|
488
645
|
{
|
|
489
646
|
key: index,
|
|
@@ -500,25 +657,25 @@ function AuthFormInner({
|
|
|
500
657
|
},
|
|
501
658
|
className: "w-10 h-12 text-center text-lg bg-transparent border-b-2 border-neutral-200 text-black outline-none focus:border-black transition-all duration-300"
|
|
502
659
|
}
|
|
503
|
-
))), /* @__PURE__ */
|
|
660
|
+
))), /* @__PURE__ */ React6.createElement(ThreeDActionButton, { type: "submit", disabled: otp.join("").length < 6, isLoading: isSubmitting, className: "w-full" }, "Verify Code")), userHasPasskey && /* @__PURE__ */ React6.createElement("div", { className: "pt-6" }, /* @__PURE__ */ React6.createElement(
|
|
504
661
|
"button",
|
|
505
662
|
{
|
|
506
663
|
onClick: triggerPasskeyLogin,
|
|
507
664
|
disabled: isSubmitting,
|
|
508
|
-
className: "w-full py-2.5 rounded-full text-black border border-neutral-200
|
|
665
|
+
className: "w-full py-2.5 rounded-full text-black border border-neutral-200 hover:bg-neutral-50 text-xs tracking-wide transition-colors outline-none disabled:opacity-50"
|
|
509
666
|
},
|
|
510
667
|
"Use Passkey / Biometrics"
|
|
511
|
-
))))));
|
|
668
|
+
)))))));
|
|
512
669
|
}
|
|
513
670
|
var PipleAuth = (props) => {
|
|
514
671
|
if (props.useRecaptcha && props.recaptchaSiteKey) {
|
|
515
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ React6.createElement(GoogleReCaptchaProvider, { reCaptchaKey: props.recaptchaSiteKey }, /* @__PURE__ */ React6.createElement(Suspense, { fallback: /* @__PURE__ */ React6.createElement("div", { className: "h-64 flex items-center justify-center" }, /* @__PURE__ */ React6.createElement(InputSpinner2, null)) }, /* @__PURE__ */ React6.createElement(AuthFormInner, { ...props })));
|
|
516
673
|
}
|
|
517
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ React6.createElement(Suspense, { fallback: /* @__PURE__ */ React6.createElement("div", { className: "h-64 flex items-center justify-center" }, /* @__PURE__ */ React6.createElement(InputSpinner2, null)) }, /* @__PURE__ */ React6.createElement(AuthFormInner, { ...props }));
|
|
518
675
|
};
|
|
519
676
|
|
|
520
677
|
// src/components/Footer.tsx
|
|
521
|
-
import
|
|
678
|
+
import React7, { useState as useState5 } from "react";
|
|
522
679
|
import Link3 from "next/link";
|
|
523
680
|
import { HugeiconsIcon as HugeiconsIcon2 } from "@hugeicons/react";
|
|
524
681
|
var Footer = ({
|
|
@@ -528,20 +685,20 @@ var Footer = ({
|
|
|
528
685
|
copyrightText,
|
|
529
686
|
topSection
|
|
530
687
|
}) => {
|
|
531
|
-
const [openCol, setOpenCol] =
|
|
688
|
+
const [openCol, setOpenCol] = useState5(null);
|
|
532
689
|
const toggleColumn = (idx) => {
|
|
533
690
|
setOpenCol(openCol === idx ? null : idx);
|
|
534
691
|
};
|
|
535
|
-
return /* @__PURE__ */
|
|
692
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "" }, topSection && topSection, /* @__PURE__ */ React7.createElement("footer", { className: "relative px-6 overflow-hidden flex flex-col" }, /* @__PURE__ */ React7.createElement("div", { className: "relative w-full max-w-7xl mx-auto z-20 flex flex-col" }, /* @__PURE__ */ React7.createElement("div", { className: "relative py-12 md:py-16" }, /* @__PURE__ */ React7.createElement("div", { className: "flex flex-col lg:flex-row justify-between items-start gap-12 lg:gap-16 mb-12 text-left" }, /* @__PURE__ */ React7.createElement("div", { className: "w-full lg:max-w-sm flex flex-col items-start justify-between shrink-0" }, /* @__PURE__ */ React7.createElement("div", { className: "flex items-center gap-4 mb-4" }, /* @__PURE__ */ React7.createElement("img", { src: "https://retinalabs.company/assets/images/ndpr.avif", alt: "NDPR", className: "w-28 h-auto object-contain filter grayscale opacity-80" }), /* @__PURE__ */ React7.createElement("img", { src: "https://retinalabs.company/assets/images/gdpr.avif", alt: "GDPR", className: "w-12 h-12 object-contain filter grayscale opacity-80" })), /* @__PURE__ */ React7.createElement("div", null, /* @__PURE__ */ React7.createElement("p", { className: "text-[11px] text-neutral-600 leading-relaxed pr-4" }, description))), /* @__PURE__ */ React7.createElement("div", { className: "w-full lg:flex-1 lg:max-w-2xl" }, /* @__PURE__ */ React7.createElement("div", { className: "hidden md:grid grid-cols-2 gap-x-16 lg:gap-x-24 gap-y-12" }, columns.map((col, idx) => /* @__PURE__ */ React7.createElement("div", { key: idx, className: "flex flex-col" }, /* @__PURE__ */ React7.createElement("h4", { className: "text-[11px] tracking-[0.2em] text-black mb-6 " }, col.title), /* @__PURE__ */ React7.createElement("ul", { className: "space-y-4 text-[13px] text-neutral-500" }, col.links.map((link, lIdx) => /* @__PURE__ */ React7.createElement("li", { key: lIdx }, link.isExternal ? /* @__PURE__ */ React7.createElement("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", className: "hover:text-black transition-colors block truncate" }, link.label) : /* @__PURE__ */ React7.createElement(Link3, { href: link.href, className: "hover:text-black transition-colors block truncate" }, link.label))))))), /* @__PURE__ */ React7.createElement("div", { className: "flex flex-col md:hidden w-full border-t border-neutral-200 mt-4" }, columns.map((col, idx) => {
|
|
536
693
|
const isOpen = openCol === idx;
|
|
537
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ React7.createElement("div", { key: idx, className: "border-b border-neutral-200" }, /* @__PURE__ */ React7.createElement(
|
|
538
695
|
"button",
|
|
539
696
|
{
|
|
540
697
|
onClick: () => toggleColumn(idx),
|
|
541
698
|
className: "w-full flex items-center justify-between py-5 text-left outline-none"
|
|
542
699
|
},
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ React7.createElement("span", { className: "text-[11px] tracking-[0.2em] text-black " }, col.title),
|
|
701
|
+
/* @__PURE__ */ React7.createElement(
|
|
545
702
|
"svg",
|
|
546
703
|
{
|
|
547
704
|
className: `w-4 h-4 text-neutral-400 transition-transform duration-300 ${isOpen ? "rotate-180" : ""}`,
|
|
@@ -549,10 +706,10 @@ var Footer = ({
|
|
|
549
706
|
viewBox: "0 0 24 24",
|
|
550
707
|
stroke: "currentColor"
|
|
551
708
|
},
|
|
552
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ React7.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M19 9l-7 7-7-7" })
|
|
553
710
|
)
|
|
554
|
-
), /* @__PURE__ */
|
|
555
|
-
})))), /* @__PURE__ */
|
|
711
|
+
), /* @__PURE__ */ React7.createElement("div", { className: `grid transition-all duration-300 ease-in-out ${isOpen ? "grid-rows-[1fr] pb-6 opacity-100" : "grid-rows-[0fr] opacity-0"}` }, /* @__PURE__ */ React7.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React7.createElement("ul", { className: "space-y-4 text-[13px] text-neutral-500 pt-2" }, col.links.map((link, lIdx) => /* @__PURE__ */ React7.createElement("li", { key: lIdx }, link.isExternal ? /* @__PURE__ */ React7.createElement("a", { href: link.href, target: "_blank", rel: "noopener noreferrer", className: "hover:text-black transition-colors" }, link.label) : /* @__PURE__ */ React7.createElement(Link3, { href: link.href, className: "hover:text-black transition-colors" }, link.label)))))));
|
|
712
|
+
})))), /* @__PURE__ */ React7.createElement("div", { className: "pt-8 mt-4 flex flex-col-reverse md:flex-row justify-between items-start md:items-center gap-6 relative z-20" }, /* @__PURE__ */ React7.createElement("p", { className: "text-[11px] text-neutral-400 tracking-widest text-left" }, copyrightText), socialLinks && socialLinks.length > 0 && /* @__PURE__ */ React7.createElement("div", { className: "flex items-center gap-6" }, socialLinks.map((social, idx) => /* @__PURE__ */ React7.createElement(
|
|
556
713
|
"a",
|
|
557
714
|
{
|
|
558
715
|
key: idx,
|
|
@@ -561,12 +718,12 @@ var Footer = ({
|
|
|
561
718
|
rel: "noopener noreferrer",
|
|
562
719
|
className: "text-neutral-400 hover:text-black transition-colors"
|
|
563
720
|
},
|
|
564
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ React7.createElement(HugeiconsIcon2, { icon: social.icon, size: 20 })
|
|
565
722
|
))))))));
|
|
566
723
|
};
|
|
567
724
|
|
|
568
725
|
// src/components/MobileNav.tsx
|
|
569
|
-
import
|
|
726
|
+
import React8 from "react";
|
|
570
727
|
import Link4 from "next/link";
|
|
571
728
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
572
729
|
import { HugeiconsIcon as HugeiconsIcon3 } from "@hugeicons/react";
|
|
@@ -576,23 +733,23 @@ var MobileNav = ({ items }) => {
|
|
|
576
733
|
const pathMatches = items.some((item) => {
|
|
577
734
|
return item.href === "/" || item.href === "/app" ? pathname === "/" || pathname === "/app" : pathname === item.href || pathname?.startsWith(`${item.href}/`);
|
|
578
735
|
});
|
|
579
|
-
return /* @__PURE__ */
|
|
736
|
+
return /* @__PURE__ */ React8.createElement("div", { className: "fixed bottom-6 inset-x-0 z-100 flex justify-center pointer-events-none px-3 animate-in slide-in-from-bottom-8 fade-in duration-500 md:hidden" }, /* @__PURE__ */ React8.createElement("nav", { className: "pointer-events-auto w-full max-w-sm bg-white/50 backdrop-blur-xl shadow-[0_8px_30px_rgb(0,0,0,0.08)] rounded-full px-6 py-2.5 flex items-center justify-between" }, items.map((item, index) => {
|
|
580
737
|
const isActive = !pathMatches && index === 0 ? true : item.href === "/" || item.href === "/app" ? pathname === "/" || pathname === "/app" : pathname === item.href || pathname?.startsWith(`${item.href}/`);
|
|
581
|
-
return /* @__PURE__ */
|
|
738
|
+
return /* @__PURE__ */ React8.createElement(
|
|
582
739
|
Link4,
|
|
583
740
|
{
|
|
584
741
|
key: item.label,
|
|
585
742
|
href: item.href,
|
|
586
743
|
className: "flex flex-col items-center justify-center gap-1 min-w-14 transition-transform active:scale-95 outline-none"
|
|
587
744
|
},
|
|
588
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ React8.createElement("div", { className: `transition-colors duration-300 ${isActive ? "text-black" : "text-neutral-400 hover:text-neutral-600"}` }, /* @__PURE__ */ React8.createElement(
|
|
589
746
|
HugeiconsIcon3,
|
|
590
747
|
{
|
|
591
748
|
icon: item.icon,
|
|
592
749
|
size: 20
|
|
593
750
|
}
|
|
594
751
|
)),
|
|
595
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ React8.createElement(
|
|
596
753
|
"span",
|
|
597
754
|
{
|
|
598
755
|
className: `text-[9px] tracking-wide transition-colors duration-300 ${isActive ? "text-black" : "text-neutral-400"}`
|
|
@@ -604,14 +761,14 @@ var MobileNav = ({ items }) => {
|
|
|
604
761
|
};
|
|
605
762
|
|
|
606
763
|
// src/components/UniversalOrganizationPage.tsx
|
|
607
|
-
import React11, { useState as
|
|
764
|
+
import React11, { useState as useState7, useEffect as useEffect4 } from "react";
|
|
608
765
|
import toast2 from "react-hot-toast";
|
|
609
766
|
|
|
610
767
|
// src/components/ManagedToaster.tsx
|
|
611
|
-
import
|
|
768
|
+
import React9 from "react";
|
|
612
769
|
import { Toaster } from "react-hot-toast";
|
|
613
770
|
var ManagedToaster = () => {
|
|
614
|
-
return /* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ React9.createElement(
|
|
615
772
|
Toaster,
|
|
616
773
|
{
|
|
617
774
|
position: "top-right",
|
|
@@ -642,58 +799,8 @@ var ManagedToaster = () => {
|
|
|
642
799
|
);
|
|
643
800
|
};
|
|
644
801
|
|
|
645
|
-
// src/components/TextInput.tsx
|
|
646
|
-
import React9 from "react";
|
|
647
|
-
var TextInput = ({
|
|
648
|
-
label,
|
|
649
|
-
value,
|
|
650
|
-
onChange,
|
|
651
|
-
placeholder,
|
|
652
|
-
maxLength,
|
|
653
|
-
disabled,
|
|
654
|
-
readOnly,
|
|
655
|
-
type = "text",
|
|
656
|
-
onClick
|
|
657
|
-
}) => /* @__PURE__ */ React9.createElement("div", { className: "space-y-2 flex-1 w-full", onClick }, label && /* @__PURE__ */ React9.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, label), /* @__PURE__ */ React9.createElement(
|
|
658
|
-
"input",
|
|
659
|
-
{
|
|
660
|
-
type,
|
|
661
|
-
value,
|
|
662
|
-
onChange: (e) => onChange(e.target.value.substring(0, maxLength || 100)),
|
|
663
|
-
placeholder,
|
|
664
|
-
disabled,
|
|
665
|
-
readOnly,
|
|
666
|
-
autoComplete: "off",
|
|
667
|
-
spellCheck: "false",
|
|
668
|
-
className: `w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black transition-all outline-none focus:border-black disabled:opacity-50 ${readOnly ? "cursor-pointer" : ""}`
|
|
669
|
-
}
|
|
670
|
-
));
|
|
671
|
-
var NumberInput = ({
|
|
672
|
-
label,
|
|
673
|
-
value,
|
|
674
|
-
onChange,
|
|
675
|
-
placeholder,
|
|
676
|
-
maxLength,
|
|
677
|
-
disabled
|
|
678
|
-
}) => /* @__PURE__ */ React9.createElement("div", { className: "space-y-2 flex-1 w-full" }, label && /* @__PURE__ */ React9.createElement("label", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block " }, label), /* @__PURE__ */ React9.createElement(
|
|
679
|
-
"input",
|
|
680
|
-
{
|
|
681
|
-
type: "text",
|
|
682
|
-
value,
|
|
683
|
-
onChange: (e) => {
|
|
684
|
-
const numOnly = e.target.value.replace(/[^0-9]/g, "");
|
|
685
|
-
onChange(numOnly.substring(0, maxLength || 20));
|
|
686
|
-
},
|
|
687
|
-
placeholder,
|
|
688
|
-
disabled,
|
|
689
|
-
autoComplete: "off",
|
|
690
|
-
spellCheck: "false",
|
|
691
|
-
className: "w-full px-2 py-3 text-sm bg-transparent border-b border-neutral-200 text-black transition-all outline-none focus:border-black disabled:opacity-50"
|
|
692
|
-
}
|
|
693
|
-
));
|
|
694
|
-
|
|
695
802
|
// src/components/Banner.tsx
|
|
696
|
-
import React10, { useState as
|
|
803
|
+
import React10, { useState as useState6 } from "react";
|
|
697
804
|
import { HugeiconsIcon as HugeiconsIcon4 } from "@hugeicons/react";
|
|
698
805
|
import {
|
|
699
806
|
Alert02Icon,
|
|
@@ -710,7 +817,7 @@ var Banner = ({
|
|
|
710
817
|
onDismiss,
|
|
711
818
|
action
|
|
712
819
|
}) => {
|
|
713
|
-
const [isVisible, setIsVisible] =
|
|
820
|
+
const [isVisible, setIsVisible] = useState6(true);
|
|
714
821
|
if (!isVisible) return null;
|
|
715
822
|
const handleDismiss = () => {
|
|
716
823
|
setIsVisible(false);
|
|
@@ -759,7 +866,7 @@ import {
|
|
|
759
866
|
ArrowLeft01Icon,
|
|
760
867
|
CircleLock02Icon
|
|
761
868
|
} from "@hugeicons/core-free-icons";
|
|
762
|
-
var
|
|
869
|
+
var InputSpinner3 = () => /* @__PURE__ */ React11.createElement("svg", { className: "animate-spin h-4 w-4 text-neutral-400", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24" }, /* @__PURE__ */ React11.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), /* @__PURE__ */ React11.createElement("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" }));
|
|
763
870
|
var UniversalOrganizationPage = ({
|
|
764
871
|
initialOrgName,
|
|
765
872
|
initialSlug,
|
|
@@ -776,12 +883,12 @@ var UniversalOrganizationPage = ({
|
|
|
776
883
|
if (typeof window !== "undefined") window.history.back();
|
|
777
884
|
});
|
|
778
885
|
const resolvedInitialUsername = initialUsername || initialSlug;
|
|
779
|
-
const [web3Name, setWeb3Name] =
|
|
780
|
-
const [username, setUsername] =
|
|
781
|
-
const [slug, setSlug] =
|
|
782
|
-
const [isCheckingSlug, setIsCheckingSlug] =
|
|
783
|
-
const [slugAvailable, setSlugAvailable] =
|
|
784
|
-
const [isSubmitting, setIsSubmitting] =
|
|
886
|
+
const [web3Name, setWeb3Name] = useState7(initialOrgName);
|
|
887
|
+
const [username, setUsername] = useState7(resolvedInitialUsername);
|
|
888
|
+
const [slug, setSlug] = useState7(initialSlug);
|
|
889
|
+
const [isCheckingSlug, setIsCheckingSlug] = useState7(false);
|
|
890
|
+
const [slugAvailable, setSlugAvailable] = useState7(null);
|
|
891
|
+
const [isSubmitting, setIsSubmitting] = useState7(false);
|
|
785
892
|
useEffect4(() => {
|
|
786
893
|
setWeb3Name(initialOrgName || "");
|
|
787
894
|
setSlug(initialSlug || "");
|
|
@@ -891,7 +998,7 @@ var UniversalOrganizationPage = ({
|
|
|
891
998
|
className: "w-full px-2 py-3 text-sm bg-transparent text-black outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
892
999
|
placeholder: "sovereign-user-handle"
|
|
893
1000
|
}
|
|
894
|
-
), /* @__PURE__ */ React11.createElement("span", { className: "text-neutral-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ React11.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React11.createElement(
|
|
1001
|
+
), /* @__PURE__ */ React11.createElement("span", { className: "text-neutral-400 text-sm py-3 pr-8 shrink-0 whitespace-nowrap" }, slugPrefixUrl), /* @__PURE__ */ React11.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2" }, isCheckingSlug && /* @__PURE__ */ React11.createElement(InputSpinner3, null), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === false && /* @__PURE__ */ React11.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-red-100" }, /* @__PURE__ */ React11.createElement("svg", { className: "w-2 h-2 text-red-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React11.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" }))), !isCheckingSlug && !isReadOnly && slug !== initialSlug && slug.length >= 3 && slugAvailable === true && /* @__PURE__ */ React11.createElement("span", { className: "inline-flex items-center justify-center w-4 h-4 rounded-full bg-green-100" }, /* @__PURE__ */ React11.createElement("svg", { className: "w-2 h-2 text-green-600", viewBox: "0 0 20 20", fill: "currentColor" }, /* @__PURE__ */ React11.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M16.707 5.293a1 1 0 00-1.414 0L8 12.586 4.707 9.293a1 1 0 10-1.414 1.414l4 4a1 1 0 001.414 0l8-8a1 1 0 000-1.414z" })))))), /* @__PURE__ */ React11.createElement("div", { className: "pt-8 mt-2 flex items-center gap-4" }, /* @__PURE__ */ React11.createElement(
|
|
895
1002
|
ThreeDActionButton,
|
|
896
1003
|
{
|
|
897
1004
|
type: "submit",
|
|
@@ -916,7 +1023,7 @@ var UniversalOrganizationPage = ({
|
|
|
916
1023
|
};
|
|
917
1024
|
|
|
918
1025
|
// src/components/UniversalProfileSettings.tsx
|
|
919
|
-
import React12, { useState as
|
|
1026
|
+
import React12, { useState as useState8, useEffect as useEffect5 } from "react";
|
|
920
1027
|
import toast3 from "react-hot-toast";
|
|
921
1028
|
import { HugeiconsIcon as HugeiconsIcon6 } from "@hugeicons/react";
|
|
922
1029
|
import {
|
|
@@ -943,14 +1050,14 @@ var UniversalProfileSettings = ({
|
|
|
943
1050
|
const onBackHandler = onBack ?? (() => {
|
|
944
1051
|
if (typeof window !== "undefined") window.history.back();
|
|
945
1052
|
});
|
|
946
|
-
const [firstName, setFirstName] =
|
|
947
|
-
const [lastName, setLastName] =
|
|
948
|
-
const [isSubmitting, setIsSubmitting] =
|
|
949
|
-
const [isPinModalOpen, setIsPinModalOpen] =
|
|
950
|
-
const [oldPin, setOldPin] =
|
|
951
|
-
const [newPin, setNewPin] =
|
|
952
|
-
const [confirmPin, setConfirmPin] =
|
|
953
|
-
const [isPinSubmitting, setIsPinSubmitting] =
|
|
1053
|
+
const [firstName, setFirstName] = useState8(initialFirstName);
|
|
1054
|
+
const [lastName, setLastName] = useState8(initialLastName);
|
|
1055
|
+
const [isSubmitting, setIsSubmitting] = useState8(false);
|
|
1056
|
+
const [isPinModalOpen, setIsPinModalOpen] = useState8(false);
|
|
1057
|
+
const [oldPin, setOldPin] = useState8("");
|
|
1058
|
+
const [newPin, setNewPin] = useState8("");
|
|
1059
|
+
const [confirmPin, setConfirmPin] = useState8("");
|
|
1060
|
+
const [isPinSubmitting, setIsPinSubmitting] = useState8(false);
|
|
954
1061
|
useEffect5(() => {
|
|
955
1062
|
setFirstName(initialFirstName || "");
|
|
956
1063
|
setLastName(initialLastName || "");
|
|
@@ -1214,7 +1321,7 @@ var UniversalErrorView = ({
|
|
|
1214
1321
|
};
|
|
1215
1322
|
|
|
1216
1323
|
// src/components/UniversalTransactionPage.tsx
|
|
1217
|
-
import React15, { useState as
|
|
1324
|
+
import React15, { useState as useState9, useEffect as useEffect6, useRef as useRef3 } from "react";
|
|
1218
1325
|
import { HugeiconsIcon as HugeiconsIcon9 } from "@hugeicons/react";
|
|
1219
1326
|
import toast4 from "react-hot-toast";
|
|
1220
1327
|
import {
|
|
@@ -1276,12 +1383,12 @@ var UniversalTransactionPage = ({
|
|
|
1276
1383
|
onReportTransaction,
|
|
1277
1384
|
onGenerateReceipt
|
|
1278
1385
|
}) => {
|
|
1279
|
-
const [selectedTransaction, setSelectedTransaction] =
|
|
1280
|
-
const [isGeneratingReceipt, setIsGeneratingReceipt] =
|
|
1281
|
-
const [localSearchQuery, setLocalSearchQuery] =
|
|
1282
|
-
const [isTyping, setIsTyping] =
|
|
1283
|
-
const [isDirectionModalOpen, setIsDirectionModalOpen] =
|
|
1284
|
-
const [isTypeModalOpen, setIsTypeModalOpen] =
|
|
1386
|
+
const [selectedTransaction, setSelectedTransaction] = useState9(null);
|
|
1387
|
+
const [isGeneratingReceipt, setIsGeneratingReceipt] = useState9(false);
|
|
1388
|
+
const [localSearchQuery, setLocalSearchQuery] = useState9(searchQuery);
|
|
1389
|
+
const [isTyping, setIsTyping] = useState9(false);
|
|
1390
|
+
const [isDirectionModalOpen, setIsDirectionModalOpen] = useState9(false);
|
|
1391
|
+
const [isTypeModalOpen, setIsTypeModalOpen] = useState9(false);
|
|
1285
1392
|
const directionDropdownRef = useRef3(null);
|
|
1286
1393
|
const typeDropdownRef = useRef3(null);
|
|
1287
1394
|
useEffect6(() => {
|
|
@@ -1448,7 +1555,7 @@ var UniversalTransactionPage = ({
|
|
|
1448
1555
|
};
|
|
1449
1556
|
|
|
1450
1557
|
// src/components/UniversalHomeView.tsx
|
|
1451
|
-
import React16, { useState as
|
|
1558
|
+
import React16, { useState as useState10, useEffect as useEffect7 } from "react";
|
|
1452
1559
|
import { HugeiconsIcon as HugeiconsIcon10 } from "@hugeicons/react";
|
|
1453
1560
|
import {
|
|
1454
1561
|
ViewOffSlashIcon,
|
|
@@ -1511,11 +1618,11 @@ var UniversalHomeView = ({
|
|
|
1511
1618
|
customContent,
|
|
1512
1619
|
transactionsProps
|
|
1513
1620
|
}) => {
|
|
1514
|
-
const [displayAmount, setDisplayAmount] =
|
|
1515
|
-
const [isBalanceHidden, setIsBalanceHidden] =
|
|
1516
|
-
const [isAvatarLoaded, setIsAvatarLoaded] =
|
|
1517
|
-
const [showNotifDialog, setShowNotifDialog] =
|
|
1518
|
-
const [selectedNotif, setSelectedNotif] =
|
|
1621
|
+
const [displayAmount, setDisplayAmount] = useState10("0.00");
|
|
1622
|
+
const [isBalanceHidden, setIsBalanceHidden] = useState10(false);
|
|
1623
|
+
const [isAvatarLoaded, setIsAvatarLoaded] = useState10(false);
|
|
1624
|
+
const [showNotifDialog, setShowNotifDialog] = useState10(false);
|
|
1625
|
+
const [selectedNotif, setSelectedNotif] = useState10(null);
|
|
1519
1626
|
const fallbackAvatarUrl = `/api/avatar/?name=${encodeURIComponent(fullName || " ")}&background=ffffff&color=000000&size=200&font-size=0.33`;
|
|
1520
1627
|
const finalAvatarSrc = avatarSrc || fallbackAvatarUrl;
|
|
1521
1628
|
const hasUnreadNotifs = notifications.some((n) => !n.isRead);
|
|
@@ -1643,7 +1750,7 @@ var UniversalHomeView = ({
|
|
|
1643
1750
|
};
|
|
1644
1751
|
|
|
1645
1752
|
// src/components/UniversalWalletPage.tsx
|
|
1646
|
-
import React18, { useState as
|
|
1753
|
+
import React18, { useState as useState11 } from "react";
|
|
1647
1754
|
import toast5 from "react-hot-toast";
|
|
1648
1755
|
import { HugeiconsIcon as HugeiconsIcon12 } from "@hugeicons/react";
|
|
1649
1756
|
import {
|
|
@@ -1706,7 +1813,7 @@ var truncateAddress2 = (ref) => {
|
|
|
1706
1813
|
return `${ref.substring(0, 11)}.....${ref.substring(ref.length - 11)}`;
|
|
1707
1814
|
};
|
|
1708
1815
|
var WalletLogo = ({ src, alt, sizeClass = "w-10 h-10" }) => {
|
|
1709
|
-
const [isLoaded, setIsLoaded] =
|
|
1816
|
+
const [isLoaded, setIsLoaded] = useState11(false);
|
|
1710
1817
|
return /* @__PURE__ */ React18.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React18.createElement(HugeiconsIcon12, { icon: Loading03Icon7, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React18.createElement("img", { src, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
1711
1818
|
};
|
|
1712
1819
|
var UniversalWalletPage = ({
|
|
@@ -1729,18 +1836,18 @@ var UniversalWalletPage = ({
|
|
|
1729
1836
|
const onBackHandler = onBack ?? (() => {
|
|
1730
1837
|
if (typeof window !== "undefined") window.history.back();
|
|
1731
1838
|
});
|
|
1732
|
-
const [selectedWallet, setSelectedWallet] =
|
|
1733
|
-
const [localSearchQuery, setLocalSearchQuery] =
|
|
1734
|
-
const [addModalOpen, setAddModalOpen] =
|
|
1735
|
-
const [importModalOpen, setImportModalOpen] =
|
|
1736
|
-
const [flowStep, setFlowStep] =
|
|
1737
|
-
const [generatedPhrase, setGeneratedPhrase] =
|
|
1738
|
-
const [hasBackedUp, setHasBackedUp] =
|
|
1739
|
-
const [verifyWords, setVerifyWords] =
|
|
1740
|
-
const [walletPassword, setWalletPassword] =
|
|
1741
|
-
const [importWords, setImportWords] =
|
|
1742
|
-
const [isProcessing, setIsProcessing] =
|
|
1743
|
-
const [showCopyWarning, setShowCopyWarning] =
|
|
1839
|
+
const [selectedWallet, setSelectedWallet] = useState11(null);
|
|
1840
|
+
const [localSearchQuery, setLocalSearchQuery] = useState11("");
|
|
1841
|
+
const [addModalOpen, setAddModalOpen] = useState11(false);
|
|
1842
|
+
const [importModalOpen, setImportModalOpen] = useState11(false);
|
|
1843
|
+
const [flowStep, setFlowStep] = useState11(1);
|
|
1844
|
+
const [generatedPhrase, setGeneratedPhrase] = useState11("");
|
|
1845
|
+
const [hasBackedUp, setHasBackedUp] = useState11(false);
|
|
1846
|
+
const [verifyWords, setVerifyWords] = useState11([]);
|
|
1847
|
+
const [walletPassword, setWalletPassword] = useState11("");
|
|
1848
|
+
const [importWords, setImportWords] = useState11(Array(24).fill(""));
|
|
1849
|
+
const [isProcessing, setIsProcessing] = useState11(false);
|
|
1850
|
+
const [showCopyWarning, setShowCopyWarning] = useState11(false);
|
|
1744
1851
|
const filteredWallets = wallets.filter((wallet) => {
|
|
1745
1852
|
const q = localSearchQuery.toLowerCase();
|
|
1746
1853
|
return wallet.name.toLowerCase().includes(q) || wallet.currency.toLowerCase().includes(q) || wallet.network.toLowerCase().includes(q);
|
|
@@ -1929,7 +2036,7 @@ var UniversalWalletPage = ({
|
|
|
1929
2036
|
};
|
|
1930
2037
|
|
|
1931
2038
|
// src/components/UniversalCardPage.tsx
|
|
1932
|
-
import React19, { useState as
|
|
2039
|
+
import React19, { useState as useState12, useEffect as useEffect8 } from "react";
|
|
1933
2040
|
import { useRouter } from "next/navigation";
|
|
1934
2041
|
import { HugeiconsIcon as HugeiconsIcon13 } from "@hugeicons/react";
|
|
1935
2042
|
import {
|
|
@@ -1959,13 +2066,13 @@ var UniversalCardPage = ({
|
|
|
1959
2066
|
return 0;
|
|
1960
2067
|
});
|
|
1961
2068
|
}, [cards]);
|
|
1962
|
-
const [activeTabIndex, setActiveTabIndex] =
|
|
2069
|
+
const [activeTabIndex, setActiveTabIndex] = useState12(0);
|
|
1963
2070
|
const activeCard = sortedCards[activeTabIndex];
|
|
1964
|
-
const [isBgLoaded, setIsBgLoaded] =
|
|
1965
|
-
const [isFreezing, setIsFreezing] =
|
|
1966
|
-
const [isOverlayActionLoading, setIsOverlayActionLoading] =
|
|
1967
|
-
const [showDeleteDialog, setShowDeleteDialog] =
|
|
1968
|
-
const [isDeleting, setIsDeleting] =
|
|
2071
|
+
const [isBgLoaded, setIsBgLoaded] = useState12(false);
|
|
2072
|
+
const [isFreezing, setIsFreezing] = useState12(false);
|
|
2073
|
+
const [isOverlayActionLoading, setIsOverlayActionLoading] = useState12(false);
|
|
2074
|
+
const [showDeleteDialog, setShowDeleteDialog] = useState12(false);
|
|
2075
|
+
const [isDeleting, setIsDeleting] = useState12(false);
|
|
1969
2076
|
useEffect8(() => {
|
|
1970
2077
|
setIsBgLoaded(false);
|
|
1971
2078
|
if (!activeCard?.cardBgSrc) return;
|
|
@@ -2190,7 +2297,7 @@ var MenuRow = ({
|
|
|
2190
2297
|
);
|
|
2191
2298
|
|
|
2192
2299
|
// src/components/UniversalProfilePage.tsx
|
|
2193
|
-
import React20, { useState as
|
|
2300
|
+
import React20, { useState as useState13 } from "react";
|
|
2194
2301
|
import { HugeiconsIcon as HugeiconsIcon14 } from "@hugeicons/react";
|
|
2195
2302
|
import {
|
|
2196
2303
|
UserIcon,
|
|
@@ -2219,11 +2326,11 @@ var UniversalProfilePage = ({
|
|
|
2219
2326
|
onLogoutTap,
|
|
2220
2327
|
onDeleteTap
|
|
2221
2328
|
}) => {
|
|
2222
|
-
const [isAvatarLoaded, setIsAvatarLoaded] =
|
|
2223
|
-
const [showLogoutDialog, setShowLogoutDialog] =
|
|
2224
|
-
const [isLoggingOut, setIsLoggingOut] =
|
|
2225
|
-
const [showDeleteDialog, setShowDeleteDialog] =
|
|
2226
|
-
const [isDeleting, setIsDeleting] =
|
|
2329
|
+
const [isAvatarLoaded, setIsAvatarLoaded] = useState13(false);
|
|
2330
|
+
const [showLogoutDialog, setShowLogoutDialog] = useState13(false);
|
|
2331
|
+
const [isLoggingOut, setIsLoggingOut] = useState13(false);
|
|
2332
|
+
const [showDeleteDialog, setShowDeleteDialog] = useState13(false);
|
|
2333
|
+
const [isDeleting, setIsDeleting] = useState13(false);
|
|
2227
2334
|
const handleConfirmLogout = async () => {
|
|
2228
2335
|
setIsLoggingOut(true);
|
|
2229
2336
|
try {
|
|
@@ -2374,7 +2481,7 @@ var MenuRow2 = ({ icon, title, subtitle, onClick, iconColor = "text-black", titl
|
|
|
2374
2481
|
);
|
|
2375
2482
|
|
|
2376
2483
|
// src/components/UniversalSidebar.tsx
|
|
2377
|
-
import React21, { useState as
|
|
2484
|
+
import React21, { useState as useState14 } from "react";
|
|
2378
2485
|
import Link5 from "next/link";
|
|
2379
2486
|
import { HugeiconsIcon as HugeiconsIcon15 } from "@hugeicons/react";
|
|
2380
2487
|
import {
|
|
@@ -2387,8 +2494,8 @@ var UniversalSidebar = ({
|
|
|
2387
2494
|
showLogoutAction = false,
|
|
2388
2495
|
onLogout
|
|
2389
2496
|
}) => {
|
|
2390
|
-
const [showLogoutDialog, setShowLogoutDialog] =
|
|
2391
|
-
const [isLoggingOut, setIsLoggingOut] =
|
|
2497
|
+
const [showLogoutDialog, setShowLogoutDialog] = useState14(false);
|
|
2498
|
+
const [isLoggingOut, setIsLoggingOut] = useState14(false);
|
|
2392
2499
|
const hasActiveMatch = navItems.some(
|
|
2393
2500
|
(item) => item.path === "/" || item.path === "/app" ? currentPath === "/" || currentPath === "/app" : currentPath === item.path || currentPath?.startsWith(`${item.path}/`)
|
|
2394
2501
|
);
|
|
@@ -2446,16 +2553,16 @@ var UniversalSidebar = ({
|
|
|
2446
2553
|
};
|
|
2447
2554
|
|
|
2448
2555
|
// src/components/HeroSection.tsx
|
|
2449
|
-
import React23, { useState as
|
|
2556
|
+
import React23, { useState as useState16, useEffect as useEffect9, useRef as useRef4 } from "react";
|
|
2450
2557
|
import Link6 from "next/link";
|
|
2451
2558
|
import Image3 from "next/image";
|
|
2452
2559
|
|
|
2453
2560
|
// src/components/WaitlistDialog.tsx
|
|
2454
|
-
import React22, { useState as
|
|
2561
|
+
import React22, { useState as useState15 } from "react";
|
|
2455
2562
|
import { toast as toast6 } from "react-hot-toast";
|
|
2456
2563
|
var WaitlistDialog = ({ isOpen, onClose }) => {
|
|
2457
|
-
const [email, setEmail] =
|
|
2458
|
-
const [isLoading, setIsLoading] =
|
|
2564
|
+
const [email, setEmail] = useState15("");
|
|
2565
|
+
const [isLoading, setIsLoading] = useState15(false);
|
|
2459
2566
|
if (!isOpen) return null;
|
|
2460
2567
|
const handleSubmit = async (e) => {
|
|
2461
2568
|
e.preventDefault();
|
|
@@ -2558,8 +2665,8 @@ var HeroSection = ({
|
|
|
2558
2665
|
bgImageSrc,
|
|
2559
2666
|
isWaitlist = false
|
|
2560
2667
|
}) => {
|
|
2561
|
-
const [isAnimating, setIsAnimating] =
|
|
2562
|
-
const [isWaitlistOpen, setIsWaitlistOpen] =
|
|
2668
|
+
const [isAnimating, setIsAnimating] = useState16(false);
|
|
2669
|
+
const [isWaitlistOpen, setIsWaitlistOpen] = useState16(false);
|
|
2563
2670
|
const titleRef = useRef4(null);
|
|
2564
2671
|
useEffect9(() => {
|
|
2565
2672
|
const observer = new IntersectionObserver(
|
|
@@ -2654,10 +2761,10 @@ var HeroSection = ({
|
|
|
2654
2761
|
};
|
|
2655
2762
|
|
|
2656
2763
|
// src/components/AppBento2.tsx
|
|
2657
|
-
import React24, { useState as
|
|
2764
|
+
import React24, { useState as useState17, useEffect as useEffect10, useRef as useRef5 } from "react";
|
|
2658
2765
|
import { HugeiconsIcon as HugeiconsIcon16 } from "@hugeicons/react";
|
|
2659
2766
|
var AppBento2 = ({ tagline, headline, features }) => {
|
|
2660
|
-
const [isAnimating, setIsAnimating] =
|
|
2767
|
+
const [isAnimating, setIsAnimating] = useState17(false);
|
|
2661
2768
|
const titleRef = useRef5(null);
|
|
2662
2769
|
useEffect10(() => {
|
|
2663
2770
|
const observer = new IntersectionObserver(
|
|
@@ -2729,7 +2836,7 @@ var AppBento2 = ({ tagline, headline, features }) => {
|
|
|
2729
2836
|
};
|
|
2730
2837
|
|
|
2731
2838
|
// src/components/UniversalSecurityPage.tsx
|
|
2732
|
-
import React25, { useState as
|
|
2839
|
+
import React25, { useState as useState18, useRef as useRef6 } from "react";
|
|
2733
2840
|
import toast7 from "react-hot-toast";
|
|
2734
2841
|
import { HugeiconsIcon as HugeiconsIcon17 } from "@hugeicons/react";
|
|
2735
2842
|
import {
|
|
@@ -2756,14 +2863,14 @@ var UniversalSecurityPage = ({
|
|
|
2756
2863
|
onVerifyAndEnablePasskey,
|
|
2757
2864
|
onDisablePasskey
|
|
2758
2865
|
}) => {
|
|
2759
|
-
const [show2FASetupModal, setShow2FASetupModal] =
|
|
2760
|
-
const [show2FADisableModal, setShow2FADisableModal] =
|
|
2761
|
-
const [showPasskeyModal, setShowPasskeyModal] =
|
|
2762
|
-
const [twoFaSecret, setTwoFaSecret] =
|
|
2763
|
-
const [twoFaQr, setTwoFaQr] =
|
|
2764
|
-
const [isFetchingSetup, setIsFetchingSetup] =
|
|
2765
|
-
const [otp, setOtp] =
|
|
2766
|
-
const [isSubmitting, setIsSubmitting] =
|
|
2866
|
+
const [show2FASetupModal, setShow2FASetupModal] = useState18(false);
|
|
2867
|
+
const [show2FADisableModal, setShow2FADisableModal] = useState18(false);
|
|
2868
|
+
const [showPasskeyModal, setShowPasskeyModal] = useState18(false);
|
|
2869
|
+
const [twoFaSecret, setTwoFaSecret] = useState18("");
|
|
2870
|
+
const [twoFaQr, setTwoFaQr] = useState18("");
|
|
2871
|
+
const [isFetchingSetup, setIsFetchingSetup] = useState18(false);
|
|
2872
|
+
const [otp, setOtp] = useState18(Array(6).fill(""));
|
|
2873
|
+
const [isSubmitting, setIsSubmitting] = useState18(false);
|
|
2767
2874
|
const inputRefs = useRef6([]);
|
|
2768
2875
|
const resetOtp = () => {
|
|
2769
2876
|
setOtp(Array(6).fill(""));
|
|
@@ -3050,13 +3157,13 @@ var MenuRow3 = ({
|
|
|
3050
3157
|
);
|
|
3051
3158
|
|
|
3052
3159
|
// src/components/FeatureScroll.tsx
|
|
3053
|
-
import React26, { useRef as useRef7, useState as
|
|
3160
|
+
import React26, { useRef as useRef7, useState as useState19, useEffect as useEffect11 } from "react";
|
|
3054
3161
|
import Image4 from "next/image";
|
|
3055
3162
|
import { HugeiconsIcon as HugeiconsIcon18 } from "@hugeicons/react";
|
|
3056
3163
|
import { ArrowLeft01Icon as ArrowLeft01Icon7, ArrowRight01Icon as ArrowRight01Icon6, Loading03Icon as Loading03Icon11 } from "@hugeicons/core-free-icons";
|
|
3057
3164
|
var FeatureCard = ({ feature, bgImage }) => {
|
|
3058
|
-
const [isBgLoading, setIsBgLoading] =
|
|
3059
|
-
const [isFgLoading, setIsFgLoading] =
|
|
3165
|
+
const [isBgLoading, setIsBgLoading] = useState19(true);
|
|
3166
|
+
const [isFgLoading, setIsFgLoading] = useState19(!!feature.image);
|
|
3060
3167
|
return /* @__PURE__ */ React26.createElement("div", { className: "flex flex-col shrink-0 w-[90vw] sm:w-150 snap-center md:snap-start group cursor-grab active:cursor-grabbing" }, /* @__PURE__ */ React26.createElement("div", { className: "relative w-full aspect-16/10 bg-neutral-100 rounded-2xl overflow-hidden mb-6 flex items-center justify-center" }, /* @__PURE__ */ React26.createElement(
|
|
3061
3168
|
Image4,
|
|
3062
3169
|
{
|
|
@@ -3095,8 +3202,8 @@ var FeatureCard = ({ feature, bgImage }) => {
|
|
|
3095
3202
|
};
|
|
3096
3203
|
var FeatureScroll = ({ tagline, headline, features }) => {
|
|
3097
3204
|
const scrollRef = useRef7(null);
|
|
3098
|
-
const [canScrollLeft, setCanScrollLeft] =
|
|
3099
|
-
const [canScrollRight, setCanScrollRight] =
|
|
3205
|
+
const [canScrollLeft, setCanScrollLeft] = useState19(false);
|
|
3206
|
+
const [canScrollRight, setCanScrollRight] = useState19(true);
|
|
3100
3207
|
const checkScroll = () => {
|
|
3101
3208
|
if (scrollRef.current) {
|
|
3102
3209
|
const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;
|
|
@@ -3185,7 +3292,7 @@ var PlatformFeatures = ({
|
|
|
3185
3292
|
};
|
|
3186
3293
|
|
|
3187
3294
|
// src/components/ManagedDocument.tsx
|
|
3188
|
-
import React28, { useState as
|
|
3295
|
+
import React28, { useState as useState20, useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
3189
3296
|
var ManagedDocument = ({
|
|
3190
3297
|
tagline,
|
|
3191
3298
|
title,
|
|
@@ -3193,7 +3300,7 @@ var ManagedDocument = ({
|
|
|
3193
3300
|
contactText,
|
|
3194
3301
|
contactEmail
|
|
3195
3302
|
}) => {
|
|
3196
|
-
const [isAnimating, setIsAnimating] =
|
|
3303
|
+
const [isAnimating, setIsAnimating] = useState20(false);
|
|
3197
3304
|
const titleRef = useRef8(null);
|
|
3198
3305
|
useEffect12(() => {
|
|
3199
3306
|
const observer = new IntersectionObserver(
|
|
@@ -3235,10 +3342,10 @@ var ManagedDocument = ({
|
|
|
3235
3342
|
};
|
|
3236
3343
|
|
|
3237
3344
|
// src/components/ManagedContactBlock.tsx
|
|
3238
|
-
import React29, { useState as
|
|
3345
|
+
import React29, { useState as useState21, useEffect as useEffect13 } from "react";
|
|
3239
3346
|
import { HugeiconsIcon as HugeiconsIcon20 } from "@hugeicons/react";
|
|
3240
3347
|
var SecureEmail = ({ user, domain, className }) => {
|
|
3241
|
-
const [isMounted, setIsMounted] =
|
|
3348
|
+
const [isMounted, setIsMounted] = useState21(false);
|
|
3242
3349
|
useEffect13(() => {
|
|
3243
3350
|
setIsMounted(true);
|
|
3244
3351
|
}, []);
|
|
@@ -3300,7 +3407,7 @@ var ManagedContactBlock = ({
|
|
|
3300
3407
|
};
|
|
3301
3408
|
|
|
3302
3409
|
// src/components/ManagedPricingBlock.tsx
|
|
3303
|
-
import React30, { useState as
|
|
3410
|
+
import React30, { useState as useState22, useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
3304
3411
|
import Link7 from "next/link";
|
|
3305
3412
|
import Image5 from "next/image";
|
|
3306
3413
|
var CheckIcon = ({ className = "" }) => /* @__PURE__ */ React30.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React30.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React30.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
@@ -3311,8 +3418,8 @@ var ManagedPricingBlock = ({
|
|
|
3311
3418
|
plans = [],
|
|
3312
3419
|
tabs
|
|
3313
3420
|
}) => {
|
|
3314
|
-
const [isAnimating, setIsAnimating] =
|
|
3315
|
-
const [activeTabIndex, setActiveTabIndex] =
|
|
3421
|
+
const [isAnimating, setIsAnimating] = useState22(false);
|
|
3422
|
+
const [activeTabIndex, setActiveTabIndex] = useState22(0);
|
|
3316
3423
|
const titleRef = useRef9(null);
|
|
3317
3424
|
useEffect14(() => {
|
|
3318
3425
|
const observer = new IntersectionObserver(
|
|
@@ -3620,7 +3727,7 @@ var PortfolioHero = ({
|
|
|
3620
3727
|
};
|
|
3621
3728
|
|
|
3622
3729
|
// src/components/GifFeatureCard.tsx
|
|
3623
|
-
import React35, { useState as
|
|
3730
|
+
import React35, { useState as useState23 } from "react";
|
|
3624
3731
|
import Image9 from "next/image";
|
|
3625
3732
|
import { HugeiconsIcon as HugeiconsIcon23 } from "@hugeicons/react";
|
|
3626
3733
|
import { Loading03Icon as Loading03Icon12 } from "@hugeicons/core-free-icons";
|
|
@@ -3631,7 +3738,7 @@ var GifFeatureCard = ({
|
|
|
3631
3738
|
alt = "Feature animation",
|
|
3632
3739
|
className = "aspect-video"
|
|
3633
3740
|
}) => {
|
|
3634
|
-
const [isLoading, setIsLoading] =
|
|
3741
|
+
const [isLoading, setIsLoading] = useState23(true);
|
|
3635
3742
|
return /* @__PURE__ */ React35.createElement("div", { className: `relative w-full bg-black overflow-hidden shadow-2xl ${className}` }, isLoading && /* @__PURE__ */ React35.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-black" }, /* @__PURE__ */ React35.createElement(
|
|
3636
3743
|
HugeiconsIcon23,
|
|
3637
3744
|
{
|
|
@@ -3664,7 +3771,7 @@ var GifFeatureCard = ({
|
|
|
3664
3771
|
};
|
|
3665
3772
|
|
|
3666
3773
|
// src/components/MedicalFeatureStatsBlock.tsx
|
|
3667
|
-
import React36, { useState as
|
|
3774
|
+
import React36, { useState as useState24, useEffect as useEffect16, useRef as useRef11 } from "react";
|
|
3668
3775
|
import Image10 from "next/image";
|
|
3669
3776
|
var MedicalFeatureStatsBlock = ({
|
|
3670
3777
|
bottomHeadline,
|
|
@@ -3673,7 +3780,7 @@ var MedicalFeatureStatsBlock = ({
|
|
|
3673
3780
|
trustText,
|
|
3674
3781
|
stats
|
|
3675
3782
|
}) => {
|
|
3676
|
-
const [isAnimating, setIsAnimating] =
|
|
3783
|
+
const [isAnimating, setIsAnimating] = useState24(false);
|
|
3677
3784
|
const titleRef = useRef11(null);
|
|
3678
3785
|
useEffect16(() => {
|
|
3679
3786
|
const observer = new IntersectionObserver(
|
|
@@ -3714,12 +3821,12 @@ var MedicalFeatureStatsBlock = ({
|
|
|
3714
3821
|
};
|
|
3715
3822
|
|
|
3716
3823
|
// src/components/ConsultantShowcase.tsx
|
|
3717
|
-
import React37, { useState as
|
|
3824
|
+
import React37, { useState as useState25 } from "react";
|
|
3718
3825
|
import Image11 from "next/image";
|
|
3719
3826
|
import { HugeiconsIcon as HugeiconsIcon24 } from "@hugeicons/react";
|
|
3720
3827
|
import { Loading03Icon as Loading03Icon13 } from "@hugeicons/core-free-icons";
|
|
3721
3828
|
var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
3722
|
-
const [isLoading, setIsLoading] =
|
|
3829
|
+
const [isLoading, setIsLoading] = useState25(true);
|
|
3723
3830
|
return /* @__PURE__ */ React37.createElement("div", { className: `absolute inset-0 bg-neutral-800 ${className}` }, isLoading && /* @__PURE__ */ React37.createElement("div", { className: "absolute inset-0 flex items-center justify-center z-20 bg-neutral-800/50 backdrop-blur-md transition-opacity duration-300" }, /* @__PURE__ */ React37.createElement(HugeiconsIcon24, { icon: Loading03Icon13, size: 24, className: "animate-spin text-white/50" })), /* @__PURE__ */ React37.createElement(
|
|
3724
3831
|
Image11,
|
|
3725
3832
|
{
|
|
@@ -3739,9 +3846,9 @@ var ImageWithLoader = ({ src, alt, className, sizes, priority = false }) => {
|
|
|
3739
3846
|
var ConsultantShowcase = ({
|
|
3740
3847
|
profiles
|
|
3741
3848
|
}) => {
|
|
3742
|
-
const [currentIndex, setCurrentIndex] =
|
|
3743
|
-
const [touchStart, setTouchStart] =
|
|
3744
|
-
const [touchEnd, setTouchEnd] =
|
|
3849
|
+
const [currentIndex, setCurrentIndex] = useState25(0);
|
|
3850
|
+
const [touchStart, setTouchStart] = useState25(null);
|
|
3851
|
+
const [touchEnd, setTouchEnd] = useState25(null);
|
|
3745
3852
|
const nextSlide = () => {
|
|
3746
3853
|
setCurrentIndex((prev) => prev === profiles.length - 1 ? 0 : prev + 1);
|
|
3747
3854
|
};
|
|
@@ -3809,7 +3916,7 @@ var ConsultantShowcase = ({
|
|
|
3809
3916
|
};
|
|
3810
3917
|
|
|
3811
3918
|
// src/components/ContentGridBlock.tsx
|
|
3812
|
-
import React38, { useState as
|
|
3919
|
+
import React38, { useState as useState26 } from "react";
|
|
3813
3920
|
import Image12 from "next/image";
|
|
3814
3921
|
import { HugeiconsIcon as HugeiconsIcon25 } from "@hugeicons/react";
|
|
3815
3922
|
import { Loading03Icon as Loading03Icon14 } from "@hugeicons/core-free-icons";
|
|
@@ -3982,7 +4089,7 @@ var UniversalVerificationPage = ({
|
|
|
3982
4089
|
};
|
|
3983
4090
|
|
|
3984
4091
|
// src/components/UniversalRewardPage.tsx
|
|
3985
|
-
import React41, { useState as
|
|
4092
|
+
import React41, { useState as useState27 } from "react";
|
|
3986
4093
|
import axios from "axios";
|
|
3987
4094
|
import toast8 from "react-hot-toast";
|
|
3988
4095
|
import Confetti from "react-confetti";
|
|
@@ -3999,7 +4106,7 @@ var formatWeb3Name = (name) => {
|
|
|
3999
4106
|
};
|
|
4000
4107
|
var PageSpinner4 = () => /* @__PURE__ */ React41.createElement("div", { className: "flex justify-center items-center py-12 w-full" }, /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: Loading03Icon16, size: 32, className: "animate-spin mb-4 text-black" }));
|
|
4001
4108
|
var AvatarLogo = ({ src, alt, name, sizeClass = "w-12 h-12" }) => {
|
|
4002
|
-
const [isLoaded, setIsLoaded] =
|
|
4109
|
+
const [isLoaded, setIsLoaded] = useState27(false);
|
|
4003
4110
|
const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=ffffff&color=000000&size=200&font-size=0.33`;
|
|
4004
4111
|
const finalSrc = src || fallbackUrl;
|
|
4005
4112
|
return /* @__PURE__ */ React41.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-[3px] border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React41.createElement(HugeiconsIcon27, { icon: Loading03Icon16, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React41.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
@@ -4017,11 +4124,11 @@ var UniversalRewardPage = ({
|
|
|
4017
4124
|
const onBackHandler = onBack ?? (() => {
|
|
4018
4125
|
if (typeof window !== "undefined") window.history.back();
|
|
4019
4126
|
});
|
|
4020
|
-
const [activeTabIndex, setActiveTabIndex] =
|
|
4127
|
+
const [activeTabIndex, setActiveTabIndex] = useState27(1);
|
|
4021
4128
|
const tabs = [{ label: "Today" }, { label: "Week" }, { label: "Month" }];
|
|
4022
|
-
const [selectedReward, setSelectedReward] =
|
|
4023
|
-
const [isClaiming, setIsClaiming] =
|
|
4024
|
-
const [showConfetti, setShowConfetti] =
|
|
4129
|
+
const [selectedReward, setSelectedReward] = useState27(null);
|
|
4130
|
+
const [isClaiming, setIsClaiming] = useState27(false);
|
|
4131
|
+
const [showConfetti, setShowConfetti] = useState27(false);
|
|
4025
4132
|
const getActiveLeaderboard = () => {
|
|
4026
4133
|
if (activeTabIndex === 0) return leaderboardToday || [];
|
|
4027
4134
|
if (activeTabIndex === 1) return leaderboardWeek || [];
|
|
@@ -4096,7 +4203,7 @@ var UniversalRewardPage = ({
|
|
|
4096
4203
|
};
|
|
4097
4204
|
|
|
4098
4205
|
// src/components/UniversalReferralPage.tsx
|
|
4099
|
-
import React42, { useState as
|
|
4206
|
+
import React42, { useState as useState28 } from "react";
|
|
4100
4207
|
import toast9 from "react-hot-toast";
|
|
4101
4208
|
import { HugeiconsIcon as HugeiconsIcon28 } from "@hugeicons/react";
|
|
4102
4209
|
import {
|
|
@@ -4136,7 +4243,7 @@ var UniversalReferralPage = ({
|
|
|
4136
4243
|
}
|
|
4137
4244
|
};
|
|
4138
4245
|
const AvatarLogo2 = ({ src, alt, name, sizeClass = "w-10 h-10" }) => {
|
|
4139
|
-
const [isLoaded, setIsLoaded] =
|
|
4246
|
+
const [isLoaded, setIsLoaded] = useState28(false);
|
|
4140
4247
|
const fallbackUrl = `/api/avatar/?name=${encodeURIComponent(name || " ")}&background=e0e0e0&color=000000&size=200&font-size=0.33`;
|
|
4141
4248
|
const finalSrc = src || fallbackUrl;
|
|
4142
4249
|
return /* @__PURE__ */ React42.createElement("div", { className: `relative shrink-0 rounded-full bg-neutral-100 flex items-center justify-center overflow-hidden border-2 border-white ${sizeClass}` }, !isLoaded && /* @__PURE__ */ React42.createElement(HugeiconsIcon28, { icon: Loading03Icon17, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ React42.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
|
|
@@ -4184,7 +4291,7 @@ var UniversalReferralPage = ({
|
|
|
4184
4291
|
};
|
|
4185
4292
|
|
|
4186
4293
|
// src/components/UniversalCardActionPage.tsx
|
|
4187
|
-
import React43, { useState as
|
|
4294
|
+
import React43, { useState as useState29 } from "react";
|
|
4188
4295
|
import Confetti2 from "react-confetti";
|
|
4189
4296
|
import { useWindowSize as useWindowSize2 } from "react-use";
|
|
4190
4297
|
import { HugeiconsIcon as HugeiconsIcon29 } from "@hugeicons/react";
|
|
@@ -4235,10 +4342,10 @@ var UniversalCardActionPage = ({
|
|
|
4235
4342
|
if (typeof window !== "undefined") window.history.back();
|
|
4236
4343
|
});
|
|
4237
4344
|
const { width, height } = useWindowSize2();
|
|
4238
|
-
const [selectedTier, setSelectedTier] =
|
|
4239
|
-
const [intendedAction, setIntendedAction] =
|
|
4240
|
-
const [isProcessing, setIsProcessing] =
|
|
4241
|
-
const [showConfetti, setShowConfetti] =
|
|
4345
|
+
const [selectedTier, setSelectedTier] = useState29(null);
|
|
4346
|
+
const [intendedAction, setIntendedAction] = useState29(null);
|
|
4347
|
+
const [isProcessing, setIsProcessing] = useState29(false);
|
|
4348
|
+
const [showConfetti, setShowConfetti] = useState29(false);
|
|
4242
4349
|
const availableTiers = tiers.filter((t) => t.isAvailable || t.acceptPreorder || t.acceptWaitlist);
|
|
4243
4350
|
const handleTierClick = (tier, explicitAction) => {
|
|
4244
4351
|
setSelectedTier(tier);
|
|
@@ -4378,7 +4485,7 @@ var UniversalCardActionPage = ({
|
|
|
4378
4485
|
};
|
|
4379
4486
|
|
|
4380
4487
|
// src/components/PinDialerBottomSheet.tsx
|
|
4381
|
-
import React44, { useState as
|
|
4488
|
+
import React44, { useState as useState30, useEffect as useEffect17 } from "react";
|
|
4382
4489
|
import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
|
|
4383
4490
|
import { CancelCircleIcon as CancelCircleIcon7 } from "@hugeicons/core-free-icons";
|
|
4384
4491
|
var PinDialerBottomSheet = ({
|
|
@@ -4388,7 +4495,7 @@ var PinDialerBottomSheet = ({
|
|
|
4388
4495
|
onClose,
|
|
4389
4496
|
onComplete
|
|
4390
4497
|
}) => {
|
|
4391
|
-
const [pin, setPin] =
|
|
4498
|
+
const [pin, setPin] = useState30("");
|
|
4392
4499
|
useEffect17(() => {
|
|
4393
4500
|
setPin("");
|
|
4394
4501
|
}, [isOpen]);
|