diff --git a/.env.example b/.env.example index 2b7258e3e..0eeeada3e 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ # Web3 connection -VITE_RPC_ENDPOINT="https://api.mainnet-beta.solana.com" -# VITE_RPC_ENDPOINT="http://127.0.0.1:8899" +VITE_RPC_ENDPOINT="https://mainnet.helius-rpc.com/?api-key=7b05747c-b100-4159-ba5f-c85e8c8d3997" +# VITE_RPC_ENDPOINT="https://mainnet.helius-rpc.com/?api-key=7b05747c-b100-4159-ba5f-c85e8c8d3997" diff --git a/api/chat.ts b/api/chat.ts new file mode 100644 index 000000000..021d430c6 --- /dev/null +++ b/api/chat.ts @@ -0,0 +1,32 @@ +// api/chat.ts +export const config = { runtime: 'edge' } // ← Edge everywhere, no region pin + +import { kv } from '@vercel/kv' + +type Msg = { user: string; text: string; ts: number } +const KEY = 'trollbox' + +export default async function handler(req: Request): Promise { + try { + if (req.method === 'GET') { + const list = (await kv.lrange(KEY, 0, 19)) ?? [] + return new Response(JSON.stringify(list.reverse()), { + headers: { 'Content-Type': 'application/json' }, + }) + } + if (req.method === 'POST') { + const { user = 'anon', text } = (await req.json()) as Partial + const clean = String(text ?? '').trim() + if (!clean) return new Response('Empty', { status: 400 }) + + const msg: Msg = { user, text: clean, ts: Date.now() } + await kv.lpush(KEY, msg) + await kv.ltrim(KEY, 0, 19) + return new Response(JSON.stringify({ ok: true }), { headers: { 'Content-Type': 'application/json' } }) + } + return new Response('Method Not Allowed', { status: 405 }) + } catch (err: any) { + console.error('[chat API error]', err); + return new Response('Internal Error', { status: 500 }) + } +} diff --git a/index.html b/index.html index 52c52d186..05e69e941 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Play | Gamba + Banabets - Solana On-chain Web3 casino🔥 @@ -21,3 +21,5 @@ +
+ diff --git a/package.json b/package.json index 1284e928e..8935b4fed 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.27.0", - "@preact/signals-react": "^2.0.0", "@ledgerhq/errors": "6.16.3", + "@preact/signals-react": "^2.0.0", "@react-three/drei": "^9.89.0", "@react-three/fiber": "^8.15.11", "@solana/spl-token": "^0.3.8", @@ -19,10 +19,12 @@ "@solana/wallet-adapter-react-ui": "^0.9.34", "@solana/wallet-adapter-wallets": "^0.19.18", "@solana/web3.js": "^1.78.5", + "@vercel/kv": "^3.0.0", + "@vercel/node": "^5.1.15", "buffer": "^6.0.3", + "gamba-core-v2": "0.4.0", "gamba-react-ui-v2": "0.7.0", "gamba-react-v2": "1.2.0", - "gamba-core-v2": "0.4.0", "html2canvas": "^1.4.1", "matter-js": "^0.19.0", "react": "^18.2.0", @@ -34,9 +36,9 @@ "zustand": "^4.4.1" }, "devDependencies": { + "@types/matter-js": "^0.19.5", "@types/react": "^18.2.22", "@types/react-dom": "^18.0.11", - "@types/matter-js": "^0.19.5", "@types/three": "^0.161.2", "@vitejs/plugin-react": "^3.1.0", "unplugin-fonts": "^1.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d800f8ba4..589ce727c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,10 +34,16 @@ importers: version: 0.9.34(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bs58@5.0.0)(react-dom@18.2.0(react@18.2.0))(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))(react@18.2.0) '@solana/wallet-adapter-wallets': specifier: ^0.19.18 - version: 0.19.18(@babel/runtime@7.23.9)(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(utf-8-validate@5.0.10) + version: 0.19.18(@babel/runtime@7.23.9)(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(utf-8-validate@5.0.10) '@solana/web3.js': specifier: ^1.78.5 version: 1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@vercel/kv': + specifier: ^3.0.0 + version: 3.0.0 + '@vercel/node': + specifier: ^5.1.15 + version: 5.1.15(rollup@3.29.4) buffer: specifier: ^6.0.3 version: 6.0.3 @@ -92,16 +98,16 @@ importers: version: 0.161.2 '@vitejs/plugin-react': specifier: ^3.1.0 - version: 3.1.0(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0)) + version: 3.1.0(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0)) unplugin-fonts: specifier: ^1.0.3 - version: 1.0.3(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0)) + version: 1.0.3(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0)) vite: specifier: ^4.2.1 - version: 4.2.1(@types/node@20.11.17)(terser@5.27.0) + version: 4.2.1(@types/node@16.18.11)(terser@5.27.0) vite-plugin-pwa: specifier: ^0.17.4 - version: 0.17.4(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0))(workbox-build@7.0.0)(workbox-window@7.0.0) + version: 0.17.4(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0))(workbox-build@7.0.0)(workbox-window@7.0.0) packages: @@ -876,6 +882,30 @@ packages: peerDependencies: '@solana/web3.js': ^1.68.0 + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@edge-runtime/format@2.2.1': + resolution: {integrity: sha512-JQTRVuiusQLNNLe2W9tnzBlV/GvSVcozLl4XZHk5swnRZ/v6jp8TqR8P7sqmJsQqblDZ3EztcWmLDbhRje/+8g==} + engines: {node: '>=16'} + + '@edge-runtime/node-utils@2.3.0': + resolution: {integrity: sha512-uUtx8BFoO1hNxtHjp3eqVPC/mWImGb2exOfGjMLUoipuWgjej+f4o/VP4bUI8U40gu7Teogd5VTeZUkGvJSPOQ==} + engines: {node: '>=16'} + + '@edge-runtime/ponyfill@2.4.2': + resolution: {integrity: sha512-oN17GjFr69chu6sDLvXxdhg0Qe8EZviGSuqzR9qOiKh4MhFYGdBBcqRNzdmYeAdeRzOW2mM9yil4RftUQ7sUOA==} + engines: {node: '>=16'} + + '@edge-runtime/primitives@4.1.0': + resolution: {integrity: sha512-Vw0lbJ2lvRUqc7/soqygUX216Xb8T3WBZ987oywz6aJqRxcwSVWwr9e+Nqo2m9bxobA9mdbWNNoRY6S9eko1EQ==} + engines: {node: '>=16'} + + '@edge-runtime/vm@3.2.0': + resolution: {integrity: sha512-0dEVyRLM/lG4gp1R/Ik5bfPl/1wX00xFwd5KcNH602tzBa09oF7pbTKETEhR1GjZ75K6OJnYFu8II2dyMhONMw==} + engines: {node: '>=16'} + '@emotion/is-prop-valid@1.2.1': resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} @@ -1033,6 +1063,10 @@ packages: resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==} engines: {node: '>=14'} + '@fastify/busboy@2.1.1': + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + '@fractalwagmi/popup-connection@1.1.1': resolution: {integrity: sha512-hYL+45iYwNbwjvP2DxP3YzVsrAGtj/RV9LOgMpJyCxsfNoyyOoi2+YrnywKkiANingiG2kJ1nKsizbu1Bd4zZw==} peerDependencies: @@ -1054,6 +1088,10 @@ packages: '@ioredis/commands@1.2.0': resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@isaacs/ttlcache@1.4.1': resolution: {integrity: sha512-RQgQ4uQ+pLbqXfOmieB91ejmLwvSgv9nLx6sT6sD83s7umBypgg+OIBOBbEUiJXrfpnp9j0mRhYYdzp9uqq3lA==} engines: {node: '>=12'} @@ -1108,6 +1146,9 @@ packages: '@jridgewell/trace-mapping@0.3.22': resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@json-rpc-tools/provider@1.7.6': resolution: {integrity: sha512-z7D3xvJ33UfCGv77n40lbzOYjZKVM3k2+5cV7xS8G6SCvKTzMkhkUYuD/qzQUNT4cG/lv0e9mRToweEEVLVVmA==} deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. @@ -1147,6 +1188,11 @@ packages: '@ledgerhq/logs@6.12.0': resolution: {integrity: sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==} + '@mapbox/node-pre-gyp@2.0.0': + resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==} + engines: {node: '>=18'} + hasBin: true + '@mediapipe/tasks-vision@0.10.8': resolution: {integrity: sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q==} @@ -1499,6 +1545,15 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 + '@rollup/pluginutils@5.1.4': + resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + '@scure/base@1.1.5': resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} @@ -2041,6 +2096,21 @@ packages: peerDependencies: '@babel/runtime': 7.x + '@ts-morph/common@0.11.1': + resolution: {integrity: sha512-7hWZS0NRpEsNV8vWJzg7FEz6V8MaLNeJOmwmghqUXTpzk16V1LLZhdo+4QvE/+zv4cVci0OviuJFnqhEfoV3+g==} + + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.4': + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} @@ -2053,6 +2123,9 @@ packages: '@types/estree@0.0.39': resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -2062,6 +2135,9 @@ packages: '@types/istanbul-reports@3.0.4': resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/matter-js@0.19.5': resolution: {integrity: sha512-pTVB5krRGb01hr8L6BJqWGoSriqUbbvJ9Fd0Qp0eAOE//w/lFvkaVHkVB8J3wXr9U3lZDzmAjJPPQn7x4wzbWg==} @@ -2071,6 +2147,9 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@16.18.11': + resolution: {integrity: sha512-3oJbGBUWuS6ahSnEq1eN2XrCyf4YsWI8OyCvo7c64zQJNplk3mO84t53o8lfTk+2ji59g5ycfc6qQ3fdHliHuA==} + '@types/node@20.11.17': resolution: {integrity: sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw==} @@ -2131,6 +2210,9 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + '@upstash/redis@1.34.8': + resolution: {integrity: sha512-eGJgOKc+2Uq4AdSM0lNx+WvFFhQeyhJ32SGNuSniLPg4lNb6m5h2AQ77qL+TgWiMZO8HCQ82Zsc/RlVBevCWTg==} + '@use-gesture/core@10.3.0': resolution: {integrity: sha512-rh+6MND31zfHcy9VU3dOZCqGY511lvGcfyJenN4cWZe0u1BH6brBpBddLVXhF2r4BMqWbvxfsbL7D287thJU2A==} @@ -2139,6 +2221,27 @@ packages: peerDependencies: react: '>= 16.8.0' + '@vercel/build-utils@10.5.1': + resolution: {integrity: sha512-BtqwEmU1AoITpd0KxYrdQOwyKZL8RKba+bWxI8mr3gXPQZWRAE9ok1zF0AXfvMGCstYPHBPNolZGDSfWmY2jqg==} + + '@vercel/error-utils@2.0.3': + resolution: {integrity: sha512-CqC01WZxbLUxoiVdh9B/poPbNpY9U+tO1N9oWHwTl5YAZxcqXmmWJ8KNMFItJCUUWdY3J3xv8LvAuQv2KZ5YdQ==} + + '@vercel/kv@3.0.0': + resolution: {integrity: sha512-pKT8fRnfyYk2MgvyB6fn6ipJPCdfZwiKDdw7vB+HL50rjboEBHDVBEcnwfkEpVSp2AjNtoaOUH7zG+bVC/rvSg==} + engines: {node: '>=14.6'} + + '@vercel/nft@0.27.10': + resolution: {integrity: sha512-zbaF9Wp/NsZtKLE4uVmL3FyfFwlpDyuymQM1kPbeT0mVOHKDQQNjnnfslB3REg3oZprmNFJuh3pkHBk2qAaizg==} + engines: {node: '>=16'} + hasBin: true + + '@vercel/node@5.1.15': + resolution: {integrity: sha512-r/DIdg2J/Ez59eK6sw5ez36rDI3GkcyzYjxLY41gItqKZb9lndAwwEgCCVMAP+l1YkeHiUcL9ie1BMZpsCoD2w==} + + '@vercel/static-config@3.0.0': + resolution: {integrity: sha512-2qtvcBJ1bGY0dYGYh3iM7yGKkk971FujLEDXzuW5wcZsPr1GSEjO/w2iSr3qve6nDDtBImsGoDEnus5FI4+fIw==} + '@vitejs/plugin-react@3.1.0': resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} engines: {node: ^14.18.0 || >=16.0.0} @@ -2255,6 +2358,10 @@ packages: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true + abbrev@3.0.1: + resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==} + engines: {node: ^18.17.0 || >=20.5.0} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -2263,11 +2370,24 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + acorn-import-attributes@1.9.5: + resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} + peerDependencies: + acorn: ^8 + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + agentkeepalive@4.5.0: resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} engines: {node: '>= 8.0.0'} @@ -2275,6 +2395,9 @@ packages: ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + ajv@8.6.3: + resolution: {integrity: sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw==} + anser@1.4.10: resolution: {integrity: sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww==} @@ -2308,6 +2431,9 @@ packages: appdirsjs@1.2.7: resolution: {integrity: sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw==} + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -2339,9 +2465,20 @@ packages: async-limiter@1.0.1: resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} + async-listen@3.0.0: + resolution: {integrity: sha512-V+SsTpDqkrWTimiotsyl33ePSjA5/KrithwupuvJ6ztsqPvGv6ge4OredFhPffVXiLN/QUWvE0XcqJaYgt6fOg==} + engines: {node: '>= 14'} + + async-listen@3.0.1: + resolution: {integrity: sha512-cWMaNwUJnf37C/S5TfCkk/15MwbPRwVYALA2jtjkbHjCmAPiDXyNJy2q3p1KAZzDLHAWyarUWSujUoHR4pEgrA==} + engines: {node: '>= 14'} + async-mutex@0.4.1: resolution: {integrity: sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==} + async-sema@3.1.1: + resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} + async@3.2.5: resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} @@ -2572,6 +2709,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + chrome-launcher@0.15.2: resolution: {integrity: sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==} engines: {node: '>=12.13.0'} @@ -2593,6 +2734,9 @@ packages: citty@0.1.5: resolution: {integrity: sha512-AS7n5NSc0OQVMV9v6wt3ByujNIrne0/cTjiC2MYqhvao57VNfiuVksTSr2p17nVOhEr2KtqiAkGwHcgMC/qUuQ==} + cjs-module-lexer@1.2.3: + resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -2630,6 +2774,9 @@ packages: resolution: {integrity: sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==} engines: {node: '>=0.10.0'} + code-block-writer@10.1.1: + resolution: {integrity: sha512-67ueh2IRGst/51p0n6FvPrnRjAGHY5F8xdjkgrYE7DDzpJe6qA07RYQ9VcoUeo5ATOjSOiWpSL3SWBRRbempMw==} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -2686,6 +2833,10 @@ packages: resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} engines: {node: ^14.18.0 || >=16.10.0} + convert-hrtime@3.0.0: + resolution: {integrity: sha512-7V+KqSvMiHp8yWDuwfww06XleMWVVB9b9tURBx+G7UTADuo5hYPuowKloz4OzOqbPezxgo+fdQ1522WzPG4OeA==} + engines: {node: '>=8'} + convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -2722,6 +2873,9 @@ packages: create-hmac@1.1.7: resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + cross-env@7.0.3: resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} @@ -2856,6 +3010,14 @@ packages: engines: {node: '>=0.10'} hasBin: true + detect-libc@2.0.4: + resolution: {integrity: sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==} + engines: {node: '>=8'} + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} @@ -2874,6 +3036,11 @@ packages: duplexify@4.1.2: resolution: {integrity: sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==} + edge-runtime@2.5.9: + resolution: {integrity: sha512-pk+k0oK0PVXdlT4oRp4lwh+unuKB7Ng4iZ2HB+EZ7QCEQizX360Rp/F4aRpgpRgdP2ufB35N+1KppHmYjqIGSg==} + engines: {node: '>=16'} + hasBin: true + ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} @@ -2935,6 +3102,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@1.4.1: + resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} + es-set-tostringtag@2.0.2: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} @@ -2949,6 +3119,131 @@ packages: es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + esbuild-android-64@0.14.47: + resolution: {integrity: sha512-R13Bd9+tqLVFndncMHssZrPWe6/0Kpv2/dt4aA69soX4PRxlzsVpCvoJeFE8sOEoeVEiBkI0myjlkDodXlHa0g==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + esbuild-android-arm64@0.14.47: + resolution: {integrity: sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + esbuild-darwin-64@0.14.47: + resolution: {integrity: sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + esbuild-darwin-arm64@0.14.47: + resolution: {integrity: sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + esbuild-freebsd-64@0.14.47: + resolution: {integrity: sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + esbuild-freebsd-arm64@0.14.47: + resolution: {integrity: sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + esbuild-linux-32@0.14.47: + resolution: {integrity: sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + esbuild-linux-64@0.14.47: + resolution: {integrity: sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + esbuild-linux-arm64@0.14.47: + resolution: {integrity: sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + esbuild-linux-arm@0.14.47: + resolution: {integrity: sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + esbuild-linux-mips64le@0.14.47: + resolution: {integrity: sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + esbuild-linux-ppc64le@0.14.47: + resolution: {integrity: sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + esbuild-linux-riscv64@0.14.47: + resolution: {integrity: sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + esbuild-linux-s390x@0.14.47: + resolution: {integrity: sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + esbuild-netbsd-64@0.14.47: + resolution: {integrity: sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + esbuild-openbsd-64@0.14.47: + resolution: {integrity: sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + esbuild-sunos-64@0.14.47: + resolution: {integrity: sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + esbuild-windows-32@0.14.47: + resolution: {integrity: sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + esbuild-windows-64@0.14.47: + resolution: {integrity: sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + esbuild-windows-arm64@0.14.47: + resolution: {integrity: sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + esbuild@0.14.47: + resolution: {integrity: sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.17.19: resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} engines: {node: '>=12'} @@ -2981,6 +3276,9 @@ packages: estree-walker@1.0.1: resolution: {integrity: sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -3330,6 +3628,10 @@ packages: resolution: {integrity: sha512-S9wWkJ/VSY9/k4qcjG318bqJNruzE4HySUhFYknwmu6LBP97KLLfwNf+n4V1BHurvFNkSKLFnK/RsuUnRTf9Vw==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -3668,6 +3970,9 @@ packages: json-rpc-random-id@1.0.1: resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} + json-schema-to-ts@1.6.4: + resolution: {integrity: sha512-pR4yQ9DHz6itqswtHCm26mw45FSNfQ9rEQjosaZErhn5J3J2sIViQiz8rDaezjKAhFGpmsoczYVBgGHzFw/stA==} + json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} @@ -3830,6 +4135,9 @@ packages: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} @@ -3980,6 +4288,14 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@3.0.2: + resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} + engines: {node: '>= 18'} + mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -3989,6 +4305,11 @@ packages: engines: {node: '>=10'} hasBin: true + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + mlly@1.5.0: resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==} @@ -4044,6 +4365,15 @@ packages: node-fetch-native@1.6.2: resolution: {integrity: sha512-69mtXOFZ6hSkYiXAVB5SqaRvrbITC/NPyqv7yuu/qw0nmgPyYbIMYYNIDhNtwPrzk0ptrimrLz/hhjvm4w5Z+w==} + node-fetch@2.6.9: + resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -4071,6 +4401,11 @@ packages: resolution: {integrity: sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw==} engines: {node: '>=0.12.0'} + nopt@8.1.0: + resolution: {integrity: sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -4190,10 +4525,17 @@ packages: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} + parse-ms@2.1.0: + resolution: {integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==} + engines: {node: '>=6'} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} + path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} @@ -4217,6 +4559,12 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-to-regexp@6.1.0: + resolution: {integrity: sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw==} + + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -4231,6 +4579,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} @@ -4289,6 +4641,10 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-ms@7.0.1: + resolution: {integrity: sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==} + engines: {node: '>=10'} + process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -4530,6 +4886,10 @@ packages: resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} engines: {node: '>=4'} + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -4700,6 +5060,10 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.0.2: + resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} + engines: {node: '>=14'} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -4885,6 +5249,7 @@ packages: sudo-prompt@9.2.1: resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. superstruct@0.14.2: resolution: {integrity: sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==} @@ -4926,6 +5291,10 @@ packages: resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} engines: {node: '>=18'} + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} + temp-dir@2.0.0: resolution: {integrity: sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==} engines: {node: '>=8'} @@ -4974,6 +5343,10 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + time-span@4.0.0: + resolution: {integrity: sha512-MyqZCTGLDZ77u4k+jqg4UlrzPTPZ49NDlaekU6uuFaJLzPIN1woaRXCbGeqOfxwc3Y37ZROGAJ614Rdv7Olt+g==} + engines: {node: '>=10'} + tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -5017,6 +5390,26 @@ packages: troika-worker-utils@0.47.2: resolution: {integrity: sha512-mzss4MeyzUkYBppn4x5cdAqrhBHFEuVmMMgLMTyFV23x6GvQMyo+/R5E5Lsbrt7WSt5RfvewjcwD1DChRTA9lA==} + ts-morph@12.0.0: + resolution: {integrity: sha512-VHC8XgU2fFW7yO1f/b3mxKDje1vmyzFXHWzOYmKEkCEwcLjDtbdLgBQviqj4ZwP4MJkQtRo6Ha2I29lq/B+VxA==} + + ts-node@10.9.1: + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + ts-toolbelt@6.15.5: + resolution: {integrity: sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==} + tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -5070,6 +5463,10 @@ packages: undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + unenv@1.9.0: resolution: {integrity: sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==} @@ -5224,6 +5621,9 @@ packages: uuidv4@6.2.13: resolution: {integrity: sha512-AXyzMjazYB3ovL3q051VLH06Ixj//Knx7QnUSi1T//Ie3io6CpsPu9nVMOx5MoLWh6xV0B9J0hIaxungxXUbPQ==} + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -5456,6 +5856,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} @@ -5482,6 +5886,10 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -6483,6 +6891,22 @@ snapshots: bn.js: 5.2.1 buffer-layout: 1.2.2 + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@edge-runtime/format@2.2.1': {} + + '@edge-runtime/node-utils@2.3.0': {} + + '@edge-runtime/ponyfill@2.4.2': {} + + '@edge-runtime/primitives@4.1.0': {} + + '@edge-runtime/vm@3.2.0': + dependencies: + '@edge-runtime/primitives': 4.1.0 + '@emotion/is-prop-valid@1.2.1': dependencies: '@emotion/memoize': 0.8.1 @@ -6577,6 +7001,8 @@ snapshots: ethereum-cryptography: 2.1.3 micro-ftch: 0.3.1 + '@fastify/busboy@2.1.1': {} + '@fractalwagmi/popup-connection@1.1.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: react: 18.2.0 @@ -6602,6 +7028,10 @@ snapshots: '@ioredis/commands@1.2.0': {} + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + '@isaacs/ttlcache@1.4.1': {} '@jest/create-cache-key-function@29.7.0': @@ -6645,12 +7075,12 @@ snapshots: '@types/yargs': 17.0.32 chalk: 4.1.2 - '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@jnwng/walletconnect-solana@0.2.0(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@solana/web3.js': 1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/qrcode-modal': 1.8.0 - '@walletconnect/sign-client': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/sign-client': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) bs58: 5.0.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -6692,6 +7122,11 @@ snapshots: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + '@json-rpc-tools/provider@1.7.6(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@json-rpc-tools/utils': 1.7.6 @@ -6772,6 +7207,19 @@ snapshots: '@ledgerhq/logs@6.12.0': {} + '@mapbox/node-pre-gyp@2.0.0': + dependencies: + consola: 3.2.3 + detect-libc: 2.0.4 + https-proxy-agent: 7.0.6 + node-fetch: 2.7.0 + nopt: 8.1.0 + semver: 7.6.0 + tar: 7.4.3 + transitivePeerDependencies: + - encoding + - supports-color + '@mediapipe/tasks-vision@0.10.8': {} '@metamask/rpc-errors@5.1.1': @@ -7330,6 +7778,14 @@ snapshots: picomatch: 2.3.1 rollup: 2.79.1 + '@rollup/pluginutils@5.1.4(rollup@3.29.4)': + dependencies: + '@types/estree': 1.0.7 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 3.29.4 + '@scure/base@1.1.5': {} '@scure/bip32@1.3.3': @@ -7735,9 +8191,9 @@ snapshots: '@solana/wallet-standard-util': 1.1.1 '@solana/web3.js': 1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@solana/wallet-adapter-walletconnect@0.1.16(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@solana/wallet-adapter-walletconnect@0.1.16(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@jnwng/walletconnect-solana': 0.2.0(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -7758,7 +8214,7 @@ snapshots: - supports-color - utf-8-validate - '@solana/wallet-adapter-wallets@0.19.18(@babel/runtime@7.23.9)(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(utf-8-validate@5.0.10)': + '@solana/wallet-adapter-wallets@0.19.18(@babel/runtime@7.23.9)(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bs58@5.0.0)(bufferutil@4.0.8)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(utf-8-validate@5.0.10)': dependencies: '@solana/wallet-adapter-alpha': 0.1.10(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-avana': 0.1.13(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -7803,7 +8259,7 @@ snapshots: '@solana/wallet-adapter-torus': 0.11.28(@babel/runtime@7.23.9)(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/wallet-adapter-trust': 0.1.13(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/wallet-adapter-unsafe-burner': 0.1.7(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) - '@solana/wallet-adapter-walletconnect': 0.1.16(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@solana/wallet-adapter-walletconnect': 0.1.16(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@solana/wallet-adapter-xdefi': 0.1.7(@solana/web3.js@1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.78.5(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -8151,6 +8607,21 @@ snapshots: - supports-color - utf-8-validate + '@ts-morph/common@0.11.1': + dependencies: + fast-glob: 3.3.2 + minimatch: 3.1.2 + mkdirp: 1.0.4 + path-browserify: 1.0.1 + + '@tsconfig/node10@1.0.11': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + '@types/connect@3.4.38': dependencies: '@types/node': 12.20.55 @@ -8163,6 +8634,8 @@ snapshots: '@types/estree@0.0.39': {} + '@types/estree@1.0.7': {} + '@types/istanbul-lib-coverage@2.0.6': {} '@types/istanbul-lib-report@3.0.3': @@ -8173,12 +8646,16 @@ snapshots: dependencies: '@types/istanbul-lib-report': 3.0.3 + '@types/json-schema@7.0.15': {} + '@types/matter-js@0.19.5': {} '@types/ms@0.7.34': {} '@types/node@12.20.55': {} + '@types/node@16.18.11': {} + '@types/node@20.11.17': dependencies: undici-types: 5.26.5 @@ -8244,6 +8721,10 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@upstash/redis@1.34.8': + dependencies: + crypto-js: 4.2.0 + '@use-gesture/core@10.3.0': {} '@use-gesture/react@10.3.0(react@18.2.0)': @@ -8251,14 +8732,77 @@ snapshots: '@use-gesture/core': 10.3.0 react: 18.2.0 - '@vitejs/plugin-react@3.1.0(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0))': + '@vercel/build-utils@10.5.1': {} + + '@vercel/error-utils@2.0.3': {} + + '@vercel/kv@3.0.0': + dependencies: + '@upstash/redis': 1.34.8 + + '@vercel/nft@0.27.10(rollup@3.29.4)': + dependencies: + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.1.4(rollup@3.29.4) + acorn: 8.11.3 + acorn-import-attributes: 1.9.5(acorn@8.11.3) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 7.2.3 + graceful-fs: 4.2.11 + node-gyp-build: 4.8.0 + picomatch: 4.0.2 + resolve-from: 5.0.0 + transitivePeerDependencies: + - encoding + - rollup + - supports-color + + '@vercel/node@5.1.15(rollup@3.29.4)': + dependencies: + '@edge-runtime/node-utils': 2.3.0 + '@edge-runtime/primitives': 4.1.0 + '@edge-runtime/vm': 3.2.0 + '@types/node': 16.18.11 + '@vercel/build-utils': 10.5.1 + '@vercel/error-utils': 2.0.3 + '@vercel/nft': 0.27.10(rollup@3.29.4) + '@vercel/static-config': 3.0.0 + async-listen: 3.0.0 + cjs-module-lexer: 1.2.3 + edge-runtime: 2.5.9 + es-module-lexer: 1.4.1 + esbuild: 0.14.47 + etag: 1.8.1 + node-fetch: 2.6.9 + path-to-regexp: 6.1.0 + path-to-regexp-updated: path-to-regexp@6.3.0 + ts-morph: 12.0.0 + ts-node: 10.9.1(@types/node@16.18.11)(typescript@4.9.5) + typescript: 4.9.5 + undici: 5.28.4 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - encoding + - rollup + - supports-color + + '@vercel/static-config@3.0.0': + dependencies: + ajv: 8.6.3 + json-schema-to-ts: 1.6.4 + ts-morph: 12.0.0 + + '@vitejs/plugin-react@3.1.0(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0))': dependencies: '@babel/core': 7.23.9 '@babel/plugin-transform-react-jsx-self': 7.23.3(@babel/core@7.23.9) '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) magic-string: 0.27.0 react-refresh: 0.14.0 - vite: 4.2.1(@types/node@20.11.17)(terser@5.27.0) + vite: 4.2.1(@types/node@16.18.11)(terser@5.27.0) transitivePeerDependencies: - supports-color @@ -8291,21 +8835,21 @@ snapshots: '@walletconnect/window-metadata': 1.0.0 detect-browser: 5.2.0 - '@walletconnect/core@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/core@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/jsonrpc-ws-connection': 1.0.14(bufferutil@4.0.8)(utf-8-validate@5.0.10) - '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) '@walletconnect/logger': 2.0.1 '@walletconnect/relay-api': 1.0.9 '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) - '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) + '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) events: 3.3.0 isomorphic-unfetch: 3.1.0 lodash.isequal: 4.5.0 @@ -8370,11 +8914,11 @@ snapshots: - bufferutil - utf-8-validate - '@walletconnect/keyvaluestorage@1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))': + '@walletconnect/keyvaluestorage@1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)': dependencies: '@walletconnect/safe-json': 1.0.2 idb-keyval: 6.2.1 - unstorage: 1.10.1(idb-keyval@6.2.1) + unstorage: 1.10.1(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(idb-keyval@6.2.1) optionalDependencies: '@react-native-async-storage/async-storage': 1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)) transitivePeerDependencies: @@ -8427,16 +8971,16 @@ snapshots: dependencies: tslib: 1.14.1 - '@walletconnect/sign-client@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + '@walletconnect/sign-client@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@walletconnect/core': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@walletconnect/core': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(bufferutil@4.0.8)(utf-8-validate@5.0.10) '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) - '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) + '@walletconnect/utils': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -8462,12 +9006,12 @@ snapshots: '@walletconnect/types@1.8.0': {} - '@walletconnect/types@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))': + '@walletconnect/types@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)': dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-types': 1.0.3 - '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/keyvaluestorage': 1.1.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) '@walletconnect/logger': 2.0.1 events: 3.3.0 transitivePeerDependencies: @@ -8485,7 +9029,7 @@ snapshots: - '@vercel/kv' - supports-color - '@walletconnect/utils@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))': + '@walletconnect/utils@2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)': dependencies: '@stablelib/chacha20poly1305': 1.0.1 '@stablelib/hkdf': 1.0.1 @@ -8495,7 +9039,7 @@ snapshots: '@walletconnect/relay-api': 1.0.9 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10))) + '@walletconnect/types': 2.11.1(@react-native-async-storage/async-storage@1.21.0(react-native@0.73.4(@babel/core@7.23.9)(@babel/preset-env@7.23.9(@babel/core@7.23.9))(bufferutil@4.0.8)(react@18.2.0)(utf-8-validate@5.0.10)))(@upstash/redis@1.34.8)(@vercel/kv@3.0.0) '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -8536,6 +9080,8 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 + abbrev@3.0.1: {} + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 @@ -8545,8 +9091,18 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + acorn-import-attributes@1.9.5(acorn@8.11.3): + dependencies: + acorn: 8.11.3 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.11.3 + acorn@8.11.3: {} + agent-base@7.1.3: {} + agentkeepalive@4.5.0: dependencies: humanize-ms: 1.2.1 @@ -8558,6 +9114,13 @@ snapshots: require-from-string: 2.0.2 uri-js: 4.4.1 + ajv@8.6.3: + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + anser@1.4.10: {} ansi-fragments@0.2.1: @@ -8587,6 +9150,8 @@ snapshots: appdirsjs@1.2.7: {} + arg@4.1.3: {} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -8632,10 +9197,16 @@ snapshots: async-limiter@1.0.1: {} + async-listen@3.0.0: {} + + async-listen@3.0.1: {} + async-mutex@0.4.1: dependencies: tslib: 2.6.2 + async-sema@3.1.1: {} + async@3.2.5: {} at-least-node@1.0.0: {} @@ -8904,6 +9475,8 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chownr@3.0.0: {} + chrome-launcher@0.15.2: dependencies: '@types/node': 20.11.17 @@ -8937,6 +9510,8 @@ snapshots: dependencies: consola: 3.2.3 + cjs-module-lexer@1.2.3: {} + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -8979,6 +9554,8 @@ snapshots: cluster-key-slot@1.1.2: {} + code-block-writer@10.1.1: {} + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -9034,6 +9611,8 @@ snapshots: consola@3.2.3: {} + convert-hrtime@3.0.0: {} + convert-source-map@2.0.0: {} cookie-es@1.0.0: {} @@ -9083,6 +9662,8 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 + create-require@1.1.1: {} + cross-env@7.0.3: dependencies: cross-spawn: 7.0.3 @@ -9205,6 +9786,10 @@ snapshots: detect-libc@1.0.3: {} + detect-libc@2.0.4: {} + + diff@4.0.2: {} + diffie-hellman@5.0.3: dependencies: bn.js: 4.12.0 @@ -9232,6 +9817,18 @@ snapshots: readable-stream: 3.6.2 stream-shift: 1.0.3 + edge-runtime@2.5.9: + dependencies: + '@edge-runtime/format': 2.2.1 + '@edge-runtime/ponyfill': 2.4.2 + '@edge-runtime/vm': 3.2.0 + async-listen: 3.0.1 + mri: 1.2.0 + picocolors: 1.0.0 + pretty-ms: 7.0.1 + signal-exit: 4.0.2 + time-span: 4.0.0 + ee-first@1.1.1: {} eip1193-provider@1.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): @@ -9341,6 +9938,8 @@ snapshots: es-errors@1.3.0: {} + es-module-lexer@1.4.1: {} + es-set-tostringtag@2.0.2: dependencies: get-intrinsic: 1.2.4 @@ -9359,6 +9958,89 @@ snapshots: dependencies: es6-promise: 4.2.8 + esbuild-android-64@0.14.47: + optional: true + + esbuild-android-arm64@0.14.47: + optional: true + + esbuild-darwin-64@0.14.47: + optional: true + + esbuild-darwin-arm64@0.14.47: + optional: true + + esbuild-freebsd-64@0.14.47: + optional: true + + esbuild-freebsd-arm64@0.14.47: + optional: true + + esbuild-linux-32@0.14.47: + optional: true + + esbuild-linux-64@0.14.47: + optional: true + + esbuild-linux-arm64@0.14.47: + optional: true + + esbuild-linux-arm@0.14.47: + optional: true + + esbuild-linux-mips64le@0.14.47: + optional: true + + esbuild-linux-ppc64le@0.14.47: + optional: true + + esbuild-linux-riscv64@0.14.47: + optional: true + + esbuild-linux-s390x@0.14.47: + optional: true + + esbuild-netbsd-64@0.14.47: + optional: true + + esbuild-openbsd-64@0.14.47: + optional: true + + esbuild-sunos-64@0.14.47: + optional: true + + esbuild-windows-32@0.14.47: + optional: true + + esbuild-windows-64@0.14.47: + optional: true + + esbuild-windows-arm64@0.14.47: + optional: true + + esbuild@0.14.47: + optionalDependencies: + esbuild-android-64: 0.14.47 + esbuild-android-arm64: 0.14.47 + esbuild-darwin-64: 0.14.47 + esbuild-darwin-arm64: 0.14.47 + esbuild-freebsd-64: 0.14.47 + esbuild-freebsd-arm64: 0.14.47 + esbuild-linux-32: 0.14.47 + esbuild-linux-64: 0.14.47 + esbuild-linux-arm: 0.14.47 + esbuild-linux-arm64: 0.14.47 + esbuild-linux-mips64le: 0.14.47 + esbuild-linux-ppc64le: 0.14.47 + esbuild-linux-riscv64: 0.14.47 + esbuild-linux-s390x: 0.14.47 + esbuild-netbsd-64: 0.14.47 + esbuild-openbsd-64: 0.14.47 + esbuild-sunos-64: 0.14.47 + esbuild-windows-32: 0.14.47 + esbuild-windows-64: 0.14.47 + esbuild-windows-arm64: 0.14.47 + esbuild@0.17.19: optionalDependencies: '@esbuild/android-arm': 0.17.19 @@ -9398,6 +10080,8 @@ snapshots: estree-walker@1.0.1: {} + estree-walker@2.0.2: {} + esutils@2.0.3: {} etag@1.8.1: {} @@ -9788,6 +10472,13 @@ snapshots: http-shutdown@1.2.2: {} + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.3 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + human-signals@2.1.0: {} human-signals@5.0.0: {} @@ -10151,6 +10842,11 @@ snapshots: json-rpc-random-id@1.0.1: {} + json-schema-to-ts@1.6.4: + dependencies: + '@types/json-schema': 7.0.15 + ts-toolbelt: 6.15.5 + json-schema-traverse@1.0.0: {} json-schema@0.4.0: {} @@ -10314,6 +11010,8 @@ snapshots: pify: 4.0.1 semver: 5.7.2 + make-error@1.3.6: {} + makeerror@1.0.12: dependencies: tmpl: 1.0.5 @@ -10554,12 +11252,20 @@ snapshots: minimist@1.2.8: {} + minipass@7.1.2: {} + + minizlib@3.0.2: + dependencies: + minipass: 7.1.2 + mkdirp@0.5.6: dependencies: minimist: 1.2.8 mkdirp@1.0.4: {} + mkdirp@3.0.1: {} + mlly@1.5.0: dependencies: acorn: 8.11.3 @@ -10602,6 +11308,10 @@ snapshots: node-fetch-native@1.6.2: {} + node-fetch@2.6.9: + dependencies: + whatwg-url: 5.0.0 + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -10616,6 +11326,10 @@ snapshots: node-stream-zip@1.15.0: {} + nopt@8.1.0: + dependencies: + abbrev: 3.0.1 + normalize-path@3.0.0: {} npm-run-path@4.0.1: @@ -10740,8 +11454,12 @@ snapshots: error-ex: 1.3.2 json-parse-better-errors: 1.0.2 + parse-ms@2.1.0: {} + parseurl@1.3.3: {} + path-browserify@1.0.1: {} + path-exists@3.0.0: {} path-exists@4.0.0: {} @@ -10754,6 +11472,10 @@ snapshots: path-parse@1.0.7: {} + path-to-regexp@6.1.0: {} + + path-to-regexp@6.3.0: {} + pathe@1.1.2: {} pbkdf2@3.1.2: @@ -10768,6 +11490,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@4.0.1: {} pino-abstract-transport@0.5.0: @@ -10834,6 +11558,10 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.2.0 + pretty-ms@7.0.1: + dependencies: + parse-ms: 2.1.0 + process-nextick-args@2.0.1: {} process-warning@1.0.0: {} @@ -11149,6 +11877,8 @@ snapshots: resolve-from@3.0.0: {} + resolve-from@5.0.0: {} + resolve@1.22.8: dependencies: is-core-module: 2.13.1 @@ -11349,6 +12079,8 @@ snapshots: signal-exit@3.0.7: {} + signal-exit@4.0.2: {} + signal-exit@4.1.0: {} sisteransi@1.0.5: {} @@ -11586,6 +12318,15 @@ snapshots: system-architecture@0.1.0: {} + tar@7.4.3: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.2 + mkdirp: 3.0.1 + yallist: 5.0.0 + temp-dir@2.0.0: {} temp@0.8.4: @@ -11641,6 +12382,10 @@ snapshots: through@2.3.8: {} + time-span@4.0.0: + dependencies: + convert-hrtime: 3.0.0 + tmpl@1.0.5: {} to-fast-properties@2.0.0: {} @@ -11680,6 +12425,31 @@ snapshots: troika-worker-utils@0.47.2: {} + ts-morph@12.0.0: + dependencies: + '@ts-morph/common': 0.11.1 + code-block-writer: 10.1.1 + + ts-node@10.9.1(@types/node@16.18.11)(typescript@4.9.5): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.11 + acorn: 8.11.3 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 4.9.5 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + + ts-toolbelt@6.15.5: {} + tslib@1.14.1: {} tslib@2.6.2: {} @@ -11736,6 +12506,10 @@ snapshots: undici-types@5.26.5: {} + undici@5.28.4: + dependencies: + '@fastify/busboy': 2.1.1 + unenv@1.9.0: dependencies: consola: 3.2.3 @@ -11773,11 +12547,11 @@ snapshots: unpipe@1.0.0: {} - unplugin-fonts@1.0.3(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0)): + unplugin-fonts@1.0.3(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0)): dependencies: fast-glob: 3.3.2 unplugin: 1.7.1 - vite: 4.2.1(@types/node@20.11.17)(terser@5.27.0) + vite: 4.2.1(@types/node@16.18.11)(terser@5.27.0) unplugin@1.7.1: dependencies: @@ -11786,7 +12560,7 @@ snapshots: webpack-sources: 3.2.3 webpack-virtual-modules: 0.6.1 - unstorage@1.10.1(idb-keyval@6.2.1): + unstorage@1.10.1(@upstash/redis@1.34.8)(@vercel/kv@3.0.0)(idb-keyval@6.2.1): dependencies: anymatch: 3.1.3 chokidar: 3.6.0 @@ -11800,6 +12574,8 @@ snapshots: ofetch: 1.3.3 ufo: 1.4.0 optionalDependencies: + '@upstash/redis': 1.34.8 + '@vercel/kv': 3.0.0 idb-keyval: 6.2.1 transitivePeerDependencies: - supports-color @@ -11860,27 +12636,29 @@ snapshots: '@types/uuid': 8.3.4 uuid: 8.3.2 + v8-compile-cache-lib@3.0.1: {} + vary@1.1.2: {} - vite-plugin-pwa@0.17.4(vite@4.2.1(@types/node@20.11.17)(terser@5.27.0))(workbox-build@7.0.0)(workbox-window@7.0.0): + vite-plugin-pwa@0.17.4(vite@4.2.1(@types/node@16.18.11)(terser@5.27.0))(workbox-build@7.0.0)(workbox-window@7.0.0): dependencies: debug: 4.3.4 fast-glob: 3.3.2 pretty-bytes: 6.1.1 - vite: 4.2.1(@types/node@20.11.17)(terser@5.27.0) + vite: 4.2.1(@types/node@16.18.11)(terser@5.27.0) workbox-build: 7.0.0 workbox-window: 7.0.0 transitivePeerDependencies: - supports-color - vite@4.2.1(@types/node@20.11.17)(terser@5.27.0): + vite@4.2.1(@types/node@16.18.11)(terser@5.27.0): dependencies: esbuild: 0.17.19 postcss: 8.4.35 resolve: 1.22.8 rollup: 3.29.4 optionalDependencies: - '@types/node': 20.11.17 + '@types/node': 16.18.11 fsevents: 2.3.3 terser: 5.27.0 @@ -12123,6 +12901,8 @@ snapshots: yallist@4.0.0: {} + yallist@5.0.0: {} + yaml@2.3.4: {} yargs-parser@13.1.2: @@ -12174,6 +12954,8 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 + yn@3.1.1: {} + yocto-queue@0.1.0: {} zustand@3.7.2(react@18.2.0): diff --git a/public/bg-community.svg b/public/bg-community.svg new file mode 100644 index 000000000..e76ba3681 --- /dev/null +++ b/public/bg-community.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/favicon.jpg b/public/favicon.jpg new file mode 100644 index 000000000..d96f77d0b Binary files /dev/null and b/public/favicon.jpg differ diff --git a/public/favicon.png b/public/favicon.png index e23953126..394c89861 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/public/gamba.svg b/public/gamba.svg index 25c111c51..ebaba0958 100644 --- a/public/gamba.svg +++ b/public/gamba.svg @@ -1,44 +1,93 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/gambax.svg b/public/gambax.svg new file mode 100644 index 000000000..25c111c51 --- /dev/null +++ b/public/gambax.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/games/app.png b/public/games/app.png new file mode 100644 index 000000000..063f26fbe Binary files /dev/null and b/public/games/app.png differ diff --git a/public/games/app2.png b/public/games/app2.png new file mode 100644 index 000000000..6f7c820a0 Binary files /dev/null and b/public/games/app2.png differ diff --git a/public/games/blackjack.png b/public/games/blackjack.png index 34841d896..0df742800 100644 Binary files a/public/games/blackjack.png and b/public/games/blackjack.png differ diff --git a/public/games/blackjack.webp b/public/games/blackjack.webp new file mode 100644 index 000000000..278f56d57 Binary files /dev/null and b/public/games/blackjack.webp differ diff --git a/public/games/crash.png b/public/games/crash.png index 9c7f07f32..505812543 100644 Binary files a/public/games/crash.png and b/public/games/crash.png differ diff --git a/public/games/crash.webp b/public/games/crash.webp new file mode 100644 index 000000000..bcc1c77ad Binary files /dev/null and b/public/games/crash.webp differ diff --git a/public/games/cryptochart.png b/public/games/cryptochart.png new file mode 100644 index 000000000..6e7ca55a5 Binary files /dev/null and b/public/games/cryptochart.png differ diff --git a/public/games/dice.png b/public/games/dice.png index c4bfeb315..15cbe38be 100644 Binary files a/public/games/dice.png and b/public/games/dice.png differ diff --git a/public/games/dice.webp b/public/games/dice.webp new file mode 100644 index 000000000..375b58190 Binary files /dev/null and b/public/games/dice.webp differ diff --git a/public/games/flip.png b/public/games/flip.png index a798f82a5..46595143c 100644 Binary files a/public/games/flip.png and b/public/games/flip.png differ diff --git a/public/games/flip.webp b/public/games/flip.webp new file mode 100644 index 000000000..330abbc3e Binary files /dev/null and b/public/games/flip.webp differ diff --git a/public/games/hilo.png b/public/games/hilo.png index 5650b67be..0c45e6be0 100644 Binary files a/public/games/hilo.png and b/public/games/hilo.png differ diff --git a/public/games/hilo.webp b/public/games/hilo.webp new file mode 100644 index 000000000..9a2c10350 Binary files /dev/null and b/public/games/hilo.webp differ diff --git a/public/games/icon-192.png b/public/games/icon-192.png new file mode 100644 index 000000000..ba7a6356f Binary files /dev/null and b/public/games/icon-192.png differ diff --git a/public/games/icon-512.png b/public/games/icon-512.png new file mode 100644 index 000000000..f6158efc9 Binary files /dev/null and b/public/games/icon-512.png differ diff --git a/public/games/mines.png b/public/games/mines.png index af070cf77..a0cddae74 100644 Binary files a/public/games/mines.png and b/public/games/mines.png differ diff --git a/public/games/mines.webp b/public/games/mines.webp new file mode 100644 index 000000000..4218c2d4f Binary files /dev/null and b/public/games/mines.webp differ diff --git a/public/games/more.png b/public/games/more.png new file mode 100644 index 000000000..00ba07e82 Binary files /dev/null and b/public/games/more.png differ diff --git a/public/games/plinko.png b/public/games/plinko.png index 620f8808b..a1c775916 100644 Binary files a/public/games/plinko.png and b/public/games/plinko.png differ diff --git a/public/games/plinko.webp b/public/games/plinko.webp new file mode 100644 index 000000000..8f7f8df0b Binary files /dev/null and b/public/games/plinko.webp differ diff --git a/public/games/roulette.png b/public/games/roulette.png index d1ab22f00..e4481e9cf 100644 Binary files a/public/games/roulette.png and b/public/games/roulette.png differ diff --git a/public/games/roulette.webp b/public/games/roulette.webp new file mode 100644 index 000000000..e15d2a02d Binary files /dev/null and b/public/games/roulette.webp differ diff --git a/public/games/slots.png b/public/games/slots.png index 8e88f6bb1..c749d28df 100644 Binary files a/public/games/slots.png and b/public/games/slots.png differ diff --git a/public/games/slots.webp b/public/games/slots.webp new file mode 100644 index 000000000..359953300 Binary files /dev/null and b/public/games/slots.webp differ diff --git a/public/icon-192.png b/public/icon-192.png index c721ff2c6..33cab78e9 100644 Binary files a/public/icon-192.png and b/public/icon-192.png differ diff --git a/public/icon-512.png b/public/icon-512.png index 91319f092..4255b7858 100644 Binary files a/public/icon-512.png and b/public/icon-512.png differ diff --git a/public/logo.svg b/public/logo.svg index 8aaa19d85..22bb0d0a0 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -1,47 +1,163 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/logo2.svg b/public/logo2.svg new file mode 100644 index 000000000..8aaa19d85 --- /dev/null +++ b/public/logo2.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/logoORIGINAL.svg b/public/logoORIGINAL.svg new file mode 100644 index 000000000..f0cafb582 --- /dev/null +++ b/public/logoORIGINAL.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/logocasino.png b/public/logocasino.png new file mode 100644 index 000000000..f480db3aa Binary files /dev/null and b/public/logocasino.png differ diff --git a/public/logocopy.svg b/public/logocopy.svg new file mode 100644 index 000000000..67dd96020 --- /dev/null +++ b/public/logocopy.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index 2e371e033..bba3a382e 100644 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -1,6 +1,6 @@ { - "name": "Gamba Play", - "short_name": "Gamba", + "name": "Banabets", + "short_name": "Banabets", "start_url": "/", "display": "standalone", "background_color": "#000000", diff --git a/public/qrc.png b/public/qrc.png new file mode 100644 index 000000000..dae32b0d8 Binary files /dev/null and b/public/qrc.png differ diff --git a/public/stuff.png b/public/stuff.png index 3f675e19f..f6836475d 100644 Binary files a/public/stuff.png and b/public/stuff.png differ diff --git a/public/stuff2.png b/public/stuff2.png new file mode 100644 index 000000000..6616cb0fc Binary files /dev/null and b/public/stuff2.png differ diff --git a/public/stuff3.png b/public/stuff3.png new file mode 100644 index 000000000..73b0e0b7f Binary files /dev/null and b/public/stuff3.png differ diff --git a/readme.md b/readme.md index 63e0eabea..8b1378917 100644 --- a/readme.md +++ b/readme.md @@ -1,33 +1 @@ -# Gamba Platform -> This is a mirrored repo from the [Gamba monorepo](https://github.com/gamba-labs/gamba/tree/main/apps/demo). - -An easily customizable Solana casino template featuring multiple on-chain games. - -Simply fork the repository, provide your own Solana address, and begin collecting fees on every bet made via your frontend. No liquidity is needed from your end as it is already provided on Gamba. - -![Preview](https://github.com/gamba-labs/platform/assets/128392411/1d0fe906-c0e7-4a8d-aa2f-365cf7d3f8f5) - -## Features - -* Multiple customizable on-chain games - -* Custom SPL tokens - -* Provably fair results - -* Bonuses - -## Quick Setup - -1. [Fork this repository](https://github.com/gamba-labs/platform/generate). - -2. [Connect your forked repo and deploy on Vercel](https://vercel.com/new). - -3. Update the values in src/constants.ts - -## More - -[Discord](https://discord.com/invite/xjBsW3e8fK) - -[NextJS version by BankkRoll](https://github.com/BankkRoll/Gamba-V2-Next.js) diff --git a/src/App.tsx b/src/App.tsx index 0c8391efa..ea9851de2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -70,6 +70,7 @@ export default function App() {
+
diff --git a/src/components/LeaderboardsModal.styles.ts b/src/components/LeaderboardsModal.styles.ts new file mode 100644 index 000000000..3f1d3dd1a --- /dev/null +++ b/src/components/LeaderboardsModal.styles.ts @@ -0,0 +1,120 @@ +// src/components/LeaderboardsModal.styles.ts +import styled, { css } from 'styled-components' + +/* ───── Base modal‑content shell (identical to StakingModal) ───── */ +export const ModalContent = styled.div` + display: flex; + flex-direction: column; + gap: 1.5rem; + padding: 1.5rem; + width: 100%; + max-width: 420px; /* same width as staking modal */ + margin: auto; + + /* let the outer wrapper (#15151f, 10‑px radius) provide the “glass”; + we only need scroll behaviour */ + max-height: calc(90vh - 4rem); + overflow-y: auto; + + &::-webkit-scrollbar { width: 6px; } + &::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; } + &::-webkit-scrollbar-track { background: transparent; } + + @media (max-width: 480px) { + padding: 1rem; + max-height: calc(95vh - 2rem); + } +` + +/* ───── Header ───── */ +export const HeaderSection = styled.div`text-align:center;` + +export const Title = styled.h1` + font-size: 1.5rem; + font-weight: 600; + color: #fff; + margin: 0 0 .5rem 0; +` + +export const Subtitle = styled.p` + font-size: .9rem; + color: #a0a0a0; + margin: 0; +` + +/* ───── Tabs (same palette as staking) ───── */ +export const TabRow = styled.div` + display:flex; gap:4px; + background: rgba(255,255,255,0.05); + border-radius:10px; + padding:4px; + border:1px solid rgba(255,255,255,0.08); + margin:.5rem 0 1rem; +` + +export const TabButton = styled.button<{ $selected:boolean }>` + flex:1; padding:.75rem 1rem; + border:none; background:transparent; + color:#a0a0a0; font-size:.95rem; font-weight:500; + border-radius:8px; cursor:pointer; + transition:background .2s,color .2s; + + &:hover:not(:disabled){ + ${({ $selected })=>!$selected && css` + background:rgba(255,255,255,0.08); color:#fff; + `} + } + ${({ $selected })=>$selected && css` + background:rgba(255,255,255,0.15); color:#fff; font-weight:600; + `} + &:disabled{ opacity:.5; cursor:not-allowed; } +` + +/* ───── Leaderboard list ───── */ +export const LeaderboardList = styled.div` + display:flex; flex-direction:column; gap:.5rem; +` + +export const ListHeader = styled.div` + display:flex; align-items:center; + padding:.5rem 1rem; + font-size:.8rem; color:#a0a0a0; text-transform:uppercase; letter-spacing:.5px; + border-bottom:1px solid rgba(255,255,255,0.1); margin-bottom:.5rem; +` +export const HeaderRank = styled.div`flex:0 0 50px; text-align:center;` +export const HeaderPlayer = styled.div`flex:1; padding-left:.5rem;` +export const HeaderVolume = styled.div`flex:0 0 100px; text-align:right;` + +export const RankItem = styled.div<{ $isTop3?:boolean }>` + display:flex; align-items:center; + padding:.75rem 1rem; + background:rgba(255,255,255,0.03); + border:1px solid rgba(255,255,255,0.06); + border-radius:8px; + transition:background .2s,border-color .2s; + &:hover{ background:rgba(255,255,255,0.08); border-color:rgba(255,255,255,0.15); } + ${({ $isTop3 })=>$isTop3 && css``} +` + +export const RankNumber = styled.div<{ rank:number }>` + flex:0 0 50px; font-weight:600; font-size:.9rem; color:#fff; text-align:center; + ${({ rank })=>rank===1 && css`&:before{content:'🥇';margin-right:.5em;font-size:1.1em;}color:#ffd700;`} + ${({ rank })=>rank===2 && css`&:before{content:'🥈';margin-right:.5em;font-size:1.1em;}color:#c0c0c0;`} + ${({ rank })=>rank===3 && css`&:before{content:'🥉';margin-right:.5em;font-size:1.1em;}color:#cd7f32;`} +` +export const PlayerInfo = styled.div` + flex:1; padding-left:.5rem; font-size:.95rem; color:#eee; + white-space:nowrap; overflow:hidden; text-overflow:ellipsis; +` +export const VolumeAmount = styled.div` + flex:0 0 100px; text-align:right; font-size:.95rem; font-weight:500; color:#03ffa4; +` + +/* ───── States & helpers ───── */ +export const LoadingText = styled.p`text-align:center; color:#ccc; padding:2rem 0;` +export const ErrorText = styled.p`text-align:center; color:#ff8080; padding:2rem 0;` +export const EmptyStateText = styled.div`text-align:center; padding:2rem; color:#a0a0a0;` + +export const formatVolume = (v:number):string => + typeof v!=='number'||isNaN(v) ? '$NaN' + : v.toLocaleString('en-US',{style:'currency',currency:'USD',minimumFractionDigits:2,maximumFractionDigits:2}) \ No newline at end of file diff --git a/src/components/LeaderboardsModal.tsx b/src/components/LeaderboardsModal.tsx new file mode 100644 index 000000000..55b9f592c --- /dev/null +++ b/src/components/LeaderboardsModal.tsx @@ -0,0 +1,112 @@ +// src/components/LeaderboardsModal.tsx +import React, { useState } from 'react' +import { Modal } from './Modal' +import { + useLeaderboardData, + Period, + Player, // exported from the hook +} from '../hooks/useLeaderboardData' + +import { + ModalContent, + HeaderSection, + Title, + Subtitle, + TabRow, + TabButton, + LeaderboardList, + ListHeader, + HeaderRank, + HeaderPlayer, + HeaderVolume, + RankItem, + RankNumber, + PlayerInfo, + VolumeAmount, + formatVolume, + LoadingText, + ErrorText, + EmptyStateText, +} from './LeaderboardsModal.styles' + +interface LeaderboardsModalProps { + onClose: () => void + creator: string +} + +const LeaderboardsModal: React.FC = ({ + onClose, + creator, +}) => { + const [period, setPeriod] = useState('weekly') // default + + const { + data: leaderboard, + loading, + error, + } = useLeaderboardData(period, creator) + + return ( + + + {/* ────── header ────── */} + + Leaderboard + + Top players by volume{' '} + {period === 'weekly' ? 'this week' : 'this month'} (USD) + + + + {/* ────── tabs ────── */} + + setPeriod('weekly')} + disabled={loading} + > + Weekly + + + setPeriod('monthly')} + disabled={loading} + > + Monthly + + + + {/* ────── body ────── */} + {loading ? ( + Loading... + ) : error ? ( + {error} + ) : leaderboard && leaderboard.length > 0 ? ( + + + Rank + Player + Volume (USD) + + + {leaderboard.map((entry: Player, index) => { + const rank = index + 1 + return ( + + {rank > 3 ? rank : ''} + {entry.user} + {formatVolume(entry.usd_volume)} + + ) + })} + + ) : ( + No leaderboard data for this period. + )} + + + ) +} + +export default LeaderboardsModal diff --git a/src/components/TrollBox.tsx b/src/components/TrollBox.tsx new file mode 100644 index 000000000..1efbafb8f --- /dev/null +++ b/src/components/TrollBox.tsx @@ -0,0 +1,392 @@ +// TrollBox.tsx +import React, { useState, useRef, useEffect, useMemo } from 'react' +import styled, { keyframes } from 'styled-components' +import useSWR from 'swr' +import { useWallet } from '@solana/wallet-adapter-react' +import { useWalletModal } from '@solana/wallet-adapter-react-ui' + +type Msg = { user: string; text: string; ts: number } + +const fetcher = (url: string) => fetch(url).then(r => r.json()) + +const stringToHslColor = (str: string, s: number, l: number): string => { + let hash = 0 + for (let i = 0; i < str.length; i++) { + hash = str.charCodeAt(i) + ((hash << 5) - hash) + } + return `hsl(${hash % 360}, ${s}%, ${l}%)` +} + +const MinimizeIcon = () => ( + + + +) + +const ChatIcon = () => ( + + + +) + +const fadeIn = keyframes` + from { opacity: 0; transform: translateY(5px); } + to { opacity: 1; transform: translateY(0); } +` + +const ExpandIconWrapper = styled.div` + display: flex; + align-items: center; + justify-content: center; +` + +const Wrapper = styled.div<{ $isMinimized: boolean }>` + position: fixed; + bottom: 16px; + right: 16px; + z-index: 998; + border-radius: ${({ $isMinimized }) => $isMinimized ? '50%' : '16px'}; + background: ${({ $isMinimized }) => $isMinimized ? '#7289da' : '#2f3136'}; + border: 1px solid ${({ $isMinimized }) => $isMinimized ? 'rgba(255,255,255,0.3)' : 'rgba(255,255,255,0.1)'}; + color: #eee; + font-size: 1rem; + box-shadow: 0 8px 20px rgba(0,0,0,0.3); + ${({ $isMinimized }) => !$isMinimized && `backdrop-filter: blur(10px);`} + overflow: hidden; + display: flex; + flex-direction: column; + cursor: ${({ $isMinimized }) => $isMinimized ? 'pointer' : 'default'}; + transition: width 0.3s, height 0.3s, max-height 0.3s, border-radius 0.3s, background 0.3s; + + ${({ $isMinimized }) => $isMinimized + ? ` + width: 56px; + height: 56px; + max-height: 56px; + justify-content: center; + align-items: center; + color: #fff; + & > *:not(${ExpandIconWrapper}) { display: none; } + ` + : ` + width: 100%; + max-width: 320px; + max-height: 60vh; + min-height: 180px; + `} + + @media (min-width: 480px) { + ${({ $isMinimized }) => !$isMinimized && ` + max-width: 400px; + max-height: 600px; + `} + } +` + +const ContentContainer = styled.div<{ $isMinimized: boolean }>` + display: flex; + flex-direction: column; + flex-grow: 1; + min-height: 0; + opacity: ${({ $isMinimized }) => $isMinimized ? 0 : 1}; + transition: opacity 0.2s; + pointer-events: ${({ $isMinimized }) => $isMinimized ? 'none' : 'auto'}; +` + +const Header = styled.div` + padding: 15px 20px; + border-bottom: 1px solid rgba(255,255,255,0.08); + display: flex; + align-items: center; + justify-content: space-between; + background: #202225; + color: #fff; + cursor: pointer; +` + +const HeaderTitle = styled.span` + flex-grow: 1; + font-size: 1.4rem; + font-weight: bold; + display: flex; + align-items: center; +` + +const OnlineStatus = styled.div` + width: 10px; + height: 10px; + border-radius: 50%; + background-color: #28a745; + margin-left: 10px; +` + +const HeaderStatus = styled.span` + font-size:0.85rem; + color:#a0a0a0; + opacity:0.8; + margin:0 10px; +` + +const MinimizeButton = styled.button` + background:none; + border:none; + color:#a0a0a0; + padding:5px; + cursor:pointer; + border-radius:4px; + &:hover { background:rgba(255,255,255,0.1); color:#fff; } +` + +const Log = styled.div` + flex:1; + overflow-y:auto; + padding:20px 25px; + display:flex; + flex-direction:column; + gap:1rem; + min-height:200px; + background: rgba(47, 49, 54, 0.8); + border-radius: 10px; + margin-top: 10px; + &::-webkit-scrollbar { width:8px; } + &::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.2); border-radius:3px; } +` + +const MessageItem = styled.div<{ $isOwn?: boolean }>` + line-height:1.6; + animation:${fadeIn} 0.3s ease-out; + background: ${({ $isOwn }) => $isOwn ? '#7289da' : '#40444b'}; + border-radius: 8px; + padding: 12px 16px; + max-width: 85%; + color: white; + margin-bottom: 5px; + align-self: ${({ $isOwn }) => $isOwn ? 'flex-end' : 'flex-start'}; +` + +const Username = styled.strong<{ userColor: string }>` + font-weight:600; + color:${p => p.userColor}; + margin-right:0.5em; +` + +const Timestamp = styled.span` + font-size:0.85em; + color: #aaa; + opacity:1; + margin-left:0.5em; +` + +const InputRow = styled.div` + display:flex; + border-top:1px solid rgba(255,255,255,0.08); + background:#202225; + flex-shrink:0; + align-items: center; + padding: 10px 15px; +` + +const TextInput = styled.input` + flex:1; + background:#40444b; + border:none; + padding:15px 20px; + color:#fff; + outline:none; + font-size:1.1rem; + border-radius: 10px; + &::placeholder { color:#777; opacity:0.8; } +` + +const SendBtn = styled.button` + background:none; + border:none; + padding:0 20px; + cursor:pointer; + font-weight:600; + color:#fff; + font-size:1.1rem; + &:hover:not(:disabled) { background:rgba(255,255,255,0.1); } + &:active:not(:disabled) { background:rgba(255,255,255,0.2); transform:scale(0.98); } + &:disabled { opacity:0.5; cursor:not-allowed; } +` + +const LoadingText = styled.div` + text-align:center; + color:#a0a0a0; + padding:2rem 0; + font-style:italic; + font-size:1rem; +` + +const MessageHeader = styled.div` + display: flex; + align-items: center; + justify-content: flex-start; + margin-bottom: 6px; + flex-wrap: wrap; +` + +const MessageText = styled.div` + font-size: 1rem; + line-height: 1.5; + white-space: pre-wrap; + word-break: break-word; +` + +const Badge = styled.span` + background: #8e44ad; + color: white; + font-size: 0.75rem; + font-weight: 600; + padding: 2px 6px; + border-radius: 4px; + margin: 0 8px; + text-transform: uppercase; + letter-spacing: 0.5px; +` + +export default function TrollBox() { + const { publicKey, connected } = useWallet() + const walletModal = useWalletModal() + const [isMinimized, setIsMinimized] = useState(false) + const [cooldown, setCooldown] = useState(0) + + const anonFallback = useMemo( + () => 'anon' + Math.floor(Math.random() * 1e4).toString().padStart(4, '0'), + [], + ) + const userName = connected && publicKey + ? publicKey.toBase58().slice(0, 6) + : anonFallback + + const swrKey = isMinimized || (typeof document !== 'undefined' && document.hidden) + ? null : '/api/chat' + const { data: messages = [], error, mutate } = useSWR( + swrKey, fetcher, + { refreshInterval: 8000, dedupingInterval: 7500 }, + ) + + const [text, setText] = useState('') + const [isSending, setIsSending] = useState(false) + const logRef = useRef(null) + const inputRef = useRef(null) + + const userColors = useMemo(() => { + const map: Record = {} + messages.forEach(m => { + if (!map[m.user]) map[m.user] = stringToHslColor(m.user, 70, 75) + }) + if (!map[userName]) map[userName] = stringToHslColor(userName, 70, 75) + return map + }, [messages, userName]) + + async function send() { + if (!connected) return walletModal.setVisible(true) + const txt = text.trim() + if (!txt || isSending || cooldown > 0) return + setIsSending(true) + const id = Date.now() + mutate([...messages, { user: userName, text: txt, ts: id }], false) + setText('') + try { + await fetch('/api/chat', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ user: userName, text: txt }), + }) + mutate() + setCooldown(5) + } catch (e) { + console.error(e) + mutate() + } finally { + setIsSending(false) + inputRef.current?.focus() + } + } + + useEffect(() => { + if (!isMinimized && logRef.current) { + logRef.current.scrollTo({ top: logRef.current.scrollHeight, behavior: 'smooth' }) + } + }, [messages, isMinimized]) + + useEffect(() => { + if (!isMinimized) { + const t = setTimeout(() => inputRef.current?.focus(), 300) + return ()=> clearTimeout(t) + } + }, [isMinimized]) + + useEffect(() => { + if (cooldown <= 0) return + const timer = setTimeout(() => setCooldown(cooldown - 1), 1000) + return () => clearTimeout(timer) + }, [cooldown]) + + const fmtTime = (ts:number) => + ts > Date.now() - 5000 + ? 'sending…' + : new Date(ts).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) + + const toggleMinimize = () => setIsMinimized(v => !v) + + return ( + + {isMinimized && ( + + + + )} + +
+ + #banabets-chat + + + + {messages.length ? `${messages.length} msgs` : 'Connecting…'} + + +
+ + {!messages.length && !error && Loading messages…} + {error && Error loading chat.} + {messages.map((m, i) => ( + + + + {m.user.slice(0, 6)} + + Guest + {fmtTime(m.ts)} + + {m.text} + + ))} + + + setText(e.target.value)} + onClick={ () => !connected && walletModal.setVisible(true)} + onKeyDown={ e =>{ if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault(); send() }}} + disabled={isSending || !swrKey} + maxLength={200} + /> + 0 || !text.trim() || !swrKey} + > + { isSending ? '…' + : cooldown > 0 ? `Wait ${cooldown}s` : 'Send' } + + +
+
+ ) +} diff --git a/src/constants.ts b/src/constants.ts index 77369e49c..1137998be 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -2,27 +2,27 @@ import { PublicKey } from '@solana/web3.js' import { FAKE_TOKEN_MINT, PoolToken, TokenMeta, makeHeliusTokenFetcher } from 'gamba-react-ui-v2' // Get RPC from the .env file or default to the public RPC. -export const RPC_ENDPOINT = import.meta.env.VITE_RPC_ENDPOINT ?? 'https://api.mainnet-beta.solana.com' +export const RPC_ENDPOINT = import.meta.env.VITE_RPC_ENDPOINT ?? 'https://mainnet.helius-rpc.com/?api-key=7b05747c-b100-4159-ba5f-c85e8c8d3997' // Solana address that will receive fees when somebody plays on this platform export const PLATFORM_CREATOR_ADDRESS = new PublicKey( - 'V2grJiwjs25iJYqumbHyKo5MTK7SFqZSdmoRaj8QWb9', + 'Etnd3K8ZkMoUivezmxxaRkZBvVFTAvuQftpfvLyjhjBp', ) // Gamba explorer URL - Appears in RecentPlays -export const EXPLORER_URL = 'https://explorer.gamba.so' +export const EXPLORER_URL = 'https://solscan.io' // Platform URL - Appears in ShareModal -export const PLATFORM_SHARABLE_URL = 'play.gamba.so' +export const PLATFORM_SHARABLE_URL = 'banabets.com' // Creator fee (in %) -export const PLATFORM_CREATOR_FEE = 0.01 // 1% !!max 5%!! +export const PLATFORM_CREATOR_FEE = 0.02 // 1% !!max 5%!! // Jackpot fee (in %) -export const PLATFORM_JACKPOT_FEE = 0.001 // 0.1% +export const PLATFORM_JACKPOT_FEE = 0.002 // 0.1% // Referral fee (in %) -export const PLATFORM_REFERRAL_FEE = 0.0025 // 0.25% +export const PLATFORM_REFERRAL_FEE = 0.2 // 0.25% /** If the user should be able to revoke an invite after they've accepted an invite */ export const PLATFORM_ALLOW_REFERRER_REMOVAL = true @@ -39,15 +39,11 @@ const lp = (tokenMint: PublicKey | string, poolAuthority?: PublicKey | string): * For private pools, add the creator of the Liquidity Pool as a second argument */ export const POOLS = [ - // Fake token: - lp(FAKE_TOKEN_MINT), + // SOL: lp('So11111111111111111111111111111111111111112'), // USDC: lp('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'), - // Wormhole: - lp('85VBFQZC9TZkfaptBWjvUw7YbZjy52A6mjtPGjstQAmQ'), - lp('H8cstTfTxPEm5qP3UXgga8Bdzm2MCDGAghJTgovPy6Y1', 'H83nsJJe11WY7TjhiVoDq5xmiYs7rU2iY4FweJuahVz2'), ] // The default token to be selected @@ -60,11 +56,20 @@ export const DEFAULT_POOL = POOLS[0] export const TOKEN_METADATA: (Partial & {mint: PublicKey})[] = [ { mint: FAKE_TOKEN_MINT, - name: 'Fake', - symbol: 'FAKE', - image: '/fakemoney.png', + name: 'Banabets', + symbol: 'Ban', + image: '/logocasino.png', baseWager: 1e9, decimals: 9, + usdPrice: 1, + }, + { + mint: new PublicKey('JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN'), + name: 'JUP', + symbol: 'JUP', + image: 'https://s2.coinmarketcap.com/static/img/coins/64x64/29210.png', + baseWager: 1e6, + decimals: 6, usdPrice: 0, }, { @@ -105,3 +110,6 @@ export const TOKEN_METADATA_FETCHER = ( } } )() + +export const ENABLE_LEADERBOARD = true +export const ENABLE_TROLLBOX = true // Requires setup in vercel (check tutorial in discord) diff --git a/src/games/CryptoChartGame/README.md b/src/games/CryptoChartGame/README.md new file mode 100644 index 000000000..f59c338f0 --- /dev/null +++ b/src/games/CryptoChartGame/README.md @@ -0,0 +1,50 @@ + +# Crypto Chart Game + +Este módulo es un juego tipo Crash pero con temática de **gráfica de criptomonedas**, animaciones de velas japonesas y la misma mecánica base. + +## 📂 Archivos incluidos + +- `index.tsx`: Lógica principal del juego. +- `styles.ts`: Estilos para la gráfica y las velas. +- `utils.ts`: Función auxiliar `calculateBetArray`. +- `crash.mp3`, `music.mp3`, `win.mp3`: Archivos de sonido (placeholders, reemplaza por los tuyos). + +## 🚀 Cómo integrarlo + +1️⃣ **Ubicación sugerida:** +Copia la carpeta `CryptoChartGame` en `src/games/`. + +2️⃣ **Importar el juego:** +En tu archivo donde listas los juegos (ej: `src/games/index.tsx`), añade: + +```ts +import CryptoChartGame from './CryptoChartGame' +``` + +Y en tu lista de juegos: + +```js +{ name: 'Crypto Chart Game', component: CryptoChartGame } +``` + +3️⃣ **Ajustar rutas:** +Si tienes un `Slider` ya creado en otra carpeta, ajusta esta línea en `index.tsx`: + +```ts +import CustomSlider from './Slider' +``` + +Para apuntar a la ubicación correcta. + +4️⃣ **Sonidos:** +Reemplaza los archivos `.mp3` por sonidos reales si lo deseas. + +5️⃣ **Corre tu proyecto:** +¡Y listo para probar la nueva experiencia cripto! 📈🕯️ + +--- + +🔧 **Requisitos:** +- React + Vite +- `gamba-react` y `styled-components` instalados. diff --git a/src/games/CryptoChartGame/Slider.tsx b/src/games/CryptoChartGame/Slider.tsx new file mode 100644 index 000000000..b4e297591 --- /dev/null +++ b/src/games/CryptoChartGame/Slider.tsx @@ -0,0 +1,35 @@ + +import React from 'react' + +type SliderProps = { + value: number + onChange: (value: number) => void + min?: number + max?: number + step?: number +} + +const CustomSlider: React.FC = ({ + value, + onChange, + min = 1.1, + max = 10, + step = 0.1, +}) => { + return ( +
+ onChange(parseFloat(e.target.value))} + style={{ width: '100%' }} + /> +
{value.toFixed(2)}x
+
+ ) +} + +export default CustomSlider diff --git a/src/games/CryptoChartGame/crash.mp3 b/src/games/CryptoChartGame/crash.mp3 new file mode 100644 index 000000000..e69de29bb diff --git a/src/games/CryptoChartGame/index.tsx b/src/games/CryptoChartGame/index.tsx new file mode 100644 index 000000000..c51b47916 --- /dev/null +++ b/src/games/CryptoChartGame/index.tsx @@ -0,0 +1,215 @@ + +import { GambaUi, useGame, useWagerInput } from 'gamba-react-ui-v2' +import React from 'react' +import CustomSlider from './Slider' +import { + ChartWrapper, + ScreenWrapper, +} from './styles' +import { calculateBetArray } from './utils' + +export default function CryptoChartGame() { + const [wager, setWager] = useWagerInput() + const [multiplierTarget, setMultiplierTarget] = React.useState(1.5) + const [currentMultiplier, setCurrentMultiplier] = React.useState(0) + const [basePrice] = React.useState(160) + const [gameState, setGameState] = React.useState<'idle' | 'win' | 'crash'>('idle') + const [candles, setCandles] = React.useState([]) + const [finalMultiplier, setFinalMultiplier] = React.useState(0) + + const viewBoxWidth = 300 + const viewBoxHeight = 100 + const animationRef = React.useRef(null) + const game = useGame() + + const generateCandle = (prevClose: number) => { + const trendUp = 0.7 + const noise = (Math.random() - 0.5) * 1.5 + + let open = prevClose + let close = prevClose + trendUp + noise + + let isRed = false + + if (Math.random() < 0.35) { + close = Math.max(1, prevClose - Math.random() * 2) + isRed = true + } + + const high = Math.max(open, close) + Math.random() * 0.5 + const low = Math.min(open, close) - Math.random() * 0.5 + + return { open, close, high, low, isRed } + } + + const animate = (current: number, target: number, win: boolean) => { + setCurrentMultiplier(current) + + setCandles(prev => { + const last = prev[prev.length - 1] + const prevClose = last ? last.close : 100 + const newCandle = generateCandle(prevClose) + return [...prev, newCandle] + }) + + if (current >= target) { + setGameState(win ? 'win' : 'crash') + setCurrentMultiplier(target) + setFinalMultiplier(target) + return + } + animationRef.current = setTimeout(() => animate(current + 0.03, target, win), 100) + } + + const calculateBiasedLowMultiplier = (targetMultiplier: number) => { + const randomValue = Math.random() + const maxPossibleMultiplier = Math.min(targetMultiplier, 12) + const exponent = randomValue > 0.95 ? 2.8 : (targetMultiplier > 10 ? 5 : 6) + const result = 1 + Math.pow(randomValue, exponent) * (maxPossibleMultiplier - 1) + return parseFloat(result.toFixed(2)) + } + + const play = async () => { + clearTimeout(animationRef.current) + setGameState('idle') + setCandles([]) + const betArray = calculateBetArray(multiplierTarget) + await game.play({ wager, bet: betArray }) + const result = await game.result() + const win = result.payout > 0 + const targetMultiplier = win ? multiplierTarget : calculateBiasedLowMultiplier(multiplierTarget) + animate(0, targetMultiplier, win) + } + + const Candle = ({ index, open, close, high, low, minPrice, maxPrice }) => { + const isUp = close >= open + const color = isUp ? '#00ff55' : '#ff0033' + const scaleY = viewBoxHeight / (maxPrice - minPrice) + + const openY = viewBoxHeight - (open - minPrice) * scaleY + const closeY = viewBoxHeight - (close - minPrice) * scaleY + const highY = viewBoxHeight - (high - minPrice) * scaleY + const lowY = viewBoxHeight - (low - minPrice) * scaleY + + const height = Math.max(10, Math.abs(closeY - openY)) + const x = index * 14 + + return ( + + + + + ) + } + + const allHighs = candles.map(c => c.high) + const allLows = candles.map(c => c.low) + const maxPrice = Math.max(...allHighs, 105) + const minPrice = Math.min(...allLows, 95) + const buffer = 10 + const adjustedMin = Math.max(0, minPrice - buffer) + const adjustedMax = maxPrice + buffer + + const statusText = gameState === 'win' + ? `MOON 🚀 (${finalMultiplier.toFixed(2)}x)` + : gameState === 'crash' + ? `RUGGED 💥 (${finalMultiplier.toFixed(2)}x)` + : '' + + const statusColor = gameState === 'win' ? '#00c853' : gameState === 'crash' ? '#d50000' : '#ffffff' + const bgColor = gameState === 'win' + ? '#003300' + : gameState === 'crash' + ? '#330000' + : '#000000' + + const offsetX = Math.max(0, candles.length * 14 - viewBoxWidth) + const simulatedPrice = (basePrice * (currentMultiplier || 1)).toFixed(2) + + return ( + <> + + + {(gameState === 'idle') && ( + + + {[...Array(5)].map((_, i) => ( + + ))} + + {candles.map((candle, idx) => ( + + ))} + + +
+
+
Solana
+
+
+ ${simulatedPrice} +
+
+ {currentMultiplier.toFixed(2)}x +
+ + )} + {(gameState === 'win' || gameState === 'crash') && ( +
+ {statusText} +
+ )} + + + + + + Play + + + ) +} diff --git a/src/games/CryptoChartGame/music.mp3 b/src/games/CryptoChartGame/music.mp3 new file mode 100644 index 000000000..e69de29bb diff --git a/src/games/CryptoChartGame/styles.tsx b/src/games/CryptoChartGame/styles.tsx new file mode 100644 index 000000000..d8dd4e0e0 --- /dev/null +++ b/src/games/CryptoChartGame/styles.tsx @@ -0,0 +1,60 @@ +import styled from 'styled-components' +import React from 'react' + +export const ScreenWrapper = styled.div` + position: relative; + width: 100%; + height: 100%; + background: black; +` + +export const ChartWrapper = styled.div` + position: relative; + width: 100%; + height: 100%; +` + +export const MultiplierText = styled.div<{ color: string }>` + position: absolute; + top: 10px; + left: 10px; + font-size: 24px; + color: ${(props) => props.color || 'white'}; +` + +export const Grid = styled.rect.attrs(() => ({ + width: '100%', + height: '100%', + fill: 'none', + stroke: '#333', + 'stroke-width': 0.5, +}))`` + +// Componente Candle para renderizar velas japonesas (en el SVG) +type CandleProps = { + x: number + open: number + close: number + high: number + low: number +} + +export const Candle: React.FC = ({ x, open, close, high, low }) => ( + + + open ? '#00ff00' : '#ff0000'} + /> + +) diff --git a/src/games/CryptoChartGame/utils.ts b/src/games/CryptoChartGame/utils.ts new file mode 100644 index 000000000..94ea4b061 --- /dev/null +++ b/src/games/CryptoChartGame/utils.ts @@ -0,0 +1,20 @@ +export const calculateBetArray = (multiplier: number) => { + const fraction = Math.round((multiplier % 1) * 100) / 100 + const repeatMultiplier = (() => { + switch (fraction) { + case 0.25: + return 4 + case 0.5: + return 2 + case 0.75: + return 4 + default: + return 1 + } + })() + const totalSum = multiplier * repeatMultiplier + const betArray = Array.from({ length: repeatMultiplier }).map(() => multiplier) + const totalElements = Math.ceil(totalSum) + const zerosToAdd = totalElements - repeatMultiplier + return betArray.concat(Array.from({ length: zerosToAdd }).map(() => 0)) +} diff --git a/src/games/CryptoChartGame/win.mp3 b/src/games/CryptoChartGame/win.mp3 new file mode 100644 index 000000000..e69de29bb diff --git a/src/games/Flip/heads.png b/src/games/Flip/heads.png index 947459aa4..f971f9cf3 100644 Binary files a/src/games/Flip/heads.png and b/src/games/Flip/heads.png differ diff --git a/src/games/Flip/tails.png b/src/games/Flip/tails.png index 267ea39f7..ea6d64387 100644 Binary files a/src/games/Flip/tails.png and b/src/games/Flip/tails.png differ diff --git a/src/games/Slots/assets/slot-emoji-cool.png b/src/games/Slots/assets/slot-emoji-cool.png index 7781af653..19615c7dd 100644 Binary files a/src/games/Slots/assets/slot-emoji-cool.png and b/src/games/Slots/assets/slot-emoji-cool.png differ diff --git a/src/games/index.tsx b/src/games/index.tsx index 596060a61..5d1ecc15d 100644 --- a/src/games/index.tsx +++ b/src/games/index.tsx @@ -1,38 +1,25 @@ + import { GameBundle } from 'gamba-react-ui-v2' import React from 'react' export const GAMES: GameBundle[] = [ - // { - // id: 'example', - // meta: { - // background: '#00ffe1', - // name: 'Example', - // image: '#', - // description: '', - // }, - // app: React.lazy(() => import('./ExampleGame')), - // }, { id: 'dice', meta: { - background: '#ff6490', + background: '#ffffffdf', name: 'Dice', image: '/games/dice.png', - description: ` - Dice challenges players to predict the outcome of a roll with a unique twist. Select a number and aim to roll below it to win. Adjusting your choice affects potential payouts, balancing risk and reward for an engaging experience. - `, + description: `Dice challenges players to predict the outcome of a roll with a unique twist. Select a number and aim to roll below it to win. Adjusting your choice affects potential payouts, balancing risk and reward.`, }, app: React.lazy(() => import('./Dice')), }, { id: 'slots', meta: { - background: '#5465ff', + background: '#000000CC', name: 'Slots', image: '/games/slots.png', - description: ` - Slots is the quintessential game of luck and anticipation. Spin the reels and match symbols to win, with potential rewards displayed upfront. A fair and exciting game, Slots offers a classic casino experience tailored for digital enjoyment. - `, + description: `Slots is the quintessential game of luck and anticipation. Spin the reels and match symbols to win, with potential rewards displayed upfront. Classic casino experience.`, }, app: React.lazy(() => import('./Slots')), }, @@ -40,11 +27,9 @@ export const GAMES: GameBundle[] = [ id: 'flip', meta: { name: 'Flip', - description: ` - Flip offers a straightforward yet thrilling gamble: choose Heads or Tails and double your money or lose it all. This simple, high-stakes game tests your luck and decision-making with every flip of the coin. - `, image: '/games/flip.png', - background: '#ffe694', + background: '#ffffffdf', + description: `Flip offers a simple gamble: choose Heads or Tails and double your money or lose it all. High-stakes and fast.`, }, app: React.lazy(() => import('./Flip')), }, @@ -53,23 +38,18 @@ export const GAMES: GameBundle[] = [ meta: { name: 'HiLo', image: '/games/hilo.png', - description: ` - HiLo is a game of foresight and luck, challenging players to guess whether the next card will be higher or lower. Make consecutive correct guesses to increase your winnings, and decide when to cash out for maximum rewards. - `, - background: '#ff4f4f', + background: '#000000CC', + description: `HiLo tests your foresight: guess if the next card is higher or lower. Consecutive correct guesses multiply your rewards.`, }, - props: { logo: '/logo.svg' }, app: React.lazy(() => import('./HiLo')), }, { id: 'mines', meta: { name: 'Mines', - description: ` - There's money hidden beneath the squares. The reward will increase the more squares you reveal, but watch out for the 5 hidden mines. Touch one and you'll go broke. You can cash out at any time. - `, image: '/games/mines.png', - background: '#8376ff', + background: '#000000CC', + description: `Reveal squares for rewards, but avoid hidden mines. Risk increases as you uncover more. Cash out anytime.`, }, app: React.lazy(() => import('./Mines')), }, @@ -78,48 +58,76 @@ export const GAMES: GameBundle[] = [ meta: { name: 'Roulette', image: '/games/roulette.png', - description: ` - Roulette brings the classic wheel-spinning game to life with a digital twist. Bet on where the ball will land and watch as the wheel decides your fate. With straightforward rules and the chance for big wins, Roulette is a timeless game of chance. - `, - background: '#1de87e', + background: '#ffffffdf', + description: `Bet on where the ball will land. Watch the wheel spin in this classic game of chance.`, }, app: React.lazy(() => import('./Roulette')), }, { id: 'plinko', meta: { - background: '#7272ff', + background: '#000000CC', image: '/games/plinko.png', name: 'Plinko', - description: ` - Plinko is played by dropping chips down a pegged board where they randomly fall into slots with varying win amounts. Each drop is a mix of anticipation and strategy, making Plinko an endlessly entertaining game of chance. - ⚠️ Under development. Results shown might be incorrect. ⚠️ - `, + description: `Drop chips down the board, watch them bounce into slots with varying win amounts. A game of luck and anticipation.`, }, app: React.lazy(() => import('./Plinko')), }, { id: 'crash', meta: { - background: '#de95e8', + background: '#ffffffdf', image: '/games/crash.png', name: 'Crash', - description: ` - Predict a multiplier target and watch a rocket attempt to reach it. If the rocket crashes before the target, the player loses; if it reaches or exceeds the target, the player wins. - `, + description: `Predict a multiplier target and watch a rocket climb. Cash out before it crashes!`, }, app: React.lazy(() => import('./CrashGame')), }, { id: 'blackjack', meta: { - background: '#084700', + background: '#000000CC', image: '/games/blackjack.png', name: 'BlackJack', + description: `A simplified blackjack: beat the dealer without exceeding 21. Quick and rewarding rounds.`, + }, + app: React.lazy(() => import('./BlackJack')), + }, + { + id: 'crypto-chart', + meta: { + background: '#000000CC', + image: '/games/cryptochart.png', + name: 'Sol Crash', + description: `A crypto-inspired twist on Crash. Watch the chart rise with candlestick animations. Cash out before it crashes.`, + }, + app: React.lazy(() => import('./CryptoChartGame')), + }, + + { + id: '', + meta: { + name: 'App Store', description: ` - A simplified blackjack game where you and the dealer each get two cards. Win 2.5x your wager with a blackjack (21 with two cards), or 2x if your total beats the dealer's without exceeding 21. Ties or lower totals result in a loss. Enjoy quick gameplay without the usual complexities. + There's money hidden beneath the squares. The reward will increase the more squares you reveal, but watch out for the 5 hidden mines. Touch one and you'll go broke. You can cash out at any time. `, + image: '/games/app.png', + background: '#000000CC', }, - app: React.lazy(() => import('./BlackJack')), + app: React.lazy(() => import('./Mines')), + }, + { + id: '', + meta: { + name: 'Play Store', + description: ` + There's money hidden beneath the squares. The reward will increase the more squares you reveal, but watch out for the 5 hidden mines. Touch one and you'll go broke. You can cash out at any time. + `, + image: '/games/app2.png', + background: '#000000CC', + }, + app: React.lazy(() => import('./Mines')), }, ] + + diff --git a/src/hooks/useLeaderboardData.ts b/src/hooks/useLeaderboardData.ts new file mode 100644 index 000000000..d0250d332 --- /dev/null +++ b/src/hooks/useLeaderboardData.ts @@ -0,0 +1,70 @@ +// src/hooks/useLeaderboardData.ts +import { useState, useEffect } from 'react'; + +export type Period = 'weekly' | 'monthly'; + +export interface Player { + user: string; + usd_volume: number; // USD volume across every token +} + +interface LeaderboardResult { + players: Player[]; +} + +// Set your API base URL (adjust if necessary) +const API_BASE_URL = 'https://api.gamba.so'; + +/** + * Fetches leaderboard data (USD volume) for a given creator + * over the chosen period. + */ +export function useLeaderboardData(period: Period, creator: string) { + const [data, setData] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + useEffect(() => { + if (!creator) return; + + const controller = new AbortController(); + const { signal } = controller; + + (async () => { + try { + setLoading(true); + setError(null); + + // Determine starting timestamp for the selected period + const now = Date.now(); + const startTime = + period === 'weekly' + ? now - 7 * 24 * 60 * 60 * 1000 // 7 days + : now - 30 * 24 * 60 * 60 * 1000; // 30 days + + const url = + `${API_BASE_URL}/players` + + `?creator=${creator}` + + `&sortBy=usd_volume` + + `&startTime=${startTime}`; + + const res = await fetch(url, { signal }); + if (!res.ok) throw new Error(await res.text()); + + const { players }: LeaderboardResult = await res.json(); + setData(players); + } catch (err: any) { + if (err.name === 'AbortError') return; // component unmounted/cancelled + console.error(err); + setError(err.message ?? 'Failed to fetch leaderboard data.'); + } finally { + setLoading(false); + } + })(); + + // Abort fetch if component unmounts or deps change + return () => controller.abort(); + }, [period, creator]); + + return { data, loading, error }; +} diff --git a/src/sections/Dashboard/GameCard.tsx b/src/sections/Dashboard/GameCard.tsx index ea03493ad..82204104f 100644 --- a/src/sections/Dashboard/GameCard.tsx +++ b/src/sections/Dashboard/GameCard.tsx @@ -19,7 +19,7 @@ const StyledGameCard = styled(NavLink)<{$small: boolean, $background: string}>` width: 100%; } - aspect-ratio: ${(props) => props.$small ? '1/.5' : '1/.6'}; + aspect-ratio: ${(props) => props.$small ? '1/.9' : '1/.9'}; background-size: cover; border-radius: 10px; @@ -51,10 +51,10 @@ const StyledGameCard = styled(NavLink)<{$small: boolean, $background: string}>` top: 0; width: 100%; height: 100%; - background-size: 90% auto; + background-size: 100% auto; background-position: center; background-repeat: no-repeat; - transform: scale(.9); + transition: transform .2s ease; } diff --git a/src/sections/Dashboard/WelcomeBanner.tsx b/src/sections/Dashboard/WelcomeBanner.tsx index 7115cad31..5fe617cdc 100644 --- a/src/sections/Dashboard/WelcomeBanner.tsx +++ b/src/sections/Dashboard/WelcomeBanner.tsx @@ -24,19 +24,20 @@ const Buttons = styled.div` padding-top: 0!important; } - & > button { - border: none; - width: 100%; - border-radius: 10px; - padding: 10px; - background: #ffffffdf; - transition: background-color .2s ease; - color: black; - cursor: pointer; - &:hover { - background: white; - } +& > button { + border: none; + width: 100%; + border-radius: 10px; + padding: 10px; + background: transparent; + transition: background-color .2s ease; + color: white; +font-size: 17px; + cursor: pointer; + &:hover { + background: transparent; } +} ` const Welcome = styled.div` @@ -61,10 +62,10 @@ const Welcome = styled.div` } } - background: linear-gradient(-45deg, #ffb07c, #ff3e88, #2969ff, #ef3cff, #ff3c87); - background-size: 300% 300%; - animation: welcome-fade-in .5s ease, backgroundGradient 30s ease infinite; - border-radius: 10px; + background-image: url(https://iili.io/30VoMKJ.png); + background-size: cover; + background-position: center; + border-radius: 20px; position: relative; overflow: hidden; display: flex; @@ -115,22 +116,28 @@ export function WelcomeBanner() { return (
-

Welcome to Gamba v2 👋

-

- A fair, simple and decentralized casino on Solana. -

+
+ㅤ +ㅤ +ㅤ +

GET THOSE SOLANA'S WITH YOUR BANANAS! 🍌

+
- - - +
+ ) } diff --git a/src/sections/Header.tsx b/src/sections/Header.tsx index fe025e060..0a934b557 100644 --- a/src/sections/Header.tsx +++ b/src/sections/Header.tsx @@ -1,4 +1,10 @@ -import { GambaUi, TokenValue, useCurrentPool, useGambaPlatformContext, useUserBalance } from 'gamba-react-ui-v2' +import { + GambaUi, + TokenValue, + useCurrentPool, + useGambaPlatformContext, + useUserBalance, +} from 'gamba-react-ui-v2' import React from 'react' import { NavLink } from 'react-router-dom' import styled from 'styled-components' @@ -6,44 +12,174 @@ import { Modal } from '../components/Modal' import { PLATFORM_JACKPOT_FEE } from '../constants' import TokenSelect from './TokenSelect' import { UserButton } from './UserButton' +import { useMediaQuery } from '../hooks/useMediaQuery' -const Bonus = styled.button` - all: unset; - cursor: pointer; - color: #003c00; +const StyledHeader = styled.div` + position: fixed; + top: 8px; + left: 50%; + transform: translateX(-50%); + z-index: 1000; + + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + + width: 90%; + max-width: 1400px; + height: 100px; + padding: 0 32px; + + background: rgba(0, 0, 0, 0.5); + backdrop-filter: blur(18px); + border-radius: 16px; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); + + @media (max-width: 600px) { + width: 95%; + flex-direction: column; + height: auto; + padding: 8px 16px 4px 16px; + margin-bottom: -20px; + top: 12px; + } +` + +const Logo = styled(NavLink)` + display: flex; + align-items: center; + gap: 8px; + min-width: 0; + text-decoration: none; + + img { + height: 38px; + transition: height 0.3s ease; + } + + @media (max-width: 600px) { + justify-content: center; + width: 100%; + margin-bottom: 4px; + + img { + height: 50px; + margin: 0 auto; + display: block; + } + } +` + +const Bonus = styled.button<{ noBackground?: boolean }>` + background-color: ${({ noBackground }) => (noBackground ? 'transparent' : '#1f1f1f')}; + color: #fff; + border: none; border-radius: 10px; - background: #03ffa4; - padding: 2px 10px; - font-size: 12px; - text-transform: uppercase; - font-weight: bold; - transition: background-color .2s; + padding: 6px 12px; + font-size: 13px; + font-weight: 600; + display: flex; + align-items: center; + gap: 6px; + cursor: pointer; + transition: background 0.2s; + &:hover { - background: white; + background-color: ${({ noBackground }) => (noBackground ? 'transparent' : '#333')}; + } + + @media (max-width: 600px) { + padding: 4px 8px; + font-size: 12px; } ` -const StyledHeader = styled.div` +const JackpotBonus = styled(Bonus)` + font-size: 18px; + font-weight: 700; + padding: 8px 16px; + background: linear-gradient(90deg, #fbbf24, #f59e0b); + color: #000; + box-shadow: 0 0 8px rgba(251, 191, 36, 0.8); + border-radius: 12px; + + &:hover { + background: linear-gradient(90deg, #f59e0b, #d97706); + box-shadow: 0 0 12px rgba(217, 119, 6, 1); + } + + @media (max-width: 1024px) { + font-size: 14px; + padding: 6px 12px; + background: #1f1f1f; + color: #fff; + box-shadow: none; + } +` + +const RightGroup = styled.div` display: flex; align-items: center; - justify-content: space-between; - width: 100%; - padding: 10px; - background: rgba(33, 34, 51, 0.9); + gap: 10px; + min-width: 0; + flex-wrap: nowrap; + overflow-x: visible; + + &::-webkit-scrollbar { + display: none; + } + + @media (max-width: 600px) { + width: 100%; + justify-content: center; + margin-top: 0; + overflow-x: visible; + flex-wrap: nowrap; + } +` + +const PopupContainer = styled.div` position: fixed; - background: #000000CC; - backdrop-filter: blur(20px); - top: 0; - left: 0; - z-index: 1000; - backdrop-filter: blur(20px); + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 512px; + height: 512px; + background: rgba(0, 0, 0, 0.7); + border-radius: 15px; + padding: 20px; + text-align: center; + z-index: 2000; ` -const Logo = styled(NavLink)` - height: 35px; - margin: 0 10px; - & > img { - height: 100%; +const CloseButton = styled.button` + position: absolute; + top: 10px; + right: 10px; + background: transparent; + color: white; + border: none; + font-size: 20px; + cursor: pointer; + + &:hover { + color: #ccc; + } +` + +const ClaimButton = styled.button` + background-color: #333; + border: none; + color: white; + padding: 10px 20px; + font-size: 16px; + cursor: pointer; + border-radius: 5px; + margin-top: 20px; + + &:hover { + background-color: #555; } ` @@ -51,8 +187,11 @@ export default function Header() { const pool = useCurrentPool() const context = useGambaPlatformContext() const balance = useUserBalance() + const isDesktop = useMediaQuery('lg') + const [bonusHelp, setBonusHelp] = React.useState(false) const [jackpotHelp, setJackpotHelp] = React.useState(false) + const [showDailyChest, setShowDailyChest] = React.useState(false) return ( <> @@ -62,16 +201,15 @@ export default function Header() {

You have worth of free plays. This bonus will be applied automatically when you play.

-

- Note that a fee is still needed from your wallet for each play. -

+

Note that a fee is still needed from your wallet for each play.

)} + {jackpotHelp && ( setJackpotHelp(false)}>

Jackpot 💰

- There{'\''}s in the Jackpot. + There's in the Jackpot.

The Jackpot is a prize pool that grows with every bet made. As the Jackpot grows, so does your chance of winning. Once a winner is selected, the value of the Jackpot resets and grows from there until a new winner is selected. @@ -80,7 +218,7 @@ export default function Header() { You will be paying a maximum of {(PLATFORM_JACKPOT_FEE * 100).toLocaleString(undefined, { maximumFractionDigits: 4 })}% for each wager for a chance to win.

)} + + {showDailyChest && ( + + setShowDailyChest(false)}>× +

Daily Chest

+

Claim your daily chest to get more chances to win!

+ alert('Claimed Daily Chest!')}>Claim +
+ )} + -
- - Gamba logo - -
-
+ + Gamba logo + + + {pool.jackpotBalance > 0 && ( - setJackpotHelp(true)}> - 💰 - + isDesktop ? ( + setJackpotHelp(true)}> + 💰 + + ) : ( + setJackpotHelp(true)}> + 💰 + + ) )} {balance.bonusBalance > 0 && ( setBonusHelp(true)}> @@ -107,7 +260,7 @@ export default function Header() { )} -
+
) diff --git a/src/sections/RecentPlays/RecentPlays.styles.ts b/src/sections/RecentPlays/RecentPlays.styles.ts index 9842bcc77..009a33e49 100644 --- a/src/sections/RecentPlays/RecentPlays.styles.ts +++ b/src/sections/RecentPlays/RecentPlays.styles.ts @@ -2,65 +2,71 @@ import styled, { keyframes } from 'styled-components' const jackpotGradient = keyframes` 0% { - background: #6666ff; + background: linear-gradient(90deg, #ffd700, #ff4500); } - 15% { - background: #0099ff; + 25% { + background: linear-gradient(90deg, #ff4500, #32cd32); } - 30% { - background: #00ff55; - } - 45% { - background: #ffe44d; - } - 60% { - background: #ff5c4d; + 50% { + background: linear-gradient(90deg, #32cd32, #1e90ff); } 75% { - background: #ff3399; - } - 90% { - background: #6666ff; + background: linear-gradient(90deg, #1e90ff, #ffd700); } 100% { - background: #6666ff; + background: linear-gradient(90deg, #ffd700, #ff4500); } ` const skeletonAnimation = keyframes` 0%, 100% { - background-color: #cccccc11; + background-color: #555; } 50% { - background-color: #cccccc22; + background-color: #777; } ` export const Container = styled.div` width: 100%; - position: relative; display: flex; flex-direction: column; - gap: 10px; + gap: 12px; + padding: 10px; ` export const Profit = styled.div<{$win: boolean}>` display: flex; - gap: .5em; align-items: center; - background: ${props => props.$win ? '#00ff4021' : '#ffffff11'}; - border-radius: 10px; - padding: 2px 5px; + gap: 0.5em; + background: none; /* SIN color de fondo */ + border: 2px solid ${props => props.$win ? 'green' : 'red'}; + border-radius: 12px; + padding: 12px 16px; + font-size: 16px; + color: #fff; + font-weight: bold; + box-shadow: 0 0 10px rgba(255, 215, 0, 0.7), 0 0 5px rgba(0, 0, 0, 0.5); + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + transition: transform 0.2s; + &:hover { + transform: scale(1.05); + } ` export const Jackpot = styled.div` - animation: ${jackpotGradient} 1s linear 0s infinite; + animation: ${jackpotGradient} 2s linear infinite; display: flex; - gap: .5em; align-items: center; - color: black; - border-radius: 10px; - padding: 1px 5px; + gap: 0.5em; + border: 2px solid gold; + border-radius: 16px; + padding: 12px 16px; + font-size: 18px; + color: #fff; + font-weight: 900; + box-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6); + text-shadow: 0 2px 3px rgba(0, 0, 0, 0.7); ` export const Recent = styled.button` @@ -68,22 +74,27 @@ export const Recent = styled.button` cursor: pointer; display: flex; align-items: center; - gap: .5em; - text-wrap: nowrap; - padding: 10px; - color: unset; - text-decoration: none; justify-content: space-between; + gap: 0.5em; + padding: 10px 16px; + font-size: 16px; + color: #fff; border-radius: 10px; - background: #0f121b; + background: none; /* SIN color de fondo */ + border: 2px solid gold; + font-weight: bold; + box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); + transition: transform 0.2s; &:hover { - background: #131724; + transform: scale(1.05); } ` export const Skeleton = styled.div` - height: 40px; + height: 50px; width: 100%; border-radius: 10px; - animation: ${skeletonAnimation} 1s infinite; + animation: ${skeletonAnimation} 1.5s infinite; + border: 2px solid gold; + box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); ` diff --git a/src/sections/RecentPlays/RecentPlays.tsx b/src/sections/RecentPlays/RecentPlays.tsx index 70d1a5533..3be3573a6 100644 --- a/src/sections/RecentPlays/RecentPlays.tsx +++ b/src/sections/RecentPlays/RecentPlays.tsx @@ -8,7 +8,7 @@ import { Container, Jackpot, Profit, Recent, Skeleton } from './RecentPlays.styl import { ShareModal } from './ShareModal' import { useRecentPlays } from './useRecentPlays' -function TimeDiff({ time, suffix = 'ago' }: {time: number, suffix?: string}) { +function TimeDiff({ time, suffix = 'ago' }: { time: number, suffix?: string }) { const diff = (Date.now() - time) return React.useMemo(() => { const seconds = Math.floor(diff / 1000) @@ -24,7 +24,7 @@ function TimeDiff({ time, suffix = 'ago' }: {time: number, suffix?: string}) { }, [diff]) } -function RecentPlay({ event }: {event: GambaTransaction<'GameSettled'>}) { +function RecentPlay({ event }: { event: GambaTransaction<'GameSettled'> }) { const data = event.data const token = useTokenMeta(data.tokenMint) const md = useMediaQuery('md') @@ -38,7 +38,17 @@ function RecentPlay({ event }: {event: GambaTransaction<'GameSettled'>}) { return ( <> - +
{data.user.toBase58().substring(0, 4)}...
@@ -90,9 +100,6 @@ export default function RecentPlays() { ), )} - window.open(`${EXPLORER_URL}/platform/${PLATFORM_CREATOR_ADDRESS.toString()}`)}> - 🚀 Explorer - ) } diff --git a/src/sections/RecentPlays/ShareModal.tsx b/src/sections/RecentPlays/ShareModal.tsx index 2554942f8..a461c7f77 100644 --- a/src/sections/RecentPlays/ShareModal.tsx +++ b/src/sections/RecentPlays/ShareModal.tsx @@ -2,18 +2,19 @@ import { GambaTransaction } from 'gamba-core-v2' import { GambaUi, TokenValue, useTokenMeta } from 'gamba-react-ui-v2' import React from 'react' import { useNavigate } from 'react-router-dom' -import styled from 'styled-components' +import styled, { css } from 'styled-components' import { Flex } from '../../components' import { Modal } from '../../components/Modal' -import { EXPLORER_URL, PLATFORM_SHARABLE_URL } from '../../constants' +import { EXPLORER_URL } from '../../constants' import { extractMetadata } from '../../utils' const Container = styled.div` display: grid; - gap: 10px; - padding: 20px; + gap: 20px; + padding: 15px; padding-bottom: 0; width: 100%; + position: relative; ` const Inner = styled.div` @@ -22,11 +23,59 @@ const Inner = styled.div` const Content = styled.div` border-radius: 10px; - padding: 20px; - background: linear-gradient(156deg, #52527822, #12121700); + padding: 55px; + background-image: url(https://iili.io/315va8G.webp); + background-size: cover; + background-position: center; + display: flex; + justify-content: center; + align-items: center; + position: relative; ` -export function ShareModal({ event, onClose }: {event: GambaTransaction<'GameSettled'>, onClose: () => void}) { +const ResultBox = styled.div` + background: rgba(0, 0, 0, 0.5); + border-radius: 15px; + padding: 20px 30px; + text-align: center; + max-width: 300px; +` + +const glowStyle = (color: string) => css` + color: ${color}; + text-shadow: 0 0 8px ${color}, 0 0 16px ${color}; +` + +const BigText = styled.div<{ isProfit: boolean }>` + font-size: 45px; + font-weight: bold; + ${({ isProfit }) => glowStyle(isProfit ? '#00ff00' : '#ff0000')} +` + +const BiggerText = styled.div<{ isProfit: boolean }>` + font-size: 60px; + font-weight: bold; + margin-top: 10px; + ${({ isProfit }) => glowStyle(isProfit ? '#00ff00' : '#ff0000')} +` + +const PlayText = styled.div` + position: absolute; + bottom: 10px; + left: 15px; + font-size: 16px; + color: #ffffffcc; + font-style: italic; + text-align: left; + + b { + font-weight: bold; + color: #fff; + text-shadow: 0 0 3px #000, 0 0 5px #000; + } +` + +export function ShareModal({ event, onClose }: { event: GambaTransaction<'GameSettled'>, onClose: () => void }) { const navigate = useNavigate() const { game } = extractMetadata(event) const gotoGame = () => { @@ -34,40 +83,36 @@ export function ShareModal({ event, onClose }: {event: GambaTransaction<'GameSet onClose() } const tokenMeta = useTokenMeta(event.data.tokenMint) - const ref = React.useRef(null!) const profit = event.data.payout.sub(event.data.wager).toNumber() - const percentChange = profit / event.data.wager.toNumber() + const isProfit = profit >= 0 + const multiplier = (event.data.multiplierBps / 10_000).toLocaleString() return ( onClose()}> - -
- -
= 0 ? '#9bffad' : '#ff4f4f', padding: '10px' }}> - - {profit >= 0 ? '+' : '-'} - - -
- {(event.data.multiplierBps / 10_000).toLocaleString()}x -
-
-
- + + +
+ token
-
-
- -
play on {PLATFORM_SHARABLE_URL}
-
+ + {isProfit ? '+' : '-'} + + + + {multiplier}x + + + + Play now on banabets.com + window.open(`${EXPLORER_URL}/tx/${event.signature}`, '_blank')}> - Verify + Verify Solscan Play {game?.meta?.name} diff --git a/src/styles.css b/src/styles.css index 66ae2016b..849a46de7 100644 --- a/src/styles.css +++ b/src/styles.css @@ -3,21 +3,19 @@ } :root { - --background-color: #0b0b0e; + --background-color: #121724; --text-color: #ffffff; - --gamba-ui-primary-color: #9564ff; + --gamba-ui-primary-color: #ffe42d; --gamba-ui-border-radius: 10px; - --gamba-ui-button-default-background: #0e0e16; - --gamba-ui-button-default-background-hover: #11111d; - --gamba-ui-button-default-color: white; - --gamba-ui-button-main-background: #8851ff; - --gamba-ui-button-main-color: white; - --gamba-ui-button-main-background-hover: #9564ff; - --gamba-ui-input-background: #0e0e16; + --gamba-ui-button-main-background: #ff3fdd; + --gamba-ui-button-main-color: black; + --gamba-ui-button-main-background-hover: #ff3fdd; + + --gamba-ui-input-background: #ff3fdd; --gamba-ui-input-color: #ffffff; --gamba-ui-input-background-hover: #11111d; } @@ -32,7 +30,10 @@ h1, h2 { } body { - background: var(--background-color); + background-image: url(https://iili.io/30G6512.jpg;); + background-size: cover; +background-position: auto; +background-attachment: fixed; color: var(--text-color); cursor: default; margin: 0; diff --git a/tsconfig.json b/tsconfig.json index ee48fffb8..a798f4397 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "include": ["src"], + "include": ["src", "api"], "compilerOptions": { "paths": { "@/*": ["./src/*"], diff --git a/vercel.json b/vercel.json index 1323cdac3..08753bcb1 100644 --- a/vercel.json +++ b/vercel.json @@ -1,8 +1,9 @@ { "rewrites": [ - { - "source": "/(.*)", - "destination": "/index.html" - } + + { "source": "/api/(.*)", "destination": "/api/$1" }, + + + { "source": "/(.*)", "destination": "/index.html" } ] }