From 8956690af011009320470869654609c6e4f27f56 Mon Sep 17 00:00:00 2001 From: Jeremy Gayed Date: Wed, 16 Jul 2025 11:42:37 -0400 Subject: [PATCH 1/3] feat: initialize Shopify Vite React TypeScript starter template - Added essential project files including package.json, vite.config.ts, and Tailwind CSS configuration. - Implemented core components such as Header, CartDrawer, and ProductCard. - Established context for cart management and integrated Shopify API queries. - Created pages for Home, Categories, and About with routing support. - Included ESLint and PostCSS configurations for code quality and styling. - Set up a basic .gitignore file to exclude unnecessary files. --- shopify-vite-react-ts/.bolt/prompt | 32 + shopify-vite-react-ts/.gitignore | 25 + shopify-vite-react-ts/eslint.config.js | 28 + shopify-vite-react-ts/index.html | 13 + shopify-vite-react-ts/package-lock.json | 4127 +++++++++++++++++ shopify-vite-react-ts/package.json | 35 + shopify-vite-react-ts/postcss.config.js | 6 + shopify-vite-react-ts/src/App.tsx | 56 + .../src/components/CartDrawer.tsx | 180 + .../src/components/ErrorMessage.tsx | 30 + .../src/components/Header.tsx | 177 + .../src/components/LoadingSpinner.tsx | 23 + .../src/components/ProductCard.tsx | 156 + .../src/components/ProductGrid.tsx | 96 + .../src/context/CartContext.tsx | 258 ++ shopify-vite-react-ts/src/graphql/queries.ts | 509 ++ shopify-vite-react-ts/src/hooks/useShopify.ts | 360 ++ shopify-vite-react-ts/src/index.css | 3 + shopify-vite-react-ts/src/main.tsx | 16 + .../src/pages/CategoriesPage.tsx | 137 + .../src/pages/CategoryPage.tsx | 111 + shopify-vite-react-ts/src/pages/HomePage.tsx | 61 + .../src/pages/ProductPage.tsx | 461 ++ shopify-vite-react-ts/src/types/shopify.ts | 135 + shopify-vite-react-ts/src/utils/shopify.ts | 90 + shopify-vite-react-ts/src/vite-env.d.ts | 1 + shopify-vite-react-ts/tailwind.config.js | 8 + shopify-vite-react-ts/tsconfig.app.json | 24 + shopify-vite-react-ts/tsconfig.json | 7 + shopify-vite-react-ts/tsconfig.node.json | 22 + shopify-vite-react-ts/vite.config.ts | 10 + 31 files changed, 7197 insertions(+) create mode 100644 shopify-vite-react-ts/.bolt/prompt create mode 100644 shopify-vite-react-ts/.gitignore create mode 100644 shopify-vite-react-ts/eslint.config.js create mode 100644 shopify-vite-react-ts/index.html create mode 100644 shopify-vite-react-ts/package-lock.json create mode 100644 shopify-vite-react-ts/package.json create mode 100644 shopify-vite-react-ts/postcss.config.js create mode 100644 shopify-vite-react-ts/src/App.tsx create mode 100644 shopify-vite-react-ts/src/components/CartDrawer.tsx create mode 100644 shopify-vite-react-ts/src/components/ErrorMessage.tsx create mode 100644 shopify-vite-react-ts/src/components/Header.tsx create mode 100644 shopify-vite-react-ts/src/components/LoadingSpinner.tsx create mode 100644 shopify-vite-react-ts/src/components/ProductCard.tsx create mode 100644 shopify-vite-react-ts/src/components/ProductGrid.tsx create mode 100644 shopify-vite-react-ts/src/context/CartContext.tsx create mode 100644 shopify-vite-react-ts/src/graphql/queries.ts create mode 100644 shopify-vite-react-ts/src/hooks/useShopify.ts create mode 100644 shopify-vite-react-ts/src/index.css create mode 100644 shopify-vite-react-ts/src/main.tsx create mode 100644 shopify-vite-react-ts/src/pages/CategoriesPage.tsx create mode 100644 shopify-vite-react-ts/src/pages/CategoryPage.tsx create mode 100644 shopify-vite-react-ts/src/pages/HomePage.tsx create mode 100644 shopify-vite-react-ts/src/pages/ProductPage.tsx create mode 100644 shopify-vite-react-ts/src/types/shopify.ts create mode 100644 shopify-vite-react-ts/src/utils/shopify.ts create mode 100644 shopify-vite-react-ts/src/vite-env.d.ts create mode 100644 shopify-vite-react-ts/tailwind.config.js create mode 100644 shopify-vite-react-ts/tsconfig.app.json create mode 100644 shopify-vite-react-ts/tsconfig.json create mode 100644 shopify-vite-react-ts/tsconfig.node.json create mode 100644 shopify-vite-react-ts/vite.config.ts diff --git a/shopify-vite-react-ts/.bolt/prompt b/shopify-vite-react-ts/.bolt/prompt new file mode 100644 index 0000000..af99047 --- /dev/null +++ b/shopify-vite-react-ts/.bolt/prompt @@ -0,0 +1,32 @@ +# Shopify-Powered Vite React TS Storefront Template + +The code in this starter template is an example fully-featured Shopify storefront built with Vite, React, and TypeScript. The meat of the functionality is in the useShopify hook, which is a wrapper around the Shopify Tokenless API. + +## Tokenless API + +Shopify integration is all via the Tokenless API which only supports: + +- Products and Collections +- Selling Plans +- Search +- Pages, Blogs, and Articles +- Cart (read/write) +- Product and Variant Availability (no quantities) + +IMPORTANT NOTE: You may need to guide me in specifying my Shopify store URL. If the .env file still contains the placeholder "VITE_SHOPIFY_STORE_URL=fakestore-ai.myshopify.com" (note no https:// prefix), you should guide me in specifying my actual Shopify store URL. Remind me that I can find this in my Shopify Admin panel under Settings > Domains. If I don't already have a Shopify store, remind me to create one at shopify.com/free-trial. + +### Shopping Cart + +The cart is read/write and is available for use with the useCart hook. + +### Shopify Permalinks + +Permalinks can be used to create direct-to-checkout links for any number of products and quantities. This is especially useful when building novel UIs that don't have a traditional cart. + +## Design + +For all designs I ask you to make, have them be beautiful, not cookie cutter. Make webpages that are fully featured and worthy for production. + +By default, this template supports JSX syntax with Tailwind CSS classes, React hooks, and Lucide React for icons. Do not install other packages for UI themes, icons, etc unless absolutely necessary or I request them. + +Use icons from lucide-react for logos. diff --git a/shopify-vite-react-ts/.gitignore b/shopify-vite-react-ts/.gitignore new file mode 100644 index 0000000..7ceb59f --- /dev/null +++ b/shopify-vite-react-ts/.gitignore @@ -0,0 +1,25 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.env diff --git a/shopify-vite-react-ts/eslint.config.js b/shopify-vite-react-ts/eslint.config.js new file mode 100644 index 0000000..82c2e20 --- /dev/null +++ b/shopify-vite-react-ts/eslint.config.js @@ -0,0 +1,28 @@ +import js from '@eslint/js'; +import globals from 'globals'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + { ignores: ['dist'] }, + { + extends: [js.configs.recommended, ...tseslint.configs.recommended], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + 'react-hooks': reactHooks, + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, + } +); diff --git a/shopify-vite-react-ts/index.html b/shopify-vite-react-ts/index.html new file mode 100644 index 0000000..0d5c5df --- /dev/null +++ b/shopify-vite-react-ts/index.html @@ -0,0 +1,13 @@ + + + + + + + MockStore Powered by Shopify + + +
+ + + diff --git a/shopify-vite-react-ts/package-lock.json b/shopify-vite-react-ts/package-lock.json new file mode 100644 index 0000000..690bc87 --- /dev/null +++ b/shopify-vite-react-ts/package-lock.json @@ -0,0 +1,4127 @@ +{ + "name": "vite-react-typescript-starter", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "vite-react-typescript-starter", + "version": "0.0.0", + "dependencies": { + "lucide-react": "^0.344.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^7.6.3" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@types/react-router-dom": "^5.3.3", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.18", + "eslint": "^9.9.1", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.11", + "globals": "^15.9.0", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.5.3", + "typescript-eslint": "^8.3.0", + "vite": "^5.4.2" + } + }, + "node_modules/@alloc/quick-lru": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", + "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", + "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.25.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.7.tgz", + "integrity": "sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.7.tgz", + "integrity": "sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/helper-compilation-targets": "^7.25.7", + "@babel/helper-module-transforms": "^7.25.7", + "@babel/helpers": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", + "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", + "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.25.7", + "@babel/helper-validator-option": "^7.25.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", + "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", + "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.25.7", + "@babel/helper-simple-access": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "@babel/traverse": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", + "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", + "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", + "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", + "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", + "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", + "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", + "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.7.tgz", + "integrity": "sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.25.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.25.7.tgz", + "integrity": "sha512-JD9MUnLbPL0WdVK8AWC7F7tTG2OS6u/AKKnsK+NdRhUiVdnzyR1S3kKQCaRLOiaULvUiqK6Z4JQE635VgtCFeg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.25.7.tgz", + "integrity": "sha512-S/JXG/KrbIY06iyJPKfxr0qRxnhNOdkNXYBl/rmwgDd72cQLH9tEGkDm/yJPGvcSIUoikzfjMios9i+xT/uv9w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", + "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/types": "^7.25.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", + "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.25.7", + "@babel/generator": "^7.25.7", + "@babel/parser": "^7.25.7", + "@babel/template": "^7.25.7", + "@babel/types": "^7.25.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.7.tgz", + "integrity": "sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", + "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.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" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.12.0.tgz", + "integrity": "sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", + "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.5", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", + "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "dev": true, + "dependencies": { + "@humanfs/core": "^0.19.0", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz", + "integrity": "sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.0.tgz", + "integrity": "sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.0.tgz", + "integrity": "sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.0.tgz", + "integrity": "sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.0.tgz", + "integrity": "sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.0.tgz", + "integrity": "sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.0.tgz", + "integrity": "sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.0.tgz", + "integrity": "sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.0.tgz", + "integrity": "sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.0.tgz", + "integrity": "sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.0.tgz", + "integrity": "sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.0.tgz", + "integrity": "sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.0.tgz", + "integrity": "sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.0.tgz", + "integrity": "sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.0.tgz", + "integrity": "sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.0.tgz", + "integrity": "sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, + "node_modules/@types/history": { + "version": "4.7.11", + "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", + "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/prop-types": { + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", + "dev": true + }, + "node_modules/@types/react": { + "version": "18.3.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz", + "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", + "dev": true, + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/react-router": { + "version": "5.1.20", + "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", + "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*" + } + }, + "node_modules/@types/react-router-dom": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", + "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/history": "^4.7.11", + "@types/react": "*", + "@types/react-router": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz", + "integrity": "sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/type-utils": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.1.tgz", + "integrity": "sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.1.tgz", + "integrity": "sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.1.tgz", + "integrity": "sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "8.8.1", + "@typescript-eslint/utils": "8.8.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.1.tgz", + "integrity": "sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.1.tgz", + "integrity": "sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/visitor-keys": "8.8.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.1.tgz", + "integrity": "sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.8.1", + "@typescript-eslint/types": "8.8.1", + "@typescript-eslint/typescript-estree": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.1.tgz", + "integrity": "sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.8.1", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz", + "integrity": "sha512-hieu+o05v4glEBucTcKMK3dlES0OeJlD9YVOAPraVMOInBCwzumaIFiUjr4bHK7NPgnAHgiskUoceKercrN8vg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.25.2", + "@babel/plugin-transform-react-jsx-self": "^7.24.7", + "@babel/plugin-transform-react-jsx-source": "^7.24.7", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "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" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.20", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.20.tgz", + "integrity": "sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.23.3", + "caniuse-lite": "^1.0.30001646", + "fraction.js": "^4.3.7", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.1", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-css": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", + "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001667", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", + "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/didyoumean": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", + "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==", + "dev": true + }, + "node_modules/dlv": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", + "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==", + "dev": true + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.5.33", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.33.tgz", + "integrity": "sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.12.0.tgz", + "integrity": "sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/core": "^0.6.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.12.0", + "@eslint/plugin-kit": "^0.2.0", + "@humanfs/node": "^0.16.5", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.1.0", + "eslint-visitor-keys": "^4.1.0", + "espree": "^10.2.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "5.1.0-rc-fb9a90fa48-20240614", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0-rc-fb9a90fa48-20240614.tgz", + "integrity": "sha512-xsiRwaDNF5wWNC4ZHLut+x/YcAxksUd9Rizt7LaEn3bV8VyYRpXnRJQlLOfYaVy9esk4DFP4zPPnoNVjq5Gc0w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-react-refresh": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.12.tgz", + "integrity": "sha512-9neVjoGv20FwYtCP6CB1dzR1vr57ZDNOXst21wd2xJ/cTlM2xLq0GWVlSNTdMn/4BtP6cHYBMCSp1wFBJ9jBsg==", + "dev": true, + "peerDependencies": { + "eslint": ">=7" + } + }, + "node_modules/eslint-scope": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", + "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", + "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/espree": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", + "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "dev": true, + "dependencies": { + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "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" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fraction.js": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz", + "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://github.com/sponsors/rawify" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "15.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.11.0.tgz", + "integrity": "sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jiti": { + "version": "1.21.6", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz", + "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.344.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.344.0.tgz", + "integrity": "sha512-6YyBnn91GB45VuVT96bYCOKElbJzUHqp65vX8cDcu55MQL9T969v4dhGClpljamuI/+KMO9P6w9Acq1CVQGvIQ==", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "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.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-import": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz", + "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-js": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz", + "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==", + "dev": true, + "dependencies": { + "camelcase-css": "^2.0.1" + }, + "engines": { + "node": "^12 || ^14 || >= 16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.4.21" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz", + "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "lilconfig": "^3.0.0", + "yaml": "^2.3.4" + }, + "engines": { + "node": ">= 14" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-nested": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz", + "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "postcss-selector-parser": "^6.1.1" + }, + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-router": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.6.3.tgz", + "integrity": "sha512-zf45LZp5skDC6I3jDLXQUu0u26jtuP4lEGbc7BbdyxenBN1vJSTA18czM2D+h5qyMBuMrD+9uB+mU37HIoKGRA==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.6.3.tgz", + "integrity": "sha512-DiWJm9qdUAmiJrVWaeJdu4TKu13+iB/8IEi0EW/XgaHCjW/vWGrwzup0GVvaMteuZjKnh5bEvJP/K0MDnzawHw==", + "license": "MIT", + "dependencies": { + "react-router": "7.6.3" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", + "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.24.0", + "@rollup/rollup-android-arm64": "4.24.0", + "@rollup/rollup-darwin-arm64": "4.24.0", + "@rollup/rollup-darwin-x64": "4.24.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.24.0", + "@rollup/rollup-linux-arm-musleabihf": "4.24.0", + "@rollup/rollup-linux-arm64-gnu": "4.24.0", + "@rollup/rollup-linux-arm64-musl": "4.24.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.24.0", + "@rollup/rollup-linux-riscv64-gnu": "4.24.0", + "@rollup/rollup-linux-s390x-gnu": "4.24.0", + "@rollup/rollup-linux-x64-gnu": "4.24.0", + "@rollup/rollup-linux-x64-musl": "4.24.0", + "@rollup/rollup-win32-arm64-msvc": "4.24.0", + "@rollup/rollup-win32-ia32-msvc": "4.24.0", + "@rollup/rollup-win32-x64-msvc": "4.24.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tailwindcss": { + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", + "dev": true, + "dependencies": { + "@alloc/quick-lru": "^5.2.0", + "arg": "^5.0.2", + "chokidar": "^3.6.0", + "didyoumean": "^1.2.2", + "dlv": "^1.1.3", + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.2", + "is-glob": "^4.0.3", + "jiti": "^1.21.6", + "lilconfig": "^3.1.3", + "micromatch": "^4.0.8", + "normalize-path": "^3.0.0", + "object-hash": "^3.0.0", + "picocolors": "^1.1.1", + "postcss": "^8.4.47", + "postcss-import": "^15.1.0", + "postcss-js": "^4.0.1", + "postcss-load-config": "^4.0.2", + "postcss-nested": "^6.2.0", + "postcss-selector-parser": "^6.1.2", + "resolve": "^1.22.8", + "sucrase": "^3.35.0" + }, + "bin": { + "tailwind": "lib/cli.js", + "tailwindcss": "lib/cli.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.1.tgz", + "integrity": "sha512-R0dsXFt6t4SAFjUSKFjMh4pXDtq04SsFKCVGDP3ZOzNP7itF0jBcZYU4fMsZr4y7O7V7Nc751dDeESbe4PbQMQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.8.1", + "@typescript-eslint/parser": "8.8.1", + "@typescript-eslint/utils": "8.8.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/vite": { + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/shopify-vite-react-ts/package.json b/shopify-vite-react-ts/package.json new file mode 100644 index 0000000..850a245 --- /dev/null +++ b/shopify-vite-react-ts/package.json @@ -0,0 +1,35 @@ +{ + "name": "vite-react-typescript-starter", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "lint": "eslint .", + "preview": "vite preview" + }, + "dependencies": { + "lucide-react": "^0.344.0", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^7.6.3" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@types/react-router-dom": "^5.3.3", + "@vitejs/plugin-react": "^4.3.1", + "autoprefixer": "^10.4.18", + "eslint": "^9.9.1", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", + "eslint-plugin-react-refresh": "^0.4.11", + "globals": "^15.9.0", + "postcss": "^8.4.35", + "tailwindcss": "^3.4.1", + "typescript": "^5.5.3", + "typescript-eslint": "^8.3.0", + "vite": "^5.4.2" + } +} diff --git a/shopify-vite-react-ts/postcss.config.js b/shopify-vite-react-ts/postcss.config.js new file mode 100644 index 0000000..2aa7205 --- /dev/null +++ b/shopify-vite-react-ts/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/shopify-vite-react-ts/src/App.tsx b/shopify-vite-react-ts/src/App.tsx new file mode 100644 index 0000000..b57b5b0 --- /dev/null +++ b/shopify-vite-react-ts/src/App.tsx @@ -0,0 +1,56 @@ +import React, { useState } from 'react'; +import { Routes, Route } from 'react-router-dom'; +import Header from './components/Header'; +import CartDrawer from './components/CartDrawer'; +import HomePage from './pages/HomePage'; +import ProductPage from './pages/ProductPage'; +import CategoriesPage from './pages/CategoriesPage'; +import CategoryPage from './pages/CategoryPage'; + +const App: React.FC = () => { + const [searchQuery, setSearchQuery] = useState(''); + const [isCartOpen, setIsCartOpen] = useState(false); + + const handleSearchChange = (query: string) => { + setSearchQuery(query); + }; + + const handleCartClick = () => { + setIsCartOpen(true); + }; + + const handleCartClose = () => { + setIsCartOpen(false); + }; + + return ( +
+
+ +
+ + + } + /> + } /> + } /> + } /> + +
+ + +
+ ); +}; + +export default App; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/CartDrawer.tsx b/shopify-vite-react-ts/src/components/CartDrawer.tsx new file mode 100644 index 0000000..347141b --- /dev/null +++ b/shopify-vite-react-ts/src/components/CartDrawer.tsx @@ -0,0 +1,180 @@ +import React from 'react'; +import { X, Plus, Minus, ShoppingBag } from 'lucide-react'; +import { useCartContext } from '../context/CartContext'; +import { formatPrice } from '../utils/shopify'; + +interface CartDrawerProps { + isOpen: boolean; + onClose: () => void; +} + +const CartDrawer: React.FC = ({ isOpen, onClose }) => { + const { cart, loading, updateCartLine, removeFromCart } = useCartContext(); + + const handleQuantityChange = async (lineId: string, newQuantity: number) => { + if (newQuantity <= 0) { + await removeFromCart([lineId]); + } else { + await updateCartLine(lineId, newQuantity); + } + }; + +const handleCheckout = () => { + if (cart?.checkoutUrl) { + // Check if we're within an iframe + const isInIframe = window.self !== window.top; + + if (isInIframe) { + // Open checkout in a new window/tab when in iframe + window.open(cart.checkoutUrl, '_blank', 'noopener,noreferrer'); + } else { + // Open checkout in the same window when not in iframe + window.location.href = cart.checkoutUrl; + } + } else { + console.error('No checkout URL available'); + // Optionally show an error message to the user + } +}; + + return ( + <> + {/* Overlay */} + {isOpen && ( +
+ )} + + {/* Cart Drawer */} +
+ {/* Header */} +
+

Shopping Cart

+ +
+ + {/* Cart Content */} +
+ {!cart || cart.lines.nodes.length === 0 ? ( +
+ +

Your cart is empty

+

Add some products to get started

+
+ ) : ( +
+ {cart.lines.nodes.map((line) => ( +
+ {/* Product Image */} +
+ {line.merchandise.product.featuredImage ? ( + {line.merchandise.product.featuredImage.altText + ) : ( +
+ No image +
+ )} +
+ + {/* Product Info */} +
+

+ {line.merchandise.product.title} +

+ {line.merchandise.selectedOptions.map((option) => ( +

+ {option.name}: {option.value} +

+ ))} +

+ {formatPrice(line.merchandise.price)} +

+
+ + {/* Quantity Controls */} +
+ + + {line.quantity} + + +
+ + {/* Remove Button */} + +
+ ))} +
+ )} +
+ + {/* Footer */} + {cart && cart.lines.nodes.length > 0 && ( +
+ {/* Subtotal */} +
+ Subtotal + + {formatPrice(cart.cost.subtotalAmount)} + +
+ + {/* Total Items */} +
+ Total items + {cart.totalQuantity} +
+ + {/* Checkout Button */} + + +

+ Shipping and taxes calculated at checkout +

+
+ )} +
+ + ); +}; + +export default CartDrawer; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ErrorMessage.tsx b/shopify-vite-react-ts/src/components/ErrorMessage.tsx new file mode 100644 index 0000000..22474f3 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ErrorMessage.tsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { AlertCircle, RefreshCw } from 'lucide-react'; + +interface ErrorMessageProps { + message: string; + onRetry?: () => void; +} + +const ErrorMessage: React.FC = ({ message, onRetry }) => { + return ( +
+
+ +
+

Something went wrong

+

{message}

+ {onRetry && ( + + )} +
+ ); +}; + +export default ErrorMessage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/Header.tsx b/shopify-vite-react-ts/src/components/Header.tsx new file mode 100644 index 0000000..a9fab8f --- /dev/null +++ b/shopify-vite-react-ts/src/components/Header.tsx @@ -0,0 +1,177 @@ +import React, { useState } from 'react'; +import { Link, useLocation, useNavigate } from 'react-router-dom'; +import { Search, ShoppingCart, Menu, X } from 'lucide-react'; +import { useCartContext } from '../context/CartContext'; + +interface HeaderProps { + onSearchChange: (query: string) => void; + onCartClick: () => void; + searchQuery: string; +} + +const Header: React.FC = ({ onSearchChange, onCartClick, searchQuery }) => { + const [isMenuOpen, setIsMenuOpen] = useState(false); + const [isSearchOpen, setIsSearchOpen] = useState(false); + const location = useLocation(); + const navigate = useNavigate(); + const { cart } = useCartContext(); + + const handleSearchSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const formData = new FormData(e.target as HTMLFormElement); + const query = formData.get('search') as string; + onSearchChange(query); + + // Navigate to home page if not already there + if (location.pathname !== '/') { + navigate('/'); + } + + setIsSearchOpen(false); + }; + + return ( +
+
+
+ {/* Logo */} +
+ + MockStore + +
+ + {/* Desktop Navigation */} + + + {/* Desktop Search */} +
+
+
+ + +
+
+ + {/* Cart Button */} + +
+ + {/* Mobile Menu Button */} +
+ + + +
+
+ + {/* Mobile Search */} + {isSearchOpen && ( +
+
+
+ + +
+
+
+ )} + + {/* Mobile Navigation */} + {isMenuOpen && ( +
+
+ setIsMenuOpen(false)} + > + All Products + + setIsMenuOpen(false)} + > + Categories + +
+
+ )} +
+
+ ); +}; + +export default Header; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/LoadingSpinner.tsx b/shopify-vite-react-ts/src/components/LoadingSpinner.tsx new file mode 100644 index 0000000..8922586 --- /dev/null +++ b/shopify-vite-react-ts/src/components/LoadingSpinner.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { Loader2 } from 'lucide-react'; + +interface LoadingSpinnerProps { + size?: 'sm' | 'md' | 'lg'; + className?: string; +} + +const LoadingSpinner: React.FC = ({ size = 'md', className = '' }) => { + const sizeClasses = { + sm: 'h-4 w-4', + md: 'h-8 w-8', + lg: 'h-12 w-12', + }; + + return ( +
+ +
+ ); +}; + +export default LoadingSpinner; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductCard.tsx b/shopify-vite-react-ts/src/components/ProductCard.tsx new file mode 100644 index 0000000..1855248 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ProductCard.tsx @@ -0,0 +1,156 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Eye, ShoppingCart, Zap } from 'lucide-react'; +import { Product } from '../types/shopify'; +import { formatPrice, createCheckoutPermalink } from '../utils/shopify'; +import { useCartContext } from '../context/CartContext'; + +interface ProductCardProps { + product: Product; + onQuickView?: (product: Product) => void; +} + +const ProductCard: React.FC = ({ product, onQuickView }) => { + const { addToCart } = useCartContext(); + + const firstVariant = product.variants.nodes[0]; + const isOnSale = firstVariant?.compareAtPrice && + parseFloat(firstVariant.compareAtPrice.amount) > parseFloat(firstVariant.price.amount); + + const handleAddToCart = async (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + + if (!firstVariant || !product.availableForSale) return; + + try { + await addToCart([ + { + merchandiseId: firstVariant.id, + quantity: 1, + }, + ]); + } catch (error) { + console.error('Failed to add to cart:', error); + } + }; + + const handleBuyNow = (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + + if (!firstVariant || !product.availableForSale) return; + + const checkoutUrl = createCheckoutPermalink([ + { + id: firstVariant.id.split('/').pop() || '', + quantity: 1, + }, + ]); + + window.open(checkoutUrl, '_blank'); + }; + + const handleQuickView = (e: React.MouseEvent) => { + e.preventDefault(); + e.stopPropagation(); + + if (onQuickView) { + onQuickView(product); + } + }; + + return ( +
+ +
+ {product.images.nodes.length > 0 ? ( + {product.images.nodes[0].altText + ) : ( +
+ No Image +
+ )} + + {/* Sale Badge */} + {isOnSale && ( +
+ Sale +
+ )} + + {/* Out of Stock Badge */} + {!product.availableForSale && ( +
+ Out of Stock +
+ )} + + {/* Hover Actions */} +
+
+ {onQuickView && ( + + )} + + {product.availableForSale && ( + <> + + + + + )} +
+
+
+ +
+

+ {product.title} +

+ + {product.vendor && ( +

{product.vendor}

+ )} + +
+
+ + {formatPrice(firstVariant?.price)} + + {isOnSale && firstVariant?.compareAtPrice && ( + + {formatPrice(firstVariant.compareAtPrice)} + + )} +
+
+
+ +
+ ); +}; + +export default ProductCard; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductGrid.tsx b/shopify-vite-react-ts/src/components/ProductGrid.tsx new file mode 100644 index 0000000..d1bec43 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ProductGrid.tsx @@ -0,0 +1,96 @@ +import React from 'react'; +import { Loader2 } from 'lucide-react'; +import { ShopifyProduct } from '../types/shopify'; +import ProductCard from './ProductCard'; + +interface ProductGridProps { + products: ShopifyProduct[]; + loading: boolean; + error: string | null; + hasNextPage: boolean; + onLoadMore: () => void; + onQuickView?: (product: ShopifyProduct) => void; +} + +const ProductGrid: React.FC = ({ + products, + loading, + error, + hasNextPage, + onLoadMore, + onQuickView, +}) => { + if (error) { + return ( +
+
+ + + +

Failed to load products

+

{error}

+
+
+ ); + } + + if (loading && products.length === 0) { + return ( +
+ +

Loading products...

+
+ ); + } + + if (products.length === 0) { + return ( +
+
+ + + +

No products found

+

Try adjusting your search or filters

+
+
+ ); + } + + return ( +
+ {/* Products Grid */} +
+ {products.map((product) => ( + + ))} +
+ + {/* Load More Button */} + {hasNextPage && ( +
+ +
+ )} +
+ ); +}; + +export default ProductGrid; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/context/CartContext.tsx b/shopify-vite-react-ts/src/context/CartContext.tsx new file mode 100644 index 0000000..3efbe05 --- /dev/null +++ b/shopify-vite-react-ts/src/context/CartContext.tsx @@ -0,0 +1,258 @@ +import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react'; +import { ShopifyCart, CartLineInput } from '../types/shopify'; +import { shopifyFetch, getCartId, setCartId, removeCartId } from '../utils/shopify'; +import { + CREATE_CART, + GET_CART, + ADD_TO_CART, + UPDATE_CART_LINES, + REMOVE_FROM_CART, +} from '../graphql/queries'; + +interface CartContextType { + cart: ShopifyCart | null; + loading: boolean; + error: string | null; + addToCart: (lines: CartLineInput[]) => Promise; + updateCartLine: (lineId: string, quantity: number) => Promise; + removeFromCart: (lineIds: string[]) => Promise; + refreshCart: () => Promise; +} + +const CartContext = createContext(undefined); + +export const useCartContext = () => { + const context = useContext(CartContext); + if (context === undefined) { + throw new Error('useCartContext must be used within a CartProvider'); + } + return context; +}; + +interface CartProviderProps { + children: ReactNode; +} + +export const CartProvider: React.FC = ({ children }) => { + const [cart, setCart] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const createCart = async (lines: CartLineInput[] = []) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartCreate: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(CREATE_CART, { + input: { lines }, + }); + + if (data.cartCreate.userErrors.length > 0) { + throw new Error(data.cartCreate.userErrors[0].message); + } + + const newCart = data.cartCreate.cart; + setCart(newCart); + setCartId(newCart.id); + console.log('Cart created successfully:', newCart); + return newCart; + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Failed to create cart'; + setError(errorMessage); + console.error('Cart creation failed:', errorMessage); + throw err; + } finally { + setLoading(false); + } + }; + + const fetchCart = async (cartId: string) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ cart: ShopifyCart }>(GET_CART, { id: cartId }); + setCart(data.cart); + console.log('Cart fetched successfully:', data.cart); + return data.cart; + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Failed to fetch cart'; + setError(errorMessage); + console.error('Cart fetch failed:', errorMessage); + // If cart fetch fails, remove the invalid cart ID + removeCartId(); + setCart(null); + throw err; + } finally { + setLoading(false); + } + }; + + const addToCart = async (lines: CartLineInput[]) => { + let currentCart = cart; + + if (!currentCart) { + const cartId = getCartId(); + if (cartId) { + try { + currentCart = await fetchCart(cartId); + } catch { + // If fetching existing cart fails, create a new one + currentCart = await createCart(); + } + } else { + // No existing cart, create a new one + currentCart = await createCart(); + } + } + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesAdd: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(ADD_TO_CART, { + cartId: currentCart.id, + lines, + }); + + if (data.cartLinesAdd.userErrors.length > 0) { + throw new Error(data.cartLinesAdd.userErrors[0].message); + } + + const updatedCart = data.cartLinesAdd.cart; + setCart(updatedCart); + console.log('Item added to cart successfully:', updatedCart); + return updatedCart; + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Failed to add to cart'; + setError(errorMessage); + console.error('Add to cart failed:', errorMessage); + throw err; + } finally { + setLoading(false); + } + }; + + const updateCartLine = async (lineId: string, quantity: number) => { + if (!cart) return; + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesUpdate: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(UPDATE_CART_LINES, { + cartId: cart.id, + lines: [{ id: lineId, quantity }], + }); + + if (data.cartLinesUpdate.userErrors.length > 0) { + throw new Error(data.cartLinesUpdate.userErrors[0].message); + } + + const updatedCart = data.cartLinesUpdate.cart; + setCart(updatedCart); + console.log('Cart line updated successfully:', updatedCart); + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Failed to update cart'; + setError(errorMessage); + console.error('Cart update failed:', errorMessage); + throw err; + } finally { + setLoading(false); + } + }; + + const removeFromCart = async (lineIds: string[]) => { + if (!cart) return; + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesRemove: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(REMOVE_FROM_CART, { + cartId: cart.id, + lineIds, + }); + + if (data.cartLinesRemove.userErrors.length > 0) { + throw new Error(data.cartLinesRemove.userErrors[0].message); + } + + const updatedCart = data.cartLinesRemove.cart; + setCart(updatedCart); + console.log('Items removed from cart successfully:', updatedCart); + } catch (err) { + const errorMessage = err instanceof Error ? err.message : 'Failed to remove from cart'; + setError(errorMessage); + console.error('Remove from cart failed:', errorMessage); + throw err; + } finally { + setLoading(false); + } + }; + + const refreshCart = async () => { + const cartId = getCartId(); + if (cartId) { + try { + await fetchCart(cartId); + } catch { + // Cart not found or invalid, clear it + setCart(null); + } + } + }; + + // Initialize cart on mount + useEffect(() => { + const initializeCart = async () => { + const cartId = getCartId(); + if (cartId) { + try { + await fetchCart(cartId); + } catch { + // Cart not found or invalid, will create new one when needed + console.log('No existing cart found, will create new one when needed'); + } + } + }; + + initializeCart(); + }, []); + + const value: CartContextType = { + cart, + loading, + error, + addToCart, + updateCartLine, + removeFromCart, + refreshCart, + }; + + return ( + + {children} + + ); +}; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/graphql/queries.ts b/shopify-vite-react-ts/src/graphql/queries.ts new file mode 100644 index 0000000..0861987 --- /dev/null +++ b/shopify-vite-react-ts/src/graphql/queries.ts @@ -0,0 +1,509 @@ +export const GET_PRODUCTS = ` + query GetProducts($first: Int!, $after: String, $query: String) { + products(first: $first, after: $after, query: $query) { + nodes { + id + title + description + handle + images(first: 5) { + nodes { + id + url + altText + width + height + } + } + variants(first: 10) { + nodes { + id + title + price { + amount + currencyCode + } + compareAtPrice { + amount + currencyCode + } + selectedOptions { + name + value + } + availableForSale + } + } + availableForSale + vendor + productType + tags + priceRange { + minVariantPrice { + amount + currencyCode + } + maxVariantPrice { + amount + currencyCode + } + } + } + pageInfo { + hasNextPage + endCursor + } + } + } +`; + +export const GET_PRODUCT_BY_HANDLE = ` + query GetProductByHandle($handle: String!) { + product(handle: $handle) { + id + title + description + handle + images(first: 10) { + nodes { + id + url + altText + width + height + } + } + variants(first: 10) { + nodes { + id + title + price { + amount + currencyCode + } + compareAtPrice { + amount + currencyCode + } + selectedOptions { + name + value + } + availableForSale + } + } + availableForSale + vendor + productType + tags + priceRange { + minVariantPrice { + amount + currencyCode + } + maxVariantPrice { + amount + currencyCode + } + } + } + } +`; + +export const CREATE_CART = ` + mutation CreateCart($input: CartInput!) { + cartCreate(input: $input) { + cart { + id + checkoutUrl + totalQuantity + cost { + totalAmount { + amount + currencyCode + } + subtotalAmount { + amount + currencyCode + } + } + lines(first: 250) { + nodes { + id + quantity + merchandise { + ... on ProductVariant { + id + title + selectedOptions { + name + value + } + price { + amount + currencyCode + } + product { + id + title + handle + featuredImage { + url + altText + } + } + } + } + cost { + totalAmount { + amount + currencyCode + } + } + } + } + } + userErrors { + field + message + } + } + } +`; + +export const GET_CART = ` + query GetCart($id: ID!) { + cart(id: $id) { + id + checkoutUrl + totalQuantity + cost { + totalAmount { + amount + currencyCode + } + subtotalAmount { + amount + currencyCode + } + } + lines(first: 250) { + nodes { + id + quantity + merchandise { + ... on ProductVariant { + id + title + selectedOptions { + name + value + } + price { + amount + currencyCode + } + product { + id + title + handle + featuredImage { + url + altText + } + } + } + } + cost { + totalAmount { + amount + currencyCode + } + } + } + } + } + } +`; + +export const ADD_TO_CART = ` + mutation AddToCart($cartId: ID!, $lines: [CartLineInput!]!) { + cartLinesAdd(cartId: $cartId, lines: $lines) { + cart { + id + checkoutUrl + totalQuantity + cost { + totalAmount { + amount + currencyCode + } + subtotalAmount { + amount + currencyCode + } + } + lines(first: 250) { + nodes { + id + quantity + merchandise { + ... on ProductVariant { + id + title + selectedOptions { + name + value + } + price { + amount + currencyCode + } + product { + id + title + handle + featuredImage { + url + altText + } + } + } + } + cost { + totalAmount { + amount + currencyCode + } + } + } + } + } + userErrors { + field + message + } + } + } +`; + +export const UPDATE_CART_LINES = ` + mutation UpdateCartLines($cartId: ID!, $lines: [CartLineUpdateInput!]!) { + cartLinesUpdate(cartId: $cartId, lines: $lines) { + cart { + id + checkoutUrl + totalQuantity + cost { + totalAmount { + amount + currencyCode + } + subtotalAmount { + amount + currencyCode + } + } + lines(first: 250) { + nodes { + id + quantity + merchandise { + ... on ProductVariant { + id + title + selectedOptions { + name + value + } + price { + amount + currencyCode + } + product { + id + title + handle + featuredImage { + url + altText + } + } + } + } + cost { + totalAmount { + amount + currencyCode + } + } + } + } + } + userErrors { + field + message + } + } + } +`; + +export const REMOVE_FROM_CART = ` + mutation RemoveFromCart($cartId: ID!, $lineIds: [ID!]!) { + cartLinesRemove(cartId: $cartId, lineIds: $lineIds) { + cart { + id + checkoutUrl + totalQuantity + cost { + totalAmount { + amount + currencyCode + } + subtotalAmount { + amount + currencyCode + } + } + lines(first: 250) { + nodes { + id + quantity + merchandise { + ... on ProductVariant { + id + title + selectedOptions { + name + value + } + price { + amount + currencyCode + } + product { + id + title + handle + featuredImage { + url + altText + } + } + } + } + cost { + totalAmount { + amount + currencyCode + } + } + } + } + } + userErrors { + field + message + } + } + } +`; + +export const GET_COLLECTIONS = ` + query GetCollections($first: Int!) { + collections(first: $first) { + nodes { + id + title + description + handle + image { + url + altText + } + products(first: 8) { + nodes { + id + title + handle + images(first: 1) { + nodes { + url + altText + } + } + priceRange { + minVariantPrice { + amount + currencyCode + } + } + } + } + } + } + } +`; + +export const GET_COLLECTION_PRODUCTS = ` + query GetCollectionProducts($handle: String!, $first: Int!, $after: String) { + collection(handle: $handle) { + id + title + description + image { + url + altText + } + products(first: $first, after: $after) { + nodes { + id + title + description + handle + images(first: 5) { + nodes { + id + url + altText + width + height + } + } + variants(first: 10) { + nodes { + id + title + price { + amount + currencyCode + } + compareAtPrice { + amount + currencyCode + } + selectedOptions { + name + value + } + } + } + availableForSale + vendor + productType + tags + priceRange { + minVariantPrice { + amount + currencyCode + } + maxVariantPrice { + amount + currencyCode + } + } + } + } + } + } +`; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/hooks/useShopify.ts b/shopify-vite-react-ts/src/hooks/useShopify.ts new file mode 100644 index 0000000..b24e756 --- /dev/null +++ b/shopify-vite-react-ts/src/hooks/useShopify.ts @@ -0,0 +1,360 @@ +import { useState, useEffect } from 'react'; +import { ShopifyProduct, ShopifyCart, CartLineInput, ShopifyCollection } from '../types/shopify'; +import { shopifyFetch, getCartId, setCartId, removeCartId } from '../utils/shopify'; +import { + GET_PRODUCTS, + GET_PRODUCT_BY_HANDLE, + GET_COLLECTIONS, + GET_COLLECTION_PRODUCTS, + CREATE_CART, + GET_CART, + ADD_TO_CART, + UPDATE_CART_LINES, + REMOVE_FROM_CART, +} from '../graphql/queries'; + +export const useProducts = (query?: string) => { + const [products, setProducts] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + const [hasNextPage, setHasNextPage] = useState(false); + const [endCursor, setEndCursor] = useState(null); + + const fetchProducts = async (reset = false) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + products: { + nodes: ShopifyProduct[]; + pageInfo: { + hasNextPage: boolean; + endCursor: string; + }; + }; + }>(GET_PRODUCTS, { + first: 20, + after: reset ? null : endCursor, + query, + }); + + setProducts(reset ? data.products.nodes : [...products, ...data.products.nodes]); + setHasNextPage(data.products.pageInfo.hasNextPage); + setEndCursor(data.products.pageInfo.endCursor); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to fetch products'); + } finally { + setLoading(false); + } + }; + + const loadMore = () => { + if (!loading && hasNextPage) { + fetchProducts(false); + } + }; + + useEffect(() => { + fetchProducts(true); + }, [query]); + + return { + products, + loading, + error, + hasNextPage, + loadMore, + refetch: () => fetchProducts(true), + }; +}; + +export const useProduct = (handle: string) => { + const [product, setProduct] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + useEffect(() => { + const fetchProduct = async () => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ product: ShopifyProduct }>( + GET_PRODUCT_BY_HANDLE, + { handle } + ); + setProduct(data.product); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to fetch product'); + } finally { + setLoading(false); + } + }; + + if (handle) { + fetchProduct(); + } + }, [handle]); + + return { product, loading, error }; +}; + +export const useCollections = () => { + const [collections, setCollections] = useState([]); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + useEffect(() => { + const fetchCollections = async () => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + collections: { + nodes: ShopifyCollection[]; + }; + }>(GET_COLLECTIONS, { first: 20 }); + + setCollections(data.collections.nodes); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to fetch collections'); + } finally { + setLoading(false); + } + }; + + fetchCollections(); + }, []); + + return { collections, loading, error }; +}; + +export const useCollectionProducts = (handle: string) => { + const [collection, setCollection] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const fetchCollectionProducts = async (reset = false) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + collection: ShopifyCollection; + }>(GET_COLLECTION_PRODUCTS, { + handle, + first: 20, + after: null, + }); + + setCollection(data.collection); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to fetch collection products'); + } finally { + setLoading(false); + } + }; + + + useEffect(() => { + if (handle) { + fetchCollectionProducts(true); + } + }, [handle]); + + return { + collection, + loading, + error, + refetch: () => fetchCollectionProducts(true), + }; +}; + +export const useCart = () => { + const [cart, setCart] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const createCart = async (lines: CartLineInput[] = []) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartCreate: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(CREATE_CART, { + input: { lines }, + }); + + if (data.cartCreate.userErrors.length > 0) { + throw new Error(data.cartCreate.userErrors[0].message); + } + + setCart(data.cartCreate.cart); + setCartId(data.cartCreate.cart.id); + return data.cartCreate.cart; + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to create cart'); + throw err; + } finally { + setLoading(false); + } + }; + + const fetchCart = async (cartId: string) => { + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ cart: ShopifyCart }>(GET_CART, { id: cartId }); + setCart(data.cart); + return data.cart; + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to fetch cart'); + // If cart fetch fails, remove the invalid cart ID + removeCartId(); + throw err; + } finally { + setLoading(false); + } + }; + + const addToCart = async (lines: CartLineInput[]) => { + let currentCart = cart; + + if (!currentCart) { + const cartId = getCartId(); + if (cartId) { + try { + currentCart = await fetchCart(cartId); + } catch { + // If fetching existing cart fails, create a new one + currentCart = await createCart(); + } + } else { + // No existing cart, create a new one + currentCart = await createCart(); + } + } + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesAdd: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(ADD_TO_CART, { + cartId: currentCart.id, + lines, + }); + + if (data.cartLinesAdd.userErrors.length > 0) { + throw new Error(data.cartLinesAdd.userErrors[0].message); + } + + setCart(data.cartLinesAdd.cart); + console.log('Cart updated successfully:', data.cartLinesAdd.cart); + return data.cartLinesAdd.cart; + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to add to cart'); + throw err; + } finally { + setLoading(false); + } + }; + + const updateCartLine = async (lineId: string, quantity: number) => { + if (!cart) return; + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesUpdate: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(UPDATE_CART_LINES, { + cartId: cart.id, + lines: [{ id: lineId, quantity }], + }); + + if (data.cartLinesUpdate.userErrors.length > 0) { + throw new Error(data.cartLinesUpdate.userErrors[0].message); + } + + setCart(data.cartLinesUpdate.cart); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to update cart'); + throw err; + } finally { + setLoading(false); + } + }; + + const removeFromCart = async (lineIds: string[]) => { + if (!cart) return; + + setLoading(true); + setError(null); + + try { + const data = await shopifyFetch<{ + cartLinesRemove: { + cart: ShopifyCart; + userErrors: Array<{ field: string; message: string }>; + }; + }>(REMOVE_FROM_CART, { + cartId: cart.id, + lineIds, + }); + + if (data.cartLinesRemove.userErrors.length > 0) { + throw new Error(data.cartLinesRemove.userErrors[0].message); + } + + setCart(data.cartLinesRemove.cart); + } catch (err) { + setError(err instanceof Error ? err.message : 'Failed to remove from cart'); + throw err; + } finally { + setLoading(false); + } + }; + + // Initialize cart on mount + useEffect(() => { + const initializeCart = async () => { + const cartId = getCartId(); + if (cartId) { + try { + await fetchCart(cartId); + } catch { + // Cart not found or invalid, will create new one when needed + } + } + }; + + initializeCart(); + }, []); + + return { + cart, + loading, + error, + addToCart, + updateCartLine, + removeFromCart, + createCart, + fetchCart, + }; +}; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/index.css b/shopify-vite-react-ts/src/index.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/shopify-vite-react-ts/src/index.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/shopify-vite-react-ts/src/main.tsx b/shopify-vite-react-ts/src/main.tsx new file mode 100644 index 0000000..05dafc4 --- /dev/null +++ b/shopify-vite-react-ts/src/main.tsx @@ -0,0 +1,16 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { BrowserRouter } from 'react-router-dom'; +import App from './App.tsx'; +import { CartProvider } from './context/CartContext.tsx'; +import './index.css'; + +createRoot(document.getElementById('root')!).render( + + + + + + + +); diff --git a/shopify-vite-react-ts/src/pages/CategoriesPage.tsx b/shopify-vite-react-ts/src/pages/CategoriesPage.tsx new file mode 100644 index 0000000..cffe1f9 --- /dev/null +++ b/shopify-vite-react-ts/src/pages/CategoriesPage.tsx @@ -0,0 +1,137 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { ArrowRight, Package } from 'lucide-react'; +import { useCollections } from '../hooks/useShopify'; +import LoadingSpinner from '../components/LoadingSpinner'; +import ErrorMessage from '../components/ErrorMessage'; +import { formatPrice } from '../utils/shopify'; + +const CategoriesPage: React.FC = () => { + const { collections, loading, error } = useCollections(); + + if (loading) { + return ( +
+ +
+ ); + } + + if (error) { + return ( +
+ +
+ ); + } + + return ( +
+ {/* Hero Section */} +
+
+ +

+ Shop by Category +

+

+ Explore our curated collections and find exactly what you're looking for +

+
+
+ + {/* Categories Grid */} +
+
+ {collections.length === 0 ? ( +
+ +

No Collections Found

+

Collections will appear here once they're created in your Shopify store.

+
+ ) : ( +
+ {collections.map((collection) => ( + + {/* Collection Image */} +
+ {collection.image ? ( + {collection.image.altText + ) : ( +
+ +
+ )} +
+ + {/* Collection Info */} +
+
+

+ {collection.title} +

+ +
+ + {collection.description && ( +

+ {collection.description} +

+ )} + +
+ {collection.products.nodes.length} products + {collection.products.nodes.length > 0 && ( + + From {formatPrice(collection.products.nodes[0].priceRange?.minVariantPrice || collection.products.nodes[0].variants.nodes[0].price)} + + )} +
+ + {/* Product Preview */} + {collection.products.nodes.length > 0 && ( +
+ {collection.products.nodes.slice(0, 4).map((product, index) => ( +
+ {product.images.nodes[0] ? ( + {product.images.nodes[0].altText + ) : ( +
+ )} +
+ ))} + {collection.products.nodes.length > 4 && ( +
+ +{collection.products.nodes.length - 4} +
+ )} +
+ )} +
+ + ))} +
+ )} +
+
+
+ ); +}; + +export default CategoriesPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/CategoryPage.tsx b/shopify-vite-react-ts/src/pages/CategoryPage.tsx new file mode 100644 index 0000000..1848ad5 --- /dev/null +++ b/shopify-vite-react-ts/src/pages/CategoryPage.tsx @@ -0,0 +1,111 @@ +import React from 'react'; +import { useParams, Link } from 'react-router-dom'; +import { ArrowLeft, Package } from 'lucide-react'; +import { useCollectionProducts } from '../hooks/useShopify'; +import ProductGrid from '../components/ProductGrid'; +import LoadingSpinner from '../components/LoadingSpinner'; +import ErrorMessage from '../components/ErrorMessage'; + +const CategoryPage: React.FC = () => { + const { handle } = useParams<{ handle: string }>(); + const { collection, loading, error } = useCollectionProducts(handle || ''); + + if (loading && !collection) { + return ( +
+ +
+ ); + } + + if (error) { + return ( +
+ +
+ ); + } + + if (!collection) { + return ( +
+
+ +

Collection Not Found

+

The collection you're looking for doesn't exist.

+ + + Back to Categories + +
+
+ ); + } + + return ( +
+ {/* Collection Header */} +
+
+ + + Back to Categories + + +
+ {collection.image && ( +
+ {collection.image.altText +
+ )} + +
+

+ {collection.title} +

+ {collection.description && ( +

+ {collection.description} +

+ )} +

+ {collection.products.nodes.length} products in this collection +

+
+
+
+
+ + {/* Products */} +
+ {collection.products.nodes.length === 0 ? ( +
+ +

No Products Found

+

This collection doesn't have any products yet.

+
+ ) : ( + {}} + /> + )} +
+
+ ); +}; + +export default CategoryPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/HomePage.tsx b/shopify-vite-react-ts/src/pages/HomePage.tsx new file mode 100644 index 0000000..e58e7cd --- /dev/null +++ b/shopify-vite-react-ts/src/pages/HomePage.tsx @@ -0,0 +1,61 @@ +import React, { useState } from 'react'; +import ProductGrid from '../components/ProductGrid'; +import { useProducts } from '../hooks/useShopify'; + +interface HomePageProps { + searchQuery: string; + onSearchChange: (query: string) => void; +} + +const HomePage: React.FC = ({ searchQuery, onSearchChange }) => { + const { products, loading, error, hasNextPage, loadMore, refetch } = useProducts(searchQuery); + + return ( + <> + {/* Hero Section */} +
+
+

+ Welcome to MockStore +

+

+ Discover amazing products at unbeatable prices +

+
+ +
+
+
+ + {/* Products Section */} +
+
+

+ {searchQuery ? `Search Results for "${searchQuery}"` : 'All Products'} +

+

+ {searchQuery ? + `Found ${products.length} products matching your search` : + 'Discover our complete collection of products' + } +

+
+ + +
+ + ); +}; + +export default HomePage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/ProductPage.tsx b/shopify-vite-react-ts/src/pages/ProductPage.tsx new file mode 100644 index 0000000..5646cc4 --- /dev/null +++ b/shopify-vite-react-ts/src/pages/ProductPage.tsx @@ -0,0 +1,461 @@ +import React, { useState } from 'react'; +import { useParams, Link } from 'react-router-dom'; +import { ArrowLeft, ShoppingCart, Heart, Share2, Star, Truck, Shield, RotateCcw, Zap } from 'lucide-react'; +import { useProduct } from '../hooks/useShopify'; +import { useCartContext } from '../context/CartContext'; +import { formatPrice, createCheckoutPermalink } from '../utils/shopify'; +import LoadingSpinner from '../components/LoadingSpinner'; +import ErrorMessage from '../components/ErrorMessage'; + +const ProductPage: React.FC = () => { + const { handle } = useParams<{ handle: string }>(); + const { product, loading, error } = useProduct(handle || ''); + const { addToCart } = useCartContext(); + + const [selectedVariant, setSelectedVariant] = useState(0); + const [selectedImage, setSelectedImage] = useState(0); + const [quantity, setQuantity] = useState(1); + const [isAddingToCart, setIsAddingToCart] = useState(false); + const [isBuyingNow, setIsBuyingNow] = useState(false); + const [showShareMenu, setShowShareMenu] = useState(false); + + if (loading) { + return ( +
+ +
+ ); + } + + if (error) { + return ( +
+ +
+ ); + } + + if (!product) { + return ( +
+
+

Product Not Found

+

The product you're looking for doesn't exist.

+ + + Back to Products + +
+
+ ); + } + + const currentVariant = product.variants.nodes[selectedVariant]; + const isProductAvailable = currentVariant?.availableForSale && product.availableForSale; + const isOnSale = currentVariant?.compareAtPrice && + parseFloat(currentVariant.compareAtPrice.amount) > parseFloat(currentVariant.price.amount); + + const handleAddToCart = async () => { + if (!currentVariant || !isProductAvailable) return; + + setIsAddingToCart(true); + try { + await addToCart([ + { + merchandiseId: currentVariant.id, + quantity, + }, + ]); + } catch (error) { + console.error('Failed to add to cart:', error); + } finally { + setIsAddingToCart(false); + } + }; + + const handleBuyNow = async () => { + if (!currentVariant || !isProductAvailable) return; + + setIsBuyingNow(true); + try { + const checkoutUrl = createCheckoutPermalink(currentVariant.id, quantity); + + const isInIframe = window.self !== window.top; + + if (isInIframe) { + window.open(checkoutUrl, '_blank', 'noopener,noreferrer'); + } else { + window.location.href = checkoutUrl; + } + } catch (error) { + console.error('Failed to create buy now link:', error); + } finally { + setIsBuyingNow(false); + } + }; + + const handleShare = async () => { + const shareData = { + title: product.title, + text: `Check out ${product.title} on MockStore`, + url: window.location.href, + }; + + // Check if Web Share API is supported + if (navigator.share && navigator.canShare && navigator.canShare(shareData)) { + try { + await navigator.share(shareData); + setShowShareMenu(false); + } catch (error) { + if (error.name !== 'AbortError') { + console.error('Error sharing:', error); + // Fallback to custom share menu + setShowShareMenu(!showShareMenu); + } + } + } else { + // Fallback to custom share menu + setShowShareMenu(!showShareMenu); + } + }; + + const copyToClipboard = async () => { + try { + await navigator.clipboard.writeText(window.location.href); + setShowShareMenu(false); + // You could add a toast notification here + } catch (error) { + console.error('Failed to copy to clipboard:', error); + } + }; + + const shareToSocial = (platform: string) => { + const url = encodeURIComponent(window.location.href); + const text = encodeURIComponent(`Check out ${product.title} on MockStore`); + + let shareUrl = ''; + + switch (platform) { + case 'twitter': + shareUrl = `https://twitter.com/intent/tweet?text=${text}&url=${url}`; + break; + case 'facebook': + shareUrl = `https://www.facebook.com/sharer/sharer.php?u=${url}`; + break; + case 'linkedin': + shareUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${url}`; + break; + case 'whatsapp': + shareUrl = `https://wa.me/?text=${text}%20${url}`; + break; + case 'email': + shareUrl = `mailto:?subject=${encodeURIComponent(product.title)}&body=${text}%20${url}`; + break; + } + + if (shareUrl) { + window.open(shareUrl, '_blank', 'noopener,noreferrer'); + setShowShareMenu(false); + } + }; + + return ( +
+
+ {/* Breadcrumb */} +
+ + + Back to Products + +
+ +
+ {/* Product Images */} +
+ {/* Main Image */} +
+ {product.images.nodes[selectedImage] ? ( + {product.images.nodes[selectedImage].altText + ) : ( +
+ No image +
+ )} +
+ + {/* Thumbnail Images */} + {product.images.nodes.length > 1 && ( +
+ {product.images.nodes.map((image, index) => ( + + ))} +
+ )} +
+ + {/* Product Info */} +
+ {/* Vendor */} + {product.vendor && ( +

{product.vendor}

+ )} + + {/* Title */} +

+ {product.title} +

+ + {/* Rating (Mock) */} +
+
+ {[...Array(5)].map((_, i) => ( + + ))} +
+ (4.0) • 127 reviews +
+ + {/* Price */} +
+
+ + {formatPrice(currentVariant.price)} + + {isOnSale && currentVariant.compareAtPrice && ( + + {formatPrice(currentVariant.compareAtPrice)} + + )} + {isOnSale && ( + + Sale + + )} +
+ {!isProductAvailable && ( +

Out of Stock

+ )} +
+ + {/* Description */} + {product.description && ( +
+

{product.description}

+
+ )} + + {/* Variant Selection */} + {product.variants.nodes.length > 1 && ( +
+

Options

+
+ {product.variants.nodes.map((variant, index) => ( + + ))} +
+
+ )} + + {/* Quantity */} +
+ +
+ + {quantity} + +
+
+ + {/* Action Buttons */} +
+
+ + +
+ + {/* Secondary Actions */} +
+ + {/* Features */} +
+
+ + Free shipping on orders over $50 +
+
+ + Secure payment & data protection +
+
+ + 30-day return policy +
+
+ + {/* Product Details */} +
+

Product Details

+ + {/* Share Button - moved to less prominent position */} +
+ + + {/* Share Menu */} + {showShareMenu && ( +
+
+ + + + +
+
+ )} +
+ +
+ {product.vendor && ( +
+ Brand: + {product.vendor} +
+ )} + {product.productType && ( +
+ Type: + {product.productType} +
+ )} +
+ SKU: + {currentVariant.id.split('/').pop()} +
+
+ Availability: + + {isProductAvailable ? 'In Stock' : 'Out of Stock'} + +
+
+
+ + {/* Tags */} + {product.tags.length > 0 && ( +
+

Tags

+
+ {product.tags.map((tag, index) => ( + + {tag} + + ))} +
+
+ )} +
+
+
+
+ ); +}; + +export default ProductPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/types/shopify.ts b/shopify-vite-react-ts/src/types/shopify.ts new file mode 100644 index 0000000..f4ef08b --- /dev/null +++ b/shopify-vite-react-ts/src/types/shopify.ts @@ -0,0 +1,135 @@ +export interface ShopifyProduct { + id: string; + title: string; + description: string; + handle: string; + images: { + nodes: Array<{ + id: string; + url: string; + altText: string | null; + width: number; + height: number; + }>; + }; + variants: { + nodes: Array<{ + id: string; + title: string; + price: { + amount: string; + currencyCode: string; + }; + compareAtPrice: { + amount: string; + currencyCode: string; + } | null; + selectedOptions: Array<{ + name: string; + value: string; + }>; + availableForSale: boolean; + }>; + }; + vendor: string; + productType: string; + tags: string[]; + availableForSale: boolean; + priceRange: { + minVariantPrice: { + amount: string; + currencyCode: string; + }; + maxVariantPrice: { + amount: string; + currencyCode: string; + }; + }; +} + +export interface ShopifyCollection { + id: string; + title: string; + description: string; + handle: string; + image: { + url: string; + altText: string | null; + } | null; + products: { + nodes: ShopifyProduct[]; + }; +} + +export interface ShopifyCart { + id: string; + checkoutUrl: string; + totalQuantity: number; + cost: { + totalAmount: { + amount: string; + currencyCode: string; + }; + subtotalAmount: { + amount: string; + currencyCode: string; + }; + }; + lines: { + nodes: Array<{ + id: string; + quantity: number; + merchandise: { + id: string; + title: string; + selectedOptions: Array<{ + name: string; + value: string; + }>; + price: { + amount: string; + currencyCode: string; + }; + product: { + id: string; + title: string; + handle: string; + featuredImage: { + url: string; + altText: string | null; + } | null; + }; + }; + cost: { + totalAmount: { + amount: string; + currencyCode: string; + }; + }; + }>; + }; +} + +export interface ShopifyGraphQLResponse { + data: T; + extensions?: { + cost: { + requestedQueryCost: number; + actualQueryCost: number; + throttleStatus: { + maximumAvailable: number; + currentlyAvailable: number; + restoreRate: number; + }; + }; + }; +} + +export interface CartLineInput { + merchandiseId: string; + quantity: number; +} + +export interface CartInput { + lines: CartLineInput[]; +} \ No newline at end of file diff --git a/shopify-vite-react-ts/src/utils/shopify.ts b/shopify-vite-react-ts/src/utils/shopify.ts new file mode 100644 index 0000000..42b4b63 --- /dev/null +++ b/shopify-vite-react-ts/src/utils/shopify.ts @@ -0,0 +1,90 @@ +const SHOPIFY_STORE_URL = import.meta.env.VITE_SHOPIFY_STORE_URL; +const SHOPIFY_API_VERSION = import.meta.env.VITE_SHOPIFY_API_VERSION; + +if (!SHOPIFY_STORE_URL) { + throw new Error('VITE_SHOPIFY_STORE_URL environment variable is required'); +} + +if (!SHOPIFY_API_VERSION) { + throw new Error('VITE_SHOPIFY_API_VERSION environment variable is required'); +} + +export const SHOPIFY_STOREFRONT_API_URL = `https://${SHOPIFY_STORE_URL}/api/${SHOPIFY_API_VERSION}/graphql.json`; + +export async function shopifyFetch( + query: string, + variables?: Record +): Promise { + console.log('Making Shopify API request to:', SHOPIFY_STOREFRONT_API_URL); + + const response = await fetch(SHOPIFY_STOREFRONT_API_URL, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + }, + body: JSON.stringify({ + query, + variables, + }), + }); + + if (!response.ok) { + console.error('HTTP error:', response.status, response.statusText); + throw new Error(`HTTP error! status: ${response.status}`); + } + + const json = await response.json(); + console.log('Shopify API response:', json); + + if (json.errors) { + console.error('GraphQL errors:', json.errors); + throw new Error(json.errors[0].message); + } + + return json.data; +} + +export const formatPrice = (price: { amount: string; currencyCode: string }) => { + return new Intl.NumberFormat('en-US', { + style: 'currency', + currency: price.currencyCode, + }).format(parseFloat(price.amount)); +}; + +export const getCartId = (): string | null => { + return localStorage.getItem('shopify-cart-id'); +}; + +export const setCartId = (cartId: string): void => { + localStorage.setItem('shopify-cart-id', cartId); +}; + +export const removeCartId = (): void => { + localStorage.removeItem('shopify-cart-id'); +}; + +export const createCheckoutPermalink = (variantId: string, quantity: number = 1): string => { + // Remove the 'gid://shopify/ProductVariant/' prefix from the variant ID + const numericVariantId = variantId.replace('gid://shopify/ProductVariant/', ''); + + // Create the checkout permalink URL + const checkoutUrl = `https://${SHOPIFY_STORE_URL}/cart/${numericVariantId}:${quantity}`; + + console.log('Generated checkout permalink:', checkoutUrl); + return checkoutUrl; +}; + +export const createMultiItemCheckoutPermalink = (items: Array<{ variantId: string; quantity: number }>): string => { + // Convert each item to the format "variantId:quantity" + const cartItems = items.map(item => { + const numericVariantId = item.variantId.replace('gid://shopify/ProductVariant/', ''); + return `${numericVariantId}:${item.quantity}`; + }).join(','); + + // Create the checkout permalink URL + const checkoutUrl = `https://${SHOPIFY_STORE_URL}/cart/${cartItems}`; + + console.log('Generated multi-item checkout permalink:', checkoutUrl); + return checkoutUrl; +}; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/vite-env.d.ts b/shopify-vite-react-ts/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/shopify-vite-react-ts/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/shopify-vite-react-ts/tailwind.config.js b/shopify-vite-react-ts/tailwind.config.js new file mode 100644 index 0000000..d21f1cd --- /dev/null +++ b/shopify-vite-react-ts/tailwind.config.js @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], + theme: { + extend: {}, + }, + plugins: [], +}; diff --git a/shopify-vite-react-ts/tsconfig.app.json b/shopify-vite-react-ts/tsconfig.app.json new file mode 100644 index 0000000..f0a2350 --- /dev/null +++ b/shopify-vite-react-ts/tsconfig.app.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/shopify-vite-react-ts/tsconfig.json b/shopify-vite-react-ts/tsconfig.json new file mode 100644 index 0000000..1ffef60 --- /dev/null +++ b/shopify-vite-react-ts/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/shopify-vite-react-ts/tsconfig.node.json b/shopify-vite-react-ts/tsconfig.node.json new file mode 100644 index 0000000..0d3d714 --- /dev/null +++ b/shopify-vite-react-ts/tsconfig.node.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["vite.config.ts"] +} diff --git a/shopify-vite-react-ts/vite.config.ts b/shopify-vite-react-ts/vite.config.ts new file mode 100644 index 0000000..147380a --- /dev/null +++ b/shopify-vite-react-ts/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + optimizeDeps: { + exclude: ['lucide-react'], + }, +}); From cd9b060436fd726f9dfe1a365e19feb0c136c0e2 Mon Sep 17 00:00:00 2001 From: Jeremy Gayed Date: Wed, 16 Jul 2025 14:09:50 -0400 Subject: [PATCH 2/3] refactor: more minimal --- shopify-vite-react-ts/.bolt/prompt | 2 +- shopify-vite-react-ts/src/App.tsx | 305 ++++++++++-- .../src/components/CartDrawer.tsx | 12 - .../src/components/ErrorMessage.tsx | 30 -- .../src/components/Header.tsx | 177 ------- .../src/components/LoadingSpinner.tsx | 23 - .../src/components/ProductCard.tsx | 156 ------ .../src/components/ProductGrid.tsx | 96 ---- .../src/components/ShopifySetupGuide.tsx | 142 ++++++ .../src/context/CartContext.tsx | 26 +- shopify-vite-react-ts/src/hooks/useShopify.ts | 10 +- shopify-vite-react-ts/src/main.tsx | 11 +- .../src/pages/CategoriesPage.tsx | 137 ------ .../src/pages/CategoryPage.tsx | 111 ----- shopify-vite-react-ts/src/pages/HomePage.tsx | 61 --- .../src/pages/ProductPage.tsx | 461 ------------------ shopify-vite-react-ts/src/utils/shopify.ts | 31 +- shopify-vite-react-ts/vite.config.ts | 1 - 18 files changed, 441 insertions(+), 1351 deletions(-) delete mode 100644 shopify-vite-react-ts/src/components/ErrorMessage.tsx delete mode 100644 shopify-vite-react-ts/src/components/Header.tsx delete mode 100644 shopify-vite-react-ts/src/components/LoadingSpinner.tsx delete mode 100644 shopify-vite-react-ts/src/components/ProductCard.tsx delete mode 100644 shopify-vite-react-ts/src/components/ProductGrid.tsx create mode 100644 shopify-vite-react-ts/src/components/ShopifySetupGuide.tsx delete mode 100644 shopify-vite-react-ts/src/pages/CategoriesPage.tsx delete mode 100644 shopify-vite-react-ts/src/pages/CategoryPage.tsx delete mode 100644 shopify-vite-react-ts/src/pages/HomePage.tsx delete mode 100644 shopify-vite-react-ts/src/pages/ProductPage.tsx diff --git a/shopify-vite-react-ts/.bolt/prompt b/shopify-vite-react-ts/.bolt/prompt index af99047..174608c 100644 --- a/shopify-vite-react-ts/.bolt/prompt +++ b/shopify-vite-react-ts/.bolt/prompt @@ -1,6 +1,6 @@ # Shopify-Powered Vite React TS Storefront Template -The code in this starter template is an example fully-featured Shopify storefront built with Vite, React, and TypeScript. The meat of the functionality is in the useShopify hook, which is a wrapper around the Shopify Tokenless API. +The code in this starter template is an example Shopify-powered storefront built with Vite, React, and TypeScript. The meat of the functionality is in the useShopify hook, which is a wrapper around the Shopify Tokenless API and can be used to build out additional features. ## Tokenless API diff --git a/shopify-vite-react-ts/src/App.tsx b/shopify-vite-react-ts/src/App.tsx index b57b5b0..ac61f05 100644 --- a/shopify-vite-react-ts/src/App.tsx +++ b/shopify-vite-react-ts/src/App.tsx @@ -1,54 +1,283 @@ import React, { useState } from 'react'; -import { Routes, Route } from 'react-router-dom'; -import Header from './components/Header'; +import { ShoppingCart, Zap, Store } from 'lucide-react'; +import { isShopifyConfigured } from './utils/shopify'; +import ShopifySetupGuide from './components/ShopifySetupGuide'; +import { useProducts } from './hooks/useShopify'; +import { useCartContext } from './context/CartContext'; +import { formatPrice, createCheckoutPermalink } from './utils/shopify'; import CartDrawer from './components/CartDrawer'; -import HomePage from './pages/HomePage'; -import ProductPage from './pages/ProductPage'; -import CategoriesPage from './pages/CategoriesPage'; -import CategoryPage from './pages/CategoryPage'; const App: React.FC = () => { - const [searchQuery, setSearchQuery] = useState(''); const [isCartOpen, setIsCartOpen] = useState(false); + const { products, loading, error } = useProducts(); + const { addToCart, cart } = useCartContext(); + + const [selectedVariant, setSelectedVariant] = useState(0); + const [selectedImage, setSelectedImage] = useState(0); + const [quantity, setQuantity] = useState(1); + const [isAddingToCart, setIsAddingToCart] = useState(false); + const [isBuyingNow, setIsBuyingNow] = useState(false); + const [randomProduct, setRandomProduct] = useState(null); - const handleSearchChange = (query: string) => { - setSearchQuery(query); - }; + React.useEffect(() => { + if (products.length > 0 && !randomProduct) { + const randomIndex = Math.floor(Math.random() * products.length); + setRandomProduct(products[randomIndex]); + } + }, [products, randomProduct]); + + if (!isShopifyConfigured()) { + return ; + } + + if (loading && !randomProduct) { + return ( +
+
+
+ ); + } + + if (error) { + return ( +
+
+
⚠️
+

Something went wrong

+

{error}

+
+
+ ); + } + + if (!randomProduct) { + return ( +
+
+ +

No Products Found

+

Please add products to your Shopify store.

+
+
+ ); + } + + const currentVariant = randomProduct.variants.nodes[selectedVariant]; + const isProductAvailable = currentVariant?.availableForSale && randomProduct.availableForSale; + const isOnSale = currentVariant?.compareAtPrice && + parseFloat(currentVariant.compareAtPrice.amount) > parseFloat(currentVariant.price.amount); - const handleCartClick = () => { - setIsCartOpen(true); + const handleAddToCart = async () => { + if (!currentVariant || !isProductAvailable) return; + + setIsAddingToCart(true); + try { + await addToCart([ + { + merchandiseId: currentVariant.id, + quantity, + }, + ]); + } catch (error) { + console.error('Failed to add to cart:', error); + } finally { + setIsAddingToCart(false); + } }; - const handleCartClose = () => { - setIsCartOpen(false); + const handleBuyNow = async () => { + if (!currentVariant || !isProductAvailable) return; + + setIsBuyingNow(true); + try { + const checkoutUrl = createCheckoutPermalink(currentVariant.id, quantity); + + const isInIframe = window.self !== window.top; + + if (isInIframe) { + window.open(checkoutUrl, '_blank', 'noopener,noreferrer'); + } else { + window.location.href = checkoutUrl; + } + } catch (error) { + console.error('Failed to create buy now link:', error); + } finally { + setIsBuyingNow(false); + } }; return (
-
- -
- - - } - /> - } /> - } /> - } /> - -
- - +
+
+
+
+
+ MockStore +
+
+ +
+
+
+ +
+
+
+
+ {randomProduct.images.nodes[selectedImage] ? ( + {randomProduct.images.nodes[selectedImage].altText + ) : ( +
+ No image +
+ )} +
+ + {randomProduct.images.nodes.length > 1 && ( +
+ {randomProduct.images.nodes.map((image, index) => ( + + ))} +
+ )} +
+ +
+ {randomProduct.vendor && ( +

{randomProduct.vendor}

+ )} + +

+ {randomProduct.title} +

+ +
+
+ + {formatPrice(currentVariant.price)} + + {isOnSale && currentVariant.compareAtPrice && ( + + {formatPrice(currentVariant.compareAtPrice)} + + )} + {isOnSale && ( + + Sale + + )} +
+ {!isProductAvailable && ( +

Out of Stock

+ )} +
+ + {randomProduct.description && ( +
+

{randomProduct.description}

+
+ )} + + {randomProduct.variants.nodes.length > 1 && ( +
+

Options

+
+ {randomProduct.variants.nodes.map((variant, index) => ( + + ))} +
+
+ )} + +
+ +
+ + {quantity} + +
+
+ +
+
+ + +
+
+
+
+
+ + setIsCartOpen(false)} />
); }; diff --git a/shopify-vite-react-ts/src/components/CartDrawer.tsx b/shopify-vite-react-ts/src/components/CartDrawer.tsx index 347141b..59351bd 100644 --- a/shopify-vite-react-ts/src/components/CartDrawer.tsx +++ b/shopify-vite-react-ts/src/components/CartDrawer.tsx @@ -39,7 +39,6 @@ const handleCheckout = () => { return ( <> - {/* Overlay */} {isOpen && (
{ /> )} - {/* Cart Drawer */}
- {/* Header */}

Shopping Cart

- {/* Cart Content */}
{!cart || cart.lines.nodes.length === 0 ? (
@@ -76,7 +72,6 @@ const handleCheckout = () => {
{cart.lines.nodes.map((line) => (
- {/* Product Image */}
{line.merchandise.product.featuredImage ? ( { )}
- {/* Product Info */}

{line.merchandise.product.title} @@ -106,7 +100,6 @@ const handleCheckout = () => {

- {/* Quantity Controls */}
- {/* Remove Button */}
- {/* Footer */} {cart && cart.lines.nodes.length > 0 && (
- {/* Subtotal */}
Subtotal @@ -152,13 +142,11 @@ const handleCheckout = () => {
- {/* Total Items */}
Total items {cart.totalQuantity}
- {/* Checkout Button */} - )} -
- ); -}; - -export default ErrorMessage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/Header.tsx b/shopify-vite-react-ts/src/components/Header.tsx deleted file mode 100644 index a9fab8f..0000000 --- a/shopify-vite-react-ts/src/components/Header.tsx +++ /dev/null @@ -1,177 +0,0 @@ -import React, { useState } from 'react'; -import { Link, useLocation, useNavigate } from 'react-router-dom'; -import { Search, ShoppingCart, Menu, X } from 'lucide-react'; -import { useCartContext } from '../context/CartContext'; - -interface HeaderProps { - onSearchChange: (query: string) => void; - onCartClick: () => void; - searchQuery: string; -} - -const Header: React.FC = ({ onSearchChange, onCartClick, searchQuery }) => { - const [isMenuOpen, setIsMenuOpen] = useState(false); - const [isSearchOpen, setIsSearchOpen] = useState(false); - const location = useLocation(); - const navigate = useNavigate(); - const { cart } = useCartContext(); - - const handleSearchSubmit = (e: React.FormEvent) => { - e.preventDefault(); - const formData = new FormData(e.target as HTMLFormElement); - const query = formData.get('search') as string; - onSearchChange(query); - - // Navigate to home page if not already there - if (location.pathname !== '/') { - navigate('/'); - } - - setIsSearchOpen(false); - }; - - return ( -
-
-
- {/* Logo */} -
- - MockStore - -
- - {/* Desktop Navigation */} - - - {/* Desktop Search */} -
-
-
- - -
-
- - {/* Cart Button */} - -
- - {/* Mobile Menu Button */} -
- - - -
-
- - {/* Mobile Search */} - {isSearchOpen && ( -
-
-
- - -
-
-
- )} - - {/* Mobile Navigation */} - {isMenuOpen && ( -
-
- setIsMenuOpen(false)} - > - All Products - - setIsMenuOpen(false)} - > - Categories - -
-
- )} -
-
- ); -}; - -export default Header; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/LoadingSpinner.tsx b/shopify-vite-react-ts/src/components/LoadingSpinner.tsx deleted file mode 100644 index 8922586..0000000 --- a/shopify-vite-react-ts/src/components/LoadingSpinner.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Loader2 } from 'lucide-react'; - -interface LoadingSpinnerProps { - size?: 'sm' | 'md' | 'lg'; - className?: string; -} - -const LoadingSpinner: React.FC = ({ size = 'md', className = '' }) => { - const sizeClasses = { - sm: 'h-4 w-4', - md: 'h-8 w-8', - lg: 'h-12 w-12', - }; - - return ( -
- -
- ); -}; - -export default LoadingSpinner; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductCard.tsx b/shopify-vite-react-ts/src/components/ProductCard.tsx deleted file mode 100644 index 1855248..0000000 --- a/shopify-vite-react-ts/src/components/ProductCard.tsx +++ /dev/null @@ -1,156 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; -import { Eye, ShoppingCart, Zap } from 'lucide-react'; -import { Product } from '../types/shopify'; -import { formatPrice, createCheckoutPermalink } from '../utils/shopify'; -import { useCartContext } from '../context/CartContext'; - -interface ProductCardProps { - product: Product; - onQuickView?: (product: Product) => void; -} - -const ProductCard: React.FC = ({ product, onQuickView }) => { - const { addToCart } = useCartContext(); - - const firstVariant = product.variants.nodes[0]; - const isOnSale = firstVariant?.compareAtPrice && - parseFloat(firstVariant.compareAtPrice.amount) > parseFloat(firstVariant.price.amount); - - const handleAddToCart = async (e: React.MouseEvent) => { - e.preventDefault(); - e.stopPropagation(); - - if (!firstVariant || !product.availableForSale) return; - - try { - await addToCart([ - { - merchandiseId: firstVariant.id, - quantity: 1, - }, - ]); - } catch (error) { - console.error('Failed to add to cart:', error); - } - }; - - const handleBuyNow = (e: React.MouseEvent) => { - e.preventDefault(); - e.stopPropagation(); - - if (!firstVariant || !product.availableForSale) return; - - const checkoutUrl = createCheckoutPermalink([ - { - id: firstVariant.id.split('/').pop() || '', - quantity: 1, - }, - ]); - - window.open(checkoutUrl, '_blank'); - }; - - const handleQuickView = (e: React.MouseEvent) => { - e.preventDefault(); - e.stopPropagation(); - - if (onQuickView) { - onQuickView(product); - } - }; - - return ( -
- -
- {product.images.nodes.length > 0 ? ( - {product.images.nodes[0].altText - ) : ( -
- No Image -
- )} - - {/* Sale Badge */} - {isOnSale && ( -
- Sale -
- )} - - {/* Out of Stock Badge */} - {!product.availableForSale && ( -
- Out of Stock -
- )} - - {/* Hover Actions */} -
-
- {onQuickView && ( - - )} - - {product.availableForSale && ( - <> - - - - - )} -
-
-
- -
-

- {product.title} -

- - {product.vendor && ( -

{product.vendor}

- )} - -
-
- - {formatPrice(firstVariant?.price)} - - {isOnSale && firstVariant?.compareAtPrice && ( - - {formatPrice(firstVariant.compareAtPrice)} - - )} -
-
-
- -
- ); -}; - -export default ProductCard; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductGrid.tsx b/shopify-vite-react-ts/src/components/ProductGrid.tsx deleted file mode 100644 index d1bec43..0000000 --- a/shopify-vite-react-ts/src/components/ProductGrid.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import React from 'react'; -import { Loader2 } from 'lucide-react'; -import { ShopifyProduct } from '../types/shopify'; -import ProductCard from './ProductCard'; - -interface ProductGridProps { - products: ShopifyProduct[]; - loading: boolean; - error: string | null; - hasNextPage: boolean; - onLoadMore: () => void; - onQuickView?: (product: ShopifyProduct) => void; -} - -const ProductGrid: React.FC = ({ - products, - loading, - error, - hasNextPage, - onLoadMore, - onQuickView, -}) => { - if (error) { - return ( -
-
- - - -

Failed to load products

-

{error}

-
-
- ); - } - - if (loading && products.length === 0) { - return ( -
- -

Loading products...

-
- ); - } - - if (products.length === 0) { - return ( -
-
- - - -

No products found

-

Try adjusting your search or filters

-
-
- ); - } - - return ( -
- {/* Products Grid */} -
- {products.map((product) => ( - - ))} -
- - {/* Load More Button */} - {hasNextPage && ( -
- -
- )} -
- ); -}; - -export default ProductGrid; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ShopifySetupGuide.tsx b/shopify-vite-react-ts/src/components/ShopifySetupGuide.tsx new file mode 100644 index 0000000..6e07e73 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ShopifySetupGuide.tsx @@ -0,0 +1,142 @@ +import React from 'react'; +import { Store, ExternalLink, Copy, CheckCircle } from 'lucide-react'; + +const ShopifySetupGuide: React.FC = () => { + const [copied, setCopied] = React.useState(false); + + const envExample = `VITE_SHOPIFY_STORE_URL=fakestore-ai.myshopify.com +VITE_SHOPIFY_API_VERSION=2025-07`; + + const copyToClipboard = async () => { + try { + await navigator.clipboard.writeText(envExample); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch (error) { + console.error('Failed to copy to clipboard:', error); + } + }; + + return ( +
+
+
+
+ +
+

+ Connect Your Shopify Store +

+

+ To get started, you'll need to configure your Shopify store URL +

+
+ +
+
+
+ 1 +
+
+

+ Get Your Shopify Store URL +

+

+ If you don't have a Shopify store yet, create one for free. If you already have a store, + find your store URL in your Shopify Admin. +

+ +
+
+ +
+
+ 2 +
+
+

+ Find Your Store URL +

+

+ In your Shopify Admin, go to Settings → Domains. + Your store URL will look like your-store-name.myshopify.com +

+
+

+ Note: Use only the domain part (e.g., your-store-name.myshopify.com), + not the full URL with https:// +

+
+
+
+ +
+
+ 3 +
+
+

+ Configure Environment Variables +

+

+ Create or update your .env file + in the root of your project with the following: +

+
+
+                  {envExample}
+                
+ +
+

+ Replace fakestore-ai.myshopify.com with your actual Shopify store URL +

+
+
+
+ +
+
+

Important Notes:

+
    +
  • • This template uses Shopify's Tokenless API (no private keys required)
  • +
  • • Your store must have products and collections to see content
  • +
  • • The API version 2025-07 or newer is required for full functionality
  • +
+
+
+
+
+ ); +}; + +export default ShopifySetupGuide; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/context/CartContext.tsx b/shopify-vite-react-ts/src/context/CartContext.tsx index 3efbe05..9a288bb 100644 --- a/shopify-vite-react-ts/src/context/CartContext.tsx +++ b/shopify-vite-react-ts/src/context/CartContext.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react'; import { ShopifyCart, CartLineInput } from '../types/shopify'; -import { shopifyFetch, getCartId, setCartId, removeCartId } from '../utils/shopify'; +import { shopifyFetch, getCartId, setCartId, removeCartId, isShopifyConfigured } from '../utils/shopify'; import { CREATE_CART, GET_CART, @@ -42,6 +42,13 @@ export const CartProvider: React.FC = ({ children }) => { setLoading(true); setError(null); + if (!isShopifyConfigured()) { + const errorMessage = 'Shopify store is not configured'; + setError(errorMessage); + setLoading(false); + throw new Error(errorMessage); + } + try { const data = await shopifyFetch<{ cartCreate: { @@ -59,12 +66,10 @@ export const CartProvider: React.FC = ({ children }) => { const newCart = data.cartCreate.cart; setCart(newCart); setCartId(newCart.id); - console.log('Cart created successfully:', newCart); return newCart; } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Failed to create cart'; setError(errorMessage); - console.error('Cart creation failed:', errorMessage); throw err; } finally { setLoading(false); @@ -78,13 +83,10 @@ export const CartProvider: React.FC = ({ children }) => { try { const data = await shopifyFetch<{ cart: ShopifyCart }>(GET_CART, { id: cartId }); setCart(data.cart); - console.log('Cart fetched successfully:', data.cart); return data.cart; } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Failed to fetch cart'; setError(errorMessage); - console.error('Cart fetch failed:', errorMessage); - // If cart fetch fails, remove the invalid cart ID removeCartId(); setCart(null); throw err; @@ -102,11 +104,9 @@ export const CartProvider: React.FC = ({ children }) => { try { currentCart = await fetchCart(cartId); } catch { - // If fetching existing cart fails, create a new one currentCart = await createCart(); } } else { - // No existing cart, create a new one currentCart = await createCart(); } } @@ -131,12 +131,10 @@ export const CartProvider: React.FC = ({ children }) => { const updatedCart = data.cartLinesAdd.cart; setCart(updatedCart); - console.log('Item added to cart successfully:', updatedCart); return updatedCart; } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Failed to add to cart'; setError(errorMessage); - console.error('Add to cart failed:', errorMessage); throw err; } finally { setLoading(false); @@ -166,11 +164,9 @@ export const CartProvider: React.FC = ({ children }) => { const updatedCart = data.cartLinesUpdate.cart; setCart(updatedCart); - console.log('Cart line updated successfully:', updatedCart); } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Failed to update cart'; setError(errorMessage); - console.error('Cart update failed:', errorMessage); throw err; } finally { setLoading(false); @@ -200,11 +196,9 @@ export const CartProvider: React.FC = ({ children }) => { const updatedCart = data.cartLinesRemove.cart; setCart(updatedCart); - console.log('Items removed from cart successfully:', updatedCart); } catch (err) { const errorMessage = err instanceof Error ? err.message : 'Failed to remove from cart'; setError(errorMessage); - console.error('Remove from cart failed:', errorMessage); throw err; } finally { setLoading(false); @@ -217,13 +211,11 @@ export const CartProvider: React.FC = ({ children }) => { try { await fetchCart(cartId); } catch { - // Cart not found or invalid, clear it setCart(null); } } }; - // Initialize cart on mount useEffect(() => { const initializeCart = async () => { const cartId = getCartId(); @@ -231,8 +223,6 @@ export const CartProvider: React.FC = ({ children }) => { try { await fetchCart(cartId); } catch { - // Cart not found or invalid, will create new one when needed - console.log('No existing cart found, will create new one when needed'); } } }; diff --git a/shopify-vite-react-ts/src/hooks/useShopify.ts b/shopify-vite-react-ts/src/hooks/useShopify.ts index b24e756..9861785 100644 --- a/shopify-vite-react-ts/src/hooks/useShopify.ts +++ b/shopify-vite-react-ts/src/hooks/useShopify.ts @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; import { ShopifyProduct, ShopifyCart, CartLineInput, ShopifyCollection } from '../types/shopify'; -import { shopifyFetch, getCartId, setCartId, removeCartId } from '../utils/shopify'; +import { shopifyFetch, getCartId, setCartId, removeCartId, isShopifyConfigured } from '../utils/shopify'; import { GET_PRODUCTS, GET_PRODUCT_BY_HANDLE, @@ -24,6 +24,12 @@ export const useProducts = (query?: string) => { setLoading(true); setError(null); + if (!isShopifyConfigured()) { + setError('Shopify store is not configured'); + setLoading(false); + return; + } + try { const data = await shopifyFetch<{ products: { @@ -216,7 +222,6 @@ export const useCart = () => { return data.cart; } catch (err) { setError(err instanceof Error ? err.message : 'Failed to fetch cart'); - // If cart fetch fails, remove the invalid cart ID removeCartId(); throw err; } finally { @@ -261,7 +266,6 @@ export const useCart = () => { } setCart(data.cartLinesAdd.cart); - console.log('Cart updated successfully:', data.cartLinesAdd.cart); return data.cartLinesAdd.cart; } catch (err) { setError(err instanceof Error ? err.message : 'Failed to add to cart'); diff --git a/shopify-vite-react-ts/src/main.tsx b/shopify-vite-react-ts/src/main.tsx index 05dafc4..cdcd8df 100644 --- a/shopify-vite-react-ts/src/main.tsx +++ b/shopify-vite-react-ts/src/main.tsx @@ -1,16 +1,13 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import { BrowserRouter } from 'react-router-dom'; import App from './App.tsx'; import { CartProvider } from './context/CartContext.tsx'; import './index.css'; createRoot(document.getElementById('root')!).render( - - - - - + + + -); +); \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/CategoriesPage.tsx b/shopify-vite-react-ts/src/pages/CategoriesPage.tsx deleted file mode 100644 index cffe1f9..0000000 --- a/shopify-vite-react-ts/src/pages/CategoriesPage.tsx +++ /dev/null @@ -1,137 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; -import { ArrowRight, Package } from 'lucide-react'; -import { useCollections } from '../hooks/useShopify'; -import LoadingSpinner from '../components/LoadingSpinner'; -import ErrorMessage from '../components/ErrorMessage'; -import { formatPrice } from '../utils/shopify'; - -const CategoriesPage: React.FC = () => { - const { collections, loading, error } = useCollections(); - - if (loading) { - return ( -
- -
- ); - } - - if (error) { - return ( -
- -
- ); - } - - return ( -
- {/* Hero Section */} -
-
- -

- Shop by Category -

-

- Explore our curated collections and find exactly what you're looking for -

-
-
- - {/* Categories Grid */} -
-
- {collections.length === 0 ? ( -
- -

No Collections Found

-

Collections will appear here once they're created in your Shopify store.

-
- ) : ( -
- {collections.map((collection) => ( - - {/* Collection Image */} -
- {collection.image ? ( - {collection.image.altText - ) : ( -
- -
- )} -
- - {/* Collection Info */} -
-
-

- {collection.title} -

- -
- - {collection.description && ( -

- {collection.description} -

- )} - -
- {collection.products.nodes.length} products - {collection.products.nodes.length > 0 && ( - - From {formatPrice(collection.products.nodes[0].priceRange?.minVariantPrice || collection.products.nodes[0].variants.nodes[0].price)} - - )} -
- - {/* Product Preview */} - {collection.products.nodes.length > 0 && ( -
- {collection.products.nodes.slice(0, 4).map((product, index) => ( -
- {product.images.nodes[0] ? ( - {product.images.nodes[0].altText - ) : ( -
- )} -
- ))} - {collection.products.nodes.length > 4 && ( -
- +{collection.products.nodes.length - 4} -
- )} -
- )} -
- - ))} -
- )} -
-
-
- ); -}; - -export default CategoriesPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/CategoryPage.tsx b/shopify-vite-react-ts/src/pages/CategoryPage.tsx deleted file mode 100644 index 1848ad5..0000000 --- a/shopify-vite-react-ts/src/pages/CategoryPage.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import React from 'react'; -import { useParams, Link } from 'react-router-dom'; -import { ArrowLeft, Package } from 'lucide-react'; -import { useCollectionProducts } from '../hooks/useShopify'; -import ProductGrid from '../components/ProductGrid'; -import LoadingSpinner from '../components/LoadingSpinner'; -import ErrorMessage from '../components/ErrorMessage'; - -const CategoryPage: React.FC = () => { - const { handle } = useParams<{ handle: string }>(); - const { collection, loading, error } = useCollectionProducts(handle || ''); - - if (loading && !collection) { - return ( -
- -
- ); - } - - if (error) { - return ( -
- -
- ); - } - - if (!collection) { - return ( -
-
- -

Collection Not Found

-

The collection you're looking for doesn't exist.

- - - Back to Categories - -
-
- ); - } - - return ( -
- {/* Collection Header */} -
-
- - - Back to Categories - - -
- {collection.image && ( -
- {collection.image.altText -
- )} - -
-

- {collection.title} -

- {collection.description && ( -

- {collection.description} -

- )} -

- {collection.products.nodes.length} products in this collection -

-
-
-
-
- - {/* Products */} -
- {collection.products.nodes.length === 0 ? ( -
- -

No Products Found

-

This collection doesn't have any products yet.

-
- ) : ( - {}} - /> - )} -
-
- ); -}; - -export default CategoryPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/HomePage.tsx b/shopify-vite-react-ts/src/pages/HomePage.tsx deleted file mode 100644 index e58e7cd..0000000 --- a/shopify-vite-react-ts/src/pages/HomePage.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import React, { useState } from 'react'; -import ProductGrid from '../components/ProductGrid'; -import { useProducts } from '../hooks/useShopify'; - -interface HomePageProps { - searchQuery: string; - onSearchChange: (query: string) => void; -} - -const HomePage: React.FC = ({ searchQuery, onSearchChange }) => { - const { products, loading, error, hasNextPage, loadMore, refetch } = useProducts(searchQuery); - - return ( - <> - {/* Hero Section */} -
-
-

- Welcome to MockStore -

-

- Discover amazing products at unbeatable prices -

-
- -
-
-
- - {/* Products Section */} -
-
-

- {searchQuery ? `Search Results for "${searchQuery}"` : 'All Products'} -

-

- {searchQuery ? - `Found ${products.length} products matching your search` : - 'Discover our complete collection of products' - } -

-
- - -
- - ); -}; - -export default HomePage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/pages/ProductPage.tsx b/shopify-vite-react-ts/src/pages/ProductPage.tsx deleted file mode 100644 index 5646cc4..0000000 --- a/shopify-vite-react-ts/src/pages/ProductPage.tsx +++ /dev/null @@ -1,461 +0,0 @@ -import React, { useState } from 'react'; -import { useParams, Link } from 'react-router-dom'; -import { ArrowLeft, ShoppingCart, Heart, Share2, Star, Truck, Shield, RotateCcw, Zap } from 'lucide-react'; -import { useProduct } from '../hooks/useShopify'; -import { useCartContext } from '../context/CartContext'; -import { formatPrice, createCheckoutPermalink } from '../utils/shopify'; -import LoadingSpinner from '../components/LoadingSpinner'; -import ErrorMessage from '../components/ErrorMessage'; - -const ProductPage: React.FC = () => { - const { handle } = useParams<{ handle: string }>(); - const { product, loading, error } = useProduct(handle || ''); - const { addToCart } = useCartContext(); - - const [selectedVariant, setSelectedVariant] = useState(0); - const [selectedImage, setSelectedImage] = useState(0); - const [quantity, setQuantity] = useState(1); - const [isAddingToCart, setIsAddingToCart] = useState(false); - const [isBuyingNow, setIsBuyingNow] = useState(false); - const [showShareMenu, setShowShareMenu] = useState(false); - - if (loading) { - return ( -
- -
- ); - } - - if (error) { - return ( -
- -
- ); - } - - if (!product) { - return ( -
-
-

Product Not Found

-

The product you're looking for doesn't exist.

- - - Back to Products - -
-
- ); - } - - const currentVariant = product.variants.nodes[selectedVariant]; - const isProductAvailable = currentVariant?.availableForSale && product.availableForSale; - const isOnSale = currentVariant?.compareAtPrice && - parseFloat(currentVariant.compareAtPrice.amount) > parseFloat(currentVariant.price.amount); - - const handleAddToCart = async () => { - if (!currentVariant || !isProductAvailable) return; - - setIsAddingToCart(true); - try { - await addToCart([ - { - merchandiseId: currentVariant.id, - quantity, - }, - ]); - } catch (error) { - console.error('Failed to add to cart:', error); - } finally { - setIsAddingToCart(false); - } - }; - - const handleBuyNow = async () => { - if (!currentVariant || !isProductAvailable) return; - - setIsBuyingNow(true); - try { - const checkoutUrl = createCheckoutPermalink(currentVariant.id, quantity); - - const isInIframe = window.self !== window.top; - - if (isInIframe) { - window.open(checkoutUrl, '_blank', 'noopener,noreferrer'); - } else { - window.location.href = checkoutUrl; - } - } catch (error) { - console.error('Failed to create buy now link:', error); - } finally { - setIsBuyingNow(false); - } - }; - - const handleShare = async () => { - const shareData = { - title: product.title, - text: `Check out ${product.title} on MockStore`, - url: window.location.href, - }; - - // Check if Web Share API is supported - if (navigator.share && navigator.canShare && navigator.canShare(shareData)) { - try { - await navigator.share(shareData); - setShowShareMenu(false); - } catch (error) { - if (error.name !== 'AbortError') { - console.error('Error sharing:', error); - // Fallback to custom share menu - setShowShareMenu(!showShareMenu); - } - } - } else { - // Fallback to custom share menu - setShowShareMenu(!showShareMenu); - } - }; - - const copyToClipboard = async () => { - try { - await navigator.clipboard.writeText(window.location.href); - setShowShareMenu(false); - // You could add a toast notification here - } catch (error) { - console.error('Failed to copy to clipboard:', error); - } - }; - - const shareToSocial = (platform: string) => { - const url = encodeURIComponent(window.location.href); - const text = encodeURIComponent(`Check out ${product.title} on MockStore`); - - let shareUrl = ''; - - switch (platform) { - case 'twitter': - shareUrl = `https://twitter.com/intent/tweet?text=${text}&url=${url}`; - break; - case 'facebook': - shareUrl = `https://www.facebook.com/sharer/sharer.php?u=${url}`; - break; - case 'linkedin': - shareUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${url}`; - break; - case 'whatsapp': - shareUrl = `https://wa.me/?text=${text}%20${url}`; - break; - case 'email': - shareUrl = `mailto:?subject=${encodeURIComponent(product.title)}&body=${text}%20${url}`; - break; - } - - if (shareUrl) { - window.open(shareUrl, '_blank', 'noopener,noreferrer'); - setShowShareMenu(false); - } - }; - - return ( -
-
- {/* Breadcrumb */} -
- - - Back to Products - -
- -
- {/* Product Images */} -
- {/* Main Image */} -
- {product.images.nodes[selectedImage] ? ( - {product.images.nodes[selectedImage].altText - ) : ( -
- No image -
- )} -
- - {/* Thumbnail Images */} - {product.images.nodes.length > 1 && ( -
- {product.images.nodes.map((image, index) => ( - - ))} -
- )} -
- - {/* Product Info */} -
- {/* Vendor */} - {product.vendor && ( -

{product.vendor}

- )} - - {/* Title */} -

- {product.title} -

- - {/* Rating (Mock) */} -
-
- {[...Array(5)].map((_, i) => ( - - ))} -
- (4.0) • 127 reviews -
- - {/* Price */} -
-
- - {formatPrice(currentVariant.price)} - - {isOnSale && currentVariant.compareAtPrice && ( - - {formatPrice(currentVariant.compareAtPrice)} - - )} - {isOnSale && ( - - Sale - - )} -
- {!isProductAvailable && ( -

Out of Stock

- )} -
- - {/* Description */} - {product.description && ( -
-

{product.description}

-
- )} - - {/* Variant Selection */} - {product.variants.nodes.length > 1 && ( -
-

Options

-
- {product.variants.nodes.map((variant, index) => ( - - ))} -
-
- )} - - {/* Quantity */} -
- -
- - {quantity} - -
-
- - {/* Action Buttons */} -
-
- - -
- - {/* Secondary Actions */} -
- - {/* Features */} -
-
- - Free shipping on orders over $50 -
-
- - Secure payment & data protection -
-
- - 30-day return policy -
-
- - {/* Product Details */} -
-

Product Details

- - {/* Share Button - moved to less prominent position */} -
- - - {/* Share Menu */} - {showShareMenu && ( -
-
- - - - -
-
- )} -
- -
- {product.vendor && ( -
- Brand: - {product.vendor} -
- )} - {product.productType && ( -
- Type: - {product.productType} -
- )} -
- SKU: - {currentVariant.id.split('/').pop()} -
-
- Availability: - - {isProductAvailable ? 'In Stock' : 'Out of Stock'} - -
-
-
- - {/* Tags */} - {product.tags.length > 0 && ( -
-

Tags

-
- {product.tags.map((tag, index) => ( - - {tag} - - ))} -
-
- )} -
-
-
-
- ); -}; - -export default ProductPage; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/utils/shopify.ts b/shopify-vite-react-ts/src/utils/shopify.ts index 42b4b63..4395d04 100644 --- a/shopify-vite-react-ts/src/utils/shopify.ts +++ b/shopify-vite-react-ts/src/utils/shopify.ts @@ -1,22 +1,24 @@ const SHOPIFY_STORE_URL = import.meta.env.VITE_SHOPIFY_STORE_URL; const SHOPIFY_API_VERSION = import.meta.env.VITE_SHOPIFY_API_VERSION; -if (!SHOPIFY_STORE_URL) { - throw new Error('VITE_SHOPIFY_STORE_URL environment variable is required'); -} - -if (!SHOPIFY_API_VERSION) { - throw new Error('VITE_SHOPIFY_API_VERSION environment variable is required'); -} +export const isShopifyConfigured = () => { + return !!(SHOPIFY_STORE_URL && + SHOPIFY_API_VERSION && + SHOPIFY_STORE_URL !== 'fakestore-ai.myshopify.com'); +}; -export const SHOPIFY_STOREFRONT_API_URL = `https://${SHOPIFY_STORE_URL}/api/${SHOPIFY_API_VERSION}/graphql.json`; +export const SHOPIFY_STOREFRONT_API_URL = SHOPIFY_STORE_URL && SHOPIFY_API_VERSION + ? `https://${SHOPIFY_STORE_URL}/api/${SHOPIFY_API_VERSION}/graphql.json` + : ''; export async function shopifyFetch( query: string, variables?: Record ): Promise { - console.log('Making Shopify API request to:', SHOPIFY_STOREFRONT_API_URL); - + if (!isShopifyConfigured()) { + throw new Error('Shopify store is not configured. Please set up your environment variables.'); + } + const response = await fetch(SHOPIFY_STOREFRONT_API_URL, { method: 'POST', headers: { @@ -30,15 +32,12 @@ export async function shopifyFetch( }); if (!response.ok) { - console.error('HTTP error:', response.status, response.statusText); throw new Error(`HTTP error! status: ${response.status}`); } const json = await response.json(); - console.log('Shopify API response:', json); if (json.errors) { - console.error('GraphQL errors:', json.errors); throw new Error(json.errors[0].message); } @@ -65,26 +64,20 @@ export const removeCartId = (): void => { }; export const createCheckoutPermalink = (variantId: string, quantity: number = 1): string => { - // Remove the 'gid://shopify/ProductVariant/' prefix from the variant ID const numericVariantId = variantId.replace('gid://shopify/ProductVariant/', ''); - // Create the checkout permalink URL const checkoutUrl = `https://${SHOPIFY_STORE_URL}/cart/${numericVariantId}:${quantity}`; - console.log('Generated checkout permalink:', checkoutUrl); return checkoutUrl; }; export const createMultiItemCheckoutPermalink = (items: Array<{ variantId: string; quantity: number }>): string => { - // Convert each item to the format "variantId:quantity" const cartItems = items.map(item => { const numericVariantId = item.variantId.replace('gid://shopify/ProductVariant/', ''); return `${numericVariantId}:${item.quantity}`; }).join(','); - // Create the checkout permalink URL const checkoutUrl = `https://${SHOPIFY_STORE_URL}/cart/${cartItems}`; - console.log('Generated multi-item checkout permalink:', checkoutUrl); return checkoutUrl; }; \ No newline at end of file diff --git a/shopify-vite-react-ts/vite.config.ts b/shopify-vite-react-ts/vite.config.ts index 147380a..124478a 100644 --- a/shopify-vite-react-ts/vite.config.ts +++ b/shopify-vite-react-ts/vite.config.ts @@ -1,7 +1,6 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; -// https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], optimizeDeps: { From 11be89cd338af8a4ede0256765cc95d54b38a7f0 Mon Sep 17 00:00:00 2001 From: Jeremy Gayed Date: Fri, 25 Jul 2025 12:01:25 -0400 Subject: [PATCH 3/3] feat: enhance product display and cart functionality - Refactored App component to utilize new ProductDetails, ProductImageGallery, and Header components for improved structure and readability. - Introduced QuantitySelector for managing product quantities. - Added loading, error, and empty state components for better user experience. - Updated CartContext to support addProductToCart and buyNow functionalities. - Improved .gitignore to exclude unnecessary editor files. --- shopify-vite-react-ts/.gitignore | 2 - shopify-vite-react-ts/src/App.tsx | 268 ++---------------- .../src/components/CartDrawer.tsx | 6 +- .../src/components/Header.tsx | 36 +++ .../src/components/ProductDetails.tsx | 142 ++++++++++ .../src/components/ProductImageGallery.tsx | 58 ++++ .../src/components/QuantitySelector.tsx | 34 +++ .../src/components/StateComponents.tsx | 32 +++ .../src/context/CartContext.tsx | 68 ++++- .../src/hooks/useCartContext.ts | 10 + shopify-vite-react-ts/src/hooks/useShopify.ts | 31 +- shopify-vite-react-ts/src/utils/shopify.ts | 2 +- 12 files changed, 413 insertions(+), 276 deletions(-) create mode 100644 shopify-vite-react-ts/src/components/Header.tsx create mode 100644 shopify-vite-react-ts/src/components/ProductDetails.tsx create mode 100644 shopify-vite-react-ts/src/components/ProductImageGallery.tsx create mode 100644 shopify-vite-react-ts/src/components/QuantitySelector.tsx create mode 100644 shopify-vite-react-ts/src/components/StateComponents.tsx create mode 100644 shopify-vite-react-ts/src/hooks/useCartContext.ts diff --git a/shopify-vite-react-ts/.gitignore b/shopify-vite-react-ts/.gitignore index 7ceb59f..a534bbc 100644 --- a/shopify-vite-react-ts/.gitignore +++ b/shopify-vite-react-ts/.gitignore @@ -1,4 +1,3 @@ -# Logs logs *.log npm-debug.log* @@ -12,7 +11,6 @@ dist dist-ssr *.local -# Editor directories and files .vscode/* !.vscode/extensions.json .idea diff --git a/shopify-vite-react-ts/src/App.tsx b/shopify-vite-react-ts/src/App.tsx index ac61f05..a232b16 100644 --- a/shopify-vite-react-ts/src/App.tsx +++ b/shopify-vite-react-ts/src/App.tsx @@ -1,23 +1,23 @@ import React, { useState } from 'react'; -import { ShoppingCart, Zap, Store } from 'lucide-react'; import { isShopifyConfigured } from './utils/shopify'; import ShopifySetupGuide from './components/ShopifySetupGuide'; import { useProducts } from './hooks/useShopify'; -import { useCartContext } from './context/CartContext'; -import { formatPrice, createCheckoutPermalink } from './utils/shopify'; +import { useCartContext } from './hooks/useCartContext'; import CartDrawer from './components/CartDrawer'; +import Header from './components/Header'; +import ProductImageGallery from './components/ProductImageGallery'; +import ProductDetails from './components/ProductDetails'; +import { LoadingState, ErrorState, EmptyState } from './components/StateComponents'; +import { ShopifyProduct } from './types/shopify'; const App: React.FC = () => { const [isCartOpen, setIsCartOpen] = useState(false); const { products, loading, error } = useProducts(); - const { addToCart, cart } = useCartContext(); + const { cart } = useCartContext(); const [selectedVariant, setSelectedVariant] = useState(0); const [selectedImage, setSelectedImage] = useState(0); - const [quantity, setQuantity] = useState(1); - const [isAddingToCart, setIsAddingToCart] = useState(false); - const [isBuyingNow, setIsBuyingNow] = useState(false); - const [randomProduct, setRandomProduct] = useState(null); + const [randomProduct, setRandomProduct] = useState(null); React.useEffect(() => { if (products.length > 0 && !randomProduct) { @@ -31,249 +31,41 @@ const App: React.FC = () => { } if (loading && !randomProduct) { - return ( -
-
-
- ); + return ; } if (error) { - return ( -
-
-
⚠️
-

Something went wrong

-

{error}

-
-
- ); + return ; } if (!randomProduct) { - return ( -
-
- -

No Products Found

-

Please add products to your Shopify store.

-
-
- ); + return ; } - const currentVariant = randomProduct.variants.nodes[selectedVariant]; - const isProductAvailable = currentVariant?.availableForSale && randomProduct.availableForSale; - const isOnSale = currentVariant?.compareAtPrice && - parseFloat(currentVariant.compareAtPrice.amount) > parseFloat(currentVariant.price.amount); - - const handleAddToCart = async () => { - if (!currentVariant || !isProductAvailable) return; - - setIsAddingToCart(true); - try { - await addToCart([ - { - merchandiseId: currentVariant.id, - quantity, - }, - ]); - } catch (error) { - console.error('Failed to add to cart:', error); - } finally { - setIsAddingToCart(false); - } - }; - - const handleBuyNow = async () => { - if (!currentVariant || !isProductAvailable) return; - - setIsBuyingNow(true); - try { - const checkoutUrl = createCheckoutPermalink(currentVariant.id, quantity); - - const isInIframe = window.self !== window.top; - - if (isInIframe) { - window.open(checkoutUrl, '_blank', 'noopener,noreferrer'); - } else { - window.location.href = checkoutUrl; - } - } catch (error) { - console.error('Failed to create buy now link:', error); - } finally { - setIsBuyingNow(false); - } - }; - return (
-
-
-
-
-
- MockStore -
-
- -
-
-
+
setIsCartOpen(true)} + />
-
-
- {randomProduct.images.nodes[selectedImage] ? ( - {randomProduct.images.nodes[selectedImage].altText - ) : ( -
- No image -
- )} -
- - {randomProduct.images.nodes.length > 1 && ( -
- {randomProduct.images.nodes.map((image, index) => ( - - ))} -
- )} -
- -
- {randomProduct.vendor && ( -

{randomProduct.vendor}

- )} - -

- {randomProduct.title} -

- -
-
- - {formatPrice(currentVariant.price)} - - {isOnSale && currentVariant.compareAtPrice && ( - - {formatPrice(currentVariant.compareAtPrice)} - - )} - {isOnSale && ( - - Sale - - )} -
- {!isProductAvailable && ( -

Out of Stock

- )} -
- - {randomProduct.description && ( -
-

{randomProduct.description}

-
- )} - - {randomProduct.variants.nodes.length > 1 && ( -
-

Options

-
- {randomProduct.variants.nodes.map((variant, index) => ( - - ))} -
-
- )} - -
- -
- - {quantity} - -
-
- -
-
- - -
-
-
+ + +
diff --git a/shopify-vite-react-ts/src/components/CartDrawer.tsx b/shopify-vite-react-ts/src/components/CartDrawer.tsx index 59351bd..444f546 100644 --- a/shopify-vite-react-ts/src/components/CartDrawer.tsx +++ b/shopify-vite-react-ts/src/components/CartDrawer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { X, Plus, Minus, ShoppingBag } from 'lucide-react'; -import { useCartContext } from '../context/CartContext'; +import { useCartContext } from '../hooks/useCartContext'; import { formatPrice } from '../utils/shopify'; interface CartDrawerProps { @@ -21,19 +21,15 @@ const CartDrawer: React.FC = ({ isOpen, onClose }) => { const handleCheckout = () => { if (cart?.checkoutUrl) { - // Check if we're within an iframe const isInIframe = window.self !== window.top; if (isInIframe) { - // Open checkout in a new window/tab when in iframe window.open(cart.checkoutUrl, '_blank', 'noopener,noreferrer'); } else { - // Open checkout in the same window when not in iframe window.location.href = cart.checkoutUrl; } } else { console.error('No checkout URL available'); - // Optionally show an error message to the user } }; diff --git a/shopify-vite-react-ts/src/components/Header.tsx b/shopify-vite-react-ts/src/components/Header.tsx new file mode 100644 index 0000000..3cb1e61 --- /dev/null +++ b/shopify-vite-react-ts/src/components/Header.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { ShoppingCart } from 'lucide-react'; + +interface HeaderProps { + cartQuantity: number; + onCartClick: () => void; +} + +const Header: React.FC = ({ cartQuantity, onCartClick }) => { + return ( +
+
+
+
+
+ MockStore +
+
+ +
+
+
+ ); +}; + +export default Header; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductDetails.tsx b/shopify-vite-react-ts/src/components/ProductDetails.tsx new file mode 100644 index 0000000..48b6004 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ProductDetails.tsx @@ -0,0 +1,142 @@ +import React, { useState } from 'react'; +import { ShoppingCart, Zap } from 'lucide-react'; +import { formatPrice } from '../utils/shopify'; +import QuantitySelector from './QuantitySelector'; +import { ShopifyProduct } from '../types/shopify'; +import { useCartContext } from '../hooks/useCartContext'; + +type ProductVariant = ShopifyProduct['variants']['nodes'][0]; + +interface ProductDetailsProps { + vendor?: string; + title: string; + description?: string; + variants: ProductVariant[]; + selectedVariant: number; + onVariantChange: (index: number) => void; +} + +const ProductDetails: React.FC = ({ + vendor, + title, + description, + variants, + selectedVariant, + onVariantChange, +}) => { + const [quantity, setQuantity] = useState(1); + const { addProductToCart, buyNow, addToCartLoading, buyNowLoading } = useCartContext(); + + const currentVariant = variants[selectedVariant]; + const isProductAvailable = currentVariant?.availableForSale; + const isOnSale = currentVariant?.compareAtPrice && + parseFloat(currentVariant.compareAtPrice.amount) > parseFloat(currentVariant.price.amount); + + const handleAddToCart = () => { + if (currentVariant && isProductAvailable) { + addProductToCart(currentVariant, quantity); + } + }; + + const handleBuyNow = () => { + if (currentVariant && isProductAvailable) { + buyNow(currentVariant, quantity); + } + }; + + return ( +
+ {vendor && ( +

{vendor}

+ )} + +

+ {title} +

+ +
+
+ + {formatPrice(currentVariant.price)} + + {isOnSale && currentVariant.compareAtPrice && ( + + {formatPrice(currentVariant.compareAtPrice)} + + )} + {isOnSale && ( + + Sale + + )} +
+ {!isProductAvailable && ( +

Out of Stock

+ )} +
+ + {description && ( +
+

{description}

+
+ )} + + {variants.length > 1 && ( +
+

Options

+
+ {variants.map((variant: ProductVariant, index: number) => ( + + ))} +
+
+ )} + + + +
+
+ + +
+
+
+ ); +}; + +export default ProductDetails; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/ProductImageGallery.tsx b/shopify-vite-react-ts/src/components/ProductImageGallery.tsx new file mode 100644 index 0000000..c243ec9 --- /dev/null +++ b/shopify-vite-react-ts/src/components/ProductImageGallery.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import { ShopifyProduct } from '../types/shopify'; + +type ProductImage = ShopifyProduct['images']['nodes'][0]; + +interface ProductImageGalleryProps { + images: ProductImage[]; + productTitle: string; + selectedImage: number; + onImageSelect: (index: number) => void; +} + +const ProductImageGallery: React.FC = ({ + images, + productTitle, + selectedImage, + onImageSelect, +}) => { + return ( +
+
+ {images[selectedImage] ? ( + {images[selectedImage].altText + ) : ( +
+ No image +
+ )} +
+ + {images.length > 1 && ( +
+ {images.map((image, index) => ( + + ))} +
+ )} +
+ ); +}; + +export default ProductImageGallery; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/QuantitySelector.tsx b/shopify-vite-react-ts/src/components/QuantitySelector.tsx new file mode 100644 index 0000000..058fe53 --- /dev/null +++ b/shopify-vite-react-ts/src/components/QuantitySelector.tsx @@ -0,0 +1,34 @@ +import React from 'react'; + +interface QuantitySelectorProps { + quantity: number; + onQuantityChange: (quantity: number) => void; +} + +const QuantitySelector: React.FC = ({ + quantity, + onQuantityChange, +}) => { + return ( +
+ +
+ + {quantity} + +
+
+ ); +}; + +export default QuantitySelector; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/components/StateComponents.tsx b/shopify-vite-react-ts/src/components/StateComponents.tsx new file mode 100644 index 0000000..0ad6918 --- /dev/null +++ b/shopify-vite-react-ts/src/components/StateComponents.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { Store } from 'lucide-react'; + +export const LoadingState: React.FC = () => ( +
+
+
+); + +interface ErrorStateProps { + error: string; +} + +export const ErrorState: React.FC = ({ error }) => ( +
+
+
⚠️
+

Something went wrong

+

{error}

+
+
+); + +export const EmptyState: React.FC = () => ( +
+
+ +

No Products Found

+

Please add products to your Shopify store.

+
+
+); \ No newline at end of file diff --git a/shopify-vite-react-ts/src/context/CartContext.tsx b/shopify-vite-react-ts/src/context/CartContext.tsx index 9a288bb..b2e924a 100644 --- a/shopify-vite-react-ts/src/context/CartContext.tsx +++ b/shopify-vite-react-ts/src/context/CartContext.tsx @@ -1,6 +1,6 @@ -import React, { createContext, useContext, useEffect, useState, ReactNode } from 'react'; -import { ShopifyCart, CartLineInput } from '../types/shopify'; -import { shopifyFetch, getCartId, setCartId, removeCartId, isShopifyConfigured } from '../utils/shopify'; +import React, { createContext, useEffect, useState, ReactNode } from 'react'; +import { ShopifyCart, CartLineInput, ShopifyProduct } from '../types/shopify'; +import { shopifyFetch, getCartId, setCartId, removeCartId, isShopifyConfigured, createCheckoutPermalink } from '../utils/shopify'; import { CREATE_CART, GET_CART, @@ -17,17 +17,13 @@ interface CartContextType { updateCartLine: (lineId: string, quantity: number) => Promise; removeFromCart: (lineIds: string[]) => Promise; refreshCart: () => Promise; + addProductToCart: (variant: ShopifyProduct['variants']['nodes'][0], quantity: number) => Promise; + buyNow: (variant: ShopifyProduct['variants']['nodes'][0], quantity: number) => Promise; + addToCartLoading: boolean; + buyNowLoading: boolean; } -const CartContext = createContext(undefined); - -export const useCartContext = () => { - const context = useContext(CartContext); - if (context === undefined) { - throw new Error('useCartContext must be used within a CartProvider'); - } - return context; -}; +export const CartContext = createContext(undefined); interface CartProviderProps { children: ReactNode; @@ -37,6 +33,8 @@ export const CartProvider: React.FC = ({ children }) => { const [cart, setCart] = useState(null); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); + const [addToCartLoading, setAddToCartLoading] = useState(false); + const [buyNowLoading, setBuyNowLoading] = useState(false); const createCart = async (lines: CartLineInput[] = []) => { setLoading(true); @@ -216,13 +214,53 @@ export const CartProvider: React.FC = ({ children }) => { } }; + const addProductToCart = async (variant: ShopifyProduct['variants']['nodes'][0], quantity: number) => { + if (!variant.availableForSale) return; + + setAddToCartLoading(true); + try { + await addToCart([ + { + merchandiseId: variant.id, + quantity, + }, + ]); + } catch (error) { + console.error('Failed to add to cart:', error); + } finally { + setAddToCartLoading(false); + } + }; + + const buyNow = async (variant: ShopifyProduct['variants']['nodes'][0], quantity: number) => { + if (!variant.availableForSale) return; + + setBuyNowLoading(true); + try { + const checkoutUrl = createCheckoutPermalink(variant.id, quantity); + + const isInIframe = window.self !== window.top; + + if (isInIframe) { + window.open(checkoutUrl, '_blank', 'noopener,noreferrer'); + } else { + window.location.href = checkoutUrl; + } + } catch (error) { + console.error('Failed to create buy now link:', error); + } finally { + setBuyNowLoading(false); + } + }; + useEffect(() => { const initializeCart = async () => { const cartId = getCartId(); if (cartId) { try { await fetchCart(cartId); - } catch { + } catch (error) { + console.error('Failed to initialize cart:', error); } } }; @@ -238,6 +276,10 @@ export const CartProvider: React.FC = ({ children }) => { updateCartLine, removeFromCart, refreshCart, + addProductToCart, + buyNow, + addToCartLoading, + buyNowLoading, }; return ( diff --git a/shopify-vite-react-ts/src/hooks/useCartContext.ts b/shopify-vite-react-ts/src/hooks/useCartContext.ts new file mode 100644 index 0000000..b76b6e6 --- /dev/null +++ b/shopify-vite-react-ts/src/hooks/useCartContext.ts @@ -0,0 +1,10 @@ +import { useContext } from 'react'; +import { CartContext } from '../context/CartContext'; + +export const useCartContext = () => { + const context = useContext(CartContext); + if (context === undefined) { + throw new Error('useCartContext must be used within a CartProvider'); + } + return context; +}; \ No newline at end of file diff --git a/shopify-vite-react-ts/src/hooks/useShopify.ts b/shopify-vite-react-ts/src/hooks/useShopify.ts index 9861785..f935091 100644 --- a/shopify-vite-react-ts/src/hooks/useShopify.ts +++ b/shopify-vite-react-ts/src/hooks/useShopify.ts @@ -1,4 +1,4 @@ -import { useState, useEffect } from 'react'; +import { useState, useEffect, useCallback } from 'react'; import { ShopifyProduct, ShopifyCart, CartLineInput, ShopifyCollection } from '../types/shopify'; import { shopifyFetch, getCartId, setCartId, removeCartId, isShopifyConfigured } from '../utils/shopify'; import { @@ -20,7 +20,7 @@ export const useProducts = (query?: string) => { const [hasNextPage, setHasNextPage] = useState(false); const [endCursor, setEndCursor] = useState(null); - const fetchProducts = async (reset = false) => { + const fetchProducts = useCallback(async (reset = false) => { setLoading(true); setError(null); @@ -53,7 +53,7 @@ export const useProducts = (query?: string) => { } finally { setLoading(false); } - }; + }, [endCursor, products, query]); const loadMore = () => { if (!loading && hasNextPage) { @@ -63,7 +63,7 @@ export const useProducts = (query?: string) => { useEffect(() => { fetchProducts(true); - }, [query]); + }, [fetchProducts, query]); return { products, @@ -122,7 +122,7 @@ export const useCollections = () => { nodes: ShopifyCollection[]; }; }>(GET_COLLECTIONS, { first: 20 }); - + setCollections(data.collections.nodes); } catch (err) { setError(err instanceof Error ? err.message : 'Failed to fetch collections'); @@ -142,7 +142,7 @@ export const useCollectionProducts = (handle: string) => { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); - const fetchCollectionProducts = async (reset = false) => { + const fetchCollectionProducts = useCallback(async () => { setLoading(true); setError(null); @@ -161,20 +161,20 @@ export const useCollectionProducts = (handle: string) => { } finally { setLoading(false); } - }; + }, [handle]); useEffect(() => { if (handle) { - fetchCollectionProducts(true); + fetchCollectionProducts(); } - }, [handle]); + }, [fetchCollectionProducts, handle]); return { collection, loading, error, - refetch: () => fetchCollectionProducts(true), + refetch: () => fetchCollectionProducts(), }; }; @@ -231,18 +231,16 @@ export const useCart = () => { const addToCart = async (lines: CartLineInput[]) => { let currentCart = cart; - + if (!currentCart) { const cartId = getCartId(); if (cartId) { try { currentCart = await fetchCart(cartId); } catch { - // If fetching existing cart fails, create a new one currentCart = await createCart(); } } else { - // No existing cart, create a new one currentCart = await createCart(); } } @@ -335,15 +333,14 @@ export const useCart = () => { } }; - // Initialize cart on mount useEffect(() => { const initializeCart = async () => { const cartId = getCartId(); if (cartId) { try { await fetchCart(cartId); - } catch { - // Cart not found or invalid, will create new one when needed + } catch (error) { + console.warn('Failed to initialize cart (a new cart will be created):', error); } } }; @@ -361,4 +358,4 @@ export const useCart = () => { createCart, fetchCart, }; -}; \ No newline at end of file +}; diff --git a/shopify-vite-react-ts/src/utils/shopify.ts b/shopify-vite-react-ts/src/utils/shopify.ts index 4395d04..e5ed8ab 100644 --- a/shopify-vite-react-ts/src/utils/shopify.ts +++ b/shopify-vite-react-ts/src/utils/shopify.ts @@ -13,7 +13,7 @@ export const SHOPIFY_STOREFRONT_API_URL = SHOPIFY_STORE_URL && SHOPIFY_API_VERSI export async function shopifyFetch( query: string, - variables?: Record + variables?: Record ): Promise { if (!isShopifyConfigured()) { throw new Error('Shopify store is not configured. Please set up your environment variables.');