@agg-build/ui 2.8.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{chunk-AKLGQ6AB.mjs → chunk-JTSLZARU.mjs} +50 -250
  2. package/dist/{chunk-2QCNDFNC.mjs → chunk-R362GNI2.mjs} +1120 -400
  3. package/dist/{chunk-R5S2QOYL.mjs → chunk-XIDQ2A6W.mjs} +152 -59
  4. package/dist/index.js +1764 -1155
  5. package/dist/index.mjs +5 -3
  6. package/dist/modals.js +391 -845
  7. package/dist/modals.mjs +1 -1
  8. package/dist/pages.js +1724 -916
  9. package/dist/pages.mjs +4 -2
  10. package/dist/styles.css +1 -1
  11. package/dist/tailwind.css +1 -1
  12. package/dist/trading.js +567 -472
  13. package/dist/trading.mjs +1 -1
  14. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +5 -1
  15. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +5 -1
  16. package/dist/types/pages/user-profile/components/manage-balances-modal.d.mts +8 -0
  17. package/dist/types/pages/user-profile/components/manage-balances-modal.d.ts +8 -0
  18. package/dist/types/pages/user-profile/index.d.mts +1 -0
  19. package/dist/types/pages/user-profile/index.d.ts +1 -0
  20. package/dist/types/profile/profile-modal.constants.d.mts +1 -2
  21. package/dist/types/profile/profile-modal.constants.d.ts +1 -2
  22. package/dist/types/trading/place-order/index.place-order.constants.d.mts +1 -0
  23. package/dist/types/trading/place-order/index.place-order.constants.d.ts +1 -0
  24. package/dist/types/trading/place-order/index.place-order.types.d.mts +4 -0
  25. package/dist/types/trading/place-order/index.place-order.types.d.ts +4 -0
  26. package/dist/types/trading/place-order/index.place-order.utils.d.mts +7 -3
  27. package/dist/types/trading/place-order/index.place-order.utils.d.ts +7 -3
  28. package/package.json +3 -3
  29. package/dist/types/profile/tabs/balance-management-tab.d.mts +0 -3
  30. package/dist/types/profile/tabs/balance-management-tab.d.ts +0 -3
package/dist/modals.js CHANGED
@@ -7146,8 +7146,8 @@ var WithdrawModal = (props) => {
7146
7146
  WithdrawModal.displayName = "WithdrawModal";
7147
7147
 
7148
7148
  // src/onboarding/index.tsx
7149
- var import_react17 = require("react");
7150
- var import_hooks38 = require("@agg-build/hooks");
7149
+ var import_react16 = require("react");
7150
+ var import_hooks37 = require("@agg-build/hooks");
7151
7151
  var Dialog4 = __toESM(require("@radix-ui/react-dialog"));
7152
7152
 
7153
7153
  // src/onboarding/onboarding-modal.constants.ts
@@ -7253,266 +7253,11 @@ var HowItWorksStep = ({ onContinue, icons }) => {
7253
7253
  HowItWorksStep.displayName = "HowItWorksStep";
7254
7254
 
7255
7255
  // src/onboarding/steps/profile-setup.tsx
7256
- var import_react14 = require("react");
7257
- var import_hooks34 = require("@agg-build/hooks");
7258
-
7259
- // src/primitives/currency-input/index.tsx
7260
- var import_hooks31 = require("@agg-build/hooks");
7261
- var import_react10 = require("react");
7262
-
7263
- // src/primitives/currency-input/currency-input.constants.ts
7264
- var CURRENCY_INPUT_DEFAULT_PREFIX = "$";
7265
- var CURRENCY_INPUT_DEFAULT_MIN = 0;
7266
- var CURRENCY_INPUT_DEFAULT_DECIMAL_PLACES = 2;
7267
- var CURRENCY_INPUT_DEFAULT_DISABLED = false;
7268
- var CURRENCY_INPUT_DEFAULT_AUTO_FOCUS = false;
7269
- var CURRENCY_INPUT_DEFAULT_IS_INVALID = false;
7270
-
7271
- // src/primitives/currency-input/currency-input.utils.ts
7272
- var resolveCurrencyInputFormatParts = (locale) => {
7273
- var _a, _b, _c, _d;
7274
- const parts = new Intl.NumberFormat(locale).formatToParts(1234.5);
7275
- return {
7276
- group: (_b = (_a = parts.find((part) => part.type === "group")) == null ? void 0 : _a.value) != null ? _b : ",",
7277
- decimal: (_d = (_c = parts.find((part) => part.type === "decimal")) == null ? void 0 : _c.value) != null ? _d : "."
7278
- };
7279
- };
7280
- var parseCurrencyInputDisplay = (display, prefix, parts) => {
7281
- let normalizedValue = display.startsWith(prefix) ? display.slice(prefix.length) : display;
7282
- const escapedGroup = parts.group.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7283
- const escapedDecimal = parts.decimal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7284
- normalizedValue = normalizedValue.replace(new RegExp(escapedGroup, "g"), "").replace(new RegExp(escapedDecimal), ".");
7285
- normalizedValue = normalizedValue.replace(/[^0-9.]/g, "");
7286
- const dotIndex = normalizedValue.indexOf(".");
7287
- if (dotIndex !== -1) {
7288
- normalizedValue = normalizedValue.slice(0, dotIndex + 1) + normalizedValue.slice(dotIndex + 1).replace(/\./g, "");
7289
- }
7290
- return normalizedValue;
7291
- };
7292
- var normalizeCurrencyInputInitialZero = (nextRaw, previousRaw) => {
7293
- const prevIsEffectivelyZero = !previousRaw || previousRaw === "0";
7294
- if (!prevIsEffectivelyZero || nextRaw.includes(".") || nextRaw.length !== 2 || !nextRaw.includes("0")) {
7295
- return nextRaw;
7296
- }
7297
- if (nextRaw === "00") return "0";
7298
- if (nextRaw.startsWith("0")) return nextRaw.slice(1);
7299
- if (nextRaw.endsWith("0")) return nextRaw.slice(0, -1);
7300
- return nextRaw;
7301
- };
7302
- var formatCurrencyInputRawValue = (raw, locale, decimalPlaces, parts) => {
7303
- if (!raw) return "0";
7304
- const trailingDot = raw.endsWith(".");
7305
- const dotIndex = raw.indexOf(".");
7306
- const decimalDigits = dotIndex >= 0 ? raw.slice(dotIndex + 1) : "";
7307
- const numericValue = parseFloat(raw);
7308
- if (isNaN(numericValue)) return "0";
7309
- const formattedValue = new Intl.NumberFormat(locale, {
7310
- minimumFractionDigits: decimalDigits.length > 0 ? Math.min(decimalDigits.length, decimalPlaces) : 0,
7311
- maximumFractionDigits: decimalPlaces
7312
- }).format(numericValue);
7313
- return trailingDot ? formattedValue + parts.decimal : formattedValue;
7314
- };
7315
- var clampCurrencyInputValue = (value, min, max) => {
7316
- const normalizedMinimum = Math.max(min, value);
7317
- return max !== void 0 ? Math.min(max, normalizedMinimum) : normalizedMinimum;
7318
- };
7319
- var countDigitsBeforePosition = (value, position) => {
7320
- let count = 0;
7321
- for (let index = 0; index < position && index < value.length; index += 1) {
7322
- if (/\d/.test(value[index])) count += 1;
7323
- }
7324
- return count;
7325
- };
7326
- var findPositionAfterDigits = (value, digitCount) => {
7327
- if (digitCount === 0) return 0;
7328
- let count = 0;
7329
- for (let index = 0; index < value.length; index += 1) {
7330
- if (/\d/.test(value[index])) count += 1;
7331
- if (count === digitCount) return index + 1;
7332
- }
7333
- return value.length;
7334
- };
7335
- var sanitizeCurrencyInputPastedValue = (input, parts, decimalPlaces) => {
7336
- const escapedGroup = parts.group.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7337
- const escapedDecimal = parts.decimal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7338
- let sanitizedValue = input.replace(new RegExp(escapedGroup, "g"), "").replace(new RegExp(escapedDecimal), ".");
7339
- sanitizedValue = sanitizedValue.replace(/[^0-9.]/g, "");
7340
- const firstDotIndex = sanitizedValue.indexOf(".");
7341
- if (firstDotIndex !== -1) {
7342
- sanitizedValue = sanitizedValue.slice(0, firstDotIndex + 1) + sanitizedValue.slice(firstDotIndex + 1).replace(/\./g, "");
7343
- }
7344
- const dotIndex = sanitizedValue.indexOf(".");
7345
- if (dotIndex !== -1) {
7346
- sanitizedValue = sanitizedValue.slice(0, dotIndex + 1 + decimalPlaces);
7347
- }
7348
- return sanitizedValue;
7349
- };
7350
-
7351
- // src/primitives/currency-input/index.tsx
7352
- var import_jsx_runtime122 = require("react/jsx-runtime");
7353
- var CurrencyInput = ({
7354
- value,
7355
- onChange,
7356
- prefix = CURRENCY_INPUT_DEFAULT_PREFIX,
7357
- min = CURRENCY_INPUT_DEFAULT_MIN,
7358
- max,
7359
- decimalPlaces = CURRENCY_INPUT_DEFAULT_DECIMAL_PLACES,
7360
- disabled = CURRENCY_INPUT_DEFAULT_DISABLED,
7361
- autoFocus = CURRENCY_INPUT_DEFAULT_AUTO_FOCUS,
7362
- isInvalid = CURRENCY_INPUT_DEFAULT_IS_INVALID,
7363
- classNames,
7364
- ariaLabel,
7365
- onFocus,
7366
- onBlur
7367
- }) => {
7368
- const {
7369
- general: { locale }
7370
- } = (0, import_hooks31.useSdkUiConfig)();
7371
- const parts = (0, import_react10.useMemo)(() => resolveCurrencyInputFormatParts(locale), [locale]);
7372
- const [raw, setRaw] = (0, import_react10.useState)(() => value >= 0 ? String(value) : "");
7373
- const isEditingRef = (0, import_react10.useRef)(false);
7374
- const inputRef = (0, import_react10.useRef)(null);
7375
- const caretPosRef = (0, import_react10.useRef)(null);
7376
- (0, import_react10.useEffect)(() => {
7377
- if (!isEditingRef.current) {
7378
- setRaw(value >= 0 ? String(value) : "");
7379
- }
7380
- }, [value]);
7381
- const numericDisplay = formatCurrencyInputRawValue(raw, locale, decimalPlaces, parts);
7382
- const displayValue = prefix + numericDisplay;
7383
- (0, import_react10.useLayoutEffect)(() => {
7384
- if (caretPosRef.current !== null && inputRef.current) {
7385
- inputRef.current.setSelectionRange(caretPosRef.current, caretPosRef.current);
7386
- caretPosRef.current = null;
7387
- }
7388
- }, [displayValue]);
7389
- const handleGuardCaret = () => {
7390
- var _a, _b, _c, _d;
7391
- const inputElement = inputRef.current;
7392
- if (!inputElement) return;
7393
- const minPosition = prefix.length;
7394
- if (((_a = inputElement.selectionStart) != null ? _a : 0) < minPosition || ((_b = inputElement.selectionEnd) != null ? _b : 0) < minPosition) {
7395
- inputElement.setSelectionRange(
7396
- Math.max((_c = inputElement.selectionStart) != null ? _c : 0, minPosition),
7397
- Math.max((_d = inputElement.selectionEnd) != null ? _d : 0, minPosition)
7398
- );
7399
- }
7400
- };
7401
- const handleSelect = () => {
7402
- handleGuardCaret();
7403
- };
7404
- const handleKeyDown = (event) => {
7405
- var _a, _b, _c;
7406
- const inputElement = inputRef.current;
7407
- if (!inputElement) return;
7408
- const minPosition = prefix.length;
7409
- if (event.key === "Backspace" && ((_a = inputElement.selectionStart) != null ? _a : 0) <= minPosition && inputElement.selectionStart === inputElement.selectionEnd) {
7410
- event.preventDefault();
7411
- }
7412
- if (event.key === "ArrowLeft" && ((_b = inputElement.selectionStart) != null ? _b : 0) <= minPosition && !event.shiftKey) {
7413
- event.preventDefault();
7414
- }
7415
- if (event.key === "Home") {
7416
- event.preventDefault();
7417
- if (event.shiftKey) {
7418
- inputElement.setSelectionRange(minPosition, (_c = inputElement.selectionEnd) != null ? _c : minPosition);
7419
- } else {
7420
- inputElement.setSelectionRange(minPosition, minPosition);
7421
- }
7422
- }
7423
- };
7424
- const handleChange = (event) => {
7425
- var _a;
7426
- isEditingRef.current = true;
7427
- const inputValue = event.target.value;
7428
- if (!inputValue.startsWith(prefix)) {
7429
- const strippedValue = parseCurrencyInputDisplay(inputValue, prefix, parts);
7430
- if (!strippedValue) {
7431
- setRaw("");
7432
- onChange == null ? void 0 : onChange(min);
7433
- caretPosRef.current = prefix.length;
7434
- return;
7435
- }
7436
- }
7437
- const previousCaretPosition = (_a = event.target.selectionStart) != null ? _a : 0;
7438
- const numericPortion = inputValue.slice(prefix.length);
7439
- const caretInNumericPortion = Math.max(0, previousCaretPosition - prefix.length);
7440
- const digitsBeforeCaret = countDigitsBeforePosition(numericPortion, caretInNumericPortion);
7441
- const nextRaw = normalizeCurrencyInputInitialZero(
7442
- parseCurrencyInputDisplay(inputValue, prefix, parts),
7443
- raw
7444
- );
7445
- const dotIndex = nextRaw.indexOf(".");
7446
- const clampedRaw = dotIndex !== -1 ? nextRaw.slice(0, dotIndex + 1 + decimalPlaces) : nextRaw;
7447
- const numericValue = parseFloat(clampedRaw);
7448
- const clampedNumericValue = isNaN(numericValue) ? min : clampCurrencyInputValue(numericValue, min, max);
7449
- const wasValueClamped = !isNaN(numericValue) && clampedNumericValue !== numericValue;
7450
- const resolvedRaw = wasValueClamped ? String(clampedNumericValue) : clampedRaw;
7451
- setRaw(resolvedRaw);
7452
- onChange == null ? void 0 : onChange(clampedNumericValue);
7453
- const nextNumericDisplay = formatCurrencyInputRawValue(
7454
- resolvedRaw,
7455
- locale,
7456
- decimalPlaces,
7457
- parts
7458
- );
7459
- caretPosRef.current = wasValueClamped || resolvedRaw.endsWith(".") ? prefix.length + nextNumericDisplay.length : prefix.length + findPositionAfterDigits(nextNumericDisplay, digitsBeforeCaret);
7460
- };
7461
- const handlePaste = (event) => {
7462
- event.preventDefault();
7463
- const pastedValue = event.clipboardData.getData("text/plain");
7464
- const clampedValue = sanitizeCurrencyInputPastedValue(pastedValue, parts, decimalPlaces);
7465
- if (!clampedValue) return;
7466
- const numericValue = parseFloat(clampedValue);
7467
- const clampedNumericValue = isNaN(numericValue) ? min : clampCurrencyInputValue(numericValue, min, max);
7468
- const resolvedRaw = clampedNumericValue !== numericValue ? String(clampedNumericValue) : clampedValue;
7469
- setRaw(resolvedRaw);
7470
- onChange == null ? void 0 : onChange(clampedNumericValue);
7471
- };
7472
- const handleFocus = () => {
7473
- isEditingRef.current = true;
7474
- requestAnimationFrame(handleGuardCaret);
7475
- onFocus == null ? void 0 : onFocus();
7476
- };
7477
- const handleBlur = () => {
7478
- isEditingRef.current = false;
7479
- const numericValue = parseFloat(raw);
7480
- const nextValue = isNaN(numericValue) ? min : clampCurrencyInputValue(numericValue, min, max);
7481
- setRaw(nextValue >= 0 ? String(nextValue) : "");
7482
- onChange == null ? void 0 : onChange(nextValue);
7483
- onBlur == null ? void 0 : onBlur();
7484
- };
7485
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7486
- "input",
7487
- {
7488
- ref: inputRef,
7489
- type: "text",
7490
- inputMode: "decimal",
7491
- autoFocus,
7492
- value: displayValue,
7493
- disabled,
7494
- "aria-label": ariaLabel,
7495
- "aria-invalid": isInvalid || void 0,
7496
- className: cn(
7497
- "min-w-0 bg-transparent outline-none",
7498
- disabled && "cursor-not-allowed opacity-50",
7499
- isInvalid && "text-agg-error",
7500
- classNames == null ? void 0 : classNames.root,
7501
- classNames == null ? void 0 : classNames.input
7502
- ),
7503
- onChange: handleChange,
7504
- onFocus: handleFocus,
7505
- onBlur: handleBlur,
7506
- onPaste: handlePaste,
7507
- onSelect: handleSelect,
7508
- onKeyDown: handleKeyDown
7509
- }
7510
- );
7511
- };
7512
- CurrencyInput.displayName = "CurrencyInput";
7256
+ var import_react13 = require("react");
7257
+ var import_hooks33 = require("@agg-build/hooks");
7513
7258
 
7514
7259
  // src/primitives/venue-logo/index.tsx
7515
- var import_hooks32 = require("@agg-build/hooks");
7260
+ var import_hooks31 = require("@agg-build/hooks");
7516
7261
 
7517
7262
  // src/primitives/venue-logo/venue-logo.utils.ts
7518
7263
  var resolveVenueLogoLabel = ({
@@ -7532,7 +7277,7 @@ var resolveVenueLogoIsColor = ({
7532
7277
  };
7533
7278
 
7534
7279
  // src/primitives/venue-logo/index.tsx
7535
- var import_jsx_runtime123 = require("react/jsx-runtime");
7280
+ var import_jsx_runtime122 = require("react/jsx-runtime");
7536
7281
  var VenueLogo = ({
7537
7282
  venue,
7538
7283
  variant = "icon",
@@ -7545,7 +7290,7 @@ var VenueLogo = ({
7545
7290
  title
7546
7291
  }) => {
7547
7292
  var _a, _b;
7548
- const labels = (0, import_hooks32.useLabels)();
7293
+ const labels = (0, import_hooks31.useLabels)();
7549
7294
  const sizeClass = sizeClasses[size];
7550
7295
  const resolvedLabel = resolveVenueLogoLabel({
7551
7296
  ariaLabel,
@@ -7558,7 +7303,7 @@ var VenueLogo = ({
7558
7303
  console.warn(`[AggUI] Unknown venue "${venue}" \u2014 using default logo`);
7559
7304
  }
7560
7305
  if (variant === "logo") {
7561
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
7306
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7562
7307
  RemoteImage,
7563
7308
  {
7564
7309
  src: (_a = venueLogoUrlRegistry[venue]) != null ? _a : DEFAULT_VENUE_LOGO_URL,
@@ -7573,7 +7318,7 @@ var VenueLogo = ({
7573
7318
  isColor,
7574
7319
  isMonochromatic
7575
7320
  });
7576
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
7321
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
7577
7322
  Component,
7578
7323
  {
7579
7324
  className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
@@ -7587,19 +7332,19 @@ var VenueLogo = ({
7587
7332
  VenueLogo.displayName = "VenueLogo";
7588
7333
 
7589
7334
  // src/primitives/tabs/index.tsx
7590
- var import_hooks33 = require("@agg-build/hooks");
7591
- var import_react12 = require("react");
7335
+ var import_hooks32 = require("@agg-build/hooks");
7336
+ var import_react11 = require("react");
7592
7337
 
7593
7338
  // src/shared/use-horizontal-scroll-state.ts
7594
- var import_react11 = require("react");
7339
+ var import_react10 = require("react");
7595
7340
  var useHorizontalScrollState = () => {
7596
- const containerRef = (0, import_react11.useRef)(null);
7597
- const [hasOverflow, setHasOverflow] = (0, import_react11.useState)(false);
7598
- const [isAtStart, setIsAtStart] = (0, import_react11.useState)(true);
7599
- const [isAtEnd, setIsAtEnd] = (0, import_react11.useState)(true);
7600
- const [canScrollLeft, setCanScrollLeft] = (0, import_react11.useState)(false);
7601
- const [canScrollRight, setCanScrollRight] = (0, import_react11.useState)(false);
7602
- const update = (0, import_react11.useCallback)(() => {
7341
+ const containerRef = (0, import_react10.useRef)(null);
7342
+ const [hasOverflow, setHasOverflow] = (0, import_react10.useState)(false);
7343
+ const [isAtStart, setIsAtStart] = (0, import_react10.useState)(true);
7344
+ const [isAtEnd, setIsAtEnd] = (0, import_react10.useState)(true);
7345
+ const [canScrollLeft, setCanScrollLeft] = (0, import_react10.useState)(false);
7346
+ const [canScrollRight, setCanScrollRight] = (0, import_react10.useState)(false);
7347
+ const update = (0, import_react10.useCallback)(() => {
7603
7348
  const el = containerRef.current;
7604
7349
  if (!el) return;
7605
7350
  const epsilon = 2;
@@ -7612,13 +7357,13 @@ var useHorizontalScrollState = () => {
7612
7357
  setCanScrollLeft(nextHasOverflow && !nextIsAtStart);
7613
7358
  setCanScrollRight(nextHasOverflow && !nextIsAtEnd);
7614
7359
  }, []);
7615
- (0, import_react11.useEffect)(() => {
7360
+ (0, import_react10.useEffect)(() => {
7616
7361
  const el = containerRef.current;
7617
7362
  if (!el) return;
7618
7363
  el.addEventListener("scroll", update, { passive: true });
7619
7364
  return () => el.removeEventListener("scroll", update);
7620
7365
  }, [update]);
7621
- (0, import_react11.useEffect)(() => {
7366
+ (0, import_react10.useEffect)(() => {
7622
7367
  if (typeof ResizeObserver === "undefined") return;
7623
7368
  const el = containerRef.current;
7624
7369
  if (!el) return;
@@ -7662,7 +7407,7 @@ var findEdgeEnabledIndex = (items, direction) => {
7662
7407
  };
7663
7408
 
7664
7409
  // src/primitives/tabs/index.tsx
7665
- var import_jsx_runtime124 = require("react/jsx-runtime");
7410
+ var import_jsx_runtime123 = require("react/jsx-runtime");
7666
7411
  var getTabButtonClassName = ({
7667
7412
  enableAnimations,
7668
7413
  isBarVariant,
@@ -7705,12 +7450,12 @@ var Tabs = ({
7705
7450
  className,
7706
7451
  classNames
7707
7452
  }) => {
7708
- const labels = (0, import_hooks33.useLabels)();
7453
+ const labels = (0, import_hooks32.useLabels)();
7709
7454
  const {
7710
7455
  features: { enableAnimations }
7711
- } = (0, import_hooks33.useSdkUiConfig)();
7712
- const buttonRefs = (0, import_react12.useRef)([]);
7713
- const dragStateRef = (0, import_react12.useRef)({
7456
+ } = (0, import_hooks32.useSdkUiConfig)();
7457
+ const buttonRefs = (0, import_react11.useRef)([]);
7458
+ const dragStateRef = (0, import_react11.useRef)({
7714
7459
  isPointerDown: false,
7715
7460
  isDragging: false,
7716
7461
  pointerId: null,
@@ -7718,11 +7463,11 @@ var Tabs = ({
7718
7463
  startClientY: 0,
7719
7464
  startScrollLeft: 0
7720
7465
  });
7721
- const suppressClickRef = (0, import_react12.useRef)(false);
7466
+ const suppressClickRef = (0, import_react11.useRef)(false);
7722
7467
  const resolvedAriaLabel = ariaLabel != null ? ariaLabel : labels.common.tabsAria;
7723
- const [isMobileViewport, setIsMobileViewport] = (0, import_react12.useState)(false);
7724
- const [isDraggingTabs, setIsDraggingTabs] = (0, import_react12.useState)(false);
7725
- const [activeUnderlineStyle, setActiveUnderlineStyle] = (0, import_react12.useState)({
7468
+ const [isMobileViewport, setIsMobileViewport] = (0, import_react11.useState)(false);
7469
+ const [isDraggingTabs, setIsDraggingTabs] = (0, import_react11.useState)(false);
7470
+ const [activeUnderlineStyle, setActiveUnderlineStyle] = (0, import_react11.useState)({
7726
7471
  transform: "translateX(0px)",
7727
7472
  width: 0,
7728
7473
  opacity: 0
@@ -7737,14 +7482,14 @@ var Tabs = ({
7737
7482
  update: updateScrollState
7738
7483
  } = useHorizontalScrollState();
7739
7484
  const isBarVariant = variant === "bar";
7740
- const resolvedOverflowBehavior = (0, import_react12.useMemo)(() => {
7485
+ const resolvedOverflowBehavior = (0, import_react11.useMemo)(() => {
7741
7486
  if (overflowBehavior) return overflowBehavior;
7742
7487
  if (!isBarVariant) return "scroll";
7743
7488
  return isMobileViewport ? "select" : "scroll";
7744
7489
  }, [isBarVariant, isMobileViewport, overflowBehavior]);
7745
7490
  const shouldUseOverflowScroll = resolvedOverflowBehavior === "scroll";
7746
7491
  const shouldUseOverflowSelect = resolvedOverflowBehavior === "select";
7747
- (0, import_react12.useEffect)(() => {
7492
+ (0, import_react11.useEffect)(() => {
7748
7493
  if (typeof window === "undefined") return;
7749
7494
  const mediaQueryList = window.matchMedia(MOBILE_TABS_MEDIA_QUERY);
7750
7495
  const handleMediaQueryChange = (event) => {
@@ -7762,12 +7507,12 @@ var Tabs = ({
7762
7507
  mediaQueryList.removeListener(handleMediaQueryChange);
7763
7508
  };
7764
7509
  }, []);
7765
- const renderedItems = (0, import_react12.useMemo)(() => {
7510
+ const renderedItems = (0, import_react11.useMemo)(() => {
7766
7511
  return items.map((item) => __spreadProps(__spreadValues({}, item), {
7767
7512
  disabled: item.disabled || item.isComingSoon
7768
7513
  }));
7769
7514
  }, [items]);
7770
- const selectItems = (0, import_react12.useMemo)(() => {
7515
+ const selectItems = (0, import_react11.useMemo)(() => {
7771
7516
  return renderedItems.map((item) => ({
7772
7517
  value: item.value,
7773
7518
  label: item.isComingSoon ? `${item.label} (soon)` : item.label,
@@ -7900,7 +7645,7 @@ var Tabs = ({
7900
7645
  event == null ? void 0 : event.stopPropagation();
7901
7646
  suppressClickRef.current = false;
7902
7647
  };
7903
- const updateActiveUnderline = (0, import_react12.useCallback)(() => {
7648
+ const updateActiveUnderline = (0, import_react11.useCallback)(() => {
7904
7649
  if (isBarVariant) {
7905
7650
  setActiveUnderlineStyle({
7906
7651
  transform: "translateX(0px)",
@@ -7923,10 +7668,10 @@ var Tabs = ({
7923
7668
  opacity: 1
7924
7669
  });
7925
7670
  }, [isBarVariant, renderedItems, value]);
7926
- (0, import_react12.useLayoutEffect)(() => {
7671
+ (0, import_react11.useLayoutEffect)(() => {
7927
7672
  updateActiveUnderline();
7928
7673
  }, [updateActiveUnderline]);
7929
- (0, import_react12.useEffect)(() => {
7674
+ (0, import_react11.useEffect)(() => {
7930
7675
  if (isBarVariant || !shouldUseOverflowScroll) return;
7931
7676
  const tabListElement = tabListRef.current;
7932
7677
  if (!tabListElement) return;
@@ -7938,11 +7683,11 @@ var Tabs = ({
7938
7683
  tabListElement.removeEventListener("scroll", handleScroll);
7939
7684
  };
7940
7685
  }, [isBarVariant, shouldUseOverflowScroll, tabListRef, updateActiveUnderline]);
7941
- (0, import_react12.useEffect)(() => {
7686
+ (0, import_react11.useEffect)(() => {
7942
7687
  if (!shouldUseOverflowScroll) return;
7943
7688
  updateScrollState();
7944
7689
  }, [renderedItems, shouldUseOverflowScroll, updateScrollState, value]);
7945
- (0, import_react12.useEffect)(() => {
7690
+ (0, import_react11.useEffect)(() => {
7946
7691
  if (isBarVariant || !shouldUseOverflowScroll) return;
7947
7692
  if (typeof ResizeObserver === "undefined") return;
7948
7693
  const tabListElement = tabListRef.current;
@@ -7955,7 +7700,7 @@ var Tabs = ({
7955
7700
  resizeObserver.disconnect();
7956
7701
  };
7957
7702
  }, [isBarVariant, shouldUseOverflowScroll, tabListRef, updateActiveUnderline]);
7958
- (0, import_react12.useEffect)(() => {
7703
+ (0, import_react11.useEffect)(() => {
7959
7704
  if (!shouldUseOverflowScroll) return;
7960
7705
  const tabListElement = tabListRef.current;
7961
7706
  if (!tabListElement) return;
@@ -7983,7 +7728,7 @@ var Tabs = ({
7983
7728
  });
7984
7729
  }, [enableAnimations, renderedItems, shouldUseOverflowScroll, updateScrollState, value]);
7985
7730
  if (shouldUseOverflowSelect) {
7986
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: cn("group/agg-tabs w-full", className, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7731
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: cn("group/agg-tabs w-full", className, classNames == null ? void 0 : classNames.root), children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
7987
7732
  Select,
7988
7733
  {
7989
7734
  ariaLabel,
@@ -7995,7 +7740,7 @@ var Tabs = ({
7995
7740
  }
7996
7741
  ) });
7997
7742
  }
7998
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
7743
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
7999
7744
  "div",
8000
7745
  {
8001
7746
  className: cn(
@@ -8006,7 +7751,7 @@ var Tabs = ({
8006
7751
  classNames == null ? void 0 : classNames.root
8007
7752
  ),
8008
7753
  children: [
8009
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
7754
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
8010
7755
  "div",
8011
7756
  {
8012
7757
  ref: tabListRef,
@@ -8020,7 +7765,7 @@ var Tabs = ({
8020
7765
  onPointerUp: handleEndTabListDrag,
8021
7766
  onWheel: handleTabListWheel,
8022
7767
  children: [
8023
- shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7768
+ shouldUseOverflowScroll && !isBarVariant && hasOverflow ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8024
7769
  "span",
8025
7770
  {
8026
7771
  "aria-hidden": true,
@@ -8031,7 +7776,7 @@ var Tabs = ({
8031
7776
  var _a;
8032
7777
  const isActive = item.value === value;
8033
7778
  const isComingSoon = (_a = item == null ? void 0 : item.isComingSoon) != null ? _a : false;
8034
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
7779
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
8035
7780
  "button",
8036
7781
  {
8037
7782
  ref: (buttonElement) => {
@@ -8067,7 +7812,7 @@ var Tabs = ({
8067
7812
  ),
8068
7813
  children: [
8069
7814
  item.icon ? item.icon : null,
8070
- /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
7815
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
8071
7816
  "span",
8072
7817
  {
8073
7818
  className: cn(
@@ -8085,7 +7830,7 @@ var Tabs = ({
8085
7830
  item.value
8086
7831
  );
8087
7832
  }),
8088
- !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7833
+ !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8089
7834
  "span",
8090
7835
  {
8091
7836
  "aria-hidden": true,
@@ -8104,8 +7849,8 @@ var Tabs = ({
8104
7849
  ]
8105
7850
  }
8106
7851
  ),
8107
- shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
8108
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7852
+ shouldUseOverflowScroll && !isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
7853
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8109
7854
  "span",
8110
7855
  {
8111
7856
  "aria-hidden": true,
@@ -8117,7 +7862,7 @@ var Tabs = ({
8117
7862
  )
8118
7863
  }
8119
7864
  ),
8120
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7865
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8121
7866
  "span",
8122
7867
  {
8123
7868
  "aria-hidden": true,
@@ -8130,8 +7875,8 @@ var Tabs = ({
8130
7875
  }
8131
7876
  )
8132
7877
  ] }) : null,
8133
- shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
8134
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7878
+ shouldUseOverflowScroll && isBarVariant ? /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(import_jsx_runtime123.Fragment, { children: [
7879
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8135
7880
  "button",
8136
7881
  {
8137
7882
  type: "button",
@@ -8153,10 +7898,10 @@ var Tabs = ({
8153
7898
  behavior: getScrollBehavior(enableAnimations)
8154
7899
  });
8155
7900
  },
8156
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { name: "chevron-left", size: "small", color: "currentColor" })
7901
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { name: "chevron-left", size: "small", color: "currentColor" })
8157
7902
  }
8158
7903
  ),
8159
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
7904
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
8160
7905
  "button",
8161
7906
  {
8162
7907
  type: "button",
@@ -8178,7 +7923,7 @@ var Tabs = ({
8178
7923
  behavior: getScrollBehavior(enableAnimations)
8179
7924
  });
8180
7925
  },
8181
- children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
7926
+ children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Icon, { name: "chevron-right", size: "small", color: "currentColor" })
8182
7927
  }
8183
7928
  )
8184
7929
  ] }) : null
@@ -8190,26 +7935,26 @@ Tabs.displayName = "Tabs";
8190
7935
 
8191
7936
  // src/primitives/toast/index.tsx
8192
7937
  var RadixToast = __toESM(require("@radix-ui/react-toast"));
8193
- var import_react13 = require("react");
8194
- var import_jsx_runtime125 = require("react/jsx-runtime");
8195
- var ToastContext = (0, import_react13.createContext)(null);
7938
+ var import_react12 = require("react");
7939
+ var import_jsx_runtime124 = require("react/jsx-runtime");
7940
+ var ToastContext = (0, import_react12.createContext)(null);
8196
7941
  function useOptionalToast() {
8197
- return (0, import_react13.useContext)(ToastContext);
7942
+ return (0, import_react12.useContext)(ToastContext);
8198
7943
  }
8199
7944
 
8200
7945
  // src/onboarding/steps/profile-setup.tsx
8201
- var import_jsx_runtime126 = require("react/jsx-runtime");
7946
+ var import_jsx_runtime125 = require("react/jsx-runtime");
8202
7947
  var ProfileSetupStep = ({ onContinue }) => {
8203
- const labels = (0, import_hooks34.useLabels)();
8204
- const [username, setUsername] = (0, import_react14.useState)("");
8205
- const [avatarFile, setAvatarFile] = (0, import_react14.useState)();
8206
- const [avatarPreview, setAvatarPreview] = (0, import_react14.useState)();
8207
- const fileInputRef = (0, import_react14.useRef)(null);
8208
- const handleAvatarClick = (0, import_react14.useCallback)(() => {
7948
+ const labels = (0, import_hooks33.useLabels)();
7949
+ const [username, setUsername] = (0, import_react13.useState)("");
7950
+ const [avatarFile, setAvatarFile] = (0, import_react13.useState)();
7951
+ const [avatarPreview, setAvatarPreview] = (0, import_react13.useState)();
7952
+ const fileInputRef = (0, import_react13.useRef)(null);
7953
+ const handleAvatarClick = (0, import_react13.useCallback)(() => {
8209
7954
  var _a;
8210
7955
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
8211
7956
  }, []);
8212
- const handleFileChange = (0, import_react14.useCallback)((e) => {
7957
+ const handleFileChange = (0, import_react13.useCallback)((e) => {
8213
7958
  var _a;
8214
7959
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
8215
7960
  if (!file) return;
@@ -8221,18 +7966,18 @@ var ProfileSetupStep = ({ onContinue }) => {
8221
7966
  };
8222
7967
  reader.readAsDataURL(file);
8223
7968
  }, []);
8224
- const handleContinue = (0, import_react14.useCallback)(() => {
7969
+ const handleContinue = (0, import_react13.useCallback)(() => {
8225
7970
  onContinue({
8226
7971
  username,
8227
7972
  avatarFile,
8228
7973
  avatarPreview
8229
7974
  });
8230
7975
  }, [username, avatarFile, avatarPreview, onContinue]);
8231
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-7", children: [
8232
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
8233
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-5 items-center w-full", children: [
8234
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex justify-center", children: [
8235
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
7976
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex flex-col gap-7", children: [
7977
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.profileSetup.title }),
7978
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex flex-col gap-5 items-center w-full", children: [
7979
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex justify-center", children: [
7980
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
8236
7981
  "button",
8237
7982
  {
8238
7983
  type: "button",
@@ -8248,13 +7993,13 @@ var ProfileSetupStep = ({ onContinue }) => {
8248
7993
  ),
8249
7994
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
8250
7995
  children: [
8251
- !avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
7996
+ !avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8252
7997
  "svg",
8253
7998
  {
8254
7999
  "aria-hidden": true,
8255
8000
  viewBox: "0 0 80 80",
8256
8001
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
8257
- children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8002
+ children: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8258
8003
  "circle",
8259
8004
  {
8260
8005
  cx: "40",
@@ -8268,18 +8013,18 @@ var ProfileSetupStep = ({ onContinue }) => {
8268
8013
  )
8269
8014
  }
8270
8015
  ) : null,
8271
- avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8016
+ avatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8272
8017
  RemoteImage,
8273
8018
  {
8274
8019
  src: avatarPreview,
8275
8020
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
8276
8021
  className: "h-full w-full object-cover"
8277
8022
  }
8278
- ) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
8023
+ ) : /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(ProfileIcon, { className: "h-7 w-7 text-agg-muted-foreground" })
8279
8024
  ]
8280
8025
  }
8281
8026
  ),
8282
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8027
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8283
8028
  "input",
8284
8029
  {
8285
8030
  ref: fileInputRef,
@@ -8291,8 +8036,8 @@ var ProfileSetupStep = ({ onContinue }) => {
8291
8036
  }
8292
8037
  )
8293
8038
  ] }),
8294
- /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
8295
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8039
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
8040
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8296
8041
  "label",
8297
8042
  {
8298
8043
  htmlFor: "onboarding-username",
@@ -8300,7 +8045,7 @@ var ProfileSetupStep = ({ onContinue }) => {
8300
8045
  children: labels.onboarding.profileSetup.usernameLabel
8301
8046
  }
8302
8047
  ),
8303
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8048
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
8304
8049
  "input",
8305
8050
  {
8306
8051
  id: "onboarding-username",
@@ -8324,16 +8069,16 @@ var ProfileSetupStep = ({ onContinue }) => {
8324
8069
  )
8325
8070
  ] })
8326
8071
  ] }),
8327
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
8072
+ /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(Button, { variant: "primary", size: "large", className: "w-full", onClick: handleContinue, children: labels.onboarding.profileSetup.continue })
8328
8073
  ] });
8329
8074
  };
8330
8075
  ProfileSetupStep.displayName = "ProfileSetupStep";
8331
8076
 
8332
8077
  // src/onboarding/steps/connect-accounts.tsx
8333
- var import_hooks35 = require("@agg-build/hooks");
8334
- var import_jsx_runtime127 = require("react/jsx-runtime");
8078
+ var import_hooks34 = require("@agg-build/hooks");
8079
+ var import_jsx_runtime126 = require("react/jsx-runtime");
8335
8080
  var OnchainVenueLogos = () => {
8336
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
8081
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
8337
8082
  };
8338
8083
  var VenueCard = ({
8339
8084
  logos,
@@ -8344,8 +8089,8 @@ var VenueCard = ({
8344
8089
  onConnect,
8345
8090
  connected = false
8346
8091
  }) => {
8347
- const labels = (0, import_hooks35.useLabels)();
8348
- const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8092
+ const labels = (0, import_hooks34.useLabels)();
8093
+ const action = connected ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8349
8094
  Button,
8350
8095
  {
8351
8096
  variant: "tertiary",
@@ -8355,18 +8100,18 @@ var VenueCard = ({
8355
8100
  children: labels.onboarding.connectAccounts.connect
8356
8101
  }
8357
8102
  );
8358
- const mobileAction = connected ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8103
+ const mobileAction = connected ? /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(CheckCircleIcon, { className: "h-6 w-6 text-agg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8359
8104
  Button,
8360
8105
  {
8361
8106
  variant: "tertiary",
8362
8107
  size: "medium",
8363
8108
  className: "!h-auto !px-0 !py-0 text-agg-primary hover:bg-transparent hover:text-agg-primary-hover",
8364
8109
  onClick: onConnect,
8365
- suffix: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
8110
+ suffix: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ChevronRightIcon, { className: "h-4 w-4" }),
8366
8111
  children: labels.onboarding.connectAccounts.connectAccount
8367
8112
  }
8368
8113
  );
8369
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
8114
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
8370
8115
  "div",
8371
8116
  {
8372
8117
  className: cn(
@@ -8374,23 +8119,23 @@ var VenueCard = ({
8374
8119
  connected ? "bg-agg-success/5" : "bg-agg-secondary-hover hover:bg-agg-tertiary"
8375
8120
  ),
8376
8121
  children: [
8377
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "hidden sm:flex items-center justify-between", children: [
8378
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-5", children: [
8379
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "shrink-0", children: logos }),
8380
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-[2px]", children: [
8381
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
8382
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-sm text-agg-foreground", children: description })
8122
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "hidden sm:flex items-center justify-between", children: [
8123
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex items-center gap-5", children: [
8124
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "shrink-0", children: logos }),
8125
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-[2px]", children: [
8126
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-base font-agg-bold text-agg-foreground", children: title }),
8127
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-sm text-agg-foreground", children: description })
8383
8128
  ] })
8384
8129
  ] }),
8385
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "shrink-0", children: action })
8130
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "shrink-0", children: action })
8386
8131
  ] }),
8387
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-3 sm:hidden", children: [
8388
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-3", children: [
8389
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "shrink-0", children: logos }),
8390
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
8132
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-3 sm:hidden", children: [
8133
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-3", children: [
8134
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "shrink-0", children: logos }),
8135
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-lg font-agg-bold text-agg-foreground", children: mobileTitle != null ? mobileTitle : title })
8391
8136
  ] }),
8392
- /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
8393
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
8137
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
8138
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { className: "text-agg-base text-agg-foreground", children: mobileDescription != null ? mobileDescription : description }),
8394
8139
  mobileAction
8395
8140
  ] })
8396
8141
  ] })
@@ -8403,14 +8148,14 @@ var ConnectAccountsStep = ({
8403
8148
  onContinue,
8404
8149
  connectedOnchain = false
8405
8150
  }) => {
8406
- const labels = (0, import_hooks35.useLabels)();
8151
+ const labels = (0, import_hooks34.useLabels)();
8407
8152
  const canContinue = connectedOnchain;
8408
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-6", children: [
8409
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
8410
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8153
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col gap-6", children: [
8154
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("h2", { className: "text-center text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectAccounts.title }),
8155
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8411
8156
  VenueCard,
8412
8157
  {
8413
- logos: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(OnchainVenueLogos, {}),
8158
+ logos: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(OnchainVenueLogos, {}),
8414
8159
  title: labels.onboarding.connectAccounts.onchainTitle,
8415
8160
  mobileTitle: labels.onboarding.connectAccounts.onchainMobileTitle(
8416
8161
  ONCHAIN_VENUES.length - 1
@@ -8421,7 +8166,7 @@ var ConnectAccountsStep = ({
8421
8166
  connected: connectedOnchain
8422
8167
  }
8423
8168
  ) }),
8424
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8169
+ /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
8425
8170
  Button,
8426
8171
  {
8427
8172
  variant: "primary",
@@ -8437,22 +8182,22 @@ var ConnectAccountsStep = ({
8437
8182
  ConnectAccountsStep.displayName = "ConnectAccountsStep";
8438
8183
 
8439
8184
  // src/onboarding/steps/connect-onchain-modal.tsx
8440
- var import_react15 = require("react");
8441
- var import_hooks36 = require("@agg-build/hooks");
8185
+ var import_react14 = require("react");
8186
+ var import_hooks35 = require("@agg-build/hooks");
8442
8187
  var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
8443
- var import_jsx_runtime128 = require("react/jsx-runtime");
8188
+ var import_jsx_runtime127 = require("react/jsx-runtime");
8444
8189
  var ConnectOnchainModal = ({
8445
8190
  open,
8446
8191
  onOpenChange,
8447
8192
  onConnect
8448
8193
  }) => {
8449
- const labels = (0, import_hooks36.useLabels)();
8450
- const [connecting, setConnecting] = (0, import_react15.useState)(false);
8451
- const [error, setError] = (0, import_react15.useState)();
8452
- const handleCancel = (0, import_react15.useCallback)(() => {
8194
+ const labels = (0, import_hooks35.useLabels)();
8195
+ const [connecting, setConnecting] = (0, import_react14.useState)(false);
8196
+ const [error, setError] = (0, import_react14.useState)();
8197
+ const handleCancel = (0, import_react14.useCallback)(() => {
8453
8198
  onOpenChange(false);
8454
8199
  }, [onOpenChange]);
8455
- const handleConnect = (0, import_react15.useCallback)(() => __async(null, null, function* () {
8200
+ const handleConnect = (0, import_react14.useCallback)(() => __async(null, null, function* () {
8456
8201
  if (connecting) return;
8457
8202
  setConnecting(true);
8458
8203
  setError(void 0);
@@ -8467,7 +8212,7 @@ var ConnectOnchainModal = ({
8467
8212
  setConnecting(false);
8468
8213
  }
8469
8214
  }), [connecting, labels.onboarding.connectOnchainModal.fallbackError, onConnect, onOpenChange]);
8470
- const handleOpenChange = (0, import_react15.useCallback)(
8215
+ const handleOpenChange = (0, import_react14.useCallback)(
8471
8216
  (value) => {
8472
8217
  if (value) {
8473
8218
  setError(void 0);
@@ -8477,15 +8222,15 @@ var ConnectOnchainModal = ({
8477
8222
  },
8478
8223
  [onOpenChange]
8479
8224
  );
8480
- return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8225
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
8481
8226
  Modal.Container,
8482
8227
  {
8483
8228
  maxWidth: "600px",
8484
8229
  "aria-label": labels.onboarding.connectOnchainModal.ariaLabel,
8485
8230
  classNames: { container: "!rounded-agg-lg" },
8486
8231
  children: [
8487
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
8488
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8232
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Dialog2.Title, { className: "sr-only", children: labels.onboarding.connectOnchainModal.title }),
8233
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8489
8234
  Modal.Header,
8490
8235
  {
8491
8236
  hideClose: false,
@@ -8496,26 +8241,26 @@ var ConnectOnchainModal = ({
8496
8241
  }
8497
8242
  }
8498
8243
  ),
8499
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8500
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8501
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
8502
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
8244
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8245
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8246
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectOnchainModal.title }),
8247
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-base text-center leading-agg-6 text-agg-foreground whitespace-pre-line", children: labels.onboarding.connectOnchainModal.description })
8503
8248
  ] }),
8504
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
8505
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
8506
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
8507
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
8508
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(VenueLogo, { venue, size: "medium" }),
8509
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
8249
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex w-full flex-col items-center gap-4 rounded-agg-xl bg-agg-secondary-hover p-6", children: [
8250
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-sm font-agg-bold uppercase leading-agg-5 text-agg-muted-foreground", children: labels.onboarding.connectOnchainModal.supportedVenuesLabel }),
8251
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "flex flex-wrap items-center justify-center gap-x-4 gap-y-3", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-[6px]", children: [
8252
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "mr-2.5 h-3 w-px bg-agg-separator" }),
8253
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(VenueLogo, { venue, size: "medium" }),
8254
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "text-agg-base text-agg-foreground", children: labels.venues[venue] })
8510
8255
  ] }, venue)) })
8511
8256
  ] }),
8512
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-6 items-center", children: [
8513
- /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-3 items-center", children: [
8514
- error ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-2", children: [
8515
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
8516
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8257
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-6 items-center", children: [
8258
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col gap-3 items-center", children: [
8259
+ error ? /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex items-center gap-2", children: [
8260
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(WarningIcon, { className: "h-3.5 w-3.5 shrink-0 text-agg-error" }),
8261
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8517
8262
  ] }) : null,
8518
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8263
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8519
8264
  Button,
8520
8265
  {
8521
8266
  variant: "primary",
@@ -8526,7 +8271,7 @@ var ConnectOnchainModal = ({
8526
8271
  }
8527
8272
  )
8528
8273
  ] }),
8529
- /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8274
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
8530
8275
  Button,
8531
8276
  {
8532
8277
  variant: "tertiary",
@@ -8545,12 +8290,12 @@ var ConnectOnchainModal = ({
8545
8290
  ConnectOnchainModal.displayName = "ConnectOnchainModal";
8546
8291
 
8547
8292
  // src/onboarding/steps/connect-kalshi-modal.tsx
8548
- var import_hooks37 = require("@agg-build/hooks");
8293
+ var import_hooks36 = require("@agg-build/hooks");
8549
8294
  var import_sdk11 = require("@agg-build/sdk");
8550
8295
  var Dialog3 = __toESM(require("@radix-ui/react-dialog"));
8551
- var import_react16 = require("react");
8296
+ var import_react15 = require("react");
8552
8297
  var import_zod = require("zod");
8553
- var import_jsx_runtime129 = require("react/jsx-runtime");
8298
+ var import_jsx_runtime128 = require("react/jsx-runtime");
8554
8299
  var kalshiCredentialsSchema = import_zod.z.object({
8555
8300
  apiKeyId: import_zod.z.string().trim().min(1),
8556
8301
  privateKey: import_zod.z.string().trim().min(1)
@@ -8572,25 +8317,25 @@ var ConnectKalshiModal = ({
8572
8317
  onOpenChange,
8573
8318
  onVerify
8574
8319
  }) => {
8575
- const labels = (0, import_hooks37.useLabels)();
8576
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks37.useAppConfig)();
8577
- const apiKeyInputRef = (0, import_react16.useRef)(null);
8578
- const errorId = (0, import_react16.useId)();
8579
- const [apiKeyId, setApiKeyId] = (0, import_react16.useState)("");
8580
- const [privateKey, setPrivateKey] = (0, import_react16.useState)("");
8581
- const [isVerifying, setIsVerifying] = (0, import_react16.useState)(false);
8582
- const [isConnected, setIsConnected] = (0, import_react16.useState)(false);
8583
- const [error, setError] = (0, import_react16.useState)();
8584
- const availabilityState = (0, import_hooks37.getVenueAvailabilityState)({
8320
+ const labels = (0, import_hooks36.useLabels)();
8321
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks36.useAppConfig)();
8322
+ const apiKeyInputRef = (0, import_react15.useRef)(null);
8323
+ const errorId = (0, import_react15.useId)();
8324
+ const [apiKeyId, setApiKeyId] = (0, import_react15.useState)("");
8325
+ const [privateKey, setPrivateKey] = (0, import_react15.useState)("");
8326
+ const [isVerifying, setIsVerifying] = (0, import_react15.useState)(false);
8327
+ const [isConnected, setIsConnected] = (0, import_react15.useState)(false);
8328
+ const [error, setError] = (0, import_react15.useState)();
8329
+ const availabilityState = (0, import_hooks36.getVenueAvailabilityState)({
8585
8330
  venueId: import_sdk11.Venue.kalshi,
8586
8331
  disabledVenues,
8587
8332
  isConfigLoading: isAppConfigLoading
8588
8333
  });
8589
- const parsedCredentials = (0, import_react16.useMemo)(
8334
+ const parsedCredentials = (0, import_react15.useMemo)(
8590
8335
  () => kalshiCredentialsSchema.safeParse({ apiKeyId, privateKey }),
8591
8336
  [apiKeyId, privateKey]
8592
8337
  );
8593
- (0, import_react16.useEffect)(() => {
8338
+ (0, import_react15.useEffect)(() => {
8594
8339
  if (!open) return;
8595
8340
  setApiKeyId("");
8596
8341
  setPrivateKey("");
@@ -8603,14 +8348,14 @@ var ConnectKalshiModal = ({
8603
8348
  });
8604
8349
  return () => window.cancelAnimationFrame(animationFrame);
8605
8350
  }, [open]);
8606
- const handleOpenChange = (0, import_react16.useCallback)(
8351
+ const handleOpenChange = (0, import_react15.useCallback)(
8607
8352
  (nextOpen) => {
8608
8353
  if (isVerifying && !nextOpen) return;
8609
8354
  onOpenChange(nextOpen);
8610
8355
  },
8611
8356
  [isVerifying, onOpenChange]
8612
8357
  );
8613
- const handleVerify = (0, import_react16.useCallback)(() => __async(null, null, function* () {
8358
+ const handleVerify = (0, import_react15.useCallback)(() => __async(null, null, function* () {
8614
8359
  if (!parsedCredentials.success || isVerifying || isConnected) return;
8615
8360
  const credentials = parsedCredentials.data;
8616
8361
  setIsVerifying(true);
@@ -8637,7 +8382,7 @@ var ConnectKalshiModal = ({
8637
8382
  onVerify,
8638
8383
  parsedCredentials
8639
8384
  ]);
8640
- const handleSubmit = (0, import_react16.useCallback)(
8385
+ const handleSubmit = (0, import_react15.useCallback)(
8641
8386
  (event) => {
8642
8387
  event.preventDefault();
8643
8388
  void handleVerify();
@@ -8645,30 +8390,30 @@ var ConnectKalshiModal = ({
8645
8390
  [handleVerify]
8646
8391
  );
8647
8392
  if (availabilityState === "hidden") return null;
8648
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8393
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8649
8394
  Modal.Container,
8650
8395
  {
8651
8396
  maxWidth: "600px",
8652
8397
  "aria-label": labels.onboarding.connectKalshiModal.ariaLabel,
8653
8398
  classNames: { container: "!rounded-agg-2xl" },
8654
8399
  children: [
8655
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8400
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex h-[60px] shrink-0 items-center justify-end px-8", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8656
8401
  Dialog3.Close,
8657
8402
  {
8658
8403
  "aria-label": labels.common.close,
8659
8404
  className: "flex size-10 cursor-pointer items-center justify-center rounded-agg-full text-agg-secondary transition-colors hover:bg-agg-quaternary hover:text-agg-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-accent disabled:cursor-default disabled:opacity-50",
8660
8405
  disabled: isVerifying,
8661
- children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: "close", size: "medium" })
8406
+ children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: "close", size: "medium" })
8662
8407
  }
8663
8408
  ) }),
8664
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8409
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Modal.Body, { classNames: { root: "!px-5 !pb-12 !pt-0 sm:!px-10" }, children: isConnected ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8665
8410
  "div",
8666
8411
  {
8667
8412
  className: "flex flex-col items-center gap-8 pb-3 text-center",
8668
8413
  role: "status",
8669
8414
  "aria-live": "polite",
8670
8415
  children: [
8671
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8416
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { className: "flex size-[60px] items-center justify-center rounded-agg-full bg-agg-success", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8672
8417
  Icon,
8673
8418
  {
8674
8419
  name: "success-check",
@@ -8676,11 +8421,11 @@ var ConnectKalshiModal = ({
8676
8421
  "aria-hidden": "true"
8677
8422
  }
8678
8423
  ) }),
8679
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8680
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
8681
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Dialog3.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
8424
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col items-center gap-4", children: [
8425
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.title }),
8426
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog3.Description, { className: "max-w-[480px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.success.description })
8682
8427
  ] }),
8683
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8428
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8684
8429
  Button,
8685
8430
  {
8686
8431
  variant: "primary",
@@ -8692,27 +8437,27 @@ var ConnectKalshiModal = ({
8692
8437
  )
8693
8438
  ]
8694
8439
  }
8695
- ) : /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
8696
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(VenueLogo, { venue: import_sdk11.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8697
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
8698
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8699
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Dialog3.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
8440
+ ) : /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("form", { className: "flex flex-col items-center gap-8", onSubmit: handleSubmit, children: [
8441
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(VenueLogo, { venue: import_sdk11.Venue.kalshi, variant: "logo", size: "large", className: "size-[60px]" }),
8442
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col items-center gap-4 text-center", children: [
8443
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog3.Title, { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8444
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Dialog3.Description, { className: "max-w-[520px] text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })
8700
8445
  ] }),
8701
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
8702
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8703
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-1", children: [
8704
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
8705
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
8446
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex w-full flex-col gap-4", children: [
8447
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8448
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-1", children: [
8449
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepOne.label }),
8450
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepOne.title })
8706
8451
  ] }),
8707
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8708
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
8709
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("p", { children: [
8452
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8453
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.signIn }),
8454
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("p", { children: [
8710
8455
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfilePrefix,
8711
8456
  " ",
8712
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
8457
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.profileText }),
8713
8458
  labels.onboarding.connectKalshiModal.stepOne.instructions.goToProfileSeparator,
8714
8459
  " ",
8715
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8460
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8716
8461
  "a",
8717
8462
  {
8718
8463
  href: labels.onboarding.connectKalshiModal.stepOne.instructions.profileUrl,
@@ -8723,34 +8468,34 @@ var ConnectKalshiModal = ({
8723
8468
  }
8724
8469
  )
8725
8470
  ] }),
8726
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("p", { children: [
8471
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("p", { children: [
8727
8472
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeyPrefix,
8728
8473
  " ",
8729
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
8474
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKeyText }),
8730
8475
  labels.onboarding.connectKalshiModal.stepOne.instructions.clickCreateKeySuffix
8731
8476
  ] }),
8732
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("p", { children: [
8477
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("p", { children: [
8733
8478
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsPrefix,
8734
8479
  " ",
8735
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
8480
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "font-agg-bold", children: labels.onboarding.connectKalshiModal.stepOne.instructions.readWriteText }),
8736
8481
  labels.onboarding.connectKalshiModal.stepOne.instructions.selectPermissionsSuffix
8737
8482
  ] }),
8738
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
8483
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { children: labels.onboarding.connectKalshiModal.stepOne.instructions.createKey })
8739
8484
  ] }),
8740
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8485
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: [
8741
8486
  labels.onboarding.connectKalshiModal.stepOne.footerLineOne,
8742
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("br", {}),
8487
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("br", {}),
8743
8488
  labels.onboarding.connectKalshiModal.stepOne.footerLineTwo
8744
8489
  ] })
8745
8490
  ] }),
8746
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8747
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-1", children: [
8748
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
8749
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
8491
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-3 rounded-agg-xl bg-agg-secondary-hover p-4", children: [
8492
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-1", children: [
8493
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-xs font-agg-bold uppercase leading-agg-4 text-agg-muted-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.label }),
8494
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.title })
8750
8495
  ] }),
8751
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
8752
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-2", children: [
8753
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8496
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-foreground", children: labels.onboarding.connectKalshiModal.stepTwo.description }),
8497
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-2", children: [
8498
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8754
8499
  "label",
8755
8500
  {
8756
8501
  htmlFor: "kalshi-api-key-id",
@@ -8758,7 +8503,7 @@ var ConnectKalshiModal = ({
8758
8503
  children: labels.onboarding.connectKalshiModal.stepTwo.apiKeyIdLabel
8759
8504
  }
8760
8505
  ),
8761
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8506
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8762
8507
  "input",
8763
8508
  {
8764
8509
  ref: apiKeyInputRef,
@@ -8780,8 +8525,8 @@ var ConnectKalshiModal = ({
8780
8525
  }
8781
8526
  )
8782
8527
  ] }),
8783
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col gap-2", children: [
8784
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8528
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col gap-2", children: [
8529
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8785
8530
  "label",
8786
8531
  {
8787
8532
  htmlFor: "kalshi-private-key",
@@ -8789,7 +8534,7 @@ var ConnectKalshiModal = ({
8789
8534
  children: labels.onboarding.connectKalshiModal.stepTwo.privateKeyLabel
8790
8535
  }
8791
8536
  ),
8792
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8537
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8793
8538
  "textarea",
8794
8539
  {
8795
8540
  id: "kalshi-private-key",
@@ -8812,22 +8557,22 @@ var ConnectKalshiModal = ({
8812
8557
  ] })
8813
8558
  ] })
8814
8559
  ] }),
8815
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
8816
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
8817
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex items-center gap-3", children: [
8818
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8819
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
8560
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
8561
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-base text-agg-foreground", children: labels.onboarding.connectKalshiModal.help.label }),
8562
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center gap-3", children: [
8563
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8564
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: "document", size: "small", className: "size-4 text-agg-primary" }),
8820
8565
  labels.onboarding.connectKalshiModal.help.docsLinkLabel
8821
8566
  ] }),
8822
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
8823
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8824
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
8567
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("span", { className: "h-3 w-px bg-agg-separator" }),
8568
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("span", { className: "flex items-center gap-2 text-agg-base font-agg-bold text-agg-primary", children: [
8569
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: "play-square", size: "small", className: "size-4 text-agg-primary" }),
8825
8570
  labels.onboarding.connectKalshiModal.help.tutorialLinkLabel
8826
8571
  ] })
8827
8572
  ] })
8828
8573
  ] }),
8829
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
8830
- error ? /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8574
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex flex-col items-center gap-5", children: [
8575
+ error ? /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
8831
8576
  "div",
8832
8577
  {
8833
8578
  id: errorId,
@@ -8835,13 +8580,13 @@ var ConnectKalshiModal = ({
8835
8580
  role: "alert",
8836
8581
  "aria-live": "assertive",
8837
8582
  children: [
8838
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
8839
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8583
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { name: "warning", size: "small", className: "size-3.5 text-agg-error" }),
8584
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("p", { className: "text-agg-sm leading-agg-5 text-agg-error", children: error })
8840
8585
  ]
8841
8586
  }
8842
8587
  ) : null,
8843
- /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
8844
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8588
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("div", { className: "flex items-center justify-center gap-3", children: [
8589
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8845
8590
  Button,
8846
8591
  {
8847
8592
  variant: "secondary",
@@ -8851,7 +8596,7 @@ var ConnectKalshiModal = ({
8851
8596
  children: labels.onboarding.connectKalshiModal.actions.cancel
8852
8597
  }
8853
8598
  ),
8854
- /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8599
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
8855
8600
  Button,
8856
8601
  {
8857
8602
  type: "submit",
@@ -8872,7 +8617,7 @@ var ConnectKalshiModal = ({
8872
8617
  ConnectKalshiModal.displayName = "ConnectKalshiModal";
8873
8618
 
8874
8619
  // src/onboarding/index.tsx
8875
- var import_jsx_runtime130 = require("react/jsx-runtime");
8620
+ var import_jsx_runtime129 = require("react/jsx-runtime");
8876
8621
  var OnboardingModal = ({
8877
8622
  open,
8878
8623
  onOpenChange,
@@ -8883,55 +8628,55 @@ var OnboardingModal = ({
8883
8628
  connectedOnchain = false
8884
8629
  }) => {
8885
8630
  var _a;
8886
- const labels = (0, import_hooks38.useLabels)();
8887
- const [step, setStep] = (0, import_react17.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
8631
+ const labels = (0, import_hooks37.useLabels)();
8632
+ const [step, setStep] = (0, import_react16.useState)(ONBOARDING_STEPS.HOW_IT_WORKS);
8888
8633
  const stepLabels = {
8889
8634
  [ONBOARDING_STEPS.HOW_IT_WORKS]: labels.onboarding.modal.stepHowItWorks,
8890
8635
  [ONBOARDING_STEPS.PROFILE_SETUP]: labels.onboarding.modal.stepProfileSetup,
8891
8636
  [ONBOARDING_STEPS.CONNECT_ACCOUNTS]: labels.onboarding.modal.stepConnectAccounts
8892
8637
  };
8893
8638
  const resolvedTitle = (_a = stepLabels[step]) != null ? _a : labels.onboarding.modal.title;
8894
- const [onchainModalOpen, setOnchainModalOpen] = (0, import_react17.useState)(false);
8895
- const [onchainConnected, setOnchainConnected] = (0, import_react17.useState)(false);
8896
- (0, import_react17.useEffect)(() => {
8639
+ const [onchainModalOpen, setOnchainModalOpen] = (0, import_react16.useState)(false);
8640
+ const [onchainConnected, setOnchainConnected] = (0, import_react16.useState)(false);
8641
+ (0, import_react16.useEffect)(() => {
8897
8642
  if (open) {
8898
8643
  setStep(ONBOARDING_STEPS.HOW_IT_WORKS);
8899
8644
  setOnchainConnected(false);
8900
8645
  }
8901
8646
  }, [open]);
8902
- const handleHowItWorksContinue = (0, import_react17.useCallback)(() => {
8647
+ const handleHowItWorksContinue = (0, import_react16.useCallback)(() => {
8903
8648
  setStep(ONBOARDING_STEPS.PROFILE_SETUP);
8904
8649
  }, []);
8905
- const handleProfileContinue = (0, import_react17.useCallback)(
8650
+ const handleProfileContinue = (0, import_react16.useCallback)(
8906
8651
  (data) => {
8907
8652
  onProfileSubmit == null ? void 0 : onProfileSubmit(data);
8908
8653
  setStep(ONBOARDING_STEPS.CONNECT_ACCOUNTS);
8909
8654
  },
8910
8655
  [onProfileSubmit]
8911
8656
  );
8912
- const handleConnectContinue = (0, import_react17.useCallback)(() => {
8657
+ const handleConnectContinue = (0, import_react16.useCallback)(() => {
8913
8658
  onComplete == null ? void 0 : onComplete();
8914
8659
  }, [onComplete]);
8915
- const handleOpenOnchainModal = (0, import_react17.useCallback)(() => {
8660
+ const handleOpenOnchainModal = (0, import_react16.useCallback)(() => {
8916
8661
  setOnchainModalOpen(true);
8917
8662
  }, []);
8918
- const handleOnchainConnect = (0, import_react17.useCallback)(() => __async(null, null, function* () {
8663
+ const handleOnchainConnect = (0, import_react16.useCallback)(() => __async(null, null, function* () {
8919
8664
  yield onConnectOnchain == null ? void 0 : onConnectOnchain();
8920
8665
  setOnchainConnected(true);
8921
8666
  }), [onConnectOnchain]);
8922
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
8923
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
8667
+ return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
8668
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
8924
8669
  Modal.Container,
8925
8670
  {
8926
8671
  maxWidth: "600px",
8927
8672
  "aria-label": resolvedTitle,
8928
8673
  classNames: { container: "!rounded-agg-lg" },
8929
8674
  children: [
8930
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Dialog4.Title, { className: "sr-only", children: resolvedTitle }),
8931
- /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
8932
- step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
8933
- step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ProfileSetupStep, { onContinue: handleProfileContinue }),
8934
- step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8675
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Dialog4.Title, { className: "sr-only", children: resolvedTitle }),
8676
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Modal.Body, { classNames: { root: "px-5 py-6 sm:px-10 sm:py-8" }, children: [
8677
+ step === ONBOARDING_STEPS.HOW_IT_WORKS && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(HowItWorksStep, { onContinue: handleHowItWorksContinue, icons: howItWorksIcons }),
8678
+ step === ONBOARDING_STEPS.PROFILE_SETUP && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ProfileSetupStep, { onContinue: handleProfileContinue }),
8679
+ step === ONBOARDING_STEPS.CONNECT_ACCOUNTS && /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8935
8680
  ConnectAccountsStep,
8936
8681
  {
8937
8682
  onConnectOnchain: handleOpenOnchainModal,
@@ -8943,7 +8688,7 @@ var OnboardingModal = ({
8943
8688
  ]
8944
8689
  }
8945
8690
  ) }),
8946
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
8691
+ /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
8947
8692
  ConnectOnchainModal,
8948
8693
  {
8949
8694
  open: onchainModalOpen,
@@ -8956,34 +8701,28 @@ var OnboardingModal = ({
8956
8701
  OnboardingModal.displayName = "OnboardingModal";
8957
8702
 
8958
8703
  // src/profile/index.tsx
8959
- var import_react21 = require("react");
8960
- var import_hooks42 = require("@agg-build/hooks");
8704
+ var import_react19 = require("react");
8705
+ var import_hooks40 = require("@agg-build/hooks");
8961
8706
  var import_sdk12 = require("@agg-build/sdk");
8962
8707
 
8963
8708
  // src/profile/profile-modal.constants.ts
8964
8709
  var PROFILE_TAB_KEYS = {
8965
8710
  PROFILE_ACCOUNTS: "profile-accounts",
8966
- TRADING_ACCESS: "trading-access",
8967
- BALANCE_MANAGEMENT: "balance-management"
8711
+ TRADING_ACCESS: "trading-access"
8968
8712
  };
8969
- var getProfileTabItems = (balanceManagementLabel) => [
8713
+ var getProfileTabItems = () => [
8970
8714
  {
8971
8715
  value: PROFILE_TAB_KEYS.PROFILE_ACCOUNTS,
8972
8716
  label: "Profile & accounts",
8973
8717
  icon: "profile-about-tab"
8974
8718
  },
8975
- { value: PROFILE_TAB_KEYS.TRADING_ACCESS, label: "Trading access", icon: "shield-trust" },
8976
- {
8977
- value: PROFILE_TAB_KEYS.BALANCE_MANAGEMENT,
8978
- label: balanceManagementLabel,
8979
- icon: "bolt"
8980
- }
8719
+ { value: PROFILE_TAB_KEYS.TRADING_ACCESS, label: "Trading access", icon: "shield-trust" }
8981
8720
  ];
8982
8721
 
8983
8722
  // src/profile/tabs/about-tab.tsx
8984
- var import_react18 = require("react");
8985
- var import_hooks39 = require("@agg-build/hooks");
8986
- var import_jsx_runtime131 = require("react/jsx-runtime");
8723
+ var import_react17 = require("react");
8724
+ var import_hooks38 = require("@agg-build/hooks");
8725
+ var import_jsx_runtime130 = require("react/jsx-runtime");
8987
8726
  var AboutTab = ({
8988
8727
  avatarPreview,
8989
8728
  onDeleteProfile: _onDeleteProfile,
@@ -8993,13 +8732,13 @@ var AboutTab = ({
8993
8732
  draftAvatarPreview,
8994
8733
  avatarError: _avatarError
8995
8734
  }) => {
8996
- const labels = (0, import_hooks39.useLabels)();
8997
- const fileInputRef = (0, import_react18.useRef)(null);
8998
- const handleAvatarClick = (0, import_react18.useCallback)(() => {
8735
+ const labels = (0, import_hooks38.useLabels)();
8736
+ const fileInputRef = (0, import_react17.useRef)(null);
8737
+ const handleAvatarClick = (0, import_react17.useCallback)(() => {
8999
8738
  var _a;
9000
8739
  (_a = fileInputRef.current) == null ? void 0 : _a.click();
9001
8740
  }, []);
9002
- const handleFileChange = (0, import_react18.useCallback)(
8741
+ const handleFileChange = (0, import_react17.useCallback)(
9003
8742
  (e) => {
9004
8743
  var _a;
9005
8744
  const file = (_a = e.target.files) == null ? void 0 : _a[0];
@@ -9015,8 +8754,8 @@ var AboutTab = ({
9015
8754
  );
9016
8755
  const resolvedPreview = draftAvatarPreview != null ? draftAvatarPreview : avatarPreview;
9017
8756
  const hasAvatarPreview = Boolean(resolvedPreview);
9018
- return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "agg-profile-about flex flex-col gap-8", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-profile-avatar-section flex w-full items-center gap-6", children: [
9019
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
8757
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "agg-profile-about flex flex-col gap-8", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "agg-profile-avatar-section flex w-full items-center gap-6", children: [
8758
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
9020
8759
  "button",
9021
8760
  {
9022
8761
  type: "button",
@@ -9033,13 +8772,13 @@ var AboutTab = ({
9033
8772
  ),
9034
8773
  "aria-label": labels.onboarding.profileSetup.uploadProfilePictureAria,
9035
8774
  children: [
9036
- !hasAvatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8775
+ !hasAvatarPreview ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9037
8776
  "svg",
9038
8777
  {
9039
8778
  "aria-hidden": true,
9040
8779
  viewBox: "0 0 80 80",
9041
8780
  className: "pointer-events-none absolute inset-0 h-full w-full text-agg-separator group-hover:text-agg-muted-foreground",
9042
- children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8781
+ children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9043
8782
  "circle",
9044
8783
  {
9045
8784
  cx: "40",
@@ -9053,18 +8792,18 @@ var AboutTab = ({
9053
8792
  )
9054
8793
  }
9055
8794
  ) : null,
9056
- resolvedPreview ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8795
+ resolvedPreview ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9057
8796
  RemoteImage,
9058
8797
  {
9059
8798
  src: resolvedPreview,
9060
8799
  alt: labels.onboarding.profileSetup.profilePreviewAlt,
9061
8800
  className: "h-full w-full object-cover"
9062
8801
  }
9063
- ) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
8802
+ ) : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Icon, { name: "profile", className: "h-7 w-7 text-agg-muted-foreground" })
9064
8803
  ]
9065
8804
  }
9066
8805
  ),
9067
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8806
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9068
8807
  "input",
9069
8808
  {
9070
8809
  ref: fileInputRef,
@@ -9075,8 +8814,8 @@ var AboutTab = ({
9075
8814
  "aria-hidden": "true"
9076
8815
  }
9077
8816
  ),
9078
- /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-form-section flex min-w-0 flex-1 flex-col gap-2", children: [
9079
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8817
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "agg-form-section flex min-w-0 flex-1 flex-col gap-2", children: [
8818
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9080
8819
  "label",
9081
8820
  {
9082
8821
  htmlFor: "profile-username",
@@ -9084,7 +8823,7 @@ var AboutTab = ({
9084
8823
  children: "Username"
9085
8824
  }
9086
8825
  ),
9087
- /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
8826
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
9088
8827
  "input",
9089
8828
  {
9090
8829
  id: "profile-username",
@@ -9111,9 +8850,9 @@ var AboutTab = ({
9111
8850
  AboutTab.displayName = "AboutTab";
9112
8851
 
9113
8852
  // src/profile/tabs/accounts-wallets-tab.tsx
9114
- var import_jsx_runtime132 = require("react/jsx-runtime");
9115
- var SectionTitle = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
9116
- var AccountRow = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8853
+ var import_jsx_runtime131 = require("react/jsx-runtime");
8854
+ var SectionTitle = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
8855
+ var AccountRow = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9117
8856
  "div",
9118
8857
  {
9119
8858
  className: cn(
@@ -9129,11 +8868,11 @@ var AccountIdentity = ({
9129
8868
  icon,
9130
8869
  label,
9131
8870
  iconClassName
9132
- }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9133
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: cn("flex h-5 w-5 shrink-0 items-center justify-center", iconClassName), children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { name: icon, size: "small", color: "currentColor" }) }),
9134
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: label })
8871
+ }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
8872
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: cn("flex h-5 w-5 shrink-0 items-center justify-center", iconClassName), children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: icon, size: "small", color: "currentColor" }) }),
8873
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: label })
9135
8874
  ] });
9136
- var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8875
+ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9137
8876
  "button",
9138
8877
  {
9139
8878
  type: "button",
@@ -9142,7 +8881,7 @@ var ConnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime1
9142
8881
  children: "Connect"
9143
8882
  }
9144
8883
  );
9145
- var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8884
+ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9146
8885
  "button",
9147
8886
  {
9148
8887
  type: "button",
@@ -9151,7 +8890,7 @@ var DisconnectTextButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runti
9151
8890
  children: "Disconnect"
9152
8891
  }
9153
8892
  );
9154
- var VerifiedBadge = () => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" });
8893
+ var VerifiedBadge = () => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(Icon, { name: "check-badge", size: "small", color: "var(--agg-color-primary, #536dfe)" });
9155
8894
  var getWalletIconName = (wallet) => {
9156
8895
  const chain = wallet.chain.toLowerCase();
9157
8896
  if (chain === "solana" || chain === "svm") {
@@ -9169,12 +8908,12 @@ var ConnectedAccountRow = ({
9169
8908
  onDisconnect
9170
8909
  }) => {
9171
8910
  const displayLabel = connected ? connectedLabel != null ? connectedLabel : label : label;
9172
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(AccountRow, { className: "agg-social-account-row gap-4", children: [
9173
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9174
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AccountIdentity, { icon, label: displayLabel, iconClassName }),
9175
- connected ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(VerifiedBadge, {}) : null
8911
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(AccountRow, { className: "agg-social-account-row gap-4", children: [
8912
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
8913
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AccountIdentity, { icon, label: displayLabel, iconClassName }),
8914
+ connected ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(VerifiedBadge, {}) : null
9176
8915
  ] }),
9177
- connected ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ConnectTextButton, { onClick: onConnect })
8916
+ connected ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(ConnectTextButton, { onClick: onConnect })
9178
8917
  ] });
9179
8918
  };
9180
8919
  var AccountsWalletsTab = ({
@@ -9193,11 +8932,11 @@ var AccountsWalletsTab = ({
9193
8932
  const google = socialAccounts == null ? void 0 : socialAccounts.google;
9194
8933
  const apple = socialAccounts == null ? void 0 : socialAccounts.apple;
9195
8934
  const hasEmail = Boolean(email);
9196
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "agg-accounts-wallets-tab flex flex-col gap-6", children: [
9197
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
9198
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SectionTitle, { children: "Connected accounts" }),
9199
- /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "agg-social-accounts-list flex flex-col gap-4", children: [
9200
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8935
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-accounts-wallets-tab flex flex-col gap-6", children: [
8936
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-social-accounts-section flex flex-col gap-3", children: [
8937
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SectionTitle, { children: "Connected accounts" }),
8938
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-social-accounts-list flex flex-col gap-4", children: [
8939
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9201
8940
  ConnectedAccountRow,
9202
8941
  {
9203
8942
  icon: "google",
@@ -9209,7 +8948,7 @@ var AccountsWalletsTab = ({
9209
8948
  onDisconnect: onDisconnectGoogle
9210
8949
  }
9211
8950
  ),
9212
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8951
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9213
8952
  ConnectedAccountRow,
9214
8953
  {
9215
8954
  icon: "apple",
@@ -9221,7 +8960,7 @@ var AccountsWalletsTab = ({
9221
8960
  onDisconnect: onDisconnectApple
9222
8961
  }
9223
8962
  ),
9224
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8963
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9225
8964
  ConnectedAccountRow,
9226
8965
  {
9227
8966
  icon: "twitter",
@@ -9233,7 +8972,7 @@ var AccountsWalletsTab = ({
9233
8972
  onDisconnect: onDisconnectTwitter
9234
8973
  }
9235
8974
  ),
9236
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8975
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9237
8976
  ConnectedAccountRow,
9238
8977
  {
9239
8978
  icon: "email",
@@ -9246,12 +8985,12 @@ var AccountsWalletsTab = ({
9246
8985
  )
9247
8986
  ] })
9248
8987
  ] }),
9249
- wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "agg-wallets-section flex flex-col gap-3", children: [
9250
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SectionTitle, { children: "Wallets" }),
9251
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-col gap-2", children: wallets.map((wallet) => {
8988
+ wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "agg-wallets-section flex flex-col gap-3", children: [
8989
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SectionTitle, { children: "Wallets" }),
8990
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: "flex flex-col gap-2", children: wallets.map((wallet) => {
9252
8991
  var _a;
9253
- return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AccountRow, { className: "gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9254
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
8992
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(AccountRow, { className: "gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
8993
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
9255
8994
  AccountIdentity,
9256
8995
  {
9257
8996
  icon: getWalletIconName(wallet),
@@ -9259,7 +8998,7 @@ var AccountsWalletsTab = ({
9259
8998
  label: (_a = wallet.displayAddress) != null ? _a : wallet.address
9260
8999
  }
9261
9000
  ),
9262
- /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(VerifiedBadge, {})
9001
+ /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(VerifiedBadge, {})
9263
9002
  ] }) }, `${wallet.chain}:${wallet.address}`);
9264
9003
  }) })
9265
9004
  ] }) : null
@@ -9268,9 +9007,9 @@ var AccountsWalletsTab = ({
9268
9007
  AccountsWalletsTab.displayName = "AccountsWalletsTab";
9269
9008
 
9270
9009
  // src/profile/tabs/trading-access-tab.tsx
9271
- var import_hooks40 = require("@agg-build/hooks");
9272
- var import_react19 = require("react");
9273
- var import_jsx_runtime133 = require("react/jsx-runtime");
9010
+ var import_hooks39 = require("@agg-build/hooks");
9011
+ var import_react18 = require("react");
9012
+ var import_jsx_runtime132 = require("react/jsx-runtime");
9274
9013
  var TRADING_ACCESS_VENUES = [
9275
9014
  "kalshi",
9276
9015
  "polymarket",
@@ -9282,8 +9021,8 @@ var TRADING_ACCESS_VENUES = [
9282
9021
  "hyperliquid"
9283
9022
  ];
9284
9023
  var TRADING_ACCESS_VENUE_ITEMS = TRADING_ACCESS_VENUES.map((id) => ({ id }));
9285
- var SectionTitle2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
9286
- var AccessRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9024
+ var SectionTitle2 = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("h3", { className: "text-agg-sm font-agg-bold leading-agg-5 text-agg-foreground", children });
9025
+ var AccessRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
9287
9026
  "div",
9288
9027
  {
9289
9028
  className: cn(
@@ -9295,17 +9034,17 @@ var AccessRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime133.jsx)
9295
9034
  }
9296
9035
  );
9297
9036
  var AvailableStatus = () => {
9298
- const labels = (0, import_hooks40.useLabels)();
9299
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2", children: [
9300
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
9301
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: labels.trading.tradingAccessAvailable })
9037
+ const labels = (0, import_hooks39.useLabels)();
9038
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-2", children: [
9039
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { name: "check-badge", size: "small", className: "text-agg-primary" }),
9040
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-foreground whitespace-nowrap", children: labels.trading.tradingAccessAvailable })
9302
9041
  ] });
9303
9042
  };
9304
9043
  var GeoblockedStatus = () => {
9305
- const labels = (0, import_hooks40.useLabels)();
9306
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
9307
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
9308
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 whitespace-nowrap", children: labels.trading.venueUnavailableInRegion })
9044
+ const labels = (0, import_hooks39.useLabels)();
9045
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-2 text-agg-muted-foreground", children: [
9046
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Icon, { name: "warning-filled", size: "small", color: "currentColor" }),
9047
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 whitespace-nowrap", children: labels.trading.venueUnavailableInRegion })
9309
9048
  ] });
9310
9049
  };
9311
9050
  var TradingAccessTab = ({
@@ -9314,23 +9053,23 @@ var TradingAccessTab = ({
9314
9053
  onDisconnectKalshi
9315
9054
  }) => {
9316
9055
  var _a, _b, _c, _d;
9317
- const labels = (0, import_hooks40.useLabels)();
9056
+ const labels = (0, import_hooks39.useLabels)();
9318
9057
  const verifyConnectionLabel = (_d = (_c = (_b = (_a = labels.onboarding) == null ? void 0 : _a.connectKalshiModal) == null ? void 0 : _b.actions) == null ? void 0 : _c.verifyConnection) != null ? _d : labels.trading.kycVerify;
9319
- const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks40.useAppConfig)();
9320
- const { isLocationBlocked } = (0, import_hooks40.useGeoBlock)();
9321
- const visibleVenues = (0, import_react19.useMemo)(
9322
- () => (0, import_hooks40.getVisibleVenuesByConfig)(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
9058
+ const { disabledVenues, isLoading: isAppConfigLoading } = (0, import_hooks39.useAppConfig)();
9059
+ const { isLocationBlocked } = (0, import_hooks39.useGeoBlock)();
9060
+ const visibleVenues = (0, import_react18.useMemo)(
9061
+ () => (0, import_hooks39.getVisibleVenuesByConfig)(TRADING_ACCESS_VENUE_ITEMS, disabledVenues),
9323
9062
  [disabledVenues]
9324
9063
  );
9325
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
9326
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SectionTitle2, { children: labels.trading.tradingAccessVenues }),
9327
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "flex flex-col gap-3", children: visibleVenues.map(({ id: venue }) => {
9064
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "agg-trading-access-section flex flex-col gap-4", children: [
9065
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(SectionTitle2, { children: labels.trading.tradingAccessVenues }),
9066
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex flex-col gap-3", children: visibleVenues.map(({ id: venue }) => {
9328
9067
  var _a2;
9329
9068
  const venueAccount = venueAccounts == null ? void 0 : venueAccounts.find((account) => account.venue === venue);
9330
9069
  const isKalshi = venue === "kalshi";
9331
9070
  const isConnected = (venueAccount == null ? void 0 : venueAccount.status) === "active";
9332
9071
  const isVerified = (venueAccount == null ? void 0 : venueAccount.kycStatus) === "verified";
9333
- const availabilityState = (0, import_hooks40.getVenueAvailabilityState)({
9072
+ const availabilityState = (0, import_hooks39.getVenueAvailabilityState)({
9334
9073
  venueId: venue,
9335
9074
  disabledVenues,
9336
9075
  isConfigLoading: isKalshi && isAppConfigLoading,
@@ -9338,12 +9077,12 @@ var TradingAccessTab = ({
9338
9077
  });
9339
9078
  const displayName = (_a2 = venueLogoLabels[venue]) != null ? _a2 : venue;
9340
9079
  if (availabilityState === "hidden") return null;
9341
- return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(AccessRow, { children: [
9342
- /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9343
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(VenueLogo, { venue, size: "small" }),
9344
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: displayName })
9080
+ return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(AccessRow, { children: [
9081
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9082
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(VenueLogo, { venue, size: "small" }),
9083
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "truncate text-agg-base font-agg-normal leading-6 text-agg-foreground", children: displayName })
9345
9084
  ] }),
9346
- availabilityState === "geoblocked" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(GeoblockedStatus, {}) : isKalshi && !isConnected ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9085
+ availabilityState === "geoblocked" ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(GeoblockedStatus, {}) : isKalshi && !isConnected ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
9347
9086
  "button",
9348
9087
  {
9349
9088
  type: "button",
@@ -9352,9 +9091,9 @@ var TradingAccessTab = ({
9352
9091
  className: "shrink-0 cursor-pointer text-agg-sm font-agg-bold leading-agg-5 text-agg-primary whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary disabled:cursor-not-allowed disabled:opacity-60",
9353
9092
  children: labels.trading.tradingAccessAddKalshiAccount
9354
9093
  }
9355
- ) : isKalshi && !isVerified ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-4", children: [
9356
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.kycRequired }),
9357
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9094
+ ) : isKalshi && !isVerified ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-4", children: [
9095
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.kycRequired }),
9096
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
9358
9097
  "button",
9359
9098
  {
9360
9099
  type: "button",
@@ -9364,10 +9103,10 @@ var TradingAccessTab = ({
9364
9103
  children: verifyConnectionLabel
9365
9104
  }
9366
9105
  )
9367
- ] }) : isKalshi && isVerified ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex items-center gap-4", children: [
9368
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.verified }),
9369
- /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AvailableStatus, {}),
9370
- onDisconnectKalshi ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9106
+ ] }) : isKalshi && isVerified ? /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-4", children: [
9107
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-agg-sm font-agg-normal leading-agg-5 text-agg-muted-foreground whitespace-nowrap", children: labels.trading.verified }),
9108
+ /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AvailableStatus, {}),
9109
+ onDisconnectKalshi ? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
9371
9110
  "button",
9372
9111
  {
9373
9112
  type: "button",
@@ -9376,194 +9115,15 @@ var TradingAccessTab = ({
9376
9115
  children: labels.auth.disconnect
9377
9116
  }
9378
9117
  ) : null
9379
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AvailableStatus, {})
9118
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AvailableStatus, {})
9380
9119
  ] }, venue);
9381
9120
  }) })
9382
9121
  ] });
9383
9122
  };
9384
9123
  TradingAccessTab.displayName = "TradingAccessTab";
9385
9124
 
9386
- // src/profile/tabs/balance-management-tab.tsx
9387
- var import_react20 = require("react");
9388
- var import_hooks41 = require("@agg-build/hooks");
9389
- var import_jsx_runtime134 = require("react/jsx-runtime");
9390
- var CHAIN_IDS_BY_NETWORK = {
9391
- mainnet: 1,
9392
- bnb: 56,
9393
- polygon: 137,
9394
- base: 8453,
9395
- arbitrum: 42161,
9396
- solana: 792703809,
9397
- hyperliquid: 1337
9398
- };
9399
- var NETWORK_BY_CHAIN_ID = Object.fromEntries(
9400
- Object.entries(CHAIN_IDS_BY_NETWORK).map(([network, chainId]) => [chainId, network])
9401
- );
9402
- var networkItems = SUPPORTED_NETWORKS.filter(
9403
- (network) => network.value in CHAIN_IDS_BY_NETWORK
9404
- ).map((network) => ({
9405
- value: network.value,
9406
- label: network.label,
9407
- iconUrl: network.iconUrl
9408
- }));
9409
- var dollarsToRaw = (amount) => String(Math.round(amount * 1e6));
9410
- var rawToDollars = (amount) => Number(amount) / 1e6;
9411
- var BalanceManagementTab = ({ enabled }) => {
9412
- const labels = (0, import_hooks41.useAggLabels)().balanceRefill;
9413
- const { policies, isLoading, isError, createPolicy, updatePolicy } = (0, import_hooks41.useBalanceRefillPolicies)({
9414
- enabled
9415
- });
9416
- const policy = policies[0];
9417
- const [network, setNetwork] = (0, import_react20.useState)("polygon");
9418
- const [minimum, setMinimum] = (0, import_react20.useState)(100);
9419
- const [refillAmount, setRefillAmount] = (0, import_react20.useState)(50);
9420
- const [dailyCap, setDailyCap] = (0, import_react20.useState)(200);
9421
- const [maximumFee, setMaximumFee] = (0, import_react20.useState)(2);
9422
- const [feedback, setFeedback] = (0, import_react20.useState)(null);
9423
- (0, import_react20.useEffect)(() => {
9424
- var _a;
9425
- if (!policy) return;
9426
- setNetwork((_a = NETWORK_BY_CHAIN_ID[policy.targetChainId]) != null ? _a : "polygon");
9427
- setMinimum(rawToDollars(policy.minimumRaw));
9428
- setRefillAmount(rawToDollars(policy.refillAmountRaw));
9429
- setDailyCap(rawToDollars(policy.dailyCapRaw));
9430
- setMaximumFee(rawToDollars(policy.maxFeeRaw));
9431
- }, [policy]);
9432
- const validationError = (0, import_react20.useMemo)(() => {
9433
- if (minimum <= 0 || refillAmount <= 0 || dailyCap <= 0 || maximumFee <= 0) {
9434
- return labels.saveError;
9435
- }
9436
- if (dailyCap < Math.max(minimum, refillAmount) + maximumFee) {
9437
- return labels.saveError;
9438
- }
9439
- return null;
9440
- }, [dailyCap, labels.saveError, maximumFee, minimum, refillAmount]);
9441
- const isPending = createPolicy.isPending || updatePolicy.isPending;
9442
- const handleSave = () => __async(null, null, function* () {
9443
- if (validationError) {
9444
- setFeedback(validationError);
9445
- return;
9446
- }
9447
- setFeedback(null);
9448
- const params = {
9449
- minimumRaw: dollarsToRaw(minimum),
9450
- refillAmountRaw: dollarsToRaw(refillAmount),
9451
- dailyCapRaw: dollarsToRaw(dailyCap),
9452
- maxFeeRaw: dollarsToRaw(maximumFee)
9453
- };
9454
- try {
9455
- if (policy) {
9456
- yield updatePolicy.mutateAsync({ policyId: policy.id, params });
9457
- } else {
9458
- yield createPolicy.mutateAsync(__spreadProps(__spreadValues({}, params), {
9459
- targetChainId: CHAIN_IDS_BY_NETWORK[network],
9460
- targetTokenSymbol: "USDC"
9461
- }));
9462
- }
9463
- setFeedback(labels.saved);
9464
- } catch (e) {
9465
- setFeedback(labels.saveError);
9466
- }
9467
- });
9468
- const handleStatus = () => __async(null, null, function* () {
9469
- if (!policy) return;
9470
- try {
9471
- yield updatePolicy.mutateAsync({
9472
- policyId: policy.id,
9473
- params: { status: policy.status === "enabled" ? "paused" : "enabled" }
9474
- });
9475
- setFeedback(labels.saved);
9476
- } catch (e) {
9477
- setFeedback(labels.saveError);
9478
- }
9479
- });
9480
- if (isLoading)
9481
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-agg-sm text-agg-secondary-foreground", children: labels.loading });
9482
- if (isError)
9483
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { role: "alert", className: "text-agg-sm text-agg-error", children: labels.loadError });
9484
- const latestAttempt = policy == null ? void 0 : policy.latestAttempt;
9485
- return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("section", { className: "agg-balance-management-tab flex flex-col gap-6", children: [
9486
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col gap-2", children: [
9487
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("h2", { className: "text-agg-lg font-agg-semibold text-agg-foreground", children: labels.title }),
9488
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-agg-sm text-agg-secondary-foreground", children: labels.description })
9489
- ] }),
9490
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "rounded-agg-lg border border-agg-separator p-5 flex flex-col gap-5", children: [
9491
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("label", { className: "flex flex-col gap-2 text-agg-sm text-agg-foreground", children: [
9492
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { children: labels.networkLabel }),
9493
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9494
- Select,
9495
- {
9496
- items: networkItems,
9497
- value: network,
9498
- onChange: (value) => setNetwork(value),
9499
- ariaLabel: labels.networkLabel,
9500
- disabled: Boolean(policy)
9501
- }
9502
- )
9503
- ] }),
9504
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
9505
- [labels.minimumLabel, minimum, setMinimum],
9506
- [labels.refillAmountLabel, refillAmount, setRefillAmount],
9507
- [labels.dailyCapLabel, dailyCap, setDailyCap],
9508
- [labels.maximumFeeLabel, maximumFee, setMaximumFee]
9509
- ].map(([label, value, onChange]) => /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
9510
- "label",
9511
- {
9512
- className: "flex flex-col gap-2 rounded-agg-md bg-agg-secondary px-4 py-3 text-agg-sm text-agg-foreground",
9513
- children: [
9514
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("span", { children: label }),
9515
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9516
- CurrencyInput,
9517
- {
9518
- value,
9519
- onChange,
9520
- min: 0.01,
9521
- decimalPlaces: 2,
9522
- ariaLabel: label,
9523
- classNames: { input: "w-full text-agg-base font-agg-semibold" }
9524
- }
9525
- )
9526
- ]
9527
- },
9528
- label
9529
- )) }),
9530
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-agg-xs text-agg-secondary-foreground", children: labels.consent }),
9531
- policy ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-agg-sm text-agg-secondary-foreground", children: policy.status === "enabled" ? labels.activeLabel : labels.pausedLabel }) : null,
9532
- latestAttempt ? /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("p", { className: "text-agg-sm text-agg-secondary-foreground", children: [
9533
- labels.lastRefill,
9534
- ": ",
9535
- labels.statuses[latestAttempt.status]
9536
- ] }) : null,
9537
- feedback ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { role: feedback === labels.saveError ? "alert" : "status", className: "text-agg-sm", children: feedback }) : null,
9538
- /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-wrap gap-3", children: [
9539
- /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9540
- Button,
9541
- {
9542
- variant: "primary",
9543
- size: "large",
9544
- isLoading: isPending,
9545
- disabled: Boolean(validationError),
9546
- onClick: () => void handleSave(),
9547
- children: policy ? labels.saveAction : labels.enableAction
9548
- }
9549
- ),
9550
- policy ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
9551
- Button,
9552
- {
9553
- variant: "secondary",
9554
- size: "large",
9555
- isLoading: isPending,
9556
- onClick: () => void handleStatus(),
9557
- children: policy.status === "enabled" ? labels.pauseAction : labels.resumeAction
9558
- }
9559
- ) : null
9560
- ] })
9561
- ] })
9562
- ] });
9563
- };
9564
-
9565
9125
  // src/profile/index.tsx
9566
- var import_jsx_runtime135 = require("react/jsx-runtime");
9126
+ var import_jsx_runtime133 = require("react/jsx-runtime");
9567
9127
  var ProfileModal = ({
9568
9128
  open,
9569
9129
  onOpenChange,
@@ -9587,35 +9147,31 @@ var ProfileModal = ({
9587
9147
  onDisconnectExchange
9588
9148
  }) => {
9589
9149
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
9590
- const client = (0, import_hooks42.useAggClient)();
9591
- const labels = (0, import_hooks42.useAggLabels)();
9592
- const { user } = (0, import_hooks42.useAggAuthState)();
9150
+ const client = (0, import_hooks40.useAggClient)();
9151
+ const { user } = (0, import_hooks40.useAggAuthState)();
9593
9152
  const toastCtx = useOptionalToast();
9594
- const [activeTab, setActiveTab] = (0, import_react21.useState)(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
9595
- const profileTabItems = (0, import_react21.useMemo)(
9596
- () => getProfileTabItems(labels.balanceRefill.tabLabel),
9597
- [labels.balanceRefill.tabLabel]
9598
- );
9153
+ const [activeTab, setActiveTab] = (0, import_react19.useState)(PROFILE_TAB_KEYS.PROFILE_ACCOUNTS);
9154
+ const profileTabItems = (0, import_react19.useMemo)(() => getProfileTabItems(), []);
9599
9155
  const resolvedInitialUsername = (_a = username != null ? username : user == null ? void 0 : user.username) != null ? _a : "";
9600
- const [draftUsername, setDraftUsername] = (0, import_react21.useState)(resolvedInitialUsername);
9601
- const [draftAvatarFile, setDraftAvatarFile] = (0, import_react21.useState)();
9602
- const [draftAvatarPreview, setDraftAvatarPreview] = (0, import_react21.useState)();
9603
- const [isSaving, setIsSaving] = (0, import_react21.useState)(false);
9604
- const [avatarTypeError, setAvatarTypeError] = (0, import_react21.useState)(null);
9605
- const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react21.useState)(false);
9606
- const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0, import_hooks42.useVenueKeyStatus)(
9156
+ const [draftUsername, setDraftUsername] = (0, import_react19.useState)(resolvedInitialUsername);
9157
+ const [draftAvatarFile, setDraftAvatarFile] = (0, import_react19.useState)();
9158
+ const [draftAvatarPreview, setDraftAvatarPreview] = (0, import_react19.useState)();
9159
+ const [isSaving, setIsSaving] = (0, import_react19.useState)(false);
9160
+ const [avatarTypeError, setAvatarTypeError] = (0, import_react19.useState)(null);
9161
+ const [isConnectKalshiModalOpen, setIsConnectKalshiModalOpen] = (0, import_react19.useState)(false);
9162
+ const { data: kalshiStatus, refetch: refetchKalshiStatus } = (0, import_hooks40.useVenueKeyStatus)(
9607
9163
  import_sdk12.Venue.kalshi,
9608
9164
  open
9609
9165
  );
9610
- (0, import_react21.useEffect)(() => {
9166
+ (0, import_react19.useEffect)(() => {
9611
9167
  var _a2;
9612
9168
  setDraftUsername((_a2 = username != null ? username : user == null ? void 0 : user.username) != null ? _a2 : "");
9613
9169
  }, [username, user == null ? void 0 : user.username]);
9614
- (0, import_react21.useEffect)(() => {
9170
+ (0, import_react19.useEffect)(() => {
9615
9171
  if (open) return;
9616
9172
  setIsConnectKalshiModalOpen(false);
9617
9173
  }, [open]);
9618
- const handleOpenChange = (0, import_react21.useCallback)(
9174
+ const handleOpenChange = (0, import_react19.useCallback)(
9619
9175
  (isOpen) => {
9620
9176
  var _a2;
9621
9177
  if (!isOpen) {
@@ -9639,7 +9195,7 @@ var ProfileModal = ({
9639
9195
  setDraftAvatarPreview
9640
9196
  ]
9641
9197
  );
9642
- const handleDraftAvatarChange = (0, import_react21.useCallback)(
9198
+ const handleDraftAvatarChange = (0, import_react19.useCallback)(
9643
9199
  (file, preview) => {
9644
9200
  const ACCEPTED_AVATAR_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
9645
9201
  if (file && !ACCEPTED_AVATAR_TYPES.includes(file.type)) {
@@ -9654,7 +9210,7 @@ var ProfileModal = ({
9654
9210
  );
9655
9211
  const originalUsername = (_b = username != null ? username : user == null ? void 0 : user.username) != null ? _b : "";
9656
9212
  const hasChanges = draftUsername !== originalUsername || draftAvatarFile !== void 0;
9657
- const handleSave = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9213
+ const handleSave = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9658
9214
  var _a2, _b2, _c2;
9659
9215
  setIsSaving(true);
9660
9216
  try {
@@ -9709,10 +9265,10 @@ var ProfileModal = ({
9709
9265
  originalUsername,
9710
9266
  toastCtx
9711
9267
  ]);
9712
- const handleCancel = (0, import_react21.useCallback)(() => {
9268
+ const handleCancel = (0, import_react19.useCallback)(() => {
9713
9269
  handleOpenChange(false);
9714
9270
  }, [handleOpenChange]);
9715
- const handleVerifyKalshi = (0, import_react21.useCallback)(
9271
+ const handleVerifyKalshi = (0, import_react19.useCallback)(
9716
9272
  (credentials) => __async(null, null, function* () {
9717
9273
  if (onConnectKalshi) {
9718
9274
  yield onConnectKalshi(credentials);
@@ -9730,12 +9286,12 @@ var ProfileModal = ({
9730
9286
  }),
9731
9287
  [client, onConnectKalshi, refetchKalshiStatus]
9732
9288
  );
9733
- const handleDisconnectKalshi = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9289
+ const handleDisconnectKalshi = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9734
9290
  yield client.deleteVenueKey(import_sdk12.Venue.kalshi);
9735
9291
  yield refetchKalshiStatus();
9736
9292
  onDisconnectExchange == null ? void 0 : onDisconnectExchange(import_sdk12.Venue.kalshi);
9737
9293
  }), [client, onDisconnectExchange, refetchKalshiStatus]);
9738
- const resolvedVenueAccounts = (0, import_react21.useMemo)(() => {
9294
+ const resolvedVenueAccounts = (0, import_react19.useMemo)(() => {
9739
9295
  var _a2;
9740
9296
  const nonKalshiAccounts = (_a2 = user == null ? void 0 : user.venueAccounts) == null ? void 0 : _a2.filter((account) => account.venue !== "kalshi");
9741
9297
  if (!kalshiStatus) return user == null ? void 0 : user.venueAccounts;
@@ -9791,7 +9347,7 @@ var ProfileModal = ({
9791
9347
  if (typeof window === "undefined") return;
9792
9348
  ((_a2 = window.top) != null ? _a2 : window).location.assign(url);
9793
9349
  };
9794
- const surfaceError = (0, import_react21.useCallback)(
9350
+ const surfaceError = (0, import_react19.useCallback)(
9795
9351
  (err, title) => {
9796
9352
  const message = (err == null ? void 0 : err.message) || "Something went wrong. Please try again.";
9797
9353
  if (toastCtx) {
@@ -9802,7 +9358,7 @@ var ProfileModal = ({
9802
9358
  },
9803
9359
  [toastCtx]
9804
9360
  );
9805
- const handleConnectTwitter = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9361
+ const handleConnectTwitter = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9806
9362
  try {
9807
9363
  const result = yield client.linkAccount({
9808
9364
  provider: "twitter",
@@ -9816,7 +9372,7 @@ var ProfileModal = ({
9816
9372
  surfaceError(err, "Could not connect X (Twitter)");
9817
9373
  }
9818
9374
  }), [client, onConnectTwitter, surfaceError]);
9819
- const handleConnectGoogle = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9375
+ const handleConnectGoogle = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9820
9376
  try {
9821
9377
  const result = yield client.linkAccount({
9822
9378
  provider: "google",
@@ -9830,7 +9386,7 @@ var ProfileModal = ({
9830
9386
  surfaceError(err, "Could not connect Google");
9831
9387
  }
9832
9388
  }), [client, onConnectGoogle, surfaceError]);
9833
- const handleConnectApple = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9389
+ const handleConnectApple = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9834
9390
  try {
9835
9391
  const result = yield client.linkAccount({
9836
9392
  provider: "apple",
@@ -9844,7 +9400,7 @@ var ProfileModal = ({
9844
9400
  surfaceError(err, "Could not connect Apple");
9845
9401
  }
9846
9402
  }), [client, onConnectApple, surfaceError]);
9847
- const handleDisconnectTwitter = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9403
+ const handleDisconnectTwitter = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9848
9404
  try {
9849
9405
  yield client.disconnectAccount("twitter");
9850
9406
  yield client.getCurrentUser();
@@ -9853,7 +9409,7 @@ var ProfileModal = ({
9853
9409
  surfaceError(err, "Could not disconnect X (Twitter)");
9854
9410
  }
9855
9411
  }), [client, onDisconnectTwitter, surfaceError]);
9856
- const handleDisconnectGoogle = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9412
+ const handleDisconnectGoogle = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9857
9413
  try {
9858
9414
  yield client.disconnectAccount("google");
9859
9415
  yield client.getCurrentUser();
@@ -9862,7 +9418,7 @@ var ProfileModal = ({
9862
9418
  surfaceError(err, "Could not disconnect Google");
9863
9419
  }
9864
9420
  }), [client, onDisconnectGoogle, surfaceError]);
9865
- const handleDisconnectApple = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9421
+ const handleDisconnectApple = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9866
9422
  try {
9867
9423
  yield client.disconnectAccount("apple");
9868
9424
  yield client.getCurrentUser();
@@ -9871,7 +9427,7 @@ var ProfileModal = ({
9871
9427
  surfaceError(err, "Could not disconnect Apple");
9872
9428
  }
9873
9429
  }), [client, onDisconnectApple, surfaceError]);
9874
- const handleConnectEmail = (0, import_react21.useCallback)(() => __async(null, null, function* () {
9430
+ const handleConnectEmail = (0, import_react19.useCallback)(() => __async(null, null, function* () {
9875
9431
  var _a2;
9876
9432
  const typedEmail = typeof window !== "undefined" ? (_a2 = window.prompt("Enter your email to receive a magic link")) == null ? void 0 : _a2.trim() : void 0;
9877
9433
  if (!typedEmail) return;
@@ -9890,7 +9446,7 @@ var ProfileModal = ({
9890
9446
  surfaceError(err, "Could not connect email");
9891
9447
  }
9892
9448
  }), [client, onConnectEmail, surfaceError, toastCtx]);
9893
- const handleDisconnectWallet = (0, import_react21.useCallback)(
9449
+ const handleDisconnectWallet = (0, import_react19.useCallback)(
9894
9450
  (wallet) => __async(null, null, function* () {
9895
9451
  const normalizedChain = wallet.chain.toLowerCase();
9896
9452
  const provider = normalizedChain === "solana" || normalizedChain === "svm" ? "solana_wallet" : "wallet";
@@ -9904,7 +9460,7 @@ var ProfileModal = ({
9904
9460
  }),
9905
9461
  [client, onDisconnectWallet, surfaceError]
9906
9462
  );
9907
- const providerActionMap = (0, import_react21.useMemo)(
9463
+ const providerActionMap = (0, import_react19.useMemo)(
9908
9464
  () => ({
9909
9465
  twitter: {
9910
9466
  connect: () => {
@@ -9946,7 +9502,7 @@ var ProfileModal = ({
9946
9502
  handleDisconnectTwitter
9947
9503
  ]
9948
9504
  );
9949
- const resolvedWallets = (0, import_react21.useMemo)(() => {
9505
+ const resolvedWallets = (0, import_react19.useMemo)(() => {
9950
9506
  var _a2, _b2;
9951
9507
  if (wallets) return wallets;
9952
9508
  const walletAccounts = (_b2 = (_a2 = user == null ? void 0 : user.accounts) == null ? void 0 : _a2.filter((account) => {
@@ -9965,8 +9521,8 @@ var ProfileModal = ({
9965
9521
  };
9966
9522
  });
9967
9523
  }, [user == null ? void 0 : user.accounts, wallets]);
9968
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Modal, { open: open && !isConnectKalshiModalOpen, onOpenChange: handleOpenChange, children: [
9969
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
9524
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Modal, { open: open && !isConnectKalshiModalOpen, onOpenChange: handleOpenChange, children: [
9525
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
9970
9526
  Modal.Container,
9971
9527
  {
9972
9528
  maxWidth: "800px",
@@ -9975,8 +9531,8 @@ var ProfileModal = ({
9975
9531
  container: cn("agg-profile-modal", "min-h-[37.5rem]")
9976
9532
  },
9977
9533
  children: [
9978
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
9979
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "agg-profile-tabs sm:hidden w-full", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9534
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Modal.Header, { title: "Edit Profile", classNames: { root: "agg-profile-modal-header" } }),
9535
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "agg-profile-tabs sm:hidden w-full", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9980
9536
  Tabs,
9981
9537
  {
9982
9538
  className: "w-full [&>div]:w-full",
@@ -9985,14 +9541,14 @@ var ProfileModal = ({
9985
9541
  items: profileTabItems.map((tab) => ({
9986
9542
  value: tab.value,
9987
9543
  label: tab.label,
9988
- icon: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: tab.icon, size: "small" })
9544
+ icon: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: tab.icon, size: "small" })
9989
9545
  })),
9990
9546
  value: activeTab,
9991
9547
  onChange: (val) => setActiveTab(val)
9992
9548
  }
9993
9549
  ) }),
9994
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
9995
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9550
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Modal.Body, { classNames: { root: cn("agg-profile-modal-body", "overflow-x-visible") }, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "agg-profile-layout flex flex-col sm:flex-row sm:gap-10", children: [
9551
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
9996
9552
  "nav",
9997
9553
  {
9998
9554
  className: cn(
@@ -10008,7 +9564,7 @@ var ProfileModal = ({
10008
9564
  "aria-label": "Profile sections",
10009
9565
  children: profileTabItems.map((tab) => {
10010
9566
  const isActive = activeTab === tab.value;
10011
- return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
9567
+ return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(
10012
9568
  "button",
10013
9569
  {
10014
9570
  type: "button",
@@ -10024,9 +9580,9 @@ var ProfileModal = ({
10024
9580
  isActive ? "font-agg-normal text-agg-foreground bg-agg-secondary-hover" : "font-agg-normal text-agg-foreground"
10025
9581
  ),
10026
9582
  children: [
10027
- isActive ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
10028
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
10029
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
9583
+ isActive ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute left-0 top-0 bottom-0 w-1 bg-agg-primary" }) : null,
9584
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Icon, { name: tab.icon, size: "small", color: "currentColor" }),
9585
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("span", { className: "shrink-0 whitespace-nowrap", children: tab.label })
10030
9586
  ]
10031
9587
  },
10032
9588
  tab.value
@@ -10034,9 +9590,9 @@ var ProfileModal = ({
10034
9590
  })
10035
9591
  }
10036
9592
  ) }),
10037
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "agg-profile-content min-w-0 flex-1", children: [
10038
- activeTab === PROFILE_TAB_KEYS.PROFILE_ACCOUNTS ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "agg-profile-accounts-tab flex flex-col gap-8", children: [
10039
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9593
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "agg-profile-content min-w-0 flex-1", children: [
9594
+ activeTab === PROFILE_TAB_KEYS.PROFILE_ACCOUNTS ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "agg-profile-accounts-tab flex flex-col gap-8", children: [
9595
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
10040
9596
  AboutTab,
10041
9597
  {
10042
9598
  username: username != null ? username : user == null ? void 0 : user.username,
@@ -10050,7 +9606,7 @@ var ProfileModal = ({
10050
9606
  avatarError: avatarTypeError
10051
9607
  }
10052
9608
  ),
10053
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9609
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
10054
9610
  AccountsWalletsTab,
10055
9611
  {
10056
9612
  socialAccounts: resolvedSocialAccounts,
@@ -10069,7 +9625,7 @@ var ProfileModal = ({
10069
9625
  }
10070
9626
  )
10071
9627
  ] }) : null,
10072
- activeTab === PROFILE_TAB_KEYS.TRADING_ACCESS ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9628
+ activeTab === PROFILE_TAB_KEYS.TRADING_ACCESS ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
10073
9629
  TradingAccessTab,
10074
9630
  {
10075
9631
  venueAccounts: resolvedVenueAccounts,
@@ -10077,22 +9633,12 @@ var ProfileModal = ({
10077
9633
  onDisconnectKalshi: handleDisconnectKalshi,
10078
9634
  onKycError
10079
9635
  }
10080
- ) : null,
10081
- activeTab === PROFILE_TAB_KEYS.BALANCE_MANAGEMENT ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(BalanceManagementTab, { enabled: open }) : null
9636
+ ) : null
10082
9637
  ] })
10083
9638
  ] }) }),
10084
- activeTab === PROFILE_TAB_KEYS.BALANCE_MANAGEMENT ? null : /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
10085
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
10086
- Button,
10087
- {
10088
- variant: "secondary",
10089
- size: "large",
10090
- onClick: handleCancel,
10091
- className: "min-w-[120px]",
10092
- children: "Cancel"
10093
- }
10094
- ),
10095
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9639
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)(Modal.Footer, { classNames: { root: "agg-profile-modal-footer" }, children: [
9640
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Button, { variant: "secondary", size: "large", onClick: handleCancel, className: "min-w-[120px]", children: "Cancel" }),
9641
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
10096
9642
  Button,
10097
9643
  {
10098
9644
  variant: "primary",
@@ -10107,7 +9653,7 @@ var ProfileModal = ({
10107
9653
  ]
10108
9654
  }
10109
9655
  ),
10110
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
9656
+ /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
10111
9657
  ConnectKalshiModal,
10112
9658
  {
10113
9659
  open: open && isConnectKalshiModalOpen,
@@ -10120,33 +9666,33 @@ var ProfileModal = ({
10120
9666
  ProfileModal.displayName = "ProfileModal";
10121
9667
 
10122
9668
  // src/geo-block-modal/index.tsx
10123
- var import_hooks43 = require("@agg-build/hooks");
10124
- var import_react22 = require("react");
10125
- var import_jsx_runtime136 = require("react/jsx-runtime");
9669
+ var import_hooks41 = require("@agg-build/hooks");
9670
+ var import_react20 = require("react");
9671
+ var import_jsx_runtime134 = require("react/jsx-runtime");
10126
9672
  var GeoBlockModal = ({
10127
9673
  open,
10128
9674
  onOpenChange,
10129
9675
  onConfirm,
10130
9676
  classNames
10131
9677
  }) => {
10132
- const labels = (0, import_hooks43.useLabels)();
10133
- const handleConfirm = (0, import_react22.useCallback)(() => {
9678
+ const labels = (0, import_hooks41.useLabels)();
9679
+ const handleConfirm = (0, import_react20.useCallback)(() => {
10134
9680
  onConfirm == null ? void 0 : onConfirm();
10135
9681
  onOpenChange(false);
10136
9682
  }, [onConfirm, onOpenChange]);
10137
- return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9683
+ return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
10138
9684
  Modal,
10139
9685
  {
10140
9686
  open,
10141
9687
  onOpenChange,
10142
9688
  "aria-label": labels.trading.geoBlockModalAriaLabel,
10143
- children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)(
9689
+ children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(
10144
9690
  Modal.Container,
10145
9691
  {
10146
9692
  maxWidth: "480px",
10147
9693
  classNames: { container: cn("!rounded-agg-2xl", classNames == null ? void 0 : classNames.container) },
10148
9694
  children: [
10149
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9695
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
10150
9696
  Modal.Header,
10151
9697
  {
10152
9698
  title: "",
@@ -10158,19 +9704,19 @@ var GeoBlockModal = ({
10158
9704
  }
10159
9705
  }
10160
9706
  ),
10161
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Modal.Body, { classNames: { root: cn("!px-10 !pt-0 !pb-12", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
10162
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9707
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Modal.Body, { classNames: { root: cn("!px-10 !pt-0 !pb-12", classNames == null ? void 0 : classNames.body) }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center gap-8", children: [
9708
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
10163
9709
  Icon,
10164
9710
  {
10165
9711
  name: "internet-security",
10166
9712
  className: "h-[60px] w-[60px] text-agg-muted-foreground"
10167
9713
  }
10168
9714
  ),
10169
- /* @__PURE__ */ (0, import_jsx_runtime136.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
10170
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
10171
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
9715
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center gap-3 text-center", children: [
9716
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("h2", { className: "text-agg-2xl font-agg-bold leading-agg-8 text-agg-foreground", children: labels.trading.geoBlockModalTitle }),
9717
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("p", { className: "text-agg-base font-agg-normal leading-agg-6 text-agg-foreground", children: labels.trading.geoBlockModalDescription })
10172
9718
  ] }),
10173
- /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(
9719
+ /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
10174
9720
  Button,
10175
9721
  {
10176
9722
  variant: "secondary",
@@ -10190,27 +9736,27 @@ var GeoBlockModal = ({
10190
9736
  GeoBlockModal.displayName = "GeoBlockModal";
10191
9737
 
10192
9738
  // src/geo-block-banner/index.tsx
10193
- var import_hooks44 = require("@agg-build/hooks");
10194
- var import_jsx_runtime137 = require("react/jsx-runtime");
9739
+ var import_hooks42 = require("@agg-build/hooks");
9740
+ var import_jsx_runtime135 = require("react/jsx-runtime");
10195
9741
  var GeoBlockBanner = ({
10196
9742
  venue,
10197
9743
  termsUrl = AGG_TERMS_OF_SERVICE_URL,
10198
9744
  className
10199
9745
  }) => {
10200
- const labels = (0, import_hooks44.useLabels)();
9746
+ const labels = (0, import_hooks42.useLabels)();
10201
9747
  const message = venue ? labels.trading.geoBlockVenueMessage(venue) : labels.trading.geoBlockGenericMessage;
10202
- return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(
9748
+ return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
10203
9749
  "div",
10204
9750
  {
10205
9751
  className: cn("flex items-center gap-5 rounded-agg-lg bg-agg-secondary-hover p-3", className),
10206
9752
  role: "status",
10207
9753
  children: [
10208
- /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("p", { className: "min-w-0 flex-1 text-agg-xs leading-agg-4 text-agg-foreground", children: [
9754
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("p", { className: "min-w-0 flex-1 text-agg-xs leading-agg-4 text-agg-foreground", children: [
10209
9755
  message,
10210
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)("a", { href: termsUrl, className: "underline", target: "_blank", rel: "noreferrer noopener", children: labels.trading.geoBlockTermsLink }),
9756
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("a", { href: termsUrl, className: "underline", target: "_blank", rel: "noreferrer noopener", children: labels.trading.geoBlockTermsLink }),
10211
9757
  labels.trading.geoBlockMessageSuffix
10212
9758
  ] }),
10213
- /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(Icon, { name: "internet-security", className: "h-6 w-6 shrink-0 text-agg-muted-foreground" })
9759
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: "internet-security", className: "h-6 w-6 shrink-0 text-agg-muted-foreground" })
10214
9760
  ]
10215
9761
  }
10216
9762
  );