diff --git a/.vscode/settings.json b/.vscode/settings.json index 0f8fb64d..f6ec9fdc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,6 @@ "titleBar.inactiveBackground": "#6c64f899", "titleBar.inactiveForeground": "#e7e7e799" }, - "peacock.color": "#6C64F8" + "peacock.color": "#6C64F8", + "cSpell.words": ["Firestore"] } diff --git a/package.json b/package.json index 28c03472..6166e84d 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "classnames": "^2.3.2", "clsx": "^2.0.0", "date-fns": "^2.30.0", + "firebase": "^10.6.0", "js-cookie": "^3.0.5", "lucide-react": "^0.292.0", "next": "14.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eaf87792..82b0abc7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -56,6 +56,9 @@ dependencies: date-fns: specifier: ^2.30.0 version: 2.30.0 + firebase: + specifier: ^10.6.0 + version: 10.6.0(encoding@0.1.13) js-cookie: specifier: ^3.0.5 version: 3.0.5 @@ -1865,6 +1868,460 @@ packages: resolution: {integrity: sha512-cEee/Z+I12mZcFJshKcCqC8tuX5hG3s+d+9nZ3LabqKF1vKdF41B92pJVCBggjAGORAeOzyyDDKrZwIkLffeOQ==} dev: true + /@firebase/analytics-compat@0.2.6(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23): + resolution: {integrity: sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/analytics': 0.10.0(@firebase/app@0.9.23) + '@firebase/analytics-types': 0.8.0 + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + dev: false + + /@firebase/analytics-types@0.8.0: + resolution: {integrity: sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==} + dev: false + + /@firebase/analytics@0.10.0(@firebase/app@0.9.23): + resolution: {integrity: sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/app-check-compat@0.3.7(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23): + resolution: {integrity: sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-check': 0.8.0(@firebase/app@0.9.23) + '@firebase/app-check-types': 0.5.0 + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + dev: false + + /@firebase/app-check-interop-types@0.3.0: + resolution: {integrity: sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg==} + dev: false + + /@firebase/app-check-types@0.5.0: + resolution: {integrity: sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==} + dev: false + + /@firebase/app-check@0.8.0(@firebase/app@0.9.23): + resolution: {integrity: sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/app-compat@0.2.23: + resolution: {integrity: sha512-UCv0LEzcoqAgY+sLsau7aOZz0CJNLN2gESY68bHKmukNXEN6onLPxBKJzn68CsZZGcdiIEXwvrum1riWNPe9Gw==} + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/app-types@0.9.0: + resolution: {integrity: sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==} + dev: false + + /@firebase/app@0.9.23: + resolution: {integrity: sha512-CA5pQ88We3FhyuesGKn1thaPBsJSGJGm6AlFToOmEJagWqBeDoNJqBkry/BsHnCs9xeYWWIprKxvuFmAFkdqoA==} + dependencies: + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + idb: 7.1.1 + tslib: 2.6.2 + dev: false + + /@firebase/auth-compat@0.4.9(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-Fw03i7vduIciEBG4imLtA1duJbljgkfbxiBo/EuekcB+BnPxHp+e8OGMUfemPYeO7Munj6kUC9gr5DelsQkiNA==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/auth': 1.4.0(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/auth-types': 0.12.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3) + '@firebase/component': 0.6.4 + '@firebase/util': 1.9.3 + node-fetch: 2.6.7(encoding@0.1.13) + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + - '@react-native-async-storage/async-storage' + - encoding + dev: false + + /@firebase/auth-interop-types@0.2.1: + resolution: {integrity: sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg==} + dev: false + + /@firebase/auth-types@0.12.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3): + resolution: {integrity: sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + dependencies: + '@firebase/app-types': 0.9.0 + '@firebase/util': 1.9.3 + dev: false + + /@firebase/auth@1.4.0(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-SfFXZCHDbY+7oSR52NSwx0U7LjYiA+N8imloxphCf3/F+MFty/+mhdjSXGtrJYd0Gbud/qcyedfn2XnWJeIB/g==} + peerDependencies: + '@firebase/app': 0.x + '@react-native-async-storage/async-storage': ^1.18.1 + peerDependenciesMeta: + '@react-native-async-storage/async-storage': + optional: true + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + node-fetch: 2.6.7(encoding@0.1.13) + tslib: 2.6.2 + transitivePeerDependencies: + - encoding + dev: false + + /@firebase/component@0.6.4: + resolution: {integrity: sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA==} + dependencies: + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/database-compat@1.0.1: + resolution: {integrity: sha512-ky82yLIboLxtAIWyW/52a6HLMVTzD2kpZlEilVDok73pNPLjkJYowj8iaIWK5nTy7+6Gxt7d00zfjL6zckGdXQ==} + dependencies: + '@firebase/component': 0.6.4 + '@firebase/database': 1.0.1 + '@firebase/database-types': 1.0.0 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/database-types@1.0.0: + resolution: {integrity: sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg==} + dependencies: + '@firebase/app-types': 0.9.0 + '@firebase/util': 1.9.3 + dev: false + + /@firebase/database@1.0.1: + resolution: {integrity: sha512-VAhF7gYwunW4Lw/+RQZvW8dlsf2r0YYqV9W0Gi2Mz8+0TGg1mBJWoUtsHfOr8kPJXhcLsC4eP/z3x6L/Fvjk/A==} + dependencies: + '@firebase/auth-interop-types': 0.2.1 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + faye-websocket: 0.11.4 + tslib: 2.6.2 + dev: false + + /@firebase/firestore-compat@0.3.22(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-M166UvFvRri0CK/+5N0MIeXJVxR6BsX0/96xFT506DxRPIFezLjLcvfddtyFgfe0CtyQWoxBXt060uWUg3d/sw==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/firestore': 4.3.2(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/firestore-types': 3.0.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3) + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + - encoding + dev: false + + /@firebase/firestore-types@3.0.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3): + resolution: {integrity: sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + dependencies: + '@firebase/app-types': 0.9.0 + '@firebase/util': 1.9.3 + dev: false + + /@firebase/firestore@4.3.2(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-K4TwMbgArWw+XAEUYX/vtk+TVy9n1uLeJKSrQeb89lwfkfyFINGLPME6YleaS0ovD1ziLM5/0WgL1CR4s53fDg==} + engines: {node: '>=10.10.0'} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + '@firebase/webchannel-wrapper': 0.10.3 + '@grpc/grpc-js': 1.9.11 + '@grpc/proto-loader': 0.7.10 + node-fetch: 2.6.7(encoding@0.1.13) + tslib: 2.6.2 + transitivePeerDependencies: + - encoding + dev: false + + /@firebase/functions-compat@0.3.5(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/functions': 0.10.0(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/functions-types': 0.6.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + - encoding + dev: false + + /@firebase/functions-types@0.6.0: + resolution: {integrity: sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw==} + dev: false + + /@firebase/functions@0.10.0(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/app-check-interop-types': 0.3.0 + '@firebase/auth-interop-types': 0.2.1 + '@firebase/component': 0.6.4 + '@firebase/messaging-interop-types': 0.2.0 + '@firebase/util': 1.9.3 + node-fetch: 2.6.7(encoding@0.1.13) + tslib: 2.6.2 + transitivePeerDependencies: + - encoding + dev: false + + /@firebase/installations-compat@0.2.4(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23): + resolution: {integrity: sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/installations-types': 0.5.0(@firebase/app-types@0.9.0) + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + dev: false + + /@firebase/installations-types@0.5.0(@firebase/app-types@0.9.0): + resolution: {integrity: sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg==} + peerDependencies: + '@firebase/app-types': 0.x + dependencies: + '@firebase/app-types': 0.9.0 + dev: false + + /@firebase/installations@0.6.4(@firebase/app@0.9.23): + resolution: {integrity: sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/util': 1.9.3 + idb: 7.0.1 + tslib: 2.6.2 + dev: false + + /@firebase/logger@0.4.0: + resolution: {integrity: sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA==} + dependencies: + tslib: 2.6.2 + dev: false + + /@firebase/messaging-compat@0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23): + resolution: {integrity: sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/messaging': 0.12.4(@firebase/app@0.9.23) + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + dev: false + + /@firebase/messaging-interop-types@0.2.0: + resolution: {integrity: sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==} + dev: false + + /@firebase/messaging@0.12.4(@firebase/app@0.9.23): + resolution: {integrity: sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/messaging-interop-types': 0.2.0 + '@firebase/util': 1.9.3 + idb: 7.0.1 + tslib: 2.6.2 + dev: false + + /@firebase/performance-compat@0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23): + resolution: {integrity: sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/performance': 0.6.4(@firebase/app@0.9.23) + '@firebase/performance-types': 0.2.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + dev: false + + /@firebase/performance-types@0.2.0: + resolution: {integrity: sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA==} + dev: false + + /@firebase/performance@0.6.4(@firebase/app@0.9.23): + resolution: {integrity: sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/remote-config-compat@0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23): + resolution: {integrity: sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/logger': 0.4.0 + '@firebase/remote-config': 0.4.4(@firebase/app@0.9.23) + '@firebase/remote-config-types': 0.3.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + dev: false + + /@firebase/remote-config-types@0.3.0: + resolution: {integrity: sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==} + dev: false + + /@firebase/remote-config@0.4.4(@firebase/app@0.9.23): + resolution: {integrity: sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/logger': 0.4.0 + '@firebase/util': 1.9.3 + tslib: 2.6.2 + dev: false + + /@firebase/storage-compat@0.3.2(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==} + peerDependencies: + '@firebase/app-compat': 0.x + dependencies: + '@firebase/app-compat': 0.2.23 + '@firebase/component': 0.6.4 + '@firebase/storage': 0.11.2(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/storage-types': 0.8.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3) + '@firebase/util': 1.9.3 + tslib: 2.6.2 + transitivePeerDependencies: + - '@firebase/app' + - '@firebase/app-types' + - encoding + dev: false + + /@firebase/storage-types@0.8.0(@firebase/app-types@0.9.0)(@firebase/util@1.9.3): + resolution: {integrity: sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg==} + peerDependencies: + '@firebase/app-types': 0.x + '@firebase/util': 1.x + dependencies: + '@firebase/app-types': 0.9.0 + '@firebase/util': 1.9.3 + dev: false + + /@firebase/storage@0.11.2(@firebase/app@0.9.23)(encoding@0.1.13): + resolution: {integrity: sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==} + peerDependencies: + '@firebase/app': 0.x + dependencies: + '@firebase/app': 0.9.23 + '@firebase/component': 0.6.4 + '@firebase/util': 1.9.3 + node-fetch: 2.6.7(encoding@0.1.13) + tslib: 2.6.2 + transitivePeerDependencies: + - encoding + dev: false + + /@firebase/util@1.9.3: + resolution: {integrity: sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA==} + dependencies: + tslib: 2.6.2 + dev: false + + /@firebase/webchannel-wrapper@0.10.3: + resolution: {integrity: sha512-+ZplYUN3HOpgCfgInqgdDAbkGGVzES1cs32JJpeqoh87SkRobGXElJx+1GZSaDqzFL+bYiX18qEcBK76mYs8uA==} + dev: false + /@floating-ui/core@1.5.0: resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==} dependencies: @@ -1889,6 +2346,25 @@ packages: /@floating-ui/utils@0.1.6: resolution: {integrity: sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A==} + /@grpc/grpc-js@1.9.11: + resolution: {integrity: sha512-QDhMfbTROOXUhLHMroow8f3EHiCKUOh6UwxMP5S3EuXMnWMNSVIhatGZRwkpg9OUTYdZPsDUVH3cOAkWhGFUJw==} + engines: {node: ^8.13.0 || >=10.10.0} + dependencies: + '@grpc/proto-loader': 0.7.10 + '@types/node': 20.0.0 + dev: false + + /@grpc/proto-loader@0.7.10: + resolution: {integrity: sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==} + engines: {node: '>=6'} + hasBin: true + dependencies: + lodash.camelcase: 4.3.0 + long: 5.2.3 + protobufjs: 7.2.5 + yargs: 17.7.2 + dev: false + /@hookform/resolvers@3.3.2(react-hook-form@7.47.0): resolution: {integrity: sha512-Tw+GGPnBp+5DOsSg4ek3LCPgkBOuOgS5DsDV7qsWNH9LZc433kgsWICjlsh2J9p04H2K66hsXPPb9qn9ILdUtA==} peerDependencies: @@ -2220,6 +2696,49 @@ packages: webpack: 5.89.0(@swc/core@1.3.95)(esbuild@0.18.20) dev: true + /@protobufjs/aspromise@1.1.2: + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + dev: false + + /@protobufjs/base64@1.1.2: + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + dev: false + + /@protobufjs/codegen@2.0.4: + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + dev: false + + /@protobufjs/eventemitter@1.1.0: + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + dev: false + + /@protobufjs/fetch@1.1.0: + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + dev: false + + /@protobufjs/float@1.0.2: + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + dev: false + + /@protobufjs/inquire@1.1.0: + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + dev: false + + /@protobufjs/path@1.1.2: + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + dev: false + + /@protobufjs/pool@1.1.0: + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + dev: false + + /@protobufjs/utf8@1.1.0: + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + dev: false + /@radix-ui/number@1.0.1: resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} dependencies: @@ -4982,7 +5501,6 @@ packages: /@types/node@20.0.0: resolution: {integrity: sha512-cD2uPTDnQQCVpmRefonO98/PPijuOnnEy5oytWJFPY1N9aJCz2wJ5kSGWO+zJoed2cY2JxQh6yBuUq4vIn61hw==} - dev: true /@types/normalize-package-data@2.4.3: resolution: {integrity: sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==} @@ -5560,7 +6078,6 @@ packages: /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: true /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} @@ -6355,7 +6872,6 @@ packages: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 - dev: true /clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} @@ -7027,7 +7543,6 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} @@ -7047,7 +7562,6 @@ packages: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} dependencies: iconv-lite: 0.6.3 - dev: true /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} @@ -7784,6 +8298,13 @@ packages: dependencies: reusify: 1.0.4 + /faye-websocket@0.11.4: + resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} + engines: {node: '>=0.8.0'} + dependencies: + websocket-driver: 0.7.4 + dev: false + /fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} dependencies: @@ -7910,6 +8431,40 @@ packages: path-exists: 5.0.0 dev: true + /firebase@10.6.0(encoding@0.1.13): + resolution: {integrity: sha512-bnYwHwZ6zB+dM6mGQPEXcFHtAT2WoVzG6H4SIR8HzURVGKJxBW+TqfP3qcJQjTZV3tDqDTo/XZkVmoU/SovV8A==} + dependencies: + '@firebase/analytics': 0.10.0(@firebase/app@0.9.23) + '@firebase/analytics-compat': 0.2.6(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23) + '@firebase/app': 0.9.23 + '@firebase/app-check': 0.8.0(@firebase/app@0.9.23) + '@firebase/app-check-compat': 0.3.7(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23) + '@firebase/app-compat': 0.2.23 + '@firebase/app-types': 0.9.0 + '@firebase/auth': 1.4.0(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/auth-compat': 0.4.9(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/database': 1.0.1 + '@firebase/database-compat': 1.0.1 + '@firebase/firestore': 4.3.2(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/firestore-compat': 0.3.22(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/functions': 0.10.0(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/functions-compat': 0.3.5(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/installations': 0.6.4(@firebase/app@0.9.23) + '@firebase/installations-compat': 0.2.4(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23) + '@firebase/messaging': 0.12.4(@firebase/app@0.9.23) + '@firebase/messaging-compat': 0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23) + '@firebase/performance': 0.6.4(@firebase/app@0.9.23) + '@firebase/performance-compat': 0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23) + '@firebase/remote-config': 0.4.4(@firebase/app@0.9.23) + '@firebase/remote-config-compat': 0.2.4(@firebase/app-compat@0.2.23)(@firebase/app@0.9.23) + '@firebase/storage': 0.11.2(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/storage-compat': 0.3.2(@firebase/app-compat@0.2.23)(@firebase/app-types@0.9.0)(@firebase/app@0.9.23)(encoding@0.1.13) + '@firebase/util': 1.9.3 + transitivePeerDependencies: + - '@react-native-async-storage/async-storage' + - encoding + dev: false + /flat-cache@3.1.1: resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} engines: {node: '>=12.0.0'} @@ -8071,7 +8626,6 @@ packages: /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: true /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -8419,6 +8973,10 @@ packages: toidentifier: 1.0.1 dev: true + /http-parser-js@0.5.8: + resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} + dev: false + /https-browserify@1.0.0: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} dev: true @@ -8472,7 +9030,6 @@ packages: requiresBuild: true dependencies: safer-buffer: 2.1.2 - dev: true /icss-utils@5.1.0(postcss@8.4.31): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} @@ -8483,6 +9040,14 @@ packages: postcss: 8.4.31 dev: true + /idb@7.0.1: + resolution: {integrity: sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg==} + dev: false + + /idb@7.1.1: + resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + dev: false + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -8683,7 +9248,6 @@ packages: /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: true /is-fullwidth-code-point@4.0.0: resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} @@ -9311,6 +9875,10 @@ packages: p-locate: 6.0.0 dev: true + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: false + /lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true @@ -9346,6 +9914,10 @@ packages: wrap-ansi: 8.1.0 dev: true + /long@5.2.3: + resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -9815,6 +10387,19 @@ packages: resolution: {integrity: sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w==} dev: true + /node-fetch@2.6.7(encoding@0.1.13): + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + encoding: 0.1.13 + whatwg-url: 5.0.0 + dev: false + /node-fetch@2.7.0(encoding@0.1.13): resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -10596,6 +11181,25 @@ packages: react-is: 16.13.1 dev: true + /protobufjs@7.2.5: + resolution: {integrity: sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==} + engines: {node: '>=12.0.0'} + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/node': 20.0.0 + long: 5.2.3 + dev: false + /proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -11098,7 +11702,6 @@ packages: /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: true /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} @@ -11255,7 +11858,6 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true /sass-loader@12.6.0(webpack@5.89.0): resolution: {integrity: sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==} @@ -11699,7 +12301,6 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true /string-width@5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} @@ -11765,7 +12366,6 @@ packages: engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: true /strip-ansi@7.1.0: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} @@ -12142,7 +12742,6 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true /ts-api-utils@1.0.3(typescript@5.2.2): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} @@ -12713,7 +13312,6 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true /webpack-dev-middleware@6.1.1(webpack@5.89.0): resolution: {integrity: sha512-y51HrHaFeeWir0YO4f0g+9GwZawuigzcAdRNon6jErXy/SqV/+O6eaVAzDqE6t3e3NpGeR5CS+cCDaTC+V3yEQ==} @@ -12789,12 +13387,25 @@ packages: - uglify-js dev: true + /websocket-driver@0.7.4: + resolution: {integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==} + engines: {node: '>=0.8.0'} + dependencies: + http-parser-js: 0.5.8 + safe-buffer: 5.2.1 + websocket-extensions: 0.1.4 + dev: false + + /websocket-extensions@0.1.4: + resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==} + engines: {node: '>=0.8.0'} + dev: false + /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -12881,7 +13492,6 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true /wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} @@ -12946,7 +13556,6 @@ packages: /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - dev: true /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -12971,7 +13580,6 @@ packages: /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - dev: true /yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} @@ -12997,7 +13605,6 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: true /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} diff --git a/src/app/(root)/(routes)/chat/page.tsx b/src/app/(root)/(routes)/chat/page.tsx new file mode 100644 index 00000000..3f7931e2 --- /dev/null +++ b/src/app/(root)/(routes)/chat/page.tsx @@ -0,0 +1,62 @@ +'use client' + +import React from 'react' +import { collection, limit, orderBy, query, addDoc } from 'firebase/firestore' +import useFirestoreQuery, { Message } from '@/hooks/useFirestoreQuery' +import { db, getMessageRef } from '@/lib/firebase' + +const ChatPage = () => { + const messageRef = getMessageRef('room2') + const messages = useFirestoreQuery( + query(messageRef, orderBy('createdAt', 'asc'), limit(200)), + ) + + const [newMessage, setNewMessage] = React.useState('') + + const onChange = (e: React.ChangeEvent) => { + e.preventDefault() + setNewMessage(e.target.value) + } + + return ( +
+

chat

+

new message

+
) => { + e.preventDefault() + console.log(newMessage) + addDoc(collection(db, 'chats', 'room2', 'messages'), { + text: newMessage, + sender: 'me', + createdAt: new Date().toISOString(), + }).then(() => { + setNewMessage('') + }) + }} + > + + +
+
+ {messages.map((item: Message, idx: number) => { + console.log(item) + return ( +
+

{`${item.sender}:`}

+

{item.text}

+
+ ) + })} + {messages.length === 0 &&

no data

} +
+
+ ) +} + +export default ChatPage diff --git a/src/hooks/useFirestoreQuery.ts b/src/hooks/useFirestoreQuery.ts new file mode 100644 index 00000000..63e341a0 --- /dev/null +++ b/src/hooks/useFirestoreQuery.ts @@ -0,0 +1,51 @@ +'use client' + +import { useEffect, useRef, useState } from 'react' +import { Query, onSnapshot, queryEqual } from 'firebase/firestore' + +export interface Message { + text: string + createdAt: Date + sender: string + id: string +} + +const isMessageType = (arg: any): arg is Message => { + return ( + arg.text !== undefined && + arg.createdAt !== undefined && + arg.sender !== undefined + ) +} + +const useFirestoreQuery = (query: Query) => { + const [docs, setDocs] = useState([]) + + const queryRef = useRef(query) + + useEffect(() => { + if (!queryEqual(queryRef?.current, query)) { + queryRef.current = query + } + }) + + useEffect(() => { + if (!queryRef.current) { + return + } + + const unsubscribe = onSnapshot(queryRef.current, (snapshot) => { + const messages = snapshot.docs + .map((doc) => ({ ...doc.data(), id: doc.id })) + .filter(isMessageType) + + setDocs(() => messages) + }) + + return unsubscribe + }, [queryRef]) + + return docs +} + +export default useFirestoreQuery diff --git a/src/lib/firebase/index.ts b/src/lib/firebase/index.ts new file mode 100644 index 00000000..8869066d --- /dev/null +++ b/src/lib/firebase/index.ts @@ -0,0 +1,31 @@ +import { initializeApp } from 'firebase/app' +import { + CollectionReference, + getFirestore, + collection, +} from 'firebase/firestore' + +export const firebaseConfig = { + apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY, + authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, + projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID, + storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET, + messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID, + appId: process.env.NEXT_PUBLIC_APP_ID, +} + +const fb = initializeApp(firebaseConfig) +const db = getFirestore(fb) + +const getMessageRef = (roomId: string): CollectionReference => { + return collection(db, 'chats', roomId, 'messages') +} + +// async function getData(db: Firestore) { +// const dataCol = collection(db, 'chats', 'room2', 'messages') +// const dataSnap = await getDocs(dataCol) +// const dataList = dataSnap.docs.map((doc) => doc.data()) +// return dataList +// } + +export { db, getMessageRef }