@embarkai/ui-kit 0.4.58 → 0.4.60
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +96 -89
- package/dist/index.cjs +1364 -1230
- package/dist/index.d.cts +28 -41
- package/dist/index.d.ts +28 -41
- package/dist/index.js +767 -639
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -197,6 +197,9 @@ var init_initial = __esm({
|
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
// src/lib/errors.ts
|
|
200
|
+
function isSessionExpiredError(error) {
|
|
201
|
+
return typeof error === "object" && error !== null && error.code === ErrorCodes.SESSION_EXPIRED;
|
|
202
|
+
}
|
|
200
203
|
function createAccountAbstractionError(params) {
|
|
201
204
|
const { message, code } = params;
|
|
202
205
|
if (!code) {
|
|
@@ -205,11 +208,13 @@ function createAccountAbstractionError(params) {
|
|
|
205
208
|
switch (code) {
|
|
206
209
|
case UserRejectedError.CODE:
|
|
207
210
|
return new UserRejectedError(message);
|
|
211
|
+
case SessionExpiredError.CODE:
|
|
212
|
+
return new SessionExpiredError(message);
|
|
208
213
|
default:
|
|
209
214
|
return new AccountAbstractionError(message, code);
|
|
210
215
|
}
|
|
211
216
|
}
|
|
212
|
-
var AccountAbstractionError, UserRejectedError, ErrorCodes;
|
|
217
|
+
var AccountAbstractionError, UserRejectedError, SessionExpiredError, ErrorCodes;
|
|
213
218
|
var init_errors = __esm({
|
|
214
219
|
"src/lib/errors.ts"() {
|
|
215
220
|
AccountAbstractionError = class _AccountAbstractionError extends Error {
|
|
@@ -231,9 +236,19 @@ var init_errors = __esm({
|
|
|
231
236
|
this.name = "UserRejectedError";
|
|
232
237
|
}
|
|
233
238
|
};
|
|
239
|
+
SessionExpiredError = class _SessionExpiredError extends AccountAbstractionError {
|
|
240
|
+
static {
|
|
241
|
+
this.CODE = "SESSION_EXPIRED";
|
|
242
|
+
}
|
|
243
|
+
constructor(message = "Session expired, please log in again") {
|
|
244
|
+
super(message, _SessionExpiredError.CODE);
|
|
245
|
+
this.name = "SessionExpiredError";
|
|
246
|
+
}
|
|
247
|
+
};
|
|
234
248
|
ErrorCodes = {
|
|
235
249
|
MPC_SIGNING_ERROR: "MPC_SIGNING_ERROR",
|
|
236
|
-
USER_REJECTED: UserRejectedError.CODE
|
|
250
|
+
USER_REJECTED: UserRejectedError.CODE,
|
|
251
|
+
SESSION_EXPIRED: SessionExpiredError.CODE
|
|
237
252
|
};
|
|
238
253
|
}
|
|
239
254
|
});
|
|
@@ -659,7 +674,10 @@ async function ensureDkgAndGetOwner(userId, _clientSeedHex) {
|
|
|
659
674
|
};
|
|
660
675
|
}
|
|
661
676
|
await iframeManager.authenticate(userId);
|
|
662
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
677
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
678
|
+
if (await ensureFreshSession2(jwtTokenManager4) === "session_dead") {
|
|
679
|
+
throw new SessionExpiredError();
|
|
680
|
+
}
|
|
663
681
|
let accessToken = jwtTokenManager4.getAccessToken();
|
|
664
682
|
if (!accessToken) {
|
|
665
683
|
console.warn("[iframe-mpc-client] No access token available for DKG, attempting cookie-based session");
|
|
@@ -691,8 +709,12 @@ async function signDigestWithMpc(userId, digest32, userOpDetails) {
|
|
|
691
709
|
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
|
|
692
710
|
try {
|
|
693
711
|
const iframeManager = getIframeManager();
|
|
694
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
712
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
713
|
+
const session = await ensureFreshSession2(jwtTokenManager4);
|
|
695
714
|
const accessToken = jwtTokenManager4.getAccessToken();
|
|
715
|
+
if (session === "session_dead") {
|
|
716
|
+
throw new SessionExpiredError();
|
|
717
|
+
}
|
|
696
718
|
if (!accessToken) {
|
|
697
719
|
throw new Error("No access token available for signing");
|
|
698
720
|
}
|
|
@@ -751,8 +773,12 @@ async function signTypedDataWithMpc(userId, digest32, typedData) {
|
|
|
751
773
|
digest32
|
|
752
774
|
});
|
|
753
775
|
const iframeManager = getIframeManager();
|
|
754
|
-
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
776
|
+
const { jwtTokenManager: jwtTokenManager4, ensureFreshSession: ensureFreshSession2 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
777
|
+
const session = await ensureFreshSession2(jwtTokenManager4);
|
|
755
778
|
const accessToken = jwtTokenManager4.getAccessToken();
|
|
779
|
+
if (session === "session_dead") {
|
|
780
|
+
throw new SessionExpiredError();
|
|
781
|
+
}
|
|
756
782
|
if (!accessToken) {
|
|
757
783
|
console.error("[signTypedDataWithMpc] No access token available");
|
|
758
784
|
throw new Error("No access token available for signing");
|
|
@@ -816,8 +842,8 @@ var init_constants = __esm({
|
|
|
816
842
|
MAX_CONTENT_HEIGHT = 640;
|
|
817
843
|
MAIN_DIALOG_ANIMATION_SPEED = 375;
|
|
818
844
|
Y_ANIMATION_SETUP = { duration: 0.15, ease: "easeInOut", height: { duration: 0.375 } };
|
|
819
|
-
BLOCKSCOUT_QUERY_STALE_TIME =
|
|
820
|
-
BLOCKSCOUT_QUERY_GC_TIME =
|
|
845
|
+
BLOCKSCOUT_QUERY_STALE_TIME = 3e4;
|
|
846
|
+
BLOCKSCOUT_QUERY_GC_TIME = 3e5;
|
|
821
847
|
BLOCKSCOUT_REFRESH_DEBOUNCE = 2e3;
|
|
822
848
|
IPFS_GATEWAY = "https://ipfs.io/ipfs/";
|
|
823
849
|
PROVIDERS_META = {
|
|
@@ -841,31 +867,31 @@ var PageKey, useLayoutDataStore;
|
|
|
841
867
|
var init_useLayoutDataStore = __esm({
|
|
842
868
|
"src/internal/hooks/useLayoutDataStore.ts"() {
|
|
843
869
|
init_constants();
|
|
844
|
-
PageKey = /* @__PURE__ */ ((
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
return
|
|
870
|
+
PageKey = /* @__PURE__ */ ((PageKey3) => {
|
|
871
|
+
PageKey3["AUTH"] = "auth";
|
|
872
|
+
PageKey3["LANGUAGES"] = "languages";
|
|
873
|
+
PageKey3["TERMS_OF_SERVICE"] = "terms-of-service";
|
|
874
|
+
PageKey3["MAIN_MENU"] = "main-menu";
|
|
875
|
+
PageKey3["SETTINGS"] = "settings";
|
|
876
|
+
PageKey3["SEND"] = "send";
|
|
877
|
+
PageKey3["RECEIVE"] = "receive";
|
|
878
|
+
PageKey3["BUY"] = "buy";
|
|
879
|
+
PageKey3["KYC"] = "kyc";
|
|
880
|
+
PageKey3["TRANSACTIONS"] = "transactions";
|
|
881
|
+
PageKey3["ASSETS"] = "assets";
|
|
882
|
+
PageKey3["MANAGE_WALLET"] = "manage-wallet";
|
|
883
|
+
PageKey3["UNLINK_PROVIDER"] = "unlink-provider";
|
|
884
|
+
PageKey3["SECURITY"] = "security";
|
|
885
|
+
PageKey3["KEYSARE_BACKUP"] = "keysare-backup";
|
|
886
|
+
PageKey3["KEYSHARE_RESTORE"] = "keyshare-restore";
|
|
887
|
+
PageKey3["CHAIN"] = "chain";
|
|
888
|
+
PageKey3["CHAIN_SWITCH_REQUEST"] = "chain-switch-request";
|
|
889
|
+
PageKey3["NICKNAME_SETTINGS"] = "nickname-settings";
|
|
890
|
+
PageKey3["DEVICES"] = "devices";
|
|
891
|
+
PageKey3["DEVICE_LINK"] = "device-link";
|
|
892
|
+
PageKey3["DEVICE_MANAGE"] = "device-manage";
|
|
893
|
+
PageKey3["DEVICE_RESTORE"] = "device-restore";
|
|
894
|
+
return PageKey3;
|
|
869
895
|
})(PageKey || {});
|
|
870
896
|
useLayoutDataStore = create((set) => ({
|
|
871
897
|
page: null,
|
|
@@ -908,92 +934,88 @@ var init_useLayoutDataStore = __esm({
|
|
|
908
934
|
});
|
|
909
935
|
|
|
910
936
|
// src/internal/components/BalanceFeedProvider/BalanceFeedProvider.tsx
|
|
937
|
+
import { NON_BLOCKSCOUT_CORE_TOKENS } from "@embarkai/core/read";
|
|
911
938
|
import { useQuery } from "@tanstack/react-query";
|
|
912
939
|
import { useEffect, useState } from "react";
|
|
913
|
-
import { formatUnits } from "viem";
|
|
940
|
+
import { erc20Abi, formatUnits } from "viem";
|
|
914
941
|
async function getAssetRate(symbol = "LUMIA", fiat = "USDT") {
|
|
915
942
|
if (SKIP_SYMBOLS.includes(symbol) || symbol === fiat) return { symbol, price: "1" };
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
943
|
+
try {
|
|
944
|
+
const assetURL = `https://api.binance.com/api/v3/ticker/price?symbol=${symbol.toUpperCase()}${fiat.toUpperCase()}`;
|
|
945
|
+
const response = await fetch(assetURL);
|
|
946
|
+
return await response.json();
|
|
947
|
+
} catch (err) {
|
|
948
|
+
console.warn("[BALANCE FEED] Failed to fetch asset rate:", { symbol, fiat, error: err });
|
|
949
|
+
return { symbol, price: "1" };
|
|
950
|
+
}
|
|
919
951
|
}
|
|
920
952
|
function BalanceFeedProvider() {
|
|
921
953
|
const config = useProviderConfig().config;
|
|
922
954
|
const address = useSession((st) => st.address);
|
|
923
955
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
924
956
|
const publicClient = useSession((st) => st.publicClient);
|
|
925
|
-
const { setCryptoRate, setFiatBalance, setBalance, setCryptoSymbol, setFiatSymbol } = useLayoutDataStore();
|
|
926
957
|
const [balanceSymbol, setBalanceSymbol] = useState(null);
|
|
927
|
-
useEffect(
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
const { data:
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
958
|
+
useEffect(
|
|
959
|
+
() => setBalanceSymbol(config?.current?.showBalanceAs || chainConfig.nativeCurrency.symbol),
|
|
960
|
+
[config, address, chainConfig]
|
|
961
|
+
);
|
|
962
|
+
useEffect(
|
|
963
|
+
() => useLayoutDataStore.getState().setCryptoSymbol(chainConfig?.nativeCurrency?.symbol || "LUMIA"),
|
|
964
|
+
[chainConfig]
|
|
965
|
+
);
|
|
966
|
+
const { data: cryptoRate } = useQuery({
|
|
967
|
+
queryKey: [LUMIA_RATE_QUERY_KEY, address, balanceSymbol],
|
|
968
|
+
enabled: !!address && !!balanceSymbol,
|
|
969
|
+
refetchInterval: BALANCE_POLLING_INTERVAL * 2,
|
|
970
|
+
queryFn: async () => await getAssetRate(balanceSymbol, "USDT")
|
|
971
|
+
});
|
|
972
|
+
const isNativeBalanceFeedEnabled = !!balanceSymbol && !!chainConfig?.nativeCurrency.symbol && balanceSymbol === chainConfig?.nativeCurrency.symbol;
|
|
973
|
+
const { data: nativeBalance } = useQuery({
|
|
974
|
+
enabled: !!isNativeBalanceFeedEnabled && !!address && !!publicClient,
|
|
975
|
+
retry: false,
|
|
939
976
|
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
977
|
+
queryKey: [NATIVE_BALANCE_QUERY_KEY, address, chainConfig?.nativeCurrency?.symbol],
|
|
978
|
+
// Include chainId in query key to refetch when chain changes
|
|
940
979
|
queryFn: async () => {
|
|
941
|
-
if (!address || !publicClient) return null;
|
|
942
980
|
const balanceValue = await publicClient.getBalance({ address });
|
|
943
981
|
return {
|
|
944
982
|
decimals: chainConfig?.nativeCurrency?.decimals || 18,
|
|
945
983
|
formatted: formatUnits(balanceValue, chainConfig?.nativeCurrency?.decimals || 18),
|
|
946
|
-
symbol:
|
|
984
|
+
symbol: chainConfig?.nativeCurrency?.symbol || "LUMIA",
|
|
947
985
|
value: balanceValue
|
|
948
986
|
};
|
|
949
987
|
}
|
|
950
988
|
});
|
|
951
989
|
useEffect(() => {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
958
|
-
queryFn: async () => getAssetRate(nativeSymbol, "USDT")
|
|
959
|
-
});
|
|
960
|
-
useEffect(() => {
|
|
961
|
-
const rate = cryptoRate ? Number(cryptoRate.price) : null;
|
|
962
|
-
if (!isNativeBalanceFeedEnabled || !balance || !rate) return;
|
|
963
|
-
const fiatBalanceValue = Number(formatUnits(BigInt(balance.value || "0"), balance.decimals || 18));
|
|
990
|
+
if (!isNativeBalanceFeedEnabled) return;
|
|
991
|
+
const nativeSymbol = chainConfig?.nativeCurrency?.symbol || "LUMIA";
|
|
992
|
+
const rate = Number(cryptoRate?.price || "1");
|
|
993
|
+
const formattedBalance = Number(formatUnits(BigInt(nativeBalance?.value || "0"), nativeBalance?.decimals || 18));
|
|
994
|
+
const { setCryptoRate, setFiatBalance, setBalance, setCryptoSymbol, setFiatSymbol } = useLayoutDataStore.getState();
|
|
964
995
|
setCryptoRate(rate);
|
|
965
996
|
setCryptoSymbol(nativeSymbol);
|
|
966
997
|
setFiatSymbol("USD");
|
|
967
|
-
setFiatBalance(
|
|
968
|
-
setBalance(
|
|
969
|
-
}, [
|
|
970
|
-
isNativeBalanceFeedEnabled,
|
|
971
|
-
balance,
|
|
972
|
-
cryptoRate,
|
|
973
|
-
nativeSymbol,
|
|
974
|
-
setFiatBalance,
|
|
975
|
-
setCryptoRate,
|
|
976
|
-
setBalance,
|
|
977
|
-
setCryptoSymbol,
|
|
978
|
-
setFiatSymbol
|
|
979
|
-
]);
|
|
998
|
+
setFiatBalance(formattedBalance * rate);
|
|
999
|
+
setBalance(nativeBalance || { decimals: 18, formatted: "0", symbol: nativeSymbol, value: BigInt(0) });
|
|
1000
|
+
}, [isNativeBalanceFeedEnabled, nativeBalance, cryptoRate, chainConfig]);
|
|
980
1001
|
const {
|
|
981
|
-
balanceQuery:
|
|
982
|
-
balanceQueryKey:
|
|
983
|
-
symbol:
|
|
984
|
-
} = config.current?.projectAssets?.assets?.find((a) => a.symbol === config.current?.
|
|
985
|
-
const
|
|
986
|
-
const { data:
|
|
1002
|
+
balanceQuery: projectAssetBalanceQueryFn,
|
|
1003
|
+
balanceQueryKey: PROJECT_ASSET_BALANCE_QUERY_KEY,
|
|
1004
|
+
symbol: projectAssetAssetSymbol
|
|
1005
|
+
} = config.current?.projectAssets?.assets?.find((a) => a.symbol === config.current?.showBalanceAs) || {};
|
|
1006
|
+
const isProjectAssetBalanceEnabled = !!balanceSymbol && !!projectAssetAssetSymbol && balanceSymbol === projectAssetAssetSymbol;
|
|
1007
|
+
const { data: projectAssetBalance } = useQuery({
|
|
987
1008
|
retry: false,
|
|
988
1009
|
refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
989
|
-
enabled: !!address && !!
|
|
990
|
-
queryKey:
|
|
1010
|
+
enabled: !!address && !!isProjectAssetBalanceEnabled,
|
|
1011
|
+
queryKey: PROJECT_ASSET_BALANCE_QUERY_KEY,
|
|
991
1012
|
// should be invalidated by host app via provided queryKey
|
|
992
|
-
queryFn: async () => await
|
|
1013
|
+
queryFn: async () => await projectAssetBalanceQueryFn?.()
|
|
993
1014
|
});
|
|
994
1015
|
useEffect(() => {
|
|
995
|
-
if (!
|
|
996
|
-
const { cryptoFiatRate, fiatFormatted, cryptoFormatted, cryptoSymbol, fiatSymbol } =
|
|
1016
|
+
if (!isProjectAssetBalanceEnabled || !projectAssetBalance) return;
|
|
1017
|
+
const { cryptoFiatRate, fiatFormatted, cryptoFormatted, cryptoSymbol, fiatSymbol } = projectAssetBalance;
|
|
1018
|
+
const { setCryptoRate, setFiatBalance, setBalance, setCryptoSymbol, setFiatSymbol } = useLayoutDataStore.getState();
|
|
997
1019
|
if (!!cryptoSymbol) setCryptoSymbol(cryptoSymbol?.toUpperCase());
|
|
998
1020
|
if (!!fiatSymbol) setFiatSymbol(fiatSymbol?.toUpperCase());
|
|
999
1021
|
setCryptoRate(cryptoFiatRate || 1);
|
|
@@ -1001,31 +1023,71 @@ function BalanceFeedProvider() {
|
|
|
1001
1023
|
setBalance({
|
|
1002
1024
|
decimals: 18,
|
|
1003
1025
|
formatted: cryptoFormatted?.toString() || "0",
|
|
1004
|
-
symbol: cryptoSymbol?.toUpperCase()
|
|
1026
|
+
symbol: cryptoSymbol?.toUpperCase(),
|
|
1005
1027
|
value: BigInt(Math.floor((cryptoFormatted || 0) * 10 ** 18))
|
|
1006
1028
|
});
|
|
1007
|
-
}, [
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1029
|
+
}, [isProjectAssetBalanceEnabled, projectAssetBalance]);
|
|
1030
|
+
const isCustomAssetBalanceEnabled = !isNativeBalanceFeedEnabled && !isProjectAssetBalanceEnabled;
|
|
1031
|
+
const { data: customBalance } = useQuery({
|
|
1032
|
+
// enabled: !!isCustomAssetBalanceEnabled && !!balanceSymbol && !!chainConfig?.id && !!address && !!publicClient,
|
|
1033
|
+
enabled: true,
|
|
1034
|
+
// retry: false,
|
|
1035
|
+
// refetchInterval: BALANCE_POLLING_INTERVAL,
|
|
1036
|
+
staleTime: 0,
|
|
1037
|
+
queryKey: [CUSTOM_BALANCE_QUERY_KEY, chainConfig?.id, address, balanceSymbol],
|
|
1038
|
+
// Include chainId in query key to refetch when chain changes
|
|
1039
|
+
queryFn: async () => {
|
|
1040
|
+
const coreTokenList = NON_BLOCKSCOUT_CORE_TOKENS[chainConfig?.id] || [];
|
|
1041
|
+
const watchTokensList = (config?.current?.watchTokens?.[chainConfig?.id] || []).map((el) => ({
|
|
1042
|
+
address: el.address,
|
|
1043
|
+
decimals: el.decimals,
|
|
1044
|
+
symbol: el.symbol
|
|
1045
|
+
}));
|
|
1046
|
+
const customAssetList = [...watchTokensList, ...coreTokenList];
|
|
1047
|
+
const { address: customAssetAddress, decimals: customAssetADecimals } = customAssetList.find((el) => el.symbol === balanceSymbol) || {};
|
|
1048
|
+
if (!customAssetAddress) {
|
|
1049
|
+
console.warn(`[BALANCE FEED] No token address found for symbol ${balanceSymbol} on chain ${chainConfig?.name}`);
|
|
1050
|
+
return { decimals: 18, formatted: "0", symbol: balanceSymbol, value: BigInt(0) };
|
|
1051
|
+
}
|
|
1052
|
+
const balanceValue = await await publicClient.readContract({
|
|
1053
|
+
address: customAssetAddress,
|
|
1054
|
+
abi: erc20Abi,
|
|
1055
|
+
functionName: "balanceOf",
|
|
1056
|
+
args: [address],
|
|
1057
|
+
authorizationList: void 0
|
|
1058
|
+
});
|
|
1059
|
+
return {
|
|
1060
|
+
decimals: customAssetADecimals || 18,
|
|
1061
|
+
formatted: formatUnits(balanceValue, customAssetADecimals || 18),
|
|
1062
|
+
symbol: balanceSymbol,
|
|
1063
|
+
value: balanceValue
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
useEffect(() => {
|
|
1068
|
+
if (!isCustomAssetBalanceEnabled || !customBalance) return;
|
|
1069
|
+
const rate = Number(cryptoRate?.price || "1");
|
|
1070
|
+
const formattedBalance = Number(formatUnits(BigInt(customBalance?.value || "0"), customBalance?.decimals || 18));
|
|
1071
|
+
const { setCryptoRate, setFiatBalance, setBalance, setCryptoSymbol, setFiatSymbol } = useLayoutDataStore.getState();
|
|
1072
|
+
setCryptoRate(rate);
|
|
1073
|
+
setCryptoSymbol(customBalance.symbol);
|
|
1074
|
+
setFiatSymbol("USD");
|
|
1075
|
+
setFiatBalance(formattedBalance * rate);
|
|
1076
|
+
setBalance(customBalance);
|
|
1077
|
+
}, [isCustomAssetBalanceEnabled, customBalance, cryptoRate]);
|
|
1017
1078
|
return null;
|
|
1018
1079
|
}
|
|
1019
|
-
var BALANCE_POLLING_INTERVAL,
|
|
1080
|
+
var BALANCE_POLLING_INTERVAL, NATIVE_BALANCE_QUERY_KEY, CUSTOM_BALANCE_QUERY_KEY, LUMIA_RATE_QUERY_KEY, SKIP_SYMBOLS;
|
|
1020
1081
|
var init_BalanceFeedProvider = __esm({
|
|
1021
1082
|
"src/internal/components/BalanceFeedProvider/BalanceFeedProvider.tsx"() {
|
|
1022
1083
|
init_ProviderContext();
|
|
1023
1084
|
init_SessionContext();
|
|
1024
1085
|
init_useLayoutDataStore();
|
|
1025
1086
|
BALANCE_POLLING_INTERVAL = 3e4;
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
LUMIA_RATE_QUERY_KEY = "
|
|
1087
|
+
NATIVE_BALANCE_QUERY_KEY = "embarkai-native-balance-query-key";
|
|
1088
|
+
CUSTOM_BALANCE_QUERY_KEY = "embarkai-custom-balance-query-key";
|
|
1089
|
+
LUMIA_RATE_QUERY_KEY = "lembarkai-root-balance-rate-query-key";
|
|
1090
|
+
SKIP_SYMBOLS = ["TEST", "USDT", "P"];
|
|
1029
1091
|
}
|
|
1030
1092
|
});
|
|
1031
1093
|
|
|
@@ -8790,19 +8852,15 @@ function useBuyMenuParams() {
|
|
|
8790
8852
|
useEffect12(() => {
|
|
8791
8853
|
const { pageParams, setPageParams } = useLayoutDataStore.getState();
|
|
8792
8854
|
if (!pageParams || !keys(pageParams).length) return;
|
|
8793
|
-
const { amount, crypto: crypto2,
|
|
8855
|
+
const { amount, crypto: crypto2, onRampWidgetRedirected } = pageParams || {};
|
|
8794
8856
|
switch (true) {
|
|
8795
8857
|
case !!amount:
|
|
8796
8858
|
useBuyMenuStore.getState().setSrcInputAmount(amount);
|
|
8797
8859
|
useBuyMenuStore.getState().setSrcQueryAmount(amount);
|
|
8798
8860
|
case !!crypto2:
|
|
8799
8861
|
useBuyMenuStore.getState().setSelectedCrypto(crypto2);
|
|
8800
|
-
case !!toWalletAddress:
|
|
8801
|
-
useBuyMenuStore.getState().setToWalletAddress(toWalletAddress);
|
|
8802
8862
|
case !!onRampWidgetRedirected:
|
|
8803
8863
|
useBuyMenuStore.getState().setOnRampWidgetRedirectedFn(onRampWidgetRedirected);
|
|
8804
|
-
case !!confirmationMessage:
|
|
8805
|
-
useBuyMenuStore.getState().setConfirmationMessage(confirmationMessage);
|
|
8806
8864
|
}
|
|
8807
8865
|
setPageParams(null);
|
|
8808
8866
|
}, []);
|
|
@@ -8825,8 +8883,8 @@ var init_useBuyMenuStore = __esm({
|
|
|
8825
8883
|
(set) => ({
|
|
8826
8884
|
renderKey: "default-initial-buy-menu-render-key",
|
|
8827
8885
|
setRenderKey: (key) => set({ renderKey: key }),
|
|
8828
|
-
toWalletAddress: null,
|
|
8829
|
-
setToWalletAddress: (toWalletAddress) => set({ toWalletAddress }),
|
|
8886
|
+
// toWalletAddress: null,
|
|
8887
|
+
// setToWalletAddress: (toWalletAddress) => set({ toWalletAddress }),
|
|
8830
8888
|
/** boolean flags */
|
|
8831
8889
|
isTransactionHistory: false,
|
|
8832
8890
|
setIsTransactionHistory: (isTransactionHistory) => {
|
|
@@ -8878,8 +8936,6 @@ var init_useBuyMenuStore = __esm({
|
|
|
8878
8936
|
/** */
|
|
8879
8937
|
onRampWidgetRedirected: noop,
|
|
8880
8938
|
setOnRampWidgetRedirectedFn: (cb) => set({ onRampWidgetRedirected: cb }),
|
|
8881
|
-
confirmationMessage: null,
|
|
8882
|
-
setConfirmationMessage: (message) => set({ confirmationMessage: message }),
|
|
8883
8939
|
error: null,
|
|
8884
8940
|
setError: (error) => set({ error })
|
|
8885
8941
|
}),
|
|
@@ -9460,61 +9516,6 @@ var init_api = __esm({
|
|
|
9460
9516
|
}
|
|
9461
9517
|
});
|
|
9462
9518
|
|
|
9463
|
-
// src/internal/utils/cn.ts
|
|
9464
|
-
import { clsx as clsx2 } from "clsx";
|
|
9465
|
-
function cn2(...inputs) {
|
|
9466
|
-
return twMerge(clsx2(inputs));
|
|
9467
|
-
}
|
|
9468
|
-
var init_cn = __esm({
|
|
9469
|
-
"src/internal/utils/cn.ts"() {
|
|
9470
|
-
init_bundle_mjs();
|
|
9471
|
-
}
|
|
9472
|
-
});
|
|
9473
|
-
|
|
9474
|
-
// src/internal/components/ui/badge.tsx
|
|
9475
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
9476
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
9477
|
-
function Badge(props) {
|
|
9478
|
-
const { className, variant = "secondary", size = "default", ...rest } = props;
|
|
9479
|
-
return /* @__PURE__ */ jsx36("span", { ...rest, className: cn2(badgeVariants({ variant, size }), className) });
|
|
9480
|
-
}
|
|
9481
|
-
var badgeVariants;
|
|
9482
|
-
var init_badge = __esm({
|
|
9483
|
-
"src/internal/components/ui/badge.tsx"() {
|
|
9484
|
-
init_cn();
|
|
9485
|
-
badgeVariants = cva2(
|
|
9486
|
-
cn2(
|
|
9487
|
-
//
|
|
9488
|
-
"inline-flex items-center",
|
|
9489
|
-
"border font-semibold",
|
|
9490
|
-
"select-none"
|
|
9491
|
-
),
|
|
9492
|
-
{
|
|
9493
|
-
variants: {
|
|
9494
|
-
variant: {
|
|
9495
|
-
outline: "border-[var(--ui-kit-bd)] bg-transparent text-[var(--ui-kit-fg)]",
|
|
9496
|
-
secondary: "border-[var(--ui-kit-secondary)] bg-[var(--ui-kit-secondary)] text-[var(--ui-kit-fg)]",
|
|
9497
|
-
destructive: "border-[var(--ui-kit-bg-error)] bg-[var(--ui-kit-bg-error)] text-[var(--ui-kit-error)]",
|
|
9498
|
-
success: "border-[var(--ui-kit-bg-success)] bg-[var(--ui-kit-bg-success)] text-[var(--ui-kit-success)]",
|
|
9499
|
-
warning: "border-[var(--ui-kit-bg-warning)] bg-[var(--ui-kit-bg-warning)] text-[var(--ui-kit-warning)]"
|
|
9500
|
-
},
|
|
9501
|
-
size: {
|
|
9502
|
-
default: "h-5 px-2 rounded-full text-[10px] gap-[var(--ui-kit-gap)]",
|
|
9503
|
-
medium: "h-8 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] text-sm gap-[var(--ui-kit-gap)]",
|
|
9504
|
-
large: cn2(
|
|
9505
|
-
"whitespace-nowrap text-sm font-semibold font-sans",
|
|
9506
|
-
"h-12 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)]"
|
|
9507
|
-
)
|
|
9508
|
-
}
|
|
9509
|
-
},
|
|
9510
|
-
defaultVariants: {
|
|
9511
|
-
variant: "secondary"
|
|
9512
|
-
}
|
|
9513
|
-
}
|
|
9514
|
-
);
|
|
9515
|
-
}
|
|
9516
|
-
});
|
|
9517
|
-
|
|
9518
9519
|
// src/internal/components/BuyMenu/binance/config.ts
|
|
9519
9520
|
import { BSC_MAINNET_CHAIN_ID, LUMIA_MAINNET_CHAIN_ID } from "@embarkai/core/read";
|
|
9520
9521
|
var CHAIN_ID_TO_BINANCE_NETWORK_TICKER;
|
|
@@ -9530,29 +9531,21 @@ var init_config = __esm({
|
|
|
9530
9531
|
// src/internal/components/BuyMenu/binance/BinanceSummary.tsx
|
|
9531
9532
|
import { useMutation as useMutation5, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
9532
9533
|
import { InfoIcon as InfoIcon3, LoaderIcon } from "lucide-react";
|
|
9533
|
-
import { jsx as
|
|
9534
|
+
import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
9534
9535
|
function BinanceSummary(props) {
|
|
9535
9536
|
const { payment } = props;
|
|
9536
9537
|
const qc = useQueryClient3();
|
|
9537
9538
|
const { t } = useT();
|
|
9538
9539
|
const embarkaiAddress = useSession((st) => st.address);
|
|
9539
9540
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
9540
|
-
const {
|
|
9541
|
-
toWalletAddress,
|
|
9542
|
-
selectedFiat,
|
|
9543
|
-
selectedCrypto,
|
|
9544
|
-
srcQueryAmount,
|
|
9545
|
-
redirecting,
|
|
9546
|
-
confirmationMessage,
|
|
9547
|
-
setRedirecting
|
|
9548
|
-
} = useBuyMenuStore();
|
|
9541
|
+
const { selectedFiat, selectedCrypto, srcQueryAmount, redirecting, setRedirecting } = useBuyMenuStore();
|
|
9549
9542
|
const quoteData = useBinanceStore((st) => st.quoteData);
|
|
9550
9543
|
const cryptoToRecieve = Number(quoteData?.totalAmount || "0");
|
|
9551
9544
|
const { mutate: checkoutFundWalletOrder, isPending: isFundWalletOrderCheckouting } = useMutation5({
|
|
9552
9545
|
mutationFn: async () => {
|
|
9553
9546
|
setRedirecting(true);
|
|
9554
9547
|
return await createPreorderMutation({
|
|
9555
|
-
address:
|
|
9548
|
+
address: embarkaiAddress,
|
|
9556
9549
|
amountType: 1,
|
|
9557
9550
|
requestedAmount: String(srcQueryAmount),
|
|
9558
9551
|
fiatCurrency: selectedFiat,
|
|
@@ -9592,14 +9585,14 @@ function BinanceSummary(props) {
|
|
|
9592
9585
|
});
|
|
9593
9586
|
const isContinueDisabled = !!redirecting || !!isFundWalletOrderCheckouting || !quoteData;
|
|
9594
9587
|
if (!quoteData) {
|
|
9595
|
-
return /* @__PURE__ */
|
|
9596
|
-
/* @__PURE__ */
|
|
9597
|
-
/* @__PURE__ */
|
|
9588
|
+
return /* @__PURE__ */ jsx36("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: /* @__PURE__ */ jsxs31(Highlight, { type: "warning", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
9589
|
+
/* @__PURE__ */ jsx36(InfoIcon3, { className: "w-4 h-4" }),
|
|
9590
|
+
/* @__PURE__ */ jsx36("span", { children: t("passport:common.errors.oops") })
|
|
9598
9591
|
] }) });
|
|
9599
9592
|
}
|
|
9600
9593
|
return /* @__PURE__ */ jsxs31("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
9601
9594
|
/* @__PURE__ */ jsxs31("div", { className: "flex justify-between text-xs leading-5", children: [
|
|
9602
|
-
/* @__PURE__ */
|
|
9595
|
+
/* @__PURE__ */ jsx36("span", { className: "", children: t("passport:common.amount") }),
|
|
9603
9596
|
/* @__PURE__ */ jsxs31("span", { className: "font-bold", children: [
|
|
9604
9597
|
formatPrice(srcQueryAmount),
|
|
9605
9598
|
" ",
|
|
@@ -9607,7 +9600,7 @@ function BinanceSummary(props) {
|
|
|
9607
9600
|
] })
|
|
9608
9601
|
] }),
|
|
9609
9602
|
/* @__PURE__ */ jsxs31("div", { className: "flex justify-between text-xs leading-5", children: [
|
|
9610
|
-
/* @__PURE__ */
|
|
9603
|
+
/* @__PURE__ */ jsx36("span", { className: "", children: t("passport:buyMenu.summary.youReceive") }),
|
|
9611
9604
|
/* @__PURE__ */ jsxs31("span", { className: "font-bold", children: [
|
|
9612
9605
|
formatPrice(cryptoToRecieve),
|
|
9613
9606
|
" ",
|
|
@@ -9616,7 +9609,7 @@ function BinanceSummary(props) {
|
|
|
9616
9609
|
] }),
|
|
9617
9610
|
/* @__PURE__ */ jsxs31(Highlight, { type: "info", className: "", children: [
|
|
9618
9611
|
/* @__PURE__ */ jsxs31("p", { className: "flex justify-between gap-[var(--ui-kit-gap)] leading-5", children: [
|
|
9619
|
-
/* @__PURE__ */
|
|
9612
|
+
/* @__PURE__ */ jsx36("span", { children: t("passport:buyMenu.summary.networkFee") }),
|
|
9620
9613
|
/* @__PURE__ */ jsxs31("strong", { children: [
|
|
9621
9614
|
formatPrice(Number(quoteData?.networkFee || "0")),
|
|
9622
9615
|
" ",
|
|
@@ -9624,7 +9617,7 @@ function BinanceSummary(props) {
|
|
|
9624
9617
|
] })
|
|
9625
9618
|
] }),
|
|
9626
9619
|
/* @__PURE__ */ jsxs31("p", { className: "flex justify-between gap-[var(--ui-kit-gap)] leading-5", children: [
|
|
9627
|
-
/* @__PURE__ */
|
|
9620
|
+
/* @__PURE__ */ jsx36("span", { children: t("passport:buyMenu.summary.serviceFee") }),
|
|
9628
9621
|
/* @__PURE__ */ jsxs31("strong", { children: [
|
|
9629
9622
|
formatPrice(Number(quoteData?.feeAmount || "0")),
|
|
9630
9623
|
" ",
|
|
@@ -9632,16 +9625,8 @@ function BinanceSummary(props) {
|
|
|
9632
9625
|
] })
|
|
9633
9626
|
] }),
|
|
9634
9627
|
/* @__PURE__ */ jsxs31("p", { className: "flex justify-between gap-[var(--ui-kit-gap)] leading-5", children: [
|
|
9635
|
-
/* @__PURE__ */
|
|
9636
|
-
/* @__PURE__ */
|
|
9637
|
-
] })
|
|
9638
|
-
] }),
|
|
9639
|
-
toWalletAddress && /* @__PURE__ */ jsxs31(Highlight, { type: "warning", children: [
|
|
9640
|
-
/* @__PURE__ */ jsx37("p", { className: "font-bold leading-6", children: t("passport:buyMenu.summary.toAddress.receiver") }),
|
|
9641
|
-
/* @__PURE__ */ jsx37(Badge, { variant: "secondary", size: "medium", className: "w-full text-center justify-center text-[10px]", children: /* @__PURE__ */ jsx37("span", { className: "truncate leading-4", children: toWalletAddress }) }),
|
|
9642
|
-
!!confirmationMessage ? /* @__PURE__ */ jsx37("p", { className: "leading-5", children: confirmationMessage }) : /* @__PURE__ */ jsxs31("p", { className: "leading-4", children: [
|
|
9643
|
-
/* @__PURE__ */ jsx37("span", { children: t("passport:buyMenu.summary.toAddress.message") }),
|
|
9644
|
-
/* @__PURE__ */ jsx37("span", { children: t("passport:buyMenu.summary.toAddress.suggestion") })
|
|
9628
|
+
/* @__PURE__ */ jsx36("span", { children: t("passport:buyMenu.selectPaymentMode") }),
|
|
9629
|
+
/* @__PURE__ */ jsx36("strong", { children: payment?.paymentMethod?.toUpperCase() })
|
|
9645
9630
|
] })
|
|
9646
9631
|
] }),
|
|
9647
9632
|
/* @__PURE__ */ jsxs31(
|
|
@@ -9653,8 +9638,8 @@ function BinanceSummary(props) {
|
|
|
9653
9638
|
variant: "default",
|
|
9654
9639
|
onClick: () => checkoutFundWalletOrder(),
|
|
9655
9640
|
children: [
|
|
9656
|
-
redirecting && /* @__PURE__ */
|
|
9657
|
-
/* @__PURE__ */
|
|
9641
|
+
redirecting && /* @__PURE__ */ jsx36(LoaderIcon, { size: 16, className: "animate-spin" }),
|
|
9642
|
+
/* @__PURE__ */ jsx36("span", { children: redirecting ? "REDIRECTING..." : String(t("passport:buyMenu.actions.confirmPurchase")).toUpperCase() }),
|
|
9658
9643
|
!!quoteData?.totalAmount && /* @__PURE__ */ jsxs31("strong", { children: [
|
|
9659
9644
|
formatPrice(Number(quoteData.totalAmount)),
|
|
9660
9645
|
" ",
|
|
@@ -9671,7 +9656,6 @@ var init_BinanceSummary = __esm({
|
|
|
9671
9656
|
init_SessionContext();
|
|
9672
9657
|
init_i18n();
|
|
9673
9658
|
init_priceFormatter();
|
|
9674
|
-
init_badge();
|
|
9675
9659
|
init_button();
|
|
9676
9660
|
init_highlight();
|
|
9677
9661
|
init_contants();
|
|
@@ -9683,6 +9667,61 @@ var init_BinanceSummary = __esm({
|
|
|
9683
9667
|
}
|
|
9684
9668
|
});
|
|
9685
9669
|
|
|
9670
|
+
// src/internal/utils/cn.ts
|
|
9671
|
+
import { clsx as clsx2 } from "clsx";
|
|
9672
|
+
function cn2(...inputs) {
|
|
9673
|
+
return twMerge(clsx2(inputs));
|
|
9674
|
+
}
|
|
9675
|
+
var init_cn = __esm({
|
|
9676
|
+
"src/internal/utils/cn.ts"() {
|
|
9677
|
+
init_bundle_mjs();
|
|
9678
|
+
}
|
|
9679
|
+
});
|
|
9680
|
+
|
|
9681
|
+
// src/internal/components/ui/badge.tsx
|
|
9682
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
9683
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
9684
|
+
function Badge(props) {
|
|
9685
|
+
const { className, variant = "secondary", size = "default", ...rest } = props;
|
|
9686
|
+
return /* @__PURE__ */ jsx37("span", { ...rest, className: cn2(badgeVariants({ variant, size }), className) });
|
|
9687
|
+
}
|
|
9688
|
+
var badgeVariants;
|
|
9689
|
+
var init_badge = __esm({
|
|
9690
|
+
"src/internal/components/ui/badge.tsx"() {
|
|
9691
|
+
init_cn();
|
|
9692
|
+
badgeVariants = cva2(
|
|
9693
|
+
cn2(
|
|
9694
|
+
//
|
|
9695
|
+
"inline-flex items-center",
|
|
9696
|
+
"border font-semibold",
|
|
9697
|
+
"select-none"
|
|
9698
|
+
),
|
|
9699
|
+
{
|
|
9700
|
+
variants: {
|
|
9701
|
+
variant: {
|
|
9702
|
+
outline: "border-[var(--ui-kit-bd)] bg-transparent text-[var(--ui-kit-fg)]",
|
|
9703
|
+
secondary: "border-[var(--ui-kit-secondary)] bg-[var(--ui-kit-secondary)] text-[var(--ui-kit-fg)]",
|
|
9704
|
+
destructive: "border-[var(--ui-kit-bg-error)] bg-[var(--ui-kit-bg-error)] text-[var(--ui-kit-error)]",
|
|
9705
|
+
success: "border-[var(--ui-kit-bg-success)] bg-[var(--ui-kit-bg-success)] text-[var(--ui-kit-success)]",
|
|
9706
|
+
warning: "border-[var(--ui-kit-bg-warning)] bg-[var(--ui-kit-bg-warning)] text-[var(--ui-kit-warning)]"
|
|
9707
|
+
},
|
|
9708
|
+
size: {
|
|
9709
|
+
default: "h-5 px-2 rounded-full text-[10px] gap-[var(--ui-kit-gap)]",
|
|
9710
|
+
medium: "h-8 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] text-sm gap-[var(--ui-kit-gap)]",
|
|
9711
|
+
large: cn2(
|
|
9712
|
+
"whitespace-nowrap text-sm font-semibold font-sans",
|
|
9713
|
+
"h-12 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)]"
|
|
9714
|
+
)
|
|
9715
|
+
}
|
|
9716
|
+
},
|
|
9717
|
+
defaultVariants: {
|
|
9718
|
+
variant: "secondary"
|
|
9719
|
+
}
|
|
9720
|
+
}
|
|
9721
|
+
);
|
|
9722
|
+
}
|
|
9723
|
+
});
|
|
9724
|
+
|
|
9686
9725
|
// src/internal/components/BuyMenu/binance/statuses.ts
|
|
9687
9726
|
import { values } from "lodash-es";
|
|
9688
9727
|
var STATUS_CODE_TO_MESSAGE, STATUSES_FILTERS;
|
|
@@ -9991,10 +10030,10 @@ var init_BinanceTxHistory = __esm({
|
|
|
9991
10030
|
|
|
9992
10031
|
// src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
|
|
9993
10032
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
9994
|
-
import { useEffect as useEffect14, useRef as
|
|
10033
|
+
import { useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
9995
10034
|
function useBinanceSseTxTracing(walletAddress) {
|
|
9996
10035
|
const qc = useQueryClient4();
|
|
9997
|
-
const debounceRef =
|
|
10036
|
+
const debounceRef = useRef9(null);
|
|
9998
10037
|
useEffect14(() => {
|
|
9999
10038
|
if (!walletAddress) return;
|
|
10000
10039
|
const iframeManager = getIframeManager();
|
|
@@ -10648,10 +10687,10 @@ var init_networks = __esm({
|
|
|
10648
10687
|
|
|
10649
10688
|
// src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
|
|
10650
10689
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
10651
|
-
import { useEffect as useEffect16, useRef as
|
|
10690
|
+
import { useEffect as useEffect16, useRef as useRef10 } from "react";
|
|
10652
10691
|
function useFinchpaySseTxTracing(walletAddress) {
|
|
10653
10692
|
const qc = useQueryClient6();
|
|
10654
|
-
const debounceRef =
|
|
10693
|
+
const debounceRef = useRef10(null);
|
|
10655
10694
|
useEffect16(() => {
|
|
10656
10695
|
if (!walletAddress) return;
|
|
10657
10696
|
const iframeManager = getIframeManager();
|
|
@@ -11079,7 +11118,7 @@ var init_ProviderSelector = __esm({
|
|
|
11079
11118
|
});
|
|
11080
11119
|
|
|
11081
11120
|
// src/internal/components/BuyMenu/useHandleInputAmount.ts
|
|
11082
|
-
import { useEffect as useEffect18, useRef as
|
|
11121
|
+
import { useEffect as useEffect18, useRef as useRef11 } from "react";
|
|
11083
11122
|
var ON_INPUT_QUERY_DELAY, useHandleInputAmount;
|
|
11084
11123
|
var init_useHandleInputAmount = __esm({
|
|
11085
11124
|
"src/internal/components/BuyMenu/useHandleInputAmount.ts"() {
|
|
@@ -11087,11 +11126,11 @@ var init_useHandleInputAmount = __esm({
|
|
|
11087
11126
|
init_useBuyMenuStore();
|
|
11088
11127
|
ON_INPUT_QUERY_DELAY = 1500;
|
|
11089
11128
|
useHandleInputAmount = () => {
|
|
11090
|
-
const lastRampProviderRef =
|
|
11129
|
+
const lastRampProviderRef = useRef11(DEFAULT_PROVIDER2);
|
|
11091
11130
|
const rampProvider = useBuyMenuStore((st) => st.rampProvider);
|
|
11092
11131
|
const srcInputAmount = useBuyMenuStore((st) => st.srcInputAmount);
|
|
11093
11132
|
const minAmount = useBuyMenuStore((st) => st.minAmount);
|
|
11094
|
-
const queryAmountTimer =
|
|
11133
|
+
const queryAmountTimer = useRef11(null);
|
|
11095
11134
|
useEffect18(() => {
|
|
11096
11135
|
if (queryAmountTimer.current) clearTimeout(queryAmountTimer.current);
|
|
11097
11136
|
queryAmountTimer.current = setTimeout(() => {
|
|
@@ -11472,8 +11511,7 @@ var init_truncateMiddle = __esm({
|
|
|
11472
11511
|
|
|
11473
11512
|
// src/internal/components/ChainsMenu/ChainItem.tsx
|
|
11474
11513
|
import { getChainConfig as getChainConfig7 } from "@embarkai/core/read";
|
|
11475
|
-
import {
|
|
11476
|
-
import { useRef as useRef13, useState as useState9 } from "react";
|
|
11514
|
+
import { ExternalLink, Loader as Loader6 } from "lucide-react";
|
|
11477
11515
|
import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11478
11516
|
function getPaymasterExplorerUrl(chainId, paymasterAddress) {
|
|
11479
11517
|
const chainConfig = getChainConfig7(chainId);
|
|
@@ -11493,10 +11531,9 @@ function ChainItem(props) {
|
|
|
11493
11531
|
setNextChainId
|
|
11494
11532
|
} = props;
|
|
11495
11533
|
const { t } = useT();
|
|
11534
|
+
const address = useSession((st) => st.address);
|
|
11496
11535
|
const isSessionLoading = useSession((st) => st.isLoading);
|
|
11497
11536
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
11498
|
-
const [copiedChainId, setCopiedChainId] = useState9(null);
|
|
11499
|
-
const copiedResetTimerRef = useRef13(null);
|
|
11500
11537
|
const isActiveChain = activeChainId === chainId;
|
|
11501
11538
|
const paymasterAddress = isActiveChain ? activePaymasterData?.address : null;
|
|
11502
11539
|
const paymasterExplorerUrl = paymasterAddress ? getPaymasterExplorerUrl(chainId, paymasterAddress) : null;
|
|
@@ -11536,55 +11573,58 @@ function ChainItem(props) {
|
|
|
11536
11573
|
},
|
|
11537
11574
|
children: [
|
|
11538
11575
|
isLoading && chainId === nextChainId ? /* @__PURE__ */ jsx51("div", { className: "w-7 h-7 flex items-center justify-center", children: /* @__PURE__ */ jsx51(Loader6, { className: "h-4 w-4 animate-spin" }) }) : /* @__PURE__ */ jsx51(Icon2, { className: "w-7 h-7" }),
|
|
11539
|
-
/* @__PURE__ */ jsxs45("div", { className: "min-w-0 flex-1 flex flex-col
|
|
11576
|
+
/* @__PURE__ */ jsxs45("div", { className: "min-w-0 flex-1 flex flex-col", children: [
|
|
11540
11577
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
|
|
11541
11578
|
/* @__PURE__ */ jsx51(
|
|
11542
11579
|
"span",
|
|
11543
11580
|
{
|
|
11544
|
-
className: cn2("block flex-1 uppercase text-left text-sm truncate", {
|
|
11545
|
-
"font-bold": isActiveChain
|
|
11581
|
+
className: cn2("block flex-1 uppercase text-left text-sm truncate leading-6", {
|
|
11582
|
+
"font-bold leading-7": isActiveChain
|
|
11546
11583
|
}),
|
|
11547
11584
|
children: name
|
|
11548
11585
|
}
|
|
11549
11586
|
),
|
|
11550
11587
|
/* @__PURE__ */ jsx51(Badge, { variant: badge.toLowerCase() === "mainnet" ? "success" : "secondary", children: badge })
|
|
11551
11588
|
] }),
|
|
11552
|
-
isActiveChain &&
|
|
11553
|
-
/* @__PURE__ */ jsx51("span", { className: "flex-none uppercase", children: "
|
|
11589
|
+
isActiveChain && /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-xs leading-5", children: [
|
|
11590
|
+
/* @__PURE__ */ jsx51("span", { className: "flex-none uppercase", children: "Explorer" }),
|
|
11554
11591
|
/* @__PURE__ */ jsxs45(
|
|
11555
11592
|
Button,
|
|
11556
11593
|
{
|
|
11557
11594
|
type: "button",
|
|
11558
11595
|
size: "small",
|
|
11559
11596
|
variant: "ghost",
|
|
11560
|
-
className: "text-[var(--ui-kit-fg-inverted)]",
|
|
11597
|
+
className: "text-[var(--ui-kit-fg-inverted)] h-5",
|
|
11561
11598
|
title: `${paymasterAddress} (SOURCE: ${paymasterSource})`,
|
|
11562
11599
|
onClick: (e) => {
|
|
11563
11600
|
e.stopPropagation();
|
|
11564
|
-
window.open(
|
|
11601
|
+
address && window.open(`${getExplorerUrl()}/address/${address}`, "_blank");
|
|
11565
11602
|
},
|
|
11566
11603
|
children: [
|
|
11567
|
-
/* @__PURE__ */ jsx51("span", { className: "text-xs", children: truncateMiddle(
|
|
11604
|
+
/* @__PURE__ */ jsx51("span", { className: "text-xs", children: truncateMiddle(address) }),
|
|
11568
11605
|
/* @__PURE__ */ jsx51(ExternalLink, { className: "w-4 h-4 flex-none" })
|
|
11569
11606
|
]
|
|
11570
11607
|
}
|
|
11571
|
-
)
|
|
11572
|
-
|
|
11608
|
+
)
|
|
11609
|
+
] }),
|
|
11610
|
+
isActiveChain && paymasterAddress && /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-[var(--ui-kit-gap)] text-xs leading-5", children: [
|
|
11611
|
+
/* @__PURE__ */ jsx51("span", { className: "flex-none uppercase", children: "Paymaster" }),
|
|
11612
|
+
/* @__PURE__ */ jsxs45(
|
|
11573
11613
|
Button,
|
|
11574
11614
|
{
|
|
11575
11615
|
type: "button",
|
|
11576
11616
|
size: "small",
|
|
11577
11617
|
variant: "ghost",
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
onClick: (
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
setCopiedChainId(chainId);
|
|
11584
|
-
if (copiedResetTimerRef.current) clearTimeout(copiedResetTimerRef.current);
|
|
11585
|
-
copiedResetTimerRef.current = setTimeout(() => setCopiedChainId(null), 1500);
|
|
11618
|
+
className: "text-[var(--ui-kit-fg-inverted)] h-5",
|
|
11619
|
+
title: `${paymasterAddress} (SOURCE: ${paymasterSource})`,
|
|
11620
|
+
onClick: (e) => {
|
|
11621
|
+
e.stopPropagation();
|
|
11622
|
+
window.open(paymasterExplorerUrl || paymasterAddress, "_blank", "noopener,noreferrer");
|
|
11586
11623
|
},
|
|
11587
|
-
children:
|
|
11624
|
+
children: [
|
|
11625
|
+
/* @__PURE__ */ jsx51("span", { className: "text-xs", children: truncateMiddle(paymasterAddress) }),
|
|
11626
|
+
/* @__PURE__ */ jsx51(ExternalLink, { className: "w-4 h-4 flex-none" })
|
|
11627
|
+
]
|
|
11588
11628
|
}
|
|
11589
11629
|
)
|
|
11590
11630
|
] })
|
|
@@ -11597,9 +11637,9 @@ var init_ChainItem = __esm({
|
|
|
11597
11637
|
"src/internal/components/ChainsMenu/ChainItem.tsx"() {
|
|
11598
11638
|
init_SessionContext();
|
|
11599
11639
|
init_useT();
|
|
11600
|
-
init_icons();
|
|
11601
11640
|
init_cn();
|
|
11602
11641
|
init_truncateMiddle();
|
|
11642
|
+
init_base2();
|
|
11603
11643
|
init_badge();
|
|
11604
11644
|
init_button();
|
|
11605
11645
|
}
|
|
@@ -11610,13 +11650,13 @@ import { PAYMASTER_CACHE_TTL_MS } from "@embarkai/core";
|
|
|
11610
11650
|
import { getChainConfig as getChainConfig8, SUPPORTED_MAINNETS as SUPPORTED_MAINNETS2 } from "@embarkai/core/read";
|
|
11611
11651
|
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
11612
11652
|
import { ArrowLeft as ArrowLeft4 } from "lucide-react";
|
|
11613
|
-
import { useMemo as useMemo5, useState as
|
|
11653
|
+
import { useMemo as useMemo5, useState as useState9 } from "react";
|
|
11614
11654
|
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11615
11655
|
function ChainsMenu() {
|
|
11616
11656
|
const config = useProviderConfig().config;
|
|
11617
11657
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
11618
|
-
const [isTestnets, setIsTestnets] =
|
|
11619
|
-
const [nextChainId, setNextChainId] =
|
|
11658
|
+
const [isTestnets, setIsTestnets] = useState9(false);
|
|
11659
|
+
const [nextChainId, setNextChainId] = useState9(null);
|
|
11620
11660
|
const { t } = useT();
|
|
11621
11661
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
11622
11662
|
const visibleNetworks = useMemo5(() => {
|
|
@@ -11865,7 +11905,7 @@ var init_devices = __esm({
|
|
|
11865
11905
|
});
|
|
11866
11906
|
|
|
11867
11907
|
// src/internal/components/DevicesMenu/DeviceLinkScreen.tsx
|
|
11868
|
-
import { useState as
|
|
11908
|
+
import { useState as useState10 } from "react";
|
|
11869
11909
|
import { ArrowLeft as ArrowLeft6, Loader2 as Loader22 } from "lucide-react";
|
|
11870
11910
|
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
11871
11911
|
function getErrorMessage(err) {
|
|
@@ -11887,8 +11927,8 @@ function DeviceLinkScreen() {
|
|
|
11887
11927
|
const setPage = useLayoutDataStore((s) => s.setPage);
|
|
11888
11928
|
const maxScrollHeight = useLayoutStore((s) => s.maxScrollHeight);
|
|
11889
11929
|
const { mutate: link, isPending } = useLinkDevice();
|
|
11890
|
-
const [code, setCode] =
|
|
11891
|
-
const [error, setError] =
|
|
11930
|
+
const [code, setCode] = useState10("");
|
|
11931
|
+
const [error, setError] = useState10(null);
|
|
11892
11932
|
const isValid = code.length === 6 && VALID_CHARS.test(code);
|
|
11893
11933
|
function handleCodeChange(value) {
|
|
11894
11934
|
const upper = value.toUpperCase().slice(0, 6);
|
|
@@ -12468,7 +12508,7 @@ var init_guardian_backup = __esm({
|
|
|
12468
12508
|
});
|
|
12469
12509
|
|
|
12470
12510
|
// src/internal/components/DevicesMenu/DeviceManageScreen.tsx
|
|
12471
|
-
import { useCallback as useCallback14, useEffect as useEffect19, useRef as
|
|
12511
|
+
import { useCallback as useCallback14, useEffect as useEffect19, useRef as useRef12, useState as useState11 } from "react";
|
|
12472
12512
|
import { ArrowLeft as ArrowLeft7, Cpu, Download, HardDrive, Loader2 as Loader23, Trash2, Upload } from "lucide-react";
|
|
12473
12513
|
import { Fragment as Fragment15, jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
12474
12514
|
function formatSize(bytes) {
|
|
@@ -12483,13 +12523,13 @@ function DeviceManageScreen() {
|
|
|
12483
12523
|
const userId = session?.mpcUserId || "";
|
|
12484
12524
|
const deviceId = pageParams?.deviceId;
|
|
12485
12525
|
const deviceName = pageParams?.deviceName;
|
|
12486
|
-
const guardianRef =
|
|
12487
|
-
const [screen, setScreen] =
|
|
12488
|
-
const [actionState, setActionState] =
|
|
12489
|
-
const [password, setPassword] =
|
|
12490
|
-
const [statusMessage, setStatusMessage] =
|
|
12491
|
-
const [errorMessage, setErrorMessage] =
|
|
12492
|
-
const [waitingConfirm, setWaitingConfirm] =
|
|
12526
|
+
const guardianRef = useRef12(null);
|
|
12527
|
+
const [screen, setScreen] = useState11({ step: "connecting" });
|
|
12528
|
+
const [actionState, setActionState] = useState11(null);
|
|
12529
|
+
const [password, setPassword] = useState11("");
|
|
12530
|
+
const [statusMessage, setStatusMessage] = useState11(null);
|
|
12531
|
+
const [errorMessage, setErrorMessage] = useState11(null);
|
|
12532
|
+
const [waitingConfirm, setWaitingConfirm] = useState11(false);
|
|
12493
12533
|
useEffect19(() => {
|
|
12494
12534
|
if (!statusMessage) return;
|
|
12495
12535
|
const t = setTimeout(() => setStatusMessage(null), 3e3);
|
|
@@ -12760,7 +12800,7 @@ var init_DeviceManageScreen = __esm({
|
|
|
12760
12800
|
});
|
|
12761
12801
|
|
|
12762
12802
|
// src/internal/components/DevicesMenu/DeviceRestoreScreen.tsx
|
|
12763
|
-
import { useCallback as useCallback15, useState as
|
|
12803
|
+
import { useCallback as useCallback15, useState as useState12 } from "react";
|
|
12764
12804
|
import { AlertTriangle as AlertTriangle3, ArrowLeft as ArrowLeft8, Download as Download2, Loader2 as Loader24 } from "lucide-react";
|
|
12765
12805
|
import { Fragment as Fragment16, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
12766
12806
|
function DeviceRestoreScreen() {
|
|
@@ -12772,10 +12812,10 @@ function DeviceRestoreScreen() {
|
|
|
12772
12812
|
const keyshareId = pageParams?.keyshareId;
|
|
12773
12813
|
const deviceId = pageParams?.deviceId;
|
|
12774
12814
|
const deviceName = pageParams?.deviceName;
|
|
12775
|
-
const [password, setPassword] =
|
|
12776
|
-
const [isWorking, setIsWorking] =
|
|
12777
|
-
const [statusMessage, setStatusMessage] =
|
|
12778
|
-
const [errorMessage, setErrorMessage] =
|
|
12815
|
+
const [password, setPassword] = useState12("");
|
|
12816
|
+
const [isWorking, setIsWorking] = useState12(false);
|
|
12817
|
+
const [statusMessage, setStatusMessage] = useState12(null);
|
|
12818
|
+
const [errorMessage, setErrorMessage] = useState12(null);
|
|
12779
12819
|
const handleRestore = useCallback15(async () => {
|
|
12780
12820
|
if (!password || !keyshareId || !userId) return;
|
|
12781
12821
|
const iframe4 = getIframeManager();
|
|
@@ -12876,7 +12916,7 @@ var init_DeviceRestoreScreen = __esm({
|
|
|
12876
12916
|
});
|
|
12877
12917
|
|
|
12878
12918
|
// src/internal/components/DevicesMenu/DevicesMenu.tsx
|
|
12879
|
-
import { useState as
|
|
12919
|
+
import { useState as useState13 } from "react";
|
|
12880
12920
|
import { ArrowLeft as ArrowLeft9, Cpu as Cpu2, Monitor, CheckCircle, Trash2 as Trash22, Loader2 as Loader25, RefreshCw, HardDrive as HardDrive2 } from "lucide-react";
|
|
12881
12921
|
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
12882
12922
|
function DeviceIcon({ deviceType }) {
|
|
@@ -12888,8 +12928,8 @@ function truncateAddress(address) {
|
|
|
12888
12928
|
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
12889
12929
|
}
|
|
12890
12930
|
function DeviceRow({ device }) {
|
|
12891
|
-
const [confirmingUnlink, setConfirmingUnlink] =
|
|
12892
|
-
const [unlinkError, setUnlinkError] =
|
|
12931
|
+
const [confirmingUnlink, setConfirmingUnlink] = useState13(false);
|
|
12932
|
+
const [unlinkError, setUnlinkError] = useState13(null);
|
|
12893
12933
|
const { mutate: unlink, isPending } = useUnlinkDevice();
|
|
12894
12934
|
if (confirmingUnlink) {
|
|
12895
12935
|
return /* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-2 p-3 rounded-lg bg-[var(--ui-kit-bg)]", children: [
|
|
@@ -14063,7 +14103,7 @@ var init_MethodSelector = __esm({
|
|
|
14063
14103
|
|
|
14064
14104
|
// src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx
|
|
14065
14105
|
import { ChevronRight as ChevronRight2, Eye, EyeOff, Info as Info3, Key as Key4, Loader as Loader8, Plus } from "lucide-react";
|
|
14066
|
-
import { useEffect as useEffect22, useRef as
|
|
14106
|
+
import { useEffect as useEffect22, useRef as useRef13 } from "react";
|
|
14067
14107
|
import { Fragment as Fragment18, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
14068
14108
|
function PasswordPasskey(props) {
|
|
14069
14109
|
const { t } = useT();
|
|
@@ -14078,7 +14118,7 @@ function PasswordPasskey(props) {
|
|
|
14078
14118
|
onCreatePasskey
|
|
14079
14119
|
} = props;
|
|
14080
14120
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
14081
|
-
const actionRef =
|
|
14121
|
+
const actionRef = useRef13(null);
|
|
14082
14122
|
const {
|
|
14083
14123
|
showPassword,
|
|
14084
14124
|
restorePassword,
|
|
@@ -14710,7 +14750,7 @@ var init_Cloud = __esm({
|
|
|
14710
14750
|
});
|
|
14711
14751
|
|
|
14712
14752
|
// src/internal/components/KeyshareRestoreMenu/methods/Guardian.tsx
|
|
14713
|
-
import { useState as
|
|
14753
|
+
import { useState as useState15 } from "react";
|
|
14714
14754
|
import { Cpu as Cpu4, Loader2 as Loader26 } from "lucide-react";
|
|
14715
14755
|
import { Fragment as Fragment23, jsx as jsx65, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
14716
14756
|
function Guardian(props) {
|
|
@@ -14719,8 +14759,8 @@ function Guardian(props) {
|
|
|
14719
14759
|
const session = useSession((st) => st.session);
|
|
14720
14760
|
const recoveryUserId = useSession((st) => st.recoveryUserId);
|
|
14721
14761
|
const { onRestoreSuccess } = useOnRestoreSuccess();
|
|
14722
|
-
const [isWorking, setIsWorking] =
|
|
14723
|
-
const [step, setStep] =
|
|
14762
|
+
const [isWorking, setIsWorking] = useState15(false);
|
|
14763
|
+
const [step, setStep] = useState15("idle");
|
|
14724
14764
|
const handleGuardianBackup = async () => {
|
|
14725
14765
|
if (!restorePassword) {
|
|
14726
14766
|
setError("Please enter a password");
|
|
@@ -15411,15 +15451,15 @@ var init_SumsubIframeManager = __esm({
|
|
|
15411
15451
|
});
|
|
15412
15452
|
|
|
15413
15453
|
// src/internal/components/KYC/useSumsubIframe.ts
|
|
15414
|
-
import { useEffect as useEffect28, useRef as
|
|
15454
|
+
import { useEffect as useEffect28, useRef as useRef14, useState as useState16 } from "react";
|
|
15415
15455
|
function useSumsubIframe({ iframeUrl }) {
|
|
15416
15456
|
const config = useProviderConfig().config;
|
|
15417
15457
|
const { colorMode } = useColorMode();
|
|
15418
|
-
const iframeRef =
|
|
15419
|
-
const [isLoading, setIsLoading] =
|
|
15420
|
-
const [error, setError] =
|
|
15421
|
-
const [height, setHeight] =
|
|
15422
|
-
const [status, setStatus] =
|
|
15458
|
+
const iframeRef = useRef14(null);
|
|
15459
|
+
const [isLoading, setIsLoading] = useState16(true);
|
|
15460
|
+
const [error, setError] = useState16(null);
|
|
15461
|
+
const [height, setHeight] = useState16(0);
|
|
15462
|
+
const [status, setStatus] = useState16("");
|
|
15423
15463
|
const levelName = config.current?.kyc?.options?.levelName;
|
|
15424
15464
|
useEffect28(() => {
|
|
15425
15465
|
setError(null);
|
|
@@ -15554,20 +15594,29 @@ var init_KycMenu = __esm({
|
|
|
15554
15594
|
}
|
|
15555
15595
|
});
|
|
15556
15596
|
|
|
15557
|
-
// src/internal/
|
|
15597
|
+
// src/internal/hooks/useUserProfile.ts
|
|
15558
15598
|
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
15559
|
-
|
|
15560
|
-
import { jsx as jsx70, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
15561
|
-
function KYCStatus() {
|
|
15599
|
+
function useUserProfile() {
|
|
15562
15600
|
const address = useSession((st) => st.address);
|
|
15563
|
-
|
|
15564
|
-
retry: false,
|
|
15565
|
-
enabled: !!address,
|
|
15601
|
+
return useQuery9({
|
|
15566
15602
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
15567
|
-
queryFn: getUserProfile
|
|
15603
|
+
queryFn: getUserProfile,
|
|
15604
|
+
enabled: !!address,
|
|
15605
|
+
retry: false
|
|
15568
15606
|
});
|
|
15569
|
-
|
|
15570
|
-
|
|
15607
|
+
}
|
|
15608
|
+
var init_useUserProfile = __esm({
|
|
15609
|
+
"src/internal/hooks/useUserProfile.ts"() {
|
|
15610
|
+
init_SessionContext();
|
|
15611
|
+
init_profile();
|
|
15612
|
+
}
|
|
15613
|
+
});
|
|
15614
|
+
|
|
15615
|
+
// src/internal/components/KYC/KYCStatus.tsx
|
|
15616
|
+
import { jsx as jsx70, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
15617
|
+
function KYCStatus() {
|
|
15618
|
+
const { data: userProfile = null, isLoading: isUserProfileLoading } = useUserProfile();
|
|
15619
|
+
const isKycVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
15571
15620
|
if (!isKycVerified) return null;
|
|
15572
15621
|
return /* @__PURE__ */ jsxs64("div", { className: "group relative flex flex-shrink-0", children: [
|
|
15573
15622
|
/* @__PURE__ */ jsx70(PositiveIcon, {}),
|
|
@@ -15588,9 +15637,8 @@ function KYCStatus() {
|
|
|
15588
15637
|
}
|
|
15589
15638
|
var init_KYCStatus = __esm({
|
|
15590
15639
|
"src/internal/components/KYC/KYCStatus.tsx"() {
|
|
15591
|
-
init_SessionContext();
|
|
15592
15640
|
init_icons();
|
|
15593
|
-
|
|
15641
|
+
init_useUserProfile();
|
|
15594
15642
|
init_utils2();
|
|
15595
15643
|
}
|
|
15596
15644
|
});
|
|
@@ -15855,7 +15903,7 @@ var init_useStore = __esm({
|
|
|
15855
15903
|
|
|
15856
15904
|
// src/internal/components/ManageWalletMenu/EmailForm.tsx
|
|
15857
15905
|
import { useMutation as useMutation12 } from "@tanstack/react-query";
|
|
15858
|
-
import { ChevronRight as ChevronRight4, Loader as
|
|
15906
|
+
import { ChevronRight as ChevronRight4, Loader as Loader12, Mail as Mail4 } from "lucide-react";
|
|
15859
15907
|
import { jsx as jsx73, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
15860
15908
|
function EmailForm() {
|
|
15861
15909
|
const { callbacksRef } = useProviderConfig();
|
|
@@ -15943,7 +15991,7 @@ function EmailForm() {
|
|
|
15943
15991
|
size: "large",
|
|
15944
15992
|
disabled: !email || isLoading,
|
|
15945
15993
|
onClick: () => onSendVerificationCode(),
|
|
15946
|
-
children: isLoading ? /* @__PURE__ */ jsx73(
|
|
15994
|
+
children: isLoading ? /* @__PURE__ */ jsx73(Loader12, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx73(ChevronRight4, { className: "w-4 h-4" })
|
|
15947
15995
|
}
|
|
15948
15996
|
)
|
|
15949
15997
|
] });
|
|
@@ -16446,7 +16494,7 @@ var init_telegram2 = __esm({
|
|
|
16446
16494
|
|
|
16447
16495
|
// src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
|
|
16448
16496
|
import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
16449
|
-
import { useCallback as useCallback20, useEffect as useEffect31, useState as
|
|
16497
|
+
import { useCallback as useCallback20, useEffect as useEffect31, useState as useState17 } from "react";
|
|
16450
16498
|
function useLinkTelegram() {
|
|
16451
16499
|
const {
|
|
16452
16500
|
config: { current: config },
|
|
@@ -16504,7 +16552,7 @@ function useLinkTelegram() {
|
|
|
16504
16552
|
setLinkIsLoading(false);
|
|
16505
16553
|
}
|
|
16506
16554
|
}, [config.social?.providers]);
|
|
16507
|
-
const [telegramLinkStarted, setTelegramLinkStarted] =
|
|
16555
|
+
const [telegramLinkStarted, setTelegramLinkStarted] = useState17(false);
|
|
16508
16556
|
useEffect31(() => {
|
|
16509
16557
|
console.log("[useLinkTelegram] Effect triggered:", {
|
|
16510
16558
|
providerType,
|
|
@@ -16625,7 +16673,7 @@ var init_ProviderCard = __esm({
|
|
|
16625
16673
|
|
|
16626
16674
|
// src/internal/components/ManageWalletMenu/ManageWallet.tsx
|
|
16627
16675
|
import { fromPairs } from "lodash-es";
|
|
16628
|
-
import { AlertTriangle as AlertTriangle4, ArrowLeft as ArrowLeft14, Loader as
|
|
16676
|
+
import { AlertTriangle as AlertTriangle4, ArrowLeft as ArrowLeft14, Loader as Loader13 } from "lucide-react";
|
|
16629
16677
|
import { useMemo as useMemo7 } from "react";
|
|
16630
16678
|
import { Fragment as Fragment28, jsx as jsx77, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
16631
16679
|
function getProviderName(provider) {
|
|
@@ -16772,7 +16820,7 @@ function ManageWalletMenu() {
|
|
|
16772
16820
|
),
|
|
16773
16821
|
/* @__PURE__ */ jsx77("span", { className: "text-xl font-semibold", children: t("passport:profilesMenu.title") })
|
|
16774
16822
|
] }),
|
|
16775
|
-
isProvidersLoading && /* @__PURE__ */ jsx77("div", { className: "flex items-center justify-center p-4 text-[var(--ui-kit-fg-muted)]", children: /* @__PURE__ */ jsx77(
|
|
16823
|
+
isProvidersLoading && /* @__PURE__ */ jsx77("div", { className: "flex items-center justify-center p-4 text-[var(--ui-kit-fg-muted)]", children: /* @__PURE__ */ jsx77(Loader13, { className: "w-4 h-4 animate-spin" }) }),
|
|
16776
16824
|
/* @__PURE__ */ jsx77(EmailNotConnectedWarning, {}),
|
|
16777
16825
|
showCurrentProviders && renderProviders.map((node) => node),
|
|
16778
16826
|
showExtraProvidersUi && /* @__PURE__ */ jsx77(AddProvider, {}),
|
|
@@ -16824,8 +16872,8 @@ var init_ManageWallet = __esm({
|
|
|
16824
16872
|
|
|
16825
16873
|
// src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx
|
|
16826
16874
|
import { useMutation as useMutation15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
16827
|
-
import { Key as Key6, Loader as
|
|
16828
|
-
import { useState as
|
|
16875
|
+
import { Key as Key6, Loader as Loader14 } from "lucide-react";
|
|
16876
|
+
import { useState as useState18 } from "react";
|
|
16829
16877
|
import { useDisconnect as useDisconnect2 } from "wagmi";
|
|
16830
16878
|
import { jsx as jsx78, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
16831
16879
|
function UnlinkProviderMenu() {
|
|
@@ -16837,7 +16885,7 @@ function UnlinkProviderMenu() {
|
|
|
16837
16885
|
const { t } = useT();
|
|
16838
16886
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
16839
16887
|
const { confirmUnlink, setConfirmUnlink, setAlert } = useManageWalletStore();
|
|
16840
|
-
const [confirmInput, setConfirmInput] =
|
|
16888
|
+
const [confirmInput, setConfirmInput] = useState18("");
|
|
16841
16889
|
const { mutate: handleUnlinkProvider, isPending: isProviderUnlinking } = useMutation15({
|
|
16842
16890
|
mutationFn: async () => {
|
|
16843
16891
|
if (!confirmUnlink) {
|
|
@@ -16911,7 +16959,7 @@ function UnlinkProviderMenu() {
|
|
|
16911
16959
|
disabled: !!isProviderUnlinking || !confirmUnlink || confirmInput !== confirmUnlink.externalId,
|
|
16912
16960
|
className: "w-full flex-1",
|
|
16913
16961
|
children: [
|
|
16914
|
-
isProviderUnlinking && /* @__PURE__ */ jsx78(
|
|
16962
|
+
isProviderUnlinking && /* @__PURE__ */ jsx78(Loader14, { className: "animate-spin h-4 w-4" }),
|
|
16915
16963
|
t("passport:common.delete")
|
|
16916
16964
|
]
|
|
16917
16965
|
}
|
|
@@ -17098,7 +17146,7 @@ var init_useNicknameAvailability = __esm({
|
|
|
17098
17146
|
// src/internal/components/NicknameMenu/NicknameEditForm.tsx
|
|
17099
17147
|
import { useMutation as useMutation17, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
17100
17148
|
import { AtSignIcon, CheckIcon as CheckIcon2, CopyIcon, LoaderIcon as LoaderIcon7, SaveIcon } from "lucide-react";
|
|
17101
|
-
import { useCallback as useCallback22, useState as
|
|
17149
|
+
import { useCallback as useCallback22, useState as useState19 } from "react";
|
|
17102
17150
|
import { Fragment as Fragment29, jsx as jsx79, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
17103
17151
|
function NicknameEditForm(props) {
|
|
17104
17152
|
const { isInitialUser, nicknameInfo } = props;
|
|
@@ -17111,7 +17159,7 @@ function NicknameEditForm(props) {
|
|
|
17111
17159
|
const nicknameValue = useNicknameStore((st) => st.nicknameValue);
|
|
17112
17160
|
const nicknameAvailability = useNicknameStore((st) => st.availability);
|
|
17113
17161
|
const { isCheckingAvailability } = useNicknameAvailability(nicknameInfo ? nicknameInfo.handle : "");
|
|
17114
|
-
const [isNicknameCopied, setIsNicknameCopied] =
|
|
17162
|
+
const [isNicknameCopied, setIsNicknameCopied] = useState19(false);
|
|
17115
17163
|
const {
|
|
17116
17164
|
mutate: changeNickname2,
|
|
17117
17165
|
isError: isNicknameChangeError,
|
|
@@ -17261,7 +17309,7 @@ var init_NicknameEditForm = __esm({
|
|
|
17261
17309
|
// src/internal/components/NicknameMenu/NicknameMenu.tsx
|
|
17262
17310
|
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
17263
17311
|
import dayjs4 from "dayjs";
|
|
17264
|
-
import { ArrowLeft as ArrowLeft15, Info as Info4, Loader as
|
|
17312
|
+
import { ArrowLeft as ArrowLeft15, Info as Info4, Loader as Loader15 } from "lucide-react";
|
|
17265
17313
|
import { jsx as jsx80, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
17266
17314
|
function NicknameMenu() {
|
|
17267
17315
|
const { isInitialUser } = usePageParams().current;
|
|
@@ -17300,7 +17348,7 @@ function NicknameMenu() {
|
|
|
17300
17348
|
),
|
|
17301
17349
|
/* @__PURE__ */ jsxs74("div", { className: "flex gap-[var(--ui-kit-gap)] items-center w-fit", children: [
|
|
17302
17350
|
/* @__PURE__ */ jsx80("span", { className: "text-xl font-semibold", children: t("passport:nicknameMenu.title") }),
|
|
17303
|
-
isNicknameInfoLoading && /* @__PURE__ */ jsx80(
|
|
17351
|
+
isNicknameInfoLoading && /* @__PURE__ */ jsx80(Loader15, { className: "w-4 h-4 animate-spin" })
|
|
17304
17352
|
] })
|
|
17305
17353
|
] }),
|
|
17306
17354
|
/* @__PURE__ */ jsx80("span", { className: "text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:nicknameMenu.yourNickname") }),
|
|
@@ -17425,27 +17473,76 @@ var init_useResolvedPublicClient = __esm({
|
|
|
17425
17473
|
}
|
|
17426
17474
|
});
|
|
17427
17475
|
|
|
17428
|
-
// src/internal/hooks/
|
|
17476
|
+
// src/internal/hooks/useBlockscoutAssets/constants.ts
|
|
17477
|
+
var NATIVE_BALANCE_QUERY_KEY2, WATCH_TOKENS_QUERY_KEY, BLOCKSCOUT_QUERY_KEY, ERC3643_DETECTION_QUERY_KEY, BALANCE_DEFAULT_QUERY_CFG, ERC3643_ABI;
|
|
17478
|
+
var init_constants5 = __esm({
|
|
17479
|
+
"src/internal/hooks/useBlockscoutAssets/constants.ts"() {
|
|
17480
|
+
init_constants();
|
|
17481
|
+
NATIVE_BALANCE_QUERY_KEY2 = "chain-native-coin-balance-query";
|
|
17482
|
+
WATCH_TOKENS_QUERY_KEY = "chain-watch-coin-balance-query";
|
|
17483
|
+
BLOCKSCOUT_QUERY_KEY = "blockscout-token-balances";
|
|
17484
|
+
ERC3643_DETECTION_QUERY_KEY = "erc3643-detection";
|
|
17485
|
+
BALANCE_DEFAULT_QUERY_CFG = {
|
|
17486
|
+
staleTime: BLOCKSCOUT_QUERY_STALE_TIME,
|
|
17487
|
+
gcTime: BLOCKSCOUT_QUERY_GC_TIME,
|
|
17488
|
+
refetchOnMount: "always",
|
|
17489
|
+
retry: 2,
|
|
17490
|
+
retryDelay: 2e3
|
|
17491
|
+
};
|
|
17492
|
+
ERC3643_ABI = [
|
|
17493
|
+
{
|
|
17494
|
+
name: "identityRegistry",
|
|
17495
|
+
type: "function",
|
|
17496
|
+
stateMutability: "view",
|
|
17497
|
+
inputs: [],
|
|
17498
|
+
outputs: [{ name: "", type: "address" }]
|
|
17499
|
+
}
|
|
17500
|
+
];
|
|
17501
|
+
}
|
|
17502
|
+
});
|
|
17503
|
+
|
|
17504
|
+
// src/internal/hooks/useBlockscoutAssets/useNativeBalance.ts
|
|
17429
17505
|
import { useQuery as useQuery13 } from "@tanstack/react-query";
|
|
17506
|
+
import { formatUnits as formatUnits2 } from "viem";
|
|
17507
|
+
function useNativeBalance(options) {
|
|
17508
|
+
const { enabled, address, chainId, publicClient, nativeCurrency } = options;
|
|
17509
|
+
return useQuery13({
|
|
17510
|
+
enabled: enabled && !!address && !!publicClient && !!nativeCurrency?.symbol,
|
|
17511
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17512
|
+
queryKey: [NATIVE_BALANCE_QUERY_KEY2, chainId, address],
|
|
17513
|
+
queryFn: async () => {
|
|
17514
|
+
const balance = await publicClient.getBalance({ address });
|
|
17515
|
+
return {
|
|
17516
|
+
value: balance,
|
|
17517
|
+
formatted: formatUnits2(balance, nativeCurrency?.decimals || 18),
|
|
17518
|
+
symbol: nativeCurrency?.symbol || "ETH",
|
|
17519
|
+
decimals: nativeCurrency?.decimals || 18
|
|
17520
|
+
};
|
|
17521
|
+
}
|
|
17522
|
+
});
|
|
17523
|
+
}
|
|
17524
|
+
var init_useNativeBalance = __esm({
|
|
17525
|
+
"src/internal/hooks/useBlockscoutAssets/useNativeBalance.ts"() {
|
|
17526
|
+
init_constants5();
|
|
17527
|
+
}
|
|
17528
|
+
});
|
|
17529
|
+
|
|
17530
|
+
// src/internal/hooks/useBlockscoutAssets/useWatchTokens.ts
|
|
17531
|
+
import { useQuery as useQuery14 } from "@tanstack/react-query";
|
|
17430
17532
|
import { useMemo as useMemo9 } from "react";
|
|
17431
|
-
import { erc20Abi, formatUnits as
|
|
17533
|
+
import { erc20Abi as erc20Abi2, formatUnits as formatUnits3 } from "viem";
|
|
17432
17534
|
function useWatchTokens(options) {
|
|
17433
|
-
const { address, chainId, enabled
|
|
17535
|
+
const { address, chainId, enabled, publicClient } = options;
|
|
17434
17536
|
const { config } = useProviderConfig();
|
|
17435
|
-
const { publicClient, resolvedChainId } = useResolvedPublicClient(chainId, "useWatchTokens");
|
|
17436
17537
|
const watchTokens = useMemo9(() => {
|
|
17437
17538
|
const allWatchTokens = config.current.watchTokens;
|
|
17438
|
-
const tokensForChain =
|
|
17539
|
+
const tokensForChain = chainId ? allWatchTokens?.[chainId] || [] : [];
|
|
17439
17540
|
return tokensForChain;
|
|
17440
|
-
}, [config,
|
|
17441
|
-
|
|
17442
|
-
|
|
17443
|
-
|
|
17444
|
-
|
|
17445
|
-
error,
|
|
17446
|
-
refetch
|
|
17447
|
-
} = useQuery13({
|
|
17448
|
-
queryKey: [WATCH_TOKENS_QUERY_KEY, resolvedChainId, address, watchTokens.map((t) => t.address).join(",")],
|
|
17541
|
+
}, [config, chainId]);
|
|
17542
|
+
return useQuery14({
|
|
17543
|
+
enabled: !!publicClient && !!address && enabled && watchTokens.length > 0,
|
|
17544
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17545
|
+
queryKey: [WATCH_TOKENS_QUERY_KEY, chainId, address, watchTokens.map((t) => t.address).join(",")],
|
|
17449
17546
|
queryFn: async () => {
|
|
17450
17547
|
if (!publicClient || !address || watchTokens.length === 0) {
|
|
17451
17548
|
return [];
|
|
@@ -17455,17 +17552,19 @@ function useWatchTokens(options) {
|
|
|
17455
17552
|
try {
|
|
17456
17553
|
const balance = await publicClient.readContract({
|
|
17457
17554
|
address: token.address,
|
|
17458
|
-
abi:
|
|
17555
|
+
abi: erc20Abi2,
|
|
17459
17556
|
functionName: "balanceOf",
|
|
17460
|
-
args: [address]
|
|
17557
|
+
args: [address],
|
|
17558
|
+
authorizationList: void 0
|
|
17461
17559
|
});
|
|
17462
17560
|
let name = token.name;
|
|
17463
17561
|
if (!name) {
|
|
17464
17562
|
try {
|
|
17465
17563
|
name = await publicClient.readContract({
|
|
17466
17564
|
address: token.address,
|
|
17467
|
-
abi:
|
|
17468
|
-
functionName: "name"
|
|
17565
|
+
abi: erc20Abi2,
|
|
17566
|
+
functionName: "name",
|
|
17567
|
+
authorizationList: void 0
|
|
17469
17568
|
});
|
|
17470
17569
|
} catch {
|
|
17471
17570
|
name = token.symbol;
|
|
@@ -17476,14 +17575,15 @@ function useWatchTokens(options) {
|
|
|
17476
17575
|
try {
|
|
17477
17576
|
decimals = await publicClient.readContract({
|
|
17478
17577
|
address: token.address,
|
|
17479
|
-
abi:
|
|
17480
|
-
functionName: "decimals"
|
|
17578
|
+
abi: erc20Abi2,
|
|
17579
|
+
functionName: "decimals",
|
|
17580
|
+
authorizationList: void 0
|
|
17481
17581
|
});
|
|
17482
17582
|
} catch {
|
|
17483
17583
|
decimals = 18;
|
|
17484
17584
|
}
|
|
17485
17585
|
}
|
|
17486
|
-
const formattedBalance =
|
|
17586
|
+
const formattedBalance = formatUnits3(balance, decimals);
|
|
17487
17587
|
results.push({
|
|
17488
17588
|
type: "erc20",
|
|
17489
17589
|
address: token.address,
|
|
@@ -17499,38 +17599,18 @@ function useWatchTokens(options) {
|
|
|
17499
17599
|
}
|
|
17500
17600
|
}
|
|
17501
17601
|
return results;
|
|
17502
|
-
}
|
|
17503
|
-
enabled: !!publicClient && !!address && enabled && watchTokens.length > 0,
|
|
17504
|
-
staleTime: 30 * 1e3,
|
|
17505
|
-
// 30 seconds
|
|
17506
|
-
gcTime: 5 * 60 * 1e3,
|
|
17507
|
-
// 5 minutes
|
|
17508
|
-
refetchOnMount: "always",
|
|
17509
|
-
retry: 2,
|
|
17510
|
-
retryDelay: 1e3
|
|
17602
|
+
}
|
|
17511
17603
|
});
|
|
17512
|
-
return {
|
|
17513
|
-
assets: assets || [],
|
|
17514
|
-
isLoading,
|
|
17515
|
-
isFetching,
|
|
17516
|
-
error: error || null,
|
|
17517
|
-
refetch
|
|
17518
|
-
};
|
|
17519
17604
|
}
|
|
17520
|
-
var WATCH_TOKENS_QUERY_KEY;
|
|
17521
17605
|
var init_useWatchTokens = __esm({
|
|
17522
|
-
"src/internal/hooks/useWatchTokens.ts"() {
|
|
17606
|
+
"src/internal/hooks/useBlockscoutAssets/useWatchTokens.ts"() {
|
|
17523
17607
|
init_ProviderContext();
|
|
17524
|
-
|
|
17525
|
-
WATCH_TOKENS_QUERY_KEY = "watch-tokens";
|
|
17608
|
+
init_constants5();
|
|
17526
17609
|
}
|
|
17527
17610
|
});
|
|
17528
17611
|
|
|
17529
|
-
// src/internal/hooks/useBlockscoutAssets.ts
|
|
17530
|
-
import {
|
|
17531
|
-
import { useQuery as useQuery14, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
17532
|
-
import { useCallback as useCallback23, useMemo as useMemo10, useRef as useRef17 } from "react";
|
|
17533
|
-
import { formatEther, formatUnits as formatUnits3 } from "viem";
|
|
17612
|
+
// src/internal/hooks/useBlockscoutAssets/utils.ts
|
|
17613
|
+
import { formatUnits as formatUnits4 } from "viem";
|
|
17534
17614
|
function resolveIpfsUri(uri) {
|
|
17535
17615
|
if (!uri) return "";
|
|
17536
17616
|
if (uri.startsWith("ipfs://")) {
|
|
@@ -17561,7 +17641,7 @@ function mapBlockscoutToAsset(balance) {
|
|
|
17561
17641
|
if (type === "erc721") {
|
|
17562
17642
|
formattedBalance = "1";
|
|
17563
17643
|
} else if (decimals !== void 0) {
|
|
17564
|
-
formattedBalance =
|
|
17644
|
+
formattedBalance = formatUnits4(BigInt(value), decimals);
|
|
17565
17645
|
} else {
|
|
17566
17646
|
formattedBalance = value;
|
|
17567
17647
|
}
|
|
@@ -17654,96 +17734,107 @@ function createError(error) {
|
|
|
17654
17734
|
retryable: true
|
|
17655
17735
|
};
|
|
17656
17736
|
}
|
|
17737
|
+
var init_utils8 = __esm({
|
|
17738
|
+
"src/internal/hooks/useBlockscoutAssets/utils.ts"() {
|
|
17739
|
+
init_constants();
|
|
17740
|
+
}
|
|
17741
|
+
});
|
|
17742
|
+
|
|
17743
|
+
// src/internal/hooks/useBlockscoutAssets/useBlockscoutAssets.ts
|
|
17744
|
+
import { createBlockscoutClient, nonBlockscoutClient } from "@embarkai/core/clients";
|
|
17745
|
+
import { useQuery as useQuery15, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
17746
|
+
import { useCallback as useCallback23, useMemo as useMemo10, useRef as useRef15 } from "react";
|
|
17657
17747
|
function useBlockscoutAssets(options) {
|
|
17658
17748
|
const { address, chainId, enabled = true, detectSecurityTokens = true } = options;
|
|
17659
17749
|
const qc = useQueryClient19();
|
|
17660
17750
|
const { chainConfig, publicClient, resolvedChainId } = useResolvedPublicClient(chainId, "useBlockscoutAssets");
|
|
17661
|
-
const
|
|
17662
|
-
|
|
17663
|
-
|
|
17751
|
+
const {
|
|
17752
|
+
//
|
|
17753
|
+
tokenBalancesQuery: customTokenBalancesQuery,
|
|
17754
|
+
tokenBalancesQueryKey: customTokenBalancesQueryKey
|
|
17755
|
+
} = useProviderConfig().config?.current?.portfolio || {};
|
|
17664
17756
|
const blockscoutApiUrl = getBlockscoutApiUrl(chainConfig);
|
|
17665
17757
|
const blockscoutClient = useMemo10(
|
|
17666
17758
|
() => blockscoutApiUrl ? createBlockscoutClient({ baseUrl: blockscoutApiUrl }) : null,
|
|
17667
17759
|
[blockscoutApiUrl]
|
|
17668
17760
|
);
|
|
17669
|
-
const lastRefreshRef =
|
|
17761
|
+
const lastRefreshRef = useRef15(0);
|
|
17670
17762
|
const {
|
|
17671
|
-
|
|
17763
|
+
data: watchTokenAssets = [],
|
|
17672
17764
|
isLoading: watchTokensLoading,
|
|
17673
17765
|
isFetching: watchTokensFetching
|
|
17674
|
-
|
|
17675
|
-
|
|
17766
|
+
} = useWatchTokens({
|
|
17767
|
+
enabled,
|
|
17768
|
+
address,
|
|
17769
|
+
chainId: resolvedChainId,
|
|
17770
|
+
publicClient
|
|
17771
|
+
});
|
|
17676
17772
|
const {
|
|
17677
17773
|
data: nativeBalanceData,
|
|
17678
17774
|
isLoading: nativeLoading,
|
|
17679
17775
|
isFetching: nativeFetching
|
|
17680
|
-
|
|
17681
|
-
|
|
17682
|
-
|
|
17776
|
+
} = useNativeBalance({
|
|
17777
|
+
enabled,
|
|
17778
|
+
address,
|
|
17779
|
+
chainId: resolvedChainId,
|
|
17780
|
+
publicClient,
|
|
17781
|
+
nativeCurrency: chainConfig?.nativeCurrency || null
|
|
17782
|
+
});
|
|
17783
|
+
const {
|
|
17784
|
+
data: coreTokenBalances = [],
|
|
17785
|
+
isLoading: coreTokensLoading,
|
|
17786
|
+
isFetching: coreTokensFetching
|
|
17787
|
+
} = useQuery15({
|
|
17788
|
+
enabled: !!address && enabled && !blockscoutClient && !customTokenBalancesQuery && !customTokenBalancesQueryKey,
|
|
17789
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17790
|
+
queryKey: [`NON-${BLOCKSCOUT_QUERY_KEY}`, resolvedChainId, address],
|
|
17683
17791
|
queryFn: async () => {
|
|
17684
|
-
|
|
17685
|
-
|
|
17686
|
-
|
|
17687
|
-
|
|
17688
|
-
|
|
17689
|
-
|
|
17690
|
-
decimals: chainConfig?.nativeCurrency?.decimals || 18
|
|
17691
|
-
};
|
|
17692
|
-
},
|
|
17693
|
-
enabled: !!publicClient && !!address && enabled,
|
|
17694
|
-
staleTime: 30 * 1e3,
|
|
17695
|
-
// 30 seconds
|
|
17696
|
-
gcTime: 5 * 60 * 1e3,
|
|
17697
|
-
// 5 minutes
|
|
17698
|
-
refetchOnMount: "always"
|
|
17792
|
+
const assetList = await nonBlockscoutClient.getTokenBalances({
|
|
17793
|
+
walletAddress: address,
|
|
17794
|
+
chainId: resolvedChainId
|
|
17795
|
+
});
|
|
17796
|
+
return assetList.filter((item) => BigInt(item.value) > BigInt(0));
|
|
17797
|
+
}
|
|
17699
17798
|
});
|
|
17700
17799
|
const {
|
|
17701
|
-
data:
|
|
17702
|
-
isLoading:
|
|
17703
|
-
isFetching:
|
|
17704
|
-
|
|
17705
|
-
|
|
17800
|
+
data: customItems = [],
|
|
17801
|
+
isLoading: customLoading,
|
|
17802
|
+
isFetching: customFetching
|
|
17803
|
+
} = useQuery15({
|
|
17804
|
+
enabled: !!address && enabled && !blockscoutClient && !!customTokenBalancesQuery && !!customTokenBalancesQueryKey,
|
|
17805
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17806
|
+
queryKey: customTokenBalancesQueryKey,
|
|
17807
|
+
// query is invalidated by this key
|
|
17808
|
+
queryFn: async () => await customTokenBalancesQuery(address)
|
|
17809
|
+
});
|
|
17810
|
+
const {
|
|
17811
|
+
data: blockscoutItems = [],
|
|
17812
|
+
isLoading: blockscoutLoading,
|
|
17813
|
+
isFetching: blockscoutFetching,
|
|
17814
|
+
error: blockscoutError,
|
|
17706
17815
|
dataUpdatedAt
|
|
17707
|
-
} =
|
|
17708
|
-
|
|
17709
|
-
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
|
|
17713
|
-
} catch (error2) {
|
|
17714
|
-
console.warn("[useBlockscoutAssets] Custom token balances query failed:", error2);
|
|
17715
|
-
if (!blockscoutClient) throw error2;
|
|
17716
|
-
}
|
|
17717
|
-
}
|
|
17718
|
-
return await blockscoutClient.getTokenBalances(address);
|
|
17719
|
-
},
|
|
17720
|
-
enabled: !!address && enabled && (!!customTokenBalancesQuery || !!blockscoutClient),
|
|
17721
|
-
staleTime: 0,
|
|
17722
|
-
gcTime: BLOCKSCOUT_QUERY_GC_TIME,
|
|
17723
|
-
refetchOnMount: "always",
|
|
17724
|
-
retry: 2,
|
|
17725
|
-
retryDelay: 1e3
|
|
17816
|
+
} = useQuery15({
|
|
17817
|
+
enabled: !!address && enabled && !!blockscoutClient && !customTokenBalancesQuery && !customTokenBalancesQueryKey,
|
|
17818
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17819
|
+
queryKey: [BLOCKSCOUT_QUERY_KEY, resolvedChainId, blockscoutApiUrl, address],
|
|
17820
|
+
//
|
|
17821
|
+
queryFn: async () => await blockscoutClient.getTokenBalances(address)
|
|
17726
17822
|
});
|
|
17727
17823
|
const {
|
|
17728
17824
|
data: nftItems,
|
|
17729
17825
|
isLoading: nftsLoading,
|
|
17730
17826
|
isFetching: nftsFetching
|
|
17731
|
-
|
|
17732
|
-
} = useQuery14({
|
|
17733
|
-
queryKey: [BLOCKSCOUT_QUERY_KEY, "nfts", resolvedChainId, address, blockscoutApiUrl],
|
|
17734
|
-
queryFn: () => blockscoutClient.getNfts(address),
|
|
17827
|
+
} = useQuery15({
|
|
17735
17828
|
enabled: !!address && enabled && !!blockscoutClient,
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
retry: 2,
|
|
17740
|
-
retryDelay: 1e3
|
|
17829
|
+
...BALANCE_DEFAULT_QUERY_CFG,
|
|
17830
|
+
queryKey: [BLOCKSCOUT_QUERY_KEY, "nfts", resolvedChainId, blockscoutApiUrl, address],
|
|
17831
|
+
queryFn: () => blockscoutClient.getNfts(address)
|
|
17741
17832
|
});
|
|
17742
17833
|
const erc20TokenAddresses = useMemo10(() => {
|
|
17743
|
-
if (!
|
|
17744
|
-
return
|
|
17745
|
-
}, [
|
|
17746
|
-
const { data: erc3643Results } =
|
|
17834
|
+
if (!blockscoutItems) return [];
|
|
17835
|
+
return blockscoutItems.filter((tb) => tb.token.type === "ERC-20").map((tb) => tb.token.address_hash);
|
|
17836
|
+
}, [blockscoutItems]);
|
|
17837
|
+
const { data: erc3643Results } = useQuery15({
|
|
17747
17838
|
queryKey: [ERC3643_DETECTION_QUERY_KEY, resolvedChainId, address, erc20TokenAddresses],
|
|
17748
17839
|
queryFn: async () => {
|
|
17749
17840
|
if (!publicClient || erc20TokenAddresses.length === 0) {
|
|
@@ -17778,10 +17869,11 @@ function useBlockscoutAssets(options) {
|
|
|
17778
17869
|
}
|
|
17779
17870
|
return results;
|
|
17780
17871
|
},
|
|
17872
|
+
retry: false,
|
|
17781
17873
|
enabled: !!address && enabled && detectSecurityTokens && erc20TokenAddresses.length > 0 && !!publicClient,
|
|
17782
|
-
staleTime:
|
|
17783
|
-
|
|
17784
|
-
|
|
17874
|
+
staleTime: 6e4
|
|
17875
|
+
// 1 minute
|
|
17876
|
+
// gcTime: BLOCKSCOUT_QUERY_GC_TIME,
|
|
17785
17877
|
});
|
|
17786
17878
|
const assets = useMemo10(() => {
|
|
17787
17879
|
const result = [];
|
|
@@ -17796,8 +17888,47 @@ function useBlockscoutAssets(options) {
|
|
|
17796
17888
|
decimals: nativeBalanceData.decimals
|
|
17797
17889
|
});
|
|
17798
17890
|
}
|
|
17799
|
-
if (
|
|
17800
|
-
const
|
|
17891
|
+
if (!!customItems?.length) {
|
|
17892
|
+
const customErc20Tokens = customItems.filter((item) => item.token.type === "ERC-20");
|
|
17893
|
+
customErc20Tokens.forEach((item) => {
|
|
17894
|
+
const asset = mapBlockscoutToAsset(item);
|
|
17895
|
+
if (asset.address) {
|
|
17896
|
+
addedAddresses.add(asset.address.toLowerCase());
|
|
17897
|
+
}
|
|
17898
|
+
if (asset.type === "erc20" && asset.address && erc3643Results) {
|
|
17899
|
+
const registryAddress = erc3643Results.get(asset.address.toLowerCase());
|
|
17900
|
+
if (registryAddress) {
|
|
17901
|
+
asset.type = "erc3643";
|
|
17902
|
+
asset.complianceStatus = {
|
|
17903
|
+
isSecurityToken: true,
|
|
17904
|
+
identityRegistry: registryAddress
|
|
17905
|
+
};
|
|
17906
|
+
}
|
|
17907
|
+
}
|
|
17908
|
+
result.push(asset);
|
|
17909
|
+
});
|
|
17910
|
+
}
|
|
17911
|
+
if (!!coreTokenBalances?.length) {
|
|
17912
|
+
coreTokenBalances.forEach((item) => {
|
|
17913
|
+
const asset = mapBlockscoutToAsset(item);
|
|
17914
|
+
if (asset.address) {
|
|
17915
|
+
addedAddresses.add(asset.address.toLowerCase());
|
|
17916
|
+
}
|
|
17917
|
+
if (asset.type === "erc20" && asset.address && erc3643Results) {
|
|
17918
|
+
const registryAddress = erc3643Results.get(asset.address.toLowerCase());
|
|
17919
|
+
if (registryAddress) {
|
|
17920
|
+
asset.type = "erc3643";
|
|
17921
|
+
asset.complianceStatus = {
|
|
17922
|
+
isSecurityToken: true,
|
|
17923
|
+
identityRegistry: registryAddress
|
|
17924
|
+
};
|
|
17925
|
+
}
|
|
17926
|
+
}
|
|
17927
|
+
result.push(asset);
|
|
17928
|
+
});
|
|
17929
|
+
}
|
|
17930
|
+
if (!!blockscoutItems?.length) {
|
|
17931
|
+
const erc20Tokens = blockscoutItems.filter((balance) => balance.token.type === "ERC-20");
|
|
17801
17932
|
const mappedTokens = erc20Tokens.map((balance) => {
|
|
17802
17933
|
const asset = mapBlockscoutToAsset(balance);
|
|
17803
17934
|
if (asset.address) {
|
|
@@ -17828,7 +17959,16 @@ function useBlockscoutAssets(options) {
|
|
|
17828
17959
|
result.push(...mappedNfts);
|
|
17829
17960
|
}
|
|
17830
17961
|
return result;
|
|
17831
|
-
}, [
|
|
17962
|
+
}, [
|
|
17963
|
+
nativeBalanceData,
|
|
17964
|
+
blockscoutItems,
|
|
17965
|
+
coreTokenBalances,
|
|
17966
|
+
customItems,
|
|
17967
|
+
nftItems,
|
|
17968
|
+
erc3643Results,
|
|
17969
|
+
watchTokenAssets,
|
|
17970
|
+
chainConfig
|
|
17971
|
+
]);
|
|
17832
17972
|
const nativeBalance = useMemo10(() => {
|
|
17833
17973
|
if (!nativeBalanceData) return null;
|
|
17834
17974
|
return {
|
|
@@ -17838,9 +17978,9 @@ function useBlockscoutAssets(options) {
|
|
|
17838
17978
|
};
|
|
17839
17979
|
}, [nativeBalanceData]);
|
|
17840
17980
|
const error = useMemo10(() => {
|
|
17841
|
-
if (!
|
|
17842
|
-
return createError(
|
|
17843
|
-
}, [
|
|
17981
|
+
if (!blockscoutError) return null;
|
|
17982
|
+
return createError(blockscoutError);
|
|
17983
|
+
}, [blockscoutError]);
|
|
17844
17984
|
const refreshBalances = useCallback23(async () => {
|
|
17845
17985
|
const now = Date.now();
|
|
17846
17986
|
if (now - lastRefreshRef.current < BLOCKSCOUT_REFRESH_DEBOUNCE) {
|
|
@@ -17848,16 +17988,15 @@ function useBlockscoutAssets(options) {
|
|
|
17848
17988
|
}
|
|
17849
17989
|
lastRefreshRef.current = now;
|
|
17850
17990
|
await Promise.all([
|
|
17851
|
-
|
|
17852
|
-
qc.invalidateQueries({ queryKey:
|
|
17853
|
-
|
|
17854
|
-
//
|
|
17991
|
+
qc.invalidateQueries({ queryKey: [NATIVE_BALANCE_QUERY_KEY2] }),
|
|
17992
|
+
qc.invalidateQueries({ queryKey: customTokenBalancesQueryKey }),
|
|
17993
|
+
qc.invalidateQueries({ queryKey: [`NON-${BLOCKSCOUT_QUERY_KEY}`] }),
|
|
17994
|
+
// invalidate non-blockscout core token list
|
|
17855
17995
|
qc.invalidateQueries({ queryKey: [BLOCKSCOUT_QUERY_KEY] }),
|
|
17856
17996
|
// invalidates both - token-balances and nfts queries
|
|
17857
|
-
// refetchWatchTokens()
|
|
17858
17997
|
qc.invalidateQueries({ queryKey: [WATCH_TOKENS_QUERY_KEY] })
|
|
17859
17998
|
]);
|
|
17860
|
-
}, [qc]);
|
|
17999
|
+
}, [qc, customTokenBalancesQueryKey]);
|
|
17861
18000
|
const getTokenBalance = useCallback23(
|
|
17862
18001
|
(tokenAddress) => {
|
|
17863
18002
|
return assets.find((a) => a.address?.toLowerCase() === tokenAddress.toLowerCase()) || null;
|
|
@@ -17867,36 +18006,35 @@ function useBlockscoutAssets(options) {
|
|
|
17867
18006
|
return {
|
|
17868
18007
|
nativeBalance,
|
|
17869
18008
|
assets,
|
|
17870
|
-
isLoading: nativeLoading ||
|
|
17871
|
-
isFetching: nativeFetching ||
|
|
18009
|
+
isLoading: nativeLoading || blockscoutLoading || customLoading || coreTokensLoading || nftsLoading || watchTokensLoading,
|
|
18010
|
+
isFetching: nativeFetching || blockscoutFetching || customFetching || coreTokensFetching || nftsFetching || watchTokensFetching,
|
|
17872
18011
|
isInitialLoading: nativeLoading && !nativeBalanceData,
|
|
17873
18012
|
error,
|
|
17874
|
-
isBlockscoutAvailable: !!blockscoutClient && !
|
|
18013
|
+
isBlockscoutAvailable: !!blockscoutClient && !blockscoutError,
|
|
17875
18014
|
refreshBalances,
|
|
17876
18015
|
getTokenBalance,
|
|
17877
18016
|
lastUpdated: dataUpdatedAt || null
|
|
17878
18017
|
};
|
|
17879
18018
|
}
|
|
17880
|
-
var NATIVE_BALANCE_QUERY_KEY, BLOCKSCOUT_QUERY_KEY, ERC3643_DETECTION_QUERY_KEY, ERC3643_ABI;
|
|
17881
18019
|
var init_useBlockscoutAssets = __esm({
|
|
17882
|
-
"src/internal/hooks/useBlockscoutAssets.ts"() {
|
|
18020
|
+
"src/internal/hooks/useBlockscoutAssets/useBlockscoutAssets.ts"() {
|
|
17883
18021
|
init_ProviderContext();
|
|
17884
18022
|
init_initial();
|
|
17885
18023
|
init_constants();
|
|
17886
18024
|
init_useResolvedPublicClient();
|
|
18025
|
+
init_constants5();
|
|
18026
|
+
init_useNativeBalance();
|
|
18027
|
+
init_useWatchTokens();
|
|
18028
|
+
init_utils8();
|
|
18029
|
+
}
|
|
18030
|
+
});
|
|
18031
|
+
|
|
18032
|
+
// src/internal/hooks/useBlockscoutAssets/index.ts
|
|
18033
|
+
var init_useBlockscoutAssets2 = __esm({
|
|
18034
|
+
"src/internal/hooks/useBlockscoutAssets/index.ts"() {
|
|
18035
|
+
init_useBlockscoutAssets();
|
|
18036
|
+
init_useNativeBalance();
|
|
17887
18037
|
init_useWatchTokens();
|
|
17888
|
-
NATIVE_BALANCE_QUERY_KEY = "blockscouts-native-balance-query";
|
|
17889
|
-
BLOCKSCOUT_QUERY_KEY = "blockscout-token-balances";
|
|
17890
|
-
ERC3643_DETECTION_QUERY_KEY = "erc3643-detection";
|
|
17891
|
-
ERC3643_ABI = [
|
|
17892
|
-
{
|
|
17893
|
-
name: "identityRegistry",
|
|
17894
|
-
type: "function",
|
|
17895
|
-
stateMutability: "view",
|
|
17896
|
-
inputs: [],
|
|
17897
|
-
outputs: [{ name: "", type: "address" }]
|
|
17898
|
-
}
|
|
17899
|
-
];
|
|
17900
18038
|
}
|
|
17901
18039
|
});
|
|
17902
18040
|
|
|
@@ -17909,7 +18047,7 @@ var init_no_image = __esm({
|
|
|
17909
18047
|
});
|
|
17910
18048
|
|
|
17911
18049
|
// src/internal/components/BalanceView/BalanceView.tsx
|
|
17912
|
-
import { formatUnits as
|
|
18050
|
+
import { formatUnits as formatUnits5 } from "viem";
|
|
17913
18051
|
import { jsx as jsx81, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
17914
18052
|
function BalanceView(props) {
|
|
17915
18053
|
const { className } = props;
|
|
@@ -17917,22 +18055,35 @@ function BalanceView(props) {
|
|
|
17917
18055
|
const showFiatBalance = config.current?.features?.showActiveBalanceAsFiat;
|
|
17918
18056
|
const balance = useLayoutDataStore((st) => st.balance);
|
|
17919
18057
|
const cryptoSymbol = useLayoutDataStore((st) => st.cryptoSymbol);
|
|
17920
|
-
const cryptoBalance = Number(
|
|
18058
|
+
const cryptoBalance = Number(formatUnits5(balance?.value || BigInt(0), balance?.decimals || 18));
|
|
17921
18059
|
const fiatBalance = useLayoutDataStore((st) => st.fiatBalance);
|
|
17922
18060
|
const fiatSymbol = useLayoutDataStore((st) => st.fiatSymbol);
|
|
17923
|
-
const
|
|
17924
|
-
return /* @__PURE__ */ jsxs75(
|
|
17925
|
-
|
|
17926
|
-
|
|
17927
|
-
|
|
17928
|
-
|
|
17929
|
-
|
|
17930
|
-
|
|
17931
|
-
|
|
18061
|
+
const BalanceIcon = showFiatBalance && !!fiatBalance ? TOKENS_ICONS[cryptoSymbol] : null;
|
|
18062
|
+
return /* @__PURE__ */ jsxs75(
|
|
18063
|
+
"p",
|
|
18064
|
+
{
|
|
18065
|
+
className: cn(
|
|
18066
|
+
//
|
|
18067
|
+
"flex items-center gap-1",
|
|
18068
|
+
"text-lg leading-5 font-bold",
|
|
18069
|
+
className
|
|
18070
|
+
),
|
|
18071
|
+
children: [
|
|
18072
|
+
!!BalanceIcon && /* @__PURE__ */ jsx81(BalanceIcon, { className: "w-5 h-5" }),
|
|
18073
|
+
/* @__PURE__ */ jsxs75("span", { children: [
|
|
18074
|
+
showFiatBalance && !!fiatBalance && BALANCE_PREFIXES[fiatSymbol],
|
|
18075
|
+
formatPrice(showFiatBalance ? fiatBalance : cryptoBalance)
|
|
18076
|
+
] }),
|
|
18077
|
+
showFiatBalance && !!fiatBalance && !BALANCE_PREFIXES[fiatSymbol] && /* @__PURE__ */ jsx81("span", { children: fiatSymbol }),
|
|
18078
|
+
!showFiatBalance && /* @__PURE__ */ jsx81("span", { children: cryptoSymbol })
|
|
18079
|
+
]
|
|
18080
|
+
}
|
|
18081
|
+
);
|
|
17932
18082
|
}
|
|
17933
18083
|
var BALANCE_PREFIXES;
|
|
17934
18084
|
var init_BalanceView = __esm({
|
|
17935
18085
|
"src/internal/components/BalanceView/BalanceView.tsx"() {
|
|
18086
|
+
init_tokens();
|
|
17936
18087
|
init_useLayoutDataStore();
|
|
17937
18088
|
init_priceFormatter();
|
|
17938
18089
|
init_utils2();
|
|
@@ -17955,9 +18106,9 @@ var init_BalanceView2 = __esm({
|
|
|
17955
18106
|
});
|
|
17956
18107
|
|
|
17957
18108
|
// src/internal/components/PortfolioMenu/PortfolioItem.tsx
|
|
17958
|
-
import { useQuery as
|
|
18109
|
+
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
17959
18110
|
import { LoaderIcon as LoaderIcon8, ShieldAlertIcon, SparklesIcon } from "lucide-react";
|
|
17960
|
-
import { formatUnits as
|
|
18111
|
+
import { formatUnits as formatUnits6 } from "viem";
|
|
17961
18112
|
import { Fragment as Fragment30, jsx as jsx82, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
17962
18113
|
function openInExplorer(address) {
|
|
17963
18114
|
window.open(`${getExplorerUrl()}/address/${address}`, "_blank");
|
|
@@ -18065,7 +18216,7 @@ function PortfolioItem(props) {
|
|
|
18065
18216
|
queryKey: asset.balanceQueryKey,
|
|
18066
18217
|
queryFn: asset.balanceQuery
|
|
18067
18218
|
} : void 0;
|
|
18068
|
-
const { data: projectAssetBalance } =
|
|
18219
|
+
const { data: projectAssetBalance } = useQuery16({
|
|
18069
18220
|
enabled: !!projectAssetQuery,
|
|
18070
18221
|
retry: false,
|
|
18071
18222
|
queryKey: projectAssetQuery?.queryKey ?? ["project-asset-balance-disabled", asset.symbol],
|
|
@@ -18075,7 +18226,7 @@ function PortfolioItem(props) {
|
|
|
18075
18226
|
const isSecurity = isSecurityToken(asset);
|
|
18076
18227
|
const embeddedRate = Number(asset.exchangeRateUsd || 0);
|
|
18077
18228
|
const hasEmbeddedRate = Number.isFinite(embeddedRate) && embeddedRate > 0;
|
|
18078
|
-
const { data: assetRate, isLoading: isRateLoading } =
|
|
18229
|
+
const { data: assetRate, isLoading: isRateLoading } = useQuery16({
|
|
18079
18230
|
enabled: !!address && !hasEmbeddedRate && !isProjectAsset && !isNft && !isSecurity && (!!customAssetRateQuery || !!isAssetRateAvailable(asset.symbol)),
|
|
18080
18231
|
retry: false,
|
|
18081
18232
|
staleTime: 4 * 60 * 1e3,
|
|
@@ -18084,7 +18235,7 @@ function PortfolioItem(props) {
|
|
|
18084
18235
|
queryFn: async () => await resolveAssetRate(asset.symbol, asset.address, customAssetRateQuery)
|
|
18085
18236
|
});
|
|
18086
18237
|
const hasProjectAssetBalance = isProjectAsset && projectAssetBalance != null;
|
|
18087
|
-
const renderBalance = hasProjectAssetBalance ? projectAssetBalance.cryptoFormatted : Number(
|
|
18238
|
+
const renderBalance = hasProjectAssetBalance ? projectAssetBalance.cryptoFormatted : Number(formatUnits6(BigInt(asset?.balance || "0"), asset?.decimals || 18));
|
|
18088
18239
|
const resolvedRate = hasEmbeddedRate ? embeddedRate : Number(assetRate?.price || 0);
|
|
18089
18240
|
const usdRenderBalance = resolvedRate > 0 ? renderBalance * resolvedRate : 0;
|
|
18090
18241
|
const shortContractAddress = asset.address ? truncateMiddle(asset.address, 6, 4) : null;
|
|
@@ -18166,7 +18317,7 @@ var init_PortfolioItem = __esm({
|
|
|
18166
18317
|
|
|
18167
18318
|
// src/internal/components/PortfolioMenu/PortfolioMenu.tsx
|
|
18168
18319
|
import { useQueryClient as useQueryClient20 } from "@tanstack/react-query";
|
|
18169
|
-
import { ArrowLeft as ArrowLeft16, Gem, Loader as
|
|
18320
|
+
import { ArrowLeft as ArrowLeft16, Gem, Loader as Loader16, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
18170
18321
|
import { useCallback as useCallback24 } from "react";
|
|
18171
18322
|
import { jsx as jsx83, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
18172
18323
|
function PortfolioMenu() {
|
|
@@ -18174,15 +18325,14 @@ function PortfolioMenu() {
|
|
|
18174
18325
|
const { t } = useT();
|
|
18175
18326
|
const qc = useQueryClient20();
|
|
18176
18327
|
const address = useSession((st) => st.address);
|
|
18177
|
-
const chainConfig = useSession((st) => st.chainConfig);
|
|
18178
18328
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
18179
18329
|
const {
|
|
18180
18330
|
assets: blockscoutAssets,
|
|
18181
18331
|
refreshBalances: refreshBlockscoutBalances,
|
|
18182
18332
|
isLoading: isBlockscoutLoading,
|
|
18183
18333
|
isFetching: isBlockscoutFetching,
|
|
18184
|
-
error: blockscoutError
|
|
18185
|
-
isBlockscoutAvailable
|
|
18334
|
+
error: blockscoutError
|
|
18335
|
+
// isBlockscoutAvailable
|
|
18186
18336
|
} = useBlockscoutAssets({
|
|
18187
18337
|
address,
|
|
18188
18338
|
enabled: !!address
|
|
@@ -18221,11 +18371,11 @@ function PortfolioMenu() {
|
|
|
18221
18371
|
size: "icon",
|
|
18222
18372
|
onClick: refreshAllAssetsBalances,
|
|
18223
18373
|
disabled: isBlockscoutLoading || isBlockscoutFetching,
|
|
18224
|
-
children: isBlockscoutLoading || isBlockscoutFetching ? /* @__PURE__ */ jsx83(
|
|
18374
|
+
children: isBlockscoutLoading || isBlockscoutFetching ? /* @__PURE__ */ jsx83(Loader16, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx83(RefreshCw2, { className: "h-4 w-4" })
|
|
18225
18375
|
}
|
|
18226
18376
|
)
|
|
18227
18377
|
] }),
|
|
18228
|
-
isBlockscoutLoading && /* @__PURE__ */ jsx83("div", { className: "w-full flex items-center justify-center gap-[var(--ui-kit-gap)] p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ jsx83(
|
|
18378
|
+
isBlockscoutLoading && /* @__PURE__ */ jsx83("div", { className: "w-full flex items-center justify-center gap-[var(--ui-kit-gap)] p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ jsx83(Loader16, { className: "w-4 h-4 animate-spin" }) }),
|
|
18229
18379
|
!isBlockscoutLoading && blockscoutAssets?.length === 0 && /* @__PURE__ */ jsxs77(Highlight, { type: "info", className: "flex flex-col items-center justify-center gap-[var(--ui-kit-gap)]", children: [
|
|
18230
18380
|
/* @__PURE__ */ jsx83(Gem, { className: "w-8 h-8" }),
|
|
18231
18381
|
/* @__PURE__ */ jsx83("span", { className: "block", children: t("passport:portfolioMenu.noAssets") })
|
|
@@ -18239,11 +18389,6 @@ function PortfolioMenu() {
|
|
|
18239
18389
|
},
|
|
18240
18390
|
`${asset.type}-${asset.address || "native"}-${asset.tokenId || index}`
|
|
18241
18391
|
)),
|
|
18242
|
-
!isBlockscoutAvailable && /* @__PURE__ */ jsx83(Highlight, {
|
|
18243
|
-
type: "warning",
|
|
18244
|
-
//@ts-expect-error i18n typings
|
|
18245
|
-
children: t("passport:portfolioMenu.noBlockscout", { chain: chainConfig?.name?.toUpperCase() || "UNKNOWN" })
|
|
18246
|
-
}),
|
|
18247
18392
|
blockscoutError && /* @__PURE__ */ jsx83(Highlight, { type: "error", children: blockscoutError?.message })
|
|
18248
18393
|
] })
|
|
18249
18394
|
}
|
|
@@ -18254,7 +18399,7 @@ var init_PortfolioMenu = __esm({
|
|
|
18254
18399
|
init_ProviderContext();
|
|
18255
18400
|
init_SessionContext();
|
|
18256
18401
|
init_i18n();
|
|
18257
|
-
|
|
18402
|
+
init_useBlockscoutAssets2();
|
|
18258
18403
|
init_useLayoutDataStore();
|
|
18259
18404
|
init_useLayoutStore();
|
|
18260
18405
|
init_Expandable2();
|
|
@@ -18352,9 +18497,9 @@ var init_nickname_fingerprint = __esm({
|
|
|
18352
18497
|
});
|
|
18353
18498
|
|
|
18354
18499
|
// src/internal/components/ReceiveMenu/ReceiveMenu.tsx
|
|
18355
|
-
import { ArrowLeft as ArrowLeft17, CheckCircle2 as CheckCircle23, Copy as Copy2, Info as Info5, Loader as
|
|
18500
|
+
import { ArrowLeft as ArrowLeft17, CheckCircle2 as CheckCircle23, Copy as Copy2, Info as Info5, Loader as Loader17, Shield } from "lucide-react";
|
|
18356
18501
|
import QRCode from "qrcode";
|
|
18357
|
-
import { useCallback as useCallback25, useEffect as useEffect33, useMemo as useMemo11, useState as
|
|
18502
|
+
import { useCallback as useCallback25, useEffect as useEffect33, useMemo as useMemo11, useState as useState20 } from "react";
|
|
18358
18503
|
import { Fragment as Fragment31, jsx as jsx84, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
18359
18504
|
function ReceiveMenu() {
|
|
18360
18505
|
const session = useSession((st) => st.session);
|
|
@@ -18365,9 +18510,9 @@ function ReceiveMenu() {
|
|
|
18365
18510
|
const { t } = useT();
|
|
18366
18511
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
18367
18512
|
const open = page === "receive";
|
|
18368
|
-
const [qrCodeUrl, setQrCodeUrl] =
|
|
18369
|
-
const [copied, setCopied] =
|
|
18370
|
-
const [fingerprintCopied, setFingerprintCopied] =
|
|
18513
|
+
const [qrCodeUrl, setQrCodeUrl] = useState20("");
|
|
18514
|
+
const [copied, setCopied] = useState20(false);
|
|
18515
|
+
const [fingerprintCopied, setFingerprintCopied] = useState20(false);
|
|
18371
18516
|
const fingerprint = useMemo11(() => {
|
|
18372
18517
|
if (!session?.ownerAddress) return null;
|
|
18373
18518
|
try {
|
|
@@ -18426,7 +18571,7 @@ function ReceiveMenu() {
|
|
|
18426
18571
|
/* @__PURE__ */ jsx84("strong", { className: "block w-full", children: `${t("passport:common.network")}: ${chainConfig.name}` }),
|
|
18427
18572
|
/* @__PURE__ */ jsx84("span", { className: "block w-full", children: t("passport:receiveMenu.warning") })
|
|
18428
18573
|
] }),
|
|
18429
|
-
/* @__PURE__ */ jsx84("div", { className: "flex items-center justify-center p-[var(--ui-kit-pd)]", style: { minHeight: "216px" }, children: qrCodeUrl ? /* @__PURE__ */ jsx84("img", { src: qrCodeUrl, alt: "Wallet QR Code", className: "w-48 h-48" }) : /* @__PURE__ */ jsx84(
|
|
18574
|
+
/* @__PURE__ */ jsx84("div", { className: "flex items-center justify-center p-[var(--ui-kit-pd)]", style: { minHeight: "216px" }, children: qrCodeUrl ? /* @__PURE__ */ jsx84("img", { src: qrCodeUrl, alt: "Wallet QR Code", className: "w-48 h-48" }) : /* @__PURE__ */ jsx84(Loader17, { className: "w-4 h-4 animate-spin" }) }),
|
|
18430
18575
|
fingerprint && /* @__PURE__ */ jsxs78("div", { className: "flex items-center justify-center gap-2 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
18431
18576
|
/* @__PURE__ */ jsx84(Shield, { className: "w-4 h-4 text-[var(--ui-kit-bg-success)]" }),
|
|
18432
18577
|
/* @__PURE__ */ jsx84("span", { className: "text-sm text-[var(--ui-kit-fg-muted)]", children: t("passport:common.fingerprint") }),
|
|
@@ -18499,7 +18644,7 @@ var init_useSecurityStore = __esm({
|
|
|
18499
18644
|
|
|
18500
18645
|
// src/internal/components/SecurityMenu/constants.ts
|
|
18501
18646
|
var KEYSHARE_RECOVERY_STATS_QUERY, CONNECTED_TRUSTED_APPS_QUERY;
|
|
18502
|
-
var
|
|
18647
|
+
var init_constants6 = __esm({
|
|
18503
18648
|
"src/internal/components/SecurityMenu/constants.ts"() {
|
|
18504
18649
|
KEYSHARE_RECOVERY_STATS_QUERY = "keyshare-recovery-stats-query";
|
|
18505
18650
|
CONNECTED_TRUSTED_APPS_QUERY = "connected-trusted-apps-query";
|
|
@@ -18507,11 +18652,11 @@ var init_constants5 = __esm({
|
|
|
18507
18652
|
});
|
|
18508
18653
|
|
|
18509
18654
|
// src/internal/components/SecurityMenu/ConnectedApps/useConnectedApps.ts
|
|
18510
|
-
import { useQuery as
|
|
18655
|
+
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
18511
18656
|
function useConnectedApps() {
|
|
18512
18657
|
const session = useSession((st) => st.session);
|
|
18513
18658
|
const userId = session?.mpcUserId || null;
|
|
18514
|
-
return
|
|
18659
|
+
return useQuery17({
|
|
18515
18660
|
retry: false,
|
|
18516
18661
|
enabled: !!userId,
|
|
18517
18662
|
queryKey: [CONNECTED_TRUSTED_APPS_QUERY, userId],
|
|
@@ -18528,7 +18673,7 @@ var init_useConnectedApps = __esm({
|
|
|
18528
18673
|
"src/internal/components/SecurityMenu/ConnectedApps/useConnectedApps.ts"() {
|
|
18529
18674
|
init_SessionContext();
|
|
18530
18675
|
init_httpClient();
|
|
18531
|
-
|
|
18676
|
+
init_constants6();
|
|
18532
18677
|
}
|
|
18533
18678
|
});
|
|
18534
18679
|
|
|
@@ -18665,7 +18810,7 @@ var init_ConnectedApps = __esm({
|
|
|
18665
18810
|
|
|
18666
18811
|
// src/internal/components/SecurityMenu/ConnectedApps/UntrustApplication.tsx
|
|
18667
18812
|
import { useMutation as useMutation18, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
|
|
18668
|
-
import { AppWindowMac as AppWindowMac2, Loader as
|
|
18813
|
+
import { AppWindowMac as AppWindowMac2, Loader as Loader18 } from "lucide-react";
|
|
18669
18814
|
import { jsx as jsx86, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
18670
18815
|
function UntrustApplication() {
|
|
18671
18816
|
const { t } = useT();
|
|
@@ -18742,7 +18887,7 @@ function UntrustApplication() {
|
|
|
18742
18887
|
className: "flex-1",
|
|
18743
18888
|
onClick: () => handleUntrustApp(),
|
|
18744
18889
|
disabled: isUntrustingApp,
|
|
18745
|
-
children: isUntrustingApp ? /* @__PURE__ */ jsx86(
|
|
18890
|
+
children: isUntrustingApp ? /* @__PURE__ */ jsx86(Loader18, { className: "h-4 w-4 animate-spin" }) : t("passport:common.delete")
|
|
18746
18891
|
}
|
|
18747
18892
|
)
|
|
18748
18893
|
] })
|
|
@@ -18755,7 +18900,7 @@ var init_UntrustApplication = __esm({
|
|
|
18755
18900
|
init_iframe_manager();
|
|
18756
18901
|
init_button();
|
|
18757
18902
|
init_highlight();
|
|
18758
|
-
|
|
18903
|
+
init_constants6();
|
|
18759
18904
|
init_useSecurityStore();
|
|
18760
18905
|
}
|
|
18761
18906
|
});
|
|
@@ -18770,11 +18915,11 @@ var init_ConnectedApps2 = __esm({
|
|
|
18770
18915
|
});
|
|
18771
18916
|
|
|
18772
18917
|
// src/internal/components/SecurityMenu/Keyshare/KeyshareStatus.tsx
|
|
18773
|
-
import { Loader as
|
|
18918
|
+
import { Loader as Loader19 } from "lucide-react";
|
|
18774
18919
|
import { jsx as jsx87, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
18775
18920
|
function KeyshareStatus(props) {
|
|
18776
18921
|
const { isLoading, content, icon: Icon2, children } = props;
|
|
18777
|
-
if (isLoading) return /* @__PURE__ */ jsx87(
|
|
18922
|
+
if (isLoading) return /* @__PURE__ */ jsx87(Loader19, { className: "w-4 h-4 animate-spin" });
|
|
18778
18923
|
return /* @__PURE__ */ jsxs81("div", { className: "group relative w-full h-full", children: [
|
|
18779
18924
|
children,
|
|
18780
18925
|
/* @__PURE__ */ jsx87(
|
|
@@ -18866,11 +19011,11 @@ var init_LastBackup = __esm({
|
|
|
18866
19011
|
});
|
|
18867
19012
|
|
|
18868
19013
|
// src/internal/components/SecurityMenu/Keyshare/useKeyshareRecoveryStats.ts
|
|
18869
|
-
import { useQuery as
|
|
19014
|
+
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
18870
19015
|
function useKeyshareRecoveryStats() {
|
|
18871
19016
|
const session = useSession((st) => st.session);
|
|
18872
19017
|
const userId = session?.mpcUserId || null;
|
|
18873
|
-
return
|
|
19018
|
+
return useQuery18({
|
|
18874
19019
|
enabled: !!userId,
|
|
18875
19020
|
queryKey: [KEYSHARE_RECOVERY_STATS_QUERY, userId],
|
|
18876
19021
|
queryFn: async () => {
|
|
@@ -18893,7 +19038,7 @@ var init_useKeyshareRecoveryStats = __esm({
|
|
|
18893
19038
|
init_keyshare();
|
|
18894
19039
|
init_iframe_manager();
|
|
18895
19040
|
init_vaultClient();
|
|
18896
|
-
|
|
19041
|
+
init_constants6();
|
|
18897
19042
|
}
|
|
18898
19043
|
});
|
|
18899
19044
|
|
|
@@ -19312,7 +19457,7 @@ var init_useBridgeStore = __esm({
|
|
|
19312
19457
|
// src/internal/components/SendMenu/hyperbridge/components/SenderSelector.tsx
|
|
19313
19458
|
import { useConnectModal } from "@rainbow-me/rainbowkit";
|
|
19314
19459
|
import { useMutation as useMutation19 } from "@tanstack/react-query";
|
|
19315
|
-
import { useEffect as useEffect36, useRef as
|
|
19460
|
+
import { useEffect as useEffect36, useRef as useRef16, useState as useState21 } from "react";
|
|
19316
19461
|
import { useSignMessage } from "wagmi";
|
|
19317
19462
|
import { jsx as jsx91, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
19318
19463
|
function SenderSelector(props) {
|
|
@@ -19323,11 +19468,11 @@ function SenderSelector(props) {
|
|
|
19323
19468
|
const { openConnectModal } = useConnectModal();
|
|
19324
19469
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
19325
19470
|
const directWalletIsConnected = useExternalWalletStore((st) => st.isExternalConnected);
|
|
19326
|
-
const pendingWalletRef =
|
|
19471
|
+
const pendingWalletRef = useRef16(null);
|
|
19327
19472
|
const originChain = useBridgeStore((st) => st.originChain);
|
|
19328
19473
|
const bridgeSender = useBridgeStore((st) => st.bridgeSender);
|
|
19329
19474
|
const bridgeSenders = useBridgeStore((st) => st.bridgeSenders);
|
|
19330
|
-
const [walletMessage, setWalletMessage] =
|
|
19475
|
+
const [walletMessage, setWalletMessage] = useState21(null);
|
|
19331
19476
|
useEffect36(() => {
|
|
19332
19477
|
useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
|
|
19333
19478
|
}, [walletMessage]);
|
|
@@ -19557,11 +19702,11 @@ var init_wallets = __esm({
|
|
|
19557
19702
|
});
|
|
19558
19703
|
|
|
19559
19704
|
// src/internal/components/SendMenu/hyperbridge/hooks/useAvailableSenders.ts
|
|
19560
|
-
import { useEffect as useEffect37, useRef as
|
|
19705
|
+
import { useEffect as useEffect37, useRef as useRef17 } from "react";
|
|
19561
19706
|
function useAvailableSenders() {
|
|
19562
19707
|
const address = useSession((st) => st.address);
|
|
19563
19708
|
const { profiles } = useLinkedProfiles();
|
|
19564
|
-
const lastCalcedSenders =
|
|
19709
|
+
const lastCalcedSenders = useRef17([]);
|
|
19565
19710
|
useEffect37(() => {
|
|
19566
19711
|
const sendersAccumulator = [
|
|
19567
19712
|
{
|
|
@@ -19901,7 +20046,7 @@ var init_executeWarpTxs = __esm({
|
|
|
19901
20046
|
|
|
19902
20047
|
// src/internal/components/SendMenu/hyperbridge/utils.ts
|
|
19903
20048
|
import { SUPPORTED_CHAINS as SUPPORTED_CHAINS2 } from "@embarkai/core/read";
|
|
19904
|
-
import { formatUnits as
|
|
20049
|
+
import { formatUnits as formatUnits7 } from "viem";
|
|
19905
20050
|
function isNftAsset2(asset) {
|
|
19906
20051
|
if (!asset) return false;
|
|
19907
20052
|
return asset.type === "erc721" || asset.type === "erc1155";
|
|
@@ -19909,13 +20054,13 @@ function isNftAsset2(asset) {
|
|
|
19909
20054
|
function getAssetBalance(asset) {
|
|
19910
20055
|
if (!asset) return 0;
|
|
19911
20056
|
if (isNftAsset2(asset)) return 1;
|
|
19912
|
-
return Number(
|
|
20057
|
+
return Number(formatUnits7(BigInt(asset.balance || "0"), asset.decimals || 18));
|
|
19913
20058
|
}
|
|
19914
20059
|
function isOririnChainEmbarkSupported(originChain) {
|
|
19915
20060
|
const supportedChain = [...SUPPORTED_CHAINS2].map(([chainId]) => chainId);
|
|
19916
20061
|
return supportedChain.includes(CHAINS_UI_META[originChain].chainID);
|
|
19917
20062
|
}
|
|
19918
|
-
var
|
|
20063
|
+
var init_utils9 = __esm({
|
|
19919
20064
|
"src/internal/components/SendMenu/hyperbridge/utils.ts"() {
|
|
19920
20065
|
init_chains();
|
|
19921
20066
|
}
|
|
@@ -20182,14 +20327,14 @@ var init_useBridge = __esm({
|
|
|
20182
20327
|
init_chains();
|
|
20183
20328
|
init_executeWarpTxs();
|
|
20184
20329
|
init_useBridgeStore();
|
|
20185
|
-
|
|
20330
|
+
init_utils9();
|
|
20186
20331
|
init_useHyperlaneHistory();
|
|
20187
20332
|
init_useOperationHashesStore();
|
|
20188
20333
|
}
|
|
20189
20334
|
});
|
|
20190
20335
|
|
|
20191
20336
|
// src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneRoutes.ts
|
|
20192
|
-
import { useQuery as
|
|
20337
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
20193
20338
|
import { useEffect as useEffect39 } from "react";
|
|
20194
20339
|
function useHyperlaneRoutes() {
|
|
20195
20340
|
const address = useSession((st) => st.address);
|
|
@@ -20200,7 +20345,7 @@ function useHyperlaneRoutes() {
|
|
|
20200
20345
|
data: hyperlaneWarpRoutes = [],
|
|
20201
20346
|
isLoading: isLoadingWarpRoutes,
|
|
20202
20347
|
error: errorWarpRoutes
|
|
20203
|
-
} =
|
|
20348
|
+
} = useQuery19({
|
|
20204
20349
|
retry: false,
|
|
20205
20350
|
enabled: !!address && page === "send" /* SEND */ && flow === "bridge",
|
|
20206
20351
|
queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
|
|
@@ -20246,7 +20391,7 @@ var init_useHyperlaneRoutes = __esm({
|
|
|
20246
20391
|
init_useFlowSelector();
|
|
20247
20392
|
init_api3();
|
|
20248
20393
|
init_useBridgeStore();
|
|
20249
|
-
|
|
20394
|
+
init_utils9();
|
|
20250
20395
|
HYPERLANE_WARP_ROUTES_QUERY_KEY = "hyperlane-available-warp-routes";
|
|
20251
20396
|
}
|
|
20252
20397
|
});
|
|
@@ -20309,9 +20454,9 @@ var init_ResolveChainIcon = __esm({
|
|
|
20309
20454
|
|
|
20310
20455
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
|
|
20311
20456
|
import { CHAINS_BROWSERS_TRANSPORTS as CHAINS_BROWSERS_TRANSPORTS2 } from "@embarkai/core";
|
|
20312
|
-
import { useQuery as
|
|
20457
|
+
import { useQuery as useQuery20, useQueryClient as useQueryClient23 } from "@tanstack/react-query";
|
|
20313
20458
|
import { useCallback as useCallback28, useEffect as useEffect41 } from "react";
|
|
20314
|
-
import { createPublicClient as createPublicClient2, erc20Abi as
|
|
20459
|
+
import { createPublicClient as createPublicClient2, erc20Abi as erc20Abi3, formatUnits as formatUnits8, http as http3 } from "viem";
|
|
20315
20460
|
import { useSwitchChain as useSwitchChain2 } from "wagmi";
|
|
20316
20461
|
function checkWrapedTokenSymbol2(symbol) {
|
|
20317
20462
|
if (WRAPPED_TOKENS.includes(symbol)) {
|
|
@@ -20347,7 +20492,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20347
20492
|
const embarkTokenBalanace = assets.find((a) => selectedWarpRoute?.symbol === checkWrapedTokenSymbol2(a.symbol));
|
|
20348
20493
|
const originChainMeta = CHAINS_UI_META[originChain];
|
|
20349
20494
|
const isSelectedTokenNative = selectedWarpRoute?.symbol?.toUpperCase() === originChainMeta?.chain?.nativeCurrency?.symbol?.toUpperCase();
|
|
20350
|
-
const { data: externalBalanceData, isLoading: isExternalBalanceLoading } =
|
|
20495
|
+
const { data: externalBalanceData, isLoading: isExternalBalanceLoading } = useQuery20({
|
|
20351
20496
|
retry: false,
|
|
20352
20497
|
enabled: bridgeSender === "direct-wallet" && !isSelectedTokenNative && !!directWalletAddress && !!routeTokenAddress && !!originChain,
|
|
20353
20498
|
queryKey: [EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, originChain, directWalletAddress, routeTokenAddress],
|
|
@@ -20360,20 +20505,20 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20360
20505
|
const [value, decimals, symbol] = await Promise.all([
|
|
20361
20506
|
client.readContract({
|
|
20362
20507
|
address: routeTokenAddress,
|
|
20363
|
-
abi:
|
|
20508
|
+
abi: erc20Abi3,
|
|
20364
20509
|
functionName: "balanceOf",
|
|
20365
20510
|
args: [directWalletAddress],
|
|
20366
20511
|
authorizationList: void 0
|
|
20367
20512
|
}),
|
|
20368
20513
|
client.readContract({
|
|
20369
20514
|
address: routeTokenAddress,
|
|
20370
|
-
abi:
|
|
20515
|
+
abi: erc20Abi3,
|
|
20371
20516
|
functionName: "decimals",
|
|
20372
20517
|
authorizationList: void 0
|
|
20373
20518
|
}),
|
|
20374
20519
|
client.readContract({
|
|
20375
20520
|
address: routeTokenAddress,
|
|
20376
|
-
abi:
|
|
20521
|
+
abi: erc20Abi3,
|
|
20377
20522
|
functionName: "symbol",
|
|
20378
20523
|
authorizationList: void 0
|
|
20379
20524
|
})
|
|
@@ -20386,11 +20531,11 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20386
20531
|
});
|
|
20387
20532
|
return [BigInt(0), 18, selectedWarpRoute.symbol];
|
|
20388
20533
|
});
|
|
20389
|
-
const formatted = Number(
|
|
20534
|
+
const formatted = Number(formatUnits8(value, decimals));
|
|
20390
20535
|
return { value, decimals, symbol, formatted };
|
|
20391
20536
|
}
|
|
20392
20537
|
});
|
|
20393
|
-
const { data: externalNativeBalanceData, isLoading: isExternalNativeBalanceLoading } =
|
|
20538
|
+
const { data: externalNativeBalanceData, isLoading: isExternalNativeBalanceLoading } = useQuery20({
|
|
20394
20539
|
retry: false,
|
|
20395
20540
|
enabled: bridgeSender === "direct-wallet" && isSelectedTokenNative && !!directWalletAddress && !!originChain,
|
|
20396
20541
|
queryKey: [EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY, originChain, directWalletAddress],
|
|
@@ -20446,7 +20591,7 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20446
20591
|
}
|
|
20447
20592
|
}, [bridgeSender, originChain, directWalletChainId, switchChainAsync]);
|
|
20448
20593
|
const embarkBalance = embarkTokenBalanace ? getAssetBalance(embarkTokenBalanace) : 0;
|
|
20449
|
-
const externalWalletBalance = isSelectedTokenNative ?
|
|
20594
|
+
const externalWalletBalance = isSelectedTokenNative ? formatUnits8(externalNativeBalanceData?.value || BigInt(0), externalNativeBalanceData?.decimals || 18) : formatUnits8(externalBalanceData?.value || BigInt(0), externalBalanceData?.decimals || 18);
|
|
20450
20595
|
return {
|
|
20451
20596
|
routeTokenBalance: isEmbarkSender ? embarkBalance : externalWalletBalance,
|
|
20452
20597
|
isRouteTokenBalanceLoading: isAssetsLoading || isExternalBalanceLoading || isExternalNativeBalanceLoading
|
|
@@ -20458,12 +20603,12 @@ var init_useBridgeBalance = __esm({
|
|
|
20458
20603
|
init_constants();
|
|
20459
20604
|
init_SessionContext();
|
|
20460
20605
|
init_i18n();
|
|
20461
|
-
|
|
20606
|
+
init_useBlockscoutAssets2();
|
|
20462
20607
|
init_useExternalWalletStore();
|
|
20463
20608
|
init_useFlowSelector();
|
|
20464
20609
|
init_chains();
|
|
20465
20610
|
init_useBridgeStore();
|
|
20466
|
-
|
|
20611
|
+
init_utils9();
|
|
20467
20612
|
EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY = "external-wallet-bridging-balance-query";
|
|
20468
20613
|
EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY = "external-wallet-bridging-native-balance-query";
|
|
20469
20614
|
}
|
|
@@ -20760,11 +20905,11 @@ var init_checkbox = __esm({
|
|
|
20760
20905
|
|
|
20761
20906
|
// src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx
|
|
20762
20907
|
import { LoaderIcon as LoaderIcon12 } from "lucide-react";
|
|
20763
|
-
import { useState as
|
|
20908
|
+
import { useState as useState22 } from "react";
|
|
20764
20909
|
import { jsx as jsx97, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
20765
20910
|
function ConfirmStep(props) {
|
|
20766
20911
|
const { isAssetBridging, bridgeAsset, hyperlaneWarpRoutes } = props;
|
|
20767
|
-
const [userConsent, setUserConsent] =
|
|
20912
|
+
const [userConsent, setUserConsent] = useState22(false);
|
|
20768
20913
|
const { t } = useT();
|
|
20769
20914
|
const address = useSession((st) => st.address);
|
|
20770
20915
|
const bridgeSender = useBridgeStore((st) => st.bridgeSenders.find((s) => s.type === st.bridgeSender));
|
|
@@ -21249,12 +21394,12 @@ var init_HistoryStep = __esm({
|
|
|
21249
21394
|
|
|
21250
21395
|
// src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx
|
|
21251
21396
|
import { ArrowLeftRightIcon as ArrowLeftRightIcon2 } from "lucide-react";
|
|
21252
|
-
import { useMemo as useMemo13, useState as
|
|
21397
|
+
import { useMemo as useMemo13, useState as useState23 } from "react";
|
|
21253
21398
|
import { Fragment as Fragment38, jsx as jsx100, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
21254
21399
|
function SelectAssetRoute(props) {
|
|
21255
21400
|
const { hyperlaneWarpRoutes } = props;
|
|
21256
21401
|
const { t } = useT();
|
|
21257
|
-
const [isTokenSymbolSelector, setIsTokenSymbolSelector] =
|
|
21402
|
+
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = useState23(false);
|
|
21258
21403
|
const selectedAssetSymbol = useBridgeStore((st) => st.bridgeAssetSymbol);
|
|
21259
21404
|
const tokenList = useMemo13(() => {
|
|
21260
21405
|
const tokens = hyperlaneWarpRoutes.map((route) => route.symbol);
|
|
@@ -21361,7 +21506,7 @@ var init_SelectAssetRoute = __esm({
|
|
|
21361
21506
|
init_useFlowSelector();
|
|
21362
21507
|
init_ResolveChainIcon();
|
|
21363
21508
|
init_useBridgeStore();
|
|
21364
|
-
|
|
21509
|
+
init_utils9();
|
|
21365
21510
|
}
|
|
21366
21511
|
});
|
|
21367
21512
|
|
|
@@ -21431,14 +21576,14 @@ var init_HyperlaneBridge = __esm({
|
|
|
21431
21576
|
});
|
|
21432
21577
|
|
|
21433
21578
|
// src/internal/components/SendMenu/hyperbridge/components/HistorySwitch.tsx
|
|
21434
|
-
import { useRef as
|
|
21579
|
+
import { useRef as useRef18 } from "react";
|
|
21435
21580
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
21436
21581
|
function BridgeHistorySwitch(props) {
|
|
21437
21582
|
const { disabled } = props;
|
|
21438
21583
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
21439
21584
|
const isUiLocked = useFlowSelectorStore((st) => st.isUiLocked);
|
|
21440
21585
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
21441
|
-
const lastBridgeStepRef =
|
|
21586
|
+
const lastBridgeStepRef = useRef18(null);
|
|
21442
21587
|
if (selectorFlow !== "bridge" || bridgeStep === "confirm" || bridgeStep === "success" || bridgeStep === "sender-selector" || bridgeStep === "select-token" || bridgeStep === "tx-history-details") {
|
|
21443
21588
|
return null;
|
|
21444
21589
|
}
|
|
@@ -21539,8 +21684,8 @@ var init_useErc3643Compliance = __esm({
|
|
|
21539
21684
|
});
|
|
21540
21685
|
|
|
21541
21686
|
// src/hooks/useNicknameResolve.ts
|
|
21542
|
-
import { useQuery as
|
|
21543
|
-
import { useEffect as useEffect43, useMemo as useMemo14, useState as
|
|
21687
|
+
import { useQuery as useQuery21 } from "@tanstack/react-query";
|
|
21688
|
+
import { useEffect as useEffect43, useMemo as useMemo14, useState as useState24 } from "react";
|
|
21544
21689
|
function looksLikeNickname(input) {
|
|
21545
21690
|
if (!input) return false;
|
|
21546
21691
|
if (input.startsWith("0x")) return false;
|
|
@@ -21550,8 +21695,8 @@ function looksLikeNickname(input) {
|
|
|
21550
21695
|
}
|
|
21551
21696
|
function useNicknameResolve(input, options) {
|
|
21552
21697
|
const { enabled = true, chainId } = options;
|
|
21553
|
-
const [debouncedInput, setDebouncedInput] =
|
|
21554
|
-
const [isDebouncing, setIsDebouncing] =
|
|
21698
|
+
const [debouncedInput, setDebouncedInput] = useState24("");
|
|
21699
|
+
const [isDebouncing, setIsDebouncing] = useState24(false);
|
|
21555
21700
|
const normalized = normalizeNickname(input);
|
|
21556
21701
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
21557
21702
|
useEffect43(() => {
|
|
@@ -21569,7 +21714,7 @@ function useNicknameResolve(input, options) {
|
|
|
21569
21714
|
clearTimeout(timer);
|
|
21570
21715
|
};
|
|
21571
21716
|
}, [normalized, isNicknameInput, enabled]);
|
|
21572
|
-
const query =
|
|
21717
|
+
const query = useQuery21({
|
|
21573
21718
|
queryKey: [...QUERY_KEYS.nicknameResolve(debouncedInput), chainId],
|
|
21574
21719
|
queryFn: async () => await resolveNickname(debouncedInput, chainId),
|
|
21575
21720
|
enabled: enabled && isNicknameInput && debouncedInput.length > 0,
|
|
@@ -21614,14 +21759,14 @@ var init_useNicknameResolve = __esm({
|
|
|
21614
21759
|
});
|
|
21615
21760
|
|
|
21616
21761
|
// src/hooks/useSendTransaction.ts
|
|
21617
|
-
import { useCallback as useCallback29, useState as
|
|
21762
|
+
import { useCallback as useCallback29, useState as useState25 } from "react";
|
|
21618
21763
|
import { encodeFunctionData as encodeFunctionData2, isAddress, parseEther as parseEther2, parseUnits } from "viem";
|
|
21619
21764
|
function useSendTransaction() {
|
|
21620
21765
|
const session = useSession((st) => st.session);
|
|
21621
21766
|
const address = useSession((st) => st.address);
|
|
21622
|
-
const [isLoading, setIsLoading] =
|
|
21623
|
-
const [error, setError] =
|
|
21624
|
-
const [userOpHash, setUserOpHash] =
|
|
21767
|
+
const [isLoading, setIsLoading] = useState25(false);
|
|
21768
|
+
const [error, setError] = useState25(null);
|
|
21769
|
+
const [userOpHash, setUserOpHash] = useState25(null);
|
|
21625
21770
|
const sendTransaction = useCallback29(
|
|
21626
21771
|
async (params) => {
|
|
21627
21772
|
if (!session || !address) {
|
|
@@ -21778,7 +21923,7 @@ var init_useSendTransaction = __esm({
|
|
|
21778
21923
|
});
|
|
21779
21924
|
|
|
21780
21925
|
// src/internal/components/SendMenu/send/utils.ts
|
|
21781
|
-
import { formatUnits as
|
|
21926
|
+
import { formatUnits as formatUnits9 } from "viem";
|
|
21782
21927
|
function isNftAsset3(asset) {
|
|
21783
21928
|
if (!asset) return false;
|
|
21784
21929
|
return asset.type === "erc721" || asset.type === "erc1155";
|
|
@@ -21790,12 +21935,12 @@ function isSecurityToken2(asset) {
|
|
|
21790
21935
|
function getAssetBalance2(asset) {
|
|
21791
21936
|
if (!asset) return 0;
|
|
21792
21937
|
if (isNftAsset3(asset)) return 1;
|
|
21793
|
-
return Number(
|
|
21938
|
+
return Number(formatUnits9(BigInt(asset.balance || "0"), asset.decimals || 18));
|
|
21794
21939
|
}
|
|
21795
21940
|
function isBalance(asset) {
|
|
21796
21941
|
return asset?.balance && BigInt(asset.balance || 0) > 0n;
|
|
21797
21942
|
}
|
|
21798
|
-
var
|
|
21943
|
+
var init_utils10 = __esm({
|
|
21799
21944
|
"src/internal/components/SendMenu/send/utils.ts"() {
|
|
21800
21945
|
}
|
|
21801
21946
|
});
|
|
@@ -21868,16 +22013,16 @@ var init_AssetInputIcon = __esm({
|
|
|
21868
22013
|
init_tokens();
|
|
21869
22014
|
init_no_image();
|
|
21870
22015
|
init_utils2();
|
|
21871
|
-
|
|
22016
|
+
init_utils10();
|
|
21872
22017
|
}
|
|
21873
22018
|
});
|
|
21874
22019
|
|
|
21875
22020
|
// src/internal/components/SendMenu/send/components/NftDisplayCard.tsx
|
|
21876
22021
|
import { Image as ImageIcon2, Sparkles as Sparkles2 } from "lucide-react";
|
|
21877
|
-
import { useState as
|
|
22022
|
+
import { useState as useState26 } from "react";
|
|
21878
22023
|
import { jsx as jsx104, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
21879
22024
|
function NftDisplayCard({ asset }) {
|
|
21880
|
-
const [imageError, setImageError] =
|
|
22025
|
+
const [imageError, setImageError] = useState26(false);
|
|
21881
22026
|
const nftImage = asset.image || asset.nftMetadata?.image;
|
|
21882
22027
|
return /* @__PURE__ */ jsxs95("div", { className: "flex items-center gap-3 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
21883
22028
|
nftImage && !imageError ? /* @__PURE__ */ jsx104(
|
|
@@ -21950,11 +22095,11 @@ var init_useSendStore = __esm({
|
|
|
21950
22095
|
});
|
|
21951
22096
|
|
|
21952
22097
|
// src/internal/components/SendMenu/send/components/AssetList.tsx
|
|
21953
|
-
import { formatUnits as
|
|
22098
|
+
import { formatUnits as formatUnits10 } from "viem";
|
|
21954
22099
|
import { Fragment as Fragment40, jsx as jsx105, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
21955
22100
|
function getAssetBalance3(asset) {
|
|
21956
22101
|
if (isNftAsset3(asset)) return "1";
|
|
21957
|
-
const balance = Number(
|
|
22102
|
+
const balance = Number(formatUnits10(BigInt(asset?.balance || "0"), asset?.decimals || 18));
|
|
21958
22103
|
return formatPrice(balance);
|
|
21959
22104
|
}
|
|
21960
22105
|
function AssetListItem(props) {
|
|
@@ -22046,7 +22191,7 @@ var init_AssetList = __esm({
|
|
|
22046
22191
|
init_truncateMiddle();
|
|
22047
22192
|
init_BalanceView2();
|
|
22048
22193
|
init_useSendStore();
|
|
22049
|
-
|
|
22194
|
+
init_utils10();
|
|
22050
22195
|
init_AssetInputIcon();
|
|
22051
22196
|
}
|
|
22052
22197
|
});
|
|
@@ -22145,11 +22290,11 @@ var init_components3 = __esm({
|
|
|
22145
22290
|
|
|
22146
22291
|
// src/internal/components/SendMenu/send/useTokenBalance.ts
|
|
22147
22292
|
import {
|
|
22148
|
-
useQuery as
|
|
22293
|
+
useQuery as useQuery22
|
|
22149
22294
|
} from "@tanstack/react-query";
|
|
22150
22295
|
import {
|
|
22151
|
-
erc20Abi as
|
|
22152
|
-
formatUnits as
|
|
22296
|
+
erc20Abi as erc20Abi4,
|
|
22297
|
+
formatUnits as formatUnits11
|
|
22153
22298
|
} from "viem";
|
|
22154
22299
|
function isNftAsset4(asset) {
|
|
22155
22300
|
if (!asset) return false;
|
|
@@ -22158,7 +22303,7 @@ function isNftAsset4(asset) {
|
|
|
22158
22303
|
function useTokenBalance(asset) {
|
|
22159
22304
|
const address = useSession((st) => st.address);
|
|
22160
22305
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
22161
|
-
return
|
|
22306
|
+
return useQuery22({
|
|
22162
22307
|
retry: false,
|
|
22163
22308
|
enabled: !!address && !!chainConfig?.id && !!asset?.symbol,
|
|
22164
22309
|
refetchInterval: 5e3,
|
|
@@ -22182,7 +22327,7 @@ function useTokenBalance(asset) {
|
|
|
22182
22327
|
const balanceValue = await client.getBalance({ address });
|
|
22183
22328
|
return {
|
|
22184
22329
|
decimals: chainConfig?.nativeCurrency?.decimals || 18,
|
|
22185
|
-
formatted: Number(
|
|
22330
|
+
formatted: Number(formatUnits11(balanceValue, chainConfig?.nativeCurrency?.decimals || 18)),
|
|
22186
22331
|
symbol: asset.symbol,
|
|
22187
22332
|
value: balanceValue
|
|
22188
22333
|
};
|
|
@@ -22191,20 +22336,20 @@ function useTokenBalance(asset) {
|
|
|
22191
22336
|
client.readContract({
|
|
22192
22337
|
// address: routeTokenAddress as `0x${string}`,
|
|
22193
22338
|
address: asset.address,
|
|
22194
|
-
abi:
|
|
22339
|
+
abi: erc20Abi4,
|
|
22195
22340
|
functionName: "balanceOf",
|
|
22196
22341
|
args: [address],
|
|
22197
22342
|
authorizationList: void 0
|
|
22198
22343
|
}),
|
|
22199
22344
|
client.readContract({
|
|
22200
22345
|
address: asset.address,
|
|
22201
|
-
abi:
|
|
22346
|
+
abi: erc20Abi4,
|
|
22202
22347
|
functionName: "decimals",
|
|
22203
22348
|
authorizationList: void 0
|
|
22204
22349
|
}),
|
|
22205
22350
|
client.readContract({
|
|
22206
22351
|
address: asset.address,
|
|
22207
|
-
abi:
|
|
22352
|
+
abi: erc20Abi4,
|
|
22208
22353
|
functionName: "symbol",
|
|
22209
22354
|
authorizationList: void 0
|
|
22210
22355
|
})
|
|
@@ -22217,7 +22362,7 @@ function useTokenBalance(asset) {
|
|
|
22217
22362
|
});
|
|
22218
22363
|
return [BigInt(0), 18, asset.symbol];
|
|
22219
22364
|
});
|
|
22220
|
-
return { decimals, formatted: Number(
|
|
22365
|
+
return { decimals, formatted: Number(formatUnits11(value, decimals)), symbol, value };
|
|
22221
22366
|
}
|
|
22222
22367
|
}
|
|
22223
22368
|
});
|
|
@@ -22231,8 +22376,8 @@ var init_useTokenBalance = __esm({
|
|
|
22231
22376
|
});
|
|
22232
22377
|
|
|
22233
22378
|
// src/internal/components/SendMenu/send/sendSteps/InputSendStep.tsx
|
|
22234
|
-
import { AlertCircle as AlertCircle4, AtSign as AtSign2, CheckCircle2 as CheckCircle25, Loader as
|
|
22235
|
-
import { formatUnits as
|
|
22379
|
+
import { AlertCircle as AlertCircle4, AtSign as AtSign2, CheckCircle2 as CheckCircle25, Loader as Loader20, Wallet2 as Wallet24 } from "lucide-react";
|
|
22380
|
+
import { formatUnits as formatUnits12, isAddress as isAddress2 } from "viem";
|
|
22236
22381
|
import { Fragment as Fragment41, jsx as jsx107, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
22237
22382
|
function InputSendStep(props) {
|
|
22238
22383
|
const { erc3643Compliance, isNicknameInput, resolvedNicknameData, isAssetsLoading } = props;
|
|
@@ -22263,7 +22408,7 @@ function InputSendStep(props) {
|
|
|
22263
22408
|
const maxAmount = Math.max(0, balanceData.formatted - 1e-3);
|
|
22264
22409
|
setAmount(maxAmount.toFixed(6));
|
|
22265
22410
|
} else {
|
|
22266
|
-
setAmount(
|
|
22411
|
+
setAmount(formatUnits12(BigInt(selectedAsset.balance || "0"), selectedAsset.decimals || 18));
|
|
22267
22412
|
}
|
|
22268
22413
|
};
|
|
22269
22414
|
const validateInput = () => {
|
|
@@ -22347,7 +22492,7 @@ function InputSendStep(props) {
|
|
|
22347
22492
|
/* @__PURE__ */ jsx107(AssetInputIcon, { asset: selectedAsset }),
|
|
22348
22493
|
/* @__PURE__ */ jsx107("span", { children: (isNft ? selectedAsset.nftMetadata?.name || selectedAsset.symbol : selectedAsset.name).toUpperCase() })
|
|
22349
22494
|
] }) : /* @__PURE__ */ jsx107("span", { className: "text-[var(--ui-kit-fg-muted)]", children: "No Asset Selected" }),
|
|
22350
|
-
isAssetsLoading && /* @__PURE__ */ jsx107(
|
|
22495
|
+
isAssetsLoading && /* @__PURE__ */ jsx107(Loader20, { className: "w-4 h-4 animate-spin" })
|
|
22351
22496
|
]
|
|
22352
22497
|
}
|
|
22353
22498
|
),
|
|
@@ -22361,7 +22506,7 @@ function InputSendStep(props) {
|
|
|
22361
22506
|
disabled: isAssetsLoading,
|
|
22362
22507
|
onChange: (e) => setRecipient(e.target.value),
|
|
22363
22508
|
placeholder: "0x... or @nickname",
|
|
22364
|
-
element: isNicknameInput && isResolving ? /* @__PURE__ */ jsx107(
|
|
22509
|
+
element: isNicknameInput && isResolving ? /* @__PURE__ */ jsx107(Loader20, { className: "w-4 h-4 animate-spin text-[var(--ui-kit-fg-muted)]" }) : null
|
|
22365
22510
|
}
|
|
22366
22511
|
),
|
|
22367
22512
|
/* @__PURE__ */ jsx107(NicknameData, { resolvedNicknameData, isNicknameInput }),
|
|
@@ -22370,7 +22515,7 @@ function InputSendStep(props) {
|
|
|
22370
22515
|
!isNft && selectedAsset && /* @__PURE__ */ jsxs98("span", { className: "block text-[10px]", children: [
|
|
22371
22516
|
t("passport:common.balance"),
|
|
22372
22517
|
" ",
|
|
22373
|
-
isBalanceLoading ? /* @__PURE__ */ jsx107(
|
|
22518
|
+
isBalanceLoading ? /* @__PURE__ */ jsx107(Loader20, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxs98("span", { className: "text-[var(--ui-kit-fg)] font-semibold", children: [
|
|
22374
22519
|
formatPrice(balanceData.formatted),
|
|
22375
22520
|
" ",
|
|
22376
22521
|
balanceData.symbol
|
|
@@ -22397,7 +22542,7 @@ function InputSendStep(props) {
|
|
|
22397
22542
|
type: isComplianceLoading ? "info" : erc3643CanTransfer ? "success" : "error",
|
|
22398
22543
|
className: "flex gap-[var(--ui-kit-gap)]",
|
|
22399
22544
|
children: isComplianceLoading ? /* @__PURE__ */ jsxs98(Fragment41, { children: [
|
|
22400
|
-
/* @__PURE__ */ jsx107(
|
|
22545
|
+
/* @__PURE__ */ jsx107(Loader20, { className: "h-4 w-4 animate-spin" }),
|
|
22401
22546
|
/* @__PURE__ */ jsx107("span", { children: "Checking compliance..." })
|
|
22402
22547
|
] }) : erc3643CanTransfer ? /* @__PURE__ */ jsxs98(Fragment41, { children: [
|
|
22403
22548
|
/* @__PURE__ */ jsx107(CheckCircle25, { className: "h-4 w-4" }),
|
|
@@ -22435,13 +22580,13 @@ var init_InputSendStep = __esm({
|
|
|
22435
22580
|
init_components3();
|
|
22436
22581
|
init_useSendStore();
|
|
22437
22582
|
init_useTokenBalance();
|
|
22438
|
-
|
|
22583
|
+
init_utils10();
|
|
22439
22584
|
}
|
|
22440
22585
|
});
|
|
22441
22586
|
|
|
22442
22587
|
// src/internal/components/SendMenu/send/sendSteps/ConfirmSendStep.tsx
|
|
22443
22588
|
import { useMutation as useMutation21 } from "@tanstack/react-query";
|
|
22444
|
-
import { AlertTriangle as AlertTriangle5, AtSign as AtSign3, Loader as
|
|
22589
|
+
import { AlertTriangle as AlertTriangle5, AtSign as AtSign3, Loader as Loader21, Shield as Shield2, ShieldAlert as ShieldAlert2, ShieldCheck as ShieldCheck3 } from "lucide-react";
|
|
22445
22590
|
import { Fragment as Fragment42, jsx as jsx108, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
22446
22591
|
function ConfirmSendStep(props) {
|
|
22447
22592
|
const { sendTransaction, erc3643Compliance, isNicknameInput, resolvedNicknameData } = props;
|
|
@@ -22601,7 +22746,7 @@ function ConfirmSendStep(props) {
|
|
|
22601
22746
|
className: "w-full",
|
|
22602
22747
|
size: "large",
|
|
22603
22748
|
children: [
|
|
22604
|
-
isTransactionPending && /* @__PURE__ */ jsx108(
|
|
22749
|
+
isTransactionPending && /* @__PURE__ */ jsx108(Loader21, { className: "h-4 w-4 animate-spin" }),
|
|
22605
22750
|
t("passport:common.confirm")
|
|
22606
22751
|
]
|
|
22607
22752
|
}
|
|
@@ -22618,7 +22763,7 @@ var init_ConfirmSendStep = __esm({
|
|
|
22618
22763
|
init_highlight();
|
|
22619
22764
|
init_useFlowSelector();
|
|
22620
22765
|
init_useSendStore();
|
|
22621
|
-
|
|
22766
|
+
init_utils10();
|
|
22622
22767
|
}
|
|
22623
22768
|
});
|
|
22624
22769
|
|
|
@@ -22631,7 +22776,7 @@ var init_sendSteps = __esm({
|
|
|
22631
22776
|
});
|
|
22632
22777
|
|
|
22633
22778
|
// src/internal/components/SendMenu/send/SendMenu.tsx
|
|
22634
|
-
import { CheckCircle2 as CheckCircle26, Loader as
|
|
22779
|
+
import { CheckCircle2 as CheckCircle26, Loader as Loader27 } from "lucide-react";
|
|
22635
22780
|
import { useEffect as useEffect45, useMemo as useMemo15 } from "react";
|
|
22636
22781
|
import { parseUnits as parseUnits2 } from "viem";
|
|
22637
22782
|
import { Fragment as Fragment43, jsx as jsx109, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
@@ -22753,7 +22898,7 @@ function SendMenu() {
|
|
|
22753
22898
|
}
|
|
22754
22899
|
),
|
|
22755
22900
|
txStep === "pending" && /* @__PURE__ */ jsxs100(Highlight, { type: "info", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
22756
|
-
/* @__PURE__ */ jsx109(
|
|
22901
|
+
/* @__PURE__ */ jsx109(Loader27, { className: "h-4 w-4 animate-spin" }),
|
|
22757
22902
|
/* @__PURE__ */ jsxs100("span", { className: "flex-1", children: [
|
|
22758
22903
|
/* @__PURE__ */ jsx109("span", { className: "block leading-4 font-semibold", children: t("passport:sendMenu.pendingStep") }),
|
|
22759
22904
|
/* @__PURE__ */ jsx109("span", { children: t("passport:sendMenu.pendingStepMsg") })
|
|
@@ -22786,7 +22931,7 @@ var init_SendMenu = __esm({
|
|
|
22786
22931
|
init_useNicknameResolve();
|
|
22787
22932
|
init_useSendTransaction();
|
|
22788
22933
|
init_useT();
|
|
22789
|
-
|
|
22934
|
+
init_useBlockscoutAssets2();
|
|
22790
22935
|
init_useLayoutDataStore();
|
|
22791
22936
|
init_button();
|
|
22792
22937
|
init_highlight();
|
|
@@ -22794,7 +22939,7 @@ var init_SendMenu = __esm({
|
|
|
22794
22939
|
init_components3();
|
|
22795
22940
|
init_sendSteps();
|
|
22796
22941
|
init_useSendStore();
|
|
22797
|
-
|
|
22942
|
+
init_utils10();
|
|
22798
22943
|
}
|
|
22799
22944
|
});
|
|
22800
22945
|
|
|
@@ -23019,7 +23164,7 @@ var init_pro_mode = __esm({
|
|
|
23019
23164
|
// src/internal/components/SettingsMenu/constants.ts
|
|
23020
23165
|
import { ArrowLeftRight, AtSign as AtSign4, DatabaseBackup as DatabaseBackup2, Link2, LockKeyhole, UsersRound } from "lucide-react";
|
|
23021
23166
|
var NAV_BUTTONS;
|
|
23022
|
-
var
|
|
23167
|
+
var init_constants7 = __esm({
|
|
23023
23168
|
"src/internal/components/SettingsMenu/constants.ts"() {
|
|
23024
23169
|
init_icons();
|
|
23025
23170
|
NAV_BUTTONS = [
|
|
@@ -23035,7 +23180,7 @@ var init_constants6 = __esm({
|
|
|
23035
23180
|
});
|
|
23036
23181
|
|
|
23037
23182
|
// src/internal/components/SettingsMenu/SettingsMenu.tsx
|
|
23038
|
-
import { useQuery as
|
|
23183
|
+
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
23039
23184
|
import { ArrowLeft as ArrowLeft20, HardDrive as HardDrive3 } from "lucide-react";
|
|
23040
23185
|
import { useEffect as useEffect47 } from "react";
|
|
23041
23186
|
import { jsx as jsx111, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
@@ -23078,7 +23223,7 @@ function SettingsMenu() {
|
|
|
23078
23223
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
23079
23224
|
const settingsButtons = useSettingsButtons();
|
|
23080
23225
|
useProvidersList();
|
|
23081
|
-
|
|
23226
|
+
useQuery23({
|
|
23082
23227
|
retry: 1,
|
|
23083
23228
|
enabled: !!address,
|
|
23084
23229
|
queryKey: [QUERY_KEYS.nicknameInfo, address],
|
|
@@ -23133,7 +23278,7 @@ var init_SettingsMenu = __esm({
|
|
|
23133
23278
|
init_utils2();
|
|
23134
23279
|
init_useProvidersList();
|
|
23135
23280
|
init_button();
|
|
23136
|
-
|
|
23281
|
+
init_constants7();
|
|
23137
23282
|
}
|
|
23138
23283
|
});
|
|
23139
23284
|
|
|
@@ -23812,7 +23957,7 @@ function formatIntl(price, fractionDigits) {
|
|
|
23812
23957
|
return formatter.format(price);
|
|
23813
23958
|
}
|
|
23814
23959
|
var formatAddress, parseValue, formatValue2, openInExplorer2, formatTimestamp;
|
|
23815
|
-
var
|
|
23960
|
+
var init_utils11 = __esm({
|
|
23816
23961
|
"src/internal/components/TransactionsMenu/utils.ts"() {
|
|
23817
23962
|
init_base2();
|
|
23818
23963
|
formatAddress = (addr) => {
|
|
@@ -23988,14 +24133,14 @@ var init_TransactionsGroup = __esm({
|
|
|
23988
24133
|
init_icons();
|
|
23989
24134
|
init_utils2();
|
|
23990
24135
|
init_button();
|
|
23991
|
-
|
|
24136
|
+
init_utils11();
|
|
23992
24137
|
}
|
|
23993
24138
|
});
|
|
23994
24139
|
|
|
23995
24140
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
23996
|
-
import { useQuery as
|
|
23997
|
-
import { ArrowLeft as ArrowLeft22, Loader as
|
|
23998
|
-
import { useCallback as useCallback30, useState as
|
|
24141
|
+
import { useQuery as useQuery24, useQueryClient as useQueryClient25 } from "@tanstack/react-query";
|
|
24142
|
+
import { ArrowLeft as ArrowLeft22, Loader as Loader28, RefreshCw as RefreshCw3, XCircle } from "lucide-react";
|
|
24143
|
+
import { useCallback as useCallback30, useState as useState27 } from "react";
|
|
23999
24144
|
import { jsx as jsx114, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
24000
24145
|
function TransactionsMenu() {
|
|
24001
24146
|
const qc = useQueryClient25();
|
|
@@ -24004,14 +24149,14 @@ function TransactionsMenu() {
|
|
|
24004
24149
|
const { t } = useT();
|
|
24005
24150
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24006
24151
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
24007
|
-
const [expandedGroups, setExpandedGroups] =
|
|
24152
|
+
const [expandedGroups, setExpandedGroups] = useState27({});
|
|
24008
24153
|
const historySupported = isTransactionHistorySupported(chainConfig?.id);
|
|
24009
24154
|
const {
|
|
24010
24155
|
data: txHistoryGroups = [],
|
|
24011
24156
|
isLoading: isTxHistoryLoading,
|
|
24012
24157
|
isFetching: isTxHistoryFetching,
|
|
24013
24158
|
error: txHistoryError
|
|
24014
|
-
} =
|
|
24159
|
+
} = useQuery24({
|
|
24015
24160
|
retry: false,
|
|
24016
24161
|
enabled: !!address && !!chainConfig?.id && historySupported,
|
|
24017
24162
|
queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address],
|
|
@@ -24042,12 +24187,12 @@ function TransactionsMenu() {
|
|
|
24042
24187
|
onClick: refreshTxHistory,
|
|
24043
24188
|
disabled: isTxHistoryFetching,
|
|
24044
24189
|
title: "Refresh transactions",
|
|
24045
|
-
children: isTxHistoryFetching ? /* @__PURE__ */ jsx114(
|
|
24190
|
+
children: isTxHistoryFetching ? /* @__PURE__ */ jsx114(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx114(RefreshCw3, { className: "h-4 w-4" })
|
|
24046
24191
|
}
|
|
24047
24192
|
)
|
|
24048
24193
|
] }),
|
|
24049
24194
|
!historySupported && /* @__PURE__ */ jsx114(Highlight, { type: "warning", children: /* @__PURE__ */ jsx114("span", { children: t("passport:transactionsMenu.comingSoon") }) }),
|
|
24050
|
-
historySupported && isTxHistoryLoading && /* @__PURE__ */ jsx114("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx114(
|
|
24195
|
+
historySupported && isTxHistoryLoading && /* @__PURE__ */ jsx114("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsx114(Loader28, { className: "w-4 h-4 animate-spin" }) }),
|
|
24051
24196
|
historySupported && !isTxHistoryLoading && txHistoryResolvedError && /* @__PURE__ */ jsxs105(Highlight, { type: "error", className: "flex gap-[var(--ui-kit-gap)]", children: [
|
|
24052
24197
|
/* @__PURE__ */ jsx114(XCircle, { className: "w-4 h-4 flex-none" }),
|
|
24053
24198
|
/* @__PURE__ */ jsx114("span", { className: "block w-full flex-1 text-center text-xs", children: txHistoryResolvedError })
|
|
@@ -24312,19 +24457,12 @@ var init_usePageMapper = __esm({
|
|
|
24312
24457
|
});
|
|
24313
24458
|
|
|
24314
24459
|
// src/internal/hooks/useSettingsNotifications.ts
|
|
24315
|
-
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
24316
24460
|
import { useEffect as useEffect49 } from "react";
|
|
24317
24461
|
function useSettingsNotifications() {
|
|
24318
|
-
const address = useSession((st) => st.address);
|
|
24319
24462
|
const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
|
|
24320
24463
|
const providers = jwtTokenManager2.getProviders();
|
|
24321
24464
|
const hasEmail = providers.includes("email");
|
|
24322
|
-
const { data: userProfile = null } =
|
|
24323
|
-
retry: false,
|
|
24324
|
-
enabled: !!address,
|
|
24325
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24326
|
-
queryFn: getUserProfile
|
|
24327
|
-
});
|
|
24465
|
+
const { data: userProfile = null } = useUserProfile();
|
|
24328
24466
|
useEffect49(() => {
|
|
24329
24467
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
24330
24468
|
setSettingsNotifications({
|
|
@@ -24342,10 +24480,9 @@ function useSettingsNotifications() {
|
|
|
24342
24480
|
var EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
|
|
24343
24481
|
var init_useSettingsNotifications = __esm({
|
|
24344
24482
|
"src/internal/hooks/useSettingsNotifications.ts"() {
|
|
24345
|
-
init_SessionContext();
|
|
24346
24483
|
init_auth();
|
|
24347
|
-
init_profile();
|
|
24348
24484
|
init_useLayoutDataStore();
|
|
24485
|
+
init_useUserProfile();
|
|
24349
24486
|
EMAIL_NOT_CONNECTED_NOTIFICATION = {
|
|
24350
24487
|
id: "email-not-connected",
|
|
24351
24488
|
target: "manage-wallet" /* MANAGE_WALLET */,
|
|
@@ -24365,7 +24502,7 @@ var init_package = __esm({
|
|
|
24365
24502
|
"package.json"() {
|
|
24366
24503
|
package_default = {
|
|
24367
24504
|
name: "@embarkai/ui-kit",
|
|
24368
|
-
version: "0.4.
|
|
24505
|
+
version: "0.4.60",
|
|
24369
24506
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24370
24507
|
type: "module",
|
|
24371
24508
|
main: "./dist/index.cjs",
|
|
@@ -24467,7 +24604,7 @@ var init_package = __esm({
|
|
|
24467
24604
|
|
|
24468
24605
|
// src/internal/components/Footer/Footer.tsx
|
|
24469
24606
|
import { useMutation as useMutation22, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
|
|
24470
|
-
import { Loader as
|
|
24607
|
+
import { Loader as Loader29, LogOut } from "lucide-react";
|
|
24471
24608
|
import { useDisconnect as useDisconnect3 } from "wagmi";
|
|
24472
24609
|
import { jsx as jsx116, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
24473
24610
|
function Footer() {
|
|
@@ -24538,7 +24675,7 @@ function Footer() {
|
|
|
24538
24675
|
size: "small",
|
|
24539
24676
|
variant: "ghost",
|
|
24540
24677
|
disabled: isDisconnecting,
|
|
24541
|
-
onClick: () =>
|
|
24678
|
+
onClick: () => useLayoutDataStore.getState().setPage("chain" /* CHAIN */),
|
|
24542
24679
|
children: [
|
|
24543
24680
|
/* @__PURE__ */ jsx116(ChainIcon, { className: "flex-none w-6 h-6" }),
|
|
24544
24681
|
/* @__PURE__ */ jsx116("span", { className: "text-xs font-bold", children: chainConfig.name || "EmbarkAI Wallet" })
|
|
@@ -24555,7 +24692,7 @@ function Footer() {
|
|
|
24555
24692
|
disabled: isDisconnecting,
|
|
24556
24693
|
children: [
|
|
24557
24694
|
/* @__PURE__ */ jsx116("span", { children: t("passport:auth.logout") }),
|
|
24558
|
-
isDisconnecting ? /* @__PURE__ */ jsx116(
|
|
24695
|
+
isDisconnecting ? /* @__PURE__ */ jsx116(Loader29, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx116(LogOut, { className: "w-4 h-4" })
|
|
24559
24696
|
]
|
|
24560
24697
|
}
|
|
24561
24698
|
) : null
|
|
@@ -24582,7 +24719,6 @@ var init_Footer = __esm({
|
|
|
24582
24719
|
init_SessionContext();
|
|
24583
24720
|
init_i18n();
|
|
24584
24721
|
init_auth();
|
|
24585
|
-
init_base2();
|
|
24586
24722
|
init_useLayoutDataStore();
|
|
24587
24723
|
init_useLayoutStore();
|
|
24588
24724
|
init_utils2();
|
|
@@ -24600,9 +24736,8 @@ var init_Footer2 = __esm({
|
|
|
24600
24736
|
});
|
|
24601
24737
|
|
|
24602
24738
|
// src/internal/components/Header/Header.tsx
|
|
24603
|
-
import {
|
|
24604
|
-
import {
|
|
24605
|
-
import { useCallback as useCallback32, useRef as useRef21, useState as useState29 } from "react";
|
|
24739
|
+
import { Copy as Copy4, Loader as Loader30 } from "lucide-react";
|
|
24740
|
+
import { useCallback as useCallback32, useRef as useRef19, useState as useState28 } from "react";
|
|
24606
24741
|
import { Fragment as Fragment45, jsx as jsx117, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
24607
24742
|
function formatAddress2(addr) {
|
|
24608
24743
|
if (!addr) return "";
|
|
@@ -24614,10 +24749,10 @@ function Header() {
|
|
|
24614
24749
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
24615
24750
|
const { t } = useT();
|
|
24616
24751
|
const proMode = useProMode();
|
|
24617
|
-
const [proToast, setProToast] =
|
|
24618
|
-
const [copied, setCopied] =
|
|
24619
|
-
const clickCountRef =
|
|
24620
|
-
const clickTimerRef =
|
|
24752
|
+
const [proToast, setProToast] = useState28(false);
|
|
24753
|
+
const [copied, setCopied] = useState28(false);
|
|
24754
|
+
const clickCountRef = useRef19(0);
|
|
24755
|
+
const clickTimerRef = useRef19(null);
|
|
24621
24756
|
const handleAvatarClick = useCallback32(() => {
|
|
24622
24757
|
clickCountRef.current += 1;
|
|
24623
24758
|
if (clickTimerRef.current) {
|
|
@@ -24636,12 +24771,7 @@ function Header() {
|
|
|
24636
24771
|
}, 1e3);
|
|
24637
24772
|
}
|
|
24638
24773
|
}, []);
|
|
24639
|
-
const { data: profile, isLoading: isProfileLoading } =
|
|
24640
|
-
retry: false,
|
|
24641
|
-
enabled: !!address,
|
|
24642
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24643
|
-
queryFn: getUserProfile
|
|
24644
|
-
});
|
|
24774
|
+
const { data: profile, isLoading: isProfileLoading } = useUserProfile();
|
|
24645
24775
|
const avatar = profile?.avatar || jwtTokenManager2.getAvatar();
|
|
24646
24776
|
const displayName = profile?.nicknameDisplay || profile?.displayName || jwtTokenManager2.getDisplayName();
|
|
24647
24777
|
const ChainIcon = NETWORK_OPTIONS.find((net) => net.chainId === chainConfig.id)?.Icon || (() => /* @__PURE__ */ jsx117("div", { className: "flex-none w-4 h-4 rounded-full flex items-center justify-center bg-[var(--ui-kit-primary)]", children: /* @__PURE__ */ jsx117("span", { className: "text-[var(--ui-kit-fg-inverted)] text-xs font-bold", children: chainConfig.name.charAt(0) }) }));
|
|
@@ -24669,7 +24799,7 @@ function Header() {
|
|
|
24669
24799
|
style: { width: "calc(100% - 48px - var(--ui-kit-gap))" },
|
|
24670
24800
|
className: "flex-1 flex flex-col justify-center gap-1",
|
|
24671
24801
|
children: [
|
|
24672
|
-
isProfileLoading && /* @__PURE__ */ jsx117(
|
|
24802
|
+
isProfileLoading && /* @__PURE__ */ jsx117(Loader30, { className: "w-4 h-4 animate-spin" }),
|
|
24673
24803
|
!!address && !isProfileLoading && !!profile && /* @__PURE__ */ jsxs107(Fragment45, { children: [
|
|
24674
24804
|
/* @__PURE__ */ jsxs107("div", { className: "w-full flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
24675
24805
|
/* @__PURE__ */ jsx117(
|
|
@@ -24727,7 +24857,7 @@ var init_Header = __esm({
|
|
|
24727
24857
|
init_useT();
|
|
24728
24858
|
init_icons();
|
|
24729
24859
|
init_auth();
|
|
24730
|
-
|
|
24860
|
+
init_useUserProfile();
|
|
24731
24861
|
init_pro_mode();
|
|
24732
24862
|
init_utils2();
|
|
24733
24863
|
init_BalanceView2();
|
|
@@ -26500,6 +26630,7 @@ __export(auth_exports, {
|
|
|
26500
26630
|
createPasskeyHelpers: () => createPasskeyHelpers,
|
|
26501
26631
|
createSignatureMessage: () => createSignatureMessage,
|
|
26502
26632
|
deriveDemoPrivateKey: () => deriveDemoPrivateKey,
|
|
26633
|
+
ensureFreshSession: () => ensureFreshSession,
|
|
26503
26634
|
ensureKeyshare: () => ensureKeyshare,
|
|
26504
26635
|
ensureValidToken: () => ensureValidToken,
|
|
26505
26636
|
fetchProjectName: () => fetchProjectName,
|
|
@@ -26543,6 +26674,7 @@ import {
|
|
|
26543
26674
|
configureJwtModule,
|
|
26544
26675
|
logout,
|
|
26545
26676
|
verifyToken,
|
|
26677
|
+
ensureFreshSession,
|
|
26546
26678
|
ensureValidToken,
|
|
26547
26679
|
getValidTokens,
|
|
26548
26680
|
authenticatedFetch,
|
|
@@ -26881,8 +27013,8 @@ var init_iframe_manager = __esm({
|
|
|
26881
27013
|
async handleTokenRefreshRequest(message) {
|
|
26882
27014
|
try {
|
|
26883
27015
|
const { jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
26884
|
-
const
|
|
26885
|
-
if (
|
|
27016
|
+
const outcome = await jwtTokenManager4.refreshTokens();
|
|
27017
|
+
if (outcome === "refreshed") {
|
|
26886
27018
|
const newAccessToken = jwtTokenManager4.getAccessToken();
|
|
26887
27019
|
if (this.iframe && this.iframe.contentWindow) {
|
|
26888
27020
|
const iframeOrigin = new URL(this.iframeUrl).origin;
|
|
@@ -26904,6 +27036,7 @@ var init_iframe_manager = __esm({
|
|
|
26904
27036
|
type: "IFRAME_MSG_TOKEN_REFRESHED",
|
|
26905
27037
|
messageId: message.messageId,
|
|
26906
27038
|
error: "Token refresh failed",
|
|
27039
|
+
sessionDead: outcome === "session_dead",
|
|
26907
27040
|
timestamp: Date.now()
|
|
26908
27041
|
},
|
|
26909
27042
|
iframeOrigin
|
|
@@ -28173,7 +28306,7 @@ function notifyNoProjetctId(projectId) {
|
|
|
28173
28306
|
'\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n\u2551 \u26A0\uFE0F EmbarkAI WARNING \u26A0\uFE0F \u2551\n\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563\n\u2551 \u2551\n\u2551 projectId is NOT configured! \u2551\n\u2551 \u2551\n\u2551 Your integration will NOT work without a valid projectId. \u2551\n\u2551 Most features will be disabled and errors will occur. \u2551\n\u2551 \u2551\n\u2551 To fix this: \u2551\n\u2551 1. Get your projectId from: https://dashboard.embarkai.io/ \u2551\n\u2551 2. Add it to your Provider: \u2551\n\u2551 \u2551\n\u2551 <Provider projectId="your-project-id"> \u2551\n\u2551 {children} \u2551\n\u2551 </Provider> \u2551\n\u2551 \u2551\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\n'
|
|
28174
28307
|
);
|
|
28175
28308
|
}
|
|
28176
|
-
var
|
|
28309
|
+
var init_utils12 = __esm({
|
|
28177
28310
|
"src/context/utils.ts"() {
|
|
28178
28311
|
}
|
|
28179
28312
|
});
|
|
@@ -28200,7 +28333,7 @@ import {
|
|
|
28200
28333
|
useContext,
|
|
28201
28334
|
useEffect as useEffect53,
|
|
28202
28335
|
useMemo as useMemo17,
|
|
28203
|
-
useRef as
|
|
28336
|
+
useRef as useRef20
|
|
28204
28337
|
} from "react";
|
|
28205
28338
|
import { jsx as jsx124 } from "react/jsx-runtime";
|
|
28206
28339
|
function clearLegacyWagmiStorage() {
|
|
@@ -28220,9 +28353,9 @@ function clearLegacyWagmiStorage() {
|
|
|
28220
28353
|
}
|
|
28221
28354
|
function Provider(props) {
|
|
28222
28355
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
28223
|
-
const callbacksRef =
|
|
28356
|
+
const callbacksRef = useRef20(callbacks);
|
|
28224
28357
|
useEffect53(() => notifyNoProjetctId(projectId), [projectId]);
|
|
28225
|
-
const config =
|
|
28358
|
+
const config = useRef20(merge3({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
|
|
28226
28359
|
const updateConfig = useCallback35((updates) => {
|
|
28227
28360
|
const prev = config.current;
|
|
28228
28361
|
const next = { ...prev };
|
|
@@ -28339,7 +28472,7 @@ var init_ProviderContext = __esm({
|
|
|
28339
28472
|
init_iframe_manager();
|
|
28340
28473
|
init_RainbowKitContext();
|
|
28341
28474
|
init_SessionContext();
|
|
28342
|
-
|
|
28475
|
+
init_utils12();
|
|
28343
28476
|
init_WagmiContext();
|
|
28344
28477
|
UIContext = createContext(void 0);
|
|
28345
28478
|
useProviderConfig = () => {
|
|
@@ -28351,7 +28484,7 @@ var init_ProviderContext = __esm({
|
|
|
28351
28484
|
});
|
|
28352
28485
|
|
|
28353
28486
|
// src/styles/built.css
|
|
28354
|
-
var built_default = `.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.embarkai-ui-scope .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.embarkai-ui-scope .pointer-events-none{pointer-events:none}.embarkai-ui-scope .pointer-events-auto{pointer-events:auto}.embarkai-ui-scope .visible{visibility:visible}.embarkai-ui-scope .invisible{visibility:hidden}.embarkai-ui-scope .static{position:static}.embarkai-ui-scope .fixed{position:fixed}.embarkai-ui-scope .absolute{position:absolute}.embarkai-ui-scope .relative{position:relative}.embarkai-ui-scope .inset-0{inset:0}.embarkai-ui-scope .-right-1{right:-.25rem}.embarkai-ui-scope .-right-2{right:-.5rem}.embarkai-ui-scope .-top-1{top:-.25rem}.embarkai-ui-scope .-top-2{top:-.5rem}.embarkai-ui-scope .bottom-0{bottom:0}.embarkai-ui-scope .bottom-full{bottom:100%}.embarkai-ui-scope .left-0{left:0}.embarkai-ui-scope .left-1\\/2{left:50%}.embarkai-ui-scope .left-4{left:1rem}.embarkai-ui-scope .right-0{right:0}.embarkai-ui-scope .right-2{right:.5rem}.embarkai-ui-scope .right-3{right:.75rem}.embarkai-ui-scope .right-4{right:1rem}.embarkai-ui-scope .right-\\[var\\(--ui-kit-pd\\)\\]{right:var(--ui-kit-pd)}.embarkai-ui-scope .right-full{right:100%}.embarkai-ui-scope .top-0{top:0}.embarkai-ui-scope .top-1\\/2{top:50%}.embarkai-ui-scope .top-2{top:.5rem}.embarkai-ui-scope .top-4{top:1rem}.embarkai-ui-scope .top-\\[var\\(--ui-kit-pd\\)\\]{top:var(--ui-kit-pd)}.embarkai-ui-scope .z-10{z-index:10}.embarkai-ui-scope .z-50{z-index:50}.embarkai-ui-scope .z-\\[9998\\]{z-index:9998}.embarkai-ui-scope .z-\\[9999\\]{z-index:9999}.embarkai-ui-scope .-m-px{margin:-1px}.embarkai-ui-scope .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.embarkai-ui-scope .mx-auto{margin-left:auto;margin-right:auto}.embarkai-ui-scope .my-1{margin-top:.25rem;margin-bottom:.25rem}.embarkai-ui-scope .mb-1{margin-bottom:.25rem}.embarkai-ui-scope .mb-2{margin-bottom:.5rem}.embarkai-ui-scope .mb-3{margin-bottom:.75rem}.embarkai-ui-scope .mb-4{margin-bottom:1rem}.embarkai-ui-scope .ml-1{margin-left:.25rem}.embarkai-ui-scope .ml-2{margin-left:.5rem}.embarkai-ui-scope .ml-auto{margin-left:auto}.embarkai-ui-scope .mr-1{margin-right:.25rem}.embarkai-ui-scope .mt-0\\.5{margin-top:.125rem}.embarkai-ui-scope .mt-1{margin-top:.25rem}.embarkai-ui-scope .mt-2{margin-top:.5rem}.embarkai-ui-scope .mt-4{margin-top:1rem}.embarkai-ui-scope .block{display:block}.embarkai-ui-scope .inline-block{display:inline-block}.embarkai-ui-scope .inline{display:inline}.embarkai-ui-scope .flex{display:flex}.embarkai-ui-scope .inline-flex{display:inline-flex}.embarkai-ui-scope .table{display:table}.embarkai-ui-scope .grid{display:grid}.embarkai-ui-scope .hidden{display:none}.embarkai-ui-scope .aspect-square{aspect-ratio:1/1}.embarkai-ui-scope .size-4{width:1rem;height:1rem}.embarkai-ui-scope .size-8{width:2rem;height:2rem}.embarkai-ui-scope .size-auto{width:auto;height:auto}.embarkai-ui-scope .h-0{height:0}.embarkai-ui-scope .h-1{height:.25rem}.embarkai-ui-scope .h-10{height:2.5rem}.embarkai-ui-scope .h-12{height:3rem}.embarkai-ui-scope .h-16{height:4rem}.embarkai-ui-scope .h-3{height:.75rem}.embarkai-ui-scope .h-3\\.5{height:.875rem}.embarkai-ui-scope .h-4{height:1rem}.embarkai-ui-scope .h-48{height:12rem}.embarkai-ui-scope .h-5{height:1.25rem}.embarkai-ui-scope .h-6{height:1.5rem}.embarkai-ui-scope .h-7{height:1.75rem}.embarkai-ui-scope .h-8{height:2rem}.embarkai-ui-scope .h-\\[100dvh\\]{height:100dvh}.embarkai-ui-scope .h-\\[48px\\]{height:48px}.embarkai-ui-scope .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.embarkai-ui-scope .h-auto{height:auto}.embarkai-ui-scope .h-fit{height:-moz-fit-content;height:fit-content}.embarkai-ui-scope .h-full{height:100%}.embarkai-ui-scope .h-px{height:1px}.embarkai-ui-scope .max-h-96{max-height:24rem}.embarkai-ui-scope .max-h-\\[95dvh\\]{max-height:95dvh}.embarkai-ui-scope .min-h-10{min-height:2.5rem}.embarkai-ui-scope .min-h-12{min-height:3rem}.embarkai-ui-scope .w-1{width:.25rem}.embarkai-ui-scope .w-1\\/2{width:50%}.embarkai-ui-scope .w-10{width:2.5rem}.embarkai-ui-scope .w-12{width:3rem}.embarkai-ui-scope .w-16{width:4rem}.embarkai-ui-scope .w-3{width:.75rem}.embarkai-ui-scope .w-3\\.5{width:.875rem}.embarkai-ui-scope .w-4{width:1rem}.embarkai-ui-scope .w-48{width:12rem}.embarkai-ui-scope .w-5{width:1.25rem}.embarkai-ui-scope .w-6{width:1.5rem}.embarkai-ui-scope .w-7{width:1.75rem}.embarkai-ui-scope .w-8{width:2rem}.embarkai-ui-scope .w-\\[100dvw\\]{width:100dvw}.embarkai-ui-scope .w-\\[40px\\]{width:40px}.embarkai-ui-scope .w-\\[var\\(--ui-kit-maw\\)\\]{width:var(--ui-kit-maw)}.embarkai-ui-scope .w-fit{width:-moz-fit-content;width:fit-content}.embarkai-ui-scope .w-full{width:100%}.embarkai-ui-scope .w-px{width:1px}.embarkai-ui-scope .min-w-0{min-width:0}.embarkai-ui-scope .min-w-10{min-width:2.5rem}.embarkai-ui-scope .min-w-16{min-width:4rem}.embarkai-ui-scope .min-w-\\[256px\\]{min-width:256px}.embarkai-ui-scope .min-w-\\[8rem\\]{min-width:8rem}.embarkai-ui-scope .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.embarkai-ui-scope .max-w-\\[100px\\]{max-width:100px}.embarkai-ui-scope .max-w-\\[144px\\]{max-width:144px}.embarkai-ui-scope .max-w-\\[150px\\]{max-width:150px}.embarkai-ui-scope .max-w-\\[160px\\]{max-width:160px}.embarkai-ui-scope .max-w-\\[256px\\]{max-width:256px}.embarkai-ui-scope .max-w-\\[680px\\]{max-width:680px}.embarkai-ui-scope .max-w-\\[calc\\(50\\%-8px\\)\\]{max-width:calc(50% - 8px)}.embarkai-ui-scope .max-w-full{max-width:100%}.embarkai-ui-scope .max-w-sm{max-width:24rem}.embarkai-ui-scope .flex-1{flex:1 1 0%}.embarkai-ui-scope .flex-none{flex:none}.embarkai-ui-scope .flex-shrink-0,.embarkai-ui-scope .shrink-0{flex-shrink:0}.embarkai-ui-scope .-translate-x-1\\/2{--tw-translate-x:-50%}.embarkai-ui-scope .-translate-x-1\\/2,.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{--tw-translate-x:calc(var(--ui-kit-gap)*-1)}.embarkai-ui-scope .-translate-y-1\\/2{--tw-translate-y:-50%}.embarkai-ui-scope .-translate-y-1\\/2,.embarkai-ui-scope .-translate-y-1\\/3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-y-1\\/3{--tw-translate-y:-33.333333%}.embarkai-ui-scope .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes glow-warning{0%,to{transform:scale(1);box-shadow:0 0 16px var(--ui-kit-bg-warning)}50%{transform:scale(.97);box-shadow:0 0 4px var(--ui-kit-bg-warning)}}.embarkai-ui-scope .animate-glow-warning{animation:glow-warning 2s ease infinite}@keyframes pulse{50%{opacity:.5}}.embarkai-ui-scope .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.embarkai-ui-scope .animate-spin{animation:spin 1s linear infinite}.embarkai-ui-scope .cursor-default{cursor:default}.embarkai-ui-scope .cursor-help{cursor:help}.embarkai-ui-scope .cursor-pointer{cursor:pointer}.embarkai-ui-scope .cursor-text{cursor:text}.embarkai-ui-scope .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.embarkai-ui-scope .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.embarkai-ui-scope .scroll-my-1{scroll-margin-top:.25rem;scroll-margin-bottom:.25rem}.embarkai-ui-scope .list-inside{list-style-position:inside}.embarkai-ui-scope .list-disc{list-style-type:disc}.embarkai-ui-scope .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.embarkai-ui-scope .flex-col{flex-direction:column}.embarkai-ui-scope .flex-col-reverse{flex-direction:column-reverse}.embarkai-ui-scope .flex-wrap{flex-wrap:wrap}.embarkai-ui-scope .place-content-center{place-content:center}.embarkai-ui-scope .items-start{align-items:flex-start}.embarkai-ui-scope .items-end{align-items:flex-end}.embarkai-ui-scope .items-center{align-items:center}.embarkai-ui-scope .justify-start{justify-content:flex-start}.embarkai-ui-scope .justify-end{justify-content:flex-end}.embarkai-ui-scope .justify-center{justify-content:center}.embarkai-ui-scope .justify-between{justify-content:space-between}.embarkai-ui-scope .gap-0{gap:0}.embarkai-ui-scope .gap-1{gap:.25rem}.embarkai-ui-scope .gap-2{gap:.5rem}.embarkai-ui-scope .gap-3{gap:.75rem}.embarkai-ui-scope .gap-4{gap:1rem}.embarkai-ui-scope .gap-\\[10px\\]{gap:10px}.embarkai-ui-scope .gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-y-0\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.embarkai-ui-scope .overflow-hidden{overflow:hidden}.embarkai-ui-scope .overflow-y-auto{overflow-y:auto}.embarkai-ui-scope .overflow-x-hidden{overflow-x:hidden}.embarkai-ui-scope .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.embarkai-ui-scope .text-ellipsis{text-overflow:ellipsis}.embarkai-ui-scope .whitespace-nowrap{white-space:nowrap}.embarkai-ui-scope .whitespace-pre-line{white-space:pre-line}.embarkai-ui-scope .whitespace-pre-wrap{white-space:pre-wrap}.embarkai-ui-scope .break-normal{overflow-wrap:normal;word-break:normal}.embarkai-ui-scope .break-words{overflow-wrap:break-word}.embarkai-ui-scope .break-all{word-break:break-all}.embarkai-ui-scope .rounded{border-radius:.25rem}.embarkai-ui-scope .rounded-\\[10px\\]{border-radius:10px}.embarkai-ui-scope .rounded-\\[8px\\]{border-radius:8px}.embarkai-ui-scope .rounded-\\[calc\\(var\\(--ui-kit-el-bdrs\\)_\\/_2\\)\\]{border-radius:calc(var(--ui-kit-el-bdrs)/2)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-bdrs\\)\\]{border-radius:var(--ui-kit-bdrs)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .rounded-full{border-radius:9999px}.embarkai-ui-scope .rounded-lg{border-radius:.5rem}.embarkai-ui-scope .rounded-md{border-radius:.375rem}.embarkai-ui-scope .rounded-xl{border-radius:.75rem}.embarkai-ui-scope .border{border-width:1px}.embarkai-ui-scope .border-0{border-width:0}.embarkai-ui-scope .border-2{border-width:2px}.embarkai-ui-scope .border-b{border-bottom-width:1px}.embarkai-ui-scope .border-t{border-top-width:1px}.embarkai-ui-scope .border-dashed{border-style:dashed}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bd\\)\\]{border-color:var(--ui-kit-bd)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-error\\)\\]{border-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-success\\)\\]{border-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-warning\\)\\]{border-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-error\\)\\]{border-color:var(--ui-kit-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-secondary\\)\\]{border-color:var(--ui-kit-secondary)}.embarkai-ui-scope .border-current{border-color:currentColor}.embarkai-ui-scope .border-transparent{border-color:transparent}.embarkai-ui-scope .border-t-transparent{border-top-color:transparent}.embarkai-ui-scope .bg-\\[\\#002c15\\]{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#081f2c\\]{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f0f6f8\\]{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f3ba2f\\]{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg\\)\\]{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-error\\)\\]{background-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-info\\)\\]{background-color:var(--ui-kit-bg-info)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-secondary\\)\\]{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-success\\)\\]{background-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-warning\\)\\]{background-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-fg\\)\\]{background-color:var(--ui-kit-fg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-overlay\\)\\]{background-color:var(--ui-kit-overlay)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-primary\\)\\]{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary\\)\\]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary-h\\)\\]{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-transparent{background-color:transparent}.embarkai-ui-scope .fill-\\[var\\(--ui-kit-bg-warning\\)\\]{fill:var(--ui-kit-bg-warning)}.embarkai-ui-scope .object-contain{-o-object-fit:contain;object-fit:contain}.embarkai-ui-scope .object-cover{-o-object-fit:cover;object-fit:cover}.embarkai-ui-scope .p-0{padding:0}.embarkai-ui-scope .p-1{padding:.25rem}.embarkai-ui-scope .p-2{padding:.5rem}.embarkai-ui-scope .p-3{padding:.75rem}.embarkai-ui-scope .p-4{padding:1rem}.embarkai-ui-scope .p-5{padding:1.25rem}.embarkai-ui-scope .p-6{padding:1.5rem}.embarkai-ui-scope .p-8{padding:2rem}.embarkai-ui-scope .p-\\[2px\\]{padding:2px}.embarkai-ui-scope .p-\\[var\\(--ui-kit-gap\\)\\]{padding:var(--ui-kit-gap)}.embarkai-ui-scope .p-\\[var\\(--ui-kit-pd\\)\\]{padding:var(--ui-kit-pd)}.embarkai-ui-scope .px-0{padding-left:0;padding-right:0}.embarkai-ui-scope .px-1{padding-left:.25rem;padding-right:.25rem}.embarkai-ui-scope .px-2{padding-left:.5rem;padding-right:.5rem}.embarkai-ui-scope .px-3{padding-left:.75rem;padding-right:.75rem}.embarkai-ui-scope .px-4{padding-left:1rem;padding-right:1rem}.embarkai-ui-scope .px-5{padding-left:1.25rem;padding-right:1.25rem}.embarkai-ui-scope .px-8{padding-left:2rem;padding-right:2rem}.embarkai-ui-scope .px-\\[var\\(--ui-kit-gap\\)\\]{padding-left:var(--ui-kit-gap);padding-right:var(--ui-kit-gap)}.embarkai-ui-scope .px-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .py-0{padding-top:0;padding-bottom:0}.embarkai-ui-scope .py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.embarkai-ui-scope .py-2{padding-top:.5rem;padding-bottom:.5rem}.embarkai-ui-scope .py-3{padding-top:.75rem;padding-bottom:.75rem}.embarkai-ui-scope .py-4{padding-top:1rem;padding-bottom:1rem}.embarkai-ui-scope .py-8{padding-top:2rem;padding-bottom:2rem}.embarkai-ui-scope .py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.embarkai-ui-scope .py-\\[var\\(--ui-kit-gap\\)\\]{padding-top:var(--ui-kit-gap);padding-bottom:var(--ui-kit-gap)}.embarkai-ui-scope .py-\\[var\\(--ui-kit-pd\\)\\]{padding-top:var(--ui-kit-pd);padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pb-2{padding-bottom:.5rem}.embarkai-ui-scope .pb-5{padding-bottom:1.25rem}.embarkai-ui-scope .pb-6{padding-bottom:1.5rem}.embarkai-ui-scope .pb-\\[var\\(--ui-kit-pd\\)\\]{padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pl-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd)}.embarkai-ui-scope .pr-8{padding-right:2rem}.embarkai-ui-scope .pt-3{padding-top:.75rem}.embarkai-ui-scope .pt-4{padding-top:1rem}.embarkai-ui-scope .pt-5{padding-top:1.25rem}.embarkai-ui-scope .text-left{text-align:left}.embarkai-ui-scope .text-center{text-align:center}.embarkai-ui-scope .text-right{text-align:right}.embarkai-ui-scope .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.embarkai-ui-scope .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.embarkai-ui-scope .text-2xl{font-size:1.5rem;line-height:2rem}.embarkai-ui-scope .text-\\[10px\\]{font-size:10px}.embarkai-ui-scope .text-\\[14px\\]{font-size:14px}.embarkai-ui-scope .text-\\[16px\\]{font-size:16px}.embarkai-ui-scope .text-\\[8px\\]{font-size:8px}.embarkai-ui-scope .text-lg{font-size:1.125rem;line-height:1.75rem}.embarkai-ui-scope .text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .text-xl{font-size:1.25rem;line-height:1.75rem}.embarkai-ui-scope .text-xs{font-size:.75rem;line-height:1rem}.embarkai-ui-scope .font-bold{font-weight:700}.embarkai-ui-scope .font-medium{font-weight:500}.embarkai-ui-scope .font-normal{font-weight:400}.embarkai-ui-scope .font-semibold{font-weight:600}.embarkai-ui-scope .uppercase{text-transform:uppercase}.embarkai-ui-scope .lowercase{text-transform:lowercase}.embarkai-ui-scope .leading-3{line-height:.75rem}.embarkai-ui-scope .leading-4{line-height:1rem}.embarkai-ui-scope .leading-5{line-height:1.25rem}.embarkai-ui-scope .leading-6{line-height:1.5rem}.embarkai-ui-scope .leading-8{line-height:2rem}.embarkai-ui-scope .leading-\\[8px\\]{line-height:8px}.embarkai-ui-scope .leading-none{line-height:1}.embarkai-ui-scope .leading-tight{line-height:1.25}.embarkai-ui-scope .tracking-\\[0\\.3em\\]{letter-spacing:.3em}.embarkai-ui-scope .tracking-tight{letter-spacing:-.025em}.embarkai-ui-scope .text-\\[\\#c3f53c\\]{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-error\\)\\]{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-success\\)\\]{color:var(--ui-kit-bg-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-warning\\)\\]{color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-error\\)\\]{color:var(--ui-kit-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg\\)\\]{color:var(--ui-kit-fg)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-inverted\\)\\]{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-muted\\)\\]{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-info\\)\\]{color:var(--ui-kit-info)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-primary\\)\\]{color:var(--ui-kit-primary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-success\\)\\]{color:var(--ui-kit-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-text-secondary\\)\\]{color:var(--ui-kit-text-secondary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-warning\\)\\]{color:var(--ui-kit-warning)}.embarkai-ui-scope .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.embarkai-ui-scope .underline{text-decoration-line:underline}.embarkai-ui-scope .underline-offset-2{text-underline-offset:2px}.embarkai-ui-scope .underline-offset-4{text-underline-offset:4px}.embarkai-ui-scope .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope .opacity-0{opacity:0}.embarkai-ui-scope .opacity-100{opacity:1}.embarkai-ui-scope .opacity-50{opacity:.5}.embarkai-ui-scope .opacity-60{opacity:.6}.embarkai-ui-scope .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.embarkai-ui-scope .shadow,.embarkai-ui-scope .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.embarkai-ui-scope .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.embarkai-ui-scope .outline-none{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .outline{outline-style:solid}.embarkai-ui-scope .blur{--tw-blur:blur(8px)}.embarkai-ui-scope .blur,.embarkai-ui-scope .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .grayscale{--tw-grayscale:grayscale(100%)}.embarkai-ui-scope .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-\\[color\\2c box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-none{transition-property:none}.embarkai-ui-scope .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .duration-200{transition-duration:.2s}.embarkai-ui-scope .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.embarkai-ui-scope{--ui-kit-ff:var(--embark-ui-ff,-apple-system,BlinkMacSystemFont,"Inter",system-ui,sans-serif);--ui-kit-maw:var(--embark-ui-maw,384px);--ui-kit-pd:var(--embark-ui-pd,12px);--ui-kit-gap:var(--embark-ui-gap,10px);--ui-kit-bdrs:var(--embark-ui-bdrs,20px);--ui-kit-el-bdrs:var(--embark-ui-element-bdrs,10px);--ui-kit-backdrop-blur:var(--embark-ui-backdrop-blur,10px)}.embarkai-ui-scope[data-current-theme-mode=light]{--ui-kit-overlay:var(--embark-ui-overlay,hsla(0,0%,100%,.8));--ui-kit-bg:var(--embark-ui-bg,#fff);--ui-kit-fg:var(--embark-ui-fg,#000);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#fff);--ui-kit-fg-muted:var(--embark-ui-fg-muted,rgba(0,0,0,.6));--ui-kit-primary:var(--embark-ui-primary,#000);--ui-kit-primary-h:var(--embark-ui-primary-h,rgba(0,0,0,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,rgba(0,0,0,.6));--ui-kit-secondary:var(--embark-ui-secondary,#e4e4e4);--ui-kit-secondary-h:var(--embark-ui-secondary-h,hsla(0,0%,89%,.8));--ui-kit-secondary-a:var(--embark-ui-secondary-a,hsla(0,0%,89%,.6));--ui-kit-bd:var(--embark-ui-bd,#ebebeb);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#a9a9a9);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope[data-current-theme-mode=dark]{--ui-kit-overlay:var(--embark-ui-overlay,rgba(0,0,0,.8));--ui-kit-bg:var(--embark-ui-bg,#1a1a1a);--ui-kit-fg:var(--embark-ui-fg,#fff);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#000);--ui-kit-fg-muted:var(--embark-ui-fg-muted,hsla(0,0%,100%,.6));--ui-kit-primary:var(--embark-ui-primary,#fff);--ui-kit-primary-h:var(--embark-ui-primary-h,hsla(0,0%,100%,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,hsla(0,0%,100%,.6));--ui-kit-secondary:var(--embark-ui-secondary,#2a2a2a);--ui-kit-secondary-h:var(--embark-ui-secondary-h,rgba(42,42,42,.6));--ui-kit-secondary-a:var(--embark-ui-secondary-a,rgba(42,42,42,.4));--ui-kit-bd:var(--embark-ui-bd,#3a3a3a);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#4a4a4a);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope,.embarkai-ui-scope *{margin:0;box-sizing:border-box;font-family:var(--ui-kit-ff);font-optical-sizing:auto;-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:transparent;-ms-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope button,.embarkai-ui-scope h1,.embarkai-ui-scope h2,.embarkai-ui-scope h3,.embarkai-ui-scope h4,.embarkai-ui-scope h5,.embarkai-ui-scope h6,.embarkai-ui-scope input,.embarkai-ui-scope p,.embarkai-ui-scope select,.embarkai-ui-scope textarea{font-family:var(--ui-kit-ff)!important;margin:0}.embarkai-ui-scope button,.embarkai-ui-scope input,.embarkai-ui-scope select,.embarkai-ui-scope textarea{border-style:solid;outline:none!important;appearance:none!important;-webkit-appearance:none;-moz-appearance:none}.embarkai-ui-scope input,.embarkai-ui-scope textarea{font-size:16px!important}.embarkai-ui-scope .account-connect-button{box-shadow:0 4px 20px var(--ui-kit-shadow-c),inset 0 0 0 1px var(--ui-kit-bd);transition:transform .25s ease}.embarkai-ui-scope .account-connect-button:hover{transform:scale(1.02)}.embarkai-ui-scope .account-connect-button:active{transform:scale(1)}@keyframes lumia-mobile-dialog-fade-in{0%{opacity:0;transform:translateY(64px)}to{opacity:1;transform:translateY(0)}}@keyframes lumia-mobile-dialog-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(64px)}}.embarkai-ui-scope .animate-mobile-dialog-in{animation:lumia-mobile-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-mobile-dialog-out{animation:lumia-mobile-dialog-fade-out 375ms ease}@keyframes lumia-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes lumia-dialog-fade-out{0%{opacity:1}to{opacity:0}}.embarkai-ui-scope .animate-dialog-in{animation:lumia-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-dialog-out{animation:lumia-dialog-fade-out 375ms ease}.embarkai-ui-scope .list-scrollbar-y{width:100%;padding-right:var(--ui-kit-list-scrollbar-pd-r,0);overflow-y:auto;overflow-x:hidden;max-height:var(--ui-kit-scrollbar-mah,300px)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar{width:4px;height:4px}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-thumb{cursor:pointer;width:4px;border-radius:2px;background-color:var(--ui-kit-bd)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-track{margin-top:10px;margin-bottom:10px;background-color:transparent}.embarkai-ui-scope .noScrollbars::-webkit-scrollbar{display:none}.embarkai-ui-scope div[data-radix-popper-content-wrapper]{z-index:10000!important}@keyframes rotateShine{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.embarkai-ui-scope .button-shine-outline{position:absolute;top:0;left:0;width:100%;height:100%;padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude}.embarkai-ui-scope .button-shine-outline-shiner{position:absolute;top:50%;left:50%;width:500px;height:500px;transform:translate(-50%,-50%);background:conic-gradient(from 0deg,transparent 0,var(--ui-kit-fg) 8%,transparent 24%);animation:rotateShine 3s linear infinite}.embarkai-ui-scope .file\\:mr-\\[var\\(--ui-kit-gap\\)\\]::file-selector-button{margin-right:var(--ui-kit-gap)}.embarkai-ui-scope .file\\:h-12::file-selector-button{height:3rem}.embarkai-ui-scope .file\\:cursor-pointer::file-selector-button{cursor:pointer}.embarkai-ui-scope .file\\:rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]::file-selector-button{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .file\\:border-0::file-selector-button{border-width:0}.embarkai-ui-scope .file\\:bg-\\[var\\(--ui-kit-primary\\)\\]::file-selector-button{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .file\\:bg-transparent::file-selector-button{background-color:transparent}.embarkai-ui-scope .file\\:px-\\[var\\(--ui-kit-pd\\)\\]::file-selector-button{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .file\\:text-\\[16px\\]::file-selector-button{font-size:16px}.embarkai-ui-scope .file\\:text-base::file-selector-button{font-size:1rem;line-height:1.5rem}.embarkai-ui-scope .file\\:font-medium::file-selector-button{font-weight:500}.embarkai-ui-scope .file\\:text-\\[var\\(--ui-kit-fg-inverted\\)\\]::file-selector-button{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::-moz-placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .focus-within\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus-within{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .hover\\:bg-\\[\\#002c15\\]:hover{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#081f2c\\]:hover{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f0f6f8\\]:hover{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f3ba2f\\]:hover{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary-h\\)\\]:hover{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[\\#c3f53c\\]:hover{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[var\\(--ui-kit-fg\\)\\]:hover{color:var(--ui-kit-fg)}.embarkai-ui-scope .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:underline:hover{text-decoration-line:underline}.embarkai-ui-scope .hover\\:opacity-80:hover{opacity:.8}.embarkai-ui-scope .hover\\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .file\\:hover\\:opacity-90:hover::file-selector-button{opacity:.9}.embarkai-ui-scope .focus\\:border-\\[var\\(--ui-kit-primary\\)\\]:focus{border-color:var(--ui-kit-primary)}.embarkai-ui-scope .focus\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus\\:bg-transparent:focus{background-color:transparent}.embarkai-ui-scope .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-\\[2px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-transparent:focus-visible{--tw-ring-color:transparent}.embarkai-ui-scope .focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.embarkai-ui-scope .active\\:bg-\\[\\#f3ba2f\\]:active{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:active{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .active\\:text-\\[\\#c3f53c\\]:active{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .active\\:opacity-60:active{opacity:.6}.embarkai-ui-scope .file\\:active\\:opacity-80:active::file-selector-button{opacity:.8}.embarkai-ui-scope .disabled\\:cursor-default:disabled{cursor:default}.embarkai-ui-scope .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.embarkai-ui-scope .disabled\\:opacity-50:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover:disabled{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .disabled\\:hover\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:hover:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:hover\\:opacity-50:hover:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:active\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:active:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:active\\:opacity-50:active:disabled{opacity:.5}.embarkai-ui-scope :is(.group:hover .group-hover\\:opacity-100){opacity:1}.embarkai-ui-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.embarkai-ui-scope .data-\\[size\\=default\\]\\:h-12[data-size=default]{height:3rem}.embarkai-ui-scope .data-\\[size\\=sm\\]\\:h-10[data-size=sm]{height:2.5rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:border-\\[var\\(--ui-kit-bd-intense\\)\\][data-state=checked]{border-color:var(--ui-kit-bd-intense)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:bg-\\[var\\(--ui-kit-secondary\\)\\][data-state=checked]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:text-\\[var\\(--ui-kit-fg\\)\\][data-state=checked]{color:var(--ui-kit-fg)}.embarkai-ui-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*){overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*){display:flex}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*){align-items:center}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-\\[var\\(--ui-kit-gap\\)\\][data-slot=select-value]>*){gap:var(--ui-kit-gap)}@media (min-width:640px){.embarkai-ui-scope .sm\\:flex-row{flex-direction:row}.embarkai-ui-scope .sm\\:justify-end{justify-content:flex-end}.embarkai-ui-scope :is(.sm\\:space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope .sm\\:text-left{text-align:left}}@media (min-width:768px){.embarkai-ui-scope .md\\:h-8{height:2rem}.embarkai-ui-scope .md\\:w-8{width:2rem}.embarkai-ui-scope .md\\:gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope .md\\:py-1{padding-top:.25rem;padding-bottom:.25rem}}.embarkai-ui-scope :is(.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-])){width:1rem;height:1rem}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:pointer-events-none svg){pointer-events:none}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:shrink-0 svg){flex-shrink:0}`;
|
|
28487
|
+
var built_default = `.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.embarkai-ui-scope .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.embarkai-ui-scope .pointer-events-none{pointer-events:none}.embarkai-ui-scope .pointer-events-auto{pointer-events:auto}.embarkai-ui-scope .visible{visibility:visible}.embarkai-ui-scope .invisible{visibility:hidden}.embarkai-ui-scope .static{position:static}.embarkai-ui-scope .fixed{position:fixed}.embarkai-ui-scope .absolute{position:absolute}.embarkai-ui-scope .relative{position:relative}.embarkai-ui-scope .inset-0{inset:0}.embarkai-ui-scope .-right-1{right:-.25rem}.embarkai-ui-scope .-right-2{right:-.5rem}.embarkai-ui-scope .-top-1{top:-.25rem}.embarkai-ui-scope .-top-2{top:-.5rem}.embarkai-ui-scope .bottom-0{bottom:0}.embarkai-ui-scope .bottom-full{bottom:100%}.embarkai-ui-scope .left-0{left:0}.embarkai-ui-scope .left-1\\/2{left:50%}.embarkai-ui-scope .left-4{left:1rem}.embarkai-ui-scope .right-0{right:0}.embarkai-ui-scope .right-2{right:.5rem}.embarkai-ui-scope .right-3{right:.75rem}.embarkai-ui-scope .right-4{right:1rem}.embarkai-ui-scope .right-\\[var\\(--ui-kit-pd\\)\\]{right:var(--ui-kit-pd)}.embarkai-ui-scope .right-full{right:100%}.embarkai-ui-scope .top-0{top:0}.embarkai-ui-scope .top-1\\/2{top:50%}.embarkai-ui-scope .top-2{top:.5rem}.embarkai-ui-scope .top-4{top:1rem}.embarkai-ui-scope .top-\\[var\\(--ui-kit-pd\\)\\]{top:var(--ui-kit-pd)}.embarkai-ui-scope .z-10{z-index:10}.embarkai-ui-scope .z-50{z-index:50}.embarkai-ui-scope .z-\\[9998\\]{z-index:9998}.embarkai-ui-scope .z-\\[9999\\]{z-index:9999}.embarkai-ui-scope .-m-px{margin:-1px}.embarkai-ui-scope .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.embarkai-ui-scope .mx-auto{margin-left:auto;margin-right:auto}.embarkai-ui-scope .my-1{margin-top:.25rem;margin-bottom:.25rem}.embarkai-ui-scope .mb-1{margin-bottom:.25rem}.embarkai-ui-scope .mb-2{margin-bottom:.5rem}.embarkai-ui-scope .mb-3{margin-bottom:.75rem}.embarkai-ui-scope .mb-4{margin-bottom:1rem}.embarkai-ui-scope .ml-1{margin-left:.25rem}.embarkai-ui-scope .ml-2{margin-left:.5rem}.embarkai-ui-scope .ml-auto{margin-left:auto}.embarkai-ui-scope .mr-1{margin-right:.25rem}.embarkai-ui-scope .mt-0\\.5{margin-top:.125rem}.embarkai-ui-scope .mt-1{margin-top:.25rem}.embarkai-ui-scope .mt-2{margin-top:.5rem}.embarkai-ui-scope .mt-4{margin-top:1rem}.embarkai-ui-scope .block{display:block}.embarkai-ui-scope .inline-block{display:inline-block}.embarkai-ui-scope .inline{display:inline}.embarkai-ui-scope .flex{display:flex}.embarkai-ui-scope .inline-flex{display:inline-flex}.embarkai-ui-scope .table{display:table}.embarkai-ui-scope .grid{display:grid}.embarkai-ui-scope .hidden{display:none}.embarkai-ui-scope .aspect-square{aspect-ratio:1/1}.embarkai-ui-scope .size-4{width:1rem;height:1rem}.embarkai-ui-scope .size-8{width:2rem;height:2rem}.embarkai-ui-scope .size-auto{width:auto;height:auto}.embarkai-ui-scope .h-0{height:0}.embarkai-ui-scope .h-1{height:.25rem}.embarkai-ui-scope .h-10{height:2.5rem}.embarkai-ui-scope .h-12{height:3rem}.embarkai-ui-scope .h-16{height:4rem}.embarkai-ui-scope .h-3{height:.75rem}.embarkai-ui-scope .h-3\\.5{height:.875rem}.embarkai-ui-scope .h-4{height:1rem}.embarkai-ui-scope .h-48{height:12rem}.embarkai-ui-scope .h-5{height:1.25rem}.embarkai-ui-scope .h-6{height:1.5rem}.embarkai-ui-scope .h-7{height:1.75rem}.embarkai-ui-scope .h-8{height:2rem}.embarkai-ui-scope .h-\\[100dvh\\]{height:100dvh}.embarkai-ui-scope .h-\\[48px\\]{height:48px}.embarkai-ui-scope .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.embarkai-ui-scope .h-auto{height:auto}.embarkai-ui-scope .h-fit{height:-moz-fit-content;height:fit-content}.embarkai-ui-scope .h-full{height:100%}.embarkai-ui-scope .h-px{height:1px}.embarkai-ui-scope .max-h-96{max-height:24rem}.embarkai-ui-scope .max-h-\\[95dvh\\]{max-height:95dvh}.embarkai-ui-scope .min-h-10{min-height:2.5rem}.embarkai-ui-scope .min-h-12{min-height:3rem}.embarkai-ui-scope .w-1{width:.25rem}.embarkai-ui-scope .w-1\\/2{width:50%}.embarkai-ui-scope .w-10{width:2.5rem}.embarkai-ui-scope .w-12{width:3rem}.embarkai-ui-scope .w-16{width:4rem}.embarkai-ui-scope .w-3{width:.75rem}.embarkai-ui-scope .w-3\\.5{width:.875rem}.embarkai-ui-scope .w-4{width:1rem}.embarkai-ui-scope .w-48{width:12rem}.embarkai-ui-scope .w-5{width:1.25rem}.embarkai-ui-scope .w-6{width:1.5rem}.embarkai-ui-scope .w-7{width:1.75rem}.embarkai-ui-scope .w-8{width:2rem}.embarkai-ui-scope .w-\\[100dvw\\]{width:100dvw}.embarkai-ui-scope .w-\\[40px\\]{width:40px}.embarkai-ui-scope .w-\\[var\\(--ui-kit-maw\\)\\]{width:var(--ui-kit-maw)}.embarkai-ui-scope .w-fit{width:-moz-fit-content;width:fit-content}.embarkai-ui-scope .w-full{width:100%}.embarkai-ui-scope .w-px{width:1px}.embarkai-ui-scope .min-w-0{min-width:0}.embarkai-ui-scope .min-w-10{min-width:2.5rem}.embarkai-ui-scope .min-w-16{min-width:4rem}.embarkai-ui-scope .min-w-\\[256px\\]{min-width:256px}.embarkai-ui-scope .min-w-\\[8rem\\]{min-width:8rem}.embarkai-ui-scope .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.embarkai-ui-scope .max-w-\\[100px\\]{max-width:100px}.embarkai-ui-scope .max-w-\\[144px\\]{max-width:144px}.embarkai-ui-scope .max-w-\\[150px\\]{max-width:150px}.embarkai-ui-scope .max-w-\\[160px\\]{max-width:160px}.embarkai-ui-scope .max-w-\\[256px\\]{max-width:256px}.embarkai-ui-scope .max-w-\\[680px\\]{max-width:680px}.embarkai-ui-scope .max-w-\\[calc\\(50\\%-8px\\)\\]{max-width:calc(50% - 8px)}.embarkai-ui-scope .max-w-full{max-width:100%}.embarkai-ui-scope .max-w-sm{max-width:24rem}.embarkai-ui-scope .flex-1{flex:1 1 0%}.embarkai-ui-scope .flex-none{flex:none}.embarkai-ui-scope .flex-shrink-0,.embarkai-ui-scope .shrink-0{flex-shrink:0}.embarkai-ui-scope .-translate-x-1\\/2{--tw-translate-x:-50%}.embarkai-ui-scope .-translate-x-1\\/2,.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{--tw-translate-x:calc(var(--ui-kit-gap)*-1)}.embarkai-ui-scope .-translate-y-1\\/2{--tw-translate-y:-50%}.embarkai-ui-scope .-translate-y-1\\/2,.embarkai-ui-scope .-translate-y-1\\/3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-y-1\\/3{--tw-translate-y:-33.333333%}.embarkai-ui-scope .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes glow-warning{0%,to{transform:scale(1);box-shadow:0 0 16px var(--ui-kit-bg-warning)}50%{transform:scale(.97);box-shadow:0 0 4px var(--ui-kit-bg-warning)}}.embarkai-ui-scope .animate-glow-warning{animation:glow-warning 2s ease infinite}@keyframes pulse{50%{opacity:.5}}.embarkai-ui-scope .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.embarkai-ui-scope .animate-spin{animation:spin 1s linear infinite}.embarkai-ui-scope .cursor-default{cursor:default}.embarkai-ui-scope .cursor-help{cursor:help}.embarkai-ui-scope .cursor-pointer{cursor:pointer}.embarkai-ui-scope .cursor-text{cursor:text}.embarkai-ui-scope .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.embarkai-ui-scope .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.embarkai-ui-scope .scroll-my-1{scroll-margin-top:.25rem;scroll-margin-bottom:.25rem}.embarkai-ui-scope .list-inside{list-style-position:inside}.embarkai-ui-scope .list-disc{list-style-type:disc}.embarkai-ui-scope .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.embarkai-ui-scope .flex-col{flex-direction:column}.embarkai-ui-scope .flex-col-reverse{flex-direction:column-reverse}.embarkai-ui-scope .flex-wrap{flex-wrap:wrap}.embarkai-ui-scope .place-content-center{place-content:center}.embarkai-ui-scope .items-start{align-items:flex-start}.embarkai-ui-scope .items-end{align-items:flex-end}.embarkai-ui-scope .items-center{align-items:center}.embarkai-ui-scope .justify-start{justify-content:flex-start}.embarkai-ui-scope .justify-end{justify-content:flex-end}.embarkai-ui-scope .justify-center{justify-content:center}.embarkai-ui-scope .justify-between{justify-content:space-between}.embarkai-ui-scope .gap-0{gap:0}.embarkai-ui-scope .gap-1{gap:.25rem}.embarkai-ui-scope .gap-2{gap:.5rem}.embarkai-ui-scope .gap-3{gap:.75rem}.embarkai-ui-scope .gap-4{gap:1rem}.embarkai-ui-scope .gap-\\[10px\\]{gap:10px}.embarkai-ui-scope .gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-y-0\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.embarkai-ui-scope .overflow-hidden{overflow:hidden}.embarkai-ui-scope .overflow-y-auto{overflow-y:auto}.embarkai-ui-scope .overflow-x-hidden{overflow-x:hidden}.embarkai-ui-scope .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.embarkai-ui-scope .text-ellipsis{text-overflow:ellipsis}.embarkai-ui-scope .whitespace-nowrap{white-space:nowrap}.embarkai-ui-scope .whitespace-pre-line{white-space:pre-line}.embarkai-ui-scope .whitespace-pre-wrap{white-space:pre-wrap}.embarkai-ui-scope .break-normal{overflow-wrap:normal;word-break:normal}.embarkai-ui-scope .break-words{overflow-wrap:break-word}.embarkai-ui-scope .break-all{word-break:break-all}.embarkai-ui-scope .rounded{border-radius:.25rem}.embarkai-ui-scope .rounded-\\[10px\\]{border-radius:10px}.embarkai-ui-scope .rounded-\\[8px\\]{border-radius:8px}.embarkai-ui-scope .rounded-\\[calc\\(var\\(--ui-kit-el-bdrs\\)_\\/_2\\)\\]{border-radius:calc(var(--ui-kit-el-bdrs)/2)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-bdrs\\)\\]{border-radius:var(--ui-kit-bdrs)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .rounded-full{border-radius:9999px}.embarkai-ui-scope .rounded-lg{border-radius:.5rem}.embarkai-ui-scope .rounded-md{border-radius:.375rem}.embarkai-ui-scope .rounded-xl{border-radius:.75rem}.embarkai-ui-scope .border{border-width:1px}.embarkai-ui-scope .border-0{border-width:0}.embarkai-ui-scope .border-2{border-width:2px}.embarkai-ui-scope .border-b{border-bottom-width:1px}.embarkai-ui-scope .border-t{border-top-width:1px}.embarkai-ui-scope .border-dashed{border-style:dashed}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bd\\)\\]{border-color:var(--ui-kit-bd)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-error\\)\\]{border-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-success\\)\\]{border-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-warning\\)\\]{border-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-error\\)\\]{border-color:var(--ui-kit-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-secondary\\)\\]{border-color:var(--ui-kit-secondary)}.embarkai-ui-scope .border-current{border-color:currentColor}.embarkai-ui-scope .border-transparent{border-color:transparent}.embarkai-ui-scope .border-t-transparent{border-top-color:transparent}.embarkai-ui-scope .bg-\\[\\#002c15\\]{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#081f2c\\]{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f0f6f8\\]{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f3ba2f\\]{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg\\)\\]{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-error\\)\\]{background-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-info\\)\\]{background-color:var(--ui-kit-bg-info)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-secondary\\)\\]{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-success\\)\\]{background-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-warning\\)\\]{background-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-fg\\)\\]{background-color:var(--ui-kit-fg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-overlay\\)\\]{background-color:var(--ui-kit-overlay)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-primary\\)\\]{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary\\)\\]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary-h\\)\\]{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-transparent{background-color:transparent}.embarkai-ui-scope .fill-\\[var\\(--ui-kit-bg-warning\\)\\]{fill:var(--ui-kit-bg-warning)}.embarkai-ui-scope .object-contain{-o-object-fit:contain;object-fit:contain}.embarkai-ui-scope .object-cover{-o-object-fit:cover;object-fit:cover}.embarkai-ui-scope .p-0{padding:0}.embarkai-ui-scope .p-1{padding:.25rem}.embarkai-ui-scope .p-2{padding:.5rem}.embarkai-ui-scope .p-3{padding:.75rem}.embarkai-ui-scope .p-4{padding:1rem}.embarkai-ui-scope .p-5{padding:1.25rem}.embarkai-ui-scope .p-6{padding:1.5rem}.embarkai-ui-scope .p-8{padding:2rem}.embarkai-ui-scope .p-\\[2px\\]{padding:2px}.embarkai-ui-scope .p-\\[var\\(--ui-kit-gap\\)\\]{padding:var(--ui-kit-gap)}.embarkai-ui-scope .p-\\[var\\(--ui-kit-pd\\)\\]{padding:var(--ui-kit-pd)}.embarkai-ui-scope .px-0{padding-left:0;padding-right:0}.embarkai-ui-scope .px-1{padding-left:.25rem;padding-right:.25rem}.embarkai-ui-scope .px-2{padding-left:.5rem;padding-right:.5rem}.embarkai-ui-scope .px-3{padding-left:.75rem;padding-right:.75rem}.embarkai-ui-scope .px-4{padding-left:1rem;padding-right:1rem}.embarkai-ui-scope .px-5{padding-left:1.25rem;padding-right:1.25rem}.embarkai-ui-scope .px-8{padding-left:2rem;padding-right:2rem}.embarkai-ui-scope .px-\\[var\\(--ui-kit-gap\\)\\]{padding-left:var(--ui-kit-gap);padding-right:var(--ui-kit-gap)}.embarkai-ui-scope .px-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .py-0{padding-top:0;padding-bottom:0}.embarkai-ui-scope .py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.embarkai-ui-scope .py-2{padding-top:.5rem;padding-bottom:.5rem}.embarkai-ui-scope .py-3{padding-top:.75rem;padding-bottom:.75rem}.embarkai-ui-scope .py-4{padding-top:1rem;padding-bottom:1rem}.embarkai-ui-scope .py-8{padding-top:2rem;padding-bottom:2rem}.embarkai-ui-scope .py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.embarkai-ui-scope .py-\\[var\\(--ui-kit-gap\\)\\]{padding-top:var(--ui-kit-gap);padding-bottom:var(--ui-kit-gap)}.embarkai-ui-scope .py-\\[var\\(--ui-kit-pd\\)\\]{padding-top:var(--ui-kit-pd);padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pb-2{padding-bottom:.5rem}.embarkai-ui-scope .pb-5{padding-bottom:1.25rem}.embarkai-ui-scope .pb-6{padding-bottom:1.5rem}.embarkai-ui-scope .pb-\\[var\\(--ui-kit-pd\\)\\]{padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pl-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd)}.embarkai-ui-scope .pr-8{padding-right:2rem}.embarkai-ui-scope .pt-3{padding-top:.75rem}.embarkai-ui-scope .pt-4{padding-top:1rem}.embarkai-ui-scope .pt-5{padding-top:1.25rem}.embarkai-ui-scope .text-left{text-align:left}.embarkai-ui-scope .text-center{text-align:center}.embarkai-ui-scope .text-right{text-align:right}.embarkai-ui-scope .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.embarkai-ui-scope .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.embarkai-ui-scope .text-2xl{font-size:1.5rem;line-height:2rem}.embarkai-ui-scope .text-\\[10px\\]{font-size:10px}.embarkai-ui-scope .text-\\[14px\\]{font-size:14px}.embarkai-ui-scope .text-\\[16px\\]{font-size:16px}.embarkai-ui-scope .text-\\[8px\\]{font-size:8px}.embarkai-ui-scope .text-lg{font-size:1.125rem;line-height:1.75rem}.embarkai-ui-scope .text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .text-xl{font-size:1.25rem;line-height:1.75rem}.embarkai-ui-scope .text-xs{font-size:.75rem;line-height:1rem}.embarkai-ui-scope .font-bold{font-weight:700}.embarkai-ui-scope .font-medium{font-weight:500}.embarkai-ui-scope .font-normal{font-weight:400}.embarkai-ui-scope .font-semibold{font-weight:600}.embarkai-ui-scope .uppercase{text-transform:uppercase}.embarkai-ui-scope .lowercase{text-transform:lowercase}.embarkai-ui-scope .leading-3{line-height:.75rem}.embarkai-ui-scope .leading-4{line-height:1rem}.embarkai-ui-scope .leading-5{line-height:1.25rem}.embarkai-ui-scope .leading-6{line-height:1.5rem}.embarkai-ui-scope .leading-7{line-height:1.75rem}.embarkai-ui-scope .leading-8{line-height:2rem}.embarkai-ui-scope .leading-\\[8px\\]{line-height:8px}.embarkai-ui-scope .leading-none{line-height:1}.embarkai-ui-scope .leading-tight{line-height:1.25}.embarkai-ui-scope .tracking-\\[0\\.3em\\]{letter-spacing:.3em}.embarkai-ui-scope .tracking-tight{letter-spacing:-.025em}.embarkai-ui-scope .text-\\[\\#c3f53c\\]{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-error\\)\\]{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-success\\)\\]{color:var(--ui-kit-bg-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-warning\\)\\]{color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-error\\)\\]{color:var(--ui-kit-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg\\)\\]{color:var(--ui-kit-fg)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-inverted\\)\\]{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-muted\\)\\]{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-info\\)\\]{color:var(--ui-kit-info)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-primary\\)\\]{color:var(--ui-kit-primary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-success\\)\\]{color:var(--ui-kit-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-text-secondary\\)\\]{color:var(--ui-kit-text-secondary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-warning\\)\\]{color:var(--ui-kit-warning)}.embarkai-ui-scope .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.embarkai-ui-scope .underline{text-decoration-line:underline}.embarkai-ui-scope .underline-offset-2{text-underline-offset:2px}.embarkai-ui-scope .underline-offset-4{text-underline-offset:4px}.embarkai-ui-scope .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope .opacity-0{opacity:0}.embarkai-ui-scope .opacity-100{opacity:1}.embarkai-ui-scope .opacity-50{opacity:.5}.embarkai-ui-scope .opacity-60{opacity:.6}.embarkai-ui-scope .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.embarkai-ui-scope .shadow,.embarkai-ui-scope .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.embarkai-ui-scope .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.embarkai-ui-scope .outline-none{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .outline{outline-style:solid}.embarkai-ui-scope .blur{--tw-blur:blur(8px)}.embarkai-ui-scope .blur,.embarkai-ui-scope .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .grayscale{--tw-grayscale:grayscale(100%)}.embarkai-ui-scope .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-\\[color\\2c box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-none{transition-property:none}.embarkai-ui-scope .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .duration-200{transition-duration:.2s}.embarkai-ui-scope .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.embarkai-ui-scope{--ui-kit-ff:var(--embark-ui-ff,-apple-system,BlinkMacSystemFont,"Inter",system-ui,sans-serif);--ui-kit-maw:var(--embark-ui-maw,384px);--ui-kit-pd:var(--embark-ui-pd,12px);--ui-kit-gap:var(--embark-ui-gap,10px);--ui-kit-bdrs:var(--embark-ui-bdrs,20px);--ui-kit-el-bdrs:var(--embark-ui-element-bdrs,10px);--ui-kit-backdrop-blur:var(--embark-ui-backdrop-blur,10px)}.embarkai-ui-scope[data-current-theme-mode=light]{--ui-kit-overlay:var(--embark-ui-overlay,hsla(0,0%,100%,.8));--ui-kit-bg:var(--embark-ui-bg,#fff);--ui-kit-fg:var(--embark-ui-fg,#000);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#fff);--ui-kit-fg-muted:var(--embark-ui-fg-muted,rgba(0,0,0,.6));--ui-kit-primary:var(--embark-ui-primary,#000);--ui-kit-primary-h:var(--embark-ui-primary-h,rgba(0,0,0,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,rgba(0,0,0,.6));--ui-kit-secondary:var(--embark-ui-secondary,#e4e4e4);--ui-kit-secondary-h:var(--embark-ui-secondary-h,hsla(0,0%,89%,.8));--ui-kit-secondary-a:var(--embark-ui-secondary-a,hsla(0,0%,89%,.6));--ui-kit-bd:var(--embark-ui-bd,#ebebeb);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#a9a9a9);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope[data-current-theme-mode=dark]{--ui-kit-overlay:var(--embark-ui-overlay,rgba(0,0,0,.8));--ui-kit-bg:var(--embark-ui-bg,#1a1a1a);--ui-kit-fg:var(--embark-ui-fg,#fff);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#000);--ui-kit-fg-muted:var(--embark-ui-fg-muted,hsla(0,0%,100%,.6));--ui-kit-primary:var(--embark-ui-primary,#fff);--ui-kit-primary-h:var(--embark-ui-primary-h,hsla(0,0%,100%,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,hsla(0,0%,100%,.6));--ui-kit-secondary:var(--embark-ui-secondary,#2a2a2a);--ui-kit-secondary-h:var(--embark-ui-secondary-h,rgba(42,42,42,.6));--ui-kit-secondary-a:var(--embark-ui-secondary-a,rgba(42,42,42,.4));--ui-kit-bd:var(--embark-ui-bd,#3a3a3a);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#4a4a4a);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope,.embarkai-ui-scope *{margin:0;box-sizing:border-box;font-family:var(--ui-kit-ff);font-optical-sizing:auto;-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:transparent;-ms-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope button,.embarkai-ui-scope h1,.embarkai-ui-scope h2,.embarkai-ui-scope h3,.embarkai-ui-scope h4,.embarkai-ui-scope h5,.embarkai-ui-scope h6,.embarkai-ui-scope input,.embarkai-ui-scope p,.embarkai-ui-scope select,.embarkai-ui-scope textarea{font-family:var(--ui-kit-ff)!important;margin:0}.embarkai-ui-scope button,.embarkai-ui-scope input,.embarkai-ui-scope select,.embarkai-ui-scope textarea{border-style:solid;outline:none!important;appearance:none!important;-webkit-appearance:none;-moz-appearance:none}.embarkai-ui-scope input,.embarkai-ui-scope textarea{font-size:16px!important}.embarkai-ui-scope .account-connect-button{box-shadow:0 4px 20px var(--ui-kit-shadow-c),inset 0 0 0 1px var(--ui-kit-bd);transition:transform .25s ease}.embarkai-ui-scope .account-connect-button:hover{transform:scale(1.02)}.embarkai-ui-scope .account-connect-button:active{transform:scale(1)}@keyframes lumia-mobile-dialog-fade-in{0%{opacity:0;transform:translateY(64px)}to{opacity:1;transform:translateY(0)}}@keyframes lumia-mobile-dialog-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(64px)}}.embarkai-ui-scope .animate-mobile-dialog-in{animation:lumia-mobile-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-mobile-dialog-out{animation:lumia-mobile-dialog-fade-out 375ms ease}@keyframes lumia-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes lumia-dialog-fade-out{0%{opacity:1}to{opacity:0}}.embarkai-ui-scope .animate-dialog-in{animation:lumia-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-dialog-out{animation:lumia-dialog-fade-out 375ms ease}.embarkai-ui-scope .list-scrollbar-y{width:100%;padding-right:var(--ui-kit-list-scrollbar-pd-r,0);overflow-y:auto;overflow-x:hidden;max-height:var(--ui-kit-scrollbar-mah,300px)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar{width:4px;height:4px}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-thumb{cursor:pointer;width:4px;border-radius:2px;background-color:var(--ui-kit-bd)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-track{margin-top:10px;margin-bottom:10px;background-color:transparent}.embarkai-ui-scope .noScrollbars::-webkit-scrollbar{display:none}.embarkai-ui-scope div[data-radix-popper-content-wrapper]{z-index:10000!important}@keyframes rotateShine{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.embarkai-ui-scope .button-shine-outline{position:absolute;top:0;left:0;width:100%;height:100%;padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude}.embarkai-ui-scope .button-shine-outline-shiner{position:absolute;top:50%;left:50%;width:500px;height:500px;transform:translate(-50%,-50%);background:conic-gradient(from 0deg,transparent 0,var(--ui-kit-fg) 8%,transparent 24%);animation:rotateShine 3s linear infinite}.embarkai-ui-scope .file\\:mr-\\[var\\(--ui-kit-gap\\)\\]::file-selector-button{margin-right:var(--ui-kit-gap)}.embarkai-ui-scope .file\\:h-12::file-selector-button{height:3rem}.embarkai-ui-scope .file\\:cursor-pointer::file-selector-button{cursor:pointer}.embarkai-ui-scope .file\\:rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]::file-selector-button{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .file\\:border-0::file-selector-button{border-width:0}.embarkai-ui-scope .file\\:bg-\\[var\\(--ui-kit-primary\\)\\]::file-selector-button{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .file\\:bg-transparent::file-selector-button{background-color:transparent}.embarkai-ui-scope .file\\:px-\\[var\\(--ui-kit-pd\\)\\]::file-selector-button{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .file\\:text-\\[16px\\]::file-selector-button{font-size:16px}.embarkai-ui-scope .file\\:text-base::file-selector-button{font-size:1rem;line-height:1.5rem}.embarkai-ui-scope .file\\:font-medium::file-selector-button{font-weight:500}.embarkai-ui-scope .file\\:text-\\[var\\(--ui-kit-fg-inverted\\)\\]::file-selector-button{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::-moz-placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .focus-within\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus-within{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .hover\\:bg-\\[\\#002c15\\]:hover{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#081f2c\\]:hover{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f0f6f8\\]:hover{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f3ba2f\\]:hover{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary-h\\)\\]:hover{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[\\#c3f53c\\]:hover{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[var\\(--ui-kit-fg\\)\\]:hover{color:var(--ui-kit-fg)}.embarkai-ui-scope .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:underline:hover{text-decoration-line:underline}.embarkai-ui-scope .hover\\:opacity-80:hover{opacity:.8}.embarkai-ui-scope .hover\\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .file\\:hover\\:opacity-90:hover::file-selector-button{opacity:.9}.embarkai-ui-scope .focus\\:border-\\[var\\(--ui-kit-primary\\)\\]:focus{border-color:var(--ui-kit-primary)}.embarkai-ui-scope .focus\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus\\:bg-transparent:focus{background-color:transparent}.embarkai-ui-scope .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-\\[2px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-transparent:focus-visible{--tw-ring-color:transparent}.embarkai-ui-scope .focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.embarkai-ui-scope .active\\:bg-\\[\\#f3ba2f\\]:active{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:active{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .active\\:text-\\[\\#c3f53c\\]:active{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .active\\:opacity-60:active{opacity:.6}.embarkai-ui-scope .file\\:active\\:opacity-80:active::file-selector-button{opacity:.8}.embarkai-ui-scope .disabled\\:cursor-default:disabled{cursor:default}.embarkai-ui-scope .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.embarkai-ui-scope .disabled\\:opacity-50:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover:disabled{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .disabled\\:hover\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:hover:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:hover\\:opacity-50:hover:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:active\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:active:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:active\\:opacity-50:active:disabled{opacity:.5}.embarkai-ui-scope :is(.group:hover .group-hover\\:opacity-100){opacity:1}.embarkai-ui-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.embarkai-ui-scope .data-\\[size\\=default\\]\\:h-12[data-size=default]{height:3rem}.embarkai-ui-scope .data-\\[size\\=sm\\]\\:h-10[data-size=sm]{height:2.5rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:border-\\[var\\(--ui-kit-bd-intense\\)\\][data-state=checked]{border-color:var(--ui-kit-bd-intense)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:bg-\\[var\\(--ui-kit-secondary\\)\\][data-state=checked]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:text-\\[var\\(--ui-kit-fg\\)\\][data-state=checked]{color:var(--ui-kit-fg)}.embarkai-ui-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*){overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*){display:flex}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*){align-items:center}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-\\[var\\(--ui-kit-gap\\)\\][data-slot=select-value]>*){gap:var(--ui-kit-gap)}@media (min-width:640px){.embarkai-ui-scope .sm\\:flex-row{flex-direction:row}.embarkai-ui-scope .sm\\:justify-end{justify-content:flex-end}.embarkai-ui-scope :is(.sm\\:space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope .sm\\:text-left{text-align:left}}@media (min-width:768px){.embarkai-ui-scope .md\\:h-8{height:2rem}.embarkai-ui-scope .md\\:w-8{width:2rem}.embarkai-ui-scope .md\\:gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope .md\\:py-1{padding-top:.25rem;padding-bottom:.25rem}}.embarkai-ui-scope :is(.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-])){width:1rem;height:1rem}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:pointer-events-none svg){pointer-events:none}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:shrink-0 svg){flex-shrink:0}`;
|
|
28355
28488
|
|
|
28356
28489
|
// src/index.ts
|
|
28357
28490
|
init_ProviderContext();
|
|
@@ -28362,16 +28495,15 @@ init_lumia2();
|
|
|
28362
28495
|
init_embarkAI2();
|
|
28363
28496
|
init_SessionContext();
|
|
28364
28497
|
init_auth();
|
|
28365
|
-
init_profile();
|
|
28366
28498
|
init_BalanceView2();
|
|
28367
28499
|
init_KYC();
|
|
28368
28500
|
init_button();
|
|
28369
28501
|
init_useLayoutDataStore();
|
|
28502
|
+
init_useUserProfile();
|
|
28370
28503
|
init_useLayoutStore();
|
|
28371
28504
|
init_pro_mode();
|
|
28372
28505
|
init_utils2();
|
|
28373
|
-
import {
|
|
28374
|
-
import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader32, Shield as Shield3 } from "lucide-react";
|
|
28506
|
+
import { Cloud as Cloud4, Laptop as Laptop2, Loader as Loader31, Shield as Shield3 } from "lucide-react";
|
|
28375
28507
|
import { useEffect as useEffect54, useMemo as useMemo18 } from "react";
|
|
28376
28508
|
import { Fragment as Fragment48, jsx as jsx125, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
28377
28509
|
function getFormattedStatus(label, status, showStatus) {
|
|
@@ -28393,12 +28525,7 @@ function ConnectWalletButton(props) {
|
|
|
28393
28525
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
|
|
28394
28526
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
28395
28527
|
useEffect54(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
28396
|
-
const { data: profile, isLoading: isProfileLoading } =
|
|
28397
|
-
retry: false,
|
|
28398
|
-
enabled: !!address,
|
|
28399
|
-
queryKey: [QUERY_KEYS.userProfile, address],
|
|
28400
|
-
queryFn: getUserProfile
|
|
28401
|
-
});
|
|
28528
|
+
const { data: profile, isLoading: isProfileLoading } = useUserProfile();
|
|
28402
28529
|
const displayName = profile?.nicknameDisplay || profile?.displayName || jwtTokenManager2.getDisplayName();
|
|
28403
28530
|
const indicators = useMemo18(() => {
|
|
28404
28531
|
const userId = session?.mpcUserId;
|
|
@@ -28418,7 +28545,7 @@ function ConnectWalletButton(props) {
|
|
|
28418
28545
|
disabled: isConnecting,
|
|
28419
28546
|
onClick: () => setPage("auth" /* AUTH */),
|
|
28420
28547
|
children: [
|
|
28421
|
-
isConnecting ? /* @__PURE__ */ jsx125("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx125(
|
|
28548
|
+
isConnecting ? /* @__PURE__ */ jsx125("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx125(Loader31, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ jsx125(embarkAI_default2, { className: "w-6 h-6" }),
|
|
28422
28549
|
connectButtonLabel
|
|
28423
28550
|
]
|
|
28424
28551
|
}
|
|
@@ -28439,7 +28566,7 @@ function ConnectWalletButton(props) {
|
|
|
28439
28566
|
"disabled:hover:bg-[var(--ui-kit-bg)] disabled:active:bg-[var(--ui-kit-bg)]"
|
|
28440
28567
|
),
|
|
28441
28568
|
children: [
|
|
28442
|
-
isConnecting ? /* @__PURE__ */ jsx125("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx125(
|
|
28569
|
+
isConnecting ? /* @__PURE__ */ jsx125("span", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsx125(Loader31, { className: "w-4 h-4 animate-spin" }) }) : /* @__PURE__ */ jsx125(embarkAI_default2, { className: "w-6 h-6" }),
|
|
28443
28570
|
connectButtonLabel.toUpperCase()
|
|
28444
28571
|
]
|
|
28445
28572
|
}
|
|
@@ -28463,8 +28590,8 @@ function ConnectWalletButton(props) {
|
|
|
28463
28590
|
] }),
|
|
28464
28591
|
/* @__PURE__ */ jsxs111("div", { className: "text-left flex-1 min-w-0 text-[var(--ui-kit-fg)]", children: [
|
|
28465
28592
|
/* @__PURE__ */ jsxs111("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
28466
|
-
isProfileLoading ? /* @__PURE__ */ jsx125(
|
|
28467
|
-
|
|
28593
|
+
isProfileLoading ? /* @__PURE__ */ jsx125(Loader31, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx125("span", { className: "w-fit text-[14px] leading-4 truncate max-w-[144px] text-[var(--ui-kit-fg)]", children: displayName }),
|
|
28594
|
+
/* @__PURE__ */ jsx125(KYCStatus, {})
|
|
28468
28595
|
] }),
|
|
28469
28596
|
/* @__PURE__ */ jsx125(BalanceView, {})
|
|
28470
28597
|
] }),
|
|
@@ -29043,12 +29170,12 @@ var Hash = ({
|
|
|
29043
29170
|
|
|
29044
29171
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29045
29172
|
init_base2();
|
|
29046
|
-
import { useEffect as useEffect56, useState as
|
|
29173
|
+
import { useEffect as useEffect56, useState as useState32 } from "react";
|
|
29047
29174
|
import { jsx as jsx131, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
29048
29175
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29049
|
-
const [transactions, setTransactions] =
|
|
29050
|
-
const [loading, setLoading] =
|
|
29051
|
-
const [error, setError] =
|
|
29176
|
+
const [transactions, setTransactions] = useState32([]);
|
|
29177
|
+
const [loading, setLoading] = useState32(true);
|
|
29178
|
+
const [error, setError] = useState32(null);
|
|
29052
29179
|
useEffect56(() => {
|
|
29053
29180
|
const fetchTransactions2 = async () => {
|
|
29054
29181
|
try {
|
|
@@ -29399,7 +29526,7 @@ function useDirectWallet() {
|
|
|
29399
29526
|
|
|
29400
29527
|
// src/hooks/useSendDirectTransaction.ts
|
|
29401
29528
|
init_useExternalWalletStore();
|
|
29402
|
-
import { useCallback as useCallback40, useState as
|
|
29529
|
+
import { useCallback as useCallback40, useState as useState34 } from "react";
|
|
29403
29530
|
import { isAddress as isAddress3, parseEther as parseEther3 } from "viem";
|
|
29404
29531
|
import { useSendTransaction as useWagmiSendTransaction, useSwitchChain as useSwitchChain3 } from "wagmi";
|
|
29405
29532
|
function useSendDirectTransaction() {
|
|
@@ -29407,9 +29534,9 @@ function useSendDirectTransaction() {
|
|
|
29407
29534
|
const externalChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
29408
29535
|
const { sendTransactionAsync } = useWagmiSendTransaction();
|
|
29409
29536
|
const { switchChainAsync } = useSwitchChain3();
|
|
29410
|
-
const [isPending, setIsPending] =
|
|
29411
|
-
const [error, setError] =
|
|
29412
|
-
const [txHash, setTxHash] =
|
|
29537
|
+
const [isPending, setIsPending] = useState34(false);
|
|
29538
|
+
const [error, setError] = useState34(null);
|
|
29539
|
+
const [txHash, setTxHash] = useState34(null);
|
|
29413
29540
|
const sendTransaction = useCallback40(
|
|
29414
29541
|
async (params) => {
|
|
29415
29542
|
if (!isConnected) {
|
|
@@ -29456,7 +29583,7 @@ function useSendDirectTransaction() {
|
|
|
29456
29583
|
init_SessionContext();
|
|
29457
29584
|
init_account2();
|
|
29458
29585
|
init_linkedProfiles();
|
|
29459
|
-
import { useCallback as useCallback41, useMemo as useMemo19, useState as
|
|
29586
|
+
import { useCallback as useCallback41, useMemo as useMemo19, useState as useState35 } from "react";
|
|
29460
29587
|
import { encodeFunctionData as encodeFunctionData3, isAddress as isAddress4, parseEther as parseEther4, parseUnits as parseUnits3 } from "viem";
|
|
29461
29588
|
var ERC20_TRANSFER_ABI2 = [
|
|
29462
29589
|
{
|
|
@@ -29472,9 +29599,9 @@ var ERC20_TRANSFER_ABI2 = [
|
|
|
29472
29599
|
function useTransferToLinkedWallet() {
|
|
29473
29600
|
const session = useSession((st) => st.session);
|
|
29474
29601
|
const { profiles } = useLinkedProfiles();
|
|
29475
|
-
const [isPending, setIsPending] =
|
|
29476
|
-
const [error, setError] =
|
|
29477
|
-
const [userOpHash, setUserOpHash] =
|
|
29602
|
+
const [isPending, setIsPending] = useState35(false);
|
|
29603
|
+
const [error, setError] = useState35(null);
|
|
29604
|
+
const [userOpHash, setUserOpHash] = useState35(null);
|
|
29478
29605
|
const linkedWallets = useMemo19(
|
|
29479
29606
|
() => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
|
|
29480
29607
|
[profiles]
|
|
@@ -29622,7 +29749,7 @@ init_linkedProfiles();
|
|
|
29622
29749
|
init_nickname_fingerprint();
|
|
29623
29750
|
init_errors();
|
|
29624
29751
|
init_base2();
|
|
29625
|
-
|
|
29752
|
+
init_useBlockscoutAssets2();
|
|
29626
29753
|
|
|
29627
29754
|
// src/modules/transactions.ts
|
|
29628
29755
|
init_SessionContext();
|
|
@@ -29693,7 +29820,7 @@ function useTransactions() {
|
|
|
29693
29820
|
// src/modules/assets.ts
|
|
29694
29821
|
init_SessionContext();
|
|
29695
29822
|
import React33 from "react";
|
|
29696
|
-
import { erc20Abi as
|
|
29823
|
+
import { erc20Abi as erc20Abi5, formatUnits as formatUnits13 } from "viem";
|
|
29697
29824
|
import { useBalance as useBalance2, useReadContract as useReadContract2, useReadContracts } from "wagmi";
|
|
29698
29825
|
var COMMON_TOKENS = [
|
|
29699
29826
|
// Add real token addresses here when available
|
|
@@ -29720,22 +29847,21 @@ function useAssets(address) {
|
|
|
29720
29847
|
});
|
|
29721
29848
|
const tokenContracts = COMMON_TOKENS.map((token) => ({
|
|
29722
29849
|
address: token.address,
|
|
29723
|
-
abi:
|
|
29850
|
+
abi: erc20Abi5,
|
|
29724
29851
|
functionName: "balanceOf",
|
|
29725
29852
|
args: [address],
|
|
29726
29853
|
chainId
|
|
29727
29854
|
}));
|
|
29728
|
-
const
|
|
29855
|
+
const {
|
|
29856
|
+
data: tokenBalances,
|
|
29857
|
+
isLoading: tokenBalancesLoading,
|
|
29858
|
+
refetch: refetchTokenBalances
|
|
29859
|
+
} = useReadContracts({
|
|
29729
29860
|
contracts: tokenContracts,
|
|
29730
29861
|
query: {
|
|
29731
29862
|
enabled: !!address && COMMON_TOKENS.length > 0
|
|
29732
29863
|
}
|
|
29733
29864
|
});
|
|
29734
|
-
const {
|
|
29735
|
-
data: tokenBalances,
|
|
29736
|
-
isLoading: tokenBalancesLoading,
|
|
29737
|
-
refetch: refetchTokenBalances
|
|
29738
|
-
} = readContractsResult;
|
|
29739
29865
|
const getAllAssets = () => {
|
|
29740
29866
|
const assets = [];
|
|
29741
29867
|
if (nativeBalance) {
|
|
@@ -29744,7 +29870,7 @@ function useAssets(address) {
|
|
|
29744
29870
|
name: "Lumia",
|
|
29745
29871
|
symbol: "LUMIA",
|
|
29746
29872
|
balance: nativeBalance.value.toString(),
|
|
29747
|
-
formattedBalance: parseFloat(
|
|
29873
|
+
formattedBalance: parseFloat(formatUnits13(nativeBalance.value, nativeBalance.decimals)).toFixed(4),
|
|
29748
29874
|
decimals: 18
|
|
29749
29875
|
});
|
|
29750
29876
|
}
|
|
@@ -29753,7 +29879,7 @@ function useAssets(address) {
|
|
|
29753
29879
|
const token = COMMON_TOKENS[index];
|
|
29754
29880
|
if (balance.status === "success" && balance.result) {
|
|
29755
29881
|
const balanceValue = balance.result;
|
|
29756
|
-
const formattedBalance =
|
|
29882
|
+
const formattedBalance = formatUnits13(balanceValue, token.decimals);
|
|
29757
29883
|
assets.push({
|
|
29758
29884
|
type: "erc20",
|
|
29759
29885
|
address: token.address,
|
|
@@ -29778,7 +29904,7 @@ function useAssets(address) {
|
|
|
29778
29904
|
const token = COMMON_TOKENS[tokenIndex];
|
|
29779
29905
|
if (balance.status === "success" && balance.result) {
|
|
29780
29906
|
const balanceValue = balance.result;
|
|
29781
|
-
const formattedBalance =
|
|
29907
|
+
const formattedBalance = formatUnits13(balanceValue, token.decimals);
|
|
29782
29908
|
return {
|
|
29783
29909
|
address: token.address,
|
|
29784
29910
|
name: token.name,
|
|
@@ -29808,9 +29934,9 @@ function useTokenInfo(tokenAddress) {
|
|
|
29808
29934
|
const chainId = requireActiveChainId();
|
|
29809
29935
|
const readContractsResult = useReadContracts({
|
|
29810
29936
|
contracts: [
|
|
29811
|
-
{ address: tokenAddress, abi:
|
|
29812
|
-
{ address: tokenAddress, abi:
|
|
29813
|
-
{ address: tokenAddress, abi:
|
|
29937
|
+
{ address: tokenAddress, abi: erc20Abi5, functionName: "name", chainId },
|
|
29938
|
+
{ address: tokenAddress, abi: erc20Abi5, functionName: "symbol", chainId },
|
|
29939
|
+
{ address: tokenAddress, abi: erc20Abi5, functionName: "decimals", chainId }
|
|
29814
29940
|
]
|
|
29815
29941
|
});
|
|
29816
29942
|
const { data: tokenData, isLoading } = readContractsResult;
|
|
@@ -29839,7 +29965,7 @@ function useTokenBalance2(tokenAddress, userAddress) {
|
|
|
29839
29965
|
refetch
|
|
29840
29966
|
} = useReadContract2({
|
|
29841
29967
|
address: tokenAddress,
|
|
29842
|
-
abi:
|
|
29968
|
+
abi: erc20Abi5,
|
|
29843
29969
|
functionName: "balanceOf",
|
|
29844
29970
|
args: userAddress ? [userAddress] : void 0,
|
|
29845
29971
|
chainId,
|
|
@@ -29850,7 +29976,7 @@ function useTokenBalance2(tokenAddress, userAddress) {
|
|
|
29850
29976
|
const { tokenInfo } = useTokenInfo(tokenAddress);
|
|
29851
29977
|
const formattedBalance = React33.useMemo(() => {
|
|
29852
29978
|
if (!balance || !tokenInfo) return "0";
|
|
29853
|
-
return
|
|
29979
|
+
return formatUnits13(balance, tokenInfo.decimals);
|
|
29854
29980
|
}, [balance, tokenInfo]);
|
|
29855
29981
|
return {
|
|
29856
29982
|
balance,
|
|
@@ -29954,6 +30080,7 @@ export {
|
|
|
29954
30080
|
PASSPORT_TRANSLATIONS,
|
|
29955
30081
|
PageKey,
|
|
29956
30082
|
Provider,
|
|
30083
|
+
SessionExpiredError,
|
|
29957
30084
|
TOKENS_ICONS,
|
|
29958
30085
|
ThemeToggle,
|
|
29959
30086
|
TransactionsList,
|
|
@@ -29980,6 +30107,7 @@ export {
|
|
|
29980
30107
|
getUserOperationReceipt,
|
|
29981
30108
|
getUserProfile,
|
|
29982
30109
|
getValidTokens,
|
|
30110
|
+
isSessionExpiredError,
|
|
29983
30111
|
jwtTokenManager2 as jwtTokenManager,
|
|
29984
30112
|
logout,
|
|
29985
30113
|
looksLikeNickname,
|