@dubsdotapp/expo 0.5.7 → 0.5.9

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,200 @@ 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)(
5413
+ import_react_native19.View,
5414
+ {
5415
+ ref: trackRef,
5416
+ style: styles13.trackContainer,
5417
+ onLayout: (e) => {
5418
+ trackWidth.current = e.nativeEvent.layout.width;
5419
+ },
5420
+ ...panResponder.panHandlers,
5421
+ children: [
5422
+ /* @__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 }] }) }),
5423
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.markerRow, children: markers.map((m, i) => {
5424
+ const mRatio = (m - min) / (max - min);
5425
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5426
+ import_react_native19.View,
5427
+ {
5428
+ style: [
5429
+ styles13.marker,
5430
+ {
5431
+ left: `${mRatio * 100}%`,
5432
+ backgroundColor: value >= m ? accent : "#3A3A3C"
5433
+ }
5434
+ ]
5435
+ },
5436
+ i
5437
+ );
5438
+ }) }),
5439
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5440
+ import_react_native19.View,
5441
+ {
5442
+ style: [
5443
+ styles13.thumb,
5444
+ {
5445
+ left: filledWidth,
5446
+ backgroundColor: accent,
5447
+ shadowColor: accent
5448
+ }
5449
+ ],
5450
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.thumbInner })
5451
+ }
5452
+ )
5453
+ ]
5454
+ }
5455
+ ),
5456
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.rangeRow, children: [
5457
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.rangeText, children: min }),
5458
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: styles13.rangeText, children: [
5459
+ max,
5460
+ " SOL"
5461
+ ] })
5462
+ ] })
5463
+ ] });
5464
+ }
5465
+ var styles13 = import_react_native19.StyleSheet.create({
5466
+ container: {
5467
+ paddingVertical: 4
5468
+ },
5469
+ trackContainer: {
5470
+ height: THUMB_SIZE + 16,
5471
+ justifyContent: "center",
5472
+ paddingHorizontal: THUMB_SIZE / 2
5473
+ },
5474
+ track: {
5475
+ height: TRACK_HEIGHT,
5476
+ borderRadius: TRACK_HEIGHT / 2,
5477
+ overflow: "hidden"
5478
+ },
5479
+ trackFilled: {
5480
+ height: "100%",
5481
+ borderRadius: TRACK_HEIGHT / 2
5482
+ },
5483
+ markerRow: {
5484
+ position: "absolute",
5485
+ left: THUMB_SIZE / 2,
5486
+ right: THUMB_SIZE / 2,
5487
+ height: TRACK_HEIGHT,
5488
+ top: (THUMB_SIZE + 16 - TRACK_HEIGHT) / 2
5489
+ },
5490
+ marker: {
5491
+ position: "absolute",
5492
+ width: 3,
5493
+ height: 12,
5494
+ borderRadius: 1.5,
5495
+ top: -3,
5496
+ marginLeft: -1.5
5497
+ },
5498
+ thumb: {
5499
+ position: "absolute",
5500
+ width: THUMB_SIZE,
5501
+ height: THUMB_SIZE,
5502
+ borderRadius: THUMB_SIZE / 2,
5503
+ top: 8,
5504
+ marginLeft: 0,
5505
+ alignItems: "center",
5506
+ justifyContent: "center",
5507
+ ...import_react_native19.Platform.select({
5508
+ ios: {
5509
+ shadowOffset: { width: 0, height: 0 },
5510
+ shadowOpacity: 0.6,
5511
+ shadowRadius: 10
5512
+ },
5513
+ android: {
5514
+ elevation: 8
5515
+ }
5516
+ })
5517
+ },
5518
+ thumbInner: {
5519
+ width: 12,
5520
+ height: 12,
5521
+ borderRadius: 6,
5522
+ backgroundColor: "#FFFFFF"
5523
+ },
5524
+ rangeRow: {
5525
+ flexDirection: "row",
5526
+ justifyContent: "space-between",
5527
+ paddingHorizontal: THUMB_SIZE / 2,
5528
+ marginTop: 4
5529
+ },
5530
+ rangeText: {
5531
+ color: "#5A5A5E",
5532
+ fontSize: 11,
5533
+ fontWeight: "600"
5534
+ }
5535
+ });
5536
+
5537
+ // src/ui/game/JoinGameSheet.tsx
5538
+ var import_jsx_runtime17 = require("react/jsx-runtime");
5347
5539
  var STATUS_LABELS3 = {
5348
5540
  building: "Building transaction...",
5349
5541
  signing: "Approve in wallet...",
@@ -5370,51 +5562,55 @@ function JoinGameSheet({
5370
5562
  onError,
5371
5563
  onTeamSelect,
5372
5564
  onJoinSuccess,
5565
+ onSliderTick,
5566
+ maxWager = 5,
5373
5567
  isPoolModeEnabled = false
5374
5568
  }) {
5375
5569
  const t = useDubsTheme();
5376
5570
  const { wallet } = useDubs();
5377
5571
  const mutation = useJoinGame();
5378
5572
  const isCustomGame = game.gameMode === CUSTOM_GAME_MODE;
5379
- const [selectedTeam, setSelectedTeam] = (0, import_react33.useState)(null);
5380
- const [showSuccess, setShowSuccess] = (0, import_react33.useState)(false);
5381
- const overlayOpacity = (0, import_react33.useRef)(new import_react_native19.Animated.Value(0)).current;
5382
- const successScale = (0, import_react33.useRef)(new import_react_native19.Animated.Value(0)).current;
5383
- const successOpacity = (0, import_react33.useRef)(new import_react_native19.Animated.Value(0)).current;
5384
- (0, import_react33.useEffect)(() => {
5385
- import_react_native19.Animated.timing(overlayOpacity, {
5573
+ const [selectedTeam, setSelectedTeam] = (0, import_react34.useState)(null);
5574
+ const [wager, setWager] = (0, import_react34.useState)(game.buyIn);
5575
+ const [showSuccess, setShowSuccess] = (0, import_react34.useState)(false);
5576
+ const overlayOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5577
+ const successScale = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5578
+ const successOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5579
+ (0, import_react34.useEffect)(() => {
5580
+ import_react_native20.Animated.timing(overlayOpacity, {
5386
5581
  toValue: visible ? 1 : 0,
5387
5582
  duration: 250,
5388
5583
  useNativeDriver: true
5389
5584
  }).start();
5390
5585
  }, [visible, overlayOpacity]);
5391
- (0, import_react33.useEffect)(() => {
5586
+ (0, import_react34.useEffect)(() => {
5392
5587
  if (visible) {
5393
5588
  setSelectedTeam(isPoolModeEnabled ? "home" : isCustomGame ? "away" : null);
5589
+ setWager(game.buyIn);
5394
5590
  setShowSuccess(false);
5395
5591
  successScale.setValue(0);
5396
5592
  successOpacity.setValue(0);
5397
5593
  mutation.reset();
5398
5594
  }
5399
5595
  }, [visible]);
5400
- (0, import_react33.useEffect)(() => {
5596
+ (0, import_react34.useEffect)(() => {
5401
5597
  if (mutation.status === "success" && mutation.data) {
5402
5598
  setShowSuccess(true);
5403
5599
  onSuccess?.(mutation.data);
5404
5600
  onJoinSuccess?.(mutation.data);
5405
- import_react_native19.Animated.parallel([
5406
- import_react_native19.Animated.spring(successScale, { toValue: 1, friction: 4, tension: 80, useNativeDriver: true }),
5407
- import_react_native19.Animated.timing(successOpacity, { toValue: 1, duration: 300, useNativeDriver: true })
5601
+ import_react_native20.Animated.parallel([
5602
+ import_react_native20.Animated.spring(successScale, { toValue: 1, friction: 4, tension: 80, useNativeDriver: true }),
5603
+ import_react_native20.Animated.timing(successOpacity, { toValue: 1, duration: 300, useNativeDriver: true })
5408
5604
  ]).start();
5409
5605
  const timer = setTimeout(() => {
5410
- import_react_native19.Animated.timing(successOpacity, { toValue: 0, duration: 300, useNativeDriver: true }).start(() => {
5606
+ import_react_native20.Animated.timing(successOpacity, { toValue: 0, duration: 300, useNativeDriver: true }).start(() => {
5411
5607
  onDismiss();
5412
5608
  });
5413
5609
  }, 2500);
5414
5610
  return () => clearTimeout(timer);
5415
5611
  }
5416
5612
  }, [mutation.status, mutation.data]);
5417
- (0, import_react33.useEffect)(() => {
5613
+ (0, import_react34.useEffect)(() => {
5418
5614
  if (mutation.status === "error" && mutation.error) {
5419
5615
  onError?.(mutation.error);
5420
5616
  }
@@ -5425,89 +5621,91 @@ function JoinGameSheet({
5425
5621
  const homePool = game.homePool || 0;
5426
5622
  const awayPool = game.awayPool || 0;
5427
5623
  const buyIn = game.buyIn;
5428
- const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react33.useMemo)(() => ({
5429
- homeOdds: homePool > 0 ? (totalPool / homePool).toFixed(2) : "\u2014",
5430
- awayOdds: awayPool > 0 ? (totalPool / awayPool).toFixed(2) : "\u2014",
5431
- homeBets: bettors.filter((b) => b.team === "home").length,
5432
- awayBets: bettors.filter((b) => b.team === "away").length
5433
- }), [totalPool, homePool, awayPool, bettors]);
5434
- const poolAfterJoin = totalPool + buyIn;
5624
+ const poolAfterJoin = totalPool + wager;
5625
+ const { homeOdds, awayOdds, homeBets, awayBets } = (0, import_react34.useMemo)(() => {
5626
+ const newPool = totalPool + wager;
5627
+ return {
5628
+ homeOdds: homePool > 0 ? (newPool / (homePool + (selectedTeam === "home" ? wager : 0))).toFixed(2) : "\u2014",
5629
+ awayOdds: awayPool > 0 ? (newPool / (awayPool + (selectedTeam === "away" ? wager : 0))).toFixed(2) : "\u2014",
5630
+ homeBets: bettors.filter((b) => b.team === "home").length,
5631
+ awayBets: bettors.filter((b) => b.team === "away").length
5632
+ };
5633
+ }, [totalPool, homePool, awayPool, bettors, wager, selectedTeam]);
5435
5634
  const selectedOdds = selectedTeam === "home" ? homeOdds : selectedTeam === "away" ? awayOdds : "\u2014";
5436
- const potentialWinnings = selectedOdds !== "\u2014" ? formatSol(parseFloat(selectedOdds) * buyIn) : "\u2014";
5635
+ const potentialWinnings = selectedOdds !== "\u2014" ? formatSol(parseFloat(selectedOdds) * wager) : "\u2014";
5437
5636
  const homeName = shortName ? shortName(opponents[0]?.name) : opponents[0]?.name || "Home";
5438
5637
  const awayName = shortName ? shortName(opponents[1]?.name) : opponents[1]?.name || "Away";
5439
- const selectedName = selectedTeam === "home" ? homeName : selectedTeam === "away" ? awayName : "\u2014";
5440
- const alreadyJoined = (0, import_react33.useMemo)(() => {
5638
+ const alreadyJoined = (0, import_react34.useMemo)(() => {
5441
5639
  if (!wallet.publicKey) return false;
5442
5640
  const addr = wallet.publicKey.toBase58();
5443
5641
  return bettors.some((b) => b.wallet === addr);
5444
5642
  }, [bettors, wallet.publicKey]);
5445
5643
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
5446
5644
  const canJoin = selectedTeam !== null && !isMutating && mutation.status !== "success" && !alreadyJoined;
5447
- const handleJoin = (0, import_react33.useCallback)(async () => {
5645
+ const handleJoin = (0, import_react34.useCallback)(async () => {
5448
5646
  if (!selectedTeam || !wallet.publicKey) return;
5449
5647
  try {
5450
5648
  await mutation.execute({
5451
5649
  playerWallet: wallet.publicKey.toBase58(),
5452
5650
  gameId: game.gameId,
5453
5651
  teamChoice: selectedTeam,
5454
- amount: buyIn
5652
+ amount: wager
5455
5653
  });
5456
5654
  } catch {
5457
5655
  }
5458
- }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, buyIn]);
5656
+ }, [selectedTeam, wallet.publicKey, mutation.execute, game.gameId, wager]);
5459
5657
  const statusLabel = STATUS_LABELS3[mutation.status] || "";
5460
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5461
- import_react_native19.Modal,
5658
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5659
+ import_react_native20.Modal,
5462
5660
  {
5463
5661
  visible,
5464
5662
  animationType: "slide",
5465
5663
  transparent: true,
5466
5664
  onRequestClose: onDismiss,
5467
5665
  children: [
5468
- /* @__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 }) }),
5469
- showSuccess && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: styles13.successOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Animated.View, { style: [styles13.successContent, { opacity: successOpacity, transform: [{ scale: successScale }] }], children: [
5470
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.successEmoji, children: "\u{1F389}" }),
5471
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.successTitle, children: "You're in!" }),
5472
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: styles13.successSub, children: [
5666
+ /* @__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 }) }),
5667
+ 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: [
5668
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.successEmoji, children: "\u{1F389}" }),
5669
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.successTitle, children: "You're in!" }),
5670
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: styles14.successSub, children: [
5473
5671
  formatSol(buyIn),
5474
5672
  " SOL on ",
5475
5673
  selectedName
5476
5674
  ] })
5477
5675
  ] }) }),
5478
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5479
- import_react_native19.KeyboardAvoidingView,
5676
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5677
+ import_react_native20.KeyboardAvoidingView,
5480
5678
  {
5481
- style: styles13.keyboardView,
5482
- behavior: import_react_native19.Platform.OS === "ios" ? "padding" : void 0,
5483
- 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: [
5484
- /* @__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 }] }) }),
5485
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.header, children: [
5486
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5487
- /* @__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" }) })
5679
+ style: styles14.keyboardView,
5680
+ behavior: import_react_native20.Platform.OS === "ios" ? "padding" : void 0,
5681
+ 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: [
5682
+ /* @__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 }] }) }),
5683
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.header, children: [
5684
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.headerTitle, { color: t.text }], children: isPoolModeEnabled ? "Join Pool" : "Join Game" }),
5685
+ /* @__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" }) })
5488
5686
  ] }),
5489
- bettors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.bettorsSection, children: [
5490
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.bettorsLabel, { color: t.textMuted }], children: [
5687
+ bettors.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.bettorsSection, children: [
5688
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.bettorsLabel, { color: t.textMuted }], children: [
5491
5689
  bettors.length,
5492
5690
  " ",
5493
5691
  bettors.length === 1 ? "player" : "players",
5494
5692
  " in this game"
5495
5693
  ] }),
5496
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.bettorsRow, children: [
5694
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.bettorsRow, children: [
5497
5695
  bettors.slice(0, 6).map((b, i) => {
5498
5696
  const pngUrl = toPng(b.avatar);
5499
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.bettorCircle, { backgroundColor: ["#EF4444", "#3B82F6", "#22C55E", "#F59E0B", "#A855F7", "#EC4899"][i % 6] }], children: pngUrl ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Image, { source: { uri: pngUrl }, style: styles13.bettorImg }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.bettorInitial, children: (b.username ?? b.wallet).charAt(0).toUpperCase() }) }, b.wallet);
5697
+ 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);
5500
5698
  }),
5501
- bettors.length > 6 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.bettorCircle, { backgroundColor: "#2C2C2E" }], children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: styles13.bettorOverflow, children: [
5699
+ 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: [
5502
5700
  "+",
5503
5701
  bettors.length - 6
5504
5702
  ] }) })
5505
5703
  ] })
5506
5704
  ] }),
5507
- !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.section, children: [
5508
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5509
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.teamsRow, children: [
5510
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5705
+ !isCustomGame && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.section, children: [
5706
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5707
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.teamsRow, children: [
5708
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5511
5709
  TeamButton,
5512
5710
  {
5513
5711
  name: homeName,
@@ -5524,7 +5722,7 @@ function JoinGameSheet({
5524
5722
  t
5525
5723
  }
5526
5724
  ),
5527
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5725
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5528
5726
  TeamButton,
5529
5727
  {
5530
5728
  name: awayName,
@@ -5543,64 +5741,71 @@ function JoinGameSheet({
5543
5741
  )
5544
5742
  ] })
5545
5743
  ] }),
5546
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: [styles13.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5547
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5548
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
5549
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5550
- formatSol(buyIn),
5744
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5745
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5746
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Your wager" }),
5747
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: [
5748
+ formatSol(wager),
5551
5749
  " SOL"
5552
5750
  ] })
5553
5751
  ] }),
5554
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5555
- isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5556
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5557
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5558
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: bettors.length })
5752
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5753
+ isPoolModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5754
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5755
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Players in" }),
5756
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: bettors.length })
5559
5757
  ] }),
5560
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5561
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5562
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5563
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: [
5758
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5759
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5760
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
5761
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: [
5564
5762
  formatSol(totalPool),
5565
5763
  " SOL"
5566
5764
  ] })
5567
5765
  ] })
5568
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
5569
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5570
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Your side" }),
5571
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: selectedName })
5572
- ] }),
5573
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5574
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5575
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5576
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.text }], children: [
5766
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
5767
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5768
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Total pool" }),
5769
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.text }], children: [
5577
5770
  formatSol(poolAfterJoin),
5578
5771
  " SOL"
5579
5772
  ] })
5580
5773
  ] }),
5581
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.View, { style: [styles13.summarySep, { backgroundColor: t.border }] }),
5582
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.summaryRow, children: [
5583
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5584
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5774
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5775
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5776
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Potential winnings" }),
5777
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: potentialWinnings !== "\u2014" ? `${potentialWinnings} SOL` : "\u2014" })
5585
5778
  ] })
5586
5779
  ] })
5587
5780
  ] }),
5588
- 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." }) }),
5589
- 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 }) }),
5590
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
5591
- import_react_native19.TouchableOpacity,
5781
+ selectedTeam && !isPoolModeEnabled && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5782
+ SolSlider,
5783
+ {
5784
+ value: wager,
5785
+ min: game.buyIn,
5786
+ max: maxWager,
5787
+ step: 0.01,
5788
+ accentColor: selectedTeam === "home" ? homeColor : awayColor,
5789
+ onValueChange: setWager,
5790
+ onTick: onSliderTick
5791
+ }
5792
+ ),
5793
+ 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." }) }),
5794
+ 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 }) }),
5795
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5796
+ import_react_native20.TouchableOpacity,
5592
5797
  {
5593
5798
  style: [
5594
- styles13.ctaButton,
5799
+ styles14.ctaButton,
5595
5800
  { backgroundColor: canJoin ? t.accent : t.border }
5596
5801
  ],
5597
5802
  disabled: !canJoin,
5598
5803
  onPress: handleJoin,
5599
5804
  activeOpacity: 0.8,
5600
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.View, { style: styles13.ctaLoading, children: [
5601
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5602
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: styles13.ctaText, children: statusLabel })
5603
- ] }) : 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 ${formatSol(buyIn)} SOL` : selectedTeam ? `Join Game \u2014 ${formatSol(buyIn)} SOL` : "Pick a side to join" })
5805
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.ctaLoading, children: [
5806
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
5807
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: statusLabel })
5808
+ ] }) : 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" })
5604
5809
  }
5605
5810
  )
5606
5811
  ] }) })
@@ -5621,35 +5826,35 @@ function TeamButton({
5621
5826
  ImageComponent,
5622
5827
  t
5623
5828
  }) {
5624
- const [imgFailed, setImgFailed] = (0, import_react33.useState)(false);
5829
+ const [imgFailed, setImgFailed] = (0, import_react34.useState)(false);
5625
5830
  const Img = ImageComponent || require("react-native").Image;
5626
5831
  const showImage = imageUrl && !imgFailed;
5627
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
5628
- import_react_native19.TouchableOpacity,
5832
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5833
+ import_react_native20.TouchableOpacity,
5629
5834
  {
5630
- style: [styles13.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5835
+ style: [styles14.teamOption, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "15" : t.background }],
5631
5836
  onPress,
5632
5837
  activeOpacity: 0.7,
5633
5838
  children: [
5634
- 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] }),
5635
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native19.Text, { style: [styles13.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5636
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamOdds, { color }], children: [
5839
+ 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] }),
5840
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.teamName, { color: t.text }], numberOfLines: 1, children: name }),
5841
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.teamOdds, { color }], children: [
5637
5842
  odds,
5638
5843
  "x"
5639
5844
  ] }),
5640
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native19.Text, { style: [styles13.teamBets, { color: t.textMuted }], children: [
5845
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.teamBets, { color: t.textMuted }], children: [
5641
5846
  bets,
5642
5847
  " ",
5643
5848
  bets === 1 ? "bet" : "bets"
5644
5849
  ] }),
5645
- 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" }) })
5850
+ 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" }) })
5646
5851
  ]
5647
5852
  }
5648
5853
  );
5649
5854
  }
5650
- var styles13 = import_react_native19.StyleSheet.create({
5855
+ var styles14 = import_react_native20.StyleSheet.create({
5651
5856
  overlay: {
5652
- ...import_react_native19.StyleSheet.absoluteFillObject,
5857
+ ...import_react_native20.StyleSheet.absoluteFillObject,
5653
5858
  backgroundColor: "rgba(0,0,0,0.5)"
5654
5859
  },
5655
5860
  overlayTap: {
@@ -5732,7 +5937,7 @@ var styles13 = import_react_native19.StyleSheet.create({
5732
5937
  },
5733
5938
  // Success overlay
5734
5939
  successOverlay: {
5735
- ...import_react_native19.StyleSheet.absoluteFillObject,
5940
+ ...import_react_native20.StyleSheet.absoluteFillObject,
5736
5941
  zIndex: 100,
5737
5942
  alignItems: "center",
5738
5943
  justifyContent: "center",
@@ -5859,9 +6064,9 @@ var styles13 = import_react_native19.StyleSheet.create({
5859
6064
  });
5860
6065
 
5861
6066
  // src/ui/game/ClaimPrizeSheet.tsx
5862
- var import_react34 = require("react");
5863
- var import_react_native20 = require("react-native");
5864
- var import_jsx_runtime17 = require("react/jsx-runtime");
6067
+ var import_react35 = require("react");
6068
+ var import_react_native21 = require("react-native");
6069
+ var import_jsx_runtime18 = require("react/jsx-runtime");
5865
6070
  var STATUS_LABELS4 = {
5866
6071
  building: "Building transaction...",
5867
6072
  signing: "Approve in wallet...",
@@ -5880,18 +6085,18 @@ function ClaimPrizeSheet({
5880
6085
  const t = useDubsTheme();
5881
6086
  const { wallet } = useDubs();
5882
6087
  const mutation = useClaim();
5883
- const overlayOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5884
- const celebrationScale = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5885
- const celebrationOpacity = (0, import_react34.useRef)(new import_react_native20.Animated.Value(0)).current;
5886
- const [showCelebration, setShowCelebration] = (0, import_react34.useState)(false);
5887
- (0, import_react34.useEffect)(() => {
5888
- import_react_native20.Animated.timing(overlayOpacity, {
6088
+ const overlayOpacity = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6089
+ const celebrationScale = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6090
+ const celebrationOpacity = (0, import_react35.useRef)(new import_react_native21.Animated.Value(0)).current;
6091
+ const [showCelebration, setShowCelebration] = (0, import_react35.useState)(false);
6092
+ (0, import_react35.useEffect)(() => {
6093
+ import_react_native21.Animated.timing(overlayOpacity, {
5889
6094
  toValue: visible ? 1 : 0,
5890
6095
  duration: 250,
5891
6096
  useNativeDriver: true
5892
6097
  }).start();
5893
6098
  }, [visible, overlayOpacity]);
5894
- (0, import_react34.useEffect)(() => {
6099
+ (0, import_react35.useEffect)(() => {
5895
6100
  if (visible) {
5896
6101
  mutation.reset();
5897
6102
  setShowCelebration(false);
@@ -5899,17 +6104,17 @@ function ClaimPrizeSheet({
5899
6104
  celebrationOpacity.setValue(0);
5900
6105
  }
5901
6106
  }, [visible]);
5902
- (0, import_react34.useEffect)(() => {
6107
+ (0, import_react35.useEffect)(() => {
5903
6108
  if (mutation.status === "success" && mutation.data) {
5904
6109
  setShowCelebration(true);
5905
- import_react_native20.Animated.parallel([
5906
- import_react_native20.Animated.spring(celebrationScale, {
6110
+ import_react_native21.Animated.parallel([
6111
+ import_react_native21.Animated.spring(celebrationScale, {
5907
6112
  toValue: 1,
5908
6113
  tension: 50,
5909
6114
  friction: 6,
5910
6115
  useNativeDriver: true
5911
6116
  }),
5912
- import_react_native20.Animated.timing(celebrationOpacity, {
6117
+ import_react_native21.Animated.timing(celebrationOpacity, {
5913
6118
  toValue: 1,
5914
6119
  duration: 300,
5915
6120
  useNativeDriver: true
@@ -5922,14 +6127,14 @@ function ClaimPrizeSheet({
5922
6127
  return () => clearTimeout(timer);
5923
6128
  }
5924
6129
  }, [mutation.status, mutation.data]);
5925
- (0, import_react34.useEffect)(() => {
6130
+ (0, import_react35.useEffect)(() => {
5926
6131
  if (mutation.status === "error" && mutation.error) {
5927
6132
  onError?.(mutation.error);
5928
6133
  }
5929
6134
  }, [mutation.status, mutation.error]);
5930
6135
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
5931
6136
  const canClaim = !isMutating && mutation.status !== "success" && !!wallet.publicKey;
5932
- const handleClaim = (0, import_react34.useCallback)(async () => {
6137
+ const handleClaim = (0, import_react35.useCallback)(async () => {
5933
6138
  if (!wallet.publicKey) return;
5934
6139
  try {
5935
6140
  await mutation.execute({
@@ -5941,62 +6146,62 @@ function ClaimPrizeSheet({
5941
6146
  }
5942
6147
  }, [wallet.publicKey, mutation.execute, gameId, prizeAmount]);
5943
6148
  const statusLabel = STATUS_LABELS4[mutation.status] || "";
5944
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5945
- import_react_native20.Modal,
6149
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6150
+ import_react_native21.Modal,
5946
6151
  {
5947
6152
  visible,
5948
6153
  animationType: "slide",
5949
6154
  transparent: true,
5950
6155
  onRequestClose: onDismiss,
5951
6156
  children: [
5952
- /* @__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 }) }),
5953
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
5954
- import_react_native20.KeyboardAvoidingView,
6157
+ /* @__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 }) }),
6158
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6159
+ import_react_native21.KeyboardAvoidingView,
5955
6160
  {
5956
- style: styles14.keyboardView,
5957
- behavior: import_react_native20.Platform.OS === "ios" ? "padding" : void 0,
5958
- 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: [
5959
- /* @__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 }] }) }),
5960
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.header, children: [
5961
- /* @__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" }),
5962
- /* @__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" }) })
6161
+ style: styles15.keyboardView,
6162
+ behavior: import_react_native21.Platform.OS === "ios" ? "padding" : void 0,
6163
+ 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: [
6164
+ /* @__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 }] }) }),
6165
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.header, children: [
6166
+ /* @__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" }),
6167
+ /* @__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" }) })
5963
6168
  ] }),
5964
- showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5965
- import_react_native20.Animated.View,
6169
+ showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6170
+ import_react_native21.Animated.View,
5966
6171
  {
5967
6172
  style: [
5968
- styles14.celebrationContainer,
6173
+ styles15.celebrationContainer,
5969
6174
  {
5970
6175
  opacity: celebrationOpacity,
5971
6176
  transform: [{ scale: celebrationScale }]
5972
6177
  }
5973
6178
  ],
5974
6179
  children: [
5975
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.celebrationEmoji, children: "\u{1F3C6}" }),
5976
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.celebrationText, { color: t.success }], children: [
6180
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: styles15.celebrationEmoji, children: "\u{1F3C6}" }),
6181
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.celebrationText, { color: t.success }], children: [
5977
6182
  "+",
5978
6183
  prizeAmount,
5979
6184
  " SOL"
5980
6185
  ] }),
5981
- /* @__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" })
6186
+ /* @__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" })
5982
6187
  ]
5983
6188
  }
5984
6189
  ),
5985
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: [styles14.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
5986
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5987
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
5988
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.summaryValue, { color: t.success }], children: [
6190
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: [styles15.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6191
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
6192
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: isRefund ? "Refund" : "Prize" }),
6193
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.summaryValue, { color: t.success }], children: [
5989
6194
  prizeAmount,
5990
6195
  " SOL"
5991
6196
  ] })
5992
6197
  ] }),
5993
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.View, { style: [styles14.summarySep, { backgroundColor: t.border }] }),
5994
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.summaryRow, children: [
5995
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.summaryLabel, { color: t.textMuted }], children: "Game" }),
5996
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
5997
- import_react_native20.Text,
6198
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.View, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
6199
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.summaryRow, children: [
6200
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Game" }),
6201
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
6202
+ import_react_native21.Text,
5998
6203
  {
5999
- style: [styles14.summaryValue, { color: t.text }],
6204
+ style: [styles15.summaryValue, { color: t.text }],
6000
6205
  numberOfLines: 1,
6001
6206
  children: [
6002
6207
  gameId.slice(0, 8),
@@ -6007,21 +6212,21 @@ function ClaimPrizeSheet({
6007
6212
  )
6008
6213
  ] })
6009
6214
  ] }),
6010
- 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 }) }),
6011
- !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6012
- import_react_native20.TouchableOpacity,
6215
+ 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 }) }),
6216
+ !showCelebration && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6217
+ import_react_native21.TouchableOpacity,
6013
6218
  {
6014
6219
  style: [
6015
- styles14.ctaButton,
6220
+ styles15.ctaButton,
6016
6221
  { backgroundColor: canClaim ? t.accent : t.border }
6017
6222
  ],
6018
6223
  disabled: !canClaim,
6019
6224
  onPress: handleClaim,
6020
6225
  activeOpacity: 0.8,
6021
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.View, { style: styles14.ctaLoading, children: [
6022
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6023
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: styles14.ctaText, children: statusLabel })
6024
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native20.Text, { style: [styles14.ctaText, !canClaim && { opacity: 0.5 }], children: [
6226
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.View, { style: styles15.ctaLoading, children: [
6227
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6228
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: styles15.ctaText, children: statusLabel })
6229
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.ctaText, !canClaim && { opacity: 0.5 }], children: [
6025
6230
  isRefund ? "Claim Refund" : "Claim Prize",
6026
6231
  " \u2014 ",
6027
6232
  prizeAmount,
@@ -6029,7 +6234,7 @@ function ClaimPrizeSheet({
6029
6234
  ] })
6030
6235
  }
6031
6236
  ),
6032
- mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native20.Text, { style: [styles14.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
6237
+ mutation.data?.explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native21.Text, { style: [styles15.explorerHint, { color: t.textMuted }], children: "View on Solscan" })
6033
6238
  ] }) })
6034
6239
  }
6035
6240
  )
@@ -6037,9 +6242,9 @@ function ClaimPrizeSheet({
6037
6242
  }
6038
6243
  );
6039
6244
  }
6040
- var styles14 = import_react_native20.StyleSheet.create({
6245
+ var styles15 = import_react_native21.StyleSheet.create({
6041
6246
  overlay: {
6042
- ...import_react_native20.StyleSheet.absoluteFillObject,
6247
+ ...import_react_native21.StyleSheet.absoluteFillObject,
6043
6248
  backgroundColor: "rgba(0,0,0,0.5)"
6044
6249
  },
6045
6250
  overlayTap: {
@@ -6162,17 +6367,17 @@ var styles14 = import_react_native20.StyleSheet.create({
6162
6367
  });
6163
6368
 
6164
6369
  // src/ui/game/ClaimButton.tsx
6165
- var import_react35 = require("react");
6166
- var import_react_native21 = require("react-native");
6167
- var import_jsx_runtime18 = require("react/jsx-runtime");
6370
+ var import_react36 = require("react");
6371
+ var import_react_native22 = require("react-native");
6372
+ var import_jsx_runtime19 = require("react/jsx-runtime");
6168
6373
  function ClaimButton({ gameId, style, onSuccess, onError }) {
6169
6374
  const t = useDubsTheme();
6170
6375
  const { wallet } = useDubs();
6171
6376
  const game = useGame(gameId);
6172
6377
  const claimStatus = useHasClaimed(gameId);
6173
- const [sheetVisible, setSheetVisible] = (0, import_react35.useState)(false);
6378
+ const [sheetVisible, setSheetVisible] = (0, import_react36.useState)(false);
6174
6379
  const walletAddress = wallet.publicKey?.toBase58() ?? null;
6175
- const myBet = (0, import_react35.useMemo)(() => {
6380
+ const myBet = (0, import_react36.useMemo)(() => {
6176
6381
  if (!walletAddress || !game.data?.bettors) return null;
6177
6382
  return game.data.bettors.find((b) => b.wallet === walletAddress) ?? null;
6178
6383
  }, [walletAddress, game.data?.bettors]);
@@ -6181,7 +6386,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6181
6386
  const isWinner = isResolved && myBet != null && myBet.team === game.data?.winnerSide;
6182
6387
  const isEligible = myBet != null && isResolved && (isWinner || isRefund);
6183
6388
  const prizeAmount = isRefund ? myBet?.amount ?? 0 : game.data?.totalPool ?? 0;
6184
- const handleSuccess = (0, import_react35.useCallback)(
6389
+ const handleSuccess = (0, import_react36.useCallback)(
6185
6390
  (result) => {
6186
6391
  claimStatus.refetch();
6187
6392
  onSuccess?.(result);
@@ -6194,13 +6399,13 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6194
6399
  }
6195
6400
  const label = isRefund ? "Refund" : "Prize";
6196
6401
  if (claimStatus.hasClaimed) {
6197
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6198
- import_react_native21.TouchableOpacity,
6402
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6403
+ import_react_native22.TouchableOpacity,
6199
6404
  {
6200
- style: [styles15.badge, { borderColor: t.accent }, style],
6405
+ style: [styles16.badge, { borderColor: t.accent }, style],
6201
6406
  activeOpacity: 1,
6202
6407
  disabled: true,
6203
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: [styles15.badgeText, { color: t.accent }], children: [
6408
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.badgeText, { color: t.accent }], children: [
6204
6409
  label,
6205
6410
  " Claimed!"
6206
6411
  ] })
@@ -6210,14 +6415,14 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6210
6415
  if (!isEligible) {
6211
6416
  return null;
6212
6417
  }
6213
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
6214
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6215
- import_react_native21.TouchableOpacity,
6418
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6419
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6420
+ import_react_native22.TouchableOpacity,
6216
6421
  {
6217
- style: [styles15.button, { backgroundColor: t.accent }, style],
6422
+ style: [styles16.button, { backgroundColor: t.accent }, style],
6218
6423
  activeOpacity: 0.8,
6219
6424
  onPress: () => setSheetVisible(true),
6220
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native21.Text, { style: styles15.buttonText, children: [
6425
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: styles16.buttonText, children: [
6221
6426
  "Claim ",
6222
6427
  label,
6223
6428
  " \u2014 ",
@@ -6226,7 +6431,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6226
6431
  ] })
6227
6432
  }
6228
6433
  ),
6229
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
6434
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6230
6435
  ClaimPrizeSheet,
6231
6436
  {
6232
6437
  visible: sheetVisible,
@@ -6240,7 +6445,7 @@ function ClaimButton({ gameId, style, onSuccess, onError }) {
6240
6445
  )
6241
6446
  ] });
6242
6447
  }
6243
- var styles15 = import_react_native21.StyleSheet.create({
6448
+ var styles16 = import_react_native22.StyleSheet.create({
6244
6449
  button: {
6245
6450
  height: 52,
6246
6451
  borderRadius: 14,
@@ -6268,9 +6473,9 @@ var styles15 = import_react_native21.StyleSheet.create({
6268
6473
  });
6269
6474
 
6270
6475
  // src/ui/game/EnterArcadePoolSheet.tsx
6271
- var import_react36 = require("react");
6272
- var import_react_native22 = require("react-native");
6273
- var import_jsx_runtime19 = require("react/jsx-runtime");
6476
+ var import_react37 = require("react");
6477
+ var import_react_native23 = require("react-native");
6478
+ var import_jsx_runtime20 = require("react/jsx-runtime");
6274
6479
  var STATUS_LABELS5 = {
6275
6480
  building: "Building transaction...",
6276
6481
  signing: "Approve in wallet...",
@@ -6289,20 +6494,20 @@ function EnterArcadePoolSheet({
6289
6494
  const t = useDubsTheme();
6290
6495
  const { wallet } = useDubs();
6291
6496
  const mutation = useEnterArcadePool();
6292
- const overlayOpacity = (0, import_react36.useRef)(new import_react_native22.Animated.Value(0)).current;
6293
- (0, import_react36.useEffect)(() => {
6294
- import_react_native22.Animated.timing(overlayOpacity, {
6497
+ const overlayOpacity = (0, import_react37.useRef)(new import_react_native23.Animated.Value(0)).current;
6498
+ (0, import_react37.useEffect)(() => {
6499
+ import_react_native23.Animated.timing(overlayOpacity, {
6295
6500
  toValue: visible ? 1 : 0,
6296
6501
  duration: 250,
6297
6502
  useNativeDriver: true
6298
6503
  }).start();
6299
6504
  }, [visible, overlayOpacity]);
6300
- (0, import_react36.useEffect)(() => {
6505
+ (0, import_react37.useEffect)(() => {
6301
6506
  if (visible) {
6302
6507
  mutation.reset();
6303
6508
  }
6304
6509
  }, [visible]);
6305
- (0, import_react36.useEffect)(() => {
6510
+ (0, import_react37.useEffect)(() => {
6306
6511
  if (mutation.status === "success" && mutation.data) {
6307
6512
  onSuccess?.(mutation.data);
6308
6513
  const timer = setTimeout(() => {
@@ -6311,7 +6516,7 @@ function EnterArcadePoolSheet({
6311
6516
  return () => clearTimeout(timer);
6312
6517
  }
6313
6518
  }, [mutation.status, mutation.data]);
6314
- (0, import_react36.useEffect)(() => {
6519
+ (0, import_react37.useEffect)(() => {
6315
6520
  if (mutation.status === "error" && mutation.error) {
6316
6521
  onError?.(mutation.error);
6317
6522
  }
@@ -6323,7 +6528,7 @@ function EnterArcadePoolSheet({
6323
6528
  const potSol = (pool.buy_in_lamports * Number(totalBuyIns) / 1e9).toFixed(4);
6324
6529
  const isMutating = mutation.status !== "idle" && mutation.status !== "success" && mutation.status !== "error";
6325
6530
  const canJoin = !isMutating && mutation.status !== "success";
6326
- const handleJoin = (0, import_react36.useCallback)(async () => {
6531
+ const handleJoin = (0, import_react37.useCallback)(async () => {
6327
6532
  if (!wallet.publicKey) return;
6328
6533
  try {
6329
6534
  await mutation.execute(pool.id);
@@ -6335,76 +6540,76 @@ function EnterArcadePoolSheet({
6335
6540
  const headerTitle = isRejoin ? "Play Again" : "Join Pool";
6336
6541
  const ctaLabel = isRejoin ? `Play Again \u2014 ${buyInSol} SOL` : `Join Pool \u2014 ${buyInSol} SOL`;
6337
6542
  const successLabel = isRejoin ? "Lives refilled!" : "Joined!";
6338
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
6339
- import_react_native22.Modal,
6543
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6544
+ import_react_native23.Modal,
6340
6545
  {
6341
6546
  visible,
6342
6547
  animationType: "slide",
6343
6548
  transparent: true,
6344
6549
  onRequestClose: onDismiss,
6345
6550
  children: [
6346
- /* @__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 }) }),
6347
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6348
- import_react_native22.KeyboardAvoidingView,
6551
+ /* @__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 }) }),
6552
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6553
+ import_react_native23.KeyboardAvoidingView,
6349
6554
  {
6350
- style: styles16.keyboardView,
6351
- behavior: import_react_native22.Platform.OS === "ios" ? "padding" : void 0,
6352
- 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: [
6353
- /* @__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 }] }) }),
6354
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.header, children: [
6355
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.headerTitle, { color: t.text }], children: headerTitle }),
6356
- /* @__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" }) })
6555
+ style: styles17.keyboardView,
6556
+ behavior: import_react_native23.Platform.OS === "ios" ? "padding" : void 0,
6557
+ 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: [
6558
+ /* @__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 }] }) }),
6559
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.header, children: [
6560
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.headerTitle, { color: t.text }], children: headerTitle }),
6561
+ /* @__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" }) })
6357
6562
  ] }),
6358
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.poolName, { color: t.textSecondary }], children: pool.name }),
6359
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: [styles16.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6360
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6361
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
6362
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: [
6563
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.poolName, { color: t.textSecondary }], children: pool.name }),
6564
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
6565
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6566
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
6567
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: [
6363
6568
  buyInSol,
6364
6569
  " SOL"
6365
6570
  ] })
6366
6571
  ] }),
6367
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6368
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6369
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Players in" }),
6370
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: totalPlayers })
6572
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6573
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6574
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Players in" }),
6575
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: totalPlayers })
6371
6576
  ] }),
6372
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6373
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6374
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
6375
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.success }], children: [
6577
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6578
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6579
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
6580
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.success }], children: [
6376
6581
  potSol,
6377
6582
  " SOL"
6378
6583
  ] })
6379
6584
  ] }),
6380
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6381
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6382
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Lives" }),
6383
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: pool.max_lives })
6585
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6586
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6587
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Lives" }),
6588
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: pool.max_lives })
6384
6589
  ] }),
6385
- topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
6386
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.View, { style: [styles16.summarySep, { backgroundColor: t.border }] }),
6387
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.summaryRow, children: [
6388
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryLabel, { color: t.textMuted }], children: "Top score" }),
6389
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: [styles16.summaryValue, { color: t.text }], children: topScore })
6590
+ topScore > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
6591
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.summarySep, { backgroundColor: t.border }] }),
6592
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.summaryRow, children: [
6593
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryLabel, { color: t.textMuted }], children: "Top score" }),
6594
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.summaryValue, { color: t.text }], children: topScore })
6390
6595
  ] })
6391
6596
  ] })
6392
6597
  ] }),
6393
- 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 }) }),
6394
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
6395
- import_react_native22.TouchableOpacity,
6598
+ 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 }) }),
6599
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6600
+ import_react_native23.TouchableOpacity,
6396
6601
  {
6397
6602
  style: [
6398
- styles16.ctaButton,
6603
+ styles17.ctaButton,
6399
6604
  { backgroundColor: canJoin ? t.accent : t.border }
6400
6605
  ],
6401
6606
  disabled: !canJoin,
6402
6607
  onPress: handleJoin,
6403
6608
  activeOpacity: 0.8,
6404
- children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native22.View, { style: styles16.ctaLoading, children: [
6405
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6406
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native22.Text, { style: styles16.ctaText, children: statusLabel })
6407
- ] }) : 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 })
6609
+ children: isMutating ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.ctaLoading, children: [
6610
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
6611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.ctaText, children: statusLabel })
6612
+ ] }) : 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 })
6408
6613
  }
6409
6614
  )
6410
6615
  ] }) })
@@ -6414,9 +6619,9 @@ function EnterArcadePoolSheet({
6414
6619
  }
6415
6620
  );
6416
6621
  }
6417
- var styles16 = import_react_native22.StyleSheet.create({
6622
+ var styles17 = import_react_native23.StyleSheet.create({
6418
6623
  overlay: {
6419
- ...import_react_native22.StyleSheet.absoluteFillObject,
6624
+ ...import_react_native23.StyleSheet.absoluteFillObject,
6420
6625
  backgroundColor: "rgba(0,0,0,0.5)"
6421
6626
  },
6422
6627
  overlayTap: { flex: 1 },
@@ -6474,14 +6679,14 @@ var styles16 = import_react_native22.StyleSheet.create({
6474
6679
  });
6475
6680
 
6476
6681
  // src/ui/game/ArcadeLeaderboardSheet.tsx
6477
- var import_react37 = require("react");
6478
- var import_react_native23 = require("react-native");
6479
- var import_jsx_runtime20 = require("react/jsx-runtime");
6682
+ var import_react38 = require("react");
6683
+ var import_react_native24 = require("react-native");
6684
+ var import_jsx_runtime21 = require("react/jsx-runtime");
6480
6685
  function RankLabel({ index }) {
6481
- if (index === 0) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F947}" });
6482
- if (index === 1) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F948}" });
6483
- if (index === 2) return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankEmoji, children: "\u{1F949}" });
6484
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: styles17.rankNum, children: index + 1 });
6686
+ if (index === 0) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F947}" });
6687
+ if (index === 1) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F948}" });
6688
+ if (index === 2) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankEmoji, children: "\u{1F949}" });
6689
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: styles18.rankNum, children: index + 1 });
6485
6690
  }
6486
6691
  function ArcadeLeaderboardSheet({
6487
6692
  visible,
@@ -6491,92 +6696,92 @@ function ArcadeLeaderboardSheet({
6491
6696
  }) {
6492
6697
  const t = useDubsTheme();
6493
6698
  const { pool, leaderboard, stats, loading, refetch } = useArcadePool(poolId);
6494
- const overlayOpacity = (0, import_react37.useRef)(new import_react_native23.Animated.Value(0)).current;
6495
- (0, import_react37.useEffect)(() => {
6496
- import_react_native23.Animated.timing(overlayOpacity, {
6699
+ const overlayOpacity = (0, import_react38.useRef)(new import_react_native24.Animated.Value(0)).current;
6700
+ (0, import_react38.useEffect)(() => {
6701
+ import_react_native24.Animated.timing(overlayOpacity, {
6497
6702
  toValue: visible ? 1 : 0,
6498
6703
  duration: 250,
6499
6704
  useNativeDriver: true
6500
6705
  }).start();
6501
6706
  }, [visible, overlayOpacity]);
6502
- (0, import_react37.useEffect)(() => {
6707
+ (0, import_react38.useEffect)(() => {
6503
6708
  if (visible) refetch();
6504
6709
  }, [visible]);
6505
6710
  const renderItem = ({ item, index }) => {
6506
6711
  const isMe = highlightWallet && item.wallet_address === highlightWallet;
6507
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6508
- import_react_native23.View,
6712
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6713
+ import_react_native24.View,
6509
6714
  {
6510
6715
  style: [
6511
- styles17.row,
6716
+ styles18.row,
6512
6717
  { backgroundColor: isMe ? `${t.accent}18` : index % 2 === 0 ? t.surface : "transparent" },
6513
6718
  isMe ? { borderWidth: 1, borderColor: t.accent } : void 0
6514
6719
  ],
6515
6720
  children: [
6516
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: styles17.rankCol, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(RankLabel, { index }) }),
6517
- 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 }] }),
6518
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.nameCol, children: [
6519
- /* @__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)}` }),
6520
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.Text, { style: [styles17.lives, { color: t.textMuted }], children: [
6721
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: styles18.rankCol, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RankLabel, { index }) }),
6722
+ 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 }] }),
6723
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.nameCol, children: [
6724
+ /* @__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)}` }),
6725
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.Text, { style: [styles18.lives, { color: t.textMuted }], children: [
6521
6726
  item.lives_used,
6522
6727
  " ",
6523
6728
  item.lives_used === 1 ? "life" : "lives",
6524
6729
  " used"
6525
6730
  ] })
6526
6731
  ] }),
6527
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.score, { color: t.accent }], children: item.best_score })
6732
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.score, { color: t.accent }], children: item.best_score })
6528
6733
  ]
6529
6734
  }
6530
6735
  );
6531
6736
  };
6532
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
6533
- import_react_native23.Modal,
6737
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
6738
+ import_react_native24.Modal,
6534
6739
  {
6535
6740
  visible,
6536
6741
  animationType: "slide",
6537
6742
  transparent: true,
6538
6743
  onRequestClose: onDismiss,
6539
6744
  children: [
6540
- /* @__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 }) }),
6541
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6542
- import_react_native23.KeyboardAvoidingView,
6745
+ /* @__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 }) }),
6746
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6747
+ import_react_native24.KeyboardAvoidingView,
6543
6748
  {
6544
- style: styles17.keyboardView,
6545
- behavior: import_react_native23.Platform.OS === "ios" ? "padding" : void 0,
6546
- 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: [
6547
- /* @__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 }] }) }),
6548
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.header, children: [
6549
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { children: [
6550
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.headerTitle, { color: t.text }], children: "Leaderboard" }),
6551
- pool && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.poolName, { color: t.textMuted }], children: pool.name })
6749
+ style: styles18.keyboardView,
6750
+ behavior: import_react_native24.Platform.OS === "ios" ? "padding" : void 0,
6751
+ 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: [
6752
+ /* @__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 }] }) }),
6753
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.header, children: [
6754
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { children: [
6755
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.headerTitle, { color: t.text }], children: "Leaderboard" }),
6756
+ pool && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.poolName, { color: t.textMuted }], children: pool.name })
6552
6757
  ] }),
6553
- /* @__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" }) })
6758
+ /* @__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" }) })
6554
6759
  ] }),
6555
- stats && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: [styles17.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6556
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6557
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.text }], children: stats.total_entries }),
6558
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Players" })
6760
+ stats && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: [styles18.statsBar, { backgroundColor: t.surface, borderColor: t.border }], children: [
6761
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6762
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.text }], children: stats.total_entries }),
6763
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Players" })
6559
6764
  ] }),
6560
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6561
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6562
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.accent }], children: stats.top_score }),
6563
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Top Score" })
6765
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.statDivider, { backgroundColor: t.border }] }),
6766
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6767
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.accent }], children: stats.top_score }),
6768
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Top Score" })
6564
6769
  ] }),
6565
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.View, { style: [styles17.statDivider, { backgroundColor: t.border }] }),
6566
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native23.View, { style: styles17.statItem, children: [
6567
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
6568
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native23.Text, { style: [styles17.statLabel, { color: t.textMuted }], children: "Avg Score" })
6770
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.View, { style: [styles18.statDivider, { backgroundColor: t.border }] }),
6771
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native24.View, { style: styles18.statItem, children: [
6772
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statValue, { color: t.text }], children: Math.round(stats.avg_score) }),
6773
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native24.Text, { style: [styles18.statLabel, { color: t.textMuted }], children: "Avg Score" })
6569
6774
  ] })
6570
6775
  ] }),
6571
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
6572
- import_react_native23.FlatList,
6776
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
6777
+ import_react_native24.FlatList,
6573
6778
  {
6574
6779
  data: leaderboard,
6575
6780
  renderItem,
6576
6781
  keyExtractor: (item) => String(item.id),
6577
- style: styles17.list,
6578
- contentContainerStyle: styles17.listContent,
6579
- 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" }) })
6782
+ style: styles18.list,
6783
+ contentContainerStyle: styles18.listContent,
6784
+ 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" }) })
6580
6785
  }
6581
6786
  )
6582
6787
  ] }) })
@@ -6586,9 +6791,9 @@ function ArcadeLeaderboardSheet({
6586
6791
  }
6587
6792
  );
6588
6793
  }
6589
- var styles17 = import_react_native23.StyleSheet.create({
6794
+ var styles18 = import_react_native24.StyleSheet.create({
6590
6795
  overlay: {
6591
- ...import_react_native23.StyleSheet.absoluteFillObject,
6796
+ ...import_react_native24.StyleSheet.absoluteFillObject,
6592
6797
  backgroundColor: "rgba(0,0,0,0.5)"
6593
6798
  },
6594
6799
  overlayTap: { flex: 1 },
@@ -6671,6 +6876,7 @@ var styles17 = import_react_native23.StyleSheet.create({
6671
6876
  SOLANA_PROGRAM_ERRORS,
6672
6877
  STORAGE_KEYS,
6673
6878
  SettingsSheet,
6879
+ SolSlider,
6674
6880
  UserProfileCard,
6675
6881
  UserProfileSheet,
6676
6882
  createSecureStoreStorage,