@loafmarkets/ui 0.1.384 → 0.1.386
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +34 -5
- package/dist/index.d.ts +34 -5
- package/dist/index.js +953 -512
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +954 -512
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -6
package/dist/index.js
CHANGED
|
@@ -1900,6 +1900,7 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
1900
1900
|
amountPrecision = 2,
|
|
1901
1901
|
defaultTab = "orderbook",
|
|
1902
1902
|
onTabChange,
|
|
1903
|
+
showTradesTab = true,
|
|
1903
1904
|
rightHeader,
|
|
1904
1905
|
variant = "auto",
|
|
1905
1906
|
userOrderPrices,
|
|
@@ -1913,7 +1914,9 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
1913
1914
|
...props
|
|
1914
1915
|
}, ref) => {
|
|
1915
1916
|
const resolvedRightHeader = rightHeader ?? /* @__PURE__ */ jsxRuntime.jsx(LoafLiquidityBadge, { className: "text-[0.6rem] orderbook-ll-badge", onClick: onLoafLiquidityClick });
|
|
1916
|
-
const [tab,
|
|
1917
|
+
const [tab, setTabState] = React5__namespace.useState(defaultTab);
|
|
1918
|
+
const setTab = setTabState;
|
|
1919
|
+
const effectiveTab = showTradesTab ? tab : "orderbook";
|
|
1917
1920
|
const [tradeFilter, setTradeFilter] = React5__namespace.useState("all");
|
|
1918
1921
|
const viewportCompact = useViewportCompact(COMPACT_BREAKPOINT_PX);
|
|
1919
1922
|
const { userAskPrices, userBidPrices } = React5__namespace.useMemo(() => {
|
|
@@ -2007,7 +2010,8 @@ var Orderbook = React5__namespace.forwardRef(
|
|
|
2007
2010
|
const midClass = midChangePercent == null ? "text-white" : midChangePercent >= 0 ? "text-[#0ecb81]" : "text-[#f6465d]";
|
|
2008
2011
|
const tradeFiltered = trades.filter((t) => tradeFilter === "all" || t.type === tradeFilter);
|
|
2009
2012
|
const layoutProps = {
|
|
2010
|
-
tab,
|
|
2013
|
+
tab: effectiveTab,
|
|
2014
|
+
showTradesTab,
|
|
2011
2015
|
handleTab,
|
|
2012
2016
|
tradeFilter,
|
|
2013
2017
|
setTradeFilter,
|
|
@@ -2084,6 +2088,7 @@ function SkeletonRow({ compact }) {
|
|
|
2084
2088
|
}
|
|
2085
2089
|
function DesktopOrderbookLayout({
|
|
2086
2090
|
tab,
|
|
2091
|
+
showTradesTab = true,
|
|
2087
2092
|
handleTab,
|
|
2088
2093
|
tradeFilter,
|
|
2089
2094
|
setTradeFilter,
|
|
@@ -2133,7 +2138,7 @@ function DesktopOrderbookLayout({
|
|
|
2133
2138
|
]
|
|
2134
2139
|
}
|
|
2135
2140
|
),
|
|
2136
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2141
|
+
showTradesTab ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2137
2142
|
"button",
|
|
2138
2143
|
{
|
|
2139
2144
|
type: "button",
|
|
@@ -2147,7 +2152,7 @@ function DesktopOrderbookLayout({
|
|
|
2147
2152
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -bottom-px left-0 h-[2px] w-full bg-[#E6C87E]" }) : null
|
|
2148
2153
|
]
|
|
2149
2154
|
}
|
|
2150
|
-
)
|
|
2155
|
+
) : null
|
|
2151
2156
|
] }),
|
|
2152
2157
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
2153
2158
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2286,6 +2291,7 @@ function DesktopOrderbookLayout({
|
|
|
2286
2291
|
}
|
|
2287
2292
|
function MobileOrderbookLayout({
|
|
2288
2293
|
tab,
|
|
2294
|
+
showTradesTab = true,
|
|
2289
2295
|
handleTab,
|
|
2290
2296
|
tradeFilter,
|
|
2291
2297
|
setTradeFilter,
|
|
@@ -2334,7 +2340,7 @@ function MobileOrderbookLayout({
|
|
|
2334
2340
|
children: "Orderbook"
|
|
2335
2341
|
}
|
|
2336
2342
|
),
|
|
2337
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2343
|
+
showTradesTab ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2338
2344
|
"span",
|
|
2339
2345
|
{
|
|
2340
2346
|
onClick: () => handleTab("trades"),
|
|
@@ -2348,7 +2354,7 @@ function MobileOrderbookLayout({
|
|
|
2348
2354
|
},
|
|
2349
2355
|
children: "Trades"
|
|
2350
2356
|
}
|
|
2351
|
-
)
|
|
2357
|
+
) : null
|
|
2352
2358
|
] }),
|
|
2353
2359
|
tab === "trades" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1 text-[0.6rem] text-white/70", children: ["all", "buy", "sell"].map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2354
2360
|
"button",
|
|
@@ -5036,9 +5042,9 @@ var PulsingDot = styled10__default.default.span`
|
|
|
5036
5042
|
`;
|
|
5037
5043
|
function fmtCompactUsd(n) {
|
|
5038
5044
|
const abs = Math.abs(n);
|
|
5039
|
-
if (abs >= 1e6) return
|
|
5040
|
-
if (abs >= 1e3) return
|
|
5041
|
-
return
|
|
5045
|
+
if (abs >= 1e6) return `${(abs / 1e6).toFixed(2)}M`;
|
|
5046
|
+
if (abs >= 1e3) return `${(abs / 1e3).toFixed(1)}K`;
|
|
5047
|
+
return `${abs.toFixed(2)}`;
|
|
5042
5048
|
}
|
|
5043
5049
|
function useIsNarrow(maxWidthPx = 768) {
|
|
5044
5050
|
const query = `(max-width:${maxWidthPx}px)`;
|
|
@@ -5061,8 +5067,6 @@ var DEFAULT_ABOUT_PATH = "/about";
|
|
|
5061
5067
|
var DEFAULT_LEARN_PATH = "/learn";
|
|
5062
5068
|
var DEFAULT_API_PATH = "/api";
|
|
5063
5069
|
var DEFAULT_PROPERTY_MAP_PATH = "/map";
|
|
5064
|
-
var DEFAULT_LEADERBOARD_PATH = "/league";
|
|
5065
|
-
var DEFAULT_LEADERBOARD_PAGE_PATH = "/leaderboard";
|
|
5066
5070
|
var DEFAULT_PORTFOLIO_PATH = "/portfolio";
|
|
5067
5071
|
var DEFAULT_LOAF_LIQUIDITY_PATH = "/loaf-liquidity";
|
|
5068
5072
|
var DEFAULT_AUTH_RETURN_PARAM = "returnTo";
|
|
@@ -5083,8 +5087,6 @@ var Header = ({
|
|
|
5083
5087
|
apiPath = DEFAULT_API_PATH,
|
|
5084
5088
|
offeringsPath,
|
|
5085
5089
|
propertyMapPath = DEFAULT_PROPERTY_MAP_PATH,
|
|
5086
|
-
leaderboardPath = DEFAULT_LEADERBOARD_PATH,
|
|
5087
|
-
leaderboardPagePath = DEFAULT_LEADERBOARD_PAGE_PATH,
|
|
5088
5090
|
portfolioPath = DEFAULT_PORTFOLIO_PATH,
|
|
5089
5091
|
loafLiquidityPath = DEFAULT_LOAF_LIQUIDITY_PATH,
|
|
5090
5092
|
authLoginUrl,
|
|
@@ -5358,8 +5360,6 @@ var Header = ({
|
|
|
5358
5360
|
const resolvedOfferingsPath = offeringsPath ?? void 0;
|
|
5359
5361
|
const offeringsHref = resolvedOfferingsPath ?? resolvedHomePath;
|
|
5360
5362
|
const resolvedPropertyMapPath = propertyMapPath ?? DEFAULT_PROPERTY_MAP_PATH;
|
|
5361
|
-
const resolvedLeaderboardPath = leaderboardPath ?? DEFAULT_LEADERBOARD_PATH;
|
|
5362
|
-
const resolvedLeaderboardPagePath = leaderboardPagePath ?? DEFAULT_LEADERBOARD_PAGE_PATH;
|
|
5363
5363
|
const resolvedPortfolioPath = portfolioPath ?? DEFAULT_PORTFOLIO_PATH;
|
|
5364
5364
|
const resolvedLoafLiquidityPath = loafLiquidityPath ?? DEFAULT_LOAF_LIQUIDITY_PATH;
|
|
5365
5365
|
const inferredActiveTab = (() => {
|
|
@@ -5370,8 +5370,6 @@ var Header = ({
|
|
|
5370
5370
|
if (locationPath === resolvedApiPath) return "api";
|
|
5371
5371
|
if (resolvedOfferingsPath && locationPath.startsWith(resolvedOfferingsPath)) return "offerings";
|
|
5372
5372
|
if (locationPath === resolvedPropertyMapPath) return "propertyMap";
|
|
5373
|
-
if (locationPath === resolvedLeaderboardPagePath) return "leaderboardPage";
|
|
5374
|
-
if (locationPath === resolvedLeaderboardPath) return "leaderboard";
|
|
5375
5373
|
if (locationPath === resolvedPortfolioPath) return "portfolio";
|
|
5376
5374
|
return null;
|
|
5377
5375
|
})();
|
|
@@ -5380,8 +5378,6 @@ var Header = ({
|
|
|
5380
5378
|
const homeActive = resolvedActiveTab === "home";
|
|
5381
5379
|
const offeringsActive = resolvedActiveTab === "offerings";
|
|
5382
5380
|
const propertyMapActive = resolvedActiveTab === "propertyMap";
|
|
5383
|
-
const leaderboardActive = resolvedActiveTab === "leaderboard";
|
|
5384
|
-
const leaderboardPageActive = resolvedActiveTab === "leaderboardPage";
|
|
5385
5381
|
const aboutActive = resolvedActiveTab === "about";
|
|
5386
5382
|
const portfolioActive = resolvedActiveTab === "portfolio";
|
|
5387
5383
|
const learnActive = resolvedActiveTab === "learn";
|
|
@@ -5389,7 +5385,7 @@ var Header = ({
|
|
|
5389
5385
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5390
5386
|
/* @__PURE__ */ jsxRuntime.jsx(SafeAreaCover, {}),
|
|
5391
5387
|
/* @__PURE__ */ jsxRuntime.jsx(Overlay, { $isOpen: isMobileMenuOpen, onClick: () => setIsMobileMenuOpen(false) }),
|
|
5392
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, children: [
|
|
5388
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { id: "loaf-header", $bgOpacity: headerBgOpacity, $menuOpen: isMobileMenuOpen, children: [
|
|
5393
5389
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
5394
5390
|
/* @__PURE__ */ jsxRuntime.jsxs(Logo, { children: [
|
|
5395
5391
|
/* @__PURE__ */ jsxRuntime.jsx(LogoLink, { href: logoHref ?? resolvedHomePath, onClick: handleLogoNavigation, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: Loaf_logo_Banner_default, alt: "LOAF Logo" }) }),
|
|
@@ -5465,91 +5461,48 @@ var Header = ({
|
|
|
5465
5461
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5466
5462
|
NavLink,
|
|
5467
5463
|
{
|
|
5468
|
-
href:
|
|
5469
|
-
className:
|
|
5464
|
+
href: resolvedLearnPath,
|
|
5465
|
+
className: learnActive ? "active" : "",
|
|
5470
5466
|
onClick: (event) => {
|
|
5471
5467
|
event.preventDefault();
|
|
5472
|
-
handleNavigation(
|
|
5468
|
+
handleNavigation(resolvedLearnPath);
|
|
5473
5469
|
},
|
|
5474
|
-
children: "
|
|
5470
|
+
children: "Learn"
|
|
5475
5471
|
}
|
|
5476
5472
|
),
|
|
5477
5473
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5478
5474
|
NavLink,
|
|
5479
5475
|
{
|
|
5480
|
-
href:
|
|
5481
|
-
className:
|
|
5476
|
+
href: resolvedAboutPath,
|
|
5477
|
+
className: aboutActive ? "active" : "",
|
|
5482
5478
|
onClick: (event) => {
|
|
5483
5479
|
event.preventDefault();
|
|
5484
|
-
handleNavigation(
|
|
5480
|
+
handleNavigation(resolvedAboutPath);
|
|
5485
5481
|
},
|
|
5486
|
-
children: "
|
|
5482
|
+
children: "About"
|
|
5487
5483
|
}
|
|
5488
5484
|
),
|
|
5489
5485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5490
5486
|
NavLink,
|
|
5491
5487
|
{
|
|
5492
|
-
href:
|
|
5493
|
-
className:
|
|
5488
|
+
href: resolvedApiPath,
|
|
5489
|
+
className: apiActive ? "active" : "",
|
|
5494
5490
|
onClick: (event) => {
|
|
5495
5491
|
event.preventDefault();
|
|
5496
|
-
handleNavigation(
|
|
5492
|
+
handleNavigation(resolvedApiPath);
|
|
5497
5493
|
},
|
|
5498
|
-
children: "
|
|
5494
|
+
children: "API"
|
|
5495
|
+
}
|
|
5496
|
+
),
|
|
5497
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5498
|
+
NavLink,
|
|
5499
|
+
{
|
|
5500
|
+
href: "https://docs.loafmarkets.com/en/",
|
|
5501
|
+
target: "_blank",
|
|
5502
|
+
rel: "noopener noreferrer",
|
|
5503
|
+
children: "Docs"
|
|
5499
5504
|
}
|
|
5500
5505
|
),
|
|
5501
|
-
/* @__PURE__ */ jsxRuntime.jsxs(MoreMenu, { className: "more-menu", children: [
|
|
5502
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5503
|
-
MoreTrigger,
|
|
5504
|
-
{
|
|
5505
|
-
type: "button",
|
|
5506
|
-
className: `${isMoreMenuOpen ? "open" : ""} ${aboutActive || apiActive ? "active" : ""}`,
|
|
5507
|
-
"aria-haspopup": "true",
|
|
5508
|
-
"aria-expanded": isMoreMenuOpen,
|
|
5509
|
-
onClick: () => setIsMoreMenuOpen((open) => !open),
|
|
5510
|
-
children: [
|
|
5511
|
-
"More",
|
|
5512
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
5513
|
-
]
|
|
5514
|
-
}
|
|
5515
|
-
),
|
|
5516
|
-
isMoreMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs(MoreDropdown, { children: [
|
|
5517
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5518
|
-
MoreItem,
|
|
5519
|
-
{
|
|
5520
|
-
href: resolvedAboutPath,
|
|
5521
|
-
className: aboutActive ? "active" : "",
|
|
5522
|
-
onClick: (event) => {
|
|
5523
|
-
event.preventDefault();
|
|
5524
|
-
handleNavigation(resolvedAboutPath);
|
|
5525
|
-
},
|
|
5526
|
-
children: "About"
|
|
5527
|
-
}
|
|
5528
|
-
),
|
|
5529
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5530
|
-
MoreItem,
|
|
5531
|
-
{
|
|
5532
|
-
href: resolvedApiPath,
|
|
5533
|
-
className: apiActive ? "active" : "",
|
|
5534
|
-
onClick: (event) => {
|
|
5535
|
-
event.preventDefault();
|
|
5536
|
-
handleNavigation(resolvedApiPath);
|
|
5537
|
-
},
|
|
5538
|
-
children: "API"
|
|
5539
|
-
}
|
|
5540
|
-
),
|
|
5541
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5542
|
-
MoreItem,
|
|
5543
|
-
{
|
|
5544
|
-
href: "https://docs.loafmarkets.com/en/",
|
|
5545
|
-
target: "_blank",
|
|
5546
|
-
rel: "noopener noreferrer",
|
|
5547
|
-
onClick: () => setIsMoreMenuOpen(false),
|
|
5548
|
-
children: "Docs"
|
|
5549
|
-
}
|
|
5550
|
-
)
|
|
5551
|
-
] })
|
|
5552
|
-
] }),
|
|
5553
5506
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5554
5507
|
"div",
|
|
5555
5508
|
{
|
|
@@ -5590,8 +5543,6 @@ var Header = ({
|
|
|
5590
5543
|
),
|
|
5591
5544
|
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(offeringsHref), children: "Initial Offerings" }),
|
|
5592
5545
|
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedPropertyMapPath), children: "Property Map" }),
|
|
5593
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPath), children: "Competition" }),
|
|
5594
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPagePath), children: "Leaderboard" }),
|
|
5595
5546
|
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLearnPath), children: "Learn" }),
|
|
5596
5547
|
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedAboutPath), children: "About" }),
|
|
5597
5548
|
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedApiPath), children: "API" }),
|
|
@@ -5865,7 +5816,8 @@ var Overlay = styled10__default.default.div`
|
|
|
5865
5816
|
height: 100%;
|
|
5866
5817
|
background-color: rgba(0, 0, 0, 0.7);
|
|
5867
5818
|
backdrop-filter: blur(3px);
|
|
5868
|
-
z
|
|
5819
|
+
/* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
|
|
5820
|
+
z-index: 10070;
|
|
5869
5821
|
`;
|
|
5870
5822
|
var MobileOnlyButton = styled10__default.default.button.attrs({ type: "button" })`
|
|
5871
5823
|
display: none;
|
|
@@ -5913,7 +5865,11 @@ var HeaderContainer = styled10__default.default.header`
|
|
|
5913
5865
|
top: 0;
|
|
5914
5866
|
left: 0;
|
|
5915
5867
|
right: 0;
|
|
5916
|
-
|
|
5868
|
+
/* Normally 1000. When the mobile menu is open, lift the whole header
|
|
5869
|
+
(and the Nav drawer trapped inside its stacking context) above the
|
|
5870
|
+
backdrop Overlay (10070) AND the trade page's modal layers (10001) so
|
|
5871
|
+
the drawer renders on top instead of being dimmed by the backdrop. */
|
|
5872
|
+
z-index: ${({ $menuOpen }) => $menuOpen ? 10075 : 1e3};
|
|
5917
5873
|
width: 100%;
|
|
5918
5874
|
/* Fallback min-height for browsers that can't evaluate calc+env */
|
|
5919
5875
|
min-height: 56px;
|
|
@@ -6007,7 +5963,8 @@ var Nav = styled10__default.default.nav`
|
|
|
6007
5963
|
max-width: 100%;
|
|
6008
5964
|
height: calc(100dvh - var(--loaf-menu-top, calc(56px + max(env(safe-area-inset-top, 0px), var(--telegram-safe-top, 0px)))));
|
|
6009
5965
|
background: rgb(17, 17, 19);
|
|
6010
|
-
z
|
|
5966
|
+
/* Above the trade page's sticky/console layers (z 2000) + close modal (10001). */
|
|
5967
|
+
z-index: 10080;
|
|
6011
5968
|
/* Gentle fade + slide-down instead of an abrupt slide-in. */
|
|
6012
5969
|
opacity: ${(props) => props.$isOpen ? "1" : "0"};
|
|
6013
5970
|
transform: ${(props) => props.$isOpen ? "translateY(0)" : "translateY(-14px)"};
|
|
@@ -6025,9 +5982,12 @@ var Nav = styled10__default.default.nav`
|
|
|
6025
5982
|
display: flex;
|
|
6026
5983
|
flex-direction: column;
|
|
6027
5984
|
align-items: center;
|
|
6028
|
-
|
|
5985
|
+
/* safe-center keeps centering when the menu fits, but top-aligns (honouring the
|
|
5986
|
+
2.5rem top padding) when the logged-in menu overflows — otherwise flex
|
|
5987
|
+
centering pushes the first item + padding above the scroll area and clips it. */
|
|
5988
|
+
justify-content: safe center;
|
|
6029
5989
|
min-height: 100%;
|
|
6030
|
-
padding:
|
|
5990
|
+
padding: 2.5rem 1.5rem 2.5rem;
|
|
6031
5991
|
gap: 0.4rem;
|
|
6032
5992
|
}
|
|
6033
5993
|
}
|
|
@@ -6100,77 +6060,6 @@ var NavLink = styled10__default.default.a`
|
|
|
6100
6060
|
}
|
|
6101
6061
|
}
|
|
6102
6062
|
`;
|
|
6103
|
-
var MoreMenu = styled10__default.default.div`
|
|
6104
|
-
position: relative;
|
|
6105
|
-
display: flex;
|
|
6106
|
-
align-items: center;
|
|
6107
|
-
height: 56px;
|
|
6108
|
-
`;
|
|
6109
|
-
var MoreTrigger = styled10__default.default.button`
|
|
6110
|
-
margin: 0 12px;
|
|
6111
|
-
padding: 0 4px;
|
|
6112
|
-
height: 56px;
|
|
6113
|
-
display: inline-flex;
|
|
6114
|
-
align-items: center;
|
|
6115
|
-
gap: 4px;
|
|
6116
|
-
background: none;
|
|
6117
|
-
border: none;
|
|
6118
|
-
cursor: pointer;
|
|
6119
|
-
color: #eaecef;
|
|
6120
|
-
font-weight: 500;
|
|
6121
|
-
font-size: 14px;
|
|
6122
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
|
|
6123
|
-
letter-spacing: 0.2px;
|
|
6124
|
-
transition: color 0.2s ease;
|
|
6125
|
-
|
|
6126
|
-
&:hover,
|
|
6127
|
-
&.active {
|
|
6128
|
-
color: #E6C87E;
|
|
6129
|
-
}
|
|
6130
|
-
|
|
6131
|
-
svg {
|
|
6132
|
-
width: 14px;
|
|
6133
|
-
height: 14px;
|
|
6134
|
-
transition: transform 0.2s ease;
|
|
6135
|
-
}
|
|
6136
|
-
&.open svg {
|
|
6137
|
-
transform: rotate(180deg);
|
|
6138
|
-
}
|
|
6139
|
-
`;
|
|
6140
|
-
var MoreDropdown = styled10__default.default.div`
|
|
6141
|
-
position: absolute;
|
|
6142
|
-
top: 100%;
|
|
6143
|
-
right: 0;
|
|
6144
|
-
min-width: 160px;
|
|
6145
|
-
padding: 6px;
|
|
6146
|
-
background: #1e2026;
|
|
6147
|
-
border: 1px solid #2b3139;
|
|
6148
|
-
border-radius: 10px;
|
|
6149
|
-
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
|
|
6150
|
-
display: flex;
|
|
6151
|
-
flex-direction: column;
|
|
6152
|
-
z-index: 1100;
|
|
6153
|
-
`;
|
|
6154
|
-
var MoreItem = styled10__default.default.a`
|
|
6155
|
-
padding: 10px 12px;
|
|
6156
|
-
border-radius: 6px;
|
|
6157
|
-
color: #eaecef;
|
|
6158
|
-
font-weight: 500;
|
|
6159
|
-
font-size: 14px;
|
|
6160
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
|
|
6161
|
-
letter-spacing: 0.2px;
|
|
6162
|
-
text-decoration: none;
|
|
6163
|
-
cursor: pointer;
|
|
6164
|
-
transition: background 0.15s ease, color 0.15s ease;
|
|
6165
|
-
|
|
6166
|
-
&:hover {
|
|
6167
|
-
background: #2b3139;
|
|
6168
|
-
color: #E6C87E;
|
|
6169
|
-
}
|
|
6170
|
-
&.active {
|
|
6171
|
-
color: #E6C87E;
|
|
6172
|
-
}
|
|
6173
|
-
`;
|
|
6174
6063
|
var Button2 = styled10__default.default.button.attrs({ type: "button" })`
|
|
6175
6064
|
padding: 0.5rem 1rem;
|
|
6176
6065
|
border-radius: 6px;
|
|
@@ -6737,6 +6626,17 @@ PropertySubheader.displayName = "PropertySubheader";
|
|
|
6737
6626
|
var DEFAULT_LOGO_SRC = Loaf_logo_Banner_default;
|
|
6738
6627
|
var DEFAULT_LOGO_ALT = "Loaf";
|
|
6739
6628
|
var OTP_INPUT_LENGTH = 6;
|
|
6629
|
+
var CODE_PREFIX = "LOAF-";
|
|
6630
|
+
var CODE_SUFFIX_LEN = 5;
|
|
6631
|
+
var normalizeAccessCode = (raw) => CODE_PREFIX + raw.toUpperCase().replace(/^LOAF-?/, "").replace(/[^A-Z0-9]/g, "").slice(0, CODE_SUFFIX_LEN);
|
|
6632
|
+
var friendlyError = (err, fallback) => {
|
|
6633
|
+
const data = err?.response?.data;
|
|
6634
|
+
if (typeof data?.error === "string" && data.error.trim()) return data.error;
|
|
6635
|
+
if (typeof data?.message === "string" && data.message.trim()) return data.message;
|
|
6636
|
+
const msg = err instanceof Error ? err.message : "";
|
|
6637
|
+
if (msg && !/request failed with status code/i.test(msg) && !/network error/i.test(msg)) return msg;
|
|
6638
|
+
return fallback;
|
|
6639
|
+
};
|
|
6740
6640
|
var LoginPopup = ({
|
|
6741
6641
|
onClose,
|
|
6742
6642
|
onOpenEarlyAccess,
|
|
@@ -6755,10 +6655,13 @@ var LoginPopup = ({
|
|
|
6755
6655
|
renderKycWidget,
|
|
6756
6656
|
onFundWallet,
|
|
6757
6657
|
initialView,
|
|
6658
|
+
initialCode,
|
|
6758
6659
|
kycStatus: kycStatusProp,
|
|
6759
6660
|
walletAddress,
|
|
6760
6661
|
onSubmitReferralCode,
|
|
6761
|
-
|
|
6662
|
+
onValidateCode,
|
|
6663
|
+
onCheckAccess,
|
|
6664
|
+
gate
|
|
6762
6665
|
}) => {
|
|
6763
6666
|
const [view, setView] = React5.useState(() => initialView ?? "main");
|
|
6764
6667
|
const [email, setEmail] = React5.useState("");
|
|
@@ -6766,19 +6669,17 @@ var LoginPopup = ({
|
|
|
6766
6669
|
const [otp, setOtp] = React5.useState(Array(OTP_INPUT_LENGTH).fill(""));
|
|
6767
6670
|
const [error, setError] = React5.useState("");
|
|
6768
6671
|
const [copied, setCopied] = React5.useState(false);
|
|
6769
|
-
const [referralCode, setReferralCode] = React5.useState(
|
|
6672
|
+
const [referralCode, setReferralCode] = React5.useState(
|
|
6673
|
+
() => gate && initialCode ? normalizeAccessCode(initialCode) : ""
|
|
6674
|
+
);
|
|
6770
6675
|
const [referralLoading, setReferralLoading] = React5.useState(false);
|
|
6771
6676
|
const [referralError, setReferralError] = React5.useState("");
|
|
6772
|
-
const [
|
|
6773
|
-
const [
|
|
6677
|
+
const [codeStatus, setCodeStatus] = React5.useState("idle");
|
|
6678
|
+
const [signInRevealed, setSignInRevealed] = React5.useState(false);
|
|
6679
|
+
const [otpStatus, setOtpStatus] = React5.useState("idle");
|
|
6680
|
+
const [signInMode, setSignInMode] = React5.useState(false);
|
|
6774
6681
|
const [loading, setLoading] = React5.useState(false);
|
|
6775
6682
|
const [isSignUp, setIsSignUp] = React5.useState(false);
|
|
6776
|
-
const [loginTitle] = React5.useState(() => {
|
|
6777
|
-
if (typeof window === "undefined") return null;
|
|
6778
|
-
const t = window.__LOAF_LOGIN_TITLE__ ?? null;
|
|
6779
|
-
if (t) delete window.__LOAF_LOGIN_TITLE__;
|
|
6780
|
-
return t;
|
|
6781
|
-
});
|
|
6782
6683
|
const [fundingAmount] = React5.useState("");
|
|
6783
6684
|
const [kycLoading, setKycLoading] = React5.useState(false);
|
|
6784
6685
|
const [showKycWidget, setShowKycWidget] = React5.useState(false);
|
|
@@ -6788,6 +6689,64 @@ var LoginPopup = ({
|
|
|
6788
6689
|
const [fundingError, setFundingError] = React5.useState("");
|
|
6789
6690
|
const [transakWidgetUrl, setTransakWidgetUrl] = React5.useState(null);
|
|
6790
6691
|
const suppressAutoCloseRef = React5__namespace.default.useRef(false);
|
|
6692
|
+
const validatedCodeRef = React5__namespace.default.useRef(null);
|
|
6693
|
+
const finishGate = React5__namespace.default.useCallback(async () => {
|
|
6694
|
+
if (!gate) return true;
|
|
6695
|
+
const code = validatedCodeRef.current;
|
|
6696
|
+
if (code) {
|
|
6697
|
+
try {
|
|
6698
|
+
await onSubmitReferralCode?.(code);
|
|
6699
|
+
window.dispatchEvent(new CustomEvent("loaf:onboarding-start"));
|
|
6700
|
+
return true;
|
|
6701
|
+
} catch {
|
|
6702
|
+
}
|
|
6703
|
+
}
|
|
6704
|
+
const hasAccess = onCheckAccess ? await onCheckAccess() : true;
|
|
6705
|
+
if (hasAccess) return true;
|
|
6706
|
+
suppressAutoCloseRef.current = true;
|
|
6707
|
+
validatedCodeRef.current = null;
|
|
6708
|
+
setOtp(Array(OTP_INPUT_LENGTH).fill(""));
|
|
6709
|
+
setOtpStatus("idle");
|
|
6710
|
+
setSignInMode(false);
|
|
6711
|
+
setSignInRevealed(false);
|
|
6712
|
+
setCodeStatus(code ? "invalid" : "idle");
|
|
6713
|
+
setView("referral");
|
|
6714
|
+
setError(
|
|
6715
|
+
code ? "That code can't be redeemed anymore. Enter a different access code." : "Enter your access code to continue."
|
|
6716
|
+
);
|
|
6717
|
+
return false;
|
|
6718
|
+
}, [gate, onSubmitReferralCode, onCheckAccess]);
|
|
6719
|
+
const runCodeValidation = React5__namespace.default.useCallback(async (fullCode) => {
|
|
6720
|
+
setCodeStatus("checking");
|
|
6721
|
+
setError("");
|
|
6722
|
+
try {
|
|
6723
|
+
const ok = onValidateCode ? await onValidateCode(fullCode) : true;
|
|
6724
|
+
if (!ok) {
|
|
6725
|
+
validatedCodeRef.current = null;
|
|
6726
|
+
setCodeStatus("invalid");
|
|
6727
|
+
return;
|
|
6728
|
+
}
|
|
6729
|
+
validatedCodeRef.current = fullCode;
|
|
6730
|
+
setCodeStatus("valid");
|
|
6731
|
+
if (isAuthenticated) {
|
|
6732
|
+
if (await finishGate()) setTimeout(() => onClose(), 500);
|
|
6733
|
+
return;
|
|
6734
|
+
}
|
|
6735
|
+
setIsSignUp(true);
|
|
6736
|
+
setSignInRevealed(true);
|
|
6737
|
+
} catch {
|
|
6738
|
+
validatedCodeRef.current = null;
|
|
6739
|
+
setCodeStatus("invalid");
|
|
6740
|
+
}
|
|
6741
|
+
}, [onValidateCode, isAuthenticated, finishGate, onClose]);
|
|
6742
|
+
const autoCodeTriedRef = React5__namespace.default.useRef(false);
|
|
6743
|
+
React5.useEffect(() => {
|
|
6744
|
+
if (autoCodeTriedRef.current || !gate || !initialCode) return;
|
|
6745
|
+
const full = normalizeAccessCode(initialCode);
|
|
6746
|
+
if (full.length !== CODE_PREFIX.length + CODE_SUFFIX_LEN) return;
|
|
6747
|
+
autoCodeTriedRef.current = true;
|
|
6748
|
+
void runCodeValidation(full);
|
|
6749
|
+
}, [gate, initialCode, runCodeValidation]);
|
|
6791
6750
|
React5.useEffect(() => {
|
|
6792
6751
|
if (typeof initialView === "string") {
|
|
6793
6752
|
setView(initialView);
|
|
@@ -6842,11 +6801,11 @@ var LoginPopup = ({
|
|
|
6842
6801
|
}, [autoCloseOnAuth, currentUser, isAuthenticated, onClose, view]);
|
|
6843
6802
|
React5.useEffect(() => {
|
|
6844
6803
|
const handleEsc = (e) => {
|
|
6845
|
-
if (e.key === "Escape") onClose();
|
|
6804
|
+
if (e.key === "Escape" && !gate) onClose();
|
|
6846
6805
|
};
|
|
6847
6806
|
window.addEventListener("keydown", handleEsc);
|
|
6848
6807
|
return () => window.removeEventListener("keydown", handleEsc);
|
|
6849
|
-
}, [onClose]);
|
|
6808
|
+
}, [onClose, gate]);
|
|
6850
6809
|
const handleWalletLogin = async () => {
|
|
6851
6810
|
if (onWalletLogin) {
|
|
6852
6811
|
suppressAutoCloseRef.current = true;
|
|
@@ -6858,12 +6817,16 @@ var LoginPopup = ({
|
|
|
6858
6817
|
setView("wallet-handle");
|
|
6859
6818
|
return;
|
|
6860
6819
|
}
|
|
6861
|
-
|
|
6862
|
-
|
|
6820
|
+
if (await finishGate()) {
|
|
6821
|
+
suppressAutoCloseRef.current = false;
|
|
6822
|
+
onClose();
|
|
6823
|
+
}
|
|
6863
6824
|
return;
|
|
6864
6825
|
} catch (err) {
|
|
6865
6826
|
console.error("[LoginTrace][Popup] Wallet login failed", err);
|
|
6866
6827
|
suppressAutoCloseRef.current = false;
|
|
6828
|
+
setError(friendlyError(err, "Wallet login failed. Please try again."));
|
|
6829
|
+
return;
|
|
6867
6830
|
}
|
|
6868
6831
|
}
|
|
6869
6832
|
onClose();
|
|
@@ -6885,6 +6848,13 @@ var LoginPopup = ({
|
|
|
6885
6848
|
setError("");
|
|
6886
6849
|
try {
|
|
6887
6850
|
await onWalletSignup(handle.trim());
|
|
6851
|
+
if (gate) {
|
|
6852
|
+
if (await finishGate()) {
|
|
6853
|
+
suppressAutoCloseRef.current = false;
|
|
6854
|
+
onClose();
|
|
6855
|
+
}
|
|
6856
|
+
return;
|
|
6857
|
+
}
|
|
6888
6858
|
if (onSubmitReferralCode) {
|
|
6889
6859
|
setView("referral");
|
|
6890
6860
|
} else {
|
|
@@ -6896,6 +6866,11 @@ var LoginPopup = ({
|
|
|
6896
6866
|
setLoading(false);
|
|
6897
6867
|
}
|
|
6898
6868
|
};
|
|
6869
|
+
const handleEmailClick = (signUp = false) => {
|
|
6870
|
+
setIsSignUp(signUp);
|
|
6871
|
+
setView("email");
|
|
6872
|
+
setError("");
|
|
6873
|
+
};
|
|
6899
6874
|
const handleSendCode = async (event) => {
|
|
6900
6875
|
event?.preventDefault();
|
|
6901
6876
|
if (!email || !email.includes("@")) {
|
|
@@ -6908,6 +6883,7 @@ var LoginPopup = ({
|
|
|
6908
6883
|
}
|
|
6909
6884
|
setLoading(true);
|
|
6910
6885
|
setError("");
|
|
6886
|
+
setOtpStatus("idle");
|
|
6911
6887
|
const normalizedHandle = isSignUp && handle.trim() ? handle.trim() : void 0;
|
|
6912
6888
|
try {
|
|
6913
6889
|
const demoResult = await onDemoLogin?.(email, normalizedHandle ?? null);
|
|
@@ -6928,11 +6904,15 @@ var LoginPopup = ({
|
|
|
6928
6904
|
setView("otp");
|
|
6929
6905
|
setOtp(Array(OTP_INPUT_LENGTH).fill(""));
|
|
6930
6906
|
} catch (err) {
|
|
6931
|
-
const message = err
|
|
6907
|
+
const message = friendlyError(err, "We couldn't send a code to that email. Please double-check it and try again.");
|
|
6932
6908
|
console.error("[LoginTrace][Popup] onSendEmailCode threw", err);
|
|
6933
6909
|
if (!isSignUp && message.includes("No account found")) {
|
|
6910
|
+
if (signInMode) {
|
|
6911
|
+
setError("No account found for this email. Go back and enter your access code to create one.");
|
|
6912
|
+
setLoading(false);
|
|
6913
|
+
return;
|
|
6914
|
+
}
|
|
6934
6915
|
setIsSignUp(true);
|
|
6935
|
-
setView("email");
|
|
6936
6916
|
setError("");
|
|
6937
6917
|
setLoading(false);
|
|
6938
6918
|
return;
|
|
@@ -6944,7 +6924,7 @@ var LoginPopup = ({
|
|
|
6944
6924
|
setView("otp");
|
|
6945
6925
|
setOtp(Array(OTP_INPUT_LENGTH).fill(""));
|
|
6946
6926
|
} catch (retryErr) {
|
|
6947
|
-
setError(retryErr
|
|
6927
|
+
setError(friendlyError(retryErr, "We couldn't send a code to that email. Please try again."));
|
|
6948
6928
|
}
|
|
6949
6929
|
setLoading(false);
|
|
6950
6930
|
return;
|
|
@@ -7038,6 +7018,30 @@ var LoginPopup = ({
|
|
|
7038
7018
|
setLoading(false);
|
|
7039
7019
|
}
|
|
7040
7020
|
};
|
|
7021
|
+
const runGateOtpVerify = React5__namespace.default.useCallback(async (code) => {
|
|
7022
|
+
if (!onVerifyEmailCode) return;
|
|
7023
|
+
setOtpStatus("checking");
|
|
7024
|
+
setError("");
|
|
7025
|
+
suppressAutoCloseRef.current = true;
|
|
7026
|
+
try {
|
|
7027
|
+
await onVerifyEmailCode({ code, email });
|
|
7028
|
+
if (await finishGate()) {
|
|
7029
|
+
setOtpStatus("valid");
|
|
7030
|
+
setTimeout(() => onClose(), 750);
|
|
7031
|
+
}
|
|
7032
|
+
} catch {
|
|
7033
|
+
suppressAutoCloseRef.current = false;
|
|
7034
|
+
setOtpStatus("invalid");
|
|
7035
|
+
}
|
|
7036
|
+
}, [onVerifyEmailCode, email, finishGate, onClose]);
|
|
7037
|
+
React5.useEffect(() => {
|
|
7038
|
+
if (!gate || view !== "otp") return;
|
|
7039
|
+
if (otp.join("").length < OTP_INPUT_LENGTH) {
|
|
7040
|
+
if (otpStatus === "invalid") setOtpStatus("idle");
|
|
7041
|
+
return;
|
|
7042
|
+
}
|
|
7043
|
+
if (otpStatus === "idle") void runGateOtpVerify(otp.join(""));
|
|
7044
|
+
}, [gate, view, otp, otpStatus, runGateOtpVerify]);
|
|
7041
7045
|
const handleKycWidgetResult = (result) => {
|
|
7042
7046
|
setShowKycWidget(false);
|
|
7043
7047
|
if (result.passed) {
|
|
@@ -7134,35 +7138,36 @@ var LoginPopup = ({
|
|
|
7134
7138
|
setError("");
|
|
7135
7139
|
};
|
|
7136
7140
|
if (view === "main") {
|
|
7137
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7141
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7138
7142
|
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
7139
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7144
|
-
GateInput,
|
|
7145
|
-
{
|
|
7146
|
-
type: "email",
|
|
7147
|
-
placeholder: "Enter your email",
|
|
7148
|
-
value: email,
|
|
7149
|
-
onChange: (event) => setEmail(event.target.value),
|
|
7150
|
-
autoFocus: true
|
|
7151
|
-
}
|
|
7152
|
-
),
|
|
7153
|
-
/* @__PURE__ */ jsxRuntime.jsx(GateSubmit, { type: "submit", disabled: loading || !email, "aria-label": "Continue with email", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }) })
|
|
7143
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
|
|
7144
|
+
/* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
|
|
7145
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
|
|
7146
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
|
|
7154
7147
|
] }),
|
|
7155
|
-
|
|
7148
|
+
/* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Welcome to Loaf" })
|
|
7156
7149
|
] }),
|
|
7157
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7158
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7159
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7160
|
-
|
|
7150
|
+
/* @__PURE__ */ jsxRuntime.jsx(Subtitle, { children: "Sign in to claim 100k in test USD." }),
|
|
7151
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ButtonsContainer, { children: [
|
|
7152
|
+
/* @__PURE__ */ jsxRuntime.jsxs(LoginButton, { onClick: () => handleEmailClick(false), children: [
|
|
7153
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) }),
|
|
7154
|
+
"Sign in with Email"
|
|
7155
|
+
] }),
|
|
7156
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { textAlign: "center", color: "var(--color-text-secondary, #848e9c)", fontSize: "0.875rem" }, children: "or" }),
|
|
7157
|
+
/* @__PURE__ */ jsxRuntime.jsxs(LoginButton, { onClick: handleWalletLogin, children: [
|
|
7158
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
|
|
7159
|
+
"Sign in with Wallet"
|
|
7160
|
+
] })
|
|
7161
|
+
] }),
|
|
7162
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SignUpPrompt, { children: [
|
|
7163
|
+
"New to Loaf?",
|
|
7164
|
+
" ",
|
|
7165
|
+
/* @__PURE__ */ jsxRuntime.jsx(SignUpLink, { type: "button", onClick: () => handleEmailClick(true), children: "Sign up" })
|
|
7161
7166
|
] })
|
|
7162
7167
|
] }) });
|
|
7163
7168
|
}
|
|
7164
7169
|
if (view === "email") {
|
|
7165
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7170
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7166
7171
|
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
7167
7172
|
/* @__PURE__ */ jsxRuntime.jsxs(BackButton, { onClick: handleBack, children: [
|
|
7168
7173
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
|
|
@@ -7201,7 +7206,7 @@ var LoginPopup = ({
|
|
|
7201
7206
|
] }) });
|
|
7202
7207
|
}
|
|
7203
7208
|
if (view === "wallet-handle") {
|
|
7204
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7209
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7205
7210
|
!loading && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
7206
7211
|
/* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
|
|
7207
7212
|
/* @__PURE__ */ jsxRuntime.jsx(LogoContainer3, { children: /* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
|
|
@@ -7226,7 +7231,71 @@ var LoginPopup = ({
|
|
|
7226
7231
|
] }) });
|
|
7227
7232
|
}
|
|
7228
7233
|
if (view === "otp") {
|
|
7229
|
-
|
|
7234
|
+
if (gate) {
|
|
7235
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
|
|
7236
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: otpStatus === "valid" ? 3 : 2 }),
|
|
7237
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
|
|
7238
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
|
|
7239
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
|
|
7240
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
|
|
7241
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
|
|
7242
|
+
] }),
|
|
7243
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateOtpText, { children: [
|
|
7244
|
+
"We sent a code to",
|
|
7245
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
7246
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: email })
|
|
7247
|
+
] }),
|
|
7248
|
+
/* @__PURE__ */ jsxRuntime.jsx(OTPContainer, { children: otp.map((digit, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7249
|
+
OTPInput,
|
|
7250
|
+
{
|
|
7251
|
+
id: `otp-${index}`,
|
|
7252
|
+
type: "text",
|
|
7253
|
+
inputMode: "numeric",
|
|
7254
|
+
maxLength: 1,
|
|
7255
|
+
$status: otpStatus,
|
|
7256
|
+
readOnly: otpStatus === "valid" || otpStatus === "checking",
|
|
7257
|
+
value: digit,
|
|
7258
|
+
onChange: (event) => handleOTPChange(index, event.target.value),
|
|
7259
|
+
onKeyDown: (event) => handleOTPKeyDown(index, event),
|
|
7260
|
+
onInput: (event) => handleOTPInput(index, event),
|
|
7261
|
+
onPaste: handleOTPPaste,
|
|
7262
|
+
autoComplete: index === 0 ? "one-time-code" : "off",
|
|
7263
|
+
autoFocus: index === 0
|
|
7264
|
+
},
|
|
7265
|
+
index
|
|
7266
|
+
)) }),
|
|
7267
|
+
otpStatus === "invalid" && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: "That code isn't right. Try again." }),
|
|
7268
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateResendText, { children: [
|
|
7269
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7270
|
+
"button",
|
|
7271
|
+
{
|
|
7272
|
+
type: "button",
|
|
7273
|
+
onClick: (event) => {
|
|
7274
|
+
event.preventDefault();
|
|
7275
|
+
void handleSendCode(event);
|
|
7276
|
+
},
|
|
7277
|
+
children: "Resend code"
|
|
7278
|
+
}
|
|
7279
|
+
),
|
|
7280
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
7281
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7282
|
+
"button",
|
|
7283
|
+
{
|
|
7284
|
+
type: "button",
|
|
7285
|
+
onClick: () => {
|
|
7286
|
+
setOtp(Array(OTP_INPUT_LENGTH).fill(""));
|
|
7287
|
+
setOtpStatus("idle");
|
|
7288
|
+
setError("");
|
|
7289
|
+
setView("referral");
|
|
7290
|
+
},
|
|
7291
|
+
children: "Back"
|
|
7292
|
+
}
|
|
7293
|
+
)
|
|
7294
|
+
] })
|
|
7295
|
+
] })
|
|
7296
|
+
] });
|
|
7297
|
+
}
|
|
7298
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { $transparent: gate, onClick: loading ? void 0 : onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7230
7299
|
!loading && /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
7231
7300
|
loading ? /* @__PURE__ */ jsxRuntime.jsxs(AccountCreationLoader, { children: [
|
|
7232
7301
|
/* @__PURE__ */ jsxRuntime.jsx(SpinnerRing, {}),
|
|
@@ -7315,8 +7384,8 @@ var LoginPopup = ({
|
|
|
7315
7384
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
|
|
7316
7385
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
7317
7386
|
] }) }),
|
|
7318
|
-
/* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify
|
|
7319
|
-
/* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to
|
|
7387
|
+
/* @__PURE__ */ jsxRuntime.jsx(KycHeading, { children: "Verify Wholesale Status" }),
|
|
7388
|
+
/* @__PURE__ */ jsxRuntime.jsx(KycSubline, { children: "Initial offerings are only available to accredited or wholesale investors" }),
|
|
7320
7389
|
/* @__PURE__ */ jsxRuntime.jsx(KycStartButton, { type: "button", onClick: handleKycStart, disabled: kycLoading, children: kycLoading ? "Verifying\u2026" : kycStatusProp === "PENDING" || kycStatusProp === "ON_HOLD" ? "Resume Verification" : "Start Verification" }),
|
|
7321
7390
|
/* @__PURE__ */ jsxRuntime.jsx(KycDuration, { children: "Takes about 2 minutes" }),
|
|
7322
7391
|
/* @__PURE__ */ jsxRuntime.jsx(KycDivider, {}),
|
|
@@ -7402,7 +7471,7 @@ var LoginPopup = ({
|
|
|
7402
7471
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit USDC from an exchange or wallet" })
|
|
7403
7472
|
] })
|
|
7404
7473
|
] }),
|
|
7405
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled:
|
|
7474
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleFiatFund, disabled: true, children: [
|
|
7406
7475
|
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
|
|
7407
7476
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "22", x2: "21", y2: "22" }),
|
|
7408
7477
|
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "18", x2: "6", y2: "11" }),
|
|
@@ -7412,7 +7481,10 @@ var LoginPopup = ({
|
|
|
7412
7481
|
/* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "12 2 20 7 4 7" })
|
|
7413
7482
|
] }),
|
|
7414
7483
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
|
|
7415
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7484
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "0.25rem" }, children: [
|
|
7485
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontWeight: 600, fontSize: "0.95rem" }, children: fiatFundingLoading ? "Loading widget\u2026" : "Bank Deposit" }),
|
|
7486
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.6rem", fontWeight: 700, color: "#E6C87E", background: "rgba(230,198,86,0.12)", padding: "0.12rem 0.4rem", borderRadius: "4px", textTransform: "uppercase", letterSpacing: "0.04em", whiteSpace: "nowrap" }, children: "Coming Soon" })
|
|
7487
|
+
] }),
|
|
7416
7488
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { color: "rgba(255,255,255,0.5)", fontSize: "0.8rem" }, children: "Deposit to your account via card or bank transfer" })
|
|
7417
7489
|
] })
|
|
7418
7490
|
] })
|
|
@@ -7443,84 +7515,162 @@ var LoginPopup = ({
|
|
|
7443
7515
|
setReferralLoading(false);
|
|
7444
7516
|
}
|
|
7445
7517
|
};
|
|
7446
|
-
const
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
return;
|
|
7450
|
-
}
|
|
7518
|
+
const codeSuffix = referralCode.startsWith(CODE_PREFIX) ? referralCode.slice(CODE_PREFIX.length) : referralCode.replace(/^LOAF-?/i, "");
|
|
7519
|
+
const setCodeSuffix = (suffix) => {
|
|
7520
|
+
setReferralCode(CODE_PREFIX + suffix);
|
|
7451
7521
|
setReferralError("");
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
setWaitlistLoading(false);
|
|
7522
|
+
setError("");
|
|
7523
|
+
if (gate) {
|
|
7524
|
+
if (suffix.length === 5) void runCodeValidation(CODE_PREFIX + suffix);
|
|
7525
|
+
else {
|
|
7526
|
+
validatedCodeRef.current = null;
|
|
7527
|
+
setCodeStatus("idle");
|
|
7528
|
+
}
|
|
7460
7529
|
}
|
|
7461
7530
|
};
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7531
|
+
const handleCodeChange = (e) => {
|
|
7532
|
+
setCodeSuffix(e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 5));
|
|
7533
|
+
};
|
|
7534
|
+
const handleCodePaste = (e) => {
|
|
7535
|
+
e.preventDefault();
|
|
7536
|
+
const text = (e.clipboardData.getData("text") || "").toUpperCase();
|
|
7537
|
+
setCodeSuffix(text.replace(/^LOAF-?/, "").replace(/[^A-Z0-9]/g, "").slice(0, 5));
|
|
7538
|
+
};
|
|
7539
|
+
const codeComplete = codeSuffix.length === 5;
|
|
7540
|
+
const codeInput = /* @__PURE__ */ jsxRuntime.jsx(
|
|
7541
|
+
CodeSuffixInput,
|
|
7542
|
+
{
|
|
7543
|
+
type: "text",
|
|
7544
|
+
inputMode: "text",
|
|
7545
|
+
autoComplete: "off",
|
|
7546
|
+
autoCapitalize: "characters",
|
|
7547
|
+
spellCheck: false,
|
|
7548
|
+
maxLength: 5,
|
|
7549
|
+
"aria-label": "Access code",
|
|
7550
|
+
readOnly: codeStatus === "valid",
|
|
7551
|
+
value: codeSuffix,
|
|
7552
|
+
onChange: handleCodeChange,
|
|
7553
|
+
onPaste: handleCodePaste,
|
|
7554
|
+
onKeyDown: (e) => {
|
|
7555
|
+
if (e.key !== "Enter" || !codeComplete) return;
|
|
7556
|
+
if (gate) void runCodeValidation(referralCode);
|
|
7557
|
+
else void handleReferralSubmit();
|
|
7558
|
+
},
|
|
7559
|
+
autoFocus: true
|
|
7560
|
+
}
|
|
7561
|
+
);
|
|
7562
|
+
const signInStep = /* @__PURE__ */ jsxRuntime.jsxs(GateReveal, { children: [
|
|
7563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSendCode, style: { width: "100%" }, children: [
|
|
7564
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { children: [
|
|
7484
7565
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7485
|
-
|
|
7566
|
+
GateEmailInput,
|
|
7486
7567
|
{
|
|
7487
|
-
type: "
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
},
|
|
7494
|
-
onKeyDown: (e) => {
|
|
7495
|
-
if (e.key === "Enter") void handleReferralSubmit();
|
|
7496
|
-
},
|
|
7568
|
+
type: "email",
|
|
7569
|
+
inputMode: "email",
|
|
7570
|
+
autoComplete: "email",
|
|
7571
|
+
placeholder: "Enter your email",
|
|
7572
|
+
value: email,
|
|
7573
|
+
onChange: (event) => setEmail(event.target.value),
|
|
7497
7574
|
autoFocus: true
|
|
7498
7575
|
}
|
|
7499
7576
|
),
|
|
7500
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7501
|
-
SubmitButton,
|
|
7502
|
-
{
|
|
7503
|
-
type: "button",
|
|
7504
|
-
onClick: () => void handleReferralSubmit(),
|
|
7505
|
-
disabled: referralLoading || !referralCode.trim(),
|
|
7506
|
-
children: referralLoading ? "Verifying\u2026" : "Apply Code"
|
|
7507
|
-
}
|
|
7508
|
-
),
|
|
7509
|
-
referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
|
|
7577
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateSubmit, { type: "submit", "aria-label": "Continue", disabled: loading || !email, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(GateSpinner, {}) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) }) })
|
|
7510
7578
|
] }),
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7579
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
|
|
7580
|
+
] }),
|
|
7581
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7582
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateOr, { children: "or" }),
|
|
7583
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateWalletButton, { type: "button", onClick: handleWalletLogin, children: [
|
|
7584
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
|
|
7585
|
+
signInMode ? "Sign in with Wallet" : "Connect Wallet"
|
|
7586
|
+
] })
|
|
7587
|
+
] })
|
|
7588
|
+
] });
|
|
7589
|
+
if (gate) {
|
|
7590
|
+
const codeAccepted = codeStatus === "valid";
|
|
7591
|
+
const showSignIn = signInMode || signInRevealed;
|
|
7592
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(GateShell, { children: [
|
|
7593
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateTint, { $reveal: showSignIn ? 1 : 0 }),
|
|
7594
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateForm, { children: [
|
|
7595
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GateBrand, { children: [
|
|
7596
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateLogoLink, { href: "https://loafmarkets.com", "aria-label": "Go to loafmarkets.com", children: /* @__PURE__ */ jsxRuntime.jsx(GateLogo, { src: logoSrc, alt: logoAlt }) }),
|
|
7597
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateBrandDivider, {}),
|
|
7598
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateBetaTag, { children: "Private Beta" })
|
|
7599
|
+
] }),
|
|
7600
|
+
signInMode ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7601
|
+
signInStep,
|
|
7602
|
+
/* @__PURE__ */ jsxRuntime.jsx(GateResendText, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7603
|
+
"button",
|
|
7604
|
+
{
|
|
7605
|
+
type: "button",
|
|
7606
|
+
onClick: () => {
|
|
7607
|
+
setError("");
|
|
7608
|
+
setSignInMode(false);
|
|
7609
|
+
},
|
|
7610
|
+
children: "\u2190 Enter access code instead"
|
|
7611
|
+
}
|
|
7612
|
+
) })
|
|
7613
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7614
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { $status: codeStatus, children: [
|
|
7615
|
+
/* @__PURE__ */ jsxRuntime.jsx(CodePrefix, { children: CODE_PREFIX }),
|
|
7616
|
+
codeInput,
|
|
7617
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7618
|
+
GateSubmit,
|
|
7619
|
+
{
|
|
7620
|
+
type: "button",
|
|
7621
|
+
"aria-label": "Submit access code",
|
|
7622
|
+
$status: codeStatus,
|
|
7623
|
+
disabled: codeStatus === "checking" || !codeComplete,
|
|
7624
|
+
onClick: () => void runCodeValidation(referralCode),
|
|
7625
|
+
children: codeAccepted ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6L9 17l-5-5" }) }) : codeStatus === "checking" ? /* @__PURE__ */ jsxRuntime.jsx(GateSpinner, {}) : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14M13 6l6 6-6 6" }) })
|
|
7626
|
+
}
|
|
7627
|
+
)
|
|
7628
|
+
] }),
|
|
7629
|
+
(codeStatus === "invalid" || error && !signInRevealed) && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error || "That code isn't valid. Double-check and try again." }),
|
|
7630
|
+
signInRevealed ? signInStep : /* @__PURE__ */ jsxRuntime.jsxs(GateResendText, { children: [
|
|
7631
|
+
"Already have an account?",
|
|
7632
|
+
" ",
|
|
7633
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7634
|
+
"button",
|
|
7635
|
+
{
|
|
7636
|
+
type: "button",
|
|
7637
|
+
onClick: () => {
|
|
7638
|
+
setError("");
|
|
7639
|
+
setIsSignUp(false);
|
|
7640
|
+
setSignInMode(true);
|
|
7641
|
+
},
|
|
7642
|
+
children: "Sign in"
|
|
7643
|
+
}
|
|
7644
|
+
)
|
|
7645
|
+
] })
|
|
7646
|
+
] })
|
|
7647
|
+
] })
|
|
7648
|
+
] });
|
|
7649
|
+
}
|
|
7650
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7651
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
7652
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Title, { children: [
|
|
7653
|
+
/* @__PURE__ */ jsxRuntime.jsxs(LogoContainer3, { children: [
|
|
7654
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoImage, { src: logoSrc, alt: logoAlt }),
|
|
7655
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoBeta, { children: "Private Beta" })
|
|
7656
|
+
] }),
|
|
7657
|
+
/* @__PURE__ */ jsxRuntime.jsx(TitleText, { children: "Enter your access code" })
|
|
7658
|
+
] }),
|
|
7659
|
+
/* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginTop: "1.5rem", marginBottom: 0 }, children: [
|
|
7660
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CodeInputWrapper, { children: [
|
|
7661
|
+
/* @__PURE__ */ jsxRuntime.jsx(CodePrefix, { children: CODE_PREFIX }),
|
|
7662
|
+
codeInput
|
|
7663
|
+
] }),
|
|
7664
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7665
|
+
SubmitButton,
|
|
7516
7666
|
{
|
|
7517
7667
|
type: "button",
|
|
7518
|
-
onClick: () => void
|
|
7519
|
-
disabled:
|
|
7520
|
-
|
|
7521
|
-
children: waitlistLoading ? "Joining\u2026" : email ? "Skip for now & join Waitlist" : "Skip for now"
|
|
7668
|
+
onClick: () => void handleReferralSubmit(),
|
|
7669
|
+
disabled: referralLoading || !codeComplete,
|
|
7670
|
+
children: referralLoading ? "Verifying\u2026" : "Continue"
|
|
7522
7671
|
}
|
|
7523
|
-
)
|
|
7672
|
+
),
|
|
7673
|
+
referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
|
|
7524
7674
|
] })
|
|
7525
7675
|
] }) });
|
|
7526
7676
|
}
|
|
@@ -7640,8 +7790,9 @@ var Overlay2 = styled10__default.default.div`
|
|
|
7640
7790
|
left: 0;
|
|
7641
7791
|
right: 0;
|
|
7642
7792
|
bottom: 0;
|
|
7643
|
-
background-color: rgba(0, 0, 0, 0.8);
|
|
7644
|
-
backdrop-filter: blur(4px);
|
|
7793
|
+
background-color: ${(props) => props.$gate ? "var(--color-background, #0a0a0a)" : props.$transparent ? "rgba(0, 0, 0, 0.45)" : "rgba(0, 0, 0, 0.8)"};
|
|
7794
|
+
backdrop-filter: ${(props) => props.$gate ? "none" : props.$transparent ? "blur(2px)" : "blur(4px)"};
|
|
7795
|
+
transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
|
|
7645
7796
|
display: flex;
|
|
7646
7797
|
justify-content: center;
|
|
7647
7798
|
align-items: center;
|
|
@@ -7658,15 +7809,15 @@ var Overlay2 = styled10__default.default.div`
|
|
|
7658
7809
|
}
|
|
7659
7810
|
`;
|
|
7660
7811
|
var PopupContainer = styled10__default.default.div`
|
|
7661
|
-
background-color: var(--color-background, #0a0a0a);
|
|
7662
|
-
border: 1px solid rgba(230, 198, 86, 0.3);
|
|
7812
|
+
background-color: ${(props) => props.$gate ? "transparent" : "var(--color-background, #0a0a0a)"};
|
|
7813
|
+
border: ${(props) => props.$gate ? "none" : "1px solid rgba(230, 198, 86, 0.3)"};
|
|
7663
7814
|
border-radius: var(--border-radius, 12px);
|
|
7664
7815
|
padding: 2.5rem;
|
|
7665
7816
|
max-width: 440px;
|
|
7666
7817
|
width: 90%;
|
|
7667
7818
|
position: relative;
|
|
7668
7819
|
animation: slideUp 0.3s ease-out;
|
|
7669
|
-
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
7820
|
+
box-shadow: ${(props) => props.$gate ? "none" : "0 10px 30px rgba(0, 0, 0, 0.3)"};
|
|
7670
7821
|
|
|
7671
7822
|
@keyframes slideUp {
|
|
7672
7823
|
from {
|
|
@@ -7853,29 +8004,27 @@ var Title = styled10__default.default.h2`
|
|
|
7853
8004
|
flex-direction: column;
|
|
7854
8005
|
align-items: center;
|
|
7855
8006
|
justify-content: center;
|
|
7856
|
-
gap:
|
|
8007
|
+
gap: 1rem;
|
|
7857
8008
|
`;
|
|
7858
|
-
styled10__default.default.
|
|
7859
|
-
font-size: 0.9rem;
|
|
7860
|
-
font-weight: 400;
|
|
7861
|
-
color: var(--color-text-secondary, #848e9c);
|
|
8009
|
+
var TitleText = styled10__default.default.span`
|
|
7862
8010
|
text-align: center;
|
|
7863
|
-
|
|
8011
|
+
line-height: 1.2;
|
|
7864
8012
|
`;
|
|
7865
|
-
var
|
|
7866
|
-
|
|
7867
|
-
font-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
8013
|
+
var LogoBeta = styled10__default.default.span`
|
|
8014
|
+
color: var(--color-accent, #E6C87E);
|
|
8015
|
+
font-size: 0.6rem;
|
|
8016
|
+
font-weight: 600;
|
|
8017
|
+
letter-spacing: 0.14em;
|
|
8018
|
+
text-transform: uppercase;
|
|
8019
|
+
white-space: nowrap;
|
|
8020
|
+
padding-bottom: 0.95rem;
|
|
7871
8021
|
`;
|
|
7872
|
-
var
|
|
8022
|
+
var Subtitle = styled10__default.default.p`
|
|
7873
8023
|
font-size: 0.9rem;
|
|
7874
8024
|
font-weight: 400;
|
|
7875
8025
|
color: var(--color-text-secondary, #848e9c);
|
|
7876
|
-
text-align:
|
|
7877
|
-
margin: 0 0
|
|
7878
|
-
line-height: 1.5;
|
|
8026
|
+
text-align: center;
|
|
8027
|
+
margin: 0 0 2rem;
|
|
7879
8028
|
`;
|
|
7880
8029
|
var LogoContainer3 = styled10__default.default.div`
|
|
7881
8030
|
display: flex;
|
|
@@ -7885,148 +8034,349 @@ var LogoContainer3 = styled10__default.default.div`
|
|
|
7885
8034
|
margin-bottom: 0.5rem;
|
|
7886
8035
|
`;
|
|
7887
8036
|
var LogoImage = styled10__default.default.img`
|
|
7888
|
-
height:
|
|
8037
|
+
height: 60px;
|
|
7889
8038
|
`;
|
|
7890
|
-
styled10__default.default.div`
|
|
8039
|
+
var ButtonsContainer = styled10__default.default.div`
|
|
7891
8040
|
display: flex;
|
|
7892
8041
|
flex-direction: column;
|
|
7893
8042
|
gap: 1rem;
|
|
7894
8043
|
margin-bottom: 1.5rem;
|
|
7895
8044
|
`;
|
|
7896
|
-
styled10__default.default.div`
|
|
8045
|
+
var SignUpPrompt = styled10__default.default.div`
|
|
7897
8046
|
text-align: center;
|
|
7898
8047
|
font-size: 0.875rem;
|
|
7899
8048
|
color: var(--color-text-secondary, #848e9c);
|
|
7900
8049
|
margin-bottom: 0.5rem;
|
|
7901
8050
|
`;
|
|
7902
|
-
styled10__default.default.button`
|
|
7903
|
-
background: none;
|
|
7904
|
-
border: none;
|
|
7905
|
-
padding: 0;
|
|
7906
|
-
font: inherit;
|
|
7907
|
-
color: var(--color-accent, #E6C87E);
|
|
7908
|
-
text-decoration: underline;
|
|
7909
|
-
cursor: pointer;
|
|
8051
|
+
var SignUpLink = styled10__default.default.button`
|
|
8052
|
+
background: none;
|
|
8053
|
+
border: none;
|
|
8054
|
+
padding: 0;
|
|
8055
|
+
font: inherit;
|
|
8056
|
+
color: var(--color-accent, #E6C87E);
|
|
8057
|
+
text-decoration: underline;
|
|
8058
|
+
cursor: pointer;
|
|
8059
|
+
|
|
8060
|
+
&:hover {
|
|
8061
|
+
opacity: 0.85;
|
|
8062
|
+
}
|
|
8063
|
+
`;
|
|
8064
|
+
var LoginButton = styled10__default.default.button`
|
|
8065
|
+
display: flex;
|
|
8066
|
+
align-items: center;
|
|
8067
|
+
justify-content: center;
|
|
8068
|
+
gap: 0.75rem;
|
|
8069
|
+
padding: 1rem 1.5rem;
|
|
8070
|
+
background-color: var(--color-background-light, #1a1a1a);
|
|
8071
|
+
border: 1px solid rgba(230, 198, 86, 0.2);
|
|
8072
|
+
border-radius: var(--border-radius, 8px);
|
|
8073
|
+
color: var(--color-text, #eaecef);
|
|
8074
|
+
font-size: 1rem;
|
|
8075
|
+
font-weight: 500;
|
|
8076
|
+
cursor: pointer;
|
|
8077
|
+
transition: all 0.2s ease;
|
|
8078
|
+
|
|
8079
|
+
&:hover {
|
|
8080
|
+
background-color: rgba(230, 198, 86, 0.1);
|
|
8081
|
+
border-color: var(--color-accent, #E6C87E);
|
|
8082
|
+
}
|
|
8083
|
+
|
|
8084
|
+
svg {
|
|
8085
|
+
width: 20px;
|
|
8086
|
+
height: 20px;
|
|
8087
|
+
color: var(--color-accent, #E6C87E);
|
|
8088
|
+
}
|
|
8089
|
+
`;
|
|
8090
|
+
var InfoText = styled10__default.default.p`
|
|
8091
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8092
|
+
font-size: 0.875rem;
|
|
8093
|
+
text-align: center;
|
|
8094
|
+
line-height: 1.5;
|
|
8095
|
+
`;
|
|
8096
|
+
var EmailFormContainer = styled10__default.default.div`
|
|
8097
|
+
display: flex;
|
|
8098
|
+
flex-direction: column;
|
|
8099
|
+
gap: 1rem;
|
|
8100
|
+
margin-bottom: 1.5rem;
|
|
8101
|
+
`;
|
|
8102
|
+
var EmailInput = styled10__default.default.input`
|
|
8103
|
+
width: 100%;
|
|
8104
|
+
padding: 1rem 1.25rem;
|
|
8105
|
+
background-color: var(--color-background-light, #1a1a1a);
|
|
8106
|
+
border: 1px solid rgba(230, 198, 86, 0.2);
|
|
8107
|
+
border-radius: var(--border-radius, 8px);
|
|
8108
|
+
color: var(--color-text, #eaecef);
|
|
8109
|
+
font-size: 1rem;
|
|
8110
|
+
transition: all 0.2s ease;
|
|
8111
|
+
|
|
8112
|
+
&:focus {
|
|
8113
|
+
outline: none;
|
|
8114
|
+
border-color: var(--color-accent, #E6C87E);
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
&::placeholder {
|
|
8118
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8119
|
+
}
|
|
8120
|
+
`;
|
|
8121
|
+
var codeBorderColor = (status, focused) => {
|
|
8122
|
+
if (status === "valid") return "var(--color-positive, #00C076)";
|
|
8123
|
+
if (status === "invalid") return "var(--color-negative, #FF5757)";
|
|
8124
|
+
return focused ? "var(--color-accent, #E6C87E)" : "rgba(230, 198, 86, 0.2)";
|
|
8125
|
+
};
|
|
8126
|
+
var CodeInputWrapper = styled10__default.default.div`
|
|
8127
|
+
display: flex;
|
|
8128
|
+
align-items: center;
|
|
8129
|
+
width: 100%;
|
|
8130
|
+
padding: 1rem 1.25rem;
|
|
8131
|
+
background-color: var(--color-background-light, #1a1a1a);
|
|
8132
|
+
border: 1px solid ${(props) => codeBorderColor(props.$status, false)};
|
|
8133
|
+
border-radius: var(--border-radius, 8px);
|
|
8134
|
+
box-shadow: ${(props) => props.$status === "valid" ? "0 0 0 1px var(--color-positive, #00C076)" : props.$status === "invalid" ? "0 0 0 1px var(--color-negative, #FF5757)" : "none"};
|
|
8135
|
+
transition: all 0.2s ease;
|
|
8136
|
+
|
|
8137
|
+
&:focus-within {
|
|
8138
|
+
border-color: ${(props) => codeBorderColor(props.$status, true)};
|
|
8139
|
+
}
|
|
8140
|
+
`;
|
|
8141
|
+
var CodePrefix = styled10__default.default.span`
|
|
8142
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8143
|
+
font-size: 1.1rem;
|
|
8144
|
+
font-weight: 600;
|
|
8145
|
+
letter-spacing: 0.22em;
|
|
8146
|
+
font-family: 'Space Grotesk', monospace;
|
|
8147
|
+
user-select: none;
|
|
8148
|
+
`;
|
|
8149
|
+
var CodeSuffixInput = styled10__default.default.input`
|
|
8150
|
+
flex: 1;
|
|
8151
|
+
min-width: 0;
|
|
8152
|
+
border: none;
|
|
8153
|
+
background: transparent;
|
|
8154
|
+
color: var(--color-text, #eaecef);
|
|
8155
|
+
font-size: 1.1rem;
|
|
8156
|
+
font-weight: 600;
|
|
8157
|
+
letter-spacing: 0.22em;
|
|
8158
|
+
text-transform: uppercase;
|
|
8159
|
+
font-family: 'Space Grotesk', monospace;
|
|
8160
|
+
/* Explicit line-height so iOS in-app WebViews size the caret to the text
|
|
8161
|
+
box instead of rendering a short, top-aligned caret (line-height: normal
|
|
8162
|
+
+ webfont + letter-spacing miscomputes it in some WebViews). */
|
|
8163
|
+
line-height: 1.5;
|
|
8164
|
+
|
|
8165
|
+
&:focus {
|
|
8166
|
+
outline: none;
|
|
8167
|
+
}
|
|
8168
|
+
|
|
8169
|
+
&::placeholder {
|
|
8170
|
+
color: rgba(132, 142, 156, 0.45);
|
|
8171
|
+
letter-spacing: 0.22em;
|
|
8172
|
+
}
|
|
8173
|
+
`;
|
|
8174
|
+
var GateBrand = styled10__default.default.div`
|
|
8175
|
+
display: flex;
|
|
8176
|
+
align-items: center;
|
|
8177
|
+
justify-content: center;
|
|
8178
|
+
gap: 0.7rem;
|
|
8179
|
+
margin-bottom: 0.6rem;
|
|
8180
|
+
`;
|
|
8181
|
+
var GateLogoLink = styled10__default.default.a`
|
|
8182
|
+
display: inline-flex;
|
|
8183
|
+
align-items: center;
|
|
8184
|
+
cursor: pointer;
|
|
8185
|
+
transition: opacity 0.15s ease;
|
|
8186
|
+
|
|
8187
|
+
&:hover {
|
|
8188
|
+
opacity: 0.85;
|
|
8189
|
+
}
|
|
8190
|
+
`;
|
|
8191
|
+
var GateLogo = styled10__default.default.img`
|
|
8192
|
+
height: 44px;
|
|
8193
|
+
display: block;
|
|
8194
|
+
`;
|
|
8195
|
+
var GateBrandDivider = styled10__default.default.span`
|
|
8196
|
+
width: 1px;
|
|
8197
|
+
height: 26px;
|
|
8198
|
+
background: rgba(255, 255, 255, 0.18);
|
|
8199
|
+
`;
|
|
8200
|
+
var GateBetaTag = styled10__default.default.span`
|
|
8201
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8202
|
+
font-size: 0.8rem;
|
|
8203
|
+
font-weight: 500;
|
|
8204
|
+
letter-spacing: 0.28em;
|
|
8205
|
+
text-transform: uppercase;
|
|
8206
|
+
`;
|
|
8207
|
+
var GateForm = styled10__default.default.div`
|
|
8208
|
+
display: flex;
|
|
8209
|
+
flex-direction: column;
|
|
8210
|
+
align-items: center;
|
|
8211
|
+
gap: 0.9rem;
|
|
8212
|
+
width: 100%;
|
|
8213
|
+
max-width: 360px;
|
|
8214
|
+
position: relative;
|
|
8215
|
+
z-index: 1;
|
|
8216
|
+
`;
|
|
8217
|
+
var GateShell = styled10__default.default.div`
|
|
8218
|
+
position: fixed;
|
|
8219
|
+
inset: 0;
|
|
8220
|
+
display: flex;
|
|
8221
|
+
align-items: center;
|
|
8222
|
+
justify-content: center;
|
|
8223
|
+
z-index: 10000;
|
|
8224
|
+
background-color: rgba(10, 10, 12, 0.66);
|
|
8225
|
+
`;
|
|
8226
|
+
var GateTint = styled10__default.default.div`
|
|
8227
|
+
position: absolute;
|
|
8228
|
+
left: 0;
|
|
8229
|
+
right: 0;
|
|
8230
|
+
bottom: 0;
|
|
8231
|
+
height: calc(${(props) => (3 - Math.max(0, Math.min(3, props.$reveal))) / 3 * 100}% + 90px);
|
|
8232
|
+
background: linear-gradient(
|
|
8233
|
+
to top,
|
|
8234
|
+
var(--color-background, #0a0a0c) calc(100% - 90px),
|
|
8235
|
+
rgba(10, 10, 12, 0) 100%
|
|
8236
|
+
);
|
|
8237
|
+
transition: height 0.65s ease;
|
|
8238
|
+
pointer-events: none;
|
|
8239
|
+
`;
|
|
8240
|
+
var GateOtpText = styled10__default.default.p`
|
|
8241
|
+
margin: 0;
|
|
8242
|
+
text-align: center;
|
|
8243
|
+
font-size: 0.9rem;
|
|
8244
|
+
line-height: 1.5;
|
|
8245
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8246
|
+
|
|
8247
|
+
strong {
|
|
8248
|
+
color: var(--color-text, #eaecef);
|
|
8249
|
+
font-weight: 600;
|
|
8250
|
+
}
|
|
8251
|
+
`;
|
|
8252
|
+
var GateResendText = styled10__default.default.p`
|
|
8253
|
+
margin: 0.2rem 0 0;
|
|
8254
|
+
font-size: 0.85rem;
|
|
8255
|
+
color: var(--color-text-secondary, #848e9c);
|
|
7910
8256
|
|
|
7911
|
-
|
|
7912
|
-
|
|
8257
|
+
button {
|
|
8258
|
+
background: none;
|
|
8259
|
+
border: none;
|
|
8260
|
+
color: var(--color-accent, #E6C87E);
|
|
8261
|
+
cursor: pointer;
|
|
8262
|
+
text-decoration: underline;
|
|
8263
|
+
font-size: inherit;
|
|
7913
8264
|
}
|
|
7914
8265
|
`;
|
|
7915
|
-
var
|
|
8266
|
+
var GateSubmit = styled10__default.default.button`
|
|
7916
8267
|
display: flex;
|
|
7917
|
-
width: 100%;
|
|
7918
|
-
box-sizing: border-box;
|
|
7919
8268
|
align-items: center;
|
|
7920
8269
|
justify-content: center;
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
font-weight: 500;
|
|
8270
|
+
flex-shrink: 0;
|
|
8271
|
+
width: 28px;
|
|
8272
|
+
height: 28px;
|
|
8273
|
+
margin-left: 0.5rem;
|
|
8274
|
+
padding: 0;
|
|
8275
|
+
background: none;
|
|
8276
|
+
border: none;
|
|
7929
8277
|
cursor: pointer;
|
|
7930
|
-
|
|
8278
|
+
color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : props.$status === "invalid" ? "var(--color-negative, #FF5757)" : "var(--color-accent, #E6C87E)"};
|
|
8279
|
+
transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
|
|
7931
8280
|
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
&:hover {
|
|
7935
|
-
background-color: rgba(230, 198, 86, 0.1);
|
|
7936
|
-
border-color: var(--color-accent, #E6C87E);
|
|
8281
|
+
&:not(:disabled):hover {
|
|
8282
|
+
transform: translateX(2px);
|
|
7937
8283
|
}
|
|
7938
8284
|
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
8285
|
+
&:disabled {
|
|
8286
|
+
opacity: ${(props) => props.$status === "valid" ? 1 : 0.35};
|
|
8287
|
+
color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : "var(--color-text-secondary, #848e9c)"};
|
|
8288
|
+
cursor: default;
|
|
7943
8289
|
}
|
|
7944
8290
|
`;
|
|
7945
|
-
var
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
`;
|
|
7951
|
-
var EmailFormContainer = styled10__default.default.div`
|
|
7952
|
-
display: flex;
|
|
7953
|
-
flex-direction: column;
|
|
7954
|
-
gap: 1rem;
|
|
7955
|
-
margin-bottom: 1.5rem;
|
|
7956
|
-
`;
|
|
7957
|
-
var EmailInput = styled10__default.default.input`
|
|
7958
|
-
width: 100%;
|
|
7959
|
-
padding: 1rem 1.25rem;
|
|
7960
|
-
background-color: var(--color-background-light, #1a1a1a);
|
|
7961
|
-
border: 1px solid rgba(230, 198, 86, 0.2);
|
|
7962
|
-
border-radius: var(--border-radius, 8px);
|
|
8291
|
+
var GateEmailInput = styled10__default.default.input`
|
|
8292
|
+
flex: 1;
|
|
8293
|
+
min-width: 0;
|
|
8294
|
+
border: none;
|
|
8295
|
+
background: transparent;
|
|
7963
8296
|
color: var(--color-text, #eaecef);
|
|
7964
8297
|
font-size: 1rem;
|
|
7965
|
-
transition: all 0.2s ease;
|
|
7966
8298
|
|
|
7967
8299
|
&:focus {
|
|
7968
8300
|
outline: none;
|
|
7969
|
-
border-color: var(--color-accent, #E6C87E);
|
|
7970
8301
|
}
|
|
7971
8302
|
|
|
7972
8303
|
&::placeholder {
|
|
7973
|
-
color:
|
|
8304
|
+
color: rgba(132, 142, 156, 0.5);
|
|
8305
|
+
}
|
|
8306
|
+
`;
|
|
8307
|
+
var GateSpinner = styled10__default.default.span`
|
|
8308
|
+
width: 18px;
|
|
8309
|
+
height: 18px;
|
|
8310
|
+
border: 2px solid rgba(230, 198, 86, 0.3);
|
|
8311
|
+
border-top-color: var(--color-accent, #E6C87E);
|
|
8312
|
+
border-radius: 50%;
|
|
8313
|
+
animation: gateSpin 0.7s linear infinite;
|
|
8314
|
+
|
|
8315
|
+
@keyframes gateSpin {
|
|
8316
|
+
to { transform: rotate(360deg); }
|
|
7974
8317
|
}
|
|
7975
8318
|
`;
|
|
7976
|
-
var
|
|
8319
|
+
var GateOr = styled10__default.default.div`
|
|
7977
8320
|
display: flex;
|
|
7978
|
-
|
|
8321
|
+
align-items: center;
|
|
7979
8322
|
gap: 0.6rem;
|
|
7980
8323
|
width: 100%;
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
width: 100%;
|
|
7985
|
-
`;
|
|
7986
|
-
var GateInput = styled10__default.default.input`
|
|
7987
|
-
width: 100%;
|
|
7988
|
-
box-sizing: border-box;
|
|
7989
|
-
padding: 1rem 3.25rem 1rem 1.25rem;
|
|
7990
|
-
background-color: var(--color-background-light, #1a1a1a);
|
|
7991
|
-
border: 1px solid rgba(230, 198, 86, 0.2);
|
|
7992
|
-
border-radius: var(--border-radius, 8px);
|
|
7993
|
-
color: var(--color-text, #eaecef);
|
|
7994
|
-
font-size: 1rem;
|
|
7995
|
-
transition: all 0.2s ease;
|
|
8324
|
+
color: var(--color-text-secondary, #848e9c);
|
|
8325
|
+
font-size: 0.78rem;
|
|
8326
|
+
text-transform: lowercase;
|
|
7996
8327
|
|
|
7997
|
-
|
|
7998
|
-
&::
|
|
8328
|
+
&::before,
|
|
8329
|
+
&::after {
|
|
8330
|
+
content: "";
|
|
8331
|
+
flex: 1;
|
|
8332
|
+
height: 1px;
|
|
8333
|
+
background: rgba(255, 255, 255, 0.1);
|
|
8334
|
+
}
|
|
7999
8335
|
`;
|
|
8000
|
-
var
|
|
8001
|
-
|
|
8002
|
-
top: 50%;
|
|
8003
|
-
right: 0.55rem;
|
|
8004
|
-
transform: translateY(-50%);
|
|
8005
|
-
width: 34px;
|
|
8006
|
-
height: 34px;
|
|
8007
|
-
display: flex;
|
|
8336
|
+
var GateWalletButton = styled10__default.default.button`
|
|
8337
|
+
display: inline-flex;
|
|
8008
8338
|
align-items: center;
|
|
8009
8339
|
justify-content: center;
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8340
|
+
gap: 0.5rem;
|
|
8341
|
+
margin-top: 0.1rem;
|
|
8342
|
+
padding: 0.55rem 1.1rem;
|
|
8343
|
+
background: transparent;
|
|
8344
|
+
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
8345
|
+
border-radius: var(--border-radius, 8px);
|
|
8013
8346
|
color: var(--color-text-secondary, #848e9c);
|
|
8347
|
+
font-size: 0.85rem;
|
|
8348
|
+
font-weight: 500;
|
|
8014
8349
|
cursor: pointer;
|
|
8015
|
-
transition: color 0.
|
|
8350
|
+
transition: border-color 0.15s ease, color 0.15s ease;
|
|
8351
|
+
|
|
8352
|
+
svg {
|
|
8353
|
+
width: 16px;
|
|
8354
|
+
height: 16px;
|
|
8355
|
+
}
|
|
8016
8356
|
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8357
|
+
&:hover {
|
|
8358
|
+
border-color: rgba(230, 198, 86, 0.4);
|
|
8359
|
+
color: var(--color-text, #eaecef);
|
|
8360
|
+
}
|
|
8020
8361
|
`;
|
|
8021
|
-
var
|
|
8362
|
+
var GateReveal = styled10__default.default.div`
|
|
8022
8363
|
display: flex;
|
|
8364
|
+
flex-direction: column;
|
|
8023
8365
|
align-items: center;
|
|
8024
|
-
gap: 0.
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
margin: 0.4rem 0;
|
|
8366
|
+
gap: 0.9rem;
|
|
8367
|
+
width: 100%;
|
|
8368
|
+
animation: gateReveal 0.3s ease-out;
|
|
8028
8369
|
|
|
8029
|
-
|
|
8370
|
+
@keyframes gateReveal {
|
|
8371
|
+
from {
|
|
8372
|
+
opacity: 0;
|
|
8373
|
+
transform: translateY(-6px);
|
|
8374
|
+
}
|
|
8375
|
+
to {
|
|
8376
|
+
opacity: 1;
|
|
8377
|
+
transform: translateY(0);
|
|
8378
|
+
}
|
|
8379
|
+
}
|
|
8030
8380
|
`;
|
|
8031
8381
|
var OTPContainer = styled10__default.default.div`
|
|
8032
8382
|
display: flex;
|
|
@@ -8040,15 +8390,17 @@ var OTPInput = styled10__default.default.input`
|
|
|
8040
8390
|
font-size: 1.5rem;
|
|
8041
8391
|
font-weight: 600;
|
|
8042
8392
|
background-color: var(--color-background-light, #1a1a1a);
|
|
8043
|
-
border: 1px solid
|
|
8393
|
+
border: 1px solid ${(props) => codeBorderColor(props.$status, false)};
|
|
8044
8394
|
border-radius: var(--border-radius, 8px);
|
|
8045
|
-
color: var(--color-accent, #E6C87E);
|
|
8395
|
+
color: ${(props) => props.$status === "valid" ? "var(--color-positive, #00C076)" : props.$status === "invalid" ? "var(--color-negative, #FF5757)" : "var(--color-accent, #E6C87E)"};
|
|
8396
|
+
box-shadow: ${(props) => props.$status === "valid" ? "0 0 0 1px var(--color-positive, #00C076)" : props.$status === "invalid" ? "0 0 0 1px var(--color-negative, #FF5757)" : "none"};
|
|
8397
|
+
opacity: ${(props) => props.$status === "checking" ? 0.6 : 1};
|
|
8046
8398
|
transition: all 0.2s ease;
|
|
8047
8399
|
|
|
8048
8400
|
&:focus {
|
|
8049
8401
|
outline: none;
|
|
8050
|
-
border-color:
|
|
8051
|
-
box-shadow: 0 0 0 2px rgba(230, 198, 86, 0.2);
|
|
8402
|
+
border-color: ${(props) => codeBorderColor(props.$status, true)};
|
|
8403
|
+
box-shadow: 0 0 0 2px ${(props) => props.$status === "valid" ? "rgba(0, 192, 118, 0.25)" : props.$status === "invalid" ? "rgba(255, 87, 87, 0.25)" : "rgba(230, 198, 86, 0.2)"};
|
|
8052
8404
|
}
|
|
8053
8405
|
`;
|
|
8054
8406
|
var SubmitButton = styled10__default.default.button`
|
|
@@ -8416,15 +8768,24 @@ var SpinnerRing = styled10__default.default.div`
|
|
|
8416
8768
|
}
|
|
8417
8769
|
`;
|
|
8418
8770
|
var PREPARING_FACTS = [
|
|
8419
|
-
|
|
8420
|
-
"Loaf settles trades in about 1 second. Traditional property takes ~90 days.",
|
|
8771
|
+
// Exchange
|
|
8421
8772
|
"Our matching engine processes orders in 30 microseconds.",
|
|
8422
|
-
"
|
|
8423
|
-
"Own a slice of premium real estate \u2014 no mortgage, no paperwork.",
|
|
8773
|
+
"Loaf settles in 1 second. Traditional property takes 30-90 days.",
|
|
8424
8774
|
"Buy and sell property as easily as a stock, on a live orderbook.",
|
|
8425
|
-
"
|
|
8426
|
-
"
|
|
8427
|
-
|
|
8775
|
+
"Continuous price discovery, not a single buyer negotiating in a back room.",
|
|
8776
|
+
"Algo-trade property on our API. Build a bot with Claude using our docs.",
|
|
8777
|
+
// What you're holding
|
|
8778
|
+
"Hold shares secured 1:1 by the underlying property, as regulated securities.",
|
|
8779
|
+
"The same economic exposure as owning the property. Without the friction, gatekeeping, or illiquidity.",
|
|
8780
|
+
"Securitisation of property brings a new dimension of flexibility and tradability.",
|
|
8781
|
+
// Frictionless
|
|
8782
|
+
"Settle in seconds, then sell again whenever you want. No waiting days or weeks.",
|
|
8783
|
+
"99% of the frictions in property transactions can be, and have been, reduced.",
|
|
8784
|
+
// Vision
|
|
8785
|
+
"A family office can rebalance a billion dollars in an afternoon, but couldn't sell a $50M property in under six months.",
|
|
8786
|
+
"Family offices and HNWIs prize capital flexibility. Loaf makes property flexible.",
|
|
8787
|
+
"There's no law of physics that says the world's oldest asset class must stay illiquid.",
|
|
8788
|
+
"What if property underwent an IPO?"
|
|
8428
8789
|
];
|
|
8429
8790
|
var FactCard = styled10__default.default.div`
|
|
8430
8791
|
margin-top: 1.5rem;
|
|
@@ -8532,7 +8893,7 @@ var LogoImage2 = styled10__default.default.img`
|
|
|
8532
8893
|
height: 30px;
|
|
8533
8894
|
width: auto;
|
|
8534
8895
|
`;
|
|
8535
|
-
var
|
|
8896
|
+
var LogoBeta2 = styled10__default.default.span`
|
|
8536
8897
|
font-size: 0.6rem;
|
|
8537
8898
|
font-weight: 600;
|
|
8538
8899
|
letter-spacing: 0.08em;
|
|
@@ -8690,7 +9051,7 @@ function OnboardingGuide({
|
|
|
8690
9051
|
/* @__PURE__ */ jsxRuntime.jsx(CloseButton2, { onClick: onClose, "aria-label": "Skip", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l12 12M18 6L6 18" }) }) }),
|
|
8691
9052
|
/* @__PURE__ */ jsxRuntime.jsxs(LogoRow, { children: [
|
|
8692
9053
|
/* @__PURE__ */ jsxRuntime.jsx(LogoImage2, { src: logoSrc, alt: "Loaf" }),
|
|
8693
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9054
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoBeta2, { children: "Private Beta" })
|
|
8694
9055
|
] }),
|
|
8695
9056
|
/* @__PURE__ */ jsxRuntime.jsx(Title2, { children: "You're in \u{1F389}" }),
|
|
8696
9057
|
/* @__PURE__ */ jsxRuntime.jsx(Subtitle2, { children: "Here's everything you need to make your first trade." }),
|
|
@@ -12060,7 +12421,8 @@ function AssetSelectorBar({
|
|
|
12060
12421
|
onSelect,
|
|
12061
12422
|
trailing,
|
|
12062
12423
|
imageUrl,
|
|
12063
|
-
badgeLabel
|
|
12424
|
+
badgeLabel,
|
|
12425
|
+
tickerPrimary
|
|
12064
12426
|
}) {
|
|
12065
12427
|
const [isDropdownOpen, setIsDropdownOpen] = React5.useState(false);
|
|
12066
12428
|
const hasItems = selectorItems && selectorItems.length > 0;
|
|
@@ -12071,9 +12433,14 @@ function AssetSelectorBar({
|
|
|
12071
12433
|
];
|
|
12072
12434
|
return /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(IPOAssetSelector, { children: [
|
|
12073
12435
|
imageUrl && /* @__PURE__ */ jsxRuntime.jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
|
|
12074
|
-
/* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
|
|
12075
|
-
|
|
12076
|
-
|
|
12436
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { $flush: tickerPrimary, onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
|
|
12437
|
+
tickerPrimary && currentTicker ? /* @__PURE__ */ jsxRuntime.jsxs(AssetIdentity, { children: [
|
|
12438
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetTicker, { children: currentTicker.toUpperCase() }),
|
|
12439
|
+
/* @__PURE__ */ jsxRuntime.jsx(AssetSubName, { children: propertyName })
|
|
12440
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12441
|
+
propertyName,
|
|
12442
|
+
currentTicker ? ` (${currentTicker.toUpperCase()})` : ""
|
|
12443
|
+
] }),
|
|
12077
12444
|
badgeLabel && /* @__PURE__ */ jsxRuntime.jsx(CompetitionBadge, { children: badgeLabel }),
|
|
12078
12445
|
hasItems && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12079
12446
|
"svg",
|
|
@@ -12102,7 +12469,7 @@ function AssetSelectorBar({
|
|
|
12102
12469
|
] })
|
|
12103
12470
|
] })
|
|
12104
12471
|
] }, m.label)) }),
|
|
12105
|
-
trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
|
|
12472
|
+
trailing != null && /* @__PURE__ */ jsxRuntime.jsx(TrailingWrapper, { className: "asset-bar-trailing", children: /* @__PURE__ */ jsxRuntime.jsx(TrailingInner, { children: trailing }) }),
|
|
12106
12473
|
isDropdownOpen && hasItems && /* @__PURE__ */ jsxRuntime.jsx(IPODropdown, { children: selectorItems.map((item) => {
|
|
12107
12474
|
const isCurrent = item.tokenName === currentTokenName;
|
|
12108
12475
|
const status = item.status?.toUpperCase();
|
|
@@ -12193,13 +12560,40 @@ var AssetSelectorDropdown = styled10__default.default.div`
|
|
|
12193
12560
|
display: flex;
|
|
12194
12561
|
align-items: center;
|
|
12195
12562
|
cursor: pointer;
|
|
12196
|
-
|
|
12563
|
+
/* $flush (tickerPrimary): no horizontal padding / no hover box, so opening the
|
|
12564
|
+
selector doesn't make the ticker appear shoved right by the highlight box. */
|
|
12565
|
+
padding: ${(p) => p.$flush ? "0.25rem 0" : "0.5rem"};
|
|
12197
12566
|
border-radius: 8px;
|
|
12198
|
-
transition: all 0.2s ease;
|
|
12567
|
+
transition: ${(p) => p.$flush ? "none" : "all 0.2s ease"};
|
|
12199
12568
|
flex: 0 1 auto;
|
|
12200
12569
|
min-width: 0;
|
|
12201
12570
|
overflow: hidden;
|
|
12202
|
-
&:hover { background-color: rgba(255,255,255,0.05); }
|
|
12571
|
+
&:hover { background-color: ${(p) => p.$flush ? "transparent" : "rgba(255,255,255,0.05)"}; }
|
|
12572
|
+
`;
|
|
12573
|
+
var AssetIdentity = styled10__default.default.div`
|
|
12574
|
+
display: flex;
|
|
12575
|
+
flex-direction: column;
|
|
12576
|
+
min-width: 0;
|
|
12577
|
+
line-height: 1.2;
|
|
12578
|
+
`;
|
|
12579
|
+
var AssetTicker = styled10__default.default.span`
|
|
12580
|
+
font-weight: 700;
|
|
12581
|
+
font-size: 1.35rem;
|
|
12582
|
+
color: var(--color-text);
|
|
12583
|
+
letter-spacing: -0.01em;
|
|
12584
|
+
white-space: nowrap;
|
|
12585
|
+
overflow: hidden;
|
|
12586
|
+
text-overflow: ellipsis;
|
|
12587
|
+
|
|
12588
|
+
@media (max-width: 480px) { font-size: 1.2rem; }
|
|
12589
|
+
`;
|
|
12590
|
+
var AssetSubName = styled10__default.default.span`
|
|
12591
|
+
font-size: 0.8rem;
|
|
12592
|
+
font-weight: 500;
|
|
12593
|
+
color: rgba(255, 255, 255, 0.4);
|
|
12594
|
+
white-space: nowrap;
|
|
12595
|
+
overflow: hidden;
|
|
12596
|
+
text-overflow: ellipsis;
|
|
12203
12597
|
`;
|
|
12204
12598
|
var AssetName = styled10__default.default.div`
|
|
12205
12599
|
display: flex;
|
|
@@ -14473,6 +14867,7 @@ function PortfolioActivityPanel({
|
|
|
14473
14867
|
showPositionsTab = false,
|
|
14474
14868
|
showSubscriptionsTab = true,
|
|
14475
14869
|
onPositionClick,
|
|
14870
|
+
onSharePosition,
|
|
14476
14871
|
onAssetClick,
|
|
14477
14872
|
onClosePosition,
|
|
14478
14873
|
offeringOrders = [],
|
|
@@ -14764,17 +15159,23 @@ function PortfolioActivityPanel({
|
|
|
14764
15159
|
] }),
|
|
14765
15160
|
/* @__PURE__ */ jsxRuntime.jsxs(CPnlCell, { children: [
|
|
14766
15161
|
/* @__PURE__ */ jsxRuntime.jsx(CCellLabel, { children: "PNL (%)" }),
|
|
14767
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14768
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14769
|
-
|
|
14770
|
-
|
|
15162
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem" }, children: [
|
|
15163
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CPnlLine, { children: [
|
|
15164
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CPnlValue, { $positive: isPositive, children: [
|
|
15165
|
+
isPositive ? "+" : "-",
|
|
15166
|
+
formatCurrency4(Math.abs(pnl))
|
|
15167
|
+
] }),
|
|
15168
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CPnlPct, { $positive: isPositive, children: [
|
|
15169
|
+
"(",
|
|
15170
|
+
isPositive ? "+" : "",
|
|
15171
|
+
pnlPercent.toFixed(1),
|
|
15172
|
+
"%)"
|
|
15173
|
+
] })
|
|
14771
15174
|
] }),
|
|
14772
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
"%)"
|
|
14777
|
-
] })
|
|
15175
|
+
onSharePosition && !pos.settling && /* @__PURE__ */ jsxRuntime.jsx(CShareIconBtn, { role: "button", "aria-label": "Share position", onClick: (e) => {
|
|
15176
|
+
e.stopPropagation();
|
|
15177
|
+
onSharePosition(pos);
|
|
15178
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(ShareIcon, {}) })
|
|
14778
15179
|
] })
|
|
14779
15180
|
] }),
|
|
14780
15181
|
/* @__PURE__ */ jsxRuntime.jsx(CChevronWrap, { $open: posExpanded, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "rgba(255,255,255,0.5)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" }) }) })
|
|
@@ -14794,16 +15195,16 @@ function PortfolioActivityPanel({
|
|
|
14794
15195
|
/* @__PURE__ */ jsxRuntime.jsx(CDValue, { children: formatCurrency4(pos.marketPrice) })
|
|
14795
15196
|
] })
|
|
14796
15197
|
] }),
|
|
14797
|
-
onClosePosition && !pos.settling && /* @__PURE__ */ jsxRuntime.jsxs(CActionRow, { children: [
|
|
14798
|
-
/* @__PURE__ */ jsxRuntime.jsx(CCloseBtn, { onClick: () => onClosePosition(pos.tokenName, "market", pos.quantity, pos.marketPrice), children: "Market Sell" }),
|
|
14799
|
-
/* @__PURE__ */ jsxRuntime.jsx(CCloseBtn, { onClick: () => onClosePosition(pos.tokenName, "limit", pos.quantity, pos.marketPrice), children: "Limit Sell" })
|
|
15198
|
+
(onClosePosition || onSharePosition) && !pos.settling && /* @__PURE__ */ jsxRuntime.jsxs(CActionRow, { children: [
|
|
15199
|
+
onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(CCloseBtn, { onClick: () => onClosePosition(pos.tokenName, "market", pos.quantity, pos.marketPrice), children: "Market Sell" }),
|
|
15200
|
+
onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(CCloseBtn, { onClick: () => onClosePosition(pos.tokenName, "limit", pos.quantity, pos.marketPrice), children: "Limit Sell" })
|
|
14800
15201
|
] })
|
|
14801
15202
|
] })
|
|
14802
15203
|
] }, pos.tokenName);
|
|
14803
15204
|
})
|
|
14804
15205
|
] }),
|
|
14805
15206
|
positions.length > 0 && !compactPositions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14806
|
-
/* @__PURE__ */ jsxRuntime.jsxs(PositionsHeader, { $hasClose: !!onClosePosition, children: [
|
|
15207
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PositionsHeader, { $hasClose: !!(onClosePosition || onSharePosition), children: [
|
|
14807
15208
|
/* @__PURE__ */ jsxRuntime.jsxs(SortableHeaderCell, { $active: posSortKey === "asset", onClick: () => handlePosSort("asset"), children: [
|
|
14808
15209
|
"Asset ",
|
|
14809
15210
|
posSortKey === "asset" && (posSortAsc ? "\u2191" : "\u2193")
|
|
@@ -14836,7 +15237,7 @@ function PortfolioActivityPanel({
|
|
|
14836
15237
|
const pnl = pos.propertyPnl ?? currentValue - costBasis;
|
|
14837
15238
|
const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
|
|
14838
15239
|
const isPositive = pnl >= 0;
|
|
14839
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(PositionsRow, { $hasClose: !!onClosePosition, children: [
|
|
15240
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(PositionsRow, { $hasClose: !!(onClosePosition || onSharePosition), children: [
|
|
14840
15241
|
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
14841
15242
|
/* @__PURE__ */ jsxRuntime.jsx(HoldingsPropertyLink, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: pos.tokenName }),
|
|
14842
15243
|
pos.settling && /* @__PURE__ */ jsxRuntime.jsx(SettlingTip, { children: /* @__PURE__ */ jsxRuntime.jsx(SettlingSpinner, {}) })
|
|
@@ -14853,23 +15254,29 @@ function PortfolioActivityPanel({
|
|
|
14853
15254
|
] }) }),
|
|
14854
15255
|
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.8rem" }, children: formatCurrency4(pos.averageEntryPrice) }) }),
|
|
14855
15256
|
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency4(pos.marketPrice) }) }),
|
|
14856
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14857
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14858
|
-
|
|
14859
|
-
|
|
15257
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.4rem" }, children: [
|
|
15258
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
15259
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
15260
|
+
isPositive ? "+" : "-",
|
|
15261
|
+
formatCurrency4(Math.abs(pnl))
|
|
15262
|
+
] }),
|
|
15263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
15264
|
+
isPositive ? "+" : "",
|
|
15265
|
+
pnlPercent.toFixed(1),
|
|
15266
|
+
"%"
|
|
15267
|
+
] })
|
|
14860
15268
|
] }),
|
|
14861
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
/* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
|
|
15269
|
+
onSharePosition && !pos.settling && /* @__PURE__ */ jsxRuntime.jsx(CShareIconBtn, { role: "button", "aria-label": "Share position", onClick: (e) => {
|
|
15270
|
+
e.stopPropagation();
|
|
15271
|
+
onSharePosition(pos);
|
|
15272
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(ShareIcon, {}) })
|
|
15273
|
+
] }) }),
|
|
15274
|
+
(onClosePosition || onSharePosition) && /* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: !pos.settling && /* @__PURE__ */ jsxRuntime.jsxs(CloseActions, { children: [
|
|
15275
|
+
onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
|
|
14869
15276
|
e.stopPropagation();
|
|
14870
15277
|
onClosePosition(pos.tokenName, "market", pos.quantity, pos.marketPrice);
|
|
14871
15278
|
}, children: "Market Sell" }),
|
|
14872
|
-
/* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
|
|
15279
|
+
onClosePosition && /* @__PURE__ */ jsxRuntime.jsx(CloseBtn, { onClick: (e) => {
|
|
14873
15280
|
e.stopPropagation();
|
|
14874
15281
|
onClosePosition(pos.tokenName, "limit", pos.quantity, pos.marketPrice);
|
|
14875
15282
|
}, children: "Limit Sell" })
|
|
@@ -14877,27 +15284,30 @@ function PortfolioActivityPanel({
|
|
|
14877
15284
|
] }, pos.tokenName);
|
|
14878
15285
|
})
|
|
14879
15286
|
] }),
|
|
14880
|
-
positions.length > 0 && closeAllOpen && onClosePosition &&
|
|
14881
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
/* @__PURE__ */ jsxRuntime.
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
15287
|
+
positions.length > 0 && closeAllOpen && onClosePosition && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
15288
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllOverlay, { onClick: () => setCloseAllOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CloseAllModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
15289
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllModalX, { onClick: () => setCloseAllOpen(false), children: "\xD7" }),
|
|
15290
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllTitle, { children: "Confirm Sell All" }),
|
|
15291
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllDesc, { children: "This will sell all your positions and cancel their associated TP/SL orders." }),
|
|
15292
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("market"), children: [
|
|
15293
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "market" }),
|
|
15294
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Market Sell" })
|
|
15295
|
+
] }),
|
|
15296
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllOption, { onClick: () => setCloseAllType("limit"), children: [
|
|
15297
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseAllRadio, { $selected: closeAllType === "limit" }),
|
|
15298
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Limit Sell at Mid Price" })
|
|
15299
|
+
] }),
|
|
15300
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CloseAllConfirmBtn, { onClick: () => {
|
|
15301
|
+
positions.forEach((pos) => onClosePosition(pos.tokenName, closeAllType, pos.quantity, pos.marketPrice));
|
|
15302
|
+
setCloseAllOpen(false);
|
|
15303
|
+
}, children: [
|
|
15304
|
+
"Confirm ",
|
|
15305
|
+
closeAllType === "market" ? "Market" : "Limit",
|
|
15306
|
+
" Sell"
|
|
15307
|
+
] })
|
|
15308
|
+
] }) }),
|
|
15309
|
+
document.body
|
|
15310
|
+
)
|
|
14901
15311
|
] }),
|
|
14902
15312
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14903
15313
|
offeringOrders.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
@@ -15354,57 +15764,63 @@ function PortfolioActivityPanel({
|
|
|
15354
15764
|
] }),
|
|
15355
15765
|
/* @__PURE__ */ jsxRuntime.jsx(PaginationBtn, { disabled: currentPage >= totalPages - 1, onClick: () => setCurrentPage((p) => p + 1), children: "Next \u203A" })
|
|
15356
15766
|
] }),
|
|
15357
|
-
cancelAllConfirmOpen &&
|
|
15358
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
/* @__PURE__ */ jsxRuntime.
|
|
15366
|
-
|
|
15367
|
-
|
|
15368
|
-
|
|
15369
|
-
|
|
15370
|
-
|
|
15371
|
-
|
|
15372
|
-
|
|
15373
|
-
|
|
15374
|
-
|
|
15375
|
-
|
|
15376
|
-
|
|
15377
|
-
|
|
15767
|
+
cancelAllConfirmOpen && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
15768
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setCancelAllConfirmOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
15769
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel All Orders" }),
|
|
15770
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmBody, { children: [
|
|
15771
|
+
"Are you sure you want to cancel all ",
|
|
15772
|
+
openOrdersCount,
|
|
15773
|
+
" open orders? This action cannot be undone."
|
|
15774
|
+
] }),
|
|
15775
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
|
|
15776
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setCancelAllConfirmOpen(false), children: "Keep Orders" }),
|
|
15777
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15778
|
+
CancelConfirmProceed,
|
|
15779
|
+
{
|
|
15780
|
+
type: "button",
|
|
15781
|
+
disabled: cancellingAll,
|
|
15782
|
+
onClick: async () => {
|
|
15783
|
+
if (onCancelAllOrders) {
|
|
15784
|
+
setCancellingAll(true);
|
|
15785
|
+
try {
|
|
15786
|
+
await onCancelAllOrders();
|
|
15787
|
+
} finally {
|
|
15788
|
+
setCancellingAll(false);
|
|
15789
|
+
}
|
|
15378
15790
|
}
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
)
|
|
15385
|
-
] })
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15390
|
-
|
|
15391
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15392
|
-
/* @__PURE__ */ jsxRuntime.
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15791
|
+
setCancelAllConfirmOpen(false);
|
|
15792
|
+
},
|
|
15793
|
+
children: cancellingAll ? "Cancelling\u2026" : "Yes, Cancel All"
|
|
15794
|
+
}
|
|
15795
|
+
)
|
|
15796
|
+
] })
|
|
15797
|
+
] }) }),
|
|
15798
|
+
document.body
|
|
15799
|
+
),
|
|
15800
|
+
pendingCancelOrderId !== null && typeof document !== "undefined" && ReactDOM.createPortal(
|
|
15801
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmOverlay, { onClick: () => setPendingCancelOrderId(null), children: /* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmModal, { onClick: (e) => e.stopPropagation(), children: [
|
|
15802
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmTitle, { children: "Cancel Order" }),
|
|
15803
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmBody, { children: "Are you sure you want to cancel this order? This action cannot be undone." }),
|
|
15804
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CancelConfirmActions, { children: [
|
|
15805
|
+
/* @__PURE__ */ jsxRuntime.jsx(CancelConfirmDismiss, { type: "button", onClick: () => setPendingCancelOrderId(null), children: "Keep Order" }),
|
|
15806
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15807
|
+
CancelConfirmProceed,
|
|
15808
|
+
{
|
|
15809
|
+
type: "button",
|
|
15810
|
+
disabled: cancellingOrderId != null,
|
|
15811
|
+
onClick: async () => {
|
|
15812
|
+
if (onCancelOrder && pendingCancelOrderId !== null) {
|
|
15813
|
+
await onCancelOrder(pendingCancelOrderId);
|
|
15814
|
+
}
|
|
15815
|
+
setPendingCancelOrderId(null);
|
|
15816
|
+
},
|
|
15817
|
+
children: cancellingOrderId === pendingCancelOrderId ? "Cancelling\u2026" : "Yes, Cancel"
|
|
15818
|
+
}
|
|
15819
|
+
)
|
|
15820
|
+
] })
|
|
15821
|
+
] }) }),
|
|
15822
|
+
document.body
|
|
15823
|
+
)
|
|
15408
15824
|
] });
|
|
15409
15825
|
}
|
|
15410
15826
|
var Container2 = styled10__default.default.div`
|
|
@@ -15475,7 +15891,7 @@ var Tab = styled10__default.default.button`
|
|
|
15475
15891
|
}
|
|
15476
15892
|
`;
|
|
15477
15893
|
var TabCount = styled10__default.default.span`
|
|
15478
|
-
color: #
|
|
15894
|
+
color: var(--color-accent, #E6C87E);
|
|
15479
15895
|
font-weight: 600;
|
|
15480
15896
|
margin-left: 2px;
|
|
15481
15897
|
`;
|
|
@@ -15660,7 +16076,8 @@ var CancelConfirmOverlay = styled10__default.default.div`
|
|
|
15660
16076
|
display: flex;
|
|
15661
16077
|
align-items: center;
|
|
15662
16078
|
justify-content: center;
|
|
15663
|
-
|
|
16079
|
+
/* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
|
|
16080
|
+
z-index: 10050;
|
|
15664
16081
|
`;
|
|
15665
16082
|
var CancelConfirmModal = styled10__default.default.div`
|
|
15666
16083
|
background: #1a1a1a;
|
|
@@ -15750,6 +16167,29 @@ var CloseBtn = styled10__default.default.button`
|
|
|
15750
16167
|
border-color: rgba(230, 200, 126, 0.5);
|
|
15751
16168
|
}
|
|
15752
16169
|
`;
|
|
16170
|
+
var CShareIconBtn = styled10__default.default.span`
|
|
16171
|
+
display: inline-flex;
|
|
16172
|
+
align-items: center;
|
|
16173
|
+
justify-content: center;
|
|
16174
|
+
width: 26px;
|
|
16175
|
+
height: 26px;
|
|
16176
|
+
border-radius: 6px;
|
|
16177
|
+
color: #E6C87E;
|
|
16178
|
+
cursor: pointer;
|
|
16179
|
+
pointer-events: auto;
|
|
16180
|
+
transition: color 0.15s ease, background 0.15s ease;
|
|
16181
|
+
&:hover {
|
|
16182
|
+
color: #F2D898;
|
|
16183
|
+
background: rgba(230, 200, 126, 0.14);
|
|
16184
|
+
}
|
|
16185
|
+
&:active { background: rgba(230, 200, 126, 0.22); }
|
|
16186
|
+
svg { width: 15px; height: 15px; }
|
|
16187
|
+
`;
|
|
16188
|
+
var ShareIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
16189
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7" }),
|
|
16190
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 6 12 2 8 6" }),
|
|
16191
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "2", x2: "12", y2: "15" })
|
|
16192
|
+
] });
|
|
15753
16193
|
var CloseAllHeaderBtn = styled10__default.default.button`
|
|
15754
16194
|
background: rgba(230, 200, 126, 0.1);
|
|
15755
16195
|
border: 1px solid rgba(230, 200, 126, 0.3);
|
|
@@ -15774,7 +16214,8 @@ var CloseAllOverlay = styled10__default.default.div`
|
|
|
15774
16214
|
display: flex;
|
|
15775
16215
|
align-items: center;
|
|
15776
16216
|
justify-content: center;
|
|
15777
|
-
|
|
16217
|
+
/* Above the trade page's fullscreen/sticky layers (TradePage.css uses up to 10001). */
|
|
16218
|
+
z-index: 10050;
|
|
15778
16219
|
`;
|
|
15779
16220
|
var CloseAllModal = styled10__default.default.div`
|
|
15780
16221
|
background: #1a1a1a;
|