@agg-build/ui 4.9.2 → 4.10.0
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/{chunk-K6F2ZYNM.mjs → chunk-4HTE5IEZ.mjs} +32 -20
- package/dist/{chunk-TNNLRRHC.mjs → chunk-6EHT5OFU.mjs} +1 -1
- package/dist/{chunk-GVIS3YXU.mjs → chunk-H5LCCV2J.mjs} +22 -11
- package/dist/{chunk-GG57TRNE.mjs → chunk-I72YHWOI.mjs} +2 -2
- package/dist/{chunk-MVAOWNG3.mjs → chunk-SMQRUNMZ.mjs} +19 -10
- package/dist/{chunk-H7L4HDXS.mjs → chunk-TXQJUVRW.mjs} +3 -2
- package/dist/{chunk-NYL6A6AD.mjs → chunk-W7HQVQ22.mjs} +257 -195
- package/dist/events.js +753 -680
- package/dist/events.mjs +3 -3
- package/dist/index.js +2692 -2597
- package/dist/index.mjs +7 -7
- package/dist/modals.js +1352 -1289
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2052 -1957
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +288 -226
- package/dist/primitives.mjs +1 -1
- package/dist/trading.js +834 -759
- package/dist/trading.mjs +4 -4
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +2 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
- package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +2 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +2 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.mts +10 -0
- package/dist/types/primitives/venue-logo/svg/logo-pred.d.ts +10 -0
- package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
- package/package.json +3 -3
package/dist/trading.js
CHANGED
|
@@ -109,7 +109,7 @@ __export(trading_exports, {
|
|
|
109
109
|
prepareSettlementDifferences: () => prepareSettlementDifferences,
|
|
110
110
|
resolveDifferenceIconClassName: () => resolveDifferenceIconClassName,
|
|
111
111
|
useClaimWinnings: () => useClaimWinnings,
|
|
112
|
-
useEventTradingContext: () =>
|
|
112
|
+
useEventTradingContext: () => import_hooks42.useEventTradingContext,
|
|
113
113
|
useResolvedMarketClaim: () => useResolvedMarketClaim,
|
|
114
114
|
venueRequiresSharedKyc: () => venueRequiresSharedKyc
|
|
115
115
|
});
|
|
@@ -280,7 +280,7 @@ var getTradingSlippageLabel = (value) => {
|
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
// src/trading/settlement/index.tsx
|
|
283
|
-
var
|
|
283
|
+
var import_hooks23 = require("@agg-build/hooks");
|
|
284
284
|
var import_react4 = require("react");
|
|
285
285
|
|
|
286
286
|
// src/primitives/card/index.tsx
|
|
@@ -989,7 +989,7 @@ var Skeleton = ({
|
|
|
989
989
|
Skeleton.displayName = "Skeleton";
|
|
990
990
|
|
|
991
991
|
// src/primitives/venue-logo/index.tsx
|
|
992
|
-
var
|
|
992
|
+
var import_hooks22 = require("@agg-build/hooks");
|
|
993
993
|
|
|
994
994
|
// src/primitives/remote-image/index.tsx
|
|
995
995
|
var import_hooks10 = require("@agg-build/hooks");
|
|
@@ -4513,11 +4513,11 @@ var LogoPolymarketIcon = (_a) => {
|
|
|
4513
4513
|
};
|
|
4514
4514
|
LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
|
|
4515
4515
|
|
|
4516
|
-
// src/primitives/venue-logo/svg/logo-
|
|
4516
|
+
// src/primitives/venue-logo/svg/logo-pred.tsx
|
|
4517
4517
|
var import_hooks18 = require("@agg-build/hooks");
|
|
4518
|
-
var import_sdk9 = require("@agg-build/sdk");
|
|
4519
4518
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
4520
|
-
var
|
|
4519
|
+
var PRED_LOGO_COLORS = { light: "#120C06", dark: "#F4FB37" };
|
|
4520
|
+
var LogoPredIcon = (_a) => {
|
|
4521
4521
|
var _b = _a, {
|
|
4522
4522
|
title: title2,
|
|
4523
4523
|
className,
|
|
@@ -4529,26 +4529,80 @@ var LogoPredictIcon = (_a) => {
|
|
|
4529
4529
|
"isColor",
|
|
4530
4530
|
"color"
|
|
4531
4531
|
]);
|
|
4532
|
-
var _a2;
|
|
4533
4532
|
const {
|
|
4534
4533
|
general: { theme }
|
|
4535
4534
|
} = (0, import_hooks18.useAggUiConfig)();
|
|
4536
4535
|
const isDarkTheme = theme === "dark";
|
|
4537
4536
|
const primaryColor = resolveLogoPrimaryColor({
|
|
4538
|
-
brandColor:
|
|
4537
|
+
brandColor: PRED_LOGO_COLORS[isDarkTheme ? "dark" : "light"],
|
|
4539
4538
|
isColor,
|
|
4540
4539
|
color
|
|
4541
4540
|
});
|
|
4542
4541
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
4543
4542
|
"svg",
|
|
4544
4543
|
__spreadProps(__spreadValues(__spreadValues({
|
|
4545
|
-
viewBox: "0 0
|
|
4544
|
+
viewBox: "0 0 48 48",
|
|
4546
4545
|
className,
|
|
4547
4546
|
fill: "none"
|
|
4548
4547
|
}, getIconA11yProps(title2)), props), {
|
|
4549
4548
|
children: [
|
|
4550
4549
|
title2 ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("title", { children: title2 }) : null,
|
|
4551
4550
|
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
4551
|
+
"path",
|
|
4552
|
+
{
|
|
4553
|
+
d: "M13.2063 24.447L30.8869 21.6235L31.7298 19.898L4 10.4414L10.9436 16.4694L5.95218 41.9708L13.2063 24.447Z",
|
|
4554
|
+
fill: primaryColor
|
|
4555
|
+
}
|
|
4556
|
+
),
|
|
4557
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
4558
|
+
"path",
|
|
4559
|
+
{
|
|
4560
|
+
d: "M34.3927 24.0014L16.7121 26.8473L15.8691 28.5504L43.599 38.0294L36.6554 31.979L41.6468 6.5L34.3927 24.0014Z",
|
|
4561
|
+
fill: primaryColor
|
|
4562
|
+
}
|
|
4563
|
+
)
|
|
4564
|
+
]
|
|
4565
|
+
})
|
|
4566
|
+
);
|
|
4567
|
+
};
|
|
4568
|
+
LogoPredIcon.displayName = "LogoPredIcon";
|
|
4569
|
+
|
|
4570
|
+
// src/primitives/venue-logo/svg/logo-predict.tsx
|
|
4571
|
+
var import_hooks19 = require("@agg-build/hooks");
|
|
4572
|
+
var import_sdk9 = require("@agg-build/sdk");
|
|
4573
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
4574
|
+
var LogoPredictIcon = (_a) => {
|
|
4575
|
+
var _b = _a, {
|
|
4576
|
+
title: title2,
|
|
4577
|
+
className,
|
|
4578
|
+
isColor = true,
|
|
4579
|
+
color
|
|
4580
|
+
} = _b, props = __objRest(_b, [
|
|
4581
|
+
"title",
|
|
4582
|
+
"className",
|
|
4583
|
+
"isColor",
|
|
4584
|
+
"color"
|
|
4585
|
+
]);
|
|
4586
|
+
var _a2;
|
|
4587
|
+
const {
|
|
4588
|
+
general: { theme }
|
|
4589
|
+
} = (0, import_hooks19.useAggUiConfig)();
|
|
4590
|
+
const isDarkTheme = theme === "dark";
|
|
4591
|
+
const primaryColor = resolveLogoPrimaryColor({
|
|
4592
|
+
brandColor: (_a2 = resolveVenueLineColor(import_sdk9.Venue.predict, isDarkTheme)) != null ? _a2 : "#705bf6",
|
|
4593
|
+
isColor,
|
|
4594
|
+
color
|
|
4595
|
+
});
|
|
4596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
4597
|
+
"svg",
|
|
4598
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
4599
|
+
viewBox: "0 0 100 100",
|
|
4600
|
+
className,
|
|
4601
|
+
fill: "none"
|
|
4602
|
+
}, getIconA11yProps(title2)), props), {
|
|
4603
|
+
children: [
|
|
4604
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("title", { children: title2 }) : null,
|
|
4605
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
4552
4606
|
"path",
|
|
4553
4607
|
{
|
|
4554
4608
|
fillRule: "evenodd",
|
|
@@ -4564,9 +4618,9 @@ var LogoPredictIcon = (_a) => {
|
|
|
4564
4618
|
LogoPredictIcon.displayName = "LogoPredictIcon";
|
|
4565
4619
|
|
|
4566
4620
|
// src/primitives/venue-logo/svg/logo-probable.tsx
|
|
4567
|
-
var
|
|
4621
|
+
var import_hooks20 = require("@agg-build/hooks");
|
|
4568
4622
|
var import_sdk10 = require("@agg-build/sdk");
|
|
4569
|
-
var
|
|
4623
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
4570
4624
|
var LogoProbableIcon = (_a) => {
|
|
4571
4625
|
var _b = _a, {
|
|
4572
4626
|
title: title2,
|
|
@@ -4582,14 +4636,14 @@ var LogoProbableIcon = (_a) => {
|
|
|
4582
4636
|
var _a2;
|
|
4583
4637
|
const {
|
|
4584
4638
|
general: { theme }
|
|
4585
|
-
} = (0,
|
|
4639
|
+
} = (0, import_hooks20.useAggUiConfig)();
|
|
4586
4640
|
const isDarkTheme = theme === "dark";
|
|
4587
4641
|
const primaryColor = resolveLogoPrimaryColor({
|
|
4588
4642
|
brandColor: (_a2 = resolveVenueLineColor(import_sdk10.Venue.probable, isDarkTheme)) != null ? _a2 : "#EC4899",
|
|
4589
4643
|
isColor,
|
|
4590
4644
|
color
|
|
4591
4645
|
});
|
|
4592
|
-
return /* @__PURE__ */ (0,
|
|
4646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
4593
4647
|
"svg",
|
|
4594
4648
|
__spreadProps(__spreadValues(__spreadValues({
|
|
4595
4649
|
viewBox: "0 0 100 100",
|
|
@@ -4597,16 +4651,16 @@ var LogoProbableIcon = (_a) => {
|
|
|
4597
4651
|
fill: "none"
|
|
4598
4652
|
}, getIconA11yProps(title2)), props), {
|
|
4599
4653
|
children: [
|
|
4600
|
-
title2 ? /* @__PURE__ */ (0,
|
|
4601
|
-
/* @__PURE__ */ (0,
|
|
4654
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("title", { children: title2 }) : null,
|
|
4655
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
4602
4656
|
"path",
|
|
4603
4657
|
{
|
|
4604
4658
|
d: "M75.625 59.3489C75.6247 53.7323 71.0719 49.1792 65.4551 49.179H33.9209C28.3039 49.179 23.7503 53.7321 23.75 59.3489C23.75 64.9659 28.3038 69.5198 33.9209 69.5198H65.4551C71.0719 69.5195 75.625 64.9658 75.625 59.3489ZM90.625 59.3489C90.625 73.2501 79.3562 84.5195 65.4551 84.5198H33.9209C20.0196 84.5198 8.75 73.2502 8.75 59.3489C8.75026 45.4477 20.0198 34.179 33.9209 34.179H65.4551C79.3559 34.1792 90.6247 45.4478 90.625 59.3489Z",
|
|
4605
4659
|
fill: primaryColor
|
|
4606
4660
|
}
|
|
4607
4661
|
),
|
|
4608
|
-
/* @__PURE__ */ (0,
|
|
4609
|
-
/* @__PURE__ */ (0,
|
|
4662
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
|
|
4663
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
4610
4664
|
"path",
|
|
4611
4665
|
{
|
|
4612
4666
|
d: "M64.5742 51.3496C68.9894 51.3496 72.5742 54.9344 72.5742 59.3496C72.5742 63.7648 68.9894 67.3496 64.5742 67.3496C60.159 67.3496 56.5742 63.7648 56.5742 59.3496C56.5742 54.9344 60.159 51.3496 64.5742 51.3496Z",
|
|
@@ -4620,10 +4674,10 @@ var LogoProbableIcon = (_a) => {
|
|
|
4620
4674
|
LogoProbableIcon.displayName = "LogoProbableIcon";
|
|
4621
4675
|
|
|
4622
4676
|
// src/primitives/venue-logo/svg/logo-prophetx.tsx
|
|
4623
|
-
var
|
|
4677
|
+
var import_hooks21 = require("@agg-build/hooks");
|
|
4624
4678
|
var import_sdk11 = require("@agg-build/sdk");
|
|
4625
4679
|
var import_react2 = require("react");
|
|
4626
|
-
var
|
|
4680
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
4627
4681
|
var LogoProphetXIcon = (_a) => {
|
|
4628
4682
|
var _b = _a, {
|
|
4629
4683
|
title: title2,
|
|
@@ -4639,7 +4693,7 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4639
4693
|
var _a2;
|
|
4640
4694
|
const {
|
|
4641
4695
|
general: { theme }
|
|
4642
|
-
} = (0,
|
|
4696
|
+
} = (0, import_hooks21.useAggUiConfig)();
|
|
4643
4697
|
const isDarkTheme = theme === "dark";
|
|
4644
4698
|
const uid = (0, import_react2.useId)();
|
|
4645
4699
|
const primaryColor = resolveLogoPrimaryColor({
|
|
@@ -4651,7 +4705,7 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4651
4705
|
const isMonochrome = !isColor || Boolean(color == null ? void 0 : color.trim());
|
|
4652
4706
|
const gradientTransform = "matrix(2.750846, 0, 0, 2.750846, -1935.152964, 138.485876)";
|
|
4653
4707
|
const fillFor = (n) => isMonochrome ? primaryColor : `url(#${uid}-${n})`;
|
|
4654
|
-
return /* @__PURE__ */ (0,
|
|
4708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
4655
4709
|
"svg",
|
|
4656
4710
|
__spreadProps(__spreadValues(__spreadValues({
|
|
4657
4711
|
viewBox: "81.867 138.419 424.492 272.214",
|
|
@@ -4659,9 +4713,9 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4659
4713
|
fill: "none"
|
|
4660
4714
|
}, getIconA11yProps(title2)), props), {
|
|
4661
4715
|
children: [
|
|
4662
|
-
title2 ? /* @__PURE__ */ (0,
|
|
4663
|
-
isMonochrome ? null : /* @__PURE__ */ (0,
|
|
4664
|
-
/* @__PURE__ */ (0,
|
|
4716
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("title", { children: title2 }) : null,
|
|
4717
|
+
isMonochrome ? null : /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("defs", { children: [
|
|
4718
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
4665
4719
|
"linearGradient",
|
|
4666
4720
|
{
|
|
4667
4721
|
id: `${uid}-0`,
|
|
@@ -4672,14 +4726,14 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4672
4726
|
gradientUnits: "userSpaceOnUse",
|
|
4673
4727
|
gradientTransform,
|
|
4674
4728
|
children: [
|
|
4675
|
-
/* @__PURE__ */ (0,
|
|
4676
|
-
/* @__PURE__ */ (0,
|
|
4677
|
-
/* @__PURE__ */ (0,
|
|
4678
|
-
/* @__PURE__ */ (0,
|
|
4729
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
4730
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.1032", stopColor: "#19BE9D" }),
|
|
4731
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.6255", stopColor: "#06ADAA" }),
|
|
4732
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
4679
4733
|
]
|
|
4680
4734
|
}
|
|
4681
4735
|
),
|
|
4682
|
-
/* @__PURE__ */ (0,
|
|
4736
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
4683
4737
|
"linearGradient",
|
|
4684
4738
|
{
|
|
4685
4739
|
id: `${uid}-1`,
|
|
@@ -4690,12 +4744,12 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4690
4744
|
gradientUnits: "userSpaceOnUse",
|
|
4691
4745
|
gradientTransform,
|
|
4692
4746
|
children: [
|
|
4693
|
-
/* @__PURE__ */ (0,
|
|
4694
|
-
/* @__PURE__ */ (0,
|
|
4747
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
4748
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
4695
4749
|
]
|
|
4696
4750
|
}
|
|
4697
4751
|
),
|
|
4698
|
-
/* @__PURE__ */ (0,
|
|
4752
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
4699
4753
|
"linearGradient",
|
|
4700
4754
|
{
|
|
4701
4755
|
id: `${uid}-2`,
|
|
@@ -4706,29 +4760,29 @@ var LogoProphetXIcon = (_a) => {
|
|
|
4706
4760
|
gradientUnits: "userSpaceOnUse",
|
|
4707
4761
|
gradientTransform,
|
|
4708
4762
|
children: [
|
|
4709
|
-
/* @__PURE__ */ (0,
|
|
4710
|
-
/* @__PURE__ */ (0,
|
|
4711
|
-
/* @__PURE__ */ (0,
|
|
4712
|
-
/* @__PURE__ */ (0,
|
|
4763
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { stopColor: "#1DC29A" }),
|
|
4764
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.3631", stopColor: "#18BD9E" }),
|
|
4765
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "0.802", stopColor: "#09AFA8" }),
|
|
4766
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("stop", { offset: "1", stopColor: "#00A7AF" })
|
|
4713
4767
|
]
|
|
4714
4768
|
}
|
|
4715
4769
|
)
|
|
4716
4770
|
] }),
|
|
4717
|
-
/* @__PURE__ */ (0,
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
4718
4772
|
"path",
|
|
4719
4773
|
{
|
|
4720
4774
|
d: "M 282.449 326.493 L 332.847 402.716 L 426.472 402.716 L 344.879 279.66 L 282.449 326.493 Z",
|
|
4721
4775
|
fill: fillFor(0)
|
|
4722
4776
|
}
|
|
4723
4777
|
),
|
|
4724
|
-
/* @__PURE__ */ (0,
|
|
4778
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
4725
4779
|
"path",
|
|
4726
4780
|
{
|
|
4727
4781
|
d: "M 379.966 146.995 L 389.569 161.125 L 313.636 218.145 L 307.055 222.927 L 244.624 269.759 L 238 274.873 L 162.069 331.56 L 152.804 317.473 L 87.353 402.71 L 209.197 402.71 L 199.888 388.287 L 275.818 331.56 L 282.443 326.488 L 344.873 279.655 L 351.456 274.832 L 427.388 218.145 L 436.694 232.232 L 502.101 146.995 L 379.966 146.995 Z",
|
|
4728
4782
|
fill: fillFor(1)
|
|
4729
4783
|
}
|
|
4730
4784
|
),
|
|
4731
|
-
/* @__PURE__ */ (0,
|
|
4785
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
4732
4786
|
"path",
|
|
4733
4787
|
{
|
|
4734
4788
|
d: "M 162.993 146.995 L 244.624 269.759 L 307.055 222.927 L 256.323 146.995 L 162.993 146.995 Z",
|
|
@@ -4747,6 +4801,7 @@ var venueLogoRegistry = {
|
|
|
4747
4801
|
[import_sdk12.Venue.limitless]: LogoLimitlessIcon,
|
|
4748
4802
|
[import_sdk12.Venue.opinion]: LogoOpinionIcon,
|
|
4749
4803
|
[import_sdk12.Venue.polymarket]: LogoPolymarketIcon,
|
|
4804
|
+
[import_sdk12.Venue.pred]: LogoPredIcon,
|
|
4750
4805
|
[import_sdk12.Venue.predict]: LogoPredictIcon,
|
|
4751
4806
|
[import_sdk12.Venue.probable]: LogoProbableIcon,
|
|
4752
4807
|
[import_sdk12.Venue.myriad]: LogoMyriadIcon,
|
|
@@ -4761,6 +4816,9 @@ var venueLogoUrlRegistry = {
|
|
|
4761
4816
|
[import_sdk12.Venue.limitless]: `${VENUE_LOGO_BASE_URL}/limitless.png`,
|
|
4762
4817
|
[import_sdk12.Venue.opinion]: `${VENUE_LOGO_BASE_URL}/opinion.png`,
|
|
4763
4818
|
[import_sdk12.Venue.polymarket]: `${VENUE_LOGO_BASE_URL}/polymarket.png`,
|
|
4819
|
+
// PRED does not yet have a mirrored Snag asset. Its official production
|
|
4820
|
+
// favicon is the same square brand mark used by the application itself.
|
|
4821
|
+
[import_sdk12.Venue.pred]: "https://mainnet-assets.pred.app/assets/vite-oruAfoK1.svg",
|
|
4764
4822
|
[import_sdk12.Venue.predict]: `${VENUE_LOGO_BASE_URL}/predict.png`,
|
|
4765
4823
|
[import_sdk12.Venue.probable]: `${VENUE_LOGO_BASE_URL}/probable.png`,
|
|
4766
4824
|
[import_sdk12.Venue.myriad]: `${VENUE_LOGO_BASE_URL}/myriad.png`,
|
|
@@ -4776,6 +4834,7 @@ var venueLogoLabels = {
|
|
|
4776
4834
|
[import_sdk12.Venue.limitless]: "Limitless",
|
|
4777
4835
|
[import_sdk12.Venue.opinion]: "Opinion",
|
|
4778
4836
|
[import_sdk12.Venue.polymarket]: "Polymarket",
|
|
4837
|
+
[import_sdk12.Venue.pred]: "PRED",
|
|
4779
4838
|
[import_sdk12.Venue.predict]: "Predict",
|
|
4780
4839
|
[import_sdk12.Venue.probable]: "Probable",
|
|
4781
4840
|
[import_sdk12.Venue.myriad]: "Myriad",
|
|
@@ -4796,6 +4855,8 @@ var lineColorByVenue = {
|
|
|
4796
4855
|
[import_sdk12.Venue.limitless]: "#C4FF00",
|
|
4797
4856
|
[import_sdk12.Venue.opinion]: "#000000",
|
|
4798
4857
|
[import_sdk12.Venue.polymarket]: "#2E5CFF",
|
|
4858
|
+
// On light surfaces use the dark half of PRED's official yellow/dark mark.
|
|
4859
|
+
[import_sdk12.Venue.pred]: PRED_LOGO_COLORS.light,
|
|
4799
4860
|
[import_sdk12.Venue.predict]: "#6D57F8",
|
|
4800
4861
|
[import_sdk12.Venue.probable]: "#F05923",
|
|
4801
4862
|
[import_sdk12.Venue.myriad]: "#000000",
|
|
@@ -4815,6 +4876,7 @@ var lineColorByVenue = {
|
|
|
4815
4876
|
[import_sdk12.Venue.limitless]: "#C4FF00",
|
|
4816
4877
|
[import_sdk12.Venue.opinion]: "#FFFFFF",
|
|
4817
4878
|
[import_sdk12.Venue.polymarket]: "#2E5CFF",
|
|
4879
|
+
[import_sdk12.Venue.pred]: PRED_LOGO_COLORS.dark,
|
|
4818
4880
|
[import_sdk12.Venue.predict]: "#6D57F8",
|
|
4819
4881
|
[import_sdk12.Venue.probable]: "#F05923",
|
|
4820
4882
|
[import_sdk12.Venue.myriad]: "#FFFFFF",
|
|
@@ -4846,7 +4908,7 @@ var resolveVenueLogoIsColor = ({
|
|
|
4846
4908
|
};
|
|
4847
4909
|
|
|
4848
4910
|
// src/primitives/venue-logo/index.tsx
|
|
4849
|
-
var
|
|
4911
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
4850
4912
|
var VenueLogo = ({
|
|
4851
4913
|
venue,
|
|
4852
4914
|
variant = "icon",
|
|
@@ -4859,7 +4921,7 @@ var VenueLogo = ({
|
|
|
4859
4921
|
title: title2
|
|
4860
4922
|
}) => {
|
|
4861
4923
|
var _a, _b;
|
|
4862
|
-
const labels = (0,
|
|
4924
|
+
const labels = (0, import_hooks22.useLabels)();
|
|
4863
4925
|
const sizeClass = sizeClasses[size];
|
|
4864
4926
|
const resolvedLabel = resolveVenueLogoLabel({
|
|
4865
4927
|
ariaLabel,
|
|
@@ -4872,7 +4934,7 @@ var VenueLogo = ({
|
|
|
4872
4934
|
console.warn(`[AggUI] Unknown venue "${venue}" \u2014 using default logo`);
|
|
4873
4935
|
}
|
|
4874
4936
|
if (variant === "logo") {
|
|
4875
|
-
return /* @__PURE__ */ (0,
|
|
4937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
4876
4938
|
RemoteImage,
|
|
4877
4939
|
{
|
|
4878
4940
|
src: (_a = venueLogoUrlRegistry[venue]) != null ? _a : DEFAULT_VENUE_LOGO_URL,
|
|
@@ -4887,7 +4949,7 @@ var VenueLogo = ({
|
|
|
4887
4949
|
isColor,
|
|
4888
4950
|
isMonochromatic
|
|
4889
4951
|
});
|
|
4890
|
-
return /* @__PURE__ */ (0,
|
|
4952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
4891
4953
|
Component,
|
|
4892
4954
|
{
|
|
4893
4955
|
className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
|
|
@@ -4948,7 +5010,7 @@ var dedupeSettlementSources = (sources) => {
|
|
|
4948
5010
|
};
|
|
4949
5011
|
|
|
4950
5012
|
// src/trading/settlement/settlement-text-renderer.tsx
|
|
4951
|
-
var
|
|
5013
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
4952
5014
|
var inlineTokenRegex = new RegExp(
|
|
4953
5015
|
[
|
|
4954
5016
|
/\[([^\]\n]+)\]\(([^)\s]+)\)/.source,
|
|
@@ -4987,12 +5049,12 @@ var renderInlineSegment = (text, baseKey) => {
|
|
|
4987
5049
|
}
|
|
4988
5050
|
if (match.index > lastIndex) {
|
|
4989
5051
|
nodes.push(
|
|
4990
|
-
/* @__PURE__ */ (0,
|
|
5052
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_react3.Fragment, { children: text.slice(lastIndex, match.index) }, `${baseKey}-text-${segmentIndex++}`)
|
|
4991
5053
|
);
|
|
4992
5054
|
}
|
|
4993
5055
|
if (isLinkMatch(match)) {
|
|
4994
5056
|
nodes.push(
|
|
4995
|
-
/* @__PURE__ */ (0,
|
|
5057
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
4996
5058
|
"a",
|
|
4997
5059
|
{
|
|
4998
5060
|
href: match[2],
|
|
@@ -5006,7 +5068,7 @@ var renderInlineSegment = (text, baseKey) => {
|
|
|
5006
5068
|
);
|
|
5007
5069
|
} else if (match[3] !== void 0) {
|
|
5008
5070
|
nodes.push(
|
|
5009
|
-
/* @__PURE__ */ (0,
|
|
5071
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5010
5072
|
"strong",
|
|
5011
5073
|
{
|
|
5012
5074
|
className: "agg-settlement-text-bold font-agg-bold",
|
|
@@ -5017,7 +5079,7 @@ var renderInlineSegment = (text, baseKey) => {
|
|
|
5017
5079
|
);
|
|
5018
5080
|
} else if (match[4] !== void 0) {
|
|
5019
5081
|
nodes.push(
|
|
5020
|
-
/* @__PURE__ */ (0,
|
|
5082
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5021
5083
|
"code",
|
|
5022
5084
|
{
|
|
5023
5085
|
className: "agg-settlement-text-code rounded-agg-sm bg-agg-secondary-hover px-1 py-0.5 font-mono text-[0.875em]",
|
|
@@ -5028,7 +5090,7 @@ var renderInlineSegment = (text, baseKey) => {
|
|
|
5028
5090
|
);
|
|
5029
5091
|
} else if (bareUrl !== void 0) {
|
|
5030
5092
|
nodes.push(
|
|
5031
|
-
/* @__PURE__ */ (0,
|
|
5093
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5032
5094
|
"a",
|
|
5033
5095
|
{
|
|
5034
5096
|
href: bareUrl,
|
|
@@ -5045,18 +5107,18 @@ var renderInlineSegment = (text, baseKey) => {
|
|
|
5045
5107
|
}
|
|
5046
5108
|
if (lastIndex < text.length) {
|
|
5047
5109
|
nodes.push(
|
|
5048
|
-
/* @__PURE__ */ (0,
|
|
5110
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_react3.Fragment, { children: text.slice(lastIndex) }, `${baseKey}-text-${segmentIndex++}`)
|
|
5049
5111
|
);
|
|
5050
5112
|
}
|
|
5051
5113
|
return nodes;
|
|
5052
5114
|
};
|
|
5053
5115
|
var renderBlock = (block, blockIndex) => {
|
|
5054
5116
|
if (block.kind === "list") {
|
|
5055
|
-
return /* @__PURE__ */ (0,
|
|
5117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5056
5118
|
"ul",
|
|
5057
5119
|
{
|
|
5058
5120
|
className: "agg-settlement-text-list list-disc pl-5 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
5059
|
-
children: block.items.map((item, itemIndex) => /* @__PURE__ */ (0,
|
|
5121
|
+
children: block.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5060
5122
|
"li",
|
|
5061
5123
|
{
|
|
5062
5124
|
className: "agg-settlement-text-list-item",
|
|
@@ -5068,12 +5130,12 @@ var renderBlock = (block, blockIndex) => {
|
|
|
5068
5130
|
`block-${blockIndex}`
|
|
5069
5131
|
);
|
|
5070
5132
|
}
|
|
5071
|
-
return /* @__PURE__ */ (0,
|
|
5133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
5072
5134
|
"p",
|
|
5073
5135
|
{
|
|
5074
5136
|
className: "agg-settlement-text-paragraph text-agg-sm leading-agg-5 text-agg-foreground break-words [overflow-wrap:anywhere]",
|
|
5075
|
-
children: block.lines.map((line, lineIndex) => /* @__PURE__ */ (0,
|
|
5076
|
-
lineIndex > 0 ? /* @__PURE__ */ (0,
|
|
5137
|
+
children: block.lines.map((line, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(import_react3.Fragment, { children: [
|
|
5138
|
+
lineIndex > 0 ? /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("br", {}) : null,
|
|
5077
5139
|
renderInlineSegment(line, `block-${blockIndex}-line-${lineIndex}`)
|
|
5078
5140
|
] }, `block-${blockIndex}-line-${lineIndex}`))
|
|
5079
5141
|
},
|
|
@@ -5086,12 +5148,12 @@ var SettlementTextRenderer = ({
|
|
|
5086
5148
|
}) => {
|
|
5087
5149
|
const blocks = parseSettlementBlocks(content);
|
|
5088
5150
|
if (blocks.length === 0) return null;
|
|
5089
|
-
return /* @__PURE__ */ (0,
|
|
5151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("agg-settlement-text flex flex-col gap-2", className), children: blocks.map((block, blockIndex) => renderBlock(block, blockIndex)) });
|
|
5090
5152
|
};
|
|
5091
5153
|
SettlementTextRenderer.displayName = "SettlementTextRenderer";
|
|
5092
5154
|
|
|
5093
5155
|
// src/trading/settlement/index.tsx
|
|
5094
|
-
var
|
|
5156
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
5095
5157
|
var SETTLEMENT_SECTION_ID = "agg-settlement-section";
|
|
5096
5158
|
var getSettlementDifferenceId = (sectionId, canonicalKey) => {
|
|
5097
5159
|
return `${sectionId}-difference-${canonicalKey}`;
|
|
@@ -5258,13 +5320,13 @@ var SettlementVenueRules = ({
|
|
|
5258
5320
|
rules,
|
|
5259
5321
|
labels
|
|
5260
5322
|
}) => {
|
|
5261
|
-
return /* @__PURE__ */ (0,
|
|
5262
|
-
/* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-venue-rules flex w-full flex-col items-start gap-4", children: [
|
|
5324
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementFullRulesTitle }),
|
|
5325
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex w-full flex-col items-start gap-4", children: rules.map((rule) => {
|
|
5264
5326
|
const venueLabel = resolveSettlementVenueLabel(rule.venue, labels);
|
|
5265
|
-
return /* @__PURE__ */ (0,
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5267
|
-
/* @__PURE__ */ (0,
|
|
5327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("details", { className: "group/agg-settlement-rule w-full", children: [
|
|
5328
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("summary", { className: "flex cursor-pointer list-none items-center gap-2 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors marker:hidden", children: [
|
|
5329
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5268
5330
|
VenueLogo,
|
|
5269
5331
|
{
|
|
5270
5332
|
venue: rule.venue,
|
|
@@ -5273,8 +5335,8 @@ var SettlementVenueRules = ({
|
|
|
5273
5335
|
ariaLabel: venueLabel
|
|
5274
5336
|
}
|
|
5275
5337
|
),
|
|
5276
|
-
/* @__PURE__ */ (0,
|
|
5277
|
-
/* @__PURE__ */ (0,
|
|
5338
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "text-agg-foreground group-hover/agg-settlement-rule:text-agg-muted-foreground transition-colors", children: venueLabel }),
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5278
5340
|
"i",
|
|
5279
5341
|
{
|
|
5280
5342
|
className: cn(
|
|
@@ -5287,7 +5349,7 @@ var SettlementVenueRules = ({
|
|
|
5287
5349
|
}
|
|
5288
5350
|
)
|
|
5289
5351
|
] }),
|
|
5290
|
-
/* @__PURE__ */ (0,
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "mt-3 pl-6", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: rule.content }) })
|
|
5291
5353
|
] }, rule.venue);
|
|
5292
5354
|
}) })
|
|
5293
5355
|
] });
|
|
@@ -5306,7 +5368,7 @@ var Settlement = ({
|
|
|
5306
5368
|
isLoading = false
|
|
5307
5369
|
}) => {
|
|
5308
5370
|
var _a, _b, _c, _d, _e;
|
|
5309
|
-
const labels = (0,
|
|
5371
|
+
const labels = (0, import_hooks23.useLabels)();
|
|
5310
5372
|
const blocks = (0, import_react4.useMemo)(
|
|
5311
5373
|
() => dedupeSettlementSources({
|
|
5312
5374
|
eventDescription,
|
|
@@ -5351,7 +5413,7 @@ var Settlement = ({
|
|
|
5351
5413
|
);
|
|
5352
5414
|
};
|
|
5353
5415
|
if (isLoading) {
|
|
5354
|
-
return /* @__PURE__ */ (0,
|
|
5416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5355
5417
|
Skeleton,
|
|
5356
5418
|
{
|
|
5357
5419
|
ariaLabel: labels.trading.settlementLoading,
|
|
@@ -5362,7 +5424,7 @@ var Settlement = ({
|
|
|
5362
5424
|
}
|
|
5363
5425
|
if (!hasSettlementContent) return null;
|
|
5364
5426
|
const resolvedSectionLabel = sectionLabel === defaultSettlementSectionLabel ? labels.trading.settlementSection : sectionLabel;
|
|
5365
|
-
return /* @__PURE__ */ (0,
|
|
5427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
5366
5428
|
Card,
|
|
5367
5429
|
{
|
|
5368
5430
|
id,
|
|
@@ -5372,51 +5434,51 @@ var Settlement = ({
|
|
|
5372
5434
|
className
|
|
5373
5435
|
),
|
|
5374
5436
|
children: [
|
|
5375
|
-
/* @__PURE__ */ (0,
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5377
|
-
question ? /* @__PURE__ */ (0,
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-header flex w-full flex-col items-start gap-1 text-agg-muted-foreground sm:flex-row sm:items-center sm:justify-between sm:gap-4", children: [
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "shrink-0 text-agg-xs font-agg-bold leading-agg-4 uppercase", children: resolvedSectionLabel }),
|
|
5439
|
+
question ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "agg-settlement-question min-w-0 text-agg-sm font-agg-normal leading-agg-5 sm:max-w-[314px] sm:truncate", children: question }) : null
|
|
5378
5440
|
] }),
|
|
5379
|
-
/* @__PURE__ */ (0,
|
|
5380
|
-
hasStandaloneSettlementText ? /* @__PURE__ */ (0,
|
|
5381
|
-
standaloneEventBlock || standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
5441
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-sections flex w-full flex-col items-start gap-5", children: [
|
|
5442
|
+
hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "w-full", children: [
|
|
5443
|
+
standaloneEventBlock || standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
5382
5444
|
"div",
|
|
5383
5445
|
{
|
|
5384
5446
|
className: "agg-settlement-section agg-settlement-section-description",
|
|
5385
5447
|
"data-source": "description",
|
|
5386
5448
|
children: [
|
|
5387
|
-
standaloneEventBlock ? /* @__PURE__ */ (0,
|
|
5388
|
-
standaloneEventBlock && standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
5389
|
-
standaloneMarketBlock ? /* @__PURE__ */ (0,
|
|
5449
|
+
standaloneEventBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { "data-source": "eventDescription", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standaloneEventBlock.content }) }) : null,
|
|
5450
|
+
standaloneEventBlock && standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("hr", { className: "agg-settlement-divider my-4 border-0 border-t border-agg-separator" }) : null,
|
|
5451
|
+
standaloneMarketBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { "data-source": "marketDescription", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standaloneMarketBlock.content }) }) : null
|
|
5390
5452
|
]
|
|
5391
5453
|
}
|
|
5392
5454
|
) : null,
|
|
5393
|
-
standalonePrimaryRulesBlock ? /* @__PURE__ */ (0,
|
|
5455
|
+
standalonePrimaryRulesBlock ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
5394
5456
|
"div",
|
|
5395
5457
|
{
|
|
5396
5458
|
className: "agg-settlement-section agg-settlement-section-primaryRules",
|
|
5397
5459
|
"data-source": "primaryRules",
|
|
5398
5460
|
children: [
|
|
5399
|
-
/* @__PURE__ */ (0,
|
|
5400
|
-
/* @__PURE__ */ (0,
|
|
5461
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "agg-settlement-section-label text-agg-xs font-agg-bold leading-agg-4 uppercase text-agg-muted-foreground mb-2", children: labels.trading.settlementPrimaryRulesLabel }),
|
|
5462
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementTextRenderer, { content: standalonePrimaryRulesBlock.content })
|
|
5401
5463
|
]
|
|
5402
5464
|
}
|
|
5403
5465
|
) : null
|
|
5404
5466
|
] }) : null,
|
|
5405
|
-
hasSettlementDifferences ? /* @__PURE__ */ (0,
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5407
|
-
/* @__PURE__ */ (0,
|
|
5408
|
-
/* @__PURE__ */ (0,
|
|
5467
|
+
hasSettlementDifferences ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "agg-settlement-differences flex w-full flex-col items-start gap-5", children: [
|
|
5468
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5469
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.trading.settlementDifferencesTitle }),
|
|
5470
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "flex size-4 shrink-0 items-center justify-center rounded-agg-full bg-agg-primary text-[10px] font-agg-bold leading-[14px] text-agg-on-primary", children: settlementDifferences.length })
|
|
5409
5471
|
] }),
|
|
5410
|
-
/* @__PURE__ */ (0,
|
|
5472
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "flex w-full flex-col items-start gap-5", children: settlementDifferences.map((difference) => {
|
|
5411
5473
|
const venueKeys = resolveDifferenceVenueKeys(difference, settlementVenues);
|
|
5412
5474
|
const isExpanded = openDifferenceKeys.includes(difference.canonicalKey) && venueKeys.length > 0;
|
|
5413
|
-
return /* @__PURE__ */ (0,
|
|
5475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
5414
5476
|
"div",
|
|
5415
5477
|
{
|
|
5416
5478
|
id: getSettlementDifferenceId(id, difference.canonicalKey),
|
|
5417
5479
|
className: "agg-settlement-difference flex w-full flex-col items-start gap-2 rounded-agg-lg",
|
|
5418
5480
|
children: [
|
|
5419
|
-
/* @__PURE__ */ (0,
|
|
5481
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
5420
5482
|
"button",
|
|
5421
5483
|
{
|
|
5422
5484
|
type: "button",
|
|
@@ -5424,7 +5486,7 @@ var Settlement = ({
|
|
|
5424
5486
|
"aria-expanded": isExpanded,
|
|
5425
5487
|
onClick: () => handleToggleDifference(difference.canonicalKey),
|
|
5426
5488
|
children: [
|
|
5427
|
-
/* @__PURE__ */ (0,
|
|
5489
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5428
5490
|
"i",
|
|
5429
5491
|
{
|
|
5430
5492
|
className: cn(
|
|
@@ -5435,8 +5497,8 @@ var Settlement = ({
|
|
|
5435
5497
|
"aria-hidden": "true"
|
|
5436
5498
|
}
|
|
5437
5499
|
),
|
|
5438
|
-
/* @__PURE__ */ (0,
|
|
5439
|
-
/* @__PURE__ */ (0,
|
|
5500
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "min-w-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground group-hover/agg-settlement-difference:text-agg-muted-foreground transition-colors break-words [overflow-wrap:anywhere]", children: difference.title }),
|
|
5501
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5440
5502
|
"i",
|
|
5441
5503
|
{
|
|
5442
5504
|
className: cn(
|
|
@@ -5451,12 +5513,12 @@ var Settlement = ({
|
|
|
5451
5513
|
]
|
|
5452
5514
|
}
|
|
5453
5515
|
),
|
|
5454
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
5516
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dl", { className: "flex w-full flex-col items-start gap-1 px-6", children: venueKeys.map((venue) => {
|
|
5455
5517
|
var _a2;
|
|
5456
5518
|
const venueValue = (_a2 = difference.perVenue[venue]) != null ? _a2 : labels.trading.settlementValueUnavailable;
|
|
5457
5519
|
const venueLabel = resolveSettlementVenueLabel(venue, labels);
|
|
5458
|
-
return /* @__PURE__ */ (0,
|
|
5459
|
-
/* @__PURE__ */ (0,
|
|
5520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "flex w-full items-start gap-2", children: [
|
|
5521
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
5460
5522
|
VenueLogo,
|
|
5461
5523
|
{
|
|
5462
5524
|
venue,
|
|
@@ -5465,8 +5527,8 @@ var Settlement = ({
|
|
|
5465
5527
|
ariaLabel: venueLabel
|
|
5466
5528
|
}
|
|
5467
5529
|
),
|
|
5468
|
-
/* @__PURE__ */ (0,
|
|
5469
|
-
/* @__PURE__ */ (0,
|
|
5530
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dt", { className: "w-[88px] shrink-0 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground", children: venueLabel }),
|
|
5531
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("dd", { className: "min-w-0 flex-1 text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground break-words [overflow-wrap:anywhere]", children: venueValue })
|
|
5470
5532
|
] }, venue);
|
|
5471
5533
|
}) }) : null
|
|
5472
5534
|
]
|
|
@@ -5475,9 +5537,9 @@ var Settlement = ({
|
|
|
5475
5537
|
);
|
|
5476
5538
|
}) })
|
|
5477
5539
|
] }) : null,
|
|
5478
|
-
hasVenueSettlementRules ? /* @__PURE__ */ (0,
|
|
5479
|
-
hasSettlementDifferences || hasStandaloneSettlementText ? /* @__PURE__ */ (0,
|
|
5480
|
-
/* @__PURE__ */ (0,
|
|
5540
|
+
hasVenueSettlementRules ? /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_jsx_runtime120.Fragment, { children: [
|
|
5541
|
+
hasSettlementDifferences || hasStandaloneSettlementText ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null,
|
|
5542
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SettlementVenueRules, { rules: venueRuleBlocks, labels })
|
|
5481
5543
|
] }) : null
|
|
5482
5544
|
] })
|
|
5483
5545
|
]
|
|
@@ -5487,7 +5549,7 @@ var Settlement = ({
|
|
|
5487
5549
|
Settlement.displayName = "Settlement";
|
|
5488
5550
|
|
|
5489
5551
|
// src/trading/settlement/settlement-details.tsx
|
|
5490
|
-
var
|
|
5552
|
+
var import_hooks24 = require("@agg-build/hooks");
|
|
5491
5553
|
|
|
5492
5554
|
// src/events/shared/venue-market-cluster.ts
|
|
5493
5555
|
var toNonEmptyString = (value) => {
|
|
@@ -5609,7 +5671,7 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
|
|
|
5609
5671
|
};
|
|
5610
5672
|
|
|
5611
5673
|
// src/trading/settlement/settlement-details.tsx
|
|
5612
|
-
var
|
|
5674
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
5613
5675
|
var hasContent = (value) => {
|
|
5614
5676
|
return typeof value === "string" && value.trim().length > 0;
|
|
5615
5677
|
};
|
|
@@ -5632,11 +5694,11 @@ var buildVenueSettlementRules = (venueMarkets) => {
|
|
|
5632
5694
|
};
|
|
5633
5695
|
var SettlementDetails = ({ className }) => {
|
|
5634
5696
|
var _a, _b, _c, _d, _e, _f;
|
|
5635
|
-
const tradingContext = (0,
|
|
5697
|
+
const tradingContext = (0, import_hooks24.useEventTradingContext)();
|
|
5636
5698
|
const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
|
|
5637
5699
|
const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
|
|
5638
5700
|
if (!selectedEvent) return null;
|
|
5639
|
-
const activeMarket = selectedMarket != null ? selectedMarket : (0,
|
|
5701
|
+
const activeMarket = selectedMarket != null ? selectedMarket : (0, import_hooks24.resolveDefaultTradingMarket)(selectedEvent);
|
|
5640
5702
|
if (!activeMarket) return null;
|
|
5641
5703
|
const allVenueMarkets = normalizeVenueMarketCluster(selectedEvent.venueMarkets);
|
|
5642
5704
|
const activeMarketCluster = normalizeVenueMarketCluster(
|
|
@@ -5660,7 +5722,7 @@ var SettlementDetails = ({ className }) => {
|
|
|
5660
5722
|
if (!hasContent(eventDescription) && !hasVenueSettlementRules && !hasSettlementDifferences) {
|
|
5661
5723
|
return null;
|
|
5662
5724
|
}
|
|
5663
|
-
return /* @__PURE__ */ (0,
|
|
5725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "agg-settlement-list flex flex-col gap-6", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", { className: "agg-settlement-list-item", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
5664
5726
|
Settlement,
|
|
5665
5727
|
{
|
|
5666
5728
|
question: selectedEvent.title,
|
|
@@ -5677,7 +5739,7 @@ var SettlementDetails = ({ className }) => {
|
|
|
5677
5739
|
SettlementDetails.displayName = "SettlementDetails";
|
|
5678
5740
|
|
|
5679
5741
|
// src/trading/place-order/index.tsx
|
|
5680
|
-
var
|
|
5742
|
+
var import_hooks41 = require("@agg-build/hooks");
|
|
5681
5743
|
var import_sdk19 = require("@agg-build/sdk");
|
|
5682
5744
|
var import_react16 = __toESM(require("@number-flow/react"));
|
|
5683
5745
|
var Popover = __toESM(require("@radix-ui/react-popover"));
|
|
@@ -5810,27 +5872,27 @@ var formatSportsEventTimeEt = (value) => {
|
|
|
5810
5872
|
};
|
|
5811
5873
|
|
|
5812
5874
|
// src/geo-block-banner/index.tsx
|
|
5813
|
-
var
|
|
5814
|
-
var
|
|
5875
|
+
var import_hooks25 = require("@agg-build/hooks");
|
|
5876
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
5815
5877
|
var GeoBlockBanner = ({
|
|
5816
5878
|
venue,
|
|
5817
5879
|
termsUrl = AGG_TERMS_OF_SERVICE_URL,
|
|
5818
5880
|
className
|
|
5819
5881
|
}) => {
|
|
5820
|
-
const labels = (0,
|
|
5882
|
+
const labels = (0, import_hooks25.useLabels)();
|
|
5821
5883
|
const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
5884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
5823
5885
|
"div",
|
|
5824
5886
|
{
|
|
5825
5887
|
className: cn("flex items-center gap-5 rounded-agg-lg bg-agg-secondary-hover p-3", className),
|
|
5826
5888
|
role: "status",
|
|
5827
5889
|
children: [
|
|
5828
|
-
/* @__PURE__ */ (0,
|
|
5890
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("p", { className: "min-w-0 flex-1 text-agg-xs leading-agg-4 text-agg-foreground", children: [
|
|
5829
5891
|
message,
|
|
5830
|
-
/* @__PURE__ */ (0,
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)("a", { href: termsUrl, className: "underline", target: "_blank", rel: "noreferrer noopener", children: labels.trading.geoBlockTermsLink }),
|
|
5831
5893
|
labels.trading.geoBlockMessageSuffix
|
|
5832
5894
|
] }),
|
|
5833
|
-
/* @__PURE__ */ (0,
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(Icon, { name: "internet-security", className: "h-6 w-6 shrink-0 text-agg-muted-foreground" })
|
|
5834
5896
|
]
|
|
5835
5897
|
}
|
|
5836
5898
|
);
|
|
@@ -5853,11 +5915,11 @@ var createAggClientSharedKycInitiator = (client) => {
|
|
|
5853
5915
|
};
|
|
5854
5916
|
|
|
5855
5917
|
// src/kyc/shared-kyc-modal.tsx
|
|
5856
|
-
var
|
|
5918
|
+
var import_hooks28 = require("@agg-build/hooks");
|
|
5857
5919
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5858
5920
|
|
|
5859
5921
|
// src/primitives/button/index.tsx
|
|
5860
|
-
var
|
|
5922
|
+
var import_hooks26 = require("@agg-build/hooks");
|
|
5861
5923
|
|
|
5862
5924
|
// src/primitives/button/button.constants.ts
|
|
5863
5925
|
var sizeClasses2 = {
|
|
@@ -5928,7 +5990,7 @@ var getButtonClassName = ({
|
|
|
5928
5990
|
};
|
|
5929
5991
|
|
|
5930
5992
|
// src/primitives/button/index.tsx
|
|
5931
|
-
var
|
|
5993
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
5932
5994
|
var Button = (_a) => {
|
|
5933
5995
|
var _b = _a, {
|
|
5934
5996
|
children,
|
|
@@ -5957,9 +6019,9 @@ var Button = (_a) => {
|
|
|
5957
6019
|
]);
|
|
5958
6020
|
const {
|
|
5959
6021
|
features: { enableAnimations }
|
|
5960
|
-
} = (0,
|
|
6022
|
+
} = (0, import_hooks26.useSdkUiConfig)();
|
|
5961
6023
|
const isDisabled = resolveButtonIsDisabled({ disabled, isLoading });
|
|
5962
|
-
return /* @__PURE__ */ (0,
|
|
6024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
5963
6025
|
"button",
|
|
5964
6026
|
__spreadProps(__spreadValues({
|
|
5965
6027
|
type,
|
|
@@ -5973,7 +6035,7 @@ var Button = (_a) => {
|
|
|
5973
6035
|
"aria-busy": isLoading,
|
|
5974
6036
|
"aria-label": ariaLabel
|
|
5975
6037
|
}, other), {
|
|
5976
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
6038
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
5977
6039
|
"span",
|
|
5978
6040
|
{
|
|
5979
6041
|
className: cn(
|
|
@@ -5984,9 +6046,9 @@ var Button = (_a) => {
|
|
|
5984
6046
|
),
|
|
5985
6047
|
"aria-hidden": "true"
|
|
5986
6048
|
}
|
|
5987
|
-
) : /* @__PURE__ */ (0,
|
|
6049
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
|
|
5988
6050
|
prefix != null ? prefix : null,
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
6051
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
5990
6052
|
"span",
|
|
5991
6053
|
{
|
|
5992
6054
|
className: cn(
|
|
@@ -6049,7 +6111,7 @@ var resolveInlineAlertHasAction = ({
|
|
|
6049
6111
|
};
|
|
6050
6112
|
|
|
6051
6113
|
// src/primitives/inline-alert/index.tsx
|
|
6052
|
-
var
|
|
6114
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
6053
6115
|
var InlineAlert = ({
|
|
6054
6116
|
tone = INLINE_ALERT_DEFAULT_TONE,
|
|
6055
6117
|
variant,
|
|
@@ -6063,7 +6125,7 @@ var InlineAlert = ({
|
|
|
6063
6125
|
const resolvedVariant = resolveInlineAlertVariant({ tone, variant });
|
|
6064
6126
|
const hasAction = resolveInlineAlertHasAction({ actionLabel, onAction });
|
|
6065
6127
|
const { ariaLive, role } = INLINE_ALERT_LIVE_REGION_CONFIG[tone];
|
|
6066
|
-
return /* @__PURE__ */ (0,
|
|
6128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
6067
6129
|
"div",
|
|
6068
6130
|
{
|
|
6069
6131
|
className: cn(
|
|
@@ -6075,7 +6137,7 @@ var InlineAlert = ({
|
|
|
6075
6137
|
"aria-live": ariaLive,
|
|
6076
6138
|
"aria-label": ariaLabel,
|
|
6077
6139
|
children: [
|
|
6078
|
-
/* @__PURE__ */ (0,
|
|
6140
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
6079
6141
|
Icon,
|
|
6080
6142
|
{
|
|
6081
6143
|
name: INLINE_ALERT_TONE_ICON_NAME[tone],
|
|
@@ -6083,14 +6145,14 @@ var InlineAlert = ({
|
|
|
6083
6145
|
"aria-hidden": "true"
|
|
6084
6146
|
}
|
|
6085
6147
|
),
|
|
6086
|
-
/* @__PURE__ */ (0,
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
6087
6149
|
"div",
|
|
6088
6150
|
{
|
|
6089
6151
|
className: cn(
|
|
6090
6152
|
"min-w-0",
|
|
6091
6153
|
resolvedVariant === "plain" && !hasAction ? "flex-none text-center" : "flex-1"
|
|
6092
6154
|
),
|
|
6093
|
-
children: /* @__PURE__ */ (0,
|
|
6155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
6094
6156
|
"div",
|
|
6095
6157
|
{
|
|
6096
6158
|
className: cn(
|
|
@@ -6099,14 +6161,14 @@ var InlineAlert = ({
|
|
|
6099
6161
|
resolvedVariant === "plain" && !hasAction ? "items-center" : null
|
|
6100
6162
|
),
|
|
6101
6163
|
children: [
|
|
6102
|
-
title2 ? /* @__PURE__ */ (0,
|
|
6103
|
-
/* @__PURE__ */ (0,
|
|
6164
|
+
title2 ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: title2 }) : null,
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground wrap-break-word", children: message })
|
|
6104
6166
|
]
|
|
6105
6167
|
}
|
|
6106
6168
|
)
|
|
6107
6169
|
}
|
|
6108
6170
|
),
|
|
6109
|
-
hasAction ? /* @__PURE__ */ (0,
|
|
6171
|
+
hasAction ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
6110
6172
|
"button",
|
|
6111
6173
|
{
|
|
6112
6174
|
type: "button",
|
|
@@ -6126,7 +6188,7 @@ var InlineAlert = ({
|
|
|
6126
6188
|
InlineAlert.displayName = "InlineAlert";
|
|
6127
6189
|
|
|
6128
6190
|
// src/primitives/modal/index.tsx
|
|
6129
|
-
var
|
|
6191
|
+
var import_hooks27 = require("@agg-build/hooks");
|
|
6130
6192
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
6131
6193
|
|
|
6132
6194
|
// src/primitives/modal/modal.constants.ts
|
|
@@ -6150,7 +6212,7 @@ var resolveModalCloseIcon = ({
|
|
|
6150
6212
|
};
|
|
6151
6213
|
|
|
6152
6214
|
// src/primitives/modal/index.tsx
|
|
6153
|
-
var
|
|
6215
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
6154
6216
|
var Modal = ({
|
|
6155
6217
|
open,
|
|
6156
6218
|
onOpenChange,
|
|
@@ -6158,7 +6220,7 @@ var Modal = ({
|
|
|
6158
6220
|
"aria-label": _ariaLabel,
|
|
6159
6221
|
"aria-labelledby": _ariaLabelledBy
|
|
6160
6222
|
}) => {
|
|
6161
|
-
return /* @__PURE__ */ (0,
|
|
6223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Dialog.Root, { open, onOpenChange, children });
|
|
6162
6224
|
};
|
|
6163
6225
|
var ModalContainer = ({
|
|
6164
6226
|
children,
|
|
@@ -6170,11 +6232,11 @@ var ModalContainer = ({
|
|
|
6170
6232
|
const {
|
|
6171
6233
|
general: { rootClassName },
|
|
6172
6234
|
features: { enableAnimations }
|
|
6173
|
-
} = (0,
|
|
6235
|
+
} = (0, import_hooks27.useSdkUiConfig)();
|
|
6174
6236
|
const overlayAnimationClassName = resolveModalOverlayAnimationClassName(enableAnimations);
|
|
6175
6237
|
const panelAnimationClassName = resolveModalPanelAnimationClassName(enableAnimations);
|
|
6176
|
-
return /* @__PURE__ */ (0,
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(Dialog.Portal, { children: [
|
|
6239
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6178
6240
|
Dialog.Overlay,
|
|
6179
6241
|
{
|
|
6180
6242
|
className: cn(
|
|
@@ -6185,7 +6247,7 @@ var ModalContainer = ({
|
|
|
6185
6247
|
)
|
|
6186
6248
|
}
|
|
6187
6249
|
),
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6250
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6189
6251
|
Dialog.Content,
|
|
6190
6252
|
{
|
|
6191
6253
|
className: cn(
|
|
@@ -6211,7 +6273,7 @@ var ModalContainer = ({
|
|
|
6211
6273
|
event.preventDefault();
|
|
6212
6274
|
}
|
|
6213
6275
|
},
|
|
6214
|
-
children: /* @__PURE__ */ (0,
|
|
6276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6215
6277
|
"div",
|
|
6216
6278
|
{
|
|
6217
6279
|
className: cn(
|
|
@@ -6220,7 +6282,7 @@ var ModalContainer = ({
|
|
|
6220
6282
|
"flex h-full min-h-0 w-full justify-center p-0 md:p-5",
|
|
6221
6283
|
classNames == null ? void 0 : classNames.center
|
|
6222
6284
|
),
|
|
6223
|
-
children: /* @__PURE__ */ (0,
|
|
6285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6224
6286
|
"div",
|
|
6225
6287
|
{
|
|
6226
6288
|
className: cn(
|
|
@@ -6260,14 +6322,14 @@ var ModalHeader = ({
|
|
|
6260
6322
|
}) => {
|
|
6261
6323
|
const {
|
|
6262
6324
|
features: { enableAnimations }
|
|
6263
|
-
} = (0,
|
|
6264
|
-
const labels = (0,
|
|
6265
|
-
const defaultCloseIcon = /* @__PURE__ */ (0,
|
|
6325
|
+
} = (0, import_hooks27.useSdkUiConfig)();
|
|
6326
|
+
const labels = (0, import_hooks27.useLabels)();
|
|
6327
|
+
const defaultCloseIcon = /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(CloseIcon, { className: "h-6 w-6" });
|
|
6266
6328
|
const resolvedCloseIcon = resolveModalCloseIcon({
|
|
6267
6329
|
closeIcon,
|
|
6268
6330
|
defaultCloseIcon
|
|
6269
6331
|
});
|
|
6270
|
-
return /* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
6271
6333
|
"div",
|
|
6272
6334
|
{
|
|
6273
6335
|
className: cn(
|
|
@@ -6280,7 +6342,7 @@ var ModalHeader = ({
|
|
|
6280
6342
|
classNames == null ? void 0 : classNames.root
|
|
6281
6343
|
),
|
|
6282
6344
|
children: [
|
|
6283
|
-
/* @__PURE__ */ (0,
|
|
6345
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
6284
6346
|
"div",
|
|
6285
6347
|
{
|
|
6286
6348
|
className: cn(
|
|
@@ -6293,8 +6355,8 @@ var ModalHeader = ({
|
|
|
6293
6355
|
classNames == null ? void 0 : classNames.container
|
|
6294
6356
|
),
|
|
6295
6357
|
children: [
|
|
6296
|
-
leftElement ? /* @__PURE__ */ (0,
|
|
6297
|
-
/* @__PURE__ */ (0,
|
|
6358
|
+
leftElement ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, { children: leftElement }) : null,
|
|
6359
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
6298
6360
|
"div",
|
|
6299
6361
|
{
|
|
6300
6362
|
className: cn(
|
|
@@ -6303,7 +6365,7 @@ var ModalHeader = ({
|
|
|
6303
6365
|
classNames == null ? void 0 : classNames.titleContainer
|
|
6304
6366
|
),
|
|
6305
6367
|
children: [
|
|
6306
|
-
/* @__PURE__ */ (0,
|
|
6368
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6307
6369
|
Dialog.Title,
|
|
6308
6370
|
{
|
|
6309
6371
|
className: cn(
|
|
@@ -6317,7 +6379,7 @@ var ModalHeader = ({
|
|
|
6317
6379
|
children: title2
|
|
6318
6380
|
}
|
|
6319
6381
|
),
|
|
6320
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
6382
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6321
6383
|
"span",
|
|
6322
6384
|
{
|
|
6323
6385
|
className: cn(
|
|
@@ -6331,9 +6393,9 @@ var ModalHeader = ({
|
|
|
6331
6393
|
]
|
|
6332
6394
|
}
|
|
6333
6395
|
),
|
|
6334
|
-
/* @__PURE__ */ (0,
|
|
6335
|
-
rightElement ? /* @__PURE__ */ (0,
|
|
6336
|
-
!hideClose && /* @__PURE__ */ (0,
|
|
6396
|
+
/* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "agg-modal-header-actions flex flex-row items-center justify-end gap-6", children: [
|
|
6397
|
+
rightElement ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_jsx_runtime125.Fragment, { children: rightElement }) : null,
|
|
6398
|
+
!hideClose && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6337
6399
|
Dialog.Close,
|
|
6338
6400
|
{
|
|
6339
6401
|
className: cn(
|
|
@@ -6350,14 +6412,14 @@ var ModalHeader = ({
|
|
|
6350
6412
|
]
|
|
6351
6413
|
}
|
|
6352
6414
|
),
|
|
6353
|
-
children ? /* @__PURE__ */ (0,
|
|
6415
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("div", { className: "agg-modal-header-extra", children }) : null
|
|
6354
6416
|
]
|
|
6355
6417
|
}
|
|
6356
6418
|
);
|
|
6357
6419
|
};
|
|
6358
6420
|
Modal.Header = ModalHeader;
|
|
6359
6421
|
var ModalBody = ({ children, classNames }) => {
|
|
6360
|
-
return /* @__PURE__ */ (0,
|
|
6422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6361
6423
|
"div",
|
|
6362
6424
|
{
|
|
6363
6425
|
className: cn(
|
|
@@ -6378,7 +6440,7 @@ var ModalFooter = ({
|
|
|
6378
6440
|
classNames,
|
|
6379
6441
|
hideBorder = false
|
|
6380
6442
|
}) => {
|
|
6381
|
-
return /* @__PURE__ */ (0,
|
|
6443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
6382
6444
|
"div",
|
|
6383
6445
|
{
|
|
6384
6446
|
className: cn(
|
|
@@ -6461,7 +6523,7 @@ var getTypographyClassName = ({
|
|
|
6461
6523
|
};
|
|
6462
6524
|
|
|
6463
6525
|
// src/primitives/typography/index.tsx
|
|
6464
|
-
var
|
|
6526
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
6465
6527
|
var Typography = ({
|
|
6466
6528
|
as: Component = "p",
|
|
6467
6529
|
variant = "body",
|
|
@@ -6469,12 +6531,12 @@ var Typography = ({
|
|
|
6469
6531
|
children,
|
|
6470
6532
|
"aria-label": ariaLabel
|
|
6471
6533
|
}) => {
|
|
6472
|
-
return /* @__PURE__ */ (0,
|
|
6534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Component, { className: getTypographyClassName({ className, variant }), "aria-label": ariaLabel, children });
|
|
6473
6535
|
};
|
|
6474
6536
|
Typography.displayName = "Typography";
|
|
6475
6537
|
|
|
6476
6538
|
// src/kyc/shared-kyc-modal.tsx
|
|
6477
|
-
var
|
|
6539
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
6478
6540
|
var SharedKycModal = ({
|
|
6479
6541
|
open,
|
|
6480
6542
|
state = "initial",
|
|
@@ -6482,46 +6544,46 @@ var SharedKycModal = ({
|
|
|
6482
6544
|
onOpenChange,
|
|
6483
6545
|
onStartVerification
|
|
6484
6546
|
}) => {
|
|
6485
|
-
const labels = (0,
|
|
6547
|
+
const labels = (0, import_hooks28.useLabels)();
|
|
6486
6548
|
const modalLabels = labels.trading.sharedKyc.modal;
|
|
6487
6549
|
const isInitiating = state === "initiating";
|
|
6488
6550
|
const handleOpenChange = (nextOpen) => {
|
|
6489
6551
|
if (isInitiating && !nextOpen) return;
|
|
6490
6552
|
onOpenChange(nextOpen);
|
|
6491
6553
|
};
|
|
6492
|
-
return /* @__PURE__ */ (0,
|
|
6554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
6493
6555
|
Modal.Container,
|
|
6494
6556
|
{
|
|
6495
6557
|
maxWidth: "420px",
|
|
6496
6558
|
"aria-label": modalLabels.ariaLabel,
|
|
6497
6559
|
classNames: { container: "!rounded-agg-2xl" },
|
|
6498
6560
|
children: [
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6561
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex h-14 shrink-0 items-center justify-end px-5", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6500
6562
|
Dialog2.Close,
|
|
6501
6563
|
{
|
|
6502
6564
|
"aria-label": labels.common.close,
|
|
6503
6565
|
disabled: isInitiating,
|
|
6504
6566
|
className: "flex size-11 cursor-pointer items-center justify-center rounded-agg-full text-agg-foreground hover:bg-agg-secondary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-50",
|
|
6505
|
-
children: /* @__PURE__ */ (0,
|
|
6567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: "close", size: "small", "aria-hidden": "true" })
|
|
6506
6568
|
}
|
|
6507
6569
|
) }),
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
6570
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal.Body, { classNames: { root: "!px-8 !pb-9 !pt-0" }, children: state === "success" ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
6509
6571
|
"div",
|
|
6510
6572
|
{
|
|
6511
6573
|
className: "flex flex-col items-center gap-6 text-center",
|
|
6512
6574
|
role: "status",
|
|
6513
6575
|
"aria-live": "polite",
|
|
6514
6576
|
children: [
|
|
6515
|
-
/* @__PURE__ */ (0,
|
|
6516
|
-
/* @__PURE__ */ (0,
|
|
6517
|
-
/* @__PURE__ */ (0,
|
|
6518
|
-
/* @__PURE__ */ (0,
|
|
6577
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex size-12 items-center justify-center rounded-agg-full border border-agg-success bg-agg-success/10 text-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Icon, { name: "success-check", className: "size-5", "aria-hidden": "true" }) }),
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
6579
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "body-large-strong", children: modalLabels.successTitle }) }),
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: modalLabels.successDescription }) })
|
|
6519
6581
|
] }),
|
|
6520
|
-
/* @__PURE__ */ (0,
|
|
6582
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Button, { variant: "secondary", size: "large", onClick: () => handleOpenChange(false), children: modalLabels.done })
|
|
6521
6583
|
]
|
|
6522
6584
|
}
|
|
6523
|
-
) : /* @__PURE__ */ (0,
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
6585
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-6 text-center", children: [
|
|
6586
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6525
6587
|
Icon,
|
|
6526
6588
|
{
|
|
6527
6589
|
name: "user-trust",
|
|
@@ -6529,11 +6591,11 @@ var SharedKycModal = ({
|
|
|
6529
6591
|
"aria-hidden": "true"
|
|
6530
6592
|
}
|
|
6531
6593
|
),
|
|
6532
|
-
/* @__PURE__ */ (0,
|
|
6533
|
-
/* @__PURE__ */ (0,
|
|
6534
|
-
/* @__PURE__ */ (0,
|
|
6594
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Title, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "body-large-strong", children: state === "pending" ? modalLabels.pendingTitle : modalLabels.title }) }),
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Description, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Typography, { as: "span", variant: "label", className: "text-pretty text-agg-foreground", children: state === "pending" ? modalLabels.pendingDescription : modalLabels.freeDescription }) })
|
|
6535
6597
|
] }),
|
|
6536
|
-
state === "error" || state === "pending" && errorMessage ? /* @__PURE__ */ (0,
|
|
6598
|
+
state === "error" || state === "pending" && errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6537
6599
|
InlineAlert,
|
|
6538
6600
|
{
|
|
6539
6601
|
tone: "error",
|
|
@@ -6541,8 +6603,8 @@ var SharedKycModal = ({
|
|
|
6541
6603
|
message: errorMessage || modalLabels.error
|
|
6542
6604
|
}
|
|
6543
6605
|
) : null,
|
|
6544
|
-
/* @__PURE__ */ (0,
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
6606
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6546
6608
|
Button,
|
|
6547
6609
|
{
|
|
6548
6610
|
variant: "primary",
|
|
@@ -6554,7 +6616,7 @@ var SharedKycModal = ({
|
|
|
6554
6616
|
children: state === "pending" ? modalLabels.checkStatus : modalLabels.startVerification
|
|
6555
6617
|
}
|
|
6556
6618
|
),
|
|
6557
|
-
/* @__PURE__ */ (0,
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
6558
6620
|
Button,
|
|
6559
6621
|
{
|
|
6560
6622
|
variant: "tertiary",
|
|
@@ -6759,20 +6821,20 @@ var useSharedKycFlow = ({
|
|
|
6759
6821
|
};
|
|
6760
6822
|
|
|
6761
6823
|
// src/notifications/agg-notification-events-provider.tsx
|
|
6762
|
-
var
|
|
6824
|
+
var import_hooks29 = require("@agg-build/hooks");
|
|
6763
6825
|
var import_react7 = require("react");
|
|
6764
6826
|
|
|
6765
6827
|
// src/primitives/toast/index.tsx
|
|
6766
6828
|
var RadixToast = __toESM(require("@radix-ui/react-toast"));
|
|
6767
6829
|
var import_react6 = require("react");
|
|
6768
|
-
var
|
|
6830
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
6769
6831
|
var ToastContext = (0, import_react6.createContext)(null);
|
|
6770
6832
|
function useOptionalToast() {
|
|
6771
6833
|
return (0, import_react6.useContext)(ToastContext);
|
|
6772
6834
|
}
|
|
6773
6835
|
|
|
6774
6836
|
// src/notifications/agg-notification-events-provider.tsx
|
|
6775
|
-
var
|
|
6837
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
6776
6838
|
var firedOrderNotificationKeys = /* @__PURE__ */ new Set();
|
|
6777
6839
|
var MICRO_UNITS_SCALE = 1e6;
|
|
6778
6840
|
var formatScaledMicroAmount = (value) => {
|
|
@@ -6863,7 +6925,7 @@ var CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS = 2 * 60 * 1e3;
|
|
|
6863
6925
|
|
|
6864
6926
|
// src/onboarding/index.tsx
|
|
6865
6927
|
var import_react15 = require("react");
|
|
6866
|
-
var
|
|
6928
|
+
var import_hooks39 = require("@agg-build/hooks");
|
|
6867
6929
|
var Dialog5 = __toESM(require("@radix-ui/react-dialog"));
|
|
6868
6930
|
|
|
6869
6931
|
// src/onboarding/onboarding-modal.constants.ts
|
|
@@ -6882,21 +6944,22 @@ var ONBOARDING_STEPS = {
|
|
|
6882
6944
|
var ONCHAIN_VENUES = [
|
|
6883
6945
|
import_sdk16.Venue.polymarket,
|
|
6884
6946
|
import_sdk16.Venue.opinion,
|
|
6885
|
-
import_sdk16.Venue.predict
|
|
6947
|
+
import_sdk16.Venue.predict,
|
|
6948
|
+
import_sdk16.Venue.pred
|
|
6886
6949
|
].filter(import_sdk16.isVenueActive);
|
|
6887
6950
|
|
|
6888
6951
|
// src/onboarding/steps/how-it-works.tsx
|
|
6889
6952
|
var import_react8 = require("react");
|
|
6890
|
-
var
|
|
6891
|
-
var
|
|
6953
|
+
var import_hooks30 = require("@agg-build/hooks");
|
|
6954
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
6892
6955
|
var defaultIcons = {
|
|
6893
|
-
createAccount: /* @__PURE__ */ (0,
|
|
6894
|
-
linkAccounts: /* @__PURE__ */ (0,
|
|
6895
|
-
bestPrices: /* @__PURE__ */ (0,
|
|
6896
|
-
stayInControl: /* @__PURE__ */ (0,
|
|
6956
|
+
createAccount: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(CreateAccountIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
6957
|
+
linkAccounts: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(LinkAccountsIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
6958
|
+
bestPrices: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(BestPricesIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" }),
|
|
6959
|
+
stayInControl: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(StayInControlIcon, { className: "h-[28px] w-[28px] text-agg-muted-foreground" })
|
|
6897
6960
|
};
|
|
6898
6961
|
var HowItWorksStep = ({ onContinue, icons }) => {
|
|
6899
|
-
const labels = (0,
|
|
6962
|
+
const labels = (0, import_hooks30.useLabels)();
|
|
6900
6963
|
const scrollRef = (0, import_react8.useRef)(null);
|
|
6901
6964
|
const [showTopGradient, setShowTopGradient] = (0, import_react8.useState)(false);
|
|
6902
6965
|
const [showBottomGradient, setShowBottomGradient] = (0, import_react8.useState)(true);
|
|
@@ -6906,10 +6969,10 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6906
6969
|
setShowTopGradient(el.scrollTop > 0);
|
|
6907
6970
|
setShowBottomGradient(el.scrollTop + el.clientHeight < el.scrollHeight - 1);
|
|
6908
6971
|
}, []);
|
|
6909
|
-
return /* @__PURE__ */ (0,
|
|
6910
|
-
/* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6912
|
-
/* @__PURE__ */ (0,
|
|
6972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col gap-6 h-[600px] sm:h-auto", children: [
|
|
6973
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.howItWorks.title }),
|
|
6974
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "relative flex-1 min-h-0 sm:flex-initial", children: [
|
|
6975
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
6913
6976
|
"div",
|
|
6914
6977
|
{
|
|
6915
6978
|
ref: scrollRef,
|
|
@@ -6919,7 +6982,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6919
6982
|
var _a;
|
|
6920
6983
|
const icon = (_a = icons == null ? void 0 : icons[featureKey]) != null ? _a : defaultIcons[featureKey];
|
|
6921
6984
|
const feature = labels.onboarding.howItWorks.features[featureKey];
|
|
6922
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
6923
6986
|
"div",
|
|
6924
6987
|
{
|
|
6925
6988
|
className: cn(
|
|
@@ -6928,11 +6991,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6928
6991
|
"bg-agg-secondary-hover"
|
|
6929
6992
|
),
|
|
6930
6993
|
children: [
|
|
6931
|
-
/* @__PURE__ */ (0,
|
|
6932
|
-
/* @__PURE__ */ (0,
|
|
6933
|
-
/* @__PURE__ */ (0,
|
|
6994
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col flex-1 min-w-0 gap-[6px]", children: [
|
|
6995
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: feature.title }),
|
|
6996
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: feature.description })
|
|
6934
6997
|
] }),
|
|
6935
|
-
icon ? /* @__PURE__ */ (0,
|
|
6998
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "hidden shrink-0 items-center justify-center text-agg-muted-foreground sm:flex", children: icon }) : null
|
|
6936
6999
|
]
|
|
6937
7000
|
},
|
|
6938
7001
|
featureKey
|
|
@@ -6940,7 +7003,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6940
7003
|
})
|
|
6941
7004
|
}
|
|
6942
7005
|
),
|
|
6943
|
-
/* @__PURE__ */ (0,
|
|
7006
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
6944
7007
|
"div",
|
|
6945
7008
|
{
|
|
6946
7009
|
className: cn(
|
|
@@ -6951,7 +7014,7 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6951
7014
|
)
|
|
6952
7015
|
}
|
|
6953
7016
|
),
|
|
6954
|
-
/* @__PURE__ */ (0,
|
|
7017
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
6955
7018
|
"div",
|
|
6956
7019
|
{
|
|
6957
7020
|
className: cn(
|
|
@@ -6963,21 +7026,21 @@ var HowItWorksStep = ({ onContinue, icons }) => {
|
|
|
6963
7026
|
}
|
|
6964
7027
|
)
|
|
6965
7028
|
] }),
|
|
6966
|
-
/* @__PURE__ */ (0,
|
|
7029
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: onContinue, children: labels.onboarding.howItWorks.continue })
|
|
6967
7030
|
] });
|
|
6968
7031
|
};
|
|
6969
7032
|
HowItWorksStep.displayName = "HowItWorksStep";
|
|
6970
7033
|
|
|
6971
7034
|
// src/onboarding/steps/profile-setup.tsx
|
|
6972
7035
|
var import_react12 = require("react");
|
|
6973
|
-
var
|
|
7036
|
+
var import_hooks35 = require("@agg-build/hooks");
|
|
6974
7037
|
|
|
6975
7038
|
// src/primitives/calendar/index.tsx
|
|
6976
7039
|
var import_react_day_picker = require("react-day-picker");
|
|
6977
|
-
var
|
|
7040
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
6978
7041
|
var Calendar = (_a) => {
|
|
6979
7042
|
var _b = _a, { className, classNames } = _b, props = __objRest(_b, ["className", "classNames"]);
|
|
6980
|
-
return /* @__PURE__ */ (0,
|
|
7043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
6981
7044
|
import_react_day_picker.DayPicker,
|
|
6982
7045
|
__spreadValues({
|
|
6983
7046
|
showOutsideDays: false,
|
|
@@ -7011,7 +7074,7 @@ var Calendar = (_a) => {
|
|
|
7011
7074
|
Calendar.displayName = "Calendar";
|
|
7012
7075
|
|
|
7013
7076
|
// src/primitives/currency-input/index.tsx
|
|
7014
|
-
var
|
|
7077
|
+
var import_hooks31 = require("@agg-build/hooks");
|
|
7015
7078
|
var import_react9 = require("react");
|
|
7016
7079
|
|
|
7017
7080
|
// src/primitives/currency-input/currency-input.constants.ts
|
|
@@ -7103,7 +7166,7 @@ var sanitizeCurrencyInputPastedValue = (input, parts, decimalPlaces) => {
|
|
|
7103
7166
|
};
|
|
7104
7167
|
|
|
7105
7168
|
// src/primitives/currency-input/index.tsx
|
|
7106
|
-
var
|
|
7169
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
7107
7170
|
var CurrencyInput = ({
|
|
7108
7171
|
value,
|
|
7109
7172
|
onChange,
|
|
@@ -7121,7 +7184,7 @@ var CurrencyInput = ({
|
|
|
7121
7184
|
}) => {
|
|
7122
7185
|
const {
|
|
7123
7186
|
general: { locale }
|
|
7124
|
-
} = (0,
|
|
7187
|
+
} = (0, import_hooks31.useSdkUiConfig)();
|
|
7125
7188
|
const parts = (0, import_react9.useMemo)(() => resolveCurrencyInputFormatParts(locale), [locale]);
|
|
7126
7189
|
const [raw, setRaw] = (0, import_react9.useState)(() => value >= 0 ? String(value) : "");
|
|
7127
7190
|
const isEditingRef = (0, import_react9.useRef)(false);
|
|
@@ -7236,7 +7299,7 @@ var CurrencyInput = ({
|
|
|
7236
7299
|
onChange == null ? void 0 : onChange(nextValue);
|
|
7237
7300
|
onBlur == null ? void 0 : onBlur();
|
|
7238
7301
|
};
|
|
7239
|
-
return /* @__PURE__ */ (0,
|
|
7302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
7240
7303
|
"input",
|
|
7241
7304
|
{
|
|
7242
7305
|
ref: inputRef,
|
|
@@ -7266,7 +7329,7 @@ var CurrencyInput = ({
|
|
|
7266
7329
|
CurrencyInput.displayName = "CurrencyInput";
|
|
7267
7330
|
|
|
7268
7331
|
// src/primitives/loading-icon/index.tsx
|
|
7269
|
-
var
|
|
7332
|
+
var import_hooks32 = require("@agg-build/hooks");
|
|
7270
7333
|
|
|
7271
7334
|
// src/primitives/loading-icon/loading-icon.constants.ts
|
|
7272
7335
|
var LOADING_ICON_DEFAULT_SIZE = "medium";
|
|
@@ -7284,18 +7347,18 @@ var resolveLoadingIconAriaLabel = ({
|
|
|
7284
7347
|
};
|
|
7285
7348
|
|
|
7286
7349
|
// src/primitives/loading-icon/index.tsx
|
|
7287
|
-
var
|
|
7350
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
7288
7351
|
var LoadingIcon = ({
|
|
7289
7352
|
size = LOADING_ICON_DEFAULT_SIZE,
|
|
7290
7353
|
variant = "default",
|
|
7291
7354
|
className,
|
|
7292
7355
|
ariaLabel
|
|
7293
7356
|
}) => {
|
|
7294
|
-
const labels = (0,
|
|
7357
|
+
const labels = (0, import_hooks32.useLabels)();
|
|
7295
7358
|
const {
|
|
7296
7359
|
features: { enableAnimations }
|
|
7297
|
-
} = (0,
|
|
7298
|
-
return /* @__PURE__ */ (0,
|
|
7360
|
+
} = (0, import_hooks32.useSdkUiConfig)();
|
|
7361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7299
7362
|
"span",
|
|
7300
7363
|
{
|
|
7301
7364
|
role: "status",
|
|
@@ -7308,7 +7371,7 @@ var LoadingIcon = ({
|
|
|
7308
7371
|
"inline-grid place-items-center text-agg-primary will-change-transform",
|
|
7309
7372
|
className
|
|
7310
7373
|
),
|
|
7311
|
-
children: /* @__PURE__ */ (0,
|
|
7374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "inline-grid place-items-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7312
7375
|
"svg",
|
|
7313
7376
|
{
|
|
7314
7377
|
viewBox: LOADING_ICON_SVG_VIEW_BOX,
|
|
@@ -7316,8 +7379,8 @@ var LoadingIcon = ({
|
|
|
7316
7379
|
"block",
|
|
7317
7380
|
variant === "prominent" ? LOADING_ICON_PROMINENT_FRAME_CLASS : iconSizeClasses[size]
|
|
7318
7381
|
),
|
|
7319
|
-
children: variant === "prominent" ? /* @__PURE__ */ (0,
|
|
7320
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
7382
|
+
children: variant === "prominent" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("g", { children: [
|
|
7383
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7321
7384
|
"animateTransform",
|
|
7322
7385
|
{
|
|
7323
7386
|
attributeName: "transform",
|
|
@@ -7329,7 +7392,7 @@ var LoadingIcon = ({
|
|
|
7329
7392
|
repeatCount: "indefinite"
|
|
7330
7393
|
}
|
|
7331
7394
|
) : null,
|
|
7332
|
-
/* @__PURE__ */ (0,
|
|
7395
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7333
7396
|
"circle",
|
|
7334
7397
|
{
|
|
7335
7398
|
cx: "22",
|
|
@@ -7343,8 +7406,8 @@ var LoadingIcon = ({
|
|
|
7343
7406
|
strokeDasharray: LOADING_ICON_PROMINENT_DASHARRAY
|
|
7344
7407
|
}
|
|
7345
7408
|
)
|
|
7346
|
-
] }) : /* @__PURE__ */ (0,
|
|
7347
|
-
enableAnimations ? /* @__PURE__ */ (0,
|
|
7409
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("g", { children: [
|
|
7410
|
+
enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7348
7411
|
"animateTransform",
|
|
7349
7412
|
{
|
|
7350
7413
|
attributeName: "transform",
|
|
@@ -7356,7 +7419,7 @@ var LoadingIcon = ({
|
|
|
7356
7419
|
repeatCount: "indefinite"
|
|
7357
7420
|
}
|
|
7358
7421
|
) : null,
|
|
7359
|
-
/* @__PURE__ */ (0,
|
|
7422
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7360
7423
|
"circle",
|
|
7361
7424
|
{
|
|
7362
7425
|
cx: "22",
|
|
@@ -7368,8 +7431,8 @@ var LoadingIcon = ({
|
|
|
7368
7431
|
strokeLinecap: "round",
|
|
7369
7432
|
strokeDasharray: "60 100",
|
|
7370
7433
|
strokeDashoffset: "0",
|
|
7371
|
-
children: enableAnimations ? /* @__PURE__ */ (0,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7434
|
+
children: enableAnimations ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(import_jsx_runtime133.Fragment, { children: [
|
|
7435
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7373
7436
|
"animate",
|
|
7374
7437
|
{
|
|
7375
7438
|
attributeName: "stroke-dasharray",
|
|
@@ -7378,7 +7441,7 @@ var LoadingIcon = ({
|
|
|
7378
7441
|
repeatCount: "indefinite"
|
|
7379
7442
|
}
|
|
7380
7443
|
),
|
|
7381
|
-
/* @__PURE__ */ (0,
|
|
7444
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
7382
7445
|
"animate",
|
|
7383
7446
|
{
|
|
7384
7447
|
attributeName: "stroke-dashoffset",
|
|
@@ -7399,7 +7462,7 @@ var LoadingIcon = ({
|
|
|
7399
7462
|
LoadingIcon.displayName = "LoadingIcon";
|
|
7400
7463
|
|
|
7401
7464
|
// src/primitives/select/index.tsx
|
|
7402
|
-
var
|
|
7465
|
+
var import_hooks33 = require("@agg-build/hooks");
|
|
7403
7466
|
var import_react10 = require("react");
|
|
7404
7467
|
var import_react_dom = require("react-dom");
|
|
7405
7468
|
|
|
@@ -7421,7 +7484,7 @@ var resolveIsSelectDisabled = ({
|
|
|
7421
7484
|
};
|
|
7422
7485
|
|
|
7423
7486
|
// src/primitives/select/index.tsx
|
|
7424
|
-
var
|
|
7487
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
7425
7488
|
var SELECT_DROPDOWN_Z = 1e4;
|
|
7426
7489
|
function resolveSelectPortalContainer(triggerRoot) {
|
|
7427
7490
|
var _a, _b;
|
|
@@ -7444,11 +7507,11 @@ var Select = ({
|
|
|
7444
7507
|
contentSideOffset = 8
|
|
7445
7508
|
}) => {
|
|
7446
7509
|
var _a;
|
|
7447
|
-
const labels = (0,
|
|
7510
|
+
const labels = (0, import_hooks33.useLabels)();
|
|
7448
7511
|
const {
|
|
7449
7512
|
general: { rootClassName },
|
|
7450
7513
|
features: { enableAnimations }
|
|
7451
|
-
} = (0,
|
|
7514
|
+
} = (0, import_hooks33.useSdkUiConfig)();
|
|
7452
7515
|
const isDisabled = resolveIsSelectDisabled({ disabled, items });
|
|
7453
7516
|
const selectedItem = resolveSelectedItem(items, value);
|
|
7454
7517
|
const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
|
|
@@ -7540,7 +7603,7 @@ var Select = ({
|
|
|
7540
7603
|
};
|
|
7541
7604
|
const isInline = variant === "inline";
|
|
7542
7605
|
const triggerRadiusClass = triggerClassName != null ? triggerClassName : isInline ? "rounded-agg-sm" : "rounded-agg-md";
|
|
7543
|
-
const listbox = menuRect ? /* @__PURE__ */ (0,
|
|
7606
|
+
const listbox = menuRect ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7544
7607
|
"div",
|
|
7545
7608
|
{
|
|
7546
7609
|
ref: portalRef,
|
|
@@ -7568,7 +7631,7 @@ var Select = ({
|
|
|
7568
7631
|
const isSelected = item.value === value;
|
|
7569
7632
|
const isHidden = item.hidden === true;
|
|
7570
7633
|
if (isHidden) return null;
|
|
7571
|
-
return /* @__PURE__ */ (0,
|
|
7634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
7572
7635
|
"button",
|
|
7573
7636
|
{
|
|
7574
7637
|
type: "button",
|
|
@@ -7592,14 +7655,14 @@ var Select = ({
|
|
|
7592
7655
|
handleClose();
|
|
7593
7656
|
},
|
|
7594
7657
|
children: [
|
|
7595
|
-
isInline && isSelected ? /* @__PURE__ */ (0,
|
|
7658
|
+
isInline && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7596
7659
|
"span",
|
|
7597
7660
|
{
|
|
7598
7661
|
className: "agg-select-item-indicator absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
|
|
7599
7662
|
"aria-hidden": true
|
|
7600
7663
|
}
|
|
7601
7664
|
) : null,
|
|
7602
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
7665
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7603
7666
|
"span",
|
|
7604
7667
|
{
|
|
7605
7668
|
className: cn(
|
|
@@ -7608,7 +7671,7 @@ var Select = ({
|
|
|
7608
7671
|
),
|
|
7609
7672
|
children: item.icon
|
|
7610
7673
|
}
|
|
7611
|
-
) : item.iconUrl ? /* @__PURE__ */ (0,
|
|
7674
|
+
) : item.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7612
7675
|
RemoteImage,
|
|
7613
7676
|
{
|
|
7614
7677
|
src: item.iconUrl,
|
|
@@ -7616,7 +7679,7 @@ var Select = ({
|
|
|
7616
7679
|
className: "agg-select-item-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
7617
7680
|
}
|
|
7618
7681
|
) : null,
|
|
7619
|
-
/* @__PURE__ */ (0,
|
|
7682
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "agg-select-item-label truncate", children: item.label })
|
|
7620
7683
|
]
|
|
7621
7684
|
},
|
|
7622
7685
|
item.value
|
|
@@ -7624,7 +7687,7 @@ var Select = ({
|
|
|
7624
7687
|
})
|
|
7625
7688
|
}
|
|
7626
7689
|
) : null;
|
|
7627
|
-
return /* @__PURE__ */ (0,
|
|
7690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
7628
7691
|
"div",
|
|
7629
7692
|
{
|
|
7630
7693
|
ref: containerRef,
|
|
@@ -7634,7 +7697,7 @@ var Select = ({
|
|
|
7634
7697
|
className
|
|
7635
7698
|
),
|
|
7636
7699
|
children: [
|
|
7637
|
-
/* @__PURE__ */ (0,
|
|
7700
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
|
|
7638
7701
|
"button",
|
|
7639
7702
|
{
|
|
7640
7703
|
type: "button",
|
|
@@ -7658,7 +7721,7 @@ var Select = ({
|
|
|
7658
7721
|
onPointerEnter: handlePointerEnter,
|
|
7659
7722
|
onPointerLeave: handlePointerLeave,
|
|
7660
7723
|
children: [
|
|
7661
|
-
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0,
|
|
7724
|
+
(selectedItem == null ? void 0 : selectedItem.icon) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "h-4 w-4 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: selectedItem.icon }) : (selectedItem == null ? void 0 : selectedItem.iconUrl) ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7662
7725
|
RemoteImage,
|
|
7663
7726
|
{
|
|
7664
7727
|
src: selectedItem.iconUrl,
|
|
@@ -7666,18 +7729,18 @@ var Select = ({
|
|
|
7666
7729
|
className: "agg-select-icon h-4 w-4 shrink-0 rounded-sm object-contain"
|
|
7667
7730
|
}
|
|
7668
7731
|
) : null,
|
|
7669
|
-
/* @__PURE__ */ (0,
|
|
7732
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { className: "agg-select-value flex-1 truncate", children: (_a = selectedItem == null ? void 0 : selectedItem.label) != null ? _a : "" })
|
|
7670
7733
|
]
|
|
7671
7734
|
}
|
|
7672
7735
|
),
|
|
7673
|
-
/* @__PURE__ */ (0,
|
|
7736
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7674
7737
|
"span",
|
|
7675
7738
|
{
|
|
7676
7739
|
className: cn(
|
|
7677
7740
|
"agg-select-chevron pointer-events-none absolute inset-y-0 inline-flex items-center justify-center",
|
|
7678
7741
|
isInline ? "right-2 text-agg-foreground" : "right-3 text-agg-muted-foreground"
|
|
7679
7742
|
),
|
|
7680
|
-
children: /* @__PURE__ */ (0,
|
|
7743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
7681
7744
|
Icon,
|
|
7682
7745
|
{
|
|
7683
7746
|
name: isOpen ? "chevron-up" : "chevron-down-thin",
|
|
@@ -7695,7 +7758,7 @@ var Select = ({
|
|
|
7695
7758
|
Select.displayName = "Select";
|
|
7696
7759
|
|
|
7697
7760
|
// src/primitives/tooltip/index.tsx
|
|
7698
|
-
var
|
|
7761
|
+
var import_hooks34 = require("@agg-build/hooks");
|
|
7699
7762
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
7700
7763
|
var import_react11 = require("react");
|
|
7701
7764
|
|
|
@@ -7729,7 +7792,7 @@ var resolveTooltipArrowDimensions = (size) => {
|
|
|
7729
7792
|
};
|
|
7730
7793
|
|
|
7731
7794
|
// src/primitives/tooltip/index.tsx
|
|
7732
|
-
var
|
|
7795
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
7733
7796
|
var Tooltip = ({
|
|
7734
7797
|
content,
|
|
7735
7798
|
children,
|
|
@@ -7744,25 +7807,25 @@ var Tooltip = ({
|
|
|
7744
7807
|
const {
|
|
7745
7808
|
general: { rootClassName },
|
|
7746
7809
|
features: { enableAnimations }
|
|
7747
|
-
} = (0,
|
|
7810
|
+
} = (0, import_hooks34.useSdkUiConfig)();
|
|
7748
7811
|
const trigger = (0, import_react11.useMemo)(() => {
|
|
7749
7812
|
if (children) return children;
|
|
7750
|
-
return /* @__PURE__ */ (0,
|
|
7813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
7751
7814
|
"button",
|
|
7752
7815
|
{
|
|
7753
7816
|
type: "button",
|
|
7754
7817
|
className: resolveTooltipTriggerClassName(classNames == null ? void 0 : classNames.trigger),
|
|
7755
7818
|
"aria-label": ariaLabel != null ? ariaLabel : defaultTooltipTriggerAriaLabel,
|
|
7756
|
-
children: /* @__PURE__ */ (0,
|
|
7819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: "info", size: "small", className: cn(classNames == null ? void 0 : classNames.icon), "aria-hidden": true })
|
|
7757
7820
|
}
|
|
7758
7821
|
);
|
|
7759
7822
|
}, [children, classNames == null ? void 0 : classNames.trigger, classNames == null ? void 0 : classNames.icon, ariaLabel]);
|
|
7760
7823
|
const { width: arrowWidth, height: arrowHeight } = resolveTooltipArrowDimensions(size);
|
|
7761
7824
|
const arrowPoints = `0,0 ${arrowWidth},0 ${arrowWidth / 2},${arrowHeight}`;
|
|
7762
7825
|
const arrowBorderPath = `M0 0 L${arrowWidth / 2} ${arrowHeight} L${arrowWidth} 0`;
|
|
7763
|
-
return /* @__PURE__ */ (0,
|
|
7764
|
-
/* @__PURE__ */ (0,
|
|
7765
|
-
/* @__PURE__ */ (0,
|
|
7826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Provider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(TooltipPrimitive.Root, { children: [
|
|
7827
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
7828
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
7766
7829
|
TooltipPrimitive.Content,
|
|
7767
7830
|
{
|
|
7768
7831
|
side,
|
|
@@ -7786,7 +7849,7 @@ var Tooltip = ({
|
|
|
7786
7849
|
classNames == null ? void 0 : classNames.content
|
|
7787
7850
|
),
|
|
7788
7851
|
children: [
|
|
7789
|
-
/* @__PURE__ */ (0,
|
|
7852
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(TooltipPrimitive.Arrow, { asChild: true, width: arrowWidth, height: arrowHeight, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
|
|
7790
7853
|
"svg",
|
|
7791
7854
|
{
|
|
7792
7855
|
width: arrowWidth,
|
|
@@ -7795,8 +7858,8 @@ var Tooltip = ({
|
|
|
7795
7858
|
"aria-hidden": "true",
|
|
7796
7859
|
className: cn("overflow-visible", classNames == null ? void 0 : classNames.arrow),
|
|
7797
7860
|
children: [
|
|
7798
|
-
/* @__PURE__ */ (0,
|
|
7799
|
-
/* @__PURE__ */ (0,
|
|
7861
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("polygon", { points: arrowPoints, className: "fill-agg-secondary" }),
|
|
7862
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
7800
7863
|
"path",
|
|
7801
7864
|
{
|
|
7802
7865
|
d: arrowBorderPath,
|
|
@@ -7818,9 +7881,9 @@ var Tooltip = ({
|
|
|
7818
7881
|
Tooltip.displayName = "Tooltip";
|
|
7819
7882
|
|
|
7820
7883
|
// src/onboarding/steps/profile-setup.tsx
|
|
7821
|
-
var
|
|
7884
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
7822
7885
|
var ProfileSetupStep = ({ onContinue }) => {
|
|
7823
|
-
const labels = (0,
|
|
7886
|
+
const labels = (0, import_hooks35.useLabels)();
|
|
7824
7887
|
const [username, setUsername] = (0, import_react12.useState)("");
|
|
7825
7888
|
const [avatarFile, setAvatarFile] = (0, import_react12.useState)();
|
|
7826
7889
|
const [avatarPreview, setAvatarPreview] = (0, import_react12.useState)();
|
|
@@ -7848,11 +7911,11 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7848
7911
|
avatarPreview
|
|
7849
7912
|
});
|
|
7850
7913
|
}, [username, avatarFile, avatarPreview, onContinue]);
|
|
7851
|
-
return /* @__PURE__ */ (0,
|
|
7852
|
-
/* @__PURE__ */ (0,
|
|
7853
|
-
/* @__PURE__ */ (0,
|
|
7854
|
-
/* @__PURE__ */ (0,
|
|
7855
|
-
/* @__PURE__ */ (0,
|
|
7914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-7", children: [
|
|
7915
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
|
|
7916
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-5 items-center w-full", children: [
|
|
7917
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex justify-center", children: [
|
|
7918
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
|
|
7856
7919
|
"button",
|
|
7857
7920
|
{
|
|
7858
7921
|
type: "button",
|
|
@@ -7868,13 +7931,13 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7868
7931
|
),
|
|
7869
7932
|
"aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
|
|
7870
7933
|
children: [
|
|
7871
|
-
!avatarPreview ? /* @__PURE__ */ (0,
|
|
7934
|
+
!avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7872
7935
|
"svg",
|
|
7873
7936
|
{
|
|
7874
7937
|
"aria-hidden": true,
|
|
7875
7938
|
viewBox: "0 0 80 80",
|
|
7876
7939
|
className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
|
|
7877
|
-
children: /* @__PURE__ */ (0,
|
|
7940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7878
7941
|
"circle",
|
|
7879
7942
|
{
|
|
7880
7943
|
cx: "40",
|
|
@@ -7888,18 +7951,18 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7888
7951
|
)
|
|
7889
7952
|
}
|
|
7890
7953
|
) : null,
|
|
7891
|
-
avatarPreview ? /* @__PURE__ */ (0,
|
|
7954
|
+
avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7892
7955
|
RemoteImage,
|
|
7893
7956
|
{
|
|
7894
7957
|
src: avatarPreview,
|
|
7895
7958
|
alt: labels.onboarding.profileSetup.profilePreviewAlt,
|
|
7896
7959
|
className: "h-full w-full object-cover"
|
|
7897
7960
|
}
|
|
7898
|
-
) : /* @__PURE__ */ (0,
|
|
7961
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
|
|
7899
7962
|
]
|
|
7900
7963
|
}
|
|
7901
7964
|
),
|
|
7902
|
-
/* @__PURE__ */ (0,
|
|
7965
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7903
7966
|
"input",
|
|
7904
7967
|
{
|
|
7905
7968
|
ref: fileInputRef,
|
|
@@ -7911,8 +7974,8 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7911
7974
|
}
|
|
7912
7975
|
)
|
|
7913
7976
|
] }),
|
|
7914
|
-
/* @__PURE__ */ (0,
|
|
7915
|
-
/* @__PURE__ */ (0,
|
|
7977
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
7978
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7916
7979
|
"label",
|
|
7917
7980
|
{
|
|
7918
7981
|
htmlFor: "onboarding-username",
|
|
@@ -7920,7 +7983,7 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7920
7983
|
children: labels.onboarding.profileSetup.usernameLabel
|
|
7921
7984
|
}
|
|
7922
7985
|
),
|
|
7923
|
-
/* @__PURE__ */ (0,
|
|
7986
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
|
|
7924
7987
|
"input",
|
|
7925
7988
|
{
|
|
7926
7989
|
id: "onboarding-username",
|
|
@@ -7944,16 +8007,16 @@ var ProfileSetupStep = ({ onContinue }) => {
|
|
|
7944
8007
|
)
|
|
7945
8008
|
] })
|
|
7946
8009
|
] }),
|
|
7947
|
-
/* @__PURE__ */ (0,
|
|
8010
|
+
/* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
|
|
7948
8011
|
] });
|
|
7949
8012
|
};
|
|
7950
8013
|
ProfileSetupStep.displayName = "ProfileSetupStep";
|
|
7951
8014
|
|
|
7952
8015
|
// src/onboarding/steps/connect-accounts.tsx
|
|
7953
|
-
var
|
|
7954
|
-
var
|
|
8016
|
+
var import_hooks36 = require("@agg-build/hooks");
|
|
8017
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
7955
8018
|
var OnchainVenueLogos = () => {
|
|
7956
|
-
return /* @__PURE__ */ (0,
|
|
8019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
|
|
7957
8020
|
};
|
|
7958
8021
|
var VenueCard = ({
|
|
7959
8022
|
logos,
|
|
@@ -7964,8 +8027,8 @@ var VenueCard = ({
|
|
|
7964
8027
|
onConnect,
|
|
7965
8028
|
connected = false
|
|
7966
8029
|
}) => {
|
|
7967
|
-
const labels = (0,
|
|
7968
|
-
const action = connected ? /* @__PURE__ */ (0,
|
|
8030
|
+
const labels = (0, import_hooks36.useLabels)();
|
|
8031
|
+
const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
7969
8032
|
Button,
|
|
7970
8033
|
{
|
|
7971
8034
|
variant: "tertiary",
|
|
@@ -7975,18 +8038,18 @@ var VenueCard = ({
|
|
|
7975
8038
|
children: labels.onboarding.connectAccounts.connect
|
|
7976
8039
|
}
|
|
7977
8040
|
);
|
|
7978
|
-
const mobileAction = connected ? /* @__PURE__ */ (0,
|
|
8041
|
+
const mobileAction = connected ? /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
7979
8042
|
Button,
|
|
7980
8043
|
{
|
|
7981
8044
|
variant: "tertiary",
|
|
7982
8045
|
size: "medium",
|
|
7983
8046
|
className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
|
|
7984
8047
|
onClick: onConnect,
|
|
7985
|
-
suffix: /* @__PURE__ */ (0,
|
|
8048
|
+
suffix: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
|
|
7986
8049
|
children: labels.onboarding.connectAccounts.connectAccount
|
|
7987
8050
|
}
|
|
7988
8051
|
);
|
|
7989
|
-
return /* @__PURE__ */ (0,
|
|
8052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
|
|
7990
8053
|
"div",
|
|
7991
8054
|
{
|
|
7992
8055
|
className: cn(
|
|
@@ -7994,23 +8057,23 @@ var VenueCard = ({
|
|
|
7994
8057
|
connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
|
|
7995
8058
|
),
|
|
7996
8059
|
children: [
|
|
7997
|
-
/* @__PURE__ */ (0,
|
|
7998
|
-
/* @__PURE__ */ (0,
|
|
7999
|
-
/* @__PURE__ */ (0,
|
|
8000
|
-
/* @__PURE__ */ (0,
|
|
8001
|
-
/* @__PURE__ */ (0,
|
|
8002
|
-
/* @__PURE__ */ (0,
|
|
8060
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "hidden sm:flex items-center justify-between", children: [
|
|
8061
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex items-center gap-5", children: [
|
|
8062
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: logos }),
|
|
8063
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-[2px]", children: [
|
|
8064
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title2 }),
|
|
8065
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-sm text-agg-foreground", children: description })
|
|
8003
8066
|
] })
|
|
8004
8067
|
] }),
|
|
8005
|
-
/* @__PURE__ */ (0,
|
|
8068
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: action })
|
|
8006
8069
|
] }),
|
|
8007
|
-
/* @__PURE__ */ (0,
|
|
8008
|
-
/* @__PURE__ */ (0,
|
|
8009
|
-
/* @__PURE__ */ (0,
|
|
8010
|
-
/* @__PURE__ */ (0,
|
|
8070
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-3 sm:hidden", children: [
|
|
8071
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
8072
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "shrink-0", children: logos }),
|
|
8073
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title2 })
|
|
8011
8074
|
] }),
|
|
8012
|
-
/* @__PURE__ */ (0,
|
|
8013
|
-
/* @__PURE__ */ (0,
|
|
8075
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
|
|
8076
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
|
|
8014
8077
|
mobileAction
|
|
8015
8078
|
] })
|
|
8016
8079
|
] })
|
|
@@ -8023,14 +8086,14 @@ var ConnectAccountsStep = ({
|
|
|
8023
8086
|
onContinue,
|
|
8024
8087
|
connectedOnchain = false
|
|
8025
8088
|
}) => {
|
|
8026
|
-
const labels = (0,
|
|
8089
|
+
const labels = (0, import_hooks36.useLabels)();
|
|
8027
8090
|
const canContinue = connectedOnchain;
|
|
8028
|
-
return /* @__PURE__ */ (0,
|
|
8029
|
-
/* @__PURE__ */ (0,
|
|
8030
|
-
/* @__PURE__ */ (0,
|
|
8091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
8092
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
|
|
8093
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8031
8094
|
VenueCard,
|
|
8032
8095
|
{
|
|
8033
|
-
logos: /* @__PURE__ */ (0,
|
|
8096
|
+
logos: /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OnchainVenueLogos, {}),
|
|
8034
8097
|
title: labels.onboarding.connectAccounts.onchainTitle,
|
|
8035
8098
|
mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
|
|
8036
8099
|
ONCHAIN_VENUES.length - 1
|
|
@@ -8041,7 +8104,7 @@ var ConnectAccountsStep = ({
|
|
|
8041
8104
|
connected: connectedOnchain
|
|
8042
8105
|
}
|
|
8043
8106
|
) }),
|
|
8044
|
-
/* @__PURE__ */ (0,
|
|
8107
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
8045
8108
|
Button,
|
|
8046
8109
|
{
|
|
8047
8110
|
variant: "primary",
|
|
@@ -8058,15 +8121,15 @@ ConnectAccountsStep.displayName = "ConnectAccountsStep";
|
|
|
8058
8121
|
|
|
8059
8122
|
// src/onboarding/steps/connect-onchain-modal.tsx
|
|
8060
8123
|
var import_react13 = require("react");
|
|
8061
|
-
var
|
|
8124
|
+
var import_hooks37 = require("@agg-build/hooks");
|
|
8062
8125
|
var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
|
|
8063
|
-
var
|
|
8126
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
8064
8127
|
var ConnectOnchainModal = ({
|
|
8065
8128
|
open,
|
|
8066
8129
|
onOpenChange,
|
|
8067
8130
|
onConnect
|
|
8068
8131
|
}) => {
|
|
8069
|
-
const labels = (0,
|
|
8132
|
+
const labels = (0, import_hooks37.useLabels)();
|
|
8070
8133
|
const [connecting, setConnecting] = (0, import_react13.useState)(false);
|
|
8071
8134
|
const [error, setError] = (0, import_react13.useState)();
|
|
8072
8135
|
const handleCancel = (0, import_react13.useCallback)(() => {
|
|
@@ -8097,15 +8160,15 @@ var ConnectOnchainModal = ({
|
|
|
8097
8160
|
},
|
|
8098
8161
|
[onOpenChange]
|
|
8099
8162
|
);
|
|
8100
|
-
return /* @__PURE__ */ (0,
|
|
8163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
|
|
8101
8164
|
Modal.Container,
|
|
8102
8165
|
{
|
|
8103
8166
|
maxWidth: "600px",
|
|
8104
8167
|
"aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
|
|
8105
8168
|
classNames: { container: "!rounded-agg-lg" },
|
|
8106
8169
|
children: [
|
|
8107
|
-
/* @__PURE__ */ (0,
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
8170
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Dialog3.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
|
|
8171
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
8109
8172
|
Modal.Header,
|
|
8110
8173
|
{
|
|
8111
8174
|
hideClose: false,
|
|
@@ -8116,26 +8179,26 @@ var ConnectOnchainModal = ({
|
|
|
8116
8179
|
}
|
|
8117
8180
|
}
|
|
8118
8181
|
),
|
|
8119
|
-
/* @__PURE__ */ (0,
|
|
8120
|
-
/* @__PURE__ */ (0,
|
|
8121
|
-
/* @__PURE__ */ (0,
|
|
8122
|
-
/* @__PURE__ */ (0,
|
|
8182
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
|
|
8183
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
|
|
8123
8186
|
] }),
|
|
8124
|
-
/* @__PURE__ */ (0,
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8127
|
-
index > 0 && /* @__PURE__ */ (0,
|
|
8128
|
-
/* @__PURE__ */ (0,
|
|
8129
|
-
/* @__PURE__ */ (0,
|
|
8187
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
|
|
8189
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
|
|
8190
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(VenueLogo, { venue, size: "medium" }),
|
|
8192
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
|
|
8130
8193
|
] }, venue)) })
|
|
8131
8194
|
] }),
|
|
8132
|
-
/* @__PURE__ */ (0,
|
|
8133
|
-
/* @__PURE__ */ (0,
|
|
8134
|
-
error ? /* @__PURE__ */ (0,
|
|
8135
|
-
/* @__PURE__ */ (0,
|
|
8136
|
-
/* @__PURE__ */ (0,
|
|
8195
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-6 items-center", children: [
|
|
8196
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex flex-col gap-3 items-center", children: [
|
|
8197
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8198
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
|
|
8199
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
8137
8200
|
] }) : null,
|
|
8138
|
-
/* @__PURE__ */ (0,
|
|
8201
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
8139
8202
|
Button,
|
|
8140
8203
|
{
|
|
8141
8204
|
variant: "primary",
|
|
@@ -8146,7 +8209,7 @@ var ConnectOnchainModal = ({
|
|
|
8146
8209
|
}
|
|
8147
8210
|
)
|
|
8148
8211
|
] }),
|
|
8149
|
-
/* @__PURE__ */ (0,
|
|
8212
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
8150
8213
|
Button,
|
|
8151
8214
|
{
|
|
8152
8215
|
variant: "tertiary",
|
|
@@ -8165,12 +8228,12 @@ var ConnectOnchainModal = ({
|
|
|
8165
8228
|
ConnectOnchainModal.displayName = "ConnectOnchainModal";
|
|
8166
8229
|
|
|
8167
8230
|
// src/onboarding/steps/connect-kalshi-modal.tsx
|
|
8168
|
-
var
|
|
8231
|
+
var import_hooks38 = require("@agg-build/hooks");
|
|
8169
8232
|
var import_sdk17 = require("@agg-build/sdk");
|
|
8170
8233
|
var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
|
|
8171
8234
|
var import_react14 = require("react");
|
|
8172
8235
|
var import_zod = require("zod");
|
|
8173
|
-
var
|
|
8236
|
+
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
8174
8237
|
var kalshiCredentialsSchema = import_zod.z.object({
|
|
8175
8238
|
apiKeyId: import_zod.z.string().trim().min(1),
|
|
8176
8239
|
privateKey: import_zod.z.string().trim().min(1)
|
|
@@ -8192,8 +8255,8 @@ var ConnectKalshiModal = ({
|
|
|
8192
8255
|
onOpenChange,
|
|
8193
8256
|
onVerify
|
|
8194
8257
|
}) => {
|
|
8195
|
-
const labels = (0,
|
|
8196
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
8258
|
+
const labels = (0, import_hooks38.useLabels)();
|
|
8259
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks38.useAppConfig)();
|
|
8197
8260
|
const apiKeyInputRef = (0, import_react14.useRef)(null);
|
|
8198
8261
|
const errorId = (0, import_react14.useId)();
|
|
8199
8262
|
const [apiKeyId, setApiKeyId] = (0, import_react14.useState)("");
|
|
@@ -8201,7 +8264,7 @@ var ConnectKalshiModal = ({
|
|
|
8201
8264
|
const [isVerifying, setIsVerifying] = (0, import_react14.useState)(false);
|
|
8202
8265
|
const [isConnected, setIsConnected] = (0, import_react14.useState)(false);
|
|
8203
8266
|
const [error, setError] = (0, import_react14.useState)();
|
|
8204
|
-
const availabilityState = (0,
|
|
8267
|
+
const availabilityState = (0, import_hooks38.getVenueAvailabilityState)({
|
|
8205
8268
|
venueId: import_sdk17.Venue.kalshi,
|
|
8206
8269
|
disabledVenues,
|
|
8207
8270
|
isConfigLoading: isAppConfigLoading
|
|
@@ -8265,30 +8328,30 @@ var ConnectKalshiModal = ({
|
|
|
8265
8328
|
[handleVerify]
|
|
8266
8329
|
);
|
|
8267
8330
|
if (availabilityState === "hidden") return null;
|
|
8268
|
-
return /* @__PURE__ */ (0,
|
|
8331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
8269
8332
|
Modal.Container,
|
|
8270
8333
|
{
|
|
8271
8334
|
maxWidth: "600px",
|
|
8272
8335
|
"aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
|
|
8273
8336
|
classNames: { container: "!rounded-agg-2xl" },
|
|
8274
8337
|
children: [
|
|
8275
|
-
/* @__PURE__ */ (0,
|
|
8338
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8276
8339
|
Dialog4.Close,
|
|
8277
8340
|
{
|
|
8278
8341
|
"aria-label": labels.common.close,
|
|
8279
8342
|
className: "flex size-10 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent disabled:cursor-default disabled:opacity-50",
|
|
8280
8343
|
disabled: isVerifying,
|
|
8281
|
-
children: /* @__PURE__ */ (0,
|
|
8344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "close", size: "medium" })
|
|
8282
8345
|
}
|
|
8283
8346
|
) }),
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
8347
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
8285
8348
|
"div",
|
|
8286
8349
|
{
|
|
8287
8350
|
className: "flex flex-col items-center gap-8 pb-3 text-center",
|
|
8288
8351
|
role: "status",
|
|
8289
8352
|
"aria-live": "polite",
|
|
8290
8353
|
children: [
|
|
8291
|
-
/* @__PURE__ */ (0,
|
|
8354
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8292
8355
|
Icon,
|
|
8293
8356
|
{
|
|
8294
8357
|
name: "success-check",
|
|
@@ -8296,11 +8359,11 @@ var ConnectKalshiModal = ({
|
|
|
8296
8359
|
"aria-hidden": "true"
|
|
8297
8360
|
}
|
|
8298
8361
|
) }),
|
|
8299
|
-
/* @__PURE__ */ (0,
|
|
8300
|
-
/* @__PURE__ */ (0,
|
|
8301
|
-
/* @__PURE__ */ (0,
|
|
8362
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
8363
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
|
|
8364
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
|
|
8302
8365
|
] }),
|
|
8303
|
-
/* @__PURE__ */ (0,
|
|
8366
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8304
8367
|
Button,
|
|
8305
8368
|
{
|
|
8306
8369
|
variant: "primary",
|
|
@@ -8312,27 +8375,27 @@ var ConnectKalshiModal = ({
|
|
|
8312
8375
|
)
|
|
8313
8376
|
]
|
|
8314
8377
|
}
|
|
8315
|
-
) : /* @__PURE__ */ (0,
|
|
8316
|
-
/* @__PURE__ */ (0,
|
|
8317
|
-
/* @__PURE__ */ (0,
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
8378
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
|
|
8379
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(VenueLogo, { venue: import_sdk17.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
|
|
8380
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
8381
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
|
|
8382
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Dialog4.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
|
|
8320
8383
|
] }),
|
|
8321
|
-
/* @__PURE__ */ (0,
|
|
8322
|
-
/* @__PURE__ */ (0,
|
|
8323
|
-
/* @__PURE__ */ (0,
|
|
8324
|
-
/* @__PURE__ */ (0,
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
8384
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
|
|
8385
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
|
|
8386
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
8387
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
|
|
8388
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
|
|
8326
8389
|
] }),
|
|
8327
|
-
/* @__PURE__ */ (0,
|
|
8328
|
-
/* @__PURE__ */ (0,
|
|
8329
|
-
/* @__PURE__ */ (0,
|
|
8390
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
8391
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
|
|
8392
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
|
|
8330
8393
|
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
|
|
8331
8394
|
" ",
|
|
8332
|
-
/* @__PURE__ */ (0,
|
|
8395
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
|
|
8333
8396
|
labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
|
|
8334
8397
|
" ",
|
|
8335
|
-
/* @__PURE__ */ (0,
|
|
8398
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8336
8399
|
"a",
|
|
8337
8400
|
{
|
|
8338
8401
|
href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
|
|
@@ -8343,34 +8406,34 @@ var ConnectKalshiModal = ({
|
|
|
8343
8406
|
}
|
|
8344
8407
|
)
|
|
8345
8408
|
] }),
|
|
8346
|
-
/* @__PURE__ */ (0,
|
|
8409
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
|
|
8347
8410
|
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
|
|
8348
8411
|
" ",
|
|
8349
|
-
/* @__PURE__ */ (0,
|
|
8412
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
|
|
8350
8413
|
labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
|
|
8351
8414
|
] }),
|
|
8352
|
-
/* @__PURE__ */ (0,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { children: [
|
|
8353
8416
|
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
|
|
8354
8417
|
" ",
|
|
8355
|
-
/* @__PURE__ */ (0,
|
|
8418
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
|
|
8356
8419
|
labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
|
|
8357
8420
|
] }),
|
|
8358
|
-
/* @__PURE__ */ (0,
|
|
8421
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
|
|
8359
8422
|
] }),
|
|
8360
|
-
/* @__PURE__ */ (0,
|
|
8423
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
8361
8424
|
labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
|
|
8362
|
-
/* @__PURE__ */ (0,
|
|
8425
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("br", {}),
|
|
8363
8426
|
labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
|
|
8364
8427
|
] })
|
|
8365
8428
|
] }),
|
|
8366
|
-
/* @__PURE__ */ (0,
|
|
8367
|
-
/* @__PURE__ */ (0,
|
|
8368
|
-
/* @__PURE__ */ (0,
|
|
8369
|
-
/* @__PURE__ */ (0,
|
|
8429
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
|
|
8430
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
8431
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
|
|
8432
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
|
|
8370
8433
|
] }),
|
|
8371
|
-
/* @__PURE__ */ (0,
|
|
8372
|
-
/* @__PURE__ */ (0,
|
|
8373
|
-
/* @__PURE__ */ (0,
|
|
8434
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
|
|
8435
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
8436
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8374
8437
|
"label",
|
|
8375
8438
|
{
|
|
8376
8439
|
htmlFor: "kalshi-api-key-id",
|
|
@@ -8378,7 +8441,7 @@ var ConnectKalshiModal = ({
|
|
|
8378
8441
|
children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
|
|
8379
8442
|
}
|
|
8380
8443
|
),
|
|
8381
|
-
/* @__PURE__ */ (0,
|
|
8444
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8382
8445
|
"input",
|
|
8383
8446
|
{
|
|
8384
8447
|
ref: apiKeyInputRef,
|
|
@@ -8400,8 +8463,8 @@ var ConnectKalshiModal = ({
|
|
|
8400
8463
|
}
|
|
8401
8464
|
)
|
|
8402
8465
|
] }),
|
|
8403
|
-
/* @__PURE__ */ (0,
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
8467
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8405
8468
|
"label",
|
|
8406
8469
|
{
|
|
8407
8470
|
htmlFor: "kalshi-private-key",
|
|
@@ -8409,7 +8472,7 @@ var ConnectKalshiModal = ({
|
|
|
8409
8472
|
children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
|
|
8410
8473
|
}
|
|
8411
8474
|
),
|
|
8412
|
-
/* @__PURE__ */ (0,
|
|
8475
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8413
8476
|
"textarea",
|
|
8414
8477
|
{
|
|
8415
8478
|
id: "kalshi-private-key",
|
|
@@ -8432,22 +8495,22 @@ var ConnectKalshiModal = ({
|
|
|
8432
8495
|
] })
|
|
8433
8496
|
] })
|
|
8434
8497
|
] }),
|
|
8435
|
-
/* @__PURE__ */ (0,
|
|
8436
|
-
/* @__PURE__ */ (0,
|
|
8437
|
-
/* @__PURE__ */ (0,
|
|
8438
|
-
/* @__PURE__ */ (0,
|
|
8439
|
-
/* @__PURE__ */ (0,
|
|
8498
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
|
|
8499
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
|
|
8500
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8501
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
|
|
8502
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
|
|
8440
8503
|
labels.onboarding.connectKalshiModal.help.docsLinkLabel
|
|
8441
8504
|
] }),
|
|
8442
|
-
/* @__PURE__ */ (0,
|
|
8443
|
-
/* @__PURE__ */ (0,
|
|
8444
|
-
/* @__PURE__ */ (0,
|
|
8505
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
|
|
8506
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
|
|
8507
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
|
|
8445
8508
|
labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
|
|
8446
8509
|
] })
|
|
8447
8510
|
] })
|
|
8448
8511
|
] }),
|
|
8449
|
-
/* @__PURE__ */ (0,
|
|
8450
|
-
error ? /* @__PURE__ */ (0,
|
|
8512
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
|
|
8513
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
|
|
8451
8514
|
"div",
|
|
8452
8515
|
{
|
|
8453
8516
|
id: errorId,
|
|
@@ -8455,13 +8518,13 @@ var ConnectKalshiModal = ({
|
|
|
8455
8518
|
role: "alert",
|
|
8456
8519
|
"aria-live": "assertive",
|
|
8457
8520
|
children: [
|
|
8458
|
-
/* @__PURE__ */ (0,
|
|
8459
|
-
/* @__PURE__ */ (0,
|
|
8521
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
|
|
8522
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
|
|
8460
8523
|
]
|
|
8461
8524
|
}
|
|
8462
8525
|
) : null,
|
|
8463
|
-
/* @__PURE__ */ (0,
|
|
8464
|
-
/* @__PURE__ */ (0,
|
|
8526
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
|
|
8527
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8465
8528
|
Button,
|
|
8466
8529
|
{
|
|
8467
8530
|
variant: "secondary",
|
|
@@ -8471,7 +8534,7 @@ var ConnectKalshiModal = ({
|
|
|
8471
8534
|
children: labels.onboarding.connectKalshiModal.actions.cancel
|
|
8472
8535
|
}
|
|
8473
8536
|
),
|
|
8474
|
-
/* @__PURE__ */ (0,
|
|
8537
|
+
/* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
|
|
8475
8538
|
Button,
|
|
8476
8539
|
{
|
|
8477
8540
|
type: "submit",
|
|
@@ -8492,7 +8555,7 @@ var ConnectKalshiModal = ({
|
|
|
8492
8555
|
ConnectKalshiModal.displayName = "ConnectKalshiModal";
|
|
8493
8556
|
|
|
8494
8557
|
// src/onboarding/index.tsx
|
|
8495
|
-
var
|
|
8558
|
+
var import_jsx_runtime140 = require("react/jsx-runtime");
|
|
8496
8559
|
var OnboardingModal = ({
|
|
8497
8560
|
open,
|
|
8498
8561
|
onOpenChange,
|
|
@@ -8503,7 +8566,7 @@ var OnboardingModal = ({
|
|
|
8503
8566
|
connectedOnchain = false
|
|
8504
8567
|
}) => {
|
|
8505
8568
|
var _a;
|
|
8506
|
-
const labels = (0,
|
|
8569
|
+
const labels = (0, import_hooks39.useLabels)();
|
|
8507
8570
|
const [step, setStep] = (0, import_react15.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
|
|
8508
8571
|
const stepLabels = {
|
|
8509
8572
|
[ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
|
|
@@ -8539,19 +8602,19 @@ var OnboardingModal = ({
|
|
|
8539
8602
|
yield onConnectOnchain == null ? void 0 : onConnectOnchain();
|
|
8540
8603
|
setOnchainConnected(true);
|
|
8541
8604
|
}), [onConnectOnchain]);
|
|
8542
|
-
return /* @__PURE__ */ (0,
|
|
8543
|
-
/* @__PURE__ */ (0,
|
|
8605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
8606
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
|
|
8544
8607
|
Modal.Container,
|
|
8545
8608
|
{
|
|
8546
8609
|
maxWidth: "600px",
|
|
8547
8610
|
"aria-label": resolvedTitle,
|
|
8548
8611
|
classNames: { container: "!rounded-agg-lg" },
|
|
8549
8612
|
children: [
|
|
8550
|
-
/* @__PURE__ */ (0,
|
|
8551
|
-
/* @__PURE__ */ (0,
|
|
8552
|
-
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0,
|
|
8553
|
-
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0,
|
|
8554
|
-
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0,
|
|
8613
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(Dialog5.Title, { className: "sr-only", children: resolvedTitle }),
|
|
8614
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
|
|
8615
|
+
step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
|
|
8616
|
+
step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(ProfileSetupStep, { onContinue: handleProfileContinue }),
|
|
8617
|
+
step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
8555
8618
|
ConnectAccountsStep,
|
|
8556
8619
|
{
|
|
8557
8620
|
onConnectOnchain: handleOpenOnchainModal,
|
|
@@ -8563,7 +8626,7 @@ var OnboardingModal = ({
|
|
|
8563
8626
|
]
|
|
8564
8627
|
}
|
|
8565
8628
|
) }),
|
|
8566
|
-
/* @__PURE__ */ (0,
|
|
8629
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
8567
8630
|
ConnectOnchainModal,
|
|
8568
8631
|
{
|
|
8569
8632
|
open: onchainModalOpen,
|
|
@@ -8583,41 +8646,41 @@ var requestAggDepositModalOpen = () => {
|
|
|
8583
8646
|
};
|
|
8584
8647
|
|
|
8585
8648
|
// src/trading/fund-kalshi-modal.tsx
|
|
8586
|
-
var
|
|
8649
|
+
var import_hooks40 = require("@agg-build/hooks");
|
|
8587
8650
|
var import_sdk18 = require("@agg-build/sdk");
|
|
8588
8651
|
var Dialog6 = __toESM(require("@radix-ui/react-dialog"));
|
|
8589
|
-
var
|
|
8652
|
+
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
8590
8653
|
var FundKalshiModal = ({ open, onOpenChange }) => {
|
|
8591
|
-
const labels = (0,
|
|
8654
|
+
const labels = (0, import_hooks40.useLabels)();
|
|
8592
8655
|
const modalLabels = labels.trading.fundKalshiModal;
|
|
8593
|
-
return /* @__PURE__ */ (0,
|
|
8656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
8594
8657
|
Modal.Container,
|
|
8595
8658
|
{
|
|
8596
8659
|
maxWidth: "600px",
|
|
8597
8660
|
"aria-label": modalLabels.ariaLabel,
|
|
8598
8661
|
classNames: { container: "relative !rounded-agg-2xl" },
|
|
8599
8662
|
children: [
|
|
8600
|
-
/* @__PURE__ */ (0,
|
|
8663
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
8601
8664
|
Dialog6.Close,
|
|
8602
8665
|
{
|
|
8603
8666
|
"aria-label": labels.common.close,
|
|
8604
8667
|
className: "absolute right-6 top-6 z-10 flex size-11 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent sm:right-7 sm:top-7",
|
|
8605
|
-
children: /* @__PURE__ */ (0,
|
|
8668
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: "close", size: "medium" })
|
|
8606
8669
|
}
|
|
8607
8670
|
),
|
|
8608
|
-
/* @__PURE__ */ (0,
|
|
8609
|
-
/* @__PURE__ */ (0,
|
|
8610
|
-
/* @__PURE__ */ (0,
|
|
8611
|
-
/* @__PURE__ */ (0,
|
|
8612
|
-
/* @__PURE__ */ (0,
|
|
8671
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Modal.Body, { classNames: { root: "!px-5 !py-12 sm:!px-10" }, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-col items-center gap-8 text-center", children: [
|
|
8672
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(VenueLogo, { venue: import_sdk18.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
|
|
8673
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
|
|
8674
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Dialog6.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: modalLabels.title }),
|
|
8675
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Dialog6.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: modalLabels.description })
|
|
8613
8676
|
] }),
|
|
8614
|
-
/* @__PURE__ */ (0,
|
|
8615
|
-
/* @__PURE__ */ (0,
|
|
8616
|
-
/* @__PURE__ */ (0,
|
|
8617
|
-
/* @__PURE__ */ (0,
|
|
8677
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex w-full flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4 text-left", children: [
|
|
8678
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: modalLabels.howItWorks }),
|
|
8679
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("ol", { className: "list-decimal space-y-0 pl-5 text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
8680
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("li", { children: [
|
|
8618
8681
|
modalLabels.firstStepPrefix,
|
|
8619
8682
|
" ",
|
|
8620
|
-
/* @__PURE__ */ (0,
|
|
8683
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
8621
8684
|
"a",
|
|
8622
8685
|
{
|
|
8623
8686
|
href: modalLabels.kalshiUrl,
|
|
@@ -8630,12 +8693,12 @@ var FundKalshiModal = ({ open, onOpenChange }) => {
|
|
|
8630
8693
|
" ",
|
|
8631
8694
|
modalLabels.firstStepSuffix
|
|
8632
8695
|
] }),
|
|
8633
|
-
modalLabels.remainingSteps.map((step) => /* @__PURE__ */ (0,
|
|
8696
|
+
modalLabels.remainingSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("li", { children: step }, step))
|
|
8634
8697
|
] })
|
|
8635
8698
|
] }),
|
|
8636
|
-
/* @__PURE__ */ (0,
|
|
8637
|
-
/* @__PURE__ */ (0,
|
|
8638
|
-
/* @__PURE__ */ (0,
|
|
8699
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "flex flex-wrap items-center justify-center gap-3", children: [
|
|
8700
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Button, { variant: "secondary", size: "large", onClick: () => onOpenChange(false), children: modalLabels.doItLater }),
|
|
8701
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
8639
8702
|
Button,
|
|
8640
8703
|
{
|
|
8641
8704
|
variant: "primary",
|
|
@@ -9278,9 +9341,10 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9278
9341
|
amount,
|
|
9279
9342
|
labels,
|
|
9280
9343
|
quoteData,
|
|
9281
|
-
selectedMarket
|
|
9344
|
+
selectedMarket,
|
|
9345
|
+
tradeSide = "buy"
|
|
9282
9346
|
}) => {
|
|
9283
|
-
var _a, _b, _c;
|
|
9347
|
+
var _a, _b, _c, _d, _e;
|
|
9284
9348
|
if (!selectedMarket) {
|
|
9285
9349
|
return {
|
|
9286
9350
|
tone: "warning",
|
|
@@ -9300,9 +9364,10 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9300
9364
|
};
|
|
9301
9365
|
}
|
|
9302
9366
|
if (quoteData.status === "no_orderbooks") {
|
|
9367
|
+
const serverError = (_a = quoteData.error) == null ? void 0 : _a.trim();
|
|
9303
9368
|
return {
|
|
9304
9369
|
tone: "error",
|
|
9305
|
-
message: labels.noOrderbooks,
|
|
9370
|
+
message: serverError || labels.noOrderbooks,
|
|
9306
9371
|
placement: "above-action"
|
|
9307
9372
|
};
|
|
9308
9373
|
}
|
|
@@ -9316,26 +9381,27 @@ var resolvePlaceOrderQuoteStatus = ({
|
|
|
9316
9381
|
if (quoteData.status === "insufficient_input_amount") {
|
|
9317
9382
|
return {
|
|
9318
9383
|
tone: "error",
|
|
9319
|
-
message: (
|
|
9384
|
+
message: (_b = quoteData.message) != null ? _b : labels.insufficientInputAmount,
|
|
9320
9385
|
placement: "above-action"
|
|
9321
9386
|
};
|
|
9322
9387
|
}
|
|
9323
9388
|
if (quoteData.status === "invalid_input") {
|
|
9324
9389
|
return {
|
|
9325
9390
|
tone: "error",
|
|
9326
|
-
message: (
|
|
9391
|
+
message: (_c = quoteData.message) != null ? _c : labels.quoteUnavailable,
|
|
9327
9392
|
placement: "above-action"
|
|
9328
9393
|
};
|
|
9329
9394
|
}
|
|
9330
9395
|
if (quoteData.status === "insufficient_position") {
|
|
9331
|
-
const total = (
|
|
9396
|
+
const total = (_d = quoteData.positionAvailability) == null ? void 0 : _d.totalSellableShares;
|
|
9332
9397
|
const message = total != null ? labels.insufficientPosition(total) : labels.insufficientPositionGeneric;
|
|
9333
9398
|
return { tone: "error", message, placement: "above-action" };
|
|
9334
9399
|
}
|
|
9335
9400
|
if (quoteData.status === "insufficient_depth") {
|
|
9401
|
+
const serverError = (_e = quoteData.error) == null ? void 0 : _e.trim();
|
|
9336
9402
|
return {
|
|
9337
9403
|
tone: "error",
|
|
9338
|
-
message: labels.insufficientSellDepth,
|
|
9404
|
+
message: tradeSide === "sell" ? serverError || labels.insufficientSellDepth : serverError || labels.insufficientLiquidity,
|
|
9339
9405
|
placement: "above-action"
|
|
9340
9406
|
};
|
|
9341
9407
|
}
|
|
@@ -9415,6 +9481,7 @@ var buildLiveRouteCards = ({
|
|
|
9415
9481
|
executionPrice: averageExecutionPrice,
|
|
9416
9482
|
requiresSharedKyc: primaryRequiresSharedKyc
|
|
9417
9483
|
} : null;
|
|
9484
|
+
const soloCardId = (prefix, sq) => `${prefix}-${sq.venue}${sq.venueMarketOutcomeId ? `-${sq.venueMarketOutcomeId}` : ""}`;
|
|
9418
9485
|
const soloCards = ((_c = quoteData.venueSoloQuotes) != null ? _c : []).filter(
|
|
9419
9486
|
(sq) => sq.status === "ok" && sq.unavailableReason !== "venue_unavailable" && sq.avgPrice !== null && sq.filledQty > 0 && // No `sq.quoteId` requirement: a solo is preview-only whenever its own
|
|
9420
9487
|
// funding lane is short (API nulls the quoteId), which is NOT always the
|
|
@@ -9430,7 +9497,8 @@ var buildLiveRouteCards = ({
|
|
|
9430
9497
|
const venue = parsedVenue.success ? parsedVenue.data : void 0;
|
|
9431
9498
|
if (geoBlockedVenues.has(sq.venue)) {
|
|
9432
9499
|
return {
|
|
9433
|
-
id:
|
|
9500
|
+
id: soloCardId("live-unavailable", sq),
|
|
9501
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9434
9502
|
hint: labels.venueUnavailableInRegion,
|
|
9435
9503
|
kind: "venue",
|
|
9436
9504
|
label: getTradingVenueLabel(venue),
|
|
@@ -9467,7 +9535,8 @@ var buildLiveRouteCards = ({
|
|
|
9467
9535
|
feeBreakdown: (_b2 = sq.feeBreakdown) != null ? _b2 : quoteData.feeBreakdown
|
|
9468
9536
|
}), sq.quoteId ? { status: "ok", error: void 0 } : null);
|
|
9469
9537
|
return {
|
|
9470
|
-
id:
|
|
9538
|
+
id: soloCardId("live-solo", sq),
|
|
9539
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9471
9540
|
hint: labels.averagePrice(avgPrice),
|
|
9472
9541
|
kind: "venue",
|
|
9473
9542
|
label: getTradingVenueLabel(venue),
|
|
@@ -9489,7 +9558,8 @@ var buildLiveRouteCards = ({
|
|
|
9489
9558
|
const temporarilyUnavailable = sq.unavailableReason === "venue_unavailable";
|
|
9490
9559
|
const hasPreview = temporarilyUnavailable && sq.filledQty > 0;
|
|
9491
9560
|
return __spreadProps(__spreadValues({
|
|
9492
|
-
id:
|
|
9561
|
+
id: soloCardId("live-unavailable", sq),
|
|
9562
|
+
venueMarketOutcomeId: sq.venueMarketOutcomeId,
|
|
9493
9563
|
hint: temporarilyUnavailable ? labels.venueTemporarilyUnavailable : labels.venueUnavailableInRegion,
|
|
9494
9564
|
kind: "venue",
|
|
9495
9565
|
label: getTradingVenueLabel(venue),
|
|
@@ -10988,16 +11058,16 @@ var calculateExecutionProgress = ({
|
|
|
10988
11058
|
};
|
|
10989
11059
|
|
|
10990
11060
|
// src/trading/place-order/index.place-order.execution-view.tsx
|
|
10991
|
-
var
|
|
11061
|
+
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
10992
11062
|
var PlaceOrderExecutionHeader = ({
|
|
10993
11063
|
className,
|
|
10994
11064
|
eventDateLabel,
|
|
10995
11065
|
eventImage,
|
|
10996
11066
|
eventTitle
|
|
10997
11067
|
}) => {
|
|
10998
|
-
return /* @__PURE__ */ (0,
|
|
10999
|
-
/* @__PURE__ */ (0,
|
|
11000
|
-
/* @__PURE__ */ (0,
|
|
11068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("agg-order-execution-header flex flex-col gap-2", className), children: [
|
|
11069
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11070
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11001
11071
|
RemoteImage,
|
|
11002
11072
|
{
|
|
11003
11073
|
src: eventImage != null ? eventImage : null,
|
|
@@ -11005,9 +11075,9 @@ var PlaceOrderExecutionHeader = ({
|
|
|
11005
11075
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11006
11076
|
}
|
|
11007
11077
|
),
|
|
11008
|
-
/* @__PURE__ */ (0,
|
|
11078
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: eventTitle })
|
|
11009
11079
|
] }),
|
|
11010
|
-
eventDateLabel ? /* @__PURE__ */ (0,
|
|
11080
|
+
eventDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: eventDateLabel }) : null
|
|
11011
11081
|
] });
|
|
11012
11082
|
};
|
|
11013
11083
|
var ExecutionStepIndicator = ({
|
|
@@ -11015,7 +11085,7 @@ var ExecutionStepIndicator = ({
|
|
|
11015
11085
|
step
|
|
11016
11086
|
}) => {
|
|
11017
11087
|
if (step.status === "done") {
|
|
11018
|
-
return /* @__PURE__ */ (0,
|
|
11088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11019
11089
|
Icon,
|
|
11020
11090
|
{
|
|
11021
11091
|
name: "check-circle",
|
|
@@ -11026,7 +11096,7 @@ var ExecutionStepIndicator = ({
|
|
|
11026
11096
|
);
|
|
11027
11097
|
}
|
|
11028
11098
|
if (step.status === "loading") {
|
|
11029
|
-
return /* @__PURE__ */ (0,
|
|
11099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "inline-flex h-3 w-3 shrink-0 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11030
11100
|
"span",
|
|
11031
11101
|
{
|
|
11032
11102
|
className: cn(
|
|
@@ -11037,7 +11107,7 @@ var ExecutionStepIndicator = ({
|
|
|
11037
11107
|
) });
|
|
11038
11108
|
}
|
|
11039
11109
|
if (step.status === "failed") {
|
|
11040
|
-
return /* @__PURE__ */ (0,
|
|
11110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11041
11111
|
Icon,
|
|
11042
11112
|
{
|
|
11043
11113
|
name: "error-filled",
|
|
@@ -11048,7 +11118,7 @@ var ExecutionStepIndicator = ({
|
|
|
11048
11118
|
);
|
|
11049
11119
|
}
|
|
11050
11120
|
if (step.status === "warning") {
|
|
11051
|
-
return /* @__PURE__ */ (0,
|
|
11121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11052
11122
|
Icon,
|
|
11053
11123
|
{
|
|
11054
11124
|
name: "warning-filled",
|
|
@@ -11058,7 +11128,7 @@ var ExecutionStepIndicator = ({
|
|
|
11058
11128
|
}
|
|
11059
11129
|
);
|
|
11060
11130
|
}
|
|
11061
|
-
return /* @__PURE__ */ (0,
|
|
11131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11062
11132
|
"span",
|
|
11063
11133
|
{
|
|
11064
11134
|
className: "h-3 w-3 shrink-0 rounded-full border border-dashed border-agg-separator",
|
|
@@ -11071,15 +11141,15 @@ var PlaceOrderExecutionGroups = ({
|
|
|
11071
11141
|
groups,
|
|
11072
11142
|
labels
|
|
11073
11143
|
}) => {
|
|
11074
|
-
return /* @__PURE__ */ (0,
|
|
11144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "agg-order-execution-groups flex flex-col gap-5", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
11075
11145
|
"section",
|
|
11076
11146
|
{
|
|
11077
11147
|
className: "agg-order-execution-group flex flex-col gap-3",
|
|
11078
11148
|
"aria-label": labels.venueOrder(group.venueLabel),
|
|
11079
11149
|
children: [
|
|
11080
|
-
/* @__PURE__ */ (0,
|
|
11081
|
-
/* @__PURE__ */ (0,
|
|
11082
|
-
group.venue ? /* @__PURE__ */ (0,
|
|
11150
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-h-5 items-center justify-between gap-3 text-agg-sm leading-agg-5", children: [
|
|
11151
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-agg-foreground", children: [
|
|
11152
|
+
group.venue ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11083
11153
|
VenueLogo,
|
|
11084
11154
|
{
|
|
11085
11155
|
venue: group.venue,
|
|
@@ -11088,22 +11158,22 @@ var PlaceOrderExecutionGroups = ({
|
|
|
11088
11158
|
className: "h-3.5 w-3.5 shrink-0"
|
|
11089
11159
|
}
|
|
11090
11160
|
) : null,
|
|
11091
|
-
/* @__PURE__ */ (0,
|
|
11161
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("h3", { className: "truncate font-agg-normal", children: labels.venueOrder(group.venueLabel) })
|
|
11092
11162
|
] }),
|
|
11093
|
-
/* @__PURE__ */ (0,
|
|
11094
|
-
/* @__PURE__ */ (0,
|
|
11095
|
-
/* @__PURE__ */ (0,
|
|
11163
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
11164
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-muted-foreground", children: group.priceLabel }),
|
|
11165
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "text-agg-foreground", children: group.amountLabel })
|
|
11096
11166
|
] })
|
|
11097
11167
|
] }),
|
|
11098
|
-
/* @__PURE__ */ (0,
|
|
11168
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: group.steps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
|
|
11099
11169
|
"div",
|
|
11100
11170
|
{
|
|
11101
11171
|
className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
|
|
11102
11172
|
"data-kind": step.kind,
|
|
11103
11173
|
"data-status": step.status,
|
|
11104
11174
|
children: [
|
|
11105
|
-
/* @__PURE__ */ (0,
|
|
11106
|
-
/* @__PURE__ */ (0,
|
|
11175
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(ExecutionStepIndicator, { enableAnimations, step }),
|
|
11176
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "min-w-0 flex-1", children: step.status === "done" ? step.completedLabel : step.pendingLabel })
|
|
11107
11177
|
]
|
|
11108
11178
|
},
|
|
11109
11179
|
step.id
|
|
@@ -11122,9 +11192,10 @@ var PlaceOrderExecutionView = ({
|
|
|
11122
11192
|
eventTitle,
|
|
11123
11193
|
groups,
|
|
11124
11194
|
labels,
|
|
11125
|
-
progress
|
|
11195
|
+
progress,
|
|
11196
|
+
settlementHint
|
|
11126
11197
|
}) => {
|
|
11127
|
-
return /* @__PURE__ */ (0,
|
|
11198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11128
11199
|
Card,
|
|
11129
11200
|
{
|
|
11130
11201
|
className: cn(
|
|
@@ -11133,8 +11204,8 @@ var PlaceOrderExecutionView = ({
|
|
|
11133
11204
|
classNames == null ? void 0 : classNames.root,
|
|
11134
11205
|
className
|
|
11135
11206
|
),
|
|
11136
|
-
children: /* @__PURE__ */ (0,
|
|
11137
|
-
/* @__PURE__ */ (0,
|
|
11207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-6 p-5", classNames == null ? void 0 : classNames.body), children: [
|
|
11208
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11138
11209
|
PlaceOrderExecutionHeader,
|
|
11139
11210
|
{
|
|
11140
11211
|
className: classNames == null ? void 0 : classNames.header,
|
|
@@ -11143,13 +11214,13 @@ var PlaceOrderExecutionView = ({
|
|
|
11143
11214
|
eventTitle
|
|
11144
11215
|
}
|
|
11145
11216
|
),
|
|
11146
|
-
/* @__PURE__ */ (0,
|
|
11147
|
-
/* @__PURE__ */ (0,
|
|
11148
|
-
/* @__PURE__ */ (0,
|
|
11217
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.content), children: [
|
|
11218
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
11219
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("p", { className: "shrink-0 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
11149
11220
|
progress,
|
|
11150
11221
|
"%"
|
|
11151
11222
|
] }),
|
|
11152
|
-
/* @__PURE__ */ (0,
|
|
11223
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11153
11224
|
"progress",
|
|
11154
11225
|
{
|
|
11155
11226
|
"aria-label": labels.executingOrder,
|
|
@@ -11159,14 +11230,15 @@ var PlaceOrderExecutionView = ({
|
|
|
11159
11230
|
}
|
|
11160
11231
|
)
|
|
11161
11232
|
] }),
|
|
11162
|
-
/* @__PURE__ */ (0,
|
|
11233
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
11163
11234
|
PlaceOrderExecutionGroups,
|
|
11164
11235
|
{
|
|
11165
11236
|
enableAnimations,
|
|
11166
11237
|
groups,
|
|
11167
11238
|
labels
|
|
11168
11239
|
}
|
|
11169
|
-
)
|
|
11240
|
+
),
|
|
11241
|
+
settlementHint ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: settlementHint }) : null
|
|
11170
11242
|
] })
|
|
11171
11243
|
] })
|
|
11172
11244
|
}
|
|
@@ -11175,7 +11247,7 @@ var PlaceOrderExecutionView = ({
|
|
|
11175
11247
|
PlaceOrderExecutionView.displayName = "PlaceOrderExecutionView";
|
|
11176
11248
|
|
|
11177
11249
|
// src/trading/place-order/index.place-order.failure.tsx
|
|
11178
|
-
var
|
|
11250
|
+
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
11179
11251
|
var resolveFailureActionHandler = ({
|
|
11180
11252
|
action,
|
|
11181
11253
|
onDone,
|
|
@@ -11188,12 +11260,12 @@ var resolveFailureActionHandler = ({
|
|
|
11188
11260
|
};
|
|
11189
11261
|
var renderPartialFailureStep = (step) => {
|
|
11190
11262
|
const isWarningStep = step.tone === "warning" || step.tone === "error";
|
|
11191
|
-
return /* @__PURE__ */ (0,
|
|
11263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
|
|
11192
11264
|
"div",
|
|
11193
11265
|
{
|
|
11194
11266
|
className: "flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
11195
11267
|
children: [
|
|
11196
|
-
/* @__PURE__ */ (0,
|
|
11268
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11197
11269
|
Icon,
|
|
11198
11270
|
{
|
|
11199
11271
|
name: isWarningStep ? "warning-filled" : "check-circle",
|
|
@@ -11202,8 +11274,8 @@ var renderPartialFailureStep = (step) => {
|
|
|
11202
11274
|
"aria-hidden": "true"
|
|
11203
11275
|
}
|
|
11204
11276
|
),
|
|
11205
|
-
/* @__PURE__ */ (0,
|
|
11206
|
-
step.venue ? /* @__PURE__ */ (0,
|
|
11277
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1", children: step.label }),
|
|
11278
|
+
step.venue ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(VenueLogo, { venue: step.venue, size: "small", className: "h-4 w-4 shrink-0" }) : null
|
|
11207
11279
|
]
|
|
11208
11280
|
},
|
|
11209
11281
|
step.id
|
|
@@ -11222,10 +11294,10 @@ var PlaceOrderFailureView = ({
|
|
|
11222
11294
|
const shouldShowPartialFailureLayout = summary.kind === "partial_fill";
|
|
11223
11295
|
const failureStepGroups = shouldShowPartialFailureLayout ? groupPlaceOrderFailureSteps(summary.steps) : [];
|
|
11224
11296
|
if (shouldShowPartialFailureLayout) {
|
|
11225
|
-
return /* @__PURE__ */ (0,
|
|
11226
|
-
/* @__PURE__ */ (0,
|
|
11227
|
-
/* @__PURE__ */ (0,
|
|
11228
|
-
/* @__PURE__ */ (0,
|
|
11297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
|
|
11298
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
|
|
11299
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
|
|
11300
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11229
11301
|
RemoteImage,
|
|
11230
11302
|
{
|
|
11231
11303
|
src: (_a = summary.eventImage) != null ? _a : null,
|
|
@@ -11233,19 +11305,19 @@ var PlaceOrderFailureView = ({
|
|
|
11233
11305
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11234
11306
|
}
|
|
11235
11307
|
),
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11308
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
|
|
11237
11309
|
] }),
|
|
11238
|
-
summary.eventSubtitle ? /* @__PURE__ */ (0,
|
|
11310
|
+
summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
|
|
11239
11311
|
] }),
|
|
11240
|
-
/* @__PURE__ */ (0,
|
|
11312
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-4", children: ((_b = summary.executionGroups) == null ? void 0 : _b.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11241
11313
|
PlaceOrderExecutionGroups,
|
|
11242
11314
|
{
|
|
11243
11315
|
enableAnimations: false,
|
|
11244
11316
|
groups: summary.executionGroups,
|
|
11245
11317
|
labels: tradingLabels
|
|
11246
11318
|
}
|
|
11247
|
-
) : failureStepGroups.map((group, groupIndex) => /* @__PURE__ */ (0,
|
|
11248
|
-
summary.errorMessage ? /* @__PURE__ */ (0,
|
|
11319
|
+
) : failureStepGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-2", children: group.map((step) => renderPartialFailureStep(step)) }, `failure-group-${groupIndex}`)) }),
|
|
11320
|
+
summary.errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11249
11321
|
InlineAlert,
|
|
11250
11322
|
{
|
|
11251
11323
|
tone: "error",
|
|
@@ -11253,20 +11325,20 @@ var PlaceOrderFailureView = ({
|
|
|
11253
11325
|
message: tradingLabels.orderFailureDescription(summary.errorMessage)
|
|
11254
11326
|
}
|
|
11255
11327
|
) : null,
|
|
11256
|
-
summary.result ? /* @__PURE__ */ (0,
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11258
|
-
/* @__PURE__ */ (0,
|
|
11259
|
-
/* @__PURE__ */ (0,
|
|
11260
|
-
/* @__PURE__ */ (0,
|
|
11328
|
+
summary.result ? /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
11329
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11330
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
11331
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPartiallyFilled }),
|
|
11332
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.result.averagePriceLabel) })
|
|
11261
11333
|
] }),
|
|
11262
|
-
/* @__PURE__ */ (0,
|
|
11334
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: summary.result.filledAmountLabel })
|
|
11263
11335
|
] }),
|
|
11264
|
-
/* @__PURE__ */ (0,
|
|
11265
|
-
/* @__PURE__ */ (0,
|
|
11266
|
-
/* @__PURE__ */ (0,
|
|
11336
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11337
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
|
|
11338
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: summary.result.payoutLabel })
|
|
11267
11339
|
] })
|
|
11268
11340
|
] }) : null,
|
|
11269
|
-
/* @__PURE__ */ (0,
|
|
11341
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11270
11342
|
Button,
|
|
11271
11343
|
{
|
|
11272
11344
|
variant: action.variant === "retry" ? "primary" : "secondary",
|
|
@@ -11280,10 +11352,10 @@ var PlaceOrderFailureView = ({
|
|
|
11280
11352
|
)) })
|
|
11281
11353
|
] }) });
|
|
11282
11354
|
}
|
|
11283
|
-
return /* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11285
|
-
/* @__PURE__ */ (0,
|
|
11286
|
-
/* @__PURE__ */ (0,
|
|
11355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Card, { className: cn("group/agg-order-panel", getPlaceOrderContainerClassName(), className), children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-body flex flex-col gap-6 p-5", children: [
|
|
11356
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-header flex flex-col gap-2", children: [
|
|
11357
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsxs)("div", { className: "agg-order-failure-market flex items-center gap-3", children: [
|
|
11358
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11287
11359
|
RemoteImage,
|
|
11288
11360
|
{
|
|
11289
11361
|
src: (_c = summary.eventImage) != null ? _c : null,
|
|
@@ -11291,11 +11363,11 @@ var PlaceOrderFailureView = ({
|
|
|
11291
11363
|
className: "h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11292
11364
|
}
|
|
11293
11365
|
),
|
|
11294
|
-
/* @__PURE__ */ (0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: summary.eventTitle })
|
|
11295
11367
|
] }),
|
|
11296
|
-
summary.eventSubtitle ? /* @__PURE__ */ (0,
|
|
11368
|
+
summary.eventSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: summary.eventSubtitle }) : null
|
|
11297
11369
|
] }),
|
|
11298
|
-
((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0,
|
|
11370
|
+
((_d = summary.executionGroups) == null ? void 0 : _d.length) ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11299
11371
|
PlaceOrderExecutionGroups,
|
|
11300
11372
|
{
|
|
11301
11373
|
enableAnimations: false,
|
|
@@ -11303,7 +11375,7 @@ var PlaceOrderFailureView = ({
|
|
|
11303
11375
|
labels: tradingLabels
|
|
11304
11376
|
}
|
|
11305
11377
|
) : null,
|
|
11306
|
-
/* @__PURE__ */ (0,
|
|
11378
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11307
11379
|
InlineAlert,
|
|
11308
11380
|
{
|
|
11309
11381
|
tone: "error",
|
|
@@ -11312,7 +11384,7 @@ var PlaceOrderFailureView = ({
|
|
|
11312
11384
|
message: tradingLabels.orderFailureDescription((_e = summary.errorMessage) != null ? _e : "")
|
|
11313
11385
|
}
|
|
11314
11386
|
),
|
|
11315
|
-
/* @__PURE__ */ (0,
|
|
11387
|
+
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)("div", { className: "agg-order-failure-actions flex flex-col gap-4", children: summary.actions.map((action) => /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
11316
11388
|
Button,
|
|
11317
11389
|
{
|
|
11318
11390
|
variant: action.variant === "retry" ? "primary" : "secondary",
|
|
@@ -11329,7 +11401,7 @@ var PlaceOrderFailureView = ({
|
|
|
11329
11401
|
PlaceOrderFailureView.displayName = "PlaceOrderFailureView";
|
|
11330
11402
|
|
|
11331
11403
|
// src/trading/place-order/index.place-order.success.tsx
|
|
11332
|
-
var
|
|
11404
|
+
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
11333
11405
|
var resolveBuyPayoutLabel = (shares) => {
|
|
11334
11406
|
if (!shares) return "$0";
|
|
11335
11407
|
return shares.startsWith("$") ? shares : `$${shares}`;
|
|
@@ -11347,7 +11419,7 @@ var PlaceOrderSuccessView = ({
|
|
|
11347
11419
|
const resolvedPayoutLabel = (_c = summary.toWinLabel) != null ? _c : resolvedTradeSide === "sell" ? summary.estimatedCost : resolveBuyPayoutLabel(summary.shares);
|
|
11348
11420
|
const potentialReturnLabel = summary.potentialReturnLabel ? tradingLabels.potentialReturnBetter(summary.potentialReturnLabel) : null;
|
|
11349
11421
|
const legacyExecutionSteps = ((_d = summary.executionStepGroups) != null ? _d : []).flat();
|
|
11350
|
-
return /* @__PURE__ */ (0,
|
|
11422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11351
11423
|
Card,
|
|
11352
11424
|
{
|
|
11353
11425
|
className: cn(
|
|
@@ -11356,8 +11428,8 @@ var PlaceOrderSuccessView = ({
|
|
|
11356
11428
|
"border-0 ring-1 ring-inset ring-agg-separator",
|
|
11357
11429
|
className
|
|
11358
11430
|
),
|
|
11359
|
-
children: /* @__PURE__ */ (0,
|
|
11360
|
-
summary.eventTitle ? /* @__PURE__ */ (0,
|
|
11431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-body flex flex-col gap-6 p-5", children: [
|
|
11432
|
+
summary.eventTitle ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11361
11433
|
PlaceOrderExecutionHeader,
|
|
11362
11434
|
{
|
|
11363
11435
|
eventDateLabel: summary.eventDateLabel,
|
|
@@ -11365,19 +11437,19 @@ var PlaceOrderSuccessView = ({
|
|
|
11365
11437
|
eventTitle: summary.eventTitle
|
|
11366
11438
|
}
|
|
11367
11439
|
) : null,
|
|
11368
|
-
((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0,
|
|
11440
|
+
((_e = summary.executionGroups) == null ? void 0 : _e.length) ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11369
11441
|
PlaceOrderExecutionGroups,
|
|
11370
11442
|
{
|
|
11371
11443
|
enableAnimations: false,
|
|
11372
11444
|
groups: summary.executionGroups,
|
|
11373
11445
|
labels: tradingLabels
|
|
11374
11446
|
}
|
|
11375
|
-
) : legacyExecutionSteps.length > 0 ? /* @__PURE__ */ (0,
|
|
11447
|
+
) : legacyExecutionSteps.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("div", { className: "flex flex-col gap-3 pl-[22px]", children: legacyExecutionSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
|
|
11376
11448
|
"div",
|
|
11377
11449
|
{
|
|
11378
11450
|
className: "flex items-start gap-2 text-agg-xs leading-agg-4 text-agg-foreground",
|
|
11379
11451
|
children: [
|
|
11380
|
-
/* @__PURE__ */ (0,
|
|
11452
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11381
11453
|
Icon,
|
|
11382
11454
|
{
|
|
11383
11455
|
name: step.tone === "warning" || step.tone === "error" ? "warning-filled" : "check-circle",
|
|
@@ -11389,28 +11461,28 @@ var PlaceOrderSuccessView = ({
|
|
|
11389
11461
|
"aria-hidden": "true"
|
|
11390
11462
|
}
|
|
11391
11463
|
),
|
|
11392
|
-
/* @__PURE__ */ (0,
|
|
11464
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "min-w-0 flex-1", children: step.label })
|
|
11393
11465
|
]
|
|
11394
11466
|
},
|
|
11395
11467
|
step.id
|
|
11396
11468
|
)) }) : null,
|
|
11397
|
-
/* @__PURE__ */ (0,
|
|
11398
|
-
/* @__PURE__ */ (0,
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11400
|
-
/* @__PURE__ */ (0,
|
|
11401
|
-
/* @__PURE__ */ (0,
|
|
11469
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "agg-order-success-summary flex flex-col gap-4", children: [
|
|
11470
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11471
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
11472
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: summary.resultState === "partial" ? tradingLabels.orderPartiallyFilled : tradingLabels.orderFullyFilled }),
|
|
11473
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-muted-foreground", children: tradingLabels.orderAveragePrice(summary.avgPrice) })
|
|
11402
11474
|
] }),
|
|
11403
|
-
/* @__PURE__ */ (0,
|
|
11475
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-foreground", children: resolvedAmountLabel })
|
|
11404
11476
|
] }),
|
|
11405
|
-
/* @__PURE__ */ (0,
|
|
11406
|
-
/* @__PURE__ */ (0,
|
|
11407
|
-
/* @__PURE__ */ (0,
|
|
11408
|
-
potentialReturnLabel ? /* @__PURE__ */ (0,
|
|
11477
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11478
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
11479
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.orderPayout }),
|
|
11480
|
+
potentialReturnLabel ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "inline-flex h-5 items-center rounded-agg-sm border border-agg-primary/50 bg-gradient-to-b from-agg-primary/8 to-agg-primary/15 px-2 text-[10px] font-agg-bold uppercase leading-[14px] text-agg-primary", children: potentialReturnLabel }) : null
|
|
11409
11481
|
] }),
|
|
11410
|
-
/* @__PURE__ */ (0,
|
|
11482
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)("p", { className: "shrink-0 text-right text-[30px] font-agg-bold leading-[36px] text-agg-success", children: resolvedPayoutLabel })
|
|
11411
11483
|
] })
|
|
11412
11484
|
] }),
|
|
11413
|
-
/* @__PURE__ */ (0,
|
|
11485
|
+
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
11414
11486
|
Button,
|
|
11415
11487
|
{
|
|
11416
11488
|
variant: "secondary",
|
|
@@ -11428,7 +11500,7 @@ var PlaceOrderSuccessView = ({
|
|
|
11428
11500
|
PlaceOrderSuccessView.displayName = "PlaceOrderSuccessView";
|
|
11429
11501
|
|
|
11430
11502
|
// src/trading/place-order/index.tsx
|
|
11431
|
-
var
|
|
11503
|
+
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
11432
11504
|
var SELL_SHARE_INPUT_DECIMALS = 6;
|
|
11433
11505
|
var SELL_SHARE_DISPLAY_DECIMALS = 2;
|
|
11434
11506
|
var resolvePlaceOrderPortalContainer = (triggerElement) => {
|
|
@@ -11546,7 +11618,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11546
11618
|
minimumValue: slippageMinimumValue
|
|
11547
11619
|
}) => {
|
|
11548
11620
|
var _a, _b;
|
|
11549
|
-
const labels = (0,
|
|
11621
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
11550
11622
|
const containerRef = (0, import_react17.useRef)(null);
|
|
11551
11623
|
const triggerRef = (0, import_react17.useRef)(null);
|
|
11552
11624
|
const inputRef = (0, import_react17.useRef)(null);
|
|
@@ -11644,8 +11716,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11644
11716
|
if (!isEditing) return;
|
|
11645
11717
|
handleCommitDraft(false);
|
|
11646
11718
|
};
|
|
11647
|
-
return /* @__PURE__ */ (0,
|
|
11648
|
-
/* @__PURE__ */ (0,
|
|
11719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { ref: containerRef, className: "agg-slippage-control w-full", onBlur: handleContainerBlur, children: [
|
|
11720
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11649
11721
|
"button",
|
|
11650
11722
|
{
|
|
11651
11723
|
ref: triggerRef,
|
|
@@ -11663,8 +11735,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11663
11735
|
),
|
|
11664
11736
|
onClick: handleToggleEditing,
|
|
11665
11737
|
children: [
|
|
11666
|
-
/* @__PURE__ */ (0,
|
|
11667
|
-
/* @__PURE__ */ (0,
|
|
11738
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "agg-slippage-label", children: collapsedLabel }),
|
|
11739
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11668
11740
|
Icon,
|
|
11669
11741
|
{
|
|
11670
11742
|
name: isEditing ? "chevron-up" : "pencil",
|
|
@@ -11676,7 +11748,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11676
11748
|
]
|
|
11677
11749
|
}
|
|
11678
11750
|
),
|
|
11679
|
-
/* @__PURE__ */ (0,
|
|
11751
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11680
11752
|
"div",
|
|
11681
11753
|
{
|
|
11682
11754
|
"aria-hidden": !isEditing,
|
|
@@ -11690,10 +11762,10 @@ var PlaceOrderSlippageControl = ({
|
|
|
11690
11762
|
"transition-[grid-template-rows,opacity,margin-top] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]"
|
|
11691
11763
|
)
|
|
11692
11764
|
),
|
|
11693
|
-
children: /* @__PURE__ */ (0,
|
|
11694
|
-
/* @__PURE__ */ (0,
|
|
11695
|
-
/* @__PURE__ */ (0,
|
|
11696
|
-
/* @__PURE__ */ (0,
|
|
11765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-editor-body flex flex-col gap-2", children: [
|
|
11766
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-input-row flex h-9 overflow-hidden rounded-agg-sm border border-agg-separator", children: [
|
|
11767
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-slippage-input-group flex min-w-0 flex-1 items-center gap-2 bg-agg-secondary px-3", children: [
|
|
11768
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11697
11769
|
"input",
|
|
11698
11770
|
{
|
|
11699
11771
|
ref: inputRef,
|
|
@@ -11708,7 +11780,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11708
11780
|
onKeyDown: handleInputKeyDown
|
|
11709
11781
|
}
|
|
11710
11782
|
),
|
|
11711
|
-
/* @__PURE__ */ (0,
|
|
11783
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11712
11784
|
"button",
|
|
11713
11785
|
{
|
|
11714
11786
|
type: "button",
|
|
@@ -11726,8 +11798,8 @@ var PlaceOrderSlippageControl = ({
|
|
|
11726
11798
|
}
|
|
11727
11799
|
)
|
|
11728
11800
|
] }),
|
|
11729
|
-
/* @__PURE__ */ (0,
|
|
11730
|
-
/* @__PURE__ */ (0,
|
|
11801
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-full w-px bg-agg-separator", "aria-hidden": "true" }),
|
|
11802
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11731
11803
|
"div",
|
|
11732
11804
|
{
|
|
11733
11805
|
className: "agg-slippage-suffix flex w-9 items-center justify-center bg-agg-secondary-hover text-agg-sm leading-agg-5 text-agg-muted-foreground",
|
|
@@ -11736,7 +11808,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11736
11808
|
}
|
|
11737
11809
|
)
|
|
11738
11810
|
] }),
|
|
11739
|
-
/* @__PURE__ */ (0,
|
|
11811
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11740
11812
|
"div",
|
|
11741
11813
|
{
|
|
11742
11814
|
"aria-hidden": !resolvedWarningMessage,
|
|
@@ -11750,13 +11822,13 @@ var PlaceOrderSlippageControl = ({
|
|
|
11750
11822
|
"transition-[grid-template-rows,opacity] duration-200 ease-[cubic-bezier(0.22,1,0.36,1)]"
|
|
11751
11823
|
)
|
|
11752
11824
|
),
|
|
11753
|
-
children: /* @__PURE__ */ (0,
|
|
11825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "min-h-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11754
11826
|
"div",
|
|
11755
11827
|
{
|
|
11756
11828
|
id: warningId,
|
|
11757
11829
|
className: "agg-slippage-warning-message flex items-start gap-2 text-agg-sm leading-agg-5 text-agg-foreground",
|
|
11758
11830
|
children: [
|
|
11759
|
-
/* @__PURE__ */ (0,
|
|
11831
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11760
11832
|
Icon,
|
|
11761
11833
|
{
|
|
11762
11834
|
name: "warning-filled",
|
|
@@ -11765,7 +11837,7 @@ var PlaceOrderSlippageControl = ({
|
|
|
11765
11837
|
color: "currentColor"
|
|
11766
11838
|
}
|
|
11767
11839
|
),
|
|
11768
|
-
/* @__PURE__ */ (0,
|
|
11840
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { children: resolvedWarningMessage != null ? resolvedWarningMessage : "" })
|
|
11769
11841
|
]
|
|
11770
11842
|
}
|
|
11771
11843
|
) })
|
|
@@ -11785,9 +11857,9 @@ var renderCardHeader = ({
|
|
|
11785
11857
|
onClose
|
|
11786
11858
|
}) => {
|
|
11787
11859
|
if (!headerTitle) return null;
|
|
11788
|
-
return /* @__PURE__ */ (0,
|
|
11789
|
-
/* @__PURE__ */ (0,
|
|
11790
|
-
/* @__PURE__ */ (0,
|
|
11860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-header flex flex-col gap-2", className), children: [
|
|
11861
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-market-summary flex items-center gap-3", children: [
|
|
11862
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11791
11863
|
RemoteImage,
|
|
11792
11864
|
{
|
|
11793
11865
|
src: headerImage,
|
|
@@ -11795,19 +11867,19 @@ var renderCardHeader = ({
|
|
|
11795
11867
|
className: "agg-order-market-image h-12 w-12 shrink-0 overflow-hidden rounded-agg-lg object-cover"
|
|
11796
11868
|
}
|
|
11797
11869
|
),
|
|
11798
|
-
/* @__PURE__ */ (0,
|
|
11799
|
-
onClose ? /* @__PURE__ */ (0,
|
|
11870
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-market-title min-w-0 flex-1 text-agg-base font-agg-bold leading-agg-6 text-agg-foreground line-clamp-2", children: headerTitle }),
|
|
11871
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11800
11872
|
"button",
|
|
11801
11873
|
{
|
|
11802
11874
|
type: "button",
|
|
11803
11875
|
className: "agg-order-close -mr-1 -mt-1 hidden shrink-0 cursor-pointer items-center justify-center p-1 text-agg-muted-foreground hover:text-agg-foreground sm:flex",
|
|
11804
11876
|
"aria-label": "Close",
|
|
11805
11877
|
onClick: onClose,
|
|
11806
|
-
children: /* @__PURE__ */ (0,
|
|
11878
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(CloseIcon, { className: "h-5 w-5" })
|
|
11807
11879
|
}
|
|
11808
11880
|
) : null
|
|
11809
11881
|
] }),
|
|
11810
|
-
headerSubtitle ? /* @__PURE__ */ (0,
|
|
11882
|
+
headerSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-market-subtitle text-agg-base leading-agg-6 text-agg-foreground", children: headerSubtitle }) : null
|
|
11811
11883
|
] });
|
|
11812
11884
|
};
|
|
11813
11885
|
var PlaceOrderResolvedView = ({
|
|
@@ -11820,7 +11892,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11820
11892
|
showResolvingState = false
|
|
11821
11893
|
}) => {
|
|
11822
11894
|
var _a, _b;
|
|
11823
|
-
const labels = (0,
|
|
11895
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
11824
11896
|
const tradingLabels = labels.trading;
|
|
11825
11897
|
const resolvingTimestamp = (_a = resolutionTimestamp != null ? resolutionTimestamp : tradingState.resolvesAt) != null ? _a : tradingState.endsAt;
|
|
11826
11898
|
const isResolvingMarket = showResolvingState && !tradingState.winningOutcome;
|
|
@@ -11829,7 +11901,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11829
11901
|
return endDateLabel ? `${tradingState.market.question} \xB7 ${endDateLabel}` : tradingState.market.question;
|
|
11830
11902
|
})() : "";
|
|
11831
11903
|
if (isResolvingMarket) {
|
|
11832
|
-
return /* @__PURE__ */ (0,
|
|
11904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11833
11905
|
Card,
|
|
11834
11906
|
{
|
|
11835
11907
|
className: cn(
|
|
@@ -11840,7 +11912,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11840
11912
|
),
|
|
11841
11913
|
role: "status",
|
|
11842
11914
|
"aria-label": labels.marketDetails.resolvingTitle,
|
|
11843
|
-
children: /* @__PURE__ */ (0,
|
|
11915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11844
11916
|
"div",
|
|
11845
11917
|
{
|
|
11846
11918
|
className: cn(
|
|
@@ -11848,12 +11920,12 @@ var PlaceOrderResolvedView = ({
|
|
|
11848
11920
|
classNames == null ? void 0 : classNames.body
|
|
11849
11921
|
),
|
|
11850
11922
|
children: [
|
|
11851
|
-
/* @__PURE__ */ (0,
|
|
11852
|
-
/* @__PURE__ */ (0,
|
|
11853
|
-
/* @__PURE__ */ (0,
|
|
11854
|
-
resolvingSubtitle ? /* @__PURE__ */ (0,
|
|
11923
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex h-[60px] w-[60px] items-center justify-center rounded-full bg-agg-primary/10", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { variant: "prominent" }) }),
|
|
11924
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("flex w-full flex-col items-center gap-1", classNames == null ? void 0 : classNames.content), children: [
|
|
11925
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: labels.marketDetails.resolvingTitle }),
|
|
11926
|
+
resolvingSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: resolvingSubtitle }) : null
|
|
11855
11927
|
] }),
|
|
11856
|
-
/* @__PURE__ */ (0,
|
|
11928
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11857
11929
|
Typography,
|
|
11858
11930
|
{
|
|
11859
11931
|
variant: "label",
|
|
@@ -11867,7 +11939,7 @@ var PlaceOrderResolvedView = ({
|
|
|
11867
11939
|
}
|
|
11868
11940
|
);
|
|
11869
11941
|
}
|
|
11870
|
-
return /* @__PURE__ */ (0,
|
|
11942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11871
11943
|
Card,
|
|
11872
11944
|
{
|
|
11873
11945
|
className: cn(
|
|
@@ -11876,19 +11948,19 @@ var PlaceOrderResolvedView = ({
|
|
|
11876
11948
|
classNames == null ? void 0 : classNames.root,
|
|
11877
11949
|
className
|
|
11878
11950
|
),
|
|
11879
|
-
children: /* @__PURE__ */ (0,
|
|
11880
|
-
/* @__PURE__ */ (0,
|
|
11881
|
-
/* @__PURE__ */ (0,
|
|
11951
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
|
|
11952
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
|
|
11953
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11882
11954
|
"div",
|
|
11883
11955
|
{
|
|
11884
11956
|
className: cn(
|
|
11885
11957
|
"flex h-15 w-15 items-center justify-center rounded-full",
|
|
11886
11958
|
"bg-agg-primary/15"
|
|
11887
11959
|
),
|
|
11888
|
-
children: /* @__PURE__ */ (0,
|
|
11960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "success-check", className: cn("h-6 w-6", "text-agg-primary") })
|
|
11889
11961
|
}
|
|
11890
11962
|
),
|
|
11891
|
-
/* @__PURE__ */ (0,
|
|
11963
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11892
11964
|
"div",
|
|
11893
11965
|
{
|
|
11894
11966
|
className: cn(
|
|
@@ -11896,8 +11968,8 @@ var PlaceOrderResolvedView = ({
|
|
|
11896
11968
|
classNames == null ? void 0 : classNames.content
|
|
11897
11969
|
),
|
|
11898
11970
|
children: [
|
|
11899
|
-
tradingState.market ? /* @__PURE__ */ (0,
|
|
11900
|
-
tradingState.winningOutcome ? /* @__PURE__ */ (0,
|
|
11971
|
+
tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body", className: "text-center", children: tradingState.market.question }) : null,
|
|
11972
|
+
tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(
|
|
11901
11973
|
shouldUseRawResolvedPlaceOrderOutcomeLabel(
|
|
11902
11974
|
tradingState.market,
|
|
11903
11975
|
tradingState.winningOutcome
|
|
@@ -11911,25 +11983,25 @@ var PlaceOrderResolvedView = ({
|
|
|
11911
11983
|
}
|
|
11912
11984
|
)
|
|
11913
11985
|
] }),
|
|
11914
|
-
resolvedClaim ? /* @__PURE__ */ (0,
|
|
11915
|
-
/* @__PURE__ */ (0,
|
|
11916
|
-
/* @__PURE__ */ (0,
|
|
11917
|
-
/* @__PURE__ */ (0,
|
|
11918
|
-
/* @__PURE__ */ (0,
|
|
11919
|
-
resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0,
|
|
11920
|
-
/* @__PURE__ */ (0,
|
|
11921
|
-
/* @__PURE__ */ (0,
|
|
11986
|
+
resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
11987
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
|
|
11988
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
|
|
11989
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "body-strong", className: "text-center", children: tradingLabels.resolvedEarningsTitle }),
|
|
11990
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
|
|
11991
|
+
resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11992
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedResolutionDateLabel }),
|
|
11993
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
|
|
11922
11994
|
] }) : null,
|
|
11923
|
-
/* @__PURE__ */ (0,
|
|
11924
|
-
/* @__PURE__ */ (0,
|
|
11925
|
-
/* @__PURE__ */ (0,
|
|
11995
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11996
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedSharesLabel }),
|
|
11997
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
|
|
11926
11998
|
] }),
|
|
11927
|
-
/* @__PURE__ */ (0,
|
|
11928
|
-
/* @__PURE__ */ (0,
|
|
11929
|
-
/* @__PURE__ */ (0,
|
|
11999
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
12000
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.resolvedTotalPayoutLabel }),
|
|
12001
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
|
|
11930
12002
|
] })
|
|
11931
12003
|
] }),
|
|
11932
|
-
resolvedClaim.onClaim ? /* @__PURE__ */ (0,
|
|
12004
|
+
resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
11933
12005
|
Button,
|
|
11934
12006
|
{
|
|
11935
12007
|
size: "large",
|
|
@@ -11951,21 +12023,21 @@ var renderRouteBreakdownRow = (row, sharedKycStatus, tradingLabels) => {
|
|
|
11951
12023
|
const venueLabel = getTradingVenueLabel(row.venue);
|
|
11952
12024
|
const rowKey = `${row.venue}-${row.label}-${row.priceLabel}-${(_a = row.resultLabel) != null ? _a : ""}`;
|
|
11953
12025
|
const showSharedKycRequirement = row.requiresSharedKyc === true && sharedKycStatus !== void 0 && sharedKycStatus !== "verified";
|
|
11954
|
-
return /* @__PURE__ */ (0,
|
|
12026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
11955
12027
|
"div",
|
|
11956
12028
|
{
|
|
11957
12029
|
className: "agg-route-breakdown-row flex items-center justify-between gap-4 text-left",
|
|
11958
12030
|
children: [
|
|
11959
|
-
/* @__PURE__ */ (0,
|
|
11960
|
-
/* @__PURE__ */ (0,
|
|
11961
|
-
/* @__PURE__ */ (0,
|
|
11962
|
-
/* @__PURE__ */ (0,
|
|
11963
|
-
showSharedKycRequirement ? /* @__PURE__ */ (0,
|
|
12031
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-breakdown-market flex min-w-0 items-center gap-2", children: [
|
|
12032
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(VenueLogo, { venue: row.venue, className: "size-3!", ariaLabel: venueLabel }),
|
|
12033
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
12034
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-breakdown-label truncate text-agg-sm leading-agg-5 text-agg-foreground", children: row.label }),
|
|
12035
|
+
showSharedKycRequirement ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.sharedKyc.required }) : null
|
|
11964
12036
|
] })
|
|
11965
12037
|
] }),
|
|
11966
|
-
/* @__PURE__ */ (0,
|
|
11967
|
-
/* @__PURE__ */ (0,
|
|
11968
|
-
/* @__PURE__ */ (0,
|
|
12038
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-breakdown-value flex shrink-0 items-center gap-2 text-agg-sm leading-agg-5", children: [
|
|
12039
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-muted-foreground", children: row.priceLabel }),
|
|
12040
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-foreground", children: (_b = row.resultLabel) != null ? _b : "" })
|
|
11969
12041
|
] })
|
|
11970
12042
|
]
|
|
11971
12043
|
},
|
|
@@ -11996,7 +12068,7 @@ var renderRouteCard = ({
|
|
|
11996
12068
|
const showSplitDetails = isSelected && isExpanded && card.kind === "split" && !!((_a = card.rows) == null ? void 0 : _a.length);
|
|
11997
12069
|
const displayedHint = showSharedKycRequirement ? tradingLabels.sharedKyc.required : card.hint;
|
|
11998
12070
|
const ariaLabel = [card.label, displayedHint, card.value].filter(Boolean).join(" ");
|
|
11999
|
-
return /* @__PURE__ */ (0,
|
|
12071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12000
12072
|
"button",
|
|
12001
12073
|
{
|
|
12002
12074
|
type: "button",
|
|
@@ -12015,10 +12087,10 @@ var renderRouteCard = ({
|
|
|
12015
12087
|
isSelected && !card.isUnavailable ? "border border-agg-trade-highlight-border bg-linear-to-b from-agg-trade-highlight-surface-from to-agg-trade-highlight-surface-to" : "border-transparent bg-agg-secondary-hover"
|
|
12016
12088
|
),
|
|
12017
12089
|
onClick: () => onSelect(card.id),
|
|
12018
|
-
children: /* @__PURE__ */ (0,
|
|
12019
|
-
/* @__PURE__ */ (0,
|
|
12020
|
-
/* @__PURE__ */ (0,
|
|
12021
|
-
card.kind === "split" ? /* @__PURE__ */ (0,
|
|
12090
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-content relative z-10 flex flex-col gap-3", children: [
|
|
12091
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-header flex items-center justify-between gap-4", children: [
|
|
12092
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-card-meta flex min-w-0 gap-3 items-center", children: [
|
|
12093
|
+
card.kind === "split" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12022
12094
|
Icon,
|
|
12023
12095
|
{
|
|
12024
12096
|
name: "sparkles-filled",
|
|
@@ -12029,7 +12101,7 @@ var renderRouteCard = ({
|
|
|
12029
12101
|
),
|
|
12030
12102
|
"aria-hidden": "true"
|
|
12031
12103
|
}
|
|
12032
|
-
) : card.venue ? /* @__PURE__ */ (0,
|
|
12104
|
+
) : card.venue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12033
12105
|
VenueLogo,
|
|
12034
12106
|
{
|
|
12035
12107
|
venue: card.venue,
|
|
@@ -12037,10 +12109,10 @@ var renderRouteCard = ({
|
|
|
12037
12109
|
ariaLabel: getTradingVenueLabel(card.venue)
|
|
12038
12110
|
}
|
|
12039
12111
|
) : null,
|
|
12040
|
-
/* @__PURE__ */ (0,
|
|
12041
|
-
/* @__PURE__ */ (0,
|
|
12042
|
-
/* @__PURE__ */ (0,
|
|
12043
|
-
card.isUnavailable ? /* @__PURE__ */ (0,
|
|
12112
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
12113
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
12114
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-title truncate text-agg-sm leading-agg-5 text-agg-foreground", children: card.label }),
|
|
12115
|
+
card.isUnavailable ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12044
12116
|
Icon,
|
|
12045
12117
|
{
|
|
12046
12118
|
name: "lock",
|
|
@@ -12048,7 +12120,7 @@ var renderRouteCard = ({
|
|
|
12048
12120
|
className: "shrink-0 text-agg-muted-foreground",
|
|
12049
12121
|
"aria-hidden": "true"
|
|
12050
12122
|
}
|
|
12051
|
-
) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0,
|
|
12123
|
+
) : showSharedKycRequirement || card.insufficientInventory ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12052
12124
|
Icon,
|
|
12053
12125
|
{
|
|
12054
12126
|
name: "warning",
|
|
@@ -12056,7 +12128,7 @@ var renderRouteCard = ({
|
|
|
12056
12128
|
className: "shrink-0 text-agg-muted-foreground",
|
|
12057
12129
|
"aria-hidden": "true"
|
|
12058
12130
|
}
|
|
12059
|
-
) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0,
|
|
12131
|
+
) : card.kind === "split" && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12060
12132
|
Icon,
|
|
12061
12133
|
{
|
|
12062
12134
|
name: showSplitDetails ? "chevron-up" : "chevron-down",
|
|
@@ -12066,10 +12138,10 @@ var renderRouteCard = ({
|
|
|
12066
12138
|
}
|
|
12067
12139
|
) : null
|
|
12068
12140
|
] }),
|
|
12069
|
-
card.hint ? /* @__PURE__ */ (0,
|
|
12141
|
+
card.hint ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-hint text-agg-xs leading-agg-4 text-agg-muted-foreground", children: displayedHint }) : null
|
|
12070
12142
|
] })
|
|
12071
12143
|
] }),
|
|
12072
|
-
/* @__PURE__ */ (0,
|
|
12144
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
12073
12145
|
"p",
|
|
12074
12146
|
{
|
|
12075
12147
|
className: cn(
|
|
@@ -12081,9 +12153,9 @@ var renderRouteCard = ({
|
|
|
12081
12153
|
}
|
|
12082
12154
|
)
|
|
12083
12155
|
] }),
|
|
12084
|
-
showSplitDetails ? /* @__PURE__ */ (0,
|
|
12085
|
-
/* @__PURE__ */ (0,
|
|
12086
|
-
/* @__PURE__ */ (0,
|
|
12156
|
+
showSplitDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
12157
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-card-description text-agg-xs leading-agg-4 text-agg-foreground", children: (_b = card.description) != null ? _b : tradingLabels.splitOrderDescription }),
|
|
12158
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-route-breakdown flex flex-col gap-3", children: (_c = card.rows) == null ? void 0 : _c.map(
|
|
12087
12159
|
(row) => renderRouteBreakdownRow(row, sharedKycStatus, tradingLabels)
|
|
12088
12160
|
) })
|
|
12089
12161
|
] }) : null
|
|
@@ -12122,17 +12194,17 @@ var PlaceOrder = ({
|
|
|
12122
12194
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
12123
12195
|
formatting: { formatPrice },
|
|
12124
12196
|
general: { locale }
|
|
12125
|
-
} = (0,
|
|
12126
|
-
const labels = (0,
|
|
12197
|
+
} = (0, import_hooks41.useSdkUiConfig)();
|
|
12198
|
+
const labels = (0, import_hooks41.useLabels)();
|
|
12127
12199
|
const tradingLabels = labels.trading;
|
|
12128
12200
|
const toastCtx = useOptionalToast();
|
|
12129
|
-
const { isTradingBlocked } = (0,
|
|
12130
|
-
const tradingContext = (0,
|
|
12201
|
+
const { isTradingBlocked } = (0, import_hooks41.useGeoBlock)();
|
|
12202
|
+
const tradingContext = (0, import_hooks41.useEventTradingContext)();
|
|
12131
12203
|
const selectedEvent = (_a = tradingContext == null ? void 0 : tradingContext.selectedEvent) != null ? _a : null;
|
|
12132
12204
|
const selectedMarket = (_b = tradingContext == null ? void 0 : tradingContext.selectedMarket) != null ? _b : null;
|
|
12133
12205
|
const selectedOutcomeId = (_c = tradingContext == null ? void 0 : tradingContext.selectedOutcomeId) != null ? _c : null;
|
|
12134
12206
|
const resolvedEventTradingState = (0, import_react17.useMemo)(() => {
|
|
12135
|
-
return eventTradingState != null ? eventTradingState : (0,
|
|
12207
|
+
return eventTradingState != null ? eventTradingState : (0, import_hooks41.resolveEventTradingState)(selectedEvent);
|
|
12136
12208
|
}, [eventTradingState, selectedEvent]);
|
|
12137
12209
|
const scopedSelectedEvent = (0, import_react17.useMemo)(() => {
|
|
12138
12210
|
var _a2;
|
|
@@ -12160,7 +12232,7 @@ var PlaceOrder = ({
|
|
|
12160
12232
|
)) != null ? _f : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.venueMarketOutcomes[0]) != null ? _g : null;
|
|
12161
12233
|
const scopedSelectedOutcomeId = (_h = scopedSelectedOutcome == null ? void 0 : scopedSelectedOutcome.id) != null ? _h : null;
|
|
12162
12234
|
const resolvedTradingState = (0, import_react17.useMemo)(() => {
|
|
12163
|
-
return (0,
|
|
12235
|
+
return (0, import_hooks41.resolveMarketTradingState)(scopedSelectedMarket);
|
|
12164
12236
|
}, [scopedSelectedMarket]);
|
|
12165
12237
|
const resolvedReadOnlyMarket = (0, import_react17.useMemo)(() => {
|
|
12166
12238
|
var _a2;
|
|
@@ -12174,11 +12246,11 @@ var PlaceOrder = ({
|
|
|
12174
12246
|
scopedSelectedMarket
|
|
12175
12247
|
]);
|
|
12176
12248
|
const resolvedReadOnlyTradingState = (0, import_react17.useMemo)(() => {
|
|
12177
|
-
return (0,
|
|
12249
|
+
return (0, import_hooks41.resolveMarketTradingState)(resolvedReadOnlyMarket);
|
|
12178
12250
|
}, [resolvedReadOnlyMarket]);
|
|
12179
12251
|
const isEndedWithoutKnownWinner = showResolvingState && !resolvedEventTradingState.winningOutcome && !resolvedReadOnlyTradingState.winningOutcome;
|
|
12180
12252
|
const orderEligibility = (0, import_react17.useMemo)(
|
|
12181
|
-
() => (0,
|
|
12253
|
+
() => (0, import_hooks41.resolveOrderEligibility)({
|
|
12182
12254
|
event: scopedSelectedEvent,
|
|
12183
12255
|
market: scopedSelectedMarket,
|
|
12184
12256
|
outcome: scopedSelectedOutcome,
|
|
@@ -12187,16 +12259,16 @@ var PlaceOrder = ({
|
|
|
12187
12259
|
[scopedSelectedEvent, scopedSelectedMarket, scopedSelectedOutcome, resolvedEventTradingState]
|
|
12188
12260
|
);
|
|
12189
12261
|
const isResolvedOutcomeCtaLocked = resolvedEventTradingState.kind === "resolved" || resolvedTradingState.kind === "resolved";
|
|
12190
|
-
const { isAuthenticated, user } = (0,
|
|
12262
|
+
const { isAuthenticated, user } = (0, import_hooks41.useAggAuthContext)();
|
|
12191
12263
|
const sharedKycFlow = useSharedKycFlow({
|
|
12192
12264
|
integration: sharedKyc,
|
|
12193
12265
|
userId: isAuthenticated ? user == null ? void 0 : user.id : null,
|
|
12194
12266
|
fallbackErrorMessage: tradingLabels.sharedKyc.modal.error
|
|
12195
12267
|
});
|
|
12196
|
-
const { executionMode: resolvedExecutionMode, isPaperMode } = (0,
|
|
12268
|
+
const { executionMode: resolvedExecutionMode, isPaperMode } = (0, import_hooks41.useResolvedExecutionMode)(executionMode);
|
|
12197
12269
|
const showLimitOrders = limitOrdersFeature && !isPaperMode;
|
|
12198
|
-
const liveBalanceState = (0,
|
|
12199
|
-
const paperBalancesQuery = (0,
|
|
12270
|
+
const liveBalanceState = (0, import_hooks41.useAggBalanceState)();
|
|
12271
|
+
const paperBalancesQuery = (0, import_hooks41.useManagedBalances)({
|
|
12200
12272
|
enabled: Boolean(isAuthenticated && isPaperMode),
|
|
12201
12273
|
mode: "paper"
|
|
12202
12274
|
});
|
|
@@ -12216,22 +12288,22 @@ var PlaceOrder = ({
|
|
|
12216
12288
|
const liveAvailableBalance = (_i = liveBalanceState.availableBalance) != null ? _i : liveBalanceState.totalBalance;
|
|
12217
12289
|
const totalBalance = isPaperMode ? paperTotalBalance : liveAvailableBalance;
|
|
12218
12290
|
const isBalanceLoading = isPaperMode ? paperBalancesQuery.isLoading : liveBalanceState.isLoading;
|
|
12219
|
-
const executeManaged = (0,
|
|
12220
|
-
const placeLimitOrder = (0,
|
|
12221
|
-
const aggClient = (0,
|
|
12222
|
-
const queryClient = (0,
|
|
12223
|
-
const { disabledVenues, isLoading: isAppConfigLoading } = (0,
|
|
12224
|
-
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0,
|
|
12291
|
+
const executeManaged = (0, import_hooks41.useExecuteManaged)();
|
|
12292
|
+
const placeLimitOrder = (0, import_hooks41.usePlaceLimitOrder)();
|
|
12293
|
+
const aggClient = (0, import_hooks41.useAggClient)();
|
|
12294
|
+
const queryClient = (0, import_hooks41.useQueryClient)();
|
|
12295
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks41.useAppConfig)();
|
|
12296
|
+
const { data: kalshiKeyStatus, refetch: refetchKalshiKeyStatus } = (0, import_hooks41.useVenueKeyStatus)(
|
|
12225
12297
|
import_sdk19.Venue.kalshi,
|
|
12226
12298
|
isAuthenticated
|
|
12227
12299
|
);
|
|
12228
12300
|
const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react17.useState)(false);
|
|
12229
12301
|
const [isFundKalshiModalOpen, setIsFundKalshiModalOpen] = (0, import_react17.useState)(false);
|
|
12230
|
-
const livePrices = (0,
|
|
12302
|
+
const livePrices = (0, import_hooks41.useLiveOutcomePrices)(
|
|
12231
12303
|
scopedSelectedMarket ? [scopedSelectedMarket] : void 0
|
|
12232
12304
|
);
|
|
12233
|
-
const wsBestPrices = (0,
|
|
12234
|
-
const fetchedClusterMidpointResult = (0,
|
|
12305
|
+
const wsBestPrices = (0, import_hooks41.useLiveBestPrices)(scopedSelectedMarket ? [scopedSelectedMarket] : void 0);
|
|
12306
|
+
const fetchedClusterMidpointResult = (0, import_hooks41.useMidpoints)(
|
|
12235
12307
|
midpointsResult ? [] : scopedSelectedMarket ? [scopedSelectedMarket] : []
|
|
12236
12308
|
);
|
|
12237
12309
|
const clusterMidpointResult = midpointsResult != null ? midpointsResult : fetchedClusterMidpointResult;
|
|
@@ -12239,7 +12311,7 @@ var PlaceOrder = ({
|
|
|
12239
12311
|
const clusterBestMidpoint = clusterMidpointResult.bestMidpoint;
|
|
12240
12312
|
const clusterBestPricesRest = clusterMidpointResult.bestPrices;
|
|
12241
12313
|
const clusterBestPrices = (0, import_react17.useMemo)(
|
|
12242
|
-
() => (0,
|
|
12314
|
+
() => (0, import_hooks41.mergeBestPricesPreferringLive)(clusterBestPricesRest, wsBestPrices),
|
|
12243
12315
|
[clusterBestPricesRest, wsBestPrices]
|
|
12244
12316
|
);
|
|
12245
12317
|
const [internalTab, setInternalTab] = (0, import_react17.useState)("buy");
|
|
@@ -12333,7 +12405,7 @@ var PlaceOrder = ({
|
|
|
12333
12405
|
scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.id,
|
|
12334
12406
|
scopedSelectedOutcomeId
|
|
12335
12407
|
]);
|
|
12336
|
-
const debouncedAmount = (0,
|
|
12408
|
+
const debouncedAmount = (0, import_hooks41.useDebouncedValue)(internalAmount, 300);
|
|
12337
12409
|
const isQuoteInputEditing = internalAmount !== debouncedAmount;
|
|
12338
12410
|
const isLimitOrder = showLimitOrders && executionType === "limit";
|
|
12339
12411
|
const isSell = (0, import_react17.useMemo)(() => internalTab === "sell", [internalTab]);
|
|
@@ -12351,7 +12423,7 @@ var PlaceOrder = ({
|
|
|
12351
12423
|
);
|
|
12352
12424
|
const visibleLimitVenueOptions = (0, import_react17.useMemo)(() => {
|
|
12353
12425
|
return limitVenueOptions.filter((option) => {
|
|
12354
|
-
return (0,
|
|
12426
|
+
return (0, import_hooks41.getVenueAvailabilityState)({
|
|
12355
12427
|
venueId: option.venue,
|
|
12356
12428
|
disabledVenues,
|
|
12357
12429
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12363,7 +12435,7 @@ var PlaceOrder = ({
|
|
|
12363
12435
|
dataUpdatedAt: executionPositionsUpdatedAt,
|
|
12364
12436
|
isLoading: isExecutionPositionsLoading,
|
|
12365
12437
|
isFetching: isExecutionPositionsFetching
|
|
12366
|
-
} = (0,
|
|
12438
|
+
} = (0, import_hooks41.useExecutionPositions)({
|
|
12367
12439
|
enabled: Boolean(isAuthenticated && isSell),
|
|
12368
12440
|
mode: isPaperMode ? "paper" : void 0
|
|
12369
12441
|
});
|
|
@@ -12397,7 +12469,7 @@ var PlaceOrder = ({
|
|
|
12397
12469
|
);
|
|
12398
12470
|
const hasValidLimitVenueQuoteAmount = debouncedAmount > 0;
|
|
12399
12471
|
const isLimitVenueQuoteEnabled = isLimitOrder && isQuotePanelActive && !isEndedWithoutKnownWinner && !submissionProgressState && !isBeforeActionPending && !placeLimitOrder.isPending && hasValidLimitVenueQuoteAmount && orderEligibility.canPlaceOrder && (!isSell || sellFilledForOutcomeId === scopedSelectedOutcomeId && !isQuoteInputEditing);
|
|
12400
|
-
const limitVenueQuotes = (0,
|
|
12472
|
+
const limitVenueQuotes = (0, import_hooks41.useLimitOrderVenueQuotes)({
|
|
12401
12473
|
requests: limitVenueQuoteRequests,
|
|
12402
12474
|
tradeSide: internalTab,
|
|
12403
12475
|
amount: debouncedAmount,
|
|
@@ -12431,7 +12503,7 @@ var PlaceOrder = ({
|
|
|
12431
12503
|
// server's reservation check — and the automatic pick, which sorts on
|
|
12432
12504
|
// price alone, would happily choose one. Only narrow once we know
|
|
12433
12505
|
// where the shares are; an empty map means positions haven't resolved.
|
|
12434
|
-
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0,
|
|
12506
|
+
(!isSell || sellableSharesByVenue.size === 0 || ((_a2 = sellableSharesByVenue.get(option.venue)) != null ? _a2 : 0) > 0) && (0, import_hooks41.getVenueAvailabilityState)({
|
|
12435
12507
|
venueId: option.venue,
|
|
12436
12508
|
disabledVenues,
|
|
12437
12509
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12462,7 +12534,7 @@ var PlaceOrder = ({
|
|
|
12462
12534
|
if (!selectedLimitVenue || !geoBlockedLimitVenues.has(selectedLimitVenue)) return;
|
|
12463
12535
|
setSelectedLimitVenue(null);
|
|
12464
12536
|
}, [geoBlockedLimitVenues, selectedLimitVenue]);
|
|
12465
|
-
const smartRoute = (0,
|
|
12537
|
+
const smartRoute = (0, import_hooks41.useSmartRoute)(__spreadProps(__spreadValues({
|
|
12466
12538
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
12467
12539
|
maxSpend: isSell ? void 0 : debouncedAmount,
|
|
12468
12540
|
sellShares: isSell ? debouncedAmount : void 0,
|
|
@@ -12535,7 +12607,7 @@ var PlaceOrder = ({
|
|
|
12535
12607
|
},
|
|
12536
12608
|
[debouncedAmount, isSell, scopedSelectedOutcomeId, smartRoute.data, smartRoute.isLoading]
|
|
12537
12609
|
);
|
|
12538
|
-
const venueSellQuotes = (0,
|
|
12610
|
+
const venueSellQuotes = (0, import_hooks41.useVenueSellQuotes)({
|
|
12539
12611
|
venueMarketOutcomeId: scopedSelectedOutcomeId,
|
|
12540
12612
|
accountId: (_n = user == null ? void 0 : user.id) != null ? _n : null,
|
|
12541
12613
|
positionVersion: executionPositionsUpdatedAt,
|
|
@@ -12760,7 +12832,7 @@ var PlaceOrder = ({
|
|
|
12760
12832
|
);
|
|
12761
12833
|
const isKalshiAccountActive = (_F = kalshiKeyStatus == null ? void 0 : kalshiKeyStatus.connected) != null ? _F : (legacyKalshiAccount == null ? void 0 : legacyKalshiAccount.status) === "active";
|
|
12762
12834
|
const hasKalshiConnectionState = kalshiKeyStatus !== void 0 || (user == null ? void 0 : user.venueAccounts) != null;
|
|
12763
|
-
const isKalshiAvailable = (0,
|
|
12835
|
+
const isKalshiAvailable = (0, import_hooks41.getVenueAvailabilityState)({
|
|
12764
12836
|
venueId: "kalshi",
|
|
12765
12837
|
disabledVenues,
|
|
12766
12838
|
isConfigLoading: isAppConfigLoading
|
|
@@ -12815,7 +12887,7 @@ var PlaceOrder = ({
|
|
|
12815
12887
|
scopedSelectedOutcomeId
|
|
12816
12888
|
]
|
|
12817
12889
|
);
|
|
12818
|
-
const executionProgress = (0,
|
|
12890
|
+
const executionProgress = (0, import_hooks41.useExecutionProgress)({
|
|
12819
12891
|
orderIds: (_G = submissionProgressState == null ? void 0 : submissionProgressState.orderIds) != null ? _G : null,
|
|
12820
12892
|
quoteId: (_H = submissionProgressState == null ? void 0 : submissionProgressState.quoteId) != null ? _H : null,
|
|
12821
12893
|
mode: isPaperMode ? "paper" : void 0,
|
|
@@ -13107,13 +13179,13 @@ var PlaceOrder = ({
|
|
|
13107
13179
|
setSubmissionProgressState((prev) => {
|
|
13108
13180
|
if (!prev || prev.phase === "success" || prev.phase === "failed") return prev;
|
|
13109
13181
|
return __spreadProps(__spreadValues({}, prev), {
|
|
13110
|
-
phase: "
|
|
13111
|
-
errorMessage:
|
|
13182
|
+
phase: "executing",
|
|
13183
|
+
errorMessage: tradingLabels.orderStillSettling
|
|
13112
13184
|
});
|
|
13113
13185
|
});
|
|
13114
13186
|
}, timeoutMs);
|
|
13115
13187
|
return () => clearTimeout(id);
|
|
13116
|
-
}, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs]);
|
|
13188
|
+
}, [submissionProgressState == null ? void 0 : submissionProgressState.phase, estDurationMs, tradingLabels.orderStillSettling]);
|
|
13117
13189
|
const emitTerminalOrderNotifications = (0, import_react17.useCallback)(() => {
|
|
13118
13190
|
const toast = toastCtx == null ? void 0 : toastCtx.toast;
|
|
13119
13191
|
if (!toast) return;
|
|
@@ -13163,8 +13235,8 @@ var PlaceOrder = ({
|
|
|
13163
13235
|
}
|
|
13164
13236
|
if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
|
|
13165
13237
|
emitTerminalOrderNotifications();
|
|
13166
|
-
(0,
|
|
13167
|
-
(0,
|
|
13238
|
+
(0, import_hooks41.invalidateBalanceQueries)(queryClient);
|
|
13239
|
+
(0, import_hooks41.invalidatePositionQueries)(queryClient);
|
|
13168
13240
|
if (debugStore && debugAttemptId) {
|
|
13169
13241
|
debugStore.updateAttempt(debugAttemptId, {
|
|
13170
13242
|
status: "succeeded",
|
|
@@ -13224,11 +13296,13 @@ var PlaceOrder = ({
|
|
|
13224
13296
|
amount: internalAmount,
|
|
13225
13297
|
labels: tradingLabels,
|
|
13226
13298
|
quoteData: activeQuoteData,
|
|
13227
|
-
selectedMarket: scopedSelectedMarket
|
|
13299
|
+
selectedMarket: scopedSelectedMarket,
|
|
13300
|
+
tradeSide: isSell ? "sell" : "buy"
|
|
13228
13301
|
});
|
|
13229
13302
|
}, [
|
|
13230
13303
|
activeQuoteData,
|
|
13231
13304
|
internalAmount,
|
|
13305
|
+
isSell,
|
|
13232
13306
|
orderEligibility.canPlaceOrder,
|
|
13233
13307
|
scopedSelectedMarket,
|
|
13234
13308
|
tradingLabels
|
|
@@ -13466,7 +13540,7 @@ var PlaceOrder = ({
|
|
|
13466
13540
|
limitPriceRaw: effectiveLimitPriceRaw,
|
|
13467
13541
|
side: internalTab
|
|
13468
13542
|
});
|
|
13469
|
-
const availabilityState = (0,
|
|
13543
|
+
const availabilityState = (0, import_hooks41.getVenueAvailabilityState)({
|
|
13470
13544
|
venueId: option.venue,
|
|
13471
13545
|
disabledVenues,
|
|
13472
13546
|
isConfigLoading: isAppConfigLoading
|
|
@@ -14004,7 +14078,7 @@ var PlaceOrder = ({
|
|
|
14004
14078
|
]);
|
|
14005
14079
|
const resolvedStatusClassName = cn(classNames == null ? void 0 : classNames.root, className);
|
|
14006
14080
|
if (isLoading) {
|
|
14007
|
-
return /* @__PURE__ */ (0,
|
|
14081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14008
14082
|
Skeleton,
|
|
14009
14083
|
{
|
|
14010
14084
|
ariaLabel: labels.common.loading,
|
|
@@ -14015,7 +14089,7 @@ var PlaceOrder = ({
|
|
|
14015
14089
|
}
|
|
14016
14090
|
if (submissionProgressState) {
|
|
14017
14091
|
if (submissionProgressState.phase === "success" && submissionProgressState.summary) {
|
|
14018
|
-
return /* @__PURE__ */ (0,
|
|
14092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14019
14093
|
PlaceOrderSuccessView,
|
|
14020
14094
|
{
|
|
14021
14095
|
className: resolvedStatusClassName,
|
|
@@ -14027,7 +14101,7 @@ var PlaceOrder = ({
|
|
|
14027
14101
|
);
|
|
14028
14102
|
}
|
|
14029
14103
|
if (submissionProgressState.phase === "failed") {
|
|
14030
|
-
return /* @__PURE__ */ (0,
|
|
14104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14031
14105
|
PlaceOrderFailureView,
|
|
14032
14106
|
{
|
|
14033
14107
|
className: resolvedStatusClassName,
|
|
@@ -14040,7 +14114,7 @@ var PlaceOrder = ({
|
|
|
14040
14114
|
}
|
|
14041
14115
|
);
|
|
14042
14116
|
}
|
|
14043
|
-
return /* @__PURE__ */ (0,
|
|
14117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14044
14118
|
PlaceOrderExecutionView,
|
|
14045
14119
|
{
|
|
14046
14120
|
className,
|
|
@@ -14051,7 +14125,8 @@ var PlaceOrder = ({
|
|
|
14051
14125
|
eventTitle: headerTitle,
|
|
14052
14126
|
groups: executionOrderGroups,
|
|
14053
14127
|
labels: tradingLabels,
|
|
14054
|
-
progress: executionProgressPercent
|
|
14128
|
+
progress: executionProgressPercent,
|
|
14129
|
+
settlementHint: submissionProgressState.phase === "executing" ? submissionProgressState.errorMessage : void 0
|
|
14055
14130
|
}
|
|
14056
14131
|
);
|
|
14057
14132
|
}
|
|
@@ -14258,7 +14333,7 @@ var PlaceOrder = ({
|
|
|
14258
14333
|
}
|
|
14259
14334
|
});
|
|
14260
14335
|
if (isEndedWithoutKnownWinner || !orderEligibility.canPlaceOrder && resolvedReadOnlyTradingState.kind !== "open") {
|
|
14261
|
-
return /* @__PURE__ */ (0,
|
|
14336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14262
14337
|
PlaceOrderResolvedView,
|
|
14263
14338
|
{
|
|
14264
14339
|
tradingState: resolvedReadOnlyTradingState,
|
|
@@ -14271,8 +14346,8 @@ var PlaceOrder = ({
|
|
|
14271
14346
|
}
|
|
14272
14347
|
);
|
|
14273
14348
|
}
|
|
14274
|
-
return /* @__PURE__ */ (0,
|
|
14275
|
-
/* @__PURE__ */ (0,
|
|
14349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_react17.Fragment, { children: [
|
|
14350
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14276
14351
|
Card,
|
|
14277
14352
|
{
|
|
14278
14353
|
className: cn(
|
|
@@ -14289,20 +14364,20 @@ var PlaceOrder = ({
|
|
|
14289
14364
|
headerTitle,
|
|
14290
14365
|
onClose
|
|
14291
14366
|
}),
|
|
14292
|
-
/* @__PURE__ */ (0,
|
|
14293
|
-
/* @__PURE__ */ (0,
|
|
14367
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: cn("agg-order-panel-content flex flex-col gap-6", classNames == null ? void 0 : classNames.content), children: [
|
|
14368
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14294
14369
|
"div",
|
|
14295
14370
|
{
|
|
14296
14371
|
className: "agg-order-tabs flex items-end border-b border-agg-separator",
|
|
14297
14372
|
role: "tablist",
|
|
14298
14373
|
"aria-label": labels.common.tabsAria,
|
|
14299
14374
|
children: [
|
|
14300
|
-
/* @__PURE__ */ (0,
|
|
14375
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex min-w-0 flex-1 items-end", children: [
|
|
14301
14376
|
{ value: "buy", label: tradingLabels.buy, ref: buyTabRef },
|
|
14302
14377
|
{ value: "sell", label: tradingLabels.sell, ref: sellTabRef }
|
|
14303
14378
|
].map((tabItem) => {
|
|
14304
14379
|
const isActive = internalTab === tabItem.value;
|
|
14305
|
-
return /* @__PURE__ */ (0,
|
|
14380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14306
14381
|
"button",
|
|
14307
14382
|
{
|
|
14308
14383
|
ref: tabItem.ref,
|
|
@@ -14326,7 +14401,7 @@ var PlaceOrder = ({
|
|
|
14326
14401
|
onKeyDown: (event) => handleTabKeyDown(event, tabItem.value),
|
|
14327
14402
|
children: [
|
|
14328
14403
|
tabItem.label,
|
|
14329
|
-
/* @__PURE__ */ (0,
|
|
14404
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14330
14405
|
"span",
|
|
14331
14406
|
{
|
|
14332
14407
|
"aria-hidden": "true",
|
|
@@ -14346,7 +14421,7 @@ var PlaceOrder = ({
|
|
|
14346
14421
|
tabItem.value
|
|
14347
14422
|
);
|
|
14348
14423
|
}) }),
|
|
14349
|
-
showLimitOrders ? /* @__PURE__ */ (0,
|
|
14424
|
+
showLimitOrders ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14350
14425
|
Select,
|
|
14351
14426
|
{
|
|
14352
14427
|
ariaLabel: tradingLabels.orderTypeAria,
|
|
@@ -14367,8 +14442,8 @@ var PlaceOrder = ({
|
|
|
14367
14442
|
]
|
|
14368
14443
|
}
|
|
14369
14444
|
),
|
|
14370
|
-
/* @__PURE__ */ (0,
|
|
14371
|
-
outcomes.length >= 2 ? /* @__PURE__ */ (0,
|
|
14445
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-entry-section flex flex-col gap-4", children: [
|
|
14446
|
+
outcomes.length >= 2 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-outcomes flex w-full max-w-full gap-2", children: outcomes.map((outcome, index) => {
|
|
14372
14447
|
var _a2, _b2, _c2;
|
|
14373
14448
|
const price = getDisplayOutcomePrice({
|
|
14374
14449
|
outcomeId: outcome.id,
|
|
@@ -14382,7 +14457,7 @@ var PlaceOrder = ({
|
|
|
14382
14457
|
const isActive = outcome.id === scopedSelectedOutcomeId;
|
|
14383
14458
|
const isPositive = resolveIsPositiveOutcome(outcome, index);
|
|
14384
14459
|
const isPriceLoading = clusterMidpointResult.isLoading && price == null;
|
|
14385
|
-
return /* @__PURE__ */ (0,
|
|
14460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14386
14461
|
"button",
|
|
14387
14462
|
{
|
|
14388
14463
|
"data-id": outcome.id,
|
|
@@ -14402,7 +14477,7 @@ var PlaceOrder = ({
|
|
|
14402
14477
|
disabled: !orderEligibility.canPlaceOrder || isResolvedOutcomeCtaLocked,
|
|
14403
14478
|
onClick: () => handleOutcomeChange(outcome.id),
|
|
14404
14479
|
children: [
|
|
14405
|
-
/* @__PURE__ */ (0,
|
|
14480
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14406
14481
|
Typography,
|
|
14407
14482
|
{
|
|
14408
14483
|
as: "span",
|
|
@@ -14411,7 +14486,7 @@ var PlaceOrder = ({
|
|
|
14411
14486
|
children: (_c2 = outcome.title) != null ? _c2 : outcome.label
|
|
14412
14487
|
}
|
|
14413
14488
|
),
|
|
14414
|
-
isPriceLoading ? /* @__PURE__ */ (0,
|
|
14489
|
+
isPriceLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14415
14490
|
"span",
|
|
14416
14491
|
{
|
|
14417
14492
|
"aria-hidden": "true",
|
|
@@ -14420,18 +14495,18 @@ var PlaceOrder = ({
|
|
|
14420
14495
|
"h-4 w-10 shrink-0 rounded-agg-sm bg-agg-separator animate-pulse"
|
|
14421
14496
|
)
|
|
14422
14497
|
}
|
|
14423
|
-
) : /* @__PURE__ */ (0,
|
|
14498
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { as: "span", variant: isActive ? "body-strong" : "body", children: formatProbabilityCents(price, formatPrice) })
|
|
14424
14499
|
]
|
|
14425
14500
|
},
|
|
14426
14501
|
outcome.id
|
|
14427
14502
|
);
|
|
14428
14503
|
}) }) : null,
|
|
14429
|
-
isLimitOrder ? /* @__PURE__ */ (0,
|
|
14430
|
-
/* @__PURE__ */ (0,
|
|
14431
|
-
/* @__PURE__ */ (0,
|
|
14432
|
-
/* @__PURE__ */ (0,
|
|
14433
|
-
/* @__PURE__ */ (0,
|
|
14434
|
-
/* @__PURE__ */ (0,
|
|
14504
|
+
isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-price-section flex items-center justify-between gap-4", children: [
|
|
14505
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.limitPrice }),
|
|
14506
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex min-w-0 flex-col items-end gap-1", children: [
|
|
14507
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14508
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("label", { className: "relative flex items-center", children: [
|
|
14509
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14435
14510
|
"input",
|
|
14436
14511
|
{
|
|
14437
14512
|
type: "text",
|
|
@@ -14448,40 +14523,40 @@ var PlaceOrder = ({
|
|
|
14448
14523
|
)
|
|
14449
14524
|
}
|
|
14450
14525
|
),
|
|
14451
|
-
/* @__PURE__ */ (0,
|
|
14526
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "pointer-events-none absolute right-1 text-agg-3xl font-agg-bold leading-agg-9 text-agg-foreground", children: "\xA2" })
|
|
14452
14527
|
] }),
|
|
14453
|
-
/* @__PURE__ */ (0,
|
|
14528
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14454
14529
|
"button",
|
|
14455
14530
|
{
|
|
14456
14531
|
type: "button",
|
|
14457
14532
|
className: "flex size-8 cursor-pointer items-center justify-center rounded-agg-lg bg-agg-secondary-hover text-agg-foreground hover:bg-agg-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
|
|
14458
14533
|
"aria-label": tradingLabels.limitPriceDecreaseAria,
|
|
14459
14534
|
onClick: () => handleLimitPriceStep("decrease"),
|
|
14460
|
-
children: /* @__PURE__ */ (0,
|
|
14535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "minus", size: "small", className: "h-4 w-4", "aria-hidden": true })
|
|
14461
14536
|
}
|
|
14462
14537
|
),
|
|
14463
|
-
/* @__PURE__ */ (0,
|
|
14538
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14464
14539
|
"button",
|
|
14465
14540
|
{
|
|
14466
14541
|
type: "button",
|
|
14467
14542
|
className: "flex size-8 cursor-pointer items-center justify-center rounded-agg-lg bg-agg-secondary-hover text-agg-foreground hover:bg-agg-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
|
|
14468
14543
|
"aria-label": tradingLabels.limitPriceIncreaseAria,
|
|
14469
14544
|
onClick: () => handleLimitPriceStep("increase"),
|
|
14470
|
-
children: /* @__PURE__ */ (0,
|
|
14545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Icon, { name: "plus", size: "small", className: "h-4 w-4", "aria-hidden": true })
|
|
14471
14546
|
}
|
|
14472
14547
|
)
|
|
14473
14548
|
] }),
|
|
14474
|
-
limitPriceInputError ? /* @__PURE__ */ (0,
|
|
14549
|
+
limitPriceInputError ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "max-w-[220px] text-right text-agg-xs leading-agg-4 text-agg-error", children: limitPriceInputError }) : null
|
|
14475
14550
|
] })
|
|
14476
14551
|
] }) : null,
|
|
14477
|
-
isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0,
|
|
14552
|
+
isLimitOrder && limitPriceAdjustmentMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14478
14553
|
"div",
|
|
14479
14554
|
{
|
|
14480
14555
|
className: "agg-limit-price-adjustment flex w-full items-center gap-2 rounded-agg-lg bg-agg-warning/10 px-3 py-2",
|
|
14481
14556
|
role: "status",
|
|
14482
14557
|
"aria-live": "polite",
|
|
14483
14558
|
children: [
|
|
14484
|
-
/* @__PURE__ */ (0,
|
|
14559
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14485
14560
|
Icon,
|
|
14486
14561
|
{
|
|
14487
14562
|
name: "warning-filled",
|
|
@@ -14490,16 +14565,16 @@ var PlaceOrder = ({
|
|
|
14490
14565
|
"aria-hidden": "true"
|
|
14491
14566
|
}
|
|
14492
14567
|
),
|
|
14493
|
-
/* @__PURE__ */ (0,
|
|
14568
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "min-w-0 flex-1 wrap-break-word text-agg-sm leading-agg-5 text-agg-foreground", children: limitPriceAdjustmentMessage })
|
|
14494
14569
|
]
|
|
14495
14570
|
}
|
|
14496
14571
|
) : null,
|
|
14497
|
-
/* @__PURE__ */ (0,
|
|
14498
|
-
/* @__PURE__ */ (0,
|
|
14499
|
-
/* @__PURE__ */ (0,
|
|
14500
|
-
isAuthenticated ? isSell ? /* @__PURE__ */ (0,
|
|
14501
|
-
/* @__PURE__ */ (0,
|
|
14502
|
-
displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0,
|
|
14572
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-section flex items-start justify-between gap-4", children: [
|
|
14573
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-amount-meta flex flex-col", children: [
|
|
14574
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-amount-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground whitespace-nowrap", children: tradingLabels.amount(internalTab) }),
|
|
14575
|
+
isAuthenticated ? isSell ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-balance-value flex items-baseline gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isCurrentSellableSharesLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
|
|
14576
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "whitespace-pre", children: displayedCurrentSellableSharesLabel }),
|
|
14577
|
+
displayedCurrentSellableShares > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14503
14578
|
"button",
|
|
14504
14579
|
{
|
|
14505
14580
|
type: "button",
|
|
@@ -14515,9 +14590,9 @@ var PlaceOrder = ({
|
|
|
14515
14590
|
children: tradingLabels.maxShares
|
|
14516
14591
|
}
|
|
14517
14592
|
) : null
|
|
14518
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
14593
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-balance-value flex items-center gap-2 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isBalanceLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(LoadingIcon, { size: "small" }) : tradingLabels.balance(formatUsd(displayedBalance)) }) : null
|
|
14519
14594
|
] }),
|
|
14520
|
-
/* @__PURE__ */ (0,
|
|
14595
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14521
14596
|
CurrencyInput,
|
|
14522
14597
|
{
|
|
14523
14598
|
value: internalAmount,
|
|
@@ -14539,9 +14614,9 @@ var PlaceOrder = ({
|
|
|
14539
14614
|
}
|
|
14540
14615
|
)
|
|
14541
14616
|
] }),
|
|
14542
|
-
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0,
|
|
14543
|
-
/* @__PURE__ */ (0,
|
|
14544
|
-
/* @__PURE__ */ (0,
|
|
14617
|
+
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && estimatedFeesValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-fees-section flex items-center justify-between gap-4", children: [
|
|
14618
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
14619
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14545
14620
|
Typography,
|
|
14546
14621
|
{
|
|
14547
14622
|
variant: "text-sm",
|
|
@@ -14549,7 +14624,7 @@ var PlaceOrder = ({
|
|
|
14549
14624
|
children: tradingLabels.estimatedFees
|
|
14550
14625
|
}
|
|
14551
14626
|
),
|
|
14552
|
-
feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0,
|
|
14627
|
+
feeBreakdownRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14553
14628
|
Tooltip,
|
|
14554
14629
|
{
|
|
14555
14630
|
"aria-label": tradingLabels.estimatedFeesTooltipAria,
|
|
@@ -14561,13 +14636,13 @@ var PlaceOrder = ({
|
|
|
14561
14636
|
icon: "h-3 w-3 text-agg-muted-foreground",
|
|
14562
14637
|
trigger: "h-3 w-3 text-agg-muted-foreground"
|
|
14563
14638
|
},
|
|
14564
|
-
content: /* @__PURE__ */ (0,
|
|
14639
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "flex w-full flex-col gap-2", children: feeBreakdownRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14565
14640
|
"div",
|
|
14566
14641
|
{
|
|
14567
14642
|
className: "flex items-center justify-between gap-3 text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground",
|
|
14568
14643
|
children: [
|
|
14569
|
-
/* @__PURE__ */ (0,
|
|
14570
|
-
row.kind === "badge" ? /* @__PURE__ */ (0,
|
|
14644
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: row.label }),
|
|
14645
|
+
row.kind === "badge" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14571
14646
|
"span",
|
|
14572
14647
|
{
|
|
14573
14648
|
className: cn(
|
|
@@ -14577,7 +14652,7 @@ var PlaceOrder = ({
|
|
|
14577
14652
|
),
|
|
14578
14653
|
children: row.badgeLabel
|
|
14579
14654
|
}
|
|
14580
|
-
) : /* @__PURE__ */ (0,
|
|
14655
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-right", children: row.value })
|
|
14581
14656
|
]
|
|
14582
14657
|
},
|
|
14583
14658
|
row.label
|
|
@@ -14585,11 +14660,11 @@ var PlaceOrder = ({
|
|
|
14585
14660
|
}
|
|
14586
14661
|
) : null
|
|
14587
14662
|
] }),
|
|
14588
|
-
/* @__PURE__ */ (0,
|
|
14663
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: estimatedFeesValue })
|
|
14589
14664
|
] }) : null,
|
|
14590
|
-
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0,
|
|
14591
|
-
/* @__PURE__ */ (0,
|
|
14592
|
-
/* @__PURE__ */ (0,
|
|
14665
|
+
showFeesBreakdown && hasEnteredAmount && !isBelowMinimum && executionReserveValue ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-reserve-section flex items-center justify-between gap-4", children: [
|
|
14666
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
14667
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14593
14668
|
Typography,
|
|
14594
14669
|
{
|
|
14595
14670
|
variant: "text-sm",
|
|
@@ -14597,7 +14672,7 @@ var PlaceOrder = ({
|
|
|
14597
14672
|
children: tradingLabels.executionReserve
|
|
14598
14673
|
}
|
|
14599
14674
|
),
|
|
14600
|
-
/* @__PURE__ */ (0,
|
|
14675
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14601
14676
|
Tooltip,
|
|
14602
14677
|
{
|
|
14603
14678
|
"aria-label": tradingLabels.executionReserveTooltipAria,
|
|
@@ -14610,18 +14685,18 @@ var PlaceOrder = ({
|
|
|
14610
14685
|
}
|
|
14611
14686
|
)
|
|
14612
14687
|
] }),
|
|
14613
|
-
/* @__PURE__ */ (0,
|
|
14688
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: executionReserveValue })
|
|
14614
14689
|
] }) : null
|
|
14615
14690
|
] }),
|
|
14616
|
-
shouldShowSmartRouting ? /* @__PURE__ */ (0,
|
|
14691
|
+
shouldShowSmartRouting ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14617
14692
|
"div",
|
|
14618
14693
|
{
|
|
14619
14694
|
className: "agg-route-panel flex flex-col gap-3",
|
|
14620
14695
|
"aria-busy": !isLimitOrder && isQuoteLoading,
|
|
14621
14696
|
children: [
|
|
14622
|
-
/* @__PURE__ */ (0,
|
|
14623
|
-
/* @__PURE__ */ (0,
|
|
14624
|
-
shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0,
|
|
14697
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-panel-header flex items-center justify-between gap-4", children: [
|
|
14698
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-route-panel-title text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.smartRouting }),
|
|
14699
|
+
shouldShowRouteToggle && !isRoutesExpanded ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14625
14700
|
"button",
|
|
14626
14701
|
{
|
|
14627
14702
|
type: "button",
|
|
@@ -14629,8 +14704,8 @@ var PlaceOrder = ({
|
|
|
14629
14704
|
"aria-label": tradingLabels.viewAllRoutes(activeRouteCardCount),
|
|
14630
14705
|
onClick: () => setIsRoutesExpanded((currentValue) => !currentValue),
|
|
14631
14706
|
children: [
|
|
14632
|
-
/* @__PURE__ */ (0,
|
|
14633
|
-
/* @__PURE__ */ (0,
|
|
14707
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { children: tradingLabels.viewAllRoutes(activeRouteCardCount) }),
|
|
14708
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14634
14709
|
Icon,
|
|
14635
14710
|
{
|
|
14636
14711
|
name: "chevron-down",
|
|
@@ -14643,11 +14718,11 @@ var PlaceOrder = ({
|
|
|
14643
14718
|
}
|
|
14644
14719
|
) : null
|
|
14645
14720
|
] }),
|
|
14646
|
-
/* @__PURE__ */ (0,
|
|
14647
|
-
/* @__PURE__ */ (0,
|
|
14648
|
-
/* @__PURE__ */ (0,
|
|
14721
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "agg-route-list flex flex-col gap-2", children: !isLimitOrder && isQuoteLoading && activeRouteCards.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-route-loading flex flex-col gap-2", "aria-hidden": "true", children: [
|
|
14722
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {}),
|
|
14723
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(PlaceOrderRouteCardSkeleton, {})
|
|
14649
14724
|
] }) : activeRouteCards.length > 0 ? activeRouteCards.map((card) => {
|
|
14650
|
-
return /* @__PURE__ */ (0,
|
|
14725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react17.Fragment, { children: renderRouteCard({
|
|
14651
14726
|
card,
|
|
14652
14727
|
enableAnimations,
|
|
14653
14728
|
isExpanded: card.kind === "split" ? isSplitDetailOpen : isRoutesExpanded,
|
|
@@ -14660,15 +14735,15 @@ var PlaceOrder = ({
|
|
|
14660
14735
|
]
|
|
14661
14736
|
}
|
|
14662
14737
|
) : null,
|
|
14663
|
-
isLimitOrder ? /* @__PURE__ */ (0,
|
|
14664
|
-
/* @__PURE__ */ (0,
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14738
|
+
isLimitOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-limit-expiration-section flex items-center justify-between gap-4", children: [
|
|
14739
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.expiration }),
|
|
14740
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14666
14741
|
Popover.Root,
|
|
14667
14742
|
{
|
|
14668
14743
|
open: isLimitExpirationPickerOpen,
|
|
14669
14744
|
onOpenChange: handleLimitExpirationPickerOpenChange,
|
|
14670
14745
|
children: [
|
|
14671
|
-
/* @__PURE__ */ (0,
|
|
14746
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14672
14747
|
"button",
|
|
14673
14748
|
{
|
|
14674
14749
|
ref: expirationTriggerRef,
|
|
@@ -14676,10 +14751,10 @@ var PlaceOrder = ({
|
|
|
14676
14751
|
className: "flex min-w-0 cursor-pointer items-center justify-end gap-2 text-right text-agg-base leading-agg-6 text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary",
|
|
14677
14752
|
"aria-label": tradingLabels.expirationMenuAria,
|
|
14678
14753
|
children: [
|
|
14679
|
-
/* @__PURE__ */ (0,
|
|
14754
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "min-w-0 truncate", children: limitExpirationType === "GTC" ? tradingLabels.expirationGoodTilCanceled : limitExpirationType === "FIVE_MINUTES" ? tradingLabels.expirationFiveMinutes : limitExpirationType === "ONE_HOUR" ? tradingLabels.expirationOneHour : limitExpirationType === "END_OF_DAY" ? tradingLabels.expirationEndOfDay : resolvedCustomExpirationDate ? (0, import_dayjs5.default)(resolvedCustomExpirationDate).format(
|
|
14680
14755
|
"MMM D, YYYY [at] HH:mm"
|
|
14681
14756
|
) : tradingLabels.expirationCustom }),
|
|
14682
|
-
/* @__PURE__ */ (0,
|
|
14757
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14683
14758
|
Icon,
|
|
14684
14759
|
{
|
|
14685
14760
|
name: isLimitExpirationPickerOpen ? "chevron-up" : "chevron-down",
|
|
@@ -14691,11 +14766,11 @@ var PlaceOrder = ({
|
|
|
14691
14766
|
]
|
|
14692
14767
|
}
|
|
14693
14768
|
) }),
|
|
14694
|
-
/* @__PURE__ */ (0,
|
|
14769
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14695
14770
|
Popover.Portal,
|
|
14696
14771
|
{
|
|
14697
14772
|
container: resolvePlaceOrderPortalContainer(expirationTriggerRef.current),
|
|
14698
|
-
children: /* @__PURE__ */ (0,
|
|
14773
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14699
14774
|
Popover.Content,
|
|
14700
14775
|
{
|
|
14701
14776
|
align: "end",
|
|
@@ -14704,14 +14779,14 @@ var PlaceOrder = ({
|
|
|
14704
14779
|
role: "dialog",
|
|
14705
14780
|
"aria-label": tradingLabels.expirationMenuAria,
|
|
14706
14781
|
className: "z-50 max-h-[calc(100dvh-2rem)] w-[min(312px,calc(100vw-2rem))] overflow-y-auto rounded-agg-xl border border-agg-separator bg-agg-secondary p-0 shadow-[0_8px_16px_rgba(0,0,0,0.20)]",
|
|
14707
|
-
children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0,
|
|
14708
|
-
/* @__PURE__ */ (0,
|
|
14782
|
+
children: limitExpirationPickerView === "calendar" ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex flex-col gap-3 p-4", children: [
|
|
14783
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14709
14784
|
Button,
|
|
14710
14785
|
{
|
|
14711
14786
|
variant: "tertiary",
|
|
14712
14787
|
size: "small",
|
|
14713
14788
|
className: "w-fit px-0",
|
|
14714
|
-
prefix: /* @__PURE__ */ (0,
|
|
14789
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14715
14790
|
Icon,
|
|
14716
14791
|
{
|
|
14717
14792
|
name: "chevron-left",
|
|
@@ -14724,7 +14799,7 @@ var PlaceOrder = ({
|
|
|
14724
14799
|
children: tradingLabels.expirationOptions
|
|
14725
14800
|
}
|
|
14726
14801
|
),
|
|
14727
|
-
/* @__PURE__ */ (0,
|
|
14802
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14728
14803
|
Calendar,
|
|
14729
14804
|
{
|
|
14730
14805
|
mode: "single",
|
|
@@ -14739,9 +14814,9 @@ var PlaceOrder = ({
|
|
|
14739
14814
|
}
|
|
14740
14815
|
}
|
|
14741
14816
|
),
|
|
14742
|
-
/* @__PURE__ */ (0,
|
|
14743
|
-
/* @__PURE__ */ (0,
|
|
14744
|
-
/* @__PURE__ */ (0,
|
|
14817
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
14818
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex shrink-0 flex-col gap-0.5", children: [
|
|
14819
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14745
14820
|
"label",
|
|
14746
14821
|
{
|
|
14747
14822
|
htmlFor: expirationTimeInputId,
|
|
@@ -14749,9 +14824,9 @@ var PlaceOrder = ({
|
|
|
14749
14824
|
children: tradingLabels.expirationStartTime
|
|
14750
14825
|
}
|
|
14751
14826
|
),
|
|
14752
|
-
/* @__PURE__ */ (0,
|
|
14827
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-xs leading-agg-4 text-agg-foreground", children: tradingLabels.expirationStartTimeHint })
|
|
14753
14828
|
] }),
|
|
14754
|
-
/* @__PURE__ */ (0,
|
|
14829
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14755
14830
|
"input",
|
|
14756
14831
|
{
|
|
14757
14832
|
id: expirationTimeInputId,
|
|
@@ -14762,8 +14837,8 @@ var PlaceOrder = ({
|
|
|
14762
14837
|
}
|
|
14763
14838
|
)
|
|
14764
14839
|
] }),
|
|
14765
|
-
/* @__PURE__ */ (0,
|
|
14766
|
-
/* @__PURE__ */ (0,
|
|
14840
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "flex gap-2", children: [
|
|
14841
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14767
14842
|
Button,
|
|
14768
14843
|
{
|
|
14769
14844
|
variant: "secondary",
|
|
@@ -14773,13 +14848,13 @@ var PlaceOrder = ({
|
|
|
14773
14848
|
children: tradingLabels.expirationCancel
|
|
14774
14849
|
}
|
|
14775
14850
|
),
|
|
14776
|
-
/* @__PURE__ */ (0,
|
|
14851
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14777
14852
|
Button,
|
|
14778
14853
|
{
|
|
14779
14854
|
size: "small",
|
|
14780
14855
|
className: "min-w-0 flex-1",
|
|
14781
14856
|
disabled: !isLimitExpirationDraftValid,
|
|
14782
|
-
prefix: /* @__PURE__ */ (0,
|
|
14857
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14783
14858
|
Icon,
|
|
14784
14859
|
{
|
|
14785
14860
|
name: "success-check",
|
|
@@ -14793,7 +14868,7 @@ var PlaceOrder = ({
|
|
|
14793
14868
|
}
|
|
14794
14869
|
)
|
|
14795
14870
|
] })
|
|
14796
|
-
] }) : /* @__PURE__ */ (0,
|
|
14871
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14797
14872
|
"div",
|
|
14798
14873
|
{
|
|
14799
14874
|
role: "radiogroup",
|
|
@@ -14811,7 +14886,7 @@ var PlaceOrder = ({
|
|
|
14811
14886
|
{ value: "ONE_HOUR", label: tradingLabels.expirationOneHour },
|
|
14812
14887
|
{ value: "END_OF_DAY", label: tradingLabels.expirationEndOfDay },
|
|
14813
14888
|
{ value: "CUSTOM", label: tradingLabels.expirationCustom }
|
|
14814
|
-
].map((item, optionIndex) => /* @__PURE__ */ (0,
|
|
14889
|
+
].map((item, optionIndex) => /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14815
14890
|
"button",
|
|
14816
14891
|
{
|
|
14817
14892
|
ref: (element) => {
|
|
@@ -14828,14 +14903,14 @@ var PlaceOrder = ({
|
|
|
14828
14903
|
onClick: () => handleLimitExpirationTypeChange(item.value),
|
|
14829
14904
|
onKeyDown: (event) => handleLimitExpirationOptionKeyDown(event, optionIndex),
|
|
14830
14905
|
children: [
|
|
14831
|
-
limitExpirationType === item.value ? /* @__PURE__ */ (0,
|
|
14906
|
+
limitExpirationType === item.value ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14832
14907
|
"span",
|
|
14833
14908
|
{
|
|
14834
14909
|
className: "absolute bottom-2 left-0 top-2 w-1 bg-agg-primary",
|
|
14835
14910
|
"aria-hidden": true
|
|
14836
14911
|
}
|
|
14837
14912
|
) : null,
|
|
14838
|
-
/* @__PURE__ */ (0,
|
|
14913
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "truncate", children: item.label })
|
|
14839
14914
|
]
|
|
14840
14915
|
},
|
|
14841
14916
|
item.value
|
|
@@ -14850,12 +14925,12 @@ var PlaceOrder = ({
|
|
|
14850
14925
|
}
|
|
14851
14926
|
)
|
|
14852
14927
|
] }) : null,
|
|
14853
|
-
hasEnteredAmount && (isLimitOrder ? limitOrderPayload : selectedRouteCard) && !isQuoteLoading && !isBelowMinimum && orderEligibility.canPlaceOrder ? /* @__PURE__ */ (0,
|
|
14854
|
-
/* @__PURE__ */ (0,
|
|
14855
|
-
/* @__PURE__ */ (0,
|
|
14856
|
-
/* @__PURE__ */ (0,
|
|
14928
|
+
hasEnteredAmount && (isLimitOrder ? limitOrderPayload : selectedRouteCard) && !isQuoteLoading && !isBelowMinimum && orderEligibility.canPlaceOrder ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-summary flex items-start justify-between gap-4", children: [
|
|
14929
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-summary-meta flex flex-col", children: [
|
|
14930
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-summary-label text-agg-base font-agg-bold leading-agg-6 text-agg-foreground", children: tradingLabels.toWin(internalTab) }),
|
|
14931
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-summary-hint text-agg-sm leading-agg-5 text-agg-muted-foreground", children: isLimitOrder ? displayedLimitToWinHint : displayedToWinHint })
|
|
14857
14932
|
] }),
|
|
14858
|
-
/* @__PURE__ */ (0,
|
|
14933
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14859
14934
|
import_react16.default,
|
|
14860
14935
|
{
|
|
14861
14936
|
value: isLimitOrder ? displayedLimitToWinValue : displayedToWinValue,
|
|
@@ -14870,7 +14945,7 @@ var PlaceOrder = ({
|
|
|
14870
14945
|
}
|
|
14871
14946
|
)
|
|
14872
14947
|
] }) : null,
|
|
14873
|
-
/* @__PURE__ */ (0,
|
|
14948
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14874
14949
|
"div",
|
|
14875
14950
|
{
|
|
14876
14951
|
className: cn(
|
|
@@ -14878,17 +14953,17 @@ var PlaceOrder = ({
|
|
|
14878
14953
|
classNames == null ? void 0 : classNames.footer
|
|
14879
14954
|
),
|
|
14880
14955
|
children: [
|
|
14881
|
-
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
14882
|
-
submissionFeedback ? /* @__PURE__ */ (0,
|
|
14956
|
+
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-alerts flex flex-col gap-3 empty:hidden mb-3", children: [
|
|
14957
|
+
submissionFeedback ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14883
14958
|
InlineAlert,
|
|
14884
14959
|
{
|
|
14885
14960
|
tone: submissionFeedback.tone,
|
|
14886
14961
|
message: submissionFeedback.message
|
|
14887
14962
|
}
|
|
14888
14963
|
) : null,
|
|
14889
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0,
|
|
14890
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0,
|
|
14891
|
-
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0,
|
|
14964
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && isBelowMinimum ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: "error", message: belowMinimumMessage }) : null,
|
|
14965
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && quoteStatus ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(InlineAlert, { tone: quoteStatus.tone, message: quoteStatus.message }) : null,
|
|
14966
|
+
!submissionFeedback && orderEligibility.canPlaceOrder && !isInsufficientBalance && !isBelowMinimum && !quoteStatus && hasEnteredAmount && smartRouteErrorMessage ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14892
14967
|
InlineAlert,
|
|
14893
14968
|
{
|
|
14894
14969
|
tone: "error",
|
|
@@ -14900,14 +14975,14 @@ var PlaceOrder = ({
|
|
|
14900
14975
|
}
|
|
14901
14976
|
) : null
|
|
14902
14977
|
] }) : null,
|
|
14903
|
-
!submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0,
|
|
14978
|
+
!submissionFeedback && !shouldShowGeoBlockBanner && orderEligibility.canPlaceOrder && !needsSharedKycVerification && !needsKalshiConnection && shouldShowInsufficientBalanceAlert ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
|
|
14904
14979
|
"div",
|
|
14905
14980
|
{
|
|
14906
14981
|
className: "agg-order-insufficient-balance-alert flex items-center justify-center gap-2",
|
|
14907
14982
|
role: "status",
|
|
14908
14983
|
"aria-live": "polite",
|
|
14909
14984
|
children: [
|
|
14910
|
-
/* @__PURE__ */ (0,
|
|
14985
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14911
14986
|
Icon,
|
|
14912
14987
|
{
|
|
14913
14988
|
name: "warning-filled",
|
|
@@ -14916,8 +14991,8 @@ var PlaceOrder = ({
|
|
|
14916
14991
|
"aria-hidden": "true"
|
|
14917
14992
|
}
|
|
14918
14993
|
),
|
|
14919
|
-
/* @__PURE__ */ (0,
|
|
14920
|
-
insufficientBalanceDetails ? /* @__PURE__ */ (0,
|
|
14994
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "text-agg-sm text-agg-foreground", children: tradingLabels.insufficientBalance }),
|
|
14995
|
+
insufficientBalanceDetails ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14921
14996
|
Tooltip,
|
|
14922
14997
|
{
|
|
14923
14998
|
"aria-label": tradingLabels.insufficientBalanceDetails,
|
|
@@ -14933,7 +15008,7 @@ var PlaceOrder = ({
|
|
|
14933
15008
|
]
|
|
14934
15009
|
}
|
|
14935
15010
|
) : null,
|
|
14936
|
-
!submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0,
|
|
15011
|
+
!submissionFeedback && !shouldShowGeoBlockBanner && needsSharedKycVerification ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14937
15012
|
Button,
|
|
14938
15013
|
{
|
|
14939
15014
|
size: "large",
|
|
@@ -14947,7 +15022,7 @@ var PlaceOrder = ({
|
|
|
14947
15022
|
},
|
|
14948
15023
|
children: sharedKyc.status === "loading" ? tradingLabels.sharedKyc.checkingStatus : tradingLabels.sharedKyc.completeToTrade
|
|
14949
15024
|
}
|
|
14950
|
-
) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0,
|
|
15025
|
+
) : !submissionFeedback && !shouldShowGeoBlockBanner && needsKalshiConnection ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14951
15026
|
Button,
|
|
14952
15027
|
{
|
|
14953
15028
|
size: "large",
|
|
@@ -14957,7 +15032,7 @@ var PlaceOrder = ({
|
|
|
14957
15032
|
onClick: () => setIsConnectKalshiModalOpen(true),
|
|
14958
15033
|
children: tradingLabels.connectKalshi
|
|
14959
15034
|
}
|
|
14960
|
-
) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0,
|
|
15035
|
+
) : !submissionFeedback && !shouldShowGeoBlockBanner && isInsufficientBalance ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14961
15036
|
Button,
|
|
14962
15037
|
{
|
|
14963
15038
|
size: "large",
|
|
@@ -14967,7 +15042,7 @@ var PlaceOrder = ({
|
|
|
14967
15042
|
onClick: handleDepositRequiredClick,
|
|
14968
15043
|
children: isKalshiBalanceInsufficient ? tradingLabels.addFundsToKalshi : tradingLabels.deposit
|
|
14969
15044
|
}
|
|
14970
|
-
) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0,
|
|
15045
|
+
) : isQuoteLoading && !isActionLoading ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14971
15046
|
Button,
|
|
14972
15047
|
{
|
|
14973
15048
|
size: "large",
|
|
@@ -14976,7 +15051,7 @@ var PlaceOrder = ({
|
|
|
14976
15051
|
disabled: true,
|
|
14977
15052
|
"aria-live": "polite",
|
|
14978
15053
|
"aria-label": routeLoadingMessage != null ? routeLoadingMessage : labels.common.loading,
|
|
14979
|
-
prefix: /* @__PURE__ */ (0,
|
|
15054
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14980
15055
|
"span",
|
|
14981
15056
|
{
|
|
14982
15057
|
className: cn(
|
|
@@ -14988,7 +15063,7 @@ var PlaceOrder = ({
|
|
|
14988
15063
|
),
|
|
14989
15064
|
children: routeLoadingMessage
|
|
14990
15065
|
}
|
|
14991
|
-
) : !isAuthenticated ? /* @__PURE__ */ (0,
|
|
15066
|
+
) : !isAuthenticated ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
14992
15067
|
Button,
|
|
14993
15068
|
{
|
|
14994
15069
|
size: "large",
|
|
@@ -14996,10 +15071,10 @@ var PlaceOrder = ({
|
|
|
14996
15071
|
className: "agg-order-submit h-12 w-full px-8 text-agg-base leading-agg-6 shadow-none",
|
|
14997
15072
|
disabled: !orderEligibility.canPlaceOrder || shouldShowGeoBlockBanner,
|
|
14998
15073
|
"aria-label": tradingLabels.signInToTrade,
|
|
14999
|
-
onClick:
|
|
15074
|
+
onClick: import_hooks41.requestAggAuthChooserOpen,
|
|
15000
15075
|
children: tradingLabels.signInToTrade
|
|
15001
15076
|
}
|
|
15002
|
-
) : /* @__PURE__ */ (0,
|
|
15077
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15003
15078
|
Button,
|
|
15004
15079
|
{
|
|
15005
15080
|
size: "large",
|
|
@@ -15014,7 +15089,7 @@ var PlaceOrder = ({
|
|
|
15014
15089
|
children: actionLabel
|
|
15015
15090
|
}
|
|
15016
15091
|
),
|
|
15017
|
-
shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0,
|
|
15092
|
+
shouldShowLowLiquidityWarning ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15018
15093
|
InlineAlert,
|
|
15019
15094
|
{
|
|
15020
15095
|
tone: "warning",
|
|
@@ -15023,8 +15098,8 @@ var PlaceOrder = ({
|
|
|
15023
15098
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
15024
15099
|
}
|
|
15025
15100
|
) : null,
|
|
15026
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0,
|
|
15027
|
-
/* @__PURE__ */ (0,
|
|
15101
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
15102
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15028
15103
|
Icon,
|
|
15029
15104
|
{
|
|
15030
15105
|
name: "shield-trust",
|
|
@@ -15033,10 +15108,10 @@ var PlaceOrder = ({
|
|
|
15033
15108
|
"aria-hidden": "true"
|
|
15034
15109
|
}
|
|
15035
15110
|
),
|
|
15036
|
-
/* @__PURE__ */ (0,
|
|
15111
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Typography, { variant: "text-xs-caps", className: "text-agg-primary", children: tradingLabels.platformFee })
|
|
15037
15112
|
] }) : null,
|
|
15038
|
-
shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
15039
|
-
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0,
|
|
15113
|
+
shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(GeoBlockBanner, { termsUrl: AGG_TERMS_OF_SERVICE_URL }) : null,
|
|
15114
|
+
!shouldShowGeoBlockBanner ? /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("p", { className: "agg-order-disclaimer text-center text-agg-xs leading-agg-4 text-agg-muted-foreground", children: tradingLabels.disclaimer }) : null
|
|
15040
15115
|
]
|
|
15041
15116
|
}
|
|
15042
15117
|
)
|
|
@@ -15044,7 +15119,7 @@ var PlaceOrder = ({
|
|
|
15044
15119
|
]
|
|
15045
15120
|
}
|
|
15046
15121
|
),
|
|
15047
|
-
/* @__PURE__ */ (0,
|
|
15122
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15048
15123
|
SharedKycModal,
|
|
15049
15124
|
{
|
|
15050
15125
|
open: sharedKycFlow.isModalOpen,
|
|
@@ -15058,7 +15133,7 @@ var PlaceOrder = ({
|
|
|
15058
15133
|
}
|
|
15059
15134
|
}
|
|
15060
15135
|
),
|
|
15061
|
-
/* @__PURE__ */ (0,
|
|
15136
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15062
15137
|
ConnectKalshiModal,
|
|
15063
15138
|
{
|
|
15064
15139
|
open: isConnectKalshiModalOpen,
|
|
@@ -15066,16 +15141,16 @@ var PlaceOrder = ({
|
|
|
15066
15141
|
onVerify: handleVerifyKalshi
|
|
15067
15142
|
}
|
|
15068
15143
|
),
|
|
15069
|
-
/* @__PURE__ */ (0,
|
|
15144
|
+
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(FundKalshiModal, { open: isFundKalshiModalOpen, onOpenChange: setIsFundKalshiModalOpen })
|
|
15070
15145
|
] });
|
|
15071
15146
|
};
|
|
15072
15147
|
PlaceOrder.displayName = "PlaceOrder";
|
|
15073
15148
|
|
|
15074
15149
|
// src/trading/trading-context/index.tsx
|
|
15075
|
-
var
|
|
15150
|
+
var import_hooks42 = require("@agg-build/hooks");
|
|
15076
15151
|
|
|
15077
15152
|
// src/trading/use-claim-winnings.ts
|
|
15078
|
-
var
|
|
15153
|
+
var import_hooks43 = require("@agg-build/hooks");
|
|
15079
15154
|
var import_react18 = require("react");
|
|
15080
15155
|
var toClaimError = (err) => {
|
|
15081
15156
|
if (err instanceof Error) return err;
|
|
@@ -15083,11 +15158,11 @@ var toClaimError = (err) => {
|
|
|
15083
15158
|
};
|
|
15084
15159
|
function useClaimWinnings(options = {}) {
|
|
15085
15160
|
const { onClaim, onClaimResult, onClaimSubmitError, externalClaimingKeys } = options;
|
|
15086
|
-
const labels = (0,
|
|
15161
|
+
const labels = (0, import_hooks43.useLabels)();
|
|
15087
15162
|
const claimNotificationLabels = labels.notifications.claim;
|
|
15088
15163
|
const toastCtx = useOptionalToast();
|
|
15089
|
-
const queryClient = (0,
|
|
15090
|
-
const redeemMutation = (0,
|
|
15164
|
+
const queryClient = (0, import_hooks43.useQueryClient)();
|
|
15165
|
+
const redeemMutation = (0, import_hooks43.useRedeem)();
|
|
15091
15166
|
const [activeRedeems, setActiveRedeems] = (0, import_react18.useState)({});
|
|
15092
15167
|
const activeClaimKeysRef = (0, import_react18.useRef)(/* @__PURE__ */ new Set());
|
|
15093
15168
|
const pendingClaimToastIdsRef = (0, import_react18.useRef)({});
|
|
@@ -15097,7 +15172,7 @@ function useClaimWinnings(options = {}) {
|
|
|
15097
15172
|
() => Object.values(activeRedeems),
|
|
15098
15173
|
[activeRedeems]
|
|
15099
15174
|
);
|
|
15100
|
-
const lifecycleStates = (0,
|
|
15175
|
+
const lifecycleStates = (0, import_hooks43.useRedeemLifecycles)(lifecycleInputs);
|
|
15101
15176
|
const internalClaimingIds = (0, import_react18.useMemo)(() => {
|
|
15102
15177
|
const out = __spreadValues({}, submittingClaimKeys);
|
|
15103
15178
|
for (const [claimKey, active] of Object.entries(activeRedeems)) {
|
|
@@ -15112,13 +15187,13 @@ function useClaimWinnings(options = {}) {
|
|
|
15112
15187
|
[externalClaimingKeys, internalClaimingIds]
|
|
15113
15188
|
);
|
|
15114
15189
|
const invalidateClaimUiState = (0, import_react18.useCallback)(() => {
|
|
15115
|
-
(0,
|
|
15116
|
-
(0,
|
|
15190
|
+
(0, import_hooks43.invalidateBalanceQueries)(queryClient);
|
|
15191
|
+
(0, import_hooks43.invalidatePositionQueries)(queryClient);
|
|
15117
15192
|
queryClient.invalidateQueries({
|
|
15118
|
-
queryKey:
|
|
15193
|
+
queryKey: import_hooks43.executionKeys.claimablePositionsCount(),
|
|
15119
15194
|
refetchType: "active"
|
|
15120
15195
|
});
|
|
15121
|
-
(0,
|
|
15196
|
+
(0, import_hooks43.invalidateUserActivityQueries)(queryClient);
|
|
15122
15197
|
}, [queryClient]);
|
|
15123
15198
|
const claim = (0, import_react18.useCallback)(
|
|
15124
15199
|
(_0) => __async(null, [_0], function* ({ claimKey, winningOutcomeIds, payload }) {
|
|
@@ -15315,7 +15390,7 @@ function useClaimWinnings(options = {}) {
|
|
|
15315
15390
|
}
|
|
15316
15391
|
|
|
15317
15392
|
// src/trading/use-resolved-market-claim.ts
|
|
15318
|
-
var
|
|
15393
|
+
var import_hooks44 = require("@agg-build/hooks");
|
|
15319
15394
|
var import_react19 = require("react");
|
|
15320
15395
|
var sharesFormatter = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
|
|
15321
15396
|
var dateFormatter = new Intl.DateTimeFormat("en-US", {
|
|
@@ -15332,12 +15407,12 @@ var formatResolutionDate = (value) => {
|
|
|
15332
15407
|
function useResolvedMarketClaim(options = {}) {
|
|
15333
15408
|
var _a;
|
|
15334
15409
|
const { market, enabled = true, executionMode } = options;
|
|
15335
|
-
const { isAuthenticated } = (0,
|
|
15336
|
-
const tradingState = (0, import_react19.useMemo)(() => (0,
|
|
15410
|
+
const { isAuthenticated } = (0, import_hooks44.useAggAuthState)();
|
|
15411
|
+
const tradingState = (0, import_react19.useMemo)(() => (0, import_hooks44.resolveMarketTradingState)(market), [market]);
|
|
15337
15412
|
const isResolved = tradingState.kind === "resolved";
|
|
15338
15413
|
const marketId = (_a = market == null ? void 0 : market.id) != null ? _a : null;
|
|
15339
15414
|
const shouldFetch = Boolean(enabled && isAuthenticated && isResolved && marketId);
|
|
15340
|
-
const { positions } = (0,
|
|
15415
|
+
const { positions } = (0, import_hooks44.useExecutionPositions)(__spreadValues({
|
|
15341
15416
|
enabled: shouldFetch,
|
|
15342
15417
|
status: "active",
|
|
15343
15418
|
limit: 50
|
|
@@ -15354,7 +15429,7 @@ function useResolvedMarketClaim(options = {}) {
|
|
|
15354
15429
|
(outcome) => outcome.winner === true && outcome.totalSize > 0
|
|
15355
15430
|
);
|
|
15356
15431
|
if (winningOutcomes.length === 0) return void 0;
|
|
15357
|
-
const totals = (0,
|
|
15432
|
+
const totals = (0, import_hooks44.computeClosedPositionTotals)(group);
|
|
15358
15433
|
const winningShares = winningOutcomes.reduce((sum, outcome) => sum + outcome.totalSize, 0);
|
|
15359
15434
|
const winningOutcomeLabel = (_a2 = resolveResolvedOutcomeLabel({
|
|
15360
15435
|
market: market != null ? market : group.venueMarket,
|