From 26c346422aac33cd2dc3159f83ef819ec2649a33 Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Fri, 12 Aug 2022 10:30:10 -0600 Subject: [PATCH 1/9] Update docs to reflect the non-bias RPC provider ability (#1214) --- packages/core/README.md | 16 +++++++++++----- packages/react/README.md | 5 +++-- packages/vue/README.md | 6 ++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index 1ca34b042..34b5e98d1 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -48,7 +48,7 @@ An array of Chains that your app supports: type Chain = { id: ChainId // hex encoded string, eg '0x1' for Ethereum Mainnet namespace?: 'evm' // string indicating chain namespace. Defaults to 'evm' but will allow other chain namespaces in the future - rpcUrl: string // used for network requests + rpcUrl: string // used for network requests (eg Alchemy or Infura end point) label: string // used for display, eg Ethereum Mainnet token: TokenSymbol // the native token symbol, eg ETH, BNB, MATIC color?: string // the color used to represent the chain and will be used as a background for the icon @@ -251,6 +251,11 @@ import injectedModule from '@web3-onboard/injected-wallets' const injected = injectedModule() +// Only one RPC endpoint required per chain +const ETH_MAINNET_RPC = `https://mainnet.infura.io/v3/${INFURA_KEY}` || `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}` +const ETH_ROPSTEN_RPC = `https://ropsten.infura.io/v3/${INFURA_ID}` || `https://eth-ropsten.g.alchemy.com/v2/${ALCHEMY_KEY}` +const ETH_RINKEBY_RPC = `https://rinkeby.infura.io/v3/${INFURA_KEY}` || `https://eth-rinkeby.g.alchemy.com/v2/${ALCHEMY_KEY}` + const onboard = Onboard({ wallets: [injected], chains: [ @@ -258,19 +263,19 @@ const onboard = Onboard({ id: '0x1', token: 'ETH', label: 'Ethereum Mainnet', - rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}` + rpcUrl: ETH_MAINNET_RPC }, { id: '0x3', token: 'tROP', label: 'Ethereum Ropsten Testnet', - rpcUrl: `https://ropsten.infura.io/v3/${INFURA_ID}` + rpcUrl: ETH_ROPSTEN_RPC }, { id: '0x4', token: 'rETH', label: 'Ethereum Rinkeby Testnet', - rpcUrl: `https://rinkeby.infura.io/v3/${INFURA_ID}` + rpcUrl: ETH_RINKEBY_RPC }, { id: '0x38', @@ -580,7 +585,8 @@ const onboard = Onboard({ id: '0x1', token: 'ETH', label: 'Ethereum Mainnet', - rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}` + // Only one RPC required + rpcUrl: `https://mainnet.infura.io/v3/${INFURA_KEY}` || `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}` } ] }) diff --git a/packages/react/README.md b/packages/react/README.md index b3e61b95f..3fbee7ed5 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -25,8 +25,9 @@ const dappId = '1730eff0-9d50-4382-a3fe-89f0d34a2070' const injected = injectedModule() -const infuraKey = '' -const rpcUrl = `https://mainnet.infura.io/v3/${infuraKey}` +// Only one RPC endpoint required per chain +const rpcAPIKey = '' || '' +const rpcUrl = `https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` || `https://mainnet.infura.io/v3/${rpcAPIKey}` // initialize Onboard init({ diff --git a/packages/vue/README.md b/packages/vue/README.md index 9b0447ee9..4250ec8a6 100644 --- a/packages/vue/README.md +++ b/packages/vue/README.md @@ -17,8 +17,10 @@ import { init } from '@web3-onboard/vue' import injectedModule from '@web3-onboard/injected-wallets' const injected = injectedModule() -const infuraKey = '' -const rpcUrl = `https://mainnet.infura.io/v3/${infuraKey}` + +// Only one RPC endpoint required per chain +const rpcAPIKey = '' || '' +const rpcUrl = `https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` || `https://mainnet.infura.io/v3/${rpcAPIKey}` const web3Onboard = init({ wallets: [injected], From 08a6db0a01351732ba4e91015ef6359f6314a653 Mon Sep 17 00:00:00 2001 From: Taylor Dawson Date: Mon, 15 Aug 2022 10:22:51 -0700 Subject: [PATCH 2/9] Adds React Context Provider --- examples/with-nextjs/.eslintrc.json | 3 + examples/with-nextjs/.gitignore | 36 + examples/with-nextjs/README.md | 34 + examples/with-nextjs/next.config.js | 7 + examples/with-nextjs/package.json | 20 + examples/with-nextjs/pages/_app.js | 42 + examples/with-nextjs/pages/api/hello.js | 5 + examples/with-nextjs/pages/index.js | 60 + examples/with-nextjs/public/favicon.ico | Bin 0 -> 25931 bytes examples/with-nextjs/public/vercel.svg | 4 + examples/with-nextjs/styles/Home.module.css | 129 ++ examples/with-nextjs/styles/globals.css | 26 + examples/with-nextjs/yarn.lock | 1703 ++++++++++++++++++ packages/react/src/context.tsx | 50 + packages/react/src/hooks/index.ts | 8 + packages/react/src/hooks/useAccountCenter.ts | 6 + packages/react/src/hooks/useAppState.ts | 33 + packages/react/src/hooks/useConnectWallet.ts | 57 + packages/react/src/hooks/useNotifications.ts | 33 + packages/react/src/hooks/useSetChain.ts | 51 + packages/react/src/hooks/useSetLocale.ts | 4 + packages/react/src/hooks/useWallets.ts | 5 + packages/react/src/index.ts | 201 +-- packages/react/tsconfig.json | 1 + 24 files changed, 2327 insertions(+), 191 deletions(-) create mode 100644 examples/with-nextjs/.eslintrc.json create mode 100644 examples/with-nextjs/.gitignore create mode 100644 examples/with-nextjs/README.md create mode 100644 examples/with-nextjs/next.config.js create mode 100644 examples/with-nextjs/package.json create mode 100644 examples/with-nextjs/pages/_app.js create mode 100644 examples/with-nextjs/pages/api/hello.js create mode 100644 examples/with-nextjs/pages/index.js create mode 100644 examples/with-nextjs/public/favicon.ico create mode 100644 examples/with-nextjs/public/vercel.svg create mode 100644 examples/with-nextjs/styles/Home.module.css create mode 100644 examples/with-nextjs/styles/globals.css create mode 100644 examples/with-nextjs/yarn.lock create mode 100644 packages/react/src/context.tsx create mode 100644 packages/react/src/hooks/index.ts create mode 100644 packages/react/src/hooks/useAccountCenter.ts create mode 100644 packages/react/src/hooks/useAppState.ts create mode 100644 packages/react/src/hooks/useConnectWallet.ts create mode 100644 packages/react/src/hooks/useNotifications.ts create mode 100644 packages/react/src/hooks/useSetChain.ts create mode 100644 packages/react/src/hooks/useSetLocale.ts create mode 100644 packages/react/src/hooks/useWallets.ts diff --git a/examples/with-nextjs/.eslintrc.json b/examples/with-nextjs/.eslintrc.json new file mode 100644 index 000000000..a2ceebebd --- /dev/null +++ b/examples/with-nextjs/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["next/babel", "next/core-web-vitals"] +} diff --git a/examples/with-nextjs/.gitignore b/examples/with-nextjs/.gitignore new file mode 100644 index 000000000..c87c9b392 --- /dev/null +++ b/examples/with-nextjs/.gitignore @@ -0,0 +1,36 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +.pnpm-debug.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/examples/with-nextjs/README.md b/examples/with-nextjs/README.md new file mode 100644 index 000000000..b12f3e33e --- /dev/null +++ b/examples/with-nextjs/README.md @@ -0,0 +1,34 @@ +This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file. + +[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`. + +The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/examples/with-nextjs/next.config.js b/examples/with-nextjs/next.config.js new file mode 100644 index 000000000..ae887958d --- /dev/null +++ b/examples/with-nextjs/next.config.js @@ -0,0 +1,7 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + swcMinify: true, +} + +module.exports = nextConfig diff --git a/examples/with-nextjs/package.json b/examples/with-nextjs/package.json new file mode 100644 index 000000000..649e31f8a --- /dev/null +++ b/examples/with-nextjs/package.json @@ -0,0 +1,20 @@ +{ + "name": "with-nextjs", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "12.2.5", + "react": "18.2.0", + "react-dom": "18.2.0" + }, + "devDependencies": { + "eslint": "8.22.0", + "eslint-config-next": "12.2.5" + } +} diff --git a/examples/with-nextjs/pages/_app.js b/examples/with-nextjs/pages/_app.js new file mode 100644 index 000000000..3e48b2674 --- /dev/null +++ b/examples/with-nextjs/pages/_app.js @@ -0,0 +1,42 @@ +import '../styles/globals.css' +import { Web3OnboardProvider, init } from '@web3-onboard/react' +import injectedModule from '@web3-onboard/injected-wallets' + +const INFURA_KEY = '' + +const ethereumRopsten = { + id: '0x3', + token: 'rETH', + label: 'Ethereum Ropsten', + rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` +} + +const polygonMainnet = { + id: '0x89', + token: 'MATIC', + label: 'Polygon', + rpcUrl: 'https://matic-mainnet.chainstacklabs.com' +} + +const chains = [ethereumRopsten, polygonMainnet] +const wallets = [injectedModule()] + +const web3Onboard = init({ + wallets, + chains, + appMetadata: { + name: "Web3-Onboard Demo", + icon: 'My App Icon', + description: "A demo of Web3-Onboard." + } +}) + +function MyApp({ Component, pageProps }) { + return ( + + + + ) +} + +export default MyApp \ No newline at end of file diff --git a/examples/with-nextjs/pages/api/hello.js b/examples/with-nextjs/pages/api/hello.js new file mode 100644 index 000000000..df63de88f --- /dev/null +++ b/examples/with-nextjs/pages/api/hello.js @@ -0,0 +1,5 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction + +export default function handler(req, res) { + res.status(200).json({ name: 'John Doe' }) +} diff --git a/examples/with-nextjs/pages/index.js b/examples/with-nextjs/pages/index.js new file mode 100644 index 000000000..695b058dd --- /dev/null +++ b/examples/with-nextjs/pages/index.js @@ -0,0 +1,60 @@ +import Head from 'next/head' +import styles from '../styles/Home.module.css' + +import { useConnectWallet } from '@web3-onboard/react' +import { ethers } from 'ethers' + +const buttonStyles = { + borderRadius: '6px', + background: '#111827', + border: 'none', + fontSize: '18px', + fontWeight: '600', + cursor: 'pointer', + color: 'white', + padding: '14px 12px', + marginTop: '40px', + fontFamily: 'inherit' +} + +export default function Home() { + const [{ wallet, connecting }, connect, disconnect] = useConnectWallet() + + // create an ethers provider + let ethersProvider + + if (wallet) { + ethersProvider = new ethers.providers.Web3Provider(wallet.provider, 'any') + } + + return ( +
+ + Web3-Onboard Demo + + + + +
+

+ Welcome to this demo of + + {' '} + Web3-Onboard + + ! +

+ +
+
+ ) +} diff --git a/examples/with-nextjs/public/favicon.ico b/examples/with-nextjs/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..718d6fea4835ec2d246af9800eddb7ffb276240c GIT binary patch literal 25931 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 LrJugUA?W`A8`#=m literal 0 HcmV?d00001 diff --git a/examples/with-nextjs/public/vercel.svg b/examples/with-nextjs/public/vercel.svg new file mode 100644 index 000000000..fbf0e25a6 --- /dev/null +++ b/examples/with-nextjs/public/vercel.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/examples/with-nextjs/styles/Home.module.css b/examples/with-nextjs/styles/Home.module.css new file mode 100644 index 000000000..bd50f42ff --- /dev/null +++ b/examples/with-nextjs/styles/Home.module.css @@ -0,0 +1,129 @@ +.container { + padding: 0 2rem; +} + +.main { + min-height: 100vh; + padding: 4rem 0; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.footer { + display: flex; + flex: 1; + padding: 2rem 0; + border-top: 1px solid #eaeaea; + justify-content: center; + align-items: center; +} + +.footer a { + display: flex; + justify-content: center; + align-items: center; + flex-grow: 1; +} + +.title a { + color: #0070f3; + text-decoration: none; +} + +.title a:hover, +.title a:focus, +.title a:active { + text-decoration: underline; +} + +.title { + margin: 0; + line-height: 1.15; + font-size: 4rem; +} + +.title, +.description { + text-align: center; +} + +.description { + margin: 4rem 0; + line-height: 1.5; + font-size: 1.5rem; +} + +.code { + background: #fafafa; + border-radius: 5px; + padding: 0.75rem; + font-size: 1.1rem; + font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, + Bitstream Vera Sans Mono, Courier New, monospace; +} + +.grid { + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + max-width: 800px; +} + +.card { + margin: 1rem; + padding: 1.5rem; + text-align: left; + color: inherit; + text-decoration: none; + border: 1px solid #eaeaea; + border-radius: 10px; + transition: color 0.15s ease, border-color 0.15s ease; + max-width: 300px; +} + +.card:hover, +.card:focus, +.card:active { + color: #0070f3; + border-color: #0070f3; +} + +.card h2 { + margin: 0 0 1rem 0; + font-size: 1.5rem; +} + +.card p { + margin: 0; + font-size: 1.25rem; + line-height: 1.5; +} + +.logo { + height: 1em; + margin-left: 0.5rem; +} + +@media (max-width: 600px) { + .grid { + width: 100%; + flex-direction: column; + } +} + +@media (prefers-color-scheme: dark) { + .card, + .footer { + border-color: #222; + } + .code { + background: #111; + } + .logo img { + filter: invert(1); + } +} diff --git a/examples/with-nextjs/styles/globals.css b/examples/with-nextjs/styles/globals.css new file mode 100644 index 000000000..4f1842163 --- /dev/null +++ b/examples/with-nextjs/styles/globals.css @@ -0,0 +1,26 @@ +html, +body { + padding: 0; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, + Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; +} + +a { + color: inherit; + text-decoration: none; +} + +* { + box-sizing: border-box; +} + +@media (prefers-color-scheme: dark) { + html { + color-scheme: dark; + } + body { + color: white; + background: black; + } +} diff --git a/examples/with-nextjs/yarn.lock b/examples/with-nextjs/yarn.lock new file mode 100644 index 000000000..e4ff350f9 --- /dev/null +++ b/examples/with-nextjs/yarn.lock @@ -0,0 +1,1703 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime-corejs3@^7.10.2": + version "7.18.9" + resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.9.tgz#7bacecd1cb2dd694eacd32a91fcf7021c20770ae" + integrity sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A== + dependencies: + core-js-pure "^3.20.2" + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.10.2", "@babel/runtime@^7.18.9": + version "7.18.9" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== + dependencies: + regenerator-runtime "^0.13.4" + +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.3.2" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@humanwhocodes/config-array@^0.10.4": + version "0.10.4" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@next/env@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/env/-/env-12.2.5.tgz#d908c57b35262b94db3e431e869b72ac3e1ad3e3" + integrity sha512-vLPLV3cpPGjUPT3PjgRj7e3nio9t6USkuew3JE/jMeon/9Mvp1WyR18v3iwnCuX7eUAm1HmAbJHHLAbcu/EJcw== + +"@next/eslint-plugin-next@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-12.2.5.tgz#4f3acccd2ed4f9300fbf9fd480cc8a0b261889a8" + integrity sha512-VBjVbmqEzGiOTBq4+wpeVXt/KgknnGB6ahvC/AxiIGnN93/RCSyXhFRI4uSfftM2Ba3w7ZO7076bfKasZsA0fw== + dependencies: + glob "7.1.7" + +"@next/swc-android-arm-eabi@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.5.tgz#903a5479ab4c2705d9c08d080907475f7bacf94d" + integrity sha512-cPWClKxGhgn2dLWnspW+7psl3MoLQUcNqJqOHk2BhNcou9ARDtC0IjQkKe5qcn9qg7I7U83Gp1yh2aesZfZJMA== + +"@next/swc-android-arm64@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-12.2.5.tgz#2f9a98ec4166c7860510963b31bda1f57a77c792" + integrity sha512-vMj0efliXmC5b7p+wfcQCX0AfU8IypjkzT64GiKJD9PgiA3IILNiGJr1fw2lyUDHkjeWx/5HMlMEpLnTsQslwg== + +"@next/swc-darwin-arm64@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.5.tgz#31b1c3c659d54be546120c488a1e1bad21c24a1d" + integrity sha512-VOPWbO5EFr6snla/WcxUKtvzGVShfs302TEMOtzYyWni6f9zuOetijJvVh9CCTzInnXAZMtHyNhefijA4HMYLg== + +"@next/swc-darwin-x64@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.5.tgz#2e44dd82b2b7fef88238d1bc4d3bead5884cedfd" + integrity sha512-5o8bTCgAmtYOgauO/Xd27vW52G2/m3i5PX7MUYePquxXAnX73AAtqA3WgPXBRitEB60plSKZgOTkcpqrsh546A== + +"@next/swc-freebsd-x64@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.5.tgz#e24e75d8c2581bfebc75e4f08f6ddbd116ce9dbd" + integrity sha512-yYUbyup1JnznMtEBRkK4LT56N0lfK5qNTzr6/DEyDw5TbFVwnuy2hhLBzwCBkScFVjpFdfiC6SQAX3FrAZzuuw== + +"@next/swc-linux-arm-gnueabihf@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.5.tgz#46d8c514d834d2b5f67086013f0bd5e3081e10b9" + integrity sha512-2ZE2/G921Acks7UopJZVMgKLdm4vN4U0yuzvAMJ6KBavPzqESA2yHJlm85TV/K9gIjKhSk5BVtauIUntFRP8cg== + +"@next/swc-linux-arm64-gnu@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.5.tgz#91f725ac217d3a1f4f9f53b553615ba582fd3d9f" + integrity sha512-/I6+PWVlz2wkTdWqhlSYYJ1pWWgUVva6SgX353oqTh8njNQp1SdFQuWDqk8LnM6ulheVfSsgkDzxrDaAQZnzjQ== + +"@next/swc-linux-arm64-musl@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.5.tgz#e627e8c867920995810250303cd9b8e963598383" + integrity sha512-LPQRelfX6asXyVr59p5sTpx5l+0yh2Vjp/R8Wi4X9pnqcayqT4CUJLiHqCvZuLin3IsFdisJL0rKHMoaZLRfmg== + +"@next/swc-linux-x64-gnu@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.5.tgz#83a5e224fbc4d119ef2e0f29d0d79c40cc43887e" + integrity sha512-0szyAo8jMCClkjNK0hknjhmAngUppoRekW6OAezbEYwHXN/VNtsXbfzgYOqjKWxEx3OoAzrT3jLwAF0HdX2MEw== + +"@next/swc-linux-x64-musl@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.5.tgz#be700d48471baac1ec2e9539396625584a317e95" + integrity sha512-zg/Y6oBar1yVnW6Il1I/08/2ukWtOG6s3acdJdEyIdsCzyQi4RLxbbhkD/EGQyhqBvd3QrC6ZXQEXighQUAZ0g== + +"@next/swc-win32-arm64-msvc@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.5.tgz#a93e958133ad3310373fda33a79aa10af2a0aa97" + integrity sha512-3/90DRNSqeeSRMMEhj4gHHQlLhhKg5SCCoYfE3kBjGpE63EfnblYUqsszGGZ9ekpKL/R4/SGB40iCQr8tR5Jiw== + +"@next/swc-win32-ia32-msvc@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.5.tgz#4f5f7ba0a98ff89a883625d4af0125baed8b2e19" + integrity sha512-hGLc0ZRAwnaPL4ulwpp4D2RxmkHQLuI8CFOEEHdzZpS63/hMVzv81g8jzYA0UXbb9pus/iTc3VRbVbAM03SRrw== + +"@next/swc-win32-x64-msvc@12.2.5": + version "12.2.5" + resolved "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.5.tgz#20fed129b04a0d3f632c6d0de135345bb623b1e4" + integrity sha512-7h5/ahY7NeaO2xygqVrSG/Y8Vs4cdjxIjowTZ5W6CKoTKn7tmnuxlUc2h74x06FKmbhAd9agOjr/AOKyxYYm9Q== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@rushstack/eslint-patch@^1.1.3": + version "1.1.4" + resolved "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.4.tgz#0c8b74c50f29ee44f423f7416829c0bf8bb5eb27" + integrity sha512-LwzQKA4vzIct1zNZzBmRKI9QuNpLgTQMEjsQLf3BXuGYb3QPTP4Yjf6mkdX+X1mYttZ808QpOwAzZjv28kq7DA== + +"@swc/helpers@0.4.3": + version "0.4.3" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.3.tgz#16593dfc248c53b699d4b5026040f88ddb497012" + integrity sha512-6JrF+fdUK2zbGpJIlN7G3v966PQjyx/dPt1T9km2wj+EUBqgrxCk3uX4Kct16MIm9gGxfKRcfax2hVf5jvlTzA== + dependencies: + tslib "^2.4.0" + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@typescript-eslint/parser@^5.21.0": + version "5.33.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.0.tgz#26ec3235b74f0667414613727cb98f9b69dc5383" + integrity sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w== + dependencies: + "@typescript-eslint/scope-manager" "5.33.0" + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/typescript-estree" "5.33.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.33.0": + version "5.33.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz#509d7fa540a2c58f66bdcfcf278a3fa79002e18d" + integrity sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw== + dependencies: + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/visitor-keys" "5.33.0" + +"@typescript-eslint/types@5.33.0": + version "5.33.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.0.tgz#d41c584831805554b063791338b0220b613a275b" + integrity sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw== + +"@typescript-eslint/typescript-estree@5.33.0": + version "5.33.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz#02d9c9ade6f4897c09e3508c27de53ad6bfa54cf" + integrity sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ== + dependencies: + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/visitor-keys" "5.33.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@5.33.0": + version "5.33.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz#fbcbb074e460c11046e067bc3384b5d66b555484" + integrity sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw== + dependencies: + "@typescript-eslint/types" "5.33.0" + eslint-visitor-keys "^3.3.0" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.8.0: + version "8.8.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +ajv@^6.10.0, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +aria-query@^4.2.2: + version "4.2.2" + resolved "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b" + integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA== + dependencies: + "@babel/runtime" "^7.10.2" + "@babel/runtime-corejs3" "^7.10.2" + +array-includes@^3.1.4, array-includes@^3.1.5: + version "3.1.5" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz#a7e8ed4225f4788a70cd910abcf0791e76a5534f" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + +ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== + +axe-core@^4.4.3: + version "4.4.3" + resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz#11c74d23d5013c0fa5d183796729bc3482bd2f6f" + integrity sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w== + +axobject-query@^2.2.0: + version "2.2.0" + resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" + integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +caniuse-lite@^1.0.30001332: + version "1.0.30001376" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001376.tgz#af2450833e5a06873fbb030a9556ca9461a2736d" + integrity sha512-I27WhtOQ3X3v3it9gNs/oTpoE5KpwmqKR5oKPA8M0G7uMXh9Ty81Q904HpKUrM30ei7zfcL5jE7AXefgbOfMig== + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +core-js-pure@^3.20.2: + version "3.24.1" + resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3" + integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg== + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +damerau-levenshtein@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz#b43d286ccbd36bc5b2f7ed41caf2d0aba1f8a6e7" + integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA== + +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-next@12.2.5: + version "12.2.5" + resolved "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-12.2.5.tgz#76ce83f18cc02f6f42ed407a127f83db54fabd3c" + integrity sha512-SOowilkqPzW6DxKp3a3SYlrfPi5Ajs9MIzp9gVfUDxxH9QFM5ElkR1hX5m/iICJuvCbWgQqFBiA3mCMozluniw== + dependencies: + "@next/eslint-plugin-next" "12.2.5" + "@rushstack/eslint-patch" "^1.1.3" + "@typescript-eslint/parser" "^5.21.0" + eslint-import-resolver-node "^0.3.6" + eslint-import-resolver-typescript "^2.7.1" + eslint-plugin-import "^2.26.0" + eslint-plugin-jsx-a11y "^6.5.1" + eslint-plugin-react "^7.29.4" + eslint-plugin-react-hooks "^4.5.0" + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-import-resolver-typescript@^2.7.1: + version "2.7.1" + resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.7.1.tgz#a90a4a1c80da8d632df25994c4c5fdcdd02b8751" + integrity sha512-00UbgGwV8bSgUv34igBDbTOtKhqoRMy9bFjNehT40bXg6585PNIct8HhXZ0SybqB9rWtXj9crcku8ndDn/gIqQ== + dependencies: + debug "^4.3.4" + glob "^7.2.0" + is-glob "^4.0.3" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-module-utils@^2.7.3: + version "2.7.4" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-jsx-a11y@^6.5.1: + version "6.6.1" + resolved "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.6.1.tgz#93736fc91b83fdc38cc8d115deedfc3091aef1ff" + integrity sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q== + dependencies: + "@babel/runtime" "^7.18.9" + aria-query "^4.2.2" + array-includes "^3.1.5" + ast-types-flow "^0.0.7" + axe-core "^4.4.3" + axobject-query "^2.2.0" + damerau-levenshtein "^1.0.8" + emoji-regex "^9.2.2" + has "^1.0.3" + jsx-ast-utils "^3.3.2" + language-tags "^1.0.5" + minimatch "^3.1.2" + semver "^6.3.0" + +eslint-plugin-react-hooks@^4.5.0: + version "4.6.0" + resolved "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + +eslint-plugin-react@^7.29.4: + version "7.30.1" + resolved "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.1.tgz#2be4ab23ce09b5949c6631413ba64b2810fd3e22" + integrity sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg== + dependencies: + array-includes "^3.1.5" + array.prototype.flatmap "^1.3.0" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.1" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.7" + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@8.22.0: + version "8.22.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" + integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== + dependencies: + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.3" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^9.3.2, espree@^9.3.3: + version "9.3.3" + resolved "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" + integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flatted@^3.1.0: + version "3.2.6" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" + integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.2" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@7.1.7: + version "7.1.7" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3, glob@^7.2.0: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.8.1, is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.2: + version "3.3.3" + resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" + integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== + dependencies: + array-includes "^3.1.5" + object.assign "^4.1.3" + +language-subtag-registry@~0.3.2: + version "0.3.22" + resolved "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz#2e1500861b2e457eba7e7ae86877cbd08fa1fd1d" + integrity sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w== + +language-tags@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz#d321dbc4da30ba8bf3024e040fa5c14661f9193a" + integrity sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ== + dependencies: + language-subtag-registry "~0.3.2" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +next@12.2.5: + version "12.2.5" + resolved "https://registry.npmjs.org/next/-/next-12.2.5.tgz#14fb5975e8841fad09553b8ef41fe1393602b717" + integrity sha512-tBdjqX5XC/oFs/6gxrZhjmiq90YWizUYU6qOWAfat7zJwrwapJ+BYgX2PmiacunXMaRpeVT4vz5MSPSLgNkrpA== + dependencies: + "@next/env" "12.2.5" + "@swc/helpers" "0.4.3" + caniuse-lite "^1.0.30001332" + postcss "8.4.14" + styled-jsx "5.0.4" + use-sync-external-store "1.2.0" + optionalDependencies: + "@next/swc-android-arm-eabi" "12.2.5" + "@next/swc-android-arm64" "12.2.5" + "@next/swc-darwin-arm64" "12.2.5" + "@next/swc-darwin-x64" "12.2.5" + "@next/swc-freebsd-x64" "12.2.5" + "@next/swc-linux-arm-gnueabihf" "12.2.5" + "@next/swc-linux-arm64-gnu" "12.2.5" + "@next/swc-linux-arm64-musl" "12.2.5" + "@next/swc-linux-x64-gnu" "12.2.5" + "@next/swc-linux-x64-musl" "12.2.5" + "@next/swc-win32-arm64-msvc" "12.2.5" + "@next/swc-win32-ia32-msvc" "12.2.5" + "@next/swc-win32-x64-msvc" "12.2.5" + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.0, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.2, object.assign@^4.1.3: + version "4.1.3" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f" + integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.fromentries@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.hasown@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.19.5" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +postcss@8.4.14: + version "8.4.14" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.0" + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== + dependencies: + loose-envify "^1.1.0" + +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.20.0, resolve@^1.22.0: + version "1.22.1" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.3: + version "2.0.0-next.4" + resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== + dependencies: + loose-envify "^1.1.0" + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.7: + version "7.3.7" + resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + +string.prototype.matchall@^4.0.7: + version "4.0.7" + resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +styled-jsx@5.0.4: + version "5.0.4" + resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.4.tgz#5b1bd0b9ab44caae3dd1361295559706e044aa53" + integrity sha512-sDFWLbg4zR+UkNzfk5lPilyIgtpddfxXEULxhujorr5jtePTUqiPDc5BC0v1NRqTr/WaFBGQQUoYToGlF4B2KQ== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +use-sync-external-store@1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/react/src/context.tsx b/packages/react/src/context.tsx new file mode 100644 index 000000000..ed7519a51 --- /dev/null +++ b/packages/react/src/context.tsx @@ -0,0 +1,50 @@ +import * as React from 'react' +import Web3Onboard from '@web3-onboard/core' +import type { InitOptions, OnboardAPI } from '@web3-onboard/core' + +const HOOK_ERROR_MESSAGE = + 'Must call the provided initialization method`init` method before using hooks.' + +export let web3OnboardGlobal: OnboardAPI | undefined = undefined +// Flag indicating whether or not the context provider is being used +let usingContextProvider: boolean = false + +export const init = (options: InitOptions): OnboardAPI => { + web3OnboardGlobal = Web3Onboard(options) + return web3OnboardGlobal +} + +export const Context: React.Context = React.createContext(undefined) + +export type Web3OnboardProviderProps = { + web3Onboard: OnboardAPI +} + +export function Web3OnboardProvider({ + children, + web3Onboard +}: React.PropsWithChildren) { + // Set the flag indicating that we are using the context provider rather than raw hooks + usingContextProvider = true + // Set the global web3Onboard instance to null as we are going to use the provided instance + // rather than the global instance, so we want to clean up this reference. + web3OnboardGlobal = undefined + return ( + + {children} + + ) +} + +export function useWeb3Onboard(): OnboardAPI { + // Use the context provided instance or the global instance + const web3Onboard = usingContextProvider + ? React.useContext(Context) + : web3OnboardGlobal + + if (!web3Onboard) { + throw new Error(HOOK_ERROR_MESSAGE) + } + + return web3Onboard +} diff --git a/packages/react/src/hooks/index.ts b/packages/react/src/hooks/index.ts new file mode 100644 index 000000000..0cc62a103 --- /dev/null +++ b/packages/react/src/hooks/index.ts @@ -0,0 +1,8 @@ +// Barrel file +export { useAccountCenter } from './useAccountCenter' +export { useAppState } from './useAppState' +export { useConnectWallet } from './useConnectWallet' +export { useNotifications } from './useNotifications' +export { useSetChain } from './useSetChain' +export { useSetLocale } from './useSetLocale' +export { useWallets } from './useWallets' diff --git a/packages/react/src/hooks/useAccountCenter.ts b/packages/react/src/hooks/useAccountCenter.ts new file mode 100644 index 000000000..e90ea896d --- /dev/null +++ b/packages/react/src/hooks/useAccountCenter.ts @@ -0,0 +1,6 @@ +import type { AccountCenter } from '@web3-onboard/core' +import { useWeb3Onboard } from '../context' + +export const useAccountCenter = (): (( + update: AccountCenter | Partial +) => void) => useWeb3Onboard().state.actions.updateAccountCenter diff --git a/packages/react/src/hooks/useAppState.ts b/packages/react/src/hooks/useAppState.ts new file mode 100644 index 000000000..6025cf293 --- /dev/null +++ b/packages/react/src/hooks/useAppState.ts @@ -0,0 +1,33 @@ +import { useCallback } from 'react' +import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js' + +import type { AppState } from '@web3-onboard/core' +import { useWeb3Onboard } from '../context' + +export const useAppState: { + (): AppState + (stateKey?: K): AppState[K] +} = (stateKey = undefined) => { + const web3Onboard = useWeb3Onboard() + + const { select, get } = web3Onboard.state + + const subscribe = useCallback( + (onStoreChange: () => void) => { + const { unsubscribe } = stateKey + ? select(stateKey).subscribe(onStoreChange) + : select().subscribe(onStoreChange) + + return () => unsubscribe + }, + [stateKey] + ) + + const getSnapshot = useCallback(() => { + const snapshot = get() + return stateKey ? snapshot[stateKey] : snapshot + }, [stateKey]) + + const getServerSnapshot = () => get() || getSnapshot + return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) +} diff --git a/packages/react/src/hooks/useConnectWallet.ts b/packages/react/src/hooks/useConnectWallet.ts new file mode 100644 index 000000000..b02f32577 --- /dev/null +++ b/packages/react/src/hooks/useConnectWallet.ts @@ -0,0 +1,57 @@ +import { useCallback, useState } from 'react' + +import type { + ConnectOptions, + DisconnectOptions, + WalletState +} from '@web3-onboard/core' +import type { WalletInit } from '@web3-onboard/common' +import { useWeb3Onboard } from '../context' +import { useAppState } from './useAppState' + +export const useConnectWallet = (): [ + { wallet: WalletState | null; connecting: boolean }, + (options?: ConnectOptions) => Promise, + (wallet: DisconnectOptions) => Promise, + (addresses?: string[]) => Promise, + (wallets: WalletInit[]) => void, + (wallet: WalletState, address?: string) => void +] => { + const web3Onboard = useWeb3Onboard() + + const { connectWallet, disconnectWallet } = web3Onboard + + const wallets = useAppState('wallets') + const wallet = wallets[0] || null + + const [connecting, setConnecting] = useState(false) + + const connect = useCallback(async (options?: ConnectOptions) => { + setConnecting(true) + + await connectWallet(options) + + setConnecting(false) + }, []) + + const disconnect = useCallback(async ({ label }: DisconnectOptions) => { + setConnecting(true) + + await disconnectWallet({ label }) + + setConnecting(false) + }, []) + + const updateBalances = web3Onboard.state.actions.updateBalances + const setWalletModules = web3Onboard.state.actions.setWalletModules + const setPrimaryWallet = web3Onboard.state.actions.setPrimaryWallet + + return [ + { wallet, connecting }, + connect, + disconnect, + updateBalances, + setWalletModules, + setPrimaryWallet + ] +} diff --git a/packages/react/src/hooks/useNotifications.ts b/packages/react/src/hooks/useNotifications.ts new file mode 100644 index 000000000..1f0a6f1dd --- /dev/null +++ b/packages/react/src/hooks/useNotifications.ts @@ -0,0 +1,33 @@ +import type { + CustomNotification, + Notify, + UpdateNotification, + Notification, + PreflightNotificationsOptions +} from '@web3-onboard/core' +import { useWeb3Onboard } from '../context' +import { useAppState } from './useAppState' + +export const useNotifications = (): [ + Notification[], + (updatedNotification: CustomNotification) => { + dismiss: () => void + update: UpdateNotification + }, + (update: Partial) => void, + (options: PreflightNotificationsOptions) => Promise +] => { + const web3Onboard = useWeb3Onboard() + + const customNotification = web3Onboard.state.actions.customNotification + const updateNotify = web3Onboard.state.actions.updateNotify + const preflightNotifications = + web3Onboard.state.actions.preflightNotifications + + return [ + useAppState('notifications'), + customNotification, + updateNotify, + preflightNotifications + ] +} diff --git a/packages/react/src/hooks/useSetChain.ts b/packages/react/src/hooks/useSetChain.ts new file mode 100644 index 000000000..d49043595 --- /dev/null +++ b/packages/react/src/hooks/useSetChain.ts @@ -0,0 +1,51 @@ +import { useState, useCallback } from 'react' + +import type { ConnectedChain } from '@web3-onboard/core' +import type { Chain } from '@web3-onboard/common' +import { useAppState } from './useAppState' +import { useWeb3Onboard } from '../context' + +type SetChainOptions = { + chainId: string + chainNamespace?: string +} + +export const useSetChain = ( + walletLabel?: string +): [ + { + chains: Chain[] + connectedChain: ConnectedChain | null + settingChain: boolean + }, + (options: SetChainOptions) => Promise +] => { + const web3Onboard = useWeb3Onboard() + + const { setChain } = web3Onboard + + const { wallets, chains } = useAppState() + + const getChain = () => { + const wallet = walletLabel + ? wallets.find(({ label }) => label === walletLabel) + : wallets[0] + return wallet && wallet.chains ? wallet.chains[0] : null + } + + const connectedChain = getChain() + + const [settingChain, setInProgress] = useState(false) + + const set = useCallback(async (options: SetChainOptions) => { + setInProgress(true) + + const success = await setChain({ ...options, wallet: walletLabel }) + + setInProgress(false) + + return success + }, []) + + return [{ chains, connectedChain, settingChain }, set] +} diff --git a/packages/react/src/hooks/useSetLocale.ts b/packages/react/src/hooks/useSetLocale.ts new file mode 100644 index 000000000..0386a56bc --- /dev/null +++ b/packages/react/src/hooks/useSetLocale.ts @@ -0,0 +1,4 @@ +import { useWeb3Onboard } from '../context' + +export const useSetLocale = (): ((locale: string) => void) => + useWeb3Onboard().state.actions.setLocale diff --git a/packages/react/src/hooks/useWallets.ts b/packages/react/src/hooks/useWallets.ts new file mode 100644 index 000000000..63eb28e3d --- /dev/null +++ b/packages/react/src/hooks/useWallets.ts @@ -0,0 +1,5 @@ +import type { WalletState } from '@web3-onboard/core' + +import { useAppState } from './useAppState' + +export const useWallets = (): WalletState[] => useAppState('wallets') diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 6f68c4e22..c573ffac2 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,193 +1,12 @@ -import { useState, useCallback } from 'react' -import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js' +export { + useAccountCenter, + useAppState, + useConnectWallet, + useNotifications, + useSetChain, + useSetLocale, + useWallets +} from './hooks' +export { init, Web3OnboardProvider, Web3OnboardProviderProps } from './context' -import Web3Onboard from '@web3-onboard/core' -import type { - InitOptions, - OnboardAPI, - ConnectOptions, - DisconnectOptions, - WalletState, - ConnectedChain, - AccountCenter, - AppState, - CustomNotification, - Notification, - Notify, - UpdateNotification, - PreflightNotificationsOptions -} from '@web3-onboard/core' -import type { Chain, WalletInit } from '@web3-onboard/common' -export let web3Onboard: OnboardAPI | null = null - -export const init = (options: InitOptions): OnboardAPI => { - web3Onboard = Web3Onboard(options) - return web3Onboard -} - -const HOOK_ERROR_MESSAGE = 'Must initialize before using hooks.' - -const useAppState: { - (): AppState - (stateKey?: K): AppState[K] -} = (stateKey = undefined) => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - const { select, get } = web3Onboard.state - - const subscribe = useCallback( - (onStoreChange: () => void) => { - const { unsubscribe } = stateKey - ? select(stateKey).subscribe(onStoreChange) - : select().subscribe(onStoreChange) - - return () => unsubscribe - }, - [stateKey] - ) - - const getSnapshot = useCallback(() => { - const snapshot = get() - return stateKey ? snapshot[stateKey] : snapshot - }, [stateKey]) - - const getServerSnapshot = () => get() || getSnapshot - return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) -} - -export const useConnectWallet = (): [ - { wallet: WalletState | null; connecting: boolean }, - (options?: ConnectOptions) => Promise, - (wallet: DisconnectOptions) => Promise, - (addresses?: string[]) => Promise, - (wallets: WalletInit[]) => void, - (wallet: WalletState, address?: string) => void -] => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - const { connectWallet, disconnectWallet } = web3Onboard - - const wallets = useAppState('wallets') - const wallet = wallets[0] || null - - const [connecting, setConnecting] = useState(false) - - const connect = useCallback(async (options?: ConnectOptions) => { - setConnecting(true) - - await connectWallet(options) - - setConnecting(false) - }, []) - - const disconnect = useCallback(async ({ label }: DisconnectOptions) => { - setConnecting(true) - - await disconnectWallet({ label }) - - setConnecting(false) - }, []) - - const updateBalances = web3Onboard.state.actions.updateBalances - const setWalletModules = web3Onboard.state.actions.setWalletModules - const setPrimaryWallet = web3Onboard.state.actions.setPrimaryWallet - - return [ - { wallet, connecting }, - connect, - disconnect, - updateBalances, - setWalletModules, - setPrimaryWallet - ] -} - -type SetChainOptions = { - chainId: string - chainNamespace?: string -} - -export const useSetChain = ( - walletLabel?: string -): [ - { - chains: Chain[] - connectedChain: ConnectedChain | null - settingChain: boolean - }, - (options: SetChainOptions) => Promise -] => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - const { setChain } = web3Onboard - - const { wallets, chains } = useAppState() - - const getChain = () => { - const wallet = walletLabel - ? wallets.find(({ label }) => label === walletLabel) - : wallets[0] - return wallet && wallet.chains ? wallet.chains[0] : null - } - - const connectedChain = getChain() - - const [settingChain, setInProgress] = useState(false) - - const set = useCallback(async (options: SetChainOptions) => { - setInProgress(true) - - const success = await setChain({ ...options, wallet: walletLabel }) - - setInProgress(false) - - return success - }, []) - - return [{ chains, connectedChain, settingChain }, set] -} - -export const useWallets = (): WalletState[] => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - return useAppState('wallets') -} - -export const useNotifications = (): [ - Notification[], - (updatedNotification: CustomNotification) => { - dismiss: () => void - update: UpdateNotification - }, - (update: Partial) => void, - (options: PreflightNotificationsOptions) => Promise -] => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - const customNotification = web3Onboard.state.actions.customNotification - const updateNotify = web3Onboard.state.actions.updateNotify - const preflightNotifications = - web3Onboard.state.actions.preflightNotifications - - return [ - useAppState('notifications'), - customNotification, - updateNotify, - preflightNotifications - ] -} - -export const useSetLocale = (): ((locale: string) => void) => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - return web3Onboard.state.actions.setLocale -} - -export const useAccountCenter = (): (( - update: AccountCenter | Partial -) => void) => { - if (!web3Onboard) throw new Error(HOOK_ERROR_MESSAGE) - - return web3Onboard.state.actions.updateAccountCenter -} diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 34c9a522a..24a8676b1 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -3,6 +3,7 @@ "include": ["src/**/*"], "compilerOptions": { + "jsx": "react", "outDir": "dist", "rootDir": "src", "declarationDir": "dist", From d5442f2005964ff161c0f48a32dc23de4df9206f Mon Sep 17 00:00:00 2001 From: Taylor Dawson Date: Mon, 15 Aug 2022 10:50:27 -0700 Subject: [PATCH 3/9] update readme --- packages/react/README.md | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/packages/react/README.md b/packages/react/README.md index 3fbee7ed5..4cbfbd2ef 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -65,6 +65,47 @@ function App() { } ``` +### Using the `Web3OnboardProvider` +You can use the context provider `Web3OnboardProvider` to better manage global state. Simply wrap the provider around your `App` and +the initialized web3Onboard instance will be available in all children components. See example below. + +```ts +import { Web3OnboardProvider, init } from '@web3-onboard/react' +import injectedModule from '@web3-onboard/injected-wallets' + +const INFURA_KEY = '' + +const ethereumRopsten = { + id: '0x3', + token: 'rETH', + label: 'Ethereum Ropsten', + rpcUrl: `https://ropsten.infura.io/v3/${INFURA_KEY}` +} + +const chains = [ethereumRopsten] +const wallets = [injectedModule()] + +const web3Onboard = init({ + wallets, + chains, + appMetadata: { + name: "Web3-Onboard Demo", + icon: 'App Icon', + description: "A demo of Web3-Onboard." + } +}) + +function MyApp({ Component, pageProps }) { + return ( + + + + ) +} + +export default MyApp +``` + ## `init` The `init` function must be called before any hooks can be used. The `init` function just initializes `web3-onboard` and makes it available for all hooks to use. For reference check out the [initialization docs for `@web3-onboard/core`](../core/README.md#initialization) From 72e9addddbde06e24918e929816890c3a6658949 Mon Sep 17 00:00:00 2001 From: Taylor Dawson Date: Mon, 15 Aug 2022 15:41:42 -0700 Subject: [PATCH 4/9] version bump --- packages/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/package.json b/packages/react/package.json index af36e796d..183f28c39 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/react", - "version": "2.2.6", + "version": "2.2.6-alpha.1", "description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", From 01f7afdc1eb7385cc713518fe47d5716c06b8e09 Mon Sep 17 00:00:00 2001 From: Taylor Dawson Date: Mon, 15 Aug 2022 15:42:41 -0700 Subject: [PATCH 5/9] add react to deps --- examples/with-nextjs/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/with-nextjs/package.json b/examples/with-nextjs/package.json index 649e31f8a..2e23cac65 100644 --- a/examples/with-nextjs/package.json +++ b/examples/with-nextjs/package.json @@ -9,6 +9,7 @@ "lint": "next lint" }, "dependencies": { + "@web3-onboard/react": "2.2.6-alpha.1", "next": "12.2.5", "react": "18.2.0", "react-dom": "18.2.0" From a5ad576ef29765e64378fca408206a68336068a7 Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Tue, 16 Aug 2022 18:20:59 -0600 Subject: [PATCH 6/9] Added WalletState[] return to connect and dicsonnect hooks within the React Package (#1217) --- packages/react/README.md | 8 ++++---- packages/react/package.json | 2 +- packages/react/src/hooks/useConnectWallet.ts | 12 ++++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/react/README.md b/packages/react/README.md index 4cbfbd2ef..78df30962 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -119,8 +119,8 @@ import { useConnectWallet } from '@web3-onboard/react' type UseConnectWallet = (): [ { wallet: WalletState | null; connecting: boolean }, - (options: ConnectOptions) => Promise, - (wallet: DisconnectOptions) => Promise, + (options: ConnectOptions) => Promise, + (wallet: DisconnectOptions) => Promise, (addresses?: string[]) => Promise, (wallets: WalletInit[]) => void, (wallet: WalletState, address?: string) => void @@ -150,8 +150,8 @@ const [ wallet, // the wallet that has been connected or null if not yet connected connecting // boolean indicating if connection is in progress }, - connect, // function to call to initiate user to connect wallet - disconnect, // function to call with wallet to disconnect wallet + connect, // function to call to initiate user to connect wallet, returns a list of WalletState objects (connected wallets) + disconnect, // function to call with wallet to disconnect wallet, returns a list of WalletState objects (connected wallets) updateBalances, // function to be called with an optional array of wallet addresses connected through Onboard to update balance or empty/no params to update all connected wallets setWalletModules, // function to be called with an array of wallet modules to conditionally allow connection of wallet types i.e. setWalletModules([ledger, trezor, injected]) setPrimaryWallet // function that can set the primary wallet and/or primary account within that wallet. The wallet that is set needs to be passed in for the first parameter and if you would like to set the primary account, the address of that account also needs to be passed in diff --git a/packages/react/package.json b/packages/react/package.json index 183f28c39..7614e5c93 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/react", - "version": "2.2.6-alpha.1", + "version": "2.2.6-alpha.2", "description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", diff --git a/packages/react/src/hooks/useConnectWallet.ts b/packages/react/src/hooks/useConnectWallet.ts index b02f32577..c7e7c96e1 100644 --- a/packages/react/src/hooks/useConnectWallet.ts +++ b/packages/react/src/hooks/useConnectWallet.ts @@ -11,8 +11,8 @@ import { useAppState } from './useAppState' export const useConnectWallet = (): [ { wallet: WalletState | null; connecting: boolean }, - (options?: ConnectOptions) => Promise, - (wallet: DisconnectOptions) => Promise, + (options?: ConnectOptions) => Promise, + (wallet: DisconnectOptions) => Promise, (addresses?: string[]) => Promise, (wallets: WalletInit[]) => void, (wallet: WalletState, address?: string) => void @@ -29,17 +29,21 @@ export const useConnectWallet = (): [ const connect = useCallback(async (options?: ConnectOptions) => { setConnecting(true) - await connectWallet(options) + const walletState = await connectWallet(options) setConnecting(false) + + return walletState }, []) const disconnect = useCallback(async ({ label }: DisconnectOptions) => { setConnecting(true) - await disconnectWallet({ label }) + const walletState = await disconnectWallet({ label }) setConnecting(false) + + return walletState }, []) const updateBalances = web3Onboard.state.actions.updateBalances From b8a05e96549132897dd530bf65c41f024bf2349f Mon Sep 17 00:00:00 2001 From: Adam Carpenter Date: Tue, 16 Aug 2022 18:42:43 -0600 Subject: [PATCH 7/9] Fix react package version (#1218) --- packages/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/package.json b/packages/react/package.json index 7614e5c93..a9a4e1935 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/react", - "version": "2.2.6-alpha.2", + "version": "2.2.7-alpha.1", "description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", From 9dd5130468ac04ad6ba5081259c58d080b6f44e1 Mon Sep 17 00:00:00 2001 From: Mahmud <104795334+mahmud-bn@users.noreply.github.com> Date: Wed, 17 Aug 2022 17:23:02 -0600 Subject: [PATCH 8/9] [core-v2.7.0-alpha.3, common-v2.1.8-alpha.1, hw-common-v1.0.0-alpha.1, demo-v2.0.8]: Feature -hw common (#1203) * Initialization * bump version * circleci build * build * comments updates * Fixes dependency and versioning issues * Pin ethereumjs common version to fix type mismatch * Change to serial build to ensure build order * Version bumps * Move more hw specific code * Update yarn.lock * Fix svelte build issues * Fix hw imports * Format rollup config * Extract common validation logic * Update yarn.lock * Revert big number as ethers cannot handle it * Update package.json files * Import validation functions for gas module * Update lock file * Fix versions * Update packages/vue/package.json Co-authored-by: Adam Carpenter * Update packages/react/package.json Co-authored-by: Adam Carpenter Co-authored-by: Aaron Barnard Co-authored-by: Adam Carpenter --- .circleci/config.yml | 18 ++++ examples/with-vuejs/package.json | 2 +- examples/with-vuejs/yarn.lock | 37 +++++--- package.json | 2 +- packages/coinbase/package.json | 6 +- packages/common/package.json | 25 ++---- packages/common/src/index.ts | 9 +- packages/common/src/types.ts | 52 +---------- packages/common/src/utils.ts | 6 +- packages/common/src/validation.ts | 73 +++++++-------- packages/common/tsconfig.json | 19 ++-- packages/core/package.json | 4 +- packages/core/rollup.config.js | 4 +- packages/core/src/validation.ts | 70 ++++----------- packages/dcent/package.json | 8 +- packages/dcent/src/index.ts | 44 +++++---- packages/demo/package.json | 32 +++---- packages/fortmatic/package.json | 6 +- packages/gas/package.json | 9 +- packages/gas/src/validation.ts | 10 +-- packages/gnosis/package.json | 6 +- packages/hw-common/.eslintrc.cjs | 43 +++++++++ packages/hw-common/.prettierrc.cjs | 9 ++ packages/hw-common/README.md | 3 + packages/hw-common/package.json | 89 +++++++++++++++++++ .../{common => hw-common}/rollup.config.js | 8 +- .../src/account-select.ts | 4 +- .../src/elements/AddressTable.svelte | 2 +- .../src/elements/Button.svelte | 0 .../src/elements/CloseButton.svelte | 0 .../src/elements/Modal.svelte | 0 .../src/elements/Spinner.svelte | 0 .../src/elements/TableHeader.svelte | 0 .../{common => hw-common}/src/entry-modal.ts | 0 packages/hw-common/src/global.d.ts | 1 + .../{common => hw-common}/src/hdwallets.ts | 21 +++-- .../{common => hw-common}/src/icons/close.js | 0 .../src/icons/default-app-icon.js | 0 packages/hw-common/src/index.ts | 10 +++ packages/{common => hw-common}/src/streams.ts | 0 packages/hw-common/src/types.ts | 80 +++++++++++++++++ packages/hw-common/src/validation.ts | 38 ++++++++ .../src/views/AccountSelect.svelte | 5 +- packages/hw-common/tsconfig.json | 15 ++++ packages/injected/package.json | 6 +- packages/injected/src/validation.ts | 11 +-- packages/keepkey/package.json | 7 +- packages/keepkey/src/index.ts | 33 +++---- packages/keystone/package.json | 7 +- packages/keystone/src/index.ts | 19 ++-- packages/ledger/package.json | 7 +- packages/ledger/src/index.ts | 33 ++++--- packages/magic/package.json | 6 +- packages/magic/src/login-modal.ts | 7 +- packages/mew/package.json | 6 +- packages/portis/package.json | 6 +- packages/react/package.json | 8 +- packages/torus/package.json | 6 +- packages/trezor/package.json | 7 +- packages/trezor/src/index.ts | 32 ++++--- packages/vue/package.json | 8 +- packages/walletconnect/package.json | 6 +- packages/walletlink/package.json | 6 +- packages/web3auth/package.json | 6 +- yarn.lock | 15 +++- 65 files changed, 621 insertions(+), 391 deletions(-) create mode 100644 packages/hw-common/.eslintrc.cjs create mode 100644 packages/hw-common/.prettierrc.cjs create mode 100644 packages/hw-common/README.md create mode 100644 packages/hw-common/package.json rename packages/{common => hw-common}/rollup.config.js (89%) rename packages/{common => hw-common}/src/account-select.ts (96%) rename packages/{common => hw-common}/src/elements/AddressTable.svelte (98%) rename packages/{common => hw-common}/src/elements/Button.svelte (100%) rename packages/{common => hw-common}/src/elements/CloseButton.svelte (100%) rename packages/{common => hw-common}/src/elements/Modal.svelte (100%) rename packages/{common => hw-common}/src/elements/Spinner.svelte (100%) rename packages/{common => hw-common}/src/elements/TableHeader.svelte (100%) rename packages/{common => hw-common}/src/entry-modal.ts (100%) create mode 100644 packages/hw-common/src/global.d.ts rename packages/{common => hw-common}/src/hdwallets.ts (84%) rename packages/{common => hw-common}/src/icons/close.js (100%) rename packages/{common => hw-common}/src/icons/default-app-icon.js (100%) create mode 100644 packages/hw-common/src/index.ts rename packages/{common => hw-common}/src/streams.ts (100%) create mode 100644 packages/hw-common/src/types.ts create mode 100644 packages/hw-common/src/validation.ts rename packages/{common => hw-common}/src/views/AccountSelect.svelte (99%) create mode 100644 packages/hw-common/tsconfig.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 755afac11..70cc73d66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -291,6 +291,12 @@ jobs: working_directory: ~/web3-onboard-monorepo/packages/gas steps: - node-build-steps + build-hw-common: + docker: + - image: cimg/node:16.13.1 + working_directory: ~/web3-onboard-monorepo/packages/hw-common + steps: + - node-build-steps # Build staging/Alpha releases build-staging-core: @@ -419,6 +425,12 @@ jobs: working_directory: ~/web3-onboard-monorepo/packages/gas steps: - node-staging-build-steps + build-staging-hw-common: + docker: + - image: cimg/node:16.13.1 + working_directory: ~/web3-onboard-monorepo/packages/hw-common + steps: + - node-staging-build-steps workflows: version: 2 @@ -549,3 +561,9 @@ workflows: <<: *deploy_production_filters - build-staging-gas: <<: *deploy_staging_filters + hw-common: + jobs: + - build-common: + <<: *deploy_production_filters + - build-staging-common: + <<: *deploy_staging_filters diff --git a/examples/with-vuejs/package.json b/examples/with-vuejs/package.json index 322e4879f..3a60cce97 100644 --- a/examples/with-vuejs/package.json +++ b/examples/with-vuejs/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@web3-onboard/injected-wallets": "^2.0.15", - "@web3-onboard/vue": "file:.yalc/@web3-onboard/vue", + "@web3-onboard/vue": "^2.1.6", "pinia": "^2.0.16", "vue": "^3.2.37", "vue-router": "^4.1.2" diff --git a/examples/with-vuejs/yarn.lock b/examples/with-vuejs/yarn.lock index 799079e2d..286d9607a 100644 --- a/examples/with-vuejs/yarn.lock +++ b/examples/with-vuejs/yarn.lock @@ -939,7 +939,7 @@ dependencies: vue-demi "*" -"@web3-onboard/common@^2.1.7", "@web3-onboard/common@^2.1.7-alpha.4": +"@web3-onboard/common@^2.1.7": version "2.1.7" resolved "https://registry.yarnpkg.com/@web3-onboard/common/-/common-2.1.7.tgz#62c74726ed9dd6e8baadab1e6aec6462d62e7d2d" integrity sha512-4nJvfNl0t5D17B1jD8H9BNBtUOVDDHxyxmRyQxnv1u1D5dgdd2I/mUVGhee0xWIHgMy9ORjuJCApraYCwZfgJA== @@ -950,12 +950,23 @@ joi "^17.4.2" rxjs "^7.5.2" -"@web3-onboard/core@^2.6.0-alpha.7": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.6.0.tgz#978b41211780189d9f5fb2f8f3259659bf6022e2" - integrity sha512-mxX4kMKetSqp/kDWYEZYqpIeDx7s3Q2i+XgS9FAaNDv+Rbv95CC/AC5zxpxiUy2zsixe8avTZtKoPXRV7y0Wag== +"@web3-onboard/common@^2.1.8": + version "2.1.8" + resolved "https://registry.yarnpkg.com/@web3-onboard/common/-/common-2.1.8.tgz#e20e027eaa597846b4ff178423de13d5ca597a5b" + integrity sha512-3kmJi0FKUw0rPXrbVe/BL+K13JSEzZ2QndnzpmHtKt4xFyRN+JgboAaAvJqfuk9t4hAZe45PqEWraSnYUCgDaA== dependencies: - "@web3-onboard/common" "^2.1.7" + "@ethereumjs/common" "2.6.2" + bignumber.js "^9.0.0" + ethers "5.5.4" + joi "^17.4.2" + rxjs "^7.5.2" + +"@web3-onboard/core@^2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.7.0.tgz#20acb5ae430cc5d0b2a7513e4e83f3182cff19eb" + integrity sha512-wxlUheuqgW8C5W2W4bpQdfjV9fXwmWxQx82IKem5kEnDhU8NPjVYEO/Xg4+kUwPlzYg0Uj/SPuGGjk+tNIrn9g== + dependencies: + "@web3-onboard/common" "^2.1.8" bignumber.js "^9.0.0" bnc-sdk "^4.4.1" bowser "^2.11.0" @@ -966,7 +977,7 @@ lodash.partition "^4.6.0" nanoid "^4.0.0" rxjs "^7.5.2" - svelte "^3.46.4" + svelte "^3.49.0" svelte-i18n "^3.3.13" "@web3-onboard/injected-wallets@^2.0.15": @@ -978,13 +989,15 @@ joi "^17.4.2" lodash.uniqby "^4.7.0" -"@web3-onboard/vue@file:.yalc/@web3-onboard/vue": - version "2.1.5-alpha.6" +"@web3-onboard/vue@^2.1.6": + version "2.1.6" + resolved "https://registry.yarnpkg.com/@web3-onboard/vue/-/vue-2.1.6.tgz#c634aff42932cc51e97bc40dc8669af1396d4485" + integrity sha512-RWWpZdTYLiwjUoem2+Lppdxtj0qPycrw44Dls83PjOp+9mO9/dvLO+FXSwmMJcPJiOH9WYPuejqAGOF89LQAUQ== dependencies: "@vueuse/core" "^8.4.2" "@vueuse/rxjs" "^8.2.0" - "@web3-onboard/common" "^2.1.7-alpha.4" - "@web3-onboard/core" "^2.6.0-alpha.7" + "@web3-onboard/common" "^2.1.8" + "@web3-onboard/core" "^2.7.0" vue-demi "^0.12.4" acorn-jsx@^5.3.2: @@ -2453,7 +2466,7 @@ svelte-i18n@^3.3.13: sade "^1.7.4" tiny-glob "^0.2.6" -svelte@^3.46.4: +svelte@^3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== diff --git a/package.json b/package.json index fc91d4fb0..4658f2f3f 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "install-m1-mac": "yarn install --ignore-optional", "format": "prettier --write 'packages/**/*.ts'", "dev": "yarn wsrun dev", - "build": "yarn wsrun --stages build", + "build": "yarn wsrun --serial build", "type-check": "yarn wsrun type-check" }, "devDependencies": { diff --git a/packages/coinbase/package.json b/packages/coinbase/package.json index 4c0c3555b..794021acb 100644 --- a/packages/coinbase/package.json +++ b/packages/coinbase/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/coinbase", - "version": "2.0.11", + "version": "2.1.0-alpha.1", "description": "Coinbase SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -36,7 +36,7 @@ "repository": { "type": "git", "url": "https://github.com/blocknative/web3-onboard.git", - "directory": "packages/core" + "directory": "packages/coinbase" }, "homepage": "https://www.blocknative.com/onboard", "bugs": "https://github.com/blocknative/web3-onboard/issues", @@ -59,6 +59,6 @@ }, "dependencies": { "@coinbase/wallet-sdk": "^3.0.5", - "@web3-onboard/common": "^2.1.8" + "@web3-onboard/common": "^2.2.0-alpha.1" } } diff --git a/packages/common/package.json b/packages/common/package.json index 0ae8e9135..bb449aa10 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/common", - "version": "2.1.8", + "version": "2.2.0-alpha.1", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -36,15 +36,14 @@ "repository": { "type": "git", "url": "https://github.com/blocknative/web3-onboard.git", - "directory": "packages/core" + "directory": "packages/common" }, "homepage": "https://www.blocknative.com/onboard", "bugs": "https://github.com/blocknative/web3-onboard/issues", "scripts": { - "build": "rollup -c", - "dev": "rollup -c -w", - "start": "sirv public --no-clear", - "type-check": "svelte-check --tsconfig ./tsconfig.json", + "build": "tsc", + "dev": "tsc -w", + "type-check": "tsc --noEmit", "lint": "eslint -c './.eslintrc.cjs' './src' && prettier --check './src/**/*'" }, "module": "dist/index.js", @@ -57,33 +56,25 @@ ], "license": "MIT", "devDependencies": { - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^11.0.0", - "@rollup/plugin-replace": "^3.0.0", - "@rollup/plugin-typescript": "^8.0.0", - "@tsconfig/svelte": "^2.0.0", "@typescript-eslint/eslint-plugin": "^4.31.1", "@typescript-eslint/parser": "^4.31.1", "eip-712": "^0.4.3", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-svelte3": "^3.2.1", "eventemitter3": "^4.0.7", "prettier": "^2.4.0", "prettier-plugin-svelte": "^2.4.0", "rollup": "^2.3.4", "rollup-plugin-svelte": "^7.0.0", - "svelte": "^3.49.0", + "svelte": "^3.42.5", "svelte-check": "^2.2.6", "svelte-preprocess": "^4.9.4", "tslib": "^2.0.0", "typescript": "^4.5.5" }, "dependencies": { - "@ethereumjs/common": "2.6.2", - "bignumber.js": "^9.0.0", + "bignumber.js": "^9.1.0", "ethers": "5.5.4", - "joi": "^17.4.2", - "rxjs": "^7.5.2" + "joi": "^17.4.2" } } diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index bf7240ce7..493c2f079 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -1,14 +1,7 @@ -export { ProviderRpcErrorCode } from './types' export { ProviderRpcError } from './errors' export { createEIP1193Provider } from './eip-1193' -export { default as accountSelect } from './account-select' -export { entryModal } from './entry-modal' export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts' -export { - getCommon, - bigNumberFieldsToStrings, - getHardwareWalletProvider -} from './hdwallets' export { weiToEth } from './utils' export * from './types' +export * from './validation' diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index 3ad1c2518..10d46bfd3 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -75,56 +75,6 @@ export type RequestPatch = { }) => Promise) | null } - -// eslint-disable-next-line max-len -export type AccountSelectAPI = ( - options: SelectAccountOptions -) => Promise - -export type SelectAccountOptions = { - basePaths: BasePath[] // the paths to display in the base path selector - assets: Asset[] // the selectable assets to scan for a balance - chains: Chain[] // the selectable chains/networks to scan for balance - scanAccounts: ScanAccounts - supportsCustomPath?: boolean -} - -export type BasePath = { - label: string // eg - Ethereum Ledger Live - value: DerivationPath -} - -export type DerivationPath = string // eg - m/44'/60' - -export type Asset = { - label: string // eg - ETH - address?: string // if is a token, address to query contract -} - -export type ScanAccounts = (options: ScanAccountsOptions) => Promise - -export type ScanAccountsOptions = { - derivationPath: DerivationPath - chainId: Chain['id'] - asset: Asset -} - -export type AccountAddress = string - -export type Account = { - address: AccountAddress - derivationPath: DerivationPath - balance: { - asset: Asset['label'] - value: ethers.BigNumber - } -} - -export type AccountsList = { - all: Account[] - filtered: Account[] -} - export interface AppMetadata { /* App name */ name: string @@ -262,6 +212,8 @@ export interface ProviderInfo { chainId: ChainId } +export type AccountAddress = string + /** * An array of addresses */ diff --git a/packages/common/src/utils.ts b/packages/common/src/utils.ts index caf1e5b60..3d11abf68 100644 --- a/packages/common/src/utils.ts +++ b/packages/common/src/utils.ts @@ -1,5 +1,5 @@ -import BigNumber from 'bignumber.js' +import Bignumber from 'bignumber.js' export function weiToEth(wei: string): string { - return new BigNumber(wei).div(1e18).toString(10) -} \ No newline at end of file + return new Bignumber(wei).div(1e18).toString(10) +} diff --git a/packages/common/src/validation.ts b/packages/common/src/validation.ts index 904ffb3d4..631af1e09 100644 --- a/packages/common/src/validation.ts +++ b/packages/common/src/validation.ts @@ -1,49 +1,42 @@ import Joi from 'joi' -import type { SelectAccountOptions } from './types' -const basePath = Joi.object({ - label: Joi.string().required(), - value: Joi.string().required() +export type ValidateReturn = Joi.ValidationResult | null + +export function validate(validator: Joi.Schema, data: unknown): ValidateReturn { + const result = validator.validate(data) + return result.error ? result : null +} + +export const chainIdValidation = Joi.alternatives().try( + Joi.string().pattern(/^0x[0-9a-fA-F]+$/), + Joi.number().positive() +) + +export const chainNamespaceValidation = Joi.string().valid('evm') + +/** Related to ConnectionInfo from 'ethers/lib/utils' */ +export const providerConnectionInfoValidation = Joi.object({ + url: Joi.string().required(), + headers: Joi.object(), + user: Joi.string(), + password: Joi.string(), + allowInsecureAuthentication: Joi.boolean(), + allowGzip: Joi.boolean(), + throttleLimit: Joi.number(), + throttleSlotInterval: Joi.number(), + throttleCallback: Joi.function(), + timeout: Joi.number() }) -const basePaths = Joi.array().items(basePath) -const chain = Joi.object({ - namespace: Joi.string(), - id: Joi.string() - .pattern(/^0x[0-9a-fA-F]+$/) - .required(), +export const chainValidation = Joi.object({ + namespace: chainNamespaceValidation, + id: chainIdValidation.required(), rpcUrl: Joi.string().required(), label: Joi.string().required(), token: Joi.string().required(), icon: Joi.string(), - color: Joi.string() -}) - -const chains = Joi.array().items(chain) - -const asset = Joi.object({ - label: Joi.string().required(), - address: Joi.string() + color: Joi.string(), + publicRpcUrl: Joi.string(), + blockExplorerUrl: Joi.string(), + providerConnectionInfoValidation }) -const assets = Joi.array().items(asset) - -const selectAccountOptions = Joi.object({ - basePaths: basePaths, - assets: assets, - chains: chains, - scanAccounts: Joi.function().arity(1).required(), - supportsCustomPath: Joi.bool() -}) - -type ValidateReturn = Joi.ValidationResult | null - -const validate = (validator: Joi.Schema, data: unknown): ValidateReturn => { - const result = validator.validate(data) - return result.error ? result : null -} - -export const validateSelectAccountOptions = ( - data: SelectAccountOptions -): ValidateReturn => { - return validate(selectAccountOptions, data) -} diff --git a/packages/common/tsconfig.json b/packages/common/tsconfig.json index bd1cf6bcf..9db8ebeb0 100644 --- a/packages/common/tsconfig.json +++ b/packages/common/tsconfig.json @@ -1,15 +1,16 @@ { - "extends": "@tsconfig/svelte/tsconfig.json", - + "extends": "../../tsconfig.json", "include": ["src/**/*"], - "exclude": ["node_modules/*", "dist"], + "compilerOptions": { - "strict": true, + "outDir": "dist", + "rootDir": "src", "declaration": true, "declarationDir": "dist", - "target": "ES2018", - "module": "ES2020", - "resolveJsonModule": true - }, - "outDir": "dist" + "allowSyntheticDefaultImports": true, + "paths": { + "*": ["./src/*", "./node_modules/*"] + }, + "typeRoots": ["node_modules/@types"] + } } diff --git a/packages/core/package.json b/packages/core/package.json index 2581d35ba..13a5df2f0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.7.0", + "version": "2.8.0-alpha.1", "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -82,7 +82,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@web3-onboard/common": "^2.1.8", + "@web3-onboard/common": "^2.2.0-alpha.1", "bignumber.js": "^9.0.0", "bnc-sdk": "^4.4.1", "bowser": "^2.11.0", diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index a70cda355..0995d1e78 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -12,7 +12,7 @@ export default { input: 'src/index.ts', output: { format: 'es', - dir: 'dist/', + dir: 'dist/' }, plugins: [ json(), @@ -38,7 +38,7 @@ export default { copy({ src: 'src/i18n/en.json', dest: 'i18n' - }), + }) ], external: [ '@web3-onboard/common', diff --git a/packages/core/src/validation.ts b/packages/core/src/validation.ts index 96b13018f..164f1ebc4 100644 --- a/packages/core/src/validation.ts +++ b/packages/core/src/validation.ts @@ -1,10 +1,15 @@ -import Joi, { ObjectSchema, Schema } from 'joi' -import type { - Chain, - ChainId, - DecimalChainId, - WalletInit, - WalletModule +import Joi from 'joi' + +import { + type ChainId, + type DecimalChainId, + type WalletInit, + type WalletModule, + type ValidateReturn, + chainNamespaceValidation, + chainIdValidation, + chainValidation, + validate } from '@web3-onboard/common' import type { @@ -24,45 +29,11 @@ import type { ConnectModalOptions } from './types' -// const chainId = Joi.string().pattern(/^0x[0-9a-fA-F]+$/) -const chainId = Joi.alternatives().try( - Joi.string().pattern(/^0x[0-9a-fA-F]+$/), - Joi.number().positive() -) -const chainNamespace = Joi.string().valid('evm') const unknownObject = Joi.object().unknown() -/** Related to ConnectionInfo from 'ethers/lib/utils' */ -const providerConnectionInfo = Joi.object({ - url: Joi.string().required(), - headers: Joi.object(), - user: Joi.string(), - password: Joi.string(), - allowInsecureAuthentication: Joi.boolean(), - allowGzip: Joi.boolean(), - throttleLimit: Joi.number(), - throttleSlotInterval: Joi.number(), - throttleCallback: Joi.function(), - timeout: Joi.number() -}) - -const chainValidationParams: Record = { - namespace: chainNamespace, - id: chainId.required(), - rpcUrl: Joi.string().required(), - label: Joi.string().required(), - token: Joi.string().required(), - icon: Joi.string(), - color: Joi.string(), - publicRpcUrl: Joi.string(), - blockExplorerUrl: Joi.string(), - providerConnectionInfo -} -const chain = Joi.object(chainValidationParams) - const connectedChain = Joi.object({ - namespace: chainNamespace.required(), - id: chainId.required() + namespace: chainNamespaceValidation.required(), + id: chainIdValidation.required() }) const ens = Joi.any().allow( @@ -88,7 +59,7 @@ const account = Joi.object({ balance }) -const chains = Joi.array().items(chain) +const chains = Joi.array().items(chainValidation) const accounts = Joi.array().items(account) const wallet = Joi.object({ @@ -218,8 +189,8 @@ const disconnectOptions = Joi.object({ }).required() const setChainOptions = Joi.object({ - chainId: chainId.required(), - chainNamespace: chainNamespace, + chainId: chainIdValidation.required(), + chainNamespace: chainNamespaceValidation, wallet: Joi.string() }) @@ -276,13 +247,6 @@ const transactionHandlerReturn = Joi.any().allow( Joi.boolean().allow(false) ) -type ValidateReturn = Joi.ValidationResult | null - -function validate(validator: Joi.Schema, data: unknown): ValidateReturn { - const result = validator.validate(data) - return result.error ? result : null -} - export function validateWallet( data: WalletState | Partial ): ValidateReturn { diff --git a/packages/dcent/package.json b/packages/dcent/package.json index e8937c5fe..1fffe7fe9 100644 --- a/packages/dcent/package.json +++ b/packages/dcent/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/dcent", - "version": "2.0.8", + "version": "2.1.0-alpha.1", "description": "D'CENT wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -36,7 +36,7 @@ "repository": { "type": "git", "url": "https://github.com/blocknative/web3-onboard.git", - "directory": "packages/core" + "directory": "packages/dcent" }, "homepage": "https://www.blocknative.com/onboard", "bugs": "https://github.com/blocknative/web3-onboard/issues", @@ -56,8 +56,8 @@ "typescript": "^4.5.5" }, "dependencies": { - "@web3-onboard/common": "^2.1.8", - "@ethereumjs/common": "^2.6.1", + "@web3-onboard/common": "^2.2.0-alpha.1", + "@web3-onboard/hw-common": "^2.0.0-alpha.1", "@ethereumjs/tx": "^3.4.0", "@ethersproject/providers": "^5.5.0", "eth-dcent-keyring": "^0.2.2" diff --git a/packages/dcent/src/index.ts b/packages/dcent/src/index.ts index f373e6d88..a38bd5f85 100644 --- a/packages/dcent/src/index.ts +++ b/packages/dcent/src/index.ts @@ -1,18 +1,12 @@ -import { - Account, - accountSelect, - Chain, - createEIP1193Provider, - CustomNetwork, - ProviderRpcErrorCode, - ProviderRpcError, - ScanAccountsOptions, - WalletInit, - EIP1193Provider -} from '@web3-onboard/common' - +import type { Chain, WalletInit, EIP1193Provider } from '@web3-onboard/common' import type { providers } from 'ethers' +import type { + CustomNetwork, + Account, + ScanAccountsOptions +} from '@web3-onboard/hw-common' + interface CustomWindow extends Window { ethereum: EIP1193Provider } @@ -89,7 +83,6 @@ function dcent({ const { StaticJsonRpcProvider } = await import( '@ethersproject/providers' ) - const { default: Common, Hardfork } = await import('@ethereumjs/common') const { default: EthDcentKeyring } = await import('eth-dcent-keyring') const dcentKeyring = new EthDcentKeyring({}) @@ -98,6 +91,16 @@ function dcent({ '@ethereumjs/tx' ) + const { getCommon, accountSelect } = await import( + '@web3-onboard/hw-common' + ) + + const { + createEIP1193Provider, + ProviderRpcErrorCode, + ProviderRpcError + } = await import('@web3-onboard/common') + let currentChain: Chain = chains[0] const scanAccounts = async ({ chainId @@ -193,16 +196,11 @@ function dcent({ // Set the `from` field to the currently selected account transactionObject = { ...transactionObject, from } - // @ts-ignore -- Due to weird commonjs exports - const CommonConstructor = Common.default || Common + const chainId = currentChain.hasOwnProperty('id') + ? Number.parseInt(currentChain.id) + : 1 - const common = new CommonConstructor({ - chain: customNetwork || Number.parseInt(currentChain.id) || 1, - // Berlin is the minimum hardfork that will allow for EIP1559 - hardfork: Hardfork.Berlin, - // List of supported EIPS - eips: [1559] - }) + const common = await getCommon({ customNetwork, chainId }) transactionObject.gasLimit = transactionObject.gas || transactionObject.gasLimit diff --git a/packages/demo/package.json b/packages/demo/package.json index 9aa2d306e..ba8dd4398 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -22,22 +22,22 @@ "webpack-dev-server": "4.7.4" }, "dependencies": { - "@web3-onboard/coinbase": "^2.0.10", - "@web3-onboard/core": "^2.7.0", - "@web3-onboard/dcent": "^2.0.7", - "@web3-onboard/fortmatic": "^2.0.9", - "@web3-onboard/gas": "^2.0.0", - "@web3-onboard/gnosis": "^2.0.8", - "@web3-onboard/injected-wallets": "^2.0.15", - "@web3-onboard/keepkey": "^2.1.7", - "@web3-onboard/keystone": "^2.1.8", - "@web3-onboard/ledger": "^2.1.8", - "@web3-onboard/magic": "^2.0.10", - "@web3-onboard/portis": "^2.0.7", - "@web3-onboard/torus": "^2.0.8", - "@web3-onboard/trezor": "^2.1.7", - "@web3-onboard/walletconnect": "^2.0.8", - "@web3-onboard/web3auth": "^2.0.6", + "@web3-onboard/coinbase": "^2.1.0-alpha.1", + "@web3-onboard/core": "^2.8.0-alpha.1", + "@web3-onboard/dcent": "^2.1.0-alpha.1", + "@web3-onboard/fortmatic": "^2.0.11-alpha.1", + "@web3-onboard/gas": "^2.1.0-alpha.1", + "@web3-onboard/gnosis": "^2.1.0-alpha.1", + "@web3-onboard/injected-wallets": "^2.1.0-alpha.1", + "@web3-onboard/keepkey": "^2.2.0-alpha.1", + "@web3-onboard/keystone": "^2.2.0-alpha.1", + "@web3-onboard/ledger": "^2.2.0-alpha.1", + "@web3-onboard/magic": "^2.1.0-alpha.1", + "@web3-onboard/portis": "^2.1.0-alpha.1", + "@web3-onboard/torus": "^2.1.0-alpha.1", + "@web3-onboard/trezor": "^2.2.0-alpha.1", + "@web3-onboard/walletconnect": "^2.1.0-alpha.1", + "@web3-onboard/web3auth": "^2.1.0-alpha.1", "vconsole": "^3.9.5" }, "license": "MIT", diff --git a/packages/fortmatic/package.json b/packages/fortmatic/package.json index 58ba1bb85..3e93c98a5 100644 --- a/packages/fortmatic/package.json +++ b/packages/fortmatic/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/fortmatic", - "version": "2.0.10", + "version": "2.0.11-alpha.1", "description": "Fortmatic wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -36,7 +36,7 @@ "repository": { "type": "git", "url": "https://github.com/blocknative/web3-onboard.git", - "directory": "packages/core" + "directory": "packages/fortmatic" }, "homepage": "https://www.blocknative.com/onboard", "bugs": "https://github.com/blocknative/web3-onboard/issues", @@ -59,7 +59,7 @@ "typescript": "^4.5.5" }, "dependencies": { - "@web3-onboard/common": "^2.1.8", + "@web3-onboard/common": "^2.2.0-alpha.1", "fortmatic": "^2.2.1" } } diff --git a/packages/gas/package.json b/packages/gas/package.json index 3c22b3635..b10fdba8a 100644 --- a/packages/gas/package.json +++ b/packages/gas/package.json @@ -1,9 +1,11 @@ { "name": "@web3-onboard/gas", - "version": "2.0.0", - "description": "Gas", + "version": "2.1.0-alpha.1", + "description": "Estimate the gas prices needed to get a transaction in to the next block for Ethereum Mainnet and Polygon Matic Mainnet.", "keywords": [ - "gas" + "gas", + "Ethereum", + "Polygon" ], "repository": { "type": "git", @@ -28,6 +30,7 @@ "typescript": "^4.5.5" }, "dependencies": { + "@web3-onboard/common": "^2.2.0-alpha.1", "rxjs": "^7.5.2", "joi": "^17.4.2" } diff --git a/packages/gas/src/validation.ts b/packages/gas/src/validation.ts index 1eb720b75..e5ff674c8 100644 --- a/packages/gas/src/validation.ts +++ b/packages/gas/src/validation.ts @@ -1,5 +1,6 @@ import Joi from 'joi' -import { RequestOptions, StreamOptions } from 'types' +import { RequestOptions, StreamOptions } from './types' +import { validate, type ValidateReturn } from '@web3-onboard/common' const requestOptions = Joi.object({ endpoint: Joi.string().valid('blockPrices').required(), @@ -8,13 +9,6 @@ const requestOptions = Joi.object({ poll: Joi.number().min(1000).max(5000) }) -type ValidateReturn = Joi.ValidationResult | null - -const validate = (validator: Joi.Schema, data: unknown): ValidateReturn => { - const result = validator.validate(data) - return result.error ? result : null -} - export const validateRequest = ( request: RequestOptions | StreamOptions ): ValidateReturn => validate(requestOptions, request) diff --git a/packages/gnosis/package.json b/packages/gnosis/package.json index 1e0034b0f..7e8cb0534 100644 --- a/packages/gnosis/package.json +++ b/packages/gnosis/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/gnosis", - "version": "2.0.9", + "version": "2.1.0-alpha.1", "description": "Gnosis Safe module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", "keywords": [ "Ethereum", @@ -34,7 +34,7 @@ "repository": { "type": "git", "url": "https://github.com/blocknative/web3-onboard.git", - "directory": "packages/core" + "directory": "packages/gnosis" }, "homepage": "https://www.blocknative.com/onboard", "bugs": "https://github.com/blocknative/web3-onboard/issues", @@ -59,6 +59,6 @@ "dependencies": { "@gnosis.pm/safe-apps-provider": "^0.9.2", "@gnosis.pm/safe-apps-sdk": "^6.1.1", - "@web3-onboard/common": "^2.1.8" + "@web3-onboard/common": "^2.2.0-alpha.1" } } diff --git a/packages/hw-common/.eslintrc.cjs b/packages/hw-common/.eslintrc.cjs new file mode 100644 index 000000000..03c345514 --- /dev/null +++ b/packages/hw-common/.eslintrc.cjs @@ -0,0 +1,43 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier' + ], + plugins: ['svelte3', '@typescript-eslint'], + ignorePatterns: ['*.cjs'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + settings: { + 'svelte3/typescript': () => require('typescript') + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2019 + }, + env: { + browser: true, + node: true, + es2017: true + }, + rules: { + '@typescript-eslint/quotes': [ + 'error', + 'single', + { allowTemplateLiterals: true } + ], + '@typescript-eslint/no-case-declarations': 'off', + 'max-len': [ + 'error', + { + code: 80, + tabWidth: 2, + ignoreStrings: true, + ignoreTemplateLiterals: true + } + ], + 'object-curly-spacing': ['error', 'always'], + '@typescript-eslint/no-empty-function': 'off' + } +} diff --git a/packages/hw-common/.prettierrc.cjs b/packages/hw-common/.prettierrc.cjs new file mode 100644 index 000000000..c62c290ec --- /dev/null +++ b/packages/hw-common/.prettierrc.cjs @@ -0,0 +1,9 @@ +module.exports = { + semi: false, + trailingComma: 'none', + singleQuote: true, + printWidth: 80, + tabWidth: 2, + arrowParens: 'avoid', + svelteSortOrder: 'options-scripts-styles-markup' +} diff --git a/packages/hw-common/README.md b/packages/hw-common/README.md new file mode 100644 index 000000000..49543e387 --- /dev/null +++ b/packages/hw-common/README.md @@ -0,0 +1,3 @@ +# @web3-onboard/common + +## A collection of functions and types that are shared across various packages in the Onboard V2 monorepo diff --git a/packages/hw-common/package.json b/packages/hw-common/package.json new file mode 100644 index 000000000..01455b6f1 --- /dev/null +++ b/packages/hw-common/package.json @@ -0,0 +1,89 @@ +{ + "name": "@web3-onboard/hw-common", + "version": "2.0.0-alpha.1", + "description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", + "keywords": [ + "Ethereum", + "Web3", + "EVM", + "dapp", + "Multichain", + "Wallet", + "Transaction", + "Provider", + "Hardware Wallet", + "Notifications", + "React", + "Svelte", + "Vue", + "Next", + "Nuxt", + "MetaMask", + "Coinbase", + "WalletConnect", + "Ledger", + "Trezor", + "Connect Wallet", + "Ethereum Hooks", + "Blocknative", + "Mempool", + "pending", + "confirmed", + "Injected Wallet", + "Crypto", + "Crypto Wallet" + ], + "repository": { + "type": "git", + "url": "https://github.com/blocknative/web3-onboard.git", + "directory": "packages/hw-common" + }, + "homepage": "https://www.blocknative.com/onboard", + "bugs": "https://github.com/blocknative/web3-onboard/issues", + "scripts": { + "build": "rollup -c", + "dev": "rollup -c -w", + "start": "sirv public --no-clear", + "type-check": "svelte-check --tsconfig ./tsconfig.json", + "lint": "eslint -c './.eslintrc.cjs' './src' && prettier --check './src/**/*'" + }, + "module": "dist/index.js", + "browser": "dist/index.js", + "main": "dist/index.js", + "type": "module", + "typings": "dist/index.d.ts", + "files": [ + "dist" + ], + "license": "MIT", + "devDependencies": { + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^11.0.0", + "@rollup/plugin-replace": "^3.0.0", + "@rollup/plugin-typescript": "^8.0.0", + "@tsconfig/svelte": "^2.0.0", + "@typescript-eslint/eslint-plugin": "^4.31.1", + "@typescript-eslint/parser": "^4.31.1", + "eip-712": "^0.4.3", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-svelte3": "^3.2.1", + "eventemitter3": "^4.0.7", + "prettier": "^2.4.0", + "prettier-plugin-svelte": "^2.4.0", + "rollup": "^2.3.4", + "rollup-plugin-svelte": "^7.0.0", + "svelte": "^3.49.0", + "svelte-check": "^2.2.6", + "svelte-preprocess": "^4.9.4", + "tslib": "^2.0.0", + "typescript": "^4.5.5" + }, + "dependencies": { + "@ethereumjs/common": "2.6.2", + "@web3-onboard/common": "^2.2.0-alpha.1", + "ethers": "5.5.4", + "joi": "^17.4.2", + "rxjs": "^7.5.2" + } +} diff --git a/packages/common/rollup.config.js b/packages/hw-common/rollup.config.js similarity index 89% rename from packages/common/rollup.config.js rename to packages/hw-common/rollup.config.js index 0541818bf..569e3f178 100644 --- a/packages/common/rollup.config.js +++ b/packages/hw-common/rollup.config.js @@ -35,5 +35,11 @@ export default { inlineSources: !production }) ], - external: ['joi', 'rxjs', 'ethers', '@ethereumjs/common', 'bignumber.js'] + external: [ + 'joi', + 'rxjs', + 'ethers', + '@ethereumjs/common', + '@web3-onboard/common' + ] } diff --git a/packages/common/src/account-select.ts b/packages/hw-common/src/account-select.ts similarity index 96% rename from packages/common/src/account-select.ts rename to packages/hw-common/src/account-select.ts index a184f55ca..e31ace52d 100644 --- a/packages/common/src/account-select.ts +++ b/packages/hw-common/src/account-select.ts @@ -1,9 +1,8 @@ import { firstValueFrom, Subject, take } from 'rxjs' - +import { SofiaProRegular, SofiaProLight } from '@web3-onboard/common' import AccountSelect from './views/AccountSelect.svelte' import { accounts$ } from './streams' import { validateSelectAccountOptions } from './validation' -import { SofiaProRegular, SofiaProSemiBold, SofiaProLight } from './fonts' import type { SelectAccountOptions, Account } from './types' @@ -48,7 +47,6 @@ const mountAccountSelect = ( styleEl.innerHTML = ` ${SofiaProRegular} - ${SofiaProSemiBold} ${SofiaProLight} ` document.body.appendChild(styleEl) diff --git a/packages/common/src/elements/AddressTable.svelte b/packages/hw-common/src/elements/AddressTable.svelte similarity index 98% rename from packages/common/src/elements/AddressTable.svelte rename to packages/hw-common/src/elements/AddressTable.svelte index 99cacce03..13b03bdb3 100644 --- a/packages/common/src/elements/AddressTable.svelte +++ b/packages/hw-common/src/elements/AddressTable.svelte @@ -1,6 +1,6 @@