@agg-build/ui 1.2.11 → 1.2.12

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 (66) hide show
  1. package/dist/{chunk-J7K2U44E.mjs → chunk-3JXBOU24.mjs} +110 -60
  2. package/dist/{chunk-3ZSNHGAB.mjs → chunk-4WBQTUPW.mjs} +314 -58
  3. package/dist/{chunk-54PCEK6G.mjs → chunk-IBOE7DRY.mjs} +1 -1
  4. package/dist/{chunk-YP75TIY6.mjs → chunk-J6WELNCX.mjs} +3 -3
  5. package/dist/{chunk-ENAGASVU.mjs → chunk-U55T5BPE.mjs} +406 -337
  6. package/dist/{chunk-SJLHOAKK.mjs → chunk-X3KCFWXN.mjs} +936 -650
  7. package/dist/{chunk-NWJHFGBZ.mjs → chunk-YSW4ULL5.mjs} +1 -1
  8. package/dist/events.js +1593 -886
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +4211 -3198
  11. package/dist/index.mjs +480 -105
  12. package/dist/modals.js +1164 -923
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +1975 -1492
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +928 -649
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +641 -444
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/agg-provider.d.mts +27 -0
  23. package/dist/types/agg-provider.d.ts +27 -0
  24. package/dist/types/events/list/event-list-tabs.d.mts +6 -1
  25. package/dist/types/events/list/event-list-tabs.d.ts +6 -1
  26. package/dist/types/index.d.mts +2 -0
  27. package/dist/types/index.d.ts +2 -0
  28. package/dist/types/notifications/agg-notification-events-provider.d.mts +35 -0
  29. package/dist/types/notifications/agg-notification-events-provider.d.ts +35 -0
  30. package/dist/types/notifications/agg-toast-provider.d.mts +27 -0
  31. package/dist/types/notifications/agg-toast-provider.d.ts +27 -0
  32. package/dist/types/notifications/deposit-notification-events.d.mts +10 -0
  33. package/dist/types/notifications/deposit-notification-events.d.ts +10 -0
  34. package/dist/types/notifications/index.d.mts +2 -0
  35. package/dist/types/notifications/index.d.ts +2 -0
  36. package/dist/types/primitives/button/button.types.d.mts +4 -0
  37. package/dist/types/primitives/button/button.types.d.ts +4 -0
  38. package/dist/types/primitives/button/index.d.mts +1 -1
  39. package/dist/types/primitives/button/index.d.ts +1 -1
  40. package/dist/types/primitives/icon/registry.d.mts +16 -0
  41. package/dist/types/primitives/icon/registry.d.ts +16 -0
  42. package/dist/types/primitives/icon/svg/sort-end-date.d.mts +5 -0
  43. package/dist/types/primitives/icon/svg/sort-end-date.d.ts +5 -0
  44. package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.mts +5 -0
  45. package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.ts +5 -0
  46. package/dist/types/primitives/icon/svg/sort-volume-24hr.d.mts +5 -0
  47. package/dist/types/primitives/icon/svg/sort-volume-24hr.d.ts +5 -0
  48. package/dist/types/primitives/icon/svg/sort-volume.d.mts +5 -0
  49. package/dist/types/primitives/icon/svg/sort-volume.d.ts +5 -0
  50. package/dist/types/primitives/select/index.d.mts +1 -1
  51. package/dist/types/primitives/select/index.d.ts +1 -1
  52. package/dist/types/primitives/select/select.types.d.mts +9 -0
  53. package/dist/types/primitives/select/select.types.d.ts +9 -0
  54. package/dist/types/primitives/toast/toast.types.d.mts +3 -0
  55. package/dist/types/primitives/toast/toast.types.d.ts +3 -0
  56. package/dist/types/profile/index.d.mts +1 -1
  57. package/dist/types/profile/index.d.ts +1 -1
  58. package/dist/types/profile/profile-modal.constants.d.mts +2 -2
  59. package/dist/types/profile/profile-modal.constants.d.ts +2 -2
  60. package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +2 -17
  61. package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +2 -17
  62. package/dist/types/profile/tabs/trading-access-tab.d.mts +15 -0
  63. package/dist/types/profile/tabs/trading-access-tab.d.ts +15 -0
  64. package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
  65. package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
  66. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  USER_PROFILE_TAB_POSITIONS,
11
11
  UserProfilePage,
12
12
  useHomePageModals
13
- } from "./chunk-YP75TIY6.mjs";
13
+ } from "./chunk-J6WELNCX.mjs";
14
14
  import {
15
15
  EventList,
16
16
  EventListItem,
@@ -25,7 +25,7 @@ import {
25
25
  mergeVenueOutcomeOrderbooks,
26
26
  orderbookRowLimitDefault,
27
27
  useCenterOrderbookSpread
28
- } from "./chunk-3ZSNHGAB.mjs";
28
+ } from "./chunk-4WBQTUPW.mjs";
29
29
  import {
30
30
  CARD_NETWORK_OPTIONS,
31
31
  ConnectAccountsStep,
@@ -39,8 +39,9 @@ import {
39
39
  ProfileSetupStep,
40
40
  WithdrawModal,
41
41
  clearPendingCardSession,
42
- getPendingCardSession
43
- } from "./chunk-ENAGASVU.mjs";
42
+ getPendingCardSession,
43
+ subscribeAggDepositNotification
44
+ } from "./chunk-U55T5BPE.mjs";
44
45
  import {
45
46
  DEPOSIT_MODAL_OPEN_EVENT,
46
47
  PlaceOrder,
@@ -52,7 +53,7 @@ import {
52
53
  parseVenue,
53
54
  requestAggDepositModalOpen,
54
55
  requestAggWithdrawModalOpen
55
- } from "./chunk-J7K2U44E.mjs";
56
+ } from "./chunk-3JXBOU24.mjs";
56
57
  import {
57
58
  SETTLEMENT_SECTION_ID,
58
59
  Settlement,
@@ -70,10 +71,10 @@ import {
70
71
  resolveOrderBookRows,
71
72
  resolveUnifiedOrderBookEntries,
72
73
  useEventTradingContext
73
- } from "./chunk-54PCEK6G.mjs";
74
+ } from "./chunk-IBOE7DRY.mjs";
74
75
  import {
75
76
  GeoBlockBanner
76
- } from "./chunk-NWJHFGBZ.mjs";
77
+ } from "./chunk-YSW4ULL5.mjs";
77
78
  import {
78
79
  AGG_DEFAULT_URL,
79
80
  AGG_DOCS_URL,
@@ -170,6 +171,7 @@ import {
170
171
  WalletIcon,
171
172
  WarningFilledIcon,
172
173
  WarningIcon,
174
+ __objRest,
173
175
  __spreadProps,
174
176
  __spreadValues,
175
177
  badgeSizes,
@@ -190,7 +192,377 @@ import {
190
192
  useOptionalToast,
191
193
  useToast,
192
194
  venueLogoNames
193
- } from "./chunk-SJLHOAKK.mjs";
195
+ } from "./chunk-X3KCFWXN.mjs";
196
+
197
+ // src/notifications/agg-notification-events-provider.tsx
198
+ import {
199
+ useAggAuthState,
200
+ useAggLabels,
201
+ useAggUiConfig,
202
+ useOnOrderEvent,
203
+ useOnWithdrawalLifecycle,
204
+ useOptionalAggClient,
205
+ useUserActivity
206
+ } from "@agg-build/hooks";
207
+ import { useCallback, useEffect, useRef } from "react";
208
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
209
+ function AggNotificationEventsProvider({
210
+ children,
211
+ enabled = true,
212
+ depositActivityLimit = 25
213
+ }) {
214
+ const aggClient = useOptionalAggClient();
215
+ if (!aggClient) {
216
+ return /* @__PURE__ */ jsx(Fragment, { children });
217
+ }
218
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
219
+ /* @__PURE__ */ jsx(AggNotificationEventsBridge, { enabled, depositActivityLimit }),
220
+ children
221
+ ] });
222
+ }
223
+ var TERMINAL_ORDER_EVENTS = /* @__PURE__ */ new Set(["filled", "partial_fill", "failed"]);
224
+ var TERMINAL_WITHDRAWAL_STATUSES = /* @__PURE__ */ new Set([
225
+ "completed",
226
+ "partial",
227
+ "failed"
228
+ ]);
229
+ var isTerminalWithdrawalStatus = (value) => TERMINAL_WITHDRAWAL_STATUSES.has(value);
230
+ var MICRO_UNITS_SCALE = 1e6;
231
+ var formatScaledMicroAmount = (value) => {
232
+ if (!value) return void 0;
233
+ if (value.includes(".")) {
234
+ const parsed = Number(value);
235
+ if (!Number.isFinite(parsed)) return void 0;
236
+ return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
237
+ }
238
+ try {
239
+ const raw = BigInt(value);
240
+ const whole = raw / BigInt(MICRO_UNITS_SCALE);
241
+ const remainder = raw % BigInt(MICRO_UNITS_SCALE);
242
+ const parsed = Number(whole) + Number(remainder) / MICRO_UNITS_SCALE;
243
+ return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
244
+ } catch (e) {
245
+ const parsed = Number(value);
246
+ if (!Number.isFinite(parsed)) return void 0;
247
+ return (parsed / MICRO_UNITS_SCALE).toLocaleString("en-US", { maximumFractionDigits: 2 });
248
+ }
249
+ };
250
+ var formatDecimalAmount = (value) => {
251
+ if (!value) return void 0;
252
+ const parsed = Number(value.replace(/,/g, ""));
253
+ if (!Number.isFinite(parsed)) return value;
254
+ return parsed.toLocaleString("en-US", { maximumFractionDigits: 2 });
255
+ };
256
+ var formatPriceCents = (value) => {
257
+ if (!value) return void 0;
258
+ const parsed = Number(value);
259
+ if (!Number.isFinite(parsed)) return void 0;
260
+ const cents = parsed * 100;
261
+ const display = cents.toLocaleString("en-US", {
262
+ minimumFractionDigits: 0,
263
+ maximumFractionDigits: 1
264
+ });
265
+ return `${display}\xA2`;
266
+ };
267
+ var formatSharesLabel = (raw) => {
268
+ const formatted = formatScaledMicroAmount(raw);
269
+ if (!formatted) return void 0;
270
+ return `${formatted} shares`;
271
+ };
272
+ var capitalize = (value) => {
273
+ if (!value) return void 0;
274
+ return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
275
+ };
276
+ var venueLabelFor = (venueKey, labels) => {
277
+ var _a;
278
+ if (!venueKey) return void 0;
279
+ const normalized = venueKey.toLowerCase();
280
+ const lookup = labels.venues;
281
+ return (_a = lookup[normalized]) != null ? _a : capitalize(venueKey);
282
+ };
283
+ function AggNotificationEventsBridge({ enabled, depositActivityLimit }) {
284
+ var _a;
285
+ const toastCtx = useOptionalToast();
286
+ const { user, isAuthenticated } = useAggAuthState();
287
+ const labels = useAggLabels();
288
+ const { features } = useAggUiConfig();
289
+ const notificationsFeatureEnabled = features.enableNotifications !== false;
290
+ const effectivelyEnabled = enabled && notificationsFeatureEnabled;
291
+ const currentUserId = (_a = user == null ? void 0 : user.id) != null ? _a : null;
292
+ const firedKeysRef = useRef(/* @__PURE__ */ new Set());
293
+ const depositStatusesRef = useRef(/* @__PURE__ */ new Map());
294
+ const hasSeededDepositStatusesRef = useRef(false);
295
+ const recentClientDepositFingerprintsRef = useRef(/* @__PURE__ */ new Map());
296
+ const lastUserIdRef = useRef("uninitialized");
297
+ useEffect(() => {
298
+ if (lastUserIdRef.current === currentUserId) return;
299
+ lastUserIdRef.current = currentUserId;
300
+ firedKeysRef.current = /* @__PURE__ */ new Set();
301
+ depositStatusesRef.current = /* @__PURE__ */ new Map();
302
+ hasSeededDepositStatusesRef.current = false;
303
+ recentClientDepositFingerprintsRef.current = /* @__PURE__ */ new Map();
304
+ }, [currentUserId]);
305
+ const fireOnce = useCallback(
306
+ (key, tone, title, message, detail) => {
307
+ if (!effectivelyEnabled) return;
308
+ const toast = toastCtx == null ? void 0 : toastCtx.toast;
309
+ if (!toast) return;
310
+ if (firedKeysRef.current.has(key)) return;
311
+ firedKeysRef.current.add(key);
312
+ toast(message, { tone, title, detail });
313
+ },
314
+ [effectivelyEnabled, toastCtx]
315
+ );
316
+ const orderEventCallback = useCallback(
317
+ (event) => {
318
+ if (!effectivelyEnabled || !isAuthenticated) return;
319
+ if (!currentUserId || event.userId !== currentUserId) return;
320
+ if (!TERMINAL_ORDER_EVENTS.has(event.event)) return;
321
+ handleOrderEvent({ event, labels, fireOnce });
322
+ },
323
+ [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
324
+ );
325
+ useOnOrderEvent(orderEventCallback);
326
+ const withdrawalCallback = useCallback(
327
+ (event) => {
328
+ if (!effectivelyEnabled || !isAuthenticated) return;
329
+ if (!currentUserId || event.userId !== currentUserId) return;
330
+ if (!event.terminal) return;
331
+ if (!isTerminalWithdrawalStatus(event.status)) return;
332
+ handleWithdrawalEvent({ event, labels, fireOnce });
333
+ },
334
+ [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]
335
+ );
336
+ useOnWithdrawalLifecycle(withdrawalCallback);
337
+ useEffect(() => {
338
+ if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
339
+ return subscribeAggDepositNotification((event) => {
340
+ handleClientDepositNotification({
341
+ event,
342
+ labels,
343
+ fireOnce,
344
+ recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current
345
+ });
346
+ });
347
+ }, [currentUserId, effectivelyEnabled, fireOnce, isAuthenticated, labels]);
348
+ const depositActivity = useUserActivity({
349
+ type: "deposit",
350
+ limit: depositActivityLimit,
351
+ enabled: effectivelyEnabled && isAuthenticated && currentUserId !== null
352
+ });
353
+ const depositActivities = depositActivity.activities;
354
+ useEffect(() => {
355
+ if (!effectivelyEnabled || !isAuthenticated || !currentUserId) return;
356
+ if (!depositActivity.isSuccess) return;
357
+ handleDepositActivities({
358
+ deposits: depositActivities,
359
+ previousStatuses: depositStatusesRef.current,
360
+ hasSeededStatuses: hasSeededDepositStatusesRef.current,
361
+ labels,
362
+ fireOnce,
363
+ shouldSuppressToast: (status, amountLabel, tokenLabel) => hasRecentClientDepositNotification({
364
+ recentClientDepositFingerprints: recentClientDepositFingerprintsRef.current,
365
+ status,
366
+ amountLabel,
367
+ tokenLabel
368
+ })
369
+ });
370
+ hasSeededDepositStatusesRef.current = true;
371
+ }, [
372
+ currentUserId,
373
+ depositActivities,
374
+ depositActivity.isSuccess,
375
+ effectivelyEnabled,
376
+ fireOnce,
377
+ isAuthenticated,
378
+ labels
379
+ ]);
380
+ return null;
381
+ }
382
+ function handleOrderEvent({ event, labels, fireOnce }) {
383
+ var _a, _b;
384
+ const venueLabel = venueLabelFor(event.venue, labels);
385
+ const amountLabel = formatSharesLabel((_a = event.actualSharesRaw) != null ? _a : event.filledAmountRaw);
386
+ const priceLabel = formatPriceCents((_b = event.executionPriceRaw) != null ? _b : event.quotedPriceRaw);
387
+ if (event.event === "filled") {
388
+ fireOnce(
389
+ `order:${event.orderId}:filled`,
390
+ "success",
391
+ labels.notifications.order.filledTitle,
392
+ labels.notifications.order.filledMessage({ venueLabel, amountLabel, priceLabel })
393
+ );
394
+ return;
395
+ }
396
+ if (event.event === "partial_fill") {
397
+ fireOnce(
398
+ `order:${event.orderId}:partial_fill`,
399
+ "warning",
400
+ labels.notifications.order.partialFilledTitle,
401
+ labels.notifications.order.partialFilledMessage({ venueLabel, amountLabel, priceLabel })
402
+ );
403
+ return;
404
+ }
405
+ if (event.event === "failed") {
406
+ fireOnce(
407
+ `order:${event.orderId}:failed`,
408
+ "error",
409
+ labels.notifications.order.failedTitle,
410
+ labels.notifications.order.failedMessage(event.errorReason),
411
+ venueLabel
412
+ );
413
+ }
414
+ }
415
+ function handleWithdrawalEvent({ event, labels, fireOnce }) {
416
+ var _a;
417
+ const amountLabel = formatScaledMicroAmount((_a = event.completedAmountRaw) != null ? _a : event.requestedAmountRaw);
418
+ if (event.status === "completed") {
419
+ fireOnce(
420
+ `withdrawal:${event.withdrawalId}:completed`,
421
+ "success",
422
+ labels.notifications.withdrawal.completedTitle,
423
+ labels.notifications.withdrawal.completedMessage({ amountLabel })
424
+ );
425
+ return;
426
+ }
427
+ if (event.status === "partial") {
428
+ fireOnce(
429
+ `withdrawal:${event.withdrawalId}:partial`,
430
+ "warning",
431
+ labels.notifications.withdrawal.partialTitle,
432
+ labels.notifications.withdrawal.partialMessage({ amountLabel })
433
+ );
434
+ return;
435
+ }
436
+ if (event.status === "failed") {
437
+ fireOnce(
438
+ `withdrawal:${event.withdrawalId}:failed`,
439
+ "error",
440
+ labels.notifications.withdrawal.failedTitle,
441
+ labels.notifications.withdrawal.failedMessage(event.errorMessage)
442
+ );
443
+ }
444
+ }
445
+ var DEPOSIT_COMPLETED_STATUSES = /* @__PURE__ */ new Set(["completed", "confirmed", "succeeded", "success"]);
446
+ var DEPOSIT_FAILED_STATUSES = /* @__PURE__ */ new Set(["failed", "errored", "rejected"]);
447
+ var CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS = 2 * 60 * 1e3;
448
+ var isTerminalDepositStatus = (status) => DEPOSIT_COMPLETED_STATUSES.has(status) || DEPOSIT_FAILED_STATUSES.has(status);
449
+ var getDepositNotificationFingerprint = ({
450
+ status,
451
+ amountLabel,
452
+ tokenLabel
453
+ }) => `${status}:${amountLabel != null ? amountLabel : ""}:${tokenLabel != null ? tokenLabel : ""}`.toLowerCase();
454
+ var hasRecentClientDepositNotification = ({
455
+ recentClientDepositFingerprints,
456
+ status,
457
+ amountLabel,
458
+ tokenLabel
459
+ }) => {
460
+ const fingerprint = getDepositNotificationFingerprint({ status, amountLabel, tokenLabel });
461
+ const lastNotifiedAt = recentClientDepositFingerprints.get(fingerprint);
462
+ if (!lastNotifiedAt) return false;
463
+ if (Date.now() - lastNotifiedAt <= CLIENT_DEPOSIT_ACTIVITY_SUPPRESSION_MS) {
464
+ return true;
465
+ }
466
+ recentClientDepositFingerprints.delete(fingerprint);
467
+ return false;
468
+ };
469
+ function handleClientDepositNotification({
470
+ event,
471
+ labels,
472
+ fireOnce,
473
+ recentClientDepositFingerprints
474
+ }) {
475
+ var _a, _b, _c;
476
+ const amountLabel = formatDecimalAmount(event.amount);
477
+ const tokenLabel = event.tokenSymbol;
478
+ const fingerprint = getDepositNotificationFingerprint({
479
+ status: event.status,
480
+ amountLabel,
481
+ tokenLabel
482
+ });
483
+ recentClientDepositFingerprints.set(fingerprint, Date.now());
484
+ if (event.status === "completed") {
485
+ fireOnce(
486
+ `deposit-client:${(_a = event.id) != null ? _a : fingerprint}:completed`,
487
+ "success",
488
+ labels.notifications.deposit.completedTitle,
489
+ labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
490
+ );
491
+ return;
492
+ }
493
+ fireOnce(
494
+ `deposit-client:${(_b = event.id) != null ? _b : fingerprint}:failed`,
495
+ "error",
496
+ labels.notifications.deposit.failedTitle,
497
+ (_c = event.errorMessage) != null ? _c : labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
498
+ );
499
+ }
500
+ function handleDepositActivities({
501
+ deposits,
502
+ previousStatuses,
503
+ hasSeededStatuses,
504
+ labels,
505
+ fireOnce,
506
+ shouldSuppressToast
507
+ }) {
508
+ for (const item of deposits) {
509
+ if (item.type !== "deposit") continue;
510
+ const deposit = item;
511
+ const status = deposit.status.toLowerCase();
512
+ const isCompleted = DEPOSIT_COMPLETED_STATUSES.has(status);
513
+ const isFailed = DEPOSIT_FAILED_STATUSES.has(status);
514
+ const previousStatus = previousStatuses.get(deposit.id);
515
+ previousStatuses.set(deposit.id, status);
516
+ if (!hasSeededStatuses) continue;
517
+ if (!previousStatus) continue;
518
+ if (isTerminalDepositStatus(previousStatus)) continue;
519
+ if (!isCompleted && !isFailed) continue;
520
+ const amountLabel = formatScaledMicroAmount(deposit.amountRaw);
521
+ const tokenLabel = deposit.tokenSymbol;
522
+ const terminalStatus = isCompleted ? "completed" : "failed";
523
+ if (shouldSuppressToast == null ? void 0 : shouldSuppressToast(terminalStatus, amountLabel, tokenLabel)) continue;
524
+ if (isCompleted) {
525
+ fireOnce(
526
+ `deposit:${deposit.id}:completed`,
527
+ "success",
528
+ labels.notifications.deposit.completedTitle,
529
+ labels.notifications.deposit.completedMessage({ amountLabel, tokenLabel })
530
+ );
531
+ } else {
532
+ fireOnce(
533
+ `deposit:${deposit.id}:failed`,
534
+ "error",
535
+ labels.notifications.deposit.failedTitle,
536
+ labels.notifications.deposit.failedMessage({ amountLabel, tokenLabel })
537
+ );
538
+ }
539
+ }
540
+ }
541
+
542
+ // src/notifications/agg-toast-provider.tsx
543
+ import { jsx as jsx2 } from "react/jsx-runtime";
544
+ function AggToastProvider(_a) {
545
+ var _b = _a, {
546
+ children,
547
+ disableAggNotifications = false,
548
+ notificationDepositActivityLimit
549
+ } = _b, toastProps = __objRest(_b, [
550
+ "children",
551
+ "disableAggNotifications",
552
+ "notificationDepositActivityLimit"
553
+ ]);
554
+ return /* @__PURE__ */ jsx2(ToastProvider, __spreadProps(__spreadValues({}, toastProps), { children: disableAggNotifications ? children : /* @__PURE__ */ jsx2(AggNotificationEventsProvider, { depositActivityLimit: notificationDepositActivityLimit, children }) }));
555
+ }
556
+
557
+ // src/agg-provider.tsx
558
+ import {
559
+ AggProvider as AggSdkProvider
560
+ } from "@agg-build/hooks";
561
+ import { jsx as jsx3 } from "react/jsx-runtime";
562
+ function AggProvider(_a) {
563
+ var _b = _a, { children, toast } = _b, providerProps = __objRest(_b, ["children", "toast"]);
564
+ return /* @__PURE__ */ jsx3(AggSdkProvider, __spreadProps(__spreadValues({}, providerProps), { children: /* @__PURE__ */ jsx3(AggToastProvider, __spreadProps(__spreadValues({}, toast), { children })) }));
565
+ }
194
566
 
195
567
  // src/auth/connect-button-view/index.tsx
196
568
  import { optimizedImageUrl, useAggAuthContext, useLabels, useSdkUiConfig } from "@agg-build/hooks";
@@ -269,11 +641,11 @@ var avatarRootClassName = cn(
269
641
  var avatarIconClassName = cn("h-[66%] w-[66%] text-agg-muted-foreground");
270
642
 
271
643
  // src/auth/connect-button-view/index.tsx
272
- import { jsx, jsxs } from "react/jsx-runtime";
644
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
273
645
  var WalletAvatar = ({ className }) => {
274
646
  const { isAuthenticated, user } = useAggAuthContext();
275
647
  if (isAuthenticated && (user == null ? void 0 : user.avatarUrl)) {
276
- return /* @__PURE__ */ jsx(
648
+ return /* @__PURE__ */ jsx4(
277
649
  "img",
278
650
  {
279
651
  src: optimizedImageUrl(user.avatarUrl, 44),
@@ -282,7 +654,7 @@ var WalletAvatar = ({ className }) => {
282
654
  }
283
655
  );
284
656
  }
285
- return /* @__PURE__ */ jsx(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
657
+ return /* @__PURE__ */ jsx4(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
286
658
  };
287
659
  var AuthMethodActionButton = ({
288
660
  activeMethodId,
@@ -296,7 +668,7 @@ var AuthMethodActionButton = ({
296
668
  const labels = useLabels();
297
669
  const isMethodLoading = activeMethodId === method.id;
298
670
  const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
299
- return /* @__PURE__ */ jsxs(
671
+ return /* @__PURE__ */ jsxs2(
300
672
  "button",
301
673
  {
302
674
  type: "button",
@@ -306,7 +678,7 @@ var AuthMethodActionButton = ({
306
678
  "aria-label": labels.auth.signInWithMethod(method.label),
307
679
  onClick: () => onSelect(method.id),
308
680
  children: [
309
- isMethodLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx(
681
+ isMethodLoading ? /* @__PURE__ */ jsx4(LoadingIcon, { size: "small" }) : /* @__PURE__ */ jsx4(
310
682
  Icon,
311
683
  {
312
684
  name: (_a = method.iconName) != null ? _a : "profile",
@@ -315,7 +687,7 @@ var AuthMethodActionButton = ({
315
687
  title: renderLabel ? void 0 : method.label
316
688
  }
317
689
  ),
318
- renderLabel ? /* @__PURE__ */ jsx("span", { children: labels.auth.connect(method.label) }) : null
690
+ renderLabel ? /* @__PURE__ */ jsx4("span", { children: labels.auth.connect(method.label) }) : null
319
691
  ]
320
692
  }
321
693
  );
@@ -344,8 +716,8 @@ var UnauthenticatedConnectView = ({
344
716
  const labels = useLabels();
345
717
  const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
346
718
  const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
347
- return /* @__PURE__ */ jsxs("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
348
- /* @__PURE__ */ jsx(
719
+ return /* @__PURE__ */ jsxs2("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: [
720
+ /* @__PURE__ */ jsx4(
349
721
  Button,
350
722
  __spreadProps(__spreadValues({
351
723
  variant: "primary",
@@ -358,8 +730,8 @@ var UnauthenticatedConnectView = ({
358
730
  children: labels.auth.connect()
359
731
  })
360
732
  ),
361
- notice ? /* @__PURE__ */ jsx("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
362
- /* @__PURE__ */ jsx(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs(
733
+ notice ? /* @__PURE__ */ jsx4("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: notice }) : null,
734
+ /* @__PURE__ */ jsx4(Modal, { open: isChooserOpen || !!challengeContent, onOpenChange: onChooserOpenChange, children: /* @__PURE__ */ jsxs2(
363
735
  Modal.Container,
364
736
  {
365
737
  maxWidth: "400px",
@@ -368,7 +740,7 @@ var UnauthenticatedConnectView = ({
368
740
  },
369
741
  "aria-label": challengeContent ? "Security Check" : labels.auth.signIn,
370
742
  children: [
371
- /* @__PURE__ */ jsx(
743
+ /* @__PURE__ */ jsx4(
372
744
  Modal.Header,
373
745
  {
374
746
  title: challengeContent ? "Security Check" : labels.auth.signIn,
@@ -380,8 +752,8 @@ var UnauthenticatedConnectView = ({
380
752
  }
381
753
  }
382
754
  ),
383
- /* @__PURE__ */ jsx(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs("div", { className: authMethodsListClassName, children: [
384
- emailMethod ? /* @__PURE__ */ jsxs(
755
+ /* @__PURE__ */ jsx4(Modal.Body, { classNames: { root: authModalBodyClassName }, children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs2("div", { className: authMethodsListClassName, children: [
756
+ emailMethod ? /* @__PURE__ */ jsxs2(
385
757
  "form",
386
758
  {
387
759
  className: authSectionClassName,
@@ -390,8 +762,8 @@ var UnauthenticatedConnectView = ({
390
762
  onEmailSubmit();
391
763
  },
392
764
  children: [
393
- /* @__PURE__ */ jsxs("div", { className: authInputFormClassName, children: [
394
- /* @__PURE__ */ jsx(
765
+ /* @__PURE__ */ jsxs2("div", { className: authInputFormClassName, children: [
766
+ /* @__PURE__ */ jsx4(
395
767
  "input",
396
768
  {
397
769
  id: "agg-auth-email",
@@ -404,7 +776,7 @@ var UnauthenticatedConnectView = ({
404
776
  disabled: disabled || isBusy || !emailMethod.isAvailable
405
777
  }
406
778
  ),
407
- /* @__PURE__ */ jsx(
779
+ /* @__PURE__ */ jsx4(
408
780
  Button,
409
781
  {
410
782
  type: "submit",
@@ -417,8 +789,8 @@ var UnauthenticatedConnectView = ({
417
789
  }
418
790
  )
419
791
  ] }),
420
- emailMethod.isAvailable && ((_e = emailMethod.input) == null ? void 0 : _e.helperText) ? /* @__PURE__ */ jsx("p", { className: cn(authNoticeClassName, classNames == null ? void 0 : classNames.authNotice), children: emailMethod.input.helperText }) : null,
421
- !emailMethod.isAvailable ? /* @__PURE__ */ jsx(
792
+ 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,
793
+ !emailMethod.isAvailable ? /* @__PURE__ */ jsx4(
422
794
  InlineAlert,
423
795
  {
424
796
  tone: "warning",
@@ -427,7 +799,7 @@ var UnauthenticatedConnectView = ({
427
799
  className: classNames == null ? void 0 : classNames.authError
428
800
  }
429
801
  ) : null,
430
- emailError ? /* @__PURE__ */ jsx(
802
+ emailError ? /* @__PURE__ */ jsx4(
431
803
  InlineAlert,
432
804
  {
433
805
  tone: "error",
@@ -438,8 +810,8 @@ var UnauthenticatedConnectView = ({
438
810
  ]
439
811
  }
440
812
  ) : null,
441
- socialMethods.length > 0 ? /* @__PURE__ */ jsxs("div", { className: authSectionClassName, children: [
442
- /* @__PURE__ */ jsx("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx(
813
+ socialMethods.length > 0 ? /* @__PURE__ */ jsxs2("div", { className: authSectionClassName, children: [
814
+ /* @__PURE__ */ jsx4("div", { className: cn(authMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: socialMethods.map((method) => /* @__PURE__ */ jsx4(
443
815
  AuthMethodActionButton,
444
816
  {
445
817
  activeMethodId,
@@ -451,18 +823,18 @@ var UnauthenticatedConnectView = ({
451
823
  },
452
824
  method.id
453
825
  )) }),
454
- /* @__PURE__ */ jsxs("p", { className: authHelperTextClassName, children: [
826
+ /* @__PURE__ */ jsxs2("p", { className: authHelperTextClassName, children: [
455
827
  labels.auth.socialWalletNotice,
456
828
  " ",
457
- /* @__PURE__ */ jsx("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
829
+ /* @__PURE__ */ jsx4("span", { className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink), children: labels.auth.learnMore })
458
830
  ] })
459
831
  ] }) : null,
460
- showWalletDivider ? /* @__PURE__ */ jsxs("div", { className: authDividerClassName, children: [
461
- /* @__PURE__ */ jsx("div", { className: authDividerLineClassName }),
462
- /* @__PURE__ */ jsx("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
463
- /* @__PURE__ */ jsx("div", { className: authDividerLineClassName })
832
+ showWalletDivider ? /* @__PURE__ */ jsxs2("div", { className: authDividerClassName, children: [
833
+ /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName }),
834
+ /* @__PURE__ */ jsx4("span", { className: authDividerLabelClassName, children: labels.auth.dividerOr }),
835
+ /* @__PURE__ */ jsx4("div", { className: authDividerLineClassName })
464
836
  ] }) : null,
465
- walletMethods.length > 0 ? /* @__PURE__ */ jsx("div", { className: authSectionClassName, children: /* @__PURE__ */ jsx("div", { className: cn(authWalletMethodGridClassName, classNames == null ? void 0 : classNames.authMethodGrid), children: walletMethods.map((method) => /* @__PURE__ */ jsx(
837
+ 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(
466
838
  AuthMethodActionButton,
467
839
  {
468
840
  activeMethodId,
@@ -473,10 +845,10 @@ var UnauthenticatedConnectView = ({
473
845
  },
474
846
  method.id
475
847
  )) }) }) : null,
476
- /* @__PURE__ */ jsxs("p", { className: authLegalTextClassName, children: [
848
+ /* @__PURE__ */ jsxs2("p", { className: authLegalTextClassName, children: [
477
849
  labels.auth.legalNoticePrefix,
478
850
  " ",
479
- /* @__PURE__ */ jsx(
851
+ /* @__PURE__ */ jsx4(
480
852
  "a",
481
853
  {
482
854
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -489,7 +861,7 @@ var UnauthenticatedConnectView = ({
489
861
  " ",
490
862
  labels.auth.legalNoticeSeparator,
491
863
  " ",
492
- /* @__PURE__ */ jsx(
864
+ /* @__PURE__ */ jsx4(
493
865
  "a",
494
866
  {
495
867
  className: cn(authHelperLinkClassName, classNames == null ? void 0 : classNames.authHelperLink),
@@ -501,7 +873,7 @@ var UnauthenticatedConnectView = ({
501
873
  ),
502
874
  "."
503
875
  ] }),
504
- errorMessage ? /* @__PURE__ */ jsx(
876
+ errorMessage ? /* @__PURE__ */ jsx4(
505
877
  InlineAlert,
506
878
  {
507
879
  tone: "error",
@@ -576,7 +948,7 @@ var AuthConnectButtonView = ({
576
948
  classNames == null ? void 0 : classNames.profileMenuActionItem
577
949
  );
578
950
  if (!isAuthenticated) {
579
- return /* @__PURE__ */ jsx(
951
+ return /* @__PURE__ */ jsx4(
580
952
  UnauthenticatedConnectView,
581
953
  {
582
954
  activeMethodId,
@@ -600,21 +972,21 @@ var AuthConnectButtonView = ({
600
972
  }
601
973
  );
602
974
  }
603
- return /* @__PURE__ */ jsx("div", { className: cn(connectButtonContainerClassName, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ jsxs("div", { className: cn(connectedButtonsRowClassName, classNames == null ? void 0 : classNames.connectedRow), children: [
604
- /* @__PURE__ */ jsxs("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
605
- /* @__PURE__ */ jsx("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx(
975
+ 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: [
976
+ /* @__PURE__ */ jsxs2("div", { className: cn(connectedBalanceChipClassName, classNames == null ? void 0 : classNames.balanceChip), children: [
977
+ /* @__PURE__ */ jsx4("div", { className: "hidden lg:inline-flex", children: /* @__PURE__ */ jsx4(
606
978
  ConditionalWrapper,
607
979
  {
608
980
  condition: isDepositBlocked,
609
- wrapper: (children) => /* @__PURE__ */ jsx(
981
+ wrapper: (children) => /* @__PURE__ */ jsx4(
610
982
  Tooltip,
611
983
  {
612
- content: /* @__PURE__ */ jsx("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
984
+ content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
613
985
  sideOffset: 4,
614
986
  children
615
987
  }
616
988
  ),
617
- children: /* @__PURE__ */ jsx(
989
+ children: /* @__PURE__ */ jsx4(
618
990
  Button,
619
991
  __spreadProps(__spreadValues({
620
992
  variant: "primary",
@@ -627,17 +999,17 @@ var AuthConnectButtonView = ({
627
999
  )
628
1000
  }
629
1001
  ) }),
630
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
631
- /* @__PURE__ */ jsx("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
632
- /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
633
- claimReadyCount > 0 ? /* @__PURE__ */ jsx(
1002
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1003
+ /* @__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" }) }),
1004
+ /* @__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) }),
1005
+ claimReadyCount > 0 ? /* @__PURE__ */ jsx4(
634
1006
  Tooltip,
635
1007
  {
636
1008
  size: "medium",
637
1009
  classNames: { content: "px-5 py-4" },
638
- content: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
639
- /* @__PURE__ */ jsx("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
640
- onClaimWinningsClick ? /* @__PURE__ */ jsxs(
1010
+ content: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center gap-2", children: [
1011
+ /* @__PURE__ */ jsx4("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
1012
+ onClaimWinningsClick ? /* @__PURE__ */ jsxs2(
641
1013
  "button",
642
1014
  {
643
1015
  type: "button",
@@ -645,7 +1017,7 @@ var AuthConnectButtonView = ({
645
1017
  onClick: onClaimWinningsClick,
646
1018
  children: [
647
1019
  claimWinningsLabel,
648
- /* @__PURE__ */ jsx(
1020
+ /* @__PURE__ */ jsx4(
649
1021
  Icon,
650
1022
  {
651
1023
  name: "arrow-right",
@@ -658,7 +1030,7 @@ var AuthConnectButtonView = ({
658
1030
  }
659
1031
  ) : null
660
1032
  ] }),
661
- children: /* @__PURE__ */ jsx(
1033
+ children: /* @__PURE__ */ jsx4(
662
1034
  "span",
663
1035
  {
664
1036
  className: cn(
@@ -675,13 +1047,13 @@ var AuthConnectButtonView = ({
675
1047
  }
676
1048
  ) : null
677
1049
  ] }),
678
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
679
- /* @__PURE__ */ jsx("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
680
- /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1050
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
1051
+ /* @__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" }) }),
1052
+ /* @__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) })
681
1053
  ] })
682
1054
  ] }),
683
- /* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
684
- /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1055
+ /* @__PURE__ */ jsxs2(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
1056
+ /* @__PURE__ */ jsx4(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs2(
685
1057
  "button",
686
1058
  {
687
1059
  type: "button",
@@ -699,8 +1071,8 @@ var AuthConnectButtonView = ({
699
1071
  disabled,
700
1072
  "aria-label": labels.auth.walletMenuFor(resolvedProfileLabel),
701
1073
  children: [
702
- /* @__PURE__ */ jsx(WalletAvatar, { className: "size-5! md:size-6!" }),
703
- /* @__PURE__ */ jsx(
1074
+ /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-5! md:size-6!" }),
1075
+ /* @__PURE__ */ jsx4(
704
1076
  Typography,
705
1077
  {
706
1078
  variant: "body-strong",
@@ -711,7 +1083,7 @@ var AuthConnectButtonView = ({
711
1083
  children: resolvedProfileLabel
712
1084
  }
713
1085
  ),
714
- /* @__PURE__ */ jsx(
1086
+ /* @__PURE__ */ jsx4(
715
1087
  Icon,
716
1088
  {
717
1089
  name: isProfileMenuOpen ? "chevron-up" : "chevron-down",
@@ -723,14 +1095,14 @@ var AuthConnectButtonView = ({
723
1095
  ]
724
1096
  }
725
1097
  ) }),
726
- /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(
1098
+ /* @__PURE__ */ jsx4(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx4(
727
1099
  DropdownMenu.Content,
728
1100
  {
729
1101
  className: cn(AGG_ROOT_CLASS_NAME, rootClassName, "z-50 outline-none"),
730
1102
  "data-agg-animations": enableAnimations ? "true" : "false",
731
1103
  sideOffset: 4,
732
1104
  align: "end",
733
- children: /* @__PURE__ */ jsxs(
1105
+ children: /* @__PURE__ */ jsxs2(
734
1106
  "div",
735
1107
  {
736
1108
  className: cn(
@@ -740,7 +1112,7 @@ var AuthConnectButtonView = ({
740
1112
  classNames == null ? void 0 : classNames.profileMenuContent
741
1113
  ),
742
1114
  children: [
743
- /* @__PURE__ */ jsxs(
1115
+ /* @__PURE__ */ jsxs2(
744
1116
  "button",
745
1117
  {
746
1118
  type: "button",
@@ -758,15 +1130,15 @@ var AuthConnectButtonView = ({
758
1130
  },
759
1131
  disabled,
760
1132
  children: [
761
- /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
762
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
763
- /* @__PURE__ */ jsx(WalletAvatar, { className: "size-11" }),
764
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
765
- /* @__PURE__ */ jsx("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: resolvedProfileLabel }),
766
- addressLabel ? /* @__PURE__ */ jsx("p", { className: "w-full text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground text-left", children: addressLabel }) : null
1133
+ /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row items-center justify-between gap-3", children: [
1134
+ /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-3", children: [
1135
+ /* @__PURE__ */ jsx4(WalletAvatar, { className: "size-11" }),
1136
+ /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col items-start justify-start gap-0.5", children: [
1137
+ /* @__PURE__ */ jsx4("p", { className: "w-full text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: resolvedProfileLabel }),
1138
+ 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
767
1139
  ] })
768
1140
  ] }),
769
- /* @__PURE__ */ jsx(
1141
+ /* @__PURE__ */ jsx4(
770
1142
  Icon,
771
1143
  {
772
1144
  name: "arrow-right",
@@ -776,10 +1148,10 @@ var AuthConnectButtonView = ({
776
1148
  }
777
1149
  )
778
1150
  ] }),
779
- /* @__PURE__ */ jsxs("div", { className: "md:hidden flex w-full items-start gap-5", children: [
780
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
781
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
782
- /* @__PURE__ */ jsx(
1151
+ /* @__PURE__ */ jsxs2("div", { className: "md:hidden flex w-full items-start gap-5", children: [
1152
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1153
+ /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1154
+ /* @__PURE__ */ jsx4(
783
1155
  Icon,
784
1156
  {
785
1157
  name: "wallet-filled",
@@ -787,13 +1159,13 @@ var AuthConnectButtonView = ({
787
1159
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
788
1160
  }
789
1161
  ),
790
- /* @__PURE__ */ jsx("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
1162
+ /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Withdrawable Balance" })
791
1163
  ] }),
792
- /* @__PURE__ */ jsx("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
1164
+ /* @__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) })
793
1165
  ] }),
794
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
795
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
796
- /* @__PURE__ */ jsx(
1166
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
1167
+ /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 items-center gap-2", children: [
1168
+ /* @__PURE__ */ jsx4(
797
1169
  Icon,
798
1170
  {
799
1171
  name: "activity-chart",
@@ -801,85 +1173,85 @@ var AuthConnectButtonView = ({
801
1173
  className: "h-4 w-4 shrink-0 text-agg-muted-foreground"
802
1174
  }
803
1175
  ),
804
- /* @__PURE__ */ jsx("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
1176
+ /* @__PURE__ */ jsx4("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
805
1177
  ] }),
806
- /* @__PURE__ */ jsx("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
1178
+ /* @__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) })
807
1179
  ] })
808
1180
  ] })
809
1181
  ]
810
1182
  }
811
1183
  ),
812
- /* @__PURE__ */ jsx(
1184
+ /* @__PURE__ */ jsx4(
813
1185
  "div",
814
1186
  {
815
1187
  className: cn(profileMenuSeparatorClassName, classNames == null ? void 0 : classNames.profileMenuSeparator)
816
1188
  }
817
1189
  ),
818
- /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col py-2", children: [
819
- /* @__PURE__ */ jsxs(
1190
+ /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-col py-2", children: [
1191
+ /* @__PURE__ */ jsxs2(
820
1192
  DropdownMenu.Item,
821
1193
  {
822
1194
  className: dropdownMenuItemClassName,
823
1195
  onSelect: onProfileClick,
824
1196
  disabled,
825
1197
  children: [
826
- /* @__PURE__ */ jsx(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
827
- /* @__PURE__ */ jsx("span", { children: labels.auth.myProfile })
1198
+ /* @__PURE__ */ jsx4(Icon, { name: "profile", size: "small", className: "text-agg-foreground" }),
1199
+ /* @__PURE__ */ jsx4("span", { children: labels.auth.myProfile })
828
1200
  ]
829
1201
  }
830
1202
  ),
831
- isDepositBlocked ? /* @__PURE__ */ jsx(
1203
+ isDepositBlocked ? /* @__PURE__ */ jsx4(
832
1204
  DropdownMenu.Item,
833
1205
  {
834
1206
  className: cn(dropdownMenuItemClassName, "opacity-50 cursor-not-allowed!"),
835
1207
  onSelect: (e) => e.preventDefault(),
836
1208
  "aria-disabled": "true",
837
- children: /* @__PURE__ */ jsx(
1209
+ children: /* @__PURE__ */ jsx4(
838
1210
  Tooltip,
839
1211
  {
840
- content: /* @__PURE__ */ jsx("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
1212
+ content: /* @__PURE__ */ jsx4("p", { className: "text-center", children: labels.auth.depositGeoBlocked }),
841
1213
  side: "bottom",
842
1214
  sideOffset: 4,
843
- children: /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-3", children: [
844
- /* @__PURE__ */ jsx(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
845
- /* @__PURE__ */ jsx("span", { children: labels.auth.deposit })
1215
+ children: /* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-3", children: [
1216
+ /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1217
+ /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
846
1218
  ] })
847
1219
  }
848
1220
  )
849
1221
  }
850
- ) : /* @__PURE__ */ jsxs(
1222
+ ) : /* @__PURE__ */ jsxs2(
851
1223
  DropdownMenu.Item,
852
1224
  {
853
1225
  className: dropdownMenuItemClassName,
854
1226
  onSelect: onDepositClick,
855
1227
  disabled,
856
1228
  children: [
857
- /* @__PURE__ */ jsx(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
858
- /* @__PURE__ */ jsx("span", { children: labels.auth.deposit })
1229
+ /* @__PURE__ */ jsx4(Icon, { name: "download", size: "small", className: "text-agg-foreground" }),
1230
+ /* @__PURE__ */ jsx4("span", { children: labels.auth.deposit })
859
1231
  ]
860
1232
  }
861
1233
  ),
862
- /* @__PURE__ */ jsxs(
1234
+ /* @__PURE__ */ jsxs2(
863
1235
  DropdownMenu.Item,
864
1236
  {
865
1237
  className: dropdownMenuItemClassName,
866
1238
  onSelect: onWithdrawClick,
867
1239
  disabled,
868
1240
  children: [
869
- /* @__PURE__ */ jsx(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
870
- /* @__PURE__ */ jsx("span", { children: labels.auth.withdraw })
1241
+ /* @__PURE__ */ jsx4(Icon, { name: "upload", size: "small", className: "text-agg-foreground" }),
1242
+ /* @__PURE__ */ jsx4("span", { children: labels.auth.withdraw })
871
1243
  ]
872
1244
  }
873
1245
  ),
874
- /* @__PURE__ */ jsxs(
1246
+ /* @__PURE__ */ jsxs2(
875
1247
  DropdownMenu.Item,
876
1248
  {
877
1249
  className: dropdownMenuItemClassName,
878
1250
  onSelect: onDisconnectClick,
879
1251
  disabled,
880
1252
  children: [
881
- /* @__PURE__ */ jsx(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
882
- /* @__PURE__ */ jsx("span", { children: labels.auth.disconnect })
1253
+ /* @__PURE__ */ jsx4(Icon, { name: "disconnect", size: "small", className: "text-agg-foreground" }),
1254
+ /* @__PURE__ */ jsx4("span", { children: labels.auth.disconnect })
883
1255
  ]
884
1256
  }
885
1257
  )
@@ -902,6 +1274,9 @@ export {
902
1274
  ActivityChartIcon,
903
1275
  AggErrorBoundary,
904
1276
  AggLogo,
1277
+ AggNotificationEventsProvider,
1278
+ AggProvider,
1279
+ AggToastProvider,
905
1280
  AppleIcon,
906
1281
  AppsIcon,
907
1282
  ArbitrumIcon,