@dubsdotapp/expo 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ __export(index_exports, {
55
55
  SOLANA_PROGRAM_ERRORS: () => SOLANA_PROGRAM_ERRORS,
56
56
  STORAGE_KEYS: () => STORAGE_KEYS,
57
57
  SettingsSheet: () => SettingsSheet,
58
+ SolSlider: () => SolSlider,
58
59
  UserProfileCard: () => UserProfileCard,
59
60
  UserProfileSheet: () => UserProfileSheet,
60
61
  createSecureStoreStorage: () => createSecureStoreStorage,
@@ -5341,9 +5342,222 @@ var styles12 = import_react_native18.StyleSheet.create({
5341
5342
  });
5342
5343
 
5343
5344
  // src/ui/game/JoinGameSheet.tsx
5345
+ var import_react34 = require("react");
5346
+ var import_react_native20 = require("react-native");
5347
+
5348
+ // src/ui/game/SolSlider.tsx
5344
5349
  var import_react33 = require("react");
5345
5350
  var import_react_native19 = require("react-native");
5346
5351
  var import_jsx_runtime16 = require("react/jsx-runtime");
5352
+ var THUMB_SIZE = 32;
5353
+ var TRACK_HEIGHT = 6;
5354
+ var TICK_INTERVAL = 0.01;
5355
+ function SolSlider({
5356
+ value,
5357
+ min = 0.01,
5358
+ max = 5,
5359
+ step = 0.01,
5360
+ accentColor,
5361
+ onValueChange,
5362
+ onSlidingComplete,
5363
+ onTick,
5364
+ disabled = false
5365
+ }) {
5366
+ const t = useDubsTheme();
5367
+ const accent = accentColor || t.accent;
5368
+ const trackRef = (0, import_react33.useRef)(null);
5369
+ const trackWidth = (0, import_react33.useRef)(0);
5370
+ const lastTickValue = (0, import_react33.useRef)(value);
5371
+ const clamp = (v) => {
5372
+ const stepped = Math.round(v / step) * step;
5373
+ return Math.max(min, Math.min(max, parseFloat(stepped.toFixed(4))));
5374
+ };
5375
+ const valueToPosition = (v) => {
5376
+ const ratio2 = (v - min) / (max - min);
5377
+ return ratio2 * trackWidth.current;
5378
+ };
5379
+ const positionToValue = (x) => {
5380
+ const ratio2 = Math.max(0, Math.min(1, x / trackWidth.current));
5381
+ return clamp(min + ratio2 * (max - min));
5382
+ };
5383
+ const panResponder = (0, import_react33.useRef)(
5384
+ import_react_native19.PanResponder.create({
5385
+ onStartShouldSetPanResponder: () => !disabled,
5386
+ onMoveShouldSetPanResponder: () => !disabled,
5387
+ onPanResponderGrant: (_, gestureState) => {
5388
+ lastTickValue.current = value;
5389
+ },
5390
+ onPanResponderMove: (evt, gestureState) => {
5391
+ const touchX = gestureState.moveX;
5392
+ trackRef.current?.measureInWindow((trackX) => {
5393
+ const relX = touchX - trackX;
5394
+ const newVal = positionToValue(relX);
5395
+ const tickDelta = Math.abs(newVal - lastTickValue.current);
5396
+ if (tickDelta >= TICK_INTERVAL) {
5397
+ lastTickValue.current = newVal;
5398
+ onTick?.(newVal);
5399
+ }
5400
+ onValueChange(newVal);
5401
+ });
5402
+ },
5403
+ onPanResponderRelease: () => {
5404
+ onSlidingComplete?.(value);
5405
+ }
5406
+ })
5407
+ ).current;
5408
+ const ratio = (value - min) / (max - min);
5409
+ const filledWidth = `${ratio * 100}%`;
5410
+ const markers = [min, max * 0.25, max * 0.5, max * 0.75, max];
5411
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.container, children: [
5412
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.valueRow, children: [
5413
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.valueText, { color: accent }], children: parseFloat(value.toFixed(4)) }),
5414
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.solLabel, { color: accent }], children: "SOL" })
5415
+ ] }),
5416
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5417
+ import_react_native19.View,
5418
+ {
5419
+ ref: trackRef,
5420
+ style: styles13.trackContainer,
5421
+ onLayout: (e) => {
5422
+ trackWidth.current = e.nativeEvent.layout.width;
5423
+ },
5424
+ ...panResponder.panHandlers,
5425
+ children: [
5426
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.track, { backgroundColor: "#2C2C2E" }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.trackFilled, { width: filledWidth, backgroundColor: accent }] }) }),
5427
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.markerRow, children: markers.map((m, i) => {
5428
+ const mRatio = (m - min) / (max - min);
5429
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5430
+ import_react_native19.View,
5431
+ {
5432
+ style: [
5433
+ styles13.marker,
5434
+ {
5435
+ left: `${mRatio * 100}%`,
5436
+ backgroundColor: value >= m ? accent : "#3A3A3C"
5437
+ }
5438
+ ]
5439
+ },
5440
+ i
5441
+ );
5442
+ }) }),
5443
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5444
+ import_react_native19.View,
5445
+ {
5446
+ style: [
5447
+ styles13.thumb,
5448
+ {
5449
+ left: filledWidth,
5450
+ backgroundColor: accent,
5451
+ shadowColor: accent
5452
+ }
5453
+ ],
5454
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.thumbInner })
5455
+ }
5456
+ )
5457
+ ]
5458
+ }
5459
+ ),
5460
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.rangeRow, children: [
5461
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.rangeText, children: min }),
5462
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: styles13.rangeText, children: [
5463
+ max,
5464
+ " SOL"
5465
+ ] })
5466
+ ] })
5467
+ ] });
5468
+ }
5469
+ var styles13 = import_react_native19.StyleSheet.create({
5470
+ container: {
5471
+ paddingVertical: 8
5472
+ },
5473
+ valueRow: {
5474
+ flexDirection: "row",
5475
+ alignItems: "baseline",
5476
+ justifyContent: "center",
5477
+ marginBottom: 16,
5478
+ gap: 4
5479
+ },
5480
+ valueText: {
5481
+ fontSize: 36,
5482
+ fontWeight: "900",
5483
+ letterSpacing: -1,
5484
+ fontVariant: ["tabular-nums"]
5485
+ },
5486
+ solLabel: {
5487
+ fontSize: 16,
5488
+ fontWeight: "700",
5489
+ opacity: 0.6
5490
+ },
5491
+ trackContainer: {
5492
+ height: THUMB_SIZE + 16,
5493
+ justifyContent: "center",
5494
+ paddingHorizontal: THUMB_SIZE / 2
5495
+ },
5496
+ track: {
5497
+ height: TRACK_HEIGHT,
5498
+ borderRadius: TRACK_HEIGHT / 2,
5499
+ overflow: "hidden"
5500
+ },
5501
+ trackFilled: {
5502
+ height: "100%",
5503
+ borderRadius: TRACK_HEIGHT / 2
5504
+ },
5505
+ markerRow: {
5506
+ position: "absolute",
5507
+ left: THUMB_SIZE / 2,
5508
+ right: THUMB_SIZE / 2,
5509
+ height: TRACK_HEIGHT,
5510
+ top: (THUMB_SIZE + 16 - TRACK_HEIGHT) / 2
5511
+ },
5512
+ marker: {
5513
+ position: "absolute",
5514
+ width: 3,
5515
+ height: 12,
5516
+ borderRadius: 1.5,
5517
+ top: -3,
5518
+ marginLeft: -1.5
5519
+ },
5520
+ thumb: {
5521
+ position: "absolute",
5522
+ width: THUMB_SIZE,
5523
+ height: THUMB_SIZE,
5524
+ borderRadius: THUMB_SIZE / 2,
5525
+ top: 8,
5526
+ marginLeft: 0,
5527
+ alignItems: "center",
5528
+ justifyContent: "center",
5529
+ ...import_react_native19.Platform.select({
5530
+ ios: {
5531
+ shadowOffset: { width: 0, height: 0 },
5532
+ shadowOpacity: 0.6,
5533
+ shadowRadius: 10
5534
+ },
5535
+ android: {
5536
+ elevation: 8
5537
+ }
5538
+ })
5539
+ },
5540
+ thumbInner: {
5541
+ width: 12,
5542
+ height: 12,
5543
+ borderRadius: 6,
5544
+ backgroundColor: "#FFFFFF"
5545
+ },
5546
+ rangeRow: {
5547
+ flexDirection: "row",
5548
+ justifyContent: "space-between",
5549
+ paddingHorizontal: THUMB_SIZE / 2,
5550
+ marginTop: 4
5551
+ },
5552
+ rangeText: {
5553
+ color: "#5A5A5E",
5554
+ fontSize: 11,
5555
+ fontWeight: "600"
5556
+ }
5557
+ });
5558
+
5559
+ // src/ui/game/JoinGameSheet.tsx
5560
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5347
5561
  var STATUS_LABELS3 = {
5348
5562
  building: "Building transaction...",
5349
5563
  signing: "Approve in wallet...",
@@ -5351,6 +5565,13 @@ var STATUS_LABELS3 = {
5351
5565
  success: "Joined!"
5352
5566
  };
5353
5567
  var CUSTOM_GAME_MODE = 6;
5568
+ function formatSol(n) {
5569
+ return parseFloat(n.toFixed(9)).toString();
5570
+ }
5571
+ function toPng(url) {
5572
+ if (!url) return null;
5573
+ return url.replace("/svg?", "/png?");
5574
+ }
5354
5575
  function JoinGameSheet({
5355
5576
  visible,
5356
5577
  onDismiss,
@@ -5362,37 +5583,56 @@ function JoinGameSheet({
5362
5583
  onSuccess,
5363
5584
  onError,
5364
5585
  onTeamSelect,
5586
+ onJoinSuccess,
5587
+ onSliderTick,
5588
+ maxWager = 5,
5365
5589
  isPoolModeEnabled = false
5366
5590
  }) {
5367
5591
  const t = useDubsTheme();
5368
5592
  const { wallet } = useDubs();
5369
5593
  const mutation = useJoinGame();
5370
5594
  const isCustomGame = game.gameMode === CUSTOM_GAME_MODE;
5371
- const [selectedTeam, setSelectedTeam] = (0, import_react33.useState)(null);
5372
- const overlayOpacity = (0, import_react33.useRef)(new import_react_native19.Animated.Value(0)).current;
5373
- (0, import_react33.useEffect)(() => {
5374
- import_react_native19.Animated.timing(overlayOpacity, {
5595
+ const [selectedTeam, setSelectedTeam] = (0, import_react34.useState)(null);
5596
+ const [wager, setWager] = (0, import_react34.useState)(game.buyIn);
5597
+ const [showSuccess, setShowSuccess] = (0, import_react34.useState)(false);
5598
+ const overlayOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5599
+ const successScale = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5600
+ const successOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5601
+ (0, import_react34.useEffect)(() => {
5602
+ import_react_native20.Animated.timing(overlayOpacity, {
5375
5603
  toValue: visible ? 1 : 0,
5376
5604
  duration: 250,
5377
5605
  useNativeDriver: true
5378
5606
  }).start();
5379
5607
  }, [visible, overlayOpacity]);
5380
- (0, import_react33.useEffect)(() => {
5608
+ (0, import_react34.useEffect)(() => {
5381
5609
  if (visible) {
5382
5610
  setSelectedTeam(isPoolModeEnabled ? "home" : isCustomGame ? "away" : null);
5611
+ setWager(game.buyIn);
5612
+ setShowSuccess(false);
5613
+ successScale.setValue(0);
5614
+ successOpacity.setValue(0);
5383
5615
  mutation.reset();
5384
5616
  }
5385
5617
  }, [visible]);
5386
- (0, import_react33.useEffect)(() => {
5618
+ (0, import_react34.useEffect)(() => {
5387
5619
  if (mutation.status === "success" && mutation.data) {
5620
+ setShowSuccess(true);
5388
5621
  onSuccess?.(mutation.data);
5622
+ onJoinSuccess?.(mutation.data);
5623
+ import_react_native20.Animated.parallel([
5624
+ import_react_native20.Animated.spring(successScale, { toValue: 1, friction: 4, tension: 80, useNativeDriver: true }),
5625
+ import_react_native20.Animated.timing(successOpacity, { toValue: 1, duration: 300, useNativeDriver: true })
5626
+ ]).start();
5389
5627
  const timer = setTimeout(() => {
5390
- onDismiss();
5391
- }, 1500);
5628
+ import_react_native20.Animated.timing(successOpacity, { toValue: 0, duration: 300, useNativeDriver: true }).start(() => {
5629
+ onDismiss();
5630
+ });
5631
+ }, 2500);
5392
5632
  return () => clearTimeout(timer);
5393
5633
  }
5394
5634
  }, [mutation.status, mutation.data]);
5395
- (0, import_react33.useEffect)(() => {
5635
+ (0, import_react34.useEffect)(() => {
5396
5636
  if (mutation.status === "error" && mutation.error) {
5397
5637
  onError?.(mutation.error);
5398
5638
  }
@@ -5403,62 +5643,92 @@ function JoinGameSheet({
5403
5643
  const homePool = game.homePool || 0;
5404
5644
  const awayPool = game.awayPool || 0;
5405
5645
  const buyIn = game.buyIn;
5406
- const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react33.useMemo)(() => ({
5407
- homeOdds: homePool > 0 ? (totalPool / homePool).toFixed(2) : "\u2014",
5408
- awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014",
5409
- homeBets: bettors.filter((b) => b.team === "home").length,
5410
- awayBets: bettors.filter((b) => b.team === "away").length
5411
- }), [totalPool, homePool, awayPool, bettors]);
5412
- const poolAfterJoin = totalPool + buyIn;
5646
+ const poolAfterJoin = totalPool + wager;
5647
+ const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react34.useMemo)(() => {
5648
+ const newPool = totalPool + wager;
5649
+ return {
5650
+ homeOdds: homePool > 0 ? (newPool / (homePool + (selectedTeam === "home" ? wager : 0))).toFixed(2) : "\u2014",
5651
+ awayOdds: awayPool > 0 ? (newPool / (awayPool + (selectedTeam === "away" ? wager : 0))).toFixed(2) : "\u2014",
5652
+ homeBets: bettors.filter((b) => b.team === "home").length,
5653
+ awayBets: bettors.filter((b) => b.team === "away").length
5654
+ };
5655
+ }, [totalPool, homePool, awayPool, bettors, wager, selectedTeam]);
5413
5656
  const selectedOdds = selectedTeam === "home" ? homeOdds : selectedTeam === "away" ? awayOdds : "\u2014";
5414
- const potentialWinnings = selectedOdds !== "\u2014" ? (parseFloat(selectedOdds) * buyIn).toFixed(4) : "\u2014";
5657
+ const potentialWinnings = selectedOdds !== "\u2014" ? formatSol(parseFloat(selectedOdds) * wager) : "\u2014";
5415
5658
  const homeName = shortName ? shortName(opponents[0]?.name) : opponents[0]?.name || "Home";
5416
5659
  const awayName = shortName ? shortName(opponents[1]?.name) : opponents[1]?.name || "Away";
5417
5660
  const selectedName = selectedTeam === "home" ? homeName : selectedTeam === "away" ? awayName : "\u2014";
5418
- const alreadyJoined = (0, import_react33.useMemo)(() => {
5661
+ const alreadyJoined = (0, import_react34.useMemo)(() => {
5419
5662
  if (!wallet.publicKey) return false;
5420
5663
  const addr = wallet.publicKey.toBase58();
5421
5664
  return bettors.some((b) => b.wallet === addr);
5422
5665
  }, [bettors, wallet.publicKey]);
5423
5666
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
5424
5667
  const canJoin = selectedTeam !== null && !isMutating && mutation.status !== "success" && !alreadyJoined;
5425
- const handleJoin = (0, import_react33.useCallback)(async () => {
5668
+ const handleJoin = (0, import_react34.useCallback)(async () => {
5426
5669
  if (!selectedTeam || !wallet.publicKey) return;
5427
5670
  try {
5428
5671
  await mutation.execute({
5429
5672
  playerWallet: wallet.publicKey.toBase58(),
5430
5673
  gameId: game.gameId,
5431
5674
  teamChoice: selectedTeam,
5432
- amount: buyIn
5675
+ amount: wager
5433
5676
  });
5434
5677
  } catch {
5435
5678
  }
5436
- }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, buyIn]);
5679
+ }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, wager]);
5437
5680
  const statusLabel = STATUS_LABELS3[mutation.status] || "";
5438
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5439
- import_react_native19.Modal,
5681
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5682
+ import_react_native20.Modal,
5440
5683
  {
5441
5684
  visible,
5442
5685
  animationType: "slide",
5443
5686
  transparent: true,
5444
5687
  onRequestClose: onDismiss,
5445
5688
  children: [
5446
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Animated.View, { style: [styles13.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { style: styles13.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5447
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5448
- import_react_native19.KeyboardAvoidingView,
5689
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Animated.View, { style: [styles14.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { style: styles14.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5690
+ showSuccess && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.successOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Animated.View, { style: [styles14.successContent, { opacity: successOpacity, transform: [{ scale: successScale }] }], children: [
5691
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.successEmoji, children: "\u{1F389}" }),
5692
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.successTitle, children: "You're in!" }),
5693
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: styles14.successSub, children: [
5694
+ formatSol(buyIn),
5695
+ " SOL on ",
5696
+ selectedName
5697
+ ] })
5698
+ ] }) }),
5699
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5700
+ import_react_native20.KeyboardAvoidingView,
5449
5701
  {
5450
- style: styles13.keyboardView,
5451
- behavior: import_react_native19.Platform.OS === "ios" ? "padding" : void 0,
5452
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.sheet, { backgroundColor: t.background }], children: [
5453
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.handle, { backgroundColor: t.textMuted }] }) }),
5454
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.header, children: [
5455
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5456
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5702
+ style: styles14.keyboardView,
5703
+ behavior: import_react_native20.Platform.OS === "ios" ? "padding" : void 0,
5704
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.sheet, { backgroundColor: t.background }], children: [
5705
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.handle, { backgroundColor: t.textMuted }] }) }),
5706
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.header, children: [
5707
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5708
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5709
+ ] }),
5710
+ bettors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.bettorsSection, children: [
5711
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.bettorsLabel, { color: t.textMuted }], children: [
5712
+ bettors.length,
5713
+ " ",
5714
+ bettors.length === 1 ? "player" : "players",
5715
+ " in this game"
5716
+ ] }),
5717
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.bettorsRow, children: [
5718
+ bettors.slice(0, 6).map((b, i) => {
5719
+ const pngUrl = toPng(b.avatar);
5720
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.bettorCircle, { backgroundColor: ["#EF4444", "#3B82F6", "#22C55E", "#F59E0B", "#A855F7", "#EC4899"][i % 6] }], children: pngUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Image, { source: { uri: pngUrl }, style: styles14.bettorImg }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.bettorInitial, children: (b.username ?? b.wallet).charAt(0).toUpperCase() }) }, b.wallet);
5721
+ }),
5722
+ bettors.length > 6 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.bettorCircle, { backgroundColor: "#2C2C2E" }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: styles14.bettorOverflow, children: [
5723
+ "+",
5724
+ bettors.length - 6
5725
+ ] }) })
5726
+ ] })
5457
5727
  ] }),
5458
- !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.section, children: [
5459
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5460
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.teamsRow, children: [
5461
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5728
+ !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.section, children: [
5729
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5730
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.teamsRow, children: [
5731
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5462
5732
  TeamButton,
5463
5733
  {
5464
5734
  name: homeName,
@@ -5475,7 +5745,7 @@ function JoinGameSheet({
5475
5745
  t
5476
5746
  }
5477
5747
  ),
5478
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5748
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5479
5749
  TeamButton,
5480
5750
  {
5481
5751
  name: awayName,
@@ -5494,64 +5764,76 @@ function JoinGameSheet({
5494
5764
  )
5495
5765
  ] })
5496
5766
  ] }),
5497
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5498
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5499
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5500
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5501
- buyIn,
5767
+ selectedTeam && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.sliderSection, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5768
+ SolSlider,
5769
+ {
5770
+ value: wager,
5771
+ min: game.buyIn,
5772
+ max: maxWager,
5773
+ step: 0.01,
5774
+ accentColor: selectedTeam === "home" ? homeColor : awayColor,
5775
+ onValueChange: setWager,
5776
+ onTick: onSliderTick
5777
+ }
5778
+ ) }),
5779
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5780
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5781
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Your wager" }),
5782
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: [
5783
+ formatSol(wager),
5502
5784
  " SOL"
5503
5785
  ] })
5504
5786
  ] }),
5505
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5506
- isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5507
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5508
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5509
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: bettors.length })
5787
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5788
+ isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5789
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5790
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5791
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: bettors.length })
5510
5792
  ] }),
5511
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5512
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5513
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5514
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: [
5515
- totalPool,
5793
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5794
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5795
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5796
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: [
5797
+ formatSol(totalPool),
5516
5798
  " SOL"
5517
5799
  ] })
5518
5800
  ] })
5519
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5520
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5521
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5522
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: selectedName })
5801
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5802
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5803
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5804
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: selectedName })
5523
5805
  ] }),
5524
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5525
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5526
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5527
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5528
- poolAfterJoin,
5806
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5807
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5808
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5809
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: [
5810
+ formatSol(poolAfterJoin),
5529
5811
  " SOL"
5530
5812
  ] })
5531
5813
  ] }),
5532
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5533
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5534
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5535
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5814
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5815
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5816
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5817
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5536
5818
  ] })
5537
5819
  ] })
5538
5820
  ] }),
5539
- alreadyJoined && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.errorBox, { backgroundColor: t.surface, borderColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.errorText, { color: t.textMuted }], children: isPoolModeEnabled ? "You've already joined this pool." : "You've already joined this game." }) }),
5540
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5541
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5542
- import_react_native19.TouchableOpacity,
5821
+ alreadyJoined && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.errorBox, { backgroundColor: t.surface, borderColor: t.border }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.errorText, { color: t.textMuted }], children: isPoolModeEnabled ? "You've already joined this pool." : "You've already joined this game." }) }),
5822
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5823
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5824
+ import_react_native20.TouchableOpacity,
5543
5825
  {
5544
5826
  style: [
5545
- styles13.ctaButton,
5827
+ styles14.ctaButton,
5546
5828
  { backgroundColor: canJoin ? t.accent : t.border }
5547
5829
  ],
5548
5830
  disabled: !canJoin,
5549
5831
  onPress: handleJoin,
5550
5832
  activeOpacity: 0.8,
5551
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.ctaLoading, children: [
5552
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5553
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: statusLabel })
5554
- ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: isPoolModeEnabled ? "Joined!" : STATUS_LABELS3.success }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.ctaText, !canJoin && { opacity: 0.5 }], children: alreadyJoined ? "Already Joined" : isPoolModeEnabled ? `Join Pool \u2014 ${buyIn} SOL` : selectedTeam ? `Join Game \u2014 ${buyIn} SOL` : "Pick a side to join" })
5833
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.ctaLoading, children: [
5834
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5835
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: statusLabel })
5836
+ ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: isPoolModeEnabled ? "Joined!" : STATUS_LABELS3.success }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.ctaText, !canJoin && { opacity: 0.5 }], children: alreadyJoined ? "Already Joined" : isPoolModeEnabled ? `Join Pool \u2014 ${formatSol(wager)} SOL` : selectedTeam ? `Join Game \u2014 ${formatSol(wager)} SOL` : "Pick a side to join" })
5555
5837
  }
5556
5838
  )
5557
5839
  ] }) })
@@ -5572,35 +5854,35 @@ function TeamButton({
5572
5854
  ImageComponent,
5573
5855
  t
5574
5856
  }) {
5575
- const [imgFailed, setImgFailed] = (0, import_react33.useState)(false);
5857
+ const [imgFailed, setImgFailed] = (0, import_react34.useState)(false);
5576
5858
  const Img = ImageComponent || require("react-native").Image;
5577
5859
  const showImage = imageUrl && !imgFailed;
5578
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5579
- import_react_native19.TouchableOpacity,
5860
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5861
+ import_react_native20.TouchableOpacity,
5580
5862
  {
5581
- style: [styles13.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5863
+ style: [styles14.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5582
5864
  onPress,
5583
5865
  activeOpacity: 0.7,
5584
5866
  children: [
5585
- showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Img, { source: { uri: imageUrl }, style: styles13.teamLogo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.teamLogo, styles13.teamLogoPlaceholder] }),
5586
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5587
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamOdds, { color }], children: [
5867
+ showImage ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Img, { source: { uri: imageUrl }, style: styles14.teamLogo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.teamLogo, styles14.teamLogoPlaceholder] }),
5868
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5869
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.teamOdds, { color }], children: [
5588
5870
  odds,
5589
5871
  "x"
5590
5872
  ] }),
5591
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamBets, { color: t.textMuted }], children: [
5873
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.teamBets, { color: t.textMuted }], children: [
5592
5874
  bets,
5593
5875
  " ",
5594
5876
  bets === 1 ? "bet" : "bets"
5595
5877
  ] }),
5596
- selected && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.teamBadge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.teamBadgeText, children: "Selected" }) })
5878
+ selected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.teamBadge, { backgroundColor: color }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.teamBadgeText, children: "Selected" }) })
5597
5879
  ]
5598
5880
  }
5599
5881
  );
5600
5882
  }
5601
- var styles13 = import_react_native19.StyleSheet.create({
5883
+ var styles14 = import_react_native20.StyleSheet.create({
5602
5884
  overlay: {
5603
- ...import_react_native19.StyleSheet.absoluteFillObject,
5885
+ ...import_react_native20.StyleSheet.absoluteFillObject,
5604
5886
  backgroundColor: "rgba(0,0,0,0.5)"
5605
5887
  },
5606
5888
  overlayTap: {
@@ -5644,6 +5926,67 @@ var styles13 = import_react_native19.StyleSheet.create({
5644
5926
  fontSize: 20,
5645
5927
  padding: 4
5646
5928
  },
5929
+ // Bettors row
5930
+ bettorsSection: {
5931
+ paddingBottom: 12,
5932
+ gap: 8
5933
+ },
5934
+ bettorsLabel: {
5935
+ fontSize: 12,
5936
+ fontWeight: "600"
5937
+ },
5938
+ bettorsRow: {
5939
+ flexDirection: "row",
5940
+ alignItems: "center",
5941
+ gap: 4
5942
+ },
5943
+ bettorCircle: {
5944
+ width: 28,
5945
+ height: 28,
5946
+ borderRadius: 14,
5947
+ alignItems: "center",
5948
+ justifyContent: "center",
5949
+ overflow: "hidden"
5950
+ },
5951
+ bettorImg: {
5952
+ width: 28,
5953
+ height: 28,
5954
+ borderRadius: 14
5955
+ },
5956
+ bettorInitial: {
5957
+ color: "#FFF",
5958
+ fontSize: 11,
5959
+ fontWeight: "800"
5960
+ },
5961
+ bettorOverflow: {
5962
+ color: "#8E8E93",
5963
+ fontSize: 10,
5964
+ fontWeight: "700"
5965
+ },
5966
+ // Success overlay
5967
+ successOverlay: {
5968
+ ...import_react_native20.StyleSheet.absoluteFillObject,
5969
+ zIndex: 100,
5970
+ alignItems: "center",
5971
+ justifyContent: "center",
5972
+ backgroundColor: "rgba(0,0,0,0.85)"
5973
+ },
5974
+ successContent: {
5975
+ alignItems: "center",
5976
+ gap: 12
5977
+ },
5978
+ successEmoji: {
5979
+ fontSize: 64
5980
+ },
5981
+ successTitle: {
5982
+ color: "#FFFFFF",
5983
+ fontSize: 28,
5984
+ fontWeight: "900"
5985
+ },
5986
+ successSub: {
5987
+ color: "#8E8E93",
5988
+ fontSize: 16
5989
+ },
5647
5990
  section: {
5648
5991
  gap: 12,
5649
5992
  paddingTop: 8
@@ -5656,8 +5999,11 @@ var styles13 = import_react_native19.StyleSheet.create({
5656
5999
  flexDirection: "row",
5657
6000
  gap: 12
5658
6001
  },
6002
+ sliderSection: {
6003
+ marginTop: 16
6004
+ },
5659
6005
  summaryCard: {
5660
- marginTop: 20,
6006
+ marginTop: 12,
5661
6007
  borderRadius: 16,
5662
6008
  borderWidth: 1,
5663
6009
  overflow: "hidden"
@@ -5749,9 +6095,9 @@ var styles13 = import_react_native19.StyleSheet.create({
5749
6095
  });
5750
6096
 
5751
6097
  // src/ui/game/ClaimPrizeSheet.tsx
5752
- var import_react34 = require("react");
5753
- var import_react_native20 = require("react-native");
5754
- var import_jsx_runtime17 = require("react/jsx-runtime");
6098
+ var import_react35 = require("react");
6099
+ var import_react_native21 = require("react-native");
6100
+ var import_jsx_runtime18 = require("react/jsx-runtime");
5755
6101
  var STATUS_LABELS4 = {
5756
6102
  building: "Building transaction...",
5757
6103
  signing: "Approve in wallet...",
@@ -5770,18 +6116,18 @@ function ClaimPrizeSheet({
5770
6116
  const t = useDubsTheme();
5771
6117
  const { wallet } = useDubs();
5772
6118
  const mutation = useClaim();
5773
- const overlayOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5774
- const celebrationScale = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5775
- const celebrationOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5776
- const [showCelebration, setShowCelebration] = (0, import_react34.useState)(false);
5777
- (0, import_react34.useEffect)(() => {
5778
- import_react_native20.Animated.timing(overlayOpacity, {
6119
+ const overlayOpacity = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6120
+ const celebrationScale = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6121
+ const celebrationOpacity = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6122
+ const [showCelebration, setShowCelebration] = (0, import_react35.useState)(false);
6123
+ (0, import_react35.useEffect)(() => {
6124
+ import_react_native21.Animated.timing(overlayOpacity, {
5779
6125
  toValue: visible ? 1 : 0,
5780
6126
  duration: 250,
5781
6127
  useNativeDriver: true
5782
6128
  }).start();
5783
6129
  }, [visible, overlayOpacity]);
5784
- (0, import_react34.useEffect)(() => {
6130
+ (0, import_react35.useEffect)(() => {
5785
6131
  if (visible) {
5786
6132
  mutation.reset();
5787
6133
  setShowCelebration(false);
@@ -5789,17 +6135,17 @@ function ClaimPrizeSheet({
5789
6135
  celebrationOpacity.setValue(0);
5790
6136
  }
5791
6137
  }, [visible]);
5792
- (0, import_react34.useEffect)(() => {
6138
+ (0, import_react35.useEffect)(() => {
5793
6139
  if (mutation.status === "success" && mutation.data) {
5794
6140
  setShowCelebration(true);
5795
- import_react_native20.Animated.parallel([
5796
- import_react_native20.Animated.spring(celebrationScale, {
6141
+ import_react_native21.Animated.parallel([
6142
+ import_react_native21.Animated.spring(celebrationScale, {
5797
6143
  toValue: 1,
5798
6144
  tension: 50,
5799
6145
  friction: 6,
5800
6146
  useNativeDriver: true
5801
6147
  }),
5802
- import_react_native20.Animated.timing(celebrationOpacity, {
6148
+ import_react_native21.Animated.timing(celebrationOpacity, {
5803
6149
  toValue: 1,
5804
6150
  duration: 300,
5805
6151
  useNativeDriver: true
@@ -5812,14 +6158,14 @@ function ClaimPrizeSheet({
5812
6158
  return () => clearTimeout(timer);
5813
6159
  }
5814
6160
  }, [mutation.status, mutation.data]);
5815
- (0, import_react34.useEffect)(() => {
6161
+ (0, import_react35.useEffect)(() => {
5816
6162
  if (mutation.status === "error" && mutation.error) {
5817
6163
  onError?.(mutation.error);
5818
6164
  }
5819
6165
  }, [mutation.status, mutation.error]);
5820
6166
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
5821
6167
  const canClaim = !isMutating && mutation.status !== "success" && !!wallet.publicKey;
5822
- const handleClaim = (0, import_react34.useCallback)(async () => {
6168
+ const handleClaim = (0, import_react35.useCallback)(async () => {
5823
6169
  if (!wallet.publicKey) return;
5824
6170
  try {
5825
6171
  await mutation.execute({
@@ -5831,62 +6177,62 @@ function ClaimPrizeSheet({
5831
6177
  }
5832
6178
  }, [wallet.publicKey, mutation.execute, gameId, prizeAmount]);
5833
6179
  const statusLabel = STATUS_LABELS4[mutation.status] || "";
5834
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5835
- import_react_native20.Modal,
6180
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6181
+ import_react_native21.Modal,
5836
6182
  {
5837
6183
  visible,
5838
6184
  animationType: "slide",
5839
6185
  transparent: true,
5840
6186
  onRequestClose: onDismiss,
5841
6187
  children: [
5842
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Animated.View, { style: [styles14.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { style: styles14.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
5843
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5844
- import_react_native20.KeyboardAvoidingView,
6188
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Animated.View, { style: [styles15.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.TouchableOpacity, { style: styles15.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
6189
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6190
+ import_react_native21.KeyboardAvoidingView,
5845
6191
  {
5846
- style: styles14.keyboardView,
5847
- behavior: import_react_native20.Platform.OS === "ios" ? "padding" : void 0,
5848
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.sheet, { backgroundColor: t.background }], children: [
5849
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: styles14.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.handle, { backgroundColor: t.textMuted }] }) }),
5850
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.header, children: [
5851
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
5852
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6192
+ style: styles15.keyboardView,
6193
+ behavior: import_react_native21.Platform.OS === "ios" ? "padding" : void 0,
6194
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: styles15.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: [styles15.sheet, { backgroundColor: t.background }], children: [
6195
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: styles15.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.handle, { backgroundColor: t.textMuted }] }) }),
6196
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.header, children: [
6197
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.headerTitle, { color: t.text }], children: showCelebration ? isRefund ? "Refund Claimed!" : "Prize Claimed!" : isRefund ? "Claim Refund" : "Claim Prize" }),
6198
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.closeButton, { color: t.textMuted }], children: "\u2715" }) })
5853
6199
  ] }),
5854
- showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5855
- import_react_native20.Animated.View,
6200
+ showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6201
+ import_react_native21.Animated.View,
5856
6202
  {
5857
6203
  style: [
5858
- styles14.celebrationContainer,
6204
+ styles15.celebrationContainer,
5859
6205
  {
5860
6206
  opacity: celebrationOpacity,
5861
6207
  transform: [{ scale: celebrationScale }]
5862
6208
  }
5863
6209
  ],
5864
6210
  children: [
5865
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.celebrationEmoji, children: "\u{1F3C6}" }),
5866
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.celebrationText, { color: t.success }], children: [
6211
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: styles15.celebrationEmoji, children: "\u{1F3C6}" }),
6212
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.celebrationText, { color: t.success }], children: [
5867
6213
  "+",
5868
6214
  prizeAmount,
5869
6215
  " SOL"
5870
6216
  ] }),
5871
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.celebrationSubtext, { color: t.textMuted }], children: isRefund ? "Refund sent to your wallet" : "Winnings sent to your wallet" })
6217
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.celebrationSubtext, { color: t.textMuted }], children: isRefund ? "Refund sent to your wallet" : "Winnings sent to your wallet" })
5872
6218
  ]
5873
6219
  }
5874
6220
  ),
5875
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5876
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5877
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
5878
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: [
6221
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: [styles15.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6222
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
6223
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
6224
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.success }], children: [
5879
6225
  prizeAmount,
5880
6226
  " SOL"
5881
6227
  ] })
5882
6228
  ] }),
5883
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5884
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5885
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Game" }),
5886
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5887
- import_react_native20.Text,
6229
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
6230
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
6231
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Game" }),
6232
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6233
+ import_react_native21.Text,
5888
6234
  {
5889
- style: [styles14.summaryValue, { color: t.text }],
6235
+ style: [styles15.summaryValue, { color: t.text }],
5890
6236
  numberOfLines: 1,
5891
6237
  children: [
5892
6238
  gameId.slice(0, 8),
@@ -5897,21 +6243,21 @@ function ClaimPrizeSheet({
5897
6243
  )
5898
6244
  ] })
5899
6245
  ] }),
5900
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.errorText, { color: t.errorText }], children: mutation.error.message }) }),
5901
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5902
- import_react_native20.TouchableOpacity,
6246
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.errorText, { color: t.errorText }], children: mutation.error.message }) }),
6247
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6248
+ import_react_native21.TouchableOpacity,
5903
6249
  {
5904
6250
  style: [
5905
- styles14.ctaButton,
6251
+ styles15.ctaButton,
5906
6252
  { backgroundColor: canClaim ? t.accent : t.border }
5907
6253
  ],
5908
6254
  disabled: !canClaim,
5909
6255
  onPress: handleClaim,
5910
6256
  activeOpacity: 0.8,
5911
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.ctaLoading, children: [
5912
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5913
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: statusLabel })
5914
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.ctaText, !canClaim && { opacity: 0.5 }], children: [
6257
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.ctaLoading, children: [
6258
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6259
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: styles15.ctaText, children: statusLabel })
6260
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.ctaText, !canClaim && { opacity: 0.5 }], children: [
5915
6261
  isRefund ? "Claim Refund" : "Claim Prize",
5916
6262
  " \u2014 ",
5917
6263
  prizeAmount,
@@ -5919,7 +6265,7 @@ function ClaimPrizeSheet({
5919
6265
  ] })
5920
6266
  }
5921
6267
  ),
5922
- mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
6268
+ mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
5923
6269
  ] }) })
5924
6270
  }
5925
6271
  )
@@ -5927,9 +6273,9 @@ function ClaimPrizeSheet({
5927
6273
  }
5928
6274
  );
5929
6275
  }
5930
- var styles14 = import_react_native20.StyleSheet.create({
6276
+ var styles15 = import_react_native21.StyleSheet.create({
5931
6277
  overlay: {
5932
- ...import_react_native20.StyleSheet.absoluteFillObject,
6278
+ ...import_react_native21.StyleSheet.absoluteFillObject,
5933
6279
  backgroundColor: "rgba(0,0,0,0.5)"
5934
6280
  },
5935
6281
  overlayTap: {
@@ -6052,17 +6398,17 @@ var styles14 = import_react_native20.StyleSheet.create({
6052
6398
  });
6053
6399
 
6054
6400
  // src/ui/game/ClaimButton.tsx
6055
- var import_react35 = require("react");
6056
- var import_react_native21 = require("react-native");
6057
- var import_jsx_runtime18 = require("react/jsx-runtime");
6401
+ var import_react36 = require("react");
6402
+ var import_react_native22 = require("react-native");
6403
+ var import_jsx_runtime19 = require("react/jsx-runtime");
6058
6404
  function ClaimButton({ gameId, style, onSuccess, onError }) {
6059
6405
  const t = useDubsTheme();
6060
6406
  const { wallet } = useDubs();
6061
6407
  const game = useGame(gameId);
6062
6408
  const claimStatus = useHasClaimed(gameId);
6063
- const [sheetVisible, setSheetVisible] = (0, import_react35.useState)(false);
6409
+ const [sheetVisible, setSheetVisible] = (0, import_react36.useState)(false);
6064
6410
  const walletAddress = wallet.publicKey?.toBase58() ?? null;
6065
- const myBet = (0, import_react35.useMemo)(() => {
6411
+ const myBet = (0, import_react36.useMemo)(() => {
6066
6412
  if (!walletAddress || !game.data?.bettors) return null;
6067
6413
  return game.data.bettors.find((b) => b.wallet === walletAddress) ?? null;
6068
6414
  }, [walletAddress, game.data?.bettors]);
@@ -6071,7 +6417,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6071
6417
  const isWinner = isResolved && myBet != null && myBet.team === game.data?.winnerSide;
6072
6418
  const isEligible = myBet != null && isResolved && (isWinner || isRefund);
6073
6419
  const prizeAmount = isRefund ? myBet?.amount ?? 0 : game.data?.totalPool ?? 0;
6074
- const handleSuccess = (0, import_react35.useCallback)(
6420
+ const handleSuccess = (0, import_react36.useCallback)(
6075
6421
  (result) => {
6076
6422
  claimStatus.refetch();
6077
6423
  onSuccess?.(result);
@@ -6084,13 +6430,13 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6084
6430
  }
6085
6431
  const label = isRefund ? "Refund" : "Prize";
6086
6432
  if (claimStatus.hasClaimed) {
6087
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6088
- import_react_native21.TouchableOpacity,
6433
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6434
+ import_react_native22.TouchableOpacity,
6089
6435
  {
6090
- style: [styles15.badge, { borderColor: t.accent }, style],
6436
+ style: [styles16.badge, { borderColor: t.accent }, style],
6091
6437
  activeOpacity: 1,
6092
6438
  disabled: true,
6093
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.badgeText, { color: t.accent }], children: [
6439
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.badgeText, { color: t.accent }], children: [
6094
6440
  label,
6095
6441
  " Claimed!"
6096
6442
  ] })
@@ -6100,14 +6446,14 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6100
6446
  if (!isEligible) {
6101
6447
  return null;
6102
6448
  }
6103
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
6104
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6105
- import_react_native21.TouchableOpacity,
6449
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6450
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6451
+ import_react_native22.TouchableOpacity,
6106
6452
  {
6107
- style: [styles15.button, { backgroundColor: t.accent }, style],
6453
+ style: [styles16.button, { backgroundColor: t.accent }, style],
6108
6454
  activeOpacity: 0.8,
6109
6455
  onPress: () => setSheetVisible(true),
6110
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: styles15.buttonText, children: [
6456
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: styles16.buttonText, children: [
6111
6457
  "Claim ",
6112
6458
  label,
6113
6459
  " \u2014 ",
@@ -6116,7 +6462,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6116
6462
  ] })
6117
6463
  }
6118
6464
  ),
6119
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6465
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6120
6466
  ClaimPrizeSheet,
6121
6467
  {
6122
6468
  visible: sheetVisible,
@@ -6130,7 +6476,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6130
6476
  )
6131
6477
  ] });
6132
6478
  }
6133
- var styles15 = import_react_native21.StyleSheet.create({
6479
+ var styles16 = import_react_native22.StyleSheet.create({
6134
6480
  button: {
6135
6481
  height: 52,
6136
6482
  borderRadius: 14,
@@ -6158,9 +6504,9 @@ var styles15 = import_react_native21.StyleSheet.create({
6158
6504
  });
6159
6505
 
6160
6506
  // src/ui/game/EnterArcadePoolSheet.tsx
6161
- var import_react36 = require("react");
6162
- var import_react_native22 = require("react-native");
6163
- var import_jsx_runtime19 = require("react/jsx-runtime");
6507
+ var import_react37 = require("react");
6508
+ var import_react_native23 = require("react-native");
6509
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6164
6510
  var STATUS_LABELS5 = {
6165
6511
  building: "Building transaction...",
6166
6512
  signing: "Approve in wallet...",
@@ -6179,20 +6525,20 @@ function EnterArcadePoolSheet({
6179
6525
  const t = useDubsTheme();
6180
6526
  const { wallet } = useDubs();
6181
6527
  const mutation = useEnterArcadePool();
6182
- const overlayOpacity = (0, import_react36.useRef)(new import_react_native22.Animated.Value(0)).current;
6183
- (0, import_react36.useEffect)(() => {
6184
- import_react_native22.Animated.timing(overlayOpacity, {
6528
+ const overlayOpacity = (0, import_react37.useRef)(new import_react_native23.Animated.Value(0)).current;
6529
+ (0, import_react37.useEffect)(() => {
6530
+ import_react_native23.Animated.timing(overlayOpacity, {
6185
6531
  toValue: visible ? 1 : 0,
6186
6532
  duration: 250,
6187
6533
  useNativeDriver: true
6188
6534
  }).start();
6189
6535
  }, [visible, overlayOpacity]);
6190
- (0, import_react36.useEffect)(() => {
6536
+ (0, import_react37.useEffect)(() => {
6191
6537
  if (visible) {
6192
6538
  mutation.reset();
6193
6539
  }
6194
6540
  }, [visible]);
6195
- (0, import_react36.useEffect)(() => {
6541
+ (0, import_react37.useEffect)(() => {
6196
6542
  if (mutation.status === "success" && mutation.data) {
6197
6543
  onSuccess?.(mutation.data);
6198
6544
  const timer = setTimeout(() => {
@@ -6201,7 +6547,7 @@ function EnterArcadePoolSheet({
6201
6547
  return () => clearTimeout(timer);
6202
6548
  }
6203
6549
  }, [mutation.status, mutation.data]);
6204
- (0, import_react36.useEffect)(() => {
6550
+ (0, import_react37.useEffect)(() => {
6205
6551
  if (mutation.status === "error" && mutation.error) {
6206
6552
  onError?.(mutation.error);
6207
6553
  }
@@ -6213,7 +6559,7 @@ function EnterArcadePoolSheet({
6213
6559
  const potSol = (pool.buy_in_lamports * Number(totalBuyIns) / 1e9).toFixed(4);
6214
6560
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
6215
6561
  const canJoin = !isMutating && mutation.status !== "success";
6216
- const handleJoin = (0, import_react36.useCallback)(async () => {
6562
+ const handleJoin = (0, import_react37.useCallback)(async () => {
6217
6563
  if (!wallet.publicKey) return;
6218
6564
  try {
6219
6565
  await mutation.execute(pool.id);
@@ -6225,76 +6571,76 @@ function EnterArcadePoolSheet({
6225
6571
  const headerTitle = isRejoin ? "Play Again" : "Join Pool";
6226
6572
  const ctaLabel = isRejoin ? `Play Again \u2014 ${buyInSol} SOL` : `Join Pool \u2014 ${buyInSol} SOL`;
6227
6573
  const successLabel = isRejoin ? "Lives refilled!" : "Joined!";
6228
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
6229
- import_react_native22.Modal,
6574
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6575
+ import_react_native23.Modal,
6230
6576
  {
6231
6577
  visible,
6232
6578
  animationType: "slide",
6233
6579
  transparent: true,
6234
6580
  onRequestClose: onDismiss,
6235
6581
  children: [
6236
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Animated.View, { style: [styles16.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.TouchableOpacity, { style: styles16.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
6237
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6238
- import_react_native22.KeyboardAvoidingView,
6582
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Animated.View, { style: [styles17.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.TouchableOpacity, { style: styles17.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
6583
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6584
+ import_react_native23.KeyboardAvoidingView,
6239
6585
  {
6240
- style: styles16.keyboardView,
6241
- behavior: import_react_native22.Platform.OS === "ios" ? "padding" : void 0,
6242
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: [styles16.sheet, { backgroundColor: t.background }], children: [
6243
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: styles16.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.handle, { backgroundColor: t.textMuted }] }) }),
6244
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.header, children: [
6245
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.headerTitle, { color: t.text }], children: headerTitle }),
6246
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6586
+ style: styles17.keyboardView,
6587
+ behavior: import_react_native23.Platform.OS === "ios" ? "padding" : void 0,
6588
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.sheet, { backgroundColor: t.background }], children: [
6589
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.handle, { backgroundColor: t.textMuted }] }) }),
6590
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.header, children: [
6591
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.headerTitle, { color: t.text }], children: headerTitle }),
6592
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6247
6593
  ] }),
6248
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.poolName, { color: t.textSecondary }], children: pool.name }),
6249
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: [styles16.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6250
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6251
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
6252
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: [
6594
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.poolName, { color: t.textSecondary }], children: pool.name }),
6595
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6596
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6597
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
6598
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: [
6253
6599
  buyInSol,
6254
6600
  " SOL"
6255
6601
  ] })
6256
6602
  ] }),
6257
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6258
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6259
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Players in" }),
6260
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: totalPlayers })
6603
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6604
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6605
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Players in" }),
6606
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: totalPlayers })
6261
6607
  ] }),
6262
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6263
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6264
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
6265
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.success }], children: [
6608
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6609
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6610
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
6611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.success }], children: [
6266
6612
  potSol,
6267
6613
  " SOL"
6268
6614
  ] })
6269
6615
  ] }),
6270
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6271
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6272
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Lives" }),
6273
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: pool.max_lives })
6616
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6617
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6618
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Lives" }),
6619
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: pool.max_lives })
6274
6620
  ] }),
6275
- topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6276
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6277
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6278
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Top score" }),
6279
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: topScore })
6621
+ topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6622
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6623
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6624
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Top score" }),
6625
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: topScore })
6280
6626
  ] })
6281
6627
  ] })
6282
6628
  ] }),
6283
- mutation.error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.errorText, { color: t.errorText }], children: mutation.error.message }) }),
6284
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6285
- import_react_native22.TouchableOpacity,
6629
+ mutation.error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.errorText, { color: t.errorText }], children: mutation.error.message }) }),
6630
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6631
+ import_react_native23.TouchableOpacity,
6286
6632
  {
6287
6633
  style: [
6288
- styles16.ctaButton,
6634
+ styles17.ctaButton,
6289
6635
  { backgroundColor: canJoin ? t.accent : t.border }
6290
6636
  ],
6291
6637
  disabled: !canJoin,
6292
6638
  onPress: handleJoin,
6293
6639
  activeOpacity: 0.8,
6294
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.ctaLoading, children: [
6295
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6296
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.ctaText, children: statusLabel })
6297
- ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.ctaText, children: successLabel }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.ctaText, !canJoin && { opacity: 0.5 }], children: ctaLabel })
6640
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.ctaLoading, children: [
6641
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6642
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.ctaText, children: statusLabel })
6643
+ ] }) : mutation.status === "success" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.ctaText, children: successLabel }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.ctaText, !canJoin && { opacity: 0.5 }], children: ctaLabel })
6298
6644
  }
6299
6645
  )
6300
6646
  ] }) })
@@ -6304,9 +6650,9 @@ function EnterArcadePoolSheet({
6304
6650
  }
6305
6651
  );
6306
6652
  }
6307
- var styles16 = import_react_native22.StyleSheet.create({
6653
+ var styles17 = import_react_native23.StyleSheet.create({
6308
6654
  overlay: {
6309
- ...import_react_native22.StyleSheet.absoluteFillObject,
6655
+ ...import_react_native23.StyleSheet.absoluteFillObject,
6310
6656
  backgroundColor: "rgba(0,0,0,0.5)"
6311
6657
  },
6312
6658
  overlayTap: { flex: 1 },
@@ -6364,14 +6710,14 @@ var styles16 = import_react_native22.StyleSheet.create({
6364
6710
  });
6365
6711
 
6366
6712
  // src/ui/game/ArcadeLeaderboardSheet.tsx
6367
- var import_react37 = require("react");
6368
- var import_react_native23 = require("react-native");
6369
- var import_jsx_runtime20 = require("react/jsx-runtime");
6713
+ var import_react38 = require("react");
6714
+ var import_react_native24 = require("react-native");
6715
+ var import_jsx_runtime21 = require("react/jsx-runtime");
6370
6716
  function RankLabel({ index }) {
6371
- if (index === 0) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F947}" });
6372
- if (index === 1) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F948}" });
6373
- if (index === 2) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F949}" });
6374
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankNum, children: index + 1 });
6717
+ if (index === 0) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F947}" });
6718
+ if (index === 1) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F948}" });
6719
+ if (index === 2) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F949}" });
6720
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankNum, children: index + 1 });
6375
6721
  }
6376
6722
  function ArcadeLeaderboardSheet({
6377
6723
  visible,
@@ -6381,92 +6727,92 @@ function ArcadeLeaderboardSheet({
6381
6727
  }) {
6382
6728
  const t = useDubsTheme();
6383
6729
  const { pool, leaderboard, stats, loading, refetch } = useArcadePool(poolId);
6384
- const overlayOpacity = (0, import_react37.useRef)(new import_react_native23.Animated.Value(0)).current;
6385
- (0, import_react37.useEffect)(() => {
6386
- import_react_native23.Animated.timing(overlayOpacity, {
6730
+ const overlayOpacity = (0, import_react38.useRef)(new import_react_native24.Animated.Value(0)).current;
6731
+ (0, import_react38.useEffect)(() => {
6732
+ import_react_native24.Animated.timing(overlayOpacity, {
6387
6733
  toValue: visible ? 1 : 0,
6388
6734
  duration: 250,
6389
6735
  useNativeDriver: true
6390
6736
  }).start();
6391
6737
  }, [visible, overlayOpacity]);
6392
- (0, import_react37.useEffect)(() => {
6738
+ (0, import_react38.useEffect)(() => {
6393
6739
  if (visible) refetch();
6394
6740
  }, [visible]);
6395
6741
  const renderItem = ({ item, index }) => {
6396
6742
  const isMe = highlightWallet && item.wallet_address === highlightWallet;
6397
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6398
- import_react_native23.View,
6743
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6744
+ import_react_native24.View,
6399
6745
  {
6400
6746
  style: [
6401
- styles17.row,
6747
+ styles18.row,
6402
6748
  { backgroundColor: isMe ? `${t.accent}18` : index % 2 === 0 ? t.surface : "transparent" },
6403
6749
  isMe ? { borderWidth: 1, borderColor: t.accent } : void 0
6404
6750
  ],
6405
6751
  children: [
6406
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.rankCol, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RankLabel, { index }) }),
6407
- item.avatar ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Image, { source: { uri: ensurePngAvatar(item.avatar) }, style: styles17.avatar }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.avatar, { backgroundColor: t.border }] }),
6408
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.nameCol, children: [
6409
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.name, { color: t.text }], numberOfLines: 1, children: item.username || `${item.wallet_address.slice(0, 4)}...${item.wallet_address.slice(-4)}` }),
6410
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.lives, { color: t.textMuted }], children: [
6752
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: styles18.rankCol, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RankLabel, { index }) }),
6753
+ item.avatar ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Image, { source: { uri: ensurePngAvatar(item.avatar) }, style: styles18.avatar }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.avatar, { backgroundColor: t.border }] }),
6754
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.nameCol, children: [
6755
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.name, { color: t.text }], numberOfLines: 1, children: item.username || `${item.wallet_address.slice(0, 4)}...${item.wallet_address.slice(-4)}` }),
6756
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.Text, { style: [styles18.lives, { color: t.textMuted }], children: [
6411
6757
  item.lives_used,
6412
6758
  " ",
6413
6759
  item.lives_used === 1 ? "life" : "lives",
6414
6760
  " used"
6415
6761
  ] })
6416
6762
  ] }),
6417
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.score, { color: t.accent }], children: item.best_score })
6763
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.score, { color: t.accent }], children: item.best_score })
6418
6764
  ]
6419
6765
  }
6420
6766
  );
6421
6767
  };
6422
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6423
- import_react_native23.Modal,
6768
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6769
+ import_react_native24.Modal,
6424
6770
  {
6425
6771
  visible,
6426
6772
  animationType: "slide",
6427
6773
  transparent: true,
6428
6774
  onRequestClose: onDismiss,
6429
6775
  children: [
6430
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Animated.View, { style: [styles17.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.TouchableOpacity, { style: styles17.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
6431
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6432
- import_react_native23.KeyboardAvoidingView,
6776
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Animated.View, { style: [styles18.overlay, { opacity: overlayOpacity }], children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.TouchableOpacity, { style: styles18.overlayTap, activeOpacity: 1, onPress: onDismiss }) }),
6777
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6778
+ import_react_native24.KeyboardAvoidingView,
6433
6779
  {
6434
- style: styles17.keyboardView,
6435
- behavior: import_react_native23.Platform.OS === "ios" ? "padding" : void 0,
6436
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.sheet, { backgroundColor: t.background }], children: [
6437
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.handle, { backgroundColor: t.textMuted }] }) }),
6438
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.header, children: [
6439
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { children: [
6440
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.headerTitle, { color: t.text }], children: "Leaderboard" }),
6441
- pool && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.poolName, { color: t.textMuted }], children: pool.name })
6780
+ style: styles18.keyboardView,
6781
+ behavior: import_react_native24.Platform.OS === "ios" ? "padding" : void 0,
6782
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: styles18.sheetPositioner, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: [styles18.sheet, { backgroundColor: t.background }], children: [
6783
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: styles18.handleRow, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.handle, { backgroundColor: t.textMuted }] }) }),
6784
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.header, children: [
6785
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { children: [
6786
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.headerTitle, { color: t.text }], children: "Leaderboard" }),
6787
+ pool && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.poolName, { color: t.textMuted }], children: pool.name })
6442
6788
  ] }),
6443
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6789
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.TouchableOpacity, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.closeButton, { color: t.textMuted }], children: "\u2715" }) })
6444
6790
  ] }),
6445
- stats && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6446
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6447
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.text }], children: stats.total_entries }),
6448
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Players" })
6791
+ stats && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: [styles18.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6792
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6793
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.text }], children: stats.total_entries }),
6794
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Players" })
6449
6795
  ] }),
6450
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6451
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6452
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.accent }], children: stats.top_score }),
6453
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Top Score" })
6796
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.statDivider, { backgroundColor: t.border }] }),
6797
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6798
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.accent }], children: stats.top_score }),
6799
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Top Score" })
6454
6800
  ] }),
6455
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6456
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6457
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
6458
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Avg Score" })
6801
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.statDivider, { backgroundColor: t.border }] }),
6802
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6803
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
6804
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Avg Score" })
6459
6805
  ] })
6460
6806
  ] }),
6461
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6462
- import_react_native23.FlatList,
6807
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6808
+ import_react_native24.FlatList,
6463
6809
  {
6464
6810
  data: leaderboard,
6465
6811
  renderItem,
6466
6812
  keyExtractor: (item) => String(item.id),
6467
- style: styles17.list,
6468
- contentContainerStyle: styles17.listContent,
6469
- ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.emptyState, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.emptyText, { color: t.textMuted }], children: loading ? "Loading..." : "No scores yet" }) })
6813
+ style: styles18.list,
6814
+ contentContainerStyle: styles18.listContent,
6815
+ ListEmptyComponent: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: styles18.emptyState, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.emptyText, { color: t.textMuted }], children: loading ? "Loading..." : "No scores yet" }) })
6470
6816
  }
6471
6817
  )
6472
6818
  ] }) })
@@ -6476,9 +6822,9 @@ function ArcadeLeaderboardSheet({
6476
6822
  }
6477
6823
  );
6478
6824
  }
6479
- var styles17 = import_react_native23.StyleSheet.create({
6825
+ var styles18 = import_react_native24.StyleSheet.create({
6480
6826
  overlay: {
6481
- ...import_react_native23.StyleSheet.absoluteFillObject,
6827
+ ...import_react_native24.StyleSheet.absoluteFillObject,
6482
6828
  backgroundColor: "rgba(0,0,0,0.5)"
6483
6829
  },
6484
6830
  overlayTap: { flex: 1 },
@@ -6561,6 +6907,7 @@ var styles17 = import_react_native23.StyleSheet.create({
6561
6907
  SOLANA_PROGRAM_ERRORS,
6562
6908
  STORAGE_KEYS,
6563
6909
  SettingsSheet,
6910
+ SolSlider,
6564
6911
  UserProfileCard,
6565
6912
  UserProfileSheet,
6566
6913
  createSecureStoreStorage,