@retinalabsllc/zairusjs 15.0.90 → 15.0.95

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.js CHANGED
@@ -1099,14 +1099,14 @@ var import_core_free_icons4 = require("@hugeicons/core-free-icons");
1099
1099
  var UniversalProfileSettings = ({
1100
1100
  initialFirstName,
1101
1101
  initialLastName,
1102
- email,
1102
+ phoneNumber,
1103
1103
  accountStatus = "GOOD",
1104
1104
  memberSince,
1105
1105
  isReadOnly = false,
1106
1106
  bannerProps,
1107
- hasPin = false,
1108
- isPinLoading = false,
1109
- onSavePin,
1107
+ hasPasscode = false,
1108
+ isPasscodeLoading = false,
1109
+ onSavePasscode,
1110
1110
  onSaveProfile,
1111
1111
  onBack
1112
1112
  }) => {
@@ -1116,11 +1116,11 @@ var UniversalProfileSettings = ({
1116
1116
  const [firstName, setFirstName] = (0, import_react17.useState)(initialFirstName);
1117
1117
  const [lastName, setLastName] = (0, import_react17.useState)(initialLastName);
1118
1118
  const [isSubmitting, setIsSubmitting] = (0, import_react17.useState)(false);
1119
- const [isPinModalOpen, setIsPinModalOpen] = (0, import_react17.useState)(false);
1120
- const [oldPin, setOldPin] = (0, import_react17.useState)("");
1121
- const [newPin, setNewPin] = (0, import_react17.useState)("");
1122
- const [confirmPin, setConfirmPin] = (0, import_react17.useState)("");
1123
- const [isPinSubmitting, setIsPinSubmitting] = (0, import_react17.useState)(false);
1119
+ const [isPasscodeModalOpen, setIsPasscodeModalOpen] = (0, import_react17.useState)(false);
1120
+ const [oldPasscode, setOldPasscode] = (0, import_react17.useState)("");
1121
+ const [newPasscode, setNewPasscode] = (0, import_react17.useState)("");
1122
+ const [confirmPasscode, setConfirmPasscode] = (0, import_react17.useState)("");
1123
+ const [isPasscodeSubmitting, setIsPasscodeSubmitting] = (0, import_react17.useState)(false);
1124
1124
  (0, import_react17.useEffect)(() => {
1125
1125
  setFirstName(initialFirstName || "");
1126
1126
  setLastName(initialLastName || "");
@@ -1149,40 +1149,40 @@ var UniversalProfileSettings = ({
1149
1149
  setIsSubmitting(false);
1150
1150
  }
1151
1151
  };
1152
- const closePinModal = () => {
1153
- if (isPinSubmitting) return;
1154
- setIsPinModalOpen(false);
1155
- setOldPin("");
1156
- setNewPin("");
1157
- setConfirmPin("");
1152
+ const closePasscodeModal = () => {
1153
+ if (isPasscodeSubmitting) return;
1154
+ setIsPasscodeModalOpen(false);
1155
+ setOldPasscode("");
1156
+ setNewPasscode("");
1157
+ setConfirmPasscode("");
1158
1158
  };
1159
- const handlePinInput = (val, setter) => {
1160
- setter(val.replace(/\D/g, "").substring(0, 4));
1159
+ const handlePasscodeInput = (val, setter) => {
1160
+ setter(val.replace(/\D/g, "").substring(0, 6));
1161
1161
  };
1162
- const handlePinSubmit = async (e) => {
1162
+ const handlePasscodeSubmit = async (e) => {
1163
1163
  e.preventDefault();
1164
- if (!onSavePin) return;
1165
- if (hasPin && oldPin.length !== 4) return import_react_hot_toast4.default.error("Old PIN must be exactly 4-digits.");
1166
- if (newPin.length !== 4) return import_react_hot_toast4.default.error("New PIN must be exactly 4-digits.");
1167
- if (newPin !== confirmPin) return import_react_hot_toast4.default.error("New PINs do not match.");
1168
- setIsPinSubmitting(true);
1164
+ if (!onSavePasscode) return;
1165
+ if (hasPasscode && oldPasscode.length !== 6) return import_react_hot_toast4.default.error("Old Passcode must be exactly 6-digits.");
1166
+ if (newPasscode.length !== 6) return import_react_hot_toast4.default.error("New Passcode must be exactly 6-digits.");
1167
+ if (newPasscode !== confirmPasscode) return import_react_hot_toast4.default.error("New Passcodes do not match.");
1168
+ setIsPasscodeSubmitting(true);
1169
1169
  try {
1170
- const action = hasPin ? "change_pin" : "create_pin";
1171
- const res = await onSavePin({
1170
+ const action = hasPasscode ? "change_passcode" : "create_passcode";
1171
+ const res = await onSavePasscode({
1172
1172
  action,
1173
- oldPin: hasPin ? oldPin : void 0,
1174
- newPin
1173
+ oldPasscode: hasPasscode ? oldPasscode : void 0,
1174
+ newPasscode
1175
1175
  });
1176
1176
  if (res.success) {
1177
- import_react_hot_toast4.default.success(res.message || "PIN updated successfully.");
1178
- closePinModal();
1177
+ import_react_hot_toast4.default.success(res.message || "Passcode updated successfully.");
1178
+ closePasscodeModal();
1179
1179
  } else {
1180
- import_react_hot_toast4.default.error(res.error || "Failed to update PIN.");
1180
+ import_react_hot_toast4.default.error(res.error || "Failed to update Passcode.");
1181
1181
  }
1182
1182
  } catch (error) {
1183
1183
  import_react_hot_toast4.default.error("Uh oh! Something went wrong.");
1184
1184
  } finally {
1185
- setIsPinSubmitting(false);
1185
+ setIsPasscodeSubmitting(false);
1186
1186
  }
1187
1187
  };
1188
1188
  const hasChanges = firstName !== initialFirstName || lastName !== initialLastName;
@@ -1195,7 +1195,7 @@ var UniversalProfileSettings = ({
1195
1195
  },
1196
1196
  /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.ArrowLeft01Icon, size: 16 }),
1197
1197
  " Back"
1198
- )), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col max-w-3xl w-full mx-auto rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react17.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("h1", { className: "text-black text-xl mb-1 truncate tracking-tight" }, "Personal Settings"), /* @__PURE__ */ import_react17.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your personal account profile.")), isReadOnly && /* @__PURE__ */ import_react17.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.CircleLock02Icon, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ import_react17.default.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ import_react17.default.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ import_react17.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react17.default.createElement(
1198
+ )), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col max-w-3xl w-full mx-auto rounded-2xl p-6 bg-white gap-8 animate-in fade-in duration-300" }, /* @__PURE__ */ import_react17.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-start justify-between gap-3 sm:gap-4" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("h1", { className: "text-black text-xl mb-1 truncate tracking-tight" }, "Personal Settings"), /* @__PURE__ */ import_react17.default.createElement("p", { className: "text-xs text-neutral-500 truncate" }, "Manage your personal account profile.")), isReadOnly && /* @__PURE__ */ import_react17.default.createElement("span", { className: "p-2 w-9 h-9 bg-neutral-100 text-neutral-400 rounded-full shrink-0" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.CircleLock02Icon, size: 18, className: "text-current" }))), bannerProps && /* @__PURE__ */ import_react17.default.createElement(Banner, { ...bannerProps }), /* @__PURE__ */ import_react17.default.createElement("div", { className: "w-full max-w-5xl" }, /* @__PURE__ */ import_react17.default.createElement("form", { className: "flex flex-col gap-8", onSubmit: handleSave, autoComplete: "off" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row gap-6" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react17.default.createElement(
1199
1199
  TextInput,
1200
1200
  {
1201
1201
  label: "First Name",
@@ -1216,17 +1216,17 @@ var UniversalProfileSettings = ({
1216
1216
  ))), /* @__PURE__ */ import_react17.default.createElement("div", { className: "space-y-2 min-w-0" }, /* @__PURE__ */ import_react17.default.createElement(
1217
1217
  TextInput,
1218
1218
  {
1219
- label: "Email ID",
1220
- value: email,
1219
+ label: "Registered Phone Number",
1220
+ value: phoneNumber,
1221
1221
  onChange: () => {
1222
1222
  },
1223
1223
  disabled: true
1224
1224
  }
1225
- ), /* @__PURE__ */ import_react17.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 truncate" }, "To change your email address, please contact support.")), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between pt-8 mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Account Status"), /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-xs text-black block truncate" }, accountStatus)), /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Member Since"), /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-xs text-black block truncate" }, memberSince ? new Date(memberSince).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : "N/A")), /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0 pl-4" }, /* @__PURE__ */ import_react17.default.createElement(
1225
+ ), /* @__PURE__ */ import_react17.default.createElement("p", { className: "text-[11px] text-neutral-500 mt-1 truncate" }, "To change your primary number, please contact support.")), /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between pt-8 mt-2 gap-6 sm:gap-4" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center gap-6 min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Account Status"), /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-xs text-black block truncate" }, accountStatus)), /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em] block truncate" }, "Member Since"), /* @__PURE__ */ import_react17.default.createElement("span", { className: "text-xs text-black block truncate" }, memberSince ? new Date(memberSince).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : "N/A")), /* @__PURE__ */ import_react17.default.createElement("div", { className: "min-w-0 pl-4" }, /* @__PURE__ */ import_react17.default.createElement(
1226
1226
  "button",
1227
1227
  {
1228
1228
  type: "button",
1229
- onClick: () => setIsPinModalOpen(true),
1229
+ onClick: () => setIsPasscodeModalOpen(true),
1230
1230
  className: "w-9 h-9 flex items-center justify-center border border-neutral-200 rounded-full text-black hover:bg-neutral-50 transition-colors outline-none"
1231
1231
  },
1232
1232
  /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.LockKeyIcon, size: 17, className: "text-black" })
@@ -1250,48 +1250,48 @@ var UniversalProfileSettings = ({
1250
1250
  className: "min-w-32 w-full sm:w-auto"
1251
1251
  },
1252
1252
  "Save Changes"
1253
- ))))), isPinModalOpen && /* @__PURE__ */ import_react17.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePinModal }), /* @__PURE__ */ import_react17.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react17.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPin ? "Change PIN" : "Create PIN"), /* @__PURE__ */ import_react17.default.createElement("button", { onClick: closePinModal, disabled: isPinSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react17.default.createElement("div", { className: "p-6" }, isPinLoading ? /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.Loading03Icon, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ import_react17.default.createElement("form", { onSubmit: handlePinSubmit, className: "flex flex-col gap-6" }, hasPin && /* @__PURE__ */ import_react17.default.createElement(
1253
+ ))))), isPasscodeModalOpen && /* @__PURE__ */ import_react17.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePasscodeModal }), /* @__PURE__ */ import_react17.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react17.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPasscode ? "Change Passcode" : "Create Security Passcode"), /* @__PURE__ */ import_react17.default.createElement("button", { onClick: closePasscodeModal, disabled: isPasscodeSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react17.default.createElement("div", { className: "p-6" }, isPasscodeLoading ? /* @__PURE__ */ import_react17.default.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ import_react17.default.createElement(import_react18.HugeiconsIcon, { icon: import_core_free_icons4.Loading03Icon, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ import_react17.default.createElement("form", { onSubmit: handlePasscodeSubmit, className: "flex flex-col gap-6" }, hasPasscode && /* @__PURE__ */ import_react17.default.createElement(
1254
1254
  TextInput,
1255
1255
  {
1256
1256
  type: "password",
1257
- label: "Old PIN",
1258
- maxLength: 4,
1259
- disabled: isPinSubmitting,
1260
- value: oldPin,
1261
- onChange: (val) => handlePinInput(val, setOldPin),
1262
- placeholder: "\u2022\u2022\u2022\u2022"
1257
+ label: "Old 6-Digit Passcode",
1258
+ maxLength: 6,
1259
+ disabled: isPasscodeSubmitting,
1260
+ value: oldPasscode,
1261
+ onChange: (val) => handlePasscodeInput(val, setOldPasscode),
1262
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1263
1263
  }
1264
1264
  ), /* @__PURE__ */ import_react17.default.createElement(
1265
1265
  TextInput,
1266
1266
  {
1267
1267
  type: "password",
1268
- label: hasPin ? "New PIN" : "Enter 4-Digit PIN",
1269
- maxLength: 4,
1270
- disabled: isPinSubmitting,
1271
- value: newPin,
1272
- onChange: (val) => handlePinInput(val, setNewPin),
1273
- placeholder: "\u2022\u2022\u2022\u2022"
1268
+ label: hasPasscode ? "New 6-Digit Passcode" : "Enter 6-Digit Passcode",
1269
+ maxLength: 6,
1270
+ disabled: isPasscodeSubmitting,
1271
+ value: newPasscode,
1272
+ onChange: (val) => handlePasscodeInput(val, setNewPasscode),
1273
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1274
1274
  }
1275
1275
  ), /* @__PURE__ */ import_react17.default.createElement(
1276
1276
  TextInput,
1277
1277
  {
1278
1278
  type: "password",
1279
- label: "Retype New PIN",
1280
- maxLength: 4,
1281
- disabled: isPinSubmitting,
1282
- value: confirmPin,
1283
- onChange: (val) => handlePinInput(val, setConfirmPin),
1284
- placeholder: "\u2022\u2022\u2022\u2022"
1279
+ label: "Retype New Passcode",
1280
+ maxLength: 6,
1281
+ disabled: isPasscodeSubmitting,
1282
+ value: confirmPasscode,
1283
+ onChange: (val) => handlePasscodeInput(val, setConfirmPasscode),
1284
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
1285
1285
  }
1286
1286
  ), /* @__PURE__ */ import_react17.default.createElement("div", { className: "pt-2" }, /* @__PURE__ */ import_react17.default.createElement(
1287
1287
  ThreeDActionButton,
1288
1288
  {
1289
1289
  type: "submit",
1290
- disabled: isPinSubmitting || newPin.length !== 4 || confirmPin.length !== 4 || hasPin && oldPin.length !== 4,
1291
- isLoading: isPinSubmitting,
1290
+ disabled: isPasscodeSubmitting || newPasscode.length !== 6 || confirmPasscode.length !== 6 || hasPasscode && oldPasscode.length !== 6,
1291
+ isLoading: isPasscodeSubmitting,
1292
1292
  className: "w-full"
1293
1293
  },
1294
- hasPin ? "Update PIN" : "Set PIN"
1294
+ hasPasscode ? "Update Passcode" : "Set Passcode"
1295
1295
  ))))))));
1296
1296
  };
1297
1297
 
@@ -1610,48 +1610,15 @@ var UniversalTransactionPage = ({
1610
1610
  var import_react25 = __toESM(require("react"));
1611
1611
  var import_react26 = require("@hugeicons/react");
1612
1612
  var import_core_free_icons8 = require("@hugeicons/core-free-icons");
1613
- var renderKMT = (val, currencySymbol) => {
1614
- let formatted = val;
1615
- let suffix = "";
1616
- if (val >= 1e12) {
1617
- formatted = val / 1e12;
1618
- suffix = "T";
1619
- } else if (val >= 1e6) {
1620
- formatted = val / 1e6;
1621
- suffix = "M";
1622
- } else if (val >= 1e3) {
1623
- formatted = val / 1e3;
1624
- suffix = "k";
1625
- }
1626
- const displayStr = parseFloat(formatted.toFixed(2)).toString();
1627
- return /* @__PURE__ */ import_react25.default.createElement("span", { className: "flex items-baseline mt-1" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-[13px] text-neutral-800 mr-0.5 " }, currencySymbol), /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-xl text-neutral-800 tracking-tight " }, displayStr), /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-[14px] text-neutral-600 ml-0.5 " }, suffix));
1628
- };
1629
- var renderKMT2 = (val, currencySymbol) => {
1630
- let formatted = val;
1631
- let suffix = "";
1632
- if (val >= 1e12) {
1633
- formatted = val / 1e12;
1634
- suffix = "T";
1635
- } else if (val >= 1e6) {
1636
- formatted = val / 1e6;
1637
- suffix = "M";
1638
- } else if (val >= 1e3) {
1639
- formatted = val / 1e3;
1640
- suffix = "k";
1641
- }
1642
- const displayStr = parseFloat(formatted.toFixed(2)).toString();
1643
- return /* @__PURE__ */ import_react25.default.createElement("span", { className: "flex items-baseline mt-1" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-[13px] text-white mr-0.5 " }, currencySymbol), /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-xl text-white tracking-tight " }, displayStr), /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-[14px] text-white/50 ml-0.5 " }, suffix));
1644
- };
1645
1613
  var UniversalHomeView = ({
1646
1614
  fullName = "",
1647
1615
  avatarSrc,
1648
- balanceLabel = "Available Balance",
1616
+ balanceLabel = "Pending Balance",
1649
1617
  balanceAmount,
1650
1618
  balanceCurrency = "$",
1651
- cashbackValue,
1652
- rewardsValue,
1653
- primaryAction,
1654
- secondaryAction,
1619
+ calculatorAction,
1620
+ buyCryptoAction,
1621
+ referralAction,
1655
1622
  notifications = [],
1656
1623
  notificationPage = 1,
1657
1624
  notificationTotalPages = 1,
@@ -1715,7 +1682,7 @@ var UniversalHomeView = ({
1715
1682
  setShowNotifDialog(true);
1716
1683
  setSelectedNotif(null);
1717
1684
  },
1718
- className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
1685
+ className: "relative w-10 h-10 flex items-center justify-center rounded-full bg-white outline-none hover:bg-neutral-50 transition-colors"
1719
1686
  },
1720
1687
  /* @__PURE__ */ import_react25.default.createElement(import_react26.HugeiconsIcon, { icon: import_core_free_icons8.Notification01Icon, size: 20, className: "text-black" }),
1721
1688
  hasUnreadNotifs && /* @__PURE__ */ import_react25.default.createElement("span", { className: "absolute top-2.5 right-2.5 w-2 h-2 bg-red-500 rounded-full border border-white" })
@@ -1726,35 +1693,44 @@ var UniversalHomeView = ({
1726
1693
  className: "text-neutral-400 hover:text-white transition-colors outline-none"
1727
1694
  },
1728
1695
  /* @__PURE__ */ import_react25.default.createElement(import_react26.HugeiconsIcon, { icon: isBalanceHidden ? import_core_free_icons8.ViewIcon : import_core_free_icons8.ViewOffSlashIcon, size: 16 })
1729
- )), /* @__PURE__ */ import_react25.default.createElement("p", { className: `text-2xl text-white tracking-tight mb-6 tabular-nums flex items-baseline transition-all duration-300 ${isBalanceHidden ? "blur-sm opacity-40 select-none" : ""}` }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-lg text-neutral-400 mr-1" }, balanceCurrency), intPart, decPart && /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-lg text-neutral-400" }, ".", decPart)), /* @__PURE__ */ import_react25.default.createElement("div", { className: "flex items-center gap-3 w-full" }, primaryAction && /* @__PURE__ */ import_react25.default.createElement(
1696
+ )), /* @__PURE__ */ import_react25.default.createElement("p", { className: `text-2xl text-white tracking-tight mb-6 tabular-nums flex items-baseline transition-all duration-300 ${isBalanceHidden ? "blur-sm opacity-40 select-none" : ""}` }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-lg text-neutral-400 mr-1" }, balanceCurrency), intPart, decPart && /* @__PURE__ */ import_react25.default.createElement("span", { className: "text-lg text-neutral-400" }, ".", decPart)), /* @__PURE__ */ import_react25.default.createElement("div", { className: "flex items-center w-full" }, calculatorAction && /* @__PURE__ */ import_react25.default.createElement(
1730
1697
  "button",
1731
1698
  {
1732
- onClick: primaryAction.onClick,
1733
- className: "px-6 py-2 bg-white text-black text-[12px] truncate rounded-full transition-opacity hover:opacity-90 outline-none text-center"
1699
+ onClick: calculatorAction.onClick,
1700
+ className: "px-6 py-2 bg-transparent border border-white/20 text-white truncate text-[12px] rounded-full transition-colors hover:bg-white/10 outline-none text-center"
1734
1701
  },
1735
- "Deposit"
1736
- ), secondaryAction && /* @__PURE__ */ import_react25.default.createElement(
1737
- "button",
1702
+ calculatorAction.label || "Rate Calculator"
1703
+ )))), /* @__PURE__ */ import_react25.default.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ import_react25.default.createElement(
1704
+ "div",
1738
1705
  {
1739
- onClick: secondaryAction.onClick,
1740
- className: "px-6 py-2 bg-transparent border border-white/20 text-white truncate text-[12px] rounded-full transition-colors hover:bg-white/10 outline-none text-center"
1706
+ onClick: buyCryptoAction?.onClick,
1707
+ className: "bg-[#143731] rounded-2xl p-5 relative overflow-hidden flex flex-col h-32 sm:h-36 cursor-pointer hover:opacity-90 transition-opacity"
1741
1708
  },
1742
- "Earn Rewards"
1743
- )))), /* @__PURE__ */ import_react25.default.createElement("div", { className: "grid grid-cols-2 gap-2" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "bg-[#143731] rounded-2xl p-5 relative overflow-hidden flex flex-col h-45 sm:h-50" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ import_react25.default.createElement("p", { className: "text-[15px] sm:text-[15px] text-white mb-1" }, "Cashback"), renderKMT2(cashbackValue, balanceCurrency)), /* @__PURE__ */ import_react25.default.createElement(
1744
- "img",
1745
- {
1746
- src: "https://retinalabs.company/assets/images/save_box.avif",
1747
- alt: "Cashback",
1748
- className: "absolute bottom-6 right-4 translate-x-1/4 translate-y-1/2 w-40 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1749
- }
1750
- )), /* @__PURE__ */ import_react25.default.createElement("div", { className: "bg-[#ceff8a] rounded-2xl p-5 relative overflow-hidden flex flex-col h-45 sm:h-50" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "relative z-10" }, /* @__PURE__ */ import_react25.default.createElement("p", { className: "text-[15px] sm:text-[15px] text-black mb-1" }, "Rewards"), renderKMT(rewardsValue, balanceCurrency)), /* @__PURE__ */ import_react25.default.createElement(
1751
- "img",
1709
+ /* @__PURE__ */ import_react25.default.createElement("div", { className: "relative z-10 flex flex-col h-full justify-between" }, /* @__PURE__ */ import_react25.default.createElement("p", { className: "text-[15px] sm:text-[15px] text-white font-medium" }, "Buy Crypto"), /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-8 h-8 rounded-full bg-white/10 border border-white/10 flex items-center justify-center" }, /* @__PURE__ */ import_react25.default.createElement(import_react26.HugeiconsIcon, { icon: import_core_free_icons8.ArrowUpRight01Icon, size: 16, className: "text-white" }))),
1710
+ /* @__PURE__ */ import_react25.default.createElement(
1711
+ "img",
1712
+ {
1713
+ src: "https://retinalabs.company/assets/images/save_box.avif",
1714
+ alt: "Buy Crypto",
1715
+ className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1716
+ }
1717
+ )
1718
+ ), /* @__PURE__ */ import_react25.default.createElement(
1719
+ "div",
1752
1720
  {
1753
- src: "https://retinalabs.company/assets/images/gift_box.avif",
1754
- alt: "Rewards",
1755
- className: "absolute bottom-6 right-4 translate-x-1/4 translate-y-1/2 w-40 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1756
- }
1757
- )))), customContent && /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ import_react25.default.createElement(
1721
+ onClick: referralAction?.onClick,
1722
+ className: "bg-[#ceff8a] rounded-2xl p-5 relative overflow-hidden flex flex-col h-32 sm:h-36 cursor-pointer hover:opacity-90 transition-opacity"
1723
+ },
1724
+ /* @__PURE__ */ import_react25.default.createElement("div", { className: "relative z-10 flex flex-col h-full justify-between" }, /* @__PURE__ */ import_react25.default.createElement("p", { className: "text-[15px] sm:text-[15px] text-black font-medium" }, "Referral"), /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-8 h-8 rounded-full bg-black/5 border border-black/5 flex items-center justify-center" }, /* @__PURE__ */ import_react25.default.createElement(import_react26.HugeiconsIcon, { icon: import_core_free_icons8.ArrowRight01Icon, size: 16, className: "text-black" }))),
1725
+ /* @__PURE__ */ import_react25.default.createElement(
1726
+ "img",
1727
+ {
1728
+ src: "https://retinalabs.company/assets/images/gift_box.avif",
1729
+ alt: "Referral",
1730
+ className: "absolute bottom-4 right-2 translate-x-1/4 translate-y-1/2 w-32 h-auto object-contain z-0 pointer-events-none drop-shadow-md"
1731
+ }
1732
+ )
1733
+ ))), customContent && /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-full" }, customContent), /* @__PURE__ */ import_react25.default.createElement("div", { className: "w-full mt-2" }, /* @__PURE__ */ import_react25.default.createElement(
1758
1734
  UniversalTransactionPage,
1759
1735
  {
1760
1736
  ...transactionsProps,
@@ -2072,6 +2048,7 @@ var UniversalWalletPage = ({
2072
2048
  // src/components/UniversalCardPage.tsx
2073
2049
  var import_react31 = __toESM(require("react"));
2074
2050
  var import_navigation4 = require("next/navigation");
2051
+ var import_react_hot_toast7 = __toESM(require("react-hot-toast"));
2075
2052
  var import_react32 = require("@hugeicons/react");
2076
2053
  var import_core_free_icons11 = require("@hugeicons/core-free-icons");
2077
2054
  var UniversalCardPage = ({
@@ -2079,10 +2056,8 @@ var UniversalCardPage = ({
2079
2056
  actionPath = "/app/cards/action/",
2080
2057
  onReveal,
2081
2058
  onFreeze,
2082
- onSetLimits,
2083
2059
  onDelete,
2084
- onFundCard,
2085
- onCreateCard
2060
+ onFundCard
2086
2061
  }) => {
2087
2062
  const router = (0, import_navigation4.useRouter)();
2088
2063
  const sortedCards = import_react31.default.useMemo(() => {
@@ -2096,7 +2071,6 @@ var UniversalCardPage = ({
2096
2071
  const activeCard = sortedCards[activeTabIndex];
2097
2072
  const [isBgLoaded, setIsBgLoaded] = (0, import_react31.useState)(false);
2098
2073
  const [isFreezing, setIsFreezing] = (0, import_react31.useState)(false);
2099
- const [isOverlayActionLoading, setIsOverlayActionLoading] = (0, import_react31.useState)(false);
2100
2074
  const [showDeleteDialog, setShowDeleteDialog] = (0, import_react31.useState)(false);
2101
2075
  const [isDeleting, setIsDeleting] = (0, import_react31.useState)(false);
2102
2076
  (0, import_react31.useEffect)(() => {
@@ -2104,134 +2078,67 @@ var UniversalCardPage = ({
2104
2078
  if (!activeCard?.cardBgSrc) return;
2105
2079
  const img = new Image();
2106
2080
  img.src = activeCard.cardBgSrc;
2107
- img.onload = () => {
2108
- setTimeout(() => setIsBgLoaded(true), 300);
2109
- };
2081
+ img.onload = () => setIsBgLoaded(true);
2110
2082
  }, [activeCard?.cardBgSrc]);
2111
2083
  if (!activeCard || sortedCards.length === 0) {
2112
- return /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative min-h-100 justify-center" }, onCreateCard && /* @__PURE__ */ import_react31.default.createElement(
2113
- "button",
2114
- {
2115
- onClick: onCreateCard,
2116
- className: "fixed bottom-24 right-6 sm:right-50 z-50 w-11 h-11 rounded-full bg-white shadow-xl flex items-center justify-center text-black transition-all outline-none"
2117
- },
2118
- /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.PlusSignIcon, size: 18 })
2119
- ), /* @__PURE__ */ import_react31.default.createElement("div", { className: "p-6 w-full max-w-md mx-auto text-center" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "mb-8 flex justify-center" }, /* @__PURE__ */ import_react31.default.createElement(
2120
- "svg",
2121
- {
2122
- xmlns: "http://www.w3.org/2000/svg",
2123
- viewBox: "0 0 24 24",
2124
- className: "w-12 h-12 fill-neutral-100"
2125
- },
2126
- /* @__PURE__ */ import_react31.default.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })
2127
- )), /* @__PURE__ */ import_react31.default.createElement("h1", { className: "text-xl text-black tracking-tight mb-4" }, "No cards available"), /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[13px] leading-[1.8] text-neutral-600 mb-12" }, "You do not have any virtual or physical cards generated yet.")));
2084
+ return /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative min-h-100 justify-center" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "p-6 w-full max-w-md mx-auto text-center" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "mb-8 flex justify-center" }, /* @__PURE__ */ import_react31.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", className: "w-12 h-12 fill-neutral-100" }, /* @__PURE__ */ import_react31.default.createElement("path", { fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" }))), /* @__PURE__ */ import_react31.default.createElement("h1", { className: "text-xl text-black tracking-tight mb-4" }, "No cards available"), /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[13px] leading-[1.8] text-neutral-600 mb-12" }, "You do not have any active cards on your account.")));
2128
2085
  }
2129
2086
  const isActivated = activeCard.status === "ACTIVATED";
2130
2087
  const isFrozen = activeCard.status === "FROZEN";
2131
2088
  const isUnactivated = activeCard.status === "UNACTIVATED";
2132
2089
  const isDead = ["BLOCKED", "EXPIRED", "DELETED"].includes(activeCard.status);
2133
- const isPreordered = activeCard.preOrder === true;
2134
- const actionsDisabled = !isActivated && !isFrozen;
2135
- const revealDisabled = !isActivated;
2136
- const freezeDisabled = isUnactivated || isDead;
2137
- const showActionOverlay = !isActivated && isBgLoaded && !isPreordered || isFrozen;
2138
- const overlayClasses = activeCard.contentDark ? "bg-white/20 backdrop-blur-[3px]" : "bg-black/10 backdrop-blur-[2px]";
2139
- const buttonClasses = activeCard.contentDark ? "bg-black/10 text-black hover:bg-black/20 font-medium" : "bg-white/25 text-white hover:bg-white/35";
2140
- const handleToggleFreeze = () => {
2141
- if (freezeDisabled || isFreezing) return;
2090
+ const actionsDisabled = !isActivated && !isFrozen || isDead;
2091
+ const showActionOverlay = !isActivated && isBgLoaded || isFrozen;
2092
+ const overlayClasses = activeCard.contentDark ? "bg-white/30 backdrop-blur-[3px]" : "bg-black/30 backdrop-blur-[3px]";
2093
+ const buttonClasses = activeCard.contentDark ? "bg-black text-white hover:bg-black/80 font-medium" : "bg-white text-black hover:bg-neutral-100 font-medium";
2094
+ const handleToggleFreeze = async () => {
2095
+ if (actionsDisabled || isFreezing || !onFreeze) return;
2142
2096
  setIsFreezing(true);
2143
- setTimeout(() => {
2144
- if (onFreeze) onFreeze(activeCard.id);
2097
+ try {
2098
+ await onFreeze(activeCard.id);
2099
+ } finally {
2145
2100
  setIsFreezing(false);
2146
- }, 800);
2101
+ }
2147
2102
  };
2148
2103
  const confirmDelete = async () => {
2149
2104
  setIsDeleting(true);
2150
- setTimeout(() => {
2151
- if (onDelete) onDelete(activeCard.id);
2152
- setIsDeleting(false);
2153
- setShowDeleteDialog(false);
2154
- }, 1200);
2105
+ if (onDelete) onDelete(activeCard.id);
2106
+ setIsDeleting(false);
2107
+ setShowDeleteDialog(false);
2155
2108
  };
2156
- const formatTabLabel = (card) => {
2157
- if (card.prepaid) {
2158
- const capitalizedTier = card.tier.charAt(0).toUpperCase() + card.tier.slice(1).toLowerCase();
2159
- return `${capitalizedTier}`;
2160
- }
2161
- const capitalizedType = card.type.charAt(0).toUpperCase() + card.type.slice(1).toLowerCase();
2162
- return `${capitalizedType}`;
2109
+ const formatTabLabel = (type) => {
2110
+ return type.charAt(0).toUpperCase() + type.slice(1).toLowerCase();
2163
2111
  };
2164
- return /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react31.default.createElement("h1", { className: "text-2xl mt-2 text-black tracking-tight mb-2 text-center" }, "My Cards"), onCreateCard && /* @__PURE__ */ import_react31.default.createElement(
2112
+ return /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300 relative" }, /* @__PURE__ */ import_react31.default.createElement("h1", { className: "text-2xl mt-2 text-black tracking-tight mb-2 text-center" }, "My Cards"), sortedCards.length > 1 && /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center justify-center mb-6 w-full px-2 gap-3" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center bg-white rounded-full p-1 max-w-full overflow-x-auto custom-scrollbar" }, sortedCards.map((tab, idx) => /* @__PURE__ */ import_react31.default.createElement(
2165
2113
  "button",
2166
2114
  {
2167
- onClick: onCreateCard,
2168
- className: "fixed bottom-24 right-6 sm:right-50 z-50 w-11 h-11 rounded-full bg-white shadow-xl flex items-center justify-center text-black transition-all outline-none"
2115
+ key: tab.id,
2116
+ onClick: () => setActiveTabIndex(idx),
2117
+ className: `px-4 py-1.5 rounded-full text-[11px] transition-all duration-200 outline-none whitespace-nowrap shrink-0 ${activeTabIndex === idx ? "bg-neutral-100 text-black" : "text-neutral-500 hover:text-black hover:bg-neutral-50/50"}`
2169
2118
  },
2170
- /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.PlusSignIcon, size: 18 })
2171
- ), sortedCards.length > 1 && /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center justify-center mb-6 w-full px-2 gap-3" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center bg-white rounded-full p-1 sm:p-1.5 max-w-full overflow-x-auto custom-scrollbar" }, sortedCards.map((tab, idx) => {
2172
- const isActive = activeTabIndex === idx;
2173
- return /* @__PURE__ */ import_react31.default.createElement(
2174
- "button",
2175
- {
2176
- key: tab.id,
2177
- onClick: () => setActiveTabIndex(idx),
2178
- className: `px-4 py-1.5 rounded-full text-[11px] transition-all duration-200 outline-none whitespace-nowrap shrink-0 ${isActive ? "bg-neutral-100 text-black" : "text-neutral-500 hover:text-black hover:bg-neutral-50/50"}`
2179
- },
2180
- formatTabLabel(tab)
2181
- );
2182
- }))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full pt-2 pb-2 flex justify-center" }, /* @__PURE__ */ import_react31.default.createElement(
2183
- "div",
2119
+ formatTabLabel(tab.type)
2120
+ )))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full pt-2 pb-6 flex justify-center" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "relative w-full max-w-85", style: { height: 179 } }, !isBgLoaded && /* @__PURE__ */ import_react31.default.createElement("div", { className: "absolute inset-0 w-full h-full bg-white rounded-2xl flex items-center justify-center z-50" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 28, className: "animate-spin text-black" })), showActionOverlay && /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute inset-0 z-40 w-full h-full rounded-2xl flex flex-col items-center justify-center transition-all ${overlayClasses}` }, isUnactivated && /* @__PURE__ */ import_react31.default.createElement(
2121
+ "button",
2184
2122
  {
2185
- className: "relative w-full max-w-85",
2186
- style: { height: 179 }
2187
- },
2188
- !isBgLoaded && /* @__PURE__ */ import_react31.default.createElement("div", { className: "absolute inset-0 w-full h-full bg-white rounded-2xl flex items-center justify-center z-50" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 28, className: "animate-spin text-black" })),
2189
- showActionOverlay && /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute inset-0 z-40 w-full h-full rounded-2xl flex flex-col items-center justify-center transition-all ${overlayClasses}` }, isUnactivated && /* @__PURE__ */ import_react31.default.createElement(
2190
- "button",
2191
- {
2192
- onClick: (e) => {
2193
- e.stopPropagation();
2194
- router.push(`${actionPath}${activeCard.id}`);
2195
- },
2196
- className: `px-6 py-2 text-[11px] rounded-full transition-all outline-none active:scale-95 ${buttonClasses}`
2197
- },
2198
- "Activate Card"
2199
- ), isFrozen && /* @__PURE__ */ import_react31.default.createElement(
2200
- "button",
2201
- {
2202
- disabled: isOverlayActionLoading,
2203
- className: `px-6 py-2.5 text-[12px] rounded-full transition-all outline-none active:scale-95 flex items-center gap-2 disabled:opacity-80 ${buttonClasses}`
2123
+ onClick: (e) => {
2124
+ e.stopPropagation();
2125
+ router.push(`${actionPath}${activeCard.id}`);
2204
2126
  },
2205
- isOverlayActionLoading ? /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 16, className: `animate-spin ${activeCard.contentDark ? "text-black" : "text-white"}` }) : "Card Frozen"
2206
- )),
2207
- /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute inset-0 w-full h-full rounded-2xl overflow-hidden transition-all duration-700 ${isBgLoaded ? "opacity-100 scale-100" : "opacity-0 scale-105"}` }, /* @__PURE__ */ import_react31.default.createElement(
2208
- "div",
2209
- {
2210
- className: "absolute inset-0 bg-cover bg-center",
2211
- style: { backgroundImage: `url(${activeCard.cardBgSrc})` }
2212
- }
2213
- ), /* @__PURE__ */ import_react31.default.createElement("div", { className: "relative z-10 w-full h-full p-5 flex flex-col justify-between" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-start justify-end w-full gap-4" }, activeCard.prepaid && /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[9px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/60"}` }, "Card Tier"), /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[11px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"}` }, activeCard.tier))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex justify-between items-end w-full" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[9px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/60"}` }, activeCard.prepaid ? "Card Balance" : "Card Tier"), /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[12px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"}` }, activeCard.prepaid ? activeCard.balance || "$0.00" : activeCard.tier)), activeCard.networkLogoSrc && /* @__PURE__ */ import_react31.default.createElement(
2214
- "img",
2215
- {
2216
- src: activeCard.networkLogoSrc,
2217
- alt: "Network Logo",
2218
- className: "h-7 w-auto max-w-20 object-contain opacity-90"
2219
- }
2220
- ))))
2221
- )), activeCard.bannerProps ? /* @__PURE__ */ import_react31.default.createElement("div", { className: "mb-6 w-full mt-2" }, /* @__PURE__ */ import_react31.default.createElement(Banner, { ...activeCard.bannerProps })) : isPreordered ? /* @__PURE__ */ import_react31.default.createElement("div", { className: "mb-6 w-full mt-2" }, /* @__PURE__ */ import_react31.default.createElement(
2222
- Banner,
2127
+ className: `px-6 py-2 text-[11px] rounded-full transition-all outline-none ${buttonClasses}`
2128
+ },
2129
+ "Activate Card"
2130
+ ), isFrozen && /* @__PURE__ */ import_react31.default.createElement("div", { className: `px-6 py-2.5 text-[12px] rounded-full flex items-center gap-2 ${buttonClasses}` }, "Card Frozen")), /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute inset-0 w-full h-full rounded-2xl overflow-hidden transition-all duration-700 ${isBgLoaded ? "opacity-100 scale-100" : "opacity-0 scale-105"}` }, /* @__PURE__ */ import_react31.default.createElement(
2131
+ "div",
2223
2132
  {
2224
- type: "success",
2225
- title: "Order Secured",
2226
- message: `Your ${activeCard.tier} ${activeCard.type.toLowerCase()} card has been pre-ordered successfully and is pending batch processing.`,
2227
- isDismissible: false
2133
+ className: "absolute inset-0 bg-cover bg-center",
2134
+ style: { backgroundImage: `url(${activeCard.cardBgSrc})` }
2228
2135
  }
2229
- )) : null, /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full flex flex-col gap-4 mt-1" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, activeCard.prepaid && /* @__PURE__ */ import_react31.default.createElement(
2136
+ ), /* @__PURE__ */ import_react31.default.createElement("div", { className: "relative z-10 w-full h-full p-5 flex flex-col justify-between" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-start justify-end w-full gap-4" }, activeCard.networkLogoSrc && /* @__PURE__ */ import_react31.default.createElement("img", { src: activeCard.networkLogoSrc, alt: "Network Logo", className: "h-7 w-auto max-w-20 object-contain opacity-90" })), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex justify-between items-end w-full" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[10px] tracking-widest ${activeCard.contentDark ? "text-black/60" : "text-white/70"} drop-shadow-sm` }, "Balance"), /* @__PURE__ */ import_react31.default.createElement("span", { className: `text-[16px] tracking-widest font-medium ${activeCard.contentDark ? "text-black" : "text-white"} drop-shadow-sm` }, activeCard.balance))))))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full flex flex-col gap-4 mt-1" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ import_react31.default.createElement(
2230
2137
  MenuRow,
2231
2138
  {
2232
2139
  icon: import_core_free_icons11.PlusSignIcon,
2233
2140
  title: "Fund Card",
2234
- subtitle: "Add money to card",
2141
+ subtitle: "Add money to card balance",
2235
2142
  onClick: () => {
2236
2143
  if (!actionsDisabled && onFundCard) onFundCard(activeCard.id);
2237
2144
  },
@@ -2244,9 +2151,9 @@ var UniversalCardPage = ({
2244
2151
  title: "Reveal Information",
2245
2152
  subtitle: "Show secure card details",
2246
2153
  onClick: () => {
2247
- if (!revealDisabled && onReveal) onReveal(activeCard.id);
2154
+ if (!actionsDisabled && onReveal) onReveal(activeCard.id);
2248
2155
  },
2249
- disabled: revealDisabled
2156
+ disabled: actionsDisabled
2250
2157
  }
2251
2158
  ), /* @__PURE__ */ import_react31.default.createElement(
2252
2159
  MenuRow,
@@ -2258,19 +2165,7 @@ var UniversalCardPage = ({
2258
2165
  isToggle: true,
2259
2166
  toggleState: isFrozen,
2260
2167
  toggleLoading: isFreezing,
2261
- disabled: freezeDisabled,
2262
- isLast: activeCard.prepaid
2263
- }
2264
- ), !activeCard.prepaid && /* @__PURE__ */ import_react31.default.createElement(
2265
- MenuRow,
2266
- {
2267
- icon: import_core_free_icons11.SlidersHorizontalIcon,
2268
- title: "Set Limits",
2269
- subtitle: "Set card limits",
2270
- onClick: () => {
2271
- if (!actionsDisabled && onSetLimits) onSetLimits(activeCard.id);
2272
- },
2273
- disabled: actionsDisabled,
2168
+ disabled: isUnactivated || isDead,
2274
2169
  isLast: true
2275
2170
  }
2276
2171
  )), /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ import_react31.default.createElement(
@@ -2290,7 +2185,7 @@ var UniversalCardPage = ({
2290
2185
  {
2291
2186
  isOpen: showDeleteDialog,
2292
2187
  title: "Delete Card",
2293
- message: "Please ensure you spend all funds on this card before deleting. Once deleted, any remaining funds will be permanently lost and cannot be recovered.",
2188
+ message: "Are you sure you want to delete this card? This action is permanent and cannot be undone.",
2294
2189
  confirmText: "Delete",
2295
2190
  isDestructive: true,
2296
2191
  isProcessing: isDeleting,
@@ -2299,28 +2194,7 @@ var UniversalCardPage = ({
2299
2194
  }
2300
2195
  ));
2301
2196
  };
2302
- var MenuRow = ({
2303
- icon,
2304
- title,
2305
- subtitle,
2306
- onClick,
2307
- iconColor = "text-black",
2308
- titleColor = "text-black",
2309
- isLast = false,
2310
- isToggle = false,
2311
- toggleState = false,
2312
- toggleLoading = false,
2313
- disabled = false
2314
- }) => /* @__PURE__ */ import_react31.default.createElement(
2315
- "div",
2316
- {
2317
- onClick: disabled ? void 0 : onClick,
2318
- className: `flex items-center p-3 transition-colors ${!isLast ? "" : ""} ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}`
2319
- },
2320
- /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon, size: 16, className: iconColor })),
2321
- /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react31.default.createElement("p", { className: `text-[13px] truncate ${titleColor}` }, title), /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)),
2322
- isToggle ? /* @__PURE__ */ import_react31.default.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.ArrowRight01Icon, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
2323
- );
2197
+ var MenuRow = ({ icon, title, subtitle, onClick, isLast = false, isToggle = false, toggleState = false, toggleLoading = false, disabled = false }) => /* @__PURE__ */ import_react31.default.createElement("div", { onClick: disabled ? void 0 : onClick, className: `flex items-center p-3 transition-colors ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon, size: 16, className: "text-black" })), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[13px] truncate text-black" }, title), /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)), isToggle ? /* @__PURE__ */ import_react31.default.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.ArrowRight01Icon, size: 18, className: "text-neutral-400 shrink-0 ml-2" }));
2324
2198
 
2325
2199
  // src/components/UniversalProfilePage.tsx
2326
2200
  var import_react33 = __toESM(require("react"));
@@ -2571,7 +2445,7 @@ var import_image2 = __toESM(require("next/image"));
2571
2445
 
2572
2446
  // src/components/WaitlistDialog.tsx
2573
2447
  var import_react37 = __toESM(require("react"));
2574
- var import_react_hot_toast7 = require("react-hot-toast");
2448
+ var import_react_hot_toast8 = require("react-hot-toast");
2575
2449
  var WaitlistDialog = ({ isOpen, onClose }) => {
2576
2450
  const [email, setEmail] = (0, import_react37.useState)("");
2577
2451
  const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
@@ -2579,7 +2453,7 @@ var WaitlistDialog = ({ isOpen, onClose }) => {
2579
2453
  const handleSubmit = async (e) => {
2580
2454
  e.preventDefault();
2581
2455
  if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
2582
- import_react_hot_toast7.toast.error("Please enter a valid email address.");
2456
+ import_react_hot_toast8.toast.error("Please enter a valid email address.");
2583
2457
  return;
2584
2458
  }
2585
2459
  setIsLoading(true);
@@ -2593,14 +2467,14 @@ var WaitlistDialog = ({ isOpen, onClose }) => {
2593
2467
  });
2594
2468
  const data = await response.json();
2595
2469
  if (response.ok && data.success) {
2596
- import_react_hot_toast7.toast.success(data.message || "You've been added to the waitlist!");
2470
+ import_react_hot_toast8.toast.success(data.message || "You've been added to the waitlist!");
2597
2471
  setEmail("");
2598
2472
  onClose();
2599
2473
  } else {
2600
- import_react_hot_toast7.toast.error(data.error || "Something went wrong. Please try again.");
2474
+ import_react_hot_toast8.toast.error(data.error || "Something went wrong. Please try again.");
2601
2475
  }
2602
2476
  } catch (error) {
2603
- import_react_hot_toast7.toast.error("Network error. Please check your connection.");
2477
+ import_react_hot_toast8.toast.error("Network error. Please check your connection.");
2604
2478
  } finally {
2605
2479
  setIsLoading(false);
2606
2480
  }
@@ -2849,105 +2723,28 @@ var AppBento2 = ({ tagline, headline, features }) => {
2849
2723
 
2850
2724
  // src/components/UniversalSecurityPage.tsx
2851
2725
  var import_react41 = __toESM(require("react"));
2852
- var import_react_hot_toast8 = __toESM(require("react-hot-toast"));
2726
+ var import_react_hot_toast9 = __toESM(require("react-hot-toast"));
2853
2727
  var import_react42 = require("@hugeicons/react");
2854
2728
  var import_core_free_icons14 = require("@hugeicons/core-free-icons");
2855
2729
  var import_browser2 = require("@simplewebauthn/browser");
2856
2730
  var UniversalSecurityPage = ({
2857
- has2FA,
2731
+ hasPasscode,
2858
2732
  hasPasskey,
2859
- userEmail = "your account",
2860
- is2FALoading = false,
2733
+ isPasscodeLoading = false,
2861
2734
  isPasskeyLoading = false,
2862
2735
  onBack,
2863
- onRequest2FASetup,
2864
- onVerifyAndEnable2FA,
2865
- onVerifyAndDisable2FA,
2736
+ onSavePasscode,
2866
2737
  onRequestPasskeySetup,
2867
2738
  onVerifyAndEnablePasskey,
2868
2739
  onDisablePasskey
2869
2740
  }) => {
2870
- const [show2FASetupModal, setShow2FASetupModal] = (0, import_react41.useState)(false);
2871
- const [show2FADisableModal, setShow2FADisableModal] = (0, import_react41.useState)(false);
2872
2741
  const [showPasskeyModal, setShowPasskeyModal] = (0, import_react41.useState)(false);
2873
- const [twoFaSecret, setTwoFaSecret] = (0, import_react41.useState)("");
2874
- const [twoFaQr, setTwoFaQr] = (0, import_react41.useState)("");
2875
- const [isFetchingSetup, setIsFetchingSetup] = (0, import_react41.useState)(false);
2876
- const [otp, setOtp] = (0, import_react41.useState)(Array(6).fill(""));
2877
2742
  const [isSubmitting, setIsSubmitting] = (0, import_react41.useState)(false);
2878
- const inputRefs = (0, import_react41.useRef)([]);
2879
- const resetOtp = () => {
2880
- setOtp(Array(6).fill(""));
2881
- setIsSubmitting(false);
2882
- };
2883
- const handleOtpChange = (index, value) => {
2884
- const sanitizedValue = value.replace(/\D/g, "").slice(-1);
2885
- const newOtp = [...otp];
2886
- newOtp[index] = sanitizedValue;
2887
- setOtp(newOtp);
2888
- if (sanitizedValue && index < 5) {
2889
- inputRefs.current[index + 1]?.focus();
2890
- }
2891
- };
2892
- const handlePaste = (e) => {
2893
- e.preventDefault();
2894
- const pastedData = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
2895
- if (!pastedData) return;
2896
- const newOtp = [...otp];
2897
- for (let i = 0; i < pastedData.length; i++) {
2898
- newOtp[i] = pastedData[i];
2899
- }
2900
- setOtp(newOtp);
2901
- const focusIndex = Math.min(pastedData.length, 5);
2902
- inputRefs.current[focusIndex]?.focus();
2903
- };
2904
- const handleCopySecret = async (secret) => {
2905
- try {
2906
- if (navigator?.clipboard?.writeText && window.isSecureContext) {
2907
- await navigator.clipboard.writeText(secret);
2908
- import_react_hot_toast8.default.success("Secret copied to clipboard");
2909
- } else {
2910
- throw new Error("Clipboard API not available");
2911
- }
2912
- } catch (e) {
2913
- try {
2914
- const textArea = document.createElement("textarea");
2915
- textArea.value = secret;
2916
- textArea.style.position = "fixed";
2917
- textArea.style.left = "-999999px";
2918
- textArea.style.top = "-999999px";
2919
- document.body.appendChild(textArea);
2920
- textArea.focus();
2921
- textArea.select();
2922
- document.execCommand("copy");
2923
- textArea.remove();
2924
- import_react_hot_toast8.default.success("Secret copied to clipboard");
2925
- } catch (err) {
2926
- import_react_hot_toast8.default.error("Unable to copy. Please manually copy the key.");
2927
- }
2928
- }
2929
- };
2930
- const handleToggle2FA = async () => {
2931
- if (is2FALoading) return;
2932
- if (has2FA) {
2933
- resetOtp();
2934
- setShow2FADisableModal(true);
2935
- } else {
2936
- if (!onRequest2FASetup) return;
2937
- setIsFetchingSetup(true);
2938
- try {
2939
- const data = await onRequest2FASetup();
2940
- setTwoFaSecret(data.secret);
2941
- setTwoFaQr(data.qrCodeUrl);
2942
- resetOtp();
2943
- setShow2FASetupModal(true);
2944
- } catch (error) {
2945
- import_react_hot_toast8.default.error("Failed to initialize 2FA setup");
2946
- } finally {
2947
- setIsFetchingSetup(false);
2948
- }
2949
- }
2950
- };
2743
+ const [isPasscodeModalOpen, setIsPasscodeModalOpen] = (0, import_react41.useState)(false);
2744
+ const [oldPasscode, setOldPasscode] = (0, import_react41.useState)("");
2745
+ const [newPasscode, setNewPasscode] = (0, import_react41.useState)("");
2746
+ const [confirmPasscode, setConfirmPasscode] = (0, import_react41.useState)("");
2747
+ const [isPasscodeSubmitting, setIsPasscodeSubmitting] = (0, import_react41.useState)(false);
2951
2748
  const handleTogglePasskey = () => {
2952
2749
  if (isPasskeyLoading) return;
2953
2750
  if (hasPasskey) {
@@ -2956,38 +2753,40 @@ var UniversalSecurityPage = ({
2956
2753
  setShowPasskeyModal(true);
2957
2754
  }
2958
2755
  };
2959
- const submitEnable2FA = async (code) => {
2960
- if (!onVerifyAndEnable2FA) return;
2961
- setIsSubmitting(true);
2962
- try {
2963
- const res = await onVerifyAndEnable2FA(code);
2964
- if (res.success) {
2965
- import_react_hot_toast8.default.success("2FA Enabled Successfully");
2966
- setShow2FASetupModal(false);
2967
- } else {
2968
- import_react_hot_toast8.default.error("Invalid verification code");
2969
- }
2970
- } catch (error) {
2971
- import_react_hot_toast8.default.error("Verification failed");
2972
- } finally {
2973
- setIsSubmitting(false);
2974
- }
2756
+ const closePasscodeModal = () => {
2757
+ if (isPasscodeSubmitting) return;
2758
+ setIsPasscodeModalOpen(false);
2759
+ setOldPasscode("");
2760
+ setNewPasscode("");
2761
+ setConfirmPasscode("");
2975
2762
  };
2976
- const submitDisable2FA = async (code) => {
2977
- if (!onVerifyAndDisable2FA) return;
2978
- setIsSubmitting(true);
2763
+ const handlePasscodeInput = (val, setter) => {
2764
+ setter(val.replace(/\D/g, "").substring(0, 6));
2765
+ };
2766
+ const handlePasscodeSubmit = async (e) => {
2767
+ e.preventDefault();
2768
+ if (!onSavePasscode) return;
2769
+ if (hasPasscode && oldPasscode.length !== 6) return import_react_hot_toast9.default.error("Old Passcode must be exactly 6-digits.");
2770
+ if (newPasscode.length !== 6) return import_react_hot_toast9.default.error("New Passcode must be exactly 6-digits.");
2771
+ if (newPasscode !== confirmPasscode) return import_react_hot_toast9.default.error("New Passcodes do not match.");
2772
+ setIsPasscodeSubmitting(true);
2979
2773
  try {
2980
- const res = await onVerifyAndDisable2FA(code);
2774
+ const action = hasPasscode ? "change_passcode" : "create_passcode";
2775
+ const res = await onSavePasscode({
2776
+ action,
2777
+ oldPasscode: hasPasscode ? oldPasscode : void 0,
2778
+ newPasscode
2779
+ });
2981
2780
  if (res.success) {
2982
- import_react_hot_toast8.default.success("2FA Disabled");
2983
- setShow2FADisableModal(false);
2781
+ import_react_hot_toast9.default.success(res.message || "Passcode updated successfully.");
2782
+ closePasscodeModal();
2984
2783
  } else {
2985
- import_react_hot_toast8.default.error("Invalid verification code");
2784
+ import_react_hot_toast9.default.error(res.error || "Failed to update Passcode.");
2986
2785
  }
2987
2786
  } catch (error) {
2988
- import_react_hot_toast8.default.error("Verification failed");
2787
+ import_react_hot_toast9.default.error("Uh oh! Something went wrong.");
2989
2788
  } finally {
2990
- setIsSubmitting(false);
2789
+ setIsPasscodeSubmitting(false);
2991
2790
  }
2992
2791
  };
2993
2792
  const submitEnablePasskey = async () => {
@@ -3006,13 +2805,13 @@ var UniversalSecurityPage = ({
3006
2805
  }
3007
2806
  const res = await onVerifyAndEnablePasskey(credentialResponse);
3008
2807
  if (res.success) {
3009
- import_react_hot_toast8.default.success("Passkey Created Successfully");
2808
+ import_react_hot_toast9.default.success("Passkey Created Successfully");
3010
2809
  setShowPasskeyModal(false);
3011
2810
  } else {
3012
- import_react_hot_toast8.default.error("Failed to verify device passkey.");
2811
+ import_react_hot_toast9.default.error("Failed to verify device passkey.");
3013
2812
  }
3014
2813
  } catch (error) {
3015
- import_react_hot_toast8.default.error(error.message || "Passkey setup interrupted.");
2814
+ import_react_hot_toast9.default.error(error.message || "Passkey setup interrupted.");
3016
2815
  } finally {
3017
2816
  setIsSubmitting(false);
3018
2817
  }
@@ -3021,20 +2820,18 @@ var UniversalSecurityPage = ({
3021
2820
  "button",
3022
2821
  {
3023
2822
  onClick: onBack,
3024
- className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
2823
+ className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
3025
2824
  },
3026
2825
  /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.ArrowLeft01Icon, size: 16 }),
3027
2826
  " Back"
3028
2827
  )), /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-full flex flex-col gap-4" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-full bg-white rounded-2xl overflow-hidden" }, /* @__PURE__ */ import_react41.default.createElement(
3029
2828
  MenuRow3,
3030
2829
  {
3031
- icon: import_core_free_icons14.CircleLockCheck02Icon,
3032
- title: "Authenticator App",
3033
- subtitle: "Secure your account with 2FA",
3034
- onClick: handleToggle2FA,
3035
- isToggle: true,
3036
- toggleState: has2FA,
3037
- toggleLoading: is2FALoading || isFetchingSetup
2830
+ icon: import_core_free_icons14.LockKeyIcon,
2831
+ title: "Security Passcode",
2832
+ subtitle: hasPasscode ? "Change your 6-digit passcode" : "Create a 6-digit passcode",
2833
+ onClick: () => setIsPasscodeModalOpen(true),
2834
+ isToggle: false
3038
2835
  }
3039
2836
  ), /* @__PURE__ */ import_react41.default.createElement(
3040
2837
  MenuRow3,
@@ -3048,86 +2845,49 @@ var UniversalSecurityPage = ({
3048
2845
  toggleLoading: isPasskeyLoading,
3049
2846
  isLast: true
3050
2847
  }
3051
- ))), show2FASetupModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShow2FASetupModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200 max-h-[90vh]" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable 2FA"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShow2FASetupModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 pt-2" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-full flex justify-center mb-6 mix-blend-multiply" }, twoFaQr ? /* @__PURE__ */ import_react41.default.createElement("img", { src: twoFaQr, alt: "2FA QR Code", className: "w-40 h-40 object-contain rounded-xl border border-neutral-200 p-2" }) : /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-40 h-40 bg-neutral-100 rounded-xl flex items-center justify-center animate-pulse" })), /* @__PURE__ */ import_react41.default.createElement("div", { className: "grid grid-cols-1 gap-y-6 gap-x-4 mb-8" }, /* @__PURE__ */ import_react41.default.createElement("div", null, /* @__PURE__ */ import_react41.default.createElement("span", { className: "text-[11px] tracking-[0.2em] text-neutral-400 block mb-2 " }, "Setup Key"), /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center gap-2 min-w-0 bg-neutral-50 px-3 py-2.5 rounded-xl " }, /* @__PURE__ */ import_react41.default.createElement("span", { className: "text-[13px] font-mono tracking-widest text-black truncate min-w-0 block flex-1" }, twoFaSecret), /* @__PURE__ */ import_react41.default.createElement(
3052
- "button",
3053
- {
3054
- type: "button",
3055
- onClick: () => handleCopySecret(twoFaSecret),
3056
- className: "text-neutral-400 hover:text-black transition-colors outline-none shrink-0 ml-2"
3057
- },
3058
- /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.Copy01Icon, size: 16 })
3059
- )))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "text-center mb-8 mt-2" }, /* @__PURE__ */ import_react41.default.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, "Security Check"), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[13px] text-neutral-500" }, "Enter the 6-digit code from your app")), /* @__PURE__ */ import_react41.default.createElement("form", { className: "space-y-4", autoComplete: "off", onSubmit: (e) => {
3060
- e.preventDefault();
3061
- submitEnable2FA(otp.join(""));
3062
- } }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex justify-between gap-2 pb-6", onPaste: handlePaste }, otp.map((digit, index) => /* @__PURE__ */ import_react41.default.createElement(
3063
- "input",
2848
+ ))), isPasscodeModalOpen && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: closePasscodeModal }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, hasPasscode ? "Change Passcode" : "Create Security Passcode"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: closePasscodeModal, disabled: isPasscodeSubmitting, className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6" }, isPasscodeLoading ? /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex flex-col items-center justify-center py-10" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 28, className: "animate-spin text-neutral-400 mb-4" })) : /* @__PURE__ */ import_react41.default.createElement("form", { onSubmit: handlePasscodeSubmit, className: "flex flex-col gap-6" }, hasPasscode && /* @__PURE__ */ import_react41.default.createElement(
2849
+ TextInput,
3064
2850
  {
3065
- key: index,
3066
- ref: (el) => {
3067
- inputRefs.current[index] = el;
3068
- },
3069
- type: "text",
3070
- inputMode: "numeric",
3071
- maxLength: 1,
3072
- value: digit,
3073
- onChange: (e) => handleOtpChange(index, e.target.value),
3074
- onKeyDown: (e) => {
3075
- if (e.key === "Backspace" && !otp[index] && index > 0) {
3076
- inputRefs.current[index - 1]?.focus();
3077
- }
3078
- },
3079
- className: "w-8 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"
2851
+ type: "password",
2852
+ label: "Old 6-Digit Passcode",
2853
+ maxLength: 6,
2854
+ disabled: isPasscodeSubmitting,
2855
+ value: oldPasscode,
2856
+ onChange: (val) => handlePasscodeInput(val, setOldPasscode),
2857
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
3080
2858
  }
3081
- ))), /* @__PURE__ */ import_react41.default.createElement(
3082
- ThreeDActionButton,
3083
- {
3084
- type: "submit",
3085
- disabled: otp.join("").length < 6,
3086
- isLoading: isSubmitting,
3087
- className: "w-full py-3.5"
3088
- },
3089
- "Verify & Enable"
3090
2859
  ), /* @__PURE__ */ import_react41.default.createElement(
3091
- "button",
3092
- {
3093
- type: "button",
3094
- onClick: () => handleCopySecret(twoFaSecret),
3095
- className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 outline-none text-xs tracking-wide transition-colors mt-2"
3096
- },
3097
- /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.Copy01Icon, size: 16, className: "mr-2" }),
3098
- "Copy Secret Key"
3099
- ))))), show2FADisableModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShow2FADisableModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Disable 2FA"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShow2FADisableModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "text-center mb-8 mt-2" }, /* @__PURE__ */ import_react41.default.createElement("h2", { className: "text-xl text-black mb-2 tracking-tight" }, "Security Check"), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[13px] text-neutral-500" }, "Enter the code from your authenticator app to disable 2FA.")), /* @__PURE__ */ import_react41.default.createElement("form", { className: "space-y-8", autoComplete: "off", onSubmit: (e) => {
3100
- e.preventDefault();
3101
- submitDisable2FA(otp.join(""));
3102
- } }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex justify-between gap-2", onPaste: handlePaste }, otp.map((digit, index) => /* @__PURE__ */ import_react41.default.createElement(
3103
- "input",
2860
+ TextInput,
3104
2861
  {
3105
- key: index,
3106
- ref: (el) => {
3107
- inputRefs.current[index] = el;
3108
- },
3109
- type: "text",
3110
- inputMode: "numeric",
3111
- maxLength: 1,
3112
- value: digit,
3113
- onChange: (e) => handleOtpChange(index, e.target.value),
3114
- onKeyDown: (e) => {
3115
- if (e.key === "Backspace" && !otp[index] && index > 0) {
3116
- inputRefs.current[index - 1]?.focus();
3117
- }
3118
- },
3119
- 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"
2862
+ type: "password",
2863
+ label: hasPasscode ? "New 6-Digit Passcode" : "Enter 6-Digit Passcode",
2864
+ maxLength: 6,
2865
+ disabled: isPasscodeSubmitting,
2866
+ value: newPasscode,
2867
+ onChange: (val) => handlePasscodeInput(val, setNewPasscode),
2868
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
3120
2869
  }
3121
- ))), /* @__PURE__ */ import_react41.default.createElement(
2870
+ ), /* @__PURE__ */ import_react41.default.createElement(
2871
+ TextInput,
2872
+ {
2873
+ type: "password",
2874
+ label: "Retype New Passcode",
2875
+ maxLength: 6,
2876
+ disabled: isPasscodeSubmitting,
2877
+ value: confirmPasscode,
2878
+ onChange: (val) => handlePasscodeInput(val, setConfirmPasscode),
2879
+ placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022"
2880
+ }
2881
+ ), /* @__PURE__ */ import_react41.default.createElement("div", { className: "pt-2" }, /* @__PURE__ */ import_react41.default.createElement(
3122
2882
  ThreeDActionButton,
3123
2883
  {
3124
2884
  type: "submit",
3125
- disabled: otp.join("").length < 6,
3126
- isLoading: isSubmitting,
3127
- className: "w-full py-3.5"
2885
+ disabled: isPasscodeSubmitting || newPasscode.length !== 6 || confirmPasscode.length !== 6 || hasPasscode && oldPasscode.length !== 6,
2886
+ isLoading: isPasscodeSubmitting,
2887
+ className: "w-full"
3128
2888
  },
3129
- "Verify & Disable"
3130
- ))))), showPasskeyModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ import_react41.default.createElement("h2", { className: "text-lg text-black mb-2 tracking-tight" }, "Simplify your Sign In"), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ import_react41.default.createElement(
2889
+ hasPasscode ? "Update Passcode" : "Set Passcode"
2890
+ )))))), showPasskeyModal && /* @__PURE__ */ import_react41.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "absolute inset-0 bg-black/40 ", onClick: () => !isSubmitting && setShowPasskeyModal(false) }), /* @__PURE__ */ import_react41.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react41.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Enable Passkey"), /* @__PURE__ */ import_react41.default.createElement("button", { onClick: () => !isSubmitting && setShowPasskeyModal(false), className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react41.default.createElement("div", { className: "p-6 text-center" }, /* @__PURE__ */ import_react41.default.createElement("h2", { className: "text-lg text-black mb-2 tracking-tight" }, "Simplify your Sign In"), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[13px] text-neutral-500 mb-8 leading-relaxed" }, "Use your device's biometrics (Face ID, Touch ID, or PIN) to securely sign into your account without needing a password."), /* @__PURE__ */ import_react41.default.createElement(
3131
2891
  ThreeDActionButton,
3132
2892
  {
3133
2893
  onClick: submitEnablePasskey,
@@ -3155,8 +2915,8 @@ var MenuRow3 = ({
3155
2915
  onClick: disabled ? void 0 : onClick,
3156
2916
  className: `flex items-center p-4 transition-colors ${!isLast ? "" : ""} ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}`
3157
2917
  },
3158
- /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon, size: 16, className: iconColor })),
3159
- /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react41.default.createElement("p", { className: `text-[14px] truncate ${titleColor}` }, title), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, subtitle)),
2918
+ /* @__PURE__ */ import_react41.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon, size: 16, className: iconColor })),
2919
+ /* @__PURE__ */ import_react41.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react41.default.createElement("p", { className: `text-[14px] truncate ${titleColor}` }, title), /* @__PURE__ */ import_react41.default.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, subtitle)),
3160
2920
  isToggle ? /* @__PURE__ */ import_react41.default.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react41.default.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.Loading03Icon, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ import_react41.default.createElement(import_react42.HugeiconsIcon, { icon: import_core_free_icons14.ArrowRight01Icon, size: 18, className: "text-neutral-400 shrink-0 ml-2" })
3161
2921
  );
3162
2922
 
@@ -4086,7 +3846,7 @@ var UniversalVerificationPage = ({
4086
3846
  // src/components/UniversalRewardPage.tsx
4087
3847
  var import_react67 = __toESM(require("react"));
4088
3848
  var import_axios = __toESM(require("axios"));
4089
- var import_react_hot_toast9 = __toESM(require("react-hot-toast"));
3849
+ var import_react_hot_toast10 = __toESM(require("react-hot-toast"));
4090
3850
  var import_react_confetti = __toESM(require("react-confetti"));
4091
3851
  var import_react_use = require("react-use");
4092
3852
  var import_react68 = require("@hugeicons/react");
@@ -4137,7 +3897,7 @@ var UniversalRewardPage = ({
4137
3897
  const res = await import_axios.default.post(selectedReward.endpoint, selectedReward.config);
4138
3898
  if (res.data.success) {
4139
3899
  setShowConfetti(true);
4140
- import_react_hot_toast9.default.success(res.data.message || "Reward claimed successfully!");
3900
+ import_react_hot_toast10.default.success(res.data.message || "Reward claimed successfully!");
4141
3901
  setSelectedReward(null);
4142
3902
  onRefresh();
4143
3903
  setTimeout(() => {
@@ -4145,7 +3905,7 @@ var UniversalRewardPage = ({
4145
3905
  }, 6e3);
4146
3906
  }
4147
3907
  } catch (error) {
4148
- import_react_hot_toast9.default.error(error.response?.data?.error || "Failed to claim reward. Please try again.");
3908
+ import_react_hot_toast10.default.error(error.response?.data?.error || "Failed to claim reward. Please try again.");
4149
3909
  } finally {
4150
3910
  setIsClaiming(false);
4151
3911
  }
@@ -4195,7 +3955,7 @@ var UniversalRewardPage = ({
4195
3955
 
4196
3956
  // src/components/UniversalReferralPage.tsx
4197
3957
  var import_react69 = __toESM(require("react"));
4198
- var import_react_hot_toast10 = __toESM(require("react-hot-toast"));
3958
+ var import_react_hot_toast11 = __toESM(require("react-hot-toast"));
4199
3959
  var import_react70 = require("@hugeicons/react");
4200
3960
  var import_core_free_icons23 = require("@hugeicons/core-free-icons");
4201
3961
  var PageSpinner5 = () => /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex justify-center items-center py-12" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 32, className: "animate-spin mb-4 text-black" }));
@@ -4209,6 +3969,8 @@ var formatDate = (dateInput) => {
4209
3969
  var UniversalReferralPage = ({
4210
3970
  referralCode,
4211
3971
  totalCount,
3972
+ referralCoins = 0,
3973
+ // Default to 0
4212
3974
  referrals,
4213
3975
  isLoading,
4214
3976
  currentPage,
@@ -4223,9 +3985,9 @@ var UniversalReferralPage = ({
4223
3985
  if (!referralCode) return;
4224
3986
  try {
4225
3987
  await navigator.clipboard.writeText(referralCode);
4226
- import_react_hot_toast10.default.success("Referral code copied!");
3988
+ import_react_hot_toast11.default.success("Referral code copied!");
4227
3989
  } catch {
4228
- import_react_hot_toast10.default.error("Failed to copy code.");
3990
+ import_react_hot_toast11.default.error("Failed to copy code.");
4229
3991
  }
4230
3992
  };
4231
3993
  const AvatarLogo2 = ({ src, alt, name, sizeClass = "w-10 h-10" }) => {
@@ -4234,7 +3996,7 @@ var UniversalReferralPage = ({
4234
3996
  const finalSrc = src || fallbackUrl;
4235
3997
  return /* @__PURE__ */ import_react69.default.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__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.Loading03Icon, size: 16, className: "animate-spin text-neutral-400 absolute" }), /* @__PURE__ */ import_react69.default.createElement("img", { src: finalSrc, alt, onLoad: () => setIsLoaded(true), className: `w-full h-full object-cover transition-opacity duration-300 ${isLoaded ? "opacity-100" : "opacity-0"}` }));
4236
3998
  };
4237
- return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react69.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react69.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react69.default.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-3xl bg-white w-full" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 mb-2" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between mt-2" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-lg text-black tracking-widest" }, referralCode)), /* @__PURE__ */ import_react69.default.createElement(
3999
+ return /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full max-w-3xl mx-auto flex flex-col animate-in fade-in duration-300" }, /* @__PURE__ */ import_react69.default.createElement(ManagedToaster, null), /* @__PURE__ */ import_react69.default.createElement("div", { className: "mb-6 flex w-full items-center px-1" }, /* @__PURE__ */ import_react69.default.createElement("button", { onClick: onBackHandler, className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none" }, /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.ArrowLeft01Icon, size: 16 }), " Back")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-8 p-6 rounded-3xl bg-white w-full" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-4 mb-2" }, /* @__PURE__ */ import_react69.default.createElement("div", null, /* @__PURE__ */ import_react69.default.createElement("h1", { className: "text-black text-xl mb-1 tracking-tight" }, "Your Referrals"), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500" }, "Invite friends and earn rewards when they verify and activate cards.")), /* @__PURE__ */ import_react69.default.createElement("div", { className: "border border-neutral-200 rounded-xl p-4 flex items-center justify-between mt-2" }, /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col gap-1" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] tracking-widest text-neutral-400 " }, "Invitation Code"), isLoading && !referralCode ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "h-6 w-24 bg-neutral-50 animate-pulse rounded mt-1" }) : /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-lg text-black tracking-widest" }, referralCode)), /* @__PURE__ */ import_react69.default.createElement(
4238
4000
  "button",
4239
4001
  {
4240
4002
  onClick: handleCopyCode,
@@ -4242,7 +4004,7 @@ var UniversalReferralPage = ({
4242
4004
  className: "w-10 h-10 rounded-full bg-white flex items-center justify-center text-neutral-500 hover:text-black transition-colors outline-none disabled:opacity-50"
4243
4005
  },
4244
4006
  /* @__PURE__ */ import_react69.default.createElement(import_react70.HugeiconsIcon, { icon: import_core_free_icons23.Copy01Icon, size: 18 })
4245
- )), /* @__PURE__ */ import_react69.default.createElement("div", { className: "text-[13px] text-black px-1 mt-2" }, "Total Invited: ", isLoading && !totalCount ? "-" : totalCount)), /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ import_react69.default.createElement(PageSpinner5, null) : /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react69.default.createElement("div", null, referrals.length === 0 ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col items-center justify-center py-12 opacity-50" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500 text-center" }, "You haven't referred anyone yet.")) : referrals.map((ref, idx) => /* @__PURE__ */ import_react69.default.createElement(
4007
+ )), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between text-[13px] text-black px-1 mt-2" }, /* @__PURE__ */ import_react69.default.createElement("span", null, "Total Invited: ", isLoading && !totalCount ? "-" : totalCount), /* @__PURE__ */ import_react69.default.createElement("span", null, "Points: ", isLoading && !referralCoins && referralCoins !== 0 ? "-" : referralCoins))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "w-full overflow-hidden" }, isLoading ? /* @__PURE__ */ import_react69.default.createElement(PageSpinner5, null) : /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react69.default.createElement("div", null, referrals.length === 0 ? /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex flex-col items-center justify-center py-12 opacity-50" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-xs text-neutral-500 text-center" }, "You haven't referred anyone yet.")) : referrals.map((ref, idx) => /* @__PURE__ */ import_react69.default.createElement(
4246
4008
  "div",
4247
4009
  {
4248
4010
  key: `${ref.profile.username}-${idx}`,
@@ -4255,8 +4017,8 @@ var UniversalReferralPage = ({
4255
4017
  alt: ref.profile.username,
4256
4018
  name: formatWeb3Name2(ref.profile.web3Name)
4257
4019
  }
4258
- ), /* @__PURE__ */ import_react69.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5 pr-4" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[14px] text-black truncate" }, formatWeb3Name2(ref.profile.web3Name)), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, "@", ref.profile.username))),
4259
- /* @__PURE__ */ import_react69.default.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] text-neutral-400" }, "Joined"), /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[12px] text-black" }, formatDate(ref.joinedAt)))
4020
+ ), /* @__PURE__ */ import_react69.default.createElement("div", { className: "min-w-0 flex-1 flex flex-col gap-0.5 pr-4" }, /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[14px] text-black truncate" }, formatWeb3Name2(ref.profile.web3Name)), /* @__PURE__ */ import_react69.default.createElement("p", { className: "text-[12px] text-neutral-500 truncate" }, "@", ref.profile.username))),
4021
+ /* @__PURE__ */ import_react69.default.createElement("div", { className: "shrink-0 flex flex-col items-end gap-1 text-right" }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] text-neutral-400" }, "Joined"), /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[12px] text-black" }, formatDate(ref.joinedAt)))
4260
4022
  ))), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center justify-between pt-6 mt-2 " }, /* @__PURE__ */ import_react69.default.createElement("span", { className: "text-[11px] text-neutral-400 tracking-[0.2em]" }, "Page ", currentPage, " of ", totalPages === 0 ? 1 : totalPages), /* @__PURE__ */ import_react69.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react69.default.createElement(
4261
4023
  "button",
4262
4024
  {