@agg-build/ui 2.1.2 → 2.1.4

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.
Files changed (65) hide show
  1. package/dist/{chunk-ZOECARZW.mjs → chunk-BW7S2YR3.mjs} +798 -312
  2. package/dist/{chunk-7ZR5JYB3.mjs → chunk-FLESSOSU.mjs} +2077 -533
  3. package/dist/{chunk-5RBHMMY3.mjs → chunk-R2YNZJZ3.mjs} +69 -27
  4. package/dist/{chunk-75AMJAWR.mjs → chunk-T4YZGAYS.mjs} +22 -1
  5. package/dist/{chunk-JJDYOBVG.mjs → chunk-TBZWRUFB.mjs} +654 -560
  6. package/dist/{chunk-TBD3N4T4.mjs → chunk-VP76G6PN.mjs} +41 -41
  7. package/dist/{chunk-NRNBJPYK.mjs → chunk-XHE2VO3S.mjs} +4 -21
  8. package/dist/events.js +776 -638
  9. package/dist/events.mjs +5 -3
  10. package/dist/index.js +5665 -3867
  11. package/dist/index.mjs +112 -455
  12. package/dist/modals.mjs +3 -3
  13. package/dist/pages.js +8330 -6452
  14. package/dist/pages.mjs +6 -6
  15. package/dist/primitives.js +40 -41
  16. package/dist/primitives.mjs +1 -1
  17. package/dist/styles.css +1 -1
  18. package/dist/tailwind.css +1 -1
  19. package/dist/trading.js +652 -415
  20. package/dist/trading.mjs +4 -4
  21. package/dist/types/events/item/event-list-item.utils.d.mts +1 -25
  22. package/dist/types/events/item/event-list-item.utils.d.ts +1 -25
  23. package/dist/types/events/item-details/index.d.mts +2 -1
  24. package/dist/types/events/item-details/index.d.ts +2 -1
  25. package/dist/types/events/market-details/market-details-graph-panel.d.mts +39 -0
  26. package/dist/types/events/market-details/market-details-graph-panel.d.ts +39 -0
  27. package/dist/types/events/market-details/market-details-outcome-button.d.mts +2 -1
  28. package/dist/types/events/market-details/market-details-outcome-button.d.ts +2 -1
  29. package/dist/types/events/market-details/market-details.types.d.mts +31 -0
  30. package/dist/types/events/market-details/market-details.types.d.ts +31 -0
  31. package/dist/types/events/market-details/market-details.utils.d.mts +3 -16
  32. package/dist/types/events/market-details/market-details.utils.d.ts +3 -16
  33. package/dist/types/events/shared/format-event-title.d.mts +1 -2
  34. package/dist/types/events/shared/format-event-title.d.ts +1 -2
  35. package/dist/types/events/shared/format-sports-event-time.d.mts +2 -0
  36. package/dist/types/events/shared/format-sports-event-time.d.ts +2 -0
  37. package/dist/types/notifications/agg-notification-events-provider.d.mts +10 -1
  38. package/dist/types/notifications/agg-notification-events-provider.d.ts +10 -1
  39. package/dist/types/pages/event-market/event-market.shared.d.mts +30 -0
  40. package/dist/types/pages/event-market/event-market.shared.d.ts +30 -0
  41. package/dist/types/pages/event-market/sports-event-market-page.d.mts +8 -0
  42. package/dist/types/pages/event-market/sports-event-market-page.d.ts +8 -0
  43. package/dist/types/pages/event-market/sports-event-market.fixtures.d.mts +13 -0
  44. package/dist/types/pages/event-market/sports-event-market.fixtures.d.ts +13 -0
  45. package/dist/types/pages/event-market/sports-event-market.utils.d.mts +156 -0
  46. package/dist/types/pages/event-market/sports-event-market.utils.d.ts +156 -0
  47. package/dist/types/pages/event-market/sports-line-rail.d.mts +17 -0
  48. package/dist/types/pages/event-market/sports-line-rail.d.ts +17 -0
  49. package/dist/types/pages/event-market/sports-market-card.d.mts +22 -0
  50. package/dist/types/pages/event-market/sports-market-card.d.ts +22 -0
  51. package/dist/types/pages/event-market/sports-markets.d.mts +13 -0
  52. package/dist/types/pages/event-market/sports-markets.d.ts +13 -0
  53. package/dist/types/primitives/search/search.utils.d.mts +1 -3
  54. package/dist/types/primitives/search/search.utils.d.ts +1 -3
  55. package/dist/types/primitives/state-message/index.d.mts +1 -1
  56. package/dist/types/primitives/state-message/index.d.ts +1 -1
  57. package/dist/types/primitives/state-message/state-message.types.d.mts +1 -1
  58. package/dist/types/primitives/state-message/state-message.types.d.ts +1 -1
  59. package/dist/types/trading/place-order/index.d.mts +1 -1
  60. package/dist/types/trading/place-order/index.d.ts +1 -1
  61. package/dist/types/trading/place-order/index.place-order.types.d.mts +7 -0
  62. package/dist/types/trading/place-order/index.place-order.types.d.ts +7 -0
  63. package/dist/types/trading/settlement/settlement-text.utils.d.mts +5 -2
  64. package/dist/types/trading/settlement/settlement-text.utils.d.ts +5 -2
  65. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  UserProfilePage,
12
12
  buildAggTxExplorerHref,
13
13
  useHomePageModals
14
- } from "./chunk-7ZR5JYB3.mjs";
14
+ } from "./chunk-FLESSOSU.mjs";
15
15
  import {
16
16
  EventList,
17
17
  EventListItem,
@@ -26,8 +26,9 @@ import {
26
26
  collectEligibleVenueOutcomes,
27
27
  mergeVenueOutcomeOrderbooks,
28
28
  orderbookRowLimitDefault,
29
+ resolveEventDetailsSyncKey,
29
30
  useCenterOrderbookSpread
30
- } from "./chunk-JJDYOBVG.mjs";
31
+ } from "./chunk-TBZWRUFB.mjs";
31
32
  import {
32
33
  CARD_NETWORK_OPTIONS,
33
34
  ConnectAccountsStep,
@@ -42,10 +43,10 @@ import {
42
43
  WithdrawModal,
43
44
  buildTerminalSummary,
44
45
  clearPendingCardSession,
45
- getPendingCardSession,
46
- subscribeAggDepositNotification
47
- } from "./chunk-NRNBJPYK.mjs";
46
+ getPendingCardSession
47
+ } from "./chunk-XHE2VO3S.mjs";
48
48
  import {
49
+ AggNotificationEventsProvider,
49
50
  DEPOSIT_MODAL_OPEN_EVENT,
50
51
  PlaceOrder,
51
52
  PlaceOrderFailureView,
@@ -58,7 +59,7 @@ import {
58
59
  requestAggWithdrawModalOpen,
59
60
  useClaimWinnings,
60
61
  useResolvedMarketClaim
61
- } from "./chunk-ZOECARZW.mjs";
62
+ } from "./chunk-BW7S2YR3.mjs";
62
63
  import {
63
64
  SETTLEMENT_SECTION_ID,
64
65
  Settlement,
@@ -76,10 +77,10 @@ import {
76
77
  resolveOrderBookRows,
77
78
  resolveUnifiedOrderBookEntries,
78
79
  useEventTradingContext
79
- } from "./chunk-5RBHMMY3.mjs";
80
+ } from "./chunk-R2YNZJZ3.mjs";
80
81
  import {
81
82
  GeoBlockBanner
82
- } from "./chunk-75AMJAWR.mjs";
83
+ } from "./chunk-T4YZGAYS.mjs";
83
84
  import {
84
85
  AGG_DEFAULT_URL,
85
86
  AGG_DOCS_URL,
@@ -199,355 +200,10 @@ import {
199
200
  useOptionalToast,
200
201
  useToast,
201
202
  venueLogoNames
202
- } from "./chunk-TBD3N4T4.mjs";
203
-
204
- // src/notifications/agg-notification-events-provider.tsx
205
- import {
206
- useAggAuthState,
207
- useAggLabels,
208
- useAggUiConfig,
209
- useOnOrderEvent,
210
- useOnWithdrawalLifecycle,
211
- useOptionalAggClient,
212
- useUserActivity
213
- } from "@agg-build/hooks";
214
- import { useCallback, useEffect, useRef } from "react";
215
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
216
- function AggNotificationEventsProvider({
217
- children,
218
- enabled = true,
219
- depositActivityLimit = 25
220
- }) {
221
- const aggClient = useOptionalAggClient();
222
- if (!aggClient) {
223
- return /* @__PURE__ */ jsx(Fragment, { children });
224
- }
225
- return /* @__PURE__ */ jsxs(Fragment, { children: [
226
- /* @__PURE__ */ jsx(AggNotificationEventsBridge, { enabled, depositActivityLimit }),
227
- children
228
- ] });
229
- }
230
- var TERMINAL_ORDER_EVENTS = /* @__PURE__ */ new Set(["filled", "partial_fill", "failed"]);
231
- var TERMINAL_WITHDRAWAL_STATUSES = /* @__PURE__ */ new Set([
232
- "completed",
233
- "partial",
234
- "failed"
235
- ]);
236
- var isTerminalWithdrawalStatus = (value) => TERMINAL_WITHDRAWAL_STATUSES.has(value);
237
- var MICRO_UNITS_SCALE = 1e6;
238
- var formatScaledMicroAmount = (value) => {
239
- if (!value) return void 0;
240
- if (value.includes(".")) {
241
- const parsed = Number(value);
242
- if (!Number.isFinite(parsed)) return void 0;
243
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
244
- }
245
- try {
246
- const raw = BigInt(value);
247
- const whole = raw / BigInt(MICRO_UNITS_SCALE);
248
- const remainder = raw % BigInt(MICRO_UNITS_SCALE);
249
- const parsed = Number(whole) + Number(remainder) / MICRO_UNITS_SCALE;
250
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
251
- } catch (e) {
252
- const parsed = Number(value);
253
- if (!Number.isFinite(parsed)) return void 0;
254
- return (parsed / MICRO_UNITS_SCALE).toLocaleString("en-US", { maximumFractionDigits: 2 });
255
- }
256
- };
257
- var formatDecimalAmount = (value) => {
258
- if (!value) return void 0;
259
- const parsed = Number(value.replace(/,/g, ""));
260
- if (!Number.isFinite(parsed)) return value;
261
- return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
262
- };
263
- var formatPriceCents = (value) => {
264
- if (!value) return void 0;
265
- const parsed = Number(value);
266
- if (!Number.isFinite(parsed)) return void 0;
267
- const cents = parsed * 100;
268
- const display = cents.toLocaleString("en-US", {
269
- minimumFractionDigits: 0,
270
- maximumFractionDigits: 1
271
- });
272
- return `${display}\xA2`;
273
- };
274
- var formatSharesLabel = (raw) => {
275
- const formatted = formatScaledMicroAmount(raw);
276
- if (!formatted) return void 0;
277
- return `${formatted} shares`;
278
- };
279
- var capitalize = (value) => {
280
- if (!value) return void 0;
281
- return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
282
- };
283
- var venueLabelFor = (venueKey, labels) => {
284
- var _a;
285
- if (!venueKey) return void 0;
286
- const normalized = venueKey.toLowerCase();
287
- const lookup = labels.venues;
288
- return (_a = lookup[normalized]) != null ? _a : capitalize(venueKey);
289
- };
290
- function AggNotificationEventsBridge({ enabled, depositActivityLimit }) {
291
- var _a;
292
- const toastCtx = useOptionalToast();
293
- const { user, isAuthenticated } = useAggAuthState();
294
- const labels = useAggLabels();
295
- const { features } = useAggUiConfig();
296
- const notificationsFeatureEnabled = features.enableNotifications !== false;
297
- const effectivelyEnabled = enabled && notificationsFeatureEnabled;
298
- const currentUserId = (_a = user == null ? void 0 : user.id) != null ? _a : null;
299
- const firedKeysRef = useRef(/* @__PURE__ */ new Set());
300
- const depositStatusesRef = useRef(/* @__PURE__ */ new Map());
301
- const hasSeededDepositStatusesRef = useRef(false);
302
- const recentClientDepositFingerprintsRef = useRef(/* @__PURE__ */ new Map());
303
- const lastUserIdRef = useRef("uninitialized");
304
- useEffect(() => {
305
- if (lastUserIdRef.current === currentUserId) return;
306
- lastUserIdRef.current = currentUserId;
307
- firedKeysRef.current = /* @__PURE__ */ new Set();
308
- depositStatusesRef.current = /* @__PURE__ */ new Map();
309
- hasSeededDepositStatusesRef.current = false;
310
- recentClientDepositFingerprintsRef.current = /* @__PURE__ */ new Map();
311
- }, [currentUserId]);
312
- const fireOnce = useCallback(
313
- (key, tone, title, message, detail) => {
314
- if (!effectivelyEnabled) return;
315
- const toast = toastCtx == null ? void 0 : toastCtx.toast;
316
- if (!toast) return;
317
- if (firedKeysRef.current.has(key)) return;
318
- firedKeysRef.current.add(key);
319
- toast(message, { tone, title, detail });
320
- },
321
- [effectivelyEnabled, toastCtx]
322
- );
323
- const orderEventCallback = useCallback(
324
- (event) => {
325
- if (!effectivelyEnabled || !isAuthenticated) return;
326
- if (!currentUserId || event.userId !== currentUserId) return;
327
- if (!TERMINAL_ORDER_EVENTS.has(event.event)) return;
328
- handleOrderEvent({ event, labels, fireOnce });
329
- },
330
- [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
331
- );
332
- useOnOrderEvent(orderEventCallback);
333
- const withdrawalCallback = useCallback(
334
- (event) => {
335
- if (!effectivelyEnabled || !isAuthenticated) return;
336
- if (!currentUserId || event.userId !== currentUserId) return;
337
- if (!event.terminal) return;
338
- if (!isTerminalWithdrawalStatus(event.status)) return;
339
- handleWithdrawalEvent({ event, labels, fireOnce });
340
- },
341
- [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
342
- );
343
- useOnWithdrawalLifecycle(withdrawalCallback);
344
- useEffect(() => {
345
- if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
346
- return subscribeAggDepositNotification((event) => {
347
- handleClientDepositNotification({
348
- event,
349
- labels,
350
- fireOnce,
351
- recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current
352
- });
353
- });
354
- }, [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]);
355
- const depositActivity = useUserActivity({
356
- type: "deposit",
357
- limit: depositActivityLimit,
358
- enabled: effectivelyEnabled && isAuthenticated && currentUserId !== null
359
- });
360
- const depositActivities = depositActivity.activities;
361
- useEffect(() => {
362
- if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
363
- if (!depositActivity.isSuccess) return;
364
- handleDepositActivities({
365
- deposits: depositActivities,
366
- previousStatuses: depositStatusesRef.current,
367
- hasSeededStatuses: hasSeededDepositStatusesRef.current,
368
- labels,
369
- fireOnce,
370
- shouldSuppressToast: (status, amountLabel, tokenLabel) => hasRecentClientDepositNotification({
371
- recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current,
372
- status,
373
- amountLabel,
374
- tokenLabel
375
- })
376
- });
377
- hasSeededDepositStatusesRef.current = true;
378
- }, [
379
- currentUserId,
380
- depositActivities,
381
- depositActivity.isSuccess,
382
- effectivelyEnabled,
383
- fireOnce,
384
- isAuthenticated,
385
- labels
386
- ]);
387
- return null;
388
- }
389
- function handleOrderEvent({ event, labels, fireOnce }) {
390
- var _a, _b;
391
- const venueLabel = venueLabelFor(event.venue, labels);
392
- const amountLabel = formatSharesLabel((_a = event.actualSharesRaw) != null ? _a : event.filledAmountRaw);
393
- const priceLabel = formatPriceCents((_b = event.executionPriceRaw) != null ? _b : event.quotedPriceRaw);
394
- if (event.event === "filled") {
395
- fireOnce(
396
- `order:${event.orderId}:filled`,
397
- "success",
398
- labels.notifications.order.filledTitle,
399
- labels.notifications.order.filledMessage({ venueLabel, amountLabel, priceLabel })
400
- );
401
- return;
402
- }
403
- if (event.event === "partial_fill") {
404
- fireOnce(
405
- `order:${event.orderId}:partial_fill`,
406
- "warning",
407
- labels.notifications.order.partialFilledTitle,
408
- labels.notifications.order.partialFilledMessage({ venueLabel, amountLabel, priceLabel })
409
- );
410
- return;
411
- }
412
- if (event.event === "failed") {
413
- fireOnce(
414
- `order:${event.orderId}:failed`,
415
- "error",
416
- labels.notifications.order.failedTitle,
417
- labels.notifications.order.failedMessage(event.errorReason),
418
- venueLabel
419
- );
420
- }
421
- }
422
- function handleWithdrawalEvent({ event, labels, fireOnce }) {
423
- var _a;
424
- const amountLabel = formatScaledMicroAmount((_a = event.completedAmountRaw) != null ? _a : event.requestedAmountRaw);
425
- if (event.status === "completed") {
426
- fireOnce(
427
- `withdrawal:${event.withdrawalId}:completed`,
428
- "success",
429
- labels.notifications.withdrawal.completedTitle,
430
- labels.notifications.withdrawal.completedMessage({ amountLabel })
431
- );
432
- return;
433
- }
434
- if (event.status === "partial") {
435
- fireOnce(
436
- `withdrawal:${event.withdrawalId}:partial`,
437
- "warning",
438
- labels.notifications.withdrawal.partialTitle,
439
- labels.notifications.withdrawal.partialMessage({ amountLabel })
440
- );
441
- return;
442
- }
443
- if (event.status === "failed") {
444
- fireOnce(
445
- `withdrawal:${event.withdrawalId}:failed`,
446
- "error",
447
- labels.notifications.withdrawal.failedTitle,
448
- labels.notifications.withdrawal.failedMessage(event.errorMessage)
449
- );
450
- }
451
- }
452
- var DEPOSIT_COMPLETED_STATUSES = /* @__PURE__ */ new Set(["completed", "confirmed", "succeeded", "success"]);
453
- var DEPOSIT_FAILED_STATUSES = /* @__PURE__ */ new Set(["failed", "errored", "rejected"]);
454
- var CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS = 2 * 60 * 1e3;
455
- var isTerminalDepositStatus = (status) => DEPOSIT_COMPLETED_STATUSES.has(status) || DEPOSIT_FAILED_STATUSES.has(status);
456
- var getDepositNotificationFingerprint = ({
457
- status,
458
- amountLabel,
459
- tokenLabel
460
- }) => `${status}:${amountLabel != null ? amountLabel : ""}:${tokenLabel != null ? tokenLabel : ""}`.toLowerCase();
461
- var hasRecentClientDepositNotification = ({
462
- recentClientDepositFingerprints,
463
- status,
464
- amountLabel,
465
- tokenLabel
466
- }) => {
467
- const fingerprint = getDepositNotificationFingerprint({ status, amountLabel, tokenLabel });
468
- const lastNotifiedAt = recentClientDepositFingerprints.get(fingerprint);
469
- if (!lastNotifiedAt) return false;
470
- if (Date.now() - lastNotifiedAt <= CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS) {
471
- return true;
472
- }
473
- recentClientDepositFingerprints.delete(fingerprint);
474
- return false;
475
- };
476
- function handleClientDepositNotification({
477
- event,
478
- labels,
479
- fireOnce,
480
- recentClientDepositFingerprints
481
- }) {
482
- var _a, _b, _c;
483
- const amountLabel = formatDecimalAmount(event.amount);
484
- const tokenLabel = event.tokenSymbol;
485
- const fingerprint = getDepositNotificationFingerprint({
486
- status: event.status,
487
- amountLabel,
488
- tokenLabel
489
- });
490
- recentClientDepositFingerprints.set(fingerprint, Date.now());
491
- if (event.status === "completed") {
492
- fireOnce(
493
- `deposit-client:${(_a = event.id) != null ? _a : fingerprint}:completed`,
494
- "success",
495
- labels.notifications.deposit.completedTitle,
496
- labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
497
- );
498
- return;
499
- }
500
- fireOnce(
501
- `deposit-client:${(_b = event.id) != null ? _b : fingerprint}:failed`,
502
- "error",
503
- labels.notifications.deposit.failedTitle,
504
- (_c = event.errorMessage) != null ? _c : labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
505
- );
506
- }
507
- function handleDepositActivities({
508
- deposits,
509
- previousStatuses,
510
- hasSeededStatuses,
511
- labels,
512
- fireOnce,
513
- shouldSuppressToast
514
- }) {
515
- for (const item of deposits) {
516
- if (item.type !== "deposit") continue;
517
- const deposit = item;
518
- const status = deposit.status.toLowerCase();
519
- const isCompleted = DEPOSIT_COMPLETED_STATUSES.has(status);
520
- const isFailed = DEPOSIT_FAILED_STATUSES.has(status);
521
- const previousStatus = previousStatuses.get(deposit.id);
522
- previousStatuses.set(deposit.id, status);
523
- if (!hasSeededStatuses) continue;
524
- if (!previousStatus) continue;
525
- if (isTerminalDepositStatus(previousStatus)) continue;
526
- if (!isCompleted && !isFailed) continue;
527
- const amountLabel = formatScaledMicroAmount(deposit.amountRaw);
528
- const tokenLabel = deposit.tokenSymbol;
529
- const terminalStatus = isCompleted ? "completed" : "failed";
530
- if (shouldSuppressToast == null ? void 0 : shouldSuppressToast(terminalStatus, amountLabel, tokenLabel)) continue;
531
- if (isCompleted) {
532
- fireOnce(
533
- `deposit:${deposit.id}:completed`,
534
- "success",
535
- labels.notifications.deposit.completedTitle,
536
- labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
537
- );
538
- } else {
539
- fireOnce(
540
- `deposit:${deposit.id}:failed`,
541
- "error",
542
- labels.notifications.deposit.failedTitle,
543
- labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
544
- );
545
- }
546
- }
547
- }
203
+ } from "./chunk-VP76G6PN.mjs";
548
204
 
549
205
  // src/notifications/agg-toast-provider.tsx
550
- import { jsx as jsx2 } from "react/jsx-runtime";
206
+ import { jsx } from "react/jsx-runtime";
551
207
  function AggToastProvider(_a) {
552
208
  var _b = _a, {
553
209
  children,
@@ -558,17 +214,17 @@ function AggToastProvider(_a) {
558
214
  "disableAggNotifications",
559
215
  "notificationDepositActivityLimit"
560
216
  ]);
561
- return /* @__PURE__ */ jsx2(ToastProvider, __spreadProps(__spreadValues({}, toastProps), { children: disableAggNotifications ? children : /* @__PURE__ */ jsx2(AggNotificationEventsProvider, { depositActivityLimit: notificationDepositActivityLimit, children }) }));
217
+ return /* @__PURE__ */ jsx(ToastProvider, __spreadProps(__spreadValues({}, toastProps), { children: disableAggNotifications ? children : /* @__PURE__ */ jsx(AggNotificationEventsProvider, { depositActivityLimit: notificationDepositActivityLimit, children }) }));
562
218
  }
563
219
 
564
220
  // src/agg-provider.tsx
565
221
  import {
566
222
  AggProvider as AggSdkProvider
567
223
  } from "@agg-build/hooks";
568
- import { jsx as jsx3 } from "react/jsx-runtime";
224
+ import { jsx as jsx2 } from "react/jsx-runtime";
569
225
  function AggProvider(_a) {
570
226
  var _b = _a, { children, toast } = _b, providerProps = __objRest(_b, ["children", "toast"]);
571
- return /* @__PURE__ */ jsx3(AggSdkProvider, __spreadProps(__spreadValues({}, providerProps), { children: /* @__PURE__ */ jsx3(AggToastProvider, __spreadProps(__spreadValues({}, toast), { children })) }));
227
+ return /* @__PURE__ */ jsx2(AggSdkProvider, __spreadProps(__spreadValues({}, providerProps), { children: /* @__PURE__ */ jsx2(AggToastProvider, __spreadProps(__spreadValues({}, toast), { children })) }));
572
228
  }
573
229
 
574
230
  // src/auth/connect-button-view/index.tsx
@@ -648,11 +304,11 @@ var avatarRootClassName = cn(
648
304
  var avatarIconClassName = cn("h-[66%] w-[66%] text-agg-muted-foreground");
649
305
 
650
306
  // src/auth/connect-button-view/index.tsx
651
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
307
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
652
308
  var WalletAvatar = ({ className }) => {
653
309
  const { isAuthenticated, user } = useAggAuthContext();
654
310
  if (isAuthenticated && (user == null ? void 0 : user.avatarUrl)) {
655
- return /* @__PURE__ */ jsx4(
311
+ return /* @__PURE__ */ jsx3(
656
312
  "img",
657
313
  {
658
314
  src: optimizedImageUrl(user.avatarUrl, 44),
@@ -661,7 +317,7 @@ var WalletAvatar = ({ className }) => {
661
317
  }
662
318
  );
663
319
  }
664
- return /* @__PURE__ */ jsx4(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
320
+ return /* @__PURE__ */ jsx3(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
665
321
  };
666
322
  var AuthMethodActionButton = ({
667
323
  activeMethodId,
@@ -675,7 +331,7 @@ var AuthMethodActionButton = ({
675
331
  const labels = useLabels();
676
332
  const isMethodLoading = activeMethodId === method.id;
677
333
  const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
678
- return /* @__PURE__ */ jsxs2(
334
+ return /* @__PURE__ */ jsxs(
679
335
  "button",
680
336
  {
681
337
  type: "button",
@@ -685,7 +341,7 @@ var AuthMethodActionButton = ({
685
341
  "aria-label": labels.auth.signInWithMethod(method.label),
686
342
  onClick: () => onSelect(method.id),
687
343
  children: [
688
- isMethodLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx4(
344
+ isMethodLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx3(
689
345
  Icon,
690
346
  {
691
347
  name: (_a = method.iconName) != null ? _a : "profile",
@@ -694,7 +350,7 @@ var AuthMethodActionButton = ({
694
350
  title: renderLabel ? void 0 : method.label
695
351
  }
696
352
  ),
697
- renderLabel ? /* @__PURE__ */ jsx4("span", { children: labels.auth.connect(method.label) }) : null
353
+ renderLabel ? /* @__PURE__ */ jsx3("span", { children: labels.auth.connect(method.label) }) : null
698
354
  ]
699
355
  }
700
356
  );
@@ -723,8 +379,8 @@ var UnauthenticatedConnectView = ({
723
379
  const labels = useLabels();
724
380
  const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
725
381
  const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
726
- return /* @__PURE__ */ jsxs2("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
727
- /* @__PURE__ */ jsx4(
382
+ return /* @__PURE__ */ jsxs("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
383
+ /* @__PURE__ */ jsx3(
728
384
  Button,
729
385
  __spreadProps(__spreadValues({
730
386
  variant: "primary",
@@ -737,8 +393,8 @@ var UnauthenticatedConnectView = ({
737
393
  children: labels.auth.connect()
738
394
  })
739
395
  ),
740
- notice ? /* @__PURE__ */ jsx4("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
741
- /* @__PURE__ */ jsx4(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs2(
396
+ notice ? /* @__PURE__ */ jsx3("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
397
+ /* @__PURE__ */ jsx3(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs(
742
398
  Modal.Container,
743
399
  {
744
400
  maxWidth: "400px",
@@ -747,7 +403,7 @@ var UnauthenticatedConnectView = ({
747
403
  },
748
404
  "aria-label": challengeContent ? "Security Check" : labels.auth.signIn,
749
405
  children: [
750
- /* @__PURE__ */ jsx4(
406
+ /* @__PURE__ */ jsx3(
751
407
  Modal.Header,
752
408
  {
753
409
  title: challengeContent ? "Security Check" : labels.auth.signIn,
@@ -759,8 +415,8 @@ var UnauthenticatedConnectView = ({
759
415
  }
760
416
  }
761
417
  ),
762
- /* @__PURE__ */ jsx4(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs2("div", { className: authMethodsListClassName, children: [
763
- emailMethod ? /* @__PURE__ */ jsxs2(
418
+ /* @__PURE__ */ jsx3(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs("div", { className: authMethodsListClassName, children: [
419
+ emailMethod ? /* @__PURE__ */ jsxs(
764
420
  "form",
765
421
  {
766
422
  className: authSectionClassName,
@@ -769,8 +425,8 @@ var UnauthenticatedConnectView = ({
769
425
  onEmailSubmit();
770
426
  },
771
427
  children: [
772
- /* @__PURE__ */ jsxs2("div", { className: authInputFormClassName, children: [
773
- /* @__PURE__ */ jsx4(
428
+ /* @__PURE__ */ jsxs("div", { className: authInputFormClassName, children: [
429
+ /* @__PURE__ */ jsx3(
774
430
  "input",
775
431
  {
776
432
  id: "agg-auth-email",
@@ -783,7 +439,7 @@ var UnauthenticatedConnectView = ({
783
439
  disabled: disabled || isBusy || !emailMethod.isAvailable
784
440
  }
785
441
  ),
786
- /* @__PURE__ */ jsx4(
442
+ /* @__PURE__ */ jsx3(
787
443
  Button,
788
444
  {
789
445
  type: "submit",
@@ -796,8 +452,8 @@ var UnauthenticatedConnectView = ({
796
452
  }
797
453
  )
798
454
  ] }),
799
- emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx4("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
800
- !emailMethod.isAvailable ? /* @__PURE__ */ jsx4(
455
+ emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx3("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
456
+ !emailMethod.isAvailable ? /* @__PURE__ */ jsx3(
801
457
  InlineAlert,
802
458
  {
803
459
  tone: "warning",
@@ -806,7 +462,7 @@ var UnauthenticatedConnectView = ({
806
462
  className: classNames == null ? void 0 : classNames.authError
807
463
  }
808
464
  ) : null,
809
- emailError ? /* @__PURE__ */ jsx4(
465
+ emailError ? /* @__PURE__ */ jsx3(
810
466
  InlineAlert,
811
467
  {
812
468
  tone: "error",
@@ -817,8 +473,8 @@ var UnauthenticatedConnectView = ({
817
473
  ]
818
474
  }
819
475
  ) : null,
820
- socialMethods.length > 0 ? /* @__PURE__ */ jsxs2("div", { className: authSectionClassName, children: [
821
- /* @__PURE__ */ jsx4("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx4(
476
+ socialMethods.length > 0 ? /* @__PURE__ */ jsxs("div", { className: authSectionClassName, children: [
477
+ /* @__PURE__ */ jsx3("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx3(
822
478
  AuthMethodActionButton,
823
479
  {
824
480
  activeMethodId,
@@ -830,18 +486,18 @@ var UnauthenticatedConnectView = ({
830
486
  },
831
487
  method.id
832
488
  )) }),
833
- /* @__PURE__ */ jsxs2("p", { className: authHelperTextClassName, children: [
489
+ /* @__PURE__ */ jsxs("p", { className: authHelperTextClassName, children: [
834
490
  labels.auth.socialWalletNotice,
835
491
  " ",
836
- /* @__PURE__ */ jsx4("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
492
+ /* @__PURE__ */ jsx3("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
837
493
  ] })
838
494
  ] }) : null,
839
- showWalletDivider ? /* @__PURE__ */ jsxs2("div", { className: authDividerClassName, children: [
840
- /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName }),
841
- /* @__PURE__ */ jsx4("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
842
- /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName })
495
+ showWalletDivider ? /* @__PURE__ */ jsxs("div", { className: authDividerClassName, children: [
496
+ /* @__PURE__ */ jsx3("div", { className: authDividerLineClassName }),
497
+ /* @__PURE__ */ jsx3("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
498
+ /* @__PURE__ */ jsx3("div", { className: authDividerLineClassName })
843
499
  ] }) : null,
844
- walletMethods.length > 0 ? /* @__PURE__ */ jsx4("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx4("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx4(
500
+ walletMethods.length > 0 ? /* @__PURE__ */ jsx3("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx3("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx3(
845
501
  AuthMethodActionButton,
846
502
  {
847
503
  activeMethodId,
@@ -852,10 +508,10 @@ var UnauthenticatedConnectView = ({
852
508
  },
853
509
  method.id
854
510
  )) }) }) : null,
855
- /* @__PURE__ */ jsxs2("p", { className: authLegalTextClassName, children: [
511
+ /* @__PURE__ */ jsxs("p", { className: authLegalTextClassName, children: [
856
512
  labels.auth.legalNoticePrefix,
857
513
  " ",
858
- /* @__PURE__ */ jsx4(
514
+ /* @__PURE__ */ jsx3(
859
515
  "a",
860
516
  {
861
517
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -868,7 +524,7 @@ var UnauthenticatedConnectView = ({
868
524
  " ",
869
525
  labels.auth.legalNoticeSeparator,
870
526
  " ",
871
- /* @__PURE__ */ jsx4(
527
+ /* @__PURE__ */ jsx3(
872
528
  "a",
873
529
  {
874
530
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -880,7 +536,7 @@ var UnauthenticatedConnectView = ({
880
536
  ),
881
537
  "."
882
538
  ] }),
883
- errorMessage ? /* @__PURE__ */ jsx4(
539
+ errorMessage ? /* @__PURE__ */ jsx3(
884
540
  InlineAlert,
885
541
  {
886
542
  tone: "error",
@@ -955,7 +611,7 @@ var AuthConnectButtonView = ({
955
611
  classNames == null ? void 0 : classNames.profileMenuActionItem
956
612
  );
957
613
  if (!isAuthenticated) {
958
- return /* @__PURE__ */ jsx4(
614
+ return /* @__PURE__ */ jsx3(
959
615
  UnauthenticatedConnectView,
960
616
  {
961
617
  activeMethodId,
@@ -979,21 +635,21 @@ var AuthConnectButtonView = ({
979
635
  }
980
636
  );
981
637
  }
982
- return /* @__PURE__ */ jsx4("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs2("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
983
- /* @__PURE__ */ jsxs2("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
984
- /* @__PURE__ */ jsx4("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx4(
638
+ return /* @__PURE__ */ jsx3("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
639
+ /* @__PURE__ */ jsxs("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
640
+ /* @__PURE__ */ jsx3("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx3(
985
641
  ConditionalWrapper,
986
642
  {
987
643
  condition: isDepositBlocked,
988
- wrapper: (children) => /* @__PURE__ */ jsx4(
644
+ wrapper: (children) => /* @__PURE__ */ jsx3(
989
645
  Tooltip,
990
646
  {
991
- content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
647
+ content: /* @__PURE__ */ jsx3("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
992
648
  sideOffset: 4,
993
649
  children
994
650
  }
995
651
  ),
996
- children: /* @__PURE__ */ jsx4(
652
+ children: /* @__PURE__ */ jsx3(
997
653
  Button,
998
654
  __spreadProps(__spreadValues({
999
655
  variant: "primary",
@@ -1006,17 +662,17 @@ var AuthConnectButtonView = ({
1006
662
  )
1007
663
  }
1008
664
  ) }),
1009
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1010
- /* @__PURE__ */ jsx4("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx4(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
1011
- /* @__PURE__ */ jsx4("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
1012
- claimReadyCount > 0 ? /* @__PURE__ */ jsx4(
665
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
666
+ /* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
667
+ /* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
668
+ claimReadyCount > 0 ? /* @__PURE__ */ jsx3(
1013
669
  Tooltip,
1014
670
  {
1015
671
  size: "medium",
1016
672
  classNames: { content: "px-5 py-4" },
1017
- content: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center gap-2", children: [
1018
- /* @__PURE__ */ jsx4("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
1019
- onClaimWinningsClick ? /* @__PURE__ */ jsxs2(
673
+ content: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
674
+ /* @__PURE__ */ jsx3("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
675
+ onClaimWinningsClick ? /* @__PURE__ */ jsxs(
1020
676
  "button",
1021
677
  {
1022
678
  type: "button",
@@ -1024,7 +680,7 @@ var AuthConnectButtonView = ({
1024
680
  onClick: onClaimWinningsClick,
1025
681
  children: [
1026
682
  claimWinningsLabel,
1027
- /* @__PURE__ */ jsx4(
683
+ /* @__PURE__ */ jsx3(
1028
684
  Icon,
1029
685
  {
1030
686
  name: "arrow-right",
@@ -1037,7 +693,7 @@ var AuthConnectButtonView = ({
1037
693
  }
1038
694
  ) : null
1039
695
  ] }),
1040
- children: /* @__PURE__ */ jsx4(
696
+ children: /* @__PURE__ */ jsx3(
1041
697
  "span",
1042
698
  {
1043
699
  className: cn(
@@ -1054,13 +710,13 @@ var AuthConnectButtonView = ({
1054
710
  }
1055
711
  ) : null
1056
712
  ] }),
1057
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1058
- /* @__PURE__ */ jsx4("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx4(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
1059
- /* @__PURE__ */ jsx4("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
713
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
714
+ /* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
715
+ /* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1060
716
  ] })
1061
717
  ] }),
1062
- /* @__PURE__ */ jsxs2(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
1063
- /* @__PURE__ */ jsx4(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
718
+ /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
719
+ /* @__PURE__ */ jsx3(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1064
720
  "button",
1065
721
  {
1066
722
  type: "button",
@@ -1078,8 +734,8 @@ var AuthConnectButtonView = ({
1078
734
  disabled,
1079
735
  "aria-label": labels.auth.walletMenuFor(resolvedProfileLabel),
1080
736
  children: [
1081
- /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-5! md:size-6!" }),
1082
- /* @__PURE__ */ jsx4(
737
+ /* @__PURE__ */ jsx3(WalletAvatar, { className: "size-5! md:size-6!" }),
738
+ /* @__PURE__ */ jsx3(
1083
739
  Typography,
1084
740
  {
1085
741
  variant: "body-strong",
@@ -1090,7 +746,7 @@ var AuthConnectButtonView = ({
1090
746
  children: resolvedProfileLabel
1091
747
  }
1092
748
  ),
1093
- /* @__PURE__ */ jsx4(
749
+ /* @__PURE__ */ jsx3(
1094
750
  Icon,
1095
751
  {
1096
752
  name: isProfileMenuOpen ? "chevron-up" : "chevron-down",
@@ -1102,14 +758,14 @@ var AuthConnectButtonView = ({
1102
758
  ]
1103
759
  }
1104
760
  ) }),
1105
- /* @__PURE__ */ jsx4(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx4(
761
+ /* @__PURE__ */ jsx3(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx3(
1106
762
  DropdownMenu.Content,
1107
763
  {
1108
764
  className: cn(AGG_ROOT_CLASS_NAME, rootClassName, "z-50 outline-none"),
1109
765
  "data-agg-animations": enableAnimations ? "true" : "false",
1110
766
  sideOffset: 4,
1111
767
  align: "end",
1112
- children: /* @__PURE__ */ jsxs2(
768
+ children: /* @__PURE__ */ jsxs(
1113
769
  "div",
1114
770
  {
1115
771
  className: cn(
@@ -1119,7 +775,7 @@ var AuthConnectButtonView = ({
1119
775
  classNames == null ? void 0 : classNames.profileMenuContent
1120
776
  ),
1121
777
  children: [
1122
- /* @__PURE__ */ jsxs2(
778
+ /* @__PURE__ */ jsxs(
1123
779
  "button",
1124
780
  {
1125
781
  type: "button",
@@ -1137,15 +793,15 @@ var AuthConnectButtonView = ({
1137
793
  },
1138
794
  disabled,
1139
795
  children: [
1140
- /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
1141
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-3", children: [
1142
- /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-11" }),
1143
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
1144
- /* @__PURE__ */ jsx4("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left truncate", children: resolvedProfileLabel }),
1145
- addressLabel ? /* @__PURE__ */ jsx4("p", { className: "w-full text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground text-left", children: addressLabel }) : null
796
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
797
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
798
+ /* @__PURE__ */ jsx3(WalletAvatar, { className: "size-11" }),
799
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
800
+ /* @__PURE__ */ jsx3("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left truncate", children: resolvedProfileLabel }),
801
+ addressLabel ? /* @__PURE__ */ jsx3("p", { className: "w-full text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground text-left", children: addressLabel }) : null
1146
802
  ] })
1147
803
  ] }),
1148
- /* @__PURE__ */ jsx4(
804
+ /* @__PURE__ */ jsx3(
1149
805
  Icon,
1150
806
  {
1151
807
  name: "arrow-right",
@@ -1155,10 +811,10 @@ var AuthConnectButtonView = ({
1155
811
  }
1156
812
  )
1157
813
  ] }),
1158
- /* @__PURE__ */ jsxs2("div", { className: "md:hidden flex w-full items-start gap-5", children: [
1159
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1160
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1161
- /* @__PURE__ */ jsx4(
814
+ /* @__PURE__ */ jsxs("div", { className: "md:hidden flex w-full items-start gap-5", children: [
815
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
816
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
817
+ /* @__PURE__ */ jsx3(
1162
818
  Icon,
1163
819
  {
1164
820
  name: "wallet-filled",
@@ -1166,13 +822,13 @@ var AuthConnectButtonView = ({
1166
822
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
1167
823
  }
1168
824
  ),
1169
- /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
825
+ /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
1170
826
  ] }),
1171
- /* @__PURE__ */ jsx4("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
827
+ /* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1172
828
  ] }),
1173
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1174
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1175
- /* @__PURE__ */ jsx4(
829
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
830
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
831
+ /* @__PURE__ */ jsx3(
1176
832
  Icon,
1177
833
  {
1178
834
  name: "activity-chart",
@@ -1180,85 +836,85 @@ var AuthConnectButtonView = ({
1180
836
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
1181
837
  }
1182
838
  ),
1183
- /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
839
+ /* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
1184
840
  ] }),
1185
- /* @__PURE__ */ jsx4("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
841
+ /* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
1186
842
  ] })
1187
843
  ] })
1188
844
  ]
1189
845
  }
1190
846
  ),
1191
- /* @__PURE__ */ jsx4(
847
+ /* @__PURE__ */ jsx3(
1192
848
  "div",
1193
849
  {
1194
850
  className: cn(profileMenuSeparatorClassName, classNames == null ? void 0 : classNames.profileMenuSeparator)
1195
851
  }
1196
852
  ),
1197
- /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-col py-2", children: [
1198
- /* @__PURE__ */ jsxs2(
853
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col py-2", children: [
854
+ /* @__PURE__ */ jsxs(
1199
855
  DropdownMenu.Item,
1200
856
  {
1201
857
  className: dropdownMenuItemClassName,
1202
858
  onSelect: onProfileClick,
1203
859
  disabled,
1204
860
  children: [
1205
- /* @__PURE__ */ jsx4(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
1206
- /* @__PURE__ */ jsx4("span", { children: labels.auth.myProfile })
861
+ /* @__PURE__ */ jsx3(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
862
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.myProfile })
1207
863
  ]
1208
864
  }
1209
865
  ),
1210
- isDepositBlocked ? /* @__PURE__ */ jsx4(
866
+ isDepositBlocked ? /* @__PURE__ */ jsx3(
1211
867
  DropdownMenu.Item,
1212
868
  {
1213
869
  className: cn(dropdownMenuItemClassName, "opacity-50 cursor-not-allowed!"),
1214
870
  onSelect: (e) => e.preventDefault(),
1215
871
  "aria-disabled": "true",
1216
- children: /* @__PURE__ */ jsx4(
872
+ children: /* @__PURE__ */ jsx3(
1217
873
  Tooltip,
1218
874
  {
1219
- content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
875
+ content: /* @__PURE__ */ jsx3("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
1220
876
  side: "bottom",
1221
877
  sideOffset: 4,
1222
- children: /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-3", children: [
1223
- /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1224
- /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
878
+ children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-3", children: [
879
+ /* @__PURE__ */ jsx3(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
880
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.deposit })
1225
881
  ] })
1226
882
  }
1227
883
  )
1228
884
  }
1229
- ) : /* @__PURE__ */ jsxs2(
885
+ ) : /* @__PURE__ */ jsxs(
1230
886
  DropdownMenu.Item,
1231
887
  {
1232
888
  className: dropdownMenuItemClassName,
1233
889
  onSelect: onDepositClick,
1234
890
  disabled,
1235
891
  children: [
1236
- /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1237
- /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
892
+ /* @__PURE__ */ jsx3(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
893
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.deposit })
1238
894
  ]
1239
895
  }
1240
896
  ),
1241
- /* @__PURE__ */ jsxs2(
897
+ /* @__PURE__ */ jsxs(
1242
898
  DropdownMenu.Item,
1243
899
  {
1244
900
  className: dropdownMenuItemClassName,
1245
901
  onSelect: onWithdrawClick,
1246
902
  disabled,
1247
903
  children: [
1248
- /* @__PURE__ */ jsx4(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
1249
- /* @__PURE__ */ jsx4("span", { children: labels.auth.withdraw })
904
+ /* @__PURE__ */ jsx3(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
905
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.withdraw })
1250
906
  ]
1251
907
  }
1252
908
  ),
1253
- /* @__PURE__ */ jsxs2(
909
+ /* @__PURE__ */ jsxs(
1254
910
  DropdownMenu.Item,
1255
911
  {
1256
912
  className: dropdownMenuItemClassName,
1257
913
  onSelect: onDisconnectClick,
1258
914
  disabled,
1259
915
  children: [
1260
- /* @__PURE__ */ jsx4(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
1261
- /* @__PURE__ */ jsx4("span", { children: labels.auth.disconnect })
916
+ /* @__PURE__ */ jsx3(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
917
+ /* @__PURE__ */ jsx3("span", { children: labels.auth.disconnect })
1262
918
  ]
1263
919
  }
1264
920
  )
@@ -1444,6 +1100,7 @@ export {
1444
1100
  parseVenue,
1445
1101
  requestAggDepositModalOpen,
1446
1102
  requestAggWithdrawModalOpen,
1103
+ resolveEventDetailsSyncKey,
1447
1104
  resolveOrderBookRows,
1448
1105
  resolveUnifiedOrderBookEntries,
1449
1106
  shortenAddress,