@embarkai/ui-kit 0.4.40 → 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 +665 -574
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1272 -1180
- 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();
|
|
@@ -19858,7 +19960,6 @@ async function executeWarpTransactions(txs, walletClient) {
|
|
|
19858
19960
|
throw new Error("No public client available");
|
|
19859
19961
|
}
|
|
19860
19962
|
const hashes = [];
|
|
19861
|
-
const errorsStack = [];
|
|
19862
19963
|
for (const tx of txs) {
|
|
19863
19964
|
if (tx.type !== "ethers-v5" /* EthersV5 */) {
|
|
19864
19965
|
throw new Error(`Unsupported transaction provider: ${tx.type}`);
|
|
@@ -19884,7 +19985,6 @@ async function executeWarpTransactions(txs, walletClient) {
|
|
|
19884
19985
|
value: valueBigInt.toString(),
|
|
19885
19986
|
chainId: publicClient.chain.id
|
|
19886
19987
|
}).catch((error) => {
|
|
19887
|
-
errorsStack.push(error);
|
|
19888
19988
|
throw error;
|
|
19889
19989
|
});
|
|
19890
19990
|
if (TARGET_TX_CATEGORIES.includes(tx.category)) {
|
|
@@ -19896,14 +19996,9 @@ async function executeWarpTransactions(txs, walletClient) {
|
|
|
19896
19996
|
const embarkNonTransferReceipt = await waitForUserOperationReceipt(embarkOpHash, {
|
|
19897
19997
|
chainId: publicClient.chain.id
|
|
19898
19998
|
}).catch((error) => {
|
|
19899
|
-
errorsStack.push(error);
|
|
19900
19999
|
throw error;
|
|
19901
20000
|
});
|
|
19902
|
-
|
|
19903
|
-
throw new Error(
|
|
19904
|
-
`Approval transaction failed: ${embarkNonTransferReceipt?.receipt?.transactionHash || "unknown hash"}`
|
|
19905
|
-
);
|
|
19906
|
-
}
|
|
20001
|
+
console.log("[HYPERLANE] embarkai-wallet tx receipt:", tx.category, embarkNonTransferReceipt.receipt);
|
|
19907
20002
|
}
|
|
19908
20003
|
break;
|
|
19909
20004
|
case "direct-wallet":
|
|
@@ -19914,7 +20009,6 @@ async function executeWarpTransactions(txs, walletClient) {
|
|
|
19914
20009
|
data: populated.data,
|
|
19915
20010
|
chain: walletClient.chain
|
|
19916
20011
|
}).catch((error) => {
|
|
19917
|
-
errorsStack.push(error);
|
|
19918
20012
|
throw error;
|
|
19919
20013
|
});
|
|
19920
20014
|
if (TARGET_TX_CATEGORIES.includes(tx.category)) {
|
|
@@ -19926,24 +20020,15 @@ async function executeWarpTransactions(txs, walletClient) {
|
|
|
19926
20020
|
const wagmiNonTransferReceipt = await (0, import_core5.waitForWagmiTransactionReceipt)(import_core5.wagmiConfig, {
|
|
19927
20021
|
chainId: publicClient.chain.id,
|
|
19928
20022
|
hash: walletOpHash,
|
|
19929
|
-
pollingInterval:
|
|
20023
|
+
pollingInterval: 5e3
|
|
19930
20024
|
}).catch((error) => {
|
|
19931
|
-
errorsStack.push(error);
|
|
19932
20025
|
throw error;
|
|
19933
20026
|
});
|
|
19934
|
-
|
|
19935
|
-
throw new Error(
|
|
19936
|
-
`Approval transaction failed: ${wagmiNonTransferReceipt?.transactionHash || "unknown hash"}`
|
|
19937
|
-
);
|
|
19938
|
-
}
|
|
20027
|
+
console.log("[HYPERLANE] direct-wallet tx receipt:", tx.category, wagmiNonTransferReceipt);
|
|
19939
20028
|
}
|
|
19940
20029
|
break;
|
|
19941
20030
|
}
|
|
19942
20031
|
}
|
|
19943
|
-
if (errorsStack.length > 0) {
|
|
19944
|
-
console.error("[HYPERLANE] Errors occurred during transaction execution:");
|
|
19945
|
-
console.table(errorsStack.map((e) => e.message));
|
|
19946
|
-
}
|
|
19947
20032
|
return hashes;
|
|
19948
20033
|
}
|
|
19949
20034
|
var import_core5, import_viem11, TARGET_TX_CATEGORIES;
|
|
@@ -19989,7 +20074,7 @@ function useHyperlaneHistory() {
|
|
|
19989
20074
|
const page = useLayoutDataStore((st) => st.page);
|
|
19990
20075
|
const flow = useFlowSelectorStore((st) => st.flow);
|
|
19991
20076
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
19992
|
-
const [currentPage, setCurrentPage] = (0,
|
|
20077
|
+
const [currentPage, setCurrentPage] = (0, import_react64.useState)(1);
|
|
19993
20078
|
const query = (0, import_react_query43.useQuery)({
|
|
19994
20079
|
retry: false,
|
|
19995
20080
|
refetchInterval: TX_HISTORY_POLLING_INTERVAL,
|
|
@@ -19997,13 +20082,13 @@ function useHyperlaneHistory() {
|
|
|
19997
20082
|
queryKey: [HYPERLANE_HISTORY_QUERY_KEY, address, currentPage],
|
|
19998
20083
|
queryFn: async () => await getHyperlaneBridgeHistory({ page: currentPage, pageSize: TX_HISTORY_PAGE_SIZE })
|
|
19999
20084
|
});
|
|
20000
|
-
const updateExpandable = (0,
|
|
20001
|
-
(0,
|
|
20085
|
+
const updateExpandable = (0, import_react64.useCallback)(
|
|
20086
|
+
(0, import_lodash_es9.debounce)(() => {
|
|
20002
20087
|
useFlowSelectorStore.getState().setRenderKey(`hyperlane-history-loaded-${Date.now()}`);
|
|
20003
|
-
},
|
|
20088
|
+
}, 250),
|
|
20004
20089
|
[]
|
|
20005
20090
|
);
|
|
20006
|
-
(0,
|
|
20091
|
+
(0, import_react64.useEffect)(() => {
|
|
20007
20092
|
const { data, isLoading } = query;
|
|
20008
20093
|
if (isLoading || data.data?.length === 0) return;
|
|
20009
20094
|
updateExpandable();
|
|
@@ -20014,13 +20099,13 @@ function useHyperlaneHistory() {
|
|
|
20014
20099
|
setCurrentPage
|
|
20015
20100
|
};
|
|
20016
20101
|
}
|
|
20017
|
-
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;
|
|
20018
20103
|
var init_useHyperlaneHistory = __esm({
|
|
20019
20104
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneHistory.ts"() {
|
|
20020
20105
|
init_SessionContext();
|
|
20021
20106
|
import_react_query43 = require("@tanstack/react-query");
|
|
20022
|
-
|
|
20023
|
-
|
|
20107
|
+
import_lodash_es9 = require("lodash-es");
|
|
20108
|
+
import_react64 = require("react");
|
|
20024
20109
|
init_useLayoutDataStore();
|
|
20025
20110
|
init_useFlowSelector();
|
|
20026
20111
|
init_api3();
|
|
@@ -20052,7 +20137,7 @@ function useBridge() {
|
|
|
20052
20137
|
const address = useSession((st) => st.address);
|
|
20053
20138
|
const { data: walletClient } = (0, import_wagmi3.useWalletClient)();
|
|
20054
20139
|
const { switchChainAsync } = (0, import_wagmi3.useSwitchChain)();
|
|
20055
|
-
const swapDirection = (0,
|
|
20140
|
+
const swapDirection = (0, import_react65.useCallback)(() => {
|
|
20056
20141
|
const {
|
|
20057
20142
|
bridgeStep,
|
|
20058
20143
|
originChain,
|
|
@@ -20104,7 +20189,7 @@ function useBridge() {
|
|
|
20104
20189
|
useFlowSelectorStore.getState().setError(error instanceof Error ? error.message : String(error));
|
|
20105
20190
|
}
|
|
20106
20191
|
});
|
|
20107
|
-
const handleQuoteEstimation = (0,
|
|
20192
|
+
const handleQuoteEstimation = (0, import_react65.useCallback)((amnt) => {
|
|
20108
20193
|
const { originChain, destinationChain, bridgeSender } = useBridgeStore.getState();
|
|
20109
20194
|
if (!amnt || !Number(amnt)) {
|
|
20110
20195
|
useBridgeStore.getState().setQuote(null);
|
|
@@ -20228,14 +20313,14 @@ function useBridge() {
|
|
|
20228
20313
|
isAssetBridging
|
|
20229
20314
|
};
|
|
20230
20315
|
}
|
|
20231
|
-
var import_react_query44,
|
|
20316
|
+
var import_react_query44, import_react65, import_wagmi3;
|
|
20232
20317
|
var init_useBridge = __esm({
|
|
20233
20318
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridge.ts"() {
|
|
20234
20319
|
init_SessionContext();
|
|
20235
20320
|
init_i18n();
|
|
20236
20321
|
init_useExternalWalletStore();
|
|
20237
20322
|
import_react_query44 = require("@tanstack/react-query");
|
|
20238
|
-
|
|
20323
|
+
import_react65 = require("react");
|
|
20239
20324
|
import_wagmi3 = require("wagmi");
|
|
20240
20325
|
init_useLayoutStore();
|
|
20241
20326
|
init_useFlowSelector();
|
|
@@ -20265,7 +20350,7 @@ function useHyperlaneRoutes() {
|
|
|
20265
20350
|
queryKey: [HYPERLANE_WARP_ROUTES_QUERY_KEY, address],
|
|
20266
20351
|
queryFn: async () => getHyperlaneWarpRoutes()
|
|
20267
20352
|
});
|
|
20268
|
-
(0,
|
|
20353
|
+
(0, import_react66.useEffect)(() => {
|
|
20269
20354
|
if (!errorWarpRoutes) return;
|
|
20270
20355
|
useFlowSelectorStore.getState().setError(errorWarpRoutes.message);
|
|
20271
20356
|
const { resetSelections, setRecipient, setOriginChain, setDestinationChain } = useBridgeStore.getState();
|
|
@@ -20274,7 +20359,7 @@ function useHyperlaneRoutes() {
|
|
|
20274
20359
|
setOriginChain(null);
|
|
20275
20360
|
setDestinationChain(null);
|
|
20276
20361
|
}, [errorWarpRoutes]);
|
|
20277
|
-
(0,
|
|
20362
|
+
(0, import_react66.useEffect)(() => {
|
|
20278
20363
|
if (!!hyperRoute || !hyperlaneWarpRoutes.length) return;
|
|
20279
20364
|
const warpRouteToAutoSelect = hyperlaneWarpRoutes.find((route) => route.routeId === hyperRoute);
|
|
20280
20365
|
if (!warpRouteToAutoSelect) return;
|
|
@@ -20293,12 +20378,12 @@ function useHyperlaneRoutes() {
|
|
|
20293
20378
|
}, [hyperRoute, hyperlaneWarpRoutes]);
|
|
20294
20379
|
return { hyperlaneWarpRoutes, isLoadingWarpRoutes };
|
|
20295
20380
|
}
|
|
20296
|
-
var import_react_query45,
|
|
20381
|
+
var import_react_query45, import_react66, HYPERLANE_WARP_ROUTES_QUERY_KEY;
|
|
20297
20382
|
var init_useHyperlaneRoutes = __esm({
|
|
20298
20383
|
"src/internal/components/SendMenu/hyperbridge/hooks/useHyperlaneRoutes.ts"() {
|
|
20299
20384
|
init_SessionContext();
|
|
20300
20385
|
import_react_query45 = require("@tanstack/react-query");
|
|
20301
|
-
|
|
20386
|
+
import_react66 = require("react");
|
|
20302
20387
|
init_useLayoutDataStore();
|
|
20303
20388
|
init_useFlowSelector();
|
|
20304
20389
|
init_api3();
|
|
@@ -20314,7 +20399,7 @@ function useMenuTitle(warpRoutes) {
|
|
|
20314
20399
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
20315
20400
|
const hyperRoute = useBridgeStore((st) => st.hyperRoute);
|
|
20316
20401
|
const hyperRouteMeta = warpRoutes?.length ? warpRoutes.find((route) => route.routeId === hyperRoute) : null;
|
|
20317
|
-
(0,
|
|
20402
|
+
(0, import_react67.useEffect)(() => {
|
|
20318
20403
|
const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
|
|
20319
20404
|
switch (true) {
|
|
20320
20405
|
case bridgeStep === "sender-selector":
|
|
@@ -20342,11 +20427,11 @@ function useMenuTitle(warpRoutes) {
|
|
|
20342
20427
|
}
|
|
20343
20428
|
}, [bridgeStep, hyperRouteMeta, t]);
|
|
20344
20429
|
}
|
|
20345
|
-
var
|
|
20430
|
+
var import_react67;
|
|
20346
20431
|
var init_useMenuTitle = __esm({
|
|
20347
20432
|
"src/internal/components/SendMenu/hyperbridge/hooks/useMenuTitle.ts"() {
|
|
20348
20433
|
init_i18n();
|
|
20349
|
-
|
|
20434
|
+
import_react67 = require("react");
|
|
20350
20435
|
init_useFlowSelector();
|
|
20351
20436
|
init_useBridgeStore();
|
|
20352
20437
|
}
|
|
@@ -20438,18 +20523,22 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20438
20523
|
return { value, decimals, symbol, formatted };
|
|
20439
20524
|
}
|
|
20440
20525
|
});
|
|
20441
|
-
const {
|
|
20442
|
-
|
|
20443
|
-
|
|
20444
|
-
|
|
20445
|
-
|
|
20446
|
-
|
|
20447
|
-
|
|
20448
|
-
|
|
20449
|
-
|
|
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
|
+
};
|
|
20450
20539
|
}
|
|
20451
20540
|
});
|
|
20452
|
-
const refreshRouteTokenBalance = (0,
|
|
20541
|
+
const refreshRouteTokenBalance = (0, import_react68.useCallback)(
|
|
20453
20542
|
(senderWallet) => {
|
|
20454
20543
|
switch (true) {
|
|
20455
20544
|
case senderWallet === "embarkai-wallet":
|
|
@@ -20459,13 +20548,13 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20459
20548
|
qc.invalidateQueries({ queryKey: [EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY] });
|
|
20460
20549
|
break;
|
|
20461
20550
|
case (senderWallet === "direct-wallet" && !!isSelectedTokenNative):
|
|
20462
|
-
|
|
20551
|
+
qc.invalidateQueries({ queryKey: [EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY] });
|
|
20463
20552
|
break;
|
|
20464
20553
|
}
|
|
20465
20554
|
},
|
|
20466
|
-
[refreshBalances, qc
|
|
20555
|
+
[refreshBalances, qc]
|
|
20467
20556
|
);
|
|
20468
|
-
(0,
|
|
20557
|
+
(0, import_react68.useEffect)(() => {
|
|
20469
20558
|
if (!bridgeSender || !originChain) return;
|
|
20470
20559
|
switch (bridgeSender) {
|
|
20471
20560
|
case "embarkai-wallet":
|
|
@@ -20496,14 +20585,14 @@ function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
|
20496
20585
|
isRouteTokenBalanceLoading: isAssetsLoading || isExternalBalanceLoading || isExternalNativeBalanceLoading
|
|
20497
20586
|
};
|
|
20498
20587
|
}
|
|
20499
|
-
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;
|
|
20500
20589
|
var init_useBridgeBalance = __esm({
|
|
20501
20590
|
"src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts"() {
|
|
20502
20591
|
init_SessionContext();
|
|
20503
20592
|
init_i18n();
|
|
20504
20593
|
import_core6 = require("@embarkai/core");
|
|
20505
20594
|
import_react_query46 = require("@tanstack/react-query");
|
|
20506
|
-
|
|
20595
|
+
import_react68 = require("react");
|
|
20507
20596
|
import_viem13 = require("viem");
|
|
20508
20597
|
import_wagmi4 = require("wagmi");
|
|
20509
20598
|
init_useBlockscoutAssets();
|
|
@@ -20513,6 +20602,7 @@ var init_useBridgeBalance = __esm({
|
|
|
20513
20602
|
init_useBridgeStore();
|
|
20514
20603
|
init_utils8();
|
|
20515
20604
|
EXTERNAL_WALLET_BRIDGING_BALANCE_QUERY = "external-wallet-bridging-balance-query";
|
|
20605
|
+
EXTERNAL_WALLET_BRIDGING_NATIVE_BALANCE_QUERY = "external-wallet-bridging-native-balance-query";
|
|
20516
20606
|
}
|
|
20517
20607
|
});
|
|
20518
20608
|
|
|
@@ -20532,11 +20622,11 @@ function SelectStep(props) {
|
|
|
20532
20622
|
} = useBridgeStore();
|
|
20533
20623
|
const selectedSender = bridgeSenders?.find((s) => s.type === bridgeSender) || null;
|
|
20534
20624
|
const { routeTokenBalance, isRouteTokenBalanceLoading } = useBridgeBalance(hyperlaneWarpRoutes);
|
|
20535
|
-
const selectedWarpRoute = hyperlaneWarpRoutes
|
|
20625
|
+
const selectedWarpRoute = hyperlaneWarpRoutes?.find((route) => {
|
|
20536
20626
|
const { routeId, chainPair } = route;
|
|
20537
20627
|
const chainPairNames = chainPair.map((c) => c.chainName);
|
|
20538
20628
|
return routeId === hyperRoute && chainPairNames.includes(originChain) && chainPairNames.includes(destinationChain);
|
|
20539
|
-
});
|
|
20629
|
+
}) || null;
|
|
20540
20630
|
const SelectedWarpRoteIcon = TOKENS_ICONS[(selectedWarpRoute?.symbol || "null_icon").toUpperCase()] || TOKENS_ICONS.EMBARKAI;
|
|
20541
20631
|
const isError = useFlowSelectorStore((st) => !!st.error);
|
|
20542
20632
|
if (isLoadingWarpRoutes) {
|
|
@@ -20561,7 +20651,7 @@ function SelectStep(props) {
|
|
|
20561
20651
|
Button,
|
|
20562
20652
|
{
|
|
20563
20653
|
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
20564
|
-
variant: "
|
|
20654
|
+
variant: "secondary",
|
|
20565
20655
|
className: "w-full justify-between",
|
|
20566
20656
|
onClick: () => {
|
|
20567
20657
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -20600,7 +20690,7 @@ function SelectStep(props) {
|
|
|
20600
20690
|
Button,
|
|
20601
20691
|
{
|
|
20602
20692
|
disabled: !hyperlaneWarpRoutes.length || isQuoteEstimating,
|
|
20603
|
-
variant: "
|
|
20693
|
+
variant: "secondary",
|
|
20604
20694
|
className: "w-full justify-between",
|
|
20605
20695
|
onClick: () => {
|
|
20606
20696
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -20620,7 +20710,7 @@ function SelectStep(props) {
|
|
|
20620
20710
|
variant: "outline",
|
|
20621
20711
|
size: "medium",
|
|
20622
20712
|
className: "bg-[var(--ui-kit-bg)] flex items-center gap-[var(--ui-kit-gap)]",
|
|
20623
|
-
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: [
|
|
20624
20714
|
chIdx > 0 && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_lucide_react59.ArrowLeftRightIcon, { className: "w-4 h-4 " }),
|
|
20625
20715
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ResolveChainIcon, { chainName: chain.chainName, className: "w-4 h-4" })
|
|
20626
20716
|
] }, `${selectedWarpRoute.id}-icon-${chain.chainID}-${chIdx}`))
|
|
@@ -20758,13 +20848,13 @@ function SelectStep(props) {
|
|
|
20758
20848
|
)
|
|
20759
20849
|
] });
|
|
20760
20850
|
}
|
|
20761
|
-
var import_lucide_react59,
|
|
20851
|
+
var import_lucide_react59, import_react69, import_jsx_runtime95;
|
|
20762
20852
|
var init_SelectStep = __esm({
|
|
20763
20853
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectStep.tsx"() {
|
|
20764
20854
|
init_tokens();
|
|
20765
20855
|
init_i18n();
|
|
20766
20856
|
import_lucide_react59 = require("lucide-react");
|
|
20767
|
-
|
|
20857
|
+
import_react69 = require("react");
|
|
20768
20858
|
init_priceFormatter();
|
|
20769
20859
|
init_utils2();
|
|
20770
20860
|
init_badge();
|
|
@@ -20813,7 +20903,7 @@ var init_checkbox = __esm({
|
|
|
20813
20903
|
// src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx
|
|
20814
20904
|
function ConfirmStep(props) {
|
|
20815
20905
|
const { isAssetBridging, bridgeAsset, hyperlaneWarpRoutes } = props;
|
|
20816
|
-
const [userConsent, setUserConsent] = (0,
|
|
20906
|
+
const [userConsent, setUserConsent] = (0, import_react70.useState)(false);
|
|
20817
20907
|
const { t } = useT();
|
|
20818
20908
|
const address = useSession((st) => st.address);
|
|
20819
20909
|
const bridgeSender = useBridgeStore((st) => st.bridgeSenders.find((s) => s.type === st.bridgeSender));
|
|
@@ -20829,6 +20919,7 @@ function ConfirmStep(props) {
|
|
|
20829
20919
|
const chainPairNames = chainPair.map((c) => c.chainName);
|
|
20830
20920
|
return routeId === hyperRoute && chainPairNames.includes(originChain) && chainPairNames.includes(destinationChain);
|
|
20831
20921
|
});
|
|
20922
|
+
const isConfirmationDisabled = !quote || isAssetBridging || !userConsent;
|
|
20832
20923
|
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
20833
20924
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Highlight, { type: "info", className: "flex flex-col gap-[var(--ui-kit-gap)] w-full", children: [
|
|
20834
20925
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("p", { className: P_CN, children: [
|
|
@@ -20910,7 +21001,7 @@ function ConfirmStep(props) {
|
|
|
20910
21001
|
{
|
|
20911
21002
|
size: "large",
|
|
20912
21003
|
variant: "default",
|
|
20913
|
-
disabled:
|
|
21004
|
+
disabled: isConfirmationDisabled,
|
|
20914
21005
|
onClick: () => bridgeAsset(),
|
|
20915
21006
|
className: "w-full",
|
|
20916
21007
|
children: [
|
|
@@ -20921,13 +21012,13 @@ function ConfirmStep(props) {
|
|
|
20921
21012
|
)
|
|
20922
21013
|
] });
|
|
20923
21014
|
}
|
|
20924
|
-
var import_lucide_react61,
|
|
21015
|
+
var import_lucide_react61, import_react70, import_jsx_runtime97, P_CN;
|
|
20925
21016
|
var init_ConfirmStep = __esm({
|
|
20926
21017
|
"src/internal/components/SendMenu/hyperbridge/steps/ConfirmStep.tsx"() {
|
|
20927
21018
|
init_SessionContext();
|
|
20928
21019
|
init_i18n();
|
|
20929
21020
|
import_lucide_react61 = require("lucide-react");
|
|
20930
|
-
|
|
21021
|
+
import_react70 = require("react");
|
|
20931
21022
|
init_priceFormatter();
|
|
20932
21023
|
init_utils2();
|
|
20933
21024
|
init_button();
|
|
@@ -21285,9 +21376,9 @@ var init_HistoryStep = __esm({
|
|
|
21285
21376
|
function SelectAssetRoute(props) {
|
|
21286
21377
|
const { hyperlaneWarpRoutes } = props;
|
|
21287
21378
|
const { t } = useT();
|
|
21288
|
-
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = (0,
|
|
21379
|
+
const [isTokenSymbolSelector, setIsTokenSymbolSelector] = (0, import_react71.useState)(false);
|
|
21289
21380
|
const selectedAssetSymbol = useBridgeStore((st) => st.bridgeAssetSymbol);
|
|
21290
|
-
const tokenList = (0,
|
|
21381
|
+
const tokenList = (0, import_react71.useMemo)(() => {
|
|
21291
21382
|
const tokens = hyperlaneWarpRoutes.map((route) => route.symbol);
|
|
21292
21383
|
const uniqueTokens = Array.from(new Set(tokens));
|
|
21293
21384
|
return uniqueTokens.map((symbol) => ({
|
|
@@ -21321,7 +21412,7 @@ function SelectAssetRoute(props) {
|
|
|
21321
21412
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
21322
21413
|
Button,
|
|
21323
21414
|
{
|
|
21324
|
-
variant: "
|
|
21415
|
+
variant: "secondary",
|
|
21325
21416
|
className: "w-full",
|
|
21326
21417
|
onClick: () => {
|
|
21327
21418
|
setIsTokenSymbolSelector(true);
|
|
@@ -21338,7 +21429,7 @@ function SelectAssetRoute(props) {
|
|
|
21338
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)(
|
|
21339
21430
|
Button,
|
|
21340
21431
|
{
|
|
21341
|
-
variant: "
|
|
21432
|
+
variant: "secondary",
|
|
21342
21433
|
className: "w-full",
|
|
21343
21434
|
onClick: () => {
|
|
21344
21435
|
const targetWarpRoute = hyperlaneWarpRoutes.find((route) => {
|
|
@@ -21384,13 +21475,13 @@ function SelectAssetRoute(props) {
|
|
|
21384
21475
|
] })
|
|
21385
21476
|
] });
|
|
21386
21477
|
}
|
|
21387
|
-
var import_lucide_react63,
|
|
21478
|
+
var import_lucide_react63, import_react71, import_jsx_runtime100;
|
|
21388
21479
|
var init_SelectAssetRoute = __esm({
|
|
21389
21480
|
"src/internal/components/SendMenu/hyperbridge/steps/SelectAssetRoute.tsx"() {
|
|
21390
21481
|
init_tokens();
|
|
21391
21482
|
init_i18n();
|
|
21392
21483
|
import_lucide_react63 = require("lucide-react");
|
|
21393
|
-
|
|
21484
|
+
import_react71 = require("react");
|
|
21394
21485
|
init_button();
|
|
21395
21486
|
init_useFlowSelector();
|
|
21396
21487
|
init_ResolveChainIcon();
|
|
@@ -21418,7 +21509,7 @@ function HyperlaneBridge() {
|
|
|
21418
21509
|
const { hyperlaneWarpRoutes, isLoadingWarpRoutes } = useHyperlaneRoutes();
|
|
21419
21510
|
const { directWalletProfile } = useAvailableSenders();
|
|
21420
21511
|
useMenuTitle(hyperlaneWarpRoutes);
|
|
21421
|
-
(0,
|
|
21512
|
+
(0, import_react72.useEffect)(
|
|
21422
21513
|
() => () => {
|
|
21423
21514
|
useBridgeStore.getState().resetSelections();
|
|
21424
21515
|
},
|
|
@@ -21452,10 +21543,10 @@ function HyperlaneBridge() {
|
|
|
21452
21543
|
bridgeStep === "tx-history-details" && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(HistoryDetailsStep, {})
|
|
21453
21544
|
] });
|
|
21454
21545
|
}
|
|
21455
|
-
var
|
|
21546
|
+
var import_react72, import_jsx_runtime101;
|
|
21456
21547
|
var init_HyperlaneBridge = __esm({
|
|
21457
21548
|
"src/internal/components/SendMenu/hyperbridge/HyperlaneBridge.tsx"() {
|
|
21458
|
-
|
|
21549
|
+
import_react72 = require("react");
|
|
21459
21550
|
init_SenderSelector();
|
|
21460
21551
|
init_useAvailableSenders();
|
|
21461
21552
|
init_useBridge();
|
|
@@ -21473,7 +21564,7 @@ function BridgeHistorySwitch(props) {
|
|
|
21473
21564
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
21474
21565
|
const isUiLocked = useFlowSelectorStore((st) => st.isUiLocked);
|
|
21475
21566
|
const bridgeStep = useBridgeStore((st) => st.bridgeStep);
|
|
21476
|
-
const lastBridgeStepRef = (0,
|
|
21567
|
+
const lastBridgeStepRef = (0, import_react73.useRef)(null);
|
|
21477
21568
|
if (selectorFlow !== "bridge" || bridgeStep === "confirm" || bridgeStep === "success" || bridgeStep === "sender-selector" || bridgeStep === "select-token" || bridgeStep === "tx-history-details") {
|
|
21478
21569
|
return null;
|
|
21479
21570
|
}
|
|
@@ -21491,10 +21582,10 @@ function BridgeHistorySwitch(props) {
|
|
|
21491
21582
|
}
|
|
21492
21583
|
);
|
|
21493
21584
|
}
|
|
21494
|
-
var
|
|
21585
|
+
var import_react73, import_jsx_runtime102;
|
|
21495
21586
|
var init_HistorySwitch = __esm({
|
|
21496
21587
|
"src/internal/components/SendMenu/hyperbridge/components/HistorySwitch.tsx"() {
|
|
21497
|
-
|
|
21588
|
+
import_react73 = require("react");
|
|
21498
21589
|
init_switch();
|
|
21499
21590
|
init_useFlowSelector();
|
|
21500
21591
|
init_useBridgeStore();
|
|
@@ -21585,11 +21676,11 @@ function looksLikeNickname(input) {
|
|
|
21585
21676
|
}
|
|
21586
21677
|
function useNicknameResolve(input, options) {
|
|
21587
21678
|
const { enabled = true, chainId } = options;
|
|
21588
|
-
const [debouncedInput, setDebouncedInput] = (0,
|
|
21589
|
-
const [isDebouncing, setIsDebouncing] = (0,
|
|
21679
|
+
const [debouncedInput, setDebouncedInput] = (0, import_react74.useState)("");
|
|
21680
|
+
const [isDebouncing, setIsDebouncing] = (0, import_react74.useState)(false);
|
|
21590
21681
|
const normalized = normalizeNickname(input);
|
|
21591
21682
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
21592
|
-
(0,
|
|
21683
|
+
(0, import_react74.useEffect)(() => {
|
|
21593
21684
|
if (!isNicknameInput || !enabled) {
|
|
21594
21685
|
setDebouncedInput("");
|
|
21595
21686
|
setIsDebouncing(false);
|
|
@@ -21615,7 +21706,7 @@ function useNicknameResolve(input, options) {
|
|
|
21615
21706
|
const isNotFound = query.isError && query.error?.code === "NICKNAME_NOT_FOUND";
|
|
21616
21707
|
const isWalletNotSetup = !!query.data && query.data.resolvedTarget === null;
|
|
21617
21708
|
const isFrozen = query.data?.isFrozen ?? false;
|
|
21618
|
-
const fingerprintVerification = (0,
|
|
21709
|
+
const fingerprintVerification = (0, import_react74.useMemo)(() => {
|
|
21619
21710
|
if (!query.data?.owner || !query.data?.fingerprint) {
|
|
21620
21711
|
return null;
|
|
21621
21712
|
}
|
|
@@ -21637,11 +21728,11 @@ function useNicknameResolve(input, options) {
|
|
|
21637
21728
|
resolvedAddress
|
|
21638
21729
|
};
|
|
21639
21730
|
}
|
|
21640
|
-
var import_react_query48,
|
|
21731
|
+
var import_react_query48, import_react74, DEBOUNCE_MS2;
|
|
21641
21732
|
var init_useNicknameResolve = __esm({
|
|
21642
21733
|
"src/hooks/useNicknameResolve.ts"() {
|
|
21643
21734
|
import_react_query48 = require("@tanstack/react-query");
|
|
21644
|
-
|
|
21735
|
+
import_react74 = require("react");
|
|
21645
21736
|
init_nickname();
|
|
21646
21737
|
init_profile();
|
|
21647
21738
|
init_nickname_validation();
|
|
@@ -21654,10 +21745,10 @@ var init_useNicknameResolve = __esm({
|
|
|
21654
21745
|
function useSendTransaction() {
|
|
21655
21746
|
const session = useSession((st) => st.session);
|
|
21656
21747
|
const address = useSession((st) => st.address);
|
|
21657
|
-
const [isLoading, setIsLoading] = (0,
|
|
21658
|
-
const [error, setError] = (0,
|
|
21659
|
-
const [userOpHash, setUserOpHash] = (0,
|
|
21660
|
-
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)(
|
|
21661
21752
|
async (params) => {
|
|
21662
21753
|
if (!session || !address) {
|
|
21663
21754
|
setError("No active session");
|
|
@@ -21754,7 +21845,7 @@ function useSendTransaction() {
|
|
|
21754
21845
|
},
|
|
21755
21846
|
[session, address]
|
|
21756
21847
|
);
|
|
21757
|
-
const reset = (0,
|
|
21848
|
+
const reset = (0, import_react75.useCallback)(() => {
|
|
21758
21849
|
setError(null);
|
|
21759
21850
|
setUserOpHash(null);
|
|
21760
21851
|
setIsLoading(false);
|
|
@@ -21767,10 +21858,10 @@ function useSendTransaction() {
|
|
|
21767
21858
|
reset
|
|
21768
21859
|
};
|
|
21769
21860
|
}
|
|
21770
|
-
var
|
|
21861
|
+
var import_react75, import_viem14, ERC20_TRANSFER_ABI, ERC721_SAFE_TRANSFER_ABI, ERC1155_SAFE_TRANSFER_ABI;
|
|
21771
21862
|
var init_useSendTransaction = __esm({
|
|
21772
21863
|
"src/hooks/useSendTransaction.ts"() {
|
|
21773
|
-
|
|
21864
|
+
import_react75 = require("react");
|
|
21774
21865
|
import_viem14 = require("viem");
|
|
21775
21866
|
init_SessionContext();
|
|
21776
21867
|
init_account2();
|
|
@@ -21921,7 +22012,7 @@ var init_AssetInputIcon = __esm({
|
|
|
21921
22012
|
|
|
21922
22013
|
// src/internal/components/SendMenu/send/components/NftDisplayCard.tsx
|
|
21923
22014
|
function NftDisplayCard({ asset }) {
|
|
21924
|
-
const [imageError, setImageError] = (0,
|
|
22015
|
+
const [imageError, setImageError] = (0, import_react76.useState)(false);
|
|
21925
22016
|
const nftImage = asset.image || asset.nftMetadata?.image;
|
|
21926
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: [
|
|
21927
22018
|
nftImage && !imageError ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
@@ -21949,11 +22040,11 @@ function NftDisplayCard({ asset }) {
|
|
|
21949
22040
|
] })
|
|
21950
22041
|
] });
|
|
21951
22042
|
}
|
|
21952
|
-
var import_lucide_react65,
|
|
22043
|
+
var import_lucide_react65, import_react76, import_jsx_runtime104;
|
|
21953
22044
|
var init_NftDisplayCard = __esm({
|
|
21954
22045
|
"src/internal/components/SendMenu/send/components/NftDisplayCard.tsx"() {
|
|
21955
22046
|
import_lucide_react65 = require("lucide-react");
|
|
21956
|
-
|
|
22047
|
+
import_react76 = require("react");
|
|
21957
22048
|
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
21958
22049
|
}
|
|
21959
22050
|
});
|
|
@@ -22300,7 +22391,7 @@ function InputSendStep(props) {
|
|
|
22300
22391
|
Button,
|
|
22301
22392
|
{
|
|
22302
22393
|
disabled: isAssetsLoading,
|
|
22303
|
-
variant: "
|
|
22394
|
+
variant: "secondary",
|
|
22304
22395
|
size: "large",
|
|
22305
22396
|
onClick: () => setTxStep("select-asset"),
|
|
22306
22397
|
className: "justify-between",
|
|
@@ -22604,10 +22695,10 @@ function SendMenu() {
|
|
|
22604
22695
|
userOpHash,
|
|
22605
22696
|
reset
|
|
22606
22697
|
} = useSendTransaction();
|
|
22607
|
-
(0,
|
|
22698
|
+
(0, import_react77.useEffect)(() => {
|
|
22608
22699
|
useFlowSelectorStore.getState().setIsUiLocked(isAssetsLoading || isTransactionPending);
|
|
22609
22700
|
}, [isAssetsLoading, isTransactionPending]);
|
|
22610
|
-
(0,
|
|
22701
|
+
(0, import_react77.useEffect)(() => {
|
|
22611
22702
|
useFlowSelectorStore.getState().setError(sendTransactionError || null);
|
|
22612
22703
|
}, [sendTransactionError]);
|
|
22613
22704
|
const {
|
|
@@ -22622,7 +22713,7 @@ function SendMenu() {
|
|
|
22622
22713
|
} = useSendStore();
|
|
22623
22714
|
const isNft = isNftAsset3(selectedAsset);
|
|
22624
22715
|
const isSecurity = isSecurityToken2(selectedAsset);
|
|
22625
|
-
(0,
|
|
22716
|
+
(0, import_react77.useEffect)(
|
|
22626
22717
|
() => () => {
|
|
22627
22718
|
setSelectedAsset(null);
|
|
22628
22719
|
setRecipient("");
|
|
@@ -22632,7 +22723,7 @@ function SendMenu() {
|
|
|
22632
22723
|
},
|
|
22633
22724
|
[]
|
|
22634
22725
|
);
|
|
22635
|
-
(0,
|
|
22726
|
+
(0, import_react77.useEffect)(() => {
|
|
22636
22727
|
const shouldSetNativeAsset = assets.length > 0 && !selectedAsset;
|
|
22637
22728
|
if (!shouldSetNativeAsset) return;
|
|
22638
22729
|
const native = assets.find((a) => a.type === "native");
|
|
@@ -22643,7 +22734,7 @@ function SendMenu() {
|
|
|
22643
22734
|
const isNicknameInput = looksLikeNickname(recipient);
|
|
22644
22735
|
const resolvedNicknameData = useNicknameResolve(recipient, { enabled: isNicknameInput, chainId: activeChainId });
|
|
22645
22736
|
const effectiveAddress = isNicknameInput ? resolvedNicknameData?.resolvedAddress : recipient;
|
|
22646
|
-
const complianceAmount = (0,
|
|
22737
|
+
const complianceAmount = (0, import_react77.useMemo)(() => {
|
|
22647
22738
|
if (!isSecurity || !amount || !selectedAsset) return void 0;
|
|
22648
22739
|
try {
|
|
22649
22740
|
return (0, import_viem18.parseUnits)(amount, selectedAsset.decimals || 18);
|
|
@@ -22658,7 +22749,7 @@ function SendMenu() {
|
|
|
22658
22749
|
enabled: isSecurity && !!effectiveAddress && !!complianceAmount,
|
|
22659
22750
|
chainId: activeChainId
|
|
22660
22751
|
});
|
|
22661
|
-
(0,
|
|
22752
|
+
(0, import_react77.useEffect)(() => {
|
|
22662
22753
|
const updateMenuTitle = useFlowSelectorStore.getState().setMenuTitle;
|
|
22663
22754
|
switch (true) {
|
|
22664
22755
|
case txStep === "select-asset":
|
|
@@ -22722,7 +22813,7 @@ function SendMenu() {
|
|
|
22722
22813
|
] })
|
|
22723
22814
|
] });
|
|
22724
22815
|
}
|
|
22725
|
-
var import_lucide_react69,
|
|
22816
|
+
var import_lucide_react69, import_react77, import_viem18, import_jsx_runtime109;
|
|
22726
22817
|
var init_SendMenu = __esm({
|
|
22727
22818
|
"src/internal/components/SendMenu/send/SendMenu.tsx"() {
|
|
22728
22819
|
init_SessionContext();
|
|
@@ -22731,7 +22822,7 @@ var init_SendMenu = __esm({
|
|
|
22731
22822
|
init_useSendTransaction();
|
|
22732
22823
|
init_useT();
|
|
22733
22824
|
import_lucide_react69 = require("lucide-react");
|
|
22734
|
-
|
|
22825
|
+
import_react77 = require("react");
|
|
22735
22826
|
import_viem18 = require("viem");
|
|
22736
22827
|
init_useBlockscoutAssets();
|
|
22737
22828
|
init_useLayoutDataStore();
|
|
@@ -22775,7 +22866,7 @@ function SelectorFlowButtons() {
|
|
|
22775
22866
|
Button,
|
|
22776
22867
|
{
|
|
22777
22868
|
size: "medium",
|
|
22778
|
-
variant: selectorFlow === "send" ? "default" : "
|
|
22869
|
+
variant: selectorFlow === "send" ? "default" : "secondary",
|
|
22779
22870
|
className: "flex-1 uppercase",
|
|
22780
22871
|
onClick: () => {
|
|
22781
22872
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -22791,7 +22882,7 @@ function SelectorFlowButtons() {
|
|
|
22791
22882
|
Button,
|
|
22792
22883
|
{
|
|
22793
22884
|
size: "medium",
|
|
22794
|
-
variant: selectorFlow === "bridge" ? "default" : "
|
|
22885
|
+
variant: selectorFlow === "bridge" ? "default" : "secondary",
|
|
22795
22886
|
className: "flex-1 uppercase",
|
|
22796
22887
|
onClick: () => {
|
|
22797
22888
|
useFlowSelectorStore.getState().setError(null);
|
|
@@ -22816,7 +22907,7 @@ function SendFlowSelector() {
|
|
|
22816
22907
|
const error = useFlowSelectorStore((st) => st.error);
|
|
22817
22908
|
const menuTitle = useFlowSelectorStore((st) => st.menuTitle);
|
|
22818
22909
|
const selectorFlow = useFlowSelectorStore((st) => st.flow);
|
|
22819
|
-
(0,
|
|
22910
|
+
(0, import_react78.useEffect)(
|
|
22820
22911
|
() => () => {
|
|
22821
22912
|
useFlowSelectorStore.getState().setError(null);
|
|
22822
22913
|
},
|
|
@@ -22893,12 +22984,12 @@ function SendFlowSelector() {
|
|
|
22893
22984
|
}
|
|
22894
22985
|
);
|
|
22895
22986
|
}
|
|
22896
|
-
var import_lucide_react70,
|
|
22987
|
+
var import_lucide_react70, import_react78, import_jsx_runtime110, SELECTOR_FLOW;
|
|
22897
22988
|
var init_SendFlowSelector = __esm({
|
|
22898
22989
|
"src/internal/components/SendMenu/SendFlowSelector.tsx"() {
|
|
22899
22990
|
init_i18n();
|
|
22900
22991
|
import_lucide_react70 = require("lucide-react");
|
|
22901
|
-
|
|
22992
|
+
import_react78 = require("react");
|
|
22902
22993
|
init_useLayoutDataStore();
|
|
22903
22994
|
init_useLayoutStore();
|
|
22904
22995
|
init_utils2();
|
|
@@ -22953,12 +23044,12 @@ function getServerSnapshot() {
|
|
|
22953
23044
|
return false;
|
|
22954
23045
|
}
|
|
22955
23046
|
function useProMode() {
|
|
22956
|
-
return (0,
|
|
23047
|
+
return (0, import_react79.useSyncExternalStore)(subscribe, getSnapshot, getServerSnapshot);
|
|
22957
23048
|
}
|
|
22958
|
-
var
|
|
23049
|
+
var import_react79, STORAGE_KEY, EVENT_NAME;
|
|
22959
23050
|
var init_pro_mode = __esm({
|
|
22960
23051
|
"src/internal/lib/pro-mode.ts"() {
|
|
22961
|
-
|
|
23052
|
+
import_react79 = require("react");
|
|
22962
23053
|
STORAGE_KEY = "embarkai_pro_mode";
|
|
22963
23054
|
EVENT_NAME = "embarkai-pro-mode-changed";
|
|
22964
23055
|
}
|
|
@@ -23018,7 +23109,7 @@ function useSettingsButtons() {
|
|
|
23018
23109
|
if (proMode) {
|
|
23019
23110
|
settingsButtons.push({ id: "devices" /* DEVICES */, name: "Guardians", Icon: import_lucide_react72.HardDrive });
|
|
23020
23111
|
}
|
|
23021
|
-
(0,
|
|
23112
|
+
(0, import_react80.useEffect)(() => {
|
|
23022
23113
|
const cssvEl = document.querySelector(".embarkai-ui-scope");
|
|
23023
23114
|
if (!cssvEl || !window?.getComputedStyle) {
|
|
23024
23115
|
return;
|
|
@@ -23082,7 +23173,7 @@ function SettingsMenu() {
|
|
|
23082
23173
|
}
|
|
23083
23174
|
);
|
|
23084
23175
|
}
|
|
23085
|
-
var import_react_query49, import_lucide_react72,
|
|
23176
|
+
var import_react_query49, import_lucide_react72, import_react80, import_jsx_runtime112;
|
|
23086
23177
|
var init_SettingsMenu = __esm({
|
|
23087
23178
|
"src/internal/components/SettingsMenu/SettingsMenu.tsx"() {
|
|
23088
23179
|
init_ProviderContext();
|
|
@@ -23090,7 +23181,7 @@ var init_SettingsMenu = __esm({
|
|
|
23090
23181
|
init_i18n();
|
|
23091
23182
|
import_react_query49 = require("@tanstack/react-query");
|
|
23092
23183
|
import_lucide_react72 = require("lucide-react");
|
|
23093
|
-
|
|
23184
|
+
import_react80 = require("react");
|
|
23094
23185
|
init_nickname();
|
|
23095
23186
|
init_profile();
|
|
23096
23187
|
init_useLayoutDataStore();
|
|
@@ -24032,7 +24123,7 @@ function TransactionsMenu() {
|
|
|
24032
24123
|
const { t } = useT();
|
|
24033
24124
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24034
24125
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
24035
|
-
const [expandedGroups, setExpandedGroups] = (0,
|
|
24126
|
+
const [expandedGroups, setExpandedGroups] = (0, import_react81.useState)({});
|
|
24036
24127
|
const historySupported = isTransactionHistorySupported(chainConfig?.id);
|
|
24037
24128
|
const {
|
|
24038
24129
|
data: txHistoryGroups = [],
|
|
@@ -24045,7 +24136,7 @@ function TransactionsMenu() {
|
|
|
24045
24136
|
queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address],
|
|
24046
24137
|
queryFn: () => getTransactionsListQuery({ address, chainConfig })
|
|
24047
24138
|
});
|
|
24048
|
-
const refreshTxHistory = (0,
|
|
24139
|
+
const refreshTxHistory = (0, import_react81.useCallback)(
|
|
24049
24140
|
() => qc.invalidateQueries({ queryKey: [TRANSACTIONS_HISTORY_QUERY_KEY, chainConfig.id, address] }),
|
|
24050
24141
|
[qc, chainConfig.id, address]
|
|
24051
24142
|
);
|
|
@@ -24094,14 +24185,14 @@ function TransactionsMenu() {
|
|
|
24094
24185
|
}
|
|
24095
24186
|
);
|
|
24096
24187
|
}
|
|
24097
|
-
var import_react_query50, import_lucide_react75,
|
|
24188
|
+
var import_react_query50, import_lucide_react75, import_react81, import_jsx_runtime116;
|
|
24098
24189
|
var init_TransactionsMenu = __esm({
|
|
24099
24190
|
"src/internal/components/TransactionsMenu/TransactionsMenu.tsx"() {
|
|
24100
24191
|
init_SessionContext();
|
|
24101
24192
|
init_i18n();
|
|
24102
24193
|
import_react_query50 = require("@tanstack/react-query");
|
|
24103
24194
|
import_lucide_react75 = require("lucide-react");
|
|
24104
|
-
|
|
24195
|
+
import_react81 = require("react");
|
|
24105
24196
|
init_useLayoutDataStore();
|
|
24106
24197
|
init_useLayoutStore();
|
|
24107
24198
|
init_Expandable2();
|
|
@@ -24299,7 +24390,7 @@ function usePageMapper() {
|
|
|
24299
24390
|
setIsDialogOpen,
|
|
24300
24391
|
setIsDialogClosing
|
|
24301
24392
|
} = useLayoutStore();
|
|
24302
|
-
const closeDialog = (0,
|
|
24393
|
+
const closeDialog = (0, import_react82.useCallback)(() => {
|
|
24303
24394
|
setIsDialogClosing(true);
|
|
24304
24395
|
setTimeout(() => {
|
|
24305
24396
|
setDialogContent(null);
|
|
@@ -24310,7 +24401,7 @@ function usePageMapper() {
|
|
|
24310
24401
|
setIsDialogOpen(false);
|
|
24311
24402
|
}, CLEAR_DIALOG_TIMEOUT);
|
|
24312
24403
|
}, [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogForced, setIsDialogOpen, setIsDialogClosing]);
|
|
24313
|
-
const openDialog = (0,
|
|
24404
|
+
const openDialog = (0, import_react82.useCallback)(
|
|
24314
24405
|
(pageItem) => {
|
|
24315
24406
|
const PageContentComponent = pageItem.component;
|
|
24316
24407
|
setDialogTitle(pageItem.title);
|
|
@@ -24320,7 +24411,7 @@ function usePageMapper() {
|
|
|
24320
24411
|
},
|
|
24321
24412
|
[setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
|
|
24322
24413
|
);
|
|
24323
|
-
(0,
|
|
24414
|
+
(0, import_react82.useEffect)(() => {
|
|
24324
24415
|
if (page === null) return closeDialog();
|
|
24325
24416
|
const pageItem = PAGE_MAP[page];
|
|
24326
24417
|
if (!pageItem) {
|
|
@@ -24331,10 +24422,10 @@ function usePageMapper() {
|
|
|
24331
24422
|
openDialog(pageItem);
|
|
24332
24423
|
}, [page, closeDialog, openDialog]);
|
|
24333
24424
|
}
|
|
24334
|
-
var
|
|
24425
|
+
var import_react82, import_jsx_runtime117, CLEAR_DIALOG_TIMEOUT;
|
|
24335
24426
|
var init_usePageMapper = __esm({
|
|
24336
24427
|
"src/internal/hooks/usePageMapper.tsx"() {
|
|
24337
|
-
|
|
24428
|
+
import_react82 = require("react");
|
|
24338
24429
|
init_PageMap();
|
|
24339
24430
|
init_constants();
|
|
24340
24431
|
init_useLayoutDataStore();
|
|
@@ -24356,26 +24447,26 @@ function useSettingsNotifications() {
|
|
|
24356
24447
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
24357
24448
|
queryFn: getUserProfile
|
|
24358
24449
|
});
|
|
24359
|
-
(0,
|
|
24450
|
+
(0, import_react83.useEffect)(() => {
|
|
24360
24451
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
24361
24452
|
setSettingsNotifications({
|
|
24362
24453
|
...COMPLETE_KYC_PROGRESS,
|
|
24363
24454
|
status: isKYCVerified ? "resolved" : "active"
|
|
24364
24455
|
});
|
|
24365
24456
|
}, [userProfile, setSettingsNotifications]);
|
|
24366
|
-
(0,
|
|
24457
|
+
(0, import_react83.useEffect)(() => {
|
|
24367
24458
|
setSettingsNotifications({
|
|
24368
24459
|
...EMAIL_NOT_CONNECTED_NOTIFICATION,
|
|
24369
24460
|
status: hasEmail ? "resolved" : "active"
|
|
24370
24461
|
});
|
|
24371
24462
|
}, [hasEmail, setSettingsNotifications]);
|
|
24372
24463
|
}
|
|
24373
|
-
var import_react_query51,
|
|
24464
|
+
var import_react_query51, import_react83, EMAIL_NOT_CONNECTED_NOTIFICATION, COMPLETE_KYC_PROGRESS;
|
|
24374
24465
|
var init_useSettingsNotifications = __esm({
|
|
24375
24466
|
"src/internal/hooks/useSettingsNotifications.ts"() {
|
|
24376
24467
|
init_SessionContext();
|
|
24377
24468
|
import_react_query51 = require("@tanstack/react-query");
|
|
24378
|
-
|
|
24469
|
+
import_react83 = require("react");
|
|
24379
24470
|
init_auth();
|
|
24380
24471
|
init_profile();
|
|
24381
24472
|
init_useLayoutDataStore();
|
|
@@ -24398,7 +24489,7 @@ var init_package = __esm({
|
|
|
24398
24489
|
"package.json"() {
|
|
24399
24490
|
package_default = {
|
|
24400
24491
|
name: "@embarkai/ui-kit",
|
|
24401
|
-
version: "0.4.
|
|
24492
|
+
version: "0.4.42",
|
|
24402
24493
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24403
24494
|
type: "module",
|
|
24404
24495
|
main: "./dist/index.cjs",
|
|
@@ -24625,11 +24716,11 @@ function Header() {
|
|
|
24625
24716
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
24626
24717
|
const { t } = useT();
|
|
24627
24718
|
const proMode = useProMode();
|
|
24628
|
-
const [proToast, setProToast] = (0,
|
|
24629
|
-
const [copied, setCopied] = (0,
|
|
24630
|
-
const clickCountRef = (0,
|
|
24631
|
-
const clickTimerRef = (0,
|
|
24632
|
-
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)(() => {
|
|
24633
24724
|
clickCountRef.current += 1;
|
|
24634
24725
|
if (clickTimerRef.current) {
|
|
24635
24726
|
clearTimeout(clickTimerRef.current);
|
|
@@ -24729,7 +24820,7 @@ function Header() {
|
|
|
24729
24820
|
}
|
|
24730
24821
|
);
|
|
24731
24822
|
}
|
|
24732
|
-
var import_react_query53, import_lucide_react77,
|
|
24823
|
+
var import_react_query53, import_lucide_react77, import_react84, import_jsx_runtime119;
|
|
24733
24824
|
var init_Header = __esm({
|
|
24734
24825
|
"src/internal/components/Header/Header.tsx"() {
|
|
24735
24826
|
init_LumiaIcon3();
|
|
@@ -24739,7 +24830,7 @@ var init_Header = __esm({
|
|
|
24739
24830
|
init_useT();
|
|
24740
24831
|
import_react_query53 = require("@tanstack/react-query");
|
|
24741
24832
|
import_lucide_react77 = require("lucide-react");
|
|
24742
|
-
|
|
24833
|
+
import_react84 = require("react");
|
|
24743
24834
|
init_PositiveIcon();
|
|
24744
24835
|
init_auth();
|
|
24745
24836
|
init_profile();
|
|
@@ -24767,26 +24858,26 @@ function useDecideContentStyles() {
|
|
|
24767
24858
|
return {
|
|
24768
24859
|
isClosing,
|
|
24769
24860
|
isMobileView,
|
|
24770
|
-
style: (0,
|
|
24861
|
+
style: (0, import_lodash_es10.merge)({}, mobileStyles)
|
|
24771
24862
|
};
|
|
24772
24863
|
}
|
|
24773
|
-
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;
|
|
24774
24865
|
var init_dialog = __esm({
|
|
24775
24866
|
"src/internal/components/ui/dialog.tsx"() {
|
|
24776
24867
|
init_utils2();
|
|
24777
24868
|
init_SessionContext();
|
|
24778
24869
|
init_i18n();
|
|
24779
24870
|
DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
24780
|
-
|
|
24871
|
+
import_lodash_es10 = require("lodash-es");
|
|
24781
24872
|
import_lucide_react78 = require("lucide-react");
|
|
24782
|
-
|
|
24873
|
+
import_react85 = require("react");
|
|
24783
24874
|
init_useLayoutDataStore();
|
|
24784
24875
|
init_useLayoutStore();
|
|
24785
24876
|
init_button();
|
|
24786
24877
|
import_jsx_runtime120 = require("react/jsx-runtime");
|
|
24787
24878
|
Dialog = DialogPrimitive.Root;
|
|
24788
24879
|
DialogPortal = DialogPrimitive.Portal;
|
|
24789
|
-
DialogOverlay = (0,
|
|
24880
|
+
DialogOverlay = (0, import_react85.forwardRef)(
|
|
24790
24881
|
({ className, closing, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
24791
24882
|
DialogPrimitive.Overlay,
|
|
24792
24883
|
{
|
|
@@ -24808,7 +24899,7 @@ var init_dialog = __esm({
|
|
|
24808
24899
|
border: "1px solid var(--ui-kit-bd)",
|
|
24809
24900
|
boxShadow: "var(--ui-kit-shadow, 0px 4px 10px var(--ui-kit-shadow-c, rgba(0, 0, 0, 0.1)))"
|
|
24810
24901
|
};
|
|
24811
|
-
DialogContent = (0,
|
|
24902
|
+
DialogContent = (0, import_react85.forwardRef)(
|
|
24812
24903
|
({ className, children, colorMode, ...props }, ref) => {
|
|
24813
24904
|
const { t, i18n } = useT();
|
|
24814
24905
|
const isSessionLoading = useSession((st) => st.isLoading);
|
|
@@ -24911,7 +25002,7 @@ var init_dialog = __esm({
|
|
|
24911
25002
|
DialogHeader.displayName = "DialogHeader";
|
|
24912
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 });
|
|
24913
25004
|
DialogFooter.displayName = "DialogFooter";
|
|
24914
|
-
DialogTitle = (0,
|
|
25005
|
+
DialogTitle = (0, import_react85.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
24915
25006
|
DialogPrimitive.Title,
|
|
24916
25007
|
{
|
|
24917
25008
|
ref,
|
|
@@ -24920,7 +25011,7 @@ var init_dialog = __esm({
|
|
|
24920
25011
|
}
|
|
24921
25012
|
));
|
|
24922
25013
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
24923
|
-
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 }));
|
|
24924
25015
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
24925
25016
|
}
|
|
24926
25017
|
});
|
|
@@ -24945,7 +25036,7 @@ function Dialog2() {
|
|
|
24945
25036
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
24946
25037
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
24947
25038
|
const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
|
|
24948
|
-
(0,
|
|
25039
|
+
(0, import_react86.useEffect)(() => setIsSettings(!!session), [session, setIsSettings]);
|
|
24949
25040
|
usePageMapper();
|
|
24950
25041
|
useAutoConnect();
|
|
24951
25042
|
useBackupStatusChanges();
|
|
@@ -24983,13 +25074,13 @@ function Dialog2() {
|
|
|
24983
25074
|
}
|
|
24984
25075
|
);
|
|
24985
25076
|
}
|
|
24986
|
-
var import_framer_motion,
|
|
25077
|
+
var import_framer_motion, import_react86, import_jsx_runtime122;
|
|
24987
25078
|
var init_Dialog = __esm({
|
|
24988
25079
|
"src/internal/components/Dialog/Dialog.tsx"() {
|
|
24989
25080
|
init_ProviderContext();
|
|
24990
25081
|
init_SessionContext();
|
|
24991
25082
|
import_framer_motion = require("framer-motion");
|
|
24992
|
-
|
|
25083
|
+
import_react86 = require("react");
|
|
24993
25084
|
init_constants();
|
|
24994
25085
|
init_useAutoConnect();
|
|
24995
25086
|
init_useBackupStatusChanges();
|
|
@@ -25015,14 +25106,14 @@ var init_Dialog2 = __esm({
|
|
|
25015
25106
|
});
|
|
25016
25107
|
|
|
25017
25108
|
// src/internal/components/TssManager.tsx
|
|
25018
|
-
var
|
|
25109
|
+
var import_react87, TssManagerWithRef;
|
|
25019
25110
|
var init_TssManager = __esm({
|
|
25020
25111
|
"src/internal/components/TssManager.tsx"() {
|
|
25021
25112
|
init_SessionContext();
|
|
25022
|
-
|
|
25113
|
+
import_react87 = __toESM(require("react"), 1);
|
|
25023
25114
|
init_auth();
|
|
25024
25115
|
init_clients();
|
|
25025
|
-
TssManagerWithRef =
|
|
25116
|
+
TssManagerWithRef = import_react87.default.forwardRef((props, ref) => {
|
|
25026
25117
|
const { mpcPin } = props;
|
|
25027
25118
|
const usePaymaster = useSession((st) => st.usePaymaster);
|
|
25028
25119
|
const publicClient = useSession((st) => st.publicClient);
|
|
@@ -25030,14 +25121,14 @@ var init_TssManager = __esm({
|
|
|
25030
25121
|
const setStatus = useSession((st) => st.setStatus);
|
|
25031
25122
|
const setSession = useSession((st) => st.setSession);
|
|
25032
25123
|
const setAddress = useSession((st) => st.setAddress);
|
|
25033
|
-
const onSessionCreated = (0,
|
|
25124
|
+
const onSessionCreated = (0, import_react87.useCallback)(
|
|
25034
25125
|
(session, address) => {
|
|
25035
25126
|
setSession(session);
|
|
25036
25127
|
setAddress(address);
|
|
25037
25128
|
},
|
|
25038
25129
|
[setSession, setAddress]
|
|
25039
25130
|
);
|
|
25040
|
-
const createSessionWithKeyshare =
|
|
25131
|
+
const createSessionWithKeyshare = import_react87.default.useCallback(
|
|
25041
25132
|
async (userId, hasServerKeyshare, isNewUser) => {
|
|
25042
25133
|
setStatus("checking key management setup...");
|
|
25043
25134
|
await ensureKeyshare(userId, hasServerKeyshare, setStatus, isNewUser);
|
|
@@ -25062,7 +25153,7 @@ var init_TssManager = __esm({
|
|
|
25062
25153
|
},
|
|
25063
25154
|
[setStatus, usePaymaster, activeChainId, publicClient, mpcPin]
|
|
25064
25155
|
);
|
|
25065
|
-
|
|
25156
|
+
import_react87.default.useImperativeHandle(ref, () => ({ createSessionWithKeyshare }), [createSessionWithKeyshare]);
|
|
25066
25157
|
return null;
|
|
25067
25158
|
});
|
|
25068
25159
|
}
|
|
@@ -25090,7 +25181,7 @@ function WalletConnectHandler() {
|
|
|
25090
25181
|
const projectId = providerConfig?.projectId;
|
|
25091
25182
|
const setExternalWallet = useExternalWalletStore((st) => st.setExternalWallet);
|
|
25092
25183
|
const setPendingWalletLogin = useLayoutDataStore((st) => st.setPendingWalletLogin);
|
|
25093
|
-
const onLinkingComplete = (0,
|
|
25184
|
+
const onLinkingComplete = (0, import_react88.useCallback)(
|
|
25094
25185
|
async (success) => {
|
|
25095
25186
|
setIsWalletLinking(false);
|
|
25096
25187
|
if (!success && !passportWalletAddress) {
|
|
@@ -25119,10 +25210,10 @@ function WalletConnectHandler() {
|
|
|
25119
25210
|
},
|
|
25120
25211
|
[qc, passportWalletAddress, setProviderType, setPage, setIsWalletLinking]
|
|
25121
25212
|
);
|
|
25122
|
-
const [hasStartedLinking, setHasStartedLinking] =
|
|
25123
|
-
const [modalWasOpened, setModalWasOpened] =
|
|
25124
|
-
const [pendingModalOpen, setPendingModalOpen] =
|
|
25125
|
-
(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)(() => {
|
|
25126
25217
|
if (isWalletLinking && !hasStartedLinking) {
|
|
25127
25218
|
console.log("[WalletConnectHandler] Starting wallet link flow:", {
|
|
25128
25219
|
isConnected,
|
|
@@ -25160,18 +25251,18 @@ function WalletConnectHandler() {
|
|
|
25160
25251
|
setProviderType,
|
|
25161
25252
|
walletMode
|
|
25162
25253
|
]);
|
|
25163
|
-
(0,
|
|
25254
|
+
(0, import_react88.useEffect)(() => {
|
|
25164
25255
|
if (pendingModalOpen && !isConnected && openConnectModal) {
|
|
25165
25256
|
setPendingModalOpen(false);
|
|
25166
25257
|
openConnectModal();
|
|
25167
25258
|
}
|
|
25168
25259
|
}, [pendingModalOpen, isConnected, openConnectModal]);
|
|
25169
|
-
(0,
|
|
25260
|
+
(0, import_react88.useEffect)(() => {
|
|
25170
25261
|
if (connectModalOpen && hasStartedLinking) {
|
|
25171
25262
|
setModalWasOpened(true);
|
|
25172
25263
|
}
|
|
25173
25264
|
}, [connectModalOpen, hasStartedLinking]);
|
|
25174
|
-
(0,
|
|
25265
|
+
(0, import_react88.useEffect)(() => {
|
|
25175
25266
|
if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
|
|
25176
25267
|
console.log("[WalletConnectHandler] Modal closed without connecting");
|
|
25177
25268
|
onLinkingComplete(false);
|
|
@@ -25179,7 +25270,7 @@ function WalletConnectHandler() {
|
|
|
25179
25270
|
setModalWasOpened(false);
|
|
25180
25271
|
}
|
|
25181
25272
|
}, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
|
|
25182
|
-
(0,
|
|
25273
|
+
(0, import_react88.useEffect)(() => {
|
|
25183
25274
|
if (isWalletLinking) {
|
|
25184
25275
|
const timeout = setTimeout(() => {
|
|
25185
25276
|
console.warn("[WalletConnectHandler] Wallet linking timed out, resetting state");
|
|
@@ -25299,7 +25390,7 @@ function WalletConnectHandler() {
|
|
|
25299
25390
|
setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
|
|
25300
25391
|
}
|
|
25301
25392
|
});
|
|
25302
|
-
(0,
|
|
25393
|
+
(0, import_react88.useEffect)(() => {
|
|
25303
25394
|
if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking && modalWasOpened && !pendingModalOpen) {
|
|
25304
25395
|
console.log("[WalletConnectHandler] handleWalletSign triggered");
|
|
25305
25396
|
if (!passportWalletAddress) {
|
|
@@ -25309,7 +25400,7 @@ function WalletConnectHandler() {
|
|
|
25309
25400
|
handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
|
|
25310
25401
|
}
|
|
25311
25402
|
}, [chain, isConnected, walletAddress, isWalletLinking, hasStartedLinking, modalWasOpened, pendingModalOpen]);
|
|
25312
|
-
(0,
|
|
25403
|
+
(0, import_react88.useEffect)(() => {
|
|
25313
25404
|
if (isConnected && !chain?.id && isWalletLinking && hasStartedLinking && !connectModalOpen && !isWalletSigning) {
|
|
25314
25405
|
const timeout = setTimeout(() => {
|
|
25315
25406
|
console.warn("[WalletConnectHandler] Wallet connected but chain info missing, resetting");
|
|
@@ -25331,7 +25422,7 @@ function WalletConnectHandler() {
|
|
|
25331
25422
|
]);
|
|
25332
25423
|
return null;
|
|
25333
25424
|
}
|
|
25334
|
-
var import_rainbowkit2, import_react_query54,
|
|
25425
|
+
var import_rainbowkit2, import_react_query54, import_react88, import_wagmi6;
|
|
25335
25426
|
var init_WalletConnectHandler = __esm({
|
|
25336
25427
|
"src/internal/components/WalletConnectHandler.tsx"() {
|
|
25337
25428
|
init_ProviderContext();
|
|
@@ -25339,7 +25430,7 @@ var init_WalletConnectHandler = __esm({
|
|
|
25339
25430
|
init_linkedProfiles();
|
|
25340
25431
|
import_rainbowkit2 = require("@rainbow-me/rainbowkit");
|
|
25341
25432
|
import_react_query54 = require("@tanstack/react-query");
|
|
25342
|
-
|
|
25433
|
+
import_react88 = __toESM(require("react"), 1);
|
|
25343
25434
|
import_wagmi6 = require("wagmi");
|
|
25344
25435
|
init_wallet();
|
|
25345
25436
|
init_AuthMenu2();
|
|
@@ -25360,13 +25451,13 @@ function DirectWalletHandler() {
|
|
|
25360
25451
|
const setExternalChainId = useExternalWalletStore((st) => st.setExternalChainId);
|
|
25361
25452
|
const setConfigMode = useExternalWalletStore((st) => st.setConfigMode);
|
|
25362
25453
|
const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
|
|
25363
|
-
(0,
|
|
25454
|
+
(0, import_react89.useEffect)(() => {
|
|
25364
25455
|
setConfigMode(walletMode);
|
|
25365
25456
|
if (walletMode !== "both") {
|
|
25366
25457
|
setActiveMode(walletMode);
|
|
25367
25458
|
}
|
|
25368
25459
|
}, [walletMode, setConfigMode, setActiveMode]);
|
|
25369
|
-
(0,
|
|
25460
|
+
(0, import_react89.useEffect)(() => {
|
|
25370
25461
|
if (isConnected && address && !isExternalConnected && connector && chain?.id) {
|
|
25371
25462
|
setExternalWallet({
|
|
25372
25463
|
address,
|
|
@@ -25375,17 +25466,17 @@ function DirectWalletHandler() {
|
|
|
25375
25466
|
});
|
|
25376
25467
|
}
|
|
25377
25468
|
}, [isConnected, address, isExternalConnected, connector, chain?.id, setExternalWallet]);
|
|
25378
|
-
(0,
|
|
25469
|
+
(0, import_react89.useEffect)(() => {
|
|
25379
25470
|
if (isExternalConnected && !isConnected) {
|
|
25380
25471
|
clearExternalWallet();
|
|
25381
25472
|
}
|
|
25382
25473
|
}, [isConnected, isExternalConnected, clearExternalWallet]);
|
|
25383
|
-
(0,
|
|
25474
|
+
(0, import_react89.useEffect)(() => {
|
|
25384
25475
|
if (isExternalConnected && isConnected && chain?.id) {
|
|
25385
25476
|
setExternalChainId(chain.id);
|
|
25386
25477
|
}
|
|
25387
25478
|
}, [chain?.id, isConnected, isExternalConnected, setExternalChainId]);
|
|
25388
|
-
(0,
|
|
25479
|
+
(0, import_react89.useEffect)(() => {
|
|
25389
25480
|
if (isExternalConnected && isConnected && address && address !== externalAddress && connector && chain?.id) {
|
|
25390
25481
|
setExternalWallet({
|
|
25391
25482
|
address,
|
|
@@ -25396,10 +25487,10 @@ function DirectWalletHandler() {
|
|
|
25396
25487
|
}, [address, isConnected, isExternalConnected, externalAddress, chain?.id, connector, setExternalWallet]);
|
|
25397
25488
|
return null;
|
|
25398
25489
|
}
|
|
25399
|
-
var
|
|
25490
|
+
var import_react89, import_wagmi7;
|
|
25400
25491
|
var init_DirectWalletHandler = __esm({
|
|
25401
25492
|
"src/internal/components/DirectWalletHandler.tsx"() {
|
|
25402
|
-
|
|
25493
|
+
import_react89 = require("react");
|
|
25403
25494
|
import_wagmi7 = require("wagmi");
|
|
25404
25495
|
init_ProviderContext();
|
|
25405
25496
|
init_useExternalWalletStore();
|
|
@@ -25424,7 +25515,7 @@ function waitForStoreHydration() {
|
|
|
25424
25515
|
}
|
|
25425
25516
|
function SessionProvider({ children }) {
|
|
25426
25517
|
const config = useProviderConfig().config;
|
|
25427
|
-
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
25518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_react90.Fragment, { children: [
|
|
25428
25519
|
children,
|
|
25429
25520
|
config.current?.wallet?.enabled && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(WalletConnectHandler, {}),
|
|
25430
25521
|
config.current?.wallet?.enabled && (config.current?.wallet?.mode === "direct" || config.current?.wallet?.mode === "both") && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DirectWalletHandler, {}),
|
|
@@ -25439,11 +25530,11 @@ function SessionProvider({ children }) {
|
|
|
25439
25530
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Dialog2, {})
|
|
25440
25531
|
] });
|
|
25441
25532
|
}
|
|
25442
|
-
var import_read18,
|
|
25533
|
+
var import_read18, import_react90, import_zustand14, import_middleware4, import_jsx_runtime123, useSession, requireActiveChainId;
|
|
25443
25534
|
var init_SessionContext = __esm({
|
|
25444
25535
|
"src/context/SessionContext.tsx"() {
|
|
25445
25536
|
import_read18 = require("@embarkai/core/read");
|
|
25446
|
-
|
|
25537
|
+
import_react90 = require("react");
|
|
25447
25538
|
import_zustand14 = require("zustand");
|
|
25448
25539
|
import_middleware4 = require("zustand/middleware");
|
|
25449
25540
|
init_BalanceFeedProvider2();
|
|
@@ -28112,7 +28203,7 @@ var init_rainbowkit = __esm({
|
|
|
28112
28203
|
function RainbowKitProvider({ children }) {
|
|
28113
28204
|
const config = useProviderConfig().config;
|
|
28114
28205
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
28115
|
-
const rainbowConfig = (0,
|
|
28206
|
+
const rainbowConfig = (0, import_react91.useMemo)(
|
|
28116
28207
|
() => createRainbowConfig({
|
|
28117
28208
|
projectId: config.current?.wallet?.walletConnectProjectId,
|
|
28118
28209
|
allowedWallets: config.current?.wallet?.allowedWallets,
|
|
@@ -28126,7 +28217,7 @@ function RainbowKitProvider({ children }) {
|
|
|
28126
28217
|
config.current?.wallet?.walletConnectProjectId
|
|
28127
28218
|
]
|
|
28128
28219
|
);
|
|
28129
|
-
const customTheme = (0,
|
|
28220
|
+
const customTheme = (0, import_react91.useMemo)(() => {
|
|
28130
28221
|
if (!config.current?.wallet?.enabled) return {};
|
|
28131
28222
|
return colorMode === "dark" ? {
|
|
28132
28223
|
...(0, import_rainbowkit4.darkTheme)(),
|
|
@@ -28143,11 +28234,11 @@ function RainbowKitProvider({ children }) {
|
|
|
28143
28234
|
if (!config.current?.wallet?.enabled) return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_jsx_runtime124.Fragment, { children });
|
|
28144
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 }) });
|
|
28145
28236
|
}
|
|
28146
|
-
var import_rainbowkit4,
|
|
28237
|
+
var import_rainbowkit4, import_react91, import_wagmi9, import_styles, import_jsx_runtime124;
|
|
28147
28238
|
var init_RainbowKitContext = __esm({
|
|
28148
28239
|
"src/context/RainbowKitContext.tsx"() {
|
|
28149
28240
|
import_rainbowkit4 = require("@rainbow-me/rainbowkit");
|
|
28150
|
-
|
|
28241
|
+
import_react91 = require("react");
|
|
28151
28242
|
import_wagmi9 = require("wagmi");
|
|
28152
28243
|
init_rainbowkit();
|
|
28153
28244
|
init_useLayoutStore();
|
|
@@ -28203,10 +28294,10 @@ function clearLegacyWagmiStorage() {
|
|
|
28203
28294
|
}
|
|
28204
28295
|
function Provider(props) {
|
|
28205
28296
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
28206
|
-
const callbacksRef = (0,
|
|
28207
|
-
(0,
|
|
28208
|
-
const config = (0,
|
|
28209
|
-
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) => {
|
|
28210
28301
|
const prev = config.current;
|
|
28211
28302
|
const next = { ...prev };
|
|
28212
28303
|
if (updates.projectId !== void 0) next.projectId = updates.projectId;
|
|
@@ -28240,14 +28331,14 @@ function Provider(props) {
|
|
|
28240
28331
|
if (updates.translations) next.translations = { ...next.translations, ...updates.translations };
|
|
28241
28332
|
config.current = next;
|
|
28242
28333
|
}, []);
|
|
28243
|
-
const updateCallbacks = (0,
|
|
28334
|
+
const updateCallbacks = (0, import_react92.useCallback)((updates) => {
|
|
28244
28335
|
const prev = callbacksRef.current;
|
|
28245
28336
|
const next = updates ? { ...prev, ...updates } : void 0;
|
|
28246
28337
|
callbacksRef.current = next;
|
|
28247
28338
|
}, []);
|
|
28248
|
-
(0,
|
|
28339
|
+
(0, import_react92.useEffect)(() => {
|
|
28249
28340
|
if (typeof window === "undefined" || !projectId) return;
|
|
28250
|
-
const mergedConfig = (0,
|
|
28341
|
+
const mergedConfig = (0, import_lodash_es11.merge)(DEFAULT_PROVIDER_CONFIG, initialConfig);
|
|
28251
28342
|
updateConfig(mergedConfig);
|
|
28252
28343
|
if (mergedConfig.wallet?.enabled) {
|
|
28253
28344
|
clearLegacyWagmiStorage();
|
|
@@ -28265,7 +28356,7 @@ function Provider(props) {
|
|
|
28265
28356
|
useSession.getState().setActiveChainId(mergedConfig.network.chainId);
|
|
28266
28357
|
}
|
|
28267
28358
|
}, [projectId, initialConfig]);
|
|
28268
|
-
(0,
|
|
28359
|
+
(0, import_react92.useEffect)(() => {
|
|
28269
28360
|
if (typeof window === "undefined" || !projectId) return;
|
|
28270
28361
|
try {
|
|
28271
28362
|
(0, import_error_tracking4.initSdkErrorTracking)();
|
|
@@ -28294,7 +28385,7 @@ function Provider(props) {
|
|
|
28294
28385
|
console.error("[PROVIDER] Error setting up iframe manager:", error);
|
|
28295
28386
|
}
|
|
28296
28387
|
}, [projectId]);
|
|
28297
|
-
const contextValue = (0,
|
|
28388
|
+
const contextValue = (0, import_react92.useMemo)(
|
|
28298
28389
|
() => ({
|
|
28299
28390
|
config,
|
|
28300
28391
|
updateConfig,
|
|
@@ -28309,12 +28400,12 @@ function Provider(props) {
|
|
|
28309
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 }) }) }) });
|
|
28310
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 }) }) }) });
|
|
28311
28402
|
}
|
|
28312
|
-
var import_error_tracking4,
|
|
28403
|
+
var import_error_tracking4, import_lodash_es11, import_react92, import_jsx_runtime126, UIContext, useProviderConfig;
|
|
28313
28404
|
var init_ProviderContext = __esm({
|
|
28314
28405
|
"src/context/ProviderContext.tsx"() {
|
|
28315
28406
|
import_error_tracking4 = require("@embarkai/core/internal/error-tracking");
|
|
28316
|
-
|
|
28317
|
-
|
|
28407
|
+
import_lodash_es11 = require("lodash-es");
|
|
28408
|
+
import_react92 = require("react");
|
|
28318
28409
|
init_ErrorBoundary2();
|
|
28319
28410
|
init_initial();
|
|
28320
28411
|
init_iframe_manager();
|
|
@@ -28323,9 +28414,9 @@ var init_ProviderContext = __esm({
|
|
|
28323
28414
|
init_utils11();
|
|
28324
28415
|
init_WagmiContext();
|
|
28325
28416
|
import_jsx_runtime126 = require("react/jsx-runtime");
|
|
28326
|
-
UIContext = (0,
|
|
28417
|
+
UIContext = (0, import_react92.createContext)(void 0);
|
|
28327
28418
|
useProviderConfig = () => {
|
|
28328
|
-
const ctx = (0,
|
|
28419
|
+
const ctx = (0, import_react92.useContext)(UIContext);
|
|
28329
28420
|
if (!ctx) throw new Error("useProviderConfig must be used within a Provider");
|
|
28330
28421
|
return ctx;
|
|
28331
28422
|
};
|
|
@@ -28382,7 +28473,7 @@ __export(index_exports, {
|
|
|
28382
28473
|
useActiveChainId: () => useActiveChainId,
|
|
28383
28474
|
useAddress: () => useAddress,
|
|
28384
28475
|
useAssets: () => useAssets,
|
|
28385
|
-
useBalance: () =>
|
|
28476
|
+
useBalance: () => useBalance,
|
|
28386
28477
|
useBlockscoutAssets: () => useBlockscoutAssets,
|
|
28387
28478
|
useColorMode: () => useColorMode,
|
|
28388
28479
|
useConnectedApps: () => useConnectedApps,
|
|
@@ -28421,7 +28512,7 @@ __export(index_exports, {
|
|
|
28421
28512
|
module.exports = __toCommonJS(index_exports);
|
|
28422
28513
|
|
|
28423
28514
|
// src/styles/built.css
|
|
28424
|
-
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}`;
|
|
28425
28516
|
|
|
28426
28517
|
// src/index.ts
|
|
28427
28518
|
var import_core8 = require("@embarkai/core");
|
|
@@ -28524,7 +28615,7 @@ function EmbarkAiIcon(props) {
|
|
|
28524
28615
|
// src/components/ConnectWalletButton.tsx
|
|
28525
28616
|
var import_react_query55 = require("@tanstack/react-query");
|
|
28526
28617
|
var import_lucide_react79 = require("lucide-react");
|
|
28527
|
-
var
|
|
28618
|
+
var import_react93 = require("react");
|
|
28528
28619
|
init_SessionContext();
|
|
28529
28620
|
init_auth();
|
|
28530
28621
|
init_profile();
|
|
@@ -28557,7 +28648,7 @@ function ConnectWalletButton(props) {
|
|
|
28557
28648
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
28558
28649
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useSession();
|
|
28559
28650
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
28560
|
-
(0,
|
|
28651
|
+
(0, import_react93.useEffect)(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
28561
28652
|
const { data: profile, isLoading: isProfileLoading } = (0, import_react_query55.useQuery)({
|
|
28562
28653
|
retry: false,
|
|
28563
28654
|
enabled: !!address,
|
|
@@ -28565,7 +28656,7 @@ function ConnectWalletButton(props) {
|
|
|
28565
28656
|
queryFn: getUserProfile
|
|
28566
28657
|
});
|
|
28567
28658
|
const displayName = profile?.nicknameDisplay || profile?.displayName || import_auth20.jwtTokenManager.getDisplayName();
|
|
28568
|
-
const indicators = (0,
|
|
28659
|
+
const indicators = (0, import_react93.useMemo)(() => {
|
|
28569
28660
|
const userId = session?.mpcUserId;
|
|
28570
28661
|
if (!userId) return { server: false, local: false, backup: false };
|
|
28571
28662
|
const server = import_auth20.jwtTokenManager.getHasKeyshare() ?? false;
|
|
@@ -28724,7 +28815,7 @@ init_useLayoutStore();
|
|
|
28724
28815
|
var useIsMobileView = () => {
|
|
28725
28816
|
return useLayoutStore((st) => st.isMobileView);
|
|
28726
28817
|
};
|
|
28727
|
-
var
|
|
28818
|
+
var useBalance = () => {
|
|
28728
28819
|
const walletBalance = useLayoutDataStore((st) => st.balance);
|
|
28729
28820
|
const fiatBalance = useLayoutDataStore((st) => st.fiatBalance);
|
|
28730
28821
|
const cryptoRate = useLayoutDataStore((st) => st.cryptoRate);
|
|
@@ -28747,7 +28838,7 @@ var useActiveChainId = () => useSession((st) => st.activeChainId);
|
|
|
28747
28838
|
var useHydrated = () => useSession((st) => st.hasHydrated);
|
|
28748
28839
|
|
|
28749
28840
|
// src/hooks/useOpenPage.ts
|
|
28750
|
-
var
|
|
28841
|
+
var import_react94 = require("react");
|
|
28751
28842
|
init_SessionContext();
|
|
28752
28843
|
init_useLayoutDataStore();
|
|
28753
28844
|
function useOpenPage() {
|
|
@@ -28755,7 +28846,7 @@ function useOpenPage() {
|
|
|
28755
28846
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
28756
28847
|
const setPageParams = useLayoutDataStore((st) => st.setPageParams);
|
|
28757
28848
|
const address = useSession((st) => st.address);
|
|
28758
|
-
const open = (0,
|
|
28849
|
+
const open = (0, import_react94.useCallback)(
|
|
28759
28850
|
(passportPage, params) => {
|
|
28760
28851
|
if (!address) return setPage("auth" /* AUTH */);
|
|
28761
28852
|
if (!!address && passportPage === "auth" /* AUTH */) return setPage("manage-wallet" /* MANAGE_WALLET */);
|
|
@@ -28764,7 +28855,7 @@ function useOpenPage() {
|
|
|
28764
28855
|
},
|
|
28765
28856
|
[setPage, setPageParams, address]
|
|
28766
28857
|
);
|
|
28767
|
-
const close = (0,
|
|
28858
|
+
const close = (0, import_react94.useCallback)(() => setPage(null), [setPage]);
|
|
28768
28859
|
return { open, close, isOpen: page !== null };
|
|
28769
28860
|
}
|
|
28770
28861
|
|
|
@@ -29225,14 +29316,14 @@ var Hash = ({
|
|
|
29225
29316
|
};
|
|
29226
29317
|
|
|
29227
29318
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
29228
|
-
var
|
|
29319
|
+
var import_react95 = require("react");
|
|
29229
29320
|
init_base();
|
|
29230
29321
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
29231
29322
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
29232
|
-
const [transactions, setTransactions] = (0,
|
|
29233
|
-
const [loading, setLoading] = (0,
|
|
29234
|
-
const [error, setError] = (0,
|
|
29235
|
-
(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)(() => {
|
|
29236
29327
|
const fetchTransactions2 = async () => {
|
|
29237
29328
|
try {
|
|
29238
29329
|
setLoading(true);
|
|
@@ -29523,13 +29614,13 @@ function useUserOpStatus(options = {}) {
|
|
|
29523
29614
|
init_useErc3643Compliance();
|
|
29524
29615
|
|
|
29525
29616
|
// src/hooks/useWalletMode.ts
|
|
29526
|
-
var
|
|
29617
|
+
var import_react96 = require("react");
|
|
29527
29618
|
init_useExternalWalletStore();
|
|
29528
29619
|
function useWalletMode() {
|
|
29529
29620
|
const configMode = useExternalWalletStore((st) => st.configMode);
|
|
29530
29621
|
const activeMode = useExternalWalletStore((st) => st.activeMode);
|
|
29531
29622
|
const setActiveMode = useExternalWalletStore((st) => st.setActiveMode);
|
|
29532
|
-
const switchMode = (0,
|
|
29623
|
+
const switchMode = (0, import_react96.useCallback)(
|
|
29533
29624
|
(mode) => {
|
|
29534
29625
|
if (configMode !== "both") return;
|
|
29535
29626
|
setActiveMode(mode);
|
|
@@ -29545,7 +29636,7 @@ function useWalletMode() {
|
|
|
29545
29636
|
}
|
|
29546
29637
|
|
|
29547
29638
|
// src/hooks/useDirectWallet.ts
|
|
29548
|
-
var
|
|
29639
|
+
var import_react97 = require("react");
|
|
29549
29640
|
var import_rainbowkit6 = require("@rainbow-me/rainbowkit");
|
|
29550
29641
|
var import_wagmi11 = require("wagmi");
|
|
29551
29642
|
init_useExternalWalletStore();
|
|
@@ -29559,13 +29650,13 @@ function useDirectWallet() {
|
|
|
29559
29650
|
const { disconnect: wagmiDisconnect } = (0, import_wagmi11.useDisconnect)();
|
|
29560
29651
|
const { openConnectModal } = (0, import_rainbowkit6.useConnectModal)();
|
|
29561
29652
|
const setIsWalletLinking = useLayoutDataStore((st) => st.setIsWalletLinking);
|
|
29562
|
-
const connect = (0,
|
|
29653
|
+
const connect = (0, import_react97.useCallback)(() => {
|
|
29563
29654
|
setIsWalletLinking(true);
|
|
29564
29655
|
}, [setIsWalletLinking]);
|
|
29565
|
-
const reconnect = (0,
|
|
29656
|
+
const reconnect = (0, import_react97.useCallback)(() => {
|
|
29566
29657
|
if (openConnectModal) openConnectModal();
|
|
29567
29658
|
}, [openConnectModal]);
|
|
29568
|
-
const disconnect = (0,
|
|
29659
|
+
const disconnect = (0, import_react97.useCallback)(() => {
|
|
29569
29660
|
wagmiDisconnect();
|
|
29570
29661
|
clearExternalWallet();
|
|
29571
29662
|
}, [wagmiDisconnect, clearExternalWallet]);
|
|
@@ -29581,7 +29672,7 @@ function useDirectWallet() {
|
|
|
29581
29672
|
}
|
|
29582
29673
|
|
|
29583
29674
|
// src/hooks/useSendDirectTransaction.ts
|
|
29584
|
-
var
|
|
29675
|
+
var import_react98 = require("react");
|
|
29585
29676
|
var import_viem20 = require("viem");
|
|
29586
29677
|
var import_wagmi12 = require("wagmi");
|
|
29587
29678
|
init_useExternalWalletStore();
|
|
@@ -29590,10 +29681,10 @@ function useSendDirectTransaction() {
|
|
|
29590
29681
|
const externalChainId = useExternalWalletStore((st) => st.externalChainId);
|
|
29591
29682
|
const { sendTransactionAsync } = (0, import_wagmi12.useSendTransaction)();
|
|
29592
29683
|
const { switchChainAsync } = (0, import_wagmi12.useSwitchChain)();
|
|
29593
|
-
const [isPending, setIsPending] = (0,
|
|
29594
|
-
const [error, setError] = (0,
|
|
29595
|
-
const [txHash, setTxHash] = (0,
|
|
29596
|
-
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)(
|
|
29597
29688
|
async (params) => {
|
|
29598
29689
|
if (!isConnected) {
|
|
29599
29690
|
setError("No external wallet connected");
|
|
@@ -29627,7 +29718,7 @@ function useSendDirectTransaction() {
|
|
|
29627
29718
|
},
|
|
29628
29719
|
[isConnected, externalChainId, sendTransactionAsync, switchChainAsync]
|
|
29629
29720
|
);
|
|
29630
|
-
const reset = (0,
|
|
29721
|
+
const reset = (0, import_react98.useCallback)(() => {
|
|
29631
29722
|
setError(null);
|
|
29632
29723
|
setTxHash(null);
|
|
29633
29724
|
setIsPending(false);
|
|
@@ -29636,7 +29727,7 @@ function useSendDirectTransaction() {
|
|
|
29636
29727
|
}
|
|
29637
29728
|
|
|
29638
29729
|
// src/hooks/useTransferToLinkedWallet.ts
|
|
29639
|
-
var
|
|
29730
|
+
var import_react99 = require("react");
|
|
29640
29731
|
var import_viem21 = require("viem");
|
|
29641
29732
|
init_SessionContext();
|
|
29642
29733
|
init_account2();
|
|
@@ -29655,14 +29746,14 @@ var ERC20_TRANSFER_ABI2 = [
|
|
|
29655
29746
|
function useTransferToLinkedWallet() {
|
|
29656
29747
|
const session = useSession((st) => st.session);
|
|
29657
29748
|
const { profiles } = useLinkedProfiles();
|
|
29658
|
-
const [isPending, setIsPending] = (0,
|
|
29659
|
-
const [error, setError] = (0,
|
|
29660
|
-
const [userOpHash, setUserOpHash] = (0,
|
|
29661
|
-
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)(
|
|
29662
29753
|
() => (profiles || []).filter((p) => p.provider === "wallet" && p.externalId).map((p) => p.externalId),
|
|
29663
29754
|
[profiles]
|
|
29664
29755
|
);
|
|
29665
|
-
const transfer = (0,
|
|
29756
|
+
const transfer = (0, import_react99.useCallback)(
|
|
29666
29757
|
async (params) => {
|
|
29667
29758
|
if (!session) {
|
|
29668
29759
|
setError("No active session");
|
|
@@ -29713,7 +29804,7 @@ function useTransferToLinkedWallet() {
|
|
|
29713
29804
|
},
|
|
29714
29805
|
[session, linkedWallets]
|
|
29715
29806
|
);
|
|
29716
|
-
const reset = (0,
|
|
29807
|
+
const reset = (0, import_react99.useCallback)(() => {
|
|
29717
29808
|
setError(null);
|
|
29718
29809
|
setUserOpHash(null);
|
|
29719
29810
|
setIsPending(false);
|
|
@@ -29737,13 +29828,13 @@ function useNativeWalletSignature() {
|
|
|
29737
29828
|
|
|
29738
29829
|
// src/hooks/useLogout.ts
|
|
29739
29830
|
var import_auth22 = require("@embarkai/core/auth");
|
|
29740
|
-
var
|
|
29831
|
+
var import_react100 = require("react");
|
|
29741
29832
|
init_ProviderContext();
|
|
29742
29833
|
init_SessionContext();
|
|
29743
29834
|
function useLogout() {
|
|
29744
29835
|
const { setSession, setIsLoading, setAddress, setStatus, setError, address } = useSession();
|
|
29745
29836
|
const { callbacksRef } = useProviderConfig();
|
|
29746
|
-
const logout2 = (0,
|
|
29837
|
+
const logout2 = (0, import_react100.useCallback)(async () => {
|
|
29747
29838
|
const prevAddress = address;
|
|
29748
29839
|
let userId = null;
|
|
29749
29840
|
setIsLoading(true);
|
|
@@ -29859,7 +29950,7 @@ function useTransactions() {
|
|
|
29859
29950
|
|
|
29860
29951
|
// src/modules/assets.ts
|
|
29861
29952
|
init_SessionContext();
|
|
29862
|
-
var
|
|
29953
|
+
var import_react101 = __toESM(require("react"), 1);
|
|
29863
29954
|
var import_viem23 = require("viem");
|
|
29864
29955
|
var import_wagmi15 = require("wagmi");
|
|
29865
29956
|
var COMMON_TOKENS = [
|
|
@@ -30015,7 +30106,7 @@ function useTokenBalance(tokenAddress, userAddress) {
|
|
|
30015
30106
|
}
|
|
30016
30107
|
});
|
|
30017
30108
|
const { tokenInfo } = useTokenInfo(tokenAddress);
|
|
30018
|
-
const formattedBalance =
|
|
30109
|
+
const formattedBalance = import_react101.default.useMemo(() => {
|
|
30019
30110
|
if (!balance || !tokenInfo) return "0";
|
|
30020
30111
|
return (0, import_viem23.formatUnits)(balance, tokenInfo.decimals);
|
|
30021
30112
|
}, [balance, tokenInfo]);
|