@sudobility/components-rn 1.0.23 → 1.0.25
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/README.md +54 -223
- package/dist/index.cjs.js +458 -2698
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +458 -2698
- package/dist/index.esm.js.map +1 -1
- package/package.json +7 -9
package/dist/index.cjs.js
CHANGED
|
@@ -953,2679 +953,439 @@ function requireJsxRuntime() {
|
|
|
953
953
|
return jsxRuntime.exports;
|
|
954
954
|
}
|
|
955
955
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
956
|
-
var
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
956
|
+
var AuthStatus;
|
|
957
|
+
(function(AuthStatus2) {
|
|
958
|
+
AuthStatus2["CONNECTED"] = "connected";
|
|
959
|
+
AuthStatus2["DISCONNECTED"] = "disconnected";
|
|
960
|
+
AuthStatus2["VERIFIED"] = "verified";
|
|
961
|
+
})(AuthStatus || (AuthStatus = {}));
|
|
962
|
+
var ChainType;
|
|
963
|
+
(function(ChainType2) {
|
|
964
|
+
ChainType2["EVM"] = "evm";
|
|
965
|
+
ChainType2["SOLANA"] = "solana";
|
|
966
|
+
})(ChainType || (ChainType = {}));
|
|
967
|
+
var Chain;
|
|
968
|
+
(function(Chain2) {
|
|
969
|
+
Chain2["ETH_MAINNET"] = "eth-mainnet";
|
|
970
|
+
Chain2["ETH_SEPOLIA"] = "eth-sepolia";
|
|
971
|
+
Chain2["ETH_GOERLI"] = "eth-goerli";
|
|
972
|
+
Chain2["POLYGON_MAINNET"] = "polygon-mainnet";
|
|
973
|
+
Chain2["POLYGON_MUMBAI"] = "polygon-mumbai";
|
|
974
|
+
Chain2["POLYGON_AMOY"] = "polygon-amoy";
|
|
975
|
+
Chain2["OPTIMISM_MAINNET"] = "optimism-mainnet";
|
|
976
|
+
Chain2["OPTIMISM_SEPOLIA"] = "optimism-sepolia";
|
|
977
|
+
Chain2["OPTIMISM_GOERLI"] = "optimism-goerli";
|
|
978
|
+
Chain2["ARBITRUM_MAINNET"] = "arbitrum-mainnet";
|
|
979
|
+
Chain2["ARBITRUM_SEPOLIA"] = "arbitrum-sepolia";
|
|
980
|
+
Chain2["ARBITRUM_GOERLI"] = "arbitrum-goerli";
|
|
981
|
+
Chain2["BASE_MAINNET"] = "base-mainnet";
|
|
982
|
+
Chain2["BASE_SEPOLIA"] = "base-sepolia";
|
|
983
|
+
Chain2["BASE_GOERLI"] = "base-goerli";
|
|
984
|
+
Chain2["AVALANCHE_MAINNET"] = "avalanche-mainnet";
|
|
985
|
+
Chain2["AVALANCHE_FUJI"] = "avalanche-fuji";
|
|
986
|
+
Chain2["BNB_MAINNET"] = "bnb-mainnet";
|
|
987
|
+
Chain2["BNB_TESTNET"] = "bnb-testnet";
|
|
988
|
+
Chain2["GNOSIS_MAINNET"] = "gnosis-mainnet";
|
|
989
|
+
Chain2["GNOSIS_CHIADO"] = "gnosis-chiado";
|
|
990
|
+
Chain2["CELO_MAINNET"] = "celo-mainnet";
|
|
991
|
+
Chain2["CELO_ALFAJORES"] = "celo-alfajores";
|
|
992
|
+
Chain2["ZKSYNC_MAINNET"] = "zksync-mainnet";
|
|
993
|
+
Chain2["ZKSYNC_SEPOLIA"] = "zksync-sepolia";
|
|
994
|
+
Chain2["LINEA_MAINNET"] = "linea-mainnet";
|
|
995
|
+
Chain2["LINEA_SEPOLIA"] = "linea-sepolia";
|
|
996
|
+
Chain2["SCROLL_MAINNET"] = "scroll-mainnet";
|
|
997
|
+
Chain2["SCROLL_SEPOLIA"] = "scroll-sepolia";
|
|
998
|
+
Chain2["MONAD_MAINNET"] = "monad-mainnet";
|
|
999
|
+
Chain2["MONAD_TESTNET"] = "monad-testnet";
|
|
1000
|
+
Chain2["STORY_MAINNET"] = "story-mainnet";
|
|
1001
|
+
Chain2["STORY_TESTNET"] = "story-testnet";
|
|
1002
|
+
Chain2["PLUME_MAINNET"] = "plume-mainnet";
|
|
1003
|
+
Chain2["PLUME_TESTNET"] = "plume-testnet";
|
|
1004
|
+
Chain2["NEXUS_MAINNET"] = "nexus-mainnet";
|
|
1005
|
+
Chain2["NEXUS_TESTNET"] = "nexus-testnet";
|
|
1006
|
+
Chain2["HYPEREVM_MAINNET"] = "hyperevm-mainnet";
|
|
1007
|
+
Chain2["HYPEREVM_TESTNET"] = "hyperevm-testnet";
|
|
1008
|
+
Chain2["SONIC_MAINNET"] = "sonic-mainnet";
|
|
1009
|
+
Chain2["SONIC_TESTNET"] = "sonic-testnet";
|
|
1010
|
+
Chain2["SONIC_BLAZE"] = "sonic-blaze";
|
|
1011
|
+
Chain2["UNICHAIN_MAINNET"] = "unichain-mainnet";
|
|
1012
|
+
Chain2["UNICHAIN_SEPOLIA"] = "unichain-sepolia";
|
|
1013
|
+
Chain2["WORLD_MAINNET"] = "world-mainnet";
|
|
1014
|
+
Chain2["XDC_MAINNET"] = "xdc-mainnet";
|
|
1015
|
+
Chain2["INK_TESTNET"] = "ink-testnet";
|
|
1016
|
+
Chain2["FETCH_MAINNET"] = "fetch-mainnet";
|
|
1017
|
+
Chain2["FETCH_TESTNET"] = "fetch-testnet";
|
|
1018
|
+
Chain2["GENSYN_MAINNET"] = "gensyn-mainnet";
|
|
1019
|
+
Chain2["GENSYN_TESTNET"] = "gensyn-testnet";
|
|
1020
|
+
Chain2["RITUAL_MAINNET"] = "ritual-mainnet";
|
|
1021
|
+
Chain2["RITUAL_TESTNET"] = "ritual-testnet";
|
|
1022
|
+
Chain2["SOLANA_MAINNET"] = "solana-mainnet";
|
|
1023
|
+
Chain2["SOLANA_DEVNET"] = "solana-devnet";
|
|
1024
|
+
Chain2["SOLANA_TESTNET"] = "solana-testnet";
|
|
1025
|
+
Chain2["EVM_LOCAL"] = "evm-local";
|
|
1026
|
+
Chain2["SOLANA_LOCAL"] = "solana-local";
|
|
1027
|
+
})(Chain || (Chain = {}));
|
|
1028
|
+
var Theme;
|
|
1029
|
+
(function(Theme2) {
|
|
1030
|
+
Theme2["LIGHT"] = "light";
|
|
1031
|
+
Theme2["DARK"] = "dark";
|
|
1032
|
+
Theme2["SYSTEM"] = "system";
|
|
1033
|
+
})(Theme || (Theme = {}));
|
|
1034
|
+
var FontSize;
|
|
1035
|
+
(function(FontSize2) {
|
|
1036
|
+
FontSize2["SMALL"] = "small";
|
|
1037
|
+
FontSize2["MEDIUM"] = "medium";
|
|
1038
|
+
FontSize2["LARGE"] = "large";
|
|
1039
|
+
})(FontSize || (FontSize = {}));
|
|
1040
|
+
var EmailComposeType;
|
|
1041
|
+
(function(EmailComposeType2) {
|
|
1042
|
+
EmailComposeType2["NEW"] = "new";
|
|
1043
|
+
EmailComposeType2["REPLY"] = "reply";
|
|
1044
|
+
EmailComposeType2["REPLY_ALL"] = "replyAll";
|
|
1045
|
+
EmailComposeType2["FORWARD"] = "forward";
|
|
1046
|
+
})(EmailComposeType || (EmailComposeType = {}));
|
|
1047
|
+
var MobileView;
|
|
1048
|
+
(function(MobileView2) {
|
|
1049
|
+
MobileView2["EMAIL_ADDRESSES"] = "emailAddresses";
|
|
1050
|
+
MobileView2["FOLDERS"] = "folders";
|
|
1051
|
+
MobileView2["EMAILS"] = "emails";
|
|
1052
|
+
MobileView2["EMAIL_BODY"] = "emailBody";
|
|
1053
|
+
})(MobileView || (MobileView = {}));
|
|
1054
|
+
var MediumView;
|
|
1055
|
+
(function(MediumView2) {
|
|
1056
|
+
MediumView2["LEFT"] = "left";
|
|
1057
|
+
MediumView2["RIGHT"] = "right";
|
|
1058
|
+
})(MediumView || (MediumView = {}));
|
|
1059
|
+
var EmailAction;
|
|
1060
|
+
(function(EmailAction2) {
|
|
1061
|
+
EmailAction2["OPEN"] = "open";
|
|
1062
|
+
EmailAction2["REPLY"] = "reply";
|
|
1063
|
+
EmailAction2["FORWARD"] = "forward";
|
|
1064
|
+
EmailAction2["DELETE"] = "delete";
|
|
1065
|
+
EmailAction2["STAR"] = "star";
|
|
1066
|
+
EmailAction2["UNSTAR"] = "unstar";
|
|
1067
|
+
EmailAction2["MARK_READ"] = "mark_read";
|
|
1068
|
+
EmailAction2["MARK_UNREAD"] = "mark_unread";
|
|
1069
|
+
})(EmailAction || (EmailAction = {}));
|
|
1070
|
+
var SubscriptionAction;
|
|
1071
|
+
(function(SubscriptionAction2) {
|
|
1072
|
+
SubscriptionAction2["VIEW"] = "view";
|
|
1073
|
+
SubscriptionAction2["PURCHASE"] = "purchase";
|
|
1074
|
+
SubscriptionAction2["CANCEL"] = "cancel";
|
|
1075
|
+
SubscriptionAction2["RESTORE"] = "restore";
|
|
1076
|
+
})(SubscriptionAction || (SubscriptionAction = {}));
|
|
1077
|
+
var RequestStatus;
|
|
1078
|
+
(function(RequestStatus2) {
|
|
1079
|
+
RequestStatus2["IDLE"] = "idle";
|
|
1080
|
+
RequestStatus2["LOADING"] = "loading";
|
|
1081
|
+
RequestStatus2["SUCCESS"] = "success";
|
|
1082
|
+
RequestStatus2["ERROR"] = "error";
|
|
1083
|
+
})(RequestStatus || (RequestStatus = {}));
|
|
1084
|
+
var NotificationType;
|
|
1085
|
+
(function(NotificationType2) {
|
|
1086
|
+
NotificationType2["INFO"] = "info";
|
|
1087
|
+
NotificationType2["SUCCESS"] = "success";
|
|
1088
|
+
NotificationType2["WARNING"] = "warning";
|
|
1089
|
+
NotificationType2["ERROR"] = "error";
|
|
1090
|
+
})(NotificationType || (NotificationType = {}));
|
|
1091
|
+
var InfoType;
|
|
1092
|
+
(function(InfoType2) {
|
|
1093
|
+
InfoType2["INFO"] = "info";
|
|
1094
|
+
InfoType2["SUCCESS"] = "success";
|
|
1095
|
+
InfoType2["WARNING"] = "warning";
|
|
1096
|
+
InfoType2["ERROR"] = "error";
|
|
1097
|
+
})(InfoType || (InfoType = {}));
|
|
1098
|
+
var EmailAddressType;
|
|
1099
|
+
(function(EmailAddressType2) {
|
|
1100
|
+
EmailAddressType2["DIRECT"] = "direct";
|
|
1101
|
+
EmailAddressType2["ENS"] = "ens";
|
|
1102
|
+
EmailAddressType2["SNS"] = "sns";
|
|
1103
|
+
EmailAddressType2["CUSTOM"] = "custom";
|
|
1104
|
+
})(EmailAddressType || (EmailAddressType = {}));
|
|
1105
|
+
var SortOrder;
|
|
1106
|
+
(function(SortOrder2) {
|
|
1107
|
+
SortOrder2["ASC"] = "asc";
|
|
1108
|
+
SortOrder2["DESC"] = "desc";
|
|
1109
|
+
})(SortOrder || (SortOrder = {}));
|
|
1110
|
+
var EmailSortCriteria;
|
|
1111
|
+
(function(EmailSortCriteria2) {
|
|
1112
|
+
EmailSortCriteria2["DATE"] = "date";
|
|
1113
|
+
EmailSortCriteria2["SUBJECT"] = "subject";
|
|
1114
|
+
EmailSortCriteria2["FROM"] = "from";
|
|
1115
|
+
EmailSortCriteria2["SIZE"] = "size";
|
|
1116
|
+
})(EmailSortCriteria || (EmailSortCriteria = {}));
|
|
1117
|
+
var ConnectionType;
|
|
1118
|
+
(function(ConnectionType2) {
|
|
1119
|
+
ConnectionType2["UNKNOWN"] = "unknown";
|
|
1120
|
+
ConnectionType2["NONE"] = "none";
|
|
1121
|
+
ConnectionType2["WIFI"] = "wifi";
|
|
1122
|
+
ConnectionType2["CELLULAR_2G"] = "2g";
|
|
1123
|
+
ConnectionType2["CELLULAR_3G"] = "3g";
|
|
1124
|
+
ConnectionType2["CELLULAR_4G"] = "4g";
|
|
1125
|
+
ConnectionType2["CELLULAR_5G"] = "5g";
|
|
1126
|
+
ConnectionType2["ETHERNET"] = "ethernet";
|
|
1127
|
+
})(ConnectionType || (ConnectionType = {}));
|
|
1128
|
+
var ConnectionState;
|
|
1129
|
+
(function(ConnectionState2) {
|
|
1130
|
+
ConnectionState2["UNKNOWN"] = "unknown";
|
|
1131
|
+
ConnectionState2["DISCONNECTED"] = "disconnected";
|
|
1132
|
+
ConnectionState2["CONNECTING"] = "connecting";
|
|
1133
|
+
ConnectionState2["CONNECTED"] = "connected";
|
|
1134
|
+
ConnectionState2["RECONNECTING"] = "reconnecting";
|
|
1135
|
+
ConnectionState2["VERIFIED"] = "verified";
|
|
1136
|
+
ConnectionState2["LIMITED"] = "limited";
|
|
1137
|
+
ConnectionState2["ERROR"] = "error";
|
|
1138
|
+
})(ConnectionState || (ConnectionState = {}));
|
|
1139
|
+
var PlatformType;
|
|
1140
|
+
(function(PlatformType2) {
|
|
1141
|
+
PlatformType2["WEB"] = "web";
|
|
1142
|
+
PlatformType2["REACT_NATIVE"] = "react_native";
|
|
1143
|
+
PlatformType2["DESKTOP"] = "desktop";
|
|
1144
|
+
})(PlatformType || (PlatformType = {}));
|
|
1145
|
+
var EmailValidationState;
|
|
1146
|
+
(function(EmailValidationState2) {
|
|
1147
|
+
EmailValidationState2["VALID"] = "valid";
|
|
1148
|
+
EmailValidationState2["INVALID"] = "invalid";
|
|
1149
|
+
EmailValidationState2["PENDING"] = "pending";
|
|
1150
|
+
EmailValidationState2["UNKNOWN"] = "unknown";
|
|
1151
|
+
})(EmailValidationState || (EmailValidationState = {}));
|
|
1152
|
+
var FeatureFlag;
|
|
1153
|
+
(function(FeatureFlag2) {
|
|
1154
|
+
FeatureFlag2["AI_SEARCH"] = "ai_search";
|
|
1155
|
+
FeatureFlag2["SMART_COMPOSE"] = "smart_compose";
|
|
1156
|
+
FeatureFlag2["ADVANCED_FILTERS"] = "advanced_filters";
|
|
1157
|
+
FeatureFlag2["DARK_MODE"] = "dark_mode";
|
|
1158
|
+
FeatureFlag2["NOTIFICATIONS"] = "notifications";
|
|
1159
|
+
FeatureFlag2["ANALYTICS"] = "analytics";
|
|
1160
|
+
})(FeatureFlag || (FeatureFlag = {}));
|
|
1161
|
+
var ErrorType;
|
|
1162
|
+
(function(ErrorType2) {
|
|
1163
|
+
ErrorType2["NETWORK"] = "network";
|
|
1164
|
+
ErrorType2["AUTH"] = "auth";
|
|
1165
|
+
ErrorType2["VALIDATION"] = "validation";
|
|
1166
|
+
ErrorType2["PERMISSION"] = "permission";
|
|
1167
|
+
ErrorType2["UNKNOWN"] = "unknown";
|
|
1168
|
+
})(ErrorType || (ErrorType = {}));
|
|
1169
|
+
var Currency;
|
|
1170
|
+
(function(Currency2) {
|
|
1171
|
+
Currency2["USD"] = "USD";
|
|
1172
|
+
Currency2["EUR"] = "EUR";
|
|
1173
|
+
Currency2["GBP"] = "GBP";
|
|
1174
|
+
Currency2["CAD"] = "CAD";
|
|
1175
|
+
Currency2["AUD"] = "AUD";
|
|
1176
|
+
})(Currency || (Currency = {}));
|
|
1177
|
+
var MessageType;
|
|
1178
|
+
(function(MessageType2) {
|
|
1179
|
+
MessageType2["STANDARD"] = "standard";
|
|
1180
|
+
MessageType2["PRIORITY"] = "priority";
|
|
1181
|
+
MessageType2["PREPARED_STANDARD"] = "prepared_standard";
|
|
1182
|
+
MessageType2["PREPARED_PRIORITY"] = "prepared_priority";
|
|
1183
|
+
})(MessageType || (MessageType = {}));
|
|
1184
|
+
var TransactionStatus;
|
|
1185
|
+
(function(TransactionStatus2) {
|
|
1186
|
+
TransactionStatus2["SUCCESS"] = "success";
|
|
1187
|
+
TransactionStatus2["FAILED"] = "failed";
|
|
1188
|
+
TransactionStatus2["PENDING"] = "pending";
|
|
1189
|
+
})(TransactionStatus || (TransactionStatus = {}));
|
|
1190
|
+
var AddressType;
|
|
1191
|
+
(function(AddressType2) {
|
|
1192
|
+
AddressType2["EVMAddress"] = "EVMAddress";
|
|
1193
|
+
AddressType2["SolanaAddress"] = "SolanaAddress";
|
|
1194
|
+
AddressType2["ENSName"] = "ENSName";
|
|
1195
|
+
AddressType2["SNSName"] = "SNSName";
|
|
1196
|
+
})(AddressType || (AddressType = {}));
|
|
1197
|
+
var StorageType;
|
|
1198
|
+
(function(StorageType2) {
|
|
1199
|
+
StorageType2["LOCAL_STORAGE"] = "localStorage";
|
|
1200
|
+
StorageType2["SESSION_STORAGE"] = "sessionStorage";
|
|
1201
|
+
StorageType2["ASYNC_STORAGE"] = "asyncStorage";
|
|
1202
|
+
StorageType2["MEMORY"] = "memory";
|
|
1203
|
+
})(StorageType || (StorageType = {}));
|
|
1204
|
+
var AnalyticsEvent;
|
|
1205
|
+
(function(AnalyticsEvent2) {
|
|
1206
|
+
AnalyticsEvent2["USER_LOGIN"] = "user_login";
|
|
1207
|
+
AnalyticsEvent2["USER_LOGOUT"] = "user_logout";
|
|
1208
|
+
AnalyticsEvent2["USER_SIGNUP"] = "user_signup";
|
|
1209
|
+
AnalyticsEvent2["EMAIL_SENT"] = "email_sent";
|
|
1210
|
+
AnalyticsEvent2["EMAIL_RECEIVED"] = "email_received";
|
|
1211
|
+
AnalyticsEvent2["EMAIL_OPENED"] = "email_opened";
|
|
1212
|
+
AnalyticsEvent2["EMAIL_REPLY"] = "email_reply";
|
|
1213
|
+
AnalyticsEvent2["EMAIL_FORWARD"] = "email_forward";
|
|
1214
|
+
AnalyticsEvent2["EMAIL_DELETE"] = "email_delete";
|
|
1215
|
+
AnalyticsEvent2["EMAIL_STAR"] = "email_star";
|
|
1216
|
+
AnalyticsEvent2["EMAIL_COMPOSE"] = "email_compose";
|
|
1217
|
+
AnalyticsEvent2["EMAIL_CLICKED"] = "email_clicked";
|
|
1218
|
+
AnalyticsEvent2["PAGE_VIEW"] = "page_view";
|
|
1219
|
+
AnalyticsEvent2["SCREEN_VIEW"] = "screen_view";
|
|
1220
|
+
AnalyticsEvent2["FOLDER_SWITCH"] = "folder_switch";
|
|
1221
|
+
AnalyticsEvent2["SUBSCRIPTION_VIEW"] = "subscription_view";
|
|
1222
|
+
AnalyticsEvent2["SUBSCRIPTION_PURCHASE"] = "subscription_purchase";
|
|
1223
|
+
AnalyticsEvent2["SUBSCRIPTION_CANCEL"] = "subscription_cancel";
|
|
1224
|
+
AnalyticsEvent2["SEARCH_PERFORMED"] = "search_performed";
|
|
1225
|
+
AnalyticsEvent2["SETTINGS_CHANGED"] = "settings_changed";
|
|
1226
|
+
AnalyticsEvent2["ERROR_OCCURRED"] = "error_occurred";
|
|
1227
|
+
AnalyticsEvent2["AB_TEST_VIEWED"] = "ab_test_viewed";
|
|
1228
|
+
AnalyticsEvent2["AB_TEST_CONVERTED"] = "ab_test_converted";
|
|
1229
|
+
AnalyticsEvent2["CUSTOM_EVENT"] = "custom_event";
|
|
1230
|
+
})(AnalyticsEvent || (AnalyticsEvent = {}));
|
|
1231
|
+
var ContractType;
|
|
1232
|
+
(function(ContractType2) {
|
|
1233
|
+
ContractType2["Mailer"] = "Mailer";
|
|
1234
|
+
ContractType2["MailService"] = "MailService";
|
|
1235
|
+
})(ContractType || (ContractType = {}));
|
|
1236
|
+
var ProcessedEventName;
|
|
1237
|
+
(function(ProcessedEventName2) {
|
|
1238
|
+
ProcessedEventName2["MailSent"] = "MailSent";
|
|
1239
|
+
ProcessedEventName2["PreparedMailSent"] = "PreparedMailSent";
|
|
1240
|
+
ProcessedEventName2["DelegationSet"] = "DelegationSet";
|
|
1241
|
+
ProcessedEventName2["DelegationCleared"] = "DelegationCleared";
|
|
1242
|
+
ProcessedEventName2["DomainRegistered"] = "DomainRegistered";
|
|
1243
|
+
ProcessedEventName2["DomainExtended"] = "DomainExtended";
|
|
1244
|
+
ProcessedEventName2["DomainReleased"] = "DomainReleased";
|
|
1245
|
+
ProcessedEventName2["FeeUpdated"] = "FeeUpdated";
|
|
1246
|
+
ProcessedEventName2["SharesRecorded"] = "SharesRecorded";
|
|
1247
|
+
ProcessedEventName2["RecipientClaimed"] = "RecipientClaimed";
|
|
1248
|
+
ProcessedEventName2["OwnerClaimed"] = "OwnerClaimed";
|
|
1249
|
+
ProcessedEventName2["ExpiredSharesClaimed"] = "ExpiredSharesClaimed";
|
|
1250
|
+
})(ProcessedEventName || (ProcessedEventName = {}));
|
|
1251
|
+
var WalletType;
|
|
1252
|
+
(function(WalletType2) {
|
|
1253
|
+
WalletType2["METAMASK"] = "metamask";
|
|
1254
|
+
WalletType2["PHANTOM"] = "phantom";
|
|
1255
|
+
WalletType2["COINBASE"] = "coinbase";
|
|
1256
|
+
WalletType2["WALLETCONNECT"] = "walletconnect";
|
|
1257
|
+
WalletType2["INJECTED"] = "injected";
|
|
1258
|
+
})(WalletType || (WalletType = {}));
|
|
1259
|
+
var RateLimitPeriodType;
|
|
1260
|
+
(function(RateLimitPeriodType2) {
|
|
1261
|
+
RateLimitPeriodType2["HOUR"] = "hour";
|
|
1262
|
+
RateLimitPeriodType2["DAY"] = "day";
|
|
1263
|
+
RateLimitPeriodType2["MONTH"] = "month";
|
|
1264
|
+
})(RateLimitPeriodType || (RateLimitPeriodType = {}));
|
|
1265
|
+
var EntityType;
|
|
1266
|
+
(function(EntityType2) {
|
|
1267
|
+
EntityType2["PERSONAL"] = "personal";
|
|
1268
|
+
EntityType2["ORGANIZATION"] = "organization";
|
|
1269
|
+
})(EntityType || (EntityType = {}));
|
|
1270
|
+
var EntityRole;
|
|
1271
|
+
(function(EntityRole2) {
|
|
1272
|
+
EntityRole2["OWNER"] = "owner";
|
|
1273
|
+
EntityRole2["MANAGER"] = "manager";
|
|
1274
|
+
EntityRole2["MEMBER"] = "member";
|
|
1275
|
+
})(EntityRole || (EntityRole = {}));
|
|
1276
|
+
var InvitationStatus;
|
|
1277
|
+
(function(InvitationStatus2) {
|
|
1278
|
+
InvitationStatus2["PENDING"] = "pending";
|
|
1279
|
+
InvitationStatus2["ACCEPTED"] = "accepted";
|
|
1280
|
+
InvitationStatus2["DECLINED"] = "declined";
|
|
1281
|
+
InvitationStatus2["EXPIRED"] = "expired";
|
|
1282
|
+
})(InvitationStatus || (InvitationStatus = {}));
|
|
1283
|
+
const OWNER_PERMISSIONS = {};
|
|
1284
|
+
const MANAGER_PERMISSIONS = {};
|
|
1285
|
+
const MEMBER_PERMISSIONS = {};
|
|
1286
|
+
({
|
|
1287
|
+
[EntityRole.OWNER]: OWNER_PERMISSIONS,
|
|
1288
|
+
[EntityRole.MANAGER]: MANAGER_PERMISSIONS,
|
|
1289
|
+
[EntityRole.MEMBER]: MEMBER_PERMISSIONS
|
|
1290
|
+
});
|
|
1291
|
+
var LogLevel;
|
|
1292
|
+
(function(LogLevel2) {
|
|
1293
|
+
LogLevel2["ERROR"] = "error";
|
|
1294
|
+
LogLevel2["WARN"] = "warn";
|
|
1295
|
+
LogLevel2["INFO"] = "info";
|
|
1296
|
+
LogLevel2["DEBUG"] = "debug";
|
|
1297
|
+
})(LogLevel || (LogLevel = {}));
|
|
1298
|
+
class Logger {
|
|
1299
|
+
constructor() {
|
|
1300
|
+
this.isDevelopment = process.env.NODE_ENV === "development";
|
|
1263
1301
|
}
|
|
1264
|
-
|
|
1265
|
-
return
|
|
1302
|
+
formatTimestamp() {
|
|
1303
|
+
return (/* @__PURE__ */ new Date()).toISOString();
|
|
1266
1304
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1305
|
+
formatMessage(_level, message, context) {
|
|
1306
|
+
const timestamp = this.formatTimestamp();
|
|
1307
|
+
const contextStr = context ? ` [${context}]` : "";
|
|
1308
|
+
return `[${timestamp}]${contextStr} ${message}`;
|
|
1269
1309
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
/** Claim period: 60 days in seconds */
|
|
1274
|
-
CLAIM_PERIOD: 60 * 24 * 60 * 60,
|
|
1275
|
-
/** Revenue share percentages */
|
|
1276
|
-
REVENUE_SHARES: {
|
|
1277
|
-
SENDER: 90,
|
|
1278
|
-
OWNER: 10
|
|
1279
|
-
},
|
|
1280
|
-
/** USDC token decimals */
|
|
1281
|
-
USDC_DECIMALS: 6,
|
|
1282
|
-
/** Maximum message lengths */
|
|
1283
|
-
MAX_LENGTHS: {
|
|
1284
|
-
SUBJECT: 200,
|
|
1285
|
-
BODY: 2e3,
|
|
1286
|
-
MAIL_ID: 100
|
|
1287
|
-
}
|
|
1288
|
-
};
|
|
1289
|
-
return common;
|
|
1290
|
-
}
|
|
1291
|
-
var validation = {};
|
|
1292
|
-
var address = {};
|
|
1293
|
-
var hasRequiredAddress;
|
|
1294
|
-
function requireAddress() {
|
|
1295
|
-
if (hasRequiredAddress) return address;
|
|
1296
|
-
hasRequiredAddress = 1;
|
|
1297
|
-
Object.defineProperty(address, "__esModule", { value: true });
|
|
1298
|
-
address.AddressType = void 0;
|
|
1299
|
-
address.isENSName = isENSName;
|
|
1300
|
-
address.isSNSName = isSNSName;
|
|
1301
|
-
address.getAddressType = getAddressType;
|
|
1302
|
-
address.isValidWalletAddress = isValidWalletAddress;
|
|
1303
|
-
address.isValidSignature = isValidSignature;
|
|
1304
|
-
address.parseEmailAddress = parseEmailAddress;
|
|
1305
|
-
address.formatWalletAddress = formatWalletAddress;
|
|
1306
|
-
address.getChainDisplayName = getChainDisplayName;
|
|
1307
|
-
const enums_1 = requireEnums();
|
|
1308
|
-
const common_1 = requireCommon();
|
|
1309
|
-
var AddressType;
|
|
1310
|
-
(function(AddressType2) {
|
|
1311
|
-
AddressType2["EVMAddress"] = "EVMAddress";
|
|
1312
|
-
AddressType2["SolanaAddress"] = "SolanaAddress";
|
|
1313
|
-
AddressType2["ENSName"] = "ENSName";
|
|
1314
|
-
AddressType2["SNSName"] = "SNSName";
|
|
1315
|
-
})(AddressType || (address.AddressType = AddressType = {}));
|
|
1316
|
-
function isENSName(address2) {
|
|
1317
|
-
const lowerAddress = address2.toLowerCase();
|
|
1318
|
-
if (!lowerAddress.endsWith(".eth") && !lowerAddress.endsWith(".box")) {
|
|
1319
|
-
return false;
|
|
1320
|
-
}
|
|
1321
|
-
const nameWithoutTLD = lowerAddress.endsWith(".eth") ? lowerAddress.slice(0, -4) : lowerAddress.slice(0, -4);
|
|
1322
|
-
if (nameWithoutTLD.length === 0) {
|
|
1323
|
-
return false;
|
|
1324
|
-
}
|
|
1325
|
-
const labels = nameWithoutTLD.split(".");
|
|
1326
|
-
const validLabelRegex = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
|
|
1327
|
-
for (const label of labels) {
|
|
1328
|
-
if (label.length === 0 || !validLabelRegex.test(label)) {
|
|
1329
|
-
return false;
|
|
1330
|
-
}
|
|
1331
|
-
if (label.includes("--")) {
|
|
1332
|
-
return false;
|
|
1333
|
-
}
|
|
1310
|
+
shouldLog(level) {
|
|
1311
|
+
if (!this.isDevelopment) {
|
|
1312
|
+
return level === LogLevel.ERROR || level === LogLevel.WARN;
|
|
1334
1313
|
}
|
|
1335
1314
|
return true;
|
|
1336
1315
|
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
".bonk",
|
|
1343
|
-
".poor",
|
|
1344
|
-
".gm",
|
|
1345
|
-
".dao",
|
|
1346
|
-
".defi",
|
|
1347
|
-
".web3"
|
|
1348
|
-
];
|
|
1349
|
-
const matchingExtension = snsExtensions.find((ext) => lowerAddress.endsWith(ext));
|
|
1350
|
-
if (!matchingExtension) {
|
|
1351
|
-
return false;
|
|
1352
|
-
}
|
|
1353
|
-
const nameWithoutTLD = lowerAddress.slice(0, -matchingExtension.length);
|
|
1354
|
-
if (nameWithoutTLD.length === 0) {
|
|
1355
|
-
return false;
|
|
1356
|
-
}
|
|
1357
|
-
const labels = nameWithoutTLD.split(".");
|
|
1358
|
-
const validLabelRegex = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
|
|
1359
|
-
for (const label of labels) {
|
|
1360
|
-
if (label.length === 0 || !validLabelRegex.test(label)) {
|
|
1361
|
-
return false;
|
|
1362
|
-
}
|
|
1363
|
-
if (label.includes("--")) {
|
|
1364
|
-
return false;
|
|
1316
|
+
error(message, context, data) {
|
|
1317
|
+
if (this.shouldLog(LogLevel.ERROR)) {
|
|
1318
|
+
console.error(this.formatMessage(LogLevel.ERROR, message, context));
|
|
1319
|
+
if (data) {
|
|
1320
|
+
console.error(data);
|
|
1365
1321
|
}
|
|
1366
1322
|
}
|
|
1367
|
-
return true;
|
|
1368
1323
|
}
|
|
1369
|
-
|
|
1370
|
-
if ((
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
return AddressType.SolanaAddress;
|
|
1375
|
-
}
|
|
1376
|
-
if (parentAddressType && address2.includes(".")) {
|
|
1377
|
-
if (parentAddressType === AddressType.EVMAddress) {
|
|
1378
|
-
return AddressType.ENSName;
|
|
1379
|
-
}
|
|
1380
|
-
if (parentAddressType === AddressType.SolanaAddress) {
|
|
1381
|
-
return AddressType.SNSName;
|
|
1324
|
+
warn(message, context, data) {
|
|
1325
|
+
if (this.shouldLog(LogLevel.WARN)) {
|
|
1326
|
+
console.warn(this.formatMessage(LogLevel.WARN, message, context));
|
|
1327
|
+
if (data) {
|
|
1328
|
+
console.warn(data);
|
|
1382
1329
|
}
|
|
1383
1330
|
}
|
|
1384
|
-
return void 0;
|
|
1385
|
-
}
|
|
1386
|
-
function isValidWalletAddress(address2, chainType) {
|
|
1387
|
-
if (!address2 || typeof address2 !== "string") {
|
|
1388
|
-
return false;
|
|
1389
|
-
}
|
|
1390
|
-
const addressType = getAddressType(address2);
|
|
1391
|
-
switch (chainType) {
|
|
1392
|
-
case enums_1.ChainType.EVM:
|
|
1393
|
-
return addressType === AddressType.EVMAddress || addressType === AddressType.ENSName;
|
|
1394
|
-
case enums_1.ChainType.SOLANA:
|
|
1395
|
-
return addressType === AddressType.SolanaAddress || addressType === AddressType.SNSName;
|
|
1396
|
-
default:
|
|
1397
|
-
return !!addressType;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
function isValidSignature(signature, chainType) {
|
|
1401
|
-
if (!signature || typeof signature !== "string") {
|
|
1402
|
-
return false;
|
|
1403
|
-
}
|
|
1404
|
-
switch (chainType) {
|
|
1405
|
-
case enums_1.ChainType.EVM:
|
|
1406
|
-
return /^0x[a-fA-F0-9]{130}$/.test(signature);
|
|
1407
|
-
case enums_1.ChainType.SOLANA:
|
|
1408
|
-
return /^[1-9A-HJ-NP-Za-km-z]{87,88}$/.test(signature);
|
|
1409
|
-
default:
|
|
1410
|
-
return signature.length > 50;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
function parseEmailAddress(email) {
|
|
1414
|
-
if (!email || typeof email !== "string") {
|
|
1415
|
-
return void 0;
|
|
1416
|
-
}
|
|
1417
|
-
const parts = email.split("@");
|
|
1418
|
-
if (parts.length !== 2) {
|
|
1419
|
-
return void 0;
|
|
1420
|
-
}
|
|
1421
|
-
const [address2, domain] = parts;
|
|
1422
|
-
if (!address2 || !domain) {
|
|
1423
|
-
return void 0;
|
|
1424
|
-
}
|
|
1425
|
-
const type = getAddressType(address2);
|
|
1426
|
-
return {
|
|
1427
|
-
address: address2,
|
|
1428
|
-
domain,
|
|
1429
|
-
type
|
|
1430
|
-
};
|
|
1431
|
-
}
|
|
1432
|
-
function formatWalletAddress(address2) {
|
|
1433
|
-
if (!address2 || address2.length < 10) {
|
|
1434
|
-
return address2;
|
|
1435
|
-
}
|
|
1436
|
-
const addressType = getAddressType(address2);
|
|
1437
|
-
if ((addressType === AddressType.ENSName || addressType === AddressType.SNSName) && address2.length <= 20) {
|
|
1438
|
-
return address2;
|
|
1439
|
-
}
|
|
1440
|
-
return `${address2.slice(0, 6)}...${address2.slice(-4)}`;
|
|
1441
|
-
}
|
|
1442
|
-
function getChainDisplayName(chainType) {
|
|
1443
|
-
if (!chainType) {
|
|
1444
|
-
return "Unknown Chain";
|
|
1445
|
-
}
|
|
1446
|
-
switch (chainType) {
|
|
1447
|
-
case enums_1.ChainType.EVM:
|
|
1448
|
-
return "EVM Chain";
|
|
1449
|
-
case enums_1.ChainType.SOLANA:
|
|
1450
|
-
return "Solana";
|
|
1451
|
-
default:
|
|
1452
|
-
return "Blockchain";
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
return address;
|
|
1456
|
-
}
|
|
1457
|
-
var hasRequiredValidation;
|
|
1458
|
-
function requireValidation() {
|
|
1459
|
-
if (hasRequiredValidation) return validation;
|
|
1460
|
-
hasRequiredValidation = 1;
|
|
1461
|
-
Object.defineProperty(validation, "__esModule", { value: true });
|
|
1462
|
-
validation.validateDomain = validateDomain;
|
|
1463
|
-
validation.validateMessage = validateMessage;
|
|
1464
|
-
validation.validateAddress = validateAddress;
|
|
1465
|
-
validation.validateAmount = validateAmount;
|
|
1466
|
-
const address_1 = requireAddress();
|
|
1467
|
-
function validateDomain(domain) {
|
|
1468
|
-
if (!domain || domain.length === 0) {
|
|
1469
|
-
throw new Error("Domain cannot be empty");
|
|
1470
|
-
}
|
|
1471
|
-
if (domain.length > 100) {
|
|
1472
|
-
throw new Error("Domain cannot exceed 100 characters");
|
|
1473
|
-
}
|
|
1474
|
-
const domainRegex = /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
|
|
1475
|
-
if (!domainRegex.test(domain)) {
|
|
1476
|
-
throw new Error("Invalid domain format");
|
|
1477
|
-
}
|
|
1478
|
-
return true;
|
|
1479
|
-
}
|
|
1480
|
-
function validateMessage(subject, body) {
|
|
1481
|
-
if (!subject || subject.length === 0) {
|
|
1482
|
-
throw new Error("Message subject cannot be empty");
|
|
1483
|
-
}
|
|
1484
|
-
if (subject.length > 200) {
|
|
1485
|
-
throw new Error("Message subject cannot exceed 200 characters");
|
|
1486
|
-
}
|
|
1487
|
-
if (!body || body.length === 0) {
|
|
1488
|
-
throw new Error("Message body cannot be empty");
|
|
1489
|
-
}
|
|
1490
|
-
if (body.length > 1e4) {
|
|
1491
|
-
throw new Error("Message body cannot exceed 10000 characters");
|
|
1492
|
-
}
|
|
1493
|
-
return true;
|
|
1494
1331
|
}
|
|
1495
|
-
|
|
1496
|
-
if (
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
throw new Error(`Invalid ${chainType} address format`);
|
|
1501
|
-
}
|
|
1502
|
-
return true;
|
|
1503
|
-
}
|
|
1504
|
-
function validateAmount(amount) {
|
|
1505
|
-
if (amount === null || amount === void 0 || amount === "" || typeof amount === "string" && amount.trim() === "") {
|
|
1506
|
-
throw new Error("Invalid amount format");
|
|
1507
|
-
}
|
|
1508
|
-
let amountBigInt;
|
|
1509
|
-
try {
|
|
1510
|
-
if (typeof amount === "string") {
|
|
1511
|
-
if (!/^-?\d+$/.test(amount.trim())) {
|
|
1512
|
-
throw new Error("Invalid amount format");
|
|
1513
|
-
}
|
|
1514
|
-
amountBigInt = BigInt(amount);
|
|
1515
|
-
} else if (typeof amount === "number") {
|
|
1516
|
-
if (!Number.isFinite(amount)) {
|
|
1517
|
-
throw new Error("Invalid amount format");
|
|
1518
|
-
}
|
|
1519
|
-
amountBigInt = BigInt(Math.floor(amount));
|
|
1520
|
-
} else if (typeof amount === "bigint") {
|
|
1521
|
-
amountBigInt = amount;
|
|
1522
|
-
} else {
|
|
1523
|
-
throw new Error("Invalid amount format");
|
|
1332
|
+
info(message, context, data) {
|
|
1333
|
+
if (this.shouldLog(LogLevel.INFO)) {
|
|
1334
|
+
console.log(this.formatMessage(LogLevel.INFO, message, context));
|
|
1335
|
+
if (data) {
|
|
1336
|
+
console.log(data);
|
|
1524
1337
|
}
|
|
1525
|
-
} catch {
|
|
1526
|
-
throw new Error("Invalid amount format");
|
|
1527
|
-
}
|
|
1528
|
-
if (amountBigInt < 0n) {
|
|
1529
|
-
throw new Error("Amount cannot be negative");
|
|
1530
|
-
}
|
|
1531
|
-
return amountBigInt;
|
|
1532
|
-
}
|
|
1533
|
-
return validation;
|
|
1534
|
-
}
|
|
1535
|
-
var environment = {};
|
|
1536
|
-
var hasRequiredEnvironment;
|
|
1537
|
-
function requireEnvironment() {
|
|
1538
|
-
if (hasRequiredEnvironment) return environment;
|
|
1539
|
-
hasRequiredEnvironment = 1;
|
|
1540
|
-
Object.defineProperty(environment, "__esModule", { value: true });
|
|
1541
|
-
environment.StorageType = void 0;
|
|
1542
|
-
var StorageType;
|
|
1543
|
-
(function(StorageType2) {
|
|
1544
|
-
StorageType2["LOCAL_STORAGE"] = "localStorage";
|
|
1545
|
-
StorageType2["SESSION_STORAGE"] = "sessionStorage";
|
|
1546
|
-
StorageType2["ASYNC_STORAGE"] = "asyncStorage";
|
|
1547
|
-
StorageType2["MEMORY"] = "memory";
|
|
1548
|
-
})(StorageType || (environment.StorageType = StorageType = {}));
|
|
1549
|
-
return environment;
|
|
1550
|
-
}
|
|
1551
|
-
var analytics = {};
|
|
1552
|
-
var hasRequiredAnalytics;
|
|
1553
|
-
function requireAnalytics() {
|
|
1554
|
-
if (hasRequiredAnalytics) return analytics;
|
|
1555
|
-
hasRequiredAnalytics = 1;
|
|
1556
|
-
Object.defineProperty(analytics, "__esModule", { value: true });
|
|
1557
|
-
analytics.AnalyticsEventBuilder = analytics.AnalyticsEvent = void 0;
|
|
1558
|
-
var AnalyticsEvent;
|
|
1559
|
-
(function(AnalyticsEvent2) {
|
|
1560
|
-
AnalyticsEvent2["USER_LOGIN"] = "user_login";
|
|
1561
|
-
AnalyticsEvent2["USER_LOGOUT"] = "user_logout";
|
|
1562
|
-
AnalyticsEvent2["USER_SIGNUP"] = "user_signup";
|
|
1563
|
-
AnalyticsEvent2["EMAIL_SENT"] = "email_sent";
|
|
1564
|
-
AnalyticsEvent2["EMAIL_RECEIVED"] = "email_received";
|
|
1565
|
-
AnalyticsEvent2["EMAIL_OPENED"] = "email_opened";
|
|
1566
|
-
AnalyticsEvent2["EMAIL_REPLY"] = "email_reply";
|
|
1567
|
-
AnalyticsEvent2["EMAIL_FORWARD"] = "email_forward";
|
|
1568
|
-
AnalyticsEvent2["EMAIL_DELETE"] = "email_delete";
|
|
1569
|
-
AnalyticsEvent2["EMAIL_STAR"] = "email_star";
|
|
1570
|
-
AnalyticsEvent2["EMAIL_COMPOSE"] = "email_compose";
|
|
1571
|
-
AnalyticsEvent2["EMAIL_CLICKED"] = "email_clicked";
|
|
1572
|
-
AnalyticsEvent2["PAGE_VIEW"] = "page_view";
|
|
1573
|
-
AnalyticsEvent2["SCREEN_VIEW"] = "screen_view";
|
|
1574
|
-
AnalyticsEvent2["FOLDER_SWITCH"] = "folder_switch";
|
|
1575
|
-
AnalyticsEvent2["SUBSCRIPTION_VIEW"] = "subscription_view";
|
|
1576
|
-
AnalyticsEvent2["SUBSCRIPTION_PURCHASE"] = "subscription_purchase";
|
|
1577
|
-
AnalyticsEvent2["SUBSCRIPTION_CANCEL"] = "subscription_cancel";
|
|
1578
|
-
AnalyticsEvent2["SEARCH_PERFORMED"] = "search_performed";
|
|
1579
|
-
AnalyticsEvent2["SETTINGS_CHANGED"] = "settings_changed";
|
|
1580
|
-
AnalyticsEvent2["ERROR_OCCURRED"] = "error_occurred";
|
|
1581
|
-
AnalyticsEvent2["AB_TEST_VIEWED"] = "ab_test_viewed";
|
|
1582
|
-
AnalyticsEvent2["AB_TEST_CONVERTED"] = "ab_test_converted";
|
|
1583
|
-
AnalyticsEvent2["CUSTOM_EVENT"] = "custom_event";
|
|
1584
|
-
})(AnalyticsEvent || (analytics.AnalyticsEvent = AnalyticsEvent = {}));
|
|
1585
|
-
class AnalyticsEventBuilder {
|
|
1586
|
-
/**
|
|
1587
|
-
* Build properties for email action events.
|
|
1588
|
-
*
|
|
1589
|
-
* @param action Email action performed (read, sent, archived, etc.)
|
|
1590
|
-
* @param emailId Unique identifier for the email
|
|
1591
|
-
* @param folder Email folder context (inbox, sent, trash, etc.)
|
|
1592
|
-
* @returns Standardized event properties object
|
|
1593
|
-
*
|
|
1594
|
-
* @ai-builder Email action properties
|
|
1595
|
-
* @ai-standardization Consistent email event tracking
|
|
1596
|
-
*/
|
|
1597
|
-
static emailAction(action, emailId, folder) {
|
|
1598
|
-
return {
|
|
1599
|
-
action,
|
|
1600
|
-
email_id: emailId,
|
|
1601
|
-
folder,
|
|
1602
|
-
timestamp: Date.now()
|
|
1603
|
-
};
|
|
1604
|
-
}
|
|
1605
|
-
/**
|
|
1606
|
-
* Build properties for page/screen view events.
|
|
1607
|
-
*
|
|
1608
|
-
* @param pageName Human-readable page name
|
|
1609
|
-
* @param pagePath URL path or screen identifier
|
|
1610
|
-
* @returns Standardized page view properties
|
|
1611
|
-
*
|
|
1612
|
-
* @ai-builder Navigation tracking properties
|
|
1613
|
-
* @ai-cross-platform Works for web pages and mobile screens
|
|
1614
|
-
*/
|
|
1615
|
-
static pageView(pageName, pagePath) {
|
|
1616
|
-
return {
|
|
1617
|
-
page_name: pageName,
|
|
1618
|
-
page_path: pagePath,
|
|
1619
|
-
timestamp: Date.now()
|
|
1620
|
-
};
|
|
1621
|
-
}
|
|
1622
|
-
/**
|
|
1623
|
-
* Build properties for error tracking events.
|
|
1624
|
-
*
|
|
1625
|
-
* @param errorType Category of error (network, validation, runtime, etc.)
|
|
1626
|
-
* @param errorMessage Error message or description
|
|
1627
|
-
* @param pageName Page/screen where error occurred
|
|
1628
|
-
* @returns Standardized error event properties
|
|
1629
|
-
*
|
|
1630
|
-
* @ai-builder Error tracking properties
|
|
1631
|
-
* @ai-debugging Consistent error event structure
|
|
1632
|
-
*/
|
|
1633
|
-
static error(errorType, errorMessage, pageName) {
|
|
1634
|
-
return {
|
|
1635
|
-
error_type: errorType,
|
|
1636
|
-
error_message: errorMessage,
|
|
1637
|
-
page_name: pageName,
|
|
1638
|
-
timestamp: Date.now()
|
|
1639
|
-
};
|
|
1640
|
-
}
|
|
1641
|
-
/**
|
|
1642
|
-
* Build properties for subscription/revenue events.
|
|
1643
|
-
*
|
|
1644
|
-
* @param action Subscription action (subscribe, upgrade, cancel, etc.)
|
|
1645
|
-
* @param planType Subscription plan type (free, premium, pro, etc.)
|
|
1646
|
-
* @param amount Monetary amount (for revenue tracking)
|
|
1647
|
-
* @param currency Currency code (USD, EUR, etc.)
|
|
1648
|
-
* @returns Standardized subscription event properties
|
|
1649
|
-
*
|
|
1650
|
-
* @ai-builder Revenue tracking properties
|
|
1651
|
-
* @ai-business-metrics Subscription and revenue analytics
|
|
1652
|
-
*/
|
|
1653
|
-
static subscription(action, planType, amount, currency2) {
|
|
1654
|
-
return {
|
|
1655
|
-
action,
|
|
1656
|
-
plan_type: planType,
|
|
1657
|
-
amount,
|
|
1658
|
-
currency: currency2,
|
|
1659
|
-
timestamp: Date.now()
|
|
1660
|
-
};
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* Build properties for user engagement events.
|
|
1664
|
-
*
|
|
1665
|
-
* @param feature Feature name or component identifier
|
|
1666
|
-
* @param interaction Type of interaction (click, scroll, hover, etc.)
|
|
1667
|
-
* @param duration Time spent on interaction (milliseconds)
|
|
1668
|
-
* @returns Standardized engagement event properties
|
|
1669
|
-
*
|
|
1670
|
-
* @ai-builder User engagement properties
|
|
1671
|
-
* @ai-ux-analytics User experience and interaction tracking
|
|
1672
|
-
*/
|
|
1673
|
-
static engagement(feature, interaction, duration) {
|
|
1674
|
-
return {
|
|
1675
|
-
feature,
|
|
1676
|
-
interaction,
|
|
1677
|
-
duration,
|
|
1678
|
-
timestamp: Date.now()
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
/**
|
|
1682
|
-
* Build properties for performance monitoring events.
|
|
1683
|
-
*
|
|
1684
|
-
* @param metric Performance metric name (load_time, api_response, etc.)
|
|
1685
|
-
* @param value Metric value (usually in milliseconds)
|
|
1686
|
-
* @param context Additional context about the performance event
|
|
1687
|
-
* @returns Standardized performance event properties
|
|
1688
|
-
*
|
|
1689
|
-
* @ai-builder Performance monitoring properties
|
|
1690
|
-
* @ai-performance Application performance tracking
|
|
1691
|
-
*/
|
|
1692
|
-
static performance(metric, value, context) {
|
|
1693
|
-
return {
|
|
1694
|
-
metric,
|
|
1695
|
-
value,
|
|
1696
|
-
context,
|
|
1697
|
-
timestamp: Date.now()
|
|
1698
|
-
};
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
analytics.AnalyticsEventBuilder = AnalyticsEventBuilder;
|
|
1702
|
-
return analytics;
|
|
1703
|
-
}
|
|
1704
|
-
var api = {};
|
|
1705
|
-
var hasRequiredApi;
|
|
1706
|
-
function requireApi() {
|
|
1707
|
-
if (hasRequiredApi) return api;
|
|
1708
|
-
hasRequiredApi = 1;
|
|
1709
|
-
(function(exports$1) {
|
|
1710
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
1711
|
-
exports$1.ProcessedEventName = exports$1.ContractType = exports$1.ChainType = void 0;
|
|
1712
|
-
var enums_1 = requireEnums();
|
|
1713
|
-
Object.defineProperty(exports$1, "ChainType", { enumerable: true, get: function() {
|
|
1714
|
-
return enums_1.ChainType;
|
|
1715
|
-
} });
|
|
1716
|
-
var ContractType;
|
|
1717
|
-
(function(ContractType2) {
|
|
1718
|
-
ContractType2["Mailer"] = "Mailer";
|
|
1719
|
-
ContractType2["MailService"] = "MailService";
|
|
1720
|
-
})(ContractType || (exports$1.ContractType = ContractType = {}));
|
|
1721
|
-
var ProcessedEventName;
|
|
1722
|
-
(function(ProcessedEventName2) {
|
|
1723
|
-
ProcessedEventName2["MailSent"] = "MailSent";
|
|
1724
|
-
ProcessedEventName2["PreparedMailSent"] = "PreparedMailSent";
|
|
1725
|
-
ProcessedEventName2["DelegationSet"] = "DelegationSet";
|
|
1726
|
-
ProcessedEventName2["DelegationCleared"] = "DelegationCleared";
|
|
1727
|
-
ProcessedEventName2["DomainRegistered"] = "DomainRegistered";
|
|
1728
|
-
ProcessedEventName2["DomainExtended"] = "DomainExtended";
|
|
1729
|
-
ProcessedEventName2["DomainReleased"] = "DomainReleased";
|
|
1730
|
-
ProcessedEventName2["FeeUpdated"] = "FeeUpdated";
|
|
1731
|
-
ProcessedEventName2["SharesRecorded"] = "SharesRecorded";
|
|
1732
|
-
ProcessedEventName2["RecipientClaimed"] = "RecipientClaimed";
|
|
1733
|
-
ProcessedEventName2["OwnerClaimed"] = "OwnerClaimed";
|
|
1734
|
-
ProcessedEventName2["ExpiredSharesClaimed"] = "ExpiredSharesClaimed";
|
|
1735
|
-
})(ProcessedEventName || (exports$1.ProcessedEventName = ProcessedEventName = {}));
|
|
1736
|
-
})(api);
|
|
1737
|
-
return api;
|
|
1738
|
-
}
|
|
1739
|
-
var network = {};
|
|
1740
|
-
var hasRequiredNetwork;
|
|
1741
|
-
function requireNetwork() {
|
|
1742
|
-
if (hasRequiredNetwork) return network;
|
|
1743
|
-
hasRequiredNetwork = 1;
|
|
1744
|
-
Object.defineProperty(network, "__esModule", { value: true });
|
|
1745
|
-
network.NetworkError = void 0;
|
|
1746
|
-
class NetworkError extends Error {
|
|
1747
|
-
constructor(message, status, statusText, response) {
|
|
1748
|
-
super(message);
|
|
1749
|
-
this.name = "NetworkError";
|
|
1750
|
-
this.status = status;
|
|
1751
|
-
this.statusText = statusText;
|
|
1752
|
-
this.response = response;
|
|
1753
1338
|
}
|
|
1754
1339
|
}
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
function requireWallet() {
|
|
1761
|
-
if (hasRequiredWallet) return wallet;
|
|
1762
|
-
hasRequiredWallet = 1;
|
|
1763
|
-
Object.defineProperty(wallet, "__esModule", { value: true });
|
|
1764
|
-
wallet.WalletType = void 0;
|
|
1765
|
-
var WalletType;
|
|
1766
|
-
(function(WalletType2) {
|
|
1767
|
-
WalletType2["METAMASK"] = "metamask";
|
|
1768
|
-
WalletType2["PHANTOM"] = "phantom";
|
|
1769
|
-
WalletType2["COINBASE"] = "coinbase";
|
|
1770
|
-
WalletType2["WALLETCONNECT"] = "walletconnect";
|
|
1771
|
-
WalletType2["INJECTED"] = "injected";
|
|
1772
|
-
})(WalletType || (wallet.WalletType = WalletType = {}));
|
|
1773
|
-
return wallet;
|
|
1774
|
-
}
|
|
1775
|
-
var rateLimits = {};
|
|
1776
|
-
var hasRequiredRateLimits;
|
|
1777
|
-
function requireRateLimits() {
|
|
1778
|
-
if (hasRequiredRateLimits) return rateLimits;
|
|
1779
|
-
hasRequiredRateLimits = 1;
|
|
1780
|
-
Object.defineProperty(rateLimits, "__esModule", { value: true });
|
|
1781
|
-
rateLimits.RateLimitPeriodType = void 0;
|
|
1782
|
-
var RateLimitPeriodType;
|
|
1783
|
-
(function(RateLimitPeriodType2) {
|
|
1784
|
-
RateLimitPeriodType2["HOUR"] = "hour";
|
|
1785
|
-
RateLimitPeriodType2["DAY"] = "day";
|
|
1786
|
-
RateLimitPeriodType2["MONTH"] = "month";
|
|
1787
|
-
})(RateLimitPeriodType || (rateLimits.RateLimitPeriodType = RateLimitPeriodType = {}));
|
|
1788
|
-
return rateLimits;
|
|
1789
|
-
}
|
|
1790
|
-
var period = {};
|
|
1791
|
-
var hasRequiredPeriod;
|
|
1792
|
-
function requirePeriod() {
|
|
1793
|
-
if (hasRequiredPeriod) return period;
|
|
1794
|
-
hasRequiredPeriod = 1;
|
|
1795
|
-
Object.defineProperty(period, "__esModule", { value: true });
|
|
1796
|
-
period.ALL_PERIODS = period.PERIOD_RANKS = void 0;
|
|
1797
|
-
period.PERIOD_RANKS = {
|
|
1798
|
-
weekly: 1,
|
|
1799
|
-
monthly: 2,
|
|
1800
|
-
quarterly: 3,
|
|
1801
|
-
yearly: 4,
|
|
1802
|
-
lifetime: 5
|
|
1803
|
-
};
|
|
1804
|
-
period.ALL_PERIODS = [
|
|
1805
|
-
"weekly",
|
|
1806
|
-
"monthly",
|
|
1807
|
-
"quarterly",
|
|
1808
|
-
"yearly",
|
|
1809
|
-
"lifetime"
|
|
1810
|
-
];
|
|
1811
|
-
return period;
|
|
1812
|
-
}
|
|
1813
|
-
var entitlements = {};
|
|
1814
|
-
var hasRequiredEntitlements;
|
|
1815
|
-
function requireEntitlements() {
|
|
1816
|
-
if (hasRequiredEntitlements) return entitlements;
|
|
1817
|
-
hasRequiredEntitlements = 1;
|
|
1818
|
-
Object.defineProperty(entitlements, "__esModule", { value: true });
|
|
1819
|
-
entitlements.NONE_ENTITLEMENT = void 0;
|
|
1820
|
-
entitlements.NONE_ENTITLEMENT = "none";
|
|
1821
|
-
return entitlements;
|
|
1822
|
-
}
|
|
1823
|
-
var entity = {};
|
|
1824
|
-
var hasRequiredEntity;
|
|
1825
|
-
function requireEntity() {
|
|
1826
|
-
if (hasRequiredEntity) return entity;
|
|
1827
|
-
hasRequiredEntity = 1;
|
|
1828
|
-
Object.defineProperty(entity, "__esModule", { value: true });
|
|
1829
|
-
entity.InvitationStatus = entity.EntityRole = entity.EntityType = void 0;
|
|
1830
|
-
var EntityType;
|
|
1831
|
-
(function(EntityType2) {
|
|
1832
|
-
EntityType2["PERSONAL"] = "personal";
|
|
1833
|
-
EntityType2["ORGANIZATION"] = "organization";
|
|
1834
|
-
})(EntityType || (entity.EntityType = EntityType = {}));
|
|
1835
|
-
var EntityRole;
|
|
1836
|
-
(function(EntityRole2) {
|
|
1837
|
-
EntityRole2["OWNER"] = "owner";
|
|
1838
|
-
EntityRole2["MANAGER"] = "manager";
|
|
1839
|
-
EntityRole2["MEMBER"] = "member";
|
|
1840
|
-
})(EntityRole || (entity.EntityRole = EntityRole = {}));
|
|
1841
|
-
var InvitationStatus;
|
|
1842
|
-
(function(InvitationStatus2) {
|
|
1843
|
-
InvitationStatus2["PENDING"] = "pending";
|
|
1844
|
-
InvitationStatus2["ACCEPTED"] = "accepted";
|
|
1845
|
-
InvitationStatus2["DECLINED"] = "declined";
|
|
1846
|
-
InvitationStatus2["EXPIRED"] = "expired";
|
|
1847
|
-
})(InvitationStatus || (entity.InvitationStatus = InvitationStatus = {}));
|
|
1848
|
-
return entity;
|
|
1849
|
-
}
|
|
1850
|
-
var permissions = {};
|
|
1851
|
-
var hasRequiredPermissions;
|
|
1852
|
-
function requirePermissions() {
|
|
1853
|
-
if (hasRequiredPermissions) return permissions;
|
|
1854
|
-
hasRequiredPermissions = 1;
|
|
1855
|
-
(function(exports$1) {
|
|
1856
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
1857
|
-
exports$1.ROLE_PERMISSIONS = exports$1.MEMBER_PERMISSIONS = exports$1.MANAGER_PERMISSIONS = exports$1.OWNER_PERMISSIONS = void 0;
|
|
1858
|
-
exports$1.getPermissionsForRole = getPermissionsForRole;
|
|
1859
|
-
exports$1.hasPermission = hasPermission;
|
|
1860
|
-
const entity_1 = requireEntity();
|
|
1861
|
-
exports$1.OWNER_PERMISSIONS = {
|
|
1862
|
-
canViewEntity: true,
|
|
1863
|
-
canEditEntity: true,
|
|
1864
|
-
canDeleteEntity: true,
|
|
1865
|
-
canManageMembers: true,
|
|
1866
|
-
canInviteMembers: true,
|
|
1867
|
-
canManageProjects: true,
|
|
1868
|
-
canCreateProjects: true,
|
|
1869
|
-
canViewProjects: true,
|
|
1870
|
-
canManageApiKeys: true,
|
|
1871
|
-
canViewApiKeys: true
|
|
1872
|
-
};
|
|
1873
|
-
exports$1.MANAGER_PERMISSIONS = {
|
|
1874
|
-
canViewEntity: true,
|
|
1875
|
-
canEditEntity: true,
|
|
1876
|
-
canDeleteEntity: false,
|
|
1877
|
-
canManageMembers: false,
|
|
1878
|
-
canInviteMembers: false,
|
|
1879
|
-
canManageProjects: true,
|
|
1880
|
-
canCreateProjects: true,
|
|
1881
|
-
canViewProjects: true,
|
|
1882
|
-
canManageApiKeys: true,
|
|
1883
|
-
canViewApiKeys: true
|
|
1884
|
-
};
|
|
1885
|
-
exports$1.MEMBER_PERMISSIONS = {
|
|
1886
|
-
canViewEntity: true,
|
|
1887
|
-
canEditEntity: false,
|
|
1888
|
-
canDeleteEntity: false,
|
|
1889
|
-
canManageMembers: false,
|
|
1890
|
-
canInviteMembers: false,
|
|
1891
|
-
canManageProjects: false,
|
|
1892
|
-
canCreateProjects: false,
|
|
1893
|
-
canViewProjects: true,
|
|
1894
|
-
canManageApiKeys: false,
|
|
1895
|
-
canViewApiKeys: true
|
|
1896
|
-
};
|
|
1897
|
-
exports$1.ROLE_PERMISSIONS = {
|
|
1898
|
-
[entity_1.EntityRole.OWNER]: exports$1.OWNER_PERMISSIONS,
|
|
1899
|
-
[entity_1.EntityRole.MANAGER]: exports$1.MANAGER_PERMISSIONS,
|
|
1900
|
-
[entity_1.EntityRole.MEMBER]: exports$1.MEMBER_PERMISSIONS
|
|
1901
|
-
};
|
|
1902
|
-
function getPermissionsForRole(role) {
|
|
1903
|
-
return exports$1.ROLE_PERMISSIONS[role];
|
|
1904
|
-
}
|
|
1905
|
-
function hasPermission(role, permission) {
|
|
1906
|
-
return exports$1.ROLE_PERMISSIONS[role][permission];
|
|
1907
|
-
}
|
|
1908
|
-
})(permissions);
|
|
1909
|
-
return permissions;
|
|
1910
|
-
}
|
|
1911
|
-
var web3UsernameValidator = {};
|
|
1912
|
-
var hasRequiredWeb3UsernameValidator;
|
|
1913
|
-
function requireWeb3UsernameValidator() {
|
|
1914
|
-
if (hasRequiredWeb3UsernameValidator) return web3UsernameValidator;
|
|
1915
|
-
hasRequiredWeb3UsernameValidator = 1;
|
|
1916
|
-
Object.defineProperty(web3UsernameValidator, "__esModule", { value: true });
|
|
1917
|
-
web3UsernameValidator.Web3UsernameValidator = void 0;
|
|
1918
|
-
const enums_1 = requireEnums();
|
|
1919
|
-
class Web3UsernameValidator {
|
|
1920
|
-
/**
|
|
1921
|
-
* Comprehensive address validation for API endpoint
|
|
1922
|
-
* Returns AddressValidationResult for valid addresses, undefined for invalid ones
|
|
1923
|
-
*/
|
|
1924
|
-
static validate(address2) {
|
|
1925
|
-
if (!address2) {
|
|
1926
|
-
return void 0;
|
|
1927
|
-
}
|
|
1928
|
-
if (this.EVM_REGEX.test(address2)) {
|
|
1929
|
-
return {
|
|
1930
|
-
name: null,
|
|
1931
|
-
address: address2.toLowerCase(),
|
|
1932
|
-
chainType: enums_1.ChainType.EVM
|
|
1933
|
-
};
|
|
1934
|
-
}
|
|
1935
|
-
if (!address2.startsWith("0x") && address2.length >= 32 && address2.length <= 44 && this.BASE58_REGEX.test(address2)) {
|
|
1936
|
-
return {
|
|
1937
|
-
name: null,
|
|
1938
|
-
address: address2,
|
|
1939
|
-
// Keep case for Solana
|
|
1940
|
-
chainType: enums_1.ChainType.SOLANA
|
|
1941
|
-
};
|
|
1942
|
-
}
|
|
1943
|
-
if ((address2.toLowerCase().endsWith(".eth") || address2.toLowerCase().endsWith(".box")) && address2.length >= 5 && // minimum: "a.eth" = 5 chars
|
|
1944
|
-
this.ENS_REGEX.test(address2)) {
|
|
1945
|
-
return {
|
|
1946
|
-
name: address2.toLowerCase(),
|
|
1947
|
-
address: null,
|
|
1948
|
-
chainType: enums_1.ChainType.EVM
|
|
1949
|
-
// ENS resolves to EVM addresses
|
|
1950
|
-
};
|
|
1951
|
-
}
|
|
1952
|
-
if (address2.toLowerCase().includes(".")) {
|
|
1953
|
-
const parts = address2.toLowerCase().split(".");
|
|
1954
|
-
if (parts.length === 2) {
|
|
1955
|
-
const [name, tld] = parts;
|
|
1956
|
-
if (this.VALID_SNS_TLDS.includes(tld) && this.SNS_NAME_REGEX.test(name) && name.length >= 1) {
|
|
1957
|
-
return {
|
|
1958
|
-
name: address2.toLowerCase(),
|
|
1959
|
-
address: null,
|
|
1960
|
-
chainType: enums_1.ChainType.SOLANA
|
|
1961
|
-
// SNS resolves to Solana addresses
|
|
1962
|
-
};
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1340
|
+
debug(message, context, data) {
|
|
1341
|
+
if (this.shouldLog(LogLevel.DEBUG)) {
|
|
1342
|
+
console.log(this.formatMessage(LogLevel.DEBUG, message, context));
|
|
1343
|
+
if (data) {
|
|
1344
|
+
console.log(data);
|
|
1965
1345
|
}
|
|
1966
|
-
return void 0;
|
|
1967
|
-
}
|
|
1968
|
-
/**
|
|
1969
|
-
* Quick EVM address validation
|
|
1970
|
-
*/
|
|
1971
|
-
static isValidEVMAddress(address2) {
|
|
1972
|
-
return this.EVM_REGEX.test(address2);
|
|
1973
|
-
}
|
|
1974
|
-
/**
|
|
1975
|
-
* Quick Solana address validation
|
|
1976
|
-
*/
|
|
1977
|
-
static isValidSolanaAddress(address2) {
|
|
1978
|
-
return !address2.startsWith("0x") && address2.length >= 32 && address2.length <= 44 && this.BASE58_REGEX.test(address2);
|
|
1979
|
-
}
|
|
1980
|
-
/**
|
|
1981
|
-
* Quick ENS name validation
|
|
1982
|
-
*/
|
|
1983
|
-
static isValidENSName(address2) {
|
|
1984
|
-
return (address2.toLowerCase().endsWith(".eth") || address2.toLowerCase().endsWith(".box")) && address2.length >= 5 && this.ENS_REGEX.test(address2);
|
|
1985
|
-
}
|
|
1986
|
-
/**
|
|
1987
|
-
* Quick SNS name validation
|
|
1988
|
-
*/
|
|
1989
|
-
static isValidSNSName(address2) {
|
|
1990
|
-
if (!address2.toLowerCase().includes("."))
|
|
1991
|
-
return false;
|
|
1992
|
-
const parts = address2.toLowerCase().split(".");
|
|
1993
|
-
if (parts.length !== 2)
|
|
1994
|
-
return false;
|
|
1995
|
-
const [name, tld] = parts;
|
|
1996
|
-
return this.VALID_SNS_TLDS.includes(tld) && this.SNS_NAME_REGEX.test(name) && name.length >= 1;
|
|
1997
1346
|
}
|
|
1998
1347
|
}
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
"bonk",
|
|
2009
|
-
"coin",
|
|
2010
|
-
"dao",
|
|
2011
|
-
"defi",
|
|
2012
|
-
"gm",
|
|
2013
|
-
"poor",
|
|
2014
|
-
"pump",
|
|
2015
|
-
"shdw",
|
|
2016
|
-
"stepn",
|
|
2017
|
-
"web3"
|
|
2018
|
-
];
|
|
2019
|
-
return web3UsernameValidator;
|
|
2020
|
-
}
|
|
2021
|
-
var typeValidation = {};
|
|
2022
|
-
var hasRequiredTypeValidation;
|
|
2023
|
-
function requireTypeValidation() {
|
|
2024
|
-
if (hasRequiredTypeValidation) return typeValidation;
|
|
2025
|
-
hasRequiredTypeValidation = 1;
|
|
2026
|
-
(function(exports$1) {
|
|
2027
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
2028
|
-
exports$1.parseJson = exports$1.createAssertion = exports$1.isUrl = exports$1.isEmail = exports$1.isValidDate = exports$1.isErrorResponse = exports$1.isSuccessResponse = exports$1.isApiResponse = exports$1.optional = exports$1.validateArray = exports$1.hasRequiredProperties = exports$1.isNullish = exports$1.isArray = exports$1.isObject = exports$1.isBoolean = exports$1.isNumber = exports$1.isString = exports$1.createValidator = void 0;
|
|
2029
|
-
const createValidator = (validationFn, typeName) => {
|
|
2030
|
-
return (data) => {
|
|
2031
|
-
try {
|
|
2032
|
-
if (validationFn(data)) {
|
|
2033
|
-
return { isValid: true, data };
|
|
2034
|
-
}
|
|
2035
|
-
return { isValid: false, error: `Invalid ${typeName}`, data: null };
|
|
2036
|
-
} catch (error) {
|
|
2037
|
-
return {
|
|
2038
|
-
isValid: false,
|
|
2039
|
-
error: `Validation error for ${typeName}: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
2040
|
-
data: null
|
|
2041
|
-
};
|
|
2042
|
-
}
|
|
2043
|
-
};
|
|
2044
|
-
};
|
|
2045
|
-
exports$1.createValidator = createValidator;
|
|
2046
|
-
const isString = (value) => typeof value === "string";
|
|
2047
|
-
exports$1.isString = isString;
|
|
2048
|
-
const isNumber = (value) => typeof value === "number" && !isNaN(value);
|
|
2049
|
-
exports$1.isNumber = isNumber;
|
|
2050
|
-
const isBoolean = (value) => typeof value === "boolean";
|
|
2051
|
-
exports$1.isBoolean = isBoolean;
|
|
2052
|
-
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2053
|
-
exports$1.isObject = isObject;
|
|
2054
|
-
const isArray = (value) => Array.isArray(value);
|
|
2055
|
-
exports$1.isArray = isArray;
|
|
2056
|
-
const isNullish = (value) => value === null || value === void 0;
|
|
2057
|
-
exports$1.isNullish = isNullish;
|
|
2058
|
-
const hasRequiredProperties = (obj, requiredProps) => {
|
|
2059
|
-
if (!(0, exports$1.isObject)(obj))
|
|
2060
|
-
return false;
|
|
2061
|
-
return requiredProps.every((prop) => prop in obj);
|
|
2062
|
-
};
|
|
2063
|
-
exports$1.hasRequiredProperties = hasRequiredProperties;
|
|
2064
|
-
const validateArray = (data, itemValidator) => {
|
|
2065
|
-
if (!(0, exports$1.isArray)(data))
|
|
2066
|
-
return false;
|
|
2067
|
-
return data.every(itemValidator);
|
|
2068
|
-
};
|
|
2069
|
-
exports$1.validateArray = validateArray;
|
|
2070
|
-
const optional = (validator) => (value) => {
|
|
2071
|
-
return value === void 0 || validator(value);
|
|
2072
|
-
};
|
|
2073
|
-
exports$1.optional = optional;
|
|
2074
|
-
const isApiResponse = (data) => {
|
|
2075
|
-
return (0, exports$1.isObject)(data) && (0, exports$1.isBoolean)(data.success);
|
|
2076
|
-
};
|
|
2077
|
-
exports$1.isApiResponse = isApiResponse;
|
|
2078
|
-
const isSuccessResponse = (data, dataValidator) => {
|
|
2079
|
-
if (!(0, exports$1.isApiResponse)(data) || !data.success)
|
|
2080
|
-
return false;
|
|
2081
|
-
if (dataValidator && "data" in data) {
|
|
2082
|
-
return dataValidator(data.data);
|
|
2083
|
-
}
|
|
2084
|
-
return true;
|
|
2085
|
-
};
|
|
2086
|
-
exports$1.isSuccessResponse = isSuccessResponse;
|
|
2087
|
-
const isErrorResponse = (data) => {
|
|
2088
|
-
return (0, exports$1.isApiResponse)(data) && !data.success && "error" in data && (0, exports$1.isString)(data.error);
|
|
2089
|
-
};
|
|
2090
|
-
exports$1.isErrorResponse = isErrorResponse;
|
|
2091
|
-
const isValidDate = (value) => {
|
|
2092
|
-
if (!(0, exports$1.isString)(value))
|
|
2093
|
-
return false;
|
|
2094
|
-
const date2 = new Date(value);
|
|
2095
|
-
return !isNaN(date2.getTime());
|
|
2096
|
-
};
|
|
2097
|
-
exports$1.isValidDate = isValidDate;
|
|
2098
|
-
const isEmail = (value) => {
|
|
2099
|
-
if (!(0, exports$1.isString)(value))
|
|
2100
|
-
return false;
|
|
2101
|
-
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
2102
|
-
return emailRegex.test(value);
|
|
2103
|
-
};
|
|
2104
|
-
exports$1.isEmail = isEmail;
|
|
2105
|
-
const isUrl = (value) => {
|
|
2106
|
-
if (!(0, exports$1.isString)(value))
|
|
2107
|
-
return false;
|
|
2108
|
-
try {
|
|
2109
|
-
new URL(value);
|
|
2110
|
-
return true;
|
|
2111
|
-
} catch {
|
|
2112
|
-
return false;
|
|
2113
|
-
}
|
|
2114
|
-
};
|
|
2115
|
-
exports$1.isUrl = isUrl;
|
|
2116
|
-
const createAssertion = (validator, typeName) => {
|
|
2117
|
-
return (data, context = typeName) => {
|
|
2118
|
-
if (!validator(data)) {
|
|
2119
|
-
throw new TypeError(`Invalid ${context}: expected ${typeName}`);
|
|
2120
|
-
}
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
exports$1.createAssertion = createAssertion;
|
|
2124
|
-
const parseJson = (jsonString, validator) => {
|
|
2125
|
-
try {
|
|
2126
|
-
const parsed = JSON.parse(jsonString);
|
|
2127
|
-
if (validator) {
|
|
2128
|
-
if (validator(parsed)) {
|
|
2129
|
-
return { isValid: true, data: parsed };
|
|
2130
|
-
}
|
|
2131
|
-
return {
|
|
2132
|
-
isValid: false,
|
|
2133
|
-
error: "Parsed JSON does not match expected type",
|
|
2134
|
-
data: null
|
|
2135
|
-
};
|
|
2136
|
-
}
|
|
2137
|
-
return { isValid: true, data: parsed };
|
|
2138
|
-
} catch (error) {
|
|
2139
|
-
return {
|
|
2140
|
-
isValid: false,
|
|
2141
|
-
error: `JSON parse error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
2142
|
-
data: null
|
|
2143
|
-
};
|
|
2144
|
-
}
|
|
2145
|
-
};
|
|
2146
|
-
exports$1.parseJson = parseJson;
|
|
2147
|
-
})(typeValidation);
|
|
2148
|
-
return typeValidation;
|
|
2149
|
-
}
|
|
2150
|
-
var eventHelpers = {};
|
|
2151
|
-
var hasRequiredEventHelpers;
|
|
2152
|
-
function requireEventHelpers() {
|
|
2153
|
-
if (hasRequiredEventHelpers) return eventHelpers;
|
|
2154
|
-
hasRequiredEventHelpers = 1;
|
|
2155
|
-
Object.defineProperty(eventHelpers, "__esModule", { value: true });
|
|
2156
|
-
eventHelpers.createMultiChainId = createMultiChainId;
|
|
2157
|
-
eventHelpers.createUserMultiChainId = createUserMultiChainId;
|
|
2158
|
-
eventHelpers.createChainStatsId = createChainStatsId;
|
|
2159
|
-
eventHelpers.createDelegationId = createDelegationId;
|
|
2160
|
-
eventHelpers.normalizeAddress = normalizeAddress;
|
|
2161
|
-
eventHelpers.formatBigInt = formatBigInt;
|
|
2162
|
-
eventHelpers.isZeroAddress = isZeroAddress;
|
|
2163
|
-
eventHelpers.isTestNet = isTestNet;
|
|
2164
|
-
eventHelpers.validateEventArgs = validateEventArgs;
|
|
2165
|
-
function createMultiChainId(chainId, txHash, logIndex) {
|
|
2166
|
-
return `${chainId}-${txHash}-${logIndex}`;
|
|
2167
|
-
}
|
|
2168
|
-
function createUserMultiChainId(chainId, address2) {
|
|
2169
|
-
return `${chainId}-${address2.toLowerCase()}`;
|
|
2170
|
-
}
|
|
2171
|
-
function createChainStatsId(chainId) {
|
|
2172
|
-
return `${chainId}-global`;
|
|
2173
|
-
}
|
|
2174
|
-
function createDelegationId(delegatorAddress, isTestNet2) {
|
|
2175
|
-
return `${delegatorAddress.toLowerCase()}-${isTestNet2}`;
|
|
2176
|
-
}
|
|
2177
|
-
function normalizeAddress(address2) {
|
|
2178
|
-
return address2.toLowerCase();
|
|
2179
|
-
}
|
|
2180
|
-
function formatBigInt(value, decimals = 18) {
|
|
2181
|
-
const divisor = BigInt(10 ** decimals);
|
|
2182
|
-
const whole = value / divisor;
|
|
2183
|
-
const fraction = value % divisor;
|
|
2184
|
-
if (fraction === 0n) {
|
|
2185
|
-
return whole.toString();
|
|
2186
|
-
}
|
|
2187
|
-
return `${whole}.${fraction.toString().padStart(decimals, "0").replace(/0+$/, "")}`;
|
|
2188
|
-
}
|
|
2189
|
-
function isZeroAddress(address2) {
|
|
2190
|
-
return address2.toLowerCase() === "0x0000000000000000000000000000000000000000";
|
|
2191
|
-
}
|
|
2192
|
-
function isTestNet(chainId) {
|
|
2193
|
-
const evmTestnets = /* @__PURE__ */ new Set([
|
|
2194
|
-
31337,
|
|
2195
|
-
// Hardhat (local development)
|
|
2196
|
-
11155111,
|
|
2197
|
-
// Ethereum Sepolia
|
|
2198
|
-
80001,
|
|
2199
|
-
// Polygon Mumbai (if configured)
|
|
2200
|
-
80002,
|
|
2201
|
-
// Polygon Amoy (if configured)
|
|
2202
|
-
421614,
|
|
2203
|
-
// Arbitrum Sepolia (if configured)
|
|
2204
|
-
11155420,
|
|
2205
|
-
// OP Sepolia (if configured)
|
|
2206
|
-
84532,
|
|
2207
|
-
// Base Sepolia (if configured)
|
|
2208
|
-
43113
|
|
2209
|
-
// Avalanche Fuji (if configured)
|
|
2210
|
-
]);
|
|
2211
|
-
const solanaTestnets = /* @__PURE__ */ new Set([
|
|
2212
|
-
-102,
|
|
2213
|
-
// Solana Devnet
|
|
2214
|
-
-103,
|
|
2215
|
-
// Solana Testnet
|
|
2216
|
-
-104
|
|
2217
|
-
// Solana Localnet
|
|
2218
|
-
]);
|
|
2219
|
-
return evmTestnets.has(chainId) || solanaTestnets.has(chainId);
|
|
2220
|
-
}
|
|
2221
|
-
function validateEventArgs(args, requiredFields) {
|
|
2222
|
-
for (const field of requiredFields) {
|
|
2223
|
-
if (args[field] === void 0 || args[field] === null) {
|
|
2224
|
-
console.error(`❌ Missing required field: ${String(field)}`);
|
|
2225
|
-
return false;
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
return true;
|
|
2229
|
-
}
|
|
2230
|
-
return eventHelpers;
|
|
2231
|
-
}
|
|
2232
|
-
var auth = {};
|
|
2233
|
-
var hasRequiredAuth;
|
|
2234
|
-
function requireAuth() {
|
|
2235
|
-
if (hasRequiredAuth) return auth;
|
|
2236
|
-
hasRequiredAuth = 1;
|
|
2237
|
-
Object.defineProperty(auth, "__esModule", { value: true });
|
|
2238
|
-
auth.generateAuthMessage = generateAuthMessage;
|
|
2239
|
-
auth.isAuthExpired = isAuthExpired;
|
|
2240
|
-
auth.getAuthStatusText = getAuthStatusText;
|
|
2241
|
-
auth.canAccessProtectedFeatures = canAccessProtectedFeatures;
|
|
2242
|
-
auth.isAuthStatusConnected = isAuthStatusConnected;
|
|
2243
|
-
auth.generateNonce = generateNonce;
|
|
2244
|
-
auth.extractNonceFromMessage = extractNonceFromMessage;
|
|
2245
|
-
auth.isValidNonce = isValidNonce;
|
|
2246
|
-
const enums_1 = requireEnums();
|
|
2247
|
-
function generateAuthMessage(emailDomain, nonce) {
|
|
2248
|
-
const actualNonce = nonce || `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2249
|
-
return `Authenticate with ${emailDomain}
|
|
2250
|
-
Nonce: ${actualNonce}`;
|
|
2251
|
-
}
|
|
2252
|
-
function isAuthExpired(createdAt, expirationHours = 24) {
|
|
2253
|
-
const expirationTime = new Date(createdAt.getTime() + expirationHours * 60 * 60 * 1e3);
|
|
2254
|
-
return /* @__PURE__ */ new Date() > expirationTime;
|
|
2255
|
-
}
|
|
2256
|
-
function getAuthStatusText(status) {
|
|
2257
|
-
switch (status) {
|
|
2258
|
-
case enums_1.AuthStatus.DISCONNECTED:
|
|
2259
|
-
return "Not connected";
|
|
2260
|
-
case enums_1.AuthStatus.CONNECTED:
|
|
2261
|
-
return "Connected - Please verify";
|
|
2262
|
-
case enums_1.AuthStatus.VERIFIED:
|
|
2263
|
-
return "Authenticated";
|
|
2264
|
-
default:
|
|
2265
|
-
return "Unknown status";
|
|
2266
|
-
}
|
|
2267
|
-
}
|
|
2268
|
-
function canAccessProtectedFeatures(status) {
|
|
2269
|
-
return status === enums_1.AuthStatus.VERIFIED;
|
|
2270
|
-
}
|
|
2271
|
-
function isAuthStatusConnected(status) {
|
|
2272
|
-
return status === enums_1.AuthStatus.CONNECTED || status === enums_1.AuthStatus.VERIFIED;
|
|
2273
|
-
}
|
|
2274
|
-
function generateNonce() {
|
|
2275
|
-
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2276
|
-
}
|
|
2277
|
-
function extractNonceFromMessage(message) {
|
|
2278
|
-
const match = message.match(/Nonce:\s*(.+)$/m);
|
|
2279
|
-
return match ? match[1].trim() : void 0;
|
|
2280
|
-
}
|
|
2281
|
-
function isValidNonce(nonce) {
|
|
2282
|
-
if (!nonce || typeof nonce !== "string") {
|
|
2283
|
-
return false;
|
|
2284
|
-
}
|
|
2285
|
-
if (nonce.length < 10) {
|
|
2286
|
-
return false;
|
|
2287
|
-
}
|
|
2288
|
-
const parts = nonce.split("-");
|
|
2289
|
-
if (parts.length >= 2) {
|
|
2290
|
-
const timestamp = parseInt(parts[0], 10);
|
|
2291
|
-
if (!isNaN(timestamp)) {
|
|
2292
|
-
const oneDayAgo = Date.now() - 24 * 60 * 60 * 1e3;
|
|
2293
|
-
if (timestamp < oneDayAgo) {
|
|
2294
|
-
return false;
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
return true;
|
|
2299
|
-
}
|
|
2300
|
-
return auth;
|
|
2301
|
-
}
|
|
2302
|
-
var adminEmails = {};
|
|
2303
|
-
var hasRequiredAdminEmails;
|
|
2304
|
-
function requireAdminEmails() {
|
|
2305
|
-
if (hasRequiredAdminEmails) return adminEmails;
|
|
2306
|
-
hasRequiredAdminEmails = 1;
|
|
2307
|
-
Object.defineProperty(adminEmails, "__esModule", { value: true });
|
|
2308
|
-
adminEmails.parseAdminEmails = parseAdminEmails;
|
|
2309
|
-
adminEmails.isAdminEmail = isAdminEmail;
|
|
2310
|
-
adminEmails.createAdminChecker = createAdminChecker;
|
|
2311
|
-
function parseAdminEmails(input) {
|
|
2312
|
-
if (!input) {
|
|
2313
|
-
return [];
|
|
2314
|
-
}
|
|
2315
|
-
return input.split(",").map((email) => email.trim().toLowerCase()).filter((email) => email.length > 0 && email.includes("@"));
|
|
2316
|
-
}
|
|
2317
|
-
function isAdminEmail(email, adminEmails2) {
|
|
2318
|
-
if (!email) {
|
|
2319
|
-
return false;
|
|
2320
|
-
}
|
|
2321
|
-
return adminEmails2.includes(email.toLowerCase());
|
|
2322
|
-
}
|
|
2323
|
-
function createAdminChecker(input) {
|
|
2324
|
-
const adminEmails2 = parseAdminEmails(input);
|
|
2325
|
-
return (email) => {
|
|
2326
|
-
return isAdminEmail(email, adminEmails2);
|
|
2327
|
-
};
|
|
2328
|
-
}
|
|
2329
|
-
return adminEmails;
|
|
2330
|
-
}
|
|
2331
|
-
var currency = {};
|
|
2332
|
-
var hasRequiredCurrency;
|
|
2333
|
-
function requireCurrency() {
|
|
2334
|
-
if (hasRequiredCurrency) return currency;
|
|
2335
|
-
hasRequiredCurrency = 1;
|
|
2336
|
-
(function(exports$1) {
|
|
2337
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
2338
|
-
exports$1.CLAIM_PERIOD_DAYS = exports$1.USDC_DECIMALS = void 0;
|
|
2339
|
-
exports$1.formatUSDC = formatUSDC;
|
|
2340
|
-
exports$1.parseUSDC = parseUSDC;
|
|
2341
|
-
exports$1.USDC_DECIMALS = 6;
|
|
2342
|
-
exports$1.CLAIM_PERIOD_DAYS = 60;
|
|
2343
|
-
function formatUSDC(amount) {
|
|
2344
|
-
return (amount / Math.pow(10, exports$1.USDC_DECIMALS)).toFixed(2);
|
|
2345
|
-
}
|
|
2346
|
-
function parseUSDC(amount) {
|
|
2347
|
-
return Math.floor(parseFloat(amount) * Math.pow(10, exports$1.USDC_DECIMALS));
|
|
2348
|
-
}
|
|
2349
|
-
})(currency);
|
|
2350
|
-
return currency;
|
|
2351
|
-
}
|
|
2352
|
-
var date = {};
|
|
2353
|
-
var hasRequiredDate;
|
|
2354
|
-
function requireDate() {
|
|
2355
|
-
if (hasRequiredDate) return date;
|
|
2356
|
-
hasRequiredDate = 1;
|
|
2357
|
-
Object.defineProperty(date, "__esModule", { value: true });
|
|
2358
|
-
date.formatEmailDate = formatEmailDate;
|
|
2359
|
-
date.formatTimestamp = formatTimestamp;
|
|
2360
|
-
date.formatRelativeTime = formatRelativeTime;
|
|
2361
|
-
date.parseDate = parseDate;
|
|
2362
|
-
date.isDateInRange = isDateInRange;
|
|
2363
|
-
date.addDays = addDays;
|
|
2364
|
-
date.addHours = addHours;
|
|
2365
|
-
function formatEmailDate(date2) {
|
|
2366
|
-
const dateObj = typeof date2 === "string" ? new Date(date2) : date2;
|
|
2367
|
-
if (isNaN(dateObj.getTime())) {
|
|
2368
|
-
return "Invalid date";
|
|
2369
|
-
}
|
|
2370
|
-
const now = /* @__PURE__ */ new Date();
|
|
2371
|
-
const diffMs = now.getTime() - dateObj.getTime();
|
|
2372
|
-
const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
|
|
2373
|
-
if (diffDays === 0) {
|
|
2374
|
-
return dateObj.toLocaleTimeString("en-US", {
|
|
2375
|
-
hour: "numeric",
|
|
2376
|
-
minute: "2-digit",
|
|
2377
|
-
hour12: true
|
|
2378
|
-
});
|
|
2379
|
-
}
|
|
2380
|
-
if (diffDays === 1) {
|
|
2381
|
-
return "Yesterday";
|
|
2382
|
-
}
|
|
2383
|
-
if (diffDays < 7) {
|
|
2384
|
-
return dateObj.toLocaleDateString("en-US", {
|
|
2385
|
-
weekday: "long"
|
|
2386
|
-
});
|
|
2387
|
-
}
|
|
2388
|
-
if (dateObj.getFullYear() === now.getFullYear()) {
|
|
2389
|
-
return dateObj.toLocaleDateString("en-US", {
|
|
2390
|
-
month: "short",
|
|
2391
|
-
day: "numeric"
|
|
2392
|
-
});
|
|
2393
|
-
}
|
|
2394
|
-
return dateObj.toLocaleDateString("en-US", {
|
|
2395
|
-
year: "numeric",
|
|
2396
|
-
month: "short",
|
|
2397
|
-
day: "numeric"
|
|
2398
|
-
});
|
|
2399
|
-
}
|
|
2400
|
-
function formatTimestamp(timestamp) {
|
|
2401
|
-
return new Date(timestamp).toISOString();
|
|
2402
|
-
}
|
|
2403
|
-
function formatRelativeTime(date2) {
|
|
2404
|
-
const dateObj = typeof date2 === "string" || typeof date2 === "number" ? new Date(date2) : date2;
|
|
2405
|
-
if (isNaN(dateObj.getTime())) {
|
|
2406
|
-
return "Invalid date";
|
|
2407
|
-
}
|
|
2408
|
-
const now = /* @__PURE__ */ new Date();
|
|
2409
|
-
const diffMs = now.getTime() - dateObj.getTime();
|
|
2410
|
-
const diffSeconds = Math.floor(diffMs / 1e3);
|
|
2411
|
-
const diffMinutes = Math.floor(diffSeconds / 60);
|
|
2412
|
-
const diffHours = Math.floor(diffMinutes / 60);
|
|
2413
|
-
const diffDays = Math.floor(diffHours / 24);
|
|
2414
|
-
const diffWeeks = Math.floor(diffDays / 7);
|
|
2415
|
-
const diffMonths = Math.floor(diffDays / 30);
|
|
2416
|
-
const diffYears = Math.floor(diffDays / 365);
|
|
2417
|
-
if (diffSeconds < 60) {
|
|
2418
|
-
return "just now";
|
|
2419
|
-
}
|
|
2420
|
-
if (diffMinutes < 60) {
|
|
2421
|
-
return diffMinutes === 1 ? "1 minute ago" : `${diffMinutes} minutes ago`;
|
|
2422
|
-
}
|
|
2423
|
-
if (diffHours < 24) {
|
|
2424
|
-
return diffHours === 1 ? "1 hour ago" : `${diffHours} hours ago`;
|
|
2425
|
-
}
|
|
2426
|
-
if (diffDays < 7) {
|
|
2427
|
-
return diffDays === 1 ? "1 day ago" : `${diffDays} days ago`;
|
|
2428
|
-
}
|
|
2429
|
-
if (diffWeeks < 4) {
|
|
2430
|
-
return diffWeeks === 1 ? "1 week ago" : `${diffWeeks} weeks ago`;
|
|
2431
|
-
}
|
|
2432
|
-
if (diffMonths < 12) {
|
|
2433
|
-
return diffMonths === 1 ? "1 month ago" : `${diffMonths} months ago`;
|
|
2434
|
-
}
|
|
2435
|
-
return diffYears === 1 ? "1 year ago" : `${diffYears} years ago`;
|
|
2436
|
-
}
|
|
2437
|
-
function parseDate(dateString) {
|
|
2438
|
-
try {
|
|
2439
|
-
const date2 = new Date(dateString);
|
|
2440
|
-
if (isNaN(date2.getTime())) {
|
|
2441
|
-
return null;
|
|
2442
|
-
}
|
|
2443
|
-
return date2;
|
|
2444
|
-
} catch {
|
|
2445
|
-
return null;
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
function isDateInRange(date2, startDate, endDate) {
|
|
2449
|
-
return date2 >= startDate && date2 <= endDate;
|
|
2450
|
-
}
|
|
2451
|
-
function addDays(date2, days) {
|
|
2452
|
-
const result = new Date(date2);
|
|
2453
|
-
result.setDate(result.getDate() + days);
|
|
2454
|
-
return result;
|
|
2455
|
-
}
|
|
2456
|
-
function addHours(date2, hours) {
|
|
2457
|
-
const result = new Date(date2);
|
|
2458
|
-
result.setHours(result.getHours() + hours);
|
|
2459
|
-
return result;
|
|
2460
|
-
}
|
|
2461
|
-
return date;
|
|
2462
|
-
}
|
|
2463
|
-
var string = {};
|
|
2464
|
-
var hasRequiredString;
|
|
2465
|
-
function requireString() {
|
|
2466
|
-
if (hasRequiredString) return string;
|
|
2467
|
-
hasRequiredString = 1;
|
|
2468
|
-
Object.defineProperty(string, "__esModule", { value: true });
|
|
2469
|
-
string.truncate = truncate;
|
|
2470
|
-
string.capitalize = capitalize;
|
|
2471
|
-
string.toTitleCase = toTitleCase;
|
|
2472
|
-
string.toKebabCase = toKebabCase;
|
|
2473
|
-
string.toCamelCase = toCamelCase;
|
|
2474
|
-
string.toSnakeCase = toSnakeCase;
|
|
2475
|
-
string.normalizeWhitespace = normalizeWhitespace;
|
|
2476
|
-
string.isBlank = isBlank;
|
|
2477
|
-
string.isNotBlank = isNotBlank;
|
|
2478
|
-
string.escapeHtml = escapeHtml;
|
|
2479
|
-
string.stripHtml = stripHtml;
|
|
2480
|
-
string.getInitials = getInitials;
|
|
2481
|
-
string.formatBytes = formatBytes;
|
|
2482
|
-
string.randomString = randomString;
|
|
2483
|
-
string.pluralize = pluralize;
|
|
2484
|
-
string.formatNumber = formatNumber;
|
|
2485
|
-
function truncate(str, maxLength, suffix = "...") {
|
|
2486
|
-
if (!str || str.length <= maxLength) {
|
|
2487
|
-
return str;
|
|
2488
|
-
}
|
|
2489
|
-
return str.slice(0, maxLength - suffix.length) + suffix;
|
|
2490
|
-
}
|
|
2491
|
-
function capitalize(str) {
|
|
2492
|
-
if (!str)
|
|
2493
|
-
return str;
|
|
2494
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
2495
|
-
}
|
|
2496
|
-
function toTitleCase(str) {
|
|
2497
|
-
if (!str)
|
|
2498
|
-
return str;
|
|
2499
|
-
return str.toLowerCase().split(" ").map((word) => capitalize(word)).join(" ");
|
|
2500
|
-
}
|
|
2501
|
-
function toKebabCase(str) {
|
|
2502
|
-
if (!str)
|
|
2503
|
-
return str;
|
|
2504
|
-
return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
2505
|
-
}
|
|
2506
|
-
function toCamelCase(str) {
|
|
2507
|
-
if (!str)
|
|
2508
|
-
return str;
|
|
2509
|
-
return str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "").replace(/^./, (char) => char.toLowerCase());
|
|
2510
|
-
}
|
|
2511
|
-
function toSnakeCase(str) {
|
|
2512
|
-
if (!str)
|
|
2513
|
-
return str;
|
|
2514
|
-
return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase();
|
|
2515
|
-
}
|
|
2516
|
-
function normalizeWhitespace(str) {
|
|
2517
|
-
if (!str)
|
|
2518
|
-
return str;
|
|
2519
|
-
return str.replace(/\s+/g, " ").trim();
|
|
2520
|
-
}
|
|
2521
|
-
function isBlank(str) {
|
|
2522
|
-
return !str || str.trim().length === 0;
|
|
2523
|
-
}
|
|
2524
|
-
function isNotBlank(str) {
|
|
2525
|
-
return !isBlank(str);
|
|
2526
|
-
}
|
|
2527
|
-
function escapeHtml(str) {
|
|
2528
|
-
if (!str)
|
|
2529
|
-
return str;
|
|
2530
|
-
const htmlEscapes = {
|
|
2531
|
-
"&": "&",
|
|
2532
|
-
"<": "<",
|
|
2533
|
-
">": ">",
|
|
2534
|
-
'"': """,
|
|
2535
|
-
"'": "'"
|
|
1348
|
+
/**
|
|
1349
|
+
* Create a contextual logger that automatically includes context in all calls
|
|
1350
|
+
*/
|
|
1351
|
+
withContext(context) {
|
|
1352
|
+
return {
|
|
1353
|
+
error: (message, data) => this.error(message, context, data),
|
|
1354
|
+
warn: (message, data) => this.warn(message, context, data),
|
|
1355
|
+
info: (message, data) => this.info(message, context, data),
|
|
1356
|
+
debug: (message, data) => this.debug(message, context, data)
|
|
2536
1357
|
};
|
|
2537
|
-
return str.replace(/[&<>"']/g, (char) => htmlEscapes[char]);
|
|
2538
|
-
}
|
|
2539
|
-
function stripHtml(str) {
|
|
2540
|
-
if (!str)
|
|
2541
|
-
return str;
|
|
2542
|
-
return str.replace(/<[^>]*>/g, "");
|
|
2543
|
-
}
|
|
2544
|
-
function getInitials(name, maxInitials = 2) {
|
|
2545
|
-
if (!name)
|
|
2546
|
-
return "";
|
|
2547
|
-
const words = name.trim().split(/\s+/);
|
|
2548
|
-
const initials = words.slice(0, maxInitials).map((word) => word.charAt(0).toUpperCase()).join("");
|
|
2549
|
-
return initials;
|
|
2550
1358
|
}
|
|
2551
|
-
function formatBytes(bytes, decimals = 2) {
|
|
2552
|
-
if (bytes === 0)
|
|
2553
|
-
return "0 Bytes";
|
|
2554
|
-
const k = 1024;
|
|
2555
|
-
const dm = decimals < 0 ? 0 : decimals;
|
|
2556
|
-
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB"];
|
|
2557
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
2558
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
|
|
2559
|
-
}
|
|
2560
|
-
function randomString(length, charset = "alphanumeric") {
|
|
2561
|
-
let chars;
|
|
2562
|
-
switch (charset) {
|
|
2563
|
-
case "alpha":
|
|
2564
|
-
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2565
|
-
break;
|
|
2566
|
-
case "numeric":
|
|
2567
|
-
chars = "0123456789";
|
|
2568
|
-
break;
|
|
2569
|
-
case "alphanumeric":
|
|
2570
|
-
chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
|
2571
|
-
break;
|
|
2572
|
-
case "hex":
|
|
2573
|
-
chars = "0123456789abcdef";
|
|
2574
|
-
break;
|
|
2575
|
-
default:
|
|
2576
|
-
chars = charset;
|
|
2577
|
-
}
|
|
2578
|
-
let result = "";
|
|
2579
|
-
for (let i = 0; i < length; i++) {
|
|
2580
|
-
result += chars.charAt(Math.floor(Math.random() * chars.length));
|
|
2581
|
-
}
|
|
2582
|
-
return result;
|
|
2583
|
-
}
|
|
2584
|
-
function pluralize(count, singular, plural) {
|
|
2585
|
-
if (count === 1) {
|
|
2586
|
-
return singular;
|
|
2587
|
-
}
|
|
2588
|
-
return plural || `${singular}s`;
|
|
2589
|
-
}
|
|
2590
|
-
function formatNumber(num) {
|
|
2591
|
-
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
2592
|
-
}
|
|
2593
|
-
return string;
|
|
2594
|
-
}
|
|
2595
|
-
var application = {};
|
|
2596
|
-
var hasRequiredApplication;
|
|
2597
|
-
function requireApplication() {
|
|
2598
|
-
if (hasRequiredApplication) return application;
|
|
2599
|
-
hasRequiredApplication = 1;
|
|
2600
|
-
Object.defineProperty(application, "__esModule", { value: true });
|
|
2601
|
-
application.Z_INDEX = application.ANIMATION = application.NETWORK_IDS = application.WALLET_NAMES = application.CONTACT_INFO = application.ROUTES = application.SUCCESS_MESSAGES = application.ERROR_MESSAGES = application.TIME_FORMAT = application.SUBSCRIPTION_TIERS = application.EMAIL_CONFIG = application.STORAGE_KEYS = application.CHAIN_TYPE = application.AUTH_STATUS = application.API_RETRY_DELAY = application.API_RETRY_ATTEMPTS = application.API_TIMEOUT = void 0;
|
|
2602
|
-
const API_TIMEOUT = 3e4;
|
|
2603
|
-
application.API_TIMEOUT = API_TIMEOUT;
|
|
2604
|
-
const API_RETRY_ATTEMPTS = 3;
|
|
2605
|
-
application.API_RETRY_ATTEMPTS = API_RETRY_ATTEMPTS;
|
|
2606
|
-
const API_RETRY_DELAY = 1e3;
|
|
2607
|
-
application.API_RETRY_DELAY = API_RETRY_DELAY;
|
|
2608
|
-
const AUTH_STATUS = {
|
|
2609
|
-
DISCONNECTED: "disconnected",
|
|
2610
|
-
CONNECTED: "connected",
|
|
2611
|
-
VERIFIED: "verified"
|
|
2612
|
-
};
|
|
2613
|
-
application.AUTH_STATUS = AUTH_STATUS;
|
|
2614
|
-
const CHAIN_TYPE = {
|
|
2615
|
-
EVM: "evm",
|
|
2616
|
-
SOLANA: "solana",
|
|
2617
|
-
UNKNOWN: "unknown"
|
|
2618
|
-
};
|
|
2619
|
-
application.CHAIN_TYPE = CHAIN_TYPE;
|
|
2620
|
-
const STORAGE_KEYS = {
|
|
2621
|
-
AUTH_TOKEN: "authToken",
|
|
2622
|
-
USER_DATA: "userData",
|
|
2623
|
-
THEME: "theme",
|
|
2624
|
-
EMAIL_CACHE: "emailCache",
|
|
2625
|
-
WALLET_ADDRESS: "walletAddress",
|
|
2626
|
-
CHAIN_TYPE: "chainType"
|
|
2627
|
-
};
|
|
2628
|
-
application.STORAGE_KEYS = STORAGE_KEYS;
|
|
2629
|
-
const EMAIL_CONFIG = {
|
|
2630
|
-
MAX_ATTACHMENT_SIZE: 25 * 1024 * 1024,
|
|
2631
|
-
// 25MB
|
|
2632
|
-
MAX_RECIPIENTS: 100,
|
|
2633
|
-
ITEMS_PER_PAGE: 50,
|
|
2634
|
-
REFRESH_INTERVAL: 6e4,
|
|
2635
|
-
// 1 minute
|
|
2636
|
-
NOTIFICATION_COOLDOWN: 3e5
|
|
2637
|
-
// 5 minutes
|
|
2638
|
-
};
|
|
2639
|
-
application.EMAIL_CONFIG = EMAIL_CONFIG;
|
|
2640
|
-
const SUBSCRIPTION_TIERS = {
|
|
2641
|
-
FREE: "free",
|
|
2642
|
-
BASIC: "basic",
|
|
2643
|
-
PRO: "pro",
|
|
2644
|
-
ENTERPRISE: "enterprise"
|
|
2645
|
-
};
|
|
2646
|
-
application.SUBSCRIPTION_TIERS = SUBSCRIPTION_TIERS;
|
|
2647
|
-
const TIME_FORMAT = {
|
|
2648
|
-
SHORT_DATE: "MMM d",
|
|
2649
|
-
FULL_DATE: "MMM d, yyyy",
|
|
2650
|
-
DATE_TIME: "MMM d, yyyy h:mm a",
|
|
2651
|
-
RELATIVE: "relative"
|
|
2652
|
-
};
|
|
2653
|
-
application.TIME_FORMAT = TIME_FORMAT;
|
|
2654
|
-
const ERROR_MESSAGES = {
|
|
2655
|
-
WALLET_NOT_CONNECTED: "Please connect your wallet first",
|
|
2656
|
-
INVALID_ADDRESS: "Please enter a valid address",
|
|
2657
|
-
NETWORK_ERROR: "Network error. Please try again.",
|
|
2658
|
-
AUTHENTICATION_FAILED: "Authentication failed. Please sign in again.",
|
|
2659
|
-
TRANSACTION_FAILED: "Transaction failed. Please try again.",
|
|
2660
|
-
INSUFFICIENT_FUNDS: "Insufficient funds for this operation",
|
|
2661
|
-
RATE_LIMITED: "Too many requests. Please wait a moment.",
|
|
2662
|
-
SESSION_EXPIRED: "Your session has expired. Please sign in again.",
|
|
2663
|
-
PERMISSION_DENIED: "You do not have permission to perform this action"
|
|
2664
|
-
};
|
|
2665
|
-
application.ERROR_MESSAGES = ERROR_MESSAGES;
|
|
2666
|
-
const SUCCESS_MESSAGES = {
|
|
2667
|
-
EMAIL_SENT: "Email sent successfully",
|
|
2668
|
-
EMAIL_DELETED: "Email deleted successfully",
|
|
2669
|
-
PREFERENCES_SAVED: "Preferences saved successfully",
|
|
2670
|
-
WALLET_CONNECTED: "Wallet connected successfully",
|
|
2671
|
-
AUTHENTICATION_SUCCESS: "Authentication successful",
|
|
2672
|
-
DELEGATION_SUCCESS: "Delegation successful",
|
|
2673
|
-
SUBSCRIPTION_ACTIVATED: "Subscription activated successfully"
|
|
2674
|
-
};
|
|
2675
|
-
application.SUCCESS_MESSAGES = SUCCESS_MESSAGES;
|
|
2676
|
-
const ROUTES = {
|
|
2677
|
-
HOME: "/",
|
|
2678
|
-
ABOUT: "/about",
|
|
2679
|
-
CONNECT: "/connect",
|
|
2680
|
-
MAIL: "/mail",
|
|
2681
|
-
COMPOSE: "/mail/compose",
|
|
2682
|
-
PREFERENCES: "/preferences",
|
|
2683
|
-
TERMS: "/terms",
|
|
2684
|
-
PRIVACY: "/privacy",
|
|
2685
|
-
DOCUMENTATION: "/document",
|
|
2686
|
-
WEB3_USERS: "/web3-users",
|
|
2687
|
-
WEB3_PROJECTS: "/web3-projects"
|
|
2688
|
-
};
|
|
2689
|
-
application.ROUTES = ROUTES;
|
|
2690
|
-
const CONTACT_INFO = {
|
|
2691
|
-
SUPPORT_EMAIL: "support@sudobility.com",
|
|
2692
|
-
CONTACT_EMAIL: "info@sudobility.com"
|
|
2693
|
-
};
|
|
2694
|
-
application.CONTACT_INFO = CONTACT_INFO;
|
|
2695
|
-
const WALLET_NAMES = {
|
|
2696
|
-
METAMASK: "MetaMask",
|
|
2697
|
-
WALLETCONNECT: "WalletConnect",
|
|
2698
|
-
COINBASE: "Coinbase Wallet",
|
|
2699
|
-
PHANTOM: "Phantom",
|
|
2700
|
-
SAFE: "Safe",
|
|
2701
|
-
ARGENT: "Argent",
|
|
2702
|
-
RAINBOW: "Rainbow",
|
|
2703
|
-
TRUST: "Trust Wallet",
|
|
2704
|
-
LEDGER: "Ledger",
|
|
2705
|
-
TREZOR: "Trezor"
|
|
2706
|
-
};
|
|
2707
|
-
application.WALLET_NAMES = WALLET_NAMES;
|
|
2708
|
-
const NETWORK_IDS = {
|
|
2709
|
-
ETHEREUM_MAINNET: 1,
|
|
2710
|
-
POLYGON: 137,
|
|
2711
|
-
ARBITRUM: 42161,
|
|
2712
|
-
OPTIMISM: 10,
|
|
2713
|
-
BASE: 8453,
|
|
2714
|
-
SOLANA_MAINNET: "mainnet-beta",
|
|
2715
|
-
SOLANA_DEVNET: "devnet"
|
|
2716
|
-
};
|
|
2717
|
-
application.NETWORK_IDS = NETWORK_IDS;
|
|
2718
|
-
const ANIMATION = {
|
|
2719
|
-
FAST: 150,
|
|
2720
|
-
NORMAL: 300,
|
|
2721
|
-
SLOW: 500,
|
|
2722
|
-
VERY_SLOW: 1e3
|
|
2723
|
-
};
|
|
2724
|
-
application.ANIMATION = ANIMATION;
|
|
2725
|
-
const Z_INDEX = {
|
|
2726
|
-
DROPDOWN: 10,
|
|
2727
|
-
OVERLAY: 20,
|
|
2728
|
-
MODAL: 30,
|
|
2729
|
-
POPOVER: 40,
|
|
2730
|
-
TOOLTIP: 50,
|
|
2731
|
-
TOAST: 60
|
|
2732
|
-
};
|
|
2733
|
-
application.Z_INDEX = Z_INDEX;
|
|
2734
|
-
return application;
|
|
2735
|
-
}
|
|
2736
|
-
var statusValues = {};
|
|
2737
|
-
var hasRequiredStatusValues;
|
|
2738
|
-
function requireStatusValues() {
|
|
2739
|
-
if (hasRequiredStatusValues) return statusValues;
|
|
2740
|
-
hasRequiredStatusValues = 1;
|
|
2741
|
-
Object.defineProperty(statusValues, "__esModule", { value: true });
|
|
2742
|
-
statusValues.STATUS_VALUES = void 0;
|
|
2743
|
-
statusValues.STATUS_VALUES = {
|
|
2744
|
-
SUCCESS: "success",
|
|
2745
|
-
PENDING: "pending",
|
|
2746
|
-
FAILED: "failed",
|
|
2747
|
-
ERROR: "error"
|
|
2748
|
-
};
|
|
2749
|
-
return statusValues;
|
|
2750
|
-
}
|
|
2751
|
-
var logger = {};
|
|
2752
|
-
var hasRequiredLogger;
|
|
2753
|
-
function requireLogger() {
|
|
2754
|
-
if (hasRequiredLogger) return logger;
|
|
2755
|
-
hasRequiredLogger = 1;
|
|
2756
|
-
Object.defineProperty(logger, "__esModule", { value: true });
|
|
2757
|
-
logger.storageLogger = logger.ensLogger = logger.contractLogger = logger.apiLogger = logger.authLogger = logger.logger = logger.LogLevel = void 0;
|
|
2758
|
-
var LogLevel;
|
|
2759
|
-
(function(LogLevel2) {
|
|
2760
|
-
LogLevel2["ERROR"] = "error";
|
|
2761
|
-
LogLevel2["WARN"] = "warn";
|
|
2762
|
-
LogLevel2["INFO"] = "info";
|
|
2763
|
-
LogLevel2["DEBUG"] = "debug";
|
|
2764
|
-
})(LogLevel || (logger.LogLevel = LogLevel = {}));
|
|
2765
|
-
class Logger {
|
|
2766
|
-
constructor() {
|
|
2767
|
-
this.isDevelopment = process.env.NODE_ENV === "development";
|
|
2768
|
-
}
|
|
2769
|
-
formatTimestamp() {
|
|
2770
|
-
return (/* @__PURE__ */ new Date()).toISOString();
|
|
2771
|
-
}
|
|
2772
|
-
formatMessage(_level, message, context) {
|
|
2773
|
-
const timestamp = this.formatTimestamp();
|
|
2774
|
-
const contextStr = context ? ` [${context}]` : "";
|
|
2775
|
-
return `[${timestamp}]${contextStr} ${message}`;
|
|
2776
|
-
}
|
|
2777
|
-
shouldLog(level) {
|
|
2778
|
-
if (!this.isDevelopment) {
|
|
2779
|
-
return level === LogLevel.ERROR || level === LogLevel.WARN;
|
|
2780
|
-
}
|
|
2781
|
-
return true;
|
|
2782
|
-
}
|
|
2783
|
-
error(message, context, data) {
|
|
2784
|
-
if (this.shouldLog(LogLevel.ERROR)) {
|
|
2785
|
-
console.error(this.formatMessage(LogLevel.ERROR, message, context));
|
|
2786
|
-
if (data) {
|
|
2787
|
-
console.error(data);
|
|
2788
|
-
}
|
|
2789
|
-
}
|
|
2790
|
-
}
|
|
2791
|
-
warn(message, context, data) {
|
|
2792
|
-
if (this.shouldLog(LogLevel.WARN)) {
|
|
2793
|
-
console.warn(this.formatMessage(LogLevel.WARN, message, context));
|
|
2794
|
-
if (data) {
|
|
2795
|
-
console.warn(data);
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
}
|
|
2799
|
-
info(message, context, data) {
|
|
2800
|
-
if (this.shouldLog(LogLevel.INFO)) {
|
|
2801
|
-
console.log(this.formatMessage(LogLevel.INFO, message, context));
|
|
2802
|
-
if (data) {
|
|
2803
|
-
console.log(data);
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
debug(message, context, data) {
|
|
2808
|
-
if (this.shouldLog(LogLevel.DEBUG)) {
|
|
2809
|
-
console.log(this.formatMessage(LogLevel.DEBUG, message, context));
|
|
2810
|
-
if (data) {
|
|
2811
|
-
console.log(data);
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
}
|
|
2815
|
-
/**
|
|
2816
|
-
* Create a contextual logger that automatically includes context in all calls
|
|
2817
|
-
*/
|
|
2818
|
-
withContext(context) {
|
|
2819
|
-
return {
|
|
2820
|
-
error: (message, data) => this.error(message, context, data),
|
|
2821
|
-
warn: (message, data) => this.warn(message, context, data),
|
|
2822
|
-
info: (message, data) => this.info(message, context, data),
|
|
2823
|
-
debug: (message, data) => this.debug(message, context, data)
|
|
2824
|
-
};
|
|
2825
|
-
}
|
|
2826
|
-
}
|
|
2827
|
-
const logger$1 = new Logger();
|
|
2828
|
-
logger.logger = logger$1;
|
|
2829
|
-
const authLogger = logger$1.withContext("AUTH");
|
|
2830
|
-
logger.authLogger = authLogger;
|
|
2831
|
-
const apiLogger = logger$1.withContext("API");
|
|
2832
|
-
logger.apiLogger = apiLogger;
|
|
2833
|
-
const contractLogger = logger$1.withContext("CONTRACT");
|
|
2834
|
-
logger.contractLogger = contractLogger;
|
|
2835
|
-
const ensLogger = logger$1.withContext("ENS");
|
|
2836
|
-
logger.ensLogger = ensLogger;
|
|
2837
|
-
const storageLogger = logger$1.withContext("STORAGE");
|
|
2838
|
-
logger.storageLogger = storageLogger;
|
|
2839
|
-
return logger;
|
|
2840
|
-
}
|
|
2841
|
-
var urlParams = {};
|
|
2842
|
-
var hasRequiredUrlParams;
|
|
2843
|
-
function requireUrlParams() {
|
|
2844
|
-
if (hasRequiredUrlParams) return urlParams;
|
|
2845
|
-
hasRequiredUrlParams = 1;
|
|
2846
|
-
Object.defineProperty(urlParams, "__esModule", { value: true });
|
|
2847
|
-
urlParams.createURLSearchParams = createURLSearchParams;
|
|
2848
|
-
urlParams.createSearchParams = createSearchParams;
|
|
2849
|
-
urlParams.searchParamsToString = searchParamsToString;
|
|
2850
|
-
urlParams.parseSearchParams = parseSearchParams;
|
|
2851
|
-
class SimpleURLSearchParams {
|
|
2852
|
-
constructor(init) {
|
|
2853
|
-
this.params = /* @__PURE__ */ new Map();
|
|
2854
|
-
if (init) {
|
|
2855
|
-
if (typeof init === "string") {
|
|
2856
|
-
this.parseString(init);
|
|
2857
|
-
} else if (Array.isArray(init)) {
|
|
2858
|
-
for (const [key, value] of init) {
|
|
2859
|
-
this.append(key, value);
|
|
2860
|
-
}
|
|
2861
|
-
} else {
|
|
2862
|
-
for (const [key, value] of Object.entries(init)) {
|
|
2863
|
-
if (value !== void 0) {
|
|
2864
|
-
this.append(key, value);
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
parseString(str) {
|
|
2871
|
-
const params = str.startsWith("?") ? str.slice(1) : str;
|
|
2872
|
-
if (!params)
|
|
2873
|
-
return;
|
|
2874
|
-
for (const pair of params.split("&")) {
|
|
2875
|
-
const [key, value = ""] = pair.split("=");
|
|
2876
|
-
if (key) {
|
|
2877
|
-
this.append(decodeURIComponent(key), decodeURIComponent(value));
|
|
2878
|
-
}
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
append(name, value) {
|
|
2882
|
-
if (!this.params.has(name)) {
|
|
2883
|
-
this.params.set(name, []);
|
|
2884
|
-
}
|
|
2885
|
-
const existingValues = this.params.get(name);
|
|
2886
|
-
if (existingValues) {
|
|
2887
|
-
existingValues.push(value);
|
|
2888
|
-
}
|
|
2889
|
-
}
|
|
2890
|
-
delete(name) {
|
|
2891
|
-
this.params.delete(name);
|
|
2892
|
-
}
|
|
2893
|
-
get(name) {
|
|
2894
|
-
const values = this.params.get(name);
|
|
2895
|
-
return values && values.length > 0 ? values[0] : null;
|
|
2896
|
-
}
|
|
2897
|
-
getAll(name) {
|
|
2898
|
-
return this.params.get(name) || [];
|
|
2899
|
-
}
|
|
2900
|
-
has(name) {
|
|
2901
|
-
return this.params.has(name);
|
|
2902
|
-
}
|
|
2903
|
-
set(name, value) {
|
|
2904
|
-
this.params.set(name, [value]);
|
|
2905
|
-
}
|
|
2906
|
-
toString() {
|
|
2907
|
-
const pairs = [];
|
|
2908
|
-
this.params.forEach((values, key) => {
|
|
2909
|
-
for (const value of values) {
|
|
2910
|
-
pairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);
|
|
2911
|
-
}
|
|
2912
|
-
});
|
|
2913
|
-
return pairs.join("&");
|
|
2914
|
-
}
|
|
2915
|
-
forEach(callback) {
|
|
2916
|
-
this.params.forEach((values, key) => {
|
|
2917
|
-
for (const value of values) {
|
|
2918
|
-
callback(value, key);
|
|
2919
|
-
}
|
|
2920
|
-
});
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
function createURLSearchParams(init) {
|
|
2924
|
-
if (typeof URLSearchParams !== "undefined") {
|
|
2925
|
-
return new URLSearchParams(init);
|
|
2926
|
-
}
|
|
2927
|
-
return new SimpleURLSearchParams(init);
|
|
2928
|
-
}
|
|
2929
|
-
function createSearchParams(params) {
|
|
2930
|
-
const searchParams = createURLSearchParams(void 0);
|
|
2931
|
-
for (const [key, value] of Object.entries(params)) {
|
|
2932
|
-
if (value !== void 0 && value !== null) {
|
|
2933
|
-
searchParams.append(key, String(value));
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
return searchParams;
|
|
2937
|
-
}
|
|
2938
|
-
function searchParamsToString(params) {
|
|
2939
|
-
return params.toString();
|
|
2940
|
-
}
|
|
2941
|
-
function parseSearchParams(queryString) {
|
|
2942
|
-
const params = createURLSearchParams(queryString);
|
|
2943
|
-
const result = {};
|
|
2944
|
-
params.forEach((value, key) => {
|
|
2945
|
-
result[key] = value;
|
|
2946
|
-
});
|
|
2947
|
-
return result;
|
|
2948
|
-
}
|
|
2949
|
-
return urlParams;
|
|
2950
|
-
}
|
|
2951
|
-
var asyncHelpers = {};
|
|
2952
|
-
var hasRequiredAsyncHelpers;
|
|
2953
|
-
function requireAsyncHelpers() {
|
|
2954
|
-
if (hasRequiredAsyncHelpers) return asyncHelpers;
|
|
2955
|
-
hasRequiredAsyncHelpers = 1;
|
|
2956
|
-
Object.defineProperty(asyncHelpers, "__esModule", { value: true });
|
|
2957
|
-
asyncHelpers.debounceAsync = asyncHelpers.clearExpiredCache = asyncHelpers.withCache = asyncHelpers.withTimeout = asyncHelpers.safeParallel = asyncHelpers.withLoadingState = asyncHelpers.safeAsync = void 0;
|
|
2958
|
-
const logger_1 = requireLogger();
|
|
2959
|
-
const safeAsync = async (operation, context) => {
|
|
2960
|
-
try {
|
|
2961
|
-
const data = await operation();
|
|
2962
|
-
return { data, success: true };
|
|
2963
|
-
} catch (error) {
|
|
2964
|
-
const errorObj = error instanceof Error ? error : new Error(String(error));
|
|
2965
|
-
logger_1.logger.error(`Async operation failed: ${errorObj.message}`, context, error);
|
|
2966
|
-
return { error: errorObj, success: false };
|
|
2967
|
-
}
|
|
2968
|
-
};
|
|
2969
|
-
asyncHelpers.safeAsync = safeAsync;
|
|
2970
|
-
const withLoadingState = async (operation, setLoading, setError, context) => {
|
|
2971
|
-
setLoading(true);
|
|
2972
|
-
setError(null);
|
|
2973
|
-
try {
|
|
2974
|
-
const result = await operation();
|
|
2975
|
-
return result;
|
|
2976
|
-
} catch (error) {
|
|
2977
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
2978
|
-
setError(errorMessage);
|
|
2979
|
-
logger_1.logger.error(`Operation failed: ${errorMessage}`, context, error);
|
|
2980
|
-
return void 0;
|
|
2981
|
-
} finally {
|
|
2982
|
-
setLoading(false);
|
|
2983
|
-
}
|
|
2984
|
-
};
|
|
2985
|
-
asyncHelpers.withLoadingState = withLoadingState;
|
|
2986
|
-
const safeParallel = async (operations, context) => {
|
|
2987
|
-
try {
|
|
2988
|
-
const results = await Promise.all(operations.map((op) => op()));
|
|
2989
|
-
return { data: results, success: true };
|
|
2990
|
-
} catch (error) {
|
|
2991
|
-
const errorObj = error instanceof Error ? error : new Error(String(error));
|
|
2992
|
-
logger_1.logger.error(`Parallel operations failed: ${errorObj.message}`, context, error);
|
|
2993
|
-
return { error: errorObj, success: false };
|
|
2994
|
-
}
|
|
2995
|
-
};
|
|
2996
|
-
asyncHelpers.safeParallel = safeParallel;
|
|
2997
|
-
const withTimeout = async (operation, timeoutMs, context) => {
|
|
2998
|
-
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error(`Operation timed out after ${timeoutMs}ms`)), timeoutMs));
|
|
2999
|
-
try {
|
|
3000
|
-
return await Promise.race([operation(), timeoutPromise]);
|
|
3001
|
-
} catch (error) {
|
|
3002
|
-
logger_1.logger.error(`Timeout operation failed`, context, error);
|
|
3003
|
-
throw error;
|
|
3004
|
-
}
|
|
3005
|
-
};
|
|
3006
|
-
asyncHelpers.withTimeout = withTimeout;
|
|
3007
|
-
const cache = /* @__PURE__ */ new Map();
|
|
3008
|
-
const withCache = async (key, operation, ttlMs = 5 * 60 * 1e3) => {
|
|
3009
|
-
const cached = cache.get(key);
|
|
3010
|
-
const now = Date.now();
|
|
3011
|
-
if (cached && now - cached.timestamp < cached.ttl) {
|
|
3012
|
-
return cached.data;
|
|
3013
|
-
}
|
|
3014
|
-
const result = await operation();
|
|
3015
|
-
cache.set(key, { data: result, timestamp: now, ttl: ttlMs });
|
|
3016
|
-
return result;
|
|
3017
|
-
};
|
|
3018
|
-
asyncHelpers.withCache = withCache;
|
|
3019
|
-
const clearExpiredCache = () => {
|
|
3020
|
-
const now = Date.now();
|
|
3021
|
-
for (const [key, entry] of cache.entries()) {
|
|
3022
|
-
if (now - entry.timestamp >= entry.ttl) {
|
|
3023
|
-
cache.delete(key);
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
};
|
|
3027
|
-
asyncHelpers.clearExpiredCache = clearExpiredCache;
|
|
3028
|
-
const debounceMap = /* @__PURE__ */ new Map();
|
|
3029
|
-
const debounceAsync = (fn, delay, key) => {
|
|
3030
|
-
return (...args) => {
|
|
3031
|
-
return new Promise((resolve) => {
|
|
3032
|
-
const existingTimeout = debounceMap.get(key);
|
|
3033
|
-
if (existingTimeout) {
|
|
3034
|
-
clearTimeout(existingTimeout);
|
|
3035
|
-
}
|
|
3036
|
-
const timeout = setTimeout(async () => {
|
|
3037
|
-
debounceMap.delete(key);
|
|
3038
|
-
try {
|
|
3039
|
-
const result = await fn(...args);
|
|
3040
|
-
resolve(result);
|
|
3041
|
-
} catch (error) {
|
|
3042
|
-
logger_1.logger.error(`Debounced operation failed`, key, error);
|
|
3043
|
-
resolve(void 0);
|
|
3044
|
-
}
|
|
3045
|
-
}, delay);
|
|
3046
|
-
debounceMap.set(key, timeout);
|
|
3047
|
-
});
|
|
3048
|
-
};
|
|
3049
|
-
};
|
|
3050
|
-
asyncHelpers.debounceAsync = debounceAsync;
|
|
3051
|
-
return asyncHelpers;
|
|
3052
|
-
}
|
|
3053
|
-
var hasRequiredDist;
|
|
3054
|
-
function requireDist() {
|
|
3055
|
-
if (hasRequiredDist) return dist;
|
|
3056
|
-
hasRequiredDist = 1;
|
|
3057
|
-
(function(exports$1) {
|
|
3058
|
-
/**
|
|
3059
|
-
* @johnqh/types - Common TypeScript types for Web3 email projects
|
|
3060
|
-
*
|
|
3061
|
-
* This package contains all shared TypeScript definitions used across
|
|
3062
|
-
* Web3 email applications including business logic types, blockchain
|
|
3063
|
-
* types, configuration interfaces, infrastructure types, and utility functions.
|
|
3064
|
-
*
|
|
3065
|
-
* @version 1.0.0
|
|
3066
|
-
* @license MIT
|
|
3067
|
-
*/
|
|
3068
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
3069
|
-
exports$1.EntityRole = exports$1.EntityType = exports$1.NONE_ENTITLEMENT = exports$1.ALL_PERIODS = exports$1.PERIOD_RANKS = exports$1.RateLimitPeriodType = exports$1.WalletType = exports$1.NetworkError = exports$1.ProcessedEventName = exports$1.ContractType = exports$1.AnalyticsEventBuilder = exports$1.AnalyticsEvent = exports$1.StorageType = exports$1.validateMessage = exports$1.validateDomain = exports$1.validateAmount = exports$1.validateAddress = exports$1.isSolanaRecipient = exports$1.isSolanaAddress = exports$1.isEvmRecipient = exports$1.isEvmAddress = exports$1.TransactionStatus = exports$1.PROTOCOL_CONSTANTS = exports$1.MessageType = exports$1.isWalletVerified = exports$1.isWalletConnected = exports$1.getWalletConnectionState = exports$1.Theme = exports$1.SubscriptionAction = exports$1.SortOrder = exports$1.RequestStatus = exports$1.PlatformType = exports$1.NotificationType = exports$1.MobileView = exports$1.MediumView = exports$1.InfoType = exports$1.FontSize = exports$1.FeatureFlag = exports$1.ErrorType = exports$1.EmailValidationState = exports$1.EmailSortCriteria = exports$1.EmailComposeType = exports$1.EmailAddressType = exports$1.EmailAction = exports$1.Currency = exports$1.ConnectionType = exports$1.ConnectionState = exports$1.ChainType = exports$1.Chain = exports$1.AuthStatus = void 0;
|
|
3070
|
-
exports$1.isAuthStatusConnected = exports$1.isAuthExpired = exports$1.getAuthStatusText = exports$1.generateNonce = exports$1.generateAuthMessage = exports$1.extractNonceFromMessage = exports$1.canAccessProtectedFeatures = exports$1.validateEventArgs = exports$1.normalizeAddress = exports$1.isZeroAddress = exports$1.isTestNet = exports$1.formatBigInt = exports$1.createUserMultiChainId = exports$1.createMultiChainId = exports$1.createDelegationId = exports$1.createChainStatsId = exports$1.parseEmailAddress = exports$1.isValidWalletAddress = exports$1.isValidSignature = exports$1.isSNSName = exports$1.isENSName = exports$1.getChainDisplayName = exports$1.getAddressType = exports$1.formatWalletAddress = exports$1.AddressType = exports$1.validateArray = exports$1.parseJson = exports$1.optional = exports$1.isValidDate = exports$1.isUrl = exports$1.isSuccessResponse = exports$1.isString = exports$1.isObject = exports$1.isNumber = exports$1.isNullish = exports$1.isErrorResponse = exports$1.isEmail = exports$1.isBoolean = exports$1.isArray = exports$1.isApiResponse = exports$1.hasRequiredProperties = exports$1.createValidator = exports$1.createAssertion = exports$1.Web3UsernameValidator = exports$1.hasPermission = exports$1.getPermissionsForRole = exports$1.MEMBER_PERMISSIONS = exports$1.MANAGER_PERMISSIONS = exports$1.OWNER_PERMISSIONS = exports$1.InvitationStatus = void 0;
|
|
3071
|
-
exports$1.LogLevel = exports$1.STATUS_VALUES = exports$1.Z_INDEX = exports$1.ANIMATION = exports$1.NETWORK_IDS = exports$1.WALLET_NAMES = exports$1.CONTACT_INFO = exports$1.ROUTES = exports$1.SUCCESS_MESSAGES = exports$1.ERROR_MESSAGES = exports$1.TIME_FORMAT = exports$1.SUBSCRIPTION_TIERS = exports$1.EMAIL_CONFIG = exports$1.STORAGE_KEYS = exports$1.CHAIN_TYPE = exports$1.AUTH_STATUS = exports$1.API_RETRY_DELAY = exports$1.API_RETRY_ATTEMPTS = exports$1.API_TIMEOUT = exports$1.truncate = exports$1.toTitleCase = exports$1.toSnakeCase = exports$1.toKebabCase = exports$1.toCamelCase = exports$1.stripHtml = exports$1.randomString = exports$1.pluralize = exports$1.normalizeWhitespace = exports$1.isNotBlank = exports$1.isBlank = exports$1.getInitials = exports$1.formatNumber = exports$1.formatBytes = exports$1.escapeHtml = exports$1.capitalize = exports$1.parseDate = exports$1.isDateInRange = exports$1.formatTimestamp = exports$1.formatRelativeTime = exports$1.formatEmailDate = exports$1.addHours = exports$1.addDays = exports$1.parseUSDC = exports$1.formatUSDC = exports$1.USDC_DECIMALS = exports$1.CLAIM_PERIOD_DAYS = exports$1.createAdminChecker = exports$1.isAdminEmail = exports$1.parseAdminEmails = exports$1.isValidNonce = void 0;
|
|
3072
|
-
exports$1.debounceAsync = exports$1.clearExpiredCache = exports$1.withCache = exports$1.withTimeout = exports$1.safeParallel = exports$1.withLoadingState = exports$1.safeAsync = exports$1.parseSearchParams = exports$1.searchParamsToString = exports$1.createSearchParams = exports$1.createURLSearchParams = exports$1.storageLogger = exports$1.ensLogger = exports$1.contractLogger = exports$1.apiLogger = exports$1.authLogger = exports$1.logger = void 0;
|
|
3073
|
-
var enums_1 = requireEnums();
|
|
3074
|
-
Object.defineProperty(exports$1, "AuthStatus", { enumerable: true, get: function() {
|
|
3075
|
-
return enums_1.AuthStatus;
|
|
3076
|
-
} });
|
|
3077
|
-
Object.defineProperty(exports$1, "Chain", { enumerable: true, get: function() {
|
|
3078
|
-
return enums_1.Chain;
|
|
3079
|
-
} });
|
|
3080
|
-
Object.defineProperty(exports$1, "ChainType", { enumerable: true, get: function() {
|
|
3081
|
-
return enums_1.ChainType;
|
|
3082
|
-
} });
|
|
3083
|
-
Object.defineProperty(exports$1, "ConnectionState", { enumerable: true, get: function() {
|
|
3084
|
-
return enums_1.ConnectionState;
|
|
3085
|
-
} });
|
|
3086
|
-
Object.defineProperty(exports$1, "ConnectionType", { enumerable: true, get: function() {
|
|
3087
|
-
return enums_1.ConnectionType;
|
|
3088
|
-
} });
|
|
3089
|
-
Object.defineProperty(exports$1, "Currency", { enumerable: true, get: function() {
|
|
3090
|
-
return enums_1.Currency;
|
|
3091
|
-
} });
|
|
3092
|
-
Object.defineProperty(exports$1, "EmailAction", { enumerable: true, get: function() {
|
|
3093
|
-
return enums_1.EmailAction;
|
|
3094
|
-
} });
|
|
3095
|
-
Object.defineProperty(exports$1, "EmailAddressType", { enumerable: true, get: function() {
|
|
3096
|
-
return enums_1.EmailAddressType;
|
|
3097
|
-
} });
|
|
3098
|
-
Object.defineProperty(exports$1, "EmailComposeType", { enumerable: true, get: function() {
|
|
3099
|
-
return enums_1.EmailComposeType;
|
|
3100
|
-
} });
|
|
3101
|
-
Object.defineProperty(exports$1, "EmailSortCriteria", { enumerable: true, get: function() {
|
|
3102
|
-
return enums_1.EmailSortCriteria;
|
|
3103
|
-
} });
|
|
3104
|
-
Object.defineProperty(exports$1, "EmailValidationState", { enumerable: true, get: function() {
|
|
3105
|
-
return enums_1.EmailValidationState;
|
|
3106
|
-
} });
|
|
3107
|
-
Object.defineProperty(exports$1, "ErrorType", { enumerable: true, get: function() {
|
|
3108
|
-
return enums_1.ErrorType;
|
|
3109
|
-
} });
|
|
3110
|
-
Object.defineProperty(exports$1, "FeatureFlag", { enumerable: true, get: function() {
|
|
3111
|
-
return enums_1.FeatureFlag;
|
|
3112
|
-
} });
|
|
3113
|
-
Object.defineProperty(exports$1, "FontSize", { enumerable: true, get: function() {
|
|
3114
|
-
return enums_1.FontSize;
|
|
3115
|
-
} });
|
|
3116
|
-
Object.defineProperty(exports$1, "InfoType", { enumerable: true, get: function() {
|
|
3117
|
-
return enums_1.InfoType;
|
|
3118
|
-
} });
|
|
3119
|
-
Object.defineProperty(exports$1, "MediumView", { enumerable: true, get: function() {
|
|
3120
|
-
return enums_1.MediumView;
|
|
3121
|
-
} });
|
|
3122
|
-
Object.defineProperty(exports$1, "MobileView", { enumerable: true, get: function() {
|
|
3123
|
-
return enums_1.MobileView;
|
|
3124
|
-
} });
|
|
3125
|
-
Object.defineProperty(exports$1, "NotificationType", { enumerable: true, get: function() {
|
|
3126
|
-
return enums_1.NotificationType;
|
|
3127
|
-
} });
|
|
3128
|
-
Object.defineProperty(exports$1, "PlatformType", { enumerable: true, get: function() {
|
|
3129
|
-
return enums_1.PlatformType;
|
|
3130
|
-
} });
|
|
3131
|
-
Object.defineProperty(exports$1, "RequestStatus", { enumerable: true, get: function() {
|
|
3132
|
-
return enums_1.RequestStatus;
|
|
3133
|
-
} });
|
|
3134
|
-
Object.defineProperty(exports$1, "SortOrder", { enumerable: true, get: function() {
|
|
3135
|
-
return enums_1.SortOrder;
|
|
3136
|
-
} });
|
|
3137
|
-
Object.defineProperty(exports$1, "SubscriptionAction", { enumerable: true, get: function() {
|
|
3138
|
-
return enums_1.SubscriptionAction;
|
|
3139
|
-
} });
|
|
3140
|
-
Object.defineProperty(exports$1, "Theme", { enumerable: true, get: function() {
|
|
3141
|
-
return enums_1.Theme;
|
|
3142
|
-
} });
|
|
3143
|
-
var wallet_status_1 = requireWalletStatus();
|
|
3144
|
-
Object.defineProperty(exports$1, "getWalletConnectionState", { enumerable: true, get: function() {
|
|
3145
|
-
return wallet_status_1.getWalletConnectionState;
|
|
3146
|
-
} });
|
|
3147
|
-
Object.defineProperty(exports$1, "isWalletConnected", { enumerable: true, get: function() {
|
|
3148
|
-
return wallet_status_1.isWalletConnected;
|
|
3149
|
-
} });
|
|
3150
|
-
Object.defineProperty(exports$1, "isWalletVerified", { enumerable: true, get: function() {
|
|
3151
|
-
return wallet_status_1.isWalletVerified;
|
|
3152
|
-
} });
|
|
3153
|
-
var common_1 = requireCommon();
|
|
3154
|
-
Object.defineProperty(exports$1, "MessageType", { enumerable: true, get: function() {
|
|
3155
|
-
return common_1.MessageType;
|
|
3156
|
-
} });
|
|
3157
|
-
Object.defineProperty(exports$1, "PROTOCOL_CONSTANTS", { enumerable: true, get: function() {
|
|
3158
|
-
return common_1.PROTOCOL_CONSTANTS;
|
|
3159
|
-
} });
|
|
3160
|
-
Object.defineProperty(exports$1, "TransactionStatus", { enumerable: true, get: function() {
|
|
3161
|
-
return common_1.TransactionStatus;
|
|
3162
|
-
} });
|
|
3163
|
-
Object.defineProperty(exports$1, "isEvmAddress", { enumerable: true, get: function() {
|
|
3164
|
-
return common_1.isEvmAddress;
|
|
3165
|
-
} });
|
|
3166
|
-
Object.defineProperty(exports$1, "isEvmRecipient", { enumerable: true, get: function() {
|
|
3167
|
-
return common_1.isEvmRecipient;
|
|
3168
|
-
} });
|
|
3169
|
-
Object.defineProperty(exports$1, "isSolanaAddress", { enumerable: true, get: function() {
|
|
3170
|
-
return common_1.isSolanaAddress;
|
|
3171
|
-
} });
|
|
3172
|
-
Object.defineProperty(exports$1, "isSolanaRecipient", { enumerable: true, get: function() {
|
|
3173
|
-
return common_1.isSolanaRecipient;
|
|
3174
|
-
} });
|
|
3175
|
-
var validation_1 = requireValidation();
|
|
3176
|
-
Object.defineProperty(exports$1, "validateAddress", { enumerable: true, get: function() {
|
|
3177
|
-
return validation_1.validateAddress;
|
|
3178
|
-
} });
|
|
3179
|
-
Object.defineProperty(exports$1, "validateAmount", { enumerable: true, get: function() {
|
|
3180
|
-
return validation_1.validateAmount;
|
|
3181
|
-
} });
|
|
3182
|
-
Object.defineProperty(exports$1, "validateDomain", { enumerable: true, get: function() {
|
|
3183
|
-
return validation_1.validateDomain;
|
|
3184
|
-
} });
|
|
3185
|
-
Object.defineProperty(exports$1, "validateMessage", { enumerable: true, get: function() {
|
|
3186
|
-
return validation_1.validateMessage;
|
|
3187
|
-
} });
|
|
3188
|
-
var environment_1 = requireEnvironment();
|
|
3189
|
-
Object.defineProperty(exports$1, "StorageType", { enumerable: true, get: function() {
|
|
3190
|
-
return environment_1.StorageType;
|
|
3191
|
-
} });
|
|
3192
|
-
var analytics_1 = requireAnalytics();
|
|
3193
|
-
Object.defineProperty(exports$1, "AnalyticsEvent", { enumerable: true, get: function() {
|
|
3194
|
-
return analytics_1.AnalyticsEvent;
|
|
3195
|
-
} });
|
|
3196
|
-
Object.defineProperty(exports$1, "AnalyticsEventBuilder", { enumerable: true, get: function() {
|
|
3197
|
-
return analytics_1.AnalyticsEventBuilder;
|
|
3198
|
-
} });
|
|
3199
|
-
var api_1 = requireApi();
|
|
3200
|
-
Object.defineProperty(exports$1, "ContractType", { enumerable: true, get: function() {
|
|
3201
|
-
return api_1.ContractType;
|
|
3202
|
-
} });
|
|
3203
|
-
Object.defineProperty(exports$1, "ProcessedEventName", { enumerable: true, get: function() {
|
|
3204
|
-
return api_1.ProcessedEventName;
|
|
3205
|
-
} });
|
|
3206
|
-
var network_1 = requireNetwork();
|
|
3207
|
-
Object.defineProperty(exports$1, "NetworkError", { enumerable: true, get: function() {
|
|
3208
|
-
return network_1.NetworkError;
|
|
3209
|
-
} });
|
|
3210
|
-
var wallet_1 = requireWallet();
|
|
3211
|
-
Object.defineProperty(exports$1, "WalletType", { enumerable: true, get: function() {
|
|
3212
|
-
return wallet_1.WalletType;
|
|
3213
|
-
} });
|
|
3214
|
-
var rate_limits_1 = requireRateLimits();
|
|
3215
|
-
Object.defineProperty(exports$1, "RateLimitPeriodType", { enumerable: true, get: function() {
|
|
3216
|
-
return rate_limits_1.RateLimitPeriodType;
|
|
3217
|
-
} });
|
|
3218
|
-
var period_1 = requirePeriod();
|
|
3219
|
-
Object.defineProperty(exports$1, "PERIOD_RANKS", { enumerable: true, get: function() {
|
|
3220
|
-
return period_1.PERIOD_RANKS;
|
|
3221
|
-
} });
|
|
3222
|
-
Object.defineProperty(exports$1, "ALL_PERIODS", { enumerable: true, get: function() {
|
|
3223
|
-
return period_1.ALL_PERIODS;
|
|
3224
|
-
} });
|
|
3225
|
-
var entitlements_1 = requireEntitlements();
|
|
3226
|
-
Object.defineProperty(exports$1, "NONE_ENTITLEMENT", { enumerable: true, get: function() {
|
|
3227
|
-
return entitlements_1.NONE_ENTITLEMENT;
|
|
3228
|
-
} });
|
|
3229
|
-
var entity_1 = requireEntity();
|
|
3230
|
-
Object.defineProperty(exports$1, "EntityType", { enumerable: true, get: function() {
|
|
3231
|
-
return entity_1.EntityType;
|
|
3232
|
-
} });
|
|
3233
|
-
Object.defineProperty(exports$1, "EntityRole", { enumerable: true, get: function() {
|
|
3234
|
-
return entity_1.EntityRole;
|
|
3235
|
-
} });
|
|
3236
|
-
Object.defineProperty(exports$1, "InvitationStatus", { enumerable: true, get: function() {
|
|
3237
|
-
return entity_1.InvitationStatus;
|
|
3238
|
-
} });
|
|
3239
|
-
var permissions_1 = requirePermissions();
|
|
3240
|
-
Object.defineProperty(exports$1, "OWNER_PERMISSIONS", { enumerable: true, get: function() {
|
|
3241
|
-
return permissions_1.OWNER_PERMISSIONS;
|
|
3242
|
-
} });
|
|
3243
|
-
Object.defineProperty(exports$1, "MANAGER_PERMISSIONS", { enumerable: true, get: function() {
|
|
3244
|
-
return permissions_1.MANAGER_PERMISSIONS;
|
|
3245
|
-
} });
|
|
3246
|
-
Object.defineProperty(exports$1, "MEMBER_PERMISSIONS", { enumerable: true, get: function() {
|
|
3247
|
-
return permissions_1.MEMBER_PERMISSIONS;
|
|
3248
|
-
} });
|
|
3249
|
-
Object.defineProperty(exports$1, "getPermissionsForRole", { enumerable: true, get: function() {
|
|
3250
|
-
return permissions_1.getPermissionsForRole;
|
|
3251
|
-
} });
|
|
3252
|
-
Object.defineProperty(exports$1, "hasPermission", { enumerable: true, get: function() {
|
|
3253
|
-
return permissions_1.hasPermission;
|
|
3254
|
-
} });
|
|
3255
|
-
var web3_username_validator_1 = requireWeb3UsernameValidator();
|
|
3256
|
-
Object.defineProperty(exports$1, "Web3UsernameValidator", { enumerable: true, get: function() {
|
|
3257
|
-
return web3_username_validator_1.Web3UsernameValidator;
|
|
3258
|
-
} });
|
|
3259
|
-
var type_validation_1 = requireTypeValidation();
|
|
3260
|
-
Object.defineProperty(exports$1, "createAssertion", { enumerable: true, get: function() {
|
|
3261
|
-
return type_validation_1.createAssertion;
|
|
3262
|
-
} });
|
|
3263
|
-
Object.defineProperty(exports$1, "createValidator", { enumerable: true, get: function() {
|
|
3264
|
-
return type_validation_1.createValidator;
|
|
3265
|
-
} });
|
|
3266
|
-
Object.defineProperty(exports$1, "hasRequiredProperties", { enumerable: true, get: function() {
|
|
3267
|
-
return type_validation_1.hasRequiredProperties;
|
|
3268
|
-
} });
|
|
3269
|
-
Object.defineProperty(exports$1, "isApiResponse", { enumerable: true, get: function() {
|
|
3270
|
-
return type_validation_1.isApiResponse;
|
|
3271
|
-
} });
|
|
3272
|
-
Object.defineProperty(exports$1, "isArray", { enumerable: true, get: function() {
|
|
3273
|
-
return type_validation_1.isArray;
|
|
3274
|
-
} });
|
|
3275
|
-
Object.defineProperty(exports$1, "isBoolean", { enumerable: true, get: function() {
|
|
3276
|
-
return type_validation_1.isBoolean;
|
|
3277
|
-
} });
|
|
3278
|
-
Object.defineProperty(exports$1, "isEmail", { enumerable: true, get: function() {
|
|
3279
|
-
return type_validation_1.isEmail;
|
|
3280
|
-
} });
|
|
3281
|
-
Object.defineProperty(exports$1, "isErrorResponse", { enumerable: true, get: function() {
|
|
3282
|
-
return type_validation_1.isErrorResponse;
|
|
3283
|
-
} });
|
|
3284
|
-
Object.defineProperty(exports$1, "isNullish", { enumerable: true, get: function() {
|
|
3285
|
-
return type_validation_1.isNullish;
|
|
3286
|
-
} });
|
|
3287
|
-
Object.defineProperty(exports$1, "isNumber", { enumerable: true, get: function() {
|
|
3288
|
-
return type_validation_1.isNumber;
|
|
3289
|
-
} });
|
|
3290
|
-
Object.defineProperty(exports$1, "isObject", { enumerable: true, get: function() {
|
|
3291
|
-
return type_validation_1.isObject;
|
|
3292
|
-
} });
|
|
3293
|
-
Object.defineProperty(exports$1, "isString", { enumerable: true, get: function() {
|
|
3294
|
-
return type_validation_1.isString;
|
|
3295
|
-
} });
|
|
3296
|
-
Object.defineProperty(exports$1, "isSuccessResponse", { enumerable: true, get: function() {
|
|
3297
|
-
return type_validation_1.isSuccessResponse;
|
|
3298
|
-
} });
|
|
3299
|
-
Object.defineProperty(exports$1, "isUrl", { enumerable: true, get: function() {
|
|
3300
|
-
return type_validation_1.isUrl;
|
|
3301
|
-
} });
|
|
3302
|
-
Object.defineProperty(exports$1, "isValidDate", { enumerable: true, get: function() {
|
|
3303
|
-
return type_validation_1.isValidDate;
|
|
3304
|
-
} });
|
|
3305
|
-
Object.defineProperty(exports$1, "optional", { enumerable: true, get: function() {
|
|
3306
|
-
return type_validation_1.optional;
|
|
3307
|
-
} });
|
|
3308
|
-
Object.defineProperty(exports$1, "parseJson", { enumerable: true, get: function() {
|
|
3309
|
-
return type_validation_1.parseJson;
|
|
3310
|
-
} });
|
|
3311
|
-
Object.defineProperty(exports$1, "validateArray", { enumerable: true, get: function() {
|
|
3312
|
-
return type_validation_1.validateArray;
|
|
3313
|
-
} });
|
|
3314
|
-
var address_1 = requireAddress();
|
|
3315
|
-
Object.defineProperty(exports$1, "AddressType", { enumerable: true, get: function() {
|
|
3316
|
-
return address_1.AddressType;
|
|
3317
|
-
} });
|
|
3318
|
-
Object.defineProperty(exports$1, "formatWalletAddress", { enumerable: true, get: function() {
|
|
3319
|
-
return address_1.formatWalletAddress;
|
|
3320
|
-
} });
|
|
3321
|
-
Object.defineProperty(exports$1, "getAddressType", { enumerable: true, get: function() {
|
|
3322
|
-
return address_1.getAddressType;
|
|
3323
|
-
} });
|
|
3324
|
-
Object.defineProperty(exports$1, "getChainDisplayName", { enumerable: true, get: function() {
|
|
3325
|
-
return address_1.getChainDisplayName;
|
|
3326
|
-
} });
|
|
3327
|
-
Object.defineProperty(exports$1, "isENSName", { enumerable: true, get: function() {
|
|
3328
|
-
return address_1.isENSName;
|
|
3329
|
-
} });
|
|
3330
|
-
Object.defineProperty(exports$1, "isSNSName", { enumerable: true, get: function() {
|
|
3331
|
-
return address_1.isSNSName;
|
|
3332
|
-
} });
|
|
3333
|
-
Object.defineProperty(exports$1, "isValidSignature", { enumerable: true, get: function() {
|
|
3334
|
-
return address_1.isValidSignature;
|
|
3335
|
-
} });
|
|
3336
|
-
Object.defineProperty(exports$1, "isValidWalletAddress", { enumerable: true, get: function() {
|
|
3337
|
-
return address_1.isValidWalletAddress;
|
|
3338
|
-
} });
|
|
3339
|
-
Object.defineProperty(exports$1, "parseEmailAddress", { enumerable: true, get: function() {
|
|
3340
|
-
return address_1.parseEmailAddress;
|
|
3341
|
-
} });
|
|
3342
|
-
var event_helpers_1 = requireEventHelpers();
|
|
3343
|
-
Object.defineProperty(exports$1, "createChainStatsId", { enumerable: true, get: function() {
|
|
3344
|
-
return event_helpers_1.createChainStatsId;
|
|
3345
|
-
} });
|
|
3346
|
-
Object.defineProperty(exports$1, "createDelegationId", { enumerable: true, get: function() {
|
|
3347
|
-
return event_helpers_1.createDelegationId;
|
|
3348
|
-
} });
|
|
3349
|
-
Object.defineProperty(exports$1, "createMultiChainId", { enumerable: true, get: function() {
|
|
3350
|
-
return event_helpers_1.createMultiChainId;
|
|
3351
|
-
} });
|
|
3352
|
-
Object.defineProperty(exports$1, "createUserMultiChainId", { enumerable: true, get: function() {
|
|
3353
|
-
return event_helpers_1.createUserMultiChainId;
|
|
3354
|
-
} });
|
|
3355
|
-
Object.defineProperty(exports$1, "formatBigInt", { enumerable: true, get: function() {
|
|
3356
|
-
return event_helpers_1.formatBigInt;
|
|
3357
|
-
} });
|
|
3358
|
-
Object.defineProperty(exports$1, "isTestNet", { enumerable: true, get: function() {
|
|
3359
|
-
return event_helpers_1.isTestNet;
|
|
3360
|
-
} });
|
|
3361
|
-
Object.defineProperty(exports$1, "isZeroAddress", { enumerable: true, get: function() {
|
|
3362
|
-
return event_helpers_1.isZeroAddress;
|
|
3363
|
-
} });
|
|
3364
|
-
Object.defineProperty(exports$1, "normalizeAddress", { enumerable: true, get: function() {
|
|
3365
|
-
return event_helpers_1.normalizeAddress;
|
|
3366
|
-
} });
|
|
3367
|
-
Object.defineProperty(exports$1, "validateEventArgs", { enumerable: true, get: function() {
|
|
3368
|
-
return event_helpers_1.validateEventArgs;
|
|
3369
|
-
} });
|
|
3370
|
-
var auth_1 = requireAuth();
|
|
3371
|
-
Object.defineProperty(exports$1, "canAccessProtectedFeatures", { enumerable: true, get: function() {
|
|
3372
|
-
return auth_1.canAccessProtectedFeatures;
|
|
3373
|
-
} });
|
|
3374
|
-
Object.defineProperty(exports$1, "extractNonceFromMessage", { enumerable: true, get: function() {
|
|
3375
|
-
return auth_1.extractNonceFromMessage;
|
|
3376
|
-
} });
|
|
3377
|
-
Object.defineProperty(exports$1, "generateAuthMessage", { enumerable: true, get: function() {
|
|
3378
|
-
return auth_1.generateAuthMessage;
|
|
3379
|
-
} });
|
|
3380
|
-
Object.defineProperty(exports$1, "generateNonce", { enumerable: true, get: function() {
|
|
3381
|
-
return auth_1.generateNonce;
|
|
3382
|
-
} });
|
|
3383
|
-
Object.defineProperty(exports$1, "getAuthStatusText", { enumerable: true, get: function() {
|
|
3384
|
-
return auth_1.getAuthStatusText;
|
|
3385
|
-
} });
|
|
3386
|
-
Object.defineProperty(exports$1, "isAuthExpired", { enumerable: true, get: function() {
|
|
3387
|
-
return auth_1.isAuthExpired;
|
|
3388
|
-
} });
|
|
3389
|
-
Object.defineProperty(exports$1, "isAuthStatusConnected", { enumerable: true, get: function() {
|
|
3390
|
-
return auth_1.isAuthStatusConnected;
|
|
3391
|
-
} });
|
|
3392
|
-
Object.defineProperty(exports$1, "isValidNonce", { enumerable: true, get: function() {
|
|
3393
|
-
return auth_1.isValidNonce;
|
|
3394
|
-
} });
|
|
3395
|
-
var admin_emails_1 = requireAdminEmails();
|
|
3396
|
-
Object.defineProperty(exports$1, "parseAdminEmails", { enumerable: true, get: function() {
|
|
3397
|
-
return admin_emails_1.parseAdminEmails;
|
|
3398
|
-
} });
|
|
3399
|
-
Object.defineProperty(exports$1, "isAdminEmail", { enumerable: true, get: function() {
|
|
3400
|
-
return admin_emails_1.isAdminEmail;
|
|
3401
|
-
} });
|
|
3402
|
-
Object.defineProperty(exports$1, "createAdminChecker", { enumerable: true, get: function() {
|
|
3403
|
-
return admin_emails_1.createAdminChecker;
|
|
3404
|
-
} });
|
|
3405
|
-
var currency_1 = requireCurrency();
|
|
3406
|
-
Object.defineProperty(exports$1, "CLAIM_PERIOD_DAYS", { enumerable: true, get: function() {
|
|
3407
|
-
return currency_1.CLAIM_PERIOD_DAYS;
|
|
3408
|
-
} });
|
|
3409
|
-
Object.defineProperty(exports$1, "USDC_DECIMALS", { enumerable: true, get: function() {
|
|
3410
|
-
return currency_1.USDC_DECIMALS;
|
|
3411
|
-
} });
|
|
3412
|
-
Object.defineProperty(exports$1, "formatUSDC", { enumerable: true, get: function() {
|
|
3413
|
-
return currency_1.formatUSDC;
|
|
3414
|
-
} });
|
|
3415
|
-
Object.defineProperty(exports$1, "parseUSDC", { enumerable: true, get: function() {
|
|
3416
|
-
return currency_1.parseUSDC;
|
|
3417
|
-
} });
|
|
3418
|
-
var date_1 = requireDate();
|
|
3419
|
-
Object.defineProperty(exports$1, "addDays", { enumerable: true, get: function() {
|
|
3420
|
-
return date_1.addDays;
|
|
3421
|
-
} });
|
|
3422
|
-
Object.defineProperty(exports$1, "addHours", { enumerable: true, get: function() {
|
|
3423
|
-
return date_1.addHours;
|
|
3424
|
-
} });
|
|
3425
|
-
Object.defineProperty(exports$1, "formatEmailDate", { enumerable: true, get: function() {
|
|
3426
|
-
return date_1.formatEmailDate;
|
|
3427
|
-
} });
|
|
3428
|
-
Object.defineProperty(exports$1, "formatRelativeTime", { enumerable: true, get: function() {
|
|
3429
|
-
return date_1.formatRelativeTime;
|
|
3430
|
-
} });
|
|
3431
|
-
Object.defineProperty(exports$1, "formatTimestamp", { enumerable: true, get: function() {
|
|
3432
|
-
return date_1.formatTimestamp;
|
|
3433
|
-
} });
|
|
3434
|
-
Object.defineProperty(exports$1, "isDateInRange", { enumerable: true, get: function() {
|
|
3435
|
-
return date_1.isDateInRange;
|
|
3436
|
-
} });
|
|
3437
|
-
Object.defineProperty(exports$1, "parseDate", { enumerable: true, get: function() {
|
|
3438
|
-
return date_1.parseDate;
|
|
3439
|
-
} });
|
|
3440
|
-
var string_1 = requireString();
|
|
3441
|
-
Object.defineProperty(exports$1, "capitalize", { enumerable: true, get: function() {
|
|
3442
|
-
return string_1.capitalize;
|
|
3443
|
-
} });
|
|
3444
|
-
Object.defineProperty(exports$1, "escapeHtml", { enumerable: true, get: function() {
|
|
3445
|
-
return string_1.escapeHtml;
|
|
3446
|
-
} });
|
|
3447
|
-
Object.defineProperty(exports$1, "formatBytes", { enumerable: true, get: function() {
|
|
3448
|
-
return string_1.formatBytes;
|
|
3449
|
-
} });
|
|
3450
|
-
Object.defineProperty(exports$1, "formatNumber", { enumerable: true, get: function() {
|
|
3451
|
-
return string_1.formatNumber;
|
|
3452
|
-
} });
|
|
3453
|
-
Object.defineProperty(exports$1, "getInitials", { enumerable: true, get: function() {
|
|
3454
|
-
return string_1.getInitials;
|
|
3455
|
-
} });
|
|
3456
|
-
Object.defineProperty(exports$1, "isBlank", { enumerable: true, get: function() {
|
|
3457
|
-
return string_1.isBlank;
|
|
3458
|
-
} });
|
|
3459
|
-
Object.defineProperty(exports$1, "isNotBlank", { enumerable: true, get: function() {
|
|
3460
|
-
return string_1.isNotBlank;
|
|
3461
|
-
} });
|
|
3462
|
-
Object.defineProperty(exports$1, "normalizeWhitespace", { enumerable: true, get: function() {
|
|
3463
|
-
return string_1.normalizeWhitespace;
|
|
3464
|
-
} });
|
|
3465
|
-
Object.defineProperty(exports$1, "pluralize", { enumerable: true, get: function() {
|
|
3466
|
-
return string_1.pluralize;
|
|
3467
|
-
} });
|
|
3468
|
-
Object.defineProperty(exports$1, "randomString", { enumerable: true, get: function() {
|
|
3469
|
-
return string_1.randomString;
|
|
3470
|
-
} });
|
|
3471
|
-
Object.defineProperty(exports$1, "stripHtml", { enumerable: true, get: function() {
|
|
3472
|
-
return string_1.stripHtml;
|
|
3473
|
-
} });
|
|
3474
|
-
Object.defineProperty(exports$1, "toCamelCase", { enumerable: true, get: function() {
|
|
3475
|
-
return string_1.toCamelCase;
|
|
3476
|
-
} });
|
|
3477
|
-
Object.defineProperty(exports$1, "toKebabCase", { enumerable: true, get: function() {
|
|
3478
|
-
return string_1.toKebabCase;
|
|
3479
|
-
} });
|
|
3480
|
-
Object.defineProperty(exports$1, "toSnakeCase", { enumerable: true, get: function() {
|
|
3481
|
-
return string_1.toSnakeCase;
|
|
3482
|
-
} });
|
|
3483
|
-
Object.defineProperty(exports$1, "toTitleCase", { enumerable: true, get: function() {
|
|
3484
|
-
return string_1.toTitleCase;
|
|
3485
|
-
} });
|
|
3486
|
-
Object.defineProperty(exports$1, "truncate", { enumerable: true, get: function() {
|
|
3487
|
-
return string_1.truncate;
|
|
3488
|
-
} });
|
|
3489
|
-
var application_1 = requireApplication();
|
|
3490
|
-
Object.defineProperty(exports$1, "API_TIMEOUT", { enumerable: true, get: function() {
|
|
3491
|
-
return application_1.API_TIMEOUT;
|
|
3492
|
-
} });
|
|
3493
|
-
Object.defineProperty(exports$1, "API_RETRY_ATTEMPTS", { enumerable: true, get: function() {
|
|
3494
|
-
return application_1.API_RETRY_ATTEMPTS;
|
|
3495
|
-
} });
|
|
3496
|
-
Object.defineProperty(exports$1, "API_RETRY_DELAY", { enumerable: true, get: function() {
|
|
3497
|
-
return application_1.API_RETRY_DELAY;
|
|
3498
|
-
} });
|
|
3499
|
-
Object.defineProperty(exports$1, "AUTH_STATUS", { enumerable: true, get: function() {
|
|
3500
|
-
return application_1.AUTH_STATUS;
|
|
3501
|
-
} });
|
|
3502
|
-
Object.defineProperty(exports$1, "CHAIN_TYPE", { enumerable: true, get: function() {
|
|
3503
|
-
return application_1.CHAIN_TYPE;
|
|
3504
|
-
} });
|
|
3505
|
-
Object.defineProperty(exports$1, "STORAGE_KEYS", { enumerable: true, get: function() {
|
|
3506
|
-
return application_1.STORAGE_KEYS;
|
|
3507
|
-
} });
|
|
3508
|
-
Object.defineProperty(exports$1, "EMAIL_CONFIG", { enumerable: true, get: function() {
|
|
3509
|
-
return application_1.EMAIL_CONFIG;
|
|
3510
|
-
} });
|
|
3511
|
-
Object.defineProperty(exports$1, "SUBSCRIPTION_TIERS", { enumerable: true, get: function() {
|
|
3512
|
-
return application_1.SUBSCRIPTION_TIERS;
|
|
3513
|
-
} });
|
|
3514
|
-
Object.defineProperty(exports$1, "TIME_FORMAT", { enumerable: true, get: function() {
|
|
3515
|
-
return application_1.TIME_FORMAT;
|
|
3516
|
-
} });
|
|
3517
|
-
Object.defineProperty(exports$1, "ERROR_MESSAGES", { enumerable: true, get: function() {
|
|
3518
|
-
return application_1.ERROR_MESSAGES;
|
|
3519
|
-
} });
|
|
3520
|
-
Object.defineProperty(exports$1, "SUCCESS_MESSAGES", { enumerable: true, get: function() {
|
|
3521
|
-
return application_1.SUCCESS_MESSAGES;
|
|
3522
|
-
} });
|
|
3523
|
-
Object.defineProperty(exports$1, "ROUTES", { enumerable: true, get: function() {
|
|
3524
|
-
return application_1.ROUTES;
|
|
3525
|
-
} });
|
|
3526
|
-
Object.defineProperty(exports$1, "CONTACT_INFO", { enumerable: true, get: function() {
|
|
3527
|
-
return application_1.CONTACT_INFO;
|
|
3528
|
-
} });
|
|
3529
|
-
Object.defineProperty(exports$1, "WALLET_NAMES", { enumerable: true, get: function() {
|
|
3530
|
-
return application_1.WALLET_NAMES;
|
|
3531
|
-
} });
|
|
3532
|
-
Object.defineProperty(exports$1, "NETWORK_IDS", { enumerable: true, get: function() {
|
|
3533
|
-
return application_1.NETWORK_IDS;
|
|
3534
|
-
} });
|
|
3535
|
-
Object.defineProperty(exports$1, "ANIMATION", { enumerable: true, get: function() {
|
|
3536
|
-
return application_1.ANIMATION;
|
|
3537
|
-
} });
|
|
3538
|
-
Object.defineProperty(exports$1, "Z_INDEX", { enumerable: true, get: function() {
|
|
3539
|
-
return application_1.Z_INDEX;
|
|
3540
|
-
} });
|
|
3541
|
-
var status_values_1 = requireStatusValues();
|
|
3542
|
-
Object.defineProperty(exports$1, "STATUS_VALUES", { enumerable: true, get: function() {
|
|
3543
|
-
return status_values_1.STATUS_VALUES;
|
|
3544
|
-
} });
|
|
3545
|
-
var logger_1 = requireLogger();
|
|
3546
|
-
Object.defineProperty(exports$1, "LogLevel", { enumerable: true, get: function() {
|
|
3547
|
-
return logger_1.LogLevel;
|
|
3548
|
-
} });
|
|
3549
|
-
Object.defineProperty(exports$1, "logger", { enumerable: true, get: function() {
|
|
3550
|
-
return logger_1.logger;
|
|
3551
|
-
} });
|
|
3552
|
-
Object.defineProperty(exports$1, "authLogger", { enumerable: true, get: function() {
|
|
3553
|
-
return logger_1.authLogger;
|
|
3554
|
-
} });
|
|
3555
|
-
Object.defineProperty(exports$1, "apiLogger", { enumerable: true, get: function() {
|
|
3556
|
-
return logger_1.apiLogger;
|
|
3557
|
-
} });
|
|
3558
|
-
Object.defineProperty(exports$1, "contractLogger", { enumerable: true, get: function() {
|
|
3559
|
-
return logger_1.contractLogger;
|
|
3560
|
-
} });
|
|
3561
|
-
Object.defineProperty(exports$1, "ensLogger", { enumerable: true, get: function() {
|
|
3562
|
-
return logger_1.ensLogger;
|
|
3563
|
-
} });
|
|
3564
|
-
Object.defineProperty(exports$1, "storageLogger", { enumerable: true, get: function() {
|
|
3565
|
-
return logger_1.storageLogger;
|
|
3566
|
-
} });
|
|
3567
|
-
var url_params_1 = requireUrlParams();
|
|
3568
|
-
Object.defineProperty(exports$1, "createURLSearchParams", { enumerable: true, get: function() {
|
|
3569
|
-
return url_params_1.createURLSearchParams;
|
|
3570
|
-
} });
|
|
3571
|
-
Object.defineProperty(exports$1, "createSearchParams", { enumerable: true, get: function() {
|
|
3572
|
-
return url_params_1.createSearchParams;
|
|
3573
|
-
} });
|
|
3574
|
-
Object.defineProperty(exports$1, "searchParamsToString", { enumerable: true, get: function() {
|
|
3575
|
-
return url_params_1.searchParamsToString;
|
|
3576
|
-
} });
|
|
3577
|
-
Object.defineProperty(exports$1, "parseSearchParams", { enumerable: true, get: function() {
|
|
3578
|
-
return url_params_1.parseSearchParams;
|
|
3579
|
-
} });
|
|
3580
|
-
var async_helpers_1 = requireAsyncHelpers();
|
|
3581
|
-
Object.defineProperty(exports$1, "safeAsync", { enumerable: true, get: function() {
|
|
3582
|
-
return async_helpers_1.safeAsync;
|
|
3583
|
-
} });
|
|
3584
|
-
Object.defineProperty(exports$1, "withLoadingState", { enumerable: true, get: function() {
|
|
3585
|
-
return async_helpers_1.withLoadingState;
|
|
3586
|
-
} });
|
|
3587
|
-
Object.defineProperty(exports$1, "safeParallel", { enumerable: true, get: function() {
|
|
3588
|
-
return async_helpers_1.safeParallel;
|
|
3589
|
-
} });
|
|
3590
|
-
Object.defineProperty(exports$1, "withTimeout", { enumerable: true, get: function() {
|
|
3591
|
-
return async_helpers_1.withTimeout;
|
|
3592
|
-
} });
|
|
3593
|
-
Object.defineProperty(exports$1, "withCache", { enumerable: true, get: function() {
|
|
3594
|
-
return async_helpers_1.withCache;
|
|
3595
|
-
} });
|
|
3596
|
-
Object.defineProperty(exports$1, "clearExpiredCache", { enumerable: true, get: function() {
|
|
3597
|
-
return async_helpers_1.clearExpiredCache;
|
|
3598
|
-
} });
|
|
3599
|
-
Object.defineProperty(exports$1, "debounceAsync", { enumerable: true, get: function() {
|
|
3600
|
-
return async_helpers_1.debounceAsync;
|
|
3601
|
-
} });
|
|
3602
|
-
})(dist);
|
|
3603
|
-
return dist;
|
|
3604
1359
|
}
|
|
3605
|
-
|
|
1360
|
+
const logger = new Logger();
|
|
1361
|
+
logger.withContext("AUTH");
|
|
1362
|
+
logger.withContext("API");
|
|
1363
|
+
logger.withContext("CONTRACT");
|
|
1364
|
+
logger.withContext("ENS");
|
|
1365
|
+
logger.withContext("STORAGE");
|
|
3606
1366
|
const variantConfig = {
|
|
3607
|
-
[
|
|
1367
|
+
[InfoType.INFO]: {
|
|
3608
1368
|
icon: "ℹ",
|
|
3609
1369
|
container: "bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800",
|
|
3610
1370
|
iconColor: "text-blue-600 dark:text-blue-400",
|
|
3611
1371
|
titleColor: "text-blue-900 dark:text-blue-100",
|
|
3612
1372
|
descriptionColor: "text-blue-700 dark:text-blue-300"
|
|
3613
1373
|
},
|
|
3614
|
-
[
|
|
1374
|
+
[InfoType.SUCCESS]: {
|
|
3615
1375
|
icon: "✓",
|
|
3616
1376
|
container: "bg-green-50 dark:bg-green-950 border-green-200 dark:border-green-800",
|
|
3617
1377
|
iconColor: "text-green-600 dark:text-green-400",
|
|
3618
1378
|
titleColor: "text-green-900 dark:text-green-100",
|
|
3619
1379
|
descriptionColor: "text-green-700 dark:text-green-300"
|
|
3620
1380
|
},
|
|
3621
|
-
[
|
|
1381
|
+
[InfoType.WARNING]: {
|
|
3622
1382
|
icon: "⚠",
|
|
3623
1383
|
container: "bg-yellow-50 dark:bg-amber-950 border-yellow-200 dark:border-amber-800",
|
|
3624
1384
|
iconColor: "text-yellow-600 dark:text-amber-400",
|
|
3625
1385
|
titleColor: "text-yellow-900 dark:text-amber-100",
|
|
3626
1386
|
descriptionColor: "text-yellow-700 dark:text-amber-300"
|
|
3627
1387
|
},
|
|
3628
|
-
[
|
|
1388
|
+
[InfoType.ERROR]: {
|
|
3629
1389
|
icon: "✗",
|
|
3630
1390
|
container: "bg-red-50 dark:bg-red-950 border-red-200 dark:border-red-800",
|
|
3631
1391
|
iconColor: "text-red-600 dark:text-red-400",
|
|
@@ -3638,7 +1398,7 @@ const Banner = ({
|
|
|
3638
1398
|
onDismiss,
|
|
3639
1399
|
title,
|
|
3640
1400
|
description,
|
|
3641
|
-
variant =
|
|
1401
|
+
variant = InfoType.INFO,
|
|
3642
1402
|
duration = 5e3,
|
|
3643
1403
|
icon,
|
|
3644
1404
|
className,
|
|
@@ -3754,7 +1514,7 @@ const useBanner = (options = {}) => {
|
|
|
3754
1514
|
({
|
|
3755
1515
|
title,
|
|
3756
1516
|
description,
|
|
3757
|
-
variant =
|
|
1517
|
+
variant = InfoType.INFO,
|
|
3758
1518
|
duration = defaultDuration
|
|
3759
1519
|
}) => {
|
|
3760
1520
|
setBannerProps({ title, description, variant, duration });
|
|
@@ -6112,7 +3872,7 @@ const IconText = ({
|
|
|
6112
3872
|
const FormattedNumber = ({
|
|
6113
3873
|
value,
|
|
6114
3874
|
style = "decimal",
|
|
6115
|
-
currency
|
|
3875
|
+
currency = "USD",
|
|
6116
3876
|
minimumFractionDigits,
|
|
6117
3877
|
maximumFractionDigits,
|
|
6118
3878
|
locale = "en-US",
|
|
@@ -6128,7 +3888,7 @@ const FormattedNumber = ({
|
|
|
6128
3888
|
maximumFractionDigits
|
|
6129
3889
|
};
|
|
6130
3890
|
if (style === "currency") {
|
|
6131
|
-
options.currency =
|
|
3891
|
+
options.currency = currency;
|
|
6132
3892
|
}
|
|
6133
3893
|
return new Intl.NumberFormat(locale, options).format(value);
|
|
6134
3894
|
} catch (error) {
|
|
@@ -8112,23 +5872,23 @@ const Calendar = ({
|
|
|
8112
5872
|
className
|
|
8113
5873
|
}) => {
|
|
8114
5874
|
const [currentMonth, setCurrentMonth] = React.useState(value || /* @__PURE__ */ new Date());
|
|
8115
|
-
const getDaysInMonth = (
|
|
8116
|
-
const year =
|
|
8117
|
-
const month =
|
|
5875
|
+
const getDaysInMonth = (date) => {
|
|
5876
|
+
const year = date.getFullYear();
|
|
5877
|
+
const month = date.getMonth();
|
|
8118
5878
|
return new Date(year, month + 1, 0).getDate();
|
|
8119
5879
|
};
|
|
8120
|
-
const getFirstDayOfMonth = (
|
|
8121
|
-
const year =
|
|
8122
|
-
const month =
|
|
5880
|
+
const getFirstDayOfMonth = (date) => {
|
|
5881
|
+
const year = date.getFullYear();
|
|
5882
|
+
const month = date.getMonth();
|
|
8123
5883
|
return new Date(year, month, 1).getDay();
|
|
8124
5884
|
};
|
|
8125
5885
|
const isSameDay = (date1, date2) => {
|
|
8126
5886
|
return date1.getFullYear() === date2.getFullYear() && date1.getMonth() === date2.getMonth() && date1.getDate() === date2.getDate();
|
|
8127
5887
|
};
|
|
8128
|
-
const isDateDisabled = (
|
|
8129
|
-
if (minDate &&
|
|
8130
|
-
if (maxDate &&
|
|
8131
|
-
return disabledDates.some((disabledDate) => isSameDay(
|
|
5888
|
+
const isDateDisabled = (date) => {
|
|
5889
|
+
if (minDate && date < minDate) return true;
|
|
5890
|
+
if (maxDate && date > maxDate) return true;
|
|
5891
|
+
return disabledDates.some((disabledDate) => isSameDay(date, disabledDate));
|
|
8132
5892
|
};
|
|
8133
5893
|
const goToPreviousMonth = () => {
|
|
8134
5894
|
setCurrentMonth(
|
|
@@ -8169,9 +5929,9 @@ const Calendar = ({
|
|
|
8169
5929
|
};
|
|
8170
5930
|
const calendarDays = generateCalendarDays();
|
|
8171
5931
|
const weekDays = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
8172
|
-
const handleDayPress = (
|
|
8173
|
-
if (!
|
|
8174
|
-
onChange(
|
|
5932
|
+
const handleDayPress = (date) => {
|
|
5933
|
+
if (!date || isDateDisabled(date)) return;
|
|
5934
|
+
onChange(date);
|
|
8175
5935
|
};
|
|
8176
5936
|
const monthYear = currentMonth.toLocaleDateString("en-US", {
|
|
8177
5937
|
month: "long",
|
|
@@ -8206,8 +5966,8 @@ const Calendar = ({
|
|
|
8206
5966
|
)
|
|
8207
5967
|
] }),
|
|
8208
5968
|
/* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row mb-2", children: weekDays.map((day) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-1 items-center py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.Text, { className: "text-xs font-medium text-gray-600 dark:text-gray-400", children: day }) }, day)) }),
|
|
8209
|
-
weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row", children: week.map((
|
|
8210
|
-
if (!
|
|
5969
|
+
weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: "flex-row", children: week.map((date, dayIndex) => {
|
|
5970
|
+
if (!date) {
|
|
8211
5971
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8212
5972
|
reactNative.View,
|
|
8213
5973
|
{
|
|
@@ -8216,14 +5976,14 @@ const Calendar = ({
|
|
|
8216
5976
|
`empty-${dayIndex}`
|
|
8217
5977
|
);
|
|
8218
5978
|
}
|
|
8219
|
-
const isCurrentMonth =
|
|
8220
|
-
const isSelected = value && isSameDay(
|
|
8221
|
-
const isToday = isSameDay(
|
|
8222
|
-
const isDisabled = isDateDisabled(
|
|
5979
|
+
const isCurrentMonth = date.getMonth() === currentMonth.getMonth();
|
|
5980
|
+
const isSelected = value && isSameDay(date, value);
|
|
5981
|
+
const isToday = isSameDay(date, /* @__PURE__ */ new Date());
|
|
5982
|
+
const isDisabled = isDateDisabled(date);
|
|
8223
5983
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8224
5984
|
reactNative.Pressable,
|
|
8225
5985
|
{
|
|
8226
|
-
onPress: () => handleDayPress(
|
|
5986
|
+
onPress: () => handleDayPress(date),
|
|
8227
5987
|
disabled: isDisabled,
|
|
8228
5988
|
className: cn(
|
|
8229
5989
|
"flex-1 aspect-square items-center justify-center rounded-md m-0.5",
|
|
@@ -8233,7 +5993,7 @@ const Calendar = ({
|
|
|
8233
5993
|
isToday && !isSelected && "border-2 border-blue-600 dark:border-blue-400"
|
|
8234
5994
|
),
|
|
8235
5995
|
accessibilityRole: "button",
|
|
8236
|
-
accessibilityLabel:
|
|
5996
|
+
accessibilityLabel: date.toLocaleDateString(),
|
|
8237
5997
|
accessibilityState: {
|
|
8238
5998
|
selected: isSelected,
|
|
8239
5999
|
disabled: isDisabled
|
|
@@ -8246,11 +6006,11 @@ const Calendar = ({
|
|
|
8246
6006
|
isCurrentMonth ? "text-gray-900 dark:text-white" : "text-gray-400 dark:text-gray-600",
|
|
8247
6007
|
isSelected && "text-white font-semibold"
|
|
8248
6008
|
),
|
|
8249
|
-
children:
|
|
6009
|
+
children: date.getDate()
|
|
8250
6010
|
}
|
|
8251
6011
|
)
|
|
8252
6012
|
},
|
|
8253
|
-
`${
|
|
6013
|
+
`${date.getTime()}-${dayIndex}`
|
|
8254
6014
|
);
|
|
8255
6015
|
}) }, weekIndex))
|
|
8256
6016
|
] });
|
|
@@ -8946,7 +6706,7 @@ const TimePicker = ({
|
|
|
8946
6706
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
8947
6707
|
const [internalHour, setInternalHour] = React.useState("12");
|
|
8948
6708
|
const [internalMinute, setInternalMinute] = React.useState("00");
|
|
8949
|
-
const [
|
|
6709
|
+
const [period, setPeriod] = React.useState("AM");
|
|
8950
6710
|
React.useEffect(() => {
|
|
8951
6711
|
if (value) {
|
|
8952
6712
|
const [hours, minutes] = value.split(":");
|
|
@@ -9040,7 +6800,7 @@ const TimePicker = ({
|
|
|
9040
6800
|
handleTimeChange(
|
|
9041
6801
|
hour,
|
|
9042
6802
|
internalMinute,
|
|
9043
|
-
use12Hour ?
|
|
6803
|
+
use12Hour ? period : void 0
|
|
9044
6804
|
);
|
|
9045
6805
|
},
|
|
9046
6806
|
className: cn(
|
|
@@ -9072,7 +6832,7 @@ const TimePicker = ({
|
|
|
9072
6832
|
handleTimeChange(
|
|
9073
6833
|
internalHour,
|
|
9074
6834
|
minute,
|
|
9075
|
-
use12Hour ?
|
|
6835
|
+
use12Hour ? period : void 0
|
|
9076
6836
|
);
|
|
9077
6837
|
},
|
|
9078
6838
|
className: cn(
|
|
@@ -9111,14 +6871,14 @@ const TimePicker = ({
|
|
|
9111
6871
|
className: cn(
|
|
9112
6872
|
"px-3 py-2 rounded",
|
|
9113
6873
|
"active:bg-gray-100 dark:active:bg-gray-800",
|
|
9114
|
-
|
|
6874
|
+
period === "AM" && "bg-blue-100 dark:bg-blue-900/30"
|
|
9115
6875
|
),
|
|
9116
6876
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9117
6877
|
reactNative.Text,
|
|
9118
6878
|
{
|
|
9119
6879
|
className: cn(
|
|
9120
6880
|
"text-sm text-center",
|
|
9121
|
-
|
|
6881
|
+
period === "AM" ? "text-blue-700 dark:text-blue-300 font-medium" : "text-gray-900 dark:text-white"
|
|
9122
6882
|
),
|
|
9123
6883
|
children: "AM"
|
|
9124
6884
|
}
|
|
@@ -9139,14 +6899,14 @@ const TimePicker = ({
|
|
|
9139
6899
|
className: cn(
|
|
9140
6900
|
"px-3 py-2 rounded",
|
|
9141
6901
|
"active:bg-gray-100 dark:active:bg-gray-800",
|
|
9142
|
-
|
|
6902
|
+
period === "PM" && "bg-blue-100 dark:bg-blue-900/30"
|
|
9143
6903
|
),
|
|
9144
6904
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9145
6905
|
reactNative.Text,
|
|
9146
6906
|
{
|
|
9147
6907
|
className: cn(
|
|
9148
6908
|
"text-sm text-center",
|
|
9149
|
-
|
|
6909
|
+
period === "PM" ? "text-blue-700 dark:text-blue-300 font-medium" : "text-gray-900 dark:text-white"
|
|
9150
6910
|
),
|
|
9151
6911
|
children: "PM"
|
|
9152
6912
|
}
|
|
@@ -9400,16 +7160,16 @@ const TreeView = ({
|
|
|
9400
7160
|
};
|
|
9401
7161
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactNative.View, { className: cn("w-full", className), children: data.map((node) => renderNode(node, 0)) });
|
|
9402
7162
|
};
|
|
9403
|
-
const getExplorerUrl = (
|
|
7163
|
+
const getExplorerUrl = (address, chainId, explorerUrl) => {
|
|
9404
7164
|
if (explorerUrl) {
|
|
9405
|
-
return `${explorerUrl}/address/${
|
|
7165
|
+
return `${explorerUrl}/address/${address}`;
|
|
9406
7166
|
}
|
|
9407
7167
|
if (!chainId) {
|
|
9408
7168
|
return null;
|
|
9409
7169
|
}
|
|
9410
7170
|
if (chainId < 0) {
|
|
9411
7171
|
const cluster = chainId === -101 ? "" : chainId === -102 ? "?cluster=devnet" : "?cluster=testnet";
|
|
9412
|
-
return `https://explorer.solana.com/address/${
|
|
7172
|
+
return `https://explorer.solana.com/address/${address}${cluster}`;
|
|
9413
7173
|
}
|
|
9414
7174
|
const explorerMap = {
|
|
9415
7175
|
1: "https://etherscan.io",
|
|
@@ -9428,19 +7188,19 @@ const getExplorerUrl = (address2, chainId, explorerUrl) => {
|
|
|
9428
7188
|
if (!baseUrl) {
|
|
9429
7189
|
return null;
|
|
9430
7190
|
}
|
|
9431
|
-
return `${baseUrl}/address/${
|
|
7191
|
+
return `${baseUrl}/address/${address}`;
|
|
9432
7192
|
};
|
|
9433
|
-
const formatAddress = (
|
|
7193
|
+
const formatAddress = (address, format) => {
|
|
9434
7194
|
if (format === "full") {
|
|
9435
|
-
return
|
|
7195
|
+
return address;
|
|
9436
7196
|
}
|
|
9437
7197
|
if (format === "medium") {
|
|
9438
|
-
return `${
|
|
7198
|
+
return `${address.substring(0, 10)}...${address.substring(address.length - 8)}`;
|
|
9439
7199
|
}
|
|
9440
|
-
return `${
|
|
7200
|
+
return `${address.substring(0, 6)}...${address.substring(address.length - 4)}`;
|
|
9441
7201
|
};
|
|
9442
7202
|
const AddressLink = ({
|
|
9443
|
-
address
|
|
7203
|
+
address,
|
|
9444
7204
|
chainId,
|
|
9445
7205
|
explorerUrl,
|
|
9446
7206
|
label,
|
|
@@ -9451,17 +7211,17 @@ const AddressLink = ({
|
|
|
9451
7211
|
className
|
|
9452
7212
|
}) => {
|
|
9453
7213
|
const [copied, setCopied] = React.useState(false);
|
|
9454
|
-
const formattedAddress = formatAddress(
|
|
9455
|
-
const explorerLink = getExplorerUrl(
|
|
7214
|
+
const formattedAddress = formatAddress(address, format);
|
|
7215
|
+
const explorerLink = getExplorerUrl(address, chainId, explorerUrl);
|
|
9456
7216
|
const handleCopy = React.useCallback(async () => {
|
|
9457
7217
|
if (!onCopy) return;
|
|
9458
7218
|
try {
|
|
9459
|
-
await onCopy(
|
|
7219
|
+
await onCopy(address);
|
|
9460
7220
|
setCopied(true);
|
|
9461
7221
|
setTimeout(() => setCopied(false), 2e3);
|
|
9462
7222
|
} catch {
|
|
9463
7223
|
}
|
|
9464
|
-
}, [
|
|
7224
|
+
}, [address, onCopy]);
|
|
9465
7225
|
const handleOpenExplorer = React.useCallback(() => {
|
|
9466
7226
|
if (explorerLink) {
|
|
9467
7227
|
reactNative.Linking.openURL(explorerLink);
|
|
@@ -9615,19 +7375,19 @@ const DateInput = ({
|
|
|
9615
7375
|
lg: "py-3 px-4 text-lg"
|
|
9616
7376
|
};
|
|
9617
7377
|
const dateValue = value instanceof Date ? value : value ? new Date(value) : null;
|
|
9618
|
-
const formatDisplay = (
|
|
9619
|
-
if (!
|
|
9620
|
-
return
|
|
7378
|
+
const formatDisplay = (date) => {
|
|
7379
|
+
if (!date) return "";
|
|
7380
|
+
return date.toLocaleDateString("en-US", {
|
|
9621
7381
|
month: "short",
|
|
9622
7382
|
day: "numeric",
|
|
9623
7383
|
year: "numeric"
|
|
9624
7384
|
});
|
|
9625
7385
|
};
|
|
9626
7386
|
const handleDateChange = React.useCallback(
|
|
9627
|
-
(
|
|
9628
|
-
const year =
|
|
9629
|
-
const month = String(
|
|
9630
|
-
const day = String(
|
|
7387
|
+
(date) => {
|
|
7388
|
+
const year = date.getFullYear();
|
|
7389
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
7390
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
9631
7391
|
onChange(`${year}-${month}-${day}`);
|
|
9632
7392
|
setIsOpen(false);
|
|
9633
7393
|
},
|
|
@@ -9713,24 +7473,24 @@ const DateTimePicker = ({
|
|
|
9713
7473
|
}) => {
|
|
9714
7474
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
9715
7475
|
const [selectedDate, setSelectedDate] = React.useState(value);
|
|
9716
|
-
const formatDisplay = (
|
|
9717
|
-
const dateStr =
|
|
7476
|
+
const formatDisplay = (date) => {
|
|
7477
|
+
const dateStr = date.toLocaleDateString("en-US", {
|
|
9718
7478
|
month: "short",
|
|
9719
7479
|
day: "numeric",
|
|
9720
7480
|
year: "numeric"
|
|
9721
7481
|
});
|
|
9722
|
-
const hours =
|
|
9723
|
-
const minutes =
|
|
7482
|
+
const hours = date.getHours();
|
|
7483
|
+
const minutes = date.getMinutes();
|
|
9724
7484
|
if (use12Hour) {
|
|
9725
7485
|
const hour12 = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
|
9726
|
-
const
|
|
9727
|
-
return `${dateStr}, ${hour12}:${minutes.toString().padStart(2, "0")} ${
|
|
7486
|
+
const period = hours >= 12 ? "PM" : "AM";
|
|
7487
|
+
return `${dateStr}, ${hour12}:${minutes.toString().padStart(2, "0")} ${period}`;
|
|
9728
7488
|
}
|
|
9729
7489
|
return `${dateStr}, ${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
|
9730
7490
|
};
|
|
9731
7491
|
const handleDateChange = React.useCallback(
|
|
9732
|
-
(
|
|
9733
|
-
const newDateTime = new Date(
|
|
7492
|
+
(date) => {
|
|
7493
|
+
const newDateTime = new Date(date);
|
|
9734
7494
|
newDateTime.setHours(selectedDate.getHours());
|
|
9735
7495
|
newDateTime.setMinutes(selectedDate.getMinutes());
|
|
9736
7496
|
setSelectedDate(newDateTime);
|
|
@@ -9747,9 +7507,9 @@ const DateTimePicker = ({
|
|
|
9747
7507
|
},
|
|
9748
7508
|
[selectedDate]
|
|
9749
7509
|
);
|
|
9750
|
-
const getTimeString = (
|
|
9751
|
-
const hours =
|
|
9752
|
-
const minutes =
|
|
7510
|
+
const getTimeString = (date) => {
|
|
7511
|
+
const hours = date.getHours();
|
|
7512
|
+
const minutes = date.getMinutes();
|
|
9753
7513
|
return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}`;
|
|
9754
7514
|
};
|
|
9755
7515
|
const handleClose = React.useCallback(() => {
|