@embarkai/ui-kit 0.4.41 → 0.4.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +662 -554
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1269 -1160
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5285,7 +5285,7 @@ var init_highlight = __esm({
|
|
|
5285
5285
|
});
|
|
5286
5286
|
|
|
5287
5287
|
// src/internal/components/ui/button.tsx
|
|
5288
|
-
var import_react_slot, import_class_variance_authority, import_react9, import_jsx_runtime6, buttonVariants, Button;
|
|
5288
|
+
var import_react_slot, import_class_variance_authority, import_react9, import_jsx_runtime6, buttonVariants, BORDER_RADIUSES, Button;
|
|
5289
5289
|
var init_button = __esm({
|
|
5290
5290
|
"src/internal/components/ui/button.tsx"() {
|
|
5291
5291
|
init_utils2();
|
|
@@ -5306,25 +5306,44 @@ var init_button = __esm({
|
|
|
5306
5306
|
{
|
|
5307
5307
|
variants: {
|
|
5308
5308
|
variant: {
|
|
5309
|
-
default: cn2(
|
|
5309
|
+
"default": cn2(
|
|
5310
5310
|
"border border-transparent",
|
|
5311
5311
|
"bg-[var(--ui-kit-primary)] text-[var(--ui-kit-fg-inverted)]",
|
|
5312
5312
|
"hover:opacity-80 active:opacity-60",
|
|
5313
5313
|
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5314
5314
|
),
|
|
5315
|
-
|
|
5316
|
-
"border border-[var(--ui-kit-bd)]
|
|
5315
|
+
"default-glow": cn2(
|
|
5316
|
+
"border border-[var(--ui-kit-bd)]",
|
|
5317
|
+
"bg-[var(--ui-kit-primary)] text-[var(--ui-kit-fg-inverted)]",
|
|
5318
|
+
"hover:opacity-80 active:opacity-60",
|
|
5319
|
+
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5320
|
+
),
|
|
5321
|
+
"secondary": cn2(
|
|
5322
|
+
"border border-transparent",
|
|
5323
|
+
"bg-[var(--ui-kit-secondary)] text-[var(--ui-kit-fg)]",
|
|
5324
|
+
"hover:opacity-80 active:opacity-60",
|
|
5325
|
+
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5326
|
+
),
|
|
5327
|
+
"secondary-glow": cn2(
|
|
5328
|
+
"border border-[var(--ui-kit-bd)]",
|
|
5329
|
+
"bg-[var(--ui-kit-secondary)] text-[var(--ui-kit-fg)]",
|
|
5330
|
+
"hover:opacity-80 active:opacity-60",
|
|
5331
|
+
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5332
|
+
),
|
|
5333
|
+
"outline": cn2(
|
|
5334
|
+
"border border-[var(--ui-kit-bd)]",
|
|
5335
|
+
"bg-transparent text-[var(--ui-kit-fg)]",
|
|
5317
5336
|
"hover:opacity-80 active:opacity-60",
|
|
5318
5337
|
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5319
5338
|
),
|
|
5320
|
-
ghost: cn2(
|
|
5339
|
+
"ghost": cn2(
|
|
5321
5340
|
"border border-transparent bg-transparent text-[var(--ui-kit-fg)]",
|
|
5322
5341
|
"hover:opacity-80 active:opacity-60",
|
|
5323
5342
|
"disabled:hover:opacity-50 disabled:active:opacity-50"
|
|
5324
5343
|
)
|
|
5325
5344
|
},
|
|
5326
5345
|
size: {
|
|
5327
|
-
small: "h-6 px-2 gap-2",
|
|
5346
|
+
small: "h-6 px-2 gap-2 rounded-[calc(var(--ui-kit-el-bdrs)_/_2)]",
|
|
5328
5347
|
medium: "h-8 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] gap-2",
|
|
5329
5348
|
large: "h-12 px-[var(--ui-kit-pd)] rounded-[var(--ui-kit-el-bdrs)] gap-[var(--ui-kit-gap)]",
|
|
5330
5349
|
icon: "h-8 w-8 p-0"
|
|
@@ -5336,12 +5355,39 @@ var init_button = __esm({
|
|
|
5336
5355
|
}
|
|
5337
5356
|
}
|
|
5338
5357
|
);
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5358
|
+
BORDER_RADIUSES = {
|
|
5359
|
+
small: "calc(var(--ui-kit-el-bdrs) / 2)",
|
|
5360
|
+
medium: "var(--ui-kit-el-bdrs)",
|
|
5361
|
+
large: "var(--ui-kit-el-bdrs)",
|
|
5362
|
+
icon: ""
|
|
5363
|
+
};
|
|
5364
|
+
Button = (0, import_react9.forwardRef)((props, ref) => {
|
|
5365
|
+
const { className, variant = "default", size = "large", asChild = false, children, ...buttonProps } = props;
|
|
5366
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
5367
|
+
const isBorderGlow = variant === "secondary-glow" || variant === "default-glow";
|
|
5368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
5369
|
+
Comp,
|
|
5370
|
+
{
|
|
5371
|
+
ref,
|
|
5372
|
+
...buttonProps,
|
|
5373
|
+
className: cn2(buttonVariants({ variant, size, className }), { relative: isBorderGlow }),
|
|
5374
|
+
children: [
|
|
5375
|
+
isBorderGlow && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
5376
|
+
"div",
|
|
5377
|
+
{
|
|
5378
|
+
style: {
|
|
5379
|
+
"--ui-kit-fg": variant === "default-glow" ? "var(--ui-kit-fg-inverted)" : "var(--ui-kit-fg)",
|
|
5380
|
+
"borderRadius": BORDER_RADIUSES[size]
|
|
5381
|
+
},
|
|
5382
|
+
className: "button-shine-outline",
|
|
5383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "button-shine-outline-shiner" })
|
|
5384
|
+
}
|
|
5385
|
+
),
|
|
5386
|
+
children
|
|
5387
|
+
]
|
|
5388
|
+
}
|
|
5389
|
+
);
|
|
5390
|
+
});
|
|
5345
5391
|
Button.displayName = "Button";
|
|
5346
5392
|
}
|
|
5347
5393
|
});
|
|
@@ -9074,7 +9120,7 @@ function CryptoSelectorTrigger(props) {
|
|
|
9074
9120
|
Button,
|
|
9075
9121
|
{
|
|
9076
9122
|
disabled,
|
|
9077
|
-
variant: "
|
|
9123
|
+
variant: "secondary",
|
|
9078
9124
|
className: "w-full justify-between",
|
|
9079
9125
|
onClick: () => {
|
|
9080
9126
|
useBuyMenuStore.getState().setError(null);
|
|
@@ -9092,7 +9138,7 @@ function CryptoSelectorTrigger(props) {
|
|
|
9092
9138
|
Button,
|
|
9093
9139
|
{
|
|
9094
9140
|
disabled,
|
|
9095
|
-
variant: "
|
|
9141
|
+
variant: "secondary",
|
|
9096
9142
|
className: "w-full justify-between",
|
|
9097
9143
|
onClick: () => {
|
|
9098
9144
|
useBuyMenuStore.getState().setError(null);
|
|
@@ -9169,6 +9215,7 @@ function ResolvedFiatIcon(props) {
|
|
|
9169
9215
|
"div",
|
|
9170
9216
|
{
|
|
9171
9217
|
className: cn2(
|
|
9218
|
+
"flex-none",
|
|
9172
9219
|
"bg-[var(--ui-kit-primary)]",
|
|
9173
9220
|
"border border-[var(--ui-kit-bd)]",
|
|
9174
9221
|
"flex items-center justify-center",
|
|
@@ -9194,8 +9241,17 @@ var init_ResolvedFiatIcon = __esm({
|
|
|
9194
9241
|
});
|
|
9195
9242
|
|
|
9196
9243
|
// src/internal/components/BuyMenu/components/FiatSelector.tsx
|
|
9244
|
+
function getCurrencyName(ticker, locale = "en") {
|
|
9245
|
+
try {
|
|
9246
|
+
return new Intl.DisplayNames([locale], { type: "currency" }).of(ticker.toUpperCase()) ?? ticker;
|
|
9247
|
+
} catch {
|
|
9248
|
+
return ticker;
|
|
9249
|
+
}
|
|
9250
|
+
}
|
|
9197
9251
|
function FiatItem(props) {
|
|
9198
|
-
const {
|
|
9252
|
+
const { ticker } = props;
|
|
9253
|
+
const { i18n } = useT();
|
|
9254
|
+
const locale = i18n.resolvedLanguage || "en";
|
|
9199
9255
|
const selectedFiat = useBuyMenuStore((st) => st.selectedFiat);
|
|
9200
9256
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9201
9257
|
Button,
|
|
@@ -9208,7 +9264,10 @@ function FiatItem(props) {
|
|
|
9208
9264
|
},
|
|
9209
9265
|
className: "justify-between",
|
|
9210
9266
|
children: [
|
|
9211
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.
|
|
9267
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-1 items-center gap-[var(--ui-kit-gap)] text-left", children: [
|
|
9268
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block flex-none", children: ticker.toUpperCase() }),
|
|
9269
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block whitespace-nowrap flex-1 text-ellipsis overflow-hidden", children: getCurrencyName(ticker, locale) })
|
|
9270
|
+
] }),
|
|
9212
9271
|
!!ticker && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ResolvedFiatIcon, { ticker })
|
|
9213
9272
|
]
|
|
9214
9273
|
}
|
|
@@ -9217,23 +9276,61 @@ function FiatItem(props) {
|
|
|
9217
9276
|
function FiatSelector(props) {
|
|
9218
9277
|
const { fiats } = props;
|
|
9219
9278
|
const { t } = useT();
|
|
9279
|
+
const [search, setSearch] = (0, import_react20.useState)("");
|
|
9280
|
+
const [target, setTarget] = (0, import_react20.useState)("");
|
|
9281
|
+
const setSearchDebounced = (0, import_react20.useCallback)(
|
|
9282
|
+
(0, import_lodash_es5.debounce)((value) => {
|
|
9283
|
+
setTarget(value);
|
|
9284
|
+
useBuyMenuStore.getState().setRenderKey(`on-ramp-fiat-selector-${Date.now()}`);
|
|
9285
|
+
}, 1e3),
|
|
9286
|
+
[]
|
|
9287
|
+
);
|
|
9288
|
+
const filteredFiats = (0, import_react20.useMemo)(() => {
|
|
9289
|
+
const sorted = [...fiats].sort((a, b) => {
|
|
9290
|
+
const aIdx = POPULAR_FIATS.indexOf(a.ticker.toUpperCase());
|
|
9291
|
+
const bIdx = POPULAR_FIATS.indexOf(b.ticker.toUpperCase());
|
|
9292
|
+
if (aIdx !== -1 && bIdx !== -1) return aIdx - bIdx;
|
|
9293
|
+
if (aIdx !== -1) return -1;
|
|
9294
|
+
if (bIdx !== -1) return 1;
|
|
9295
|
+
return a.name.localeCompare(b.name);
|
|
9296
|
+
});
|
|
9297
|
+
if (!target) return sorted;
|
|
9298
|
+
return sorted.filter((f) => f.ticker.toLowerCase().includes(target.toLowerCase()));
|
|
9299
|
+
}, [fiats, target]);
|
|
9300
|
+
console.warn("[FIAT SELECTOR]", filteredFiats);
|
|
9220
9301
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
9302
|
+
fiats.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9303
|
+
Input,
|
|
9304
|
+
{
|
|
9305
|
+
name: "search-binance-on-ramp-fiat",
|
|
9306
|
+
autoComplete: "off",
|
|
9307
|
+
type: "text",
|
|
9308
|
+
placeholder: 'Search fiat (e.g. "USD")',
|
|
9309
|
+
value: search || "",
|
|
9310
|
+
Icon: import_lucide_react10.SearchIcon,
|
|
9311
|
+
onChange: (e) => {
|
|
9312
|
+
setSearch(e.target.value);
|
|
9313
|
+
setSearchDebounced(e.target.value);
|
|
9314
|
+
}
|
|
9315
|
+
}
|
|
9316
|
+
),
|
|
9221
9317
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:buyMenu.selectFiat") }),
|
|
9222
9318
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
9223
|
-
|
|
9224
|
-
!
|
|
9319
|
+
filteredFiats.map((f) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FiatItem, { ...f }, `${f.ticker}-${f.name}`)),
|
|
9320
|
+
!filteredFiats.length && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Highlight, { type: "info", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-[10px]", children: "No fiat fiats found." }) })
|
|
9225
9321
|
] })
|
|
9226
9322
|
] });
|
|
9227
9323
|
}
|
|
9228
9324
|
function FiatSelectorTrigger(props) {
|
|
9229
9325
|
const { disabled, fiats } = props;
|
|
9230
|
-
const { t } = useT();
|
|
9326
|
+
const { t, i18n } = useT();
|
|
9327
|
+
const locale = i18n.resolvedLanguage || "en";
|
|
9231
9328
|
const selectedFiat = useBuyMenuStore((st) => st.selectedFiat);
|
|
9232
9329
|
const fiatMeta = fiats.find((f) => f.ticker.toLowerCase() === selectedFiat?.toLowerCase());
|
|
9233
9330
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9234
9331
|
Button,
|
|
9235
9332
|
{
|
|
9236
|
-
variant: "
|
|
9333
|
+
variant: "secondary",
|
|
9237
9334
|
className: "w-full justify-between",
|
|
9238
9335
|
disabled,
|
|
9239
9336
|
onClick: () => {
|
|
@@ -9241,7 +9338,7 @@ function FiatSelectorTrigger(props) {
|
|
|
9241
9338
|
useBuyMenuStore.getState().setIsFiatSelector(true);
|
|
9242
9339
|
},
|
|
9243
9340
|
children: fiatMeta ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
9244
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: fiatMeta.
|
|
9341
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "block whitespace-nowrap flex-1 text-ellipsis overflow-hidden text-left", children: getCurrencyName(fiatMeta.ticker, locale) }),
|
|
9245
9342
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ResolvedFiatIcon, { ticker: fiatMeta.ticker })
|
|
9246
9343
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "flex items-center gap-[var(--ui-kit-gap)] text-[var(--ui-kit-fg-muted)]", children: [
|
|
9247
9344
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react10.PointerIcon, { className: "w-4 h-4 flex-none" }),
|
|
@@ -9250,16 +9347,20 @@ function FiatSelectorTrigger(props) {
|
|
|
9250
9347
|
}
|
|
9251
9348
|
);
|
|
9252
9349
|
}
|
|
9253
|
-
var import_lucide_react10, import_jsx_runtime33;
|
|
9350
|
+
var import_lodash_es5, import_lucide_react10, import_react20, import_jsx_runtime33, POPULAR_FIATS;
|
|
9254
9351
|
var init_FiatSelector = __esm({
|
|
9255
9352
|
"src/internal/components/BuyMenu/components/FiatSelector.tsx"() {
|
|
9256
9353
|
init_i18n();
|
|
9354
|
+
import_lodash_es5 = require("lodash-es");
|
|
9257
9355
|
import_lucide_react10 = require("lucide-react");
|
|
9356
|
+
import_react20 = require("react");
|
|
9258
9357
|
init_button();
|
|
9259
9358
|
init_highlight();
|
|
9359
|
+
init_input();
|
|
9260
9360
|
init_useBuyMenuStore();
|
|
9261
9361
|
init_ResolvedFiatIcon();
|
|
9262
9362
|
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9363
|
+
POPULAR_FIATS = ["USD", "EUR", "GBP", "JPY", "CAD", "AUD", "CHF", "CNY", "SEK", "NZD"];
|
|
9263
9364
|
}
|
|
9264
9365
|
});
|
|
9265
9366
|
|
|
@@ -9331,7 +9432,7 @@ function PaymentModeSelectorTrigger(props) {
|
|
|
9331
9432
|
Button,
|
|
9332
9433
|
{
|
|
9333
9434
|
size: "large",
|
|
9334
|
-
variant: "
|
|
9435
|
+
variant: "secondary",
|
|
9335
9436
|
className: "w-full justify-between",
|
|
9336
9437
|
disabled,
|
|
9337
9438
|
onClick: () => useBuyMenuStore.getState().setIsPaymentModeSelector(true),
|
|
@@ -9347,8 +9448,8 @@ var init_PaymentModeSelector = __esm({
|
|
|
9347
9448
|
import_lucide_react11 = require("lucide-react");
|
|
9348
9449
|
init_button();
|
|
9349
9450
|
init_highlight();
|
|
9350
|
-
init_useBuyMenuStore();
|
|
9351
9451
|
init_useBinanceStore();
|
|
9452
|
+
init_useBuyMenuStore();
|
|
9352
9453
|
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9353
9454
|
}
|
|
9354
9455
|
});
|
|
@@ -9667,10 +9768,10 @@ var init_badge = __esm({
|
|
|
9667
9768
|
});
|
|
9668
9769
|
|
|
9669
9770
|
// src/internal/components/BuyMenu/binance/statuses.ts
|
|
9670
|
-
var
|
|
9771
|
+
var import_lodash_es6, STATUS_CODE_TO_MESSAGE, STATUSES_FILTERS;
|
|
9671
9772
|
var init_statuses = __esm({
|
|
9672
9773
|
"src/internal/components/BuyMenu/binance/statuses.ts"() {
|
|
9673
|
-
|
|
9774
|
+
import_lodash_es6 = require("lodash-es");
|
|
9674
9775
|
STATUS_CODE_TO_MESSAGE = {
|
|
9675
9776
|
"0": {
|
|
9676
9777
|
code: "0",
|
|
@@ -9775,7 +9876,7 @@ var init_statuses = __esm({
|
|
|
9775
9876
|
remarks: "On-ramp"
|
|
9776
9877
|
}
|
|
9777
9878
|
};
|
|
9778
|
-
STATUSES_FILTERS = (0,
|
|
9879
|
+
STATUSES_FILTERS = (0, import_lodash_es6.values)(STATUS_CODE_TO_MESSAGE).filter(
|
|
9779
9880
|
(status) => status.remarks.toLowerCase().includes("on-ramp")
|
|
9780
9881
|
);
|
|
9781
9882
|
}
|
|
@@ -9872,7 +9973,7 @@ function BinanceTxHistoryItem(props) {
|
|
|
9872
9973
|
function BinanceTxHistory() {
|
|
9873
9974
|
const { t } = useT();
|
|
9874
9975
|
const walletAddress = useSession((st) => st.address);
|
|
9875
|
-
const [
|
|
9976
|
+
const [pagePointer, setPagePointer] = (0, import_react21.useState)(1);
|
|
9876
9977
|
const {
|
|
9877
9978
|
data: txData,
|
|
9878
9979
|
isLoading: isTxDataLoading,
|
|
@@ -9892,18 +9993,27 @@ function BinanceTxHistory() {
|
|
|
9892
9993
|
});
|
|
9893
9994
|
const { pageParams = [], pages: loadedPages = [] } = txData || {};
|
|
9894
9995
|
const pageCount = loadedPages[loadedPages.length - 1]?.pageCount || 1;
|
|
9895
|
-
const txList = loadedPages.map((p) => p.data)[
|
|
9896
|
-
|
|
9897
|
-
|
|
9996
|
+
const txList = loadedPages.map((p) => p.data)[pagePointer - 1] || [];
|
|
9997
|
+
const updateExpandable = (0, import_react21.useCallback)(
|
|
9998
|
+
(0, import_lodash_es7.debounce)(() => {
|
|
9999
|
+
useBuyMenuStore.getState().setRenderKey(`binance-history-loaded-${Date.now()}`);
|
|
10000
|
+
}, 250),
|
|
10001
|
+
[]
|
|
10002
|
+
);
|
|
10003
|
+
(0, import_react21.useEffect)(() => {
|
|
10004
|
+
if (isTxDataLoading || txList?.length === 0) return;
|
|
10005
|
+
updateExpandable();
|
|
10006
|
+
}, [isTxDataLoading, txList]);
|
|
10007
|
+
const handleNextPage = (0, import_react21.useCallback)(
|
|
9898
10008
|
async (curCursor, curPageParams) => {
|
|
9899
10009
|
const maxLoadedPage = Math.max(...curPageParams);
|
|
9900
10010
|
if (curCursor !== maxLoadedPage) {
|
|
9901
|
-
|
|
10011
|
+
setPagePointer((prev) => prev + 1);
|
|
9902
10012
|
} else {
|
|
9903
10013
|
const nPage = await fetchNextPage();
|
|
9904
10014
|
const nextPageParams = nPage?.data?.pageParams || [];
|
|
9905
10015
|
const nextCursor = Number(nextPageParams[nextPageParams.length - 1]) || 1;
|
|
9906
|
-
|
|
10016
|
+
setPagePointer(nextCursor);
|
|
9907
10017
|
}
|
|
9908
10018
|
},
|
|
9909
10019
|
[fetchNextPage]
|
|
@@ -9918,38 +10028,38 @@ function BinanceTxHistory() {
|
|
|
9918
10028
|
txList.map((tx) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(BinanceTxHistoryItem, { ...tx }, tx.id)),
|
|
9919
10029
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between gap-[var(--ui-kit-gap)]", children: [
|
|
9920
10030
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
9921
|
-
|
|
10031
|
+
pagePointer > 1 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9922
10032
|
Button,
|
|
9923
10033
|
{
|
|
9924
10034
|
variant: "ghost",
|
|
9925
10035
|
size: "medium",
|
|
9926
10036
|
disabled: isTxDataFetching,
|
|
9927
10037
|
className: "text-xs",
|
|
9928
|
-
onClick: () =>
|
|
10038
|
+
onClick: () => setPagePointer((prev) => prev - 1),
|
|
9929
10039
|
children: t("passport:common.prev")
|
|
9930
10040
|
}
|
|
9931
10041
|
),
|
|
9932
|
-
(
|
|
10042
|
+
(pagePointer < loadedPages.length || !!hasNextPage) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9933
10043
|
Button,
|
|
9934
10044
|
{
|
|
9935
10045
|
variant: "ghost",
|
|
9936
10046
|
size: "medium",
|
|
9937
10047
|
disabled: isTxDataFetching,
|
|
9938
10048
|
className: "text-xs",
|
|
9939
|
-
onClick: () => handleNextPage(
|
|
10049
|
+
onClick: () => handleNextPage(pagePointer, pageParams),
|
|
9940
10050
|
children: t("passport:common.next")
|
|
9941
10051
|
}
|
|
9942
10052
|
)
|
|
9943
10053
|
] }),
|
|
9944
10054
|
isTxDataFetching ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react13.LoaderIcon, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "text-xs leading-4 text-[var(--ui-kit-fg-muted)]", children: [
|
|
9945
|
-
|
|
10055
|
+
pagePointer,
|
|
9946
10056
|
" / ",
|
|
9947
10057
|
pageCount
|
|
9948
10058
|
] })
|
|
9949
10059
|
] })
|
|
9950
10060
|
] });
|
|
9951
10061
|
}
|
|
9952
|
-
var import_react_query8, import_dayjs, import_lucide_react13,
|
|
10062
|
+
var import_react_query8, import_dayjs, import_lodash_es7, import_lucide_react13, import_react21, import_jsx_runtime37, TRANSACTIONS_PAGESIZE, SHOW_STATUSES, TX_TYPES;
|
|
9953
10063
|
var init_BinanceTxHistory = __esm({
|
|
9954
10064
|
"src/internal/components/BuyMenu/binance/BinanceTxHistory.tsx"() {
|
|
9955
10065
|
init_utils2();
|
|
@@ -9957,13 +10067,15 @@ var init_BinanceTxHistory = __esm({
|
|
|
9957
10067
|
init_i18n();
|
|
9958
10068
|
import_react_query8 = require("@tanstack/react-query");
|
|
9959
10069
|
import_dayjs = __toESM(require("dayjs"), 1);
|
|
10070
|
+
import_lodash_es7 = require("lodash-es");
|
|
9960
10071
|
import_lucide_react13 = require("lucide-react");
|
|
9961
|
-
|
|
10072
|
+
import_react21 = require("react");
|
|
9962
10073
|
init_priceFormatter();
|
|
9963
10074
|
init_badge();
|
|
9964
10075
|
init_button();
|
|
9965
10076
|
init_highlight();
|
|
9966
10077
|
init_queryKeys();
|
|
10078
|
+
init_useBuyMenuStore();
|
|
9967
10079
|
init_api();
|
|
9968
10080
|
init_statuses();
|
|
9969
10081
|
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
@@ -9976,8 +10088,8 @@ var init_BinanceTxHistory = __esm({
|
|
|
9976
10088
|
// src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
|
|
9977
10089
|
function useBinanceSseTxTracing(walletAddress) {
|
|
9978
10090
|
const qc = (0, import_react_query9.useQueryClient)();
|
|
9979
|
-
const debounceRef = (0,
|
|
9980
|
-
(0,
|
|
10091
|
+
const debounceRef = (0, import_react22.useRef)(null);
|
|
10092
|
+
(0, import_react22.useEffect)(() => {
|
|
9981
10093
|
if (!walletAddress) return;
|
|
9982
10094
|
const iframeManager = getIframeManager();
|
|
9983
10095
|
if (!iframeManager) return;
|
|
@@ -9999,11 +10111,11 @@ function useBinanceSseTxTracing(walletAddress) {
|
|
|
9999
10111
|
};
|
|
10000
10112
|
}, [walletAddress, qc]);
|
|
10001
10113
|
}
|
|
10002
|
-
var import_react_query9,
|
|
10114
|
+
var import_react_query9, import_react22;
|
|
10003
10115
|
var init_useBinanceSseTracing = __esm({
|
|
10004
10116
|
"src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts"() {
|
|
10005
10117
|
import_react_query9 = require("@tanstack/react-query");
|
|
10006
|
-
|
|
10118
|
+
import_react22 = require("react");
|
|
10007
10119
|
init_iframe_manager();
|
|
10008
10120
|
init_queryKeys();
|
|
10009
10121
|
init_api();
|
|
@@ -10046,7 +10158,7 @@ function Binance() {
|
|
|
10046
10158
|
} = useBuyMenuStore();
|
|
10047
10159
|
const paymentMode = useBinanceStore((st) => st.paymentMode);
|
|
10048
10160
|
const isCurrurenciesSelected = !!selectedCrypto && !!selectedFiat;
|
|
10049
|
-
(0,
|
|
10161
|
+
(0, import_react23.useEffect)(() => {
|
|
10050
10162
|
if (!isCurrurenciesSelected) return;
|
|
10051
10163
|
useBuyMenuStore.getState().setRenderKey(`${selectedCrypto}-${selectedFiat}-${Date.now()}`);
|
|
10052
10164
|
}, [isCurrurenciesSelected]);
|
|
@@ -10081,7 +10193,7 @@ function Binance() {
|
|
|
10081
10193
|
});
|
|
10082
10194
|
const paymentModes = paymentModesData?.data?.paymentMethods || [];
|
|
10083
10195
|
const selectedPaymentMode = paymentModes?.find((el) => getPayMethodID(el) === paymentMode) || null;
|
|
10084
|
-
(0,
|
|
10196
|
+
(0, import_react23.useEffect)(() => {
|
|
10085
10197
|
useBuyMenuStore.getState().setMinAmount(Number(selectedPaymentMode?.fiatMinLimit || "0"));
|
|
10086
10198
|
}, [selectedPaymentMode]);
|
|
10087
10199
|
const { mutate: estimateQuote, isPending: isQuoteEstimating } = (0, import_react_query10.useMutation)({
|
|
@@ -10109,20 +10221,21 @@ function Binance() {
|
|
|
10109
10221
|
}
|
|
10110
10222
|
});
|
|
10111
10223
|
const availableFiats = (tradingPairsData?.data?.fiatCurrencies || []).filter((ticker) => ticker !== "DEFAULT").map((ticker) => ({ name: ticker, ticker }));
|
|
10112
|
-
(0,
|
|
10224
|
+
(0, import_react23.useEffect)(() => {
|
|
10113
10225
|
if (!!selectedFiat || !availableFiats?.length) return;
|
|
10114
|
-
|
|
10226
|
+
const targetFiat = availableFiats.find((item) => item.ticker === "USD" || item.ticker === "EUR") || availableFiats[0];
|
|
10227
|
+
useBuyMenuStore.getState().setSelectedFiat(targetFiat.ticker);
|
|
10115
10228
|
}, [availableFiats, selectedFiat]);
|
|
10116
|
-
(0,
|
|
10229
|
+
(0, import_react23.useEffect)(() => {
|
|
10117
10230
|
if (!!selectedCrypto || !networkAvailableCryptoList?.length) return;
|
|
10118
10231
|
useBuyMenuStore.getState().setSelectedCrypto(networkAvailableCryptoList[0].cryptoCurrency);
|
|
10119
10232
|
}, [networkAvailableCryptoList, selectedCrypto]);
|
|
10120
|
-
(0,
|
|
10233
|
+
(0, import_react23.useEffect)(() => {
|
|
10121
10234
|
if (!!paymentMode || !paymentModes.length) return;
|
|
10122
10235
|
const targetPaymentMode = paymentModes.find((item) => item.payMethodCode === PREFERRED_PAYMENT_METHOD) || paymentModes[0];
|
|
10123
10236
|
useBinanceStore.getState().setPaymentMode(getPayMethodID(targetPaymentMode));
|
|
10124
10237
|
}, [paymentModes]);
|
|
10125
|
-
(0,
|
|
10238
|
+
(0, import_react23.useEffect)(() => {
|
|
10126
10239
|
return () => {
|
|
10127
10240
|
useBinanceStore.getState().setPaymentMode(null);
|
|
10128
10241
|
qc.resetQueries({ queryKey: [QUERY_KEYS2.binanceTradingPairs] });
|
|
@@ -10244,7 +10357,7 @@ function Binance() {
|
|
|
10244
10357
|
)
|
|
10245
10358
|
] });
|
|
10246
10359
|
}
|
|
10247
|
-
var import_react_query10, import_lucide_react14,
|
|
10360
|
+
var import_react_query10, import_lucide_react14, import_react23, import_jsx_runtime38, PREFERRED_PAYMENT_METHOD;
|
|
10248
10361
|
var init_Binance = __esm({
|
|
10249
10362
|
"src/internal/components/BuyMenu/binance/Binance.tsx"() {
|
|
10250
10363
|
init_utils2();
|
|
@@ -10252,7 +10365,7 @@ var init_Binance = __esm({
|
|
|
10252
10365
|
init_i18n();
|
|
10253
10366
|
import_react_query10 = require("@tanstack/react-query");
|
|
10254
10367
|
import_lucide_react14 = require("lucide-react");
|
|
10255
|
-
|
|
10368
|
+
import_react23 = require("react");
|
|
10256
10369
|
init_button();
|
|
10257
10370
|
init_highlight();
|
|
10258
10371
|
init_input();
|
|
@@ -10524,7 +10637,7 @@ function FinchPayTxHistoryItem(props) {
|
|
|
10524
10637
|
function FinchPayTxHistory() {
|
|
10525
10638
|
const { t } = useT();
|
|
10526
10639
|
const walletAddress = useSession((st) => st.address);
|
|
10527
|
-
const [cursor, setCursor] = (0,
|
|
10640
|
+
const [cursor, setCursor] = (0, import_react24.useState)(1);
|
|
10528
10641
|
const {
|
|
10529
10642
|
data: txData,
|
|
10530
10643
|
isLoading: isTxDataLoading,
|
|
@@ -10546,7 +10659,7 @@ function FinchPayTxHistory() {
|
|
|
10546
10659
|
const pageCount = loadedPages[loadedPages.length - 1]?.pageCount || 1;
|
|
10547
10660
|
const txList = loadedPages.map((p) => p.data)[cursor - 1] || [];
|
|
10548
10661
|
console.log("[FINCHPAY] txList", txData);
|
|
10549
|
-
const handleNextPage = (0,
|
|
10662
|
+
const handleNextPage = (0, import_react24.useCallback)(
|
|
10550
10663
|
async (curCursor, curPageParams) => {
|
|
10551
10664
|
const maxLoadedPage = Math.max(...curPageParams);
|
|
10552
10665
|
if (curCursor !== maxLoadedPage) {
|
|
@@ -10601,7 +10714,7 @@ function FinchPayTxHistory() {
|
|
|
10601
10714
|
] })
|
|
10602
10715
|
] });
|
|
10603
10716
|
}
|
|
10604
|
-
var import_react_query12, import_dayjs2, import_lucide_react16,
|
|
10717
|
+
var import_react_query12, import_dayjs2, import_lucide_react16, import_react24, import_jsx_runtime40, TRANSACTIONS_PAGESIZE2;
|
|
10605
10718
|
var init_FinchPayTxHistory = __esm({
|
|
10606
10719
|
"src/internal/components/BuyMenu/finchpay/FinchPayTxHistory.tsx"() {
|
|
10607
10720
|
init_utils2();
|
|
@@ -10610,7 +10723,7 @@ var init_FinchPayTxHistory = __esm({
|
|
|
10610
10723
|
import_react_query12 = require("@tanstack/react-query");
|
|
10611
10724
|
import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
10612
10725
|
import_lucide_react16 = require("lucide-react");
|
|
10613
|
-
|
|
10726
|
+
import_react24 = require("react");
|
|
10614
10727
|
init_priceFormatter();
|
|
10615
10728
|
init_badge();
|
|
10616
10729
|
init_button();
|
|
@@ -10639,8 +10752,8 @@ var init_networks2 = __esm({
|
|
|
10639
10752
|
// src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
|
|
10640
10753
|
function useFinchpaySseTxTracing(walletAddress) {
|
|
10641
10754
|
const qc = (0, import_react_query13.useQueryClient)();
|
|
10642
|
-
const debounceRef = (0,
|
|
10643
|
-
(0,
|
|
10755
|
+
const debounceRef = (0, import_react25.useRef)(null);
|
|
10756
|
+
(0, import_react25.useEffect)(() => {
|
|
10644
10757
|
if (!walletAddress) return;
|
|
10645
10758
|
const iframeManager = getIframeManager();
|
|
10646
10759
|
if (!iframeManager) return;
|
|
@@ -10662,11 +10775,11 @@ function useFinchpaySseTxTracing(walletAddress) {
|
|
|
10662
10775
|
};
|
|
10663
10776
|
}, [walletAddress, qc]);
|
|
10664
10777
|
}
|
|
10665
|
-
var import_react_query13,
|
|
10778
|
+
var import_react_query13, import_react25;
|
|
10666
10779
|
var init_useFinchpaySseTxTracing = __esm({
|
|
10667
10780
|
"src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts"() {
|
|
10668
10781
|
import_react_query13 = require("@tanstack/react-query");
|
|
10669
|
-
|
|
10782
|
+
import_react25 = require("react");
|
|
10670
10783
|
init_iframe_manager();
|
|
10671
10784
|
init_queryKeys();
|
|
10672
10785
|
init_api2();
|
|
@@ -10764,11 +10877,11 @@ function FinchPay() {
|
|
|
10764
10877
|
})
|
|
10765
10878
|
});
|
|
10766
10879
|
const minimum = Number(limitsData?.min_amount || "0");
|
|
10767
|
-
(0,
|
|
10880
|
+
(0, import_react26.useEffect)(() => {
|
|
10768
10881
|
if (minimum <= 0) return;
|
|
10769
10882
|
useBuyMenuStore.getState().setMinAmount(minimum);
|
|
10770
10883
|
}, [minimum]);
|
|
10771
|
-
(0,
|
|
10884
|
+
(0, import_react26.useEffect)(() => {
|
|
10772
10885
|
if (srcInputAmount >= minimum) return;
|
|
10773
10886
|
useBuyMenuStore.getState().setRenderKey(`finchpay-input-minimum-warning-${Date.now()}`);
|
|
10774
10887
|
}, [minimum, srcInputAmount]);
|
|
@@ -10796,23 +10909,23 @@ function FinchPay() {
|
|
|
10796
10909
|
// defaults to CARD estimation, widgetUrl
|
|
10797
10910
|
})
|
|
10798
10911
|
});
|
|
10799
|
-
(0,
|
|
10912
|
+
(0, import_react26.useEffect)(() => {
|
|
10800
10913
|
const { error: errorTitle, message: errorMessage } = handleErrors([currenciesError, limitsError, estimateError]);
|
|
10801
10914
|
if (!errorTitle && !errorMessage) return;
|
|
10802
10915
|
console.error(`[BuyModal][Binance] ${errorTitle}: ${errorMessage}`);
|
|
10803
10916
|
useBuyMenuStore.getState().setError(errorMessage);
|
|
10804
10917
|
}, [currenciesError, limitsError, estimateError]);
|
|
10805
|
-
(0,
|
|
10918
|
+
(0, import_react26.useEffect)(() => {
|
|
10806
10919
|
if (!!selectedFiat || currenciesData.fiats.length === 0) return;
|
|
10807
10920
|
const fallbackFiat = currenciesData.fiats[0];
|
|
10808
10921
|
const targetFiat = currenciesData.fiats.find((f) => f.ticker.toUpperCase() === "USD") || fallbackFiat;
|
|
10809
10922
|
useBuyMenuStore.getState().setSelectedFiat(targetFiat.ticker);
|
|
10810
10923
|
}, [currenciesData, selectedFiat]);
|
|
10811
|
-
(0,
|
|
10924
|
+
(0, import_react26.useEffect)(() => {
|
|
10812
10925
|
if (!!selectedCrypto || currenciesData.currentNetworkCoins.length === 0) return;
|
|
10813
10926
|
useBuyMenuStore.getState().setSelectedCrypto(currenciesData.currentNetworkCoins[0].ticker);
|
|
10814
10927
|
}, [currenciesData, selectedCrypto]);
|
|
10815
|
-
(0,
|
|
10928
|
+
(0, import_react26.useEffect)(() => {
|
|
10816
10929
|
return () => {
|
|
10817
10930
|
qc.resetQueries({ queryKey: [QUERY_KEYS2.finchPayCurrencies] });
|
|
10818
10931
|
qc.resetQueries({ queryKey: [QUERY_KEYS2.finchPayLimits] });
|
|
@@ -10940,7 +11053,7 @@ function FinchPay() {
|
|
|
10940
11053
|
)
|
|
10941
11054
|
] });
|
|
10942
11055
|
}
|
|
10943
|
-
var import_react_query14, import_lucide_react17,
|
|
11056
|
+
var import_react_query14, import_lucide_react17, import_react26, import_jsx_runtime41;
|
|
10944
11057
|
var init_FinchPay = __esm({
|
|
10945
11058
|
"src/internal/components/BuyMenu/finchpay/FinchPay.tsx"() {
|
|
10946
11059
|
init_priceFormatter();
|
|
@@ -10949,7 +11062,7 @@ var init_FinchPay = __esm({
|
|
|
10949
11062
|
init_i18n();
|
|
10950
11063
|
import_react_query14 = require("@tanstack/react-query");
|
|
10951
11064
|
import_lucide_react17 = require("lucide-react");
|
|
10952
|
-
|
|
11065
|
+
import_react26 = require("react");
|
|
10953
11066
|
init_button();
|
|
10954
11067
|
init_highlight();
|
|
10955
11068
|
init_input();
|
|
@@ -11037,7 +11150,7 @@ function ProviderItem(props) {
|
|
|
11037
11150
|
{
|
|
11038
11151
|
size: "large",
|
|
11039
11152
|
disabled,
|
|
11040
|
-
variant: rampProvider === id ? "default" : "
|
|
11153
|
+
variant: rampProvider === id ? "default" : "secondary",
|
|
11041
11154
|
onClick: () => {
|
|
11042
11155
|
const { setRampProvider, setIsProviderSelector } = useBuyMenuStore.getState();
|
|
11043
11156
|
setRampProvider(id);
|
|
@@ -11076,7 +11189,7 @@ var init_ProviderSelector = __esm({
|
|
|
11076
11189
|
});
|
|
11077
11190
|
|
|
11078
11191
|
// src/internal/utils/debounce.ts
|
|
11079
|
-
function
|
|
11192
|
+
function debounce4(func, waitFor) {
|
|
11080
11193
|
let timeout;
|
|
11081
11194
|
return (...args) => {
|
|
11082
11195
|
if (timeout) clearTimeout(timeout);
|
|
@@ -11089,29 +11202,29 @@ var init_debounce = __esm({
|
|
|
11089
11202
|
});
|
|
11090
11203
|
|
|
11091
11204
|
// src/internal/components/BuyMenu/useHandleInputAmount.ts
|
|
11092
|
-
var
|
|
11205
|
+
var import_react27, ON_INPUT_QUERY_DELAY, useHandleInputAmount;
|
|
11093
11206
|
var init_useHandleInputAmount = __esm({
|
|
11094
11207
|
"src/internal/components/BuyMenu/useHandleInputAmount.ts"() {
|
|
11095
|
-
|
|
11208
|
+
import_react27 = require("react");
|
|
11096
11209
|
init_debounce();
|
|
11097
11210
|
init_contants();
|
|
11098
11211
|
init_useBuyMenuStore();
|
|
11099
11212
|
ON_INPUT_QUERY_DELAY = 3e3;
|
|
11100
11213
|
useHandleInputAmount = () => {
|
|
11101
|
-
const lastRampProviderRef = (0,
|
|
11214
|
+
const lastRampProviderRef = (0, import_react27.useRef)(DEFAULT_PROVIDER2);
|
|
11102
11215
|
const rampProvider = useBuyMenuStore((st) => st.rampProvider);
|
|
11103
11216
|
const srcInputAmount = useBuyMenuStore((st) => st.srcInputAmount);
|
|
11104
11217
|
const minAmount = useBuyMenuStore((st) => st.minAmount);
|
|
11105
|
-
const setQueryAmountDebounced = (0,
|
|
11106
|
-
|
|
11218
|
+
const setQueryAmountDebounced = (0, import_react27.useCallback)(
|
|
11219
|
+
debounce4((inputAmount) => {
|
|
11107
11220
|
const checkedValue = Math.ceil(Math.max(inputAmount, minAmount));
|
|
11108
11221
|
useBuyMenuStore.getState().setSrcInputAmount(checkedValue);
|
|
11109
11222
|
useBuyMenuStore.getState().setSrcQueryAmount(checkedValue);
|
|
11110
11223
|
}, ON_INPUT_QUERY_DELAY),
|
|
11111
11224
|
[minAmount]
|
|
11112
11225
|
);
|
|
11113
|
-
(0,
|
|
11114
|
-
(0,
|
|
11226
|
+
(0, import_react27.useEffect)(() => setQueryAmountDebounced(srcInputAmount), [srcInputAmount, setQueryAmountDebounced]);
|
|
11227
|
+
(0, import_react27.useEffect)(() => {
|
|
11115
11228
|
if (lastRampProviderRef.current === rampProvider) return;
|
|
11116
11229
|
const {
|
|
11117
11230
|
setIsProviderSummary,
|
|
@@ -11165,103 +11278,92 @@ function BuyMenu() {
|
|
|
11165
11278
|
"--ui-kit-list-scrollbar-pd-r": "var(--ui-kit-pd)"
|
|
11166
11279
|
},
|
|
11167
11280
|
className: "list-scrollbar-y w-full p-[var(--ui-kit-pd)]",
|
|
11168
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
setIsCryptoSelector,
|
|
11191
|
-
setIsFiatSelector,
|
|
11192
|
-
setIsPaymentModeSelector,
|
|
11193
|
-
setError
|
|
11194
|
-
} = useBuyMenuStore.getState();
|
|
11195
|
-
setError(null);
|
|
11196
|
-
if (isProviderSummary) {
|
|
11197
|
-
setIsProviderSummary(false);
|
|
11198
|
-
return;
|
|
11199
|
-
}
|
|
11200
|
-
if (isTransactionHistory) {
|
|
11201
|
-
setIsTransactionHistory(false);
|
|
11202
|
-
return;
|
|
11203
|
-
}
|
|
11204
|
-
if (isProviderSelector) {
|
|
11205
|
-
setIsProviderSelector(false);
|
|
11206
|
-
return;
|
|
11207
|
-
}
|
|
11208
|
-
if (isCryptoSelector) {
|
|
11209
|
-
setIsCryptoSelector(false);
|
|
11210
|
-
return;
|
|
11211
|
-
}
|
|
11212
|
-
if (isFiatSelector) {
|
|
11213
|
-
setIsFiatSelector(false);
|
|
11214
|
-
return;
|
|
11215
|
-
}
|
|
11216
|
-
if (isPaymentModeSelector) {
|
|
11217
|
-
setIsPaymentModeSelector(false);
|
|
11218
|
-
return;
|
|
11219
|
-
}
|
|
11220
|
-
setPage("main-menu" /* MAIN_MENU */);
|
|
11221
|
-
},
|
|
11222
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react18.ArrowLeft, { className: "h-4 w-4" })
|
|
11281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Expandable, { isExpanded: true, contentClassName: "relative w-full flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
11282
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)]", children: [
|
|
11283
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
11284
|
+
Button,
|
|
11285
|
+
{
|
|
11286
|
+
variant: "ghost",
|
|
11287
|
+
size: "icon",
|
|
11288
|
+
className: "flex-none",
|
|
11289
|
+
onClick: () => {
|
|
11290
|
+
const {
|
|
11291
|
+
setIsProviderSummary,
|
|
11292
|
+
setIsTransactionHistory,
|
|
11293
|
+
setIsProviderSelector,
|
|
11294
|
+
setIsCryptoSelector,
|
|
11295
|
+
setIsFiatSelector,
|
|
11296
|
+
setIsPaymentModeSelector,
|
|
11297
|
+
setError
|
|
11298
|
+
} = useBuyMenuStore.getState();
|
|
11299
|
+
setError(null);
|
|
11300
|
+
if (isProviderSummary) {
|
|
11301
|
+
setIsProviderSummary(false);
|
|
11302
|
+
return;
|
|
11223
11303
|
}
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
Switch,
|
|
11228
|
-
{
|
|
11229
|
-
labels: { checked: "TRACK TX", unchecked: "PURCHASE" },
|
|
11230
|
-
checked: isTransactionHistory,
|
|
11231
|
-
onChange: () => {
|
|
11232
|
-
useBuyMenuStore.getState().setError(null);
|
|
11233
|
-
useBuyMenuStore.getState().setIsTransactionHistory();
|
|
11234
|
-
}
|
|
11304
|
+
if (isTransactionHistory) {
|
|
11305
|
+
setIsTransactionHistory(false);
|
|
11306
|
+
return;
|
|
11235
11307
|
}
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
showProviderTrigger && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
11240
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:buyMenu.selectProvider") }),
|
|
11241
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
11242
|
-
Button,
|
|
11243
|
-
{
|
|
11244
|
-
variant: !!selectedProvider?.id ? "default" : "outline",
|
|
11245
|
-
onClick: () => {
|
|
11246
|
-
useBuyMenuStore.getState().setError(null);
|
|
11247
|
-
useBuyMenuStore.getState().setIsProviderSelector(true);
|
|
11248
|
-
},
|
|
11249
|
-
className: cn2("w-full justify-center", {
|
|
11250
|
-
[ACTIVE_PROVIDER_CNS[selectedProvider?.id]]: rampProvider === selectedProvider?.id,
|
|
11251
|
-
[IDLE_PROVIDERS_CNS[selectedProvider?.id]]: rampProvider !== selectedProvider?.id
|
|
11252
|
-
}),
|
|
11253
|
-
children: [
|
|
11254
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(selectedProvider.icon, {}),
|
|
11255
|
-
!selectedProvider.icon && t("passport:buyMenu.selectProvider")
|
|
11256
|
-
]
|
|
11308
|
+
if (isProviderSelector) {
|
|
11309
|
+
setIsProviderSelector(false);
|
|
11310
|
+
return;
|
|
11257
11311
|
}
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
|
|
11312
|
+
if (isCryptoSelector) {
|
|
11313
|
+
setIsCryptoSelector(false);
|
|
11314
|
+
return;
|
|
11315
|
+
}
|
|
11316
|
+
if (isFiatSelector) {
|
|
11317
|
+
setIsFiatSelector(false);
|
|
11318
|
+
return;
|
|
11319
|
+
}
|
|
11320
|
+
if (isPaymentModeSelector) {
|
|
11321
|
+
setIsPaymentModeSelector(false);
|
|
11322
|
+
return;
|
|
11323
|
+
}
|
|
11324
|
+
setPage("main-menu" /* MAIN_MENU */);
|
|
11325
|
+
},
|
|
11326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react18.ArrowLeft, { className: "h-4 w-4" })
|
|
11327
|
+
}
|
|
11328
|
+
),
|
|
11329
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "block flex-none text-xl font-semibold", children: t("passport:buyMenu.title") }),
|
|
11330
|
+
showTXHistorySwitch && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 h-8 flex items-center justify-end gap-[var(--ui-kit-gap)]", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
11331
|
+
Switch,
|
|
11332
|
+
{
|
|
11333
|
+
labels: { checked: "PURCHASE", unchecked: "HISTORY" },
|
|
11334
|
+
checked: isTransactionHistory,
|
|
11335
|
+
onChange: () => {
|
|
11336
|
+
useBuyMenuStore.getState().setError(null);
|
|
11337
|
+
useBuyMenuStore.getState().setIsTransactionHistory();
|
|
11338
|
+
}
|
|
11339
|
+
}
|
|
11340
|
+
) })
|
|
11341
|
+
] }),
|
|
11342
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-full h-0" }, renderKey),
|
|
11343
|
+
showProviderTrigger && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
11344
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "block text-[10px] text-[var(--ui-kit-fg-muted)]", children: t("passport:buyMenu.selectProvider") }),
|
|
11345
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
11346
|
+
Button,
|
|
11347
|
+
{
|
|
11348
|
+
variant: !!selectedProvider?.id ? "default" : "secondary",
|
|
11349
|
+
onClick: () => {
|
|
11350
|
+
useBuyMenuStore.getState().setError(null);
|
|
11351
|
+
useBuyMenuStore.getState().setIsProviderSelector(true);
|
|
11352
|
+
},
|
|
11353
|
+
className: cn2("w-full justify-center", {
|
|
11354
|
+
[ACTIVE_PROVIDER_CNS[selectedProvider?.id]]: rampProvider === selectedProvider?.id,
|
|
11355
|
+
[IDLE_PROVIDERS_CNS[selectedProvider?.id]]: rampProvider !== selectedProvider?.id
|
|
11356
|
+
}),
|
|
11357
|
+
children: [
|
|
11358
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(selectedProvider.icon, {}),
|
|
11359
|
+
!selectedProvider.icon && t("passport:buyMenu.selectProvider")
|
|
11360
|
+
]
|
|
11361
|
+
}
|
|
11362
|
+
)
|
|
11363
|
+
] }),
|
|
11364
|
+
isProviderSelector ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ProviderSelector, { providers: AVAILABLE_RAMP_PROVIDERS.map((el) => ({ ...el, Icon: el.icon })) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ProviderComponent, { walletAddress }),
|
|
11365
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Highlight, { type: "error", children: error })
|
|
11366
|
+
] })
|
|
11265
11367
|
}
|
|
11266
11368
|
);
|
|
11267
11369
|
}
|
|
@@ -11634,9 +11736,9 @@ function ChainsMenu() {
|
|
|
11634
11736
|
const isLoading = useSession((st) => st.isLoading);
|
|
11635
11737
|
const activeChainId = useSession((st) => st.activeChainId);
|
|
11636
11738
|
const setActiveChainId = useSession((st) => st.setActiveChainId);
|
|
11637
|
-
const [nextChainId, setNextChainId] = (0,
|
|
11638
|
-
const [copiedChainId, setCopiedChainId] = (0,
|
|
11639
|
-
const copiedResetTimerRef = (0,
|
|
11739
|
+
const [nextChainId, setNextChainId] = (0, import_react28.useState)(null);
|
|
11740
|
+
const [copiedChainId, setCopiedChainId] = (0, import_react28.useState)(null);
|
|
11741
|
+
const copiedResetTimerRef = (0, import_react28.useRef)(null);
|
|
11640
11742
|
const { t } = useT();
|
|
11641
11743
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
11642
11744
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
@@ -11664,7 +11766,7 @@ function ChainsMenu() {
|
|
|
11664
11766
|
chainId: activeChainId
|
|
11665
11767
|
} : void 0
|
|
11666
11768
|
});
|
|
11667
|
-
(0,
|
|
11769
|
+
(0, import_react28.useEffect)(() => {
|
|
11668
11770
|
return () => {
|
|
11669
11771
|
if (copiedResetTimerRef.current) {
|
|
11670
11772
|
clearTimeout(copiedResetTimerRef.current);
|
|
@@ -11782,7 +11884,7 @@ function ChainsMenu() {
|
|
|
11782
11884
|
}
|
|
11783
11885
|
);
|
|
11784
11886
|
}
|
|
11785
|
-
var import_core2, import_read12, import_react_query15, import_lucide_react19,
|
|
11887
|
+
var import_core2, import_read12, import_react_query15, import_lucide_react19, import_react28, import_jsx_runtime50;
|
|
11786
11888
|
var init_ChainsMenu = __esm({
|
|
11787
11889
|
"src/internal/components/ChainsMenu/ChainsMenu.tsx"() {
|
|
11788
11890
|
init_networks3();
|
|
@@ -11793,7 +11895,7 @@ var init_ChainsMenu = __esm({
|
|
|
11793
11895
|
import_read12 = require("@embarkai/core/read");
|
|
11794
11896
|
import_react_query15 = require("@tanstack/react-query");
|
|
11795
11897
|
import_lucide_react19 = require("lucide-react");
|
|
11796
|
-
|
|
11898
|
+
import_react28 = require("react");
|
|
11797
11899
|
init_PositiveIcon();
|
|
11798
11900
|
init_resolve_paymaster();
|
|
11799
11901
|
init_useLayoutDataStore();
|
|
@@ -11816,8 +11918,8 @@ function ChainSwitchRequest() {
|
|
|
11816
11918
|
const setActiveChainId = useSession((st) => st.setActiveChainId);
|
|
11817
11919
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
11818
11920
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
11819
|
-
const changeTouchedRef = (0,
|
|
11820
|
-
(0,
|
|
11921
|
+
const changeTouchedRef = (0, import_react29.useRef)(false);
|
|
11922
|
+
(0, import_react29.useEffect)(() => {
|
|
11821
11923
|
if (!changeTouchedRef.current || chainConfig?.id !== config.current?.network?.chainId) return;
|
|
11822
11924
|
setPage(null);
|
|
11823
11925
|
return () => {
|
|
@@ -11889,7 +11991,7 @@ function ChainSwitchRequest() {
|
|
|
11889
11991
|
}
|
|
11890
11992
|
);
|
|
11891
11993
|
}
|
|
11892
|
-
var import_lucide_react20,
|
|
11994
|
+
var import_lucide_react20, import_react29, import_react_i18next2, import_jsx_runtime51;
|
|
11893
11995
|
var init_ChainSwitchRequest = __esm({
|
|
11894
11996
|
"src/internal/components/ChainsMenu/ChainSwitchRequest.tsx"() {
|
|
11895
11997
|
init_networks3();
|
|
@@ -11897,7 +11999,7 @@ var init_ChainSwitchRequest = __esm({
|
|
|
11897
11999
|
init_SessionContext();
|
|
11898
12000
|
init_useT();
|
|
11899
12001
|
import_lucide_react20 = require("lucide-react");
|
|
11900
|
-
|
|
12002
|
+
import_react29 = require("react");
|
|
11901
12003
|
import_react_i18next2 = require("react-i18next");
|
|
11902
12004
|
init_useLayoutDataStore();
|
|
11903
12005
|
init_useLayoutStore();
|
|
@@ -11994,8 +12096,8 @@ function DeviceLinkScreen() {
|
|
|
11994
12096
|
const setPage = useLayoutDataStore((s) => s.setPage);
|
|
11995
12097
|
const maxScrollHeight = useLayoutStore((s) => s.maxScrollHeight);
|
|
11996
12098
|
const { mutate: link, isPending } = useLinkDevice();
|
|
11997
|
-
const [code, setCode] = (0,
|
|
11998
|
-
const [error, setError] = (0,
|
|
12099
|
+
const [code, setCode] = (0, import_react30.useState)("");
|
|
12100
|
+
const [error, setError] = (0, import_react30.useState)(null);
|
|
11999
12101
|
const isValid = code.length === 6 && VALID_CHARS.test(code);
|
|
12000
12102
|
function handleCodeChange(value) {
|
|
12001
12103
|
const upper = value.toUpperCase().slice(0, 6);
|
|
@@ -12054,10 +12156,10 @@ function DeviceLinkScreen() {
|
|
|
12054
12156
|
}
|
|
12055
12157
|
);
|
|
12056
12158
|
}
|
|
12057
|
-
var
|
|
12159
|
+
var import_react30, import_lucide_react21, import_jsx_runtime52, VALID_CHARS;
|
|
12058
12160
|
var init_DeviceLinkScreen = __esm({
|
|
12059
12161
|
"src/internal/components/DevicesMenu/DeviceLinkScreen.tsx"() {
|
|
12060
|
-
|
|
12162
|
+
import_react30 = require("react");
|
|
12061
12163
|
import_lucide_react21 = require("lucide-react");
|
|
12062
12164
|
init_Expandable2();
|
|
12063
12165
|
init_button();
|
|
@@ -12590,19 +12692,19 @@ function DeviceManageScreen() {
|
|
|
12590
12692
|
const userId = session?.mpcUserId || "";
|
|
12591
12693
|
const deviceId = pageParams?.deviceId;
|
|
12592
12694
|
const deviceName = pageParams?.deviceName;
|
|
12593
|
-
const guardianRef = (0,
|
|
12594
|
-
const [screen, setScreen] = (0,
|
|
12595
|
-
const [actionState, setActionState] = (0,
|
|
12596
|
-
const [password, setPassword] = (0,
|
|
12597
|
-
const [statusMessage, setStatusMessage] = (0,
|
|
12598
|
-
const [errorMessage, setErrorMessage] = (0,
|
|
12599
|
-
const [waitingConfirm, setWaitingConfirm] = (0,
|
|
12600
|
-
(0,
|
|
12695
|
+
const guardianRef = (0, import_react31.useRef)(null);
|
|
12696
|
+
const [screen, setScreen] = (0, import_react31.useState)({ step: "connecting" });
|
|
12697
|
+
const [actionState, setActionState] = (0, import_react31.useState)(null);
|
|
12698
|
+
const [password, setPassword] = (0, import_react31.useState)("");
|
|
12699
|
+
const [statusMessage, setStatusMessage] = (0, import_react31.useState)(null);
|
|
12700
|
+
const [errorMessage, setErrorMessage] = (0, import_react31.useState)(null);
|
|
12701
|
+
const [waitingConfirm, setWaitingConfirm] = (0, import_react31.useState)(false);
|
|
12702
|
+
(0, import_react31.useEffect)(() => {
|
|
12601
12703
|
if (!statusMessage) return;
|
|
12602
12704
|
const t = setTimeout(() => setStatusMessage(null), 3e3);
|
|
12603
12705
|
return () => clearTimeout(t);
|
|
12604
12706
|
}, [statusMessage]);
|
|
12605
|
-
(0,
|
|
12707
|
+
(0, import_react31.useEffect)(() => {
|
|
12606
12708
|
if (!deviceId || !isWebSerialAvailable()) {
|
|
12607
12709
|
setScreen({ step: "error", message: "WebSerial not available" });
|
|
12608
12710
|
return;
|
|
@@ -12634,7 +12736,7 @@ function DeviceManageScreen() {
|
|
|
12634
12736
|
guardianRef.current?.close();
|
|
12635
12737
|
};
|
|
12636
12738
|
}, [deviceId]);
|
|
12637
|
-
const refreshList = (0,
|
|
12739
|
+
const refreshList = (0, import_react31.useCallback)(async () => {
|
|
12638
12740
|
const guardian = guardianRef.current;
|
|
12639
12741
|
if (!guardian || screen.step !== "connected") return;
|
|
12640
12742
|
try {
|
|
@@ -12643,7 +12745,7 @@ function DeviceManageScreen() {
|
|
|
12643
12745
|
} catch {
|
|
12644
12746
|
}
|
|
12645
12747
|
}, [screen]);
|
|
12646
|
-
const handleBackup = (0,
|
|
12748
|
+
const handleBackup = (0, import_react31.useCallback)(async () => {
|
|
12647
12749
|
const guardian = guardianRef.current;
|
|
12648
12750
|
const iframe4 = getIframeManager();
|
|
12649
12751
|
if (!guardian || !iframe4 || !userId) return;
|
|
@@ -12667,7 +12769,7 @@ function DeviceManageScreen() {
|
|
|
12667
12769
|
setActionState(null);
|
|
12668
12770
|
}
|
|
12669
12771
|
}, [password, userId, refreshList]);
|
|
12670
|
-
const handleOverwrite = (0,
|
|
12772
|
+
const handleOverwrite = (0, import_react31.useCallback)(async () => {
|
|
12671
12773
|
const guardian = guardianRef.current;
|
|
12672
12774
|
const iframe4 = getIframeManager();
|
|
12673
12775
|
if (!guardian || !iframe4 || !userId) return;
|
|
@@ -12687,7 +12789,7 @@ function DeviceManageScreen() {
|
|
|
12687
12789
|
setActionState(null);
|
|
12688
12790
|
}
|
|
12689
12791
|
}, [password, userId, refreshList]);
|
|
12690
|
-
const handleDelete = (0,
|
|
12792
|
+
const handleDelete = (0, import_react31.useCallback)(async (keyshareId) => {
|
|
12691
12793
|
const guardian = guardianRef.current;
|
|
12692
12794
|
if (!guardian) return;
|
|
12693
12795
|
setActionState({ action: "delete", keyshareId, substep: "confirm-device" });
|
|
@@ -12854,10 +12956,10 @@ function DeviceManageScreen() {
|
|
|
12854
12956
|
}
|
|
12855
12957
|
);
|
|
12856
12958
|
}
|
|
12857
|
-
var
|
|
12959
|
+
var import_react31, import_lucide_react22, import_jsx_runtime53;
|
|
12858
12960
|
var init_DeviceManageScreen = __esm({
|
|
12859
12961
|
"src/internal/components/DevicesMenu/DeviceManageScreen.tsx"() {
|
|
12860
|
-
|
|
12962
|
+
import_react31 = require("react");
|
|
12861
12963
|
import_lucide_react22 = require("lucide-react");
|
|
12862
12964
|
init_Expandable2();
|
|
12863
12965
|
init_button();
|
|
@@ -12880,11 +12982,11 @@ function DeviceRestoreScreen() {
|
|
|
12880
12982
|
const keyshareId = pageParams?.keyshareId;
|
|
12881
12983
|
const deviceId = pageParams?.deviceId;
|
|
12882
12984
|
const deviceName = pageParams?.deviceName;
|
|
12883
|
-
const [password, setPassword] = (0,
|
|
12884
|
-
const [isWorking, setIsWorking] = (0,
|
|
12885
|
-
const [statusMessage, setStatusMessage] = (0,
|
|
12886
|
-
const [errorMessage, setErrorMessage] = (0,
|
|
12887
|
-
const handleRestore = (0,
|
|
12985
|
+
const [password, setPassword] = (0, import_react32.useState)("");
|
|
12986
|
+
const [isWorking, setIsWorking] = (0, import_react32.useState)(false);
|
|
12987
|
+
const [statusMessage, setStatusMessage] = (0, import_react32.useState)(null);
|
|
12988
|
+
const [errorMessage, setErrorMessage] = (0, import_react32.useState)(null);
|
|
12989
|
+
const handleRestore = (0, import_react32.useCallback)(async () => {
|
|
12888
12990
|
if (!password || !keyshareId || !userId) return;
|
|
12889
12991
|
const iframe4 = getIframeManager();
|
|
12890
12992
|
if (!iframe4) {
|
|
@@ -12971,10 +13073,10 @@ function DeviceRestoreScreen() {
|
|
|
12971
13073
|
}
|
|
12972
13074
|
);
|
|
12973
13075
|
}
|
|
12974
|
-
var
|
|
13076
|
+
var import_react32, import_lucide_react23, import_jsx_runtime54;
|
|
12975
13077
|
var init_DeviceRestoreScreen = __esm({
|
|
12976
13078
|
"src/internal/components/DevicesMenu/DeviceRestoreScreen.tsx"() {
|
|
12977
|
-
|
|
13079
|
+
import_react32 = require("react");
|
|
12978
13080
|
import_lucide_react23 = require("lucide-react");
|
|
12979
13081
|
init_Expandable2();
|
|
12980
13082
|
init_button();
|
|
@@ -12997,8 +13099,8 @@ function truncateAddress(address) {
|
|
|
12997
13099
|
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
|
12998
13100
|
}
|
|
12999
13101
|
function DeviceRow({ device }) {
|
|
13000
|
-
const [confirmingUnlink, setConfirmingUnlink] = (0,
|
|
13001
|
-
const [unlinkError, setUnlinkError] = (0,
|
|
13102
|
+
const [confirmingUnlink, setConfirmingUnlink] = (0, import_react33.useState)(false);
|
|
13103
|
+
const [unlinkError, setUnlinkError] = (0, import_react33.useState)(null);
|
|
13002
13104
|
const { mutate: unlink, isPending } = useUnlinkDevice();
|
|
13003
13105
|
if (confirmingUnlink) {
|
|
13004
13106
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-2 p-3 rounded-lg bg-[var(--ui-kit-bg)]", children: [
|
|
@@ -13112,10 +13214,10 @@ function DevicesMenu() {
|
|
|
13112
13214
|
}
|
|
13113
13215
|
);
|
|
13114
13216
|
}
|
|
13115
|
-
var
|
|
13217
|
+
var import_react33, import_lucide_react24, import_jsx_runtime55;
|
|
13116
13218
|
var init_DevicesMenu = __esm({
|
|
13117
13219
|
"src/internal/components/DevicesMenu/DevicesMenu.tsx"() {
|
|
13118
|
-
|
|
13220
|
+
import_react33 = require("react");
|
|
13119
13221
|
import_lucide_react24 = require("lucide-react");
|
|
13120
13222
|
init_Expandable2();
|
|
13121
13223
|
init_button();
|
|
@@ -13177,7 +13279,7 @@ function useOnRestoreSuccess() {
|
|
|
13177
13279
|
setStatus
|
|
13178
13280
|
} = useSession();
|
|
13179
13281
|
const { setError, setSuccess } = useRestoreStore();
|
|
13180
|
-
const createSessionWithKeyshare = (0,
|
|
13282
|
+
const createSessionWithKeyshare = (0, import_react34.useCallback)(
|
|
13181
13283
|
async (userId, hasServerKeyshare, isNewUser) => {
|
|
13182
13284
|
try {
|
|
13183
13285
|
try {
|
|
@@ -13218,7 +13320,7 @@ function useOnRestoreSuccess() {
|
|
|
13218
13320
|
},
|
|
13219
13321
|
[setStatus, usePaymaster, activeChainId, publicClient]
|
|
13220
13322
|
);
|
|
13221
|
-
const onRestoreSuccess = (0,
|
|
13323
|
+
const onRestoreSuccess = (0, import_react34.useCallback)(async () => {
|
|
13222
13324
|
const { verifyToken: verifyToken2, jwtTokenManager: jwtTokenManager4 } = await Promise.resolve().then(() => (init_auth(), auth_exports));
|
|
13223
13325
|
const verify = await verifyToken2();
|
|
13224
13326
|
const hasServerKeyshare = verify?.hasKeyshare ?? jwtTokenManager4.getHasKeyshare() ?? false;
|
|
@@ -13283,12 +13385,12 @@ function useOnRestoreSuccess() {
|
|
|
13283
13385
|
]);
|
|
13284
13386
|
return { onRestoreSuccess };
|
|
13285
13387
|
}
|
|
13286
|
-
var
|
|
13388
|
+
var import_react34;
|
|
13287
13389
|
var init_useOnRestoreSuccess = __esm({
|
|
13288
13390
|
"src/internal/components/KeyshareRestoreMenu/hooks/useOnRestoreSuccess.ts"() {
|
|
13289
13391
|
init_ProviderContext();
|
|
13290
13392
|
init_SessionContext();
|
|
13291
|
-
|
|
13393
|
+
import_react34 = require("react");
|
|
13292
13394
|
init_useLayoutDataStore();
|
|
13293
13395
|
init_useLayoutStore();
|
|
13294
13396
|
init_useRestoreStore();
|
|
@@ -13712,7 +13814,7 @@ function useCreateBackup() {
|
|
|
13712
13814
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
13713
13815
|
const setIsDialogForced = useLayoutStore((st) => st.setIsDialogForced);
|
|
13714
13816
|
const { usePasskey, restorePassword, selectedCloudProvider, setSuccess, setError, setMethod, setIsCreatingPasskey } = useRestoreStore();
|
|
13715
|
-
(0,
|
|
13817
|
+
(0, import_react35.useEffect)(() => {
|
|
13716
13818
|
if (!hasServerVault) {
|
|
13717
13819
|
setMethod("server");
|
|
13718
13820
|
setIsDialogForced(true);
|
|
@@ -13877,12 +13979,12 @@ function useCreateBackup() {
|
|
|
13877
13979
|
createPasskey
|
|
13878
13980
|
};
|
|
13879
13981
|
}
|
|
13880
|
-
var import_react_query17,
|
|
13982
|
+
var import_react_query17, import_react35;
|
|
13881
13983
|
var init_useCreateBackup = __esm({
|
|
13882
13984
|
"src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts"() {
|
|
13883
13985
|
init_SessionContext();
|
|
13884
13986
|
import_react_query17 = require("@tanstack/react-query");
|
|
13885
|
-
|
|
13987
|
+
import_react35 = require("react");
|
|
13886
13988
|
init_useLayoutStore();
|
|
13887
13989
|
init_iframe_manager();
|
|
13888
13990
|
init_constants4();
|
|
@@ -14016,7 +14118,7 @@ function useValidateFileBackup() {
|
|
|
14016
14118
|
const restoreFile = useRestoreStore((st) => st.restoreFile);
|
|
14017
14119
|
const setError = useRestoreStore((st) => st.setError);
|
|
14018
14120
|
const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
|
|
14019
|
-
(0,
|
|
14121
|
+
(0, import_react36.useEffect)(() => {
|
|
14020
14122
|
if (!restoreFile) {
|
|
14021
14123
|
return;
|
|
14022
14124
|
}
|
|
@@ -14037,10 +14139,10 @@ function useValidateFileBackup() {
|
|
|
14037
14139
|
reader.readAsText(restoreFile);
|
|
14038
14140
|
}, [restoreFile]);
|
|
14039
14141
|
}
|
|
14040
|
-
var
|
|
14142
|
+
var import_react36;
|
|
14041
14143
|
var init_useValidateFileBackup = __esm({
|
|
14042
14144
|
"src/internal/components/KeyshareRestoreMenu/hooks/useValidateFileBackup.ts"() {
|
|
14043
|
-
|
|
14145
|
+
import_react36 = require("react");
|
|
14044
14146
|
init_useRestoreStore();
|
|
14045
14147
|
}
|
|
14046
14148
|
});
|
|
@@ -14068,7 +14170,7 @@ function MethodSelector(props) {
|
|
|
14068
14170
|
setError,
|
|
14069
14171
|
setSuccess
|
|
14070
14172
|
} = useRestoreStore();
|
|
14071
|
-
const recoveryRenderMethods = (0,
|
|
14173
|
+
const recoveryRenderMethods = (0, import_react37.useMemo)(() => {
|
|
14072
14174
|
const methodsWithBackupData = getRecoveryRenderMethods(mode).map((mt) => {
|
|
14073
14175
|
let data = null;
|
|
14074
14176
|
switch (true) {
|
|
@@ -14083,7 +14185,7 @@ function MethodSelector(props) {
|
|
|
14083
14185
|
return methodsWithBackupData;
|
|
14084
14186
|
}, [mode, serverRecoveryStatus]);
|
|
14085
14187
|
if (!!selectedRecoveryMethod) return null;
|
|
14086
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
14188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react37.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
14087
14189
|
"div",
|
|
14088
14190
|
{
|
|
14089
14191
|
style: { gridTemplateColumns: `repeat(${recoveryRenderMethods.length}, minmax(0, 1fr))` },
|
|
@@ -14117,12 +14219,12 @@ function MethodSelector(props) {
|
|
|
14117
14219
|
}
|
|
14118
14220
|
) });
|
|
14119
14221
|
}
|
|
14120
|
-
var import_lucide_react26,
|
|
14222
|
+
var import_lucide_react26, import_react37, import_jsx_runtime56, getRecoveryRenderMethods;
|
|
14121
14223
|
var init_MethodSelector = __esm({
|
|
14122
14224
|
"src/internal/components/KeyshareRestoreMenu/components/MethodSelector.tsx"() {
|
|
14123
14225
|
init_useT();
|
|
14124
14226
|
import_lucide_react26 = require("lucide-react");
|
|
14125
|
-
|
|
14227
|
+
import_react37 = require("react");
|
|
14126
14228
|
init_guardian_backup();
|
|
14127
14229
|
init_PositiveIcon();
|
|
14128
14230
|
init_button();
|
|
@@ -14156,7 +14258,7 @@ function PasswordPasskey(props) {
|
|
|
14156
14258
|
onCreatePasskey
|
|
14157
14259
|
} = props;
|
|
14158
14260
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
14159
|
-
const actionRef = (0,
|
|
14261
|
+
const actionRef = (0, import_react38.useRef)(null);
|
|
14160
14262
|
const {
|
|
14161
14263
|
showPassword,
|
|
14162
14264
|
restorePassword,
|
|
@@ -14170,7 +14272,7 @@ function PasswordPasskey(props) {
|
|
|
14170
14272
|
} = useRestoreStore();
|
|
14171
14273
|
const { config } = useProviderConfig();
|
|
14172
14274
|
const isPasskeyEnabled = config.current.passkey.enabled;
|
|
14173
|
-
(0,
|
|
14275
|
+
(0, import_react38.useEffect)(() => {
|
|
14174
14276
|
if (!isPasskeyEnabled && usePasskey) setUsePasskey(false);
|
|
14175
14277
|
}, [isPasskeyEnabled, usePasskey]);
|
|
14176
14278
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
@@ -14325,7 +14427,7 @@ function PasswordPasskey(props) {
|
|
|
14325
14427
|
] })
|
|
14326
14428
|
] });
|
|
14327
14429
|
}
|
|
14328
|
-
var import_lucide_react27,
|
|
14430
|
+
var import_lucide_react27, import_react38, import_jsx_runtime57;
|
|
14329
14431
|
var init_PasswordPasskey = __esm({
|
|
14330
14432
|
"src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx"() {
|
|
14331
14433
|
init_ProviderContext();
|
|
@@ -14333,7 +14435,7 @@ var init_PasswordPasskey = __esm({
|
|
|
14333
14435
|
init_i18n();
|
|
14334
14436
|
init_utils2();
|
|
14335
14437
|
import_lucide_react27 = require("lucide-react");
|
|
14336
|
-
|
|
14438
|
+
import_react38 = require("react");
|
|
14337
14439
|
init_OtpIcon();
|
|
14338
14440
|
init_button();
|
|
14339
14441
|
init_highlight();
|
|
@@ -14509,7 +14611,7 @@ function Server(props) {
|
|
|
14509
14611
|
const usePasskey = useRestoreStore((st) => st.usePasskey);
|
|
14510
14612
|
const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
|
|
14511
14613
|
const serverRecoveryStatus = qc.getQueryData([CHECK_BACKUP_QUERY_KEY, address]);
|
|
14512
|
-
(0,
|
|
14614
|
+
(0, import_react39.useEffect)(() => {
|
|
14513
14615
|
if (mode === "backup" || !serverRecoveryStatus?.created?.encryptionMethod) return;
|
|
14514
14616
|
setUsePasskey(serverRecoveryStatus.created.encryptionMethod === "passkey");
|
|
14515
14617
|
}, [mode, serverRecoveryStatus, setUsePasskey]);
|
|
@@ -14544,7 +14646,7 @@ function Server(props) {
|
|
|
14544
14646
|
] })
|
|
14545
14647
|
] });
|
|
14546
14648
|
}
|
|
14547
|
-
var import_react_query19, import_dayjs3, import_lucide_react30,
|
|
14649
|
+
var import_react_query19, import_dayjs3, import_lucide_react30, import_react39, import_jsx_runtime60;
|
|
14548
14650
|
var init_Server = __esm({
|
|
14549
14651
|
"src/internal/components/KeyshareRestoreMenu/methods/Server.tsx"() {
|
|
14550
14652
|
init_SessionContext();
|
|
@@ -14553,7 +14655,7 @@ var init_Server = __esm({
|
|
|
14553
14655
|
import_react_query19 = require("@tanstack/react-query");
|
|
14554
14656
|
import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
14555
14657
|
import_lucide_react30 = require("lucide-react");
|
|
14556
|
-
|
|
14658
|
+
import_react39 = require("react");
|
|
14557
14659
|
init_highlight();
|
|
14558
14660
|
init_PasswordPasskey();
|
|
14559
14661
|
init_constants4();
|
|
@@ -14716,7 +14818,7 @@ function Cloud2(props) {
|
|
|
14716
14818
|
return availableProviders.map((p) => ({ id: p.id, name: p.name, available: p.isAvailable() }));
|
|
14717
14819
|
}
|
|
14718
14820
|
});
|
|
14719
|
-
(0,
|
|
14821
|
+
(0, import_react40.useEffect)(() => {
|
|
14720
14822
|
if (isCloudProvidersLoading) return;
|
|
14721
14823
|
if (!!cloudProvidersError) {
|
|
14722
14824
|
console.error("[KeyshareBackup] Failed to load cloud providers:", cloudProvidersError);
|
|
@@ -14780,13 +14882,13 @@ function Cloud2(props) {
|
|
|
14780
14882
|
)
|
|
14781
14883
|
] });
|
|
14782
14884
|
}
|
|
14783
|
-
var import_react_query20, import_lucide_react32,
|
|
14885
|
+
var import_react_query20, import_lucide_react32, import_react40, import_jsx_runtime62;
|
|
14784
14886
|
var init_Cloud = __esm({
|
|
14785
14887
|
"src/internal/components/KeyshareRestoreMenu/methods/Cloud.tsx"() {
|
|
14786
14888
|
init_SessionContext();
|
|
14787
14889
|
import_react_query20 = require("@tanstack/react-query");
|
|
14788
14890
|
import_lucide_react32 = require("lucide-react");
|
|
14789
|
-
|
|
14891
|
+
import_react40 = require("react");
|
|
14790
14892
|
init_button();
|
|
14791
14893
|
init_select();
|
|
14792
14894
|
init_PasswordPasskey();
|
|
@@ -14803,8 +14905,8 @@ function Guardian(props) {
|
|
|
14803
14905
|
const session = useSession((st) => st.session);
|
|
14804
14906
|
const recoveryUserId = useSession((st) => st.recoveryUserId);
|
|
14805
14907
|
const { onRestoreSuccess } = useOnRestoreSuccess();
|
|
14806
|
-
const [isWorking, setIsWorking] = (0,
|
|
14807
|
-
const [step, setStep] = (0,
|
|
14908
|
+
const [isWorking, setIsWorking] = (0, import_react41.useState)(false);
|
|
14909
|
+
const [step, setStep] = (0, import_react41.useState)("idle");
|
|
14808
14910
|
const handleGuardianBackup = async () => {
|
|
14809
14911
|
if (!restorePassword) {
|
|
14810
14912
|
setError("Please enter a password");
|
|
@@ -14933,11 +15035,11 @@ function Guardian(props) {
|
|
|
14933
15035
|
] })
|
|
14934
15036
|
] });
|
|
14935
15037
|
}
|
|
14936
|
-
var
|
|
15038
|
+
var import_react41, import_lucide_react33, import_jsx_runtime63;
|
|
14937
15039
|
var init_Guardian = __esm({
|
|
14938
15040
|
"src/internal/components/KeyshareRestoreMenu/methods/Guardian.tsx"() {
|
|
14939
15041
|
init_SessionContext();
|
|
14940
|
-
|
|
15042
|
+
import_react41 = require("react");
|
|
14941
15043
|
import_lucide_react33 = require("lucide-react");
|
|
14942
15044
|
init_iframe_manager();
|
|
14943
15045
|
init_guardian_backup();
|
|
@@ -14960,7 +15062,7 @@ var init_methods = __esm({
|
|
|
14960
15062
|
});
|
|
14961
15063
|
|
|
14962
15064
|
// src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
|
|
14963
|
-
var import_react_query21, import_lucide_react34,
|
|
15065
|
+
var import_react_query21, import_lucide_react34, import_react42, import_jsx_runtime64, RESTORE_COMPONENTS, KeyshareRestoreMenu;
|
|
14964
15066
|
var init_KeyshareRestoreMenu = __esm({
|
|
14965
15067
|
"src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx"() {
|
|
14966
15068
|
init_ProviderContext();
|
|
@@ -14968,7 +15070,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
14968
15070
|
init_i18n();
|
|
14969
15071
|
import_react_query21 = require("@tanstack/react-query");
|
|
14970
15072
|
import_lucide_react34 = require("lucide-react");
|
|
14971
|
-
|
|
15073
|
+
import_react42 = require("react");
|
|
14972
15074
|
init_useLayoutDataStore();
|
|
14973
15075
|
init_useLayoutStore();
|
|
14974
15076
|
init_vaultClient();
|
|
@@ -15008,7 +15110,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15008
15110
|
setSuccess,
|
|
15009
15111
|
setMethod
|
|
15010
15112
|
} = useRestoreStore();
|
|
15011
|
-
(0,
|
|
15113
|
+
(0, import_react42.useEffect)(() => {
|
|
15012
15114
|
setIsDialogForced(true);
|
|
15013
15115
|
return () => {
|
|
15014
15116
|
setRestorePassword("");
|
|
@@ -15034,7 +15136,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15034
15136
|
queryFn: async () => await getShareRecoveryStats()
|
|
15035
15137
|
});
|
|
15036
15138
|
const hasServerBackup = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
|
|
15037
|
-
(0,
|
|
15139
|
+
(0, import_react42.useEffect)(() => {
|
|
15038
15140
|
if (!!hasServerBackup) setMethod("server");
|
|
15039
15141
|
}, [hasServerBackup]);
|
|
15040
15142
|
const { mutate: disconnect, isPending: isDisconnecting } = (0, import_react_query21.useMutation)({
|
|
@@ -15182,7 +15284,7 @@ function KeyshareBackupMenu() {
|
|
|
15182
15284
|
setUsePasskey,
|
|
15183
15285
|
setMethod
|
|
15184
15286
|
} = useRestoreStore();
|
|
15185
|
-
(0,
|
|
15287
|
+
(0, import_react43.useEffect)(() => {
|
|
15186
15288
|
return () => {
|
|
15187
15289
|
setSuccess(null);
|
|
15188
15290
|
setError(null);
|
|
@@ -15201,7 +15303,7 @@ function KeyshareBackupMenu() {
|
|
|
15201
15303
|
queryFn: async () => await getShareRecoveryStats()
|
|
15202
15304
|
});
|
|
15203
15305
|
const hasRecoveryData = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
|
|
15204
|
-
(0,
|
|
15306
|
+
(0, import_react43.useEffect)(() => {
|
|
15205
15307
|
if (!!hasRecoveryData) setMethod("server");
|
|
15206
15308
|
}, [hasRecoveryData]);
|
|
15207
15309
|
const {
|
|
@@ -15309,14 +15411,14 @@ function KeyshareBackupMenu() {
|
|
|
15309
15411
|
}
|
|
15310
15412
|
);
|
|
15311
15413
|
}
|
|
15312
|
-
var import_react_query22, import_lucide_react35,
|
|
15414
|
+
var import_react_query22, import_lucide_react35, import_react43, import_jsx_runtime65, COMPONENTS;
|
|
15313
15415
|
var init_KeyshareBackupMenu = __esm({
|
|
15314
15416
|
"src/internal/components/KeyshareRestoreMenu/KeyshareBackupMenu.tsx"() {
|
|
15315
15417
|
init_SessionContext();
|
|
15316
15418
|
init_i18n();
|
|
15317
15419
|
import_react_query22 = require("@tanstack/react-query");
|
|
15318
15420
|
import_lucide_react35 = require("lucide-react");
|
|
15319
|
-
|
|
15421
|
+
import_react43 = require("react");
|
|
15320
15422
|
init_useLayoutDataStore();
|
|
15321
15423
|
init_useLayoutStore();
|
|
15322
15424
|
init_vaultClient();
|
|
@@ -15354,14 +15456,14 @@ function useColorMode() {
|
|
|
15354
15456
|
const preferedColorMode = config?.preferedColorMode;
|
|
15355
15457
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
15356
15458
|
const handleStoreColorMode = useLayoutStore((st) => st.setColorMode);
|
|
15357
|
-
const setColorMode = (0,
|
|
15459
|
+
const setColorMode = (0, import_react44.useCallback)(
|
|
15358
15460
|
(mode) => {
|
|
15359
15461
|
localStorage.setItem(LOCAL_COLOR_MODE_KEY, mode);
|
|
15360
15462
|
handleStoreColorMode(mode);
|
|
15361
15463
|
},
|
|
15362
15464
|
[handleStoreColorMode]
|
|
15363
15465
|
);
|
|
15364
|
-
(0,
|
|
15466
|
+
(0, import_react44.useEffect)(() => {
|
|
15365
15467
|
let targetColorMode = localStorage.getItem(LOCAL_COLOR_MODE_KEY);
|
|
15366
15468
|
if (!targetColorMode && !preferedColorMode) {
|
|
15367
15469
|
const systemMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -15376,10 +15478,10 @@ function useColorMode() {
|
|
|
15376
15478
|
}, []);
|
|
15377
15479
|
return { colorMode, setColorMode };
|
|
15378
15480
|
}
|
|
15379
|
-
var
|
|
15481
|
+
var import_react44;
|
|
15380
15482
|
var init_useColorMode = __esm({
|
|
15381
15483
|
"src/hooks/useColorMode.ts"() {
|
|
15382
|
-
|
|
15484
|
+
import_react44 = require("react");
|
|
15383
15485
|
init_ProviderContext();
|
|
15384
15486
|
init_constants();
|
|
15385
15487
|
init_useLayoutStore();
|
|
@@ -15481,13 +15583,13 @@ var init_SumsubIframeManager = __esm({
|
|
|
15481
15583
|
function useSumsubIframe({ iframeUrl }) {
|
|
15482
15584
|
const config = useProviderConfig().config;
|
|
15483
15585
|
const { colorMode } = useColorMode();
|
|
15484
|
-
const iframeRef = (0,
|
|
15485
|
-
const [isLoading, setIsLoading] = (0,
|
|
15486
|
-
const [error, setError] = (0,
|
|
15487
|
-
const [height, setHeight] = (0,
|
|
15488
|
-
const [status, setStatus] = (0,
|
|
15586
|
+
const iframeRef = (0, import_react45.useRef)(null);
|
|
15587
|
+
const [isLoading, setIsLoading] = (0, import_react45.useState)(true);
|
|
15588
|
+
const [error, setError] = (0, import_react45.useState)(null);
|
|
15589
|
+
const [height, setHeight] = (0, import_react45.useState)(0);
|
|
15590
|
+
const [status, setStatus] = (0, import_react45.useState)("");
|
|
15489
15591
|
const levelName = config.current?.kyc?.options?.levelName;
|
|
15490
|
-
(0,
|
|
15592
|
+
(0, import_react45.useEffect)(() => {
|
|
15491
15593
|
setError(null);
|
|
15492
15594
|
setIsLoading(true);
|
|
15493
15595
|
setStatus("Preparing verification...");
|
|
@@ -15528,12 +15630,12 @@ function useSumsubIframe({ iframeUrl }) {
|
|
|
15528
15630
|
status
|
|
15529
15631
|
};
|
|
15530
15632
|
}
|
|
15531
|
-
var
|
|
15633
|
+
var import_react45;
|
|
15532
15634
|
var init_useSumsubIframe = __esm({
|
|
15533
15635
|
"src/internal/components/KYC/useSumsubIframe.ts"() {
|
|
15534
15636
|
init_ProviderContext();
|
|
15535
15637
|
init_useColorMode();
|
|
15536
|
-
|
|
15638
|
+
import_react45 = require("react");
|
|
15537
15639
|
init_sumsub();
|
|
15538
15640
|
init_SumsubIframeManager();
|
|
15539
15641
|
}
|
|
@@ -15807,7 +15909,7 @@ function MainMenu() {
|
|
|
15807
15909
|
const { t } = useT();
|
|
15808
15910
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
15809
15911
|
const setTransitionPageHeight = useLayoutDataStore((st) => st.setTransitionPageHeight);
|
|
15810
|
-
(0,
|
|
15912
|
+
(0, import_react46.useEffect)(() => setTransitionPageHeight(DEFAULT_MAIN_MENU_HEIGHT), []);
|
|
15811
15913
|
useProvidersList();
|
|
15812
15914
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "w-full p-[var(--ui-kit-pd)] flex flex-col gap-[var(--ui-kit-gap)]", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "w-full grid grid-cols-4 gap-0 md:gap-[var(--ui-kit-gap)] py-[10px] md:py-1", children: MAIN_MENU_BUTTONS.map(({ id, label, icon: Icon2 }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
15813
15915
|
Button,
|
|
@@ -15825,13 +15927,13 @@ function MainMenu() {
|
|
|
15825
15927
|
id
|
|
15826
15928
|
)) }) });
|
|
15827
15929
|
}
|
|
15828
|
-
var import_lucide_react40,
|
|
15930
|
+
var import_lucide_react40, import_react46, import_jsx_runtime70, MAIN_MENU_BUTTONS;
|
|
15829
15931
|
var init_MainMenu = __esm({
|
|
15830
15932
|
"src/internal/components/MainMenu/MainMenu.tsx"() {
|
|
15831
15933
|
init_SessionContext();
|
|
15832
15934
|
init_useT();
|
|
15833
15935
|
import_lucide_react40 = require("lucide-react");
|
|
15834
|
-
|
|
15936
|
+
import_react46 = require("react");
|
|
15835
15937
|
init_constants();
|
|
15836
15938
|
init_useLayoutDataStore();
|
|
15837
15939
|
init_useProvidersList();
|
|
@@ -15877,16 +15979,16 @@ function useLinkedProfiles() {
|
|
|
15877
15979
|
}
|
|
15878
15980
|
});
|
|
15879
15981
|
const { profiles = [], avatar = null } = data || {};
|
|
15880
|
-
const refresh = (0,
|
|
15982
|
+
const refresh = (0, import_react47.useCallback)(async () => {
|
|
15881
15983
|
await qc.invalidateQueries({ queryKey: [LINKED_PROFILES_QUERY_KEY, address] });
|
|
15882
15984
|
}, [qc, address]);
|
|
15883
15985
|
return { profiles, avatar, isLoading, isFetching, error, refresh };
|
|
15884
15986
|
}
|
|
15885
|
-
var import_react_query25,
|
|
15987
|
+
var import_react_query25, import_react47, LINKED_PROFILES_QUERY_KEY;
|
|
15886
15988
|
var init_linkedProfiles = __esm({
|
|
15887
15989
|
"src/modules/linkedProfiles.ts"() {
|
|
15888
15990
|
import_react_query25 = require("@tanstack/react-query");
|
|
15889
|
-
|
|
15991
|
+
import_react47 = require("react");
|
|
15890
15992
|
init_SessionContext();
|
|
15891
15993
|
init_auth();
|
|
15892
15994
|
init_common();
|
|
@@ -16377,7 +16479,7 @@ function useLinkSocial() {
|
|
|
16377
16479
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
16378
16480
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
16379
16481
|
const { providerType, linkIsLoading, setProviderType, setAlert, setLinkIsLoading } = useManageWalletStore();
|
|
16380
|
-
const handleLinkSocialProvider =
|
|
16482
|
+
const handleLinkSocialProvider = import_react48.default.useCallback(
|
|
16381
16483
|
async (providerIdRaw) => {
|
|
16382
16484
|
const providerKey = providerIdRaw.toLowerCase();
|
|
16383
16485
|
const normalizedKey = providerKey === "twitter" ? "x" : providerKey;
|
|
@@ -16435,8 +16537,8 @@ function useLinkSocial() {
|
|
|
16435
16537
|
},
|
|
16436
16538
|
[config.social?.providers]
|
|
16437
16539
|
);
|
|
16438
|
-
const [socialLinkStarted, setSocialLinkStarted] =
|
|
16439
|
-
(0,
|
|
16540
|
+
const [socialLinkStarted, setSocialLinkStarted] = import_react48.default.useState(false);
|
|
16541
|
+
(0, import_react48.useEffect)(() => {
|
|
16440
16542
|
const key = providerType?.toLowerCase();
|
|
16441
16543
|
console.log("[useLinkSocial] Effect triggered:", { key, linkIsLoading, socialLinkStarted, isWalletLinking });
|
|
16442
16544
|
if (isWalletLinking) {
|
|
@@ -16454,7 +16556,7 @@ function useLinkSocial() {
|
|
|
16454
16556
|
}
|
|
16455
16557
|
}, [providerType, linkIsLoading, socialLinkStarted, isWalletLinking, handleLinkSocialProvider]);
|
|
16456
16558
|
}
|
|
16457
|
-
var import_react_query30,
|
|
16559
|
+
var import_react_query30, import_react48;
|
|
16458
16560
|
var init_useLinkSocial = __esm({
|
|
16459
16561
|
"src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts"() {
|
|
16460
16562
|
init_useLayoutDataStore();
|
|
@@ -16462,7 +16564,7 @@ var init_useLinkSocial = __esm({
|
|
|
16462
16564
|
init_SessionContext();
|
|
16463
16565
|
init_linkedProfiles();
|
|
16464
16566
|
import_react_query30 = require("@tanstack/react-query");
|
|
16465
|
-
|
|
16567
|
+
import_react48 = __toESM(require("react"), 1);
|
|
16466
16568
|
init_auth();
|
|
16467
16569
|
init_telegramBrowser();
|
|
16468
16570
|
init_useProvidersList();
|
|
@@ -16531,7 +16633,7 @@ function useLinkTelegram() {
|
|
|
16531
16633
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
16532
16634
|
const { providerType, linkIsLoading, setLinkIsLoading, setProviderType, setAlert } = useManageWalletStore();
|
|
16533
16635
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
16534
|
-
const handleLinkTelegram = (0,
|
|
16636
|
+
const handleLinkTelegram = (0, import_react49.useCallback)(async () => {
|
|
16535
16637
|
try {
|
|
16536
16638
|
if (shouldBlockSocialAuthInTelegram("telegram")) {
|
|
16537
16639
|
setAlert(buildTelegramBrowserRestriction("Telegram", "linking"));
|
|
@@ -16578,8 +16680,8 @@ function useLinkTelegram() {
|
|
|
16578
16680
|
setLinkIsLoading(false);
|
|
16579
16681
|
}
|
|
16580
16682
|
}, [config.social?.providers]);
|
|
16581
|
-
const [telegramLinkStarted, setTelegramLinkStarted] = (0,
|
|
16582
|
-
(0,
|
|
16683
|
+
const [telegramLinkStarted, setTelegramLinkStarted] = (0, import_react49.useState)(false);
|
|
16684
|
+
(0, import_react49.useEffect)(() => {
|
|
16583
16685
|
console.log("[useLinkTelegram] Effect triggered:", {
|
|
16584
16686
|
providerType,
|
|
16585
16687
|
linkIsLoading,
|
|
@@ -16596,20 +16698,20 @@ function useLinkTelegram() {
|
|
|
16596
16698
|
handleLinkTelegram();
|
|
16597
16699
|
}
|
|
16598
16700
|
}, [providerType, handleLinkTelegram, linkIsLoading, telegramLinkStarted, isWalletLinking]);
|
|
16599
|
-
(0,
|
|
16701
|
+
(0, import_react49.useEffect)(() => {
|
|
16600
16702
|
if (providerType !== "telegram") {
|
|
16601
16703
|
setTelegramLinkStarted(false);
|
|
16602
16704
|
}
|
|
16603
16705
|
}, [providerType]);
|
|
16604
16706
|
}
|
|
16605
|
-
var import_react_query31,
|
|
16707
|
+
var import_react_query31, import_react49;
|
|
16606
16708
|
var init_useLinkTelegram = __esm({
|
|
16607
16709
|
"src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts"() {
|
|
16608
16710
|
init_ProviderContext();
|
|
16609
16711
|
init_SessionContext();
|
|
16610
16712
|
init_linkedProfiles();
|
|
16611
16713
|
import_react_query31 = require("@tanstack/react-query");
|
|
16612
|
-
|
|
16714
|
+
import_react49 = require("react");
|
|
16613
16715
|
init_telegram2();
|
|
16614
16716
|
init_useLayoutDataStore();
|
|
16615
16717
|
init_telegramBrowser();
|
|
@@ -16720,7 +16822,7 @@ function getConfiguredProviders(config) {
|
|
|
16720
16822
|
});
|
|
16721
16823
|
return acc;
|
|
16722
16824
|
},
|
|
16723
|
-
(0,
|
|
16825
|
+
(0, import_lodash_es8.fromPairs)(POSSIBLE_PROVIDERS.map((p) => [p, false]))
|
|
16724
16826
|
);
|
|
16725
16827
|
}
|
|
16726
16828
|
function ManageWalletMenu() {
|
|
@@ -16742,7 +16844,7 @@ function ManageWalletMenu() {
|
|
|
16742
16844
|
} = useManageWalletStore();
|
|
16743
16845
|
const configuredProviders = getConfiguredProviders(config.current);
|
|
16744
16846
|
const { data: providers = [], isLoading: isProvidersLoading, error: providersError } = useProvidersList();
|
|
16745
|
-
const renderProviders = (0,
|
|
16847
|
+
const renderProviders = (0, import_react50.useMemo)(() => {
|
|
16746
16848
|
const normalizeProviderName = (name) => {
|
|
16747
16849
|
if (name === "x") return "twitter";
|
|
16748
16850
|
return name;
|
|
@@ -16864,16 +16966,16 @@ function ManageWalletMenu() {
|
|
|
16864
16966
|
}
|
|
16865
16967
|
);
|
|
16866
16968
|
}
|
|
16867
|
-
var
|
|
16969
|
+
var import_lodash_es8, import_lucide_react44, import_react50, import_jsx_runtime75, POSSIBLE_PROVIDERS, MULTI_PROVIDERS;
|
|
16868
16970
|
var init_ManageWallet = __esm({
|
|
16869
16971
|
"src/internal/components/ManageWalletMenu/ManageWallet.tsx"() {
|
|
16870
16972
|
init_useLayoutDataStore();
|
|
16871
16973
|
init_useLayoutStore();
|
|
16872
16974
|
init_ProviderContext();
|
|
16873
16975
|
init_i18n();
|
|
16874
|
-
|
|
16976
|
+
import_lodash_es8 = require("lodash-es");
|
|
16875
16977
|
import_lucide_react44 = require("lucide-react");
|
|
16876
|
-
|
|
16978
|
+
import_react50 = require("react");
|
|
16877
16979
|
init_constants();
|
|
16878
16980
|
init_telegramBrowser();
|
|
16879
16981
|
init_Expandable2();
|
|
@@ -16941,7 +17043,7 @@ function UnlinkProviderMenu() {
|
|
|
16941
17043
|
const { t } = useT();
|
|
16942
17044
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
16943
17045
|
const { confirmUnlink, setConfirmUnlink, setAlert } = useManageWalletStore();
|
|
16944
|
-
const [confirmInput, setConfirmInput] = (0,
|
|
17046
|
+
const [confirmInput, setConfirmInput] = (0, import_react51.useState)("");
|
|
16945
17047
|
const { mutate: handleUnlinkProvider, isPending: isProviderUnlinking } = (0, import_react_query32.useMutation)({
|
|
16946
17048
|
mutationFn: async () => {
|
|
16947
17049
|
if (!confirmUnlink) {
|
|
@@ -17023,7 +17125,7 @@ function UnlinkProviderMenu() {
|
|
|
17023
17125
|
] })
|
|
17024
17126
|
] });
|
|
17025
17127
|
}
|
|
17026
|
-
var import_react_query32, import_lucide_react45,
|
|
17128
|
+
var import_react_query32, import_lucide_react45, import_react51, import_wagmi, import_jsx_runtime76;
|
|
17027
17129
|
var init_UnlinkProviderMenu = __esm({
|
|
17028
17130
|
"src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx"() {
|
|
17029
17131
|
init_useLayoutDataStore();
|
|
@@ -17033,7 +17135,7 @@ var init_UnlinkProviderMenu = __esm({
|
|
|
17033
17135
|
init_linkedProfiles();
|
|
17034
17136
|
import_react_query32 = require("@tanstack/react-query");
|
|
17035
17137
|
import_lucide_react45 = require("lucide-react");
|
|
17036
|
-
|
|
17138
|
+
import_react51 = require("react");
|
|
17037
17139
|
import_wagmi = require("wagmi");
|
|
17038
17140
|
init_auth();
|
|
17039
17141
|
init_useExternalWalletStore();
|
|
@@ -17192,7 +17294,7 @@ function NicknameEditForm(props) {
|
|
|
17192
17294
|
const { t } = useT();
|
|
17193
17295
|
const passportWalletAddress = useSession((st) => st.address);
|
|
17194
17296
|
const { callbacksRef } = useProviderConfig();
|
|
17195
|
-
const [isNicknameCopied, setIsNicknameCopied] = (0,
|
|
17297
|
+
const [isNicknameCopied, setIsNicknameCopied] = (0, import_react52.useState)(false);
|
|
17196
17298
|
const {
|
|
17197
17299
|
mutate: changeNickname2,
|
|
17198
17300
|
isError: isNicknameChangeError,
|
|
@@ -17224,7 +17326,7 @@ function NicknameEditForm(props) {
|
|
|
17224
17326
|
);
|
|
17225
17327
|
}
|
|
17226
17328
|
});
|
|
17227
|
-
const handleInputChange = (0,
|
|
17329
|
+
const handleInputChange = (0, import_react52.useCallback)(
|
|
17228
17330
|
(e) => {
|
|
17229
17331
|
const value = e.target.value;
|
|
17230
17332
|
setInputValue(value);
|
|
@@ -17238,7 +17340,7 @@ function NicknameEditForm(props) {
|
|
|
17238
17340
|
},
|
|
17239
17341
|
[clientError, isNicknameChangeError, isNicknameChangeSuccess, reset, t]
|
|
17240
17342
|
);
|
|
17241
|
-
const handleSubmit = (0,
|
|
17343
|
+
const handleSubmit = (0, import_react52.useCallback)(
|
|
17242
17344
|
(e) => {
|
|
17243
17345
|
if (!canChange) return;
|
|
17244
17346
|
e.preventDefault();
|
|
@@ -17302,7 +17404,7 @@ function NicknameEditForm(props) {
|
|
|
17302
17404
|
!!canChange && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "w-full flex items-center leadding-4 text-[10px]", children: t("passport:nicknameMenu.hint") })
|
|
17303
17405
|
] });
|
|
17304
17406
|
}
|
|
17305
|
-
var import_react_query33, import_lucide_react47,
|
|
17407
|
+
var import_react_query33, import_lucide_react47, import_react52, import_jsx_runtime78;
|
|
17306
17408
|
var init_NicknameEditForm = __esm({
|
|
17307
17409
|
"src/internal/components/NicknameMenu/NicknameEditForm.tsx"() {
|
|
17308
17410
|
init_ProviderContext();
|
|
@@ -17310,7 +17412,7 @@ var init_NicknameEditForm = __esm({
|
|
|
17310
17412
|
init_i18n();
|
|
17311
17413
|
import_react_query33 = require("@tanstack/react-query");
|
|
17312
17414
|
import_lucide_react47 = require("lucide-react");
|
|
17313
|
-
|
|
17415
|
+
import_react52 = require("react");
|
|
17314
17416
|
init_PositiveIcon();
|
|
17315
17417
|
init_nickname();
|
|
17316
17418
|
init_profile();
|
|
@@ -17326,17 +17428,17 @@ var init_NicknameEditForm = __esm({
|
|
|
17326
17428
|
|
|
17327
17429
|
// src/internal/components/NicknameMenu/useNickname.ts
|
|
17328
17430
|
function useNicknameForm(currentNickname) {
|
|
17329
|
-
const [inputValue, setInputValue] = (0,
|
|
17431
|
+
const [inputValue, setInputValue] = (0, import_react53.useState)("");
|
|
17330
17432
|
const normalizedInputValue = normalizeNickname(inputValue);
|
|
17331
17433
|
const validation = validateNickname(inputValue);
|
|
17332
17434
|
const isValidForCheck = validation.valid && normalizedInputValue.length > 0;
|
|
17333
|
-
(0,
|
|
17435
|
+
(0, import_react53.useEffect)(() => {
|
|
17334
17436
|
setInputValue(currentNickname);
|
|
17335
17437
|
}, [currentNickname]);
|
|
17336
|
-
const [queryInputValue, setQueryInputValue] = (0,
|
|
17438
|
+
const [queryInputValue, setQueryInputValue] = (0, import_react53.useState)("");
|
|
17337
17439
|
const isSameAsCurrentNickname = normalizedInputValue === currentNickname.toLowerCase();
|
|
17338
17440
|
const shouldCheckAvailability = validation.valid && !isSameAsCurrentNickname && inputValue.length > 0;
|
|
17339
|
-
(0,
|
|
17441
|
+
(0, import_react53.useEffect)(() => {
|
|
17340
17442
|
if (!isValidForCheck || !shouldCheckAvailability) {
|
|
17341
17443
|
setQueryInputValue("");
|
|
17342
17444
|
return;
|
|
@@ -17365,11 +17467,11 @@ function useNicknameForm(currentNickname) {
|
|
|
17365
17467
|
availabilityQuery: query
|
|
17366
17468
|
};
|
|
17367
17469
|
}
|
|
17368
|
-
var import_react_query34,
|
|
17470
|
+
var import_react_query34, import_react53, DEBOUNCE_MS;
|
|
17369
17471
|
var init_useNickname = __esm({
|
|
17370
17472
|
"src/internal/components/NicknameMenu/useNickname.ts"() {
|
|
17371
17473
|
import_react_query34 = require("@tanstack/react-query");
|
|
17372
|
-
|
|
17474
|
+
import_react53 = require("react");
|
|
17373
17475
|
init_nickname();
|
|
17374
17476
|
init_profile();
|
|
17375
17477
|
init_nickname_validation();
|
|
@@ -17381,7 +17483,7 @@ var init_useNickname = __esm({
|
|
|
17381
17483
|
function NicknameMenu() {
|
|
17382
17484
|
const address = useSession((st) => st.address);
|
|
17383
17485
|
const { t } = useT();
|
|
17384
|
-
const [clientError, setClientError] = (0,
|
|
17486
|
+
const [clientError, setClientError] = (0, import_react54.useState)(null);
|
|
17385
17487
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
17386
17488
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
17387
17489
|
const {
|
|
@@ -17468,7 +17570,7 @@ function NicknameMenu() {
|
|
|
17468
17570
|
}
|
|
17469
17571
|
);
|
|
17470
17572
|
}
|
|
17471
|
-
var import_react_query35, import_dayjs4, import_lucide_react48,
|
|
17573
|
+
var import_react_query35, import_dayjs4, import_lucide_react48, import_react54, import_jsx_runtime79;
|
|
17472
17574
|
var init_NicknameMenu = __esm({
|
|
17473
17575
|
"src/internal/components/NicknameMenu/NicknameMenu.tsx"() {
|
|
17474
17576
|
init_SessionContext();
|
|
@@ -17476,7 +17578,7 @@ var init_NicknameMenu = __esm({
|
|
|
17476
17578
|
import_react_query35 = require("@tanstack/react-query");
|
|
17477
17579
|
import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
17478
17580
|
import_lucide_react48 = require("lucide-react");
|
|
17479
|
-
|
|
17581
|
+
import_react54 = require("react");
|
|
17480
17582
|
init_nickname();
|
|
17481
17583
|
init_profile();
|
|
17482
17584
|
init_useLayoutDataStore();
|
|
@@ -17513,11 +17615,11 @@ function useResolvedPublicClient(chainId, logScope = "useResolvedPublicClient")
|
|
|
17513
17615
|
const activeChainConfig = useSession((st) => st.chainConfig);
|
|
17514
17616
|
const resolvedChainId = chainId ?? activeChainId;
|
|
17515
17617
|
const shouldUseActiveClient = !chainId || chainId === activeChainId;
|
|
17516
|
-
const chainConfig = (0,
|
|
17618
|
+
const chainConfig = (0, import_react55.useMemo)(() => {
|
|
17517
17619
|
if (shouldUseActiveClient) return activeChainConfig;
|
|
17518
17620
|
return (0, import_read13.getChainConfig)(chainId);
|
|
17519
17621
|
}, [activeChainConfig, chainId, shouldUseActiveClient]);
|
|
17520
|
-
const publicClient = (0,
|
|
17622
|
+
const publicClient = (0, import_react55.useMemo)(() => {
|
|
17521
17623
|
if (shouldUseActiveClient) return activePublicClient;
|
|
17522
17624
|
if (!chainId) return activePublicClient;
|
|
17523
17625
|
try {
|
|
@@ -17534,12 +17636,12 @@ function useResolvedPublicClient(chainId, logScope = "useResolvedPublicClient")
|
|
|
17534
17636
|
resolvedChainId
|
|
17535
17637
|
};
|
|
17536
17638
|
}
|
|
17537
|
-
var import_read13,
|
|
17639
|
+
var import_read13, import_react55, publicClientByChainId;
|
|
17538
17640
|
var init_useResolvedPublicClient = __esm({
|
|
17539
17641
|
"src/internal/hooks/useResolvedPublicClient.ts"() {
|
|
17540
17642
|
init_SessionContext();
|
|
17541
17643
|
import_read13 = require("@embarkai/core/read");
|
|
17542
|
-
|
|
17644
|
+
import_react55 = require("react");
|
|
17543
17645
|
publicClientByChainId = /* @__PURE__ */ new Map();
|
|
17544
17646
|
}
|
|
17545
17647
|
});
|
|
@@ -17549,7 +17651,7 @@ function useWatchTokens(options) {
|
|
|
17549
17651
|
const { address, chainId, enabled = true } = options;
|
|
17550
17652
|
const { config } = useProviderConfig();
|
|
17551
17653
|
const { publicClient, resolvedChainId } = useResolvedPublicClient(chainId, "useWatchTokens");
|
|
17552
|
-
const watchTokens = (0,
|
|
17654
|
+
const watchTokens = (0, import_react56.useMemo)(() => {
|
|
17553
17655
|
const allWatchTokens = config.current.watchTokens;
|
|
17554
17656
|
const tokensForChain = resolvedChainId ? allWatchTokens?.[resolvedChainId] || [] : [];
|
|
17555
17657
|
return tokensForChain;
|
|
@@ -17631,12 +17733,12 @@ function useWatchTokens(options) {
|
|
|
17631
17733
|
refetch
|
|
17632
17734
|
};
|
|
17633
17735
|
}
|
|
17634
|
-
var import_react_query36,
|
|
17736
|
+
var import_react_query36, import_react56, import_viem6, WATCH_TOKENS_QUERY_KEY;
|
|
17635
17737
|
var init_useWatchTokens = __esm({
|
|
17636
17738
|
"src/internal/hooks/useWatchTokens.ts"() {
|
|
17637
17739
|
init_ProviderContext();
|
|
17638
17740
|
import_react_query36 = require("@tanstack/react-query");
|
|
17639
|
-
|
|
17741
|
+
import_react56 = require("react");
|
|
17640
17742
|
import_viem6 = require("viem");
|
|
17641
17743
|
init_useResolvedPublicClient();
|
|
17642
17744
|
WATCH_TOKENS_QUERY_KEY = "watch-tokens";
|
|
@@ -17774,11 +17876,11 @@ function useBlockscoutAssets(options) {
|
|
|
17774
17876
|
const customTokenBalancesQuery = portfolioConfig?.tokenBalancesQuery;
|
|
17775
17877
|
const customTokenBalancesQueryKey = portfolioConfig?.tokenBalancesQueryKey;
|
|
17776
17878
|
const blockscoutApiUrl = getBlockscoutApiUrl(chainConfig);
|
|
17777
|
-
const blockscoutClient = (0,
|
|
17879
|
+
const blockscoutClient = (0, import_react57.useMemo)(
|
|
17778
17880
|
() => blockscoutApiUrl ? (0, import_clients2.createBlockscoutClient)({ baseUrl: blockscoutApiUrl }) : null,
|
|
17779
17881
|
[blockscoutApiUrl]
|
|
17780
17882
|
);
|
|
17781
|
-
const lastRefreshRef = (0,
|
|
17883
|
+
const lastRefreshRef = (0, import_react57.useRef)(0);
|
|
17782
17884
|
const {
|
|
17783
17885
|
assets: watchTokenAssets,
|
|
17784
17886
|
isLoading: watchTokensLoading,
|
|
@@ -17847,7 +17949,7 @@ function useBlockscoutAssets(options) {
|
|
|
17847
17949
|
retry: 2,
|
|
17848
17950
|
retryDelay: 1e3
|
|
17849
17951
|
});
|
|
17850
|
-
const erc20TokenAddresses = (0,
|
|
17952
|
+
const erc20TokenAddresses = (0, import_react57.useMemo)(() => {
|
|
17851
17953
|
if (!tokenBalances) return [];
|
|
17852
17954
|
return tokenBalances.filter((tb) => tb.token.type === "ERC-20").map((tb) => tb.token.address_hash);
|
|
17853
17955
|
}, [tokenBalances]);
|
|
@@ -17891,7 +17993,7 @@ function useBlockscoutAssets(options) {
|
|
|
17891
17993
|
gcTime: BLOCKSCOUT_QUERY_GC_TIME,
|
|
17892
17994
|
retry: 1
|
|
17893
17995
|
});
|
|
17894
|
-
const assets = (0,
|
|
17996
|
+
const assets = (0, import_react57.useMemo)(() => {
|
|
17895
17997
|
const result = [];
|
|
17896
17998
|
const addedAddresses = /* @__PURE__ */ new Set();
|
|
17897
17999
|
if (nativeBalanceData) {
|
|
@@ -17937,7 +18039,7 @@ function useBlockscoutAssets(options) {
|
|
|
17937
18039
|
}
|
|
17938
18040
|
return result;
|
|
17939
18041
|
}, [nativeBalanceData, tokenBalances, nftItems, erc3643Results, watchTokenAssets, chainConfig]);
|
|
17940
|
-
const nativeBalance = (0,
|
|
18042
|
+
const nativeBalance = (0, import_react57.useMemo)(() => {
|
|
17941
18043
|
if (!nativeBalanceData) return null;
|
|
17942
18044
|
return {
|
|
17943
18045
|
value: nativeBalanceData.value,
|
|
@@ -17945,11 +18047,11 @@ function useBlockscoutAssets(options) {
|
|
|
17945
18047
|
symbol: nativeBalanceData.symbol
|
|
17946
18048
|
};
|
|
17947
18049
|
}, [nativeBalanceData]);
|
|
17948
|
-
const error = (0,
|
|
18050
|
+
const error = (0, import_react57.useMemo)(() => {
|
|
17949
18051
|
if (!tokensError) return null;
|
|
17950
18052
|
return createError(tokensError);
|
|
17951
18053
|
}, [tokensError]);
|
|
17952
|
-
const refreshBalances = (0,
|
|
18054
|
+
const refreshBalances = (0, import_react57.useCallback)(async () => {
|
|
17953
18055
|
const now = Date.now();
|
|
17954
18056
|
if (now - lastRefreshRef.current < BLOCKSCOUT_REFRESH_DEBOUNCE) {
|
|
17955
18057
|
return;
|
|
@@ -17957,7 +18059,7 @@ function useBlockscoutAssets(options) {
|
|
|
17957
18059
|
lastRefreshRef.current = now;
|
|
17958
18060
|
await Promise.all([refetchNative(), refetchTokens(), refetchNfts(), refetchWatchTokens()]);
|
|
17959
18061
|
}, [refetchNative, refetchTokens, refetchNfts, refetchWatchTokens]);
|
|
17960
|
-
const getTokenBalance = (0,
|
|
18062
|
+
const getTokenBalance = (0, import_react57.useCallback)(
|
|
17961
18063
|
(tokenAddress) => {
|
|
17962
18064
|
return assets.find((a) => a.address?.toLowerCase() === tokenAddress.toLowerCase()) || null;
|
|
17963
18065
|
},
|
|
@@ -17975,13 +18077,13 @@ function useBlockscoutAssets(options) {
|
|
|
17975
18077
|
lastUpdated: dataUpdatedAt || null
|
|
17976
18078
|
};
|
|
17977
18079
|
}
|
|
17978
|
-
var import_clients2, import_react_query37,
|
|
18080
|
+
var import_clients2, import_react_query37, import_react57, import_viem7, BLOCKSCOUT_QUERY_KEY, ERC3643_DETECTION_QUERY_KEY, ERC3643_ABI;
|
|
17979
18081
|
var init_useBlockscoutAssets = __esm({
|
|
17980
18082
|
"src/internal/hooks/useBlockscoutAssets.ts"() {
|
|
17981
18083
|
init_ProviderContext();
|
|
17982
18084
|
import_clients2 = require("@embarkai/core/clients");
|
|
17983
18085
|
import_react_query37 = require("@tanstack/react-query");
|
|
17984
|
-
|
|
18086
|
+
import_react57 = require("react");
|
|
17985
18087
|
import_viem7 = require("viem");
|
|
17986
18088
|
init_initial();
|
|
17987
18089
|
init_constants();
|
|
@@ -18098,8 +18200,8 @@ async function resolveAssetRate(symbol, address, customAssetRateQuery) {
|
|
|
18098
18200
|
}
|
|
18099
18201
|
function PortfolioItemImage(props) {
|
|
18100
18202
|
const { asset } = props;
|
|
18101
|
-
const [nftImageError, setNftImageError] = (0,
|
|
18102
|
-
const [logoError, setLogoError] = (0,
|
|
18203
|
+
const [nftImageError, setNftImageError] = (0, import_react58.useState)(false);
|
|
18204
|
+
const [logoError, setLogoError] = (0, import_react58.useState)(false);
|
|
18103
18205
|
const isNft = isNftAsset(asset);
|
|
18104
18206
|
const nftImage = getNftImage(asset);
|
|
18105
18207
|
const isSecurity = isSecurityToken(asset);
|
|
@@ -18214,14 +18316,14 @@ function PortfolioItem(props) {
|
|
|
18214
18316
|
}
|
|
18215
18317
|
);
|
|
18216
18318
|
}
|
|
18217
|
-
var import_react_query38, import_lucide_react49,
|
|
18319
|
+
var import_react_query38, import_lucide_react49, import_react58, import_viem9, import_jsx_runtime81, SKIP_SYMBOLS2, ASSETS_RATES_QUERY_KEY;
|
|
18218
18320
|
var init_PortfolioItem = __esm({
|
|
18219
18321
|
"src/internal/components/PortfolioMenu/PortfolioItem.tsx"() {
|
|
18220
18322
|
init_ProviderContext();
|
|
18221
18323
|
init_tokens();
|
|
18222
18324
|
import_react_query38 = require("@tanstack/react-query");
|
|
18223
18325
|
import_lucide_react49 = require("lucide-react");
|
|
18224
|
-
|
|
18326
|
+
import_react58 = require("react");
|
|
18225
18327
|
import_viem9 = require("viem");
|
|
18226
18328
|
init_base();
|
|
18227
18329
|
init_priceFormatter();
|
|
@@ -18253,7 +18355,7 @@ function PortfolioMenu() {
|
|
|
18253
18355
|
enabled: !!address
|
|
18254
18356
|
});
|
|
18255
18357
|
const shownProjectAssests = projectAssets.filter((asset) => !asset.hideInPortfolio);
|
|
18256
|
-
const refreshAllAssetsBalances = (0,
|
|
18358
|
+
const refreshAllAssetsBalances = (0, import_react59.useCallback)(() => {
|
|
18257
18359
|
Promise.all(shownProjectAssests.map((asset) => qc.invalidateQueries({ queryKey: asset.balanceQueryKey })));
|
|
18258
18360
|
refreshBlockscoutBalances();
|
|
18259
18361
|
}, [qc, shownProjectAssests, refreshBlockscoutBalances]);
|
|
@@ -18303,7 +18405,7 @@ function PortfolioMenu() {
|
|
|
18303
18405
|
}
|
|
18304
18406
|
);
|
|
18305
18407
|
}
|
|
18306
|
-
var import_react_query39, import_lucide_react50,
|
|
18408
|
+
var import_react_query39, import_lucide_react50, import_react59, import_jsx_runtime82;
|
|
18307
18409
|
var init_PortfolioMenu = __esm({
|
|
18308
18410
|
"src/internal/components/PortfolioMenu/PortfolioMenu.tsx"() {
|
|
18309
18411
|
init_ProviderContext();
|
|
@@ -18311,7 +18413,7 @@ var init_PortfolioMenu = __esm({
|
|
|
18311
18413
|
init_i18n();
|
|
18312
18414
|
import_react_query39 = require("@tanstack/react-query");
|
|
18313
18415
|
import_lucide_react50 = require("lucide-react");
|
|
18314
|
-
|
|
18416
|
+
import_react59 = require("react");
|
|
18315
18417
|
init_useBlockscoutAssets();
|
|
18316
18418
|
init_useLayoutDataStore();
|
|
18317
18419
|
init_useLayoutStore();
|
|
@@ -18420,10 +18522,10 @@ function ReceiveMenu() {
|
|
|
18420
18522
|
const { t } = useT();
|
|
18421
18523
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
18422
18524
|
const open = page === "receive";
|
|
18423
|
-
const [qrCodeUrl, setQrCodeUrl] = (0,
|
|
18424
|
-
const [copied, setCopied] = (0,
|
|
18425
|
-
const [fingerprintCopied, setFingerprintCopied] = (0,
|
|
18426
|
-
const fingerprint = (0,
|
|
18525
|
+
const [qrCodeUrl, setQrCodeUrl] = (0, import_react60.useState)("");
|
|
18526
|
+
const [copied, setCopied] = (0, import_react60.useState)(false);
|
|
18527
|
+
const [fingerprintCopied, setFingerprintCopied] = (0, import_react60.useState)(false);
|
|
18528
|
+
const fingerprint = (0, import_react60.useMemo)(() => {
|
|
18427
18529
|
if (!session?.ownerAddress) return null;
|
|
18428
18530
|
try {
|
|
18429
18531
|
return generateFingerprint(session.ownerAddress);
|
|
@@ -18431,7 +18533,7 @@ function ReceiveMenu() {
|
|
|
18431
18533
|
return null;
|
|
18432
18534
|
}
|
|
18433
18535
|
}, [session?.ownerAddress]);
|
|
18434
|
-
(0,
|
|
18536
|
+
(0, import_react60.useEffect)(() => {
|
|
18435
18537
|
if (open && address) {
|
|
18436
18538
|
import_qrcode.default.toDataURL(address, {
|
|
18437
18539
|
width: 200,
|
|
@@ -18444,7 +18546,7 @@ function ReceiveMenu() {
|
|
|
18444
18546
|
});
|
|
18445
18547
|
}
|
|
18446
18548
|
}, [open, address]);
|
|
18447
|
-
const handleCopy = (0,
|
|
18549
|
+
const handleCopy = (0, import_react60.useCallback)(async () => {
|
|
18448
18550
|
if (!address) return;
|
|
18449
18551
|
try {
|
|
18450
18552
|
await navigator.clipboard.writeText(address);
|
|
@@ -18454,7 +18556,7 @@ function ReceiveMenu() {
|
|
|
18454
18556
|
console.error("Failed to copy address:", error);
|
|
18455
18557
|
}
|
|
18456
18558
|
}, [address]);
|
|
18457
|
-
const handleCopyFingerprint = (0,
|
|
18559
|
+
const handleCopyFingerprint = (0, import_react60.useCallback)(async () => {
|
|
18458
18560
|
if (!fingerprint) return;
|
|
18459
18561
|
try {
|
|
18460
18562
|
await navigator.clipboard.writeText(fingerprint);
|
|
@@ -18515,14 +18617,14 @@ function ReceiveMenu() {
|
|
|
18515
18617
|
}
|
|
18516
18618
|
);
|
|
18517
18619
|
}
|
|
18518
|
-
var import_lucide_react51, import_qrcode,
|
|
18620
|
+
var import_lucide_react51, import_qrcode, import_react60, import_jsx_runtime83;
|
|
18519
18621
|
var init_ReceiveMenu = __esm({
|
|
18520
18622
|
"src/internal/components/ReceiveMenu/ReceiveMenu.tsx"() {
|
|
18521
18623
|
init_SessionContext();
|
|
18522
18624
|
init_i18n();
|
|
18523
18625
|
import_lucide_react51 = require("lucide-react");
|
|
18524
18626
|
import_qrcode = __toESM(require("qrcode"), 1);
|
|
18525
|
-
|
|
18627
|
+
import_react60 = require("react");
|
|
18526
18628
|
init_useLayoutDataStore();
|
|
18527
18629
|
init_useLayoutStore();
|
|
18528
18630
|
init_nickname_fingerprint();
|
|
@@ -18996,7 +19098,7 @@ function SecurityMenu() {
|
|
|
18996
19098
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
18997
19099
|
const userId = import_auth20.jwtTokenManager.getUserId();
|
|
18998
19100
|
const serverHasKeyshare = import_auth20.jwtTokenManager.getHasKeyshare() ?? false;
|
|
18999
|
-
const [appToUntrust, untrustApp] = (0,
|
|
19101
|
+
const [appToUntrust, untrustApp] = (0, import_react61.useState)(null);
|
|
19000
19102
|
const { data: recoveryData, isLoading: isRecoveryLoading } = useKeyshareRecoveryStats();
|
|
19001
19103
|
const localInfo = recoveryData?.keyshareInfo || {};
|
|
19002
19104
|
const hasServerBackup = !!recoveryData?.shareRecoveryStats?.created || recoveryData?.shareRecoveryStats?.devices?.length > 0;
|
|
@@ -19072,13 +19174,13 @@ function SecurityMenu() {
|
|
|
19072
19174
|
}
|
|
19073
19175
|
);
|
|
19074
19176
|
}
|
|
19075
|
-
var import_react_query41, import_lucide_react57,
|
|
19177
|
+
var import_react_query41, import_lucide_react57, import_react61, import_jsx_runtime90;
|
|
19076
19178
|
var init_SecurityMenu = __esm({
|
|
19077
19179
|
"src/internal/components/SecurityMenu/SecurityMenu.tsx"() {
|
|
19078
19180
|
init_i18n();
|
|
19079
19181
|
import_react_query41 = require("@tanstack/react-query");
|
|
19080
19182
|
import_lucide_react57 = require("lucide-react");
|
|
19081
|
-
|
|
19183
|
+
import_react61 = require("react");
|
|
19082
19184
|
init_auth();
|
|
19083
19185
|
init_useLayoutDataStore();
|
|
19084
19186
|
init_useLayoutStore();
|
|
@@ -19345,12 +19447,12 @@ function SenderSelector(props) {
|
|
|
19345
19447
|
const { openConnectModal } = (0, import_rainbowkit.useConnectModal)();
|
|
19346
19448
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
19347
19449
|
const directWalletIsConnected = useExternalWalletStore((st) => st.isExternalConnected);
|
|
19348
|
-
const pendingWalletRef = (0,
|
|
19450
|
+
const pendingWalletRef = (0, import_react62.useRef)(null);
|
|
19349
19451
|
const originChain = useBridgeStore((st) => st.originChain);
|
|
19350
19452
|
const bridgeSender = useBridgeStore((st) => st.bridgeSender);
|
|
19351
19453
|
const bridgeSenders = useBridgeStore((st) => st.bridgeSenders);
|
|
19352
|
-
const [walletMessage, setWalletMessage] = (0,
|
|
19353
|
-
(0,
|
|
19454
|
+
const [walletMessage, setWalletMessage] = (0, import_react62.useState)(null);
|
|
19455
|
+
(0, import_react62.useEffect)(() => {
|
|
19354
19456
|
useFlowSelectorStore.getState().setRenderKey(`sender-selected-${Date.now()}`);
|
|
19355
19457
|
}, [walletMessage]);
|
|
19356
19458
|
const { mutate: loginDirectWallet, isPending: isDirectWalletLoggingIn } = (0, import_react_query42.useMutation)({
|
|
@@ -19406,7 +19508,7 @@ function SenderSelector(props) {
|
|
|
19406
19508
|
setWalletMessage(error instanceof Error ? error.message : "Wallet login failed. Please try again.");
|
|
19407
19509
|
}
|
|
19408
19510
|
});
|
|
19409
|
-
(0,
|
|
19511
|
+
(0, import_react62.useEffect)(() => {
|
|
19410
19512
|
const pendingProfile = pendingWalletRef.current;
|
|
19411
19513
|
if (!pendingProfile || !directWalletIsConnected || !directWalletAddress) return;
|
|
19412
19514
|
if (directWalletAddress.toLowerCase() !== pendingProfile.externalId?.toLowerCase()) return;
|
|
@@ -19481,14 +19583,14 @@ function SenderSelector(props) {
|
|
|
19481
19583
|
] })
|
|
19482
19584
|
] });
|
|
19483
19585
|
}
|
|
19484
|
-
var import_rainbowkit, import_react_query42,
|
|
19586
|
+
var import_rainbowkit, import_react_query42, import_react62, import_wagmi2, import_jsx_runtime91;
|
|
19485
19587
|
var init_SenderSelector = __esm({
|
|
19486
19588
|
"src/internal/components/SendMenu/hyperbridge/components/SenderSelector.tsx"() {
|
|
19487
19589
|
init_ProviderContext();
|
|
19488
19590
|
init_i18n();
|
|
19489
19591
|
import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
19490
19592
|
import_react_query42 = require("@tanstack/react-query");
|
|
19491
|
-
|
|
19593
|
+
import_react62 = require("react");
|
|
19492
19594
|
import_wagmi2 = require("wagmi");
|
|
19493
19595
|
init_wallet();
|
|
19494
19596
|
init_useLayoutDataStore();
|
|
@@ -19601,8 +19703,8 @@ var init_wallets = __esm({
|
|
|
19601
19703
|
function useAvailableSenders() {
|
|
19602
19704
|
const address = useSession((st) => st.address);
|
|
19603
19705
|
const { profiles } = useLinkedProfiles();
|
|
19604
|
-
const lastCalcedSenders = (0,
|
|
19605
|
-
(0,
|
|
19706
|
+
const lastCalcedSenders = (0, import_react63.useRef)([]);
|
|
19707
|
+
(0, import_react63.useEffect)(() => {
|
|
19606
19708
|
const sendersAccumulator = [
|
|
19607
19709
|
{
|
|
19608
19710
|
type: "embarkai-wallet",
|
|
@@ -19634,13 +19736,13 @@ function useAvailableSenders() {
|
|
|
19634
19736
|
directWalletProfile: profiles.filter((p) => p.provider === "wallet")[0] || null
|
|
19635
19737
|
};
|
|
19636
19738
|
}
|
|
19637
|
-
var
|
|
19739
|
+
var import_react63;
|
|
19638
19740
|
var init_useAvailableSenders = __esm({
|
|
19639
19741
|
"src/internal/components/SendMenu/hyperbridge/hooks/useAvailableSenders.ts"() {
|
|
19640
19742
|
init_SessionContext();
|
|
19641
19743
|
init_tokens();
|
|
19642
19744
|
init_linkedProfiles();
|
|
19643
|
-
|
|
19745
|
+
import_react63 = require("react");
|
|
19644
19746
|
init_wallets();
|
|
19645
19747
|
init_useFlowSelector();
|
|
19646
19748
|
init_useBridgeStore();
|
|
@@ -19972,7 +20074,7 @@ function useHyperlaneHistory() {
|
|
|
19972
20074
|
const page = useLayoutDataStore((st) => st.page);
|
|
19973
20075
|
const flow = useFlowSelectorStore((st) => st.flow);
|
|
19974
20076
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
19975
|
-
const [currentPage, setCurrentPage] = (0,
|
|
20077
|
+
const [currentPage, setCurrentPage] = (0, import_react64.useState)(1);
|
|
19976
20078
|
const query = (0, import_react_query43.useQuery)({
|
|
19977
20079
|
retry: false,
|
|
19978
20080
|
refetchInterval: TX_HISTORY_POLLING_INTERVAL,
|
|
@@ -19980,13 +20082,13 @@ function useHyperlaneHistory() {
|
|
|
19980
20082
|
queryKey: [HYPERLANE_HISTORY_QUERY_KEY, address, currentPage],
|
|
19981
20083
|
queryFn: async () => await getHyperlaneBridgeHistory({ page: currentPage, pageSize: TX_HISTORY_PAGE_SIZE })
|
|
19982
20084
|
});
|
|
19983
|
-
const updateExpandable = (0,
|
|
19984
|
-
(0,
|
|
20085
|
+
const updateExpandable = (0, import_react64.useCallback)(
|
|
20086
|
+
(0, import_lodash_es9.debounce)(() => {
|
|
19985
20087
|
useFlowSelectorStore.getState().setRenderKey(`hyperlane-history-loaded-${Date.now()}`);
|
|
19986
|
-
},
|
|
20088
|
+
}, 250),
|
|
19987
20089
|
[]
|
|
19988
20090
|
);
|
|
19989
|
-
(0,
|
|
20091
|
+
(0, import_react64.useEffect)(() => {
|
|
19990
20092
|
const { data, isLoading } = query;
|
|
19991
20093
|
if (isLoading || data.data?.length === 0) return;
|
|
19992
20094
|
updateExpandable();
|
|
@@ -19997,13 +20099,13 @@ function useHyperlaneHistory() {
|
|
|
19997
20099
|
setCurrentPage
|
|
19998
20100
|
};
|
|
19999
20101
|
}
|
|
20000
|
-
var import_react_query43,
|
|
20102
|
+
var import_react_query43, import_lodash_es9, import_react64, HYPERLANE_HISTORY_QUERY_KEY, TX_HISTORY_PAGE_SIZE, TX_HISTORY_POLLING_INTERVAL;
|
|
20001
20103
|
var init_useHyperlaneHistory = __esm({
|
|
20002
20104
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneHistory.ts"() {
|
|
20003
20105
|
init_SessionContext();
|
|
20004
20106
|
import_react_query43 = require("@tanstack/react-query");
|
|
20005
|
-
|
|
20006
|
-
|
|
20107
|
+
import_lodash_es9 = require("lodash-es");
|
|
20108
|
+
import_react64 = require("react");
|
|
20007
20109
|
init_useLayoutDataStore();
|
|
20008
20110
|
init_useFlowSelector();
|
|
20009
20111
|
init_api3();
|
|
@@ -20035,7 +20137,7 @@ function useBridge() {
|
|
|
20035
20137
|
const address = useSession((st) => st.address);
|
|
20036
20138
|
const { data: walletClient } = (0, import_wagmi3.useWalletClient)();
|
|
20037
20139
|
const { switchChainAsync } = (0, import_wagmi3.useSwitchChain)();
|
|
20038
|
-
const swapDirection = (0,
|
|
20140
|
+
const swapDirection = (0, import_react65.useCallback)(() => {
|
|
20039
20141
|
const {
|
|
20040
20142
|
bridgeStep,
|
|
20041
20143
|
originChain,
|
|
@@ -20087,7 +20189,7 @@ function useBridge() {
|
|
|
20087
20189
|
useFlowSelectorStore.getState().setError(error instanceof Error ? error.message : String(error));
|
|
20088
20190
|
}
|
|
20089
20191
|
});
|
|
20090
|
-
const handleQuoteEstimation = (0,
|
|
20192
|
+
const handleQuoteEstimation = (0, import_react65.useCallback)((amnt) => {
|
|
20091
20193
|
const { originChain, destinationChain, bridgeSender } = useBridgeStore.getState();
|
|
20092
20194
|
if (!amnt || !Number(amnt)) {
|
|
20093
20195
|
useBridgeStore.getState().setQuote(null);
|
|
@@ -20211,14 +20313,14 @@ function useBridge() {
|
|
|
20211
20313
|
isAssetBridging
|
|
20212
20314
|
};
|
|
20213
20315
|
}
|
|
20214
|
-
var import_react_query44,
|
|
20316
|
+
var import_react_query44, import_react65, import_wagmi3;
|
|
20215
20317
|
var init_useBridge = __esm({
|
|
20216
20318
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridge.ts"() {
|
|
20217
20319
|
init_SessionContext();
|
|
20218
20320
|
init_i18n();
|
|
20219
20321
|
init_useExternalWalletStore();
|
|
20220
20322
|
import_react_query44 = require("@tanstack/react-query");
|
|
20221
|
-
|
|
20323
|
+
import_react65 = require("react");
|
|
20222
20324
|
import_wagmi3 = require("wagmi");
|
|
20223
20325
|
init_useLayoutStore();
|
|
20224
20326
|
init_useFlowSelector();
|
|
@@ -20248,7 +20350,7 @@ function useHyperlaneRoutes() {
|
|
|
20248
20350
|
queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
|
|
20249
20351
|
queryFn: async () => getHyperlaneWarpRoutes()
|
|
20250
20352
|
});
|
|
20251
|
-
(0,
|
|
20353
|
+
(0, import_react66.useEffect)(() => {
|
|
20252
20354
|
if (!errorWarpRoutes) return;
|
|
20253
20355
|
useFlowSelectorStore.getState().setError(errorWarpRoutes.message);
|
|
20254
20356
|
const { resetSelections, setRecipient, setOriginChain, setDestinationChain } = useBridgeStore.getState();
|
|
@@ -20257,7 +20359,7 @@ function useHyperlaneRoutes() {
|
|
|
20257
20359
|
setOriginChain(null);
|
|
20258
20360
|
setDestinationChain(null);
|
|
20259
20361
|
}, [errorWarpRoutes]);
|
|
20260
|
-
(0,
|
|
20362
|
+
(0, import_react66.useEffect)(() => {
|
|
20261
20363
|
if (!!hyperRoute || !hyperlaneWarpRoutes.length) return;
|
|
20262
20364
|
const warpRouteToAutoSelect = hyperlaneWarpRoutes.find((route) => route.routeId === hyperRoute);
|
|
20263
20365
|
if (!warpRouteToAutoSelect) return;
|
|
@@ -20276,12 +20378,12 @@ function useHyperlaneRoutes() {
|
|
|
20276
20378
|
}, [hyperRoute, hyperlaneWarpRoutes]);
|
|
20277
20379
|
return { hyperlaneWarpRoutes, isLoadingWarpRoutes };
|
|
20278
20380
|
}
|
|
20279
|
-
var import_react_query45,
|
|
20381
|
+
var import_react_query45, import_react66, HYPERLANE_WARP_ROUTES_QUERY_KEY;
|
|
20280
20382
|
var init_useHyperlaneRoutes = __esm({
|
|
20281
20383
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneRoutes.ts"() {
|
|
20282
20384
|
init_SessionContext();
|
|
20283
20385
|
import_react_query45 = require("@tanstack/react-query");
|
|
20284
|
-
|
|
20386
|
+
import_react66 = require("react");
|
|
20285
20387
|
init_useLayoutDataStore();
|
|
20286
20388
|
init_useFlowSelector();
|
|
20287
20389
|
init_api3();
|
|
@@ -20297,7 +20399,7 @@ function useMenuTitle(warpRoutes) {
|
|
|
20297
20399
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
20298
20400
|
const hyperRoute = useBridgeStore((st) => st.hyperRoute);
|
|
20299
20401
|
const hyperRouteMeta = warpRoutes?.length ? warpRoutes.find((route) => route.routeId === hyperRoute) : null;
|
|
20300
|
-
(0,
|
|
20402
|
+
(0, import_react67.useEffect)(() => {
|
|
20301
20403
|
const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
|
|
20302
20404
|
switch (true) {
|
|
20303
20405
|
case bridgeStep === "sender-selector":
|
|
@@ -20325,11 +20427,11 @@ function useMenuTitle(warpRoutes) {
|
|
|
20325
20427
|
}
|
|
20326
20428
|
}, [bridgeStep, hyperRouteMeta, t]);
|
|
20327
20429
|
}
|
|
20328
|
-
var
|
|
20430
|
+
var import_react67;
|
|
20329
20431
|
var init_useMenuTitle = __esm({
|
|
20330
20432
|
"src/internal/components/SendMenu/hyperbridge/hooks/useMenuTitle.ts"() {
|
|
20331
20433
|
init_i18n();
|
|
20332
|
-
|
|
20434
|
+
import_react67 = require("react");
|
|
20333
20435
|
init_useFlowSelector();
|
|
20334
20436
|
init_useBridgeStore();
|
|
20335
20437
|
}
|
|
@@ -20421,18 +20523,22 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20421
20523
|
return { value, decimals, symbol, formatted };
|
|
20422
20524
|
}
|
|
20423
20525
|
});
|
|
20424
|
-
const {
|
|
20425
|
-
|
|
20426
|
-
|
|
20427
|
-
|
|
20428
|
-
|
|
20429
|
-
|
|
20430
|
-
|
|
20431
|
-
|
|
20432
|
-
|
|
20526
|
+
const { data: externalNativeBalanceData, isLoading: isExternalNativeBalanceLoading } = (0, import_react_query46.useQuery)({
|
|
20527
|
+
retry: false,
|
|
20528
|
+
enabled: bridgeSender === "direct-wallet" && isSelectedTokenNative && !!directWalletAddress && !!originChain,
|
|
20529
|
+
queryKey: [EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY, originChain, directWalletAddress],
|
|
20530
|
+
queryFn: async () => {
|
|
20531
|
+
const chainTransport = import_core6.CHAINS_BROWSERS_TRANSPORTS[originChainMeta.chain.id] || (0, import_viem13.http)(originChainMeta.chain.rpcUrls.default.http[0]);
|
|
20532
|
+
const client = (0, import_viem13.createPublicClient)({ chain: originChainMeta.chain, transport: chainTransport });
|
|
20533
|
+
const rawBalance = await client.getBalance({ address: directWalletAddress });
|
|
20534
|
+
return {
|
|
20535
|
+
value: rawBalance,
|
|
20536
|
+
decimals: originChainMeta.chain.nativeCurrency.decimals,
|
|
20537
|
+
symbol: originChainMeta.chain.nativeCurrency.symbol
|
|
20538
|
+
};
|
|
20433
20539
|
}
|
|
20434
20540
|
});
|
|
20435
|
-
const refreshRouteTokenBalance = (0,
|
|
20541
|
+
const refreshRouteTokenBalance = (0, import_react68.useCallback)(
|
|
20436
20542
|
(senderWallet) => {
|
|
20437
20543
|
switch (true) {
|
|
20438
20544
|
case senderWallet === "embarkai-wallet":
|
|
@@ -20442,13 +20548,13 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20442
20548
|
qc.invalidateQueries({ queryKey: [EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY] });
|
|
20443
20549
|
break;
|
|
20444
20550
|
case (senderWallet === "direct-wallet" && !!isSelectedTokenNative):
|
|
20445
|
-
|
|
20551
|
+
qc.invalidateQueries({ queryKey: [EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY] });
|
|
20446
20552
|
break;
|
|
20447
20553
|
}
|
|
20448
20554
|
},
|
|
20449
|
-
[refreshBalances, qc
|
|
20555
|
+
[refreshBalances, qc]
|
|
20450
20556
|
);
|
|
20451
|
-
(0,
|
|
20557
|
+
(0, import_react68.useEffect)(() => {
|
|
20452
20558
|
if (!bridgeSender || !originChain) return;
|
|
20453
20559
|
switch (bridgeSender) {
|
|
20454
20560
|
case "embarkai-wallet":
|
|
@@ -20479,14 +20585,14 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20479
20585
|
isRouteTokenBalanceLoading: isAssetsLoading || isExternalBalanceLoading || isExternalNativeBalanceLoading
|
|
20480
20586
|
};
|
|
20481
20587
|
}
|
|
20482
|
-
var import_core6, import_react_query46,
|
|
20588
|
+
var import_core6, import_react_query46, import_react68, import_viem13, import_wagmi4, EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY, EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY;
|
|
20483
20589
|
var init_useBridgeBalance = __esm({
|
|
20484
20590
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts"() {
|
|
20485
20591
|
init_SessionContext();
|
|
20486
20592
|
init_i18n();
|
|
20487
20593
|
import_core6 = require("@embarkai/core");
|
|
20488
20594
|
import_react_query46 = require("@tanstack/react-query");
|
|
20489
|
-
|
|
20595
|
+
import_react68 = require("react");
|
|
20490
20596
|
import_viem13 = require("viem");
|
|
20491
20597
|
import_wagmi4 = require("wagmi");
|
|
20492
20598
|
init_useBlockscoutAssets();
|
|
@@ -20496,6 +20602,7 @@ var init_useBridgeBalance = __esm({
|
|
|
20496
20602
|
init_useBridgeStore();
|
|
20497
20603
|
init_utils8();
|
|
20498
20604
|
EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY = "external-wallet-bridging-balance-query";
|
|
20605
|
+
EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY = "external-wallet-bridging-native-balance-query";
|
|
20499
20606
|
}
|
|
20500
20607
|
});
|
|
20501
20608
|
|
|
@@ -20515,11 +20622,11 @@ function SelectStep(props) {
|
|
|
20515
20622
|
} = useBridgeStore();
|
|
20516
20623
|
const selectedSender = bridgeSenders?.find((s) => s.type === bridgeSender) || null;
|
|
20517
20624
|
const { routeTokenBalance, isRouteTokenBalanceLoading } = useBridgeBalance(hyperlaneWarpRoutes);
|
|
20518
|
-
const selectedWarpRoute = hyperlaneWarpRoutes
|
|
20625
|
+
const selectedWarpRoute = hyperlaneWarpRoutes?.find((route) => {
|
|
20519
20626
|
const { routeId, chainPair } = route;
|
|
20520
20627
|
const chainPairNames = chainPair.map((c) => c.chainName);
|
|
20521
20628
|
return routeId === hyperRoute && chainPairNames.includes(originChain) && chainPairNames.includes(destinationChain);
|
|
20522
|
-
});
|
|
20629
|
+
}) || null;
|
|
20523
20630
|
const SelectedWarpRoteIcon = TOKENS_ICONS[(selectedWarpRoute?.symbol || "null_icon").toUpperCase()] || TOKENS_ICONS.EMBARKAI;
|
|
20524
20631
|
const isError = useFlowSelectorStore((st) => !!st.error);
|
|
20525
20632
|
if (isLoadingWarpRoutes) {
|
|
@@ -20544,7 +20651,7 @@ function SelectStep(props) {
|
|
|
20544
20651
|
Button,
|
|
20545
20652
|
{
|
|
20546
20653
|
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
20547
|
-
variant: "
|
|
20654
|
+
variant: "secondary",
|
|
20548
20655
|
className: "w-full justify-between",
|
|
20549
20656
|
onClick: () => {
|
|
20550
20657
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -20583,7 +20690,7 @@ function SelectStep(props) {
|
|
|
20583
20690
|
Button,
|
|
20584
20691
|
{
|
|
20585
20692
|
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
20586
|
-
variant: "
|
|
20693
|
+
variant: "secondary",
|
|
20587
20694
|
className: "w-full justify-between",
|
|
20588
20695
|
onClick: () => {
|
|
20589
20696
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -20603,7 +20710,7 @@ function SelectStep(props) {
|
|
|
20603
20710
|
variant: "outline",
|
|
20604
20711
|
size: "medium",
|
|
20605
20712
|
className: "bg-[var(--ui-kit-bg)] flex items-center gap-[var(--ui-kit-gap)]",
|
|
20606
|
-
children: selectedWarpRoute.chainPair.map((chain, chIdx) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
20713
|
+
children: selectedWarpRoute.chainPair.map((chain, chIdx) => /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_react69.Fragment, { children: [
|
|
20607
20714
|
chIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react59.ArrowLeftRightIcon, { className: "w-4 h-4 " }),
|
|
20608
20715
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ResolveChainIcon, { chainName: chain.chainName, className: "w-4 h-4" })
|
|
20609
20716
|
] }, `${selectedWarpRoute.id}-icon-${chain.chainID}-${chIdx}`))
|
|
@@ -20741,13 +20848,13 @@ function SelectStep(props) {
|
|
|
20741
20848
|
)
|
|
20742
20849
|
] });
|
|
20743
20850
|
}
|
|
20744
|
-
var import_lucide_react59,
|
|
20851
|
+
var import_lucide_react59, import_react69, import_jsx_runtime95;
|
|
20745
20852
|
var init_SelectStep = __esm({
|
|
20746
20853
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectStep.tsx"() {
|
|
20747
20854
|
init_tokens();
|
|
20748
20855
|
init_i18n();
|
|
20749
20856
|
import_lucide_react59 = require("lucide-react");
|
|
20750
|
-
|
|
20857
|
+
import_react69 = require("react");
|
|
20751
20858
|
init_priceFormatter();
|
|
20752
20859
|
init_utils2();
|
|
20753
20860
|
init_badge();
|
|
@@ -20796,7 +20903,7 @@ var init_checkbox = __esm({
|
|
|
20796
20903
|
// src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx
|
|
20797
20904
|
function ConfirmStep(props) {
|
|
20798
20905
|
const { isAssetBridging, bridgeAsset, hyperlaneWarpRoutes } = props;
|
|
20799
|
-
const [userConsent, setUserConsent] = (0,
|
|
20906
|
+
const [userConsent, setUserConsent] = (0, import_react70.useState)(false);
|
|
20800
20907
|
const { t } = useT();
|
|
20801
20908
|
const address = useSession((st) => st.address);
|
|
20802
20909
|
const bridgeSender = useBridgeStore((st) => st.bridgeSenders.find((s) => s.type === st.bridgeSender));
|
|
@@ -20812,6 +20919,7 @@ function ConfirmStep(props) {
|
|
|
20812
20919
|
const chainPairNames = chainPair.map((c) => c.chainName);
|
|
20813
20920
|
return routeId === hyperRoute && chainPairNames.includes(originChain) && chainPairNames.includes(destinationChain);
|
|
20814
20921
|
});
|
|
20922
|
+
const isConfirmationDisabled = !quote || isAssetBridging || !userConsent;
|
|
20815
20923
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
20816
20924
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Highlight, { type: "info", className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
20817
20925
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("p", { className: P_CN, children: [
|
|
@@ -20893,7 +21001,7 @@ function ConfirmStep(props) {
|
|
|
20893
21001
|
{
|
|
20894
21002
|
size: "large",
|
|
20895
21003
|
variant: "default",
|
|
20896
|
-
disabled:
|
|
21004
|
+
disabled: isConfirmationDisabled,
|
|
20897
21005
|
onClick: () => bridgeAsset(),
|
|
20898
21006
|
className: "w-full",
|
|
20899
21007
|
children: [
|
|
@@ -20904,13 +21012,13 @@ function ConfirmStep(props) {
|
|
|
20904
21012
|
)
|
|
20905
21013
|
] });
|
|
20906
21014
|
}
|
|
20907
|
-
var import_lucide_react61,
|
|
21015
|
+
var import_lucide_react61, import_react70, import_jsx_runtime97, P_CN;
|
|
20908
21016
|
var init_ConfirmStep = __esm({
|
|
20909
21017
|
"src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx"() {
|
|
20910
21018
|
init_SessionContext();
|
|
20911
21019
|
init_i18n();
|
|
20912
21020
|
import_lucide_react61 = require("lucide-react");
|
|
20913
|
-
|
|
21021
|
+
import_react70 = require("react");
|
|
20914
21022
|
init_priceFormatter();
|
|
20915
21023
|
init_utils2();
|
|
20916
21024
|
init_button();
|
|
@@ -21268,9 +21376,9 @@ var init_HistoryStep = __esm({
|
|
|
21268
21376
|
function SelectAssetRoute(props) {
|
|
21269
21377
|
const { hyperlaneWarpRoutes } = props;
|
|
21270
21378
|
const { t } = useT();
|
|
21271
|
-
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = (0,
|
|
21379
|
+
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = (0, import_react71.useState)(false);
|
|
21272
21380
|
const selectedAssetSymbol = useBridgeStore((st) => st.bridgeAssetSymbol);
|
|
21273
|
-
const tokenList = (0,
|
|
21381
|
+
const tokenList = (0, import_react71.useMemo)(() => {
|
|
21274
21382
|
const tokens = hyperlaneWarpRoutes.map((route) => route.symbol);
|
|
21275
21383
|
const uniqueTokens = Array.from(new Set(tokens));
|
|
21276
21384
|
return uniqueTokens.map((symbol) => ({
|
|
@@ -21304,7 +21412,7 @@ function SelectAssetRoute(props) {
|
|
|
21304
21412
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
21305
21413
|
Button,
|
|
21306
21414
|
{
|
|
21307
|
-
variant: "
|
|
21415
|
+
variant: "secondary",
|
|
21308
21416
|
className: "w-full",
|
|
21309
21417
|
onClick: () => {
|
|
21310
21418
|
setIsTokenSymbolSelector(true);
|
|
@@ -21321,7 +21429,7 @@ function SelectAssetRoute(props) {
|
|
|
21321
21429
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "w-full flex flex-col gap-[var(--ui-kit-gap)]", children: availableChainPairs.map(([fromChain, toChain]) => /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
21322
21430
|
Button,
|
|
21323
21431
|
{
|
|
21324
|
-
variant: "
|
|
21432
|
+
variant: "secondary",
|
|
21325
21433
|
className: "w-full",
|
|
21326
21434
|
onClick: () => {
|
|
21327
21435
|
const targetWarpRoute = hyperlaneWarpRoutes.find((route) => {
|
|
@@ -21367,13 +21475,13 @@ function SelectAssetRoute(props) {
|
|
|
21367
21475
|
] })
|
|
21368
21476
|
] });
|
|
21369
21477
|
}
|
|
21370
|
-
var import_lucide_react63,
|
|
21478
|
+
var import_lucide_react63, import_react71, import_jsx_runtime100;
|
|
21371
21479
|
var init_SelectAssetRoute = __esm({
|
|
21372
21480
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx"() {
|
|
21373
21481
|
init_tokens();
|
|
21374
21482
|
init_i18n();
|
|
21375
21483
|
import_lucide_react63 = require("lucide-react");
|
|
21376
|
-
|
|
21484
|
+
import_react71 = require("react");
|
|
21377
21485
|
init_button();
|
|
21378
21486
|
init_useFlowSelector();
|
|
21379
21487
|
init_ResolveChainIcon();
|
|
@@ -21401,7 +21509,7 @@ function HyperlaneBridge() {
|
|
|
21401
21509
|
const { hyperlaneWarpRoutes, isLoadingWarpRoutes } = useHyperlaneRoutes();
|
|
21402
21510
|
const { directWalletProfile } = useAvailableSenders();
|
|
21403
21511
|
useMenuTitle(hyperlaneWarpRoutes);
|
|
21404
|
-
(0,
|
|
21512
|
+
(0, import_react72.useEffect)(
|
|
21405
21513
|
() => () => {
|
|
21406
21514
|
useBridgeStore.getState().resetSelections();
|
|
21407
21515
|
},
|
|
@@ -21435,10 +21543,10 @@ function HyperlaneBridge() {
|
|
|
21435
21543
|
bridgeStep === "tx-history-details" && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(HistoryDetailsStep, {})
|
|
21436
21544
|
] });
|
|
21437
21545
|
}
|
|
21438
|
-
var
|
|
21546
|
+
var import_react72, import_jsx_runtime101;
|
|
21439
21547
|
var init_HyperlaneBridge = __esm({
|
|
21440
21548
|
"src/internal/components/SendMenu/hyperbridge/HyperlaneBridge.tsx"() {
|
|
21441
|
-
|
|
21549
|
+
import_react72 = require("react");
|
|
21442
21550
|
init_SenderSelector();
|
|
21443
21551
|
init_useAvailableSenders();
|
|
21444
21552
|
init_useBridge();
|
|
@@ -21456,7 +21564,7 @@ function BridgeHistorySwitch(props) {
|
|
|
21456
21564
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
21457
21565
|
const isUiLocked = useFlowSelectorStore((st) => st.isUiLocked);
|
|
21458
21566
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
21459
|
-
const lastBridgeStepRef = (0,
|
|
21567
|
+
const lastBridgeStepRef = (0, import_react73.useRef)(null);
|
|
21460
21568
|
if (selectorFlow !== "bridge" || bridgeStep === "confirm" || bridgeStep === "success" || bridgeStep === "sender-selector" || bridgeStep === "select-token" || bridgeStep === "tx-history-details") {
|
|
21461
21569
|
return null;
|
|
21462
21570
|
}
|
|
@@ -21474,10 +21582,10 @@ function BridgeHistorySwitch(props) {
|
|
|
21474
21582
|
}
|
|
21475
21583
|
);
|
|
21476
21584
|
}
|
|
21477
|
-
var
|
|
21585
|
+
var import_react73, import_jsx_runtime102;
|
|
21478
21586
|
var init_HistorySwitch = __esm({
|
|
21479
21587
|
"src/internal/components/SendMenu/hyperbridge/components/HistorySwitch.tsx"() {
|
|
21480
|
-
|
|
21588
|
+
import_react73 = require("react");
|
|
21481
21589
|
init_switch();
|
|
21482
21590
|
init_useFlowSelector();
|
|
21483
21591
|
init_useBridgeStore();
|
|
@@ -21568,11 +21676,11 @@ function looksLikeNickname(input) {
|
|
|
21568
21676
|
}
|
|
21569
21677
|
function useNicknameResolve(input, options) {
|
|
21570
21678
|
const { enabled = true, chainId } = options;
|
|
21571
|
-
const [debouncedInput, setDebouncedInput] = (0,
|
|
21572
|
-
const [isDebouncing, setIsDebouncing] = (0,
|
|
21679
|
+
const [debouncedInput, setDebouncedInput] = (0, import_react74.useState)("");
|
|
21680
|
+
const [isDebouncing, setIsDebouncing] = (0, import_react74.useState)(false);
|
|
21573
21681
|
const normalized = normalizeNickname(input);
|
|
21574
21682
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
21575
|
-
(0,
|
|
21683
|
+
(0, import_react74.useEffect)(() => {
|
|
21576
21684
|
if (!isNicknameInput || !enabled) {
|
|
21577
21685
|
setDebouncedInput("");
|
|
21578
21686
|
setIsDebouncing(false);
|
|
@@ -21598,7 +21706,7 @@ function useNicknameResolve(input, options) {
|
|
|
21598
21706
|
const isNotFound = query.isError && query.error?.code === "NICKNAME_NOT_FOUND";
|
|
21599
21707
|
const isWalletNotSetup = !!query.data && query.data.resolvedTarget === null;
|
|
21600
21708
|
const isFrozen = query.data?.isFrozen ?? false;
|
|
21601
|
-
const fingerprintVerification = (0,
|
|
21709
|
+
const fingerprintVerification = (0, import_react74.useMemo)(() => {
|
|
21602
21710
|
if (!query.data?.owner || !query.data?.fingerprint) {
|
|
21603
21711
|
return null;
|
|
21604
21712
|
}
|
|
@@ -21620,11 +21728,11 @@ function useNicknameResolve(input, options) {
|
|
|
21620
21728
|
resolvedAddress
|
|
21621
21729
|
};
|
|
21622
21730
|
}
|
|
21623
|
-
var import_react_query48,
|
|
21731
|
+
var import_react_query48, import_react74, DEBOUNCE_MS2;
|
|
21624
21732
|
var init_useNicknameResolve = __esm({
|
|
21625
21733
|
"src/hooks/useNicknameResolve.ts"() {
|
|
21626
21734
|
import_react_query48 = require("@tanstack/react-query");
|
|
21627
|
-
|
|
21735
|
+
import_react74 = require("react");
|
|
21628
21736
|
init_nickname();
|
|
21629
21737
|
init_profile();
|
|
21630
21738
|
init_nickname_validation();
|
|
@@ -21637,10 +21745,10 @@ var init_useNicknameResolve = __esm({
|
|
|
21637
21745
|
function useSendTransaction() {
|
|
21638
21746
|
const session = useSession((st) => st.session);
|
|
21639
21747
|
const address = useSession((st) => st.address);
|
|
21640
|
-
const [isLoading, setIsLoading] = (0,
|
|
21641
|
-
const [error, setError] = (0,
|
|
21642
|
-
const [userOpHash, setUserOpHash] = (0,
|
|
21643
|
-
const sendTransaction = (0,
|
|
21748
|
+
const [isLoading, setIsLoading] = (0, import_react75.useState)(false);
|
|
21749
|
+
const [error, setError] = (0, import_react75.useState)(null);
|
|
21750
|
+
const [userOpHash, setUserOpHash] = (0, import_react75.useState)(null);
|
|
21751
|
+
const sendTransaction = (0, import_react75.useCallback)(
|
|
21644
21752
|
async (params) => {
|
|
21645
21753
|
if (!session || !address) {
|
|
21646
21754
|
setError("No active session");
|
|
@@ -21737,7 +21845,7 @@ function useSendTransaction() {
|
|
|
21737
21845
|
},
|
|
21738
21846
|
[session, address]
|
|
21739
21847
|
);
|
|
21740
|
-
const reset = (0,
|
|
21848
|
+
const reset = (0, import_react75.useCallback)(() => {
|
|
21741
21849
|
setError(null);
|
|
21742
21850
|
setUserOpHash(null);
|
|
21743
21851
|
setIsLoading(false);
|
|
@@ -21750,10 +21858,10 @@ function useSendTransaction() {
|
|
|
21750
21858
|
reset
|
|
21751
21859
|
};
|
|
21752
21860
|
}
|
|
21753
|
-
var
|
|
21861
|
+
var import_react75, import_viem14, ERC20_TRANSFER_ABI, ERC721_SAFE_TRANSFER_ABI, ERC1155_SAFE_TRANSFER_ABI;
|
|
21754
21862
|
var init_useSendTransaction = __esm({
|
|
21755
21863
|
"src/hooks/useSendTransaction.ts"() {
|
|
21756
|
-
|
|
21864
|
+
import_react75 = require("react");
|
|
21757
21865
|
import_viem14 = require("viem");
|
|
21758
21866
|
init_SessionContext();
|
|
21759
21867
|
init_account2();
|
|
@@ -21904,7 +22012,7 @@ var init_AssetInputIcon = __esm({
|
|
|
21904
22012
|
|
|
21905
22013
|
// src/internal/components/SendMenu/send/components/NftDisplayCard.tsx
|
|
21906
22014
|
function NftDisplayCard({ asset }) {
|
|
21907
|
-
const [imageError, setImageError] = (0,
|
|
22015
|
+
const [imageError, setImageError] = (0, import_react76.useState)(false);
|
|
21908
22016
|
const nftImage = asset.image || asset.nftMetadata?.image;
|
|
21909
22017
|
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex items-center gap-3 p-3 rounded-[var(--ui-kit-el-bdrs)] bg-[var(--ui-kit-bg-secondary)]", children: [
|
|
21910
22018
|
nftImage && !imageError ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
@@ -21932,11 +22040,11 @@ function NftDisplayCard({ asset }) {
|
|
|
21932
22040
|
] })
|
|
21933
22041
|
] });
|
|
21934
22042
|
}
|
|
21935
|
-
var import_lucide_react65,
|
|
22043
|
+
var import_lucide_react65, import_react76, import_jsx_runtime104;
|
|
21936
22044
|
var init_NftDisplayCard = __esm({
|
|
21937
22045
|
"src/internal/components/SendMenu/send/components/NftDisplayCard.tsx"() {
|
|
21938
22046
|
import_lucide_react65 = require("lucide-react");
|
|
21939
|
-
|
|
22047
|
+
import_react76 = require("react");
|
|
21940
22048
|
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
21941
22049
|
}
|
|
21942
22050
|
});
|
|
@@ -22283,7 +22391,7 @@ function InputSendStep(props) {
|
|
|
22283
22391
|
Button,
|
|
22284
22392
|
{
|
|
22285
22393
|
disabled: isAssetsLoading,
|
|
22286
|
-
variant: "
|
|
22394
|
+
variant: "secondary",
|
|
22287
22395
|
size: "large",
|
|
22288
22396
|
onClick: () => setTxStep("select-asset"),
|
|
22289
22397
|
className: "justify-between",
|
|
@@ -22587,10 +22695,10 @@ function SendMenu() {
|
|
|
22587
22695
|
userOpHash,
|
|
22588
22696
|
reset
|
|
22589
22697
|
} = useSendTransaction();
|
|
22590
|
-
(0,
|
|
22698
|
+
(0, import_react77.useEffect)(() => {
|
|
22591
22699
|
useFlowSelectorStore.getState().setIsUiLocked(isAssetsLoading || isTransactionPending);
|
|
22592
22700
|
}, [isAssetsLoading, isTransactionPending]);
|
|
22593
|
-
(0,
|
|
22701
|
+
(0, import_react77.useEffect)(() => {
|
|
22594
22702
|
useFlowSelectorStore.getState().setError(sendTransactionError || null);
|
|
22595
22703
|
}, [sendTransactionError]);
|
|
22596
22704
|
const {
|
|
@@ -22605,7 +22713,7 @@ function SendMenu() {
|
|
|
22605
22713
|
} = useSendStore();
|
|
22606
22714
|
const isNft = isNftAsset3(selectedAsset);
|
|
22607
22715
|
const isSecurity = isSecurityToken2(selectedAsset);
|
|
22608
|
-
(0,
|
|
22716
|
+
(0, import_react77.useEffect)(
|
|
22609
22717
|
() => () => {
|
|
22610
22718
|
setSelectedAsset(null);
|
|
22611
22719
|
setRecipient("");
|
|
@@ -22615,7 +22723,7 @@ function SendMenu() {
|
|
|
22615
22723
|
},
|
|
22616
22724
|
[]
|
|
22617
22725
|
);
|
|
22618
|
-
(0,
|
|
22726
|
+
(0, import_react77.useEffect)(() => {
|
|
22619
22727
|
const shouldSetNativeAsset = assets.length > 0 && !selectedAsset;
|
|
22620
22728
|
if (!shouldSetNativeAsset) return;
|
|
22621
22729
|
const native = assets.find((a) => a.type === "native");
|
|
@@ -22626,7 +22734,7 @@ function SendMenu() {
|
|
|
22626
22734
|
const isNicknameInput = looksLikeNickname(recipient);
|
|
22627
22735
|
const resolvedNicknameData = useNicknameResolve(recipient, { enabled: isNicknameInput, chainId: activeChainId });
|
|
22628
22736
|
const effectiveAddress = isNicknameInput ? resolvedNicknameData?.resolvedAddress : recipient;
|
|
22629
|
-
const complianceAmount = (0,
|
|
22737
|
+
const complianceAmount = (0, import_react77.useMemo)(() => {
|
|
22630
22738
|
if (!isSecurity || !amount || !selectedAsset) return void 0;
|
|
22631
22739
|
try {
|
|
22632
22740
|
return (0, import_viem18.parseUnits)(amount, selectedAsset.decimals || 18);
|
|
@@ -22641,7 +22749,7 @@ function SendMenu() {
|
|
|
22641
22749
|
enabled: isSecurity && !!effectiveAddress && !!complianceAmount,
|
|
22642
22750
|
chainId: activeChainId
|
|
22643
22751
|
});
|
|
22644
|
-
(0,
|
|
22752
|
+
(0, import_react77.useEffect)(() => {
|
|
22645
22753
|
const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
|
|
22646
22754
|
switch (true) {
|
|
22647
22755
|
case txStep === "select-asset":
|
|
@@ -22705,7 +22813,7 @@ function SendMenu() {
|
|
|
22705
22813
|
] })
|
|
22706
22814
|
] });
|
|
22707
22815
|
}
|
|
22708
|
-
var import_lucide_react69,
|
|
22816
|
+
var import_lucide_react69, import_react77, import_viem18, import_jsx_runtime109;
|
|
22709
22817
|
var init_SendMenu = __esm({
|
|
22710
22818
|
"src/internal/components/SendMenu/send/SendMenu.tsx"() {
|
|
22711
22819
|
init_SessionContext();
|
|
@@ -22714,7 +22822,7 @@ var init_SendMenu = __esm({
|
|
|
22714
22822
|
init_useSendTransaction();
|
|
22715
22823
|
init_useT();
|
|
22716
22824
|
import_lucide_react69 = require("lucide-react");
|
|
22717
|
-
|
|
22825
|
+
import_react77 = require("react");
|
|
22718
22826
|
import_viem18 = require("viem");
|
|
22719
22827
|
init_useBlockscoutAssets();
|
|
22720
22828
|
init_useLayoutDataStore();
|
|
@@ -22758,7 +22866,7 @@ function SelectorFlowButtons() {
|
|
|
22758
22866
|
Button,
|
|
22759
22867
|
{
|
|
22760
22868
|
size: "medium",
|
|
22761
|
-
variant: selectorFlow === "send" ? "default" : "
|
|
22869
|
+
variant: selectorFlow === "send" ? "default" : "secondary",
|
|
22762
22870
|
className: "flex-1 uppercase",
|
|
22763
22871
|
onClick: () => {
|
|
22764
22872
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -22774,7 +22882,7 @@ function SelectorFlowButtons() {
|
|
|
22774
22882
|
Button,
|
|
22775
22883
|
{
|
|
22776
22884
|
size: "medium",
|
|
22777
|
-
variant: selectorFlow === "bridge" ? "default" : "
|
|
22885
|
+
variant: selectorFlow === "bridge" ? "default" : "secondary",
|
|
22778
22886
|
className: "flex-1 uppercase",
|
|
22779
22887
|
onClick: () => {
|
|
22780
22888
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -22799,7 +22907,7 @@ function SendFlowSelector() {
|
|
|
22799
22907
|
const error = useFlowSelectorStore((st) => st.error);
|
|
22800
22908
|
const menuTitle = useFlowSelectorStore((st) => st.menuTitle);
|
|
22801
22909
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
22802
|
-
(0,
|
|
22910
|
+
(0, import_react78.useEffect)(
|
|
22803
22911
|
() => () => {
|
|
22804
22912
|
useFlowSelectorStore.getState().setError(null);
|
|
22805
22913
|
},
|
|
@@ -22876,12 +22984,12 @@ function SendFlowSelector() {
|
|
|
22876
22984
|
}
|
|
22877
22985
|
);
|
|
22878
22986
|
}
|
|
22879
|
-
var import_lucide_react70,
|
|
22987
|
+
var import_lucide_react70, import_react78, import_jsx_runtime110, SELECTOR_FLOW;
|
|
22880
22988
|
var init_SendFlowSelector = __esm({
|
|
22881
22989
|
"src/internal/components/SendMenu/SendFlowSelector.tsx"() {
|
|
22882
22990
|
init_i18n();
|
|
22883
22991
|
import_lucide_react70 = require("lucide-react");
|
|
22884
|
-
|
|
22992
|
+
import_react78 = require("react");
|
|
22885
22993
|
init_useLayoutDataStore();
|
|
22886
22994
|
init_useLayoutStore();
|
|
22887
22995
|
init_utils2();
|
|
@@ -22936,12 +23044,12 @@ function getServerSnapshot() {
|
|
|
22936
23044
|
return false;
|
|
22937
23045
|
}
|
|
22938
23046
|
function useProMode() {
|
|
22939
|
-
return (0,
|
|
23047
|
+
return (0, import_react79.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
|
|
22940
23048
|
}
|
|
22941
|
-
var
|
|
23049
|
+
var import_react79, STORAGE_KEY, EVENT_NAME;
|
|
22942
23050
|
var init_pro_mode = __esm({
|
|
22943
23051
|
"src/internal/lib/pro-mode.ts"() {
|
|
22944
|
-
|
|
23052
|
+
import_react79 = require("react");
|
|
22945
23053
|
STORAGE_KEY = "embarkai_pro_mode";
|
|
22946
23054
|
EVENT_NAME = "embarkai-pro-mode-changed";
|
|
22947
23055
|
}
|
|
@@ -23001,7 +23109,7 @@ function useSettingsButtons() {
|
|
|
23001
23109
|
if (proMode) {
|
|
23002
23110
|
settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: import_lucide_react72.HardDrive });
|
|
23003
23111
|
}
|
|
23004
|
-
(0,
|
|
23112
|
+
(0, import_react80.useEffect)(() => {
|
|
23005
23113
|
const cssvEl = document.querySelector(".embarkai-ui-scope");
|
|
23006
23114
|
if (!cssvEl || !window?.getComputedStyle) {
|
|
23007
23115
|
return;
|
|
@@ -23065,7 +23173,7 @@ function SettingsMenu() {
|
|
|
23065
23173
|
}
|
|
23066
23174
|
);
|
|
23067
23175
|
}
|
|
23068
|
-
var import_react_query49, import_lucide_react72,
|
|
23176
|
+
var import_react_query49, import_lucide_react72, import_react80, import_jsx_runtime112;
|
|
23069
23177
|
var init_SettingsMenu = __esm({
|
|
23070
23178
|
"src/internal/components/SettingsMenu/SettingsMenu.tsx"() {
|
|
23071
23179
|
init_ProviderContext();
|
|
@@ -23073,7 +23181,7 @@ var init_SettingsMenu = __esm({
|
|
|
23073
23181
|
init_i18n();
|
|
23074
23182
|
import_react_query49 = require("@tanstack/react-query");
|
|
23075
23183
|
import_lucide_react72 = require("lucide-react");
|
|
23076
|
-
|
|
23184
|
+
import_react80 = require("react");
|
|
23077
23185
|
init_nickname();
|
|
23078
23186
|
init_profile();
|
|
23079
23187
|
init_useLayoutDataStore();
|
|
@@ -24015,7 +24123,7 @@ function TransactionsMenu() {
|
|
|
24015
24123
|
const { t } = useT();
|
|
24016
24124
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24017
24125
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
24018
|
-
const [expandedGroups, setExpandedGroups] = (0,
|
|
24126
|
+
const [expandedGroups, setExpandedGroups] = (0, import_react81.useState)({});
|
|
24019
24127
|
const historySupported = isTransactionHistorySupported(chainConfig?.id);
|
|
24020
24128
|
const {
|
|
24021
24129
|
data: txHistoryGroups = [],
|
|
@@ -24028,7 +24136,7 @@ function TransactionsMenu() {
|
|
|
24028
24136
|
queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address],
|
|
24029
24137
|
queryFn: () => getTransactionsListQuery({ address, chainConfig })
|
|
24030
24138
|
});
|
|
24031
|
-
const refreshTxHistory = (0,
|
|
24139
|
+
const refreshTxHistory = (0, import_react81.useCallback)(
|
|
24032
24140
|
() => qc.invalidateQueries({ queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address] }),
|
|
24033
24141
|
[qc, chainConfig.id, address]
|
|
24034
24142
|
);
|
|
@@ -24077,14 +24185,14 @@ function TransactionsMenu() {
|
|
|
24077
24185
|
}
|
|
24078
24186
|
);
|
|
24079
24187
|
}
|
|
24080
|
-
var import_react_query50, import_lucide_react75,
|
|
24188
|
+
var import_react_query50, import_lucide_react75, import_react81, import_jsx_runtime116;
|
|
24081
24189
|
var init_TransactionsMenu = __esm({
|
|
24082
24190
|
"src/internal/components/TransactionsMenu/TransactionsMenu.tsx"() {
|
|
24083
24191
|
init_SessionContext();
|
|
24084
24192
|
init_i18n();
|
|
24085
24193
|
import_react_query50 = require("@tanstack/react-query");
|
|
24086
24194
|
import_lucide_react75 = require("lucide-react");
|
|
24087
|
-
|
|
24195
|
+
import_react81 = require("react");
|
|
24088
24196
|
init_useLayoutDataStore();
|
|
24089
24197
|
init_useLayoutStore();
|
|
24090
24198
|
init_Expandable2();
|
|
@@ -24282,7 +24390,7 @@ function usePageMapper() {
|
|
|
24282
24390
|
setIsDialogOpen,
|
|
24283
24391
|
setIsDialogClosing
|
|
24284
24392
|
} = useLayoutStore();
|
|
24285
|
-
const closeDialog = (0,
|
|
24393
|
+
const closeDialog = (0, import_react82.useCallback)(() => {
|
|
24286
24394
|
setIsDialogClosing(true);
|
|
24287
24395
|
setTimeout(() => {
|
|
24288
24396
|
setDialogContent(null);
|
|
@@ -24293,7 +24401,7 @@ function usePageMapper() {
|
|
|
24293
24401
|
setIsDialogOpen(false);
|
|
24294
24402
|
}, CLEAR_DIALOG_TIMEOUT);
|
|
24295
24403
|
}, [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogForced, setIsDialogOpen, setIsDialogClosing]);
|
|
24296
|
-
const openDialog = (0,
|
|
24404
|
+
const openDialog = (0, import_react82.useCallback)(
|
|
24297
24405
|
(pageItem) => {
|
|
24298
24406
|
const PageContentComponent = pageItem.component;
|
|
24299
24407
|
setDialogTitle(pageItem.title);
|
|
@@ -24303,7 +24411,7 @@ function usePageMapper() {
|
|
|
24303
24411
|
},
|
|
24304
24412
|
[setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
|
|
24305
24413
|
);
|
|
24306
|
-
(0,
|
|
24414
|
+
(0, import_react82.useEffect)(() => {
|
|
24307
24415
|
if (page === null) return closeDialog();
|
|
24308
24416
|
const pageItem = PAGE_MAP[page];
|
|
24309
24417
|
if (!pageItem) {
|
|
@@ -24314,10 +24422,10 @@ function usePageMapper() {
|
|
|
24314
24422
|
openDialog(pageItem);
|
|
24315
24423
|
}, [page, closeDialog, openDialog]);
|
|
24316
24424
|
}
|
|
24317
|
-
var
|
|
24425
|
+
var import_react82, import_jsx_runtime117, CLEAR_DIALOG_TIMEOUT;
|
|
24318
24426
|
var init_usePageMapper = __esm({
|
|
24319
24427
|
"src/internal/hooks/usePageMapper.tsx"() {
|
|
24320
|
-
|
|
24428
|
+
import_react82 = require("react");
|
|
24321
24429
|
init_PageMap();
|
|
24322
24430
|
init_constants();
|
|
24323
24431
|
init_useLayoutDataStore();
|
|
@@ -24339,26 +24447,26 @@ function useSettingsNotifications() {
|
|
|
24339
24447
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24340
24448
|
queryFn: getUserProfile
|
|
24341
24449
|
});
|
|
24342
|
-
(0,
|
|
24450
|
+
(0, import_react83.useEffect)(() => {
|
|
24343
24451
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
24344
24452
|
setSettingsNotifications({
|
|
24345
24453
|
...COMPLETE_KYC_PROGRESS,
|
|
24346
24454
|
status: isKYCVerified ? "resolved" : "active"
|
|
24347
24455
|
});
|
|
24348
24456
|
}, [userProfile, setSettingsNotifications]);
|
|
24349
|
-
(0,
|
|
24457
|
+
(0, import_react83.useEffect)(() => {
|
|
24350
24458
|
setSettingsNotifications({
|
|
24351
24459
|
...EMAIL_NOT_CONNECTED_NOTIFICATION,
|
|
24352
24460
|
status: hasEmail ? "resolved" : "active"
|
|
24353
24461
|
});
|
|
24354
24462
|
}, [hasEmail, setSettingsNotifications]);
|
|
24355
24463
|
}
|
|
24356
|
-
var import_react_query51,
|
|
24464
|
+
var import_react_query51, import_react83, EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
|
|
24357
24465
|
var init_useSettingsNotifications = __esm({
|
|
24358
24466
|
"src/internal/hooks/useSettingsNotifications.ts"() {
|
|
24359
24467
|
init_SessionContext();
|
|
24360
24468
|
import_react_query51 = require("@tanstack/react-query");
|
|
24361
|
-
|
|
24469
|
+
import_react83 = require("react");
|
|
24362
24470
|
init_auth();
|
|
24363
24471
|
init_profile();
|
|
24364
24472
|
init_useLayoutDataStore();
|
|
@@ -24381,7 +24489,7 @@ var init_package = __esm({
|
|
|
24381
24489
|
"package.json"() {
|
|
24382
24490
|
package_default = {
|
|
24383
24491
|
name: "@embarkai/ui-kit",
|
|
24384
|
-
version: "0.4.
|
|
24492
|
+
version: "0.4.42",
|
|
24385
24493
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24386
24494
|
type: "module",
|
|
24387
24495
|
main: "./dist/index.cjs",
|
|
@@ -24608,11 +24716,11 @@ function Header() {
|
|
|
24608
24716
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
24609
24717
|
const { t } = useT();
|
|
24610
24718
|
const proMode = useProMode();
|
|
24611
|
-
const [proToast, setProToast] = (0,
|
|
24612
|
-
const [copied, setCopied] = (0,
|
|
24613
|
-
const clickCountRef = (0,
|
|
24614
|
-
const clickTimerRef = (0,
|
|
24615
|
-
const handleAvatarClick = (0,
|
|
24719
|
+
const [proToast, setProToast] = (0, import_react84.useState)(false);
|
|
24720
|
+
const [copied, setCopied] = (0, import_react84.useState)(false);
|
|
24721
|
+
const clickCountRef = (0, import_react84.useRef)(0);
|
|
24722
|
+
const clickTimerRef = (0, import_react84.useRef)(null);
|
|
24723
|
+
const handleAvatarClick = (0, import_react84.useCallback)(() => {
|
|
24616
24724
|
clickCountRef.current += 1;
|
|
24617
24725
|
if (clickTimerRef.current) {
|
|
24618
24726
|
clearTimeout(clickTimerRef.current);
|
|
@@ -24712,7 +24820,7 @@ function Header() {
|
|
|
24712
24820
|
}
|
|
24713
24821
|
);
|
|
24714
24822
|
}
|
|
24715
|
-
var import_react_query53, import_lucide_react77,
|
|
24823
|
+
var import_react_query53, import_lucide_react77, import_react84, import_jsx_runtime119;
|
|
24716
24824
|
var init_Header = __esm({
|
|
24717
24825
|
"src/internal/components/Header/Header.tsx"() {
|
|
24718
24826
|
init_LumiaIcon3();
|
|
@@ -24722,7 +24830,7 @@ var init_Header = __esm({
|
|
|
24722
24830
|
init_useT();
|
|
24723
24831
|
import_react_query53 = require("@tanstack/react-query");
|
|
24724
24832
|
import_lucide_react77 = require("lucide-react");
|
|
24725
|
-
|
|
24833
|
+
import_react84 = require("react");
|
|
24726
24834
|
init_PositiveIcon();
|
|
24727
24835
|
init_auth();
|
|
24728
24836
|
init_profile();
|
|
@@ -24750,26 +24858,26 @@ function useDecideContentStyles() {
|
|
|
24750
24858
|
return {
|
|
24751
24859
|
isClosing,
|
|
24752
24860
|
isMobileView,
|
|
24753
|
-
style: (0,
|
|
24861
|
+
style: (0, import_lodash_es10.merge)({}, mobileStyles)
|
|
24754
24862
|
};
|
|
24755
24863
|
}
|
|
24756
|
-
var DialogPrimitive,
|
|
24864
|
+
var DialogPrimitive, import_lodash_es10, import_lucide_react78, import_react85, import_jsx_runtime120, Dialog, DialogPortal, DialogOverlay, CONTENT_BG_SETUP, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription;
|
|
24757
24865
|
var init_dialog = __esm({
|
|
24758
24866
|
"src/internal/components/ui/dialog.tsx"() {
|
|
24759
24867
|
init_utils2();
|
|
24760
24868
|
init_SessionContext();
|
|
24761
24869
|
init_i18n();
|
|
24762
24870
|
DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
24763
|
-
|
|
24871
|
+
import_lodash_es10 = require("lodash-es");
|
|
24764
24872
|
import_lucide_react78 = require("lucide-react");
|
|
24765
|
-
|
|
24873
|
+
import_react85 = require("react");
|
|
24766
24874
|
init_useLayoutDataStore();
|
|
24767
24875
|
init_useLayoutStore();
|
|
24768
24876
|
init_button();
|
|
24769
24877
|
import_jsx_runtime120 = require("react/jsx-runtime");
|
|
24770
24878
|
Dialog = DialogPrimitive.Root;
|
|
24771
24879
|
DialogPortal = DialogPrimitive.Portal;
|
|
24772
|
-
DialogOverlay = (0,
|
|
24880
|
+
DialogOverlay = (0, import_react85.forwardRef)(
|
|
24773
24881
|
({ className, closing, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
24774
24882
|
DialogPrimitive.Overlay,
|
|
24775
24883
|
{
|
|
@@ -24791,7 +24899,7 @@ var init_dialog = __esm({
|
|
|
24791
24899
|
border: "1px solid var(--ui-kit-bd)",
|
|
24792
24900
|
boxShadow: "var(--ui-kit-shadow, 0px 4px 10px var(--ui-kit-shadow-c, rgba(0, 0, 0, 0.1)))"
|
|
24793
24901
|
};
|
|
24794
|
-
DialogContent = (0,
|
|
24902
|
+
DialogContent = (0, import_react85.forwardRef)(
|
|
24795
24903
|
({ className, children, colorMode, ...props }, ref) => {
|
|
24796
24904
|
const { t, i18n } = useT();
|
|
24797
24905
|
const isSessionLoading = useSession((st) => st.isLoading);
|
|
@@ -24894,7 +25002,7 @@ var init_dialog = __esm({
|
|
|
24894
25002
|
DialogHeader.displayName = "DialogHeader";
|
|
24895
25003
|
DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: cn2("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
24896
25004
|
DialogFooter.displayName = "DialogFooter";
|
|
24897
|
-
DialogTitle = (0,
|
|
25005
|
+
DialogTitle = (0, import_react85.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
24898
25006
|
DialogPrimitive.Title,
|
|
24899
25007
|
{
|
|
24900
25008
|
ref,
|
|
@@ -24903,7 +25011,7 @@ var init_dialog = __esm({
|
|
|
24903
25011
|
}
|
|
24904
25012
|
));
|
|
24905
25013
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
24906
|
-
DialogDescription = (0,
|
|
25014
|
+
DialogDescription = (0, import_react85.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(DialogPrimitive.Description, { ref, className: cn2("text-sm text-muted-foreground", className), ...props }));
|
|
24907
25015
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
24908
25016
|
}
|
|
24909
25017
|
});
|
|
@@ -24928,7 +25036,7 @@ function Dialog2() {
|
|
|
24928
25036
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
24929
25037
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24930
25038
|
const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
|
|
24931
|
-
(0,
|
|
25039
|
+
(0, import_react86.useEffect)(() => setIsSettings(!!session), [session, setIsSettings]);
|
|
24932
25040
|
usePageMapper();
|
|
24933
25041
|
useAutoConnect();
|
|
24934
25042
|
useBackupStatusChanges();
|
|
@@ -24966,13 +25074,13 @@ function Dialog2() {
|
|
|
24966
25074
|
}
|
|
24967
25075
|
);
|
|
24968
25076
|
}
|
|
24969
|
-
var import_framer_motion,
|
|
25077
|
+
var import_framer_motion, import_react86, import_jsx_runtime122;
|
|
24970
25078
|
var init_Dialog = __esm({
|
|
24971
25079
|
"src/internal/components/Dialog/Dialog.tsx"() {
|
|
24972
25080
|
init_ProviderContext();
|
|
24973
25081
|
init_SessionContext();
|
|
24974
25082
|
import_framer_motion = require("framer-motion");
|
|
24975
|
-
|
|
25083
|
+
import_react86 = require("react");
|
|
24976
25084
|
init_constants();
|
|
24977
25085
|
init_useAutoConnect();
|
|
24978
25086
|
init_useBackupStatusChanges();
|
|
@@ -24998,14 +25106,14 @@ var init_Dialog2 = __esm({
|
|
|
24998
25106
|
});
|
|
24999
25107
|
|
|
25000
25108
|
// src/internal/components/TssManager.tsx
|
|
25001
|
-
var
|
|
25109
|
+
var import_react87, TssManagerWithRef;
|
|
25002
25110
|
var init_TssManager = __esm({
|
|
25003
25111
|
"src/internal/components/TssManager.tsx"() {
|
|
25004
25112
|
init_SessionContext();
|
|
25005
|
-
|
|
25113
|
+
import_react87 = __toESM(require("react"), 1);
|
|
25006
25114
|
init_auth();
|
|
25007
25115
|
init_clients();
|
|
25008
|
-
TssManagerWithRef =
|
|
25116
|
+
TssManagerWithRef = import_react87.default.forwardRef((props, ref) => {
|
|
25009
25117
|
const { mpcPin } = props;
|
|
25010
25118
|
const usePaymaster = useSession((st) => st.usePaymaster);
|
|
25011
25119
|
const publicClient = useSession((st) => st.publicClient);
|
|
@@ -25013,14 +25121,14 @@ var init_TssManager = __esm({
|
|
|
25013
25121
|
const setStatus = useSession((st) => st.setStatus);
|
|
25014
25122
|
const setSession = useSession((st) => st.setSession);
|
|
25015
25123
|
const setAddress = useSession((st) => st.setAddress);
|
|
25016
|
-
const onSessionCreated = (0,
|
|
25124
|
+
const onSessionCreated = (0, import_react87.useCallback)(
|
|
25017
25125
|
(session, address) => {
|
|
25018
25126
|
setSession(session);
|
|
25019
25127
|
setAddress(address);
|
|
25020
25128
|
},
|
|
25021
25129
|
[setSession, setAddress]
|
|
25022
25130
|
);
|
|
25023
|
-
const createSessionWithKeyshare =
|
|
25131
|
+
const createSessionWithKeyshare = import_react87.default.useCallback(
|
|
25024
25132
|
async (userId, hasServerKeyshare, isNewUser) => {
|
|
25025
25133
|
setStatus("checking key management setup...");
|
|
25026
25134
|
await ensureKeyshare(userId, hasServerKeyshare, setStatus, isNewUser);
|
|
@@ -25045,7 +25153,7 @@ var init_TssManager = __esm({
|
|
|
25045
25153
|
},
|
|
25046
25154
|
[setStatus, usePaymaster, activeChainId, publicClient, mpcPin]
|
|
25047
25155
|
);
|
|
25048
|
-
|
|
25156
|
+
import_react87.default.useImperativeHandle(ref, () => ({ createSessionWithKeyshare }), [createSessionWithKeyshare]);
|
|
25049
25157
|
return null;
|
|
25050
25158
|
});
|
|
25051
25159
|
}
|
|
@@ -25073,7 +25181,7 @@ function WalletConnectHandler() {
|
|
|
25073
25181
|
const projectId = providerConfig?.projectId;
|
|
25074
25182
|
const setExternalWallet = useExternalWalletStore((st) => st.setExternalWallet);
|
|
25075
25183
|
const setPendingWalletLogin = useLayoutDataStore((st) => st.setPendingWalletLogin);
|
|
25076
|
-
const onLinkingComplete = (0,
|
|
25184
|
+
const onLinkingComplete = (0, import_react88.useCallback)(
|
|
25077
25185
|
async (success) => {
|
|
25078
25186
|
setIsWalletLinking(false);
|
|
25079
25187
|
if (!success && !passportWalletAddress) {
|
|
@@ -25102,10 +25210,10 @@ function WalletConnectHandler() {
|
|
|
25102
25210
|
},
|
|
25103
25211
|
[qc, passportWalletAddress, setProviderType, setPage, setIsWalletLinking]
|
|
25104
25212
|
);
|
|
25105
|
-
const [hasStartedLinking, setHasStartedLinking] =
|
|
25106
|
-
const [modalWasOpened, setModalWasOpened] =
|
|
25107
|
-
const [pendingModalOpen, setPendingModalOpen] =
|
|
25108
|
-
(0,
|
|
25213
|
+
const [hasStartedLinking, setHasStartedLinking] = import_react88.default.useState(false);
|
|
25214
|
+
const [modalWasOpened, setModalWasOpened] = import_react88.default.useState(false);
|
|
25215
|
+
const [pendingModalOpen, setPendingModalOpen] = import_react88.default.useState(false);
|
|
25216
|
+
(0, import_react88.useEffect)(() => {
|
|
25109
25217
|
if (isWalletLinking && !hasStartedLinking) {
|
|
25110
25218
|
console.log("[WalletConnectHandler] Starting wallet link flow:", {
|
|
25111
25219
|
isConnected,
|
|
@@ -25143,18 +25251,18 @@ function WalletConnectHandler() {
|
|
|
25143
25251
|
setProviderType,
|
|
25144
25252
|
walletMode
|
|
25145
25253
|
]);
|
|
25146
|
-
(0,
|
|
25254
|
+
(0, import_react88.useEffect)(() => {
|
|
25147
25255
|
if (pendingModalOpen && !isConnected && openConnectModal) {
|
|
25148
25256
|
setPendingModalOpen(false);
|
|
25149
25257
|
openConnectModal();
|
|
25150
25258
|
}
|
|
25151
25259
|
}, [pendingModalOpen, isConnected, openConnectModal]);
|
|
25152
|
-
(0,
|
|
25260
|
+
(0, import_react88.useEffect)(() => {
|
|
25153
25261
|
if (connectModalOpen && hasStartedLinking) {
|
|
25154
25262
|
setModalWasOpened(true);
|
|
25155
25263
|
}
|
|
25156
25264
|
}, [connectModalOpen, hasStartedLinking]);
|
|
25157
|
-
(0,
|
|
25265
|
+
(0, import_react88.useEffect)(() => {
|
|
25158
25266
|
if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
|
|
25159
25267
|
console.log("[WalletConnectHandler] Modal closed without connecting");
|
|
25160
25268
|
onLinkingComplete(false);
|
|
@@ -25162,7 +25270,7 @@ function WalletConnectHandler() {
|
|
|
25162
25270
|
setModalWasOpened(false);
|
|
25163
25271
|
}
|
|
25164
25272
|
}, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
|
|
25165
|
-
(0,
|
|
25273
|
+
(0, import_react88.useEffect)(() => {
|
|
25166
25274
|
if (isWalletLinking) {
|
|
25167
25275
|
const timeout = setTimeout(() => {
|
|
25168
25276
|
console.warn("[WalletConnectHandler] Wallet linking timed out, resetting state");
|
|
@@ -25282,7 +25390,7 @@ function WalletConnectHandler() {
|
|
|
25282
25390
|
setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
|
|
25283
25391
|
}
|
|
25284
25392
|
});
|
|
25285
|
-
(0,
|
|
25393
|
+
(0, import_react88.useEffect)(() => {
|
|
25286
25394
|
if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking && modalWasOpened && !pendingModalOpen) {
|
|
25287
25395
|
console.log("[WalletConnectHandler] handleWalletSign triggered");
|
|
25288
25396
|
if (!passportWalletAddress) {
|
|
@@ -25292,7 +25400,7 @@ function WalletConnectHandler() {
|
|
|
25292
25400
|
handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
|
|
25293
25401
|
}
|
|
25294
25402
|
}, [chain, isConnected, walletAddress, isWalletLinking, hasStartedLinking, modalWasOpened, pendingModalOpen]);
|
|
25295
|
-
(0,
|
|
25403
|
+
(0, import_react88.useEffect)(() => {
|
|
25296
25404
|
if (isConnected && !chain?.id && isWalletLinking && hasStartedLinking && !connectModalOpen && !isWalletSigning) {
|
|
25297
25405
|
const timeout = setTimeout(() => {
|
|
25298
25406
|
console.warn("[WalletConnectHandler] Wallet connected but chain info missing, resetting");
|
|
@@ -25314,7 +25422,7 @@ function WalletConnectHandler() {
|
|
|
25314
25422
|
]);
|
|
25315
25423
|
return null;
|
|
25316
25424
|
}
|
|
25317
|
-
var import_rainbowkit2, import_react_query54,
|
|
25425
|
+
var import_rainbowkit2, import_react_query54, import_react88, import_wagmi6;
|
|
25318
25426
|
var init_WalletConnectHandler = __esm({
|
|
25319
25427
|
"src/internal/components/WalletConnectHandler.tsx"() {
|
|
25320
25428
|
init_ProviderContext();
|
|
@@ -25322,7 +25430,7 @@ var init_WalletConnectHandler = __esm({
|
|
|
25322
25430
|
init_linkedProfiles();
|
|
25323
25431
|
import_rainbowkit2 = require("@rainbow-me/rainbowkit");
|
|
25324
25432
|
import_react_query54 = require("@tanstack/react-query");
|
|
25325
|
-
|
|
25433
|
+
import_react88 = __toESM(require("react"), 1);
|
|
25326
25434
|
import_wagmi6 = require("wagmi");
|
|
25327
25435
|
init_wallet();
|
|
25328
25436
|
init_AuthMenu2();
|
|
@@ -25343,13 +25451,13 @@ function DirectWalletHandler() {
|
|
|
25343
25451
|
const setExternalChainId = useExternalWalletStore((st) => st.setExternalChainId);
|
|
25344
25452
|
const setConfigMode = useExternalWalletStore((st) => st.setConfigMode);
|
|
25345
25453
|
const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
|
|
25346
|
-
(0,
|
|
25454
|
+
(0, import_react89.useEffect)(() => {
|
|
25347
25455
|
setConfigMode(walletMode);
|
|
25348
25456
|
if (walletMode !== "both") {
|
|
25349
25457
|
setActiveMode(walletMode);
|
|
25350
25458
|
}
|
|
25351
25459
|
}, [walletMode, setConfigMode, setActiveMode]);
|
|
25352
|
-
(0,
|
|
25460
|
+
(0, import_react89.useEffect)(() => {
|
|
25353
25461
|
if (isConnected && address && !isExternalConnected && connector && chain?.id) {
|
|
25354
25462
|
setExternalWallet({
|
|
25355
25463
|
address,
|
|
@@ -25358,17 +25466,17 @@ function DirectWalletHandler() {
|
|
|
25358
25466
|
});
|
|
25359
25467
|
}
|
|
25360
25468
|
}, [isConnected, address, isExternalConnected, connector, chain?.id, setExternalWallet]);
|
|
25361
|
-
(0,
|
|
25469
|
+
(0, import_react89.useEffect)(() => {
|
|
25362
25470
|
if (isExternalConnected && !isConnected) {
|
|
25363
25471
|
clearExternalWallet();
|
|
25364
25472
|
}
|
|
25365
25473
|
}, [isConnected, isExternalConnected, clearExternalWallet]);
|
|
25366
|
-
(0,
|
|
25474
|
+
(0, import_react89.useEffect)(() => {
|
|
25367
25475
|
if (isExternalConnected && isConnected && chain?.id) {
|
|
25368
25476
|
setExternalChainId(chain.id);
|
|
25369
25477
|
}
|
|
25370
25478
|
}, [chain?.id, isConnected, isExternalConnected, setExternalChainId]);
|
|
25371
|
-
(0,
|
|
25479
|
+
(0, import_react89.useEffect)(() => {
|
|
25372
25480
|
if (isExternalConnected && isConnected && address && address !== externalAddress && connector && chain?.id) {
|
|
25373
25481
|
setExternalWallet({
|
|
25374
25482
|
address,
|
|
@@ -25379,10 +25487,10 @@ function DirectWalletHandler() {
|
|
|
25379
25487
|
}, [address, isConnected, isExternalConnected, externalAddress, chain?.id, connector, setExternalWallet]);
|
|
25380
25488
|
return null;
|
|
25381
25489
|
}
|
|
25382
|
-
var
|
|
25490
|
+
var import_react89, import_wagmi7;
|
|
25383
25491
|
var init_DirectWalletHandler = __esm({
|
|
25384
25492
|
"src/internal/components/DirectWalletHandler.tsx"() {
|
|
25385
|
-
|
|
25493
|
+
import_react89 = require("react");
|
|
25386
25494
|
import_wagmi7 = require("wagmi");
|
|
25387
25495
|
init_ProviderContext();
|
|
25388
25496
|
init_useExternalWalletStore();
|
|
@@ -25407,7 +25515,7 @@ function waitForStoreHydration() {
|
|
|
25407
25515
|
}
|
|
25408
25516
|
function SessionProvider({ children }) {
|
|
25409
25517
|
const config = useProviderConfig().config;
|
|
25410
|
-
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
25518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_react90.Fragment, { children: [
|
|
25411
25519
|
children,
|
|
25412
25520
|
config.current?.wallet?.enabled && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(WalletConnectHandler, {}),
|
|
25413
25521
|
config.current?.wallet?.enabled && (config.current?.wallet?.mode === "direct" || config.current?.wallet?.mode === "both") && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DirectWalletHandler, {}),
|
|
@@ -25422,11 +25530,11 @@ function SessionProvider({ children }) {
|
|
|
25422
25530
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Dialog2, {})
|
|
25423
25531
|
] });
|
|
25424
25532
|
}
|
|
25425
|
-
var import_read18,
|
|
25533
|
+
var import_read18, import_react90, import_zustand14, import_middleware4, import_jsx_runtime123, useSession, requireActiveChainId;
|
|
25426
25534
|
var init_SessionContext = __esm({
|
|
25427
25535
|
"src/context/SessionContext.tsx"() {
|
|
25428
25536
|
import_read18 = require("@embarkai/core/read");
|
|
25429
|
-
|
|
25537
|
+
import_react90 = require("react");
|
|
25430
25538
|
import_zustand14 = require("zustand");
|
|
25431
25539
|
import_middleware4 = require("zustand/middleware");
|
|
25432
25540
|
init_BalanceFeedProvider2();
|
|
@@ -28095,7 +28203,7 @@ var init_rainbowkit = __esm({
|
|
|
28095
28203
|
function RainbowKitProvider({ children }) {
|
|
28096
28204
|
const config = useProviderConfig().config;
|
|
28097
28205
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
28098
|
-
const rainbowConfig = (0,
|
|
28206
|
+
const rainbowConfig = (0, import_react91.useMemo)(
|
|
28099
28207
|
() => createRainbowConfig({
|
|
28100
28208
|
projectId: config.current?.wallet?.walletConnectProjectId,
|
|
28101
28209
|
allowedWallets: config.current?.wallet?.allowedWallets,
|
|
@@ -28109,7 +28217,7 @@ function RainbowKitProvider({ children }) {
|
|
|
28109
28217
|
config.current?.wallet?.walletConnectProjectId
|
|
28110
28218
|
]
|
|
28111
28219
|
);
|
|
28112
|
-
const customTheme = (0,
|
|
28220
|
+
const customTheme = (0, import_react91.useMemo)(() => {
|
|
28113
28221
|
if (!config.current?.wallet?.enabled) return {};
|
|
28114
28222
|
return colorMode === "dark" ? {
|
|
28115
28223
|
...(0, import_rainbowkit4.darkTheme)(),
|
|
@@ -28126,11 +28234,11 @@ function RainbowKitProvider({ children }) {
|
|
|
28126
28234
|
if (!config.current?.wallet?.enabled) return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children });
|
|
28127
28235
|
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_wagmi9.WagmiProvider, { config: rainbowConfig, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_rainbowkit4.RainbowKitProvider, { theme: customTheme, modalSize: "compact", showRecentTransactions: true, children }) });
|
|
28128
28236
|
}
|
|
28129
|
-
var import_rainbowkit4,
|
|
28237
|
+
var import_rainbowkit4, import_react91, import_wagmi9, import_styles, import_jsx_runtime124;
|
|
28130
28238
|
var init_RainbowKitContext = __esm({
|
|
28131
28239
|
"src/context/RainbowKitContext.tsx"() {
|
|
28132
28240
|
import_rainbowkit4 = require("@rainbow-me/rainbowkit");
|
|
28133
|
-
|
|
28241
|
+
import_react91 = require("react");
|
|
28134
28242
|
import_wagmi9 = require("wagmi");
|
|
28135
28243
|
init_rainbowkit();
|
|
28136
28244
|
init_useLayoutStore();
|
|
@@ -28186,10 +28294,10 @@ function clearLegacyWagmiStorage() {
|
|
|
28186
28294
|
}
|
|
28187
28295
|
function Provider(props) {
|
|
28188
28296
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
28189
|
-
const callbacksRef = (0,
|
|
28190
|
-
(0,
|
|
28191
|
-
const config = (0,
|
|
28192
|
-
const updateConfig = (0,
|
|
28297
|
+
const callbacksRef = (0, import_react92.useRef)(callbacks);
|
|
28298
|
+
(0, import_react92.useEffect)(() => notifyNoProjetctId(projectId), [projectId]);
|
|
28299
|
+
const config = (0, import_react92.useRef)((0, import_lodash_es11.merge)({}, DEFAULT_PROVIDER_CONFIG, { projectId }, initialConfig));
|
|
28300
|
+
const updateConfig = (0, import_react92.useCallback)((updates) => {
|
|
28193
28301
|
const prev = config.current;
|
|
28194
28302
|
const next = { ...prev };
|
|
28195
28303
|
if (updates.projectId !== void 0) next.projectId = updates.projectId;
|
|
@@ -28223,14 +28331,14 @@ function Provider(props) {
|
|
|
28223
28331
|
if (updates.translations) next.translations = { ...next.translations, ...updates.translations };
|
|
28224
28332
|
config.current = next;
|
|
28225
28333
|
}, []);
|
|
28226
|
-
const updateCallbacks = (0,
|
|
28334
|
+
const updateCallbacks = (0, import_react92.useCallback)((updates) => {
|
|
28227
28335
|
const prev = callbacksRef.current;
|
|
28228
28336
|
const next = updates ? { ...prev, ...updates } : void 0;
|
|
28229
28337
|
callbacksRef.current = next;
|
|
28230
28338
|
}, []);
|
|
28231
|
-
(0,
|
|
28339
|
+
(0, import_react92.useEffect)(() => {
|
|
28232
28340
|
if (typeof window === "undefined" || !projectId) return;
|
|
28233
|
-
const mergedConfig = (0,
|
|
28341
|
+
const mergedConfig = (0, import_lodash_es11.merge)(DEFAULT_PROVIDER_CONFIG, initialConfig);
|
|
28234
28342
|
updateConfig(mergedConfig);
|
|
28235
28343
|
if (mergedConfig.wallet?.enabled) {
|
|
28236
28344
|
clearLegacyWagmiStorage();
|
|
@@ -28248,7 +28356,7 @@ function Provider(props) {
|
|
|
28248
28356
|
useSession.getState().setActiveChainId(mergedConfig.network.chainId);
|
|
28249
28357
|
}
|
|
28250
28358
|
}, [projectId, initialConfig]);
|
|
28251
|
-
(0,
|
|
28359
|
+
(0, import_react92.useEffect)(() => {
|
|
28252
28360
|
if (typeof window === "undefined" || !projectId) return;
|
|
28253
28361
|
try {
|
|
28254
28362
|
(0, import_error_tracking4.initSdkErrorTracking)();
|
|
@@ -28277,7 +28385,7 @@ function Provider(props) {
|
|
|
28277
28385
|
console.error("[PROVIDER] Error setting up iframe manager:", error);
|
|
28278
28386
|
}
|
|
28279
28387
|
}, [projectId]);
|
|
28280
|
-
const contextValue = (0,
|
|
28388
|
+
const contextValue = (0, import_react92.useMemo)(
|
|
28281
28389
|
() => ({
|
|
28282
28390
|
config,
|
|
28283
28391
|
updateConfig,
|
|
@@ -28292,12 +28400,12 @@ function Provider(props) {
|
|
|
28292
28400
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(UIContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SessionProvider, { children }) }) }) });
|
|
28293
28401
|
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ErrorBoundary, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(WagmiProvider2, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(UIContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(SessionProvider, { children }) }) }) });
|
|
28294
28402
|
}
|
|
28295
|
-
var import_error_tracking4,
|
|
28403
|
+
var import_error_tracking4, import_lodash_es11, import_react92, import_jsx_runtime126, UIContext, useProviderConfig;
|
|
28296
28404
|
var init_ProviderContext = __esm({
|
|
28297
28405
|
"src/context/ProviderContext.tsx"() {
|
|
28298
28406
|
import_error_tracking4 = require("@embarkai/core/internal/error-tracking");
|
|
28299
|
-
|
|
28300
|
-
|
|
28407
|
+
import_lodash_es11 = require("lodash-es");
|
|
28408
|
+
import_react92 = require("react");
|
|
28301
28409
|
init_ErrorBoundary2();
|
|
28302
28410
|
init_initial();
|
|
28303
28411
|
init_iframe_manager();
|
|
@@ -28306,9 +28414,9 @@ var init_ProviderContext = __esm({
|
|
|
28306
28414
|
init_utils11();
|
|
28307
28415
|
init_WagmiContext();
|
|
28308
28416
|
import_jsx_runtime126 = require("react/jsx-runtime");
|
|
28309
|
-
UIContext = (0,
|
|
28417
|
+
UIContext = (0, import_react92.createContext)(void 0);
|
|
28310
28418
|
useProviderConfig = () => {
|
|
28311
|
-
const ctx = (0,
|
|
28419
|
+
const ctx = (0, import_react92.useContext)(UIContext);
|
|
28312
28420
|
if (!ctx) throw new Error("useProviderConfig must be used within a Provider");
|
|
28313
28421
|
return ctx;
|
|
28314
28422
|
};
|
|
@@ -28365,7 +28473,7 @@ __export(index_exports, {
|
|
|
28365
28473
|
useActiveChainId: () => useActiveChainId,
|
|
28366
28474
|
useAddress: () => useAddress,
|
|
28367
28475
|
useAssets: () => useAssets,
|
|
28368
|
-
useBalance: () =>
|
|
28476
|
+
useBalance: () => useBalance,
|
|
28369
28477
|
useBlockscoutAssets: () => useBlockscoutAssets,
|
|
28370
28478
|
useColorMode: () => useColorMode,
|
|
28371
28479
|
useConnectedApps: () => useConnectedApps,
|
|
@@ -28404,7 +28512,7 @@ __export(index_exports, {
|
|
|
28404
28512
|
module.exports = __toCommonJS(index_exports);
|
|
28405
28513
|
|
|
28406
28514
|
// src/styles/built.css
|
|
28407
|
-
var built_default = `.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.embarkai-ui-scope .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.embarkai-ui-scope .pointer-events-none{pointer-events:none}.embarkai-ui-scope .pointer-events-auto{pointer-events:auto}.embarkai-ui-scope .visible{visibility:visible}.embarkai-ui-scope .invisible{visibility:hidden}.embarkai-ui-scope .static{position:static}.embarkai-ui-scope .fixed{position:fixed}.embarkai-ui-scope .absolute{position:absolute}.embarkai-ui-scope .relative{position:relative}.embarkai-ui-scope .sticky{position:sticky}.embarkai-ui-scope .inset-0{inset:0}.embarkai-ui-scope .-right-0\\.5{right:-.125rem}.embarkai-ui-scope .-right-1{right:-.25rem}.embarkai-ui-scope .-right-2{right:-.5rem}.embarkai-ui-scope .-top-0\\.5{top:-.125rem}.embarkai-ui-scope .-top-1{top:-.25rem}.embarkai-ui-scope .-top-2{top:-.5rem}.embarkai-ui-scope .bottom-0{bottom:0}.embarkai-ui-scope .bottom-full{bottom:100%}.embarkai-ui-scope .left-0{left:0}.embarkai-ui-scope .left-1\\/2{left:50%}.embarkai-ui-scope .left-4{left:1rem}.embarkai-ui-scope .right-0{right:0}.embarkai-ui-scope .right-3{right:.75rem}.embarkai-ui-scope .right-4{right:1rem}.embarkai-ui-scope .right-\\[var\\(--ui-kit-pd\\)\\]{right:var(--ui-kit-pd)}.embarkai-ui-scope .right-full{right:100%}.embarkai-ui-scope .top-0{top:0}.embarkai-ui-scope .top-1\\/2{top:50%}.embarkai-ui-scope .top-4{top:1rem}.embarkai-ui-scope .top-\\[var\\(--ui-kit-pd\\)\\]{top:var(--ui-kit-pd)}.embarkai-ui-scope .z-10{z-index:10}.embarkai-ui-scope .z-50{z-index:50}.embarkai-ui-scope .z-\\[9998\\]{z-index:9998}.embarkai-ui-scope .z-\\[9999\\]{z-index:9999}.embarkai-ui-scope .-m-px{margin:-1px}.embarkai-ui-scope .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.embarkai-ui-scope .mx-auto{margin-left:auto;margin-right:auto}.embarkai-ui-scope .my-1{margin-top:.25rem;margin-bottom:.25rem}.embarkai-ui-scope .mb-1{margin-bottom:.25rem}.embarkai-ui-scope .mb-2{margin-bottom:.5rem}.embarkai-ui-scope .mb-3{margin-bottom:.75rem}.embarkai-ui-scope .mb-4{margin-bottom:1rem}.embarkai-ui-scope .ml-1{margin-left:.25rem}.embarkai-ui-scope .ml-2{margin-left:.5rem}.embarkai-ui-scope .ml-auto{margin-left:auto}.embarkai-ui-scope .mr-1{margin-right:.25rem}.embarkai-ui-scope .mt-0\\.5{margin-top:.125rem}.embarkai-ui-scope .mt-1{margin-top:.25rem}.embarkai-ui-scope .mt-2{margin-top:.5rem}.embarkai-ui-scope .mt-4{margin-top:1rem}.embarkai-ui-scope .block{display:block}.embarkai-ui-scope .inline-block{display:inline-block}.embarkai-ui-scope .inline{display:inline}.embarkai-ui-scope .flex{display:flex}.embarkai-ui-scope .inline-flex{display:inline-flex}.embarkai-ui-scope .table{display:table}.embarkai-ui-scope .grid{display:grid}.embarkai-ui-scope .hidden{display:none}.embarkai-ui-scope .aspect-square{aspect-ratio:1/1}.embarkai-ui-scope .size-4{width:1rem;height:1rem}.embarkai-ui-scope .size-8{width:2rem;height:2rem}.embarkai-ui-scope .size-auto{width:auto;height:auto}.embarkai-ui-scope .h-0{height:0}.embarkai-ui-scope .h-1{height:.25rem}.embarkai-ui-scope .h-10{height:2.5rem}.embarkai-ui-scope .h-12{height:3rem}.embarkai-ui-scope .h-16{height:4rem}.embarkai-ui-scope .h-2{height:.5rem}.embarkai-ui-scope .h-3{height:.75rem}.embarkai-ui-scope .h-3\\.5{height:.875rem}.embarkai-ui-scope .h-4{height:1rem}.embarkai-ui-scope .h-48{height:12rem}.embarkai-ui-scope .h-5{height:1.25rem}.embarkai-ui-scope .h-6{height:1.5rem}.embarkai-ui-scope .h-7{height:1.75rem}.embarkai-ui-scope .h-8{height:2rem}.embarkai-ui-scope .h-\\[100dvh\\]{height:100dvh}.embarkai-ui-scope .h-\\[48px\\]{height:48px}.embarkai-ui-scope .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.embarkai-ui-scope .h-auto{height:auto}.embarkai-ui-scope .h-fit{height:-moz-fit-content;height:fit-content}.embarkai-ui-scope .h-full{height:100%}.embarkai-ui-scope .h-px{height:1px}.embarkai-ui-scope .max-h-64{max-height:16rem}.embarkai-ui-scope .max-h-96{max-height:24rem}.embarkai-ui-scope .max-h-\\[95dvh\\]{max-height:95dvh}.embarkai-ui-scope .min-h-10{min-height:2.5rem}.embarkai-ui-scope .w-1{width:.25rem}.embarkai-ui-scope .w-1\\/2{width:50%}.embarkai-ui-scope .w-10{width:2.5rem}.embarkai-ui-scope .w-12{width:3rem}.embarkai-ui-scope .w-16{width:4rem}.embarkai-ui-scope .w-2{width:.5rem}.embarkai-ui-scope .w-3{width:.75rem}.embarkai-ui-scope .w-3\\.5{width:.875rem}.embarkai-ui-scope .w-4{width:1rem}.embarkai-ui-scope .w-48{width:12rem}.embarkai-ui-scope .w-5{width:1.25rem}.embarkai-ui-scope .w-6{width:1.5rem}.embarkai-ui-scope .w-7{width:1.75rem}.embarkai-ui-scope .w-72{width:18rem}.embarkai-ui-scope .w-8{width:2rem}.embarkai-ui-scope .w-\\[100dvw\\]{width:100dvw}.embarkai-ui-scope .w-\\[40px\\]{width:40px}.embarkai-ui-scope .w-\\[var\\(--ui-kit-maw\\)\\]{width:var(--ui-kit-maw)}.embarkai-ui-scope .w-fit{width:-moz-fit-content;width:fit-content}.embarkai-ui-scope .w-full{width:100%}.embarkai-ui-scope .w-px{width:1px}.embarkai-ui-scope .min-w-0{min-width:0}.embarkai-ui-scope .min-w-10{min-width:2.5rem}.embarkai-ui-scope .min-w-16{min-width:4rem}.embarkai-ui-scope .min-w-\\[256px\\]{min-width:256px}.embarkai-ui-scope .min-w-\\[8rem\\]{min-width:8rem}.embarkai-ui-scope .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.embarkai-ui-scope .max-w-\\[100px\\]{max-width:100px}.embarkai-ui-scope .max-w-\\[144px\\]{max-width:144px}.embarkai-ui-scope .max-w-\\[150px\\]{max-width:150px}.embarkai-ui-scope .max-w-\\[160px\\]{max-width:160px}.embarkai-ui-scope .max-w-\\[256px\\]{max-width:256px}.embarkai-ui-scope .max-w-\\[680px\\]{max-width:680px}.embarkai-ui-scope .max-w-\\[80px\\]{max-width:80px}.embarkai-ui-scope .max-w-\\[calc\\(50\\%-8px\\)\\]{max-width:calc(50% - 8px)}.embarkai-ui-scope .max-w-full{max-width:100%}.embarkai-ui-scope .max-w-sm{max-width:24rem}.embarkai-ui-scope .flex-1{flex:1 1 0%}.embarkai-ui-scope .flex-none{flex:none}.embarkai-ui-scope .flex-shrink-0,.embarkai-ui-scope .shrink-0{flex-shrink:0}.embarkai-ui-scope .-translate-x-1\\/2{--tw-translate-x:-50%}.embarkai-ui-scope .-translate-x-1\\/2,.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{--tw-translate-x:calc(var(--ui-kit-gap)*-1)}.embarkai-ui-scope .-translate-y-1\\/2{--tw-translate-y:-50%}.embarkai-ui-scope .-translate-y-1\\/2,.embarkai-ui-scope .-translate-y-1\\/3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-y-1\\/3{--tw-translate-y:-33.333333%}.embarkai-ui-scope .rotate-180{--tw-rotate:180deg}.embarkai-ui-scope .rotate-180,.embarkai-ui-scope .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes glow-warning{0%,to{transform:scale(1);box-shadow:0 0 16px var(--ui-kit-bg-warning)}50%{transform:scale(.97);box-shadow:0 0 4px var(--ui-kit-bg-warning)}}.embarkai-ui-scope .animate-glow-warning{animation:glow-warning 2s ease infinite}@keyframes pulse{50%{opacity:.5}}.embarkai-ui-scope .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.embarkai-ui-scope .animate-spin{animation:spin 1s linear infinite}.embarkai-ui-scope .cursor-default{cursor:default}.embarkai-ui-scope .cursor-help{cursor:help}.embarkai-ui-scope .cursor-not-allowed{cursor:not-allowed}.embarkai-ui-scope .cursor-pointer{cursor:pointer}.embarkai-ui-scope .cursor-text{cursor:text}.embarkai-ui-scope .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.embarkai-ui-scope .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.embarkai-ui-scope .scroll-my-1{scroll-margin-top:.25rem;scroll-margin-bottom:.25rem}.embarkai-ui-scope .list-inside{list-style-position:inside}.embarkai-ui-scope .list-disc{list-style-type:disc}.embarkai-ui-scope .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.embarkai-ui-scope .flex-col{flex-direction:column}.embarkai-ui-scope .flex-col-reverse{flex-direction:column-reverse}.embarkai-ui-scope .flex-wrap{flex-wrap:wrap}.embarkai-ui-scope .place-content-center{place-content:center}.embarkai-ui-scope .items-start{align-items:flex-start}.embarkai-ui-scope .items-end{align-items:flex-end}.embarkai-ui-scope .items-center{align-items:center}.embarkai-ui-scope .justify-start{justify-content:flex-start}.embarkai-ui-scope .justify-end{justify-content:flex-end}.embarkai-ui-scope .justify-center{justify-content:center}.embarkai-ui-scope .justify-between{justify-content:space-between}.embarkai-ui-scope .gap-0{gap:0}.embarkai-ui-scope .gap-1{gap:.25rem}.embarkai-ui-scope .gap-1\\.5{gap:.375rem}.embarkai-ui-scope .gap-2{gap:.5rem}.embarkai-ui-scope .gap-3{gap:.75rem}.embarkai-ui-scope .gap-4{gap:1rem}.embarkai-ui-scope .gap-\\[10px\\]{gap:10px}.embarkai-ui-scope .gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-y-0\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.embarkai-ui-scope .overflow-hidden{overflow:hidden}.embarkai-ui-scope .overflow-y-auto{overflow-y:auto}.embarkai-ui-scope .overflow-x-hidden{overflow-x:hidden}.embarkai-ui-scope .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.embarkai-ui-scope .text-ellipsis{text-overflow:ellipsis}.embarkai-ui-scope .whitespace-nowrap{white-space:nowrap}.embarkai-ui-scope .whitespace-pre-line{white-space:pre-line}.embarkai-ui-scope .whitespace-pre-wrap{white-space:pre-wrap}.embarkai-ui-scope .break-normal{overflow-wrap:normal;word-break:normal}.embarkai-ui-scope .break-words{overflow-wrap:break-word}.embarkai-ui-scope .break-all{word-break:break-all}.embarkai-ui-scope .rounded{border-radius:.25rem}.embarkai-ui-scope .rounded-\\[10px\\]{border-radius:10px}.embarkai-ui-scope .rounded-\\[8px\\]{border-radius:8px}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-bdrs\\)\\]{border-radius:var(--ui-kit-bdrs)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .rounded-full{border-radius:9999px}.embarkai-ui-scope .rounded-lg{border-radius:.5rem}.embarkai-ui-scope .rounded-md{border-radius:.375rem}.embarkai-ui-scope .rounded-xl{border-radius:.75rem}.embarkai-ui-scope .border{border-width:1px}.embarkai-ui-scope .border-0{border-width:0}.embarkai-ui-scope .border-2{border-width:2px}.embarkai-ui-scope .border-b{border-bottom-width:1px}.embarkai-ui-scope .border-t{border-top-width:1px}.embarkai-ui-scope .border-dashed{border-style:dashed}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bd\\)\\]{border-color:var(--ui-kit-bd)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-error\\)\\]{border-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-success\\)\\]{border-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-warning\\)\\]{border-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-error\\)\\]{border-color:var(--ui-kit-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-secondary\\)\\]{border-color:var(--ui-kit-secondary)}.embarkai-ui-scope .border-current{border-color:currentColor}.embarkai-ui-scope .border-transparent{border-color:transparent}.embarkai-ui-scope .border-t-transparent{border-top-color:transparent}.embarkai-ui-scope .bg-\\[\\#002c15\\]{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#081f2c\\]{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f0f6f8\\]{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f3ba2f\\]{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-accent\\)\\]{background-color:var(--ui-kit-accent)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg\\)\\]{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-error\\)\\]{background-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-info\\)\\]{background-color:var(--ui-kit-bg-info)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-secondary\\)\\]{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-success\\)\\]{background-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-warning\\)\\]{background-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-fg\\)\\]{background-color:var(--ui-kit-fg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-overlay\\)\\]{background-color:var(--ui-kit-overlay)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-primary\\)\\]{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary\\)\\]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary-h\\)\\]{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-transparent{background-color:transparent}.embarkai-ui-scope .fill-\\[var\\(--ui-kit-bg-warning\\)\\]{fill:var(--ui-kit-bg-warning)}.embarkai-ui-scope .object-contain{-o-object-fit:contain;object-fit:contain}.embarkai-ui-scope .object-cover{-o-object-fit:cover;object-fit:cover}.embarkai-ui-scope .p-0{padding:0}.embarkai-ui-scope .p-1{padding:.25rem}.embarkai-ui-scope .p-2{padding:.5rem}.embarkai-ui-scope .p-3{padding:.75rem}.embarkai-ui-scope .p-4{padding:1rem}.embarkai-ui-scope .p-5{padding:1.25rem}.embarkai-ui-scope .p-6{padding:1.5rem}.embarkai-ui-scope .p-8{padding:2rem}.embarkai-ui-scope .p-\\[2px\\]{padding:2px}.embarkai-ui-scope .p-\\[var\\(--ui-kit-gap\\)\\]{padding:var(--ui-kit-gap)}.embarkai-ui-scope .p-\\[var\\(--ui-kit-pd\\)\\]{padding:var(--ui-kit-pd)}.embarkai-ui-scope .px-0{padding-left:0;padding-right:0}.embarkai-ui-scope .px-1{padding-left:.25rem;padding-right:.25rem}.embarkai-ui-scope .px-2{padding-left:.5rem;padding-right:.5rem}.embarkai-ui-scope .px-3{padding-left:.75rem;padding-right:.75rem}.embarkai-ui-scope .px-4{padding-left:1rem;padding-right:1rem}.embarkai-ui-scope .px-5{padding-left:1.25rem;padding-right:1.25rem}.embarkai-ui-scope .px-8{padding-left:2rem;padding-right:2rem}.embarkai-ui-scope .px-\\[var\\(--ui-kit-gap\\)\\]{padding-left:var(--ui-kit-gap);padding-right:var(--ui-kit-gap)}.embarkai-ui-scope .px-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .py-0{padding-top:0;padding-bottom:0}.embarkai-ui-scope .py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.embarkai-ui-scope .py-2{padding-top:.5rem;padding-bottom:.5rem}.embarkai-ui-scope .py-3{padding-top:.75rem;padding-bottom:.75rem}.embarkai-ui-scope .py-4{padding-top:1rem;padding-bottom:1rem}.embarkai-ui-scope .py-8{padding-top:2rem;padding-bottom:2rem}.embarkai-ui-scope .py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.embarkai-ui-scope .py-\\[var\\(--ui-kit-gap\\)\\]{padding-top:var(--ui-kit-gap);padding-bottom:var(--ui-kit-gap)}.embarkai-ui-scope .py-\\[var\\(--ui-kit-pd\\)\\]{padding-top:var(--ui-kit-pd);padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pb-2{padding-bottom:.5rem}.embarkai-ui-scope .pb-5{padding-bottom:1.25rem}.embarkai-ui-scope .pb-6{padding-bottom:1.5rem}.embarkai-ui-scope .pb-\\[var\\(--ui-kit-pd\\)\\]{padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pl-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd)}.embarkai-ui-scope .pr-8{padding-right:2rem}.embarkai-ui-scope .pt-3{padding-top:.75rem}.embarkai-ui-scope .pt-4{padding-top:1rem}.embarkai-ui-scope .pt-5{padding-top:1.25rem}.embarkai-ui-scope .text-left{text-align:left}.embarkai-ui-scope .text-center{text-align:center}.embarkai-ui-scope .text-right{text-align:right}.embarkai-ui-scope .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.embarkai-ui-scope .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.embarkai-ui-scope .text-2xl{font-size:1.5rem;line-height:2rem}.embarkai-ui-scope .text-\\[10px\\]{font-size:10px}.embarkai-ui-scope .text-\\[14px\\]{font-size:14px}.embarkai-ui-scope .text-\\[16px\\]{font-size:16px}.embarkai-ui-scope .text-\\[8px\\]{font-size:8px}.embarkai-ui-scope .text-lg{font-size:1.125rem;line-height:1.75rem}.embarkai-ui-scope .text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .text-xl{font-size:1.25rem;line-height:1.75rem}.embarkai-ui-scope .text-xs{font-size:.75rem;line-height:1rem}.embarkai-ui-scope .font-bold{font-weight:700}.embarkai-ui-scope .font-medium{font-weight:500}.embarkai-ui-scope .font-normal{font-weight:400}.embarkai-ui-scope .font-semibold{font-weight:600}.embarkai-ui-scope .uppercase{text-transform:uppercase}.embarkai-ui-scope .lowercase{text-transform:lowercase}.embarkai-ui-scope .leading-3{line-height:.75rem}.embarkai-ui-scope .leading-4{line-height:1rem}.embarkai-ui-scope .leading-5{line-height:1.25rem}.embarkai-ui-scope .leading-6{line-height:1.5rem}.embarkai-ui-scope .leading-8{line-height:2rem}.embarkai-ui-scope .leading-\\[8px\\]{line-height:8px}.embarkai-ui-scope .leading-none{line-height:1}.embarkai-ui-scope .leading-tight{line-height:1.25}.embarkai-ui-scope .tracking-\\[0\\.3em\\]{letter-spacing:.3em}.embarkai-ui-scope .tracking-tight{letter-spacing:-.025em}.embarkai-ui-scope .tracking-wider{letter-spacing:.05em}.embarkai-ui-scope .text-\\[\\#c3f53c\\]{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-error\\)\\]{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-success\\)\\]{color:var(--ui-kit-bg-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-warning\\)\\]{color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-error\\)\\]{color:var(--ui-kit-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg\\)\\]{color:var(--ui-kit-fg)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-inverted\\)\\]{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-muted\\)\\]{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-info\\)\\]{color:var(--ui-kit-info)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-primary\\)\\]{color:var(--ui-kit-primary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-success\\)\\]{color:var(--ui-kit-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-text-secondary\\)\\]{color:var(--ui-kit-text-secondary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-warning\\)\\]{color:var(--ui-kit-warning)}.embarkai-ui-scope .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.embarkai-ui-scope .underline{text-decoration-line:underline}.embarkai-ui-scope .underline-offset-2{text-underline-offset:2px}.embarkai-ui-scope .underline-offset-4{text-underline-offset:4px}.embarkai-ui-scope .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope .opacity-0{opacity:0}.embarkai-ui-scope .opacity-100{opacity:1}.embarkai-ui-scope .opacity-50{opacity:.5}.embarkai-ui-scope .opacity-60{opacity:.6}.embarkai-ui-scope .opacity-70{opacity:.7}.embarkai-ui-scope .opacity-90{opacity:.9}.embarkai-ui-scope .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.embarkai-ui-scope .shadow,.embarkai-ui-scope .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.embarkai-ui-scope .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.embarkai-ui-scope .outline-none{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .outline{outline-style:solid}.embarkai-ui-scope .blur{--tw-blur:blur(8px)}.embarkai-ui-scope .blur,.embarkai-ui-scope .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .grayscale{--tw-grayscale:grayscale(100%)}.embarkai-ui-scope .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-\\[color\\2c box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-none{transition-property:none}.embarkai-ui-scope .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .duration-200{transition-duration:.2s}.embarkai-ui-scope .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.embarkai-ui-scope{--ui-kit-ff:var(--embark-ui-ff,-apple-system,BlinkMacSystemFont,"Inter",system-ui,sans-serif);--ui-kit-maw:var(--embark-ui-maw,384px);--ui-kit-pd:var(--embark-ui-pd,12px);--ui-kit-gap:var(--embark-ui-gap,10px);--ui-kit-bdrs:var(--embark-ui-bdrs,20px);--ui-kit-el-bdrs:var(--embark-ui-element-bdrs,10px);--ui-kit-backdrop-blur:var(--embark-ui-backdrop-blur,10px)}.embarkai-ui-scope[data-current-theme-mode=light]{--ui-kit-overlay:var(--embark-ui-overlay,hsla(0,0%,100%,.8));--ui-kit-bg:var(--embark-ui-bg,#fff);--ui-kit-fg:var(--embark-ui-fg,#000);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#fff);--ui-kit-fg-muted:var(--embark-ui-fg-muted,rgba(0,0,0,.6));--ui-kit-primary:var(--embark-ui-primary,#000);--ui-kit-primary-h:var(--embark-ui-primary-h,rgba(0,0,0,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,rgba(0,0,0,.6));--ui-kit-secondary:var(--embark-ui-secondary,#e4e4e4);--ui-kit-secondary-h:var(--embark-ui-secondary-h,hsla(0,0%,89%,.8));--ui-kit-secondary-a:var(--embark-ui-secondary-a,hsla(0,0%,89%,.6));--ui-kit-bd:var(--embark-ui-bd,#ebebeb);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#a9a9a9);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope[data-current-theme-mode=dark]{--ui-kit-overlay:var(--embark-ui-overlay,rgba(0,0,0,.8));--ui-kit-bg:var(--embark-ui-bg,#1a1a1a);--ui-kit-fg:var(--embark-ui-fg,#fff);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#000);--ui-kit-fg-muted:var(--embark-ui-fg-muted,hsla(0,0%,100%,.6));--ui-kit-primary:var(--embark-ui-primary,#fff);--ui-kit-primary-h:var(--embark-ui-primary-h,hsla(0,0%,100%,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,hsla(0,0%,100%,.6));--ui-kit-secondary:var(--embark-ui-secondary,#2a2a2a);--ui-kit-secondary-h:var(--embark-ui-secondary-h,rgba(42,42,42,.6));--ui-kit-secondary-a:var(--embark-ui-secondary-a,rgba(42,42,42,.4));--ui-kit-bd:var(--embark-ui-bd,#3a3a3a);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#4a4a4a);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope,.embarkai-ui-scope *{margin:0;box-sizing:border-box;font-family:var(--ui-kit-ff);font-optical-sizing:auto;-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:transparent;-ms-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope button,.embarkai-ui-scope h1,.embarkai-ui-scope h2,.embarkai-ui-scope h3,.embarkai-ui-scope h4,.embarkai-ui-scope h5,.embarkai-ui-scope h6,.embarkai-ui-scope input,.embarkai-ui-scope p,.embarkai-ui-scope select,.embarkai-ui-scope textarea{font-family:var(--ui-kit-ff)!important;margin:0}.embarkai-ui-scope button,.embarkai-ui-scope input,.embarkai-ui-scope select,.embarkai-ui-scope textarea{border-style:solid;outline:none!important;appearance:none!important;-webkit-appearance:none;-moz-appearance:none}.embarkai-ui-scope input,.embarkai-ui-scope textarea{font-size:16px!important}.embarkai-ui-scope .account-connect-button{box-shadow:0 4px 20px var(--ui-kit-shadow-c),inset 0 0 0 1px var(--ui-kit-bd);transition:transform .25s ease}.embarkai-ui-scope .account-connect-button:hover{transform:scale(1.02)}.embarkai-ui-scope .account-connect-button:active{transform:scale(1)}@keyframes lumia-mobile-dialog-fade-in{0%{opacity:0;transform:translateY(64px)}to{opacity:1;transform:translateY(0)}}@keyframes lumia-mobile-dialog-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(64px)}}.embarkai-ui-scope .animate-mobile-dialog-in{animation:lumia-mobile-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-mobile-dialog-out{animation:lumia-mobile-dialog-fade-out 375ms ease}@keyframes lumia-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes lumia-dialog-fade-out{0%{opacity:1}to{opacity:0}}.embarkai-ui-scope .animate-dialog-in{animation:lumia-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-dialog-out{animation:lumia-dialog-fade-out 375ms ease}.embarkai-ui-scope .list-scrollbar-y{width:100%;padding-right:var(--ui-kit-list-scrollbar-pd-r,0);overflow-y:auto;overflow-x:hidden;max-height:var(--ui-kit-scrollbar-mah,300px)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar{width:4px;height:4px}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-thumb{cursor:pointer;width:4px;border-radius:2px;background-color:var(--ui-kit-bd)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-track{margin-top:10px;margin-bottom:10px;background-color:transparent}.embarkai-ui-scope .noScrollbars::-webkit-scrollbar{display:none}.embarkai-ui-scope div[data-radix-popper-content-wrapper]{z-index:10000!important}.embarkai-ui-scope .file\\:mr-\\[var\\(--ui-kit-gap\\)\\]::file-selector-button{margin-right:var(--ui-kit-gap)}.embarkai-ui-scope .file\\:h-12::file-selector-button{height:3rem}.embarkai-ui-scope .file\\:cursor-pointer::file-selector-button{cursor:pointer}.embarkai-ui-scope .file\\:rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]::file-selector-button{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .file\\:border-0::file-selector-button{border-width:0}.embarkai-ui-scope .file\\:bg-\\[var\\(--ui-kit-primary\\)\\]::file-selector-button{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .file\\:bg-transparent::file-selector-button{background-color:transparent}.embarkai-ui-scope .file\\:px-\\[var\\(--ui-kit-pd\\)\\]::file-selector-button{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .file\\:text-\\[16px\\]::file-selector-button{font-size:16px}.embarkai-ui-scope .file\\:text-base::file-selector-button{font-size:1rem;line-height:1.5rem}.embarkai-ui-scope .file\\:font-medium::file-selector-button{font-weight:500}.embarkai-ui-scope .file\\:text-\\[var\\(--ui-kit-fg-inverted\\)\\]::file-selector-button{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::-moz-placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .focus-within\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus-within{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .hover\\:bg-\\[\\#002c15\\]:hover{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#081f2c\\]:hover{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f0f6f8\\]:hover{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f3ba2f\\]:hover{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg-secondary\\)\\]:hover{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary-h\\)\\]:hover{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[\\#c3f53c\\]:hover{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[var\\(--ui-kit-fg\\)\\]:hover{color:var(--ui-kit-fg)}.embarkai-ui-scope .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:underline:hover{text-decoration-line:underline}.embarkai-ui-scope .hover\\:opacity-100:hover{opacity:1}.embarkai-ui-scope .hover\\:opacity-80:hover{opacity:.8}.embarkai-ui-scope .hover\\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .file\\:hover\\:opacity-90:hover::file-selector-button{opacity:.9}.embarkai-ui-scope .focus\\:border-\\[var\\(--ui-kit-primary\\)\\]:focus{border-color:var(--ui-kit-primary)}.embarkai-ui-scope .focus\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus\\:bg-transparent:focus{background-color:transparent}.embarkai-ui-scope .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-\\[2px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-transparent:focus-visible{--tw-ring-color:transparent}.embarkai-ui-scope .focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.embarkai-ui-scope .active\\:bg-\\[\\#f3ba2f\\]:active{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:active{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .active\\:text-\\[\\#c3f53c\\]:active{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .active\\:opacity-60:active{opacity:.6}.embarkai-ui-scope .file\\:active\\:opacity-80:active::file-selector-button{opacity:.8}.embarkai-ui-scope .disabled\\:cursor-default:disabled{cursor:default}.embarkai-ui-scope .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.embarkai-ui-scope .disabled\\:opacity-50:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover:disabled{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .disabled\\:hover\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:hover:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:hover\\:opacity-50:hover:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:active\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:active:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:active\\:opacity-50:active:disabled{opacity:.5}.embarkai-ui-scope :is(.group:hover .group-hover\\:opacity-100){opacity:1}.embarkai-ui-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.embarkai-ui-scope .data-\\[size\\=default\\]\\:h-12[data-size=default]{height:3rem}.embarkai-ui-scope .data-\\[size\\=sm\\]\\:h-10[data-size=sm]{height:2.5rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:border-\\[var\\(--ui-kit-bd-intense\\)\\][data-state=checked]{border-color:var(--ui-kit-bd-intense)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:bg-\\[var\\(--ui-kit-secondary\\)\\][data-state=checked]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:text-\\[var\\(--ui-kit-fg\\)\\][data-state=checked]{color:var(--ui-kit-fg)}.embarkai-ui-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*){overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*){display:flex}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*){align-items:center}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-\\[var\\(--ui-kit-gap\\)\\][data-slot=select-value]>*){gap:var(--ui-kit-gap)}@media (min-width:640px){.embarkai-ui-scope .sm\\:flex-row{flex-direction:row}.embarkai-ui-scope .sm\\:justify-end{justify-content:flex-end}.embarkai-ui-scope :is(.sm\\:space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope .sm\\:text-left{text-align:left}}@media (min-width:768px){.embarkai-ui-scope .md\\:h-8{height:2rem}.embarkai-ui-scope .md\\:w-8{width:2rem}.embarkai-ui-scope .md\\:gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope .md\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .md\\:text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .md\\:text-xs{font-size:.75rem;line-height:1rem}}.embarkai-ui-scope :is(.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-])){width:1rem;height:1rem}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:pointer-events-none svg){pointer-events:none}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:shrink-0 svg){flex-shrink:0}`;
|
|
28515
|
+
var built_default = `.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.embarkai-ui-scope .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.embarkai-ui-scope .pointer-events-none{pointer-events:none}.embarkai-ui-scope .pointer-events-auto{pointer-events:auto}.embarkai-ui-scope .visible{visibility:visible}.embarkai-ui-scope .invisible{visibility:hidden}.embarkai-ui-scope .static{position:static}.embarkai-ui-scope .fixed{position:fixed}.embarkai-ui-scope .absolute{position:absolute}.embarkai-ui-scope .relative{position:relative}.embarkai-ui-scope .sticky{position:sticky}.embarkai-ui-scope .inset-0{inset:0}.embarkai-ui-scope .-right-0\\.5{right:-.125rem}.embarkai-ui-scope .-right-1{right:-.25rem}.embarkai-ui-scope .-right-2{right:-.5rem}.embarkai-ui-scope .-top-0\\.5{top:-.125rem}.embarkai-ui-scope .-top-1{top:-.25rem}.embarkai-ui-scope .-top-2{top:-.5rem}.embarkai-ui-scope .bottom-0{bottom:0}.embarkai-ui-scope .bottom-full{bottom:100%}.embarkai-ui-scope .left-0{left:0}.embarkai-ui-scope .left-1\\/2{left:50%}.embarkai-ui-scope .left-4{left:1rem}.embarkai-ui-scope .right-0{right:0}.embarkai-ui-scope .right-3{right:.75rem}.embarkai-ui-scope .right-4{right:1rem}.embarkai-ui-scope .right-\\[var\\(--ui-kit-pd\\)\\]{right:var(--ui-kit-pd)}.embarkai-ui-scope .right-full{right:100%}.embarkai-ui-scope .top-0{top:0}.embarkai-ui-scope .top-1\\/2{top:50%}.embarkai-ui-scope .top-4{top:1rem}.embarkai-ui-scope .top-\\[var\\(--ui-kit-pd\\)\\]{top:var(--ui-kit-pd)}.embarkai-ui-scope .z-10{z-index:10}.embarkai-ui-scope .z-50{z-index:50}.embarkai-ui-scope .z-\\[9998\\]{z-index:9998}.embarkai-ui-scope .z-\\[9999\\]{z-index:9999}.embarkai-ui-scope .-m-px{margin:-1px}.embarkai-ui-scope .-mx-1{margin-left:-.25rem;margin-right:-.25rem}.embarkai-ui-scope .mx-auto{margin-left:auto;margin-right:auto}.embarkai-ui-scope .my-1{margin-top:.25rem;margin-bottom:.25rem}.embarkai-ui-scope .mb-1{margin-bottom:.25rem}.embarkai-ui-scope .mb-2{margin-bottom:.5rem}.embarkai-ui-scope .mb-3{margin-bottom:.75rem}.embarkai-ui-scope .mb-4{margin-bottom:1rem}.embarkai-ui-scope .ml-1{margin-left:.25rem}.embarkai-ui-scope .ml-2{margin-left:.5rem}.embarkai-ui-scope .ml-auto{margin-left:auto}.embarkai-ui-scope .mr-1{margin-right:.25rem}.embarkai-ui-scope .mt-0\\.5{margin-top:.125rem}.embarkai-ui-scope .mt-1{margin-top:.25rem}.embarkai-ui-scope .mt-2{margin-top:.5rem}.embarkai-ui-scope .mt-4{margin-top:1rem}.embarkai-ui-scope .block{display:block}.embarkai-ui-scope .inline-block{display:inline-block}.embarkai-ui-scope .inline{display:inline}.embarkai-ui-scope .flex{display:flex}.embarkai-ui-scope .inline-flex{display:inline-flex}.embarkai-ui-scope .table{display:table}.embarkai-ui-scope .grid{display:grid}.embarkai-ui-scope .hidden{display:none}.embarkai-ui-scope .aspect-square{aspect-ratio:1/1}.embarkai-ui-scope .size-4{width:1rem;height:1rem}.embarkai-ui-scope .size-8{width:2rem;height:2rem}.embarkai-ui-scope .size-auto{width:auto;height:auto}.embarkai-ui-scope .h-0{height:0}.embarkai-ui-scope .h-1{height:.25rem}.embarkai-ui-scope .h-10{height:2.5rem}.embarkai-ui-scope .h-12{height:3rem}.embarkai-ui-scope .h-16{height:4rem}.embarkai-ui-scope .h-2{height:.5rem}.embarkai-ui-scope .h-3{height:.75rem}.embarkai-ui-scope .h-3\\.5{height:.875rem}.embarkai-ui-scope .h-4{height:1rem}.embarkai-ui-scope .h-48{height:12rem}.embarkai-ui-scope .h-5{height:1.25rem}.embarkai-ui-scope .h-6{height:1.5rem}.embarkai-ui-scope .h-7{height:1.75rem}.embarkai-ui-scope .h-8{height:2rem}.embarkai-ui-scope .h-\\[100dvh\\]{height:100dvh}.embarkai-ui-scope .h-\\[48px\\]{height:48px}.embarkai-ui-scope .h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.embarkai-ui-scope .h-auto{height:auto}.embarkai-ui-scope .h-fit{height:-moz-fit-content;height:fit-content}.embarkai-ui-scope .h-full{height:100%}.embarkai-ui-scope .h-px{height:1px}.embarkai-ui-scope .max-h-64{max-height:16rem}.embarkai-ui-scope .max-h-96{max-height:24rem}.embarkai-ui-scope .max-h-\\[95dvh\\]{max-height:95dvh}.embarkai-ui-scope .min-h-10{min-height:2.5rem}.embarkai-ui-scope .w-1{width:.25rem}.embarkai-ui-scope .w-1\\/2{width:50%}.embarkai-ui-scope .w-10{width:2.5rem}.embarkai-ui-scope .w-12{width:3rem}.embarkai-ui-scope .w-16{width:4rem}.embarkai-ui-scope .w-2{width:.5rem}.embarkai-ui-scope .w-3{width:.75rem}.embarkai-ui-scope .w-3\\.5{width:.875rem}.embarkai-ui-scope .w-4{width:1rem}.embarkai-ui-scope .w-48{width:12rem}.embarkai-ui-scope .w-5{width:1.25rem}.embarkai-ui-scope .w-6{width:1.5rem}.embarkai-ui-scope .w-7{width:1.75rem}.embarkai-ui-scope .w-72{width:18rem}.embarkai-ui-scope .w-8{width:2rem}.embarkai-ui-scope .w-\\[100dvw\\]{width:100dvw}.embarkai-ui-scope .w-\\[40px\\]{width:40px}.embarkai-ui-scope .w-\\[var\\(--ui-kit-maw\\)\\]{width:var(--ui-kit-maw)}.embarkai-ui-scope .w-fit{width:-moz-fit-content;width:fit-content}.embarkai-ui-scope .w-full{width:100%}.embarkai-ui-scope .w-px{width:1px}.embarkai-ui-scope .min-w-0{min-width:0}.embarkai-ui-scope .min-w-10{min-width:2.5rem}.embarkai-ui-scope .min-w-16{min-width:4rem}.embarkai-ui-scope .min-w-\\[256px\\]{min-width:256px}.embarkai-ui-scope .min-w-\\[8rem\\]{min-width:8rem}.embarkai-ui-scope .min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.embarkai-ui-scope .max-w-\\[100px\\]{max-width:100px}.embarkai-ui-scope .max-w-\\[144px\\]{max-width:144px}.embarkai-ui-scope .max-w-\\[150px\\]{max-width:150px}.embarkai-ui-scope .max-w-\\[160px\\]{max-width:160px}.embarkai-ui-scope .max-w-\\[256px\\]{max-width:256px}.embarkai-ui-scope .max-w-\\[680px\\]{max-width:680px}.embarkai-ui-scope .max-w-\\[80px\\]{max-width:80px}.embarkai-ui-scope .max-w-\\[calc\\(50\\%-8px\\)\\]{max-width:calc(50% - 8px)}.embarkai-ui-scope .max-w-full{max-width:100%}.embarkai-ui-scope .max-w-sm{max-width:24rem}.embarkai-ui-scope .flex-1{flex:1 1 0%}.embarkai-ui-scope .flex-none{flex:none}.embarkai-ui-scope .flex-shrink-0,.embarkai-ui-scope .shrink-0{flex-shrink:0}.embarkai-ui-scope .-translate-x-1\\/2{--tw-translate-x:-50%}.embarkai-ui-scope .-translate-x-1\\/2,.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-x-\\[var\\(--ui-kit-gap\\)\\]{--tw-translate-x:calc(var(--ui-kit-gap)*-1)}.embarkai-ui-scope .-translate-y-1\\/2{--tw-translate-y:-50%}.embarkai-ui-scope .-translate-y-1\\/2,.embarkai-ui-scope .-translate-y-1\\/3{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .-translate-y-1\\/3{--tw-translate-y:-33.333333%}.embarkai-ui-scope .rotate-180{--tw-rotate:180deg}.embarkai-ui-scope .rotate-180,.embarkai-ui-scope .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes glow-warning{0%,to{transform:scale(1);box-shadow:0 0 16px var(--ui-kit-bg-warning)}50%{transform:scale(.97);box-shadow:0 0 4px var(--ui-kit-bg-warning)}}.embarkai-ui-scope .animate-glow-warning{animation:glow-warning 2s ease infinite}@keyframes pulse{50%{opacity:.5}}.embarkai-ui-scope .animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.embarkai-ui-scope .animate-spin{animation:spin 1s linear infinite}.embarkai-ui-scope .cursor-default{cursor:default}.embarkai-ui-scope .cursor-help{cursor:help}.embarkai-ui-scope .cursor-not-allowed{cursor:not-allowed}.embarkai-ui-scope .cursor-pointer{cursor:pointer}.embarkai-ui-scope .cursor-text{cursor:text}.embarkai-ui-scope .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.embarkai-ui-scope .select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.embarkai-ui-scope .scroll-my-1{scroll-margin-top:.25rem;scroll-margin-bottom:.25rem}.embarkai-ui-scope .list-inside{list-style-position:inside}.embarkai-ui-scope .list-disc{list-style-type:disc}.embarkai-ui-scope .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-10{grid-template-columns:repeat(10,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.embarkai-ui-scope .grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.embarkai-ui-scope .flex-col{flex-direction:column}.embarkai-ui-scope .flex-col-reverse{flex-direction:column-reverse}.embarkai-ui-scope .flex-wrap{flex-wrap:wrap}.embarkai-ui-scope .place-content-center{place-content:center}.embarkai-ui-scope .items-start{align-items:flex-start}.embarkai-ui-scope .items-end{align-items:flex-end}.embarkai-ui-scope .items-center{align-items:center}.embarkai-ui-scope .justify-start{justify-content:flex-start}.embarkai-ui-scope .justify-end{justify-content:flex-end}.embarkai-ui-scope .justify-center{justify-content:center}.embarkai-ui-scope .justify-between{justify-content:space-between}.embarkai-ui-scope .gap-0{gap:0}.embarkai-ui-scope .gap-1{gap:.25rem}.embarkai-ui-scope .gap-1\\.5{gap:.375rem}.embarkai-ui-scope .gap-2{gap:.5rem}.embarkai-ui-scope .gap-3{gap:.75rem}.embarkai-ui-scope .gap-4{gap:1rem}.embarkai-ui-scope .gap-\\[10px\\]{gap:10px}.embarkai-ui-scope .gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope :is(.space-x-1>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope :is(.space-y-0\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.embarkai-ui-scope :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.embarkai-ui-scope .overflow-hidden{overflow:hidden}.embarkai-ui-scope .overflow-y-auto{overflow-y:auto}.embarkai-ui-scope .overflow-x-hidden{overflow-x:hidden}.embarkai-ui-scope .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.embarkai-ui-scope .text-ellipsis{text-overflow:ellipsis}.embarkai-ui-scope .whitespace-nowrap{white-space:nowrap}.embarkai-ui-scope .whitespace-pre-line{white-space:pre-line}.embarkai-ui-scope .whitespace-pre-wrap{white-space:pre-wrap}.embarkai-ui-scope .break-normal{overflow-wrap:normal;word-break:normal}.embarkai-ui-scope .break-words{overflow-wrap:break-word}.embarkai-ui-scope .break-all{word-break:break-all}.embarkai-ui-scope .rounded{border-radius:.25rem}.embarkai-ui-scope .rounded-\\[10px\\]{border-radius:10px}.embarkai-ui-scope .rounded-\\[8px\\]{border-radius:8px}.embarkai-ui-scope .rounded-\\[calc\\(var\\(--ui-kit-el-bdrs\\)_\\/_2\\)\\]{border-radius:calc(var(--ui-kit-el-bdrs)/2)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-bdrs\\)\\]{border-radius:var(--ui-kit-bdrs)}.embarkai-ui-scope .rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .rounded-full{border-radius:9999px}.embarkai-ui-scope .rounded-lg{border-radius:.5rem}.embarkai-ui-scope .rounded-md{border-radius:.375rem}.embarkai-ui-scope .rounded-xl{border-radius:.75rem}.embarkai-ui-scope .border{border-width:1px}.embarkai-ui-scope .border-0{border-width:0}.embarkai-ui-scope .border-2{border-width:2px}.embarkai-ui-scope .border-b{border-bottom-width:1px}.embarkai-ui-scope .border-t{border-top-width:1px}.embarkai-ui-scope .border-dashed{border-style:dashed}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bd\\)\\]{border-color:var(--ui-kit-bd)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-error\\)\\]{border-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-success\\)\\]{border-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-bg-warning\\)\\]{border-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-error\\)\\]{border-color:var(--ui-kit-error)}.embarkai-ui-scope .border-\\[var\\(--ui-kit-secondary\\)\\]{border-color:var(--ui-kit-secondary)}.embarkai-ui-scope .border-current{border-color:currentColor}.embarkai-ui-scope .border-transparent{border-color:transparent}.embarkai-ui-scope .border-t-transparent{border-top-color:transparent}.embarkai-ui-scope .bg-\\[\\#002c15\\]{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#081f2c\\]{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f0f6f8\\]{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[\\#f3ba2f\\]{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-accent\\)\\]{background-color:var(--ui-kit-accent)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg\\)\\]{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-error\\)\\]{background-color:var(--ui-kit-bg-error)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-info\\)\\]{background-color:var(--ui-kit-bg-info)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-secondary\\)\\]{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-success\\)\\]{background-color:var(--ui-kit-bg-success)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-bg-warning\\)\\]{background-color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-fg\\)\\]{background-color:var(--ui-kit-fg)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-overlay\\)\\]{background-color:var(--ui-kit-overlay)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-primary\\)\\]{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary\\)\\]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .bg-\\[var\\(--ui-kit-secondary-h\\)\\]{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .bg-amber-500{--tw-bg-opacity:1;background-color:rgb(245 158 11/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.embarkai-ui-scope .bg-transparent{background-color:transparent}.embarkai-ui-scope .fill-\\[var\\(--ui-kit-bg-warning\\)\\]{fill:var(--ui-kit-bg-warning)}.embarkai-ui-scope .object-contain{-o-object-fit:contain;object-fit:contain}.embarkai-ui-scope .object-cover{-o-object-fit:cover;object-fit:cover}.embarkai-ui-scope .p-0{padding:0}.embarkai-ui-scope .p-1{padding:.25rem}.embarkai-ui-scope .p-2{padding:.5rem}.embarkai-ui-scope .p-3{padding:.75rem}.embarkai-ui-scope .p-4{padding:1rem}.embarkai-ui-scope .p-5{padding:1.25rem}.embarkai-ui-scope .p-6{padding:1.5rem}.embarkai-ui-scope .p-8{padding:2rem}.embarkai-ui-scope .p-\\[2px\\]{padding:2px}.embarkai-ui-scope .p-\\[var\\(--ui-kit-gap\\)\\]{padding:var(--ui-kit-gap)}.embarkai-ui-scope .p-\\[var\\(--ui-kit-pd\\)\\]{padding:var(--ui-kit-pd)}.embarkai-ui-scope .px-0{padding-left:0;padding-right:0}.embarkai-ui-scope .px-1{padding-left:.25rem;padding-right:.25rem}.embarkai-ui-scope .px-2{padding-left:.5rem;padding-right:.5rem}.embarkai-ui-scope .px-3{padding-left:.75rem;padding-right:.75rem}.embarkai-ui-scope .px-4{padding-left:1rem;padding-right:1rem}.embarkai-ui-scope .px-5{padding-left:1.25rem;padding-right:1.25rem}.embarkai-ui-scope .px-8{padding-left:2rem;padding-right:2rem}.embarkai-ui-scope .px-\\[var\\(--ui-kit-gap\\)\\]{padding-left:var(--ui-kit-gap);padding-right:var(--ui-kit-gap)}.embarkai-ui-scope .px-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .py-0{padding-top:0;padding-bottom:0}.embarkai-ui-scope .py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.embarkai-ui-scope .py-2{padding-top:.5rem;padding-bottom:.5rem}.embarkai-ui-scope .py-3{padding-top:.75rem;padding-bottom:.75rem}.embarkai-ui-scope .py-4{padding-top:1rem;padding-bottom:1rem}.embarkai-ui-scope .py-8{padding-top:2rem;padding-bottom:2rem}.embarkai-ui-scope .py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.embarkai-ui-scope .py-\\[var\\(--ui-kit-gap\\)\\]{padding-top:var(--ui-kit-gap);padding-bottom:var(--ui-kit-gap)}.embarkai-ui-scope .py-\\[var\\(--ui-kit-pd\\)\\]{padding-top:var(--ui-kit-pd);padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pb-2{padding-bottom:.5rem}.embarkai-ui-scope .pb-5{padding-bottom:1.25rem}.embarkai-ui-scope .pb-6{padding-bottom:1.5rem}.embarkai-ui-scope .pb-\\[var\\(--ui-kit-pd\\)\\]{padding-bottom:var(--ui-kit-pd)}.embarkai-ui-scope .pl-\\[var\\(--ui-kit-pd\\)\\]{padding-left:var(--ui-kit-pd)}.embarkai-ui-scope .pr-8{padding-right:2rem}.embarkai-ui-scope .pt-3{padding-top:.75rem}.embarkai-ui-scope .pt-4{padding-top:1rem}.embarkai-ui-scope .pt-5{padding-top:1.25rem}.embarkai-ui-scope .text-left{text-align:left}.embarkai-ui-scope .text-center{text-align:center}.embarkai-ui-scope .text-right{text-align:right}.embarkai-ui-scope .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.embarkai-ui-scope .font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.embarkai-ui-scope .text-2xl{font-size:1.5rem;line-height:2rem}.embarkai-ui-scope .text-\\[10px\\]{font-size:10px}.embarkai-ui-scope .text-\\[14px\\]{font-size:14px}.embarkai-ui-scope .text-\\[16px\\]{font-size:16px}.embarkai-ui-scope .text-\\[8px\\]{font-size:8px}.embarkai-ui-scope .text-lg{font-size:1.125rem;line-height:1.75rem}.embarkai-ui-scope .text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .text-xl{font-size:1.25rem;line-height:1.75rem}.embarkai-ui-scope .text-xs{font-size:.75rem;line-height:1rem}.embarkai-ui-scope .font-bold{font-weight:700}.embarkai-ui-scope .font-medium{font-weight:500}.embarkai-ui-scope .font-normal{font-weight:400}.embarkai-ui-scope .font-semibold{font-weight:600}.embarkai-ui-scope .uppercase{text-transform:uppercase}.embarkai-ui-scope .lowercase{text-transform:lowercase}.embarkai-ui-scope .leading-3{line-height:.75rem}.embarkai-ui-scope .leading-4{line-height:1rem}.embarkai-ui-scope .leading-5{line-height:1.25rem}.embarkai-ui-scope .leading-6{line-height:1.5rem}.embarkai-ui-scope .leading-8{line-height:2rem}.embarkai-ui-scope .leading-\\[8px\\]{line-height:8px}.embarkai-ui-scope .leading-none{line-height:1}.embarkai-ui-scope .leading-tight{line-height:1.25}.embarkai-ui-scope .tracking-\\[0\\.3em\\]{letter-spacing:.3em}.embarkai-ui-scope .tracking-tight{letter-spacing:-.025em}.embarkai-ui-scope .tracking-wider{letter-spacing:.05em}.embarkai-ui-scope .text-\\[\\#c3f53c\\]{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-error\\)\\]{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-success\\)\\]{color:var(--ui-kit-bg-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-bg-warning\\)\\]{color:var(--ui-kit-bg-warning)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-error\\)\\]{color:var(--ui-kit-error)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg\\)\\]{color:var(--ui-kit-fg)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-inverted\\)\\]{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-fg-muted\\)\\]{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-info\\)\\]{color:var(--ui-kit-info)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-primary\\)\\]{color:var(--ui-kit-primary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-success\\)\\]{color:var(--ui-kit-success)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-text-secondary\\)\\]{color:var(--ui-kit-text-secondary)}.embarkai-ui-scope .text-\\[var\\(--ui-kit-warning\\)\\]{color:var(--ui-kit-warning)}.embarkai-ui-scope .text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.embarkai-ui-scope .text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.embarkai-ui-scope .underline{text-decoration-line:underline}.embarkai-ui-scope .underline-offset-2{text-underline-offset:2px}.embarkai-ui-scope .underline-offset-4{text-underline-offset:4px}.embarkai-ui-scope .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope .opacity-0{opacity:0}.embarkai-ui-scope .opacity-100{opacity:1}.embarkai-ui-scope .opacity-50{opacity:.5}.embarkai-ui-scope .opacity-60{opacity:.6}.embarkai-ui-scope .opacity-70{opacity:.7}.embarkai-ui-scope .opacity-90{opacity:.9}.embarkai-ui-scope .shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.embarkai-ui-scope .shadow,.embarkai-ui-scope .shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.embarkai-ui-scope .shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.embarkai-ui-scope .outline-none{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .outline{outline-style:solid}.embarkai-ui-scope .blur{--tw-blur:blur(8px)}.embarkai-ui-scope .blur,.embarkai-ui-scope .grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .grayscale{--tw-grayscale:grayscale(100%)}.embarkai-ui-scope .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-\\[color\\2c box-shadow\\]{transition-property:color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-none{transition-property:none}.embarkai-ui-scope .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.embarkai-ui-scope .duration-200{transition-duration:.2s}.embarkai-ui-scope .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.embarkai-ui-scope{--ui-kit-ff:var(--embark-ui-ff,-apple-system,BlinkMacSystemFont,"Inter",system-ui,sans-serif);--ui-kit-maw:var(--embark-ui-maw,384px);--ui-kit-pd:var(--embark-ui-pd,12px);--ui-kit-gap:var(--embark-ui-gap,10px);--ui-kit-bdrs:var(--embark-ui-bdrs,20px);--ui-kit-el-bdrs:var(--embark-ui-element-bdrs,10px);--ui-kit-backdrop-blur:var(--embark-ui-backdrop-blur,10px)}.embarkai-ui-scope[data-current-theme-mode=light]{--ui-kit-overlay:var(--embark-ui-overlay,hsla(0,0%,100%,.8));--ui-kit-bg:var(--embark-ui-bg,#fff);--ui-kit-fg:var(--embark-ui-fg,#000);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#fff);--ui-kit-fg-muted:var(--embark-ui-fg-muted,rgba(0,0,0,.6));--ui-kit-primary:var(--embark-ui-primary,#000);--ui-kit-primary-h:var(--embark-ui-primary-h,rgba(0,0,0,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,rgba(0,0,0,.6));--ui-kit-secondary:var(--embark-ui-secondary,#e4e4e4);--ui-kit-secondary-h:var(--embark-ui-secondary-h,hsla(0,0%,89%,.8));--ui-kit-secondary-a:var(--embark-ui-secondary-a,hsla(0,0%,89%,.6));--ui-kit-bd:var(--embark-ui-bd,#ebebeb);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#a9a9a9);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope[data-current-theme-mode=dark]{--ui-kit-overlay:var(--embark-ui-overlay,rgba(0,0,0,.8));--ui-kit-bg:var(--embark-ui-bg,#1a1a1a);--ui-kit-fg:var(--embark-ui-fg,#fff);--ui-kit-fg-inverted:var(--embark-ui-fg-inverted,#000);--ui-kit-fg-muted:var(--embark-ui-fg-muted,hsla(0,0%,100%,.6));--ui-kit-primary:var(--embark-ui-primary,#fff);--ui-kit-primary-h:var(--embark-ui-primary-h,hsla(0,0%,100%,.8));--ui-kit-primary-a:var(--embark-ui-primary-a,hsla(0,0%,100%,.6));--ui-kit-secondary:var(--embark-ui-secondary,#2a2a2a);--ui-kit-secondary-h:var(--embark-ui-secondary-h,rgba(42,42,42,.6));--ui-kit-secondary-a:var(--embark-ui-secondary-a,rgba(42,42,42,.4));--ui-kit-bd:var(--embark-ui-bd,#3a3a3a);--ui-kit-bd-intense:var(--embark-ui-bd-intense,#4a4a4a);--ui-kit-shadow:var(--embark-ui-shadow,0 0 0 0 transparent);--ui-kit-shadow-c:var(--embark-ui-shadow-c,rgba(0,0,0,.1));--ui-kit-info:var(--embark-ui-info,var(--ui-kit-fg));--ui-kit-bg-info:var(--embark-ui-bg-info,var(--ui-kit-secondary));--ui-kit-success:var(--embark-ui-success,#000);--ui-kit-bg-success:var(--embark-ui-bg-success,#21ff51);--ui-kit-warning:var(--embark-ui-warning,#000);--ui-kit-bg-warning:var(--embark-ui-bg-warning,#e9fa00);--ui-kit-error:var(--embark-ui-error,#fff);--ui-kit-bg-error:var(--embark-ui-bg-error,#d6204e)}.embarkai-ui-scope,.embarkai-ui-scope *{margin:0;box-sizing:border-box;font-family:var(--ui-kit-ff);font-optical-sizing:auto;-webkit-tap-highlight-color:transparent;-moz-tap-highlight-color:transparent;-ms-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.embarkai-ui-scope button,.embarkai-ui-scope h1,.embarkai-ui-scope h2,.embarkai-ui-scope h3,.embarkai-ui-scope h4,.embarkai-ui-scope h5,.embarkai-ui-scope h6,.embarkai-ui-scope input,.embarkai-ui-scope p,.embarkai-ui-scope select,.embarkai-ui-scope textarea{font-family:var(--ui-kit-ff)!important;margin:0}.embarkai-ui-scope button,.embarkai-ui-scope input,.embarkai-ui-scope select,.embarkai-ui-scope textarea{border-style:solid;outline:none!important;appearance:none!important;-webkit-appearance:none;-moz-appearance:none}.embarkai-ui-scope input,.embarkai-ui-scope textarea{font-size:16px!important}.embarkai-ui-scope .account-connect-button{box-shadow:0 4px 20px var(--ui-kit-shadow-c),inset 0 0 0 1px var(--ui-kit-bd);transition:transform .25s ease}.embarkai-ui-scope .account-connect-button:hover{transform:scale(1.02)}.embarkai-ui-scope .account-connect-button:active{transform:scale(1)}@keyframes lumia-mobile-dialog-fade-in{0%{opacity:0;transform:translateY(64px)}to{opacity:1;transform:translateY(0)}}@keyframes lumia-mobile-dialog-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(64px)}}.embarkai-ui-scope .animate-mobile-dialog-in{animation:lumia-mobile-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-mobile-dialog-out{animation:lumia-mobile-dialog-fade-out 375ms ease}@keyframes lumia-dialog-fade-in{0%{opacity:0}to{opacity:1}}@keyframes lumia-dialog-fade-out{0%{opacity:1}to{opacity:0}}.embarkai-ui-scope .animate-dialog-in{animation:lumia-dialog-fade-in 375ms ease}.embarkai-ui-scope .animate-dialog-out{animation:lumia-dialog-fade-out 375ms ease}.embarkai-ui-scope .list-scrollbar-y{width:100%;padding-right:var(--ui-kit-list-scrollbar-pd-r,0);overflow-y:auto;overflow-x:hidden;max-height:var(--ui-kit-scrollbar-mah,300px)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar{width:4px;height:4px}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-thumb{cursor:pointer;width:4px;border-radius:2px;background-color:var(--ui-kit-bd)}.embarkai-ui-scope .list-scrollbar-y::-webkit-scrollbar-track{margin-top:10px;margin-bottom:10px;background-color:transparent}.embarkai-ui-scope .noScrollbars::-webkit-scrollbar{display:none}.embarkai-ui-scope div[data-radix-popper-content-wrapper]{z-index:10000!important}@keyframes rotateShine{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}.embarkai-ui-scope .button-shine-outline{position:absolute;top:0;left:0;width:100%;height:100%;padding:1px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0) border-box;-webkit-mask-composite:xor;mask-composite:exclude}.embarkai-ui-scope .button-shine-outline-shiner{position:absolute;top:50%;left:50%;width:500px;height:500px;transform:translate(-50%,-50%);background:conic-gradient(from 0deg,transparent 0,var(--ui-kit-fg) 8%,transparent 24%);animation:rotateShine 3s linear infinite}.embarkai-ui-scope .file\\:mr-\\[var\\(--ui-kit-gap\\)\\]::file-selector-button{margin-right:var(--ui-kit-gap)}.embarkai-ui-scope .file\\:h-12::file-selector-button{height:3rem}.embarkai-ui-scope .file\\:cursor-pointer::file-selector-button{cursor:pointer}.embarkai-ui-scope .file\\:rounded-\\[var\\(--ui-kit-el-bdrs\\)\\]::file-selector-button{border-radius:var(--ui-kit-el-bdrs)}.embarkai-ui-scope .file\\:border-0::file-selector-button{border-width:0}.embarkai-ui-scope .file\\:bg-\\[var\\(--ui-kit-primary\\)\\]::file-selector-button{background-color:var(--ui-kit-primary)}.embarkai-ui-scope .file\\:bg-transparent::file-selector-button{background-color:transparent}.embarkai-ui-scope .file\\:px-\\[var\\(--ui-kit-pd\\)\\]::file-selector-button{padding-left:var(--ui-kit-pd);padding-right:var(--ui-kit-pd)}.embarkai-ui-scope .file\\:text-\\[16px\\]::file-selector-button{font-size:16px}.embarkai-ui-scope .file\\:text-base::file-selector-button{font-size:1rem;line-height:1.5rem}.embarkai-ui-scope .file\\:font-medium::file-selector-button{font-weight:500}.embarkai-ui-scope .file\\:text-\\[var\\(--ui-kit-fg-inverted\\)\\]::file-selector-button{color:var(--ui-kit-fg-inverted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::-moz-placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .placeholder\\:text-\\[var\\(--ui-kit-fg-muted\\)\\]::placeholder{color:var(--ui-kit-fg-muted)}.embarkai-ui-scope .focus-within\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus-within{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .hover\\:bg-\\[\\#002c15\\]:hover{--tw-bg-opacity:1;background-color:rgb(0 44 21/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#081f2c\\]:hover{--tw-bg-opacity:1;background-color:rgb(8 31 44/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f0f6f8\\]:hover{--tw-bg-opacity:1;background-color:rgb(240 246 248/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[\\#f3ba2f\\]:hover{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-bg-secondary\\)\\]:hover{background-color:var(--ui-kit-bg-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .hover\\:bg-\\[var\\(--ui-kit-secondary-h\\)\\]:hover{background-color:var(--ui-kit-secondary-h)}.embarkai-ui-scope .hover\\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[\\#c3f53c\\]:hover{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-\\[var\\(--ui-kit-fg\\)\\]:hover{color:var(--ui-kit-fg)}.embarkai-ui-scope .hover\\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.embarkai-ui-scope .hover\\:underline:hover{text-decoration-line:underline}.embarkai-ui-scope .hover\\:opacity-100:hover{opacity:1}.embarkai-ui-scope .hover\\:opacity-80:hover{opacity:.8}.embarkai-ui-scope .hover\\:brightness-110:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.embarkai-ui-scope .file\\:hover\\:opacity-90:hover::file-selector-button{opacity:.9}.embarkai-ui-scope .focus\\:border-\\[var\\(--ui-kit-primary\\)\\]:focus{border-color:var(--ui-kit-primary)}.embarkai-ui-scope .focus\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:focus{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .focus\\:bg-transparent:focus{background-color:transparent}.embarkai-ui-scope .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.embarkai-ui-scope .focus-visible\\:ring-0:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-\\[2px\\]:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.embarkai-ui-scope .focus-visible\\:ring-transparent:focus-visible{--tw-ring-color:transparent}.embarkai-ui-scope .focus-visible\\:ring-offset-0:focus-visible{--tw-ring-offset-width:0px}.embarkai-ui-scope .active\\:bg-\\[\\#f3ba2f\\]:active{--tw-bg-opacity:1;background-color:rgb(243 186 47/var(--tw-bg-opacity,1))}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .active\\:bg-\\[var\\(--ui-kit-secondary-a\\)\\]:active{background-color:var(--ui-kit-secondary-a)}.embarkai-ui-scope .active\\:text-\\[\\#c3f53c\\]:active{--tw-text-opacity:1;color:rgb(195 245 60/var(--tw-text-opacity,1))}.embarkai-ui-scope .active\\:opacity-60:active{opacity:.6}.embarkai-ui-scope .file\\:active\\:opacity-80:active::file-selector-button{opacity:.8}.embarkai-ui-scope .disabled\\:cursor-default:disabled{cursor:default}.embarkai-ui-scope .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.embarkai-ui-scope .disabled\\:opacity-50:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-bg\\)\\]:hover:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:hover\\:bg-\\[var\\(--ui-kit-secondary\\)\\]:hover:disabled{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .disabled\\:hover\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:hover:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:hover\\:opacity-50:hover:disabled{opacity:.5}.embarkai-ui-scope .disabled\\:active\\:bg-\\[var\\(--ui-kit-bg\\)\\]:active:disabled{background-color:var(--ui-kit-bg)}.embarkai-ui-scope .disabled\\:active\\:text-\\[var\\(--ui-kit-bg-error\\)\\]:active:disabled{color:var(--ui-kit-bg-error)}.embarkai-ui-scope .disabled\\:active\\:opacity-50:active:disabled{opacity:.5}.embarkai-ui-scope :is(.group:hover .group-hover\\:opacity-100){opacity:1}.embarkai-ui-scope .data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.embarkai-ui-scope .data-\\[size\\=default\\]\\:h-12[data-size=default]{height:3rem}.embarkai-ui-scope .data-\\[size\\=sm\\]\\:h-10[data-size=sm]{height:2.5rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.embarkai-ui-scope .data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom],.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.embarkai-ui-scope .data-\\[side\\=right\\]\\:translate-x-1[data-side=right],.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.embarkai-ui-scope .data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:border-\\[var\\(--ui-kit-bd-intense\\)\\][data-state=checked]{border-color:var(--ui-kit-bd-intense)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:bg-\\[var\\(--ui-kit-secondary\\)\\][data-state=checked]{background-color:var(--ui-kit-secondary)}.embarkai-ui-scope .data-\\[state\\=checked\\]\\:text-\\[var\\(--ui-kit-fg\\)\\][data-state=checked]{color:var(--ui-kit-fg)}.embarkai-ui-scope .data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1[data-slot=select-value]>*){overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:flex[data-slot=select-value]>*){display:flex}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:items-center[data-slot=select-value]>*){align-items:center}.embarkai-ui-scope :is(.\\*\\:data-\\[slot\\=select-value\\]\\:gap-\\[var\\(--ui-kit-gap\\)\\][data-slot=select-value]>*){gap:var(--ui-kit-gap)}@media (min-width:640px){.embarkai-ui-scope .sm\\:flex-row{flex-direction:row}.embarkai-ui-scope .sm\\:justify-end{justify-content:flex-end}.embarkai-ui-scope :is(.sm\\:space-x-2>:not([hidden])~:not([hidden])){--tw-space-x-reverse:0;margin-right:calc(.5rem*var(--tw-space-x-reverse));margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)))}.embarkai-ui-scope .sm\\:text-left{text-align:left}}@media (min-width:768px){.embarkai-ui-scope .md\\:h-8{height:2rem}.embarkai-ui-scope .md\\:w-8{width:2rem}.embarkai-ui-scope .md\\:gap-\\[var\\(--ui-kit-gap\\)\\]{gap:var(--ui-kit-gap)}.embarkai-ui-scope .md\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.embarkai-ui-scope .md\\:text-sm{font-size:.875rem;line-height:1.25rem}.embarkai-ui-scope .md\\:text-xs{font-size:.75rem;line-height:1rem}}.embarkai-ui-scope :is(.\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg:not([class*=size-])){width:1rem;height:1rem}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:pointer-events-none svg){pointer-events:none}.embarkai-ui-scope :is(.\\[\\&_svg\\]\\:shrink-0 svg){flex-shrink:0}`;
|
|
28408
28516
|
|
|
28409
28517
|
// src/index.ts
|
|
28410
28518
|
var import_core8 = require("@embarkai/core");
|
|
@@ -28507,7 +28615,7 @@ function EmbarkAiIcon(props) {
|
|
|
28507
28615
|
// src/components/ConnectWalletButton.tsx
|
|
28508
28616
|
var import_react_query55 = require("@tanstack/react-query");
|
|
28509
28617
|
var import_lucide_react79 = require("lucide-react");
|
|
28510
|
-
var
|
|
28618
|
+
var import_react93 = require("react");
|
|
28511
28619
|
init_SessionContext();
|
|
28512
28620
|
init_auth();
|
|
28513
28621
|
init_profile();
|
|
@@ -28540,7 +28648,7 @@ function ConnectWalletButton(props) {
|
|
|
28540
28648
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
28541
28649
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
|
|
28542
28650
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
28543
|
-
(0,
|
|
28651
|
+
(0, import_react93.useEffect)(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
28544
28652
|
const { data: profile, isLoading: isProfileLoading } = (0, import_react_query55.useQuery)({
|
|
28545
28653
|
retry: false,
|
|
28546
28654
|
enabled: !!address,
|
|
@@ -28548,7 +28656,7 @@ function ConnectWalletButton(props) {
|
|
|
28548
28656
|
queryFn: getUserProfile
|
|
28549
28657
|
});
|
|
28550
28658
|
const displayName = profile?.nicknameDisplay || profile?.displayName || import_auth20.jwtTokenManager.getDisplayName();
|
|
28551
|
-
const indicators = (0,
|
|
28659
|
+
const indicators = (0, import_react93.useMemo)(() => {
|
|
28552
28660
|
const userId = session?.mpcUserId;
|
|
28553
28661
|
if (!userId) return { server: false, local: false, backup: false };
|
|
28554
28662
|
const server = import_auth20.jwtTokenManager.getHasKeyshare() ?? false;
|
|
@@ -28707,7 +28815,7 @@ init_useLayoutStore();
|
|
|
28707
28815
|
var useIsMobileView = () => {
|
|
28708
28816
|
return useLayoutStore((st) => st.isMobileView);
|
|
28709
28817
|
};
|
|
28710
|
-
var
|
|
28818
|
+
var useBalance = () => {
|
|
28711
28819
|
const walletBalance = useLayoutDataStore((st) => st.balance);
|
|
28712
28820
|
const fiatBalance = useLayoutDataStore((st) => st.fiatBalance);
|
|
28713
28821
|
const cryptoRate = useLayoutDataStore((st) => st.cryptoRate);
|
|
@@ -28730,7 +28838,7 @@ var useActiveChainId = () => useSession((st) => st.activeChainId);
|
|
|
28730
28838
|
var useHydrated = () => useSession((st) => st.hasHydrated);
|
|
28731
28839
|
|
|
28732
28840
|
// src/hooks/useOpenPage.ts
|
|
28733
|
-
var
|
|
28841
|
+
var import_react94 = require("react");
|
|
28734
28842
|
init_SessionContext();
|
|
28735
28843
|
init_useLayoutDataStore();
|
|
28736
28844
|
function useOpenPage() {
|
|
@@ -28738,7 +28846,7 @@ function useOpenPage() {
|
|
|
28738
28846
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
28739
28847
|
const setPageParams = useLayoutDataStore((st) => st.setPageParams);
|
|
28740
28848
|
const address = useSession((st) => st.address);
|
|
28741
|
-
const open = (0,
|
|
28849
|
+
const open = (0, import_react94.useCallback)(
|
|
28742
28850
|
(passportPage, params) => {
|
|
28743
28851
|
if (!address) return setPage("auth" /* AUTH */);
|
|
28744
28852
|
if (!!address && passportPage === "auth" /* AUTH */) return setPage("manage-wallet" /* MANAGE_WALLET */);
|
|
@@ -28747,7 +28855,7 @@ function useOpenPage() {
|
|
|
28747
28855
|
},
|
|
28748
28856
|
[setPage, setPageParams, address]
|
|
28749
28857
|
);
|
|
28750
|
-
const close = (0,
|
|
28858
|
+
const close = (0, import_react94.useCallback)(() => setPage(null), [setPage]);
|
|
28751
28859
|
return { open, close, isOpen: page !== null };
|
|
28752
28860
|
}
|
|
28753
28861
|
|
|
@@ -29208,14 +29316,14 @@ var Hash = ({
|
|
|
29208
29316
|
};
|
|
29209
29317
|
|
|
29210
29318
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29211
|
-
var
|
|
29319
|
+
var import_react95 = require("react");
|
|
29212
29320
|
init_base();
|
|
29213
29321
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
29214
29322
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29215
|
-
const [transactions, setTransactions] = (0,
|
|
29216
|
-
const [loading, setLoading] = (0,
|
|
29217
|
-
const [error, setError] = (0,
|
|
29218
|
-
(0,
|
|
29323
|
+
const [transactions, setTransactions] = (0, import_react95.useState)([]);
|
|
29324
|
+
const [loading, setLoading] = (0, import_react95.useState)(true);
|
|
29325
|
+
const [error, setError] = (0, import_react95.useState)(null);
|
|
29326
|
+
(0, import_react95.useEffect)(() => {
|
|
29219
29327
|
const fetchTransactions2 = async () => {
|
|
29220
29328
|
try {
|
|
29221
29329
|
setLoading(true);
|
|
@@ -29506,13 +29614,13 @@ function useUserOpStatus(options = {}) {
|
|
|
29506
29614
|
init_useErc3643Compliance();
|
|
29507
29615
|
|
|
29508
29616
|
// src/hooks/useWalletMode.ts
|
|
29509
|
-
var
|
|
29617
|
+
var import_react96 = require("react");
|
|
29510
29618
|
init_useExternalWalletStore();
|
|
29511
29619
|
function useWalletMode() {
|
|
29512
29620
|
const configMode = useExternalWalletStore((st) => st.configMode);
|
|
29513
29621
|
const activeMode = useExternalWalletStore((st) => st.activeMode);
|
|
29514
29622
|
const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
|
|
29515
|
-
const switchMode = (0,
|
|
29623
|
+
const switchMode = (0, import_react96.useCallback)(
|
|
29516
29624
|
(mode) => {
|
|
29517
29625
|
if (configMode !== "both") return;
|
|
29518
29626
|
setActiveMode(mode);
|
|
@@ -29528,7 +29636,7 @@ function useWalletMode() {
|
|
|
29528
29636
|
}
|
|
29529
29637
|
|
|
29530
29638
|
// src/hooks/useDirectWallet.ts
|
|
29531
|
-
var
|
|
29639
|
+
var import_react97 = require("react");
|
|
29532
29640
|
var import_rainbowkit6 = require("@rainbow-me/rainbowkit");
|
|
29533
29641
|
var import_wagmi11 = require("wagmi");
|
|
29534
29642
|
init_useExternalWalletStore();
|
|
@@ -29542,13 +29650,13 @@ function useDirectWallet() {
|
|
|
29542
29650
|
const { disconnect: wagmiDisconnect } = (0, import_wagmi11.useDisconnect)();
|
|
29543
29651
|
const { openConnectModal } = (0, import_rainbowkit6.useConnectModal)();
|
|
29544
29652
|
const setIsWalletLinking = useLayoutDataStore((st) => st.setIsWalletLinking);
|
|
29545
|
-
const connect = (0,
|
|
29653
|
+
const connect = (0, import_react97.useCallback)(() => {
|
|
29546
29654
|
setIsWalletLinking(true);
|
|
29547
29655
|
}, [setIsWalletLinking]);
|
|
29548
|
-
const reconnect = (0,
|
|
29656
|
+
const reconnect = (0, import_react97.useCallback)(() => {
|
|
29549
29657
|
if (openConnectModal) openConnectModal();
|
|
29550
29658
|
}, [openConnectModal]);
|
|
29551
|
-
const disconnect = (0,
|
|
29659
|
+
const disconnect = (0, import_react97.useCallback)(() => {
|
|
29552
29660
|
wagmiDisconnect();
|
|
29553
29661
|
clearExternalWallet();
|
|
29554
29662
|
}, [wagmiDisconnect, clearExternalWallet]);
|
|
@@ -29564,7 +29672,7 @@ function useDirectWallet() {
|
|
|
29564
29672
|
}
|
|
29565
29673
|
|
|
29566
29674
|
// src/hooks/useSendDirectTransaction.ts
|
|
29567
|
-
var
|
|
29675
|
+
var import_react98 = require("react");
|
|
29568
29676
|
var import_viem20 = require("viem");
|
|
29569
29677
|
var import_wagmi12 = require("wagmi");
|
|
29570
29678
|
init_useExternalWalletStore();
|
|
@@ -29573,10 +29681,10 @@ function useSendDirectTransaction() {
|
|
|
29573
29681
|
const externalChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
29574
29682
|
const { sendTransactionAsync } = (0, import_wagmi12.useSendTransaction)();
|
|
29575
29683
|
const { switchChainAsync } = (0, import_wagmi12.useSwitchChain)();
|
|
29576
|
-
const [isPending, setIsPending] = (0,
|
|
29577
|
-
const [error, setError] = (0,
|
|
29578
|
-
const [txHash, setTxHash] = (0,
|
|
29579
|
-
const sendTransaction = (0,
|
|
29684
|
+
const [isPending, setIsPending] = (0, import_react98.useState)(false);
|
|
29685
|
+
const [error, setError] = (0, import_react98.useState)(null);
|
|
29686
|
+
const [txHash, setTxHash] = (0, import_react98.useState)(null);
|
|
29687
|
+
const sendTransaction = (0, import_react98.useCallback)(
|
|
29580
29688
|
async (params) => {
|
|
29581
29689
|
if (!isConnected) {
|
|
29582
29690
|
setError("No external wallet connected");
|
|
@@ -29610,7 +29718,7 @@ function useSendDirectTransaction() {
|
|
|
29610
29718
|
},
|
|
29611
29719
|
[isConnected, externalChainId, sendTransactionAsync, switchChainAsync]
|
|
29612
29720
|
);
|
|
29613
|
-
const reset = (0,
|
|
29721
|
+
const reset = (0, import_react98.useCallback)(() => {
|
|
29614
29722
|
setError(null);
|
|
29615
29723
|
setTxHash(null);
|
|
29616
29724
|
setIsPending(false);
|
|
@@ -29619,7 +29727,7 @@ function useSendDirectTransaction() {
|
|
|
29619
29727
|
}
|
|
29620
29728
|
|
|
29621
29729
|
// src/hooks/useTransferToLinkedWallet.ts
|
|
29622
|
-
var
|
|
29730
|
+
var import_react99 = require("react");
|
|
29623
29731
|
var import_viem21 = require("viem");
|
|
29624
29732
|
init_SessionContext();
|
|
29625
29733
|
init_account2();
|
|
@@ -29638,14 +29746,14 @@ var ERC20_TRANSFER_ABI2 = [
|
|
|
29638
29746
|
function useTransferToLinkedWallet() {
|
|
29639
29747
|
const session = useSession((st) => st.session);
|
|
29640
29748
|
const { profiles } = useLinkedProfiles();
|
|
29641
|
-
const [isPending, setIsPending] = (0,
|
|
29642
|
-
const [error, setError] = (0,
|
|
29643
|
-
const [userOpHash, setUserOpHash] = (0,
|
|
29644
|
-
const linkedWallets = (0,
|
|
29749
|
+
const [isPending, setIsPending] = (0, import_react99.useState)(false);
|
|
29750
|
+
const [error, setError] = (0, import_react99.useState)(null);
|
|
29751
|
+
const [userOpHash, setUserOpHash] = (0, import_react99.useState)(null);
|
|
29752
|
+
const linkedWallets = (0, import_react99.useMemo)(
|
|
29645
29753
|
() => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
|
|
29646
29754
|
[profiles]
|
|
29647
29755
|
);
|
|
29648
|
-
const transfer = (0,
|
|
29756
|
+
const transfer = (0, import_react99.useCallback)(
|
|
29649
29757
|
async (params) => {
|
|
29650
29758
|
if (!session) {
|
|
29651
29759
|
setError("No active session");
|
|
@@ -29696,7 +29804,7 @@ function useTransferToLinkedWallet() {
|
|
|
29696
29804
|
},
|
|
29697
29805
|
[session, linkedWallets]
|
|
29698
29806
|
);
|
|
29699
|
-
const reset = (0,
|
|
29807
|
+
const reset = (0, import_react99.useCallback)(() => {
|
|
29700
29808
|
setError(null);
|
|
29701
29809
|
setUserOpHash(null);
|
|
29702
29810
|
setIsPending(false);
|
|
@@ -29720,13 +29828,13 @@ function useNativeWalletSignature() {
|
|
|
29720
29828
|
|
|
29721
29829
|
// src/hooks/useLogout.ts
|
|
29722
29830
|
var import_auth22 = require("@embarkai/core/auth");
|
|
29723
|
-
var
|
|
29831
|
+
var import_react100 = require("react");
|
|
29724
29832
|
init_ProviderContext();
|
|
29725
29833
|
init_SessionContext();
|
|
29726
29834
|
function useLogout() {
|
|
29727
29835
|
const { setSession, setIsLoading, setAddress, setStatus, setError, address } = useSession();
|
|
29728
29836
|
const { callbacksRef } = useProviderConfig();
|
|
29729
|
-
const logout2 = (0,
|
|
29837
|
+
const logout2 = (0, import_react100.useCallback)(async () => {
|
|
29730
29838
|
const prevAddress = address;
|
|
29731
29839
|
let userId = null;
|
|
29732
29840
|
setIsLoading(true);
|
|
@@ -29842,7 +29950,7 @@ function useTransactions() {
|
|
|
29842
29950
|
|
|
29843
29951
|
// src/modules/assets.ts
|
|
29844
29952
|
init_SessionContext();
|
|
29845
|
-
var
|
|
29953
|
+
var import_react101 = __toESM(require("react"), 1);
|
|
29846
29954
|
var import_viem23 = require("viem");
|
|
29847
29955
|
var import_wagmi15 = require("wagmi");
|
|
29848
29956
|
var COMMON_TOKENS = [
|
|
@@ -29998,7 +30106,7 @@ function useTokenBalance(tokenAddress, userAddress) {
|
|
|
29998
30106
|
}
|
|
29999
30107
|
});
|
|
30000
30108
|
const { tokenInfo } = useTokenInfo(tokenAddress);
|
|
30001
|
-
const formattedBalance =
|
|
30109
|
+
const formattedBalance = import_react101.default.useMemo(() => {
|
|
30002
30110
|
if (!balance || !tokenInfo) return "0";
|
|
30003
30111
|
return (0, import_viem23.formatUnits)(balance, tokenInfo.decimals);
|
|
30004
30112
|
}, [balance, tokenInfo]);
|